as3 load image

private var _loader:Loader = new Loader( );

_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);

_loader.load(new URLRequest("com/asxp/skin/assets/theme.jpg"));

public function onComplete(event:Event):void{
            var image:Bitmap = Bitmap(_loader.content);
            var bitmap:BitmapData = image.bitmapData;
            image.width=this.stage.stageWidth;
            image.height=this.stage.stageHeight;
            this.addChild(image);
            this.setChildIndex(image,0);
           
       
       
        }
 

你可能感兴趣的:(image)