User Guide

Table Of Contents
82 Flash Lite Operators
Description
Operator; performs a logical AND operation.
Example
The following example uses the and operator to test whether a player has won the game. The
turns variable and the score variable are updated when a player takes a turn or scores points
during the game. The following script shows “You Win the Game!” in the Output panel when
the players score reaches 75 or higher in three turns or less.
turns = 2;
score = 77;
winner = (turns <= 3) and (score >= 75);
if (winner) {
trace("You Win the Game!");
} else {
trace("Try Again!");
}
// output: You Win the Game!
See also
&& (logical AND)
= (assignment)
Availability
Flash Lite 1.0.
Usage
expression1 = expression2
Operands
expression1 A variable or a property.
expression2 A value.
Description
Operator; assigns the value of expression2 (the operand on the right) to the variable or
property in
expression1.