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

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

81. 自己创建的box作为tab,为啥没有点击事件啊? [ 69%]

...ader = laya.net.Loader; var UI; Laya.init(600, 400); Laya.loader.load("res/atlas/template/comp.json", Laya.Handler.create(this, onAssetLoaded2), null, Loader.ATLAS); function onAssetLoaded2() {     Laya.class(MyBoot, "MyBootClass", MyPage2UI);     var UI = new MyBootClass();     Laya.stage.ad...

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

82. JS中利用New创建出来的对象和相应内存,如何主动去释放? [ 69%]

...mple){  (function(){    Laya.init(640,1027);    Laya.loader.load("res/atlas/comp.json",Laya.Handler.create(this,onLoaded),null,Laya.Loader.ATLAS)})(); function onLoaded(){  var karaok = new Karaok(); // new出来的内存 如何主动销毁? } })(window.LayaSample || (window.LayaSample={}));...

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

83. HTMLIframeElement加载html网页的问题 [ 69%]

.../"; } } // 程序入口 Laya.init(600, 400); Laya.loader.load([{ url: "res/atlas/comp.json", type: Loader.ATLAS }], Handler.create(this, this.onLoaded)); function onLoaded(): void { //实例UI界面 var testUI: TestUI = new TestUI(); Laya.stage.addChild(testUI); }运行会报错:见图:   求...

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

84. 百度小游戏 内存不断增大的情况 [ 68%]

...onConfigLoaded=function(){ Laya.init(600,400); Laya.loader.load([{url:"res/atlas/comp.json",type:"atlas"}],Handler.create(this,this.onLoadUi)); } __proto.onLoadUi=function(){ Laya.timer.loop(100,this,this.onLoaded); } __proto.onLoaded=function(){ if(this.isOpen){ return; } this.isOpen=true; var test...

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

85. 模仿教程里的打地鼠写的代码,运行报错 [ 68%]

...色 Laya.stage.bgColor = "#ffcccc"; //加载资源 Laya.loader.load("res/atlas/comp.atlas",Laya.Handler.create(this,onLoaded),null,Laya.Loader.ATLAS) })(); function onLoaded(){ //实例化 var tempBG=new background(); Laya.stage.addChild(tempBG); } })();在background.js里是这样写的 var backgro...

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

86. spine动画,微信模拟器正常,真机动画图片颠倒!!!引擎大bug!!! [ 68%]

..._sample.on(Laya.Event.CLICK, this, this.onImgClick); Laya.loader.load("res/atlas/comp/skeleton.atlas"); //创建动画模板 this.templet = new Laya.Templet(); this.templet.on(Laya.Event.COMPLETE, this, this.parseComplete); this.templet.on(Laya.Event.ERROR, this, this.onError); this.templet.loadAni(...

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

87. UI界面加载有哪些回调方法可用 [ 68%]

UI界面加载有哪些回调方法可用 Laya.loader.load([{ url: "res/atlas/comp.json", type: Loader.ATLAS }], Handler.create(this, this.onLoaded)); 类似于this.onLoaded函数,还有哪些生命周期相关的回调呢。 我想在UI完全加载完毕后,完成一些init操作,this.onLoad...

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

88. 关于layaair中类的大小写规则有没有基本的说明文档 [ 67%]

...小写规则有没有基本的说明文档 比如: Laya.loader.load("res/atlas/comp.json", Laya.Handler.create(null, onLoaded), null, Laya.Loader.ATLAS); Laya.loader.load(resArray, Laya.Handler.create(null,onLoaded)); loader与handler   2017-03-16 添加评论 免费帖 --> 分享 微博 QZONE ...

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

89. Dialog.show 的 showEffect参数在微信真机上的问题 [ 67%]

...信小游戏上显示一个Dialog 代码如下: Laya.loader.load(["res/atlas/comp.atlas"], Laya.Handler.create(this, function(){ console.log("load atals ok"); var dlg1:ui.TestDlgUI = new ui.TestDlgUI(); Laya.stage.addChild(dlg1); dlg1.show(); }));在微信小游戏的模拟器上是正常的,但...

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

90. socket.sent [ 67%]

... Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; var uiResArr =[ {url:"res/atlas/comp.atlas",type: Laya.Loader.ATLAS}, ]; Laya.loader.load (uiResArr , Laya.Handler.create(this,this.onLoded));      //加载图片 this.byte = new Laya.Byte(); //这里我们采用小端 this.byte.endian = Laya.Byte...

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