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

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

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

...is.txt.color = "#ffffff"; Laya.stage.addChild(this.txt); this.txt.on(Event.MOUSE_DOWN, this, this.startScrollText); } /* 开始滚动文本 */ private startScrollText(e: Event): void { this.prevX = this.txt.mouseX; this.prevY = this.txt.mouseY; Laya.stage.on(Event.MOUSE_MOVE, this, this.scrollText);...

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

62. 超出文本区域处理&滚动文本(JavaScript-LayaAir基础篇(JS)-文本) [ 59%]

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

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

63. laya.ui.UIEvent [ 59%]

...g = message[static] 定义 message 事件对象 type 属性值。Event MOUSE_DOWN : String = mousedown[static] 定义 mousedown 事件对象 type 属性值。Event MOUSE_MOVE : String = mousemove[static] 定义 mousemove 事件对象 type 属性值。Event MOUSE_OUT : String = mouseout[s...

来源: Laya2.0_api 发布时间: 20190513

64. touches一直为undefined [ 59%]

touches一直为undefined Laya.stage.on(Laya.Event.MOUSE_DOWN, this, onCtrlMoveRockerTouchDown); ......   function onCtrlMoveRockerTouchDown(e) {     console.log("onCtrlMoveRockerTouchDown()");     var touches = e.touches;     if(touches) {     ...取出前两个touch进行计算     } }...

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

65. 打包APK运行,drag拖动出现问题;color="#0"程序直接崩溃 [ 59%]

...       Laya.stage.addChild(imag);             imag.on(Event.MOUSE_DOWN,this,onDown);             imag.on(Event.MOUSE_UP,this,onUP);         }                  private function onDown():void{             imag.startDrag();         }        ...

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

66. laya.ui.UIEvent [ 59%]

...g = message[static] 定义 message 事件对象 type 属性值。Event MOUSE_DOWN : String = mousedown[static] 定义 mousedown 事件对象 type 属性值。Event MOUSE_MOVE : String = mousemove[static] 定义 mousemove 事件对象 type 属性值。Event MOUSE_OUT : String = mouseout[s...

来源: laya_api 发布时间: 20170929

67. List翻页效果怎么实现 [ 59%]

...lic onMouse(e: Laya.Event, index: number): void { if (e.type == Laya.Event.MOUSE_DOWN) { this.m_downValue = this.list_rule.scrollBar.value; } else if (e.type == Laya.Event.MOUSE_UP || e.type == Laya.Event.MOUSE_OUT) { if (this.m_downValue > -1) { if (this.list_rule.scrollBar.value < this.m_dow...

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

68. 限制区域拖动效果,为什么会无法限制呢? [ 59%]

...width / 2; this.golfBall.y = Laya.stage.height / 2; this.golfBall.on(Event.MOUSE_DOWN, this, onStartDrag)  function showDragRegion() { //拖动限制区域 var dragWidthLimit = 350; var dragHeightLimit = 200; dragRegion = new Rectangle(Laya.stage.width - dragWidthLimit >> 1, Laya.stage.height...

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

69. 如何对3D精灵进行鼠标检测(JavaScript-3D基础(JS)-LayaAir3D之鼠标交互) [ 59%]

...pescript { //在舞台上添加鼠标事件监听 Laya.stage.on(Laya.Event.MOUSE_DOWN,this, this.onMouseDown); } //点击触发事件 onMouseDown() { //记录点击到舞台上点 this.point.x = Laya.MouseManager.instance.mouseX; this.point.y = Laya.MouseManager.instance.mouseY; //产生射线 th...

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

70. 如何对3D精灵进行鼠标检测(TypeScript-3D基础(TS)-LayaAir3D之鼠标交互) [ 59%]

...pescript { //在舞台上添加鼠标事件监听 Laya.stage.on(Laya.Event.MOUSE_DOWN,this, this.onMouseDown); } //点击触发事件 onMouseDown() { //记录点击到舞台上点 this.point.x = Laya.MouseManager.instance.mouseX; this.point.y = Laya.MouseManager.instance.mouseY; //产生射线 th...

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