*= multiplication assignment operator

expression1 *= expression2

Assigns expression1 the value of expression1 * expression2. For example, the following two expressions are equivalent:

x *= y;
x = x * y 

Availability: ActionScript 1.0; Flash Player 4

Operands

expression1 : Number - A number or expression that evaluates to a number.

expression2 : Number - A number or expression that evaluates to a number.

Returns

Number - The value of expression1 * expression2 . If an expression cannot be converted to a numeric value, it returns NaN (not a number).

Example

Usage 1: The following example assigns the value 50 to the variable x:

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 x and y:

var i:Number = 5; 
var x:Number = 4 - 6; 
var y:Number = i + 2; 
trace(x *= y); // output: -14 

See also

* multiplication operator


Flash CS3


 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flash/9.0/main/00001297.html