Check syntax and punctuation

You can do a quick check of your ActionScript code without publishing the FLA file.

When you check syntax, the current script is checked. If the current script calls ActionScript classes, those classes are compiled and their syntax is also checked. Other scripts that might be in the FLA file are not checked.

Check syntax

  • In the Actions panel or Script window, click Check Syntax .
  • From the panel menu  (at the upper-right corner of the Actions panel), select Check Syntax.
  • Click in the Script pane, and then press Control+T (Windows) or Command+T (Macintosh).

Syntax errors are listed in the Compiler Errors panel.

Note: In an external ActionScript class file in the Script window, the global classpath affects the syntax check. Even if the global classpath is set correctly, you might generate errors, because the compiler is not aware that this class is being compiled. For more information about ActionScript 3.0 classes, see Classes in Programming ActionScript 3.0. For more information on compiling ActionScript 2.0 classes, see Compiling and exporting classes in Learning ActionScript 2.0 in Adobe Flash.

Check for punctuation balance

  1. Click between braces {}, brackets [], or parentheses () in your script.
  2. In Windows, press Control+' (single quote); on the Macintosh, press Command+' (single quote). The text between braces, brackets, or parentheses is highlighted, and you can check that opening punctuation has corresponding closing punctuation.

  This page on the Web