Reputation:
For a class project I have made a clean the ocean "hidden pictures" game with as3, and when you click on a hidden picture it highlights it and in the legend, moves the object in the legend to a "trash bin".
All this was done pretty easily, but now comes to making the game restart...
Since all the animation in this project has to done in AS3 and no frames, tweens or scenes are used, then how do I make a reset button. GotoandPlay won't work since there is only 1 frame.
Is there a command for removing all mouseclick events?
Thank you in advance,
Stephen
Upvotes: 0
Views: 1494
Reputation: 11240
I think in this case it is best to model your game in an class that is initialized into the starting state. Then all your resetbutton has to do is remove the current game-object and create a new one (or re-initialize the current one).
Maybe there is an AS3 command to restart your program, but I'm not sure about that.
Upvotes: 1