大约有 418 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0044 秒)
...可以new两次 laya.net.Loader.as 第222行 new HTMLImage.create(url, {onload: onload, onerror: onerror, onCreate: function(img:*):void { image = img; //增加引用,防止垃圾回收 imgCache[url] = img; }}); 这里的调用create本身就是返回一个对象了,为什么这里还能在new...
来源: Laya_社区 发布时间: 20180702
...[{url:"res/atlas/atlas_res.json",type:Loader.ATLAS}], Handler.create(this, onLoaded)); } private function onLoaded():void { //获取图集下的单张小图 var texture:Texture=Laya.loader.getRes("atlas_res/01.png"); var sp:Sprite=new Sprite(); sp.graphics.drawTexture(texture,200,100); Laya.stage.ad...
来源: Laya_社区 发布时间: 20160707
...d property 'enable' of undefined preload.js:55 at HTMLScriptElement.script.onload (file:///E:/h5/project/szfy2.2/bin/libs/laya.core.js:22121:39) TypeError: Cannot read property 'enable' of undefined laya.core.js:22121 at HTMLScriptElement.script.onload (file:///E:/h5/project/szfy2.2/bin/libs/laya...
来源: Laya_社区 发布时间: 20191106
... Laya.loader.load("res/atlas/comp.atlas", Handler.create(null, onLoaded)); })); } function onLoaded(): void { //实例UI界面 var testUI: TestUI = new TestUI(); Laya.stage.addChild(testUI); } 附件 : --> src.rar 2018-05-09 添加评论 免费帖 --> 分...
来源: Laya_社区 发布时间: 20180509
...同来自: this.mBitmapFont.loadFont( "ziti.fnt", new Laya.Handler( this, onLoaded ) ); 上面的 "ziti.fnt" 路徑錯誤,需寫完整路徑。 Example : 假設fnt檔案跟png檔案都放在res資料夾底下,那你就應該寫這樣。 this.mBitmapFont.loadFont( "res/ziti.fnt", new Lay...
来源: Laya_社区 发布时间: 20170811
...载资源 Laya.loader.load("res/atlas/comp.atlas",Laya.Handler.create(this,onLoaded),null,Laya.Loader.ATLAS) })(); function onLoaded(){ //实例化 var tempBG=new background(); Laya.stage.addChild(tempBG); } })();在background.js里是这样写的 var background = (function (_super) { function backg...
来源: Laya_社区 发布时间: 20180129
...资源 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
...背景色 Laya.stage.bgColor = "#ffffff"; //加载图集成功后,执行onLoad回调方法 Laya.loader.load([skin1,skin2], Handler.create(this, onLoaded)); } private function onLoaded():void { //创建一个CheckBox实例cb1 var cb1:CheckBox = new CheckBox(skin1); //添加到舞台上显示 Laya.s...
来源: Laya2.0_文档 发布时间: 20210714
...aya.stage.bgColor="#EEFFCC"; Laya.loader.load("hu.ttf",Handler.create(this,onLoaded),null,Loader.BUFFER); } private function onLoaded():void { var arr:ArrayBuffer=Laya.loader.getRes("hu.ttf"); if(Browser.window.conch) { Browser.window.conch.setFontFaceFromBuffer("hu",arr); } var text:Text=new Text()...
来源: Laya_社区 发布时间: 20161219
...t t.e.parseFont (http://127.0.0.1:63921/game/code.js:1:12413) at e.s.onLoaded (http://127.0.0.1:63921/game/code.js:1:176642) at e.u (http://127.0.0.1:63921/game/code.js:1:295812) at Image._image._image.onload (http://127.0.0.1:63921/game/code.js:1:481938) 2018-05-30 添加评论 ...
来源: Laya_社区 发布时间: 20180530