Hi guys. I am new here and thought I’d introduce myself with a problem
I get this error
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at shot/eFrame()
From this code.
private function eFrame(event:Event):void{
this.x += 6
if (this.x > 240) {
this.parent.removeChild(this);
this.removeEventListener(Event.ENTER_FRAME, eFrame)
}
It is an enter from function on a class called shot. It kills itself when it gets off the screen. Now the error doesn’t occur for every shot. It seems to be random which ones actually get the error. I don’t know what the problem is.