Okay, used previous advice to get the code working error free, but their is still no hit detection. I’m trying to avoid the hitTestpoint method and get this approach working.
package{
import flash.display.;
import flash.events.;
public class BoxAttack extends MovieClip{
public var fireArray = new Array();
public var nb:Box = new Box(Math.random()*500, Math.random()*400, Math.random()*3, Math.random()*3, Math.random()*.001, Math.random()*.001);
public function BoxAttack(){
//fires gun!
stage.addEventListener(MouseEvent.MOUSE_DOWN, fired);
//creates a couple random sized/placed/scaling boxes!!
for(var i:int; i<3; i++){
addChild(nb);
}
for(var t:int; t=fireArray.length; t++){
if(fireArray[t].hitTestObject(nb)){
trace('hit');
}
}
}
//mouse fires!
public function fired(eveter:MouseEvent){
trace('working!');
fireArray.push(addChild(new fireArm));
trace(fireArray);
}
}
}