Can you un-swapdepth a movie you set on a depth?

I know you can delete the mc, remove it, swap it to a lower depth but can you un-swapdepth it so it goes back to it’s origional layer depth on the stage??

I’ve tried

swapthdepth() - nothing
swapthdepth(null) - does nothing
swapthdepth(0) - this just makes it’s depth 0
delete movieClip.swapdetph(1) - trying to delete it from it’s depth

can’t get it to work.

Ok I did figure a way around this kinda. I made a blank movie clip called … “blank” and swapdepths with the mc I wanted back in it’s place… but I’d still like to know an AS way of doing this.

just save the original depth as a variable

myClip.origDepth = myClip.getDepth();

before you do the first swap. Then to swap it back, just use

myClip.swapDepths(myClip.origDepth);

Question is it actually on a depth before you use the swapDepths function?

yes

you can learn more about depths here
http://www.umbc.edu/interactive/flash/tutorials/showpage.php?p=depths

Now I understand. :slight_smile:

“And knowing is half the battle”