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. ...

Get Fundamentals of ActionScript 3.0: Develop and Design now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.