MACROMEDIA FLASH 8-FLASH LITE 1.X ACTIONSCRIPT LANGUAGE Reference page 91

Flash lite 1.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 1.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

Description
Operator (logical); performs a Boolean operation on the values of one or both of the
expressions. The operator evaluates
operator) and returns
,
(the expression on the right side of the operator) is evaluated. If
true
expression2
evaluates to
expression2
Example
The following example uses the
the game. The
turns
or scores points during the game. The following script shows "You Win the Game!" in the
Output panel when the player's score reaches 75 or higher in three turns or less.
turns = 2;
score = 77;
winner = (turns <= 3) && (score >= 75);
if (winner) {
trace("You Win the Game!");
} else {
trace("Try Again!");
}
The following example demonstrates testing to see if an imaginary
range:
xPos = 50;
if (xPos >= 20 && xPos <= 80) {
trace ("the xPos is in between 20 and 80");
}
expression1
if the expression evaluates to
false
, the final result is
true
operator to perform a test to determine if a player has won
&&
variable and the
score
(the expression on the left side of the
. If
false
; otherwise, it is
true
variable are updated when a player takes a turn
evaluates to
expression1
.
false
position is in between a
x
&& (logical AND)
91

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-FLASH LITE 1.X ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

Table of Contents