![]() ![]() ![]() | |
![]() | |
![]() | |
![]() |
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 _root
to refer to the topmost Timeline of the current level. For example, an action in the movie clip california
that refers to the movie clip oregon
could use the absolute path _root.westCoast.oregon
.
The first document to be opened in the 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 _level
X
, where X
is the level number into which the document is loaded. For example, the first document opened in the Flash Player is called _level0
; a document loaded into level 3 is called _level3
.
In the following example, two documents have been loaded into the Flash Player: TargetPaths.swf at level 0, and EastCoast.swf at level 5. The levels are indicated in the Debugger, with level 0 indicated as _root
.
To communicate between documents on different levels, you must use the level name in the target path. For example, the portland
instance would address the atlanta
instance as follows:
_level5.georgia.atlanta
You can use the alias _root
to refer to the main Timeline of the current level. For the main Timeline, the _root
alias stands for _level0
when targeted by a clip also on _level0
. For a document loaded into _level5
, _root
is equal to _level5
when targeted by a movie clip also on level 5. For example, because southcarolina
and florida
are both loaded into the same level, an action called from the instance southcarolina
could use the following absolute path to target the instance florida
:
_root.eastCoast.florida
![]() | |
![]() | |
![]() | |
![]() ![]() ![]() |