SwapDepths... I'm drowning!

I have a layer with three movieclips on it called

cat1_mc
cat2_mc
cat3_mc

I have the playhead jump to f1 (frame 10) when cat1_mc is clicked and
f2 (frame 20) when cat2_mc is clicked and so on.

and the playhead jumps back to f0 (frame0) when the close_mc movieclip is clicked.

???/

I would like cat1_mc to be above the others when it is clicked and the playhead arrives at frame 10.

???

From what I understand I’m just supposed to add the line of code
cat2_mc.swapDepths(9999);

here is the code on frame 10


MovieClip.prototype.ease = function(tarx, tary) {
this.onEnterFrame = function() {
this._x = tarx-(tarx-this._x)/1.75;
this._y = tary-(tary-this._y)/1.75;
if (Math.abs(tarx-this._x)<1 && Math.abs(tary-this._y)<1) {
this._x = tarx;
this._y = tary;
delete this.onEnterFrame;
}
};
};
cat1_mc.onEnterFrame = function() {
cat1_mc.swapDepths(9999);
cat1_mc.ease(500,300);
cat1_mc.tween(["_alpha","_xscale", “_yscale”],[100, 500, 250], 1, “easeInOutElastic”)
};
close_mc.onRelease = function() {
_root.gotoAndStop(“f0”);
};



This works only the first time when I click on say cat2_mc … it brings it to the front but then doesn’t scale it back to its original size when i click on the close button…
…and the frame goes back to frame 0 which contains the code.

cat1_mc.onRelease = function() {
_root.gotoAndStop(“f1”);
};
cat2_mc.onRelease = function() {
_root.gotoAndStop(“f2”);
};
cat3_mc.onRelease = function() {
_root.gotoAndStop(“f3”);
};

cat1_mc.onEnterFrame = function() {
cat1_mc.ease(200,200);
cat1_mc.tween(["_alpha","_xscale", “_yscale”],[100, 100, 100], 1, “easeOutExpo”)
};
cat2_mc.onEnterFrame = function() {
cat2_mc.ease(400,200);
cat2_mc.tween(["_alpha","_xscale", “_yscale”],[100, 100, 100], 1, “easeOutExpo”)
};
cat3_mc.onEnterFrame = function() {
cat3_mc.ease(600,200);
cat3_mc.tween(["_alpha","_xscale", “_yscale”],[100, 100, 100], 1, “easeOutExpo”)
};

Is there something I’m missing?
Any help much appreciated and I’ll send you a coke if I can.