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

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

151. Steam扩展实例 · LayaAir3.3 · 引擎文档 · LAYABOX [ 64%]

...ton}) public initBtn: Laya.Button; onEnable(): void { this.initBtn.on(Laya.Event.CLICK, this.onInit); } onInit() { alert(extendLib.initializeSteam()); } } 构建发布Windows后,需要在exe的同级目录下,新建一个steam_appid.txt 文件,其中只包含 AppID。 (图2-2) 在Steam客...

来源: Laya3.0_文档 发布时间: 20251010

152. 透明区域点击问题 [ 64%]

...= true; sprite0.name = 'sprite0'; Laya.stage.addChild(sprite0); sprite0.on(Event.CLICK, this, handler_click); 怎么让sp透明区域不可点,有像素的地方才能接受到事件; hitArea,目前只支持圆形,矩形,多边形,而sp绘制的是一个不规则图形,请问这个怎么...

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

153. laya如何用audio播放音频? [ 64%]

...TMLAudioElement; constructor(){     super();     this.btn_play.on(Laya.Event.CLICK, this, this.onPlay);     this.elentAutio = <HTMLAudioElement>document.createElement('audio');     this.elentAutio.src="res/10.mp3"; } onPlay():void{     this.elentAutio.play(); }   由于要播放一...

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

154. 使用 addChild 加载界面后,绑定事件报错 [ 64%]

...uctor() {         super();          this.btnStart.on(Laya.Event.CLICK, this, this.startGame);     }      startGame(): void {         //Laya.Scene.open("GameView.scene");         if (!Main.gameView) {             Main.gameView = new GameView();  ...

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

155. 父元素,子元素,兄弟元素 [ 64%]

...问题,其实很简单,点击方法中,会带一个参数:e:Laya.Event,这个能数有阻止点击事件冒泡 点击事件: this.btnHome.on(Laya.Event.CLICKthisthis.homeClick);   private homeClick(e) { //防止点击事件穿透 e.stopPropagation(); } 2018-10-12 0 0 分享 微博...

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

156. [LayaAir3]GList点击出现连续点击问题 [ 64%]

...hildByName('name').offAllCaller(this); item.getChildByName('name').on(Laya.Event.CLICK, this, ()=>{ ... }     2025-10-21 0 2 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 1754891146用户 相关问题 laya针对页游耗用内存大的...

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

157. [LayaAir3]插件开发中,我需要选择文件夹,如何可视化选择文件夹 [ 64%]

... name: "", inspector: "Buttons", options: { buttons: [{ caption: "生成", event: "click_start_gen" }] } } ] } ]); Editor.extensionManager.createSettings("SplitAtlasSetting", "project"); } } 2025-07-23 0 0 分享 微博 QZONE 微信 LayaAir小牛 赞同来自: 方法为Editor.showOpenDialog 2025-07-...

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

158. 怎么做到第二次点击color的时候lable背景颜色变回原来的颜色 [ 64%]

...色 this.label.bgColor = "#ff0400"; start(): void { this.color_btn.on(Laya.Event.CLICK, this, this.onTipClick); } if(tipBtn == this.color_btn){ this.label.bgColor = "#ffffff";   2019-07-22 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的...

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

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

...nifests/vM7nH0Kl.m3u8');//加载m3u8源 hls.attachMedia(video); hls.on(Hls.Events.MANIFEST_PARSED,function():void{ video.play(); }); } plyr.setup(video); } } } ``` 编译运行代码,发现网页已经可以播放视频了。开发者可能注意到这里我们初始化引擎的时候是这样的...

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

160. 我给加载进来的UI界面中一个图片,添加点击更换图片的事件,需要点击两次才能更换图片 [ 63%]

...per(this); var arr2 = new Array(); arr2.push(this.dimg); this.dimg.on(Laya.Event.CLICK, this,apeclick2, arr2); } function apeclick2(that) { console.log("apeclick sucess"); that.skin = "../img/5.jpg"; console.log(that); that.zOrder = 1; } 2017-02-18 1 0 分享 微博 QZONE 微信 chensa222 赞同来...

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