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

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

331. 文本基础样式(ActionScript-LayaAir基础篇(AS3)-文本) [ 72%]

... = new Text(); txt.text = "hello_world"; txt.color = "#ffffff"; Laya.stage.addChild(txt); } } } ``` 这个时候我们就可以看到txt已经添加到舞台上了,显示了txt中 白色的hello_world。 接着我们给我们的文本添加一些其他的字体样式,粗体、斜体、字体大...

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

332. 树状列表组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 72%]

...Laya.stage.height - tree.height) / 2; tree.bgColor = "#d25454"; this.owner.addChild(tree); } } class Item extends Laya.Box { constructor() { super(); this.right = 0; this.left = 0; var selectBox: Laya.Clip = new Laya.Clip("resources/tree/clip_selectBox.png", 1, 2); selectBox.name = "selectBox";//设...

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

333. 文本对齐与自动换行(TypeScript-LayaAir基础篇(TS)-文本) [ 72%]

...n = "center"; //设置文本垂直居中 txt.valign = "middle"; Laya.stage.addChild(txt); } } } new laya.HelloLayabox(); ``` ![5](img/5.png) 在实际编码中如果需要其他的对齐模式,请参考API中的align和valign的取值,找到适合项目的水平对齐模式和垂直对齐模式...

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

334. laya2.3图集含空白裁切后,锚点旋转bug,demo重现 [ 72%]

...       // sp3.pos(Laya.stage.width/2,0);         Laya.stage.addChild(sp3);         Laya.timer.frameLoop(2,null,function()             {                 sp3.rotation = sp3.rotation+10;             }         ); 2019-11-12 0 0 分...

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

335. mac下用FB打包发布测试页面,chrome浏览器看到预期显示文字 [ 72%]

...le is not defined. /LayaAirTest/src/LayaAirTest.as (22):warning:Laya.stage.addChild This variable is not defined.   代码如下: package {     import laya.display.Text;     public class LayaAirTest     {         public function LayaAirTest()         {             Laya....

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

336. drawToTexture截大图有问题,会丢失 [ 72%]

..."#ff0000");         this.nsp.mouseThrough=true;         Laya.stage.addChild(this.nsp);         this.nsp.on(Laya.Event.CLICK,this,this.drawImg,null)     }     drawImg(e:Event=null):void{         var copySpr:Laya.Sprite=new Laya.Sprite();         copySpr.texture=this.nsp.drawTo...

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

337. 图片使用pivotX参数后,再对图片添加遮罩会出现效果对。 [ 72%]

...         bg.loadImage("../../res/bg2.png");         Laya.stage.addChild(bg);         bg2 = new Sprite();         bg2.loadImage("../../res/bg2.png");         Laya.stage.addChild(bg2);         bg2.scale(3, 3);         bg2.pivot(50,50)         //创建mas...

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

338. 怎么给List下的每个item中的button添加事件? [ 72%]

...12 17:22 var btns = new Array; this.btnBox = new Laya.Sprite(); Laya.stage.addChild(this.btnBox); for(var i = 0; i < 5; i++){ var btn = new Laya.Sprite(); btn.loadImage("Key.jpg",i*100,800,100,60); btn.id= i; btns.push(btn); this.btnBox.addChild(btn); console.log(btn.id); } for(var i = ...

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

339. 循环添加一组按钮事件无法正常使用 [ 72%]

...          b.name = "egg"+i;                 Laya.stage.addChild(b);                 b.on(Event.MOUSE_DOWN, this, mouseHandler);                 b.on(Event.MOUSE_MOVE, this, mouseHandler);                 b.on(Event.MOUSE_UP, this, mouseHandler);...

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

340. 急急急,如何设置按钮点击加载ani [ 72%]

...      var btn:Button = new Button(skin);          Laya.stage.addChild(btn);             btn.pos(100,100);             //按钮被点击的回调             btn.clickHandler=new Handler(this, onClickButton)      }      private function onClic...

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