Groups | Blog | Home
all groups > flash actionscript > march 2004 >

flash actionscript : please help with a very basic question...



maria77
3/29/2004 11:19:35 PM
I'd like to dynamically alter the stacking order of some elements on stage in
response to a mouse click. The elements are three rectagles that may overlap
partially, so that whenever you click on one of them it should come to the top
and the others sit under it. Additionally the three rectagles are drag-able.
I saw it done on fitch.com, please refer to that site. I would appreciate your
help greatly!! Thanks
rlc5611
3/30/2004 3:11:04 AM
each shape is a movie clip. One way to do this would be to hide these away on
the stage underneath something so they cannot be seen and then use the
duplicateMovieClip to place new instances of them on the stage. each button
click woud remove the duplicates (removeMovieClip()); and then duplicate them
again in the stacking order (depth) you want for that particular button.

I do not think you will be able to do it with the original movie clips - only
the duplicates.
Dinghus
3/30/2004 4:33:03 AM
Why go to all that work when there is swapDepths() ?

AddThis Social Bookmark Button