4.12. Creating Nested Animations
Problem
You want to create an animation within an animation, such as the wheels on a car or a bird flying.
Solution
Store the child animation in a movie clip, and place an instance of that movie clip in the timeline of the parent animation.
Discussion
Certain types of animation are possible only by nesting animations within one another. For example, consider the case of a bird flying across the stage. The bird is flapping its wings, and at the same time it is moving from one side of the stage to the other. In order to achieve the correct effect, it’s necessary to animate the wings flapping within a movie clip, and then you can tween an instance of that movie clip across the stage.
Flash enables nested animations with movie clip symbols. Movie clip symbols’ timelines play independently of the main timeline, and you can nest practically any number of movie clips inside of each other.
To create a nested animation, follow these steps:
Create a new movie clip symbol by choosing Insert → New Symbol or by converting existing artwork to a symbol (Insert → Convert to Symbol). In the Create New Symbol or Convert to Symbol dialog box, name the movie clip and set its behavior to Movie Clip.
A new coordinate space and timeline display. Create the animation that you intend to nest inside another animation. In the example of the flying bird, you’d animate the flapping wings within the movie clip.
Return to the main timeline. If you started by creating a new symbol rather ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access