Currently I have this.
Code: Select all
on openCard
global startingPositionX,startingPositionY
end openCard
on mousedown
global startingPositionX,startingPositionY
put the mouseH into startingPositionX
put the mouseV into startingPositionY
end mouseDown
on mouseStillDown
global startingPositionX,startingPositionY
local distanceX, distanceY
put abs (the mouseH - startingPositionX) into distanceX
put abs (the mouseV - startingPositionY) into distanceY
if distanceX > 200 then
go to card "Main Menu"
end if
end mouseStillDown
Now, my question is how would other people go about doing this? Is there perhaps a swipe message I could read in instead? Having the above code in virtually every card and control would get a bit too heavy? As a btw, the target platform currently is android/iOS.