Testing a movie > Using the Output window > Listing a movie's variables |
![]() ![]() ![]() |
Listing a movie's variables
In test mode, the List Variables command displays a list of all the variables currently in the movie. This is especially useful for finding the correct variable target path and variable name. Unlike the Debugger, the list does not update automatically as the movie plays; you must choose the List Variables command each time you want to send the information to the Output window.
The List Variables command also displays global variables declared with the _global
identifier. The global variables are displayed at the top of the List Variables output in a section titled "Global Variables," and each variable is prefixed with _global
.
In addition, the List Variables command displays getter/setter propertiesproperties that are created with the Object.addProperty
method and invoke "get" or "set" methods. A getter/setter property is displayed alongside any other properties in the object it belongs to. To make these properties easily distinguishable from ordinary variables, the value of a getter/setter property is prefixed with the string [getter/setter]
. The value displayed for a getter/setter property is determined by evaluating the "get" function of the property.
To display a list of variables in a movie:
1 |
If your movie is not running in test mode, choose Control > Test Movie. |
2 |
Choose Debug > List Variables. |
A list of all the variables currently in the movie is displayed in the Output window, as in this example:
Global Variables: Variable _global.MyGlobalArray = [object #1] [ 0:1, 1:2, 2:3 ] Level #0: Variable _level0.$version = "WIN 6,0,0,101" Variable _level0.RegularVariable = "Gary" Variable _level0.AnObject = [object #1] { MyProperty: [getter/setter] 3.14159 }
![]() ![]() ![]() |