I'm working on making a concentration/memory-type game, and at the end, I want to make it so that when the user clicks anywhere on the screen after winning, they will return to the menu, and be able to start a new game. I got the click to return to menu part working, but clicking on the menu doesn't do anything but activate the "down" frame of the button clicked.
Is there a method I should be using to return to the menu and restart it (in particular get the eventlistener for the click to be restarted, but also reset all the variables that get changed from their default value through the game) other than gotoAndStop or gotoAndPlay? Neither seems to work. I've even tried making the click at the end of the game direct the playhead to a frame that is totally blank except for a simple action to loop back to the beginning (gotoAndPlay), but that's not working either. Should I insert an extra frame at the beginning so I can get prepareFrame events?
I'm not really sure why it's not redeclaring the variables, listeners.
EDIT: Figured it out. Needed to remove the stage eventListener at the end of the game in the restart function.
Last edited by ahillecke; May 12th, 2011 at 11:30 AM.