MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT Reference Manual page 62

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

Advertisement

Strictly typing objects to trigger code hints
When you use ActionScript 2.0, you can strictly type a variable that is based on a built-in class,
such as Button, Array, and so on. If you do so, the ActionScript editor displays code hints for the
variable. For example, suppose you type the following:
var names:Array = new Array();
names.
As soon as you type the period (
Array objects, because you have typed the variable as an array. For more information on data
typing, see
"Strict data typing" on page
appear, see
"Using code hints" on page
Using suffixes to trigger code hints
If you use ActionScript 1 or you want to display code hints for objects you create without strictly
typing them (see
special suffix to the name of each object when you create it. For example, the suffixes that trigger
code hinting for the Array class and the Camera class are
type the following code:
var my_array = new Array();
var my_cam = Camera.get();
and then type either of the following (the variable name followed by a period), code hints for the
Array and Camera object, respectively, appear.
my_array.
my_cam.
For objects that appear on the Stage, use the suffix in the Instance Name text box in the Property
inspector. For example, to display code hints for MovieClip objects, use the Property inspector to
assign instance names with the suffix
instance name followed by a period, code hints appear.
Although suffixes are not required for triggering code hints when you strictly type an object, using
them consistently helps you and others understand your scripts.
The following table lists the suffixes required for support of automatic code hinting:
Object type
Array
Button
Camera
Color
ContextMenu
ContextMenuItem
Date
Error
LoadVars
62
Chapter 3: Writing and Debugging Scripts
), Flash displays a list of methods and properties available for
.
"Strictly typing objects to trigger code hints" on page
_mc
Variable suffix
_array
_btn
_cam
_color
_cm
_cmi
_date
_err
_lv
38. For information on using code hints when they
63.
_array
to all MovieClip objects. Then, whenever you type the
62), you must add a
and
, respectively. If you
_cam

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

Table of Contents