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

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

1. Button点击函数逻辑bug [ 100%]

...is.toggle === false && this._selected) return; if (e.type === Laya.Event.CLICK) { this.toggle && (this.selected = !this._selected); this._clickHandler && this._clickHandler.run(); return; } !this._selected && (this.state = Button.stateMap[e.type]); }上面逻辑当cli...

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

2. 两个问题都关于LayaAir的ios真机 [ 97%]

...有个变暗的效果 statenum是1的按钮, /** * 对象的 <code>Event.MOUSE_OVER、Event.MOUSE_OUT、Event.MOUSE_DOWN、Event.MOUSE_UP、Event.CLICK</code> 事件侦听处理函数。 * @param e Event 对象。 */ protected function onMouse(e:Event):void { if (toggle === false &...

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

3. 请问如何给所有按钮点击事件增加一个音效 [ 96%]

...on.as中处理下         /**          * 对象的 <code>Event.MOUSE_OVER、Event.MOUSE_OUT、Event.MOUSE_DOWN、Event.MOUSE_UP、Event.CLICK</code> 事件侦听处理函数。          * @param e Event 对象。          */         protected function onMous...

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

4. 如何能监听到TouchStart和TouchEnd事件 [ 95%]

...链接 提交 2 个回复 189*****192 赞同来自: Sean8023 Laya.stage.on(Event.MOUSE_UP, this, onApeRelease); Laya.stage.on(Event.MOUSE_DOWN, this, onApeRelease); 通过 Event  类型 监听动作  class Event {         /** 一个空的 Event 对象。用于事件派发中转使用。*/ ...

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

5. 鼠标 MOUSE_DOWN Event 回来的信息不符合 [ 94%]

鼠标 MOUSE_DOWN Event 回来的信息不符合 为什么回来的是 “mouseout” 而不是 "mousedown" ? 代码如下: function createSprite() { picture = new Sprite(); picture.loadImage(picturePath); Laya.stage.addChild(picture); var texture = Laya.loader.getRes(picturePath); picturePath.pi...

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

6. socket大型项目回调 [ 92%]

...odule PomeloLaya{ export class Pomelo{ static DEBUG:boolean = true; static EVENT_IO_ERROR:string = "io-error"; static EVENT_CLOSE:string = "close"; static EVENT_KICK:string = "onKick"; static EVENT_HEART_BEAT_TIMEOUT:string = 'heartbeat timeout'; private JS_WS_CLIENT_TYPE:string = 'js-websocket'; pr...

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

7. laya拖拽在部分机型(一部XR)StageX不对 [ 91%]

...部分机型(一部XR)StageX不对 //注册事件  Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.onMouseEvent);  Laya.stage.on(Laya.Event.MOUSE_UP, this, this.onMouseEvent); Laya.stage.on(Laya.Event.MOUSE_OUT, this, this.onMouseEvent); Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.onMouseE...

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

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

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

9. socket通讯返回数据 [ 89%]

...接 this.socket.connectByUrl("ws://localhost:8899"); this.socket.on(Laya.Event.OPEN, this, this.openHandler); this.socket.on(Laya.Event.MESSAGE, this, this.receiveHandler); this.socket.on(Laya.Event.CLOSE, this, this.closeHandler); this.socket.on(Laya.Event.ERROR, this, this.errorHandler); // this.s...

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

10. socket.sent [ 89%]

...接 this.socket.connectByUrl("ws://localhost:8899"); this.socket.on(Laya.Event.OPEN, this, this.openHandler); this.socket.on(Laya.Event.MESSAGE, this, this.receiveHandler); this.socket.on(Laya.Event.CLOSE, this, this.closeHandler); this.socket.on(Laya.Event.ERROR, this, this.errorHandler); } private...

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