RE: [Flashcoders] AS3 can't target seekbar handle

2010-01-14 Thread David Hunter

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 +
> From: postmas...@glenpike.co.uk
> To: flashcoders@chattyfig.figleaf.com
> 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
> > Flashcoders@chattyfig.figleaf.com
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> >   
> 
> -- 
> 
> Glen Pike
> 01326 218440
> www.glenpike.co.uk <http://www.glenpike.co.uk>
> 
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> 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
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AS3 can't target seekbar handle

2010-01-13 Thread Glen Pike
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
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

  


--

Glen Pike
01326 218440
www.glenpike.co.uk 

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] AS3 can't target seekbar handle

2010-01-13 Thread David Hunter

i have no problem with getting an in instance of FLVPlayback to work, its 
playing stopping and scrubbing with a skin. i just can't seem to access the 
actual handle in the skin.
the search goes on...


> From: pedrok...@gmail.com
> Date: Wed, 13 Jan 2010 18:13:06 +0100
> Subject: Re: [Flashcoders] AS3 can't target seekbar handle
> To: flashcoders@chattyfig.figleaf.com
> 
> I have never used the FLV component, but I suppose you have to import it
> first, or nothing will work. (it happens often to me).
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
_
Send us your Hotmail stories and be featured in our newsletter
http://clk.atdmt.com/UKM/go/195013117/direct/01/___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AS3 can't target seekbar handle

2010-01-13 Thread Pedro Kostelec
I have never used the FLV component, but I suppose you have to import it
first, or nothing will work. (it happens often to me).
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] AS3 can't target seekbar handle

2010-01-13 Thread David Hunter

thanks Henrik, care to shed some light on that, i have been through the docs, 
googled lots, opened the components and skins to look for it. but whether i try 
SeekBarHandle, seekBarHandle, SeekBarHandle_mc, handle_mc, (and other 
variations i have found listed) all appended to myFLVPlayback or 
myFLVPlayback.seekBar or mySeekBar, and all to no effect. it always throws 
either an error when compiling or if it does compile and then when i trigger 
the event it throws errors when the event is fired.
i must be missing a trick somewhere!

> Date: Wed, 13 Jan 2010 17:33:51 +0100
> From: he...@henke37.cjb.net
> To: flashcoders@chattyfig.figleaf.com
> Subject: Re: [Flashcoders] AS3  can't target seekbar handle
> 
> There is a property for it, I read the source myself.
> ___
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
  
_
We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now
http://clk.atdmt.com/UKM/go/195013117/direct/01/___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] AS3 can't target seekbar handle

2010-01-13 Thread Henrik Andersson

There is a property for it, I read the source myself.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] AS3 can't target seekbar handle

2010-01-13 Thread David Hunter

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
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders