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

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

21. sprite点击事件 位置便宜 [ 87%]

...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_社区 发布时间: 20180205

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

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

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

23. 关于新手引导 [ 84%]

...d { trace("KouTu.upHandler()"); // box.stopDrag(); gameContainer.off(Event.MOUSE_MOVE, this, moveHandler); } private function downHandler():void { trace("KouTu.downHandler()"); // box.startDrag(); gameContainer.on(Event.MOUSE_MOVE, this, moveHandler); } } } 我实现的是刮刮奖模式        ...

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

24. 在微信分享成功的回调函数里,Laya播放音效失败。 [ 84%]

...his.onLoop); //移除舞台的鼠标移动事件 Laya.stage.off(Laya.Event.MOUSE_MOVE); }  //恢复 GameEx.prototype.resume = function () { //在循环中创建敌人 Laya.timer.frameLoop(1,this,this.onLoop); console.log("恢复播放音乐") Laya.SoundManager.stopMusic(); Laya.SoundManager.playMus...

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

25. 循环添加一组按钮事件无法正常使用 [ 84%]

...nt.MOUSE_DOWN, this, mouseHandler);                 b.on(Event.MOUSE_MOVE, this, mouseHandler);                 b.on(Event.MOUSE_UP, this, mouseHandler);                 trace("addEvent");             }         }         private function mouse...

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

26. TypeError: relativePath is undefined [ 83%]

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

27. 请问在2.0版本的js中,如何获取mouse_move的鼠标坐标 [ 82%]

请问在2.0版本的js中,如何获取mouse_move的鼠标坐标 img.on(Laya.Event.MOUSE_MOVE,this,this.onmousemove); apesCtn.addChild(img); ........ onmousemove(e) { //console.log("e="+JSON.stringify(e)); for (var property in e) { console.log(property+"="+e[property]); } console.log("===========...

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

28. 文字在框内滑动、滚动文本 [ 82%]

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

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

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

30. layaAir真的没办法做涂鸦板? [ 81%]

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