When loading assets from an external SWF it is often useful to instantiate classes stored in the external SWF - for example Fonts are often accessed that way.
When doing such, you have to make sure that your local SWF has the definition of these classes, and simply compiling both SWF files together does not guarantee that. More specifically, if on SWF is dependent on classes in another, then both SWF files end up carrying copies of the class definitions and when you load the external SWF file in the runtime you get casting errors because the VM doesn't know that the same named class in an external SWF is the exact same as the one you have.
In order to work around the problem you need to use ApplicationDomain.getDefinition()
on the loaded SWF - see here for a detailed example. In addition to a detailed example on how to use Loader
they also show how to get Class
objects from an external SWF.