1. Technology
You can opt-out at any time. Please refer to our privacy policy for contact information.

Flash Animation 18: Controlling Movie Clips With Buttons and ActionScripting II


4 of 4

Using the Old Actions to Create New Code and Conclusion
Flash Animation 18: Controlling Movie Clips With Buttons and ActionScripting II
Now open the Actions panel for the Eyes button under the Remove header, and then paste the code copied from the original button into the Actions window. Now edit the code to read:

on (release) {
TallEyes.gotoAndStop(1) ;

Where before we had told Flash to go to the second frame of our movie clip and play it from there, now we're going to tell it to rewind all the way to the first frame (where we inserted a stop anyway) and tell it to stop there, rather than play. So it would be as if we never played the movie clip to start with, in essence "undressing" the snowman; click here to see how mine works.

Now all that's left is to repeat the same thing over again on each of your buttons, pasting the code and then modifying to reflect the instance names.

Tip: Once you finish setting up the Remove options for one scene, you can just copy the frame containing your buttons and then paste it in a new layer on your next scene(s). All you need to do then is just change the instance names on the buttons, and then edit the code to reflect the correct instance name of your movie clips.

Tip #2: Another time-saver is the dropdown menu at the top of the Actions pane. Rather than close out after entering each code snippet and then right-clicking on another button to open its Actions window, you can just select the button name by instance from the dropdown to assign actions to it.

Related Video
Edit Clips in Windows Movie Maker

©2014 About.com. All rights reserved.