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

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

431. AS中的回调函数为什么只能用Handler创建? [ 64%]

...id {  new class(callback); } private function callback(num:int):void {   this.score = num;   var tmp:int = this.score;   trace(tmp); }     另外一个类:class.as 里面有个方法   public function class(callback:Function):void {   callback(100); }     ------------------------------ ...

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

432. Laya.loader.create 进度回调函数执行两次!!! 上次发问题一直没有回复 [ 64%]

...一直没有回复 Laya.loader.create("Main/SMain.ls",Laya.Handler.create(this,this.on3DComplete),Laya.Handler.create(this,this.onProgress,null,false)); Manager.prototype.onProgress = function(value) { console.log("value=="+Math.floor(value*100)+"%"); }   输出结果: 0.19186599730944645 0.52519...

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

433. Laya.HttpRequest 没有调用回调方法? [ 64%]

...; 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

434. ts怎么调用input file弹框选择本地文件 [ 64%]

...         }             }              var _this:* = this;              fileReader.onload = function(evt):void              {                  if(Browser.window.FileReader.DONE==fileReader.readyState)               ...

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

435. XMLRequest在layaNative下请求崩溃,请求官方协助! [ 64%]

...,请求官方协助!  public post(url: string, data: any, callback: (this: void, data: JSON) => void): void {         let hr = new Laya.HttpRequest();         hr.once(Laya.Event.COMPLETE, this, (e: any): void => {             callback(JSON.parse(hr.data));         });  ...

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

436. [2.2.0]Label斜体不显示文字, 100%复现, 这次不闪退了 [ 64%]

...2.2.0 还是老规矩,  官方2D示例修改,  将文字设为斜体.   this.tipLbll.italic = true; //这是重点 this.tipLbll.bold = false; this.tipLbll.text = "A测试B"; 进游戏死掉, 并未显示文字   android_studio.zip 附件 : --> 2019-07-30 添加评论 免费帖 --> 分享 微博...

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

437. [LayaAir3]3.3 sprite3d对象销毁触发脚本onDestroy获取transform异常 [ 63%]

...回复 LayaAir大为 赞同来自: Sprite3D上的destroy方法执行时会this._transform = null;  因此onDestroy中就不能获取transform了 关于tween的问题,请您使用新版的Tween系统,旧版已不再支持 2025-11-05 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复...

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

438. 使用laya官方示例代码制作微信小游戏无法显示 [ 63%]

...aya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.setup(); } private setup(): void { this.createLabel("#FFFFFF", null).pos(30, 50); this.createLabel("#00FFFF", null).pos(290, 50); this.createLabel("#FFFF00", "#FFFFFF").pos(30, 100); this.createLabel("#000000", "#FFFFFF"...

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

439. LayaAir和原生DOM交互(TypeScript-2D进阶篇(TS)-扩展模块) [ 63%]

...lor = "#ffcccc"; var div:any = Laya.Browser.document.createElement("div"); this.qrcode = new Laya.Browser.window.QRCode(div,{ width:100, height:100 }); var url:string = "http://layabox.com/"; this.qrcode.makeCode(url); Laya.stage.once("click",this,this.clickHandler); this.qrcodeSp = new Laya.Sprite(...

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

440. 什么情况下Tween缓动会停止?除了暂停函数外 [ 63%]

...报错,非必现。 //播开始动画 var kaishi = new StartAnimView(); this.addChild(kaishi); kaishi.playAnim(); this.anim_array.push(kaishi);  Laya.timer.once(1700, this, function () { kaishi.onDestroy(); kaishi.destroy(true);   两个脚本是相互独立的。 2020-01-13 添加评论 免费...

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