Filed under: as3

Amazon S3 + bulkloader = use a LoaderContext!

In an attempt to save you hours of painful debugging and Adobe-hating: if you're wanting to use the excellent AS3 bulk-loader lib to load assets from S3, follow these steps.  Especially step 2.

1. Put your normal crossdomain.xml in place in your S3 bucket

2. Use a loader context on every BulkLoader !

 var context:LoaderContext = new LoaderContext(true, ApplicationDomain.currentDomain); 
 var loader:BulkLoader = new BulkLoader("loadmystuffplskthxbye");
 loader.add( someS3Url, { context: context  } ); // WIN 

 

reference: http://developer.amazonwebservices.com/connect/entry.jspa?externalID=2011

 

Update: as @koblongata and @Jinx posted in the comments, you'll also want to use this technique when loading from Flickr, Facebook or presumably any other API.