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

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

141. 文字在框内滑动、滚动文本 [ 49%]

...ffffff";     Laya.stage.addChild(this.txt);     this.txt.on(Laya.Event.MOUSE_DOWN, this, startScrollText); } function startScrollText(){     this.prevX = this.txt.mouseX;     this.prevY = this.txt.mouseY;     Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.scrollText);     Laya.stage.on(...

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

142. 【求助】怎么在自定义对象进行实例化的时候,给它绑定监听事件 [ 49%]

...hName; this.type = type; this.index = index; this.setPath(); this.on(Event.MOUSE_DOWN, Food, test); } private function test():void{ trace("test"); }求高手指点啊,有没有好的办法完成这个需求啊,最近在做毕设,在这卡了两天了。。。 2018-04-07 添加评论 免费帖 ...

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

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

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

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

144. putimagedata 不起作用 [ 49%]

...f不起作用 好像1.7.17类库创建阴影和发光滤镜不起作用哦 MOUSE_DOWN与MOUSE_MOVE同时存在,不起作用,哪位大神可以帮忙看看,是为什么 关于2.0 list的scrollRect 不起作用 问题状态 最新活动: 2017-11-30 18:21 浏览: 894 关注: 2 人 kezhiyu • 201...

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

145. 【求助】关于Cannot read property 'visible' of undefined问题 [ 49%]

...foodsList[this.index]; console.log(currentFood); this.currentFood.on(Event.MOUSE_DOWN, this, onMouseDown); this.currentFood.on(Event.MOUSE_UP, this, onMouseUp); }currentFood也是Food类,是用来指向在foodList中处于下标index的元素,我是想在用currentFood指向某个元素,给这...

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

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

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

147. 微信飞机大战 升级版,包含跟踪弹,散弹,道具,积分,难度 [ 48%]

...以用道具点击事件的阻止事件冒泡来解决 this.on(Laya.Event.MOUSE_DOWN, this, function (e) { e.stopPropagation();//阻止冒泡 console.log('@_@' + e.stageX, e.stageY); }); 另外,能分享一下,你的导弹是怎么做的吗?谢谢 2017-09-19 0 1 分享 微博 QZONE 微信 bing...

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

148. TypeError: relativePath is undefined [ 48%]

...caleMode = Stage.SCALE_FULL; Stat.show(); createMap(); Laya.stage.on(Event.MOUSE_DOWN, this, mouseDown); Laya.stage.on(Event.MOUSE_UP, this, mouseUp); })(); //创建地图http://layaair.ldc.layabox.com/api/ function createMap() { //创建地图对象 tiledMap = new TiledMap(); mX = mY = 0; //创建...

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

149. 求指点3d射线碰撞和UI点击穿透的问题 [ 47%]

... QZONE 微信 suteam 赞同来自: fevilbo 已解决,先监听舞台的MOUSE_DOWN事件,然后对其回调的evt.target进行检测即可知道是UI还是3d模型 2018-01-30 1 1 分享 微博 QZONE 微信 qian 赞同来自: layaFlash跟原生flash有些地方存在差异:      mouseEnableTi...

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

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

...ole.log(this.moveKey, this.layer, this.moveMax) this.moveKey.on(Laya.Event.MOUSE_DOWN, this, this.downFun); //记录一开始小圆点的位置,方便鼠标弹起的时候自动返回开始位置 this.moveKey.mode = {x: this.moveKey.x, y: this.moveKey.y} } //按下事件 ModeKey.prototype.downFun ...

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