Okay, I hate coming for so much help but I’m miserable here. Basically the code creates 3 sasquatches. When you click on the sasquatch it displays “you be dead sucka!”, well, only ONE of the 3 sasquatches are registering hits, and the one that does traces “you be dead” 4 times. How do I get them all to register? *Note: big thanks to Flashm on my last problem’s help.
package{
import flash.display.*;
import flash.events.*;
public class SQD extends MovieClip{
public var squatchArray:Array = new Array();
public var one:Sasquatch;
public function SQD(){
stage.addEventListener(MouseEvent.MOUSE_DOWN, attack);
trace('working');
for(var i:int =0; i<3; i++){
one=new Sasquatch;
addChild(one);
one.x = Math.random()*500;
one.y = Math.random()*400;
squatchArray.push(one);
trace(squatchArray);
}
}
public function attack(mouseEv:MouseEvent){
trace('Kung Fu Attack');
for(var t:int = 0; t <=squatchArray.length; t++){
if(one.hitTestPoint(mouseEv.stageX, mouseEv.stageY, true)){
trace('You be dead sucka!!')
}
}
}
}
}