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

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

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

...候  才监听 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

32. TypeError: relativePath is undefined [ 76%]

... = Laya.stage.mouseX; mLastMouseY = Laya.stage.mouseY; Laya.stage.on(Event.MOUSE_MOVE, this, mouseMove); } function mouseMove() { //移动地图视口 tiledMap.moveViewPort(mX - (Laya.stage.mouseX - mLastMouseX), mY - (Laya.stage.mouseY - mLastMouseY)); } function mouseUp() { mX = mX - (Laya.stage.m...

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

33. 文字在框内滑动、滚动文本 [ 76%]

...mouseX;     this.prevY = this.txt.mouseY;     Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.scrollText);     Laya.stage.on(Laya.Event.MOUSE_UP, this, this.finishScroll); } function finishScroll(){     Laya.stage.off(Laya.Event.MOUSE_MOVE, this, this.scrollText);     Laya.stage.off(Laya.E...

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

34. 那个文本溢出需要滚动条怎么弄,API里面就说用Scroll接口,小白 不懂怎么弄 [ 76%]

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

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

35. layaAir真的没办法做涂鸦板? [ 75%]

...,this,function(e){ arr.push([e.stageX,e.stageY]); Laya.stage.on(Laya.Event.MOUSE_MOVE,this,bb) }) Laya.stage.on(Laya.Event.MOUSE_UP,this,function(){ Laya.stage.off(Laya.Event.MOUSE_MOVE,this,bb) }) function bb(e){ s.graphics.clear(); arr[arr.length-1].push(e.stageX); arr[arr.length-1].push(e.stageY)...

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

36. 重复背景,全方向地图拖动Demo [ 74%]

....stage.mouseX this.downMouseY = Laya.stage.mouseY Laya.stage.on(Laya.Event.MOUSE_MOVE,this,this.mouseMove) } mouseMove(){ let x = this.offsetX - (Laya.stage.mouseX - this.downMouseX) let y = this.offsetY - (Laya.stage.mouseY - this.downMouseY) this.moveMap(x>0?(x<this.maxX?x:this.maxX):0,y>...

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

37. webGL模式下 graphic画线涂鸦,一直不停画会出现线条异常 [ 74%]

...pos1.x=this.bmp.mouseX this.pos1.y=this.bmp.mouseY; this.bmp.on(Laya.Event.MOUSE_MOVE, this, this.__mouseMove); this.bmp.on(Laya.Event.MOUSE_UP, this, this.__mouseUp); console.log(this.pos0.x); } __mouseMove(e:Event){ this.pos1.x=this.bmp.mouseX this.pos1.y=this.bmp.mouseY; if(Utils3D.getThis.getDis...

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

38. 分享一个虚拟摇杆,比较粗糙,没做优化 [ 73%]

....layer.on(Laya.Event.MOUSE_UP, this, this.upFun); this.layer.on(Laya.Event.MOUSE_MOVE, this, this.moveFun); } //弹起事件 ModeKey.prototype.upFun = function () { this.isDown = false; this.isUp = false; this.isMove = false; this.isMode = "stop"; //移除弹起和移动事件 this.layer.off(Laya.Ev...

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

39. laya.events.Event_API3.0 [ 73%]

...LABEL LAYERCHANGE LINK LOADED MESSAGE MOUSE_DOWN MOUSE_DRAG MOUSE_DRAG_END MOUSE_MOVE MOUSE_OUT MOUSE_OVER MOUSE_UP MOUSE_WHEEL OPEN PAUSED PLAYED PROGRESS READY REMOVED RENDER RESIZE RIGHT_CLICK RIGHT_MOUSE_DOWN RIGHT_MOUSE_UP ROLL_OUT ROLL_OVER SELECT START STOPPED TRANSFORM_CHANGED TRIGGER_ENTER ...

来源: Laya3.0_api 发布时间: 20231115

40. 超出文本区域的处理&滚动文本(ActionScript-LayaAir基础篇(AS3)-文本) [ 72%]

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

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