Example
Usage 1: The following example assigns the value 50 to the variable
x = 5;
y = 10;
trace (x *= y);
// returns 50
Usage 2: The second and third lines of the following example calculate the expressions on the
right-hand side of the equals sign and assign the results to
i = 5;
x = 4 - 6;
y = i + 2;
trace(x *= y);
// returns -14
See also
* (multiplication)
, (comma)
Availability
Flash Player 4.
Usage
expression1, expression2
Parameters
None.
Returns
Nothing.
Description
Operator; evaluates
This operator is primarily used with the
Example
The following code sample uses the comma operator:
var a=1, b=2, c=3;
This is equivalent to writing the following code:
var a=1;
var b=2;
var c=3;
238
Chapter 12: ActionScript Dictionary
, then
expression1
expression2
for
and
.
x
y
, and returns the value of
loop statement.
.
x
expression2
.
Need help?
Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?
Questions and answers