User Guide
40 Chapter 2: ActionScript Language Reference
&= (bitwise AND assignment)
Availability
Flash Player 5.
Usage
expression1 &= expression2
Parameters
None.
Returns
A 32-bit integer; the value of expression1 & expression2.
Description
Operator; assigns expression1 the value of expression1 & expression2. For example, 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 9 to x:
var x:Number = 15;
var y:Number = 9;
trace(x &= y); // output: 9
See also
& (bitwise AND), ^ (bitwise XOR), ^= (bitwise XOR assignment), | (bitwise OR), |= (bitwise
OR assignment), ~ (bitwise NOT)