EasyManua.ls Logo

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT - Page 63

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT
816 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Using the ActionScript editor 63
For information on using code hints when they appear, see “Using code hints” on page 63.
Using comments to trigger code hints
You can also use ActionScript comments to specify an objects 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 using strict data typing (see “Strictly typing objects to trigger
code hints” on page 62) or suffixes (see “Using suffixes to trigger code hints” on page 62) instead
of this technique, because those 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.
LocalConnection _lc
Microphone _mic
MovieClip _mc
MovieClipLoader _mcl
PrintJob _pj
NetConnection _nc
NetStream _ns
SharedObject _so
Sound _sound
String _str
TextField _txt
TextFormat _fmt
Video _video
XML _xml
XMLNode _xmlnode
XMLSocket _xmlsocket
Object type Variable suffix

Table of Contents

Related product manuals