Hi,
I spent last few hours trying to find a solution to the problem of detecting “ended” phase on touch event for the whole screen. This is the code I use at the moment:
screenTouching = false function screenTouch( event ) if event.phase == "began" then -- event started display.getCurrentStage():setFocus( event.target ) screenTouching = true elseif event.phase == "moved" then -- event/touch still in progress else -- DOES NOT TRIGGER -- event/touch ended display.getCurrentStage():setFocus( nil ) screenTouching = false end return true end Runtime:addEventListener("touch", screenTouch)
I need a global variable that is saying if screen is being touched at any moment.
This code above, nor the default examples, are not working with “Runtime” being the object.
Thank you!