_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
,
is returned.
_root
_level1
Specifying
is the same as using the deprecated slash notation (
) to specify an absolute
_root
/
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
- The instance name of a movie clip.
movieClip:String
- An action or field.
action:String
- A property of the MovieClip object.
property:String
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
108
ActionScript language elements
Need help?
Do you have a question about the FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE and is the answer not in the manual?