What am i doing wrong? MC Targeting and MouseEvents

Hi,

I have been frustrating with this for a while now and was wondering if maybe someone here could help me out.

I have attached a Flash File (CS3) with a movieclip inside. Lets say this movieclip is acting as a button. What i am trying to do is this. When the user rolls over the movieclip (parent) it begins the animation. The animation plays, then stops and a certain frame. On this certain frame there is another movieclip (child) i also want to act like a button. I have gotten it to when the user rolls into the child button the parent won’t play its roll out animation unless you actually roll out of it as oppose to rolling into the child clip (which is technically out of the parent). The problem i am having is A) targeting the child clip, and B) getting the child to play its animation when rolled in and of.

This is the code i have used so far.


testButton.stop ();
testButton.addEventListener (MouseEvent.MOUSE_OVER, buttonOver);
function buttonOver (e:MouseEvent):void {
    testButton.play ();
    testButton.removeEventListener (MouseEvent.MOUSE_OVER, buttonOver);
    testButton.addEventListener (MouseEvent.MOUSE_OUT, buttonOut);
}
function buttonOut (e:MouseEvent):void {
    if (e.relatedObject==null || (e.target.name!="insideButton" && e.target.name!="testButton")) {
        testButton.gotoAndPlay (11);
        testButton.removeEventListener (MouseEvent.MOUSE_OUT, buttonOut);
        testButton.addEventListener (MouseEvent.MOUSE_OVER, buttonOver);
    }

}

The parent clip is named testButton and the child clip is named insideButton. I have been told that this is possible with AS3, but seem to be stuck.

Can someone here help me finish this? It has been the bottleneck of a project and is starting to give me headaches. Any help is very much appreciated. And thank you in advance.