大约有 418 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0038 秒)
....init(550,400); Laya.loader.load("res/atlas/comp.json",Handler.create(this,onLoaded),null,Loader.ATLAS); } private function onLoaded():void { var json:JSON=Laya.loader.getRes("res/atlas/comp.json"); }JSON的解析和AS3的是一样的 2016-10-27 2 0 分享 微博 QZONE 微信 bobofuns - 我是阿...
来源: Laya_社区 发布时间: 20161027
...取json的数据,如下 Laya.loader.load("aaa.json",Handler.create(this,onLoaded),null,Loader.JSON); } private function onLoaded():void { var js:JSON=Laya.loader.getRes("aaa.json"); trace(js); }2、你如果是想使用file读取文件的方式,这个目前layaAir下不支持,需要你借助...
来源: Laya_社区 发布时间: 20170620
...44) at StandardMaterial.__proto.onAsynLoaded (laya.d3.js:23826) at ResInfo.onLoaded (laya.core.js:11401) at EventHandler.__proto.runWith (laya.core.js:672) at ResInfo.__proto.event (laya.core.js:449) at LoaderManager.__proto._endLoad (laya.core.js:11511) at Loader.onLoaded (laya.core.js:11490) at Ev...
来源: Laya_社区 发布时间: 20170328
... { var xmlreq = new XMLHttpRequest(); xmlreq.responseType = "text"; xmlreq.onload = function (e) { var data = e.currentTarget.response; self.postMessage(data); } xmlreq.open("get","res/atlas/comp.json"); xmlreq.send() }, false); ``` 这个例子是在worker中进行加载文件,加载完毕传给...
来源: Laya2.0_文档 发布时间: 20210715
...fff" Laya.loader.load('./../bin/res/atlas/res.atlas', Handler.create(this, onLoaded)) })() function onLoaded() { var cMask = new maskDemoUI() Laya.stage.addChild(cMask) } })() 附件 : --> 2018-08-10 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内...
来源: Laya_社区 发布时间: 20180810
...r.load([{url:"res/atlas/comp.json",type:"atlas"}],Handler.create(this,this.onLoadUi)); } __proto.onLoadUi=function(){ Laya.timer.loop(100,this,this.onLoaded); } __proto.onLoaded=function(){ if(this.isOpen){ return; } this.isOpen=true; var testView=new TestView(); Laya.stage.addChild(testView); Laya....
来源: Laya_社区 发布时间: 20190517
... { var xmlreq = new XMLHttpRequest(); xmlreq.responseType = "text"; xmlreq.onload = function (e) { var data = e.currentTarget.response; self.postMessage(data); } xmlreq.open("get","res/atlas/comp.json"); xmlreq.send() }, false); ``` 这个例子是在worker中进行加载文件,加载完毕传给...
来源: Laya2.0_文档 发布时间: 20210715
...) { Laya.init(500,400); Laya.loader.load("unpack.json",Handler.create(this,onLoaded),null,Loader.JSON); } private function onLoaded():void { var json:JSON=Laya.loader.getRes("unpack.json"); var str:String=JSON.stringify(json); trace(str); } } } 2017-08-07 添加评论 免费帖 --> 分享 微博 QZO...
来源: Laya_社区 发布时间: 20170807
... at AnimationClip.__proto.onAsynLoaded (laya.d3.js:22407) at ResInfo.onLoaded (laya.core.js:12995) at EventHandler.__proto.runWith (laya.core.js:711) at ResInfo.__proto.event (laya.core.js:483) at LoaderManager.__proto._endLoad (laya.core.js:13152) at Loader.onLoaded (l...
来源: Laya_社区 发布时间: 20190520
... Rectangle(0, 0, Laya.stage.width, Laya.stage.height), Handler.create(this,onLoaded)); } //切记:设置tiledMap的宽高,需要在地图创建完成之后 private function onLoaded():void { var sp:Sprite=tiledMap.mapSprite() as Sprite;//为tiledMap整个地图的显示容器设置宽高 sp.size...
来源: Laya_社区 发布时间: 20170419