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

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

101. 没有预加载的图片怎么获取widthheight ? [ 70%]

...d(["../laya/assets/comp/image.png","../laya/assets/comp/vscroll.png"],Laya.Handler.create(this,onAssetLoad));      } function onAssetLoad() {      older = new Laya.Sprite();      older.loadImage("../laya/assets/comp/image.png");     Laya.stage.addChild(older);     console.log(older...

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

102. 关于ASTC使用问题建议 [ 70%]

..."; 或者是 let tex = new Laya.Texture(); tex.load("ui/guide01.png", Laya.Handler.create(this, ()=>{   this.img.texture = tex; }));   但是如果使用ASTC纹理时就会报错,需要使用异步的方式来处理         Laya.loader.load("ui/guide01.ktx", Laya.Handler.create(this, (res...

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

103. Laya.loader.loadnew Laya.Loader区别? [ 70%]

...次方图集区别在哪? var 与 name 的详细区别是什么? Laya.Handler.createnew Laya.Handler有啥区别 layaair与layabox的区别 atlas目录下.json文件与.atlas的区别 使用Laya.loader.load缓存下来的文件还在res目录下吗?在编辑模式下怎么调用缓存下来...

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

104. 多个button如何区分 [ 70%]

...r(var i:int=0;i<10;i++) { var btn:Button=new Button(); ....... btn.clickHandler = laya.utils.Handler.create(this,this.onClickButton,[i],false); } this.onClickButton = function(id){ 通过ID 判断点击哪一个按钮! } 189*****192 • 2017-04-26 09:38 @cyqcyqcyq:我明白你的意思 this.emo...

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

105. 使用外部引擎播放layaair制作的.ani [ 70%]

...lement.clientHeight * 2); Laya.loader.load('./card/atlas/card.atlas', Laya.Handler.create(this, onLoaded)); function onLoaded() { //创建一个Animation实例 var tl = new Laya.Animation(); //加载动画文件 tl.loadAnimation("./card/card.ani"); //添加到舞台 Laya.stage.addChild(tl); //播放...

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

106. 求解:能通过改变Sprite的宽高,让Sprite里的Child缩放吗?【附图】 [ 70%]

...: 3 人 cuixueying • 2017-04-07 16:38 第6个参数不是function,是handler,用new HandlerHandler.create的方式去写!

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

107. 图集动画(ActionScript-LayaAir基础篇(AS3)-动画基础) [ 70%]

...ngle; import laya.net.Loader; import laya.utils.Browser; import laya.utils.Handler; import laya.webgl.WebGL; public class HelloLayabox { private const AniConfPath:String = "../../../../res/role.atlas"; private var roleAni:Animation; public function HelloLayabox() { // 不支持WebGL时自动切换...

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

108. 不带格式后缀的图片无法成功加载 [ 69%]

.../ad.union.api/e285dd263aee2e8f7b302fa8d139de4c' Laya.loader.load(url, Laya.Handler.create(this, () => { let picTemp = Laya.Loader.getRes(url); console.log(picTemp.width) // undefined let nodee = new Laya.Sprite() nodee.texture = picTemp nodee.width = 500 nodee.height = 250 nodee.x = 100 nodee.y =...

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

109. UI编辑发布后运行lose skin [ 69%]

...行lose skin import WebGL = Laya.WebGL; import Begin = ui.testUI; import Handler = Laya.Handler; import Loader = Laya.Loader; // 程序入口 class GameMain{ private begin: Begin; constructor() { Laya.init(600,400, WebGL); Laya.stage.bgColor = "#000000"; Laya.loader.load("comp/button.png", Handler.c...

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

110. xhr的ononce什么区别,官网例子 [ 69%]

...meout = 10000;//设置超时时间; xhr.once(Event.COMPLETE,this,completeHandler); xhr.once(Event.ERROR,this,errorHandler); xhr.on(Event.PROGRESS,this,processHandler); 2017-10-17 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提...

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