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…
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;
}
}
}