MovieClip's over MovieClips don't disable?

I have two movieclips on my stage. For this problem, lets describe them as movie clip X, and movie clip Y. Movie clip X has a depth of 1 and movie clip Y has a depth of 2.

Movie clip Y is moveable and will sometimes overlap movieclip X (which works fine because of their depths). However, movie clip X has buttons that, although you cannot see them when Y is overtop of X, you can still click “through” Y to access X’s buttons.

I don’t want to totally disable movie clip X; if you can still see the buttons I want the user to be able to click them. If movie clip Y is overtop of those buttons you shouldn’t be able to click through Y to access X’s buttons.

I’m trying to build a simple window model in Flash. Help would be greatly appreciated.