Moving stacks . . .

Klaus Major klaus at major-k.de
Wed Jun 8 14:13:00 EDT 2005


Hi Roger,

>
> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of
> Roger Guay
> Sent: Wednesday, June 08, 2005 18:43
> To: use-revolution at lists.runrev.com
> Subject: Moving stacks . . .
>
> Sorry to bother you with what probably is simple.  I am
> trying to move a tiny stack "Hand" from the location of a
> button in stack "Main" to the location of a button in stack
> "Sub".  You can see that
> I am trying to simulate the movement of the mouse over other
> stacks.
> First question is: is there a way to move the mouse?

Yes, see "screenmouseloc" in the docs...

> If not,
> how can I easily move the tiny stack "hand" between the
> locations within other stacks?  I'm getting wrapped around
> the axle with globalLoc and
> LocalLoc, etc.   I know that I could work out the geometry of
> getting
> positions relative to the topleft of the stacks.  but If
> there is an easier way . . . . .
>
> Thanks very much for your help.
>
> Cheers, Roger

try this:

...
put the loc of btn x of cd z of stack "Main" into fromhere
put the loc of btn y of cd z of stack "Sub" into tohere

#Convert to global locs:
put globalloc(fromhere) into Gfromhere
put globalloc(tohere) into Gtohere

#Simply MOVE the stack :-)
move stack "Hand" from Gfromhere to Gtohere in 1 secs
#or how fast you like...
...

Too easy, isn't it? ;-)


Hope that helps.


Best

Klaus Major
klaus at major-k.de
http://www.major-k.de



More information about the use-livecode mailing list