"grabbing a tool"

Barry Levine themacguy at macosx.com
Tue Dec 3 14:25:00 EST 2002


Rob,

Thanks for the pointer. Yes, the "grab" command works well:

on mouseDown
	grab me
end mouseDown

I included a bunch of code from a stack (drag sample) I DL'd from 
somewhere (a reference given to me from someone on this list; forgive 
me, I have a terrible memory for names but wish to say "thank you!"). 
The code checks for the position of the object ("me") and prevents it 
from moving outside of the bounds of the stack.

Now I'm wondering how to determine when the object ("me") I am dragging 
touches another object. In other words, if I drag "me" over an image 
object that is moving around the stack window on its own accord (I have 
set it into motion), how do I know if I have successfully "touched" it? 
It can't be the "mouseLoc" because "me" would have touched it if any of 
the "rect of me" has passed over any of the rect of image "myImage".

The seeds of the answer are probably contained within my question. 
Think of this as "Pong" but all I am worried about is knowing exactly 
when the object I am dragging has passed over ("touched") another 
object (and there may be up to 27 of these "other" objects).

Thanks to everyone on this list (and most especially to Rob and Michael 
Lew and www.tactilemedia.com).

Regards,
Barry

On Sunday, December 1, 2002, at 03:48 AM, 
use-revolution-request at lists.runrev.com wrote:

> Message: 2
> Date: Sat, 30 Nov 2002 10:18:24 -0800
> To: use-revolution at lists.runrev.com
> From: Rob Cozens <rcozens at pon.net>
> Subject: Re: "grabbing a tool"
> Reply-To: use-revolution at lists.runrev.com
>
>> Am I moving down the correct path?
>
> Hi Barry,
>
> Check out the mouseMove message and grab command in Rev Dictionary.
> You shouldn't have to send anything; just script a mouseMove handler
> in your image.  Grab may even be a better choice...I have not used it.
> -- 
>
--------------------------------------------------------
Barry Jay Levine
"The Mac Guy"

Macintosh Troubleshooting, System Engineering, Training,
AppleShare/OSX Server Setup, System Upgrades and Enhancements,

On-Site service for K20, Business, Consumer

Phone/VoiceMail: 915-581-1105
             Fax: 915-581-8167
           eMail: themacguy at macosx.com

MacOS X: It does. You can. It will.
WindowsXP: Insert wallet into Drive A: Press any key to empty
--------------------------------------------------------




More information about the Use-livecode mailing list