# More precise hitTest

**URL:** <https://forum.kirupa.com/t/more-precise-hittest/24544>\
**Category:** flash\
**Created:** [July 2, 2003, 12:04am UTC](https://forum.kirupa.com/t/more-precise-hittest/24544 "2003-07-02T00:04:19Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![elion](https://avatars.discourse-cdn.com/v4/letter/e/4491bb/32.png) [@elion](https://forum.kirupa.com/u/elion)\
**Post date:** [July 2, 2003, 12:04am UTC](https://forum.kirupa.com/t/more-precise-hittest/24544/1 "2003-07-02T00:04:19Z")

</div>

(I think I might have posted something like this before, but I cant remember anything I:-)) I want to know how to make a hitTest thats more precise, as in having the hitTest not activate when the blue box around the movie clips touch, but rather the pixels in them. I know one way of doing this is to cover the outline of the movie clip in a ton of other small invisibal movie clips and have them activate the hit test, but I was wondering if there was a more simple way of doing this.

---

<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 3, 2003, 2:10am UTC](https://forum.kirupa.com/t/more-precise-hittest/24544/2 "2003-07-03T02:10:18Z")

</div>

_Cough_

---

<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 3, 2003, 2:12am UTC](https://forum.kirupa.com/t/more-precise-hittest/24544/3 "2003-07-03T02:12:46Z")

</div>

is it a simple shape? like a circle? or a square?

---

<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 3, 2003, 2:16am UTC](https://forum.kirupa.com/t/more-precise-hittest/24544/4 "2003-07-03T02:16:34Z")

</div>

Nope. :whistle:

---

<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 3, 2003, 2:18am UTC](https://forum.kirupa.com/t/more-precise-hittest/24544/5 "2003-07-03T02:18:43Z")

</div>

then no, there isn’t a simple way.

---

<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 3, 2003, 2:19am UTC](https://forum.kirupa.com/t/more-precise-hittest/24544/6 "2003-07-03T02:19:11Z")

</div>

☹

---

<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 3, 2003, 2:20am UTC](https://forum.kirupa.com/t/more-precise-hittest/24544/7 "2003-07-03T02:20:55Z")

</div>

Wait, how was the maze thingy in the Flash samples done then? :x

---

<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 3, 2003, 2:21am UTC](https://forum.kirupa.com/t/more-precise-hittest/24544/8 "2003-07-03T02:21:52Z")

</div>

what are you talking about?

---

<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 3, 2003, 2:23am UTC](https://forum.kirupa.com/t/more-precise-hittest/24544/9 "2003-07-03T02:23:39Z")

</div>

oh, yeah, thats hittest, but those are simple shapes.

---

<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 3, 2003, 2:25am UTC](https://forum.kirupa.com/t/more-precise-hittest/24544/10 "2003-07-03T02:25:55Z")

</div>

How is -that- done then? :x…

---

<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 3, 2003, 2:26am UTC](https://forum.kirupa.com/t/more-precise-hittest/24544/11 "2003-07-03T02:26:23Z")

</div>

hitTest. Testing if the square touches the sides.

---

<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 3, 2003, 2:27am UTC](https://forum.kirupa.com/t/more-precise-hittest/24544/12 "2003-07-03T02:27:31Z")

</div>

I looked around in the fla and didn’t find any hit test stuff. :x

---

<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 3, 2003, 2:27am UTC](https://forum.kirupa.com/t/more-precise-hittest/24544/13 "2003-07-03T02:27:54Z")

</div>

its there.

---

<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 3, 2003, 2:34am UTC](https://forum.kirupa.com/t/more-precise-hittest/24544/14 "2003-07-03T02:34:56Z")

</div>

if (walls.hitTest\*\*(getBounds(\_root).xMax, \_y, true)) \*\*  
\_x -= 1;  
}

I have no idea what the bold part means :-\

---

<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 3, 2003, 9:50pm UTC](https://forum.kirupa.com/t/more-precise-hittest/24544/15 "2003-07-03T21:50:52Z")

</div>

Doo de doo…
