Using Objects in ActionScript > About global objects, classes, and variables |
![]() ![]() ![]() |
About global objects, classes, and variables
You can create global objects, classes, and variables using the _global
identifier. Unlike Timeline-declared or locally declared variables and functions, global variables and functions are visible to every Timeline and scope (see Scoping a variable) in the Flash movie, provided they are not obscured by identifiers with the same names in inner scopes.
To create an object, class, or variable with global scope, use the following syntax:
_global.
identifier
For more information, see _global in the ActionScript Dictionary.
The Debug > List Variables command in test mode supports global variables. Global variables are displayed at the top of the Output window, in a section titled Global Variables. Each variable name is preceded with the prefix _global
. For more information on the List Variables command, see Using the Output window.
![]() ![]() ![]() |