At 8:39 PM -0500 7/29/01, Tony Gravett wrote:
>I am a "newbie" and want to drag around images on the screen with the mouse.
If you don't need to do anything while the dragging is going on, then you can use:
on mouseDown
grab me
end mouseDown
If you need to be able to do other things with your scripts while the drag is
happening, use something like:
global gDraggingGraphic,gGraphicHDelta,gGraphicVDelta
on mouseDown
put true into gDraggingGraphic
put (item 1 of the loc of me) - the mouseH into gGraphicHDelta
put (item 2 of the loc of me) - the mouseV into gGraphicVDelta
end mouseDown
on mouseUp
put false into gDraggingGraphic
end mouseUp
on mouseMove x,y
if gDraggingGraphic then
set the loc of me to (x + gGraphicHDelta),(y + gGraphicVDelta)
end if
end mouseMove
regards,
geoff