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

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

1. [LayaAir3]挂在scene3d节点上的脚本,onAwake(){ Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.onMouseDown); } 点击就报错 [ 100%]

...Air3]挂在scene3d节点上的脚本,onAwake(){ Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.onMouseDown); } 点击就报错  挂在scene3d节点上的脚本,onAwake(){ Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.onMouseDown);} 点击就报错 附件 : --> 2023-12-20 添加评论 免费...

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

2. 按钮调用on方法,注册了Laya.Event.MOUSE_DOWN后,第一次点击不会被触发,第二次点击才会响应 [ 97%]

按钮调用on方法,注册了Laya.Event.MOUSE_DOWN后,第一次点击不会被触发,第二次点击才会响应 this.btn_begin_fire.on(Laya.Event.MOUSE_DOWN,this,this.onBtnBeginFireClick); 按钮调用on方法,注册了Laya.Event.MOUSE_DOWN后,第一次点击不会被触发,第二次...

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

3. 求教Event.KEY_DOWN和Event.MOUSE_DOWN调用window.open相关问题 [ 96%]

求教Event.KEY_DOWN和Event.MOUSE_DOWN调用window.open相关问题 点击的调用函数: private function OnDown(e:Event):void { Browser.window.open("http://baidu.com"); } Laya.stage.on(Event.KEY_DOWN, this, OnDown);//正常 Laya.stage.on(Event.MOUSE_DOWN, this, OnDown);//被拦截 La...

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

4. Laya中textinput的监听事件的执行顺序是FOCUS=>MOUSE_DOWN=>CLICK,有没有比FOCUS还要先触发的监听 [ 93%]

Laya中textinput的监听事件的执行顺序是FOCUS=>MOUSE_DOWN=>CLICK,有没有比FOCUS还要先触发的监听 this.textinput_message.on(Laya.Event.CLICK,this,()=>{ console.log("CLICK>>>"); }) this.textinput_message.on(Laya.Event.MOUSE_DOWN,this,()=>{ console.log("MOUSE_DO...

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

5. Laya.stage.mouseX; Laya.stage.mouseY取到的坐标用来赋给画曲线方法的起点;在左顶点正常,越往右下角起点就越偏移了 [ 88%]

...bgColor = "#000000"; this.ps = new Laya.Sprite(); Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.down2) Laya.stage.on(Laya.Event.MOUSE_UP, this, this.up2) Laya.stage.addChild(this.ps); } down2() { this.a = Laya.stage.mouseX; this.b = Laya.stage.mouseY; console.log("鼠标点击的点" + this.a, thi...

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

6. 如何阻止Event.MOUSE_DOWN的事件冒泡? [ 87%]

如何阻止Event.MOUSE_DOWN的事件冒泡? btn.on(Event.MOUSE_DOWN, this, function(e) {     console.log("被点击");     e.stopPropagation(); });   我这样并不能阻止到Laya.stage绑定的事件 2017-03-24 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结...

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

7. tab 是否可以做到左右滑动切换view呢? [ 86%]

...享 微博 QZONE 微信 asdf131 赞同来自: { this.on(laya.events.Event.MOUSE_DOWN ,this, this.onMouseDown);         this.on(laya.events.Event.MOUSE_UP ,this, this.onMouseUp);              }     private onMouseDownX : number;     private onMouseDownY : number;     private i...

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

8. sprite点击事件 位置便宜 [ 86%]

...a = hitArea; Laya.stage.addChild(rect); //增加鼠标事件 rect.on(Event.MOUSE_DOWN, this, 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); r...

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

9. MOUSE_UP事件 [ 85%]

...E_UP事件 当我使用 for(var i=0;i<3;i++){ this["_role_"+i].on(Event.MOUSE_DOWN,this,this.clickDown) ; this["_role_"+i].on(Event.MOUSE_MOVE,this,this.clickMove); // this["_role_"+i].on(Event.MOUSE_UP,this,this,clickUp); }这样的方式添加监听时,MOUSE_UP不支持对象采用拼接的...

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

10. 图片像素精准点击问题! [ 85%]

...区域,这里不能用 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.stage.on(Laya.Event.MOUSE_MOVE,...

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