Macromedia flex 2 Manuel
3
Contents
Chapter 1: About Flex Documentation . . . . . . . . . . . . . . . . . . . . . . . 7
PART 1: CREATING CUSTOM FLEX COMPONENTS
Chapter 2: Creating Flex Components . . . . . . . . . . . . . . . . . . . . . . 13
About creating components. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13Creating custom components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19Where to go from here . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Chapter 3: Using ActionScript to Create Components . . . . . . . 25
Using ActionScript . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
Chapter 4: Creating Custom Events . . . . . . . . . . . . . . . . . . . . . . . 35
About events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35Dispatching custom events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
Chapter 5: Using Metadata Tags in Custom Components. . . . . 45
About metadata tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46Metadata tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Chapter 6: Compiling Components. . . . . . . . . . . . . . . . . . . . . . . . .63
About compiling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63Compiling components with Flex 2 SDK . . . . . . . . . . . . . . . . . . . . . . . . 66Compiling components with Flex Data Services. . . . . . . . . . . . . . . . . . .72
PART 2: CREATING MXML COMPONENTS
Chapter 7: Creating Simple MXML Components . . . . . . . . . . . . . 77
About MXML components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77Scoping in custom components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83Applying styles to your custom component . . . . . . . . . . . . . . . . . . . . . . 84