Movieclips overlaping problem with MOUSE_OVER

Hi, I have a movieclip that shall work like a button, however that is a later problem, atm I just want it to animate when I place the mouse over, and then when I move the mouse away I want another animation.

So what I have is

var over = 0;
test_mc.addEventListener(
  MouseEvent.MOUSE_OVER,
  function(evt:MouseEvent):void {
    if(over == 0){  
     test_mc.gotoAndPlay("over");
     over = 1;   
    }
  }
  
);
test_mc.addEventListener(
  MouseEvent.MOUSE_OUT,
  function(evt:MouseEvent):void {
      if(over == 1){
      test_mc.gotoAndPlay("out");
      over = 0;
    }
   }  
);

There might be some fault with bracets since Ive been trying out diffrent things from time to time, but I hope you understand the principle here, I basicly just say that when the mouse is over the movieclip, play one part of it, and when it goes out play another part.

Now the problem is that the movieclip that it plays goes over the button, and thus the MOUSE_OVER will stop since there is a new movieclip over, so the animation stops when it hits the curser, and since it is then out (since its not over) it will start the out animation, but since it is over when the first movie goes away it starts the over movie again

So what it does is that it loops the over animation all the time.

Is there any way to get the MOUSE_OVER to work on the cordinatates of the object or in some other way make this works. It’s hard to explane, please ask if Im unclear.

I tried to move the gotoAndPlay out and have it in a function so that it wont stop when its not over anymore and that works, ok, but it will still register alot of over’s and out’s.

I would like to have some sort of focus, so that when it listens to MOUSE_OVER, it only cares about x,y positions, not if there is a new movieclip that happens to overlap the old one.