MACROMEDIA FLASH MX 2004-USING FLASH Use Manual page 24

Hide thumbs Also See for FLASH MX 2004-USING FLASH:
Table of Contents

Advertisement

The following example shows the hierarchy of a document named westCoast on level 0, which
contains three movie clips: california, oregon, and washington. Each of these movie clips in turn
contains two movie clips.
_level0
westCoast
california
oregon
washington
As on a web server, each Timeline in Flash can be addressed in two ways: with an absolute path or
with a relative path. The absolute path of an instance is always a full path from a level name,
regardless of which Timeline calls the action; for example, the absolute path to the instance
is
california
_level0.westCoast.california
different locations; for example, the relative path to
, but from
_parent
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
to refer to the topmost Timeline of the current level. For example, an action in the movie
_root
clip
california
_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
document is loaded. For example, the first document that opens in Flash Player is called
a document loaded into level 3 is called
To communicate between documents on different levels, you must use the level name in the
target path. The following example shows how the
instance located on a movie clip called
_level5.georgia.atlanta
You can use the alias
Timeline, the
_root
a document loaded into
on level 5. For example, if the movie clips
same level, an action called from the instance
path to target the instance
_root.eastCoast.florida
24
Chapter 1: Working with Flash Documents
sanfrancisco
bakersfield
portland
ashland
olympia
ellensburg
, it's
portland
_parent._parent.california
that refers to the movie clip
.
to refer to the main Timeline of the current level. For the main
_root
alias stands for
_level0
,
_level5
_root
:
florida
. A relative path is different when called from
california
could use the absolute path
oregon
, where
_levelX
X
.
_level3
portland
(
is at the same level as
georgia
georgia
when targeted by a movie clip also on
is equal to
_level5
and
southcarolina
southcarolina
from
sanfrancisco
.
is the level number into which the
instance would address the
oregon
when targeted by a movie clip also
are both loaded into the
florida
could use the following absolute
is
;
_level0
atlanta
):
. For
_level0

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash mx 2004 - actionscript

Table of Contents