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

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

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

...00"; this.txt.fontSize = 20; this.txt.color = "#ffffff"; this.txt.on(Event.MOUSE_DOWN, this, this.startScrollText); } /* 开始滚动文本 */ startScrollText(e) { const Event = Laya.Event; prevX = this.txt.mouseX; prevY = this.txt.mouseY; Laya.stage.on(Event.MOUSE_MOVE, this, this.scrollText); Laya...

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

12. 发布微信后无法触发mouse_up事件 [ 80%]

...始化资源加载完成 */ private initF():void{ Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.mouseHandler); Laya.stage.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:...

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

13. 鼠标交互-双指旋转(多点触控) [ 78%]

...ge.width / 2, Laya.stage.height / 2); Laya.stage.addChild(sp); sp.on(Event.MOUSE_DOWN, this, onMouseDown); } function onMouseDown(e) { var touches = e.touches; if (touches && touches.length == 2) { preRadian = Math.atan2( touches[0].stageY - touches[1].stageY, touches[0].stageX - touches[1].stageX);...

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

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

...享 微博 QZONE 微信 asdf131 赞同来自: { this.on(laya.events.Event.MOUSE_DOWN ,this, this.onMouseDown);         this.on(laya.events.Event.MOUSE_UP ,this, this.onMouseUp);              }     private onMouseDownX : number;     private onMouseDownY : number;     private i...

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

15. 区块地图-滚动地图 [ 78%]

...caleMode = Stage.SCALE_FULL; Stat.show(); createMap(); Laya.stage.on(Event.MOUSE_DOWN, this, mouseDown); Laya.stage.on(Event.MOUSE_UP, this, mouseUp); })(); //创建地图 function createMap() { //创建地图对象 tiledMap = new TiledMap(); mX = mY = 0; //创建地图,适当的时候调用destor...

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

16. 鼠标交互-双指旋转(多点触控) [ 78%]

...this.sp.pos(Laya.stage.width / 2, Laya.stage.height / 2); this.sp.on(Event.MOUSE_DOWN, this, this.onMouseDown); } onMouseDown(e) { const Event = Laya.Event; // 手机上才有 touches 属性 let touches = e.touches; if (touches && touches.length == 2) { preRadian = Math.atan2( touches[0].stageY - to...

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

17. 区块地图-滚动地图 [ 77%]

...ALL; Laya.stage.bgColor = "#232628"; this.createMap(); Laya.stage.on(Event.MOUSE_DOWN, this, this.mouseDown); Laya.stage.on(Event.MOUSE_UP, this, this.mouseUp); Stat.show(); } // 创建地图 createMap() { const TiledMap = Laya.TiledMap, Rectangle = Laya.Rectangle, Handler = Laya.Handler, Browser = ...

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

18. 鼠标交互-双指缩放(多点触控) [ 77%]

...ge.width / 2, Laya.stage.height / 2); Laya.stage.addChild(sp); sp.on(Event.MOUSE_DOWN, this, onMouseDown); } function onMouseDown(e) { var touches = e.touches; if (touches && touches.length == 2) { lastDistance = getDistance(touches); Laya.stage.on(Event.MOUSE_MOVE, this, onMouseMove); } } function ...

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

19. 鼠标交互-双指缩放(多点触控) [ 76%]

...this.sp.pos(Laya.stage.width / 2, Laya.stage.height / 2); this.sp.on(Event.MOUSE_DOWN, this, this.onMouseDown); } onMouseDown(e) { const Event = Laya.Event; // 手机上才有 touches 属性 let touches = e.touches; if (touches && touches.length == 2) { lastDistance = this.getDistance(touches); Laya...

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

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

...       Laya.stage.addChild(b);                 b.on(Event.MOUSE_DOWN, this, mouseHandler);                 b.on(Event.MOUSE_MOVE, this, mouseHandler);                 b.on(Event.MOUSE_UP, this, mouseHandler);                 trace("addEvent");  ...

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