I reproduced your structure, but I had a different problem – the main parent SWF loads itself, endlessly. It never loads the child.
The child SWF defines class names (
Main, etc) that are the same names as the parent. As a result, these get merged, so instantiating the child SWF triggers the parent existing classes, resulting in an infinite loop.
I was able to solve this by using
new LoaderContext (true, new ApplicationDomain ()) in the second parameter of the
loader.load method, allowing the SWF to have a different application domain, eliminating the conflict.
We could consider a change to how we generate Flash content, in order to make these automatically generate classes unique, so as to prevent collisions, but that will require additional work to sort out.
If you need to load a child SWF, then get references to its loaded classes, you should keep a reference to the new
ApplicationDomain you create, and use that to