# Newbie: Cannot access a property or method of a null object reference help!

**URL:** <https://forum.kirupa.com/t/newbie-cannot-access-a-property-or-method-of-a-null-object-reference-help/304832>\
**Category:** flash\
**Created:** [February 15, 2010, 5:18am UTC](https://forum.kirupa.com/t/newbie-cannot-access-a-property-or-method-of-a-null-object-reference-help/304832 "2010-02-15T05:18:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sdb07090](https://avatars.discourse-cdn.com/v4/letter/s/e5b9ba/32.png) [@sdb07090](https://forum.kirupa.com/u/sdb07090)\
**Post date:** [February 15, 2010, 5:18am UTC](https://forum.kirupa.com/t/newbie-cannot-access-a-property-or-method-of-a-null-object-reference-help/304832/1 "2010-02-15T05:18:23Z")

</div>

So I’m trying to make a circle that moves left and right and creates a bullet that moves up. I have two classes, the circle and the bullet. When I try to run the code, I get: TypeError: Error #1009: Cannot access a property or method of a null object reference.  
at Bullet/::enterFrameEvents()

here’s my code for the Bullet Class that is created:

```auto
package {
    
    import flash.display.*;
    
    import flash.events.*;
    
    import Character;
    
    public class Bullet extends MovieClip {
        private var bulletSpeed:Number = 10;
        
        
        public function Bullet(){
                addEventListener(Event.ADDED, beginClass);
                addEventListener(Event.ENTER_FRAME, enterFrameEvents);
        }
                
                private function beginClass(event:Event):void{
                    this.x = 200;
                    this.y = 30;
                }
                
                
                private function enterFrameEvents(event:Event):void{
                    this.y += bulletSpeed;
                    
                    if (this.y >= 400){
                        
                    this.parent.removeChild(this);

                    }
                }
                    }
    } 

```

also, I know the bullet is always created in the same spot. I don’t know how to do that yet. Thanks
