MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT Reference Manual page 48

Actionscript reference guide
Hide thumbs Also See for FLASH MX 2004 - ACTIONSCRIPT:
Table of Contents

Advertisement

The strict equality (
strict equality operator does not perform type conversion. If the two operands are of different
types, the strict equality operator returns
inversion of the strict equality operator.
The following table lists the ActionScript equality operators:
Operator
Operation performed
Equality
==
===
Strict equality
Inequality
!=
Strict inequality
!==
Assignment operators
You can use the assignment (
following example:
var password = "Sk8tEr";
You can also use the assignment operator to assign multiple variables in the same expression. In
the following statement, the value of
a = b = c = d;
You can also use compound assignment operators to combine operations. Compound operators
perform on both operands and then assign the new value to the first operand. For example, the
following two statements are equivalent:
x += 15;
x = x + 15;
The assignment operator can also be used in the middle of an expression, as shown in the
following example:
// If the flavor is not vanilla, output a message.
if ((flavor = getIceCreamFlavor()) != "vanilla") {
trace ("Flavor was " + flavor + ", not vanilla.");
}
This code is equivalent to the following slightly more verbose code:
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
*=
48
Chapter 2: ActionScript Basics
) operator is like the equality operator, with one important difference: the
===
false
) operator to assign a value to a variable, as shown in the
=
is assigned to the variables
a
. The strict inequality (
,
b
c
) operator returns the
!==
, and
:
d

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?

Questions and answers

Table of Contents