代码如下:
var url:String="1.jpg";
var request:URLRequest=new URLRequest(url);
var bmp:Bitmap;
var bmpData:BitmapData = new BitmapData(100,100);
var loader:Loader=new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
loader.load(request);
function completeHandler(event:Event) {
var loader:Loader=Loader(event.target.loader);
bmp = Bitmap(loader.content);
bmpData.draw(bmp);
addChild(bmp);
}