I am working on a very simple astroids-type game for class in Flash CS3 using Action Script 3 and this is the error I keep getting:

Error #1067: Implicit coercion of a value of type String to an unrelated type.

I'm an extreme newbie when it comes to programming flash and I cannot find what is wrong with my code. I ANYONE could find it for me I would be eternally grateful. The sooner the better... my assignment is due on Sunday by 11:59. I know people are sketchy about downloading zip files from unknown people on the net, but I'm desperate and every single file on my computer is ALWAYS virus free. If anyone would be willing to take a look at my files, notify me and I can email you to them... they are over the zip file size limit (1.48 MB). You guys are awesome... thanks in advance.

Here is my code-

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

//Constants
public class KuiperSurvival extends MovieClip {
static const shipRotationSpeed:Number = .1;
static const rockSpeedStart:Number = .03;
static const rockSpeedIncrease:Number = .02;
static const missileSpeed:Number = .2;
static const thrustPower:Number = .15;
static const shipRadius:Number = 20;
static const startingShips:uint = 3;

// Game Objects
private var ship:Ship;
private var rocks:Array;
private var missiles:Array;

//Animation Timer
private var lastTime:uint;

//Arrow Keys
private var rightArrow:Boolean = false;
private var leftArrow:Boolean = false;
private var upArrow:Boolean = false;

//Ship's Velocity
private var shipMoveX:Number;
private var shipMoveY:Number;

//Timers
private var delayTimer:Timer;
private var shieldTimer:Timer;

//Game Mode
private var gameMode:String;
private var shieldOn:Boolean;

//Ships and Shields
private var shipsLeft:uint;
private var shieldsLeft:uint;
private var shipIcons:Array;
private var shieldIcons:Array;
private var scoreDisplay:TextField;

//Score and Level
private var gameScore:Number;
private var gameLevel:uint;

//Sprites
private var gameObjects:Sprite;
private var scoreObjects:Sprite;


//Start Game
public function startKuiperSurvival() {
// set up sprites
gameObjects = new Sprite();
addChild(gameObjects);
scoreObjects = new Sprite();
addChild(scoreObjects);

//Reset UI Objects
gameLevel = 1;
shipsLeft = startingShips;
gameScore = 0;
createShipIcons();
createScoreDisplay();

//Listener Setup
addEventListener(Event.ENTER_FRAME,moveGameObjects );
stage.addEventListener(KeyboardEvent.KEY_DOWN,keyD ownFunction);
stage.addEventListener(KeyboardEvent.KEY_UP,keyUpF unction);

//Start
gameMode = "delay";
shieldOn = false;
missiles = new Array();
nextRockWave(null);
newShip(null);
}


// SCORE OBJECTS

// Ships Left
public function createShipIcons() {
shipIcons = new Array();
for(var i:uint=0;i<shipsLeft;i++) {
var newShip:ShipIcon = new ShipIcon();
newShip.x = 20+i*15;
newShip.y = 375;
scoreObjects.addChild(newShip);
shipIcons.push(newShip);
}
}

// Shields Left
public function createShieldIcons() {
shieldIcons = new Array();
for(var i:uint=0;i<shieldsLeft;i++) {
var newShield:ShieldIcon = new ShieldIcon();
newShield.x = 530-i*15;
newShield.y = 375;
scoreObjects.addChild(newShield);
shieldIcons.push(newShield);
}
}

//Score Upper Right
public function createScoreDisplay() {
scoreDisplay = new TextField();
scoreDisplay.x = 500;
scoreDisplay.y = 10;
scoreDisplay.width = 40;
scoreDisplay.selectable = false;
var scoreDisplayFormat = new TextFormat();
scoreDisplayFormat.color = 0xFFFFFF;
scoreDisplayFormat.font = "Arial";
scoreDisplayFormat.align = "right";
scoreDisplay.defaultTextFormat = scoreDisplayFormat;
scoreObjects.addChild(scoreDisplay);
updateScore();
}

//New Score
public function updateScore() {
scoreDisplay.text = String(gameScore);
}

//Remove Ship Icon
public function removeShipIcon() {
scoreObjects.removeChild(shipIcons.pop());
}

//Remove Shield Icon
public function removeShieldIcon() {
scoreObjects.removeChild(shieldIcons.pop());
}

//Remove Rest Ship Icons
public function removeAllShipIcons() {
while (shipIcons.length > 0) {
removeShipIcon();
}
}

//Remove Rest Shield Icons
public function removeAllShieldIcons() {
while (shieldIcons.length > 0) {
removeShieldIcon();
}
}


// SHIP CREATION AND MOVEMENT

//New Ship
public function newShip(event:TimerEvent) {
// if ship exists, remove it
if (ship != null) {
gameObjects.removeChild(Ship);
ship = null;
}

//No Ships
if (shipsLeft < 1) {
endGame();
return;
}

//Add and Place New Ship
ship = new Ship();
ship.gotoAndStop(1);
ship.x = 275;
ship.y = 200;
ship.rotation = -90;
ship.shield.visible = false;
gameObjects.addChild(ship);

//Ship Properties
shipMoveX = 0.0;
shipMoveY = 0.0;
gameMode = "play";

//Shield Setup
shieldsLeft = 3;
createShieldIcons();

//Free Shield Lives 2 and 3 only
if (shipsLeft != startingShips) {
startShield(true);
}
}

//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();
} else if (event.keyCode == 90) { // z
startShield(false);
}
}

//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) {

//Rotation 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
ship.x += shipMoveX;
ship.y += shipMoveY;

//Screen Wraparound
if ((shipMoveX > 0) && (ship.x > 570)) {
ship.x -= 590;
}
if ((shipMoveX < 0) && (ship.x < -20)) {
ship.x += 590;
}
if ((shipMoveY > 0) && (ship.y > 420)) {
ship.y -= 440;
}
if ((shipMoveY < 0) && (ship.y < -20)) {
ship.y += 440;
}
}

//Remove Ship
public function shipHit() {
gameMode = "delay";
ship.gotoAndPlay("explode");
removeAllShieldIcons();
delayTimer = new Timer(2000,1);
delayTimer.addEventListener(TimerEvent.TIMER_COMPL ETE,newShip);
delayTimer.start();
removeShipIcon();
shipsLeft--;
}

//3 Second Shield
public function startShield(freeShield:Boolean) {
if (shieldsLeft < 1) return; // no shields left
if (shieldOn) return; // shield already on

//Shield Activation and Turn-off
ship.shield.visible = true;
shieldTimer = new Timer(3000,1);
shieldTimer.addEventListener(TimerEvent.TIMER_COMP LETE,endShield);
shieldTimer.start();

//Shield Number Update
if (!freeShield) {
removeShieldIcon();
shieldsLeft--;
}
shieldOn = true;
}

//Turn off Shield
public function endShield(event:TimerEvent) {
ship.shield.visible = false;
shieldOn = false;
}

// ROCKS

// Specific Rock Size
public function newRock(x,y:int, rockType:String) {

// Create New Class
var newRock:MovieClip;
var rockRadius:Number;
if (rockType == "Big") {
newRock = new Rock_Big();
rockRadius = 35;
} else if (rockType == "Medium") {
newRock = new Rock_Medium();
rockRadius = 20;
} else if (rockType == "Small") {
newRock = new Rock_Small();
rockRadius = 10;
}

// Here is an alternate way to do the above, without a case statement
// Need to import flash.utils.getDefinitionByName to use
/*
var rockClass:Object = getDefinitionByName("Rock_"+rockType);
var newRock:MovieClip = new rockClass();
*/

//Random Look
newRock.gotoAndStop(Math.ceil(Math.random()*3));

//Start Position
newRock.x = x;
newRock.y = y;

//Random Movement and Rotation
var dx:Number = Math.random()*2.0-1.0;
var dy:Number = Math.random()*2.0-1.0;
var dr:Number = Math.random();

//Add to Stage and List
gameObjects.addChild(newRock);
rocks.push({rock:newRock, dx:dx, dy:dy, dr:dr, rockType:rockType, rockRadius: rockRadius});
}

//Make 4 Rocks
public function nextRockWave(event:TimerEvent) {
rocks = new Array();
newRock(100,100,"Big");
newRock(100,300,"Big");
newRock(450,100,"Big");
newRock(450,300,"Big");
gameMode = "play";
}

//Rock Animation
public function moveRocks(timeDiff:uint) {
for(var i:int=rocks.length-1;i>=0;i--) {

//Rock Movement
var rockSpeed:Number = rockSpeedStart + rockSpeedIncrease*gameLevel;
rocks[i].rock.x += rocks[i].dx*timeDiff*rockSpeed;
rocks[i].rock.y += rocks[i].dy*timeDiff*rockSpeed;

//Rock Rotation
rocks[i].rock.rotation += rocks[i].dr*timeDiff*rockSpeed;

//Rock Wrap
if ((rocks[i].dx > 0) && (rocks[i].rock.x > 570)) {
rocks[i].rock.x -= 590;
}
if ((rocks[i].dx < 0) && (rocks[i].rock.x < -20)) {
rocks[i].rock.x += 590;
}
if ((rocks[i].dy > 0) && (rocks[i].rock.y > 420)) {
rocks[i].rock.y -= 440;
}
if ((rocks[i].dy < 0) && (rocks[i].rock.y < -20)) {
rocks[i].rock.y += 440;
}
}
}

public function rockHit(rockNum:uint) {
//Two Smaller Rocks
if (rocks[rockNum].rockType == "Big") {
newRock(rocks[rockNum].rock.x,rocks[rockNum].rock.y,"Medium");
newRock(rocks[rockNum].rock.x,rocks[rockNum].rock.y,"Medium");
} else if (rocks[rockNum].rockType == "Medium") {
newRock(rocks[rockNum].rock.x,rocks[rockNum].rock.y,"Small");
newRock(rocks[rockNum].rock.x,rocks[rockNum].rock.y,"Small");
}
//Remove Original
gameObjects.removeChild(rocks[rockNum].rock);
rocks.splice(rockNum,1);
}


// MISSILES

// 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;

//Add to Stage and Array
gameObjects.addChild(newMissile);
missiles.push(newMissile);
}

//Missile Animation
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;
// Move Off Screen
if ((missiles[i].x < 0) || (missiles[i].x > 550) || (missiles[i].y < 0) || (missiles[i].y > 400)) {
gameObjects.removeChild(missiles[i]);
delete missiles[i];
missiles.splice(i,1);
}
}
}

// Remove Missile
public function missileHit(missileNum:uint) {
gameObjects.removeChild(missiles[missileNum]);
missiles.splice(missileNum,1);
}

// GAME INTERACTION AND CONTROL

public function moveGameObjects(event:Event) {
// Timer Diff and Animation
var timePassed:uint = getTimer() - lastTime;
lastTime += timePassed;
moveRocks(timePassed);
if (gameMode != "delay") {
moveShip(timePassed);
}
moveMissiles(timePassed);
checkCollisions();
}

//Rock/Missile Collision
public function checkCollisions() {
//Loop Through Rocks
rockloop: for(var j:int=rocks.length-1;j>=0;j--) {
//Loop Through Missiles
missileloop: for(var i:int=missiles.length-1;i>=0;i--) {
//Colision Detection
if (Point.distance(new Point(rocks[j].rock.x,rocks[j].rock.y),
new Point(missiles[i].x,missiles[i].y))
< rocks[j].rockRadius) {

//Remove Rock and Missile
rockHit(j);
missileHit(i);

//Score Addition
gameScore += 20;
updateScore();

//Continue to Next Loop
continue rockloop;
}
}

//Rock Hits Ship?
if (gameMode == "play") {
if (shieldOn == false) { // only if shield is off
if (Point.distance(new Point(rocks[j].rock.x,rocks[j].rock.y),
new Point(ship.x,ship.y))
< rocks[j].rockRadius+shipRadius) {

//Remove Rock and Ship
shipHit();
rockHit(j);
}
}
}
}

//No Rocks; Game Mode Change and Make More
if ((rocks.length == 0) && (gameMode == "play")) {
gameMode = "betweenlevels";
gameLevel++; // advance a level
delayTimer = new Timer(2000,1);
delayTimer.addEventListener(TimerEvent.TIMER_COMPL ETE,nextRockWave);
delayTimer.start();
}
}

public function endGame() {
//Remove Objects and Listeners
removeChild(gameObjects);
removeChild(scoreObjects);
gameObjects = null;
scoreObjects = null;
removeEventListener(Event.ENTER_FRAME,moveGameObje cts);
stage.removeEventListener(KeyboardEvent.KEY_DOWN,k eyDownFunction);
stage.removeEventListener(KeyboardEvent.KEY_UP,key UpFunction);

gotoAndStop("gameover");
}

}
}