AS3 handles depths far better than AS2 to you might want to consider migrating.
Use the swapDepths() function to change the depth of movieclips, it probably won't work with buttons so you may have to convert them all to movieclips and create the up, over, out and down frames manually.
'Over' for buttons doesn't mean over other movieclips, it means your mouse is over the button.
Yes for some reason in AS2 you can't use swapDepths() directly with Buttons—however most of us don't use buttons because they are so twitchy and weird.
If you do want to use real buttons and you do want to swap their depths you can use this code:
Button.prototype.swapDepths = MovieClip.prototype.swapDepths;
You just need that once at the beginning of your code. It tells Flash that Buttons know what MovieClips know about swaping depths. I've used it in a few tests, but in general I don't use buttons. Instead I use MovieClips.
I tried this by putting it in my code but it didn't make the button stay under the expanding rectangle.
am i putting this code in the wrong place? putting it on a keyframe at the start of the timeline?
Yes that is the place to put it, but that code doesn't do anything that you would see, by itself.
But now you can use swapDepths() with buttons to change their stacking order. Google search for a tutorial on using swapDepths. The tute my say that you have to use MovieClips, but with that code included the swapDepth method will work with your buttons.