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

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

41. 打包为APP后,Lable的宽高有所变化,请问如何修正? [ 83%]

...on LayaSample() { //初始化引擎 Laya.init(1280, 720,WebGL); Laya.stage.bgColor = "#FFF"; var demo:demoUI = new demoUI(); Laya.stage.addChild(demo); var demoLable1:Label = new Label(); demoLable1.text = "一二三四五六七八九十"; demoLable1.fontSize = 50; demoLable1.bgColor = "#00F"; demo....

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

42. 区块地图-带动画的地图 [ 83%]

...Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createMap(); } createMap() { const TiledMap = Laya.TiledMap; let tiledMap = new TiledMap(); tiledMap.createMap("res/tiledMap/orthogonal-test-movelayer.json", new Laya.Rectangle(0, 0, Laya.stage.width...

来源: Laya2.0_示例 发布时间: 20241118

43. 屏幕适配-自动横屏 [ 82%]

...e = "showall"; Laya.stage.screenMode = Stage.SCREEN_HORIZONTAL; Laya.stage.bgColor = "#232628"; showText(); })(); function showText() { var text = new Text(); text.text = "Orientation-Landscape"; text.color = "gray"; text.font = "Impact"; text.fontSize = 50; text.x = Laya.stage.width - text.width >>...

来源: Laya_示例 发布时间: 20241118

44. 屏幕适配-自动竖屏 [ 82%]

...ode = "showall"; Laya.stage.screenMode = Stage.SCREEN_VERTICAL; Laya.stage.bgColor = "#232628"; showText(); })(); function showText() { var text = new Text(); text.text = "Orientation-Portrait"; text.color = "gray"; text.font = "Impact"; text.fontSize = 50; text.x = Laya.stage.width - text.width >> ...

来源: Laya_示例 发布时间: 20241118

45. 动画-SWF动画 [ 82%]

....alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; createMovieClip(); })(); function createMovieClip() { var mc = new MovieClip(); mc.load(SWFPath); mc.x = (Laya.stage.width - MCWidth) / 2; mc.y = (Laya.stage.height - MCHeight) / 2; Laya.stage.addChild(mc...

来源: Laya_示例 发布时间: 20241118

46. 文本基础样式(TypeScript-LayaAir基础篇(TS)-文本) [ 82%]

....alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = "showall"; Laya.stage.bgColor = "#232628"; var txt: Text = new Text(); //给文本的text属性赋值 txt.text = "hello_world"; txt.color = "#ffffff"; Laya.stage.addChild(txt); } } } new laya.HelloLayabox(); ``` 这个时候我们就可以看到tx...

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

47. 动画-SWF动画 [ 82%]

...Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#232628"; this.createMovieClip(); } createMovieClip() { const MovieClip = Laya.MovieClip; const SWFPath = "res/swf/dragon.swf"; let MCWidth = 318, MCHeight = 406; let mc = new MovieClip(); Laya.stage.addChild(mc); ...

来源: Laya2.0_示例 发布时间: 20241118

48. 屏幕适配-自动竖屏 [ 82%]

...e.SCALE_SHOWALL; Laya.stage.screenMode = Stage.SCREEN_VERTICAL; Laya.stage.bgColor = "#232628"; this.showText(); } showText() { const Text = Laya.Text; let text = new Text(); text.text = "Orientation-Portrait"; text.color = "gray"; text.font = "Impact"; text.fontSize = 50; text.x = Laya.stage.width ...

来源: Laya2.0_示例 发布时间: 20241118

49. 屏幕适配-自动横屏 [ 82%]

...SCALE_SHOWALL; Laya.stage.screenMode = Stage.SCREEN_HORIZONTAL; Laya.stage.bgColor = "#232628"; this.showText(); } showText() { const Text = Laya.Text; let text = new Text(); text.text = "Orientation-Landscape"; text.color = "gray"; text.font = "Impact"; text.fontSize = 50; text.x = Laya.stage.width...

来源: Laya2.0_示例 发布时间: 20241118

50. textInput的单行输入&多行输入(ActionScript-LayaAir基础篇(AS3)-文本) [ 82%]

...aya.init(640, 800);//设置游戏画布宽高、渲染模式。 Laya.stage.bgColor = "#efefef";//设置画布的背景颜色。 Text_InputSingleline () Text_InputMultiline(); } private function Text_InputSingleline():void { var textInput:TextInput = new TextInput("单行输入");//创建一个 TextI...

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