Over the course of this chapter, we've studied three related but distinct types of MovieClip subclasses: -
A subclass defined outside of its Library symbol -
A subclass embedded in its Library symbol (inside an #initclip directive) -
A component, which allows component parameters to be specified at authoring time via a GUI The type of MovieClip subclass you use in your application depends entirely upon your situation. If you must allow for author-time placement of instances, you'll very likely need to create a component. Similarly, if you plan to distribute your subclass to other developers, a component makes for a good transport mechanism. Otherwise, you can skip the component-definition step. In any event, you should normally define your subclass directly inside its associated Library symbol, within an #initclip block. While not legally required, storing a subclass in its associated symbol makes the entire package easier to maintain. Movie clip subclasses and components are two cornerstones of the Flash MX application development process. By creating code libraries as components, we can rapidly assemble applications based on reusable assets. Macromedia bundles a number of useful UI Components with Flash MX. You should familiarize yourself with these components, their methods, and parameters (see Appendix G). The Flash UI Components source code is included with Flash MX, so you can study and extend these components to create your own. For further component study, see: - Introduction to Components Tutorial
-
In the Flash MX authoring tool, select Help Tutorials Introduction to Components. - Using Components
-
In the Flash MX authoring tool, select Help Using Flash Using Components. - Building an Address Book with Components (by Colin Moock)
-
http://www.macromedia.com/desdev/mx/flash/articles/addressbook.html - Creating Forms with Components in Macromedia Flash MX
-
http://www.macromedia.com/support/flash/applications/creating_forms/ - Creating Components in Macromedia Flash MX
-
http://www.macromedia.com/support/flash/applications/creating_comps/ - Creating a Flash MX Component
-
http://www.flashcomponents.net/tutorials/triangle/triangle.html - Extending Components in Macromedia Flash MX
-
http://www.macromedia.com/desdev/mx/flash/articles/fmx_components.html - Customizing the ListBox and ComboBox Components
-
http://www.macromedia.com/desdev/mx/flash/articles/extending_components.html - Macromedia's Flash Component Exchange
-
http://www.macromedia.com/exchange/flash - Third-Party Component Exchange
-
http://www.flashcomponents.net/ |