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

大约有 192 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0040 秒)

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

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

122. 骨骼动画进阶(JavaScript-2D进阶篇(JS)-动画进阶) [ 58%]

...00"; text.fontSize=30; Laya.stage.addChild(text); Laya.stage.on(Laya.Event.MOUSE_DOWN,this,changeAction); } var tActionID; function changeAction() { tActionID++; var aniCount; //获取动画动作数量 aniCount=skeleton.getAnimNum(); tActionID=tActionID%aniCount; //显示当前要播放的动画名...

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

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

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

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

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

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

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

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

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

127. laya 的list组件,如果有多页信息,怎么实现翻页丫?? [ 57%]

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

128. 如何对3D精灵进行鼠标检测(ActionScript-3D基础(AS3)-LayaAir3D之鼠标交互) [ 57%]

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

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

129. parent加载多个child,parent不响应鼠标事件? [ 57%]

...应鼠标事件? parent加载了child1,child2,child3, parent.on(Event.MOUSE_DOWN, this, function(){     trace("parent被点击了!"); });     其中child1,child2,child3都是load图片的Sprite,为何parent(它也是个Sprite)识别不到鼠标事件? 2017-03-12 添加评论 免费帖...

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

130. tiledMap类createMap()创建地图 如何理解这个viewRect视口区 [ 57%]

...   {         createMap();          Laya.stage.on(Event.MOUSE_DOWN, this, mouseDown);         Laya.stage.on(Event.MOUSE_UP, this, mouseUp);     })(); //创建地图     function createMap()     {         //创建地图对象         tiledMap = n...

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