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

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

41. Laya.HttpRequest 没有调用回调方法? [ 66%]

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

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

42. 二进制图片(JavaScript-2D进阶篇(JS)-游戏加载策略) [ 65%]

...", 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); // 清除释放; }; img.src = window...

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

43. websocket连接出错 [ 65%]

....init(800,600,Laya.WebGL); // var socket = io.connect('10.10.1.103:8081'); this.byte = new Laya.Byte(); this.byte.endian = Laya.Byte.LITTLE_ENDIAN; this.socket = new Laya.Socket(); this.socket.endian = Laya.Byte.LITTLE_ENDIAN; //建立连接 this.socket.connectByUrl("ws://10.10.1.103:8888"); // this...

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

44. 使用HttpRequest向外部链接请求ip所在省份时,遇到 No 'Access-Control-Allow-Origin' header错误 [ 64%]

...Request = new HttpRequest();             req.once(Event.COMPLETE, this, function():void             {                 trace(req.data);             });             req.once(Event.ERROR, this, function():void             {             ...

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

45. 二进制图片(ActionScript-2D进阶篇(AS3)-游戏加载策略) [ 64%]

...", 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); // 清除释放; }; img.src = window...

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

46. 如何让发布后的H5加载资源用src或href指向本地路径,而不是网络请求 [ 63%]

...rome-extension, https.   load(url) {             var me = this;             url = URL.formatURL(url);             this.url = url;             this.audioBuffer = WebAudioSound._dataCache[url];             if (this.audioBuffer) {...

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

47. 关于HttpRequest [ 63%]

...Encode(obj); var hr = new Laya.HttpRequest(); hr.once(Laya.Event.PROGRESS, this, function (e) { console.log(e); }); hr.once(Laya.Event.COMPLETE, this, function () { console.log(hr.data); }); hr.once(Laya.Event.ERROR, this, function (e) { console.log(e); }); hr.send('http://stone.tt.be-xx.com/git/tes...

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

48. 创建树Tree 该怎么回调mouseHandler 形参该传什么 [ 63%]

...1 个回复 cuixueying 赞同来自: z298959 tree.mouseHandler=new Handler(this,onTreeHandler); function onTreeHandler(e,index) {    if(e.type==Laya.Event.CLICK)   {   } } 2017-06-26 1 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 z29...

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

49. request failed status:0 text: IOS HttpRequest [ 63%]

...ert(JSON.stringify(data)); hr = new HttpRequest(); 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('ht...

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

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

...    hr = new HttpRequest();             hr.once(Event.PROGRESS, this, onHttpRequestProgress);             hr.once(Event.COMPLETE, this, onHttpRequestComplete);             hr.once(Event.ERROR, this, onHttpRequestError);             hr.send(NameJosn, null, 'get',...

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