•
"Keywords and reserved words" on page 17
•
"Constants" on page 18
Case sensitivity
In a case-sensitive programming language, variable names that differ only in case (
are considered different from each other. Therefore, it's good practice to follow consistent
capitalization conventions, such as those used in this manual, to make it easy to identify names of
functions and variables in ActionScript code.
Keywords, class names, variables, method names, and so on are case sensitive. For example:
// Sets properties of two different objects
cat.hilite = true;
CAT.hilite = true;
// Creates three different variables
var myVar:Number=10;
var myvar:Number=10;
var mYvAr:Number=10;
This change also affects external variables loaded with
Case-sensitivity is implemented for external scripts, such as class files, scripts that you import
using the
#include
exporting to more than one version of Flash Player, you should review both external script files
and scripts in FLA files to confirm that you used consistent capitalization.
Case-sensitivity is implemented on a per-movie basis. If a strict Flash Player 7 application calls a
non-strict Flash Player 6 movie, ActionScript executed in the latter movie is non-strict. For
example, if you use
version 6 SWF remains case-insensitive, while the version 7 SWF is treated as case-sensitive.
Dot syntax
In ActionScript, a dot (
used to identify the target path to a variable, function, or object. A dot syntax expression begins
with the name of the object followed by a dot and ends with the element you want to specify.
For example, the
refers to the
ball_mc._x
Expressing a method of an object follows the same pattern. For example, the
the
object would be called as follows:
ball
ball.bounce();
For more information, see
14
Chapter 1: ActionScript Basics
command, and scripts in a FLA file. If you encounter runtime errors and are
to load a Flash Player 6 SWF into a Flash Player 7 SWF, the
loadMovie()
) is used to access properties or methods belonging to an object. It is also
.
movie clip property indicates a movie clip's x axis position. The expression
_x
property of the movie clip instance
_x
,
_parent
_global object
.
LoadVars.load()
.
ball_mc
bounce()
, and
.
_root
and
)
book
Book
method of
Need help?
Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?