Hey guys.
I got a jet when you touch the screen it will go up. When you ended it will go down again. And when you move it will also go down. But now i see when you hold your finger on the screen without moving your finger, it will keep going up. Any1 knows how to fix that?
Code:
function jetUp(self,event)
self:applyForce(0, -2, self.x, self.y)
end
function jetMove(event)
if event.phase == “began” then
jet.enterFrame = jetUp
Runtime:addEventListener(“enterFrame”, jet)
end
if event.phase == “moved” then
Runtime:removeEventListener(“enterFrame”, jet)
end
if event.phase == “ended” then
Runtime:removeEventListener(“enterFrame”, jet)
end
end