# Please: need help on a hit test for class project

**URL:** <https://forum.kirupa.com/t/please-need-help-on-a-hit-test-for-class-project/139734>\
**Category:** Uncategorized\
**Created:** [March 5, 2005, 3:06am UTC](https://forum.kirupa.com/t/please-need-help-on-a-hit-test-for-class-project/139734 "2005-03-05T03:06:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![james69](https://avatars.discourse-cdn.com/v4/letter/j/9dc877/32.png) [@james69](https://forum.kirupa.com/u/james69)\
**Post date:** [March 5, 2005, 3:06am UTC](https://forum.kirupa.com/t/please-need-help-on-a-hit-test-for-class-project/139734/1 "2005-03-05T03:06:20Z")

</div>

function createPig (i){  
mov = “clip”+i;  
\_root.attachMovie(“myMC”, mov, i);  
\_root[mov].\_x = -20;  
\_root[mov].\_y = Math.random()\*250;  
\_root[mov].speed = Math.random()\*5+5;  
\_root[mov].onEnterFrame = fly;  
}  
function fly(){  
this.\_x+=this.speed;  
if(this.\_x \> Stage.width){  
this.unloadMovie();  
\_root.num++;  
\_root.createPig(\_root.num);  
}  
}  
\_root.maxNum = 7;  
for(\_root.num=1; \_root.num\<\_root.maxNum; \_root.num++){  
createPig(\_root.num);  
}

what would be the hittest for the pig for this duplicate/random for this mc. I am using a crosshair to hit the pigs. I am new at actionscript. Thank you for anones help
