User Guide
Table Of Contents
- Contents
- Working with Flash MX 2004
- Creating Basic Components in Flash MX 2004
- Creating Advanced Components in Flash MX 2004
- Contents
- About Creating components
- Writing the component’s ActionScript code
- Simple example of a class file
- General process for writing a class file
- Selecting a parent class
- Identifying the class, symbol, and owner names
- About the component instantiation life cycle
- Writing the constructor
- Specifying clip parameters
- Implementing the constructObject2() method
- Implementing the init() method
- Implementing the createChildren() method
- Implementing the commitProperties() method
- Implementing the measure() method
- Implementing the layoutChildren() method
- Implementing the draw() method
- Defining getters and setters
- Component metadata
- Defining component parameters
- Handling events
- Using the Event metadata
- About invalidation
- Skinning custom controls
- Adding styles
- Making components accessible
- Improving component usability
- Best practices when designing a component
- Using the ModalText example
- Troubleshooting
- Index

Index 81
R
redraw() method 58
resizing custom components 56
S
scope, custom components 50
screen readers, accessibility in custom components 71
setStyle() method 70
setters, defining for custom components 31
skinning custom components 69
startDrag() method 49
styleDeclaration object 70
styles
adding 70
for custom components 38, 70
Style metadata keyword 60
SWC files
contents 18
creating 18
file format explained 17
importing into Flash 22
using in Flex 19
symbol layers, editing for a new component 13
symbol names, for custom components 50
symbol owners, for custom components 50
symbolName variable 50
symbolOwner variable 50
symbols
compiled clips 8
converting to components 15
editing mode 13
editing, for components 13
variables 50
syntax for metadata statements 59
T
tags for metadata 60
Timeline
editing symbols 13
in custom components 49
tiptext. See ToolTips
Too l Ti ps 7 2
troubleshooting
custom components 76
using the SWCRepair utility 19
U
UIComponent class
compared to UIObject class 49
description 48
UIObject class description 48
usability, custom components 71
V
variables, custom components 30
versioning 72