In addition, case sensitivity is implemented for external scripts, such as ActionScript 2.0 class files
or scripts that you import using the
Player 7 and have previously created external files that you add to your scripts by using the
statement, you should review each file and confirm that you used consistent
#include
capitalization throughout. One way to do this is to open the file in the Script window (Flash
Professional only) or, in a new FLA file, set your publish settings to Flash Player 7 and copy the
file's contents into the Actions panel. Then use the Check Syntax button (see
and punctuation" on page
appear in the Output panel.
When Syntax coloring is enabled, language elements written with correct capitalization are blue
by default. For more information, see
on page
61.
Dot syntax
In ActionScript, a dot (
movie clip. It is also used to identify the target path to a movie clip, variable, function, or object.
A dot syntax expression begins with the name of the object or movie clip followed by a dot, and
ends with the element you want to specify.
For example, the
expression
ballMC._x
As another example,
movie clip
shoppingCart
variable of the instance
Expressing a method of an object or movie clip follows the same pattern. For example, the
method of the
play()
, as shown in the following statement:
ball_mc
ball_mc.play();
Dot syntax also uses two special aliases,
Timeline. You can use the
following statement calls the function
main Timeline:
_root.functions.buildGameBoard();
You can use the alias
can also use
_parent
nested inside the movie clip
to stop:
animal_mc
_parent.stop();
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 still supported by Flash Player 7, but its use is not recommended, and slash syntax is not
supported in ActionScript 2.0. However, if you are creating content intended specifically for
Flash Player 4, you must use slash syntax. For more information, see
on page
797.
30
Chapter 2: ActionScript Basics
#include
66) or publish your file; errors that are caused by naming conflicts
"Keywords" on page 33
) is used to indicate the properties or methods related to an object or
.
movie clip property indicates a movie clip's x axis position on the Stage. The
_x
refers to the
property of the movie clip instance
_x
is a variable set in the
submit
. The expression
to
.
form
true
movie clip instance moves the playhead in the Timeline of
ball_mc
alias to create an absolute target path. For example, the
_root
buildGameBoard()
to refer to a movie clip in which the current object is nested. You
_parent
to create a relative target path. For example, if the movie clip
animal_mc
command. If you are publishing files for Flash
movie clip, which is nested inside the
form
shoppingCart.form.submit = true
and
. The alias
_root
_parent
in the movie clip
, the following statement on the instance
"Checking syntax
and
"Syntax highlighting"
.
ballMC
sets the
refers to the main
_root
functions
dog_mc
dog_mc
"Using slash syntax"
submit
on the
is
tells
Need help?
Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?
Questions and answers