User Guide
%= (modulo assignment) 35
%= (modulo assignment)
Availability
Flash Player 4.
Usage
expression1 %= expression2
Parameters
None.
Returns
A number.
Description
Operator (arithmetic compound assignment); assigns expression1 the value of expression1 %
expression2
. The following two expressions are equivalent:
x %= y
x = x % y
For more information, see “Operator precedence and associativity” in Using ActionScript in Flash.
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)