[Resolved] Refreshing Screen

Hello everybody,

I’m creating an arcade type game where the player is a ball that is in a contained area. The ball is controlled by tilting the device and is constantly bouncing around. Each time the ball hits a bounce pad (there are 26 total) the player receives 25 points. I’ve also created a game over screen which appears when the ball hits an obstacle. The game over screen displays the players stats and has 2 buttons; one allows them to replay and the other allows them to return to the main menu.

The problem is that when I replay it the bounce pads instead of giving 25 points give 50 points. Actually each time I replay it the bounce pads give 25 more points (first time 25, then 50, then 75, etc). I think that instead of refreshing the page it actually loads it with all the objects from previously and stacks a whole new set of objects on top of it, and this is the reason why the amount of points given increases by 25 each time. Also each time I replay it, the game becomes more laggy which is probably because there are too many objects on the screen at one time.

I’m using the director class, and want to know how exactly can I avoid this from happening.

Edit: I’ve figured out the problem, no need to respond [import]uid: 144843 topic_id: 27274 reply_id: 327274[/import]