124
Syntax and Language Fundamentals
Using the Target Path button
Sometimes it takes some time to figure out what a given target path is, or what target path you
need for a piece of code. If you target an instance you have on the Stage, you can use the
Target Path button to determine what the path is to that instance.
To use the Target Path button:
1.
Open the Actions panel (Window > Actions) and click the Insert Target Path button. The
movie clips in your current document appear in a dialog box.
2.
Select one of the instances from the list in the dialog box.
3.
Click OK.
4.
The target path for the selected instance appears in the Script pane.
About slash syntax
Slash syntax was used in Flash 3 and 4 to indicate the target path of a movie clip or variable.
This syntax is supported by ActionScript 1.0 in Flash Player 7 and earlier, but it’s not
supported in ActionScript 2.0 and Flash Player 7 or Flash Player 8.
Using slash syntax is not recommended unless you do not have another option, such as when
you create content intended specifically for Flash Player 4 or Flash Lite 1.1 (and earlier)
where you must use slash syntax. For more information on Flash Lite, see the
Flash Lite
product page
.
About language punctuators
There are several language
punctuators
in Flash. The most common type of punctuators are
semicolons (
;
), colons (
:
), parentheses [
()
] and braces (
{}
). Each of these punctuators has a
special meaning in the Flash language and helps define data types, terminate statements or
structure ActionScript. The following sections discuss how to use the punctuators in
your code.
For more information on language punctuators, see the following topics:
■
“Semicolons and colons” on page 125
■
“Curly braces” on page 126
■
“Parentheses” on page 129
■
“About literals” on page 130
■
“About comments” on page 131
Содержание FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH
Страница 1: ...Learning ActionScript 2 0 in Flash...
Страница 8: ...8 Contents...
Страница 18: ...18 Introduction...
Страница 30: ...30 What s New in Flash 8 ActionScript...
Страница 66: ...66 Writing and Editing ActionScript 2 0...
Страница 328: ...328 Interfaces...
Страница 350: ...350 Handling Events...
Страница 590: ...590 Creating Interaction with ActionScript...
Страница 710: ...710 Understanding Security...
Страница 730: ...730 Debugging Applications...
Страница 780: ...780 Deprecated Flash 4 operators...
Страница 830: ...830 Index...