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

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

901. graphics的setAlpha在pc端正常使用,到layaNative就报错 [ 56%]

...setAlpha在pc端正常使用,到layaNative就报错 如题,报错是说this._saveToCmd is not a function 2018-09-11 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复   赞同来自: 提供一下你的demo 2018-...

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

902. Stage中删除不掉Scene [ 56%]

Stage中删除不掉Scene Laya.stage.on(Laya.Event.MOUSE_UP, this, function () {     var str = "";     if (!hit.sprite3D) {         str = "点击选取的几何体";     } else {         Laya.stage.removeChild(scene3D);     }     console.log(str); });     每次删除scene3D后...

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

903. 背景音乐在微信小游戏中播放问题 [ 56%]

...接 提交 1 个回复 bpmf_d 赞同来自: Laya.stage.on(Laya.Event.FOCUS,this,()=>{}); 可以加一个获得焦点的监听 得到焦点的时候就开始播 2019-05-10 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 天蝎の尾巴 ...

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

904. 微信小游戏声音,使用playsound播放音效问题 [ 56%]

...61 赞同来自: 不会啊!我测试了一下并没有你说的问题! this.stage.on(Event.MOUSE_UP, this, onB); private function onB():void          {             Laya.SoundManager.playSound("res/sound/onClick.wav");         } 你看看是不是你的代码逻辑有问题...

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

905. 类似于list下的按钮监听 !如何去做。 [ 56%]

...3:26 给 Sprite 中 按键设置name ,然后通过 Sprite.on(Event.CLICK,this,yfqian_GameUi); public function yfqian_GameUi(e:Event):void{ trace("Sprite:",e.target.name) }

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

906. 使用webgl之后toDataUrl返回黑色的图像 [ 56%]

...L); Stat.show(); Laya.stage.bgColor = "#ffcccc"; Laya.stage.on(Event.CLICK,this,onClick); sp= new Sprite(); sp.name='base'; sp.loadImage("logo.png"); Laya.stage.addChild(sp); } private function onClick():void { var htmlsss:String=(Laya.stage.getChildAt(0) as Sprite).drawToCanvas(100,100,0,0).getCanv...

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

907. 关于Pivot和Mask联合使用时的显示问题再次提交 [ 56%]

...32628";         Laya.loader.load("../../res/bg2.png", Handler.create(this, setup));     })();     function setup()     {         var bg = new Sprite();         bg.loadImage("../../res/bg2.png");         Laya.stage.addChild(bg);         bg2 = new Sprite();    ...

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

908. Texture内存回收(ActionScript-2D进阶篇(AS3)-性能优化) [ 56%]

... ani.play(); ani.pos(400, 200); sp.addChild(ani); Laya.stage.on("keydown", this, onKeyDown); Stat.show(); } private function onKeyDown(e:Event):void { if (e.keyCode === Keyboard.H) { sp.visible = false; //隐藏界面,清理资源 Laya.loader.clearTextureRes("res/bg.jpg"); Laya.loader.clearTexture...

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

909. Texture内存回收(ActionScript-2D进阶篇(AS3)-性能优化) [ 56%]

... ani.play(); ani.pos(400, 200); sp.addChild(ani); Laya.stage.on("keydown", this, onKeyDown); Stat.show(); } private function onKeyDown(e:Event):void { if (e.keyCode === Keyboard.H) { sp.visible = false; //隐藏界面,清理资源 Laya.loader.clearTextureRes("res/bg.jpg"); Laya.loader.clearTexture...

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

910. 改变位置后,点击区域不生效了 [ 56%]

...oSize=true; sp.graphics.drawRect(0,0,100,100,"#ff0000"); sp.on(Event.CLICK,this,onClick); Laya.stage.addChild(sp); } private function onClick(event:Event):void{ Render._mainCanvas.source.style.left = "100px"; Render._mainCanvas.source.style.top = "100px"; trace("onClick"); } } } 就这么一段简...

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