# FMX movieclip hit areas

**URL:** <https://forum.kirupa.com/t/fmx-movieclip-hit-areas/27040>\
**Category:** flash\
**Created:** [July 29, 2003, 5:23pm UTC](https://forum.kirupa.com/t/fmx-movieclip-hit-areas/27040 "2003-07-29T17:23:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![borispc](https://avatars.discourse-cdn.com/v4/letter/b/ac8455/32.png) [@borispc](https://forum.kirupa.com/u/borispc)\
**Post date:** [July 29, 2003, 5:23pm UTC](https://forum.kirupa.com/t/fmx-movieclip-hit-areas/27040/1 "2003-07-29T17:23:30Z")

</div>

Hi!  
This is a pretty simple thing but I’m not sure what is the best way to do this.  
How do you define the “hot spot” for a movieclip?. Let’s say you want to define what part of that movieclip is sensitive to the cursor within that same movieclip in a frame. (like the Hit Frame in a button object). The Hit Area property seems to only refer to other movieclips, and not able to define it as a specific frame.  
Thank you everyone!:p:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 29, 2003, 5:41pm UTC](https://forum.kirupa.com/t/fmx-movieclip-hit-areas/27040/2 "2003-07-29T17:41:10Z")

</div>

1. either use a button instead or
2. use hitArea with a movieclip

You can always set the hitArea movieclip to have a \_visible of fase, then it wont be seen.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 29, 2003, 5:43pm UTC](https://forum.kirupa.com/t/fmx-movieclip-hit-areas/27040/3 "2003-07-29T17:43:15Z")

</div>

thanks…I know those are options…just want to know if the hit area can be defined within the same mc. (not a nested mc either). A button is not an option, it needs to be a mc.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 29, 2003, 5:55pm UTC](https://forum.kirupa.com/t/fmx-movieclip-hit-areas/27040/4 "2003-07-29T17:55:44Z")

</div>

boris -

you could also create a transparent .gif file and then import it into flash; then place it on the bottom layer of your movie clip and make it available on the frames you need.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 29, 2003, 6:03pm UTC](https://forum.kirupa.com/t/fmx-movieclip-hit-areas/27040/5 "2003-07-29T18:03:45Z")

</div>

thank you everyone. The most straight forward way to do this (in my humble opinion) is the following:  
just draw the hit area in the bottom layer of the movieclip and then make that 0% transparent with the color mixer. Just like what Liam proposed but with no need of importing the gif, all in flash. thanks again.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 29, 2003, 6:04pm UTC](https://forum.kirupa.com/t/fmx-movieclip-hit-areas/27040/6 "2003-07-29T18:04:25Z")

</div>

You could _fake_ it too…

Use an onMouseDown handler and an if action to check the mouse position, something like this:  
[AS]myMovieClip.onMouseDown = function() {  
var xm = this.\_xmouse;  
var ym = this.\_ymouse;  
if (xm\>20 && xm\<40 && ym\>20 && ym\<40) {  
statement(s);  
}  
};[/AS]
