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

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

1601. 技术文档中的示例js运行报错 [ 61%]

...集,实现遮罩效果 里边的示例运行报错 Uncaught TypeError: this.setTo is not a function(function () { const Loader = Laya.Loader const Handler = Laya.Handler (function () { Laya.init(1136,640) Laya.stage.bgColor="#fff" Laya.loader.load('./../bin/res/atlas/res.atlas', Handler.create(th...

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

1602. 嵌入字体 · LayaAir3.3 · 引擎文档 · LAYABOX [ 61%]

...t = "自定义嵌入字体"; label.fontSize = 30; label.color = '#FFFFFF'; this.Main.box2D.addChild(label); label.pos(30, 50) }); Copyright ©Layabox 2025 all right reserved,powered by LayaAir Engine更新时间: 2025-10-10 16:28:01 img{cursor:pointer}

来源: Laya3.0_文档 发布时间: 20251010

1603. drawTexture时,Matrix对象,a=-1,无法实现水平翻转 [ 61%]

...赞同来自: qihei Laya.loader.load("res/atlas/test0.png", Handler.create(this, function():void    {     var t:Texture = Laya.loader.getRes("res/atlas/test0.png");     ape = new Sprite();     var matrix:Matrix = new Matrix();     matrix.a = -1;     matrix.tx = 2*100+ t.width;...

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

1604. 分享:LayaAir下如何加载和使用.JSON文件! [ 61%]

...Demo() { Laya.init(500,400); Laya.loader.load("unpack.json",Handler.create(this,onLoaded),null,Loader.JSON); } private function onLoaded():void { var json:JSON=Laya.loader.getRes("unpack.json"); var str:String=JSON.stringify(json); trace(str); } } } 2017-08-07 添加评论 免费帖 --> 分享 微...

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

1605. AS版本引入第三方js,编译报错 [ 61%]

...加/*[IF-FLASH]*/宏编译,但在编译过程中报错(warning:Pomelo This variable is not defined.),后来查看编译后的js文件,里面的代码是这样的var pomelo=new /*no*/this.Pomelo()。如果不用宏编译,编译后JS文件又有Pomelo的定义,外部截入的JS定义会...

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

1606. 能不能添加一个控件可以让文字和组件实现弹性滚动啊 [ 61%]

...ng"; panel.width=300; panel.height=300; panel.x = 200; panel.y = 200; This.addChild(panel); panel.addChild(text); panel.vScrollBar.min=1; panel.vScrollBar.max=500; panel.vScrollBar.value=panel.vScrollBar.max; Laya.timer.frameLoop(12,this,onLoop); function onLoop() { console.log(54) } })();、 ...

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

1607. 1.6.2打包的图集不能使用 [ 61%]

...oad([{url: "res/atlas/longCard.json", type: Loader.ATLAS}], Handler.create(this, onLoaded)); 在onLoaded var textrue = Laya.loader.getRes(longcard/xxx.png)总是undedined。。。求解。。。 相关链接 : http://ask.layabox.com/question/486 图集打包出来没有prefix。。。get了   2...

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

1608. 分享:TiledMap设置viewport后黑屏问题! [ 61%]

..., new Rectangle(0, 0, Laya.stage.width, Laya.stage.height), Handler.create(this,onLoaded)); } //切记:设置tiledMap的宽高,需要在地图创建完成之后 private function onLoaded():void { var sp:Sprite=tiledMap.mapSprite() as Sprite;//为tiledMap整个地图的显示容器设置宽高 sp...

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

1609. Android替换游戏启动logo看不到设置的图片 [ 61%]

...er.load([{url: "res/atlas/comp.json", type: Loader.ATLAS}], Handler.create(this, onLoaded)); } private function onLoaded():void { //实例UI界面 var testView:TestView = new TestView(); Laya.stage.addChild(testView); __JS__("if(window.conch)") { dd=__JS__("window.loadingView"); dd.loading(100); } }...

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

1610. 位图字体的制作与使用(ActionScript-LayaAir基础篇(AS3)-文本) [ 61%]

...证fnt与png文件同名 mBitmapFont.loadFont("layabmfont.fnt",new Handler(this,onLoaded)); } private function onLoaded():void { init(); } private function init():void { //如果位图字体中,没放空格,最好设置一个空格宽度 mBitmapFont.setSpaceWidth(10); Text.registerBitmapFont(mFo...

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