To grab or not to grab

Matt Denton matt.denton at limelight.com.au
Wed Jan 29 02:50:01 EST 2003


Hi Geoff,

Whoops!  Yes bad form, I usually (truly!) use this non-event hogging 
form (Old HC habits die hard you know...); I guess I was being a lazy 
typist as I was really looking for an answer on how to drag an object 
from within a group and have it crop at the boundaries without using 
the 'grab' form.

Geoff, any clues how I might get an object to stay within the rect of 
its contained group?  I tested the form below (my original code was 
similar to this) but it doesn't work,

Cheers,

M@
Matt Denton


On Wednesday, January 29, 2003, at 05:37 PM, Geoff Canyon 
<gcanyon at inspiredlogic.com> wrote:

> You'd be better off doing something like:
>
> local tDragging -- are we currently dragging?
>
> on mouseDown
>    -- check the target here to see if it's what you want
>    put true into tDragging
> end mouseDown
>
> on mouseMove
>    if not tDragging then exit mouseMove
>    --move the objects here
> end mouseMove
>
> on mouseUp
>    put false into tDragging
> end mouseUp
>
> on mouseRelease
>    put false into tDragging
> end mouseRelease
>
> On Monday, January 27, 2003, at 09:12 PM, Matt Denton wrote:
>
>> on mouseDown
>>   if the optionKey is down then
>>     repeat until the mouse is up
>>       set the loc of me to the mouseLoc
>>     end repeat
>>   else grab me
>> end mouseDown
>>

M@
Matt Denton
. . . . . . . . . . . . . . . . . . . . . . . . . . . .
LIMELIGHT MEDIA PTY LTD

P] 61 2 9211 6622
F] 61 2 9211 5922
E] info at limelight.com.au

3/134 BROADWAY
BROADWAY, SYDNEY NSW 2007
ABN 72 065 014 280

NOT YOUR EMAIL?
If this e-mail is not for you, please let us know and destroy the 
original:
wrongmail at limelight.com.au
or call Sydney 61 2 9211 6622.   Thanks for your kind help.

LEGAL
This e-mail is intended only for the use of the individual or entity 
 named above and may contain information that is confidential and 
 privileged.   If you are not the intended recipient, you are hereby 
notified that any dissemination, distribution or copying of this Email 
is strictly prohibited.  Before opening or using attachments, check 
them for viruses and defects.





More information about the use-livecode mailing list