Example
The following example uses the
the added value of the three parameters. The next line of code calls
returned value to the variable
function sum(a, b, c){
return a + b + c;
}
newValue = sum(4, 32, 78);
trace(newValue);
// sends 114 to the Output panel
See also
function
_root
Availability
Flash Player 5.
Usage
_root.movieClip
_root.action
_root.property
Parameters
The instance name of a movie clip.
movieClip
An action or method.
action
A property of the MovieClip object.
property
Description
Property; specifies or returns a reference to the root movie Timeline. If a movie has multiple
levels, the root movie Timeline is on the level containing the currently executing script. For
example, if a script in level 1 evaluates
Specifying
_root
current level.
Note: If a movie that contains
loading movie, not to the Timeline that contains
Timeline of the loaded movie even if it is loaded into another movie, use
Example
The following example stops the Timeline of the level containing the currently executing script:
_root.stop();
The following example sends the Timeline in the current level to Frame 3:
_root.gotoAndStop(3);
See also
MovieClip._lockroot
606
Chapter 12: ActionScript Dictionary
return
newValue
_root
is the same as using the slash notation (
is loaded into another movie,
_root
,
,
_parent
targetPath
action inside the body of the
.
,
is returned.
_level1
) to specify an absolute path within the
/
. If you want to ensure that
_root
function to return
sum()
and assigns the
sum()
refers to the Timeline of the
_root
refers to the
_root
MovieClip._lockroot
.
Need help?
Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?
Questions and answers