User Guide

Using the ActionScript editor 147
For information on using code hints when they appear, see “Using code hints” on page 147.
Using comments to trigger code hints
You can also use ActionScript comments to specify an object’s class for code hinting. The
following example tells ActionScript that the class of the instance
theObject is Object, and so on.
If you were to enter
mc followed by a period after these comments, a code hint would display the
list of MovieClip methods and properties; if you were to enter
theArray followed by a period, a
code hint would display a list of Array methods and properties; and so on.
// Object theObject;
// Array theArray;
// MovieClip mc;
However, Macromedia recommends that, instead of this technique, you use strict data typing (see
“Strictly typing objects to trigger code hints” on page 145) or suffixes (see “Using suffixes to
trigger code hints” on page 145) because these techniques enable code hinting automatically and
make your code more understandable.
Using code hints
Code hints are enabled by default. By setting preferences, you can disable code hints or determine
how quickly they appear. When code hints are disabled in preferences, you can still display a code
hint for a specific command.
To specify settings for automatic code hints:
Do one of the following:
Select Edit > Preferences, and then enable or disable Code Hints on the ActionScript tab.
In the Actions panel, select Preferences from the Options pop-up menu (at the upper right of
the panel) and enable or disable Code hints on the ActionScript tab.
If you enable code hints, you can also specify a delay in seconds before the code hints should
appear. For example, if you are new to ActionScript, you might prefer no delay so that code hints
always appear immediately. However, if you usually know what you want to type and need hints
only when you use unfamiliar language elements, you can specify a delay so that code hints dont
appear when you dont plan to use them.
XMLNode _xmlnode
XMLSocket _xmlsocket
Object type Variable suffix