![]() ![]() ![]() | |
![]() | |
![]() | |
![]() |
Flash Player 6.
_global.
identifier
None.
A reference to the global object that holds the core ActionScript classes, such as String, Object, Math, and Array.
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.
The following example creates a top-level function factorial()
that is available to every Timeline and scope in a SWF file:
_global.factorial = function (n) { if (n <= 1) { return 1; } else { return n * factorial(n-1); } }
var
,set variable
![]() | |
![]() | |
![]() | |
![]() ![]() ![]() |