3 Replies Latest reply on Dec 10, 2008 3:49 AM by Cevema

    Reverse Timeline ?

    Cevema Level 1
      I have created a very long thin bitmap image which I have imported into flash and made into a movie clip (approx 6000px x 100px) I want it to slowly move through the stage in approx 3000 frames @ 25/s. This is easy for me just start at frame 1 and move it to a new position at frame 3000 and make a motion tween.

      The problem is that when it reaches the end I want it to reverse the time line and go back to the start and then.

      I know I could do this my copying and pasting frame 1 at frame 6000 and make another tween, but I wondered if there is an action script that I could put at frame 1 and frame 3000 to reverse the direction of the timeline?



        • 1. Re: Reverse Timeline ?
          Level 7
          It would be much easier to modify if you just use one of the tweening
          engines like Tweener.

          Dave -
          Head Developer
          Adobe Community Expert

          • 2. Reverse Timeline ?
            Ned Murphy Adobe Community Professional & MVP
            I don't think you can reverse the timeline, but you can travel the timeline in the reverse direction. What I have done in the past is to have what I usually call a mover movieclip which when needed is sent from a vacant (except for stop();) frame 1 to frame 2 which has another stop(); and an onEnterfame function that continually tells the movie I want to go backwards to move to the previous frame until it hits a destination (in your case frame 1).

            I didn't realize back then that there was a method that commands that step backwards called prevFrame(). So in my case I was using gotoAndStop(_currentframe-1).

            In your case you may not have to use a mover and might be able to just have this onEnterFrame as part of the main timeline, and you could use the prevFrame() method in conjunction with the nextFrame() method to travel both ways, forward and backward on the timeline, using a conditional with a simple boolean variable that changes at frame 1 and the far end to determine which method is in use.
            • 3. Re: Reverse Timeline ?
              Cevema Level 1
              Thanks for the replies.