# Collision tests

**URL:** <https://forum.kirupa.com/t/collision-tests/237834>\
**Category:** programming\
**Created:** [September 4, 2007, 2:47pm UTC](https://forum.kirupa.com/t/collision-tests/237834 "2007-09-04T14:47:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fw2803](https://avatars.discourse-cdn.com/v4/letter/f/e5b9ba/32.png) [@fw2803](https://forum.kirupa.com/u/fw2803)\
**Post date:** [September 4, 2007, 2:47pm UTC](https://forum.kirupa.com/t/collision-tests/237834/1 "2007-09-04T14:47:48Z")

</div>

Hi there  
In these few days, I’m totally pissed… by the mines on the floor to bomb the tank up. In order to simplify matters, I created another collision test system.

I’ve got 6 stationary circles and a movable (by arrow keys) square on the stage. I put this on the first frame:

```auto
target_mc = ["circle0","circle1","circle2","circle3","circle4","circle5","circle6"]
var numCircles = target_mc.length
hitTester = function() {
 for (i=0;i<numCircles;i++) {
  if (target_mc*.hitTest(_root.box)) {
   _root.box._x=0
   _root.box._y=0
  }
 }
}

```

The square should go to x=0 and y=0 when it hits any of the circles. However, it just goes through the circles when I tested it. What should I do? Oh dear…
