FMX'04 button swapdepths redraw issue

Hi,

I was reading your excelent tutorial on swapdepths at

http://www.kirupa.com/developer/actionscript/depths.htm

OK here goes: I have 3 buttons horizontally aligned, when you rollover them they are supposed to become larger in size. Everything ok so far, I created the 3 buttons and their rollover frame showed a larger version of the button, the problem was the buttons were overlapping each other whenever you rolled over them, this was because of the depth they were set in. I applied some of the code in your tutorial to try and solve the issue:

Button.prototype.swapDepths = MovieClip.prototype.swapDepths;
TextField.prototype.swapDepths = MovieClip.prototype.swapDepths;
Button.prototype.removeButton = MovieClip.prototype.removeMovieClip;
// TextField already has removeTextField

salads.onRollOver = function () {
salads.swapDepths(-1000);
};
wraps.onRollOver = function () {
wraps.swapDepths(-1000);
};
mitt.onRollOver = function () {
mitt.swapDepths(-1000);

};
stop();

This partially solved the problem, the idea was to make every button “move to the top” whenever you rolled over it, but now the problem is I’m having some redraw issues when you roll over the buttons.

To better understand the issue please have a look at the swf:

http://www.axiswd.com/misc/flash/bottom.swf

The fla is also available here:

http://www.axiswd.com/misc/flash/bottom.fla

Your help is much appreciated thanks!! This has got to be one of the best sites on the net that deal with flash, congrats!!