ActionScript 2.0 Overview - New Component Features in v2
(Page 4 of 7 )
Key new v2 component features include:
- A new listener event model for handling component events, which lets many external objects receive a single component’s events
- CSS-based stylesheet support, making it easier to change text attributes across components
- Focus management to support tabbing between user interface elements
- Depth management to manage the visual stacking of components on screen
- Richer accessibility support (i.e., better support for screen readers)
- Richer skinning (i.e., graphic replacement) support
- Encapsulation of component assets in a single file, allowing easier component management and sharing
The v2 components tend to be larger than their v1 counterparts. This is especially true if using only one or two components, as the v2 architecture is optimized for applications that use at least three or four different component types. Therefore, if you need only one or two components, and you don’t need focus management or accessibility support, you’ll get faster (smaller) downloads using the v1 components.
Beware that the default theme (“halo”) for the v2 components does not support custom colors for scrollbars and buttons. That is, the scrollTrackColor and buttonColor style properties do not work with the default v2 component theme in Flash MX 2004 and Flash MX Professional 2004. To set the color of buttons and scrollbars on v2 components, you must apply a new theme to the document. See Help -> Using Components -> About Themes -> Applying a Theme to a Document.
Table 1-1 shows the complete set of components in Flash MX 2004 and Flash MX Professional 2004. Professional components that are not available in Flash MX 2004 will still work in that version of the software. That is, a .fla document that contains a component specific to the Professional edition will open normally and work properly in Flash MX 2004. Macromedia’s End User License Agreement for Flash MX 2004 does not explicitly prohibit the use of Professional-only components in the standard edition of the software.
Table 1-1. The v1 and v2 components
Component | Flash MX | Flash MX 2004 | Flash Pro | Notes | Accordion | a | | v2 | | Alert | b , c | | v2 | | Button | v1 | v2 | v2 | | CheckBox | v1 | v2 | v2 | | ComboBox | v1 | v2 | v2 | | Data Components | | | v2 | Includes DataHolder, DataSet, RDBMSResolver, WebServiceConnector, XMLConnector, and XUp-dateResolver | DataGrid | b | | v2 | | DateChooser | c, d | | v2 | | DateField | | | v2 | | Label | a | v2 | v2 | | List | v1 | v2 | v2 | | Loader | b | v2 | v2 | | Media Components | b | | v2 | MediaController, MediaDisplay, MediaPlayback | Menu | d | | v2 | | MenuBar | | | v2 | | NumericStepper | | v2 | v2 | | ProgressBar | b, c | v2 | v2 | | RadioButton | v1 | v2 | v2 | | ScrollPane | v1 | v2 | v2 | | TextArea | v1 | v2 | v2 | | TextInput | v1 | v2 | v2 | | Tree | c | | v2 | | Window | c | v2 | v2 | | (a) Similar component available in DRK3 (http://www.macromedia.com/software/drk/productinfo/product_overview/volume3). | (b) Similar component available in DRK1 (http://www.macromedia.com/software/drk/productinfo/product_overview/volume1). | (c) Similar component available in Flash UI Component Set 2 at the Flash Exchange (http://www.macromedia.com/exchange/flash). | (d) Similar component available in DRK2 (http://www.macromedia.com/software/drk/productinfo/product_overview/volume2). |
|
In Chapter 12, we’ll learn how to program graphical, OOP applications that use the v2 components.
 | If you've enjoyed what you've seen here, or to get more information, click on the "Buy the book!" graphic. Pick up a copy today!
Visit the O'Reilly Network http://www.oreillynet.com for more online content. |
Next: ActionScript 1.0 and 2.0 in Flash Player 6 and 7 >>
More Flash Articles
More By O'Reilly Media