Losing baseclass when loading swf

I’ve got a solution for this but I would like to understand the problem a little better…

I have main SWF that loads and unloads a several other SWF modules. The modules use other SWF’s as asset libraries to open and instanciate things by “getDefinitionByName.” I thought is was good setup!

The modules work fine by themselves, but when they are loaded into the main SWF, downcasting generates a conversion error… package::Class@123123 to package.BaseClass.

I had a similar issue with events that was solved by using the loaderInfo.sharedEvents dispatcher. Unfortunately, my solution for the subclass issue is to pull them into the main SWF (which somewhat defeats the purpose of having modules and assets).

Also, all loading is done into child app domains… so the assets end up in a child of a child of the main app domain. I tried loading them into the current domain (being the child of the main app domain), but it didn’t have any effect.

Thanks!