Jump to content
Search Community

getClass returns null

gigbig test
Moderator Tag

Recommended Posts

Ok, ok, I have read the documentation, but I can't get my program to extract a class from a loaded SWF.

 

The working version uses the Flash native loader

 

ldrContext = new LoaderContext(false, ApplicationDomain.currentDomain);
var request_graphic:URLRequest = new URLRequest(urlG);
ldr_graphic.load(request_graphic, ldrContext);
...
var MC : Object = ldr_graphic.contentLoaderInfo.applicationDomain.getDefinition(className);
return new MC;  

---> returns the correct instance of the class

 

 

while using SWFLoader

 

 

 

gr =  new SWFLoader(urlG, { name:"graphic", context:ldrContext, estimatedBytes: 200, container:this, autoPlay:false } );
gr.load();
var c:Class = gr.getClass(className); 

---> c is null

 

 

WHY?! I already have a "*" crossdomain

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...