var textBox = new Laya.Sprite();
for (var i = 0; i < 10000; i++) {
var txt:Laya.Text = new Laya.Text();
txt.text = (Math.random() * 100).toFixed(0);
txt.color = "#CCCCCC";
txt.x = Math.random() * 550;
txt.y = Math.random() * 400;
textBox.addChild(txt);
}
Laya.stage.addChild(textBox);
ts可以这么写