package { import flash.display.Bitmap; import flash.display.Loader; import flash.display.LoaderInfo; import flash.display.Sprite; import flash.events.Event; import flash.net.URLRequest; [SWF(width=1600, height=900)] public class as8 extends Sprite { public function as8() { var loader:Loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onImgLoad); loader.load(new URLRequest('img.jpg')); } private function onImgLoad(event:Event):void { var loaderInfo:LoaderInfo = event.target as LoaderInfo; var bitmap:Bitmap = loaderInfo.content as Bitmap; addChild(bitmap); } } }