MACROMEDIA FLASH MX 2004-USING COMPONENTS Using Manual
Text of MACROMEDIA FLASH MX 2004-USING COMPONENTS Using Manual
Add Life to the Web, Afterburner, Aftershock, Andromedia, Allaire, Animation PowerPack, Aria, Attain, Authorware,
Authorware Star, Backstage, Bright Tiger, Clustercats, ColdFusion, Contribute, Design In Motion, Director, Dream Templates,
Dreamweaver, Drumbeat 2000, EDJE, EJIPT, Extreme 3D, Fireworks, Flash, Flash Lite, Flex, Fontographer, FreeHand,
Generator, HomeSite, JFusion, JRun, Kawa, Know Your Site, Knowledge Objects, Knowledge Stream, Kno
INTRODUCTION: Getting Started with Components . . . . . . . . . . . . . . . . . . . . . . . 7
Intended audience. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
System requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
About the documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Typo
Deleting components from Flash documents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Using code hints . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Creating custom focus navigation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
Managing component depth in a document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Components in Live
Loader component . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484
Media components (Flash Professional only). . . . . . . . . . . . . . . . . . . . . . . . . . . . 497
Menu component (Flash Professional only). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 538
MenuBar component (Flash Professional only) . . . . . . . . . . . . . . . . . . . . . . . . . . 574
NumericStepper component . .
APPENDIX: Collection Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 959
Defining a collection property. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 960
Simple collection example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 960
Defining the class for a collection item . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 962
Access
Getting Started with Components
Macromedia Flash MX 2004 and Macromedia Flash MX Professional 2004 are the professional
standard authoring tools for producing high-impact web experiences. Components are the
building blocks for the Rich Internet Applications that provide those experiences. A component is
a movie clip with parameters that are set during authoring in Macromedia Flash, and with
ActionScript methods, properties, and events that a
Introduction: Getting Started with Components
If you are less experienced with writing ActionScript, you can add components to a document, set
their parameters in the Property inspector or Component inspector, and use the Behaviors panel
to handle their events. For example, you could attach a Go To Web Page behavior to a Button
component that opens a URL in a web browser when the button is clicked without writing any
ActionScript code.
If you are a prog
MACROMEDIA FLASH MX 2004-USING COMPONENTS Terms used in this manual
The following terms are used in this manual:
at runtime When the code is running in Flash Player.
while authoring While you are working in the Flash authoring environment.
Additional resources
For the latest information on Flash, plus advice from expert users, advanced topics, examples,
tips, and other updates, see the Macromedia DevNet website at www.macromedia.com/devnet,
which is updated regularly. Check
Components are movie clips with parameters that allow you to modify their appearance and
behavior. A component can be a simple user interface control, such as a radio button or a check
box, or it can contain content, such as a scroll pane; a component can also be non-visual, like the
FocusManager that allows you to control which object receives focus in an application.
Components enable anyone to build complex Macromedia Flash
MACROMEDIA FLASH MX 2004-USING COMPONENTS Chapter 1: About Components
About version 2 component architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
What’s new in version 2 components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
About compiled clips and SWC files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Accessibility and components. . . . . . . . . . .
Where component files are stored
13
• RDBMSResolver component (Flash Professional only)
• Screen class (Flash Professional only)
• Slide class (Flash Professional only)
• Tree component (Flash Professional only)
• WebServiceConnector class (Flash Professional only)
• XMLConnector component (Flash Professional only)
• XUpdateResolver component (Flash Professional only)
To verify installation of the Flash MX 2004 or Flash MX Professional 2004 c
Chapter 1: About Components If you’ve added components, you’ll need to refresh the Components panel.
To refresh the contents of the Components panel:
• Select Reload from the Components panel menu.
To remove a component from the Components panel:
• Remove the MXP or FLA file from the Configuration folder.
Benefits of using components
Components enable the separation of coding and design. They also allow you to reuse code,
either in components y
About version 2 component architecture
15
Categories of components
Components included with Flash MX 2004 and Flash MX Professional 2004 fall into the
following five categories (the locations of their ActionScript source files roughly correspond to
these categories as well and are listed in parentheses):
• User interface components (mx.controls.*)
User interface components allow you to interact with an application; for example, the
RadioButton, CheckBox,
Chapter 1: About Components Version 2 components are included in the Components panel as compiled clip (SWC) symbols. A
compiled clip is a component movie clip whose code has been compiled. Compiled clips cannot
be edited, but you can change their parameters in the Property inspector and Component
inspector, just as you would with any component. For more information, see “About compiled
clips and SWC files” on page 17.
Version 2 components are writ
About compiled clips and SWC files
17
The Halo theme provides a ready-made, responsive, and flexible user interface for applications.
Halo is the default theme that the version 2 components use. (See “About themes” on page 77.)
Manager classes provide an easy way to handle focus and depth in a application. (See “Creating
custom focus navigation” on page 50 and “Managing component depth in a document”
on page 51.)
The base classes UIObject and U
Chapter 1: About Components Accessibility and components
A growing requirement for web content is that it should be accessible; that is, usable for people
with a variety of disabilities. Visual content in Flash applications can be made accessible to the
visually impaired with the use of screen reader software, which provides a spoken audio
description of the contents of the screen.
When a component is created, the author can write ActionScript that ena