Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You're trying to load the external swf off of the file system, which will throw security errors. Put it up on a server, and it should work fine, as long as both swfs are on the same domain. Or run a local server and try it on that.</p> <p>If the two swfs aren't in the same domain, you'll need to add a <code>crossdomain.xml</code>. It'll go on the server root and it'll look something like this:</p> <pre><code>&lt;?xml version="1.0"?&gt; &lt;cross-domain-policy&gt; &lt;allow-access-from domain="*" /&gt; &lt;/cross-domain-policy&gt; </code></pre> <p>Except you shouldn't just use <code>*</code> as it'll open you up to security risks. You'll want to specifically white-list the other domain. You can learn more about cross domain policy files <a href="http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html">here</a>.</p> <p><strong>UPDATE:</strong><br> Additionally, since the loader swf is accessing the content it is loading (through <code>loader.content</code>), you'll need to add security permissions to that content swf (looks like it is called <code>Gen-Tress.swf</code>):</p> <pre><code>import flash.system.Security; Security.allowDomain("*"); </code></pre> <p>It's also worth noting that <code>Loader</code> is a <code>DisplayObject</code>, meaning you can directly add it to the <code>stage</code> with <code>addChild(loader)</code> instead of <code>addChild(loader.content)</code>. By not accessing the <code>Loader</code>'s content, you can usually avoid security sandbox violation errors and not have to deal with allowing domains and cross domain policies.</p>
 

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