How to Make Nested Movie Clips in Flash
Many Flash animations contain nested portions that repeat throughout the sequence. Think of a ball bouncing across the stage. While the horizontal path of the ball may not repeat, the vertical bounce portion, in a simple animation, will cycle the same up and down sequence the whole time. Although an animator could accomplish the illusion of a bouncing ball at the scene level using frame by frame animation, to work more effectively he should nest the movie clip animation, getting the same result with a fraction of the effort.
Instructions
-
Bouncing Ball Animation
-
1
Open a new Flash document and create a circle shape on the left side of the stage midway between the top and bottom of the frame.
-
2
Convert the shape to a Movie Clip symbol ("Modify" > "Convert to Symbol"). Switch to the "Selection Tool" (press "V") and double-click on the circle shape to enter symbol-editing mode.
-
-
3
In the timeline, select frame 1 and insert a "Shape Tween" ("Insert" > "Shape Tween").
-
4
Select frame 20 in the timeline and insert a keyframe ("Insert" > "Timeline" > "Keyframe"). Click on frame 10 and insert another keyframe. If it isn't selected already, select the circle shape; press and hold the "Shift" key, and drag it straight down so that the bottom edge of the circle lies a little below the lower edge of the stage.
-
5
With frame 10 still selected in the timeline, scale the circle shape vertically. Select the shape, choose "Modify" > "Transform" > "Scale" and drag the top and bottom handles together so that the circle appears squished---like a soft rubber ball stretching and distorting during a bounce. Deselect the circle and press "Enter/Return" to preview the bouncing animation.
-
6
Return to Scene 1 (click the "Scene 1" link at the top left corner of the workspace window), select frame one in the timeline and insert a "Motion Tween" ("Insert" > "Motion Tween").
-
7
Select frame 100 and insert a keyframe ("Insert" > "Timeline" > "Keyframe"). Select the circle shape on the stage; hold down the "Shift" key and drag it to the right edge of the stage.
-
8
Test the movie ("Control" > "Test Movie") to open an SWF file in the built in Flash viewer. Choosing "Test Movie" as opposed to "Play" under the Control menu allows you to see both the scene animation, (the horizontal movement across the stage), as well as the nested movie clip animation, (the vertical bounce motion). Essentially, you must publish a Flash file to see the entire animation with all nested parts, but with "Test Movie," Flash makes this a simple process.
-
1
Tips & Warnings
Even though the name "Shape Tween" suggests only shape transformations, this sort of tween can incorporate movement across the stage. This makes it easier to move and deform a shape simultaneously.
Any animation that you can perform at the scene level, you can also nest as a movie clip animation. The trick is to decide which works best as which. You can best implement cyclical animations--a walking sequence, for example--as a nested movie clip.
References
- Photo Credit basketball image by Albo from Fotolia.com