Thanks for that Glen, and your code! I had thought about that as a work-around but was using an enterframe event rather than the seeked. i guess i'd just have to fix the y value of the tip, and then add some x value constraints. cheers a lot.
> Date: Thu, 14 Jan 2010 00:10:11 +0000 > From: [email protected] > To: [email protected] > Subject: Re: [Flashcoders] AS3 can't target seekbar handle > > 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 _________________________________________________________________ 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

