SecurityError: Error #2060: Security sandbox violation: (I need help)

Hi All,

I’ve searched everywhere trying to figure this out. I’ve tried everything that i’ve read, but it’s still not working. I have a swf file that loads another swf file, but when I compile, I can see a few traces of the swf file being loaded, but then I get hit with:

SecurityError: Error #2060: Security sandbox violation: ExternalInterface caller

(I’m embedding the swf onto a separate 3rd party website). If I just embed the swf by itself (without the swf trying to load the other swf) it’s fine, but as soon as I try to load that other swf, that’s when I get the error.

My embed is as follows:


<param name="movie" value="http://www.myswf.com/swf" />
<param name="wmode" value="transparent" />
<param name="allowScriptAccess" value="sameDomain" />
<embed src="http://www.myswf.com/swf" type="application/x-shockwave-flash" wmode="transparent" width="539" height="284">
</embed> 

and my code in AS3 is:

import flash.events.Event;
import flash.display.Loader;
import flash.display.LoaderInfo;


var loader:Loader;
Security.allowDomain("*");
Security.allowInsecureDomain("*");
Security.loadPolicyFile("mydomain.com/crossdomain.xml");


function initStage(){
    
    loader = new Loader();
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
    loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
    loader.load(new URLRequest("myotherswf.com"));
    
    
    
}
initStage();

function completeHandler(e:Event){
    
    addChild(loader);    
}

function ioErrorHandler(e:IOErrorEvent){
    
    trace("Video unable to load.");    
} 

Can someone pleeeeease help me with this one, i’m going nuts and I’ve tried everything but the right thing.