Moving an object on a line

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

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

tal
Posts: 84
Joined: Thu Jul 02, 2009 3:27 pm

Post by tal »

Hi malte,

I tested your application, it is exactly what i wanted, but i had a problem to test your script.
I have to put your script in the button i want to move and what else?

Thank you
malte
Posts: 1098
Joined: Thu Feb 23, 2006 8:34 pm
Contact:

Post by malte »

Have animationengine in use.

Put this into the card script (or another sensible place you use to initialize):

on openCard
start using "animationEngine"
set the loc of btn 1 to line 1 of the points of grc 1
set the constrainLinear of btn 1 to line 1 of the points of grc 1,line 2 of the points of grc 1
end openCard


Hth,

Malte
tal
Posts: 84
Joined: Thu Jul 02, 2009 3:27 pm

Post by tal »

I tested it, it works, thank very much it was very helpfull.

Best regards
tal
Posts: 84
Joined: Thu Jul 02, 2009 3:27 pm

Post by tal »

Hi everybody,

The solution with animation engine works but with a simple object (grc, fld, btn...), if i have a group of objects it doesn't work, have you a got a solution to this?

Thanks,
tal
Posts: 84
Joined: Thu Jul 02, 2009 3:27 pm

Post by tal »

Hi everybody,

The solution with animation engine works but with a simple object (grc, fld, btn...), if i have a group of objects it doesn't work, have you a got a solution to this?

Thanks,
hliljegren
Posts: 111
Joined: Sun Aug 23, 2009 7:48 am

Post by hliljegren »

If you create a group of your objects and then move the group I can't see why it shouldn't work.
Post Reply