How's this for an idea? Ignore the position of the playhead, just get the mouse position - it's crude code, but it sort of works, and you can refine it as you see fit...

import fl.video.FLVPlayback;
import fl.video.VideoEvent;

import flash.text.TextField;

//var player:FLVPlayback;
//var _tip:TextField;

player.addEventListener(VideoEvent.SCRUB_START, _scrubStartHandler, false, 0, true); player.addEventListener(VideoEvent.SCRUB_FINISH, _scrubEndHandler, false, 0, true);
player.addEventListener(VideoEvent.SEEKED, _seekHandler, false, 0, true);
player.play("http://www.helpexamples.com/flash/video/caption_video.flv";);

_tip.visible = false;

function _seekHandler(v:VideoEvent):void {
   trace("seek event " + v.playheadTime);
   _tip.x = this.mouseX;
   _tip.y = this.mouseY - _tip.height;
   _tip.text = "" + v.playheadTime;
}

function _scrubStartHandler(v:VideoEvent):void {
   trace("_scrubStartHandler event " + v.playheadTime);
   _tip.x = this.mouseX;
   _tip.y = this.mouseY - _tip.height;
   _tip.text = "" + v.playheadTime;
   _tip.visible = true;
}

function _scrubEndHandler(v:VideoEvent):void {
   trace("_scrubEndHandler event " + v.playheadTime);
   _tip.x = this.mouseX;
   _tip.y = this.mouseY - _tip.height;
   _tip.text = "" + v.playheadTime;
   _tip.visible = false;
}

David Hunter wrote:
hi list,
i'm having absolutely no luck targeting the handle of a seekbar used with an 
FLVPlayback component. i only want to read its x value to add a tooltip, which 
i've seen on other sites. i have tried using both a skin with a seekbar built 
in and ignoring a skin and manually adding a seekbar component but have had no 
joy with either.
i originally started using just video and netstream but found that i couldn't 
attach a seekbar component to it so i'd have to program all the regular 
interaction myself just to add a simple tooltip, so thought it would be easier 
to use FLVPlayback.
i don't use components very often but i would have thought it was a simple 
thing to access.
thanks for any pointers,
david _________________________________________________________________
Got a cool Hotmail story? Tell us now
http://clk.atdmt.com/UKM/go/195013117/direct/01/_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


--

Glen Pike
01326 218440
www.glenpike.co.uk <http://www.glenpike.co.uk>

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to