Director Help?

Hi, Im stuck on trying to get a button appear after a game over event with director

top of main.lua [lua]module(…, package.seeall)

– Main function - MUST return a display.newGroup()
function new()
local localGroup = display.newGroup()[/lua]

game code here (not posted)

game over…

[lua]function gameOver()
local overSplash = display.newImage( “game_over.png”, true )
overSplash.alpha = 0
overSplash.xScale = 1.5; overSplash.yScale = 1.5
local showGameOver = transition.to( overSplash, { alpha=1.0, xScale=1.0, yScale=1.0, time=500 } )

local bt01 = display.newImage(“bt_button.png”)
local function bt01t ( event )
if event.phase == “ended” then
director:changeScene(“game”,“button”)
end
end
bt01:addEventListener(“touch”,bt01t)
bt01.x = 100
bt01.y = 300
localGroup:insert(bt01)

cueball:removeEventListener( “touch”, cueShot )
end

cueball:addEventListener( “touch”, cueShot )

return localGroup
end [/lua]

any help would be appreciated! [import]uid: 13743 topic_id: 5484 reply_id: 305484[/import]

so… after watching the tutorial again i have it working. The problem is now when GameOver the process (game) still runs and when I click new game (new scene to same game) it doubles up on top of the old game lol… is there a function to force a restart from scratch??

thanks in advance for your time [import]uid: 13743 topic_id: 5484 reply_id: 18487[/import]

Guys, please write your questions at Director’s sub-forum. I don’t have too much time to answer and I really didn’t see most of the topics created for Director. I’m sorry for that and I will appreciate if you all could go to this link:

http://developer.anscamobile.com/forums/director-class [import]uid: 8556 topic_id: 5484 reply_id: 18684[/import]