AS3 BulkLoader example
instantiate BulkLoader object:
add assets into the queue:
this.assetLoader.add("assets/myMovie.swf", {id:"key2"});
To start loading assets you simply call the start() method:
To get asset content, you would normally call getContent() method, which would return Bitmap for images or AVM1Movie for swf files. You could also call methods like getBitmap() and getAVM1Movie() to target specific file types.
The problem I encountered was that assets I was loading were encrypted. Therefore, I needed to read them in as ByteArray type and then decrypt them. Fortunately the latest version of BulkLoader has getBinary() method, but there is a trick to it. You need to tell BulkLoader to load assets in binary format when adding items into the queue:
this.assetLoader.add("assets/myMovie.swf", {id:"key2", type:BulkLoader.TYPE_BINARY});
var assetBinary2:ByteArray = this.assetLoader.getBinary("key2");
Setting the type to binary did the trick for me, so I thought I'd share it in case someone else falls into the same trap.
Oh, and I should thank Mark Lynch for helping me figure this out :-)
Marko


For more details see below:
http://blog.pcthomatos.com/?p=92
http://code.google.com/p/ultraloader/