Moving groups

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

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

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

Moving groups

Post by bsouthuk »

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: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Moving groups

Post by Klaus »

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 »

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: 14325
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Moving groups

Post by Klaus »

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