Working with Movie Clips > About multiple Timelines > About the hierarchical relationship of Timelines
About the hierarchical relationship of Timelines
When you place a movie clip
instance on another movie clip's Timeline, one movie clip symbol contains the instance of the other movie clipthe first movie clip is the child and the second movie clip is its parent. The main Timeline of a Flash movie is the parent of all the movie clips on its level.
The parent-child relationships of movie clips are hierarchical. To understand this hierarchy, consider the hierarchy on a computer: the hard drive has a root directory (or folder) and subdirectories. The root directory is analogous to the main Timeline of a Flash movie: it is the parent of everything else. The subdirectories are analogous to movie clips. You can use subdirectories to organize related content.
Similarly, you can use the movie clip hierarchy in Flash to organize related visual objects, often in ways similar to the real-world behavior of objects. Any change you make to a parent movie clip is also performed on its children.
For example, you could create a Flash movie that has a car that moves across the Stage. You could use a movie clip symbol to represent the car and set up a motion tween to move it across the Stage.
A motion tween moves the car movie clip on the main Timeline
The car is viewed from the side, with two wheels visible. Once you have the car moving, you want to add wheels that rotate. So you make a movie clip for a car wheel, and create two instances of this movie clip, named frontWheel
and backWheel
. Then you place the wheels on the Timeline of the car movie clip not on the main Timeline. As children of car
, frontWheel
and backWheel
are affected by any changes made to car
. This means that they will move with the car as it tweens across the Stage.
The frontWheel
and backWheel
instances are placed on the Timeline of the car
movie clip.
To make the wheels rotate, you can set up a motion tween to rotate the wheel symbol to make both instances spin. Even after you change frontWheel
and backWheel
, they will continue to be affected by the tween on their parent movie clip, car
; the wheels will spin, but they will also move with the parent movie clip car
across the Stage.
The wheel symbol in Edit Symbol Mode