Skip to main content
Known Participant
June 9, 2010
Question

How to get a movie clip to play in reverse?

  • June 9, 2010
  • 2 replies
  • 3615 views

I've created a slide presentation when you click the next button the playhead advances to the next frame plays a movie clip and stops (the stop() is at the end of the movie clip script). When you click the previous button I would like the playhead to move to the previous frame, play the movie clip in reverse and stop at the beginning of the clip. what can be done? My script now is:

Thanks

This topic has been closed for replies.

2 replies

Ned Murphy
Legend
June 9, 2010

The movieclip that plays in the previous frame will need to have an instance name assigned to it so that you can tell it to go to its last frame (use the totalFrames property of the movieclip)  Then you need to initiate a function that continuously fires to tell that movieclip to go to its previous frame until the frame number is 1.  You can use an ENTER_FRAME event listener/handler for the continuous firing aspect.

maxshreckAuthor
Known Participant
June 9, 2010

OK so working from the last frame(11) I would hit Previous Button (instance name prev_btn). And the playhead would move to frame 10 and play Movie Clips:

mcHandsPage (instance name handPS_mc)

and

mcMayflowTruck (instance name mayflow_mc)

What should I write in previous posted script so the script will play it in reverse

Thanks

maxshreckAuthor
Known Participant
June 10, 2010

OK I found this script with some code that you have referred to, it doesn't work, probably for some obvious reason I don't know about (yet I hope). I have just put this script on the actions layer of frame 11.

The highlighted script is what I put in. what's the Duplicate function definition error?

The play head now just loops through the whole timeline.

kglad
Community Expert
Community Expert
June 9, 2010

flash will need some way to determine the instance name of the movieclip on each frame (but the last).  do you know how to specify those names?