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

**URL:** <https://forum.kirupa.com/t/securityerror-error-2060-security-sandbox-violation-i-need-help/309701>\
**Category:** flash\
**Created:** [May 21, 2010, 7:58pm UTC](https://forum.kirupa.com/t/securityerror-error-2060-security-sandbox-violation-i-need-help/309701 "2010-05-21T19:58:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![flashdaddy](https://avatars.discourse-cdn.com/v4/letter/f/e36b37/32.png) [@flashdaddy](https://forum.kirupa.com/u/flashdaddy)\
**Post date:** [May 21, 2010, 7:58pm UTC](https://forum.kirupa.com/t/securityerror-error-2060-security-sandbox-violation-i-need-help/309701/1 "2010-05-21T19:58:43Z")

</div>

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:

```auto
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:

```auto

<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:

```auto
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.
