Similarly, if you type Escape+c+h, the following code is placed in your script, and the insertion
point is placed between the parentheses, so you can begin typing your condition:
catch () {
}
If you want to learn (or be reminded) which commands have Escape shortcut keys, you can
display them next to elements in the Actions panel.
To display or hide Escape shortcut keys:
•
From the View Options pop-up menu, enable or disable View Escape Shortcut Keys.
Checking syntax and punctuation
To thoroughly determine whether the code you wrote performs as planned, you need to publish
or test the file. However, you can do a quick check of your ActionScript code without leaving the
FLA file. Syntax errors are listed in Output panel. (When you check syntax, only the current
script is checked; other scripts that may be in the FLA file are not checked.) You can also check to
see if a set of parentheses, curly braces, or brackets (array access operators) around a block of code
is balanced.
To check syntax, do one of the following:
•
Click the Check Syntax button above the Script pane.
•
In the Actions panel, display the pop-up menu (at the upper right of the panel) and select
Check Syntax.
•
Press Control+T (Windows) or Command+T (Macintosh).
66
Chapter 3: Writing and Debugging Scripts
Need help?
Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?
Questions and answers