It is touching when there has been a “began” phase but not a subsequent “ended” phase.
[code]
local userTouchingScreen = false
local onTouch = function( event )
if event.phase == “began” then
userTouchingScreen = true
elseif event.phase == “ended” or event.phase == “cancelled” then
userTouchingScreen = false
end
end
local onUpdate = function( event )
print( "User touching screen: ", userTouchingScreen )
end
Runtime:addEventListener( “touch”, onTouch )
Runtime:addEventListener( “enterFrame”, onUpdate )
[/code] [import]uid: 5833 topic_id: 10931 reply_id: 39784[/import]