How do I determine/set the active layer of a graphic?

DunbarX at aol.com DunbarX at aol.com
Wed Nov 25 10:14:51 EST 2009


In a real clock, if the hands overlap, you have to carefully grab one or 
the other to move them. If the big hand is over the little hand, you have to 
grab the outer portion of it.

Is it that you need the small graphic to come to the front when you need it 
to? I think you had the right idea, that if the mouseLoc is within the rect 
of the small hand, then you can do what you want. This will be evaluated 
regardless of whether the big hand in in front or not.

Use the mouseMove message to test the mouseLoc. If it is within the rect of 
the small hand and the layer of the small hand is less than the layer of 
the big hand, then bring the small hand to the front. You seem more than able 
to write this.

Craig Newman


In a message dated 11/25/09 9:19:09 AM, williamdesmet at gmail.com writes:


> But then I still need to click on the outer size of the bigger clock arm 
> to
> rotate it.
> The problem is that both graphics are squares and they overlap.
> Is there a way to determine on which graphic I click (or am about to
> click).
> Maybe with mouseLoc?
> 
> Any suggestions?
> 




More information about the use-livecode mailing list