Use syntax coloring

In ActionScript, as in any language, syntax is the way elements are put together to create meaning. If you use incorrect ActionScript syntax, your scripts cannot work.

To highlight syntax errors, set a color-code for parts of your scripts. For example, suppose you set the syntax coloring preference to make keywords appear in blue. When you type var, the word var appears in blue. However, if you mistakenly type vae, the word vae remains black, which shows that you made a typing error.

Do one of the following:

  • Select Edit > Preferences (Windows) or Flash > Preferences (Macintosh), click ActionScript in the Category list, and specify Syntax Coloring settings.

  • From the panel menu  (at the upper-right corner of the Actions panel), select Preferences and specify Syntax Coloring settings.

  • With the insertion point in the Script pane, press Control-U (Windows) or Command-U (Macintosh).

Note: When you write scripts in the Actions panel, commands that are not supported by the version of the player you are targeting appear in yellow in the Actions toolbox. For example, if the Flash Player SWF file version is set to Flash 7, ActionScript that only Flash Player 8 supports appears in yellow in the Actions toolbox.
Related Information

  This page on the Web