Director changing scene back instant

Why does my code only work for 1 sec, and then changing the scene back again?

[code]
function function1 ( event )

if _G.objects == 0 then

Runtime:removeEventListener( “touch”, function1)

director:changeScene( “menu”, “moveFromLeft” )

elseif _G.objects > 0 then

– Alot of event.x and event.y detection code

else

– some other stuff

end
end [import]uid: 71002 topic_id: 17388 reply_id: 317388[/import]

If you haven’t already sorted this, it will because there is code in the menu.lua file which changes the scene again. [import]uid: 108660 topic_id: 17388 reply_id: 81465[/import]