• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 298 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0041 秒)

121. 动画监听回调怎么会无限成倍调用 [ 72%]

动画监听回调怎么会无限成倍调用 this.star.on(Laya.Event.COMPLETE, this, function () { 解决这个问题·两天了·我差点怀疑我的智商,写了好几遍正确的递归思路。结果就是成倍调用, 最后发现是 我在递归方法里面监听动画播放完毕,第...

来源: Laya_社区 发布时间: 20171215

122. 分享:如何为spine(龙骨)动画添加CLICK事件! [ 72%]

...); })(); function startFun() { mFactory = new Templet(); mFactory.on(Event.COMPLETE, this, parseComplete); mFactory.loadAni("res/spine/spineRes2/goblins.sk"); } function parseComplete() { mArmature = mFactory.buildArmature(1); mArmature.x = 100; mArmature.y = 200; var rect=new Laya.Rectangle(-200,-2...

来源: Laya_社区 发布时间: 20170830

123. 【官网代码】加载dom音频报错,怎么回事? [ 72%]

...dler(e:Object):void{var http:HttpRequest = new HttpRequest();http.on(Event.COMPLETE,this,completeHandler);http.send("489.mp3","","get",Loader.BUFFER);}private function completeHandler(e:Object):void{audioContext.decodeAudioData(e,decodeAudioData.bind(this));}private function decodeAudioData(buffer:O...

来源: Laya_社区 发布时间: 20181023

124. Laya.loader.load怎么停止回调 [ 71%]

...load = Laya.loader.load(this._data.url, Laya.Handler.create(this, this.loadComplete), null, Laya.Loader.ATLAS); 如果我想在加载的过程中 不去触发 loadComplete方法 我该怎么办? this._load.off(Laya.Event.COMPLETE, this, this.loadComplete); 这个是没用的 2017-12-21 添加评...

来源: Laya_社区 发布时间: 20171221

125. request failed status:0 text: IOS HttpRequest [ 71%]

...est(); hr.once(Event.PROGRESS, this, onHttpRequestProgress); hr.once(Event.COMPLETE, this, onHttpRequestComplete); hr.once(Event.ERROR, this, onHttpRequestError); var headers = []; headers.push("Content-Type"); headers.push("application/json"); hr.send('http://xxxxxxxxxxxxxxxxxx', JSON.stringify(dat...

来源: Laya_社区 发布时间: 20170620

126. 如何在layaair 上使用get方法的xml ,获得节点属性? [ 71%]

...PROGRESS, this, onHttpRequestProgress);             hr.once(Event.COMPLETE, this, onHttpRequestComplete);             hr.once(Event.ERROR, this, onHttpRequestError);             hr.send(NameJosn, null, 'get', 'xml');               function method():void       ...

来源: Laya_社区 发布时间: 20160626

127. 为什么获取不到getBounds()的width,height [ 71%]

...了,可以通过加一个延迟函数进行处理抑或添加一个Event.COMPLETE函数。 参考如下: 第二个问题:this.body和this.hero的区别 this.body是Role类下的animation实例:是个Animation this.hero是Role类的实例:是个Sprite(因为Role继承自Sprite) 第三...

来源: Laya_社区 发布时间: 20160729

128. 二进制图片(TypeScript-2D进阶篇(TS)-游戏加载策略) [ 71%]

...= new Laya.Sprite(); var xhr = new Laya.HttpRequest(); xhr.once(Laya.Event.COMPLETE,this,this.completeHandler); xhr.once(Laya.Event.ERROR,this,this.errorHandler); xhr.send("res/a.png","","get","arraybuffer"); } private completeHandler(data:Object):void{ //加载完成返回的data是arraybuffer; /...

来源: Laya2.0_文档 发布时间: 20210714

129. spine适配版微信开发者平台报错 [ 71%]

...sion.v3_8); this.templet.loadAni(this.aniPath); this.templet.on(Laya.Event.COMPLETE, this, this.parseComplete); this.templet.on(Laya.Event.ERROR, this, this.onError); }加载方式用的官方案例,本地跑是没问题的 2021-12-07 0 0 分享 微博 QZONE 微信 northTg 赞同来自: 有极个...

来源: Laya_社区 发布时间: 20211207

130. [0]Spine3.8.75报错:Error: Unsupported skeleton data, please export with a newer version of Spine. [ 71%]

...   this.templet.loadAni(this.aniPath);         this.templet.on(Event.COMPLETE, this, this.parseComplete);         this.templet.on(Event.ERROR, this, this.onError);     }     parseComplete() {         this.skeleton = this.templet.buildArmature();         Laya.stage.addChild(this....

来源: Laya_社区 发布时间: 20211013