User Guide

Operators 165
Availability: ActionScript 1.0; Flash Lite 1.0 - In Flash 4 files, the % operator is expanded in
the SWF file as
x - int(x/y) * y and may not be as fast or as accurate in later versions of
Flash Player.
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 result of the arithmetic operation.
Example
The following example assigns the value 4 to the variable x:
var x:Number = 14;
var y:Number = 5;
trace(x %= y); // output: 4
See also
% modulo operator
* multiplication operator
expression1 * expression2
Multiplies two numerical expressions. If both expressions are integers, the product is an
integer. If either or both expressions are floating-point numbers, the product is a floating-
point number.
Availability: ActionScript 1.0; Flash Lite 1.0
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 - An integer or floating-point number.
Example
Usage 1: The following statement multiplies the integers 2 and 3:
trace(2*3); // output: 6