You are previewing Flex 3 in Action.
O'Reilly logo
Flex 3 in Action

Book Description

New Web applications require engaging user-friendly interfaces-and the cooler, the better. With Flex 3, Web developers at any skill level can create high-quality, effective, and interactive Rich Internet Applications (RIAs) quickly and easily. Flex removes the complexity barrier from RIA development by offering sophisticated tools and a straightforward programming language so you can focus on what you want to do instead of how to do it. And now that the major components of Flex are free and open source, the cost barrier is gone, as well! Flex 3 in Action is an easy-to-follow, hands-on Flex tutorial. Chock full of examples, this book goes beyond feature coverage and helps you put Flex to work in real day-to-day tasks. You'll quickly master the Flex API and learn to apply the techniques that make your Flex applications stand out from the crowd. Interesting themes, styles, and skins? It's in there. Working with databases? You got it. Interactive forms and validation? You bet. Charting techniques to help you visualize data? Bam! The expert authors of Flex 3 in Action have one goal - to help you get down to business with Flex 3. Fast. Many Flex books are overwhelming to new users-focusing on the complexities of the language and the super-specialized subjects in the Flex eco-system; Flex 3 in Action filters out the noise and dives into on the core topics you need every day. Using numerous easy-to-understand examples, Flex 3 In Action gives you a strong foundation that you can build on as the compexity of your projects increases. And now, purchase the print edition and you'll get the Flex 3 in Action ebook and the Flex 4 in Action ebook upon its release both for free! Simply follow instructions on the insert to redeem your two free ebooks.

