大约有 105 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0037 秒)
按钮调用on方法,注册了Laya.Event.MOUSE_DOWN后,第一次点击不会被触发,第二次点击才会响应 this.btn_begin_fire.on(Laya.Event.MOUSE_DOWN,this,this.onBtnBeginFireClick); 按钮调用on方法,注册了Laya.Event.MOUSE_DOWN后,第一次点击不会被触发,第二次...
来源: Laya_社区 发布时间: 20180413
...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
求教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
如何阻止Event.MOUSE_DOWN的事件冒泡? btn.on(Event.MOUSE_DOWN, this, function(e) { console.log("被点击"); e.stopPropagation(); }); 我这样并不能阻止到Laya.stage绑定的事件 2017-03-24 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结...
来源: Laya_社区 发布时间: 20170324
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
鼠标 MOUSE_DOWN Event 回来的信息不符合 为什么回来的是 “mouseout” 而不是 "mousedown" ? 代码如下: function createSprite() { picture = new Sprite(); picture.loadImage(picturePath); Laya.stage.addChild(picture); var texture = Laya.loader.getRes(picturePath); picturePath.pi...
来源: Laya_社区 发布时间: 20181022
...cs.drawRect(300, 200, 50, 50, "#000"); Block.pos(300, 100); Block.on(Event.MOUSE_DOWN, this, function() { console.log(1); }); 点击无效,但我给用 Laya.stage.on(Event.MOUSE_DOWN); 是有效的 什么原因了?谢谢解答 2017-03-24 添加评论 免费帖 --> 分享 微博 QZONE...
来源: Laya_社区 发布时间: 20170324
...n和off的bug 是这样的,我写了类似这样的代码a.on(Laya.Event.MOUSE_DOWN, this, onStartDrag); 之后我想去掉拖动,就写了a.off(Laya.Event.MOUSE_DOWN, this, onStartDrag); 但发现不行,于是我改成a.offAll(); 就可以了。 需要说明的是onStartDrag是函数内定义...
来源: Laya_社区 发布时间: 20180828
...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
...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