On this basic action script tutorial Avraham creates a variable that checks the price of a car in order to demonstrate the AND, OR and ELSE statements on Action Script 3.0
DOWNLOAD THIS TUTORIAL TO YOUR HARD DRIVE
HERE IS THE SCRIPT SOURCE CODE
// Compound Conditional Statments
// Else statement on Action Script 3.0
// by Avraham Saltoun
// solutions at say-web dot com
// free to use and distribute
// no copyrights attached
var myCarPrice:Number=500;
//now let’s check the price….
if (myCarPrice==1000 || myCarPrice==500) {
trace (“The price is barely on my limit!”);
}
else {
trace(“is far from the limits…”);
}
// The || demands either (OR) conditions to be TRUE
// equals 500 or 1000… let’s see!
//Thanks for watching!






Sun, Aug 16, 2009
ActionScript