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

大约有 339 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0048 秒)

151. xhr的on和once什么区别,官网例子 [ 73%]

...w HttpRequest(); xhr.http.timeout = 10000;//设置超时时间; xhr.once(Event.COMPLETE,this,completeHandler); xhr.once(Event.ERROR,this,errorHandler); xhr.on(Event.PROGRESS,this,processHandler); 2017-10-17 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: ...

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

152. socket与node服务端连不上?按照官方案例 [ 73%]

...接 this.socket.connectByUrl("ws://45.78.**.**:3000"); this.socket.on(Laya.Event.OPEN, this, openHandler); this.socket.on(Laya.Event.MESSAGE, this, receiveHandler); this.socket.on(Laya.Event.CLOSE, this, closeHandler); this.socket.on(Laya.Event.ERROR, this, errorHandler); function openHandler(event)...

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

153. 如何与服务端建立连接 [ 73%]

...t + ":" + port; let socket:Laya.Socket = new Laya.Socket(); socket.on(Laya.Event.OPEN,this,()=>{ console.log("connect success!"); }) socket.connectByUrl(url);点此查看Socket官方示例 2018-05-15 1 0 分享 微博 QZONE 微信 rabbit 赞同来自: 只要前端的,还是要前端和后端代...

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

154. Dragonbones龙骨动画 播放不同动作出现闪烁 混乱 [ 73%]

...ete; } this.aniUrl = aniUrl; this.templet = new Templet(); this.templet.on(Event.COMPLETE, this, this.parseComplete); // this.templet.on(Event.ERROR, this, this.onError); this.templet.loadAni(this.aniUrl); this.maskBox.graphics.drawRect(0,0,this.width,this.height,'#ffffff'); this.mask = this.maskBox...

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

155. HttpRequest在网页上和APP上表现不一致 [ 73%]

... function(){console.log("http timeout test: timeout")};     hr.once(Laya.Event.COMPLETE, this, ()=>{console.log("http timeout test: success");});     hr.once(Laya.Event.ERROR, this, (e: any)=>{console.log("http timeout test: error " + e.toString());});     console.log("http timeout test:...

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

156. Socket能连接到服务器,客户端发请求也能收到服务端的数据,但是服务端主动推送数据,客户端就是收不到数据? [ 73%]

...Scripts.Core { import laya.net.Socket; import laya.utils.Byte; import laya.events.Event; import Scripts.Core.MsgManger; import Scripts.Core.IHandler; import Scripts.Core.TipsManager; import laya.utils.Browser; /** * ... * @author */ public class Socketmanger{ private static var _I:Socketmanger; publ...

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

157. Uncaught TypeError: Cannot read property 'XXX' of undefined [ 73%]

...rawRect(0, 0, 515, 515, "#996633", "#333333");             spe.on(Event.MOUSE_DOWN, spe, onMouseDown);             Laya.stage.on(Event.MOUSE_UP, this, onMouseUp);             Laya.stage.on(Event.MOUSE_OUT, this, onMouseUp);   } private function onMouseDown(e:Event):void {...

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

158. 提示“AtlasResourceManager:Dispose the inner Atlas。” [ 73%]

... = Laya.Handler; var WebGL = Laya.WebGL; var Loader = laya.net.Loader; var Event = Laya.Event; (function() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.sta...

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

159. 关于HttpRequest报错问题 [ 73%]

...nt-Type","application/x-www-form-urlencoded; charset=utf-8"); xmlHttp.once(Event.COMPLETE,this,onHttpRequestComplete); xmlHttp.once(Event.ERROR,this,errorHandler); xmlHttp.on(Event.PROGRESS,this,processHandler); function onHttpRequestComplete(e){ }; function processHandler(data){ console.log(data); ...

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

160. 排坑:Laya.HttpRequest()无效 [ 73%]

...a.HttpRequest(); xhr.http.timeout = 10000;//设置超时时间; xhr.once(Event.COMPLETE, this, completeHandler); xhr.once(Event.ERROR, this, errorHandler); xhr.on(Event.PROGRESS, this, processHandler); xhr.send("http://www.baidu.com", "", "get", "text"); function processHandler(data) { console.log...

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