Chapter 29. Advanced Flash Integration

This chapter covers the more advanced methods of integrating Flex and Flash together. This means bringing components and classes from one IDE to another, which allows you to reuse code and components, making for quicker development and more consistent applications.

This chapter will cover:

  • Bringing Flex classes into Flash

  • Using the Flex Component Kit to create Flex components in Flash

  • Porting Flash UI components to Flex

  • Creating custom states and transitions for Flex components

Bringing Flex Classes into Flash

After spending a lot of time developing classes in Flex, it would be nice to be able to use those classes directly in Flash. Reusing code is a good way to save time and effort, and using the exact same classes between your Flex and Flash applications without having to maintain multiple copies saves even more time and effort.

There are some techniques to use to bring in those functional Flex classes into Flash to create a powerful framework that crosses boundaries. It was possible in Flex 2 to create a SWC file to bring programmatic classes from Flex to Flash. Unfortunately, Flex 3 uses a different SWC version than Flash CS3, so Flash does not easily recognize SWCs generated by Flex. There are some techniques that involve hacking the Flex-generated SWCs, but these techniques are difficult and do not always work.

One way to circumvent this issue is to generate a runtime shared library (RSL) from the SWC created by a Flex library project. The downside ...

Get Professional Adobe® Flex® 3 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.