Problems with touch events

I am having a problem with handling touch events in my game. I have buttons that control left and right movement for the player:

rightArrow = display.newImage("Tiles/Arrow.png", display.contentWidth-50, display.contentHeight-70) rightArrow:setFillColor(1, 0.4) rightArrow:addEventListener("touch", function(event) --if button is pressed, move right if event.phase == "began" then --if there is a touch move right player.vx = 200 elseif event.phase == "ended" or event.phase == "canceled" then --if it is released stop player.vx = 0 end end) 

The problem that I am having is that when I slide my finger off of the button, the phase does not change to “ended” until I tap the button again. Does anyone know how to fix this?

Got acouple of forum posts with useful info for ya. Check out both, as this is a common problem with which many have grappled.

Got acouple of forum posts with useful info for ya. Check out both, as this is a common problem with which many have grappled.