# hitTestPoint in an Array

**URL:** <https://forum.kirupa.com/t/hittestpoint-in-an-array/323373>\
**Category:** flash\
**Created:** [June 28, 2011, 7:19am UTC](https://forum.kirupa.com/t/hittestpoint-in-an-array/323373 "2011-06-28T07:19:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nuwa](https://avatars.discourse-cdn.com/v4/letter/n/e36b37/32.png) [@Nuwa](https://forum.kirupa.com/u/Nuwa)\
**Post date:** [June 28, 2011, 7:19am UTC](https://forum.kirupa.com/t/hittestpoint-in-an-array/323373/1 "2011-06-28T07:19:37Z")

</div>

I have 3 movieclips on stage and what im trying to do is remove the movieclip when its clicked.  
the code i wrote is throwing this error…  
“TypeError: Error #1006: value is not a function.  
at hitTestPointEx2\_fla::MainTimeline/itsclicked()”

Can someone please tell me what im doing wrong…This is what i have so far… ☹

```auto
var ObjArr:Array = new Array(); 
var theClip:String;  
for(var i:int =1; i<=3; i++)
	{
			theClip = "mv"+i; 
			ObjArr.push(theClip);
		
	}

stage.addEventListener (MouseEvent.CLICK, itsclicked);
function itsclicked (event:MouseEvent):void
{
	
		for(var j:int = 0; j<3; j++)
		{
			if (ObjArr[j].hitTestPoint(stage.mouseX, stage.mouseY,true))
			{
				ObjArr[j].visible = false;
			
			}
		}
	
	
}

```
