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

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

41. 超出文本区域的处理&滚动文本(TypeScript-LayaAir基础篇(TS)-文本) [ 76%]

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

来源: Laya2.0_文档 发布时间: 20210715

42. Laya.stage.on的Mouse事件,正常情况下没问题,但是Laya.stage.pos移动后就失灵了,请问如何解决? [ 76%]

...ge.on(Laya.Event.MOUSE_DOWN, this, this.onMouse); Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.onMouse); 在frameLoop中,我让Laya.stage.pos(movex,movey)后,就再不会调用this.onMouse事件了,请问如何解决? 2018-03-11 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有...

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

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

...[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

44. 节点的visible在初始化的时候生效,但是在Event的方法里面不生效 为什么呢? [ 74%]

...ll, function(e){   option.startDrag({}, false, 1) }) option.on(Laya.Event.MOUSE_MOVE, null, function(){     questionNode.answers.visible = true; //这个不生效 }); 2017-09-22 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 scorpio ...

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

45. 安卓和iPhone的触控差异 [ 74%]

...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

46. 发布微信后无法触发mouse_up事件 [ 74%]

...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

47. 模拟鼠标事件 [ 74%]

...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

48. 鼠标滚轮滚动事件 [ 74%]

...MOUSE_UP // 右键抬起 Laya.Event.RIGHT_CLICK // 右键单击 Laya.Event.MOUSE_MOVE // 鼠标移动 Laya.Event.MOUSE_OVER // 鼠标经过目标 Laya.Event.MOUSE_OUT // 鼠标移出目标 Laya.Event.DOUBLE_CLICK // 鼠标左键双击 Laya.Event.MOUSE_WHEEL // 鼠标滚轮滚动   请教下,滚...

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

49. 图片像素精准点击问题! [ 73%]

...n(Laya.Event.MOUSE_DOWN, this, this.onMouseDown); Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.onMouseMove); Laya.stage.on(Laya.Event.MOUSE_UP, this, this.onMouseUp, [true]); } /** 按钮动画处理 */ private hitTest(t: Laya.Image) { let s = t.source.getPixels(t.mouseX, t.mouseY, 1, 1).join('')...

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

50. 关于多点触控e.touches问题 [ 70%]

...ent.MOUSE_DOWN, this, onCtrlMoveRockerTouchDown); Laya.stage.on(Laya.Event.MOUSE_MOVE, this, onCtrlMoveRockerTouchDown);     function onCtrlMoveRockerTouchDown(e) {    console.log("onCtrlMoveRockerTouchDown()");    this.ctrlMoveRockerPosX = undefined;    this.ctrlMoveRockerPosY = undefined; ...

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