Description
Operator (logical); performs a Boolean operation on the values of one or both of the expressions.
Evaluates
expression1
expression evaluates to
on the right side of the operator) is evaluated. If
; otherwise, it is
true
Example
This example uses the
The
variable and the
turns
during the game. The following script displays "You Win the Game!" in the Output panel when
the player's score reaches 75 or higher in 3 turns or less.
turns=2;
score=77;
winner = (turns <= 3) && (score >= 75);
if (winner) {
trace("You Win the Game!");
} else {
trace("Try Again!");
}
&= (bitwise AND assignment)
Availability
Flash Player 5.
Usage
expression1 &= expression2
Parameters
None.
Returns
Nothing.
Description
Operator; assigns
following two expressions are the same.
x &= y;
x = x & y;
Example
The following example assigns the value
x = 15;
y = 9;
trace(x &= y);
// returns 9
See also
& (bitwise AND operator)
234
Chapter 12: ActionScript Dictionary
(the expression on the left side of the operator) and returns
. If
false
expression1
.
false
operator to perform a test to determine if a player has won the game.
&&
variable are updated when a player takes a turn or scores points
score
the value of
expression1
evaluates to
true
evaluates to
expression2
expression1 & expression2
to
.
9
x
false
,
(the expression
expression2
, the final result is
true
. For example, the
if the
Need help?
Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?
Questions and answers