大约有 1,254 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0063 秒)
Laya_社区(850) Laya2.0_文档(116) Laya3.0_api(79) Laya2.0_api(73) laya_api(68) Laya3.0_文档(54) Laya2.0_示例(8) Laya_示例(6)
... = new Text(); txt.text = "hello_world"; txt.color = "#ffffff"; Laya.stage.addChild(txt); } } } ``` 这个时候我们就可以看到txt已经添加到舞台上了,显示了txt中 白色的hello_world。 接着我们给我们的文本添加一些其他的字体样式,粗体、斜体、字体大...
来源: Laya2.0_文档 发布时间: 20210714
...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
...n = "center"; //设置文本垂直居中 txt.valign = "middle"; Laya.stage.addChild(txt); } } } new laya.HelloLayabox(); ```  在实际编码中如果需要其他的对齐模式,请参考API中的align和valign的取值,找到适合项目的水平对齐模式和垂直对齐模式...
来源: Laya2.0_文档 发布时间: 20210714
... // 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
...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
..."#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
... 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
...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
... 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
... 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