"grabbing a tool"

Barry Levine themacguy at macosx.com
Sat Nov 30 12:50:01 EST 2002


I think I understand setting the cursor to an image but the Rev docs 
indicate I need to have an image that's 16x16 pixels in order to 
maintain Mac & PC compatibility. What I'd like to do is have a mouseUp 
on an image "lock" that image to the position of the cursor (something 
on the order of picking up a weapon in a FPS; the weapon is usually a 
hundred pixels large or even more). Then, when the user does another 
mouseUp (and does it within a certain distance of a "target point"), I 
can "release" the image and return it to it's origin.

Near as I can tell, the pseudocode for the movement tracking would be 
something like:

on moveMe
	set the loc of image "theTool" to the loc of the cursor
	send moveMe to image "theTool"
end moveMe

Am I moving down the correct path?
Thanks,
Barry




More information about the use-livecode mailing list