Note that there are some explanatory texts on larger screens.

plurals
  1. POFlash AS3 Getting Security sandbox violation when trying fetch an external swf
    primarykey
    data
    text
    <p>Hii, I'm tring to load swf file to my flash application from a different server. When i try to load it on flash IDE (crl+enter) everything is working fine, but when i run the swf as an independent swf file or by debugging it, i'm getting this error:</p> <pre><code>SecurityError: Error #2121: Security sandbox violation: LoaderInfo.content: file:///C|/Users/something/Desktop/blablabla/myplayer.swf cannot access http://www.somedomain.com/blablabla/lalalala/abc.swf. This may be worked around by calling Security.allowDomain. at flash.display::LoaderInfo/get content() at wallplayer_fla::MainTimeline/swfLoaded()[wallplayer_fla.MainTimeline::frame1:216] Cannot display source code at this location. </code></pre> <p>I have the crossdomain.xml file in the root of my server:</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd"&gt; &lt;cross-domain-policy&gt; &lt;allow-access-from domain="*" /&gt; &lt;/cross-domain-policy&gt; </code></pre> <p>In "myplayer.swf" I have:</p> <pre><code>Security.allowDomain("*"); Security.allowInsecureDomain("*"); ... ... var loaderContext:LoaderContext = new LoaderContext(); loaderContext.checkPolicyFile = true; loaderContext.allowCodeImport = true; ldr = new Loader(); ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, swfLoaded); ldr.load(new URLRequest(graySwfFilename), loaderContext); ... ... var mcExt; var ldr:Loader; function swfLoaded(e:Event):void { mcExt = MovieClip(ldr.contentLoaderInfo.content); ldr.contentLoaderInfo.removeEventListener(Event.COMPLETE, swfLoaded); mcExt.x = 0; mcExt.y = 0; addChild(mcExt); } </code></pre> <p>I don't really know what to do... Please HELP?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload