# Hit test with one MC infront of another?

**URL:** https://forum.kirupa.com/t/hit-test-with-one-mc-infront-of-another/94242
**Category:** Uncategorized
**Created:** [November 10, 2003, 6:13pm UTC](https://forum.kirupa.com/t/hit-test-with-one-mc-infront-of-another/94242 "2003-11-10T18:13:36Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![yakob](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/yakob/32/348_2.png) [@yakob](https://forum.kirupa.com/u/yakob)
#### Post date: [November 10, 2003, 6:13pm UTC](https://forum.kirupa.com/t/hit-test-with-one-mc-infront-of-another/94242/1 "2003-11-10T18:13:36Z")

</div>

:puzzle:

kinda tricky this one… posted the swf and fla here to illustrate what i mean:

[http://www.28design.co.uk/jake/flash/detect\_clip.swf](http://www.28design.co.uk/jake/flash/detect_clip.swf)  
[http://www.28design.co.uk/jake/flash/detect\_clip.fla](http://www.28design.co.uk/jake/flash/detect_clip.fla)

i’m using this AS to play, then reverse a MC when the mouse moves over it:

onClipEvent (enterFrame) {  
if (this.hitTest(\_root.\_xmouse, \_root.\_ymouse, true)) {  
this.nextFrame();  
[//this.gotoAndStop](https://this.gotoAndStop)(2);  
} else {  
this.prevFrame();  
[//this.gotoAndStop](https://this.gotoAndStop)(1);  
}  
}

the problem i have is i have a perspective style design meaning that if the users mouse goes over the 2nd MC when they are over the 1st, it plays too!

is there a way to ‘blank out’ other MC’s using as? i think i may have to do it that the main movie progress’s one frame on and masks out the other MC’s but…

any opinions would be grand!

many thanks,

jake
