Hello,
Is it possible to create something like this: http://www.absorblearning.com/media/att ... 4y&att=348
whereby the cursor is the main magnet and any graphics on the card animate as though they are being repelled when the cursor goes near to them.
Thanks!
Magnet-like repel
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Magnet-like repel
Yep - to get started, see the mouseMove message and the rectangle and location properties in the Dictionary.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: Magnet-like repel
Hi Callum,
I know who I'm going to get to make my next video, saw yours (from another post) and they are great!
Ok so I've just built a demo of that magnet thing and here is my take:
Well there is a start.
I'd be happy to help you with the rest of the mouseMove if you'd like.
Simon
I know who I'm going to get to make my next video, saw yours (from another post) and they are great!

Ok so I've just built a demo of that magnet thing and here is my take:
Code: Select all
put the right of btn 1 into tRight
put the left of btn 2 into tLeft
if tRight + 20 >= tLeft then --there is the key
set the left of btn 2 to tRight + 20 --thats the answer
end if
I'd be happy to help you with the rest of the mouseMove if you'd like.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Magnet-like repel
Hi, Thanks! much appreciated.
I'll start experimenting and see how I get on
I'll start experimenting and see how I get on
