
351
USING FLASH CS4 PROFESSIONAL
ActionScript
A.
Display list
B.
Properties list
C.
Tool bar
D.
Code view
You can resize the regions of the Debugger panel. When your pointer changes between each region, drag to resize the
Display list, Watch list, and code view. You can also click the vertical bar to expand either side of the Debugger to full size.
After it’s activated, the Debugger status bar displays the URL or local path of the file, tells whether the file is running
in the test environment or from a remote location, and shows a live view of the movie clip display list. When movie
clips are added to or removed from the file, the display list reflects the changes immediately.
Note:
The ActionScript 2.0 and 3.0 debuggers have significant differences. For more information about the ActionScript
3.0 debugger, see “
Debugging ActionScript 3.0
” on page
360.
The Test Movie command and keyboard controls
When you use the Control > Test Movie command to test SWF files that implement keyboard controls (tabbing,
keyboard shortcuts created using
Key.addListener()
, and so on), select Control > Disable Keyboard Shortcuts in
the Test Movie window. Selecting this option prevents the authoring environment from “grabbing” keystrokes, and
lets them pass through to the player. For example, in the authoring environment, U opens the Preferences
dialog box. If your script assigns U to an action that underlines text onscreen, when you use Test Movie,
pressing U opens the Preferences dialog box instead of running the action that underlines text. To let the
U command pass through to the player, you must select Control > Disable Keyboard Shortcuts in the Test
Movie window.
Important:
When you use a non-English application on an English system, the Test Movie command fails if any part of
the SWF file path has characters that cannot be represented with the MBCS encoding scheme. For example, Japanese
paths on an English system do not work.
Other debugging tools
Flash also provides the following debugging tools:
•
The Compiler Errors panel, which shows errors encountered when Flash compiles your scripts
•
The Output panel, which shows runtime error messages, and lists of variables and objects
•
The
trace()
statement, which sends programming notes and values of expressions to the Output panel
•
The
throw
and
try..catch..finally
statements, which let you test and respond to runtime errors from within
your script
C
D
A
B
Updated 5 March 2009