Dragging an object

Roger Eller roger.e.eller at sealedair.com
Thu Jul 10 20:54:29 EDT 2014


This really old info from the archives might help.

https://www.mail-archive.com/use-revolution%40lists.runrev.com/msg10273.html
 On Jul 10, 2014 8:24 PM, "Peter Bogdanoff" <bogdanoff at me.com> wrote:

> Hi,
>
> I want to drag an object around (a group), restricting its Y coordinate
> (set to be a property, “yLocation"). I’m using this script inside the
> object:
>
> on mouseMove
>    if the mouse is down then
>       set the loc of me to (item 1 of the mouseLoc,the yLocation of me)
>    end if
> end mouseMove
>
> However, after moving it sideways, when I click on it again to move it,
> every time it jumps back so that its X coordinate is zero relative to the
> mouseLoc.
>
> This behavior would be fine for a button, but I’m dragging a
> 3000-pixel-wide group.
>
> How can I drag it by clicking on one side of this group?
>
> I tried using the grab command, but I couldn’t seem to be able to restrict
> the Y coordinate with that.
>
> Peter
> UCLA
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list