Backward Movie Clip

written by: Paulo Caldeira; article published: year 2007, month 07;


In: Root » Computers and technology » Flash » Backward Movie Clip

Dutch French Spanish Portuguese Italian German Japanese Chinese Korean Russian Arabic Bookmark and Share this Article

In this tutorials, you'll make a movie clip run backward.

We will start the movie clip at the last frame and then use a prevFrame command to send the clip back one frame at a time.

  1. Start a new movie. Place a simple, animated movie clip on the screen. You can use the "gear animation" from the previous example.

    In this case, it doesn't matter what you name the movie clip. We will never need to refer to it by name because the script will be attached directly to the movie clip.

  2. Select the movie clip and bring up the Actions panel. The title of the Actions panel should be Actions—Movie Clip.

  3. Two handlers are in this script. The first one is an onClipEvent (load) handler that sends the movie clip to the last frame, in this case frame 60:

    onClipEvent (load) {     
     gotoAndStop(60);  
    }  

    This handler is called only once, when the movie clip first appears.

  4. The second handler is an onClipEvent (enterFrame) handler that executes once per frame. It pushes the movie clip to the previous frame:

    onClipEvent (enterFrame) {      
    prevFrame(); 
     } 

Test the movie to see it in action.

Disclaimer

1) E-articles is not responsible for the information contained by this article as well for any and all copyright infringements by authors and writers. E-articles is a free information resource. If you suspect this article for any copyright infringement, please read the terms of service and contact us to investigate the problem.
2) E-articles is not responsible for inaccuracies, falsehoods, or any other types of misinformation this article may contain and will not be liable for any loss or damage suffered by a user through the user's reliance on the information gained here.

link to this article