How do I drag a group in IOS?
on mousestilldown
set the loc of grp "Dragball1" of grp "3Balls" to the mouseloc
The release note mentions a touchMove id, x, y, but does not show examples, or explain how to send messages with it.
Draggin a group
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Draggin a group
Try the "grab me" command in a mousedown handler n the group's script.
Gerry
Gerry
14" MacBook Pro
Former LiveCode developer.
Now recovering.
Former LiveCode developer.
Now recovering.
Re: Draggin a group
Hi Maxs
I have a script to drag an object. No tested for a group
I hope this help
Best regards
Jean-Marc
I have a script to drag an object. No tested for a group
Code: Select all
local sX,sY,canMove
-- For IOS
on touchstart
put true into canMove
put (the mouseH - item 1 of the loc of me) into sX
put (the mousev - item 2 of the loc of me) into sY
end touchstart
on touchMove pTouchId,pX,pY
if canMove then
set loc of me to pX-sX,pY-sY
end if
put pX,pY
end touchMove
on touchend
put false into canMove
end touchend
-- For desktop
--on mousedown
-- put true into canMove
-- put (the mouseH - item 1 of the loc of me) into sX
-- put (the mousev - item 2 of the loc of me) into sY
--end mousedown
--on mouseMove pX,pY
-- if canMove then
-- set loc of me to pX-sX,pY-sY
-- end if
-- put pX,pY
--end mouseMove
Best regards
Jean-Marc
https://alternatic.ch
Re: Draggin a group
Thanks Jean-Marc,
THis will help. Sometimes the mousestilldown option seems to work in ios. Other times the objects dont move.
Thanks, Max
THis will help. Sometimes the mousestilldown option seems to work in ios. Other times the objects dont move.
Thanks, Max