Flash 8 Documentation |
|||
| ActionScript 2.0 Language Reference > ActionScript language elements > Global Properties > _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 Player 5
movieClip:String - The instance name of a movie clip.
action:String - An action or method.
property:String - A property of the MovieClip object.
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]);
}
_lockroot (MovieClip._lockroot property), _parent property, targetPath function
Version 8
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/8/main/00001792.html