*= (multiplication assignment)
Availability
Flash Player 4.
Usage
expression1 *= expression2
Parameters
None.
Returns
The value of
expression1 * expression2
value, it returns
Description
Operator (arithmetic compound assignment); assigns
. For example, the following two expressions are equivalent:
expression2
x *= y
x = x * y
For more information, see "Operator precedence and associativity" in Using ActionScript in Flash.
Example
Usage 1: The following example assigns the value 50 to the variable
var x:Number = 5;
var y:Number = 10;
trace(x *= y); // output: 50
Usage 2: The second and third lines of the following example calculate the expressions on the
right side of the equal sign and assign the results to
var i:Number = 5;
var x:Number = 4-6;
var y:Number = i+2;
trace(x *= y); // output: -14
See also
* (multiplication)
(not a number).
NaN
. If an expression cannot be converted to a numeric
expression1
and
:
x
y
*= (multiplication assignment)
the value of
expression1 *
:
x
45
Need help?
Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?