Setting Stack's Location

Sarah Reichelt sarahr at genesearch.com.au
Tue Feb 3 00:33:47 EST 2004


You'll need to check out the globalLoc function. If you just set the 
loc of stack xxx to the loc of image yyy then it will be set relative 
to the top left of the screen instead of the top left of the main stack 
window.
Something like this:

on moveStack
   set the loc of stack "Sub" to globalLoc(the loc of image 1)
end moveStack

will work, but it doesn't move as you move the stack, it moves in a 
jump when you have finished. To get around this, you may have to remove 
the title bar from your main stack and write a custom move handler that 
records the mouseDown, follows the mouseMove and then stops moving on 
mouseUp.

I wrote an article in revJournal in December that analyzed Klaus 
Major's Xmas tree stack. It uses this technique for moving the stack 
around, so you might find it worth your while to check it out:
http://www.revjournal.com/comments.php?id=P64_0_1_0

Cheers,
Sarah
sarahr at genesearch.com.au
http://www.troz.net/Rev/

On 3 Feb 2004, at 2:18 pm, Bojsza wrote:

> It seems that this should be fairly easy ...I am trying to set a small 
> sized stack at the location of an image of another stack that is much 
> larger. I want the smaller stack to act as if it was an object of the 
> larger stack (maintaining its position if the larger stack is moved, 
> always on top of the larger stack etc).
>
> Is there a "proper" way to approach this?
>
> thanks,
>
> Glen
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
>



More information about the use-livecode mailing list