# Button Hit State

**URL:** <https://forum.kirupa.com/t/button-hit-state/252689>\
**Category:** flash\
**Created:** [February 22, 2008, 3:06pm UTC](https://forum.kirupa.com/t/button-hit-state/252689 "2008-02-22T15:06:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ponyboy32](https://avatars.discourse-cdn.com/v4/letter/p/74df32/32.png) [@ponyboy32](https://forum.kirupa.com/u/ponyboy32)\
**Post date:** [February 22, 2008, 3:06pm UTC](https://forum.kirupa.com/t/button-hit-state/252689/1 "2008-02-22T15:06:09Z")

</div>

I’ve added a button to my main timeline. I only want part of the button to be clickable so I draw a rectangle in the Hit state of the button to declare which section of the button to be clickable. However, when I run it I’m able to click on any part of the button and perform the desired action. How do I make it so that only clicking within the defined rectangular area in the Hit state will perform the desired action?

My code is in the button onRelease event. Should I use a different event to get this desired affect? Thanks!
