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

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

311. TimeLine调用destroy报错&执行完成后回到起点 [ 75%]

..., alpha:1},2000,null,0); timeLine.play(0,true); timeLine.on(Event.COMPLETE,this,this.onComplete); timeLine.on(Event.LABEL, this, this.onLabel); } private function onComplete():void { trace("timeLine complete!!!!"); timeLine.pause(); timeLine.destroy(); // Laya.timer.frameOnce(10, this, dispose); } ...

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

312. 代码创建精灵监听不到事件? [ 75%]

...data: StorageRoom.map_storageData[0][0],tag:0}; box.on(Laya.Event.MOUSE_UP,this,this.onclick,[arr]);   var _proto = StorageUILayer.prototype;   _proto.onclick = function(params){ console.log("--------------------------------hhhhhhhhhhh- "); }   ----------------------------------------------------...

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

313. 请问下键盘事件的监听只能用stage么?其他对象监听不起作用,谢谢 [ 75%]

...象监听不起作用,谢谢 Laya.stage.on(laya.events.Event.KEY_DOWN, this, this.onkeyDown);使用舞台监听有效,但是如果使用 var sp = new Sprite(); sp.width = 720; sp.height = 1280 Laya.stage.addChild(sp) sp.on(laya.events.Event.KEY_DOWN, this, this.onkeyDown); 就不能监听到键...

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

314. 全屏请求问题!!!求救啊!!求救啊!! [ 75%]

全屏请求问题!!!求救啊!!求救啊!! this.fullScreen_btn.on(Laya.Event.CLICK, this, this.onFullScreen, null); _proto.onFullScreen = function () { toggleFullscreen(); };       function launchIntoFullscreen(element) { var element = document.documentElement; if (element.reque...

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

315. 分享:为List组件下Item(Box)下的Button(或其他组件)进行监听! [ 75%]

...vents.Event; // 创建TestPageUI的子类 function TestUI() { TestUI.super(this); //list赋值,先获得一个数据源数组 var arr = ; for (var i = 0; i < 100; i++) { arr.push({label: "item " + i, clip: i % 9,btn:"btn"+i}); } //给list赋值更改list的显示 this.list.array = arr; //给lis...

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

316. TypeScript 泛形方法如何传TYPE? [ 75%]

...ComponentByType(Laya.Animator); if (element!=null) { return element; }else this.GetComponetInChild(node._childs[index],);   } } 如何写成泛型方法呢???编译不通过 GetComponetInChild<T>(node:laya.display.Node):T { // var s:=typeof(Laya.Animator); for (var index = 0; index < nod...

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

317. [LayaAir2]在使用videoDom创建视频元素后iPad跟iPhone中位置不一样 [ 75%]

...{ htmlvideo:Laya.HtmlVideo; constructor() { Laya.stage.on(Laya.Event.CLICK,this,this.onClick); } onClick(){ this.initVideo(); } initVideo() { this.htmlvideo = new Laya.HtmlVideo(); this.htmlvideo.setSource("https://www.layaair.com/3.x/de ... ot%3B,1); this.htmlvideo.video.addEventListener("loadedmet...

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

318. 针对2.0.0 beta5 setLoadingPage 做增强 [ 75%]

...异步方法 */ export default class LoadPage { constructor(url = null) { this._loadScene = null if (url) this.preload(url) } /** * 预加载loading页面 * @param {String} url loading页面url */ async preload(url = 'loadingpage.scene') { if (this._loadScene && url === this._loadScene.url) ...

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

319. Laya3D 官方请看:有关Laya.MeshSprite3D.instantiate的Bug [ 75%]

...ya.Sprite3D;  scene.addChild(temp);  temp.on(Laya.Event.HIERARCHY_LOADED,this,()=>  {  this.model = Laya.MeshSprite3D.instantiate(temp,scene) as Laya.MeshSprite3D;  if(index == 0)  {  this.model.transform.position = new Laya.Vector3(0.8,0,0);  }  });    //===================报错=====...

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

320. 代码怎么判断ui加载完成 [ 75%]

...断它有没有完成加载并显示到舞台上呢 mainMC.on(Event.LOADED,this,stopMC); mainMC.on(Event.COMPLETE,this,stopMC);这俩货监听都不好用   附件 : --> 2016-12-13 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提...

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