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

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

1. Laya.Loader.getRes请教 [ 100%]

...r.create(this, this.createView)); 在createView回调里面调用 let tex: Texture = Laya.Loader.getRes("image/shake_01.png"); 想拿图集中的某一张图片。发现拿不到这张图片。 但是我换个默认的图集Laya.loader.load("res/atlas/comp.atlas", Handler.create(this, this.createVie...

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

2. 代码创建精灵监听不到事件? [ 96%]

...件? var boxstr = "ui/buildsmall.png"; var box = new Laya.Sprite(); var texture = Laya.loader.getRes(boxstr); box.graphics.drawTexture(texture); var arr = {data: StorageRoom.map_storageData[0][0],tag:0}; box.on(Laya.Event.MOUSE_UP,this,this.onclick,[arr]);   var _proto = StorageUILayer.prototype;...

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

3. 分享:改变图片皮肤,保持图片原样宽高显示 [ 93%]

...on onClick():void { image.skin="bg.jpg"; } } }方法2:使用graphics.drawTexture的方式】 package { import laya.display.Sprite; import laya.events.Event; import laya.net.Loader; import laya.resource.Texture; import laya.utils.Handler; public class LayaAirDemo { private var sp:Sprite; public fun...

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

4. 关于Laya.loader.load和getRes的问题 [ 89%]

...下是原文的代码,也是我疑问的地方:// 方法2:使用drawTexture Laya.loader.load("../../../../res/apes/monkey2.png", Handler.create(this, function():void { var t:Texture = Laya.loader.getRes("../../../../res/apes/monkey2.png"); var ape:Sprite = new Sprite(); ape.graphics.drawTextur...

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

5. texture 的销毁问题,,,, [ 86%]

texture 的销毁问题,,,, 加载一张图片,然后获取texture var texture = Laya.loader.getRes(url); 然后texture调用texture.destroy(true); 销毁图片, 那下次要使用该图片的时候,还需要重新加载吗,,  是不是我下次使用的时候,我可以直接...

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

6. Laya.loader.load 教程代码出错 [ 85%]

...ay.Sprite;     import laya.utils.Handler;     import laya.resource.Texture;     public class LayaSample {         private var img:Sprite ;         private var index:int ;         public function LayaSample() {             //初始化引擎       ...

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

7. Laya中Button等组件lose skin的问题 [ 85%]

...     var clips=WeakObject.I.get(key);         if (!Utils.isOkTextureList(clips)){             clips=null;         }         if (clips)this._sources=clips;         else {             this._sources=;             if (this._stateNu...

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

8. 加载的nativeimage处理 [ 82%]

...LoadComplete)); } private function onSkinLoadComplete(e:*=null):void { var texture:Texture=Loader.getRes("ui/image.png"); var sp:Sprite=new Sprite(); sp.graphics.drawTexture(texture); Laya.stage.addChild(sp); } 2017-06-03 0 1 分享 微博 QZONE 微信 xiaojun 赞同来自: 是这个 2017-06-03 0 0 ...

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

9. 问一下这个问题要怎么改啊? [ 76%]

... appPic.as   package { import laya.display.Sprite; import laya.resource.Texture; import laya.ui.Image; import laya.utils.Handler; public class addPic { private var picUrl:String; private var pic:Sprite; private var picX:int; private var picY:int; public function addPic(str:String, x:int, y:int) { p...

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

10. Templet资源删除不掉 [ 76%]

...n onAssetLoaded(e:*=null):void         {             // var texture:Texture = Loader.getRes("res/Dragon.png");             // var data:ArrayBuffer = Loader.getRes("res/Dragon.sk");             factory = new Templet();             factory.on(Event.COMPLETE, t...

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