sorry for the inconvenience, before I opened a post that I’ve been able to solve by myself. Now the question I have is:
-I have some variables that get sent through a php page.
The problem is that when I give the submit button I have in my application, it sends it twice (Pressing des-click and press the button). What I do is the following:
Create a function that records the click at all stages (pressed and ended).
But I do not know how to do it and I tried to use the following code and could not.
Any suggestions?
local function onObjectTouch( self, event )
if event.phase == "began" then
print("touch began")
-- Touch has began
elseif event.phase == "moved" then
print("touch moved")
-- User has moved their finger, while touching
timer.performWithDelay( 1, enviar\_variables, 1 )
elseif event.phase == "ended" or event.phase == "cancelled" then
print("touch ended")
-- Touch has ended; user has lifted their finger
end
return true -- IMPORTANT
end
share = display.newImageRect("share.png", 200, 100)
share.x = 200; share.y = 325
share:addEventListener( "touch", onObjectTouch )
Thanks! [import]uid: 98258 topic_id: 32613 reply_id: 332613[/import]