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

大约有 275 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0043 秒)

171. 【官网代码】加载dom音频报错,怎么回事? [ 63%]

...3-4-1 其中,加载dom音频报错,怎么回事? package{import laya.events.Event;import laya.net.HttpRequest;import laya.net.Loader;import laya.utils.Browser; public class Main{private var AudioContext:Object;private var audioContext:Object;private var analyser:Object;private var audioBuffer...

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

172. 针对2.0.0 beta5 setLoadingPage 做增强 [ 63%]

...ndler otherHandler().then(res => { // 默认进度加1% this._loadScene.event("progress", .01) if (res) param = .concat((param || ), [res]) Laya.Scene.open(url, closeOther, param, complete, progress) }) } /** * 清除loading page */ clearLoadingPage() { this._loadScene = null Laya.Scene.setLoadin...

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

173. 关于mouseThough=true的问题 [ 63%]

...onLoaded():void{ var img:Image = new Image("fish_6.png"); img.on(Event.CLICK,this,onClick); img.mouseThrough = true; Laya.stage.addChild(img); } 代码就这么简单,图片我传到附件里面 shiyang • 2018-03-14 15:55 private function onClick(e:Event):void{ trace("xxxxxxx&quot...

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

174. app 上使用 soundchannel.pause() 暂停音效音乐,用 resume() 播放都会从头开始播放 [ 62%]

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

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

175. 怎么给List下的每个item中的button添加事件? [ 62%]

...tn); console.log(btn.id); } for(var i = 0; i < 5; i++){ btns[i].on(Laya.Event.CLICK,this,judge,[i]); } function judge(aa){ console.log("___________"+aa); } 我就是这么做的,结果打印出来全是4,前面的按钮被最后的一个覆盖,这是为什么?

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

176. 用JS原生态window.location.href跳转 [ 62%]

...器上运行是正常的package { import laya.display.Sprite; import laya.events.Event; import laya.utils.Browser; public class LayaAirTest { public function LayaAirTest() { Laya.init(550,400); var sp:Sprite=new Sprite(); sp.graphics.drawRect(0,0,100,100,"#FFFF00"); Laya.stage.addChild(sp); sp.size(...

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

177. popup设置了关闭效果后,窗口关闭但遮罩层没有关掉,请问如何处理 [ 62%]

...Effect = Laya.Handler.create(this, this.hideEffect); this.btnClose.on(Laya.Event.CLICK, this, this.closeDialog); } //关闭 closeDialog(): void { this.close(); } //关闭效果 hideEffect(): void { Laya.Tween.to(this,{y:Laya.stage.height,alpha:0},200,Laya.Ease.linearIn); } //显示效果 showEffect(...

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

178. 动画-旧版骨骼动画 [ 62%]

...("../../res/threeDimen/skinModel/Zombie/old/Zombie.lh")); zombie.once(Laya.Event.HIERARCHY_LOADED, this, function () { zombie.transform.rotation = new Laya.Quaternion(-0.7071068, 0, 0, -0.7071068); zombie.transform.position = new Laya.Vector3(0.3, 0, 0); addSkinComponent(zombie); loadUI(); }); var s...

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

179. 分享:截屏! [ 62%]

...截屏! 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

180. sprite不能设置点击区域 [ 62%]

...aya.Sprite(); sp.graphics.drawPie(0, 0, 300, 0, 90, "#00ffff"); sp.on(Laya.Event.CLICK, this, this.aa) sp.mouseEnabled = true; // 设置点击区域没有作用 var hitArea = new Laya.HitArea(); hitArea.unhit.drawPie(0, 0, 150, 0, 90, "#00ffff"); sp.hitArea = hitArea; 我想要实现的效果就是...

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