108
ActionScript language elements
_root property
_root.
movieClip
_root.
action
_root.
property
Specifies or returns a reference to the root movie clip Timeline. If a movie clip has multiple
levels, the root movie clip Timeline is on the level containing the currently executing script.
For example, if a script in level 1 evaluates
_root
,
_level1
is returned.
Specifying
_root
is the same as using the deprecated slash notation (
/
) to specify an absolute
path within the current level.
Note:
If a movie clip that contains _root is loaded into another movie clip, _root refers to the
Timeline of the loading movie clip, not the Timeline that contains _root. If you want to
ensure that _root refers to the Timeline of the loaded movie clip even if it is loaded into
another movie clip, use MovieClip._lockroot.
Availability:
ActionScript 1.0; Flash Lite 2.0
Parameters
movieClip
:
String
- The instance name of a movie clip.
action
:
String
- An action or field.
property
:
String
- A property of the MovieClip object.
Example
The following example stops the Timeline of the level containing the currently executing
script:
_root.stop();
The following example traces variables and instances in the scope of
_root
:
for (prop in _root) {
trace("_root."+prop+" = "+_root[prop]);
}
See also
_lockroot (MovieClip._lockroot property)
,
_parent property
,
targetPath
function
scroll property
textFieldVariableName
.scroll =
x
Summary of Contents for FLASHLITE2 ACTIONSCRIPT-LANGUAGE
Page 1: ...Flash Lite 2 x ActionScript Language Reference...
Page 22: ...22 Contents...
Page 244: ...244 ActionScript language elements...
Page 760: ...760 ActionScript classes...