Director changing scene back instant

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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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
views:1351 update:2011/11/8 8:33:25
corona forums © 2003-2011