大约有 24 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0029 秒)
...ascript var nPercent=0; var image1 = document.createElement('img'); image1.onload=function() { if(window.loadingView){ nPercent+=33; window.loadingView.loading(nPercent); } } image1.src = "a.png"; var image2 = document.createElement('img'); image2.onload=function() { if(window.loadingView){ nPercent...
来源: Laya2.0_文档 发布时间: 20210715
...所需资源 Laya.loader.load("res/atlas/comp.atlas",Handler.create(this,onLoaded)); } private function onLoaded():void { //实例化Panel组件 var panel:Panel = new Panel(); //给panel添加背景色 panel.graphics.drawRect(0,0,100,100,"#ffcccc"); //给panel设置宽高 panel.size(100,100); //给p...
来源: Laya2.0_文档 发布时间: 20210715
... Laya.loader.load("res/atlas/comp.atlas", Laya.Handler.create(this, this.onLoaded)); } private onLoaded(): void { //实例化Panel组件 var panel: Laya.Panel = new Laya.Panel(); //给panel添加背景色 panel.graphics.drawRect(0, 0, 100, 100, "#ffcccc"); //给panel设置宽高 panel.size(100, 100)...
来源: Laya2.0_文档 发布时间: 20210715
...资源 Laya.loader.load("res/atlas/comp.atlas", Laya.Handler.create(this, onLoaded)); function onLoaded() { //实例化Panel组件 var panel = new Laya.Panel(); //给panel添加背景色 panel.graphics.drawRect(0, 0, 100, 100, "#ffcccc"); //给panel设置宽高 panel.size(100, 100); //给panel设置...
来源: Laya2.0_文档 发布时间: 20210715
...("get", "res/atlas/comp.png", true); xhr.responseType = "arraybuffer"; xhr.onload = function () { if (this.status == 200) { var blob = new Blob([this.response], { type: "image/png" }); var img = document.createElement("img"); img.onload = function (e) { window.URL.revokeObjectURL(img.src); // 清除...
来源: Laya2.0_文档 发布时间: 20210715
...t与png文件同名 mBitmapFont.loadFont("layabmfont.fnt",new Handler(this,onLoaded)); } private function onLoaded():void { init(); } private function init():void { //如果位图字体中,没放空格,最好设置一个空格宽度 mBitmapFont.setSpaceWidth(10); Text.registerBitmapFont(mFontNam...
来源: Laya2.0_文档 发布时间: 20201114
...("get", "res/atlas/comp.png", true); xhr.responseType = "arraybuffer"; xhr.onload = function () { if (this.status == 200) { var blob = new Blob([this.response], { type: "image/png" }); var img = document.createElement("img"); img.onload = function (e) { window.URL.revokeObjectURL(img.src); // 清除...
来源: Laya2.0_文档 发布时间: 20210714
...("get", "res/atlas/comp.png", true); xhr.responseType = "arraybuffer"; xhr.onload = function () { if (this.status == 200) { var blob = new Blob([this.response], { type: "image/png" }); var img = document.createElement("img"); img.onload = function (e) { window.URL.revokeObjectURL(img.src); // 清除...
来源: Laya2.0_文档 发布时间: 20210714
...台上 Laya.loader.load("./res/atlas/comp.atlas",Laya.Handler.create(this,onLoaded)); function onLoaded(){ //实例化导出的UI类 var efc = new ui.TestPUI(); //添加到舞台 Laya.stage.addChild(efc); } ``` 运行后,按钮被按下时,动画效果如动图11所示: ![12](img/12.gif)(图11...
来源: Laya2.0_文档 发布时间: 20210715
...上 Laya.loader.load("./res/atlas/ui.atlas",Laya.Handler.create(this,this.onLoaded)); } private onLoaded():void{ //实例化导出的UI类 var efc:ui.EffectAnimationDemoUI = new ui.EffectAnimationDemoUI(); //添加到舞台 Laya.stage.addChild(efc); } }new Main(); ``` 运行后,按钮被按下时...
来源: Laya2.0_文档 发布时间: 20210715