I’m trying to add a Runtime listener to implement a swipe function to show an options menu. However Everytime I add the listener the simulator crashes with an “Assertion Error” error.
this is the code i’m adding:
Runtime:addEventListener( "touch", onScreenTouch ) local function onSceneTouch( self, event ) if event.phase == "ended" then if event.xStart \< event.x and (event.x - event.xStart) \>= 30 then transition.to ( optionsGroup, { time = 500, x=75 } ) transition.to ( optionsGroup, { time = 500, alpha = 1, delay = 200} ) transition.to ( optionsButt, {time = 500, x=(backEdgeX + 250)} ) return true end end end
Thanks for the reply. I have the function defined near the top of my code right before the CreatScene. I have put the Runtime:addEventListener near the bottom with all the scene listeners for storyboard.
Thanks for the reply. I have the function defined near the top of my code right before the CreatScene. I have put the Runtime:addEventListener near the bottom with all the scene listeners for storyboard.