Okay, finally have a working hitTest (YAY!!!), now, my code is setup to create 3 ‘sasquatches’, the problem is for the hitTest to work, the variable “one” has to be public. Now, in the next bit of code we create 3 instances of one using a for loop, BUT they all three are in the same spot cause I can’t figure out how to pass Random numbers to the variable each time it creates, know what I mean? Help…
package{
import flash.display.*;
import flash.events.*;
public class SQD extends MovieClip{
public var squatchArray:Array = new Array();
public var one:Sasquatch = new Sasquatch();
public function SQD(){
stage.addEventListener(MouseEvent.MOUSE_DOWN, attack);
trace('working');
for(var i:int =0; i<3; i++){
addChild(one);
squatchArray.push(one);
trace(squatchArray);
}
}
public function attack(mouseEv:MouseEvent){
trace('attacking');
for(var t:int = 0; t <=squatchArray.length; t++){
if(one.hitTestPoint(mouseEv.stageX, mouseEv.stageY, true)){
trace('you be dead')
}
}
}
}
}