EasyManua.ls Logo

MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH - Page 727

MACROMEDIA FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH
830 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Using the Output panel 727
Listing a SWF file’s variables
In test mode, the List Variables command shows a list of all the variables currently in the SWF
file. This list is especially useful for finding the correct variable target path and variable name.
Unlike the Debugger, the list does not update automatically as the SWF file plays; you must
select the List Variables command each time you want to send the information to the
Output panel.
The List Variables command also shows global variables declared with the
_global identifier.
The global variables appear at the top of the List Variables output in a Global Variables
section, and each variable has a
_global prefix.
In addition, the List Variables command shows getter/setter properties—properties that are
created with the
Object.addProperty() method and start get or set methods. A getter/
setter property appears with any other properties in the object to which it belongs. To make
these properties easily distinguishable from other variables, the value of a getter/setter
property is prefixed with the string
[getter/setter]. The value that appears for a getter/
setter property is determined by evaluating the
get function of the property.
To display a list of variables in a SWF file:
1. If your SWF file is not running in test mode, select Control > Test Movie.
2. Select Debug > List Variables.
A list of all the variables currently in the SWF file appears in the Output panel, as shown
in the following example:
Global Variables:
Variable _global.mycolor = "lime_green"
Level #0:
Variable _level0.$version = "WIN 7,0,19,0"
Variable _level0.myArray = [object #1, class 'Array'] [
0:"socks",
1:"gophers",
2:"mr.claw"
]
Movie Clip: Target="_level0.my_mc"
CAUTION
Selecting the List Variables command clears any information that appears in the Output
panel. If you do not want to lose information in the Output panel, select Save to File from
the Output panel Options pop-up menu or copy and paste the information to another
location before selecting the List Variables command.

Table of Contents

Related product manuals