# Hittest() embeded MC buttons within MC

**URL:** <https://forum.kirupa.com/t/hittest-embeded-mc-buttons-within-mc/197120>\
**Category:** Uncategorized\
**Created:** [August 14, 2006, 2:06am UTC](https://forum.kirupa.com/t/hittest-embeded-mc-buttons-within-mc/197120 "2006-08-14T02:06:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Multi\_Task](https://avatars.discourse-cdn.com/v4/letter/m/c6cbf5/32.png) [@Multi\_Task](https://forum.kirupa.com/u/Multi_Task)\
**Post date:** [August 14, 2006, 2:06am UTC](https://forum.kirupa.com/t/hittest-embeded-mc-buttons-within-mc/197120/1 "2006-08-14T02:06:48Z")

</div>

I have a MC called soundtab\_mc, this soundtab\_mc has MC buttons inside of it. soundtab\_mc I want to be on side of movie and onRollOver have it slide in and then display buttons to control sounds. Here is my AS I am using the onRollOver and Rolloff works however it does not stop when mouse is still over soundtab\_mc so it slides in but slides right back out and doesnt stop on desired frame.

```auto

var startTracking = function() {
 soundtab_mc.onEnterFrame = function() {
  if(!hitTest(_xmouse,_ymouse,true)) {
   delete this.onEnterFrame;
   this.gotoAndPlay(15);
  }
 }
}
 
soundtab_mc.onRollOver = function() {
 soundtab_mc.gotoAndPlay(2);
 startTracking();
}

```

It should stop on line 14 however it doesnt it plays through without reading AS within the MC. Any ideas? Thanks in advance. M\<T
