In this article, you are introduced to components in Flash MX 2004 and Flash MX 2004 Professional. The functionality of components is now much greater than with previous versions of Flash. In this article, I give you an overview of the different components you now have, what you can do with components, how to build a simple form with components, how to change the style of your components, and how to bind an array (a fundamental data structure) to your components.
What are Components?
Many of you may already be familiar with components, which are specialized movies you can add to your own movies. Each component has a specific function and role that, when you combine it with ActionScript, provides the base for extremely powerful movies. Flash MX originally shipped components (although they were there in Flash 5, but they were called SmartClips).
There are four groups of components in Flash MX 2004:
User Interface (UI) components
The UI components control visual tools onscreen (for example, check boxes, menus, text input areas, and scroll panes. The Media components allow you to control sound and video, such as MP3 and Flash Video streaming, to the Flash Player. Data components are sophisticated tools that let you bind data from an external source, such as an XML file, to your Flash movies. Managers are invisible components that control specific features; for example, the PopUpManager lets you place a popup window in your Flash Application.