title: Flex: cross-domain image loading?
body: <p>OK I have an application that loads product images using the &lt; mx:Image /> tag and changing the source. the .SWF is on the http side of the website and the images are on the https side of the site. so at first I was getting this error:</p>
  
  <blockquote>
    <p>SecurityError: Error #2122: Security
    sandbox violation: Loader.content:
    <a href="http://www.MYDOMAIN.com/Masonic.swf" rel="nofollow noreferrer">http://www.MYDOMAIN.com/Masonic.swf</a>
    cannot access
    <a href="https://www.MYDOMAIN.com/masonic_images/13_red_d2-MAS72479bl_red.jpg" rel="nofollow noreferrer">https://www.MYDOMAIN.com/masonic_images/13_red_d2-MAS72479bl_red.jpg</a>.
    A policy file is required, but the
    checkPolicyFile flag was not set when
    this media was loaded. at
    flash.display::Loader/get content() at
    SmoothImage/<a href="http://www.adobe.com/2006/flex/mx/internal::contentLoaderInfo_completeEventHandl" rel="nofollow noreferrer">http://www.adobe.com/2006/flex/mx/internal::contentLoaderInfo_completeEventHandl</a>
    er()</p>
  </blockquote>
  
  <p>So after some research I found this article: <a href="http://www.damienking.net/tutorial-using-remotely-hosted-images-flex" rel="nofollow noreferrer">http://www.damienking.net/tutorial-using-remotely-hosted-images-flex</a> I did what it said and I am now getting this similar error:</p>
  
  <blockquote>
    <p>SecurityError: Error #2123: Security
    sandbox violation: Loader.content:
    <a href="http://www.MYDOMAIN.com/Masonic.swf" rel="nofollow noreferrer">http://www.MYDOMAIN.com/Masonic.swf</a>
    cannot access
    <a href="https://www.MYDOMAIN.com/masonic_images/12_red_d2-MAS60338bl_red.jpg" rel="nofollow noreferrer">https://www.MYDOMAIN.com/masonic_images/12_red_d2-MAS60338bl_red.jpg</a>.
    No policy files granted access. at
    flash.display::Loader/get content() at
    SmoothImage/<a href="http://www.adobe.com/2006/flex/mx/internal::contentLoaderInfo_completeEventHandl" rel="nofollow noreferrer">http://www.adobe.com/2006/flex/mx/internal::contentLoaderInfo_completeEventHandl</a>
    er()</p>
  </blockquote>
  
  <p>Also after I click dismiss to the error box that pops up, the images do load afterwards, but are then set to the size of the actual image not the width and height I set the component to. I have no clue what to make of that.</p>
  
  <p>Any help is appreciated.</p>
  
  <p>THANKS!</p>