Adobe 38039336 - Flash CS3 Professional User Manual page 78

User guide
Hide thumbs Also See for 38039336 - Flash CS3 Professional:
Table of Contents

Advertisement

About nested movie clips and parent-child hierarchy
When you create a movie clip instance in a Flash document, the movie clip's Timeline is nested inside the main
Timeline of the document. Each movie clip symbol has its own Timeline. You can also nest a movie clip instance
inside another movie clip symbol.
When a movie clip is nested inside another movie clip, or inside a document, it becomes a child of that movie clip or
document, which becomes the parent. Relationships between nested movie clips are hierarchical: modifications
made to the parent affect the child. 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. In the Movie Explorer, you can view the hierarchy of nested
movie clips in a document.
To understand movie clip 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 (or root) 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. 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
and
frontWheel
backWheel
main Timeline. As children of
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
and
frontWheel
backWheel
wheels spin, but they also move with the parent movie clip
For a video tutorial about using multiple timelines, see www.adobe.com/go/vid0128.
See also
"Using symbols, instances, and library assets" on page 208
About absolute paths
An absolute path starts with the name of the level into which the document is loaded and continues through the
display list until it reaches the target instance. You can also use the alias
the current level. For example, an action in the movie clip
use the absolute path
_root.westCoast.oregon
The first document to open in Flash Player is loaded at level 0. You must assign each additional loaded document a
level number. When you use an absolute reference in ActionScript to reference a loaded document, use the form
, where
is the level number into which the document is loaded. For example, the first document that opens
_levelX
X
in Flash Player is called
_level0
To communicate between documents on different levels, you must use the level name in the target path. The
following example shows how the
called
(
georgia
georgia
_level5.georgia.atlanta
. Then you can place the wheels on the car movie clip's Timeline—not on the
,
and
car
frontWheel
, they continue to be affected by the tween on their parent movie clip,
.
; a document loaded into level 3 is called
instance would address the
portland
is at the same level as
oregon
are affected by any changes made to
backWheel
across the Stage.
car
_root
that refers to the movie clip
california
_level3
atlanta
):
; they move
car
to refer to the topmost Timeline of
oregon
.
instance located in a movie clip
FLASH CS3
72
User Guide
; the
car
could

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash cs3 professional

Table of Contents