I’m wondering how I go about checking if the users finger is down, so far as I can see there is a start end and move class but nothing for when the users finger is simply touching the screen.
Cheers for any insights! [import]uid: 8838 topic_id: 10931 reply_id: 310931[/import]
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]
Cheers for the quick response!
I was starting the think that that was all there was; not that it makes much difference in the end.
Thanks! [import]uid: 8838 topic_id: 10931 reply_id: 39787[/import]
Glad to help! [import]uid: 5833 topic_id: 10931 reply_id: 39788[/import]