Nesting Movie Clips for Complex Animations
Let's take a look at a simplified example of a blinking head which bounces across the stage. First we will create the blinking animation movie clip and then nest that inside the bouncing head movie clip.
- Start a new FlashR and ActionScript 3 project. Rename Layer 1 to "Head".
- Use the Oval tool to draw the shape of the head. Set the Fill color to any flesh color and the Stroke to null. Draw an oval in the upper left corner of the stage. Lock the Head layer.
- Create a new layer in the Timeline and name it "Eyes". To make an eye, first draw an oval with the Fill color set to white. On top of this white circle, draw a smaller, black oval for the pupil. Select all (Edit – Select All) and click Modify – Group to group these two shapes together.
To make a second eye, simply copy the group and paste it next to the first eye. Now, select both of the eyes and click Modify – Group to group both eyes together.
Now we are ready to work on the movie clip animation for the nested eyes. But first we need to convert the eyes to a movie clip.
- Click on the grouped eyes and click Modify – Convert to Symbol. Name the movie clip "eyesBlink".
Note that we now have our eyesBlink movie clip in the Flash Library and the eyes on the stage are now an instance of the Library's movie clip. We are ready to animate. From the Library, double-click on the icon for the eyesBlink movie clip to open the Timeline for this movie clip. Rename Layer 1 to "Blink" within this Timeline.
We will make the eyes blink about every 15 frames by creating a Motion Tween. We will start the Motion Tween on Frame 11 and finish the blink animation on Frame 15. We want the eyes to be completely closed on Frame 13.
- Add a Keyframe on Frame 11 (Insert – Timeline – Keyframe). Because the eyes are still completely open on this frame, this will be the starting place for our tween.
Copyright 2018 Adobe Systems Incorporated. All rights reserved. Adobe product screen shot(s) reprinted with permission from Adobe Systems Incorporated. Adobe, Photoshop, Photoshop Album, Photoshop Elements, Illustrator, InDesign, GoLive, Acrobat, Cue, Premiere Pro, Premiere Elements, Bridge, After Effects, InCopy, Dreamweaver, Flash, ActionScript, Fireworks, Contribute, Captivate, Flash Catalyst and Flash Paper is/are either [a] registered trademark[s] or a trademark[s] of Adobe Systems Incorporated in the United States and/or other countries.
Editor's Picks Articles
Top Ten Articles
Content copyright © 2018 by Diane Cipollo. All rights reserved.
This content was written by Diane Cipollo. If you wish to use this content in any manner, you need written permission. Contact Diane Cipollo for details.