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

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

131. 如何给Tab里的button设置点击事件? [ 65%]

...quot;当前选择的标签页索引为:" + index);); this.Tab_ZM.on(Event.CLICK,this,onDaoju(index)); } 想请问下,这样添加,我上面点击事件只执行一次,就连打印出onSelect里的东西也只有一次? cuixueying • 2017-05-16 10:53 selectHandler本身就是点击事...

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

132. Button自定义属性 [ 65%]

...lt; len; ++i){ let btn:Laya.Button = this.main.getchildbuy(i); btn.on(Laya.Event.CLICK,this.this.clickHandle); btn.xx = "xxx"; } private clickHandle(e:Laya.Event):void{ } 类似于我想给btn绑定“xxx”数据,用来给后面点击获取

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

133. 父容器为何不响应鼠标事件 [ 64%]

...Laya.stage.addChild(father) father.x = 100; father.y = 100; father.on(Laya.Event.CLICK,this,this.onTestClick) 然而点击后onTestClick()根本不响应,如果改成son.on(...)倒是可以,该怎么解决呢? 2018-10-11 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关...

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

134. js飞机大战报错 请大神看看 [ 64%]

...按钮点击事件 点击后暂停游戏         this.pauseBtn.on(Laya.Event.CLICK, this, this.onPauseBtnClick);         // 初始化UI 显示         this.reset();     } ...     "Cannot read property 'on' of undefined" "TypeError: Cannot read property 'on' of undefined     at new ...

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

135. 为何对sp的监听事件没有反应呢? [ 64%]

...Laya.stage.height - xxx.height) / 2; Laya.stage.addChild(xxx); xxx.on(Laya.Event.CLICK, this, this.onXXX); private onXXX() {    console.debug("Hello"); } 2017-06-06 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复...

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

136. 用JS原生态window.location.href跳转 [ 64%]

...器上运行是正常的package { import laya.display.Sprite; import laya.events.Event; import laya.utils.Browser; public class LayaAirTest { public function LayaAirTest() { Laya.init(550,400); var sp:Sprite=new Sprite(); sp.graphics.drawRect(0,0,100,100,"#FFFF00"); Laya.stage.addChild(sp); sp.size(...

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

137. app 上使用 soundchannel.pause() 暂停音效音乐,用 resume() 播放都会从头开始播放 [ 64%]

...       let _pause:boolean = false;         btn1.on(Laya.Event.CLICK,this,()=>{             if(!_pause)return;             sound.pause();             _pause = false         })         btn2.on(Laya.Event.CLICK,this,()=>{  ...

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

138. dialog.removeSelf is not a function [ 64%]

...laneGameInfoDialogUI;。。。(关闭按钮)this.ui.ibtn_close.on(Laya.Event.CLICK,this,this.ui.close);。。。(点击之后)Uncaught TypeError: dialog.removeSelf is not a function....求助大神谢谢啦~~~ 2017-04-18 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相...

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

139. 切换位图,点击图片距离容器的区域也会触发点击事件 [ 63%]

...例 img.width = 300; //宽高 img.height = 200; switchImg(); img.on(Laya.Event.CLICK, this, switchImg) //点击事件 Laya.stage.addChild(img); function switchImg() { img.graphics.clear(); //清除绘制 var imgUrl = (this.flag = !this.flag) ? this.img1 : this.img2; img.loadImage(imgUrl, 100, 100) }...

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

140. 微信飞机大战报错 [ 63%]

...\node_modules\vscode-debugadapter\lib\protocol.js:24:60)     at emitOne (events.js:96:13)     at Socket.emit (events.js:188:7)     at readableAddChunk (_stream_readable.js:[...]   GameInfo.js代码: var GameInfo = (function(_super){     function GameInfo(){         GameInfo.super(this);...

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