Keeping relationships during a drag event.
Chipp Walters
chipp at chipp.com
Tue Dec 28 14:22:13 EST 2004
Hi Glen,
I'd use the mouseMove handler and update the line and fld while dragging
the image around.
Put this in the msg:
go URL "http://www.altuit.com/webs/altuit2/RunRev/ForGlen.rev"
or you can find a copy of the stack at:
http://www.altuit.com/webs/altuit2/RunRev/Misc.htm
best,
Chipp
Glen Bojsza wrote:
> The basic description of what I am working to achieve is the following.
>
> I have 2 images (car1 and car2) that are connected by a line.
>
> When the user drags car1 to a different position on the card the
> line's points are updated and to the user it appears that the images
> are still connected (the idea is a "sticky" line.
>
> What I am trying to figure out is that I want a field to be placed
> at the center on the line and it needs to maintain that relationship
> with the line whenever the image locations are changed.
>
> The problem is that as the user drags an image around the line and
> it's associated field need to move / update smoothly.
>
> I am looking at grouping the line and field verses taking the points
> of the line and recalculating the new location of the field.
>
> I was hoping someone would have some experience in this area.
More information about the use-livecode
mailing list