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

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

51. 移动端h5项目如何获取多点触摸的坐标 [ 68%]

...[1].stageY, touches[0].stageX - touches[1].stageX);   Laya.stage.on(Event.MOUSE_MOVE, this, this.onMouseMove); } } 2019-09-25 0 0 分享 微博 QZONE 微信 17 赞同来自: 同上,需要同时获取到多个触控点的坐标 2019-11-15 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回...

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

52. Touch接口缺少stageX,stageY [ 68%]

...].stageX - touches[1].stageX);                 Laya.stage.on(Event.MOUSE_MOVE, this, this.onMouseMove);             }         }   在微信调试时取出的touches是一个Touch数组,通过chrome看Touch类是包含stageX/stageY的,但lib.d.ts中声明的Touch接口中没有...

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

53. 鼠标事件out ,move 发生再up事件之后 [ 68%]

...定事件  initEvent() {         this.bubbleView.on(Laya.Event.MOUSE_MOVE, this, this.mouseMoveCallback);         this.bubbleView.on(Laya.Event.MOUSE_UP, this, this.mouseUpCallback);         this.bubbleView.on(Laya.Event.MOUSE_OUT, this, this.mouseOutCallback);    ...

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

54. 斗地主选牌的时候如何拖动选派 [ 68%]

...件即可     鼠标按下:Event.MOUSE_DOWN     鼠标移动:Event.MOUSE_MOVE     鼠标抬起:Event.MOUSE_UP     鼠标经过:Event.MOUSE_OVER   鼠标具体对应的逻辑,譬如鼠标按下的时候判断移入了哪张牌,鼠标抬起的时候,鼠标触发的是哪张牌...

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

55. 安卓和iPhone的触控差异 [ 68%]

...Array = e.touches; if (touches) { moveX = touches[0].stageX stage.on(Event.MOUSE_MOVE, this, onMouseMove) } } private function onMouseMove(e:Event= null):void { var touches:Array = e.touches; if (touches) { xx = moveX - touches[0].stageX; hero.x -=xx moveX = touches[0].stageX; } } 上面写法安卓...

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

56. 模拟鼠标事件 [ 68%]

...100 Y150 时,执行你那个事件回调函数即可 Laya.stage.on(Event.MOUSE_MOVE,this,onMouseMove); private function onMouseMove():void { if(Laya.stage.mouseX == 100 && Laya.stage.mouseY == 150) { //在这里调你想要执行的事件回调函数即可 } } Playerdata1 • 2017-06-08 10...

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

57. 按钮旋转 点击区域 [ 67%]

...dler); }, setMoveHandler: function (context, handler) { this.on(this.EVENT.MOUSE_MOVE, context, handler); }, setMouseUpHandler: function (context, handler) { this.on(this.EVENT.MOUSE_UP, context, handler); },该按钮实现这功能, 按钮旋转后 点击区域不一致 我们使用的 layaair js...

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

58. 关于大量绘制 draw的性能优化问题 [ 67%]

...Layer); drawLayer.width = 800; drawLayer.height = 1030; drawLayer.on(Event.MOUSE_MOVE, this, mousemove); function  mousemove(e) {     drawLayer.graphics.drawCircle(e.target.mouseX,e.target.mouseY,20,"#ffffff")     drawLayer.cacheAsBitmap; }   我的思路是每一次move都把对应的圆形...

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

59. 发布微信后无法触发mouse_up事件 [ 65%]

...on(Laya.Event.MOUSE_UP, this, this.mouseHandler); Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.mouseHandler); } private mouseHandler(e:laya.events.Event):void { var touches: Array<any> = e.touches; if (touches) { for(let i=0;i<touches.length;i++){ let t =touches[i]; let nameIndex =e.touc...

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

60. 请问如何获取触屏上两个或者更多位置的坐标 [ 64%]

...].stageX - touches[1].stageX);                 Laya.stage.on(Event.MOUSE_MOVE, this, this.onMouseMove);             }         }         private onMouseMove(e: Event): void {             var touches: Array<any> = e.touches;             if (touches &&...

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