# Question about hitTest and onRollover

**URL:** https://forum.kirupa.com/t/question-about-hittest-and-onrollover/239187
**Category:** flash
**Created:** [September 19, 2007, 1:14pm UTC](https://forum.kirupa.com/t/question-about-hittest-and-onrollover/239187 "2007-09-19T13:14:07Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![chrscote](https://avatars.discourse-cdn.com/v4/letter/c/e8c25b/32.png) [@chrscote](https://forum.kirupa.com/u/chrscote)
#### Post date: [September 19, 2007, 1:14pm UTC](https://forum.kirupa.com/t/question-about-hittest-and-onrollover/239187/1 "2007-09-19T13:14:07Z")

</div>

I have a single main movieclip which contains 2 other movieclips within it. Currently I have an onRelease function on the main mc in which I use hitTest to determine whether I click on one of the 2 inner mcs. Now, I’m trying to have a graphic appear when someone rolls over either of the inner mcs.  
I have the following code:

```auto

filterCover_mc.onRollOver = function() {
 with (_global.stateManager) {
  if (this.allScrews_mc.hitTest(_root._xmouse, _root._ymouse, true)) {
   trace("hi");
   screwHilightOn();
   trace("bye");
  } else if (this.allBolts_mc.hitTest(_root._xmouse, _root._ymouse, true)) {
   screwHilightOn();
  }
 }
};

```

Hopefully, the code is self-explanatory. filterCover\_mc is the main outer mc and allScrews and allBolts are the inner movieclips. However, I never receive the text hi or bye when I roll over allScrews.

Chris
