Return to Snippet

Revision: 48078
at June 23, 2011 07:22 by Heol

Initial Code
import flash.display.Loader;
import flash.display.LoaderInfo;
import flash.display.BitmapData;
var loader:Loader = new Loader();
loader.load(new URLRequest("banner1.jpg"));
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loaderComplete);
private function loaderComplete(event:Event):void
    var loaderInfo:LoaderInfo = LoaderInfo(;
    var bitmapData:BitmapData = new BitmapData(loaderInfo.width, loaderInfo.height, false, 0xFFFFFF);
    // result: bitmapData

Initial URL

Initial Description

Initial Title
Image (Loader) to BitmapData

Initial Tags

Initial Language
ActionScript 3