O'Reilly logo

ActionScript 3.0: Visual QuickStart Guide by Derrick Ypenburg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 13. Creating Conditional Statements

All of our decisions in life are based on conditional logic. Is the traffic light red or green? Did I leave the iron on? Am I tired or not? These everyday decisions are based on conditions. For some of these questions, the answers are either true or false. To react to a condition, we assess the condition, get a true or false response, and act accordingly. If the condition is true, we react one way; if the answer is false, we react in a different way.

To create “decision forks” in ActionScript, you must implement conditional logic. You set a condition, and if the condition is true, the code will respond; if it is false, the code will move on and check another condition, if one exists.

Many different kinds ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required