PDA

View Full Version : Reset Button


franky_tomatoes
08-03-2009, 11:28 PM
I made this simple AS3 game that generates a random amount of stars on the stage. The user has to count the number of stars, punch that number into the input box and hit submit.

The problem is that if the user wants to play again, he/she will have to go through the hassle of closing and re-opening game. That's why i'm now wondering how to make a reset button that re-generates the stars for the user to count again.

Here is the link to my fla:

http://www.megaupload.com/?d=0K4J3KPC

Thanks in advance.:)

BronL
08-07-2009, 01:53 AM
I'm only starting out with AS3 myself, but from what I understand (if you're not maintaining an array of stars yourself) can you not removeChildAt(index) from the display list in a for loop?