Moving groups

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
bsouthuk
Posts: 261
Joined: Fri Dec 05, 2008 7:25 pm

Moving groups

Post by bsouthuk » Wed Mar 17, 2010 12:54 pm

Does anyone know if there is a way a user can select a 'group' on a card and place the group anywhere they like on the card on a RunRev standalone application?

Is it a simple script?

Thanks

Daniel

Klaus
Posts: 14208
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Moving groups

Post by Klaus » Wed Mar 17, 2010 1:21 pm

Hi Daniel,

just like any object! Put this into the script of the group:

Code: Select all

on mousedown
  grab me
end mousedown
That's it :)

Best

Klaus

bsouthuk
Posts: 261
Joined: Fri Dec 05, 2008 7:25 pm

Re: Moving groups

Post by bsouthuk » Wed Mar 17, 2010 1:36 pm

Christ - well thats pretty easy!

What would the script be if I wanted a button that when selected it placed the group back to it's original position?

Thanks Klaus

Dan

Klaus
Posts: 14208
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Moving groups

Post by Klaus » Wed Mar 17, 2010 1:57 pm

Hi Dan,

Code: Select all

on mouseup
  set the loc of grp "Your group here" to X,Y
  ## Where X and Y are the original coordinates of the group
end mouseup
Again, much too easy :D

Best

Klaus

Post Reply