This content has been marked as final. Show 3 replies
swapDepths() kind of has a bad name. Because it does two things. The first is take a movie and another movie and swap them:
Will take the depths of the two movies and swap them. But there is another way to use it as well.
Will put movie1 at a depth of 1000 (remember higher numbers mean more on top.
Another confusion for a lot of folks new to this is that the hierarchy starts over again for each branch of the tree.
Imagine a tall office building. Floor 50 will always be above floor 49. So even though something is 8 feet above the carpet on floor 49, it will not be higher than something 1 foot above the carpet on floor 50.
So if your five different clips are in different parents that might be part of the problem.
Finally there can be complications with how timeline objects and actionscript manipulated objects interact with depths. Check out the following tutorial to learn much more than you ever wanted to know about depths in Flash.
PS: You didn't really tell us what the problem is. So if what I've mentioned doesn't hit the mark, you will have to slap mark yourself. :) (I mean, post back.)
Thanks! I'm looking over that tutorial now. My main problem was in understanding how to get swapDepth to work because all of the tutorials I found took a different approach to it and I couldn't figure out how to apply it to the way in which I want to use it. I just wanted something nice and simple that would allow me to swap depths between multiple movie clips on rollover. This tutorial looks pretty thorough though, so hopefully it helps!