1.)If
statements are a way of telling the program what to
do on certain conditions. You can tell the program to
do something while it equals something, or is less than
or greater than, while it is greater than or equal to
something, while it is less than or equal to something,
or not equal. Here is a few examples in this example
code. You can test this by placing it inide a actionscript3.0
document's frame.
var myString:String = "text";
var myInt:int = 100;
if(myString=="text")
{ trace("the variable is the same as the String");
}
if(myInt != 100){
trace("the variable is not equal to the int");
}
if(myInt <= 25){
trace("the variable is greater than or equal to 25");
}
|