# Button Over Button / Hittest forever and ever

**URL:** <https://forum.kirupa.com/t/button-over-button-hittest-forever-and-ever/318589>\
**Category:** Uncategorized\
**Created:** [January 24, 2011, 8:42pm UTC](https://forum.kirupa.com/t/button-over-button-hittest-forever-and-ever/318589 "2011-01-24T20:42:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![obrakeo](https://avatars.discourse-cdn.com/v4/letter/o/5e9695/32.png) [@obrakeo](https://forum.kirupa.com/u/obrakeo)\
**Post date:** [January 24, 2011, 8:42pm UTC](https://forum.kirupa.com/t/button-over-button-hittest-forever-and-ever/318589/1 "2011-01-24T20:42:03Z")

</div>

Howdy all,

It’s been a bit since I’ve had to get my hands dirty with any kind of action scripting. Last time I got involved with much of it at all was in AS2 for sure. I’ve been dropped back into it on a project and its something that I assume should be easily solvable.

I initially have a button covering up an entire file to record a mouse out event to play the animation out. Within the animation area I also have a button the triggers additional animation in the scene. Unfortunately when mousing over this button, the previous button is detecting this as a mouse out event. I have been looking into the hittestpoint() for the 2nd button instead, but I need it to work as a single event, and I’ve only seen hittestpoint() working with EnterFrame. This is constantly running the function I need to happen only once when entering the hit area.

I know this has to be ridiculously simple to solve, but I’m an animator and only dabble in coding from time to time. I think I saw a for loop used to solve this somewhere, but I can’t wrap my head around it.

Any ideas??

-Blake
