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

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

171. l龙骨动画内存上升 [ 62%]

...    Laya.stage.bgColor = "#ffffff";             Laya.stage.on(Event.CLICK, this, play);         }                  function play():void {             Laya.timer.loop(5000, this, function():void {                 playDragonBonesAnimation("BigAward/Bi...

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

172. 分享:IDE使用SWF动画的销毁与反复创建 [ 62%]

...:IDE使用SWF动画的销毁与反复创建 package {     import laya.events.Event;     import laya.net.Loader;     import laya.utils.Handler;     import view.TestView;          public class LayaUISample {                  public function LayaUISample() {        ...

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

173. localToGlobal获取坐标总是错误! [ 62%]

...ByName("boxSpaw"); //this.spriteSpaw.loadImage("../..") buttonTest.on(Laya.Event.CLICK,this,()=>{ let point = new Laya.Point(this.sprteCenter.x,this.sprteCenter.y); let pointGlobal = this.sprteCenter.localToGlobal(point); Laya.stage.addChild(this.boxSpaw); this.boxSpaw.x = pointGlobal.x; this.box...

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

174. 高级应用-渲染纹理 [ 62%]

....stage.height - 100 * Laya.Browser.pixelRatio); changeActionButton.on(Laya.Event.CLICK, this, function () { layaPlane.getChildAt(0).meshRender.material.diffuseTexture = renderTargetCamera.renderTarget; }); })); } function setMaterials(spirit3D) { if (spirit3D instanceof Laya.MeshSprite3D) { var mesh...

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

175. 有没有SoundChannel的示例? [ 62%]

...undChannel = new SoundChannel(); SoundManager.addChannel(channel); _btn.on(Event.CLICK, this, soundClick); function soundClick(evt:Event){ alert("channel.isStoped:"+channel.isStoped); if (channel.isStoped){ channel.play(); }else{ channel.stop(); } } channel.isStoped输出是:undefined 2017-01-16 ...

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

176. 怎么打开第二个工程 [ 62%]

..._Aaron 赞同来自: package { import laya.device.media.Video; import laya.events.Event; import laya.utils.Browser; public class Main { public function Main() { Laya.init(500,500); Laya.stage.once(Event.CLICK,this,this.clickHandler); } private function clickHandler():void { var iframe:Object = Brows...

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

177. 我给加载进来的UI界面中一个图片,添加点击更换图片的事件,需要点击两次才能更换图片 [ 61%]

...per(this); var arr2 = new Array(); arr2.push(this.dimg); this.dimg.on(Laya.Event.CLICK, this,apeclick2, arr2); } function apeclick2(that) { console.log("apeclick sucess"); that.skin = "../img/5.jpg"; console.log(that); that.zOrder = 1; } 2017-02-18 1 0 分享 微博 QZONE 微信 chensa222 赞同来...

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

178. playByFrame动画监听问题,真不会了。就一个小问题。监听不到动画结束。。。 [ 61%]

...HitAllInfo.length;这个已经获取到了。射线获取的 //是不是我Event.COMPLETE写错了?应该怎么用求教啊。。。。。 Laya.stage.on(Laya.Event.CLICK, this, function () {                 for (var i = 0; i < _outHitAllInfo.length; i++) {                     ...

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

179. 父元素,子元素,兄弟元素 [ 61%]

...问题,其实很简单,点击方法中,会带一个参数:e:Laya.Event,这个能数有阻止点击事件冒泡 点击事件: this.btnHome.on(Laya.Event.CLICK, this, this.homeClick);   private homeClick(e) { //防止点击事件穿透 e.stopPropagation(); } 2018-10-12 0 0 分享 微博...

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

180. 使用对象池重复使用skeleton报错,请问有解决方案吗?谢谢 [ 61%]

...nction() { var Skeleton = Laya.Skeleton; var Templet  = Laya.Templet; var Event    = Laya.Event; var Browser  = Laya.Browser; var Stat     = Laya.Stat; var WebGL    = Laya.WebGL; var Pool     = Laya.Pool;   var mAniPath; var mStartX = 400; var mStartY = 500; var mFactory; var mActionInd...

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