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

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

61. 图片像素精准点击问题! [ 87%]

...测像素点颜色值来判断点击区域,这里不能用 on(Laya.Event.CLICK,只能通过 on(Laya.Event.MOUSE_DOWN 来检测。   下面是我的代码处理: class demo { private down:Laya.Image; constructor() { // 鼠标事件 Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.onMouseDown); ...

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

62. 分享:为List组件下Item(Box)下的Button(或其他组件)进行监听! [ 87%]

...ndler = new Handler(this, onListRender); } //通过渲染函数为Btn添加Click function onListRender(item, index) { var btn=item.getChildByName('btn'); btn.on(Event.CLICK,this,onClickBtn,[index]); } Laya.class(TestUI, "TestUI", TestPageUI); //按钮Click回调 function onClickBtn(index) { alert("...

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

63. Dialog关闭时如何向open他的页面传值? [ 86%]

...定义事件来进行监听并传参。 给你的dialog下的按钮监听CLICK事件,通过e.target.name来判断当前点击的是哪个按钮,抛出具体的事件并监听。 myClose.on(Event.CLICK,this,onClicks); myYes.on(Event.CLICK,this,onClicks); myNo.on(Event.CLICK,this,onClicks) } priva...

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

64. 如何用代码调用按钮的点击事件(如as3的dispatchEvent)? [ 86%]

...as3的dispatchEvent)?即比如界面上有个按钮,点击会执行click事件操作,而我再给这个按钮和键盘绑定一个快捷键,当按下这个快捷键的时候,直接触发按钮的click事件。在as3中,是可以用dispatchEvent方法来触发事件的。 2017-08-15 添...

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

65. 全屏处理方法 [ 85%]

...屏,函数成功调用就是没有全屏(html 标签的button 的  click事件是可以 全屏的,问为什么TS调不可以全屏? 附件 : --> 2017-03-30 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个回复 ...

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

66. sprite点击事件 位置便宜 [ 84%]

... mouseHandler); rect.on(Event.MOUSE_UP, this, mouseHandler); rect.on(Event.CLICK, this, mouseHandler); rect.on(Event.RIGHT_MOUSE_DOWN, this, mouseHandler); rect.on(Event.RIGHT_MOUSE_UP, this, mouseHandler); rect.on(Event.RIGHT_CLICK, this, mouseHandler); rect.on(Event.MOUSE_MOVE, this, mouseHandler)...

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

67. dialog的popup方法不会关闭其他弹窗 [ 84%]

...og: NormalDialog; constructor() { super();  this.btn_signin.on(Laya.Event.CLICK, null, () => { this.showDialog("登录成功") }); this.btn_register.on(Laya.Event.CLICK, null, () => { this.showDialog("注册功能暂未开放") });  }  showDialog(context: string) { // if (this.normalDialog)...

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

68. 一个按钮注册两次点击事件,两个事件都会执行 [ 84%]

...自: pc测试啊,一个按钮注册两次必现啊   this.sureBtn.on("click",this,this.onSurebtn); this.sureBtn.on("click",this,this.enterGame);   都会执行啊 2017-04-11 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 zuojianfei ...

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

69. 请问:Ts下如何实现打开照相机和系统图库的方法?IOS和Android [ 83%]

...  Laya.stage.addChild(button);         button.on(laya.events.Event.CLICK,this,function () {             let photo = laya.utils.Browser.getElementById("photo");            photo.click();         });     } } new GameMain(); 为什么 click事件没有响应? ...

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

70. laya.events.Event_API3.0 [ 83%]

... Index Constructors constructor Properties button currentTarget delta isDblClick nativeEvent target touchId touchPos type ADDED BLUR CHANGE CHANGED CLICK CLOSE COLLISION_ENTER COLLISION_EXIT COLLISION_STAY COMPLETE DEVICE_LOST DISPLAY DOUBLE_CLICK DRAG_END DRAG_MOVE DRAG_START EMPTY END ENTER ERROR ...

来源: Laya3.0_api 发布时间: 20231115