Table of Contents

  1. Copyright
  2. Foreword
  3. Preface
  4. Acknowledgments
  5. About this book
    1. Roadmap
    2. Code downloads and conventions
    3. Author Online
    4. About the authors
    5. About the title
    6. About the cover illustration
  6. 1. Application basics
    1. 1. Introduction to Flex
      1. 1.1. Why are web applications so prolific?
      2. 1.2. Prolific, but at a price
      3. 1.3. The RIA solution
        1. 1.3.1. They all want it all
        2. 1.3.2. RIAs to the rescue
        3. 1.3.3. How RIAs do it
      4. 1.4. The RIA contenders
        1. 1.4.1. Flex by Adobe
        2. 1.4.2. Silverlight by Microsoft
        3. 1.4.3. JavaFX by Sun Microsystems
      5. 1.5. Flex vs. web applications
        1. 1.5.1. Web applications are based on documents
        2. 1.5.2. The role of browsers as transfer stations and document renderers
        3. 1.5.3. RWAs—the last stand
        4. 1.5.4. Cross-platform issues
        5. 1.5.5. Where’s the richness?
        6. 1.5.6. AJAX communication limits
          1. AMF3—The Secret Weapon
        7. 1.5.7. Apples and oranges
      6. 1.6. Becoming acquainted with Flex
        1. 1.6.1. Taking advantage of Adobe Flash
          1. Why not do it in Flash?
        2. 1.6.2. Flex and JavaScript can play together
        3. 1.6.3. The Flex ecosystem
          1. A Blurb on Air
          2. A Blurb on Blazeds
        4. 1.6.4. How Flex works
          1. The Development Life Cycle
        5. 1.6.5. Events, events, events
      7. 1.7. What’s new in Flex 3
      8. 1.8. Summary
    2. 2. Getting started
      1. 2.1. Flex on the cheap
        1. 2.1.1. Setting up the compile environment
        2. 2.1.2. Setting up the editing environment
          1. Aptana Studio
        3. 2.1.3. Next steps (if you’re still interested)
          1. Another Neat Tool (ANT) + Flex ANT Tasks
          2. Things to Consider
      2. 2.2. Get serious with Flex Builder
        1. 2.2.1. Product and pricing matrix
        2. 2.2.2. Getting Flex Builder
      3. 2.3. Exploring Flex Builder
        1. Navigator (1)
        2. Source Code Editor (2)
        3. Application Outline View (3)
        4. The Wizards (4)
        5. Application Launcher (5)
        6. Bottom Pane (6)
        7. Source and Design View (7)
      4. 2.4. Views and perspectives
        1. 2.4.1. Out-of-the-box perspectives
          1. Development Perspective
          2. Debugging Perspective
          3. Profiling Perspective
        2. 2.4.2. Switching perspectives
        3. 2.4.3. Customizing perspectives
          1. Modify the Layout
          2. Add a View to the Layout
      5. 2.5. Our first project—Hello World!
        1. 2.5.1. Create the project
        2. 2.5.2. Entering code
        3. 2.5.3. Compile and run
        4. 2.5.4. Making it real
      6. 2.6. Using design mode
      7. 2.7. Built-in help
        1. 2.7.1. Object-oriented languages and their APIs
        2. 2.7.2. Accessing the API Reference
          1. Dynamic Help
          2. SHIFT+F2 Help
        3. 2.7.3. Perusing API Reference
      8. 2.8. MXML and ActionScript in a nutshell
        1. 2.8.1. The structure of MXML
        2. 2.8.2. How MXML and ActionScript relate
        3. 2.8.3. Events are handled by ActionScript
          1. Almost the Same as in Javascript
          2. Almost the Same, But Actionscript has an Event Object
      9. 2.9. Summary
    3. 3. Working with ActionScript
      1. 3.1. Comments
        1. 3.1.1. Inline comments
        2. 3.1.2. Block comments
      2. 3.2. Variables
        1. 3.2.1. Variable names
        2. 3.2.2. Strict data typing
        3. 3.2.3. Static vs. dynamic type checking
        4. 3.2.4. Primitive and complex data types
          1. Primitive Data Types
          2. Ints vs. Numbers
          3. Complex Data Types
          4. Special Data Types
      3. 3.3. Loops
        1. 3.3.1. For (starting value; valid condition; increment)
        2. 3.3.2. For (property names in array/object)
        3. 3.3.3. For each (item in array/object)
        4. 3.3.4. While (condition)
        5. 3.3.5. Do while (condition)
      4. 3.4. Conditional statements (if statements and switches)
        1. 3.4.1. If..else
        2. 3.4.2. Switch
      5. 3.5. Arrays
        1. 3.5.1. Indexed arrays
          1. A Closer Looked at Splice()
          2. Shorthand Initialization of Arrays
          3. Looping Through Arrays
        2. 3.5.2. Associative arrays
          1. Dot Notation
      6. 3.6. ActionScript tidbits
        1. 3.6.1. Braces
        2. 3.6.2. Logical operators and shortcuts
          1. Basic Comparative Operators
          2. Mathematical Operators
      7. 3.7. Sneak peek at functions, classes, and packages
        1. 3.7.1. Your own functions
          1. Creating our Own Function
          2. CDATA
          3. Importing Packages
          4. Returning a Value
        2. 3.7.2. Separating ActionScript to individual files
      8. 3.8. Simple data binding
        1. 3.8.1. Once again, it is about events
        2. 3.8.2. Bidirectional binding
      9. 3.9. Summary
    4. 4. Layout and containers
      1. 4.1. Absolute layout
      2. 4.2. Constraint-based layout
        1. 4.2.1. Basic constraints
        2. 4.2.2. Enhanced constraints
          1. 2-Column Fixed Slice
          2. 2-Column Fixed Slice with Both Left and Right Constraints
          3. 2-Row Mixed Slice with Both Top and Bottom Constraints
          4. 2-Rows + 2 Columns with Offsets
          5. Using Content-Sized Constraints
          6. You Get the Idea
      3. 4.3. Automatic layout
      4. 4.4. Variable and fixed sizing
        1. 4.4.1. Variable sizing
        2. 4.4.2. Fixed Sizing
      5. 4.5. Containers
        1. 4.5.1. Application container
        2. 4.5.2. Canvas container
        3. 4.5.3. Box, HBox, and VBox containers
        4. 4.5.4. Panel container
        5. 4.5.5. ApplicationControlBar and ControlBar containers
        6. 4.5.6. DividedBox, HDividedBox, and VDividedBox containers
        7. 4.5.7. Form container
        8. 4.5.8. Grid container
        9. 4.5.9. Tile container
      6. 4.6. Dynamic layout with Repeaters
        1. 4.6.1. dataProvider sneak peek
        2. 4.6.2. Properties and events of a Repeater
        3. 4.6.3. Creating the Repeater
        4. 4.6.4. Working with Repeater events
      7. 4.7. Summary
    5. 5. Displaying forms and capturing user input
      1. 5.1. The id attribute
      2. 5.2. Text controls
      3. 5.3. Date controls
      4. 5.4. Numeric controls
      5. 5.5. Buttons
        1. 5.5.1. Bars of Buttons
        2. 5.5.2. The PopUpButton and PopUpMenuButton
      6. 5.6. Picklist controls
      7. 5.7. Accessing the control’s value
        1. 5.7.1. Passing values to a function
        2. 5.7.2. Passing events to a function
        3. 5.7.3. Accessing properties directly
        4. 5.7.4. Which approach to use?
      8. 5.8. Summary
    6. 6. Validating user input
      1. 6.1. Overview of validation
      2. 6.2. Built-in validators
        1. 6.2.1. Validator
        2. 6.2.2. StringValidator
        3. 6.2.3. NumberValidator
        4. 6.2.4. DateValidator
        5. 6.2.5. EmailValidator
        6. 6.2.6. CreditCardValidator
        7. 6.2.7. CurrencyValidator
        8. 6.2.8. PhoneNumberValidator
        9. 6.2.9. RegExpValidator
        10. 6.2.10. SocialSecurityValidator
        11. 6.2.11. ZipCodeValidator
      3. 6.3. Real-time validation
      4. 6.4. Committed value validation
      5. 6.5. Pass-through validation
      6. 6.6. Scripted validation
      7. 6.7. Validation tidbits
        1. 6.7.1. Does a validator always check all criteria?
        2. 6.7.2. Validating what was entered vs. criteria matching
        3. 6.7.3. Controlling what triggers validation
      8. 6.8. Summary
    7. 7. Formatting data
      1. 7.1. Built-in formatters
        1. 7.1.1. Formatter
        2. 7.1.2. NumberFormatter
        3. 7.1.3. CurrencyFormatter
        4. 7.1.4. DateFormatter
          1. Using xml with the DateFormatter
        5. 7.1.5. PhoneFormatter
        6. 7.1.6. ZipCodeFormatter
        7. 7.1.7. SwitchSymbolFormatter
      2. 7.2. Real-time formatting
      3. 7.3. Scripted formatting
        1. 7.3.1. Using a function with a formatter component
        2. 7.3.2. Using a function with a formatter class
      4. 7.4. Working with formatting errors
      5. 7.5. Summary
    8. 8. DataGrids, lists, and trees
      1. 8.1. List genealogy
        1. 8.1.1. ListBase and AdvancedListBase’s properties
        2. 8.1.2. ListBase events
      2. 8.2. The dataProvider and collections
        1. 8.2.1. Feeding the dataProvider
        2. 8.2.2. Types of collections
        3. 8.2.3. Users of collections
      3. 8.3. Initializing collections
      4. 8.4. Populating collections
        1. 8.4.1. List
          1. Invoking a List
          2. Specifying a Label
        2. 8.4.2. HorizontalList
        3. 8.4.3. TileList
          1. Directions
          2. Invoking a TileList
          3. TileList Vs. Tile
        4. 8.4.4. DataGrid
          1. Invoking a DataGrid
          2. Controlling Sortability
          3. Specifying Column Titles with DataGridColumn
        5. 8.4.5. Tree
          1. Hierarchical Data
          2. Invoking a Tree
          3. Using a Single Root XML Document
        6. 8.4.6. AdvancedDataGrid
          1. Invoking an AdvancedDataGrid
          2. Using Multicolumn Sorting
          3. Displaying Hierarchical Data
          4. Using Hierarchical ArrayCollections
          5. Using Flat Data for Hierarchy
          6. Grouping Columns
      5. 8.5. Interacting with lists
        1. 8.5.1. List events
        2. 8.5.2. Passing the event to a function
        3. 8.5.3. Passing data to a function
        4. 8.5.4. Accessing the selected row directly
        5. 8.5.5. Binding to a selected row
        6. 8.5.6. Using a different event as a trigger
      6. 8.6. Summary
    9. 9. List customization
      1. 9.1. Label functions
        1. 9.1.1. Types of label functions
          1. Single-Column Label Function
          2. Multicolumn Label Function
          3. They’re not just for Lists
        2. 9.1.2. Using a single-column label function
        3. 9.1.3. Using a multicolumn label function
        4. 9.1.4. Ideas for label functions
      2. 9.2. Item renderers
        1. 9.2.1. Types of renderers
        2. 9.2.2. Creating a (regular) item renderer
        3. 9.2.3. Adding logic to an item renderer
          1. One Slight Gotcha
        4. 9.2.4. Creating an inline item renderer
        5. 9.2.5. Using drop-in item renderers
      3. 9.3. Item editors
        1. 9.3.1. Enabling item editing
        2. 9.3.2. Creating an item editor
        3. 9.3.3. Item-editing events
          1. Using ItemEditBeginning
          2. Using ItemEditBegin
          3. Using ItemEditEnd
      4. 9.4. Combining an item editor and item renderer
      5. 9.5. Advanced item renderers
        1. 9.5.1. The AdvancedDataGridRendererProvider
        2. 9.5.2. Referencing the column
          1. By ID
          2. By Index
        3. 9.5.3. Spanning columns
        4. 9.5.4. Spanning an entire row
      6. 9.6. Filter functions
      7. 9.7. Summary
  7. 2. Application flow and structure
    1. 10. Events
      1. 10.1. The event system
        1. 10.1.1. Event system—the Postal Service
        2. 10.1.2. Event-delivery system
        3. 10.1.3. Set your phases on stun
      2. 10.2. Sending and receiving events
        1. 10.2.1. Adding event listeners
        2. 10.2.2. Keying into binding events
        3. 10.2.3. Removing event listeners
      3. 10.3. Custom events
        1. 10.3.1. Using the dispatcher to send an event
        2. 10.3.2. Creating custom events
        3. 10.3.3. Stopping event propagation
        4. 10.3.4. Adding event metadata to components
      4. 10.4. Summary
    2. 11. Application navigation
      1. 11.1. Feeding the data provider for menus and menu bars
        1. 11.1.1. Nested arrays
        2. 11.1.2. Nested array collections
        3. 11.1.3. Models
        4. 11.1.4. XML component and class
        5. 11.1.5. XMLList component
        6. 11.1.6. XMLListCollection component and class
        7. 11.1.7. Choosing a data type for the data provider
      2. 11.2. Working with menus
        1. 11.2.1. Creating a menu
        2. 11.2.2. Positioning the menu
        3. 11.2.3. Customizing menu items
      3. 11.3. Using a menu bar
        1. 11.3.1. Creating a menu bar
        2. 11.3.2. Positioning the menu bar
        3. 11.3.3. Customizing items in the menu bar
        4. 11.3.4. Handling user interactions with menu bars
      4. 11.4. Using view stacks
        1. 11.4.1. Creating a view stack
        2. 11.4.2. Adding navigation to the view stack
          1. Do-it-Yourself
        3. 11.4.3. Determining which stack is selected
        4. 11.4.4. Handling user interactions with view stacks
      5. 11.5. TabNavigator
        1. 11.5.1. Creating a tab navigator
        2. 11.5.2. Handling user interactions with a tab navigator
          1. Passing the Event to a Function
      6. 11.6. Accordion
        1. 11.6.1. Creating an accordion
        2. 11.6.2. Populating an accordion
          1. Breaking Down a form
          2. Using a List in an Accordion
        3. 11.6.3. Handling user interactions with an accordion
      7. 11.7. Summary
    3. 12. Introduction to pop-ups
      1. 12.1. Creating your first pop-up
        1. 12.1.1. First things first: create your title window
        2. 12.1.2. Using PopUpManager to open the window
        3. 12.1.3. Closing the pop-up
      2. 12.2. Controlling the window location
        1. 12.2.1. Using the centerPopUp() method
        2. 12.2.2. Calculating window placement
      3. 12.3. Setting window transparency
      4. 12.4. Data integration with pop-ups
        1. 12.4.1. Getting data out of your pop-up window
        2. 12.4.2. Sending events
        3. 12.4.3. Getting data out
        4. 12.4.4. Sending data to the window
      5. 12.5. Using alerts
        1. 12.5.1. Creating a simple alert
        2. 12.5.2. Doing more with alerts
        3. 12.5.3. A more advanced alert
        4. 12.5.4. Pimp this alert
      6. 12.6. Summary
    4. 13. View states
      1. 13.1. Understanding view states
      2. 13.2. View states in Flex
        1. 13.2.1. View states classes
        2. 13.2.2. View-state example
        3. 13.2.3. Defining a view state (<mx:State />)
        4. 13.2.4. View-state transitions
        5. 13.2.5. States in components
      3. 13.3. Summary
    5. 14. Working with data services
      1. 14.1. What the heck is a WSDL document?
      2. 14.2. Reading WSDL
        1. 14.2.1. Reading the WSDL document: operations
        2. 14.2.2. Reading the WSDL: input types
        3. 14.2.3. Reading the WSDL document: output
      3. 14.3. Using WebService components
        1. 14.3.1. Creating a WebService component with ActionScript
        2. 14.3.2. Calling the WebService component
        3. 14.3.3. Handling the result
        4. 14.3.4. The ResultEvent
        5. 14.3.5. Working with the result
        6. 14.3.6. Fault events
        7. 14.3.7. Using asynchronous tokens
      4. 14.4. Using HTTPService to retrieve results
        1. 14.4.1. Connecting to an HTTP web service
        2. 14.4.2. Explicit parameter binding
      5. 14.5. Using the RemoteObject tag
      6. 14.6. Using the URLLoader
      7. 14.7. Using the Flex Import Web Service wizard
        1. 14.7.1. Using the Import Web Service wizard
        2. 14.7.2. Working with generated web-service code
      8. 14.8. Summary
    6. 15. Working with XML
      1. 15.1. XML primer
        1. 15.1.1. What is XML?
        2. 15.1.2. Benefits of XML
        3. 15.1.3. Drawbacks
        4. 15.1.4. Syntax and rules
          1. The Root Tag
          2. Well-Formedness
          3. XML Declaration
          4. Entities
          5. Storing DATA
          6. Case Sensitivity
        5. 15.1.5. DTDs and XML Schema
        6. 15.1.6. Namespaces
      2. 15.2. XML components and classes
        1. 15.2.1. The XML component
          1. Invoking the XML Component
        2. 15.2.2. The XML class
          1. Invoking the XML Class
          2. Converting Objects to XML
          3. XML Class Properties
          4. XML Class Functions/Methods
        3. 15.2.3. The XMLList component
          1. Invoking the XMLList Component
        4. 15.2.4. The XMLList class
        5. 15.2.5. The XMLListCollection component and class
          1. Wrapping Around an XMLList—Literally
          2. Using the Source Property to Point to XML and XMLList Sources
      3. 15.3. Loading external XML source data
      4. 15.4. Binding in XML
        1. 15.4.1. Binding from XML
        2. 15.4.2. Binding to XML
      5. 15.5. ECMAScript for XML (E4X)
        1. 15.5.1. E4X syntax
          1. Example 1: Accessing a Particular Value by Position (Index)
          2. Example 2: Accessing a Particular Node by a Property Value
          3. Example 3: Accessing a Node by an Adjacent Nodes Value
          4. Example 4: Accessing a Property of a Node
          5. Example 5: Assigning Values
        2. 15.5.2. Working with XML structure
          1. Example 1: Looping Over XML Structure Using its Index
          2. Example 2: Looping Over Nodes as Keys
          3. Example 3: Looping Over Nodes in an XML Fragment
          4. Example 4: Acquiring Descendents
          5. Example 5: Acquiring Nodes and Attributes by Wildcard
          6. Example 6: Prepending and Appending Nodes
          7. Example 7: Inserting Nodes in Between Existing Nodes
          8. Example 8: Copying a Nodea
          9. Example 9: Deleting a Node
      6. 15.6. Summary
    7. 16. Objects and classes
      1. 16.1. OO theory in 5 minutes
        1. 16.1.1. The relationship between objects and classes
          1. What are Classes?
        2. 16.1.2. Objects have properties and methods
          1. Properties and Methods have Scope
        3. 16.1.3. Inheritance
        4. 16.1.4. Encapsulation and coupling
        5. 16.1.5. Objects: they’re everywhere!
      2. 16.2. Playing with objects
        1. 16.2.1. A closer look at objects
          1. Adding a Primitive Object
          2. Taking a Peek
        2. 16.2.2. Methods of objects
        3. 16.2.3. Method parameters
        4. 16.2.4. Methods return information
        5. 16.2.5. Objects have properties
      3. 16.3. Creating a class
        1. 16.3.1. Creating the class file
        2. 16.3.2. Specifying a package
        3. 16.3.3. Naming classes
        4. 16.3.4. Class modifiers
        5. 16.3.5. Superclasses: extending a class
        6. 16.3.6. Interfaces
        7. 16.3.7. Looking at your class
      4. 16.4. Adding properties
      5. 16.5. Adding getter/setter methods
      6. 16.6. Creating methods for your class
      7. 16.7. Summary
    8. 17. Custom components
      1. 17.1. What are custom components?
        1. 17.1.1. A custom component example
      2. 17.2. How custom components work
        1. 17.2.1. Simple and composite types
        2. 17.2.2. Implementation choices
          1. Just Mxml
          2. Just Actionscript
          3. Code-Behind
      3. 17.3. Simple custom components
      4. 17.4. Passing parameters
        1. 17.4.1. Using a function to pass a value
        2. 17.4.2. Passing a value as a property
          1. Sometimes You Need Logic
          2. Leveraging Binding Events to Track Changes
        3. 17.4.3. Using a setter function as a property proxy
        4. 17.4.4. Using bound parameters
      5. 17.5. Retrieving values
        1. 17.5.1. Using a function to retrieve a value
        2. 17.5.2. Using a property to retrieve a value
        3. 17.5.3. Using a getter function as a property proxy
      6. 17.6. Creating composite components
      7. 17.7. Creating ActionScript components
      8. 17.8. Custom events
        1. 17.8.1. Passing along the event object
      9. 17.9. Namespaces and structure
        1. 17.9.1. The MX namespace
        2. 17.9.2. The local namespace
        3. 17.9.3. Directory structure and namespaces
          1. Reverse-Domain Syntax
        4. 17.9.4. Namespace in ActionScript
      10. 17.10. Summary
    9. 18. Advanced reusability in Flex
      1. 18.1. SWC files
      2. 18.2. Runtime shared libraries
        1. 18.2.1. Standard RSLs
        2. 18.2.2. Making your Flex application use RSL
          1. Creating a Project to use the RSL
          2. Creating the RSL
      3. 18.3. Modular Flex application development
        1. 18.3.1. Components vs. modules
        2. 18.3.2. Creating a simple module
        3. 18.3.3. Loading modules the MXML way with the Module API
        4. 18.3.4. Loading and unloading modules with ActionScript
        5. 18.3.5. Pros and cons of modules
      4. 18.4. Adding patches in your Flex application lifecycle
        1. 18.4.1. Using a SWC to update and replace a class
      5. 18.5. Refactoring
      6. 18.6. Summary
  8. 3. The finishing touches
    1. 19. Customizing the experience
      1. 19.1. Styles
        1. 19.1.1. Inline styles
          1. Using Flex Builder’s Property-Suggest
          2. Using Design View
          3. Using the Language Reference
          4. When to use Inline Styles
        2. 19.1.2. Local style definitions
          1. Type Definition
          2. Class Definition
          3. Finding out what Cssproperties are Available
          4. When to use Local Styles
        3. 19.1.3. External stylesheets
          1. When to use External Stylesheets
        4. 19.1.4. The Style Explorer
        5. 19.1.5. Working with color
          1. Named Colors
          2. Numeric Colors
        6. 19.1.6. Transparency
        7. 19.1.7. Using gradients
        8. 19.1.8. Working with styles programmatically
          1. Guidelines on Using setStyle()
          2. Getting Styles
      2. 19.2. Embedding fonts
        1. 19.2.1. Embedding via the font’s system name
        2. 19.2.2. Embedding using a font file
        3. 19.2.3. Leveraging CSS
      3. 19.3. Images and icons
        1. 19.3.1. Image types
        2. 19.3.2. To embed or not to embed
          1. Embedded Images
          2. Loaded Images
        3. 19.3.3. Images as variables
        4. 19.3.4. Icons
          1. Icons in Dynamic Lists
          2. Where to find Icon Properties
      4. 19.4. Skins
        1. 19.4.1. Types of skins
        2. 19.4.2. 19.4.2 Graphical skins with images
          1. Skinning Via Inline Styles
          2. Skinning Via Local or External Styles
        3. 19.4.3. Graphical skins with SWFs
        4. 19.4.4. Flex skin design extensions (SDE)
        5. 19.4.5. Image slicing
        6. 19.4.6. Programmatic skins
      5. 19.5. Summary
    2. 20. Working with effects
      1. 20.1. What is an effect?
        1. 20.1.1. Cause and effect
        2. 20.1.2. Out-of-the-box effects
        3. 20.1.3. Composite effects
      2. 20.2. Triggered effects
      3. 20.3. Programmatically applying an effect
        1. 20.3.1. Creating effects with ActionScript
        2. 20.3.2. Using just ActionScript
      4. 20.4. Creating composite effects
        1. 20.4.1. Sequential effects
        2. 20.4.2. Parallel effects
        3. 20.4.3. Composite composites
      5. 20.5. Using out-of-the-box effects
        1. 20.5.1. The AnimateProperty effect
        2. 20.5.2. The Blur effect
        3. 20.5.3. The Dissolve effect
        4. 20.5.4. The Fade effect
        5. 20.5.5. The Glow effect
        6. 20.5.6. The Iris effect
        7. 20.5.7. The Move effect
        8. 20.5.8. The Pause effect
        9. 20.5.9. The Resize effect
        10. 20.5.10. The Rotate effect
        11. 20.5.11. The SoundEffect effect
        12. 20.5.12. The Wipe effects
        13. 20.5.13. The Zoom effect
      6. 20.6. Easing functions
        1. 20.6.1. Out-of-the-box easing functions
        2. 20.6.2. Making your own easing functions
      7. 20.7. Fonts and effects
      8. 20.8. Summary
    3. 21. Drag-and-drop
      1. 21.1. The drag-and-drop process
      2. 21.2. Drag-and-drop events
      3. 21.3. Components that support drag-and-drop
      4. 21.4. Enabling D&D on List-based components
      5. 21.5. Moving versus copying
      6. 21.6. Multi-item drag
      7. 21.7. Two-way drag-and-drop
      8. 21.8. Using D&D for user-controlled sorting
      9. 21.9. Enter the DragManager
        1. 21.9.1. Operational values
        2. 21.9.2. DragManager functions
      10. 21.10. Accepting or denying a drop
        1. 21.10.1. Limiting who gets into the party
        2. 21.10.2. Preventing event propagation
        3. 21.10.3. Use the DragEvent object to find the drop target
      11. 21.11. Applying your own drop
        1. 21.11.1. Adding to the component’s dataProvider explicitly
        2. 21.11.2. Adding to the component’s dataProvider implicitly
      12. 21.12. Adding D&D to non-List components
        1. 21.12.1. Setting up the example
        2. 21.12.2. Initiating the drag
        3. 21.12.3. Adding visual feedback
        4. 21.12.4. Handling the drop
        5. 21.12.5. Handling the exit
        6. 21.12.6. Putting it all together
      13. 21.13. Customizing the drag-and-drop experience
        1. 21.13.1. Changing the drag image
        2. 21.13.2. Changing the drag proxy Icons
      14. 21.14. Summary
    4. 22. Charting
      1. 22.1. Introduction to charting
        1. 22.1.1. Chart parts
        2. 22.1.2. Chart types overview
      2. 22.2. Setting the stage with series and data
      3. 22.3. Creating charts
        1. 22.3.1. Invoking a chart
        2. 22.3.2. Adding a legend
        3. 22.3.3. Changing chart types
      4. 22.4. Stacking charts
      5. 22.5. Exploring chart types
        1. 22.5.1. Area charts
        2. 22.5.2. Bar charts and column charts
        3. 22.5.3. Line charts
        4. 22.5.4. Bubble charts
        5. 22.5.5. Candlestick and HLOC charts
        6. 22.5.6. Pie charts
        7. 22.5.7. Plot charts
      6. 22.6. Customizing charts
        1. 22.6.1. Series strokes
        2. 22.6.2. Series fills
          1. Single-Color Fill
          2. Color Array Fills
      7. 22.7. Summary
    5. 23. Debugging and testing
      1. 23.1. Debugging
        1. 23.1.1. Using the Flash Debug Player
        2. 23.1.2. Configuring logging
        3. 23.1.3. Using the trace() function
        4. 23.1.4. Trace-log viewers
        5. 23.1.5. Converting objects to strings
        6. 23.1.6. FxSpy
        7. 23.1.7. Monitoring network activity
        8. 23.1.8. Using the Debugger
          1. Launching Debug Mode
          2. Adding/Removing a Breakpoint
          3. Controlling Execution
          4. Watching Variables
      2. 23.2. Testing
        1. 23.2.1. Types of tests
          1. Profiling
          2. Unit Testing
          3. Functional Testing
        2. 23.2.2. Flex Profiler
          1. Launching the Profiler
          2. Controlling Execution
        3. 23.2.3. FlexUnit (unit testing)
          1. Setting up for Flexunit
          2. Creating a Test Runner
          3. Creating a Test Case
          4. Executing the Tests
        4. 23.2.4. Fluint (unit testing)
          1. Setting up for Fluint
          2. Creating a Test Runner
          3. Creating Test Cases
          4. Creating Test Suites
          5. Executing the Tests
        5. 23.2.5. FunFX (functional testing)
        6. 23.2.6. RIATest (functional testing)
        7. 23.2.7. HP QuickTest Pro (functional testing)
        8. 23.2.8. IBM Rational Functional Tester (functional testing)
      3. 23.3. Summary
    6. 24. Wrapping up a project
      1. 24.1. Printing
        1. 24.1.1. Flex’s approach to printing
        2. 24.1.2. Tools of the trade
        3. 24.1.3. Printing things
        4. 24.1.4. Scaling things for print
        5. 24.1.5. The art of adding objects
          1. What if the Objects Aren’t Under the Same Container?
          2. Using a Print Custom Component
        6. 24.1.6. Printing lists
          1. Using a Custom Component
          2. Using a Composite Custom Component
        7. 24.1.7. Catching when a user cancels
        8. 24.1.8. FlexReport
      2. 24.2. Customizing the wrapper
        1. 24.2.1. Wrapper files
        2. 24.2.2. Wrapper templates
        3. 24.2.3. The bare essentials
        4. 24.2.4. Embedding into a web application
          1. Making it a Portlet
        5. 24.2.5. Passing parameters in a wrapper
      3. 24.3. Deployment
        1. 24.3.1. Create a production build
        2. 24.3.2. Positioning client-side files
        3. 24.3.3. Positioning server-side files
        4. 24.3.4. Testing that it works
      4. 24.4. Summary
  9. Resources
    1. Developer resources
    2. Discussion forums
    3. Open source initiatives
    4. The Flex ecosystem
    5. User groups
      1. North America
      2. International