views:

61

answers:

2

Hi all! I'm successfully loading swf from another domain, but when i addChild loaded content, it doesn't appear on the stage. My firebug shows that swf loaded with status (304 Not Modified), means no problem.

Why i cannot see loaded swf content on the stage?

Thank you

A: 

maybe its a crossdomain problem. do you have a crossdomain.xml file on the external server?

example xml

Alex Milde
Yes i have crossdomain.xml file in server where i store external swfs. My loader class loads them, but complete event listener doesn't fire. Any suggessions, is there best multi image/swf loader classes in AS3?
Almas Adilbek
I have checked the sandboxtype for files, it's is Security.sandboxType: remote. Is it okey?
Almas Adilbek
Well my friend , you can use this link for loading multi image/swfs files http://code.google.com/p/bulk-loader/http://www.stimuli.com.br/trane/2007/nov/25/loading-reloaded/
Muhammad Irfan
A: 

Hey geeks.
I have found the problem.
I wanna share it to you, because anyone can face with such a problem. This problem doesn't cause any error, so it's hard to find it.

We need just add loaderContext as second parameter in load method. Before assigning it there we must declare it in this way:

var loader_context:LoaderContext = new LoaderContext();
if (Security.sandboxType!='localTrusted') loader_context.securityDomain = SecurityDomain.currentDomain;
loader_context.applicationDomain = ApplicationDomain.currentDomain;

loader.load(url, loader_context);

That's all!

Almas Adilbek