Jump to content
Search Community

FLV Stream/TimelineMax Scrub Bar

razedandrisen test
Moderator Tag

Recommended Posts

for the timeline scrubber watch:

 

x10's video

(source files in description)

 

as for using the same scruber to control an flv... you really can't scrub flv's all that well but you can't use your scrubber value to drive the playhead to the proper point in time.

if using the flvPlayback component you could adjust:

 

http://livedocs.adobe.com/flash/9.0/Act ... Percentage

Link to comment
Share on other sites

Thanks for the reply,

 

I am using the flvPlayback component. I also do have a scrub bar code for TimelineMAX, I just can't seem to marry them together. Using

playheadPercentage() is fine but I would like to move the play head using seconds, not a percentage only because my scrub bar for TimelineMax uses Seconds to navigate the timeline.

 

Here is my TimelineMax Scrub bar code -

slider.minimum = 0; //where the slider starts
slider.maximum = myTimeline.totalDuration; //where the slider ends
slider.liveDragging = true; //allows you to drag the slider
slider.snapInterval = 0.1; //sets points distance on the slider bar, if you remove this is deafults to whole seconds - Try It!

slider.addEventListener(SliderEvent.THUMB_DRAG, thumbDragHandler);
function thumbDragHandler(e:SliderEvent):void {

myTimeline.gotoAndStop(e.value); //Allows you to move the slider pointer and will go to the point in your timeline that matches the value of the slider bar position
}//using gotoAndStop ensure the timeline doesn't continue while you have the slider pointer held down

slider.addEventListener(SliderEvent.THUMB_RELEASE, thumbReleaseHandler);
function thumbReleaseHandler(e:SliderEvent):void {

myTimeline.resume();//This will resume the timeline once you let go of the pointer
}

this.addEventListener(Event.ENTER_FRAME, updateSlider);
function updateSlider(event:Event):void {
   slider.value = myTimeline.currentTime;//This is the clever bit that makes sure the pointer moves along the slider as your timeilne plays
}

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...