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

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

1. HttpRequest详解(TypeScript-LayaAir基础篇(TS)-数据与通信) [ 100%]

...http.timeout = 10000;//设置超时时间; xhr.once(Laya.Event.COMPLETE, this, this.completeHandler); xhr.once(Laya.Event.ERROR, this, this.errorHandler); xhr.on(Laya.Event.PROGRESS, this, this.processHandler); xhr.send("res/data.data", "", "get", "text"); console.log("aaaa"); } private processHan...

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

2. HttpRequest详解(JavaScript-LayaAir基础篇(JS)-数据与通信) [ 99%]

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

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

3. HttpRequest详解(ActionScript-LayaAir基础篇(AS3)-数据与通信) [ 98%]

...; xhr.http.timeout = 10000;//设置超时时间; xhr.once(Event.COMPLETE,this,completeHandler); xhr.once(Event.ERROR,this,errorHandler); xhr.on(Event.PROGRESS,this,processHandler); xhr.send("res/data.data","","get","text"); } private function processHandler(data:Object):void { trace(data); } priva...

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

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

...", 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

5. 二进制图片(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

6. 二进制图片(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

7. 多线程worker(TypeScript-2D进阶篇(TS)-游戏加载策略) [ 58%]

...要的资源 Laya.loader.load("res/atlas/comp.atlas",Laya.Handler.create(this,this.onLoaded)); } private onLoaded():void{ //实例UI界面 var testView:ui.test.TestPageUI = new ui.test.TestPageUI(); Laya.stage.addChild(testView); } } new LayaUISample; ``` `WorkerLoader.workerPath = "libs/worker.js";...

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

8. 多线程worker(JavaScript-2D进阶篇(JS)-游戏加载策略) [ 55%]

...要的资源 Laya.loader.load("res/atlas/comp.atlas",Laya.Handler.create(this,onLoaded)); function onLoaded(){ //实例UI界面 var testView = ui.test.TestPageUI(); Laya.stage.addChild(testView); } ``` `WorkerLoader.workerPath = "libs/worker.js";`设置worker.js的路径,这个worker.js是Laya官...

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

9. 多线程worker(ActionScript-2D进阶篇(AS3)-游戏加载策略) [ 54%]

...er.load([{url: "res/atlas/comp.json", type: Loader.ATLAS}], Handler.create(this, onLoaded)); } private function onLoaded():void { //实例UI界面 var testView:TestView = new TestView(); Laya.stage.addChild(testView); } } } ``` ​ `WorkerLoader.workerPath = "libs/worker.js";`设置worker.js的路...

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

10. LayaAir和原生DOM交互(ActionScript-2D进阶篇(AS3)-扩展模块) [ 53%]

...ring ="http://layabox.com/"; qrcode.makeCode(url); Laya.stage.once("click",this,clickHandler); qrcodeSp = new Sprite(); Laya.stage.addChild(qrcodeSp); } private function clickHandler():void { var url:String = qrcode._oDrawing._elImage.src;//获取,注意这里是异步的,开发者可以加个...

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