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

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

861. 关于event中只读属性touches,问题,求解 [ 55%]

....fontSize = 50; txt.on("click", this, onFunc); Laya.stage.addChild(txt); } private function onFunc(e:Event):void { var arr:Array = e.touches; console.log("e.touchId="+e.touchId); console.log("arr[0]"+arr[0]); } } }  输出为:       不明白touches属性数组里面存储的什么类型的数...

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

862. 图集资源clearRes清除之后下次再用到load时加载失败 [ 55%]

...rl, type: Laya.Loader.ATLAS }],Laya.Handler.create(this,this.Loa,null)); } private Loa():void { console.log("在又有意义有意义有意义有意义有意义有意义有意义有意义"); } public ClearImg(url:string):void { Laya.Loader.clearRes(url); } 2018-01-09 添加评论 免费帖 --> 分...

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

863. mc.rotation=0的问题 [ 55%]

...有些斜。   mc.rotation=30; Laya.timer.frameLoop(1,this,onLoop); private function onLoop():void {      mc.rotation-=5;      if(mc.rotation<=0)      {          Laya.timer.clear(this,onLoop);          mc.rotation=0;       }   }   所以,mc.rotation=0时是有误...

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

864. 按照打地鼠教程来无法正常加载资源 [ 55%]

...Arr,Handler.create(this,this.onLoaded));         }         private function onLoaded():void{             //显示界面             var gameView:GameView = new GameView();             Laya.stage.addChild(gameView);         }     }   ...

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

865. 附加脚本的使用问题 [ 55%]

...onstructor() {         console.log("加载ScaleButton");     }     private _owner: any;     public set owner(o: laya.display.Sprite) {         this._owner = o;         console.log("设置owner");     }     public get owner(): laya.display.Sprite {         return this._owner...

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

866. [LayaAirIDE3]请教一下3.3中新的tween怎么动画结束后传参给回调的方法 [ 55%]

... 1).duration(100).userData({ prop: "xx" }).then(this.onComplete, this);   private onComplete(tweener: Laya.ITweener): void { console.log(tweener.userData); } 2025-09-19 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 荣rong 相关问题...

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

867. list控件内字体大小设置无效 [ 55%]

list控件内字体大小设置无效  private function updateItem(cell:Box, index:int):void{ var itemImg:Image=cell.getChildByName("itemImg") as Image; var itemName:Label=cell.getChildByName("itemName") as Label; itemImg.skin=cell.dataSource.image_url; itemName.width=Number(itemName.text.length*2...

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

868. 怎么给button绑定一个事件,比如console.log一段话 [ 55%]

...微信 LT 赞同来自: var btn:Button;btn.on(Event.CLICK, this, onClick); private function onClick():void { console.log(); } 基本就是这个套路加响应事件=。= 官方demo含糊不清的看得累 2018-07-18 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复...

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

869. 编译时提示Cannot read property 'push' of undefined [ 55%]

...关的链接 提交 2 个回复 cuixueying 赞同来自: 改下:    private arrayobjs:Array<Laya.Sprite>=[]; //保存当前对象信息     就OK了! 2017-05-23 0 0 分享 微博 QZONE 微信 dnahonker 赞同来自: 感谢,我的错。漏了实例化了。~感谢 2017-05-23 0 0 分...

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

870. 如何给loadprogress传参数? [ 54%]

...a.Handler.create(this,this.loadprogress,["param"])); /** * 加载进度 */ private loadprogress(data:Array<any>):void{ console.log("加载进度: " + data);//加载进度: param }Laya.Handler的参数完全覆盖掉了loadprogress的加载进度数据 2017-02-21 添加评论 免费帖 --> 分...

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