I see there are many discussions about SWFLoading but I see none that seem to answer my question. I am using FlashBuilder 4 with the 10.+ flash player in a flex application. I have other application SWF's that I dynamically load and unload at runtime. The first time I load a SWF, the loaded application works fine. After I unloadAndStop the SWF, every other application, including the one unloaded refuses to respond. I've read the documentation on unloadAndStop and see that it removes the listeners from the unloaded SWF. I am trying to determine how to switch through the SWF's without losing the ability to interact with them. Does anyone have any ideas? Perhaps something I'm doing wrong with the unloading? Here is some example code:
var applicationLoader:SWFLoader = new SWFLoader();
private function loadApp(appName:String) : void
if (appName == "Admin")
private function unloadApp() : void
Maybe those SWFs don't actually unload. They won't until all other
references have been freed. See the "What we know about unloading modules"
post on my blog. Most of that applies to SWFLoader and sub-apps as well.
Flex SDK Team
Adobe System, Inc.
I'm not as familiar with the ActionScript API as I would like to be. Do you think perhaps I should be using the Loader object? I see from your writeup on unloadAndStop that it's really not what I'm intending to do. It looks like it's intended to stop audio/video/flash timelines. Will the Loader class load a SWF? Would unload from the Loader then work?
I would continue to use SWFLoader. It is a wrapper around Loader.