Flash glossary: Flex component
Using Flash Professional, you can create content for use as components in Flex applications. This content can include both visual graphic elements and ActionScript 3 code.
Creating components in Flash for use in Flex allows you to take advantage of the flexible graphic design capabilities of Flash while still utilizing the capabilities of Flex.
In order to create Flex components in Flash, you must install the Flex Component Kit for Flash. You install the component kit using the Adobe Extension Manager.
To create a Flex component in Flash:
- Launch Flash. Two new commands appear in the Commands menu: Convert Symbol to Flex Component and Convert Symbol to Flex Container.
- In Flash, create a movie clip symbol containing the artwork and ActionScript 3 code you want to include in the Flex component. The content must be contained in a movie clip symbol before you convert it to a Flex component.
- The movie clip symbol must meet the following requirements:
- The frame rate of the FLA file should be set to 24 fps and should match the frame rate of any Flex projects that will use the component.
- The registration point of the movie clip should be located at the 0,0 point.
- Select the movie clip in the Library panel and choose Commands > Convert Symbol to Flex Component. Flash converts the movie clip to a Flex component, changes its icon to a Flex icon in the Library, and imports the FlexComponentBase class compiled clip to the Library. Flash embeds the FlexComponentBase into the Flex component SWC file created in the next step.
- Choose File > Publish to create a SWC file containing the compiled Flex component. The published component SWC file is now ready for use in Flex. You can discard the SWF file if desired.

To use the SWC file in Flex, do one of the following:
- Copy the SWC file from Flash and paste it into the bin folder of your Flex project.
- Add the SWC file to library path of your Flex project.
For more information about using Flex and Flash together, refer to the Flex documentation. Also read the tutorial, Combining animation and ActionScript using Flash Professional CS5 and Flash Builder 4.
About the author
This content was authored by Adobe Systems, Inc.