Here's a little hack to directly instantiate MovieClips and Sprites created in Flash CS3 inside of Flex and then add those instances to the displaylist in Flex (and interact with that Flash content). To show you how this works, I've created the most silly sample in Flash history: the return of Flashman into Flex. It's a Flex application with one button centered on the screen. When you click the button, we load an SWF file created with Flash CS3 into the same Application domain as the Flex application.
In the file FlashMan.fla, we have an extended MovieClip called "FlashMan" in the library (please note: not on the stage!). As soon as the SWF is loaded, we switch the button to "Call Flashman". When you click the latter button, we create an instance of the FlashMan MovieClip, add it to the displaylist and then tween the movieclip to the mousecursor in Flex... Check out the sample code here (right-click & view source).

You may ask yourself... what is it good for? Well, to me, this means less fuss with SWFLoaders or with the Flex component kit for Flash CS3. It's possible to instantiate content created in Flash directly into Flex. Adding those instances to the displaylist in Flex is possible by wrapping your Sprite or MovieClip in a UIComponent and it's ready to be added on the stage. For convenience, I hacked together the class called "UIComponentWrapper" which takes care of this stuff. Also please note that I've put the .fla file in a separate folder /flashsources. I've added the classpath ../src in FlashMan.fla via the publish settings. When compiling to the folder /html-template, take into account that you have to rebuild your project to have Flex builder copy all the files to the bin-debug folder.
Here's the downside: you need to preload your Flash content in the "SWF class library"-way and only after it's loaded, then you can create instances of all your Flash goodness and add all of it to your Flex website with code. When considering the impact on the Flex project development workflow, you need to foresee preloading the graphical assets but in my humble opinion it's less hassle than with the Flex component kit for Flash CS3.


2 Comments
It’s possible to do this without any loading by embedding the assets in the app directly, like this:
[Embed(source='assets/FlashMan.swf', mimeType="application/octet-stream")]
public var Assets:Class;
Then you can “extract” all the symbols from the swf. (see AssetsManager class)
I put up a quick demo here: http://melvynhills.be/demo/FlashAssetsInFlexTest/ (right-click for source)
Thanks for the UIComponentWrapper
Melvyn, thanks a lot for your very interesting input on this.
However, in your example, it seems like the code that’s attached to the movieclip isn’t taken into account anymore. Oh well, whatever… great comment!