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

13. Advanced Boolean Logic and Random Numbers

Conditions give your applications the ability to change behaviors based on different circumstances. When working with more complex logic patterns, you need to use special operators. In this chapter, you’ll review these operators and use them in conditional tests.

One of the most common ways to work with advanced logic is when you build random chance into your programs. This is customary for games and other interactive content. In this chapter, you’ll learn how to generate random numbers and how to use them in your projects.

Using Logic Operators

When you are testing conditions, you are limited to testing a pair of values. Often-times you want to test a combination of conditions in a single statement. ...

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