. In the end, you just cast the content of the loader object to a Bitmap then access that Bitmap's ".bitmapData" property...see a simplified version of my code below.
//Here's my BitmapData Vector
var explosionVec:Vector.
//load external png
var _loader = new Loader();
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loaded,false,0, true);
_loader.load( new URLRequest("bath/To/Image/explosion.png"));
//
function loaded(e:Event):void{
//cast content to bitmap
var bmp:Bitmap = Bitmap(_loader.content);
//store the bitmapData from the Bitmap!
explosionVec[0] = bmp.bitmapData;
}
No comments:
Post a Comment