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

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

21. 取消监听鼠标移动事件,取消不了 [ 84%]

取消监听鼠标移动事件,取消不了 Laya.stage.off(Laya.Event.MOUSE_MOVE,this,null); 第三个参数是函数,不能为null吗?是不是和on绑定时的同一个函数,如果on里面用匿名函数,off第三个参数怎么写? 2018-06-23 添加评论 免费帖 --> 分享 微博...

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

22. 鼠标交互-鼠标交互 [ 84%]

...useHandler); rect.on(Event.RIGHT_CLICK, this, mouseHandler); rect.on(Event.MOUSE_MOVE, this, mouseHandler); rect.on(Event.MOUSE_OVER, this, mouseHandler); rect.on(Event.MOUSE_OUT, this, mouseHandler); rect.on(Event.DOUBLE_CLICK, this, mouseHandler); rect.on(Event.MOUSE_WHEEL, this, mouseHandler); } ...

来源: Laya_示例 发布时间: 20251130

23. 点击拖动图片,当鼠标移出再移回舞台中时如何保持点击状态 [ 84%]

...MOUSE_UP,this,onUp); } private function onUp():void { Laya.stage.off(Event.MOUSE_MOVE,this,onMove); } private function onDown(e:Event):void { Laya.stage.on(Event.MOUSE_MOVE,this,onMove); } private function onMove():void { // 让sp跟随鼠标移动 sp.x=Laya.stage.mouseX; sp.y=Laya.stage.mouseY; //...

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

24. 鼠标交互-鼠标交互 [ 84%]

...ndler); rect.on(Event.RIGHT_CLICK, this, this.mouseHandler); rect.on(Event.MOUSE_MOVE, this, this.mouseHandler); rect.on(Event.MOUSE_OVER, this, this.mouseHandler); rect.on(Event.MOUSE_OUT, this, this.mouseHandler); rect.on(Event.DOUBLE_CLICK, this, this.mouseHandler); rect.on(Event.MOUSE_WHEEL, thi...

来源: Laya2.0_示例 发布时间: 20251130

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

...onsole.log("鼠标点击的点" + this.a, this.b) Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.move2) } move2() { this.path.push(Laya.stage.mouseX, Laya.stage.mouseY); // console.log("移动的点集合" + this.path); this.ps.graphics.drawCurves(this.a, this.b, this.path, "#fff") // console.log("...

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

26. 请问有没有方法能够获取“鼠标是否处于按下状态”? [ 81%]

...候  才监听 move事件的话! onMouseDown  中 Laya.stage.on(Event.MOUSE_MOVE, this, onMouseMove); onMouseUp  中   Laya.stage.off(Event.MOUSE_MOVE, this, onMouseMove); 也可以写个变量  ,down的时候为true,否则为false  如"cuixueying"  回答的一样! 2017-04-21 3 0 ...

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

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

...现,不过你可以通过逻辑控制自己封装接口来完成,通过MOUSE_MOVE事件,左右滑动的同时更改tab的selectedIndex值以及view显示即可实现。 2016-08-23 0 0 分享 微博 QZONE 微信 asdf131 赞同来自: { this.on(laya.events.Event.MOUSE_DOWN ,this, this.onMouseDow...

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

28. 文本-滚动文本 [ 80%]

...crollText(e) { prevX = txt.mouseX; prevY = txt.mouseY; Laya.stage.on(Event.MOUSE_MOVE, this, scrollText); Laya.stage.on(Event.MOUSE_UP, this, finishScrollText); } /* 停止滚动文本 */ function finishScrollText(e) { Laya.stage.off(Event.MOUSE_MOVE, this, scrollText); Laya.stage.off(Event.MOUSE_UP...

来源: Laya_示例 发布时间: 20251130

29. 文本-滚动文本 [ 79%]

...ent; prevX = this.txt.mouseX; prevY = this.txt.mouseY; Laya.stage.on(Event.MOUSE_MOVE, this, this.scrollText); Laya.stage.on(Event.MOUSE_UP, this, this.finishScrollText); } /* 停止滚动文本 */ finishScrollText(e) { const Event = Laya.Event; Laya.stage.off(Event.MOUSE_MOVE, this, this.scrollText...

来源: Laya2.0_示例 发布时间: 20251130

30. MOUSE事件和移动端的Touch事件如何对应 [ 78%]

...有刻度的Slider,使用了Button和ProgressBar来进行实现。监听MOUSE_MOVE和MOUSE_UP、MOUSE_DOWN事件,在网页上面表现一切正常。但是放到原生客户端,在进行滑动的时候,MOUSE_MOVE执行完毕后,直接就执行了MOUSE_UP,导致滑动效果失效。我希...

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