If the flash app uses the fl.* classes, there is a good chance it won't
work, unless you sandbox the Flex SWF, which will be a lot of work.
Flex does not support being loaded into a Flash app, but several folks do
have it working.
I don't (and won't) know what classes the client applications use, unfortunately.
As I mentioned in my first post, I am able to successfully load the Flex swf onto the stage, and it runs. The only "problem" is that it takes over focus, and the client application can't be interacted with until the SystemManger of the Flex app is removed from the stage, at which point the client app regains focus and works fine. I was digging into the SystemManager code but there's quite a lot going on, and since I can't seem to attach my debugger and step through the code, it's hard to really know what's going on.
How are the other folks getting it to work?
There aren't other interactive controls in their Flash apps. The Flash apps
are shells to do fancy preloading.
I'm not sure I follow you. The client applications are full blown applications developed in Flash (perhaps even pure AS3?) Most of the time I have to decompile them to see any code, so I don't know much about what goes on in them. Additionally, I'm primarily a Flex developer.
The library of mine that these client apps download at runtime is additional functionality that is completely separate from the functionality of the client's application.
I was trying to make the point that most folks who have Flash apps load Flex
don't do much in the Flash app. You're in unsupported territory, so it
isn't clear how well things are going to work.
You can try sandboxing. Load the Flex SWF from a different domain than the
Flash SWFs and the Flex SWF might run on its own. See the Marshall Plan
documentation for more details. It still may not work though.
I see what you mean now. I will look into the Marhsall Plan.
I just wanted to clarify: the Flex app is being loaded successfully and runs fine (it is being served from a different domain and we have crossdomain.xml to keep everything happy.) Additionally, I can pass objects and call methods between the Flash and Flex code. So, everything is working. The "problem" is that when the Flex app is loaded it's essentially layered on top of the Flash app and while the Flash app is still running (animations still happen, etc...) it isn't possible to interact with it until the Flex app is removed from the stage. From what I can tell the SystemManager is "at fault" as it creates a sprite that acts as a mouse catcher that is the full height and width of the Flash app. I've looked at the code for SystemManager, but it's pretty complicted, and again, I can't debug and step through to see what's actually going on. Sorry for saying all this again, I just wanted to make sure we were on the same page. Additionally, thanks for all your assistance thus far. As I'm defintely in unsupported territory finding any help has been quite difficult.
Well, the layering issue may be the one you know of now, but I still would
expect other problems in other host apps later. Often there are problems
when you hit the tab key and Flash's focusManager runs code on Flex
Anyway, hopefully sandboxing will also solve the mousecatcher issue.