%= (modulo assignment)
Availability
Flash Player 4.
Usage
expression1 %= expression2
Parameters
None.
Returns
A number.
Description
Operator (arithmetic compound assignment); assigns
. 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
The following example assigns the value
var x:Number = 14;
var y:Number = 5;
trace(x%=y); // output: 4
See also
% (modulo)
expression1
to the variable
:
4
x
the value of
expression1 %
%= (modulo assignment)
35
Need help?
Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?
Questions and answers