# MovieClip collision with points stored in an array

**URL:** <https://forum.kirupa.com/t/movieclip-collision-with-points-stored-in-an-array/322911>\
**Category:** flash\
**Created:** [June 8, 2011, 1:36pm UTC](https://forum.kirupa.com/t/movieclip-collision-with-points-stored-in-an-array/322911 "2011-06-08T13:36:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NoobSurfer](https://avatars.discourse-cdn.com/v4/letter/n/e19adc/32.png) [@NoobSurfer](https://forum.kirupa.com/u/NoobSurfer)\
**Post date:** [June 8, 2011, 1:36pm UTC](https://forum.kirupa.com/t/movieclip-collision-with-points-stored-in-an-array/322911/1 "2011-06-08T13:36:16Z")

</div>

Im a bit stumped on this. I have a movie clip named mcMain that the player controls, and i want him to have it detect collisions at certain points of the screen (like at a certain X and Y co-ordinates). I have an array that contains those values, which is shown below:

```auto
//Array that holds x position of points
var xPoint:Array = new Array(150,400,200,300,100);
//Array that holds y position of points
var yPoint:Array = new Array(100,200,300,400,350);
//Array that holds the xPoint and yPoint array
var pointHolder:Array = new Array(xPoint, yPoint);

```

I need some instruction (specific if you please) on how to make ‘mcMain’ moniter these x and y values, so that when ‘mcMain’ comes into contact with one of these points (probably using HitTestPoint) a function will run.

As you can probably tell im not _that_ good at AS3, so believe me when i say that some moderately detailed instructions would be GREATLY appreciated :ne:

Thanks for reading, and don’t be shy with those posts.
