-
Add movieclips from instances in array
Ive created a array to hold an instance of the Zombie movie clip, the movie is given an instance of "Zombie" + 1, 2, 3..... But now i can't work out how to add the movie clips from the Array to the stage.
Thanks allot
here's the code..
var ZombieArray:Array = [];
var Zombie_mc:MovieClip = new MovieClip();
//update current zombie number for array
CurrentZombie++;
//name instance
Zombie_mc.name = "Zombie" + CurrentZombie;
//add zombie to end of array
ZombieArray.push("Zombie"+CurrentZombie);
//add Zombie_mc to stage;
addChild(Zombie_mc);
//show array on text box
textbox1_txt.text = ZombieArray.join("\n");
I also need to be able to preform a hitTest and move the movie clips if anybody can help with that.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|