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

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

131. import Event = laya.events.Event; 报错 [ 72%]

...: 997 关注: 2 人 136*****441 • 2018-05-22 21:30 message: 'Property 'CLICK' does not exist on type '{ new (type: string, eventInitDict?: EventInit): Event; prototype: Event; readonly AT_TARGET: num...'.' at: '20,39' source: 'ts' 不import , 直接用 Event.CLICK 也会报错

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

132. 分享:截屏! [ 72%]

...    Laya.stage.bgColor = "#ffcccc";             //设置舞台CLICK,该CLICK作为截屏的开关,点击舞台,对舞台对应的canvas区域进行截屏             Laya.stage.on(Event.CLICK,this,onClick);             //随意绘制显示对象           ...

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

133. ui list 里面的元素不能点击两次 [ 72%]

...t,index:Number):void { // TODO Auto Generated method stub if(e.type==Event.CLICK) { trace("click"); } } 2016-12-02 3 2 分享 微博 QZONE 微信 sunkehappy 赞同来自: @cuixueying 感谢提供方案,不过我还是想多说一句,selectHander最好是应该允许被调用多次吧?为什么...

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

134. radioGroup设置labels后,每个radio的icon皮肤无法显示了 [ 72%]

...og.popup();          dialog.btn_question_dialog_next.on(Laya.Event.CLICK, this, onNext); dialog.radioGroup_question.labels = "如果资源未加载,则先加载资源,\n加载完成后应用于此对象。,"+"如果资源未加载,则先加载资源,\n加载完成后应用于此对...

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

135. sprite 设置为静态变量后,无法从舞台移除 [ 71%]

....loadImage("background.jpg"); Laya.stage.addChild(sp); Laya.stage.on(Event.CLICK,this,onClick); function onClick():void { // TODO Auto Generated method stub Laya.stage.off(Event.CLICK,this,onClick); Laya.stage.removeChild(sp); Loader.clearRes("background.jpg"); sp.destroy(); } } } } 2016-09-05 0 0 ...

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

136. 精灵添加名称 [ 71%]

...= project.drawsomething(20, 20+60*i, "#eeb9b3");         sp.on(Event.CLICK,this, onsp);         Laya.stage.addChild(sp);   }   private function onsp(e:Event){              console.log("监听到按钮"+e.target);              console.log((e.target.getChildAt(0) as Sprite...

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

137. 在移动浏览器原生js无法获取引擎canvas的点击事件,pc是正常的,不能穿透? [ 71%]

...ument.getElementById('layaCanvas'); canvas.addEventListener('touchend', runclick); canvas.addEventListener('click', runclick); 已经自己解决了,移动对click事件支持不好,只能用touchend了 cuixueying • 2017-07-28 10:50 好的,有问题及时沟通!

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

138. 声音播放问题 native下采用Audio播放导致声音每次都是从头播放 [ 71%]

...    let _pause:boolean = false;         btn1.on(Laya.Event.CLICK,this,()=>{             if(!_pause)return;             sound.pause();             _pause = false         })         btn2.on(Laya.Event.CLICK,this,()=>{     ...

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

139. 切换位图,点击图片距离容器的区域也会触发点击事件 [ 71%]

...img.width = 300; //宽高 img.height = 200; switchImg(); img.on(Laya.Event.CLICK, this, switchImg) //点击事件 Laya.stage.addChild(img); function switchImg() { img.graphics.clear(); //清除绘制 var imgUrl = (this.flag = !this.flag) ? this.img1 : this.img2; img.loadImage(imgUrl, 100, 100) } }...

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

140. Sprite-切换纹理 [ 71%]

... / 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, monkey...

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