Heres the code:
// Variables private var fireZombie:FireZombie; // Declare variable and associate it with object private var fireZombieContainer:Sprite = new Sprite; // Create container private var fireZombieTimer:Timer = new Timer(4000); // timer for every 4 seconds private var iceZombie:IceZombie; // Declare variable and associate it with object private var iceZombieContainer:Sprite = new Sprite; // Create container private var iceZombieTimer:Timer = new Timer(5000); // timer for every two seconds
public function iceZombieSpawn(e:TimerEvent) {
for (var i:Number = 0; i <= 10; i++) {
iceZombie = new IceZombie(Math.random()*stage.stageWidth, -100); // Create new ice zombie at random x position
iceZombie.name = "iceZombie"+i; // assign name to zombie
iceZombieContainer.addChild(iceZombie); // Add zombie to container
trace(iceZombie.name);
}
}And here's the problem:
http://screenr.com/ist
Help

















