# Multiple Hit Tests

**URL:** <https://forum.kirupa.com/t/multiple-hit-tests/165044>\
**Category:** flash\
**Created:** [October 7, 2005, 2:45am UTC](https://forum.kirupa.com/t/multiple-hit-tests/165044 "2005-10-07T02:45:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![VersusMG](https://avatars.discourse-cdn.com/v4/letter/v/898d66/32.png) [@VersusMG](https://forum.kirupa.com/u/VersusMG)\
**Post date:** [October 7, 2005, 2:45am UTC](https://forum.kirupa.com/t/multiple-hit-tests/165044/1 "2005-10-07T02:45:37Z")

</div>

I have this code that works for a normal hit test that triggers a mc animation in and out. But if i want to add more than one it just plays the last in the chain of events.

```auto

//Navigation
_root.finished = 100;
this.onEnterFrame = function() {
	cursor._x = _root._xmouse;
	cursor._y = _root._ymouse;
	if (cursor.hitTest(nav1_mc) == true and _root.expand == false and _root.finished == 100) {
		_root.finished = 0;
		_root.expand = true;
		_root.nav_mc.gotoAndPlay(2);
	}
	if (cursor.hitTest(nav1_mc) == false and _root.expand == true and _root.finished == 100) {
		_root.finished = 0;
		_root.expand = false;
		_root.nav_mc.gotoAndPlay(11);
	}
};

```

If anyone can let me know what i’m doing wrong that would be very helpful!
