Hi Rob
Thanks for the reply. Ok if I understand it correct you say that when you will get the move event only if it moves, but the ended phase is not initiated so how can I determine if the user has in the move phase stopped moving because with the isMove state meant is still true, because I only change to isMove false in the end phase. Maybe I am missing some thing. I added the code for reference.
local function enterFrameListener()
if isMoving then
– isMoving button
print (“is”Moving) – this returns even if I keep my finger still
elseif holding then
print(“holding”)
else
– Not holding
print (“ended”)
end
end
l
local function onSceneTouch( self, event )
touchedID = self
localX, localY = touchedID:localToContent( 0, 0 )
local t = event.target
if event.phase == “began” then
Runtime:addEventListener( “enterFrame”, enterFrameListener )
holding = true
isMoving = false
display.getCurrentStage():setFocus( t )
t.isFocus = true
elseif t.isFocus then
if (event.phase == “moved”) then
isMoving = true
— I need some thing here that show me the user is still holding the object and not moving the object and need to determine the position he has his finger at, at that stage.
elseif (event.phase == “ended”) then
holding = false
isMoving = false
Runtime:removeEventListener( “enterFrame”, enterFrameListener )
display.getCurrentStage():setFocus( nil )
t.isFocus = false
end
end
return true
end