O'Reilly logo

Fundamentals of ActionScript 3.0: Develop and Design by Doug Winnie

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

12. Conditionals

Until now, all the examples you have been working with run in a straight line. You aren’t changing courses during the execution of the code based on varying conditions. Often, you will want to do specific actions if certain conditions are met, and if they aren’t met, you want to do other actions instead. This type of action is called Boolean logic.

In this chapter, you’ll learn more about the Boolean variable type and see how you can use it to determine if certain conditions are true or false based on equality operators. You can then apply these operators to blocks of code that will execute differently based on the results of these evaluations.

Boolean Variables and Equality

Boolean variables can contain only two values: true ...

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