Search code examples
flashactionscript-3imageloadinguiloader

AS3 UILoader: Load never completed


I am trying to load cover art from movies into UILoader components in Flash CS5. I'm using the IMDB API to retrieve the URL's to these images, but I know for a fact that this code works, and that the URL's are valid (copy-pasting them into a browser shows the images as they should). However, when I set the source of my UILoader component to one of these URL's, I get a "Load never completed" error, and the image will not show up. If I replace the URL with a random other image location not belonging to imdb, it also loads just fine.

The URL's returned by imdb are fairly long and contain several special characters, so I'm guessing it's not loading because of that. Below is the error in question (also contains an example URL):

Error #2044: Unhandled ioError:. text=Error #2036: Load Never Completed. URL: http://ia.media-imdb.com/images/M/MV5BMjE5ODg1NTk3OF5BMl5BanBnXkFtZTcwNzA5NTMyNA@@._V1_SX320.jpg

Any idea on how to get this loaded into a UILoader component?


Solution

  • You cannot use UILoader because the crossdomain on imdb doesn't allow access:

    http://ia.media-imdb.com/crossdomain.xml

    <?xml version="1.0"?> 
    <!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd"> 
    <cross-domain-policy> 
      <allow-access-from domain="*.images-amazon.com"/> 
      <allow-access-from domain="images.amazon.com"/> 
      <allow-access-from domain="g-images.amazon.com"/> 
      <allow-access-from domain="*.ssl-images-amazon.com"/> 
      <allow-access-from domain="*.amazon.com"/> 
      <allow-access-from domain="*.bebe.com"/> 
      <allow-access-from domain="cea.target.com"/> 
      <allow-access-from domain="xyccea.target.com"/> 
      <allow-access-from domain="testcea.target.com"/> 
      <allow-access-from domain="devcea.target.com"/> 
      <allow-access-from domain="sites.target.com"/> 
    </cross-domain-policy>