EasyManua.ls Logo

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT - Page 238

MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT
816 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
238 Chapter 12: ActionScript Dictionary
Example
Usage 1: The following example assigns the value 50 to the variable x.
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
x and y.
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 expression1, then expression2, and returns the value of expression2.
This operator is primarily used with the
for loop statement.
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;

Table of Contents

Related product manuals