I thought I solved this problem but it doesn’t look like it. While changing scenes using Director, everything is removed except the button pressed. How do I remove the initial button? Below is an example of a “contactBtn” following the function.
local function toContact(event) if event.phase == "ended" then display.remove(bg);bg = nil display.remove(title);title=nil if tutBtn then display.remove(tutBtn);tutBtn=nil end if forumsBtn then display.remove(forumsBtn);forumsBtn=nil end if updatesBtn then display.remove(updatesBtn);updatesBtn=nil end if contactBtn then display.remove(contactBtn);contactBtn=nil end director:changeScene("contact", "crossfade") return true end end local contactBtn = widget.newButton { width = 321, height = 87, defaultFile = "contactBtn.png", overFile = "contactBtn-over.png", id = "contactBtn", onEvent = toContact } contactBtn.x = updatesBtn.x contactBtn.y = updatesBtn.y + updatesBtn.height menuGroup:insert(contactBtn)