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).