2.
Do one of the following:
Click Show Code Hint in the Actions panel or Script window toolbar.
Press Control+Spacebar (Windows) or Command+Spacebar (Macintosh).
If you are working in the Actions panel, select Show Code Hint from the pop-up
menu.
About typing objects to trigger code hints
When you use ActionScript 2.0, you can use strict typing for a variable that is based on a
built-in class, such as Button, Array, and so on. If you do so, the Script pane displays code
hints for the variable. For example, suppose you type the following code:
var names:Array = new Array();
names.
As soon as you type the period (
Array objects in a pop-up menu, because you have typed the variable as an array. For more
information on data typing, see
on page
81. For information on using code hints when they appear, see
on page
45.
About 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
add a 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
respectively. For example, if you type the following code
var my_array = new Array();
var my_cam = Camera.get();
you can type either of the following (the variable name followed by a period):
my_array.
my_cam.
Code hints for the Array and Camera objects will appear.
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
whenever you type the instance name followed by a period, code hints appear.
Although suffixes are not required for triggering code hints when you use strict typing for an
object, using suffixes consistently helps make your code understandable.
48
Writing and Editing ActionScript 2.0
), Flash displays a list of methods and properties available for
.
"About assigning data types and strict data typing"
"About typing objects to trigger code hints" on page
_mc
_array
suffix to all MovieClip objects. Then,
"Using code hints"
48), you must
and
,
_cam
Need help?
Do you have a question about the FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH and is the answer not in the manual?