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

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

41. 批量预加载如果是图片或者声音类型,不会触发加载错误事件 [ 85%]

...如果是图片或者声音类型,不会触发加载错误事件 用Laya.loader批量加载图片或者声音并指定加载类型时,如果加载错误,并不会触发错误事件。   Laya.loader.on(Laya.Event.ERROR, this, function(){ console.log("err"); }); Laya.loader.load([{url:"res/gene...

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

42. 是不BMFONT不支持多类型资源加载方式? [ 85%]

...式? var assets = []; assets.push( { url: "res/fontWord.fnt", type: Laya.Loader.FONT }); Laya.loader.load(assets, Laya.Handler.create(this, onAssetsLoaded)); function onAssetsLoaded(){ var bitmapFont = new Laya.BitmapFont(); bitmapFont.loadFont("res/fontWord.fnt"); //必出错 }     只要使用...

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

43. 自己创建的box作为tab,为啥没有点击事件啊? [ 85%]

自己创建的box作为tab,为啥没有点击事件啊? var Loader = laya.net.Loader; var UI; Laya.init(600, 400); Laya.loader.load("res/atlas/template/comp.json", Laya.Handler.create(this, onAssetLoaded2), null, Loader.ATLAS); function onAssetLoaded2() {     Laya.class(MyBoot, "MyBootClass...

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

44. MovieClip 报错 [ 85%]

...,临时你也可以通过修改代码来添加保护:var data:*; data=Loader.getRes(_url); if (!data) { event(Event.ERROR,"file not find"); return; } //保护修改-----start------------------ var atlasData:Object = Loader.getAtlas(_atlasPath); if(!atlasData) { event(Event.ERROR,"file not find")...

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

45. 我来改代码! [ 85%]

...,临时你也可以通过修改代码来添加保护:var data:*; data=Loader.getRes(_url); if (!data) { event(Event.ERROR,"file not find"); return; } //保护修改-----start------------------ var atlasData:Object = Loader.getAtlas(_atlasPath); if(!atlasData) { event(Event.ERROR,"file not find")...

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

46. MovieClip 报错 7 [ 84%]

...,临时你也可以通过修改代码来添加保护:var data:*; data=Loader.getRes(_url); if (!data) { event(Event.ERROR,"file not find"); return; } //保护修改-----start------------------ var atlasData:Object = Loader.getAtlas(_atlasPath); if(!atlasData) { event(Event.ERROR,"file not find")...

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

47. 分享-js资源进度加载 [ 84%]

...gress: Progress; Socket: Socket; arr = [ { url: "images/1.jpg", type: Laya.Loader.IMAGE } , { url: "images/2.jpg", type: Laya.Loader.IMAGE } , { url: "images/3.jpg", type: Laya.Loader.IMAGE } , { url: "images/4.png", type: Laya.Loader.IMAGE } , { url: "images/5.jpg", type: Laya.Loader.IMAGE } , { ur...

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

48. this.animation.loadAtlas 加载失败 [ 84%]

... 2 人 asdf131 • 2017-09-05 16:34 这样的话是不是所有用到 Laya.loader的话 ,如果error 都往这里来了 cuixueying • 2017-09-06 17:11 你也可以loadAtals后,对laya.loader.load进行error监听!

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

49. 分享:Graphics下cmds命令流的使用! [ 84%]

...ge { import laya.display.Sprite; import laya.maths.Matrix; import laya.net.Loader; import laya.resource.Texture; import laya.utils.Browser; import laya.utils.Handler; import laya.webgl.WebGL; public class GraCmdsDemo { public function GraCmdsDemo() { //初始化舞台 Laya.init(Browser.width,Browser...

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

50. IDE UI编辑器找不到 BitmapFont [ 84%]

...载的方法 Monica • 2017-10-18 16:14 @Zzz18815519:预加载就是Laya.loader.load() Zzz18815519 • 2017-10-18 16:17 用Laya.loader.load怎么获得Laya.BitmapFont对象进行命名和注册 Zzz18815519 • 2017-10-18 16:19 Laya.loader.getRes("xxx.fnt")这种方式吗? Monica • 201...

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