Moving an object on a line

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

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

Post by tal » Mon Nov 09, 2009 12:57 pm

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 » Mon Nov 09, 2009 1:31 pm

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 » Mon Nov 09, 2009 1:55 pm

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 » Mon Nov 16, 2009 10:15 am

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 » Mon Nov 16, 2009 10:15 am

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
Contact:

Post by hliljegren » Thu Nov 19, 2009 10:53 am

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

Post Reply