title: Can't load youtube thumbnail images. Security sandbox violation: LoaderInfo.content: cannot access '*.png'. No policy files granted access
body: <p>I can't seem to wrap my head around this image loading problem with my actionscript 3.0 project. I suspect it has something to do with how I have the crossDomain.xml set up. The problem is that I can load youtube movie thumbnail images from <a href="http://img.youtube.com/" rel="nofollow">http://img.youtube.com/</a> into flash and display them completely fine when testing/running the SWF in a stand alone (local) player.</p>
  
  <p>But when I upload the SWF and test it through the web I receive Sandbox Errors and Security Violations. </p>
  
  <p>Here is my crossDomain.xml (stored on the root of the server):</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd&gt;
  &lt;cross-domain-policy&gt;
  &lt;site-control permitted-cross-domain-policies="all"/&gt;
  &lt;allow-access-from domain="*" to-ports="*"/&gt;
  &lt;allow-http-request-headers-from domain="*" headers="*"/&gt;
  &lt;/cross-domain-policy&gt;
  </code></pre>
  
  <p>Here is some AS3:</p>
  
  <pre><code>Security.loadPolicyFile('http://youtube.com/crossdomain.xml');
  // LoaderContext used
  externalLoaderCntxt = new LoaderContext( true, new ApplicationDomain() );
  loader.load( http://img.youtube.com/vi/nTYcgnqAzqE/2.jpg, externalLoaderCntxt );
  </code></pre>
  
  <p>Here is the error I get with the current configuration of crossDomain.xml and loaderContext</p>
  
  <pre><code>SecurityError: Error #2123: Security sandbox violation: LoaderInfo.content: http://*.*.com/bin/PipedLoader_test.swf?ver=ef331d0dcb1e1ef59b325969ebadafa4 cannot access http://img.youtube.com/vi/nTYcgnqAzqE/2.jpg. No policy files granted access.
  at flash.display::LoaderInfo/get content()
  at *.pipedLoader::PipedLoader/onImageLoadComplete()[*\pipedLoader\PipedLoader.as:915]
  </code></pre>
  
  <p>I've tried creating the LoaderContext without checkPolicyFiles as false.</p>
  
  <p>Is there any way to remove these Security Sandbox violations? Or because the crossDomain.xml used is hosted by YouTube.com there isn't anything I can change?</p>
  
  <p>If it is the ladder how does one load these thumbnail images and use them? Can a policy file put restrictions on the loaderInfo.content property?</p>
  
  <p>Any help would be great, Thanks!
  TwoBit</p>