Description
Identifier; creates global variables, objects, or classes. For example, you could create a library that
is exposed as a global ActionScript object, much like the Math or Date object. Unlike Timeline-
declared or locally declared variables and functions, global variables and functions are visible to
every Timeline and scope in the SWF file, provided they are not obscured by identifiers with the
same names in inner scopes.
Example
The following example creates a top-level function
Timeline and scope in a SWF file:
_global.factorial = function (n) {
if (n <= 1) {
return 1;
} else {
return n * factorial(n-1);
}
}
See also
var,
set variable
gotoAndPlay()
Availability
Flash 2.
Usage
gotoAndPlay([scene,] frame)
Parameters
An optional string specifying the name of the scene to which the playhead is sent.
scene
A number representing the frame number, or a string representing the label of the frame,
frame
to which the playhead is sent.
Returns
Nothing.
Description
Function; sends the playhead to the specified frame in a scene and plays from that frame. If no
scene is specified, the playhead goes to the specified frame in the current scene.
Example
When the user clicks a button to which
Frame 16 in the current scene and starts to play.
on(release) {
gotoAndPlay(16);
}
See also
MovieClip.gotoAndPlay()
396
Chapter 12: ActionScript Dictionary
factorial()
is assigned, the playhead is sent to
gotoAndPlay()
that is available to every
Need help?
Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?