all groups > flash actionscript > march 2006 >
You're in the

flash actionscript

group:

move clip depth problem


move clip depth problem alien4m_mars
3/1/2006 10:50:58 PM
flash actionscript:
hi,

I am attaching few movieClips form the library and i use
"this.getNextHighestDepth" for each. After few frames i attach some new
movieClips using "this.getNextHighestDepth"...I want these new movieClips to
have a depth lower than the previous ones....

how do i get about this....??? please help!!!

thank you
Re: move clip depth problem blemmo
3/1/2006 11:27:46 PM
Heya,

just assign the first MCs higher numbers for their depth. Then use lower
numbers for the MCs you add later.
If you know the number of MCs, it's quite simple. If you don't know it before,
it may be a little bit more complicated, you may need some additional
variables...

greets,
blemmo



// first MCs
for(i=1;i<MCcount;i++){
// depths will start at 101, increasing
_root.attachMovie("mc1","mc1_copy"+i,100+i);
}

// later
for(i=1;i<=MCcount;i++){
// depths will start at 51, increasing
_root.attachMovie("mc2","mc2_copy"+i,50+i);
}
Re: move clip depth problem alien4m_mars
3/2/2006 12:00:00 AM
Thanks for your reply, i dont know number of clips going to be loaded...as they are dynamic...

AddThis Social Bookmark Button