PDA

View Full Version : Adding from library behind those items already on stage


Sherwood
07-25-2005, 01:32 AM
Is there any way to add items to the stage in runtime so that they appear behind those items that were in place with the start of the applications. I am playing with the attachMovie function but with little luck.

csdstudio
07-25-2005, 01:45 AM
var mc = yourMovieClip;
mx.behaviors.DepthControl.sendToBack(mc);

Sherwood
07-25-2005, 02:19 AM
Thanks for the help, I also found out that there are negative depths ( a ton) and a nice couple lines of code so one can place an item inbetween layers of any item on stage.

for (var i in this) {
if (typeof (this[i]) == "movieclip") {
trace("movie clip '"+this[i]._name+"' is at depth "+this[i].getDepth());
}