var i:int; // 新的数据类型 int ,只要是整数,就请用 int 。效率快过 Number 。
for (i = 0; i < MAX_MCS; i++) {
tempMC = new KingdaMC ();
// 以下两行定义创建的 KingdaMC 形状大小随机
tempMC.scaleX = Math.random();
tempMC.scaleY = tempMC.scaleX;
// 以下两行定义创建的 KingdaMC 位置在舞台上随机。
tempMC.x = Math.round(Math.random() * (this.stage.stageWidth - tempMC.width));
tempMC.y = Math.round(Math.random() * (this.stage.stageHeight - tempMC.height));
addChild(tempMC);
}
黑羽教程中的一段代码~~~~~~~~要命名,貌似是要直接用
tempMC.name = "abc"+i+"_mc"