var libraryLoader:SWFLoader = new SWFLoader();
libraryLoader.source = “Library.swf”;
if( libraryLoader.loaderContext.applicationDomain.hasDefinition( “Foo” ) )
var FooClass:Class = libraryLoader.loaderContext.applicationDomain.getDefinition( “Foo” ) as Class;
var fooInstance:* = new FooClass();
An interesting aspect with this technique is the theoretical ability to have several classes with an equal fully qualified name in the same application instance as long as they are loaded from different applicationdomains. I cant foresee what eventually will happen in the case of a casting collision, but I intend to find out as soon as I have 15 minutes to spend.