Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

Implementing States

Although the concept of view states should be fairly familiar, the idea of implementing them in Flash may seem difficult to visualize. Funny enough, they are probably far easier to create in Flash than they are in Flex. To define a state in a Flash component, you only need to add a label to a specific frame. So, if you want to have a state for a Flash component called “open” and another called “close,” you simply create two frames and give them the relevant label of either “open” or “close.” Then, all you need to do is add the relevant symbols to your component to reflect those states. Take the example shown in Figure 11.6.

Figure 11.6. Setting frame labels corresponds to states when referenced in Flex.



  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial