Depths. Argh!

Hi everyone.

I have what should be a pretty simple request for you script-masters!

I have a series of background MCs, all different coloured gradients (pretty!), and a series of corresponding buttons elsewhere on the stage.

On a press of each button I would like the corresponding background MC to come to the top of the pile of backgrounds, then fade in above the previous background. The background that was previously on top, needs to stay next-to-top. If the corresponding background is already at the top of the pile, then nothing needs to happen.

At the moment I am using swapDepths(1) which brings the target to the top no problem, but it may also send the previous top layer MC way down the pile.

I hope this makes sense, I think this actually quite simple but I am lost for a solution.

This is what I’m doing at the moment:

on (release) {

if (_root.BG.colour2.getDepth()<=0) {
    _root.BG.colour2._alpha = 0;
} else {


Any help would be appreciated.