Line 41 1061: Call to a possibly undefined method hitTestObject through a reference with static type
Im trying to use the hit test built into flash, but its failing. I have used this many time before! but this time flash is crying at me.
I Think i know why but im not sure how to fix it.
Here is my hit test code:
stage.addEventListener( Event.ENTER_FRAME, handleCollision);
private function handleCollision( e:Event ):void { if (MissleMc.hitTestObject(Enemy)) { trace("HIT"); } else { trace("MISS"); } }
I have tried multiple things, Changing instances, location of the code. I currently have 4 classes, Main, Missile, Enemy and House. House has nothing it in really. Missile make a missile, Enemy Makes a enemy. And main deals with adding it all to the stage, and making it randomly appear ect.