Page 1 of 1

Moving & "Magnetizing" vector objects

Posted: Fri Aug 20, 2010 1:36 am
by gedkins
I used Hypercard years ago to mock up interfaces on a regular basis - I mourned its demise. I now have need to mock (ASAP) a new interface and RunRev is just the ticket - but I need some help.
What I would like to do is have some rectangular blocks (from a tear off palette ultimately) that can be dragged around on a card and when it is dropped near an existing rectangle it snaps along side it as if it was magnetic. If then I select the linked blocks they would travel together, unless say I had a shift key down then I could break the bond.

I am sure there a way to mimic this characteristic - can anyone offer some simple scripts to get me under way again. It may be riding a bike, but I am quite rusty and I could sure use the training wheels to get me on the right path.

TIA

Guy

Re: Moving & "Magnetizing" vector objects

Posted: Tue Aug 24, 2010 12:44 am
by bn
Hi Guy,
welcome to the forum.

What you are asking is not quite that simple as the scripts get quite involved with your specs.
I gave it a try since I liked to try this and append a stack that implements the features you had in mind (no palette, no tear off of graphics). Other might do it differently but here it goes.

See how far you get and ask the forum if you get stuck.

regards
Bernd

Re: Moving & "Magnetizing" vector objects

Posted: Wed Aug 25, 2010 7:05 pm
by gedkins
Bernd,

This is great and pretty much what I was looking for - I think I can tweak my way through on this now. Really liking Rev at this point. Thanks again for the big leg up on this problem.

Regards,

Guy

Re: Moving & "Magnetizing" vector objects

Posted: Sun Aug 29, 2010 1:13 pm
by hliljegren
I would do it as a substack for the palette and then as I drag them to the main window I would add the rectangles to a group. Then when you select the object you move the group and if you have shift down you break the object from the group and move it as a single unit.