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

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

541. 移动端横竖屏适配(类似锁屏效果)? [ 78%]

...链接 提交 1 个回复 cuixueying 赞同来自: package { import laya.events.Event; import laya.utils.Browser; public class ShiPei { private var fillWidth:Number=Browser.width; private var fillHeight:Number=Browser.height; public function ShiPei() { //设置初始化 Laya.init(fillWidth,fillHeigh...

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

542. 调用ui,new的时候出现Uncaught TypeError: Cannot read property 'call' of undefined [ 78%]

... new Test (Test.js:3)     at onAssetLoaded (LayaUISample.js:64)     at EventHandler.__proto.runWith (laya.core.js:681)     at ResInfo.__proto.event (laya.core.js:460)     at LoaderManager.__proto._endLoad (laya.core.js:11993)     at Loader.onLoaded (laya.core.js:11972)     at EventHandle...

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

543. Animator无法监听complete [ 78%]

...s.ANIM_CARD_IN_HAND_IDLE_NICK,0,34); //监听动画完成 this.ani.on(Laya.Event.COMPLETE, this, this.onAniComplete); 之后,当我动画播放完成后,设置的监听动画结束播放监听无效. 请问这个监听添加有错误么?监听不是应该添加到Animator对象上么? 2018-03-09 添...

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

544. 骨骼动画进阶(TypeScript-2D进阶篇(TS)-动画进阶) [ 78%]

...创建动画模板 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("res/spine/goblins/goblins.sk"); } onError() { console.log("parse error"); } parseComplete() { //创建第...

来源: Laya2.0_文档 发布时间: 20210715

545. 求助,切换到后台过一会再从后台切换回来报错 [ 78%]

...一会再从后台切换回来报错 TypeError: Failed to execute 'dispatchEvent' on 'EventTarget': parameter 1 is not of type 'Event'. at EventEmitter.<anonymous> (D:\laya\LayaAirIDE_beta\resources\electron.asar\renderer\window-setup.js:176:16) at emitTwo (events.js:106:13) at EventEmitter.em...

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

546. 用JS原生态window.location.href跳转 [ 78%]

...器上运行是正常的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

547. 3D中摄像机绕物体旋转该如何实现? [ 78%]

...tor3.distance(this.transform.position, this.AroundPos); Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.mouseDown); Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.mouseMove); Laya.stage.on(Laya.Event.MOUSE_UP, this, this.mouseUp); Laya.stage.on(Laya.Event.MOUSE_WHEEL, this, this.mouseWheel) } onUpd...

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

548. Laya 中用什么事件可以检测声音是否播放结束? [ 78%]

...var _channel:Channel = new Channel(); _channel=_sound.play( ); _channel.addEventListener(Event.SOUND_COMPLETE,onComplete); 而Laya 中用什么事件可以检测声音是否播放结束? 2017-03-30 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容...

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

549. 点击区域问题 [ 78%]

...000"); sp.hitArea = new laya.maths.Rectangle(-50,-100,100,100); sp.on(laya.events.Event.CLICK,this,this.spHandler); function spHandler() {     sp.graphics.clear();     var rc:number = Math.floor(Math.random()*0xffffff);     sp.graphics.drawRect(-50,-100,100,100,"#"+rc); } 这样多包几...

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

550. JS中关于按钮注册监听后在处理函数访问不到类成员变量的问题 [ 78%]

...在处理函数访问不到类成员变量的问题 this.btnLogin.on(Laya.Event.CLICK, null, this.OnLoginClick); LoginView.prototype.OnLoginClick= function() { this.dlg.setContent("暂时无法登录"); }; 解决方法式在第一行代码第二个参数一定要传this(被某老师坑惨) 如这样...

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