Using The Actionscript Editor - MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT Reference Manual

Actionscript reference guide
Hide thumbs Also See for FLASH MX 2004 - ACTIONSCRIPT:
Table of Contents

Advertisement

Action
Move focus to tab on the left
Unpin all scripts

Using the ActionScript editor

Flash MX 2004 and Flash MX Professional 2004 provide several tools to help you write
syntactically correct code and lets you set preferences for code formatting and other options.
These capabilities are discussed in this section.
Syntax highlighting
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 will not work.
When you write scripts in Flash MX 2004 and Flash MX Professional 2004, 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 version is set to Flash 6, ActionScript that is
supported only by Flash Player 7 appears in yellow in the Actions toolbox. (For information on
setting the Flash Player SWF version, see "Setting publish options for the Flash SWF file format"
in Using Flash Help.)
You can also set a preference to have Flash "color-code" parts of your scripts as you write them, to
bring typing errors to your attention. For example, suppose you set your Syntax coloring
preference to have keywords appear in deep green. While you are typing code, if you type
word
appears in green. However, if you mistakenly type
var
providing you with an immediate clue that you made a typing error.
To set preferences for syntax coloring as you type, do one of the following:
Select Edit > Preferences, and specify Syntax coloring settings on the ActionScript tab.
In the Actions panel, select Preferences from the Options pop-up menu (at the upper right of
the panel) and specify Syntax coloring settings on the ActionScript tab.
Writing code that triggers code hints
When you work in the ActionScript editor (either in the Actions panel or Script window), Flash
can detect what action you are entering and display a code hint—a tooltip that contains the
complete syntax for that action, or a pop-up menu that lists possible method or property names.
Code hints appear for parameters, properties, and events when you strictly type or name your
objects so that the ActionScript editor knows which code hints to display, as discussed in the rest
of this section. For information on using code hints when they appear, see
on page
63.
Note: Code hinting is enabled automatically for native classes that don't require you to create and
name an object of the class, such as Math, Key, Mouse, and so on.
Windows shortcut key
Control-Shift-, (comma)
Control-Shift-- (minus)
Macintosh shortcut key
Command-Shift-,
Command-Shift--
, the word
remains black,
vae
vae
"Using code hints"
Using the ActionScript editor
, the
var
61

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents