自己做网站需要收费吗,住房和城乡建设部网站买卖合同,百度经验app下载,企业网站html源代码loadingUI中是加载资源#xff0c;此时如果想自定义loadingUI界面#xff0c;那么此刻正在加载的图片肯定不能用了。 解决方法就是使用服务器资源 直接加载服务器资源就好了 class LoadingUI extends egret.Sprite { public constructor(){ super(); this.c… loadingUI中是加载资源此时如果想自定义loadingUI界面那么此刻正在加载的图片肯定不能用了。 解决方法就是使用服务器资源 直接加载服务器资源就好了 class LoadingUI extends egret.Sprite { public constructor(){ super(); this.createView(); } private textField:egret.TextField; private createView():void { RES.getResByUrl(http://imgsrc.baidu.com/forum/w%3D580/sign38968a59a5c27d1ea5263bcc2bd4adaf/e34e4559252dd42ac49d3956023b5bb5c8eab81f.jpg,this.onComplete,this,RES.ResourceItem.TYPE_IMAGE); } private onComplete(event:any):void { var img: egret.Texture egret.Textureevent; var bitmap: egret.Bitmap new egret.Bitmap(img); this.addChild(bitmap); this.textField new egret.TextField(); this.addChild(this.textField); this.textField.y 500; this.textField.width 480; this.textField.height 100; this.textField.textColor 0x000000; this.textField.textAlign center; } public setProgress(current, total):void { this.textField.text Loading... current / total; } private createBitmapByName(name:string):egret.Bitmap { var result:egret.Bitmap new egret.Bitmap(); var texture:egret.Texture RES.getRes(name); result.texture texture; return result; }}转载于:https://www.cnblogs.com/young-boy/p/5669502.html