CHAPTER 2
Creating Basic Components in Flash MX 2004
This chapter includes a set of simple examples that illustrate the basics of component
development. The first part of the chapter introduces the Green Square, Orange Circle, and Blue
Button components, which illustrate simple component construction and usage. The latter part
of the chapter expands on the simple components and describes how to use event handling,
styling, skinning, and other techniques when creating your components.
If you are unfamiliar with working in the Macromedia Flash environment, see
Chapter 1,
"Working with Flash MX 2004," on page
5. For more advanced information on creating
components, see
Chapter 3, "Creating Advanced Components in Flash MX 2004," on page
45.
Contents
Creating simple components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Setting default sizes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Styling custom components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Creating simple components
This section describes how to create simple components in Macromedia Flash for Macromedia
Flex. As with creating any Hello World-style example, these procedures ignore some practices to
help new component developers quickly achieve success and begin creating components.
This section describes how to create the following components:
Green Square
Create a component that exists in a flat namespace. This component's
ActionScript class file is not part of a package.
23
Need help?
Do you have a question about the FLEX - DEVELOPING COMPONENTS AND THEMES and is the answer not in the manual?
Questions and answers