Building and Testing Components in Macromedia Flash MX 2004
Allen Ellison
www.architekture.com
Nigel Pegg
Component Engineer
www.dragspace.com
Table of Contents
About Macromedia Flash 2004 Components
In Macromedia Flash MX 2004, you can still build components in the old-school way. You can create movie clips, put your ActionScript 1.0 on the Timeline, build live preview SWFs, and keep your source exposed for the component users.
However, there is a whole new world of component authoring that can make the process of authoring components and entire applications faster, that can improve usability in your applications and make it less frustrating to make them accessible, that provides even more flexible skinning, and that allows you to hide the source code of your components (providing a modest level of protection for your components).
Understanding the pre-built components that ship with Macromedia Flash MX 2004 provides some insight into the costs and benefits of the new-school component authoring style.
Component Categories
- UI controls are visual components that represent discrete elements of a user interface (Checkbox, ComboBox, TextInput components, and so forth) and are the interface between application data and the user.
- Containers are shells for different types of content—Window and ScrollPane are containers, but so is the Loader component, which gives you an easy way to load SWF and JPG files.
- Data components are non-visual components that connect, contain, and process content. Use data components with UI controls. The process for connecting them is data binding, where a change in data in one component forces an event to occur in other dependant components. Examples of data components are the WebServiceConnector, DataSet, and the XMLConnector. A typical application contains multiple instances of a data component.
- Managers are non-visual components responsible for managing some type of system resource. Examples of managers include the FocusManager, the DepthManager, and the PopUpManager. A typical application contains only one instance of a manager, and these managers are normally instantiated if they are needed by components that rely upon them. You don’t need to put them explicitly on the stage or attach them dynamically like other types of components.
About the authors
Allen Ellison was a Flash Evangelist for Macromedia, a Macromedia Flash MX advisor, and was the principal SME (subject matter expert) for the Macromedia Flash Developer Certification Exam, as well as a contributor to the Macromedia Flash curriculum. Prior to Macromedia, Allen has 14 years of experience architecting and developing software and web applications. Allen is available for public speaking engagements, training, consulting and is currently writing a new book about developing applications in Macromedia Flash MX, and is starting a new company, architekture.com, for high-level web consulting and collaboration technologiesRaised in the wilds of northern Canada, Nigel's keen instincts for Macromedia Flash were honed fighting his way through caribou herds, computing science departments, and multimedia design firms of the pre-burst Internet economy. A "veteran" to web design/development since 1996 (Perl!) and Macromedia Flash 3, Nigel came to Macromedia to focus on applying his "serious" degree to his passion for Macromedia Flash, and somehow ended up making a whole pile of what they're calling "Macromedia Flash UI Components."