Retrieve the Layer Number of an Object?

Richmond Mathewson richmondmathewson at gmail.com
Wed Oct 21 12:11:48 EDT 2009


Rick Harrison wrote:

"I want to programmatically get the layer
number of a button, store the layer number for it,
move the button to the front, modify the button,
and then move it back to the layer where it was
with the set the layer of button "blah" to the VarLayerNumber."

on mouseUp
   put the layer of btn "Button" into  VarLayerNumber
   set the layer of btn "Button" to top
   -- do daft things to btn "Button" --
   set the layer of btn "Button" to  VarLayerNumber
end mouseUp

Not terribly difficult . . .   :)

Mind you, why it is necessary to move the button to
the top layer, do things to it, and move it back again
escapes me when you could just perform your
transformations in situ.



More information about the use-livecode mailing list