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

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

381. 声音播放问题 native下采用Audio播放导致声音每次都是从头播放 [ 71%]

...       let _pause:boolean = false;         btn1.on(Laya.Event.CLICK,this,()=>{             if(!_pause)return;             sound.pause();             _pause = false         })         btn2.on(Laya.Event.CLICK,this,()=>{  ...

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

382. Image加载完成后的图片大小重设问题 [ 71%]

...Laya.Handler.create(this,this.onComplete));         Laya.stage.on(Laya.Event.RESIZE,this,this.onResize);     }     onComplete():void     {         this.onResize();     }     onResize():void{         this.bg_img.width = Laya.stage.width;         this.bg_img.height = Laya.sta...

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

383. 循环监听按钮,如何进行传参和接受参数 [ 71%]

...' + i) as Laya.Image;               console.log(e); e.on(Laya.Event.CLICK, this, this.onBtnClick); }   按钮事件 private onBtnClick(event:Laya.Event): void {         let b = event.currentTarget as Laya.Image; console.log('onClickLevel > ' + b.skin); this.removeSelf(); Lay...

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

384. 关于video [ 71%]

...adImage("../laya/assets/bg_back.png"); Laya.stage.addChild(Bg); Bg.on(Laya.Event.MOUSE_DOWN, this, function(){ // 创建Video元素 var videoElement = Laya.Browser.createElement("video"); Laya.Browser.document.body.appendChild(videoElement); // 设置Video元素地样式和属性 videoElement.style....

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

385. 关于多点触控e.touches问题 [ 71%]

关于多点触控e.touches问题 Laya.stage.on(Laya.Event.MOUSE_DOWN, this, onCtrlMoveRockerTouchDown); Laya.stage.on(Laya.Event.MOUSE_MOVE, this, onCtrlMoveRockerTouchDown);     function onCtrlMoveRockerTouchDown(e) {    console.log("onCtrlMoveRockerTouchDown()");    this.ctrlMoveRockerPosX...

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

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

...e { import laya.display.Animation; import laya.display.Sprite; import laya.events.Event; import laya.events.Keyboard; import laya.utils.Stat; import laya.webgl.WebGL; public class ClearTextureResTest { private var sp:Sprite; public function ClearTextureResTest() { WebGL.enable(); Laya.init(1000, 800...

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

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

...e { import laya.display.Animation; import laya.display.Sprite; import laya.events.Event; import laya.events.Keyboard; import laya.utils.Stat; import laya.webgl.WebGL; public class ClearTextureResTest { private var sp:Sprite; public function ClearTextureResTest() { WebGL.enable(); Laya.init(1000, 800...

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

388. 休眠触发Event.BLUR的函数里有静音的话,恢复网页后报错 [ 71%]

休眠触发Event.BLUR的函数里有静音的话,恢复网页后报错 游戏中有这样一个监听Laya.stage.on(Event.BLUR, this, onBlur); onBlur函数里有这样一个语句SoundManager.stopAll(); 进行了主动静音,这样做的目的是休眠后游戏自动结束,结束后的界面...

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

389. 缓动-缓动函数演示 [ 71%]

... duration, Ease[list.selectedItem]); } createDurationCrontroller() { const Event = Laya.Event; let durationInput = this.createInputWidthLabel("Duration:", '2000', 400, 10); durationInput.on(Event.INPUT, this, function() { duration = parseInt(durationInput.text); }); } createInputWidthLabel(label, pr...

来源: Laya2.0_示例 发布时间: 20251130

390. LayaAir引擎与原生Flash的差异文档说明! [ 71%]

...ask.graphics.drawCircle(0,0,50); mask.graphics.endFill(); sp.mask=mask; addEventListener(Event.ENTER_FRAME,function():void { mask.x++; mask.cacheAsBitmap=true; sp.cacheAsBitmap=true; }); LayaAir环境下: 1、静态遮罩  Laya.init(600,400) var sp:Sprite=new Sprite(); sp.graphics.drawRect(0,0,20...

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