This flash tutorial is about if statements, one of the most used things in OOP (object oriented programming) languages like actionscripting. Once you learn and understand it you will be able to do a lot with programming.

If conditions are build up of different things but its the same for almost every programming language, so if you learn it once, you will now it if you have to learn another language later on.
Here is how a simple if condition will look like in flash actionscript.
if (condition) { trace("hello world") }
This will output hello world if the condition is true. Here is a real life example.
var i = 1
if (i < 10) {
trace(i);
}
First we set a variable to be equal to 1, just so we have something to check for, then in the if statement, we check if our variable is less than 10, then it should output the number i, if not, then nothing will happen.
Now we can advance our if statement, so that if the condition did not come out true, we have something else done.
if (condition) {
trace("hello Bob")
} else {
trace("hello David")
}
This is pretty simple if you understand our first example. Now we have an output saying hello Bob if the condition came out true, but if not, whatever else then it will say hello David.
The final thing we need, is to set up multiply conditions in the same if statement, it will look like this.
if (condition) {
trace("hello Bob")
} else if (condition) {
trace("hello David")
} else {
trace("goodbye")
}
Now this is the more advanced if structure, but when you learn it, it will become your life long friend. First we have the condition as in the other examples, if it comes out true we have hello Bob, then the new part is we have put up another condition with the else if, and if that comes out true we have hello David. Finally if none of the above conations are true, we have an output saying goodbye instead.