• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 5. Operators > The Logical Operators

5.8. The Logical Operators

In Chapter 4, we saw how to make logical decisions using conditional expressions and Boolean values. The decisions were based on single factors: if a movie hasn't loaded, don't start playing; if a spaceship has double-shot power, increase the damage its shots inflict; and so on. Not all programming logic is so simple. We'll often want to consider multiple factors in our branching (i.e., decision-making) logic.

Suppose, for example, that we are making a personalized Flash site that requires users to log in. If a user logs in as a guest, the content he can see is limited. When a registered user logs into the site, we set a variable that indicates, for the duration of our movie, that the user is allowed to see privileged content:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint