大约有 32 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0035 秒)
...); var _channel:Channel = new Channel(); _channel=_sound.play( ); _channel.addEventListener(Event.SOUND_COMPLETE,onComplete); 而Laya 中用什么事件可以检测声音是否播放结束? 2017-03-30 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内...
来源: Laya_社区 发布时间: 20170330
...t type="text/javascript"> var btn = document.getElementById('btn'); btn.addEventListener('click', function(){ document.getElementById("file").click(); }); </script> </body> </html>我想你理解错了,我是想触发原生js的事件,不是去监听,我把两种的demo都...
来源: Laya_社区 发布时间: 20170511
...色 IFlash.showInfo(false); //是否显示帧率 if (stage) init(); else addEventListener(Event.ADDED_TO_STAGE, init); } private function init(e:Event = null):void { removeEventListener(Event.ADDED_TO_STAGE, init); this.stage.scaleMode = StageScaleMode.NO_SCALE; this.stage.align = StageAlign.TOP_LEF...
来源: Laya_社区 发布时间: 20151225
...State"; } //监听QQ内置浏览器切换至后台事件 window.document.addEventListener("qbrowserVisibilityChange", function(e):void{ trace("监听QQ缩小至后台事件:"+(!e.hidden ? "前置显示":"后台隐藏")); isStopLoop = e.hidden; if (e.hidden) { _isVisibility = false; if (_this._isIn...
来源: Laya_社区 发布时间: 20171011
...ass Main extends Sprite { public function Main() { if (stage) init(); else addEventListener(Event.ADDED_TO_STAGE, init); } private function init(event:Event = null):void { removeEventListener(Event.ADDED_TO_STAGE, init); IFlash.setSize(960, 640); //2D项目中设置场景尺寸 IFlash.setOrientation...
来源: Laya_社区 发布时间: 20151218
...ChildAt(sp, 0); Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT; sp.addEventListener(TouchEvent.TOUCH_BEGIN, onTouchBegin); } protected function onTouchBegin(event:TouchEvent):void { log(event.touchPointID.toString()); } cuixueying • 2016-01-23 11:17 你的demo在原生浏览器下是可以...
来源: Laya_社区 发布时间: 20160122
...tSource("https://www.layaair.com/3.x/de ... ot%3B,1); this.htmlvideo.video.addEventListener("loadedmetadata",()=>{ var videoTexture:Laya.VideoTexture = new Laya.VideoTexture(); videoTexture.video = this.htmlvideo.video; videoTexture.video.play(); videoTexture.video.loop = true; var texture2D = ne...
来源: Laya_社区 发布时间: 20240305
...xhr.responseType = 'blob'; // 监听下载过程中的 progress 事件 xhr.addEventListener('progress', function (event: any) { if (event.lengthComputable) { // 计算下载的百分比 var percent = (event.loaded / event.total) * 100; console.log('下载进度: ' + percent.toFixed(2) + '%'); } }); ...
来源: Laya3.0_文档 发布时间: 20251010
...ohai • 2017-10-11 16:32 那你执行后移除都用bind可以不可以,addEventListener,removeEventListener xiaohai • 2017-10-11 16:33 对握,不是有个once么执行一次后自动移除监听 xiaohai • 2017-10-11 16:35 不然就是off了,这个你自己看下api,也不清楚那哪...
来源: Laya_社区 发布时间: 20171011
...tSource("https://www.layaair.com/3.x/de ... ot%3B,1); this.htmlvideo.video.addEventListener("loadedmetadata",()=>{ var videoTexture:Laya.VideoTexture = new Laya.VideoTexture(); videoTexture.video = this.htmlvideo.video; videoTexture.video.play(); videoTexture.video.loop = true; var texture2D = ne...
来源: Laya_社区 发布时间: 20240305