3 Replies Latest reply on Sep 3, 2008 8:09 AM by kglad

    basic timeline scroller


      Basic thing, I know, but I've been searching for a while cant find what I need.

      We are used to using scrollers that control a Netstream object, but now we have a project where the same scoller needs to control the playback of the main timeline. So have the scruber move automatically when as the movie plays, but also be dragable to advance or rewind the SWF.

      Anyone got code or tutorial we could use?

        • 1. Re: basic timeline scroller
          kglad Adobe Community Professional & MVP
          create a scrollbar and determine the slider's two extreme positions. use the following function to find the parameters needed for a linear equation to have the sliders extreme positions associate with frame 1 and _totalframes of your timeline of interest and the linear equation parameters that will associate frame 1 and _totalframes with the slider's extreme positions.

          you can then define drag and drop methods for the slider and start a loop when the slider is being dragged so you can update the timeline's _currentframe and use a loop to update the slider's position when your movieclip is playing.

          function solveF(x1,x2,y1,y2):Array{
          b=y1 - m*x1;
          return [m,b]
          • 2. Re: basic timeline scroller
            chrisP489 Level 1
            Thanks, I will give this a try!
            • 3. Re: basic timeline scroller
              kglad Adobe Community Professional & MVP
              you're welcome.