大约有 1,171 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0051 秒)
Laya_社区(876) Laya3.0_api(80) Laya2.0_文档(72) Laya_示例(52) Laya2.0_示例(48) Laya3.0_文档(39) laya_api(2) Laya2.0_api(2)
...ComponentByType(Laya.Animator); if (element!=null) { return element; }else this.GetComponetInChild(node._childs[index],); } } 如何写成泛型方法呢???编译不通过 GetComponetInChild<T>(node:laya.display.Node):T { // var s:=typeof(Laya.Animator); for (var index = 0; index < nod...
来源: Laya_社区 发布时间: 20180531
...{ htmlvideo:Laya.HtmlVideo; constructor() { Laya.stage.on(Laya.Event.CLICK,this,this.onClick); } onClick(){ this.initVideo(); } initVideo() { this.htmlvideo = new Laya.HtmlVideo(); this.htmlvideo.setSource("https://www.layaair.com/3.x/de ... ot%3B,1); this.htmlvideo.video.addEventListener("loadedmet...
来源: Laya_社区 发布时间: 20240305
...异步方法 */ export default class LoadPage { constructor(url = null) { this._loadScene = null if (url) this.preload(url) } /** * 预加载loading页面 * @param {String} url loading页面url */ async preload(url = 'loadingpage.scene') { if (this._loadScene && url === this._loadScene.url) ...
来源: Laya_社区 发布时间: 20181124
...ya.Sprite3D; scene.addChild(temp); temp.on(Laya.Event.HIERARCHY_LOADED,this,()=> { this.model = Laya.MeshSprite3D.instantiate(temp,scene) as Laya.MeshSprite3D; if(index == 0) { this.model.transform.position = new Laya.Vector3(0.8,0,0); } }); //===================报错=====...
来源: Laya_社区 发布时间: 20180827
...断它有没有完成加载并显示到舞台上呢 mainMC.on(Event.LOADED,this,stopMC); mainMC.on(Event.COMPLETE,this,stopMC);这俩货监听都不好用 附件 : --> 2016-12-13 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提...
来源: Laya_社区 发布时间: 20161213
laya.sprite 不接受click事件 代码如下: this._firstSprite= new Laya.Sprite(); this._firstSprite.pos(100,150); Laya.stage.addChild(this._firstSprite); this._firstSprite.loadImage('../laya/assets/image/0.jpg'); //this._firstSprite.scale(0.3,0.3); this._firstSprite.size(200,200); //this._firs...
来源: Laya_社区 发布时间: 20200801
...mage加载图片资源的时候,如何判断加载失败? 伪代码: this.avatar.graphics.loadImage(url, 0, 0, 0, 0, __complete);这个时候,如果我的url为空或者为一个不存在的图片地址,我如何判断它加载失败呢? 我尝试使用了这样的代码来获取失败...
来源: Laya_社区 发布时间: 20170928
...OWN, spe, onMouseDown); Laya.stage.on(Event.MOUSE_UP, this, onMouseUp); Laya.stage.on(Event.MOUSE_OUT, this, onMouseUp); } private function onMouseDown(e:Event):void { spe.startDrag(new Rectangle(0,0,800,800)); } 鼠标点击Sprite报...
来源: Laya_社区 发布时间: 20170407
...: 2347 关注: 2 人 lolololo • 2018-09-12 17:22 var btns = new Array; this.btnBox = new Laya.Sprite(); Laya.stage.addChild(this.btnBox); for(var i = 0; i < 5; i++){ var btn = new Laya.Sprite(); btn.loadImage("Key.jpg",i*100,800,100,60); btn.id= i; btns.push(btn); this.btnBox.addChild...
来源: Laya_社区 发布时间: 20180817
... Laya.init(800,600); Laya.loader.load(["bg.jpg","logo.png"],Handler.create(this,onLoaded)); } private function onLoaded():void { image=new Image(); image.skin="logo.png"; Laya.stage.addChild(image); Laya.stage.on(Event.CLICK,this,onClick); } private function onClick():void { image.skin="bg.jpg"; } }...
来源: Laya_社区 发布时间: 20170628