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
Share this Page URL
Help

Chapter 17. Custom components > Creating advanced Flex 4 components

17.5. Creating advanced Flex 4 components

As we mentioned previously, everything we’ve shown you so far can also be done through ActionScript. Although MXML allows for rapid, tag-based component development, many feel that creating custom components with ActionScript provides enough control for maximum reusability. By the time you finish this section on creating custom components, you’ll be able to evaluate the options for yourself and decide whether you agree.

17.5.1. Using ActionScript to build the state selector

Let’s start by creating a state-selector custom component, but this time you’ll be using ActionScript instead of MXML to create it. The ActionScript code for the component is illustrated in the following listing.


  

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