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

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

121. 循环监听按钮,如何进行传参和接受参数 [ 66%]

...' + i) as Laya.Image;               console.log(e); e.on(Laya.Event.CLICK, this, this.onBtnClick); }   按钮事件 private onBtnClick(event:Laya.Event): void {         let b = event.currentTarget as Laya.Image; console.log('onClickLevel > ' + b.skin); this.removeSelf(); Lay...

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

122. 龙骨skeleton鼠标点击区域的设置 [ 66%]

...gle=new Rectangle(-420,-680,420,680); mArmature.hitArea=rect; mArmature.on(Event.CLICK,this,onClick);    2016-11-22 0 0 分享 微博 QZONE 微信 asdf131 赞同来自: 于一个点为中心播放 :      this.mArmature = this.mFactory.buildArmature(0);         this.mArmatureSpr.addChild(t...

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

123. 分享:IDE使用SWF动画的销毁与反复创建 [ 66%]

...:IDE使用SWF动画的销毁与反复创建 package {     import laya.events.Event;     import laya.net.Loader;     import laya.utils.Handler;     import view.TestView;          public class LayaUISample {                  public function LayaUISample() {        ...

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

124. 分享:截屏! [ 66%]

...截屏! package {     import laya.display.Sprite;     import laya.events.Event;     import laya.resource.HTMLCanvas;     import laya.resource.Texture;     import laya.utils.Browser;     import laya.webgl.WebGL;          public class LayaAirDemo {         private var s...

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

125. 为什么hitTestPoint始终是false? [ 66%]

.../bg.png"); this.s.addChild(img); this.addChild(this.s); Laya.stage.on(Laya.Event.CLICK, this, this.hitPoint); } private hitPoint(e:Laya.Event): void { console.log(this.s.hitTestPoint(e.stageX, e.stageY)); } } 很简单的代码,不知道什么hitTestPoint始终得到的是false.我打印出s的宽...

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

126. 透明区域点击问题 [ 66%]

...= true; sprite0.name = 'sprite0'; Laya.stage.addChild(sprite0); sprite0.on(Event.CLICK, this, handler_click); 怎么让sp透明区域不可点,有像素的地方才能接受到事件; hitArea,目前只支持圆形,矩形,多边形,而sp绘制的是一个不规则图形,请问这个怎么...

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

127. Sprite-切换纹理 [ 65%]

....width / 2, Laya.stage.height / 2); this.switchTexture(); this.ape.on(Laya.Event.CLICK, this, this.switchTexture); } switchTexture() { let monkey = (this.flag = !this.flag) ? monkey1Res : monkey2Res; this.ape.graphics.clear(); this.ape.graphics.drawTexture(monkey, 0, 0); this.ape.size(monkey.width, ...

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

128. down点击事件一直派发情况 [ 65%]

...链接 提交 3 个回复 cuixueying 赞同来自:  self.sendBtn.on(Laya.Event.CLICK, self, self.onHandle); 这里用CLICK事件替代,或者同时监听一个MOUSE_UP事件,当鼠标抬起时,将MOUSE_DOWNshi事件移除 2017-03-07 0 1 分享 微博 QZONE 微信 yanmingjie 赞同来自: demo...

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

129. 播放视频只有声音没有图像 [ 65%]

...audio/梅林茂 - 静かな古都.mp3", 0); this.login_game_button.on(Laya.Event.CLICK, this,this.onStartButtonClick); } onStartButtonClick(){ // 创建Video元素 let videoElement = Laya.Browser.createElement("video"); Laya.Browser.document.body.appendChild(videoElement); videoElement.style.zInddex...

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

130. 2.0按钮添加事件报错 cannot read property 'on' fof undefined [ 65%]

...组件 layanative2 打包android平台 报错 btCollisionObject undefined event自定义事件的问题 IDE通过.ui自动生成的ui代码报错 怎么讲layaAir里的显示对象添加到matter.js里的物理引擎世界里 点击事件不起效 问题状态 最新活动: 2020-07-01 11:21 浏览: ...

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