<!-- Load the SWF file as the icon for a Button control. -->
<mx:Button icon="{LogoCls}" height="100" width="200"/>
<!-- Load the BlueSquare symbol as the icon for a Button control. -->
<mx:Button icon="{LogoClsBlueSquare}" height="100" width="100"/>
<!-- Load the GreenCircle symbol as the icon for a Button control. -->
<mx:Button icon="{LogoClsGreenCircle}" height="100" width="100"/>
<!-- Use the SWF symbols to skin a Button control. -->
<mx:Button id="b1" label="Click Me"
Importing dynamic SWF 9 assets
Dynamic SWF 9 assets are Flex components that you create in Flash CS3, and then import into your Flex application.
Because these assets are Flex components, you can use them in the same way as you would a component shipped
with Flex, or in the same way that you use a custom Flex component that you created in MXML or ActionScript.
To create a Flash component, you define a symbol in your FLA file, and configure the movie clip symbol as a subclass
of either of the following classes:
mx.flash.UIMovieClip For assets used as skins or as Flex controls
mx.flash.ContainerMovieClip For assets used as Flex containers
For example, you define a FLA file with four movie clip symbols that represent the following four skins of the Button
Button disabled skin
Button down skin
Button over skin
Button up skin
Each movie clip symbol corresponds to a different subclass of the mx.flash.UIMovieClip class. When you publish
your FLA file as a SWC file, the SWC file contains a class definition for each symbol. You can then reference the
classes from your Flex application.
Use the following process to import dynamic SWF 9 assets is:
1 Install the Flex Component Kit for Flash CS3. For more information, see Installing the Adobe Flex Component
Kit for Flash CS3” on page 1.
2 Create movie clip symbols for your dynamic assets in the FLA file. For more information, see Creating a Flash
component for a Flex Button skin” on page 4.
3 For a skin or control, run Commands > Convert Symbol to Flex Component to convert your symbol to a subclass
of the UIMovieClip class and to configure the Flash CS3 publishing settings for use with Flex. For more information,
see Actions performed by the Convert Symbol to Flex Component command” on page 6.

Get ADOBE® FLEX® 3: USING THE FLEX COMPONENT KIT FOR FLASH CS3 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.