Multiplication Assignment Operator - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

The result, 6, is an integer. Usage 2: This statement multiplies the floating-point numbers 2.0
and 3.1416:
trace(2.0 * 3.1416); // output: 6.2832
The result, 6.2832, is a floating-point number.

*= multiplication assignment operator

expression1 *= expression2
Assigns
expression1
following two expressions are equivalent:
x *= y x = x * y
Availability: ActionScript 1.0; Flash Lite 1.0
Operands
expression1 :
Number
expression2 :
Number
Returns
- The value of
Number
to a numeric value, it returns
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 operator
166
ActionScript language elements
the value of
expression1 * expression2
- A number or expression that evaluates to a number.
- A number or expression that evaluates to a number.
expression1 * expression2
(not a number).
NaN
. For example, the
. If an expression cannot be converted
:
x
and
:
x
y

Advertisement

Table of Contents
loading

Table of Contents