Big Probs in RiverCity

Hello, My problem is I get this error over and over again and I can’t figure out the problem. The error is:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at SpaceWolf/moveMissiles()
at SpaceWolf/moveGameObjects()
If anyone has the time to help I’d be most appreciative. Thanks in advance. Here’s the code:

package{
import flash.display.;
import flash.events.
;
import flash.text.*;
import flash.utils.getTimer;
import flash.utils.Timer;
import flash.geom.Point;

public class SpaceWolf extends MovieClip {
	
	static const shipRotationSpeed:Number = .1;
	static const missileSpeed:Number = .2;
	static const thrustPower:Number = .25;
	static const shipRadius:Number = 20;
	
	
	
	private var ship:Ship;
	private var missiles:Array;
	// arrow keys
	private var rightArrow:Boolean = false;
	private var leftArrow:Boolean = false;
	private var upArrow:Boolean = false;
	
	// ship velocity
	private var shipMoveX:Number;
	private var shipMoveY:Number;
	
	private var gameMode:String;
	
	private var gameObjects:Sprite;
	private var lastTime:uint;
	private var star1:Star1;
	private var star2:Star2;
	private var star3:Star3;
	private var numberOfStars:Number;
	private var speedModifier:Number;
	private var starsArray1:Array;
	private var starsArray2:Array;
	private var starsArray3:Array;
	var speedX:Number = 0;
	var speedY:Number = 0;
	
	
	
	public function SpaceWolf() {
		
		gameObjects = new Sprite();
		addChild(gameObjects);
		//set up listeners
		addEventListener(Event.ENTER_FRAME,moveGameObjects);
		stage.addEventListener(KeyboardEvent.KEY_DOWN,keyDownFunction);
		stage.addEventListener(KeyboardEvent.KEY_UP,keyUpFunction);
			
		newShip();
		createField(1);
		createField(2);
		createField(3);
		
		
	}
	//creates star field based on type
	public function createField(_type:Number){
		
		if(_type == 1){
			starsArray1 = new Array();
			for (var i:Number = 0; i<10;i++) {
				var star1:Star1 = new Star1();
				tempStar(star1);
				starsArray1.push(star1);
			}
		}
			else if(_type == 2){
				starsArray2 = new Array();
			for (var j:Number = 0; j<25;j++) {
				var star2:Star2 = new Star2();
				tempStar(star2);
				starsArray2.push(star2);
				}
			}
			else if(_type == 3){
				starsArray3 = new Array();
			for (var k:Number = 0; k<50;k++) {
				var star3:Star3 = new Star3();
				tempStar(star3);
				starsArray3.push(star3);
				}
			}
			
	}
		
	public function tempStar(star){
	
	star.x = (Math.floor(Math.random()*650));
	star.y = (Math.floor(Math.random()*600));
	addChildAt(star,0);
	}
	

		
		
		
	
	
	




public function updateStars(){
	
	//run a for loop based on array length
for(var l = 0; l < starsArray1.length; l++){
	starsArray1[l].x += speedX * .15;
	starsArray1[l].y += speedY * .15;
	var star:MovieClip = starsArray1[l];
	starChild(star);
}
	
for(var m = 0; m < starsArray2.length; m++){
	starsArray2[m].x += speedX * .3;
	starsArray2[m].y += speedY * .3;
	var starTwo:MovieClip = starsArray2[m];
	starChild(starTwo);
}
	
for(var n = 0; n < starsArray3.length; n++){
	starsArray3[n].x += speedX * .45;
	starsArray3[n].y += speedY * .45;
	var starThree:MovieClip = starsArray3[n];
	starChild(starThree);
}
}
	
	
	
	
	
	
	
	


function starChild(star){

if (star.x >= 650) 
	{
		//outside boundry, move to other side of container
		star.x = 0;
		star.y = (Math.floor(Math.random()*600));
		
	}
	else if (star.x <= 0) 
	{
		//outside boundry, move to other side of container
		star.x = 650;
		star.y = (Math.floor(Math.random()*600));
	}
	
	//check Y boudries
	if (star.y >= 600) 
	{
		//outside boundry, move to other side of container
		star.x = (Math.floor(Math.random()*600));
		star.y = 0;
	}
	else if (star.y <= 0) 
	{
		//outside boundry, move to other side of container
		star.x = (Math.floor(Math.random()*600));
		star.y = 600;
	}
}

		
	

			
			
			
		
			
		
	
	// create a new ship
	public function newShip(){ 
		ship = new Ship();
		ship.gotoAndStop(1);
		ship.x = 325;
		ship.y = 300;
		ship.rotation = -90;
		
		
		// create, position, and add new ship
		addChildAt(ship,1);
		shipMoveX = 0.0;
		shipMoveY = 0.0;
		gameMode = "play";
		
	
	}
	
	
	// MISSILES
	
	// create a new Missile
	public function newMissile() {
		// create
		var newMissile:Missile = new Missile();
		
		// set direction
		newMissile.dx = Math.cos(Math.PI*ship.rotation/180);
		newMissile.dy = Math.sin(Math.PI*ship.rotation/180);
		
		// placement
		newMissile.x = ship.x + newMissile.dx*shipRadius;
		newMissile.y = ship.y + newMissile.dy*shipRadius;
		newMissile.rotation = ship.rotation;
		// add to stage and array
		gameObjects.addChild(newMissile);
		missiles.push(newMissile);
		
		
	}
	
	// animate missiles
	public function moveMissiles(timeDiff:uint) {
		for(var i:int=missiles.length-1;i>=0;i--) {
			// move
			missiles[i].x += missiles[i].dx*missileSpeed*timeDiff;
			missiles[i].y += missiles[i].dy*missileSpeed*timeDiff;
			// moved off screen
			if ((missiles[i].x < 0) || (missiles[i].x > 650) || (missiles[i].y < 0) || (missiles[i].y > 600)) {
				gameObjects.removeChild(missiles[i]);
				delete missiles[i];
				missiles.splice(i,1);
			}
		}
	}
	
	
	
	
			
				
	// register key presses
	public function keyDownFunction(event:KeyboardEvent) {
		if (event.keyCode == 37) {
				leftArrow = true;
		} else if (event.keyCode == 39) {
				rightArrow = true;
		} else if (event.keyCode == 38) {
				upArrow = true;
				// show thruster
				if (gameMode == "play") ship.gotoAndStop(2);
		} else if (event.keyCode == 32) { // space
				newMissile();
		
		}
	}
		
	// register key ups
	public function keyUpFunction(event:KeyboardEvent) {
		if (event.keyCode == 37) {
			leftArrow = false;
		} else if (event.keyCode == 39) {
			rightArrow = false;
		} else if (event.keyCode == 38) {
			upArrow = false;
			// remove thruster
			if (gameMode == "play") ship.gotoAndStop(1);
		}
	}
	
	// animate ship
	public function moveShip(timeDiff:uint) {
		
		// rotate and thrust
		if (leftArrow) {
			ship.rotation -= shipRotationSpeed*timeDiff;
		} else if (rightArrow) {
			ship.rotation += shipRotationSpeed*timeDiff;
		} else if (upArrow) {
			shipMoveX += Math.cos(Math.PI*ship.rotation/180)*thrustPower;
			shipMoveY += Math.sin(Math.PI*ship.rotation/180)*thrustPower;
		}
		
		// move
		speedX -= shipMoveX;
		speedY -= shipMoveY;
		
		if (speedX <-9) {
			speedX = -9;
		}
		if (speedX > 9) {
			speedX = 9;
		
		}
		if (speedY <-9) {
			speedY = -9;
		}
		if (speedY > 9) {
			speedY = 9;
		
		}
		
	}
	
	
	
	
	
	
	public function moveGameObjects(event:Event) {
		// get timer difference and animate
		var timePassed:uint = getTimer() - lastTime;
		lastTime += timePassed;
		
		if (gameMode != "delay") {
			
			moveShip(timePassed);
			updateStars();
		}
		
		moveMissiles(timePassed);
		//checkCollisions();
	}
	
	public function endGame() {
		// remove all objects and listeners
		removeChild(gameObjects);
		
		gameObjects = null;
		
		removeEventListener(Event.ENTER_FRAME,moveGameObjects);
		stage.removeEventListener(KeyboardEvent.KEY_DOWN,keyDownFunction);
		stage.removeEventListener(KeyboardEvent.KEY_UP,keyUpFunction);
		
		gotoAndStop("gameover");
	}
	
}

}

I found out what the problem was but thanks folks.