Else If - MACROMEDIA FLASH 8-FLASH LITE 1.X ACTIONSCRIPT LANGUAGE Reference

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

Advertisement

else if

Availability
Flash Lite 1.0.
Usage
if (condition){
statement(s);
} else if (condition){
statement(s);
}
Parameters
An expression that evaluates to
condition
A series of statements to run if the condition specified in the
statement(s)
is
.
false
Description
Statement; evaluates a condition and specifies the statements to run if the condition in the
initial
statement returns a
if
Flash interpreter runs the statements that follow the
(
). If the
condition is
{}
else if
runs the statements following the curly braces. Use the
logic in your scripts.
Example
The following example uses
within a specific boundary:
person_mc.xPos = 100;
leftBound = 0;
rightBound = 100;
if (person_mc.xPos <= leftBound) {
//trace ("Clip is to the far left");
} else if (person_mc.xPos >= rightBound) {
//trace ("Clip is to the far right");
} else {
//trace ("Your clip is somewhere in between");
}
See also
if
70
Flash Lite Statements
true
value. If the
false
else if
, Flash skips the statements inside the curly braces and
false
statements to check whether each side of an object is
else if
or
.
false
condition returns a
condition inside curly braces
else if
statement to create branching
else if
statement
if
value, the
true

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?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents