Check out: http://lists.runrev.com/pipermail/use-revolution/2002-March/002702.html
IN this, Geoff Canyon says:
on mouseDown
put true into tDragging
end mouseDownon mouseMove mouseX,mouseY
if tDragging then
-- Do bounds checking here --
set the loc of me to (mouseX,mouseY)
end if
end mouseMoveon mouseUp
stopDragging
end mouseUpon mouseRelease
stopDragging
end mouseReleaseon stopDragging
put false into tDragging
end stopDraggingIMHO, the **only** reason to use a scheme like this is in order to constrain the dragged object completely, i.e. so that the user can't move the object out of some chosen bounds (say a particular rectangle) even while dragging. If Monte is content to allow the user to drag an object anywhere in a window and then apply the constraints when the user lets go of the mouse (giving a kind of rubber-band effect, which can look quite attractive in some circumstances), then it seems to me that there is only one elegant solution, which is to use 'grab me' - it's built in and it's very concise. In the 'rubber-band' case, I can't see any need for any other solution.
Just two more Eurocents
Graham
--
-------------------------------------------------------------------
Graham Samuel / The Living Fossil Co. / UK & France
_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution
