problem with "try again" button

Hi, I’d like to insert a “try again” button in my app, and I did it using the following solution:

 local replay = display.newImage ("replay.png", 560, 0)  
  
local function replay (event)  
if event.phase == "ended" then  
director:changeScene ("game")  
end  
end  
  
redbutton:addEventListener ("touch", replay)  

the problem is that everytime the user tap the “try again” button, the app will bring him to the “game” scene, without delete the previous “game” scene.

How can I fix my problem?

Please if it’s possible post a simple way, because I’m a Corona SDK Newbie :slight_smile:

THANKS!!! [import]uid: 159775 topic_id: 27998 reply_id: 327998[/import]

There isn’t enough code here to tell what is wrong. I wonder if perhaps you have forgotten to put all your images into the localGroup?

Peach :slight_smile: [import]uid: 52491 topic_id: 27998 reply_id: 113321[/import]

Well @provacuoco

You provided nothing. Are you using director, are you using storyboard what are you doing?

Did you put things in a group, are you calling a scene?

Might as well ask how deep is the water or how long is a piece of string… [import]uid: 61600 topic_id: 27998 reply_id: 113701[/import]

Sounds like your not clearing your old scene up at all ? [import]uid: 84637 topic_id: 27998 reply_id: 113980[/import]