大约有 12 项符合查询结果, 库内数据总量为 30,903 项。 (搜索耗时: 0.0055 秒)
...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
...; 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
...; 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
...", 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
...", 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
...", 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
...要的资源 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
...要的资源 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
...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
...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