MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Reference page 38

Actionscript language reference
Table of Contents

Advertisement

This code is equivalent to the following code, which is slightly easier to read:
flavor = getIceCreamFlavor();
if (flavor != "vanilla") {
trace ("Flavor was " + flavor + ", not vanilla.");
}
The following table lists the ActionScript assignment operators:
Operator
Operation performed
Assignment
=
Addition and assignment
+=
-=
Subtraction and assignment
Multiplication and assignment
*=
Modulo and assignment
%=
/=
Division and assignment
Bitwise shift left and assignment
<<=
Bitwise shift right and assignment
>>=
Shift right zero fill and assignment
>>>=
^=
Bitwise XOR and assignment
Bitwise OR and assignment
|=
Bitwise AND and assignment
&=
Dot and array access operators
You can use the dot operator (
ActionScript object properties.
Dot operator.
The dot operator uses the name of an object on its left side and the name of a
property or variable on its right side. The property or variable name can't be a string or a variable
that evaluates to a string; it must be an identifier. The following examples use the dot operator:
year.month = "June";
year.month.day = 9;
The dot operator and the array access operator perform the same role, but the dot operator takes
an identifier as its property, whereas the array access operator evaluates its contents to a name and
then accesses the value of that named property.
For example, the following expressions access the same variable
:
rocket
rocket.velocity;
rocket["velocity"];
38
Chapter 1: ActionScript Basics
) and the array access operator (
.
) to access built-in or custom
[]
in the movie clip
velocity

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

This manual is also suitable for:

Flex

Table of Contents