CS4:
I must not grasp the concept, please help:
domain1.com hosts a small swf. The swf contains a loader that loads a swf from domain2.com/dir/dir/. All works fine when the loader swf is hosted in domain2.com, however, when accessed from domain1.com I get this in IE:
SecurityError: Error #2070: Security sandbox violation: caller http://domain2.com/dir/dir/black.swf cannot access Stage owned by http://domain1.com/dir/loader.swf.
black.swf from domain2 references a variable from the loader swf and plays FLVs.
I have tried the crossdomain.xml file at the root of domain2.com in every way that it could be created. Including the “*” method.
-
Does it belong at the root of domain2.com (the remote swf being loaded)? Or at the root of the domain1.com (the small swf with the loader)? (I’ve actually tried both, neither work)
-
Do I need something in my actionscript somewhere? Right now I don’t have anything related to crossdomain in my actionscript. Everything I’ve read just makes it seam that all you need is the crossdomain.xml file at the root of your webserver.
AS3 from my loader in domain1.com:
var remotePath:String = “http://domain2.com/dir/folder/assets/flash/”;
var swf:MovieClip;
var loader:Loader = new Loader();
var defaultSWF:URLRequest = new URLRequest(“http://domain2.com/dir/dir/black.swf”);
loader.load(defaultSWF);
loader.x = 0;
loader.y = 0;
addChild(loader);
Some relevant AS3 from domain2.swf:
trace(MovieClip(parent.parent).remotePath);
loader.load(new URLRequest(MovieClip(parent.parent).remotePath+“cms/xml/config.xml”));
stream2.play(MovieClip(parent.parent).remotePath+“open.flv”);
Thanks for your help, I appreciate it.
Lackmaster