ITeye博客

as3 load image

cainwise · 2011-11-26 23:59 · actionscript3 · Web前端 · Markdown

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);
           
       
       
        }

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。