On Thu, 4 Dec 2003 08:23:54 +1000, Sarah <[EMAIL PROTECTED]> wrote:


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 mouseDown

on mouseMove mouseX,mouseY
    if tDragging then
-- Do bounds checking here --
        set the loc of me to (mouseX,mouseY)
    end if
end mouseMove

on mouseUp
    stopDragging
end mouseUp

on mouseRelease
    stopDragging
end mouseRelease

on stopDragging
    put false into tDragging
end stopDragging

IMHO, 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

Reply via email to