I currently have a simple game, a “menu.lua” and “level1.lua”. When I go to level 1 for the first time, everything works fine, but when I exit to the menu and then return, it does not work properly. The problem is that the “addEventListener” don’t seem to work. I have all my listeners in the enterScene function as follows:
[lua]function scene:enterScene( event )
local group = self.view
rocket:addEventListener(“collision”, on_hit)
screen:addEventListener(“touch”, touchrocket)
slow_btn:addEventListener(“touch”, slow)
speed_btn:addEventListener(“touch”, speed)
stopwatch.position_timer = timer.performWithDelay(200, check_position, 0)
stopwatch.move_timer = timer.performWithDelay(1500, move_slides, 0)
stopwatch.runtimer = timer.performWithDelay(10, runtime, 0)
end[/lua]
When I switch to the menu screen I call [lua]storyboard.removeScene(“level1”) [/lua] but that still does not help