
38
Working with Flash Documents
About parent and child movie clips
When you place a movie clip instance on another movie clip’s Timeline, the placed movie clip
is the child and the other movie clip is the parent. The parent instance contains the child
instance. The root Timeline for each level is the parent of all the movie clips on its level, and
because it is the topmost Timeline, it has no parent.
A child Timeline nested inside another Timeline is affected by changes made to the parent
Timeline. For example, if
portland
is a child of
oregon
and you change the
_xscale
property of
oregon
, then the scale of
portland
also changes.
Timelines can send messages to each other with ActionScript. For example, an action on the
last frame of one movie clip can tell another movie clip to play. To use ActionScript to control
a Timeline, you must use a target path to specify the location of the Timeline. For more
information, see
“Writing target paths” on page 41
.
About movie clip hierarchy
The parent-child relationships of movie clips are hierarchical. To understand this hierarchy,
consider the hierarchy on a computer: the hard disk has a root directory (or folder) and
subdirectories. The root directory is analogous to the main Timeline of a Flash document: it is
the parent of everything else. The subdirectories are analogous to movie clips.
You can use the movie clip hierarchy in Flash to organize related objects. Any change you
make to a parent movie clip also affects its children.
For example, you could create a Flash document containing a car that moves across the Stage.
You can use a movie clip symbol to represent the car and set up a motion tween to move it
across the Stage.
To add wheels that rotate, you can create a movie clip for a car wheel, and create two instances
of this movie clip, named
frontWheel
and
backWheel
. Then you can place the wheels on the
car movie clip’s Timeline—not on the main Timeline. As children of
car
,
frontWheel
and
backWheel
are affected by any changes made to
car
; they move with the car as it tweens
across the Stage.
To make both wheel instances spin, you can set up a motion tween that rotates the wheel
symbol. Even after you change
frontWheel
and
backWheel
, they continue to be affected by
the tween on their parent movie clip,
car
; the wheels spin, but they also move with the parent
movie clip
car
across the Stage.
Summary of Contents for FLASH 8-FLASH
Page 1: ...Using Flash ...
Page 12: ...12 Contents ...
Page 110: ...110 Using Symbols Instances and Library Assets ...
Page 128: ...128 Working with Color Strokes and Fills ...
Page 156: ...156 Drawing ...
Page 190: ...190 Working with Text ...
Page 224: ...224 Working with Graphic Objects ...
Page 270: ...270 Creating Motion ...
Page 310: ...310 Working with Video ...
Page 362: ...362 Working with Screens Flash Professional Only ...
Page 386: ...386 Creating Multilanguage Text ...
Page 454: ...454 Data Integration Flash Professional Only ...
Page 500: ...500 Publishing ...
Page 534: ...534 Creating Accessible Content ...