Page 1 of 1
multitouch drag groups
Posted: Sun Jan 01, 2012 9:12 am
by maxs
OK Im trying to drag 2 groups objects to collide using multitouch. But this code appears to select only individual objects.
Can I drag 2 grouped objects at a time?
on touchmove pObjectID, pX,pY
set the location of the target to pX,pY
end touchmove
Re: multitouch drag groups
Posted: Fri Jan 06, 2012 5:14 am
by maxs
Hi, Im using a mousestilldown handler to drag grouped object.. Sometimes the drag freezes up, yet I can still click and use the other buttons. Restarting the app will start allowing the dragging to continue.
DO I need to change to a touchmove command to fix this problem? If that is the case, am I able to drag an entire group? When I tested it, I could only drag single objects within the group.
Here is the code I am using:
on mousestilldown
set the loc of grp "Dragball1" of grp "3balls" to the mouseloc
end mousestillDown
Thank you, Max
Re: multitouch drag groups
Posted: Fri Jan 06, 2012 1:53 pm
by jmburnod
Hi Max,
I think you can use
Code: Select all
on touchmove pTouchID,x,y
put the owner of the target into tGroup
set the loc of group tGroup to x,y
end touchmove
check "owner" in LC Dictionary
Best regards
Jean-Marc
Re: multitouch drag groups
Posted: Sat Jan 07, 2012 6:18 am
by maxs
ThANKS Jean Mark,
This may be exactly what I need. I'll try it.
Max