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

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

71. 给以个对象绑定两个on方法为什么只能执行一次 ? [ 82%]

...obj = obj;         this.backEdHd = backEdHd||void(0);         this.clickEnd = function(){             Laya.timer.once(0,this,this.reset);         };         this.reset = function(){             Laya.Tween.to(this.obj,{scaleY:1,scaleX:1},10,Laya.Ease.backIn,Laya.Handler.cr...

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

72. 为什么MovieClip不能侦听点击事件 [ 82%]

为什么MovieClip不能侦听点击事件 对movieclip注册侦听event.click事件,点击movieclip不会执行侦听的click函数 2016-06-22 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个回复 cuixueying 赞同...

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

73. 音频-播放演示 [ 82%]

...p + soundButton.width; musicButton.y = soundButton.y; soundButton.on(Event.CLICK, this, this.onPlaySound); musicButton.on(Event.CLICK, this, this.onPlayMusic); } createButton(labelText) { let w = 110, h = 40; const Sprite = Laya.Sprite; let btn = new Sprite(); Laya.stage.addChild(btn); btn.size(w, h...

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

74. 音频-播放演示 [ 82%]

....y = soundButton.y; Laya.stage.addChild(musicButton); soundButton.on(Event.CLICK, this, onPlaySound); musicButton.on(Event.CLICK, this, onPlayMusic); } function createButton(label) { var w = 110; var h = 40; var button = new Sprite(); button.size(w, h); button.graphics.drawRect(0, 0, w, h, "#FF7F50"...

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

75. 多个button如何区分 [ 82%]

... for 循环 加入多个button 添加事件 this.emojiBut1.on(Laya.Event.CLICK,this,this.onEmojiBut1Click); 多个button 如何区分 点击的哪一个button  可以设置tag吗 或者通过监听事件透传?   附件 : --> 2017-04-25 添加评论 免费帖 --> 分享 微博 QZONE 微信 没...

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

76. cavans上触发不了input的点击事件 [ 81%]

...一个sprite,给sprite添加一个点击事件,this.hitimg.on(Laya.Event.CLICK,this,this.onStart); onStart: _proto.onStart = function(){ console.log(111111122222); $("#fileInput").trigger('click'); } 可以打印数字,但是触发不了input控件。 <input id="fileInput" type="file" acc...

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

77. Button 添加事件不执行? [ 81%]

...tn.labelStroke = 10; rightBtn.x = 100; rightBtn.y = 200; rightBtn.on(Event.CLICK, this, clickHandler); rightBtn.clickHandler = Handler.create(this, function () { console.log('click handler'); }); function clickHandler () { console.log('on click') } Stage.addChild(rightBtn);  请问一下,为什...

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

78. 注册函数里面 事件侦听函数的执行域 的详解 [ 81%]

注册函数里面 事件侦听函数的执行域 的详解 sp.on(Event.CLICK, this, fun) 有时候是this,有时候是null 到底怎么区分这个 2016-12-02 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复...

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

79. 鼠标滚轮滚动事件 [ 81%]

....MOUSE_DOWN // 左键按下 Laya.Event.MOUSE_UP // 左键抬起 Laya.Event.CLICK // 左键点击 Laya.Event.RIGHT_MOUSE_DOWN // 右键按下 Laya.Event.RIGHT_MOUSE_UP // 右键抬起 Laya.Event.RIGHT_CLICK // 右键单击 Laya.Event.MOUSE_MOVE // 鼠标移动 Laya.Event.MOUSE_OVER // 鼠标经过目...

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

80. Laya tiledmap 监听事件未响应 [ 81%]

...stage.focus = _mapSprite;         let event = _mapSprite.on(Laya.Event.CLICK, this, () => {             LogUtil.w("响应点击事件")         })     }   尝试使用focus 好像也没有响应 请问大佬们能解答一下吗 附件 : --> 2022-09-29 添加评论 免费帖 --> ...

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