Frame 1
_quality = "HIGH";
Stage.showMenu = false;
playButton._visible = false;
this.onEnterFrame = function () {
tBytes = _root.getBytesTotal();
lBytes = _root.getBytesLoaded();
percentLoaded = Math.floor((lBytes / tBytes) * 100);
if (lBytes >= tBytes) {
returnToZero = true;
loadArrow._visible = false;
playButton._visible = true;
this.onEnterFrame = null;
}
};
Instance of Symbol 12 MovieClip "circle0" in Frame 1
onClipEvent (enterFrame) {
if (_alpha < 100) {
_alpha = (_alpha + 1);
}
}
Instance of Symbol 14 MovieClip "loadArrow" in Frame 1
onClipEvent (enterFrame) {
this._rotation = 3.6 * _root.percentLoaded;
}
Instance of Symbol 16 MovieClip "circle1" in Frame 1
onClipEvent (enterFrame) {
if ((!_parent.returnToZero) || (Math.abs(Math.cos(count) * 7) > 2)) {
count = count + 0.03;
this._rotation = this._rotation - (Math.cos(count) * 7);
} else if ((_rotation != 0) && (Math.abs(_rotation) != 1)) {
_rotation = Math.floor(_rotation);
if (_rotation > 0) {
_rotation = (_rotation - 2);
} else {
_rotation = (_rotation + 2);
}
}
}
Instance of Symbol 27 MovieClip "circle2" in Frame 1
onClipEvent (enterFrame) {
if ((!_parent.returnToZero) || (Math.abs(Math.sin(count) * 8) > 2)) {
count = count + 0.01;
_rotation = (_rotation + (Math.sin(count) * 8));
} else if ((_rotation != 0) && (Math.abs(_rotation) != 1)) {
_rotation = Math.floor(_rotation);
if (_rotation > 0) {
_rotation = (_rotation - 2);
} else {
_rotation = (_rotation + 2);
}
}
}
Frame 2
stop();
_quality = "HIGH";
Frame 8
for (name in this) {
this[name].removeMovieClip();
delete this[name];
}
gotoAndPlay (13);
Frame 13
function Grade(value, letter) {
this.value = value;
this.letter = letter;
}
function Level(stringName, nextLevel, passingGrade, pass, killVal) {
this.stringName = stringName;
this.nextLevel = nextLevel;
this.passingGrade = passingGrade;
this.currentGrade = gradeNA;
this.pass = pass;
this.killVal = killVal;
}
function PlayerShip(mcClip, cTurn, cAccel, cBrake, cRecharge, cHP, cEnergy, cLives) {
this.clip = mcClip;
this.turnSpeed = cTurn;
this.accel = cAccel;
this.brake = cBrake;
this.recharge = cRecharge;
this.MAXHP = cHP;
this.MAXENERGY = cEnergy;
this.lives = cLives;
this.livesString = new String(cLives);
}
function Ammo(mcPU, cWeapon, cAmount, mcBlip) {
this.clip = mcPU;
this.weapon = cWeapon;
this.amount = cAmount;
this.blipClip = mcBlip;
powerUpArray[powerUpArray.length] = this;
}
function HealthUp(mcPU, cAmount, mcBlip) {
this.clip = mcPU;
this.amount = cAmount;
this.blipClip = mcBlip;
powerUpArray[powerUpArray.length] = this;
}
function Enemy(mcEnemy, cHP, cCollisionDamage, cPower, cSpeed, cTurnSpeed, mcBlip, cPUC) {
this.clip = mcEnemy;
this.HP = cHP;
this.collisionDamage = cCollisionDamage;
this.power = cPower;
this.accel = cSpeed;
this.turnSpeed = cTurnSpeed;
this.blipClip = mcBlip;
this.powerUpChance = cPUC;
}
function Weapon(mcWeap, mcShot, cAmmo, cPower, cSpeed, cUsage) {
this.clip = mcWeap;
this.shot = mcShot;
this.ammo = cAmmo;
this.speed = cSpeed;
this.usage = cUsage;
this.power = cPower;
this.ammoString = new String(this.ammo);
}
function makePowerUp(pux, puy) {
randomPowerUpNdx = Math.floor(Math.random() * powerUpArray.length);
powerUpArray[randomPowerUpNdx].spawn(pux, puy);
}
function gameOver() {
_root.gotoAndPlay("gameOver");
}
function Upgrade(desc, value, price, nextUG) {
this.desc = desc;
this.value = value;
this.price = price;
this.next = nextUG;
}
battleTheme = new Sound();
battleIntro = new Sound();
cantina = new Sound();
explosion = new Sound();
hiss = new Sound();
hit = new Sound();
squish = new Sound();
squish.attachSound("squish");
hit.attachSound("hit");
hiss.attachSound("hiss");
explosion.attachSound("explosion");
cantina.attachSound("cantina");
battleIntro.attachSound("battleIntro");
battleTheme.attachSound("battleTheme");
stopAllSounds();
_quality = "HIGH";
totalScore = 0;
spendableScore = 0;
cheatScale = 1;
shipScale = 1;
enemyScale = 1;
enemyAlpha = 1;
powerUpArray = new Array();
Weapon.prototype = new Object();
Enemy.prototype = new Object();
Ammo.prototype = new Object();
HealthUp.prototype = new Object();
PlayerShip.prototype = new Object();
Level.prototype = new Object();
Grade.prototype = new Object();
gradeAPlus = new Grade(6, "A+");
gradeA = new Grade(5, "A");
gradeB = new Grade(4, "B");
gradeC = new Grade(3, "C");
gradeD = new Grade(2, "D");
gradeDMinus = new Grade(1.5, "D-");
gradeF = new Grade(1, "F");
gradeNA = new Grade(0, "N/A");
Vagina = new Level("Vagina", "Uterus", gradeDMinus, "toxicshock", 50);
Uterus = new Level("Uterus", "Ovary", gradeDMinus, "overeasy", 75);
Ovary = new Level("Ovary", "Bladder", gradeDMinus, "canteen", 100);
Bladder = new Level("Bladder", "Kidney", gradeDMinus, "beansprout", 100);
Kidney = new Level("Kidney", "Mouth", gradeDMinus, "nextbestthing", 150);
Mouth = new Level("Mouth", "Stomach", gradeDMinus, "gullet", 150);
Stomach = new Level("Stomach", "Intestine", gradeDMinus, "poopshoot", 200);
Intestine = new Level("Intestine", "Sigmoid", gradeDMinus, "flexoid", 200);
Sigmoid = new Level("Sigmoid", "Rectum", gradeD, "twowaytraffic", 250);
Rectum = new Level("Rectum", "Rectum", gradeD, "silentbutdeadly", 300);
levelArray = new Array(Vagina, Uterus, Ovary, Bladder, Kidney, Mouth, Stomach, Intestine, Sigmoid, Rectum);
puSpawn = function (pux, puy) {
PUPlace = new Object();
PUPlace._x = pux;
PUPlace._y = puy;
attachMovie(this.clip, this.clip + layer, layer++, PUPlace);
};
Ammo.prototype.spawn = puSpawn;
HealthUp.prototype.spawn = puSpawn;
Enemy.prototype.spermSpawn = function () {
spawnPlace = new Object();
spawnNdx = Math.floor(Math.random() * bg.spermSpawnPlaceArray.length);
spawnPlace._y = bg.wayPoint[bg.spermSpawnPlaceArray[spawnNdx]].y;
spawnPlace._x = bg.wayPoint[bg.spermSpawnPlaceArray[spawnNdx]].x;
spawnPlace._xscale = (spawnPlace._yscale = (cheatScale * enemyScale) * 100);
spawnPlace._alpha = enemyAlpha * 100;
attachMovie(this.clip, this.clip + layer, layer++, spawnPlace);
};
Enemy.prototype.spawn = function () {
spawnPlace = new Object();
spawnNdx = Math.floor(Math.random() * bg.spawnPlaceArray.length);
spawnPlace._y = bg.wayPoint[bg.spawnPlaceArray[spawnNdx]].y;
spawnPlace._x = bg.wayPoint[bg.spawnPlaceArray[spawnNdx]].x;
spawnPlace._xscale = (spawnPlace._yscale = (cheatScale * enemyScale) * 100);
spawnPlace._alpha = enemyAlpha * 100;
attachMovie(this.clip, this.clip + layer, layer++, spawnPlace);
};
Weapon.prototype.fire = function () {
shotPlace = new Object();
shotPlace._y = ship._y;
shotPlace._x = ship._x;
shotPlace._rotation = ship._rotation;
shotPlace.shipXSpeed = ship.xSpeed;
shotPlace.shipYSpeed = ship.ySpeed;
attachMovie(this.shot, this.shot + layer, layer++, shotPlace);
if (this.ammo != "INF") {
this.ammo--;
}
stats[this.clip + "Ammo"].text = this.ammo;
};
laserTurret = new Weapon("laserTurret", "laserTurretShot", "INF", 1, 15, 20);
heavyLaser = new Weapon("heavyLaser", "heavyLaserShot", 10, 2, 12, 30);
spreader = new Weapon("spreader", "spreaderShot", 10, 1, 15, 25);
wave = new Weapon("wave", "waveShot", 10, 1, 0, 20);
pulse = new Weapon("pulse", "pulseShot", "INF", 7, 0, 50);
nuke = new Weapon("nuke", "nukeShot", 0, 8, 0, 35);
torpedo = new Weapon("torpedo", "torpedoShot", 2, 4, 1, 20);
beacon = new Weapon("beacon", "beaconShot", 0, 0, 0, 30);
foam = new Weapon("foam", "foamShot", 1, 3, 0, 35);
antibody = new Weapon("antibody", "antiBodyShot", 2, 0.25, 10, 35);
antibiotic = new Weapon("antibiotic", "antibioticShot", 10, 0.25, 0, 5);
pesticide = new Weapon("pesticide", "pesticideShot", 3, 0.25, 0, 35);
heavyAmmo = new Ammo("heavyAmmo", heavyLaser, 10, "blueBlip");
spreaderAmmo = new Ammo("spreaderAmmo", spreader, 10, "blueBlip");
waveAmmo = new Ammo("waveAmmo", wave, 10, "blueBlip");
heavyAmmo1 = new Ammo("heavyAmmo", heavyLaser, 10, "blueBlip");
spreaderAmmo1 = new Ammo("spreaderAmmo", spreader, 10, "blueBlip");
waveAmmo1 = new Ammo("waveAmmo", wave, 10, "blueBlip");
heavyAmmo2 = new Ammo("heavyAmmo", heavyLaser, 10, "blueBlip");
spreaderAmmo2 = new Ammo("spreaderAmmo", spreader, 10, "blueBlip");
waveAmmo2 = new Ammo("waveAmmo", wave, 10, "blueBlip");
heavyAmmo3 = new Ammo("heavyAmmo", heavyLaser, 10, "blueBlip");
spreaderAmmo3 = new Ammo("spreaderAmmo", spreader, 10, "blueBlip");
waveAmmo3 = new Ammo("waveAmmo", wave, 10, "blueBlip");
nukeAmmo = new Ammo("nukeAmmo", nuke, 2, "blueBlip");
nukeAmmo1 = new Ammo("nukeAmmo", nuke, 2, "blueBlip");
torpedoAmmo = new Ammo("torpedoAmmo", torpedo, 5, "blueBlip");
torpedoAmmo1 = new Ammo("torpedoAmmo", torpedo, 5, "blueBlip");
torpedoAmmo2 = new Ammo("torpedoAmmo", torpedo, 5, "blueBlip");
beaconAmmo = new Ammo("beaconAmmo", beacon, 1, "blueBlip");
beaconAmmo1 = new Ammo("beaconAmmo", beacon, 1, "blueBlip");
foamAmmo = new Ammo("foamAmmo", foam, 5, "blueBlip");
pesticideAmmo = new Ammo("pesticideAmmo", pesticide, 5, "blueBlip");
antibioticAmmo = new Ammo("antibioticAmmo", antibiotic, 10, "blueBlip");
antibodyAmmo = new Ammo("antibodyAmmo", antibody, 5, "blueBlip");
foamAmmo1 = new Ammo("foamAmmo", foam, 5, "blueBlip");
pesticideAmmo1 = new Ammo("pesticideAmmo", pesticide, 5, "blueBlip");
antibioticAmmo1 = new Ammo("antibioticAmmo", antibiotic, 10, "blueBlip");
antibodyAmmo1 = new Ammo("antibodyAmmo", antibody, 5, "blueBlip");
foamAmmo2 = new Ammo("foamAmmo", foam, 5, "blueBlip");
pesticideAmmo2 = new Ammo("pesticideAmmo", pesticide, 5, "blueBlip");
antibioticAmmo2 = new Ammo("antibioticAmmo", antibiotic, 10, "blueBlip");
antibodyAmmo2 = new Ammo("antibodyAmmo", antibody, 5, "blueBlip");
health = new HealthUp("healthUp", 25, "blueBlip");
health1 = new HealthUp("healthUp", 25, "blueBlip");
health2 = new HealthUp("healthUp", 25, "blueBlip");
health3 = new HealthUp("healthUp", 25, "blueBlip");
lifeUp = new HealthUp("lifeUp", 0, "blueBlip");
ship360 = new PlayerShip("ship360", 10, 1, 0.9, 1, 100, 100, 2);
Upgrade.prototype = new Object();
MAX = new Upgrade("MAXED", -1, 0, MAX);
BRAKE_LEVEL_2 = new Upgrade("Brake Upgrade 2-", 0.5, 5000, MAX);
BRAKE_LEVEL_1 = new Upgrade("Brake Upgrade 1-", 0.75, 2500, BRAKE_LEVEL_2);
WEAPON_LEVEL_3 = new Upgrade("Gun Upgrade 3-", 3, 15000, MAX);
WEAPON_LEVEL_2 = new Upgrade("Gun Upgrade 2-", 2, 8000, WEAPON_LEVEL_3);
WEAPON_LEVEL_1 = new Upgrade("Gun Upgrade 1-", 1.5, 4000, WEAPON_LEVEL_2);
TURN_LEVEL_1 = new Upgrade("Turning Speed 1-", 14, 1500, MAX);
ACCEL_LEVEL_2 = new Upgrade("Accel Up 2-", 2, 5000, MAX);
ACCEL_LEVEL_1 = new Upgrade("Accel Up 1-", 1.5, 2500, ACCEL_LEVEL_2);
ENERGY_LEVEL_1 = new Upgrade("Max Energy Up-", 180, 5000, MAX);
RECHARGE_LEVEL_1 = new Upgrade("Recharge Up-", 2, 4000, MAX);
SHIELDS_LEVEL_3 = new Upgrade("Shield Upgrade 3-", 300, 15000, MAX);
SHIELDS_LEVEL_2 = new Upgrade("Shield Upgrade 2-", 200, 8000, SHIELDS_LEVEL_3);
SHIELDS_LEVEL_1 = new Upgrade("Shield Upgrade 1-", 150, 4000, SHIELDS_LEVEL_2);
currentBrake = BRAKE_LEVEL_1;
currentWeap = WEAPON_LEVEL_1;
currentTurn = TURN_LEVEL_1;
currentAccel = ACCEL_LEVEL_1;
currentEnergy = ENERGY_LEVEL_1;
currentRecharge = RECHARGE_LEVEL_1;
currentShields = SHIELDS_LEVEL_1;
gotoAndPlay (141);
Frame 14
stop();
Frame 19
function getPassword(inputText) {
inputText = inputText.toLowerCase();
for (name in levelArray) {
if (inputText == levelArray[name].pass) {
this["unlocked" + levelArray[name].nextLevel] = true;
hit.start();
}
}
if (inputText == "wholelottarosie") {
cheatScale = 2;
hit.start();
}
if (inputText == "bridgetthemidget") {
cheatScale = 0.5;
hit.start();
}
if (inputText == "mightymouse") {
hit.start();
shipScale = 0.5;
}
if (inputText == "ronjeremy") {
hit.start();
enemyScale = 2;
}
if (inputText == "microbe") {
hit.start();
enemyAlpha = 0;
}
if (inputText == "sperminator") {
hit.start();
currentBrake = MAX;
currentWeap = MAX;
currentTurn = MAX;
currentAccel = MAX;
currentEnergy = MAX;
currentRecharge = MAX;
currentShields = MAX;
ship360.brake = BRAKE_LEVEL_2.value;
ship360.turnSpeed = TURN_LEVEL_1.value;
ship360.accel = ACCEL_LEVEL_2.value;
ship360.MAXENERGY = ENERGY_LEVEL_1.value;
ship360.recharge = RECHARGE_LEVEL_1.value;
ship360.MAXHP = SHIELDS_LEVEL_3.value;
laserTurret.power = WEAPON_LEVEL_3.value;
heavyLaser.power = WEAPON_LEVEL_3.value * 2;
spreader.power = WEAPON_LEVEL_3.value;
wave.power = WEAPON_LEVEL_3.value;
}
if (inputText == "tantric") {
hit.start();
heavyLaser.ammo = "INF";
spreader.ammo = "INF";
wave.ammo = "INF";
foam.ammo = "INF";
antibody.ammo = "INF";
antibiotic.ammo = "INF";
pesticide.ammo = "INF";
nuke.ammo = "INF";
torpedo.ammo = "INF";
beacon.ammo = "INF";
}
if (inputText == "rasputin") {
hit.start();
ship360.MAXHP = 999999 /* 0x0F423F */;
}
if (inputText == "angrybinary") {
hit.start();
spendableScore = 999999 /* 0x0F423F */;
}
if (inputText == "silentbutdeadly") {
hit.start();
shipScale = 2;
}
}
stop();
Frame 27
stop();
_quality = "HIGH";
nextLevel = "levelSelect";
Frame 35
_quality = "HIGH";
stop();
Frame 43
_quality = "HIGH";
stop();
Frame 51
function getCurrents() {
brakeUpDesc.text = currentBrake.desc;
brakeUpPrice.text = currentBrake.price + "pts";
weaponUpDesc.text = currentWeap.desc;
weaponUpPrice.text = currentWeap.price + "pts";
shieldUpDesc.text = currentShields.desc;
shieldUpPrice.text = currentShields.price + "pts";
turnUpDesc.text = currentTurn.desc;
turnUpPrice.text = currentTurn.price + "pts";
energyUpDesc.text = currentEnergy.desc;
energyUpPrice.text = currentEnergy.price + "pts";
rechargeUpDesc.text = currentRecharge.desc;
rechargeUpPrice.text = currentRecharge.price + "pts";
accelUpDesc.text = currentAccel.desc;
accelUpPrice.text = currentAccel.price + "pts";
}
function buyAmmo(item, amount, price) {
if (spendableScore >= price) {
spendableScore = spendableScore - price;
item.ammo = item.ammo + amount;
play();
}
}
function buyUpgrade(upgrade, attribString) {
if (upgrade.value != -1) {
if (spendableScore >= upgrade.price) {
spendableScore = spendableScore - upgrade.price;
ship360[attribString] = upgrade.value;
play();
return(upgrade.next);
}
}
return(upgrade);
}
stop();
getCurrents();
Frame 53
gotoAndPlay (51);
Frame 59
function playMusic() {
stopAllSounds();
cantina.start(0, 999);
}
function waitForBG() {
if (bg.spawnPlaceArray.length > 0) {
centerScreen();
attachMovie("getReady", "ready", 99);
ready._x = -_x;
ready._y = -_y;
this.onEnterFrame = getReady;
}
}
function getReady() {
readyCount++;
if (readyCount > 59) {
readyCount = 0;
ready.removeMovieClip();
attachMovie(ship360.clip, "ship", 1);
this.onEnterFrame = levelUterus;
}
}
function centerScreen() {
_x = ((-bg.startPoint.x) + (Stage.width / 2));
_y = ((-bg.startPoint.y) + (Stage.height / 2));
stats._x = -_x;
stats._y = (-_y) + 390;
}
function easyUterus() {
maxSperms = 30;
maxViruses = 8;
maxBacteria = 8;
maxBugs = 8;
screenSperms = 6;
screenViruses = 1;
screenBacteria = 1;
screenBugs = 1;
sperm1 = new Enemy("sperm1", 1, 5, 0, 0.4, 10, "redBlip", 15);
virus1 = new Enemy("virus1", 2, 10, 0, 6, 10, "purpleBlip", 15);
bacteria1 = new Enemy("bacteria1", 4, 8, 8, 0.1, 10, "purpleBlip", 15);
bug1 = new Enemy("bug1", 2, 10, 0, 0.4, 10, "purpleBlip", 15);
}
function mediumUterus() {
maxSperms = 30;
maxViruses = 8;
maxBacteria = 8;
maxBugs = 8;
screenSperms = 6;
screenViruses = 2;
screenBacteria = 1;
screenBugs = 1;
sperm1 = new Enemy("sperm1", 1, 5, 0, 0.4, 10, "redBlip", 15);
virus1 = new Enemy("virus1", 3, 10, 0, 8, 10, "purpleBlip", 15);
bacteria1 = new Enemy("bacteria1", 6, 8, 8, 0.1, 10, "purpleBlip", 15);
bug1 = new Enemy("bug1", 3, 10, 0, 0.4, 10, "purpleBlip", 15);
}
function hardUterus() {
maxSperms = 30;
maxViruses = 10;
maxBacteria = 10;
maxBugs = 10;
screenSperms = 6;
screenViruses = 2;
screenBacteria = 2;
screenBugs = 3;
sperm1 = new Enemy("sperm1", 2, 5, 0, 0.5, 10, "redBlip", 15);
virus1 = new Enemy("virus1", 4, 10, 0, 8, 10, "purpleBlip", 15);
bacteria1 = new Enemy("bacteria1", 8, 8, 8, 0.1, 10, "purpleBlip", 15);
bug1 = new Enemy("bug1", 4, 10, 0, 0.4, 10, "purpleBlip", 15);
}
function levelUterus() {
if (Key.isDown(pause_k)) {
if (pauseUnpress) {
pauseUnpress = false;
if (!paused) {
paused = true;
attachMovie("pauseMenu", "pauseMenu", 999998);
pauseMenu._x = -_x;
pauseMenu._y = -_y;
} else {
paused = false;
pauseMenu.removeMovieClip();
}
}
} else {
pauseUnpress = true;
}
if (!paused) {
numberOfObjectiveKilled = numberOfSpermKilled;
stats.spermLeft.text = maxSperms - (numberOfSpermKilled + numEscaped);
stats.numLives.text = ship360.lives;
if ((((numberOfSpermKilled + numberOfSperm) + numEscaped) < maxSperms) && (numberOfSperm < screenSperms)) {
sperm1.spermSpawn();
numberOfSperm++;
numberSpawned++;
}
if (((numberOfVirusesKilled + numberOfViruses) < maxViruses) && (numberOfViruses < screenViruses)) {
virus1.spawn();
numberOfViruses++;
numberSpawned++;
}
if (((numberOfBacteriaKilled + numberOfBacteria) < maxBacteria) && (numberOfBacteria < screenBacteria)) {
bacteria1.spawn();
numberOfBacteria++;
numberSpawned++;
}
if (((numberOfBugsKilled + numberOfBugs) < maxBugs) && (numberOfBugs < screenBugs)) {
bug1.spawn();
numberOfBugs++;
numberSpawned++;
}
if (numberOfSperm == 0) {
levelClear();
}
}
}
function levelClear() {
ship.HP = ship.MAXHP;
waitCount = 0;
attachMovie("stageClear", "stageClear", 999997);
stageClear._x = -_x;
stageClear._y = -_y;
this.onEnterFrame = pauseAndStats;
}
function pauseAndStats() {
stageClear._x = -_x;
stageClear._y = -_y;
waitCount++;
if (waitCount > 59) {
this.onEnterFrame = null;
_x = 0;
_y = 0;
for (item in itemArray) {
itemArray[item].removeMovieClip();
}
ship.removeMovieClip();
stats.removeMovieClip();
stageClear.removeMovieClip();
gotoAndPlay (43);
}
}
playMusic();
_quality = "MEDIUM";
currentLevel = Uterus;
numShots = 0;
numHits = 0;
numberSpawned = 0;
numberOfSperm = 0;
numberOfSpermKilled = 0;
numberOfViruses = 0;
numberOfVirusesKilled = 0;
numberOfBacteria = 0;
numberOfBacteriaKilled = 0;
numberOfBugs = 0;
numberOfBugsKilled = 0;
numKilled = 0;
numEscaped = 0;
if (difficulty == "easy") {
easyUterus();
} else if (difficulty == "medium") {
mediumUterus();
} else if (difficulty == "hard") {
hardUterus();
}
pause_k = 80;
paused = false;
enemyShots = new Array();
spermArray = new Array();
itemArray = new Array();
attachMovie("statBar", "stats", 999999);
stats.attachMovie("uterusMap", "map", 0);
layer = 100;
stop();
this.onEnterFrame = waitForBG;
Frame 65
function playMusic() {
stopAllSounds();
cantina.start(0, 999);
}
function waitForBG() {
if (bg.spawnPlaceArray.length > 0) {
centerScreen();
attachMovie("getReady", "ready", 99);
if (!pickedUpSecretAmmo) {
attachMovie("secretAmmo", "secretAmmo", layer++);
}
secretAmmo._x = bg.secretPlace.x;
secretAmmo._y = bg.secretPlace.y;
ready._x = -_x;
ready._y = -_y;
this.onEnterFrame = getReady;
}
}
function getReady() {
readyCount++;
if (readyCount > 59) {
readyCount = 0;
ready.removeMovieClip();
attachMovie(ship360.clip, "ship", 1);
this.onEnterFrame = levelVagina;
}
}
function centerScreen() {
_x = ((-bg.startPoint.x) + (Stage.width / 2));
_y = ((-bg.startPoint.y) + (Stage.height / 2));
stats._x = -_x;
stats._y = (-_y) + 390;
}
function easyVagina() {
maxSperms = 25;
maxViruses = 4;
maxBacteria = 4;
maxBugs = 0;
screenSperms = 5;
screenViruses = 1;
screenBacteria = 1;
screenBugs = 0;
sperm1 = new Enemy("sperm1", 1, 5, 0, 0.35, 10, "redBlip", 15);
virus1 = new Enemy("virus1", 2, 10, 0, 6, 10, "purpleBlip", 15);
bacteria1 = new Enemy("bacteria1", 4, 8, 8, 0.1, 10, "purpleBlip", 15);
bug1 = new Enemy("bug1", 2, 10, 0, 0.4, 10, "purpleBlip", 15);
}
function mediumVagina() {
maxSperms = 30;
maxViruses = 8;
maxBacteria = 4;
maxBugs = 0;
screenSperms = 8;
screenViruses = 2;
screenBacteria = 1;
screenBugs = 0;
sperm1 = new Enemy("sperm1", 1, 5, 0, 0.4, 10, "redBlip", 15);
virus1 = new Enemy("virus1", 3, 10, 0, 6, 10, "purpleBlip", 15);
bacteria1 = new Enemy("bacteria1", 6, 8, 8, 0.1, 10, "purpleBlip", 15);
bug1 = new Enemy("bug1", 3, 10, 0, 0.4, 10, "purpleBlip", 15);
}
function hardVagina() {
maxSperms = 30;
maxViruses = 10;
maxBacteria = 6;
maxBugs = 0;
screenSperms = 8;
screenViruses = 3;
screenBacteria = 2;
screenBugs = 0;
sperm1 = new Enemy("sperm1", 2, 5, 0, 0.4, 10, "redBlip", 15);
virus1 = new Enemy("virus1", 4, 10, 0, 8, 10, "purpleBlip", 15);
bacteria1 = new Enemy("bacteria1", 8, 8, 8, 0.1, 10, "purpleBlip", 15);
bug1 = new Enemy("bug1", 4, 10, 0, 0.4, 10, "purpleBlip", 15);
}
function levelVagina() {
if (Key.isDown(pause_k)) {
if (pauseUnpress) {
pauseUnpress = false;
if (!paused) {
paused = true;
attachMovie("pauseMenu", "pauseMenu", 999998);
pauseMenu._x = -_x;
pauseMenu._y = -_y;
} else {
paused = false;
pauseMenu.removeMovieClip();
}
}
} else {
pauseUnpress = true;
}
if (!paused) {
numberOfObjectiveKilled = numberOfSpermKilled;
stats.spermLeft.text = maxSperms - (numberOfSpermKilled + numEscaped);
stats.numLives.text = ship360.lives;
if ((((numberOfSpermKilled + numberOfSperm) + numEscaped) < maxSperms) && (numberOfSperm < screenSperms)) {
sperm1.spermSpawn();
numberOfSperm++;
numberSpawned++;
}
if (((numberOfVirusesKilled + numberOfViruses) < maxViruses) && (numberOfViruses < screenViruses)) {
virus1.spawn();
numberOfViruses++;
numberSpawned++;
}
if (((numberOfBacteriaKilled + numberOfBacteria) < maxBacteria) && (numberOfBacteria < screenBacteria)) {
bacteria1.spawn();
numberOfBacteria++;
numberSpawned++;
}
if (((numberOfBugsKilled + numberOfBugs) < maxBugs) && (numberOfBugs < screenBugs)) {
bug1.spawn();
numberOfBugs++;
numberSpawned++;
}
if (numberOfSperm == 0) {
levelClear();
}
}
}
function levelClear() {
ship.HP = ship.MAXHP;
waitCount = 0;
attachMovie("stageClear", "stageClear", 999997);
stageClear._x = -_x;
stageClear._y = -_y;
this.onEnterFrame = pauseAndStats;
}
function pauseAndStats() {
stageClear._x = -_x;
stageClear._y = -_y;
waitCount++;
if (waitCount > 89) {
this.onEnterFrame = null;
_x = 0;
_y = 0;
for (item in itemArray) {
itemArray[item].removeMovieClip();
}
ship.removeMovieClip();
stats.removeMovieClip();
stageClear.removeMovieClip();
gotoAndPlay (43);
}
}
playMusic();
_quality = "MEDIUM";
currentLevel = Vagina;
numShots = 0;
numHits = 0;
numberSpawned = 0;
numberOfSperm = 0;
numberOfSpermKilled = 0;
numberOfViruses = 0;
numberOfVirusesKilled = 0;
numberOfBacteria = 0;
numberOfBacteriaKilled = 0;
numberOfBugs = 0;
numberOfBugsKilled = 0;
numKilled = 0;
numEscaped = 0;
if (difficulty == "easy") {
easyVagina();
} else if (difficulty == "medium") {
mediumVagina();
} else if (difficulty == "hard") {
hardVagina();
}
pause_k = 80;
paused = false;
enemyShots = new Array();
spermArray = new Array();
itemArray = new Array();
attachMovie("statBar", "stats", 999999);
stats.attachMovie("vaginaMap", "map", 0);
layer = 100;
stop();
this.onEnterFrame = waitForBG;
Frame 71
function playMusic() {
stopAllSounds();
battleIntro.start();
battleIntro.onSoundComplete = function () {
battleTheme.start(0, 999);
};
}
function waitForBG() {
if (bg.spawnPlaceArray.length > 0) {
centerScreen();
attachMovie("getReady", "ready", 99);
attachMovie("egg1", "egg", layer++);
stats.statType.gotoAndPlay("boss");
numberOfEggs++;
egg._x = bg.eggPlace.x;
egg._y = bg.eggPlace.y;
ready._x = -_x;
ready._y = -_y;
this.onEnterFrame = getReady;
}
}
function getReady() {
readyCount++;
if (readyCount > 59) {
readyCount = 0;
ready.removeMovieClip();
attachMovie(ship360.clip, "ship", 1);
this.onEnterFrame = levelOvary;
}
}
function centerScreen() {
_x = ((-bg.startPoint.x) + (Stage.width / 2));
_y = ((-bg.startPoint.y) + (Stage.height / 2));
stats._x = -_x;
stats._y = (-_y) + 390;
}
function easyOvary() {
maxSperms = 0;
maxViruses = 100;
maxBacteria = 0;
maxBugs = 0;
screenSperms = 0;
screenViruses = 1;
screenBacteria = 0;
screenBugs = 0;
sperm1 = new Enemy("sperm1", 1, 5, 0, 0.35, 10, "purpleBlip", 15);
virus1 = new Enemy("virus1", 2, 10, 0, 6, 10, "purpleBlip", 15);
egg1 = new Enemy("egg1", 50, 0, 5, 0, 2, "eggBlip", 0);
bacteria1 = new Enemy("bacteria1", 4, 8, 8, 0.1, 10, "purpleBlip", 15);
bug1 = new Enemy("bug1", 2, 10, 0, 0.4, 10, "purpleBlip", 15);
}
function mediumOvary() {
maxSperms = 0;
maxViruses = 100;
maxBacteria = 100;
maxBugs = 100;
screenSperms = 0;
screenViruses = 2;
screenBacteria = 0;
screenBugs = 0;
sperm1 = new Enemy("sperm1", 1, 5, 0, 0.35, 10, "purpleBlip", 15);
virus1 = new Enemy("virus1", 2, 10, 0, 6, 10, "purpleBlip", 15);
egg1 = new Enemy("egg1", 60, 0, 7, 0, 2, "eggBlip", 0);
bacteria1 = new Enemy("bacteria1", 4, 8, 8, 0.1, 10, "purpleBlip", 15);
bug1 = new Enemy("bug1", 2, 10, 0, 0.4, 10, "purpleBlip", 15);
}
function hardOvary() {
maxSperms = 0;
maxViruses = 100;
maxBacteria = 100;
maxBugs = 100;
screenSperms = 0;
screenViruses = 0;
screenBacteria = 0;
screenBugs = 2;
sperm1 = new Enemy("sperm1", 1, 5, 0, 0.35, 10, "purpleBlip", 15);
virus1 = new Enemy("virus1", 2, 10, 0, 6, 10, "purpleBlip", 15);
egg1 = new Enemy("egg1", 70, 10, 10, 0, 2, "eggBlip", 0);
bacteria1 = new Enemy("bacteria1", 4, 8, 8, 0.1, 10, "purpleBlip", 15);
bug1 = new Enemy("bug1", 2, 10, 0, 0.4, 10, "purpleBlip", 15);
}
function levelOvary() {
if (Key.isDown(pause_k)) {
if (pauseUnpress) {
pauseUnpress = false;
if (!paused) {
paused = true;
attachMovie("pauseMenu", "pauseMenu", 999998);
pauseMenu._x = -_x;
pauseMenu._y = -_y;
} else {
paused = false;
pauseMenu.removeMovieClip();
}
}
} else {
pauseUnpress = true;
}
if (!paused) {
numberOfObjectiveKilled = numberOfEggsKilled;
stats.spermLeft.text = numberOfEggs;
stats.numLives.text = ship360.lives;
if (((numberOfSpermKilled + numberOfSperm) < maxSperms) && (numberOfSperm < screenSperms)) {
sperm1.spawn();
numberOfSperm++;
numberSpawned++;
}
if (((numberOfVirusesKilled + numberOfViruses) < maxViruses) && (numberOfViruses < screenViruses)) {
virus1.spawn();
numberOfViruses++;
numberSpawned++;
}
if (((numberOfBacteriaKilled + numberOfBacteria) < maxBacteria) && (numberOfBacteria < screenBacteria)) {
bacteria1.spawn();
numberOfBacteria++;
numberSpawned++;
}
if (((numberOfBugsKilled + numberOfBugs) < maxBugs) && (numberOfBugs < screenBugs)) {
bug1.spawn();
numberOfBugs++;
numberSpawned++;
}
if (numberOfEggs == 0) {
levelClear();
}
}
}
function levelClear() {
ship.HP = ship.MAXHP;
waitCount = 0;
attachMovie("stageClear", "stageClear", 999997);
stageClear._x = -_x;
stageClear._y = -_y;
this.onEnterFrame = pauseAndStats;
}
function pauseAndStats() {
stageClear._x = -_x;
stageClear._y = -_y;
waitCount++;
if (waitCount > 89) {
this.onEnterFrame = null;
_x = 0;
_y = 0;
for (item in itemArray) {
itemArray[item].removeMovieClip();
}
ship.removeMovieClip();
stats.removeMovieClip();
stageClear.removeMovieClip();
gotoAndPlay (43);
}
}
playMusic();
_quality = "MEDIUM";
currentLevel = Ovary;
numShots = 0;
numHits = 0;
numberSpawned = 0;
numberOfSperm = 0;
numberOfSpermKilled = 0;
numberOfViruses = 0;
numberOfVirusesKilled = 0;
numberOfBacteria = 0;
numberOfBacteriaKilled = 0;
numberOfBugs = 0;
numberOfBugsKilled = 0;
numberOfEggs = 0;
numKilled = 0;
numEscaped = 0;
if (difficulty == "easy") {
easyOvary();
} else if (difficulty == "medium") {
mediumOvary();
} else if (difficulty == "hard") {
hardOvary();
}
pause_k = 80;
paused = false;
enemyShots = new Array();
spermArray = new Array();
itemArray = new Array();
attachMovie("statBar", "stats", 999999);
stats.attachMovie("ovaryMap", "map", 0);
layer = 100;
stop();
this.onEnterFrame = waitForBG;
Frame 77
function playMusic() {
stopAllSounds();
cantina.start(0, 999);
}
function waitForBG() {
if (bg.spawnPlaceArray.length > 0) {
centerScreen();
attachMovie("getReady", "ready", 99);
ready._x = -_x;
ready._y = -_y;
this.onEnterFrame = getReady;
}
}
function getReady() {
readyCount++;
if (readyCount > 59) {
readyCount = 0;
ready.removeMovieClip();
attachMovie(ship360.clip, "ship", 1);
this.onEnterFrame = levelUterus;
}
}
function centerScreen() {
_x = ((-bg.startPoint.x) + (Stage.width / 2));
_y = ((-bg.startPoint.y) + (Stage.height / 2));
stats._x = -_x;
stats._y = (-_y) + 390;
}
function easyUterus() {
maxViruses = 12;
maxBacteria = 12;
maxBugs = 30;
screenViruses = 1;
screenBacteria = 2;
screenBugs = 6;
virus1 = new Enemy("virus1", 4, 5, 0, 10, 10, "purpleBlip", 15);
worm1 = new Enemy("worm1", 3, 15, 0, 15, 10, "redBlip", 15);
bacteria1 = new Enemy("bacteria1", 6, 10, 10, 0.1, 10, "purpleBlip", 15);
bug2 = new Enemy("bug2", 3, 15, 0, 0.4, 10, "redBlip", 15);
bacteria2 = new Enemy("bacteria2", 6, 10, 15, 0.2, 10, "purpleBlip", 15);
}
function mediumUterus() {
maxViruses = 8;
maxBacteria = 8;
maxBugs = 30;
screenViruses = 2;
screenBacteria = 4;
screenBugs = 6;
virus1 = new Enemy("virus1", 5, 7, 0, 10, 10, "purpleBlip", 15);
worm1 = new Enemy("worm1", 3, 20, 0, 20, 10, "redBlip", 15);
bacteria1 = new Enemy("bacteria1", 6, 10, 15, 0.1, 10, "purpleBlip", 15);
bug2 = new Enemy("bug2", 3, 20, 0, 0.6, 10, "redBlip", 15);
bacteria2 = new Enemy("bacteria2", 6, 15, 20, 0.3, 10, "purpleBlip", 15);
}
function hardUterus() {
maxViruses = 8;
maxBacteria = 8;
maxBugs = 30;
screenViruses = 2;
screenBacteria = 4;
screenBugs = 6;
virus1 = new Enemy("virus1", 5, 10, 0, 10, 10, "purpleBlip", 15);
worm1 = new Enemy("worm1", 4, 20, 0, 20, 10, "redBlip", 15);
bacteria1 = new Enemy("bacteria1", 6, 10, 15, 0.2, 10, "purpleBlip", 15);
bug2 = new Enemy("bug2", 4, 20, 0, 0.6, 10, "redBlip", 15);
bacteria2 = new Enemy("bacteria2", 6, 15, 20, 0.3, 10, "purpleBlip", 15);
}
function levelUterus() {
if (Key.isDown(pause_k)) {
if (pauseUnpress) {
pauseUnpress = false;
if (!paused) {
paused = true;
attachMovie("pauseMenu", "pauseMenu", 999998);
pauseMenu._x = -_x;
pauseMenu._y = -_y;
} else {
paused = false;
pauseMenu.removeMovieClip();
}
}
} else {
pauseUnpress = true;
}
if (!paused) {
numberOfObjectiveKilled = numberOfBugsKilled;
stats.spermLeft.text = maxBugs - (numberOfBugsKilled + numEscaped);
stats.numLives.text = ship360.lives;
if (((numberOfVirusesKilled + numberOfViruses) < maxViruses) && (numberOfViruses < screenViruses)) {
virus1.spawn();
numberOfViruses++;
numberSpawned++;
}
if (((numberOfBacteriaKilled + numberOfBacteria) < maxBacteria) && (numberOfBacteria < screenBacteria)) {
if (Math.random() > 0.5) {
bacteria1.spawn();
} else {
bacteria2.spawn();
}
numberOfBacteria++;
numberSpawned++;
}
if ((((numberOfBugsKilled + numberOfBugs) + numEscaped) < maxBugs) && (numberOfBugs < screenBugs)) {
if (Math.random() > 0.5) {
bug2.spawn();
} else {
worm1.spawn();
}
numberOfBugs++;
numberSpawned++;
}
if (numberOfBugs == 0) {
levelClear();
}
}
}
function levelClear() {
ship.HP = ship.MAXHP;
waitCount = 0;
attachMovie("stageClear", "stageClear", 999997);
stageClear._x = -_x;
stageClear._y = -_y;
this.onEnterFrame = pauseAndStats;
}
function pauseAndStats() {
stageClear._x = -_x;
stageClear._y = -_y;
waitCount++;
if (waitCount > 59) {
this.onEnterFrame = null;
_x = 0;
_y = 0;
for (item in itemArray) {
itemArray[item].removeMovieClip();
}
ship.removeMovieClip();
stats.removeMovieClip();
stageClear.removeMovieClip();
gotoAndPlay (43);
}
}
playMusic();
_quality = "MEDIUM";
currentLevel = Bladder;
numShots = 0;
numHits = 0;
numberSpawned = 0;
numberOfSperm = 0;
numberOfSpermKilled = 0;
numberOfViruses = 0;
numberOfVirusesKilled = 0;
numberOfBacteria = 0;
numberOfBacteriaKilled = 0;
numberOfBugs = 0;
numberOfBugsKilled = 0;
numKilled = 0;
numEscaped = 0;
if (difficulty == "easy") {
easyUterus();
} else if (difficulty == "medium") {
mediumUterus();
} else if (difficulty == "hard") {
hardUterus();
}
pause_k = 80;
paused = false;
enemyShots = new Array();
spermArray = new Array();
itemArray = new Array();
attachMovie("statBar", "stats", 999999);
stats.attachMovie("bladderMap", "map", 0);
stats.statType.gotoAndStop("bug");
layer = 100;
stop();
this.onEnterFrame = waitForBG;
Frame 83
function playMusic() {
stopAllSounds();
battleIntro.start();
battleIntro.onSoundComplete = function () {
battleTheme.start(0, 999);
};
}
function waitForBG() {
if (bg.spawnPlaceArray.length > 0) {
centerScreen();
attachMovie("getReady", "ready", 99);
stats.statType.gotoAndPlay("boss");
egg._x = bg.eggPlace.x;
egg._y = bg.eggPlace.y;
ready._x = -_x;
ready._y = -_y;
this.onEnterFrame = getReady;
}
}
function getReady() {
readyCount++;
if (readyCount > 59) {
readyCount = 0;
ready.removeMovieClip();
attachMovie(ship360.clip, "ship", 1);
this.onEnterFrame = levelOvary;
}
}
function centerScreen() {
_x = ((-bg.startPoint.x) + (Stage.width / 2));
_y = ((-bg.startPoint.y) + (Stage.height / 2));
stats._x = -_x;
stats._y = (-_y) + 390;
}
function easyOvary() {
maxSperms = 0;
maxViruses = 100;
maxBacteria = 0;
maxBugs = 3;
screenSperms = 0;
screenViruses = 2;
screenBacteria = 2;
screenBugs = 2;
virus1 = new Enemy("virus1", 4, 10, 0, 6, 10, "purpleBlip", 15);
bacteria1 = new Enemy("bacteria1", 4, 8, 8, 0.1, 10, "purpleBlip", 15);
bug1 = new Enemy("bug1", 2, 10, 0, 0.4, 10, "purpleBlip", 15);
bigBug = new Enemy("bigBug", 25, 25, 0, 0.5, 10, "redBlip", 15);
}
function mediumOvary() {
maxSperms = 0;
maxViruses = 100;
maxBacteria = 100;
maxBugs = 4;
screenSperms = 0;
screenViruses = 2;
screenBacteria = 1;
screenBugs = 2;
virus1 = new Enemy("virus1", 4, 10, 0, 6, 10, "purpleBlip", 15);
bacteria1 = new Enemy("bacteria1", 4, 8, 8, 0.1, 10, "purpleBlip", 15);
bug1 = new Enemy("bug1", 2, 10, 0, 0.4, 10, "purpleBlip", 15);
bigBug = new Enemy("bigBug", 30, 25, 0, 0.5, 10, "redBlip", 15);
}
function hardOvary() {
maxSperms = 0;
maxViruses = 100;
maxBacteria = 100;
maxBugs = 4;
screenSperms = 0;
screenViruses = 2;
screenBacteria = 1;
screenBugs = 3;
sperm1 = new Enemy("sperm1", 1, 5, 0, 0.35, 10, "purpleBlip", 15);
virus1 = new Enemy("virus1", 4, 10, 0, 6, 10, "purpleBlip", 15);
egg1 = new Enemy("egg1", 70, 10, 10, 0, 2, "eggBlip", 0);
bacteria1 = new Enemy("bacteria1", 6, 8, 8, 0.1, 10, "purpleBlip", 15);
bug1 = new Enemy("bigBug", 35, 10, 0, 0.4, 10, "purpleBlip", 15);
}
function levelOvary() {
if (Key.isDown(pause_k)) {
if (pauseUnpress) {
pauseUnpress = false;
if (!paused) {
paused = true;
attachMovie("pauseMenu", "pauseMenu", 999998);
pauseMenu._x = -_x;
pauseMenu._y = -_y;
} else {
paused = false;
pauseMenu.removeMovieClip();
}
}
} else {
pauseUnpress = true;
}
if (!paused) {
numberOfObjectiveKilled = numberOfEggsKilled;
stats.spermLeft.text = numberOfEggs;
stats.numLives.text = ship360.lives;
if (((numberOfSpermKilled + numberOfSperm) < maxSperms) && (numberOfSperm < screenSperms)) {
sperm1.spawn();
numberOfSperm++;
numberSpawned++;
}
if (((numberOfVirusesKilled + numberOfViruses) < maxViruses) && (numberOfViruses < screenViruses)) {
virus1.spawn();
numberOfViruses++;
numberSpawned++;
}
if (((numberOfBacteriaKilled + numberOfBacteria) < maxBacteria) && (numberOfBacteria < screenBacteria)) {
bacteria1.spawn();
numberOfBacteria++;
numberSpawned++;
}
if (((numberOfBugsKilled + numberOfBugs) < maxBugs) && (numberOfBugs < screenBugs)) {
bigBug.spawn();
numberOfBugs++;
numberSpawned++;
}
if (numberOfBugs == 0) {
levelClear();
}
}
}
function levelClear() {
ship.HP = ship.MAXHP;
waitCount = 0;
attachMovie("stageClear", "stageClear", 999997);
stageClear._x = -_x;
stageClear._y = -_y;
this.onEnterFrame = pauseAndStats;
}
function pauseAndStats() {
stageClear._x = -_x;
stageClear._y = -_y;
waitCount++;
if (waitCount > 89) {
this.onEnterFrame = null;
_x = 0;
_y = 0;
for (item in itemArray) {
itemArray[item].removeMovieClip();
}
ship.removeMovieClip();
stats.removeMovieClip();
stageClear.removeMovieClip();
gotoAndPlay (43);
}
}
playMusic();
_quality = "MEDIUM";
currentLevel = Kidney;
numShots = 0;
numHits = 0;
numberSpawned = 0;
numberOfSperm = 0;
numberOfSpermKilled = 0;
numberOfViruses = 0;
numberOfVirusesKilled = 0;
numberOfBacteria = 0;
numberOfBacteriaKilled = 0;
numberOfBugs = 0;
numberOfBugsKilled = 0;
numberOfEggs = 0;
numKilled = 0;
numEscaped = 0;
if (difficulty == "easy") {
easyOvary();
} else if (difficulty == "medium") {
mediumOvary();
} else if (difficulty == "hard") {
hardOvary();
}
pause_k = 80;
paused = false;
enemyShots = new Array();
spermArray = new Array();
itemArray = new Array();
attachMovie("statBar", "stats", 999999);
stats.attachMovie("kidneyMap", "map", 0);
layer = 100;
stop();
this.onEnterFrame = waitForBG;
Frame 89
function playMusic() {
stopAllSounds();
cantina.start(0, 999);
}
function waitForBG() {
if (bg.spawnPlaceArray.length > 0) {
centerScreen();
attachMovie("getReady", "ready", 99);
ready._x = -_x;
ready._y = -_y;
this.onEnterFrame = getReady;
}
}
function getReady() {
readyCount++;
if (readyCount > 59) {
readyCount = 0;
ready.removeMovieClip();
attachMovie(ship360.clip, "ship", 1);
this.onEnterFrame = levelUterus;
}
}
function centerScreen() {
_x = ((-bg.startPoint.x) + (Stage.width / 2));
_y = ((-bg.startPoint.y) + (Stage.height / 2));
stats._x = -_x;
stats._y = (-_y) + 390;
}
function easyUterus() {
maxViruses = 20;
maxBacteria = 12;
maxBugs = 30;
maxSperms = 1000;
screenViruses = 3;
screenBacteria = 1;
screenBugs = 1;
screenSperm = 4;
virus2 = new Enemy("virus2", 5, 10, 0, 12, 10, "redBlip", 15);
worm2 = new Enemy("worm2", 3, 15, 0, 15, 10, "purpleBlip", 15);
bacteria1 = new Enemy("bacteria1", 6, 10, 10, 0.1, 10, "purpleBlip", 15);
bug1 = new Enemy("bug1", 3, 15, 0, 0.4, 10, "purpleBlip", 15);
bacteria2 = new Enemy("bacteria2", 6, 10, 10, 0.2, 10, "purpleBlip", 15);
sperm2 = new Enemy("sperm2", 3, 10, 0, 0.7, 10, "purpleBlip", 1);
}
function mediumUterus() {
maxViruses = 30;
maxBacteria = 12;
maxBugs = 30;
maxSperms = 1000;
screenViruses = 3;
screenBacteria = 1;
screenBugs = 1;
screenSperm = 4;
virus2 = new Enemy("virus2", 6, 10, 0, 15, 10, "redBlip", 15);
worm2 = new Enemy("worm2", 4, 15, 0, 15, 10, "purpleBlip", 15);
bacteria1 = new Enemy("bacteria1", 6, 10, 10, 0.1, 10, "purpleBlip", 15);
bug1 = new Enemy("bug1", 4, 15, 0, 0.4, 10, "purpleBlip", 15);
bacteria2 = new Enemy("bacteria2", 6, 10, 15, 0.2, 10, "purpleBlip", 15);
sperm2 = new Enemy("sperm2", 2, 15, 0, 0.7, 10, "purpleBlip", 15);
}
function hardUterus() {
maxViruses = 30;
maxBacteria = 12;
maxBugs = 30;
maxSperms = 1000;
screenViruses = 3;
screenBacteria = 1;
screenBugs = 1;
screenSperm = 4;
virus2 = new Enemy("virus2", 6, 15, 0, 15, 10, "redBlip", 15);
worm2 = new Enemy("worm2", 4, 15, 0, 15, 10, "purpleBlip", 15);
bacteria1 = new Enemy("bacteria1", 6, 10, 15, 0.1, 10, "purpleBlip", 15);
bug1 = new Enemy("bug1", 4, 15, 0, 0.4, 10, "purpleBlip", 15);
bacteria2 = new Enemy("bacteria2", 6, 10, 15, 0.2, 10, "purpleBlip", 15);
sperm2 = new Enemy("sperm2", 5, 10, 0, 0.7, 10, "purpleBlip", 15);
}
function levelUterus() {
if (Key.isDown(pause_k)) {
if (pauseUnpress) {
pauseUnpress = false;
if (!paused) {
paused = true;
attachMovie("pauseMenu", "pauseMenu", 999998);
pauseMenu._x = -_x;
pauseMenu._y = -_y;
} else {
paused = false;
pauseMenu.removeMovieClip();
}
}
} else {
pauseUnpress = true;
}
if (!paused) {
numberOfObjectiveKilled = numberOfVirusesKilled;
stats.spermLeft.text = maxViruses - (numberOfObjectiveKilled + numEscaped);
stats.numLives.text = ship360.lives;
if ((((numberOfVirusesKilled + numberOfViruses) + numEscaped) < maxViruses) && (numberOfViruses < screenViruses)) {
virus2.spawn();
numberOfViruses++;
numberSpawned++;
}
if (((numberOfBacteriaKilled + numberOfBacteria) < maxBacteria) && (numberOfBacteria < screenBacteria)) {
if (Math.random() > 0.5) {
bacteria1.spawn();
} else {
bacteria2.spawn();
}
numberOfBacteria++;
numberSpawned++;
}
if (((numberOfBugsKilled + numberOfBugs) < maxBugs) && (numberOfBugs < screenBugs)) {
if (Math.random() > 0.5) {
bug1.spawn();
} else {
worm2.spawn();
}
numberOfBugs++;
numberSpawned++;
}
if (((numberOfSpermKilled + numberOfSperm) < maxSperms) && (numberOfSperm < screenSperm)) {
sperm2.spawn();
numberOfSperm++;
numberSpawned++;
}
if (numberOfViruses == 0) {
levelClear();
}
}
}
function levelClear() {
ship.HP = ship.MAXHP;
waitCount = 0;
attachMovie("stageClear", "stageClear", 999997);
stageClear._x = -_x;
stageClear._y = -_y;
this.onEnterFrame = pauseAndStats;
}
function pauseAndStats() {
stageClear._x = -_x;
stageClear._y = -_y;
waitCount++;
if (waitCount > 59) {
this.onEnterFrame = null;
_x = 0;
_y = 0;
for (item in itemArray) {
itemArray[item].removeMovieClip();
}
ship.removeMovieClip();
stats.removeMovieClip();
stageClear.removeMovieClip();
gotoAndPlay (43);
}
}
playMusic();
_quality = "MEDIUM";
currentLevel = Mouth;
numShots = 0;
numHits = 0;
numberSpawned = 0;
numberOfSperm = 0;
numberOfSpermKilled = 0;
numberOfViruses = 0;
numberOfVirusesKilled = 0;
numberOfBacteria = 0;
numberOfBacteriaKilled = 0;
numberOfBugs = 0;
numberOfBugsKilled = 0;
numKilled = 0;
numEscaped = 0;
if (difficulty == "easy") {
easyUterus();
} else if (difficulty == "medium") {
mediumUterus();
} else if (difficulty == "hard") {
hardUterus();
}
pause_k = 80;
paused = false;
enemyShots = new Array();
spermArray = new Array();
itemArray = new Array();
attachMovie("statBar", "stats", 999999);
stats.attachMovie("mouthMap", "map", 0);
stats.statType.gotoAndStop("virus");
layer = 100;
stop();
this.onEnterFrame = waitForBG;
Frame 95
function playMusic() {
stopAllSounds();
cantina.start(0, 999);
}
function waitForBG() {
if (bg.spawnPlaceArray.length > 0) {
centerScreen();
attachMovie("getReady", "ready", 99);
ready._x = -_x;
ready._y = -_y;
this.onEnterFrame = getReady;
}
}
function getReady() {
readyCount++;
if (readyCount > 59) {
readyCount = 0;
ready.removeMovieClip();
attachMovie(ship360.clip, "ship", 1);
this.onEnterFrame = levelUterus;
}
}
function centerScreen() {
_x = ((-bg.startPoint.x) + (Stage.width / 2));
_y = ((-bg.startPoint.y) + (Stage.height / 2));
stats._x = -_x;
stats._y = (-_y) + 390;
}
function easyUterus() {
maxViruses = 20;
maxBacteria = 12;
maxBugs = 30;
maxSperms = 1000;
screenViruses = 3;
screenBacteria = 1;
screenBugs = 1;
screenSperm = 4;
virus2 = new Enemy("virus2", 5, 10, 0, 12, 10, "redBlip", 15);
worm2 = new Enemy("worm2", 3, 15, 0, 15, 10, "purpleBlip", 15);
bacteria1 = new Enemy("bacteria1", 6, 10, 10, 0.1, 10, "purpleBlip", 15);
bug1 = new Enemy("bug1", 3, 15, 0, 0.4, 10, "purpleBlip", 15);
bacteria2 = new Enemy("bacteria2", 6, 10, 10, 0.2, 10, "purpleBlip", 15);
sperm2 = new Enemy("sperm2", 3, 10, 0, 0.7, 10, "purpleBlip", 1);
}
function mediumUterus() {
maxViruses = 30;
maxBacteria = 12;
maxBugs = 30;
maxSperms = 1000;
screenViruses = 3;
screenBacteria = 1;
screenBugs = 1;
screenSperm = 4;
virus2 = new Enemy("virus2", 6, 10, 0, 15, 10, "redBlip", 15);
worm2 = new Enemy("worm2", 4, 15, 0, 15, 10, "purpleBlip", 15);
bacteria1 = new Enemy("bacteria1", 6, 10, 10, 0.1, 10, "purpleBlip", 15);
bug1 = new Enemy("bug1", 4, 15, 0, 0.4, 10, "purpleBlip", 15);
bacteria2 = new Enemy("bacteria2", 6, 10, 15, 0.2, 10, "purpleBlip", 15);
sperm2 = new Enemy("sperm2", 2, 15, 0, 0.7, 10, "purpleBlip", 15);
}
function hardUterus() {
maxViruses = 30;
maxBacteria = 12;
maxBugs = 30;
maxSperms = 1000;
screenViruses = 3;
screenBacteria = 1;
screenBugs = 1;
screenSperm = 4;
virus2 = new Enemy("virus2", 6, 15, 0, 15, 10, "redBlip", 15);
worm2 = new Enemy("worm2", 4, 15, 0, 15, 10, "purpleBlip", 15);
bacteria1 = new Enemy("bacteria1", 6, 10, 15, 0.1, 10, "purpleBlip", 15);
bug1 = new Enemy("bug1", 4, 15, 0, 0.4, 10, "purpleBlip", 15);
bacteria2 = new Enemy("bacteria2", 6, 10, 15, 0.2, 10, "purpleBlip", 15);
sperm2 = new Enemy("sperm2", 5, 10, 0, 0.7, 10, "purpleBlip", 15);
}
function levelUterus() {
if (Key.isDown(pause_k)) {
if (pauseUnpress) {
pauseUnpress = false;
if (!paused) {
paused = true;
attachMovie("pauseMenu", "pauseMenu", 999998);
pauseMenu._x = -_x;
pauseMenu._y = -_y;
} else {
paused = false;
pauseMenu.removeMovieClip();
}
}
} else {
pauseUnpress = true;
}
if (!paused) {
numberOfObjectiveKilled = numberOfVirusesKilled;
stats.spermLeft.text = maxViruses - (numberOfObjectiveKilled + numEscaped);
stats.numLives.text = ship360.lives;
if ((((numberOfVirusesKilled + numberOfViruses) + numEscaped) < maxViruses) && (numberOfViruses < screenViruses)) {
virus2.spawn();
numberOfViruses++;
numberSpawned++;
}
if (((numberOfBacteriaKilled + numberOfBacteria) < maxBacteria) && (numberOfBacteria < screenBacteria)) {
if (Math.random() > 0.5) {
bacteria1.spawn();
} else {
bacteria2.spawn();
}
numberOfBacteria++;
numberSpawned++;
}
if (((numberOfBugsKilled + numberOfBugs) < maxBugs) && (numberOfBugs < screenBugs)) {
if (Math.random() > 0.5) {
bug1.spawn();
} else {
worm2.spawn();
}
numberOfBugs++;
numberSpawned++;
}
if (((numberOfSpermKilled + numberOfSperm) < maxSperms) && (numberOfSperm < screenSperm)) {
sperm2.spawn();
numberOfSperm++;
numberSpawned++;
}
if (numberOfViruses == 0) {
levelClear();
}
}
}
function levelClear() {
ship.HP = ship.MAXHP;
waitCount = 0;
attachMovie("stageClear", "stageClear", 999997);
stageClear._x = -_x;
stageClear._y = -_y;
this.onEnterFrame = pauseAndStats;
}
function pauseAndStats() {
stageClear._x = -_x;
stageClear._y = -_y;
waitCount++;
if (waitCount > 59) {
this.onEnterFrame = null;
_x = 0;
_y = 0;
for (item in itemArray) {
itemArray[item].removeMovieClip();
}
ship.removeMovieClip();
stats.removeMovieClip();
stageClear.removeMovieClip();
gotoAndPlay (43);
}
}
playMusic();
_quality = "MEDIUM";
currentLevel = Stomach;
numShots = 0;
numHits = 0;
numberSpawned = 0;
numberOfSperm = 0;
numberOfSpermKilled = 0;
numberOfViruses = 0;
numberOfVirusesKilled = 0;
numberOfBacteria = 0;
numberOfBacteriaKilled = 0;
numberOfBugs = 0;
numberOfBugsKilled = 0;
numKilled = 0;
numEscaped = 0;
if (difficulty == "easy") {
easyUterus();
} else if (difficulty == "medium") {
mediumUterus();
} else if (difficulty == "hard") {
hardUterus();
}
pause_k = 80;
paused = false;
enemyShots = new Array();
spermArray = new Array();
itemArray = new Array();
attachMovie("statBar", "stats", 999999);
stats.attachMovie("stomachMap", "map", 0);
stats.statType.gotoAndStop("virus");
layer = 100;
stop();
this.onEnterFrame = waitForBG;
Frame 102
function playMusic() {
stopAllSounds();
battleIntro.start();
battleIntro.onSoundComplete = function () {
battleTheme.start(0, 999);
};
}
function waitForBG() {
if (bg.spawnPlaceArray.length > 0) {
centerScreen();
attachMovie("getReady", "ready", 99);
ready._x = -_x;
ready._y = -_y;
this.onEnterFrame = getReady;
}
}
function getReady() {
readyCount++;
if (readyCount > 59) {
readyCount = 0;
ready.removeMovieClip();
attachMovie(ship360.clip, "ship", 1);
this.onEnterFrame = levelUterus;
}
}
function centerScreen() {
_x = ((-bg.startPoint.x) + (Stage.width / 2));
_y = ((-bg.startPoint.y) + (Stage.height / 2));
stats._x = -_x;
stats._y = (-_y) + 390;
}
function easyUterus() {
maxViruses = 100;
maxBacteria = 0;
maxBugs = 0;
maxBigs = 2;
maxSperms = 0;
screenViruses = 3;
screenBacteria = 0;
screenBigs = 2;
screenBugs = 0;
screenSperm = 0;
virus1 = new Enemy("virus1", 5, 10, 0, 12, 10, "purpleBlip", 15);
worm2 = new Enemy("worm2", 3, 15, 0, 15, 10, "purpleBlip", 15);
bacteria1 = new Enemy("bacteria1", 6, 10, 10, 0.1, 10, "purpleBlip", 15);
bug1 = new Enemy("bug1", 3, 15, 0, 0.4, 10, "purpleBlip", 15);
bacteria2 = new Enemy("bacteria2", 6, 10, 10, 0.2, 10, "purpleBlip", 15);
sperm2 = new Enemy("sperm2", 3, 10, 0, 0.7, 10, "purpleBlip", 1);
bigVirus = new Enemy("bigVirus", 35, 10, 0, 0.4, 10, "redBlip", 1);
}
function mediumUterus() {
maxViruses = 100;
maxBacteria = 0;
maxBugs = 0;
maxBigs = 3;
maxSperms = 0;
screenViruses = 3;
screenBacteria = 0;
screenBigs = 2;
screenBugs = 0;
screenSperm = 0;
virus1 = new Enemy("virus1", 5, 10, 0, 12, 10, "purpleBlip", 15);
worm2 = new Enemy("worm2", 3, 15, 0, 15, 10, "purpleBlip", 15);
bacteria1 = new Enemy("bacteria1", 6, 10, 10, 0.1, 10, "purpleBlip", 15);
bug1 = new Enemy("bug1", 3, 15, 0, 0.4, 10, "purpleBlip", 15);
bacteria2 = new Enemy("bacteria2", 6, 10, 10, 0.2, 10, "purpleBlip", 15);
sperm2 = new Enemy("sperm2", 3, 10, 0, 0.7, 10, "purpleBlip", 1);
bigVirus = new Enemy("bigVirus", 35, 10, 0, 0.4, 10, "redBlip", 1);
}
function hardUterus() {
maxViruses = 100;
maxBacteria = 0;
maxBugs = 0;
maxBigs = 3;
maxSperms = 0;
screenViruses = 3;
screenBacteria = 0;
screenBigs = 3;
screenBugs = 0;
screenSperm = 0;
virus1 = new Enemy("virus1", 5, 10, 0, 12, 10, "purpleBlip", 15);
worm2 = new Enemy("worm2", 3, 15, 0, 15, 10, "purpleBlip", 15);
bacteria1 = new Enemy("bacteria1", 6, 10, 10, 0.1, 10, "purpleBlip", 15);
bug1 = new Enemy("bug1", 3, 15, 0, 0.4, 10, "purpleBlip", 15);
bacteria2 = new Enemy("bacteria2", 6, 10, 10, 0.2, 10, "purpleBlip", 15);
sperm2 = new Enemy("sperm2", 3, 10, 0, 0.7, 10, "purpleBlip", 1);
bigVirus = new Enemy("bigVirus", 35, 10, 0, 0.4, 10, "redBlip", 1);
}
function levelUterus() {
if (Key.isDown(pause_k)) {
if (pauseUnpress) {
pauseUnpress = false;
if (!paused) {
paused = true;
attachMovie("pauseMenu", "pauseMenu", 999998);
pauseMenu._x = -_x;
pauseMenu._y = -_y;
} else {
paused = false;
pauseMenu.removeMovieClip();
}
}
} else {
pauseUnpress = true;
}
if (!paused) {
timeCount++;
numberOfObjectiveKilled = numberOfBigVirusesKilled;
stats.spermLeft.text = maxBigs - (numberOfObjectiveKilled + numEscaped);
stats.numLives.text = ship360.lives;
if ((((numberOfVirusesKilled + numberOfViruses) + numEscaped) < maxViruses) && (numberOfViruses < screenViruses)) {
virus1.spawn();
numberOfViruses++;
numberSpawned++;
}
if (((numberOfBacteriaKilled + numberOfBacteria) < maxBacteria) && (numberOfBacteria < screenBacteria)) {
if (Math.random() > 0.5) {
bacteria1.spawn();
} else {
bacteria2.spawn();
}
numberOfBacteria++;
numberSpawned++;
}
if (((numberOfBugsKilled + numberOfBugs) < maxBugs) && (numberOfBugs < screenBugs)) {
if (Math.random() > 0.5) {
bug1.spawn();
} else {
worm2.spawn();
}
numberOfBugs++;
numberSpawned++;
}
if (((numberOfSpermKilled + numberOfSperm) < maxSperms) && (numberOfSperm < screenSperm)) {
sperm2.spawn();
numberOfSperm++;
numberSpawned++;
}
if ((((numberOfBigVirusesKilled + numberOfBigViruses) < maxBigs) && (numberOfBigViruses < screenBigs)) && (timeCount > 300)) {
timeCount = 0;
bigVirus.spermSpawn();
numberOfBigViruses++;
}
if ((numberOfBigViruses == 0) && (timeCount > 300)) {
levelClear();
}
}
}
function levelClear() {
ship.HP = ship.MAXHP;
waitCount = 0;
attachMovie("stageClear", "stageClear", 999997);
stageClear._x = -_x;
stageClear._y = -_y;
this.onEnterFrame = pauseAndStats;
}
function pauseAndStats() {
stageClear._x = -_x;
stageClear._y = -_y;
waitCount++;
if (waitCount > 59) {
this.onEnterFrame = null;
_x = 0;
_y = 0;
for (item in itemArray) {
itemArray[item].removeMovieClip();
}
ship.removeMovieClip();
stats.removeMovieClip();
stageClear.removeMovieClip();
gotoAndPlay (43);
}
}
playMusic();
_quality = "MEDIUM";
currentLevel = Intestine;
numShots = 0;
numHits = 0;
numberSpawned = 0;
numberOfSperm = 0;
numberOfSpermKilled = 0;
numberOfViruses = 0;
numberOfVirusesKilled = 0;
numberOfBigViruses = 0;
numberOfBigVirusesKilled = 0;
numberOfBacteria = 0;
numberOfBacteriaKilled = 0;
numberOfBugs = 0;
numberOfBugsKilled = 0;
numKilled = 0;
numEscaped = 0;
if (difficulty == "easy") {
easyUterus();
} else if (difficulty == "medium") {
mediumUterus();
} else if (difficulty == "hard") {
hardUterus();
}
pause_k = 80;
paused = false;
timeCount = 300;
enemyShots = new Array();
spermArray = new Array();
itemArray = new Array();
attachMovie("statBar", "stats", 999999);
stats.attachMovie("intestineMap", "map", 0);
stats.statType.gotoAndStop("boss");
layer = 100;
stop();
this.onEnterFrame = waitForBG;
Frame 109
function playMusic() {
stopAllSounds();
cantina.start(0, 999);
}
function waitForBG() {
if (bg.spawnPlaceArray.length > 0) {
centerScreen();
attachMovie("getReady", "ready", 99);
ready._x = -_x;
ready._y = -_y;
this.onEnterFrame = getReady;
}
}
function getReady() {
readyCount++;
if (readyCount > 59) {
readyCount = 0;
ready.removeMovieClip();
attachMovie(ship360.clip, "ship", 1);
this.onEnterFrame = levelUterus;
}
}
function centerScreen() {
_x = ((-bg.startPoint.x) + (Stage.width / 2));
_y = ((-bg.startPoint.y) + (Stage.height / 2));
stats._x = -_x;
stats._y = (-_y) + 390;
}
function easyUterus() {
maxViruses = 10;
maxBacteria = 10;
maxBugs = 10;
maxSperms = 10;
screenViruses = 2;
screenBacteria = 2;
screenBugs = 3;
screenSperm = 4;
virus2 = new Enemy("virus2", 6, 15, 0, 15, 10, "redBlip", 15);
worm2 = new Enemy("worm2", 4, 15, 0, 15, 10, "redBlip", 15);
bacteria1 = new Enemy("bacteria1", 6, 10, 15, 0.1, 10, "redBlip", 15);
bug1 = new Enemy("bug1", 4, 15, 0, 0.4, 10, "redBlip", 15);
bacteria2 = new Enemy("bacteria2", 6, 10, 15, 0.2, 10, "redBlip", 15);
sperm3 = new Enemy("sperm3", 5, 10, 0, 0.7, 10, "redBlip", 15);
sperm1 = new Enemy("sperm1", 5, 10, 0, 0.7, 10, "redBlip", 15);
bigBug2 = new Enemy("bigBug2", 8, 10, 0, 0.5, 10, "redBlip", 100);
}
function mediumUterus() {
maxViruses = 12;
maxBacteria = 12;
maxBugs = 12;
maxSperms = 12;
screenViruses = 2;
screenBacteria = 2;
screenBugs = 3;
screenSperm = 4;
virus2 = new Enemy("virus2", 6, 15, 0, 15, 10, "redBlip", 15);
worm2 = new Enemy("worm2", 4, 15, 0, 15, 10, "redBlip", 15);
bacteria1 = new Enemy("bacteria1", 6, 10, 15, 0.1, 10, "redBlip", 15);
bug1 = new Enemy("bug1", 4, 15, 0, 0.4, 10, "redBlip", 15);
bacteria2 = new Enemy("bacteria2", 6, 10, 15, 0.2, 10, "redBlip", 15);
sperm3 = new Enemy("sperm3", 5, 10, 0, 0.7, 10, "redBlip", 15);
sperm1 = new Enemy("sperm1", 5, 10, 0, 0.7, 10, "redBlip", 15);
bigBug2 = new Enemy("bigBug2", 8, 10, 0, 0.5, 10, "redBlip", 100);
}
function hardUterus() {
maxViruses = 12;
maxBacteria = 12;
maxBugs = 12;
maxSperms = 12;
screenViruses = 2;
screenBacteria = 2;
screenBugs = 3;
screenSperm = 4;
virus2 = new Enemy("virus2", 6, 15, 0, 15, 10, "redBlip", 15);
worm2 = new Enemy("worm2", 4, 15, 0, 15, 10, "redBlip", 15);
bacteria1 = new Enemy("bacteria1", 6, 10, 15, 0.1, 10, "redBlip", 15);
bug1 = new Enemy("bug1", 4, 15, 0, 0.4, 10, "redBlip", 15);
bacteria2 = new Enemy("bacteria2", 6, 10, 15, 0.2, 10, "redBlip", 15);
sperm3 = new Enemy("sperm3", 5, 10, 0, 0.7, 10, "redBlip", 15);
sperm1 = new Enemy("sperm1", 5, 10, 0, 0.7, 10, "redBlip", 15);
bigBug2 = new Enemy("bigBug2", 8, 10, 0, 0.5, 10, "redBlip", 100);
}
function levelUterus() {
if (Key.isDown(pause_k)) {
if (pauseUnpress) {
pauseUnpress = false;
if (!paused) {
paused = true;
attachMovie("pauseMenu", "pauseMenu", 999998);
pauseMenu._x = -_x;
pauseMenu._y = -_y;
} else {
paused = false;
pauseMenu.removeMovieClip();
}
}
} else {
pauseUnpress = true;
}
if (!paused) {
numberOfObjectiveKilled = numKilled;
stats.spermLeft.text = (((maxSperms + maxBugs) + maxViruses) + maxBacteria) - numberOfObjectiveKilled;
stats.numLives.text = ship360.lives;
if (((numberOfVirusesKilled + numberOfViruses) < maxViruses) && (numberOfViruses < screenViruses)) {
virus2.spawn();
numberOfViruses++;
numberSpawned++;
}
if (((numberOfBacteriaKilled + numberOfBacteria) < maxBacteria) && (numberOfBacteria < screenBacteria)) {
if (Math.random() > 0.5) {
bacteria1.spawn();
} else {
bacteria2.spawn();
}
numberOfBacteria++;
numberSpawned++;
}
if (((numberOfBugsKilled + numberOfBugs) < maxBugs) && (numberOfBugs < screenBugs)) {
if ((Math.random() < 0.1) || ((numberOfBugsKilled + numberOfBugs) == 0)) {
bigBug2.spawn();
} else if (Math.random() > 0.5) {
bug1.spawn();
} else {
worm2.spawn();
}
numberOfBugs++;
numberSpawned++;
}
if (((numberOfSpermKilled + numberOfSperm) < maxSperms) && (numberOfSperm < screenSperm)) {
if (Math.random() > 0.5) {
sperm3.spawn();
} else {
sperm1.spawn();
}
numberOfSperm++;
numberSpawned++;
}
if ((((numberOfBugs == 0) && (numberOfSperm == 0)) && (numberOfViruses == 0)) && (numberOfBacteria == 0)) {
levelClear();
}
}
}
function levelClear() {
ship.HP = ship.MAXHP;
waitCount = 0;
attachMovie("stageClear", "stageClear", 999997);
stageClear._x = -_x;
stageClear._y = -_y;
this.onEnterFrame = pauseAndStats;
}
function pauseAndStats() {
stageClear._x = -_x;
stageClear._y = -_y;
waitCount++;
if (waitCount > 59) {
this.onEnterFrame = null;
_x = 0;
_y = 0;
for (item in itemArray) {
itemArray[item].removeMovieClip();
}
ship.removeMovieClip();
stats.removeMovieClip();
stageClear.removeMovieClip();
gotoAndPlay (43);
}
}
playMusic();
_quality = "MEDIUM";
currentLevel = Sigmoid;
numShots = 0;
numHits = 0;
numberSpawned = 0;
numberOfSperm = 0;
numberOfSpermKilled = 0;
numberOfViruses = 0;
numberOfVirusesKilled = 0;
numberOfBacteria = 0;
numberOfBacteriaKilled = 0;
numberOfBugs = 0;
numberOfBugsKilled = 0;
numKilled = 0;
numEscaped = 0;
if (difficulty == "easy") {
easyUterus();
} else if (difficulty == "medium") {
mediumUterus();
} else if (difficulty == "hard") {
hardUterus();
}
pause_k = 80;
paused = false;
enemyShots = new Array();
spermArray = new Array();
itemArray = new Array();
attachMovie("statBar", "stats", 999999);
stats.attachMovie("sigmoidMap", "map", 0);
stats.statType._visible = false;
layer = 100;
stop();
this.onEnterFrame = waitForBG;
Frame 116
function playMusic() {
stopAllSounds();
battleIntro.start();
battleIntro.onSoundComplete = function () {
battleTheme.start(0, 999);
};
}
function waitForBG() {
if (bg.spawnPlaceArray.length > 0) {
centerScreen();
attachMovie("getReady", "ready", 99);
attachMovie("penis", "egg", layer++);
stats.statType.gotoAndPlay("boss");
numberOfEggs++;
ready._x = -_x;
ready._y = -_y;
this.onEnterFrame = getReady;
}
}
function getReady() {
readyCount++;
if (readyCount > 59) {
readyCount = 0;
ready.removeMovieClip();
attachMovie(ship360.clip, "ship", 1);
this.onEnterFrame = levelOvary;
}
}
function centerScreen() {
_x = ((-bg.startPoint.x) + (Stage.width / 2));
_y = ((-bg.startPoint.y) + (Stage.height / 2));
stats._x = -_x;
stats._y = (-_y) + 390;
}
function easyOvary() {
sperm1 = new Enemy("sperm1", 3, 15, 0, 0.5, 10, "purpleBlip", 15);
sperm3 = new Enemy("sperm3", 3, 15, 0, 0.5, 10, "purpleBlip", 15);
penis = new Enemy("penis", 50, 0, 6, 1, 2, "eggBlip", 0);
}
function mediumOvary() {
sperm1 = new Enemy("sperm1", 4, 15, 0, 0.5, 10, "purpleBlip", 15);
sperm3 = new Enemy("sperm3", 4, 15, 0, 0.5, 10, "purpleBlip", 15);
penis = new Enemy("penis", 50, 0, 6, 1, 2, "eggBlip", 0);
}
function hardOvary() {
sperm1 = new Enemy("sperm1", 5, 20, 0, 0.5, 10, "purpleBlip", 15);
sperm3 = new Enemy("sperm3", 5, 20, 0, 0.5, 10, "purpleBlip", 15);
penis = new Enemy("penis", 50, 0, 8, 1, 2, "eggBlip", 0);
}
function levelOvary() {
if (Key.isDown(pause_k)) {
if (pauseUnpress) {
pauseUnpress = false;
if (!paused) {
paused = true;
attachMovie("pauseMenu", "pauseMenu", 999998);
pauseMenu._x = -_x;
pauseMenu._y = -_y;
} else {
paused = false;
pauseMenu.removeMovieClip();
}
}
} else {
pauseUnpress = true;
}
if (!paused) {
numberOfObjectiveKilled = numberOfEggsKilled;
stats.spermLeft.text = numberOfEggs;
stats.numLives.text = ship360.lives;
if (numberOfEggs == 0) {
levelClear();
}
}
}
function levelClear() {
ship.HP = ship.MAXHP;
waitCount = 0;
attachMovie("stageClear", "stageClear", 999997);
stageClear._x = -_x;
stageClear._y = -_y;
this.onEnterFrame = pauseAndStats;
}
function pauseAndStats() {
stageClear._x = -_x;
stageClear._y = -_y;
waitCount++;
if (waitCount > 89) {
this.onEnterFrame = null;
_x = 0;
_y = 0;
for (item in itemArray) {
itemArray[item].removeMovieClip();
}
ship.removeMovieClip();
stats.removeMovieClip();
stageClear.removeMovieClip();
gotoAndPlay (132);
}
}
playMusic();
_quality = "MEDIUM";
currentLevel = Rectum;
numShots = 0;
numHits = 0;
numberSpawned = 0;
numberOfSperm = 0;
numberOfSpermKilled = 0;
numberOfViruses = 0;
numberOfVirusesKilled = 0;
numberOfBacteria = 0;
numberOfBacteriaKilled = 0;
numberOfBugs = 0;
numberOfBugsKilled = 0;
numberOfEggs = 0;
numKilled = 0;
numEscaped = 0;
if (difficulty == "easy") {
easyOvary();
} else if (difficulty == "medium") {
mediumOvary();
} else if (difficulty == "hard") {
hardOvary();
}
pause_k = 80;
paused = false;
enemyShots = new Array();
spermArray = new Array();
itemArray = new Array();
attachMovie("statBar", "stats", 999999);
stats.attachMovie("rectumMap", "map", 0);
layer = 100;
stop();
this.onEnterFrame = waitForBG;
Frame 123
_quality = "HIGH";
stop();
this.onEnterFrame = null;
_x = 0;
_y = 0;
for (name in spermArray) {
spermArray[name].removeMovieClip();
spermArray[name] = null;
}
for (name in enemyShots) {
enemyShots[name].removeMovieClip();
enemyShots[name] = null;
}
ship.removeMovieClip();
stats.removeMovieClip();
Frame 132
_quality = "high";
if ((difficulty = "easy")) {
difficulty = "medium";
} else if ((difficulty = "medium")) {
difficulty = "hard";
}
stop();
Frame 141
stop();
Frame 171
stop();
motelScene.play();
Symbol 5 MovieClip [uterusBG] Frame 1
function Point(px, py) {
this.x = px * pointScale;
this.y = py * pointScale;
}
wayPoint = new Array();
Point.prototype = new Object();
_parent.exits._xscale = (_parent.exits._yscale = 1000 * _parent.cheatScale);
_parent.backDrop._xscale = (_parent.backDrop._yscale = 1000 * _parent.cheatScale);
_yscale = (1000 * _parent.cheatScale);
_xscale = (1000 * _parent.cheatScale);
mapScale = 20 * _parent.cheatScale;
pointScale = 10 * _parent.cheatScale;
startPoint = new Point(115, 180);
wayPoint[0] = new Point(95, 163);
wayPoint[1] = new Point(105, 163);
wayPoint[2] = new Point(115, 163);
wayPoint[3] = new Point(125, 163);
wayPoint[4] = new Point(135, 163);
wayPoint[5] = new Point(90, 133);
wayPoint[6] = new Point(102, 133);
wayPoint[7] = new Point(113, 133);
wayPoint[8] = new Point(125, 133);
wayPoint[9] = new Point(132, 133);
wayPoint[10] = new Point(75, 103);
wayPoint[11] = new Point(94, 103);
wayPoint[12] = new Point(112, 103);
wayPoint[13] = new Point(127, 103);
wayPoint[14] = new Point(151, 103);
wayPoint[15] = new Point(76, 78);
wayPoint[16] = new Point(94, 78);
wayPoint[17] = new Point(112, 78);
wayPoint[18] = new Point(127, 78);
wayPoint[19] = new Point(151, 78);
wayPoint[20] = new Point(75, 38);
wayPoint[21] = new Point(95, 38);
wayPoint[22] = new Point(115, 38);
wayPoint[23] = new Point(135, 38);
wayPoint[24] = new Point(145, 38);
wayPoint[25] = new Point(165, 38);
wayPoint[26] = new Point(42, 21);
wayPoint[27] = new Point(198, 21);
spawnPlaceArray = new Array(1, 3, 5, 7, 9, 11, 13, 15, 17, 19);
spermSpawnPlaceArray = new Array(0, 1, 2, 3, 4);
Symbol 37 Button
on (release) {
gotoAndPlay (8);
}
Symbol 43 Button
on (release) {
nextFrame();
}
Symbol 95 MovieClip Frame 3
if (!_parent._parent.paused) {
_parent.pushVector(0, _parent.accel_p);
}
Symbol 126 MovieClip Frame 1
this.onEnterFrame = function () {
_rotation = (_rotation + 3);
};
Symbol 156 MovieClip [heavyAmmo] Frame 1
myIndex = _parent.itemArray.length;
_parent.itemArray[myIndex] = this;
blipPlace = new Object();
blipPlace._x = _x / _parent.bg.mapScale;
blipPlace._y = _y / _parent.bg.mapScale;
blipClip = _parent.heavyAmmo.blipClip;
_parent.stats.map.attachMovie(blipClip, blipClip + _parent.stats.map.layer, _parent.stats.map.layer, blipPlace);
blip = _parent.stats.map[blipClip + _parent.stats.map.layer];
_parent.stats.map.layer++;
this.onEnterFrame = function () {
if (hitTest(_parent.ship) && (!_parent.ship.dead)) {
_parent.heavyAmmo.weapon.ammo = _parent.heavyAmmo.weapon.ammo + _parent.heavyAmmo.amount;
newAmmo = new String(_parent.heavyAmmo.weapon.ammo);
_parent.stats.heavyLaserAmmo.text = "";
_parent.stats.heavyLaserAmmo.text = newAmmo;
_parent.itemArray[myIndex] = null;
blip.removeMovieClip();
this.removeMovieClip();
}
};
Symbol 164 MovieClip [spreaderAmmo] Frame 1
myIndex = _parent.itemArray.length;
_parent.itemArray[myIndex] = this;
blipPlace = new Object();
blipPlace._x = _x / _parent.bg.mapScale;
blipPlace._y = _y / _parent.bg.mapScale;
blipClip = _parent.spreaderAmmo.blipClip;
_parent.stats.map.attachMovie(blipClip, blipClip + _parent.stats.map.layer, _parent.stats.map.layer, blipPlace);
blip = _parent.stats.map[blipClip + _parent.stats.map.layer];
_parent.stats.map.layer++;
this.onEnterFrame = function () {
if (hitTest(_parent.ship) && (!_parent.ship.dead)) {
_parent.spreaderAmmo.weapon.ammo = _parent.spreaderAmmo.weapon.ammo + _parent.spreaderAmmo.amount;
newAmmo = new String(_parent.spreaderAmmo.weapon.ammo);
_parent.stats.spreaderAmmo.text = "";
_parent.stats.spreaderAmmo.text = newAmmo;
_parent.itemArray[myIndex] = null;
blip.removeMovieClip();
this.removeMovieClip();
}
};
Symbol 172 MovieClip [waveAmmo] Frame 1
myIndex = _parent.itemArray.length;
_parent.itemArray[myIndex] = this;
blipPlace = new Object();
blipPlace._x = _x / _parent.bg.mapScale;
blipPlace._y = _y / _parent.bg.mapScale;
blipClip = _parent.waveAmmo.blipClip;
_parent.stats.map.attachMovie(blipClip, blipClip + _parent.stats.map.layer, _parent.stats.map.layer, blipPlace);
blip = _parent.stats.map[blipClip + _parent.stats.map.layer];
_parent.stats.map.layer++;
this.onEnterFrame = function () {
if (hitTest(_parent.ship) && (!_parent.ship.dead)) {
_parent.waveAmmo.weapon.ammo = _parent.waveAmmo.weapon.ammo + _parent.waveAmmo.amount;
newAmmo = new String(_parent.waveAmmo.weapon.ammo);
_parent.stats.waveAmmo.text = "";
_parent.stats.waveAmmo.text = newAmmo;
_parent.itemArray[myIndex] = null;
blip.removeMovieClip();
this.removeMovieClip();
}
};
Symbol 181 MovieClip [foam] Frame 1
stop();
ready = true;
Symbol 181 MovieClip [foam] Frame 2
ready = false;
Symbol 185 MovieClip [foamAmmo] Frame 1
myIndex = _parent.itemArray.length;
_parent.itemArray[myIndex] = this;
blipPlace = new Object();
blipPlace._x = _x / _parent.bg.mapScale;
blipPlace._y = _y / _parent.bg.mapScale;
blipClip = _parent.foamAmmo.blipClip;
_parent.stats.map.attachMovie(blipClip, blipClip + _parent.stats.map.layer, _parent.stats.map.layer, blipPlace);
blip = _parent.stats.map[blipClip + _parent.stats.map.layer];
_parent.stats.map.layer++;
this.onEnterFrame = function () {
if (hitTest(_parent.ship) && (!_parent.ship.dead)) {
_parent.foamAmmo.weapon.ammo = _parent.foamAmmo.weapon.ammo + _parent.foamAmmo.amount;
newAmmo = new String(_parent.foamAmmo.weapon.ammo);
_parent.stats.foamAmmo.text = "";
_parent.stats.foamAmmo.text = newAmmo;
_parent.itemArray[myIndex] = null;
blip.removeMovieClip();
this.removeMovieClip();
}
};
Symbol 190 MovieClip [antibody] Frame 1
stop();
ready = true;
Symbol 190 MovieClip [antibody] Frame 2
ready = false;
_parent.pushVector(0, -3);
Symbol 203 MovieClip [antibodyAmmo] Frame 1
myIndex = _parent.itemArray.length;
_parent.itemArray[myIndex] = this;
blipPlace = new Object();
blipPlace._x = _x / _parent.bg.mapScale;
blipPlace._y = _y / _parent.bg.mapScale;
blipClip = _parent.antibodyAmmo.blipClip;
_parent.stats.map.attachMovie(blipClip, blipClip + _parent.stats.map.layer, _parent.stats.map.layer, blipPlace);
blip = _parent.stats.map[blipClip + _parent.stats.map.layer];
_parent.stats.map.layer++;
this.onEnterFrame = function () {
if (hitTest(_parent.ship) && (!_parent.ship.dead)) {
_parent.antibodyAmmo.weapon.ammo = _parent.antibodyAmmo.weapon.ammo + _parent.antibodyAmmo.amount;
newAmmo = new String(_parent.antibodyAmmo.weapon.ammo);
_parent.stats.antibodyAmmo.text = "";
_parent.stats.antibodyAmmo.text = newAmmo;
_parent.itemArray[myIndex] = null;
blip.removeMovieClip();
this.removeMovieClip();
}
};
Symbol 208 MovieClip [antibiotic] Frame 1
stop();
ready = true;
Symbol 208 MovieClip [antibiotic] Frame 2
ready = false;
_parent.pushVector(0, -1);
Symbol 211 MovieClip [antibioticAmmo] Frame 1
myIndex = _parent.itemArray.length;
_parent.itemArray[myIndex] = this;
blipPlace = new Object();
blipPlace._x = _x / _parent.bg.mapScale;
blipPlace._y = _y / _parent.bg.mapScale;
blipClip = _parent.antibioticAmmo.blipClip;
_parent.stats.map.attachMovie(blipClip, blipClip + _parent.stats.map.layer, _parent.stats.map.layer, blipPlace);
blip = _parent.stats.map[blipClip + _parent.stats.map.layer];
_parent.stats.map.layer++;
this.onEnterFrame = function () {
if (hitTest(_parent.ship) && (!_parent.ship.dead)) {
_parent.antibioticAmmo.weapon.ammo = _parent.antibioticAmmo.weapon.ammo + _parent.antibioticAmmo.amount;
newAmmo = new String(_parent.antibioticAmmo.weapon.ammo);
_parent.stats.antibioticAmmo.text = "";
_parent.stats.antibioticAmmo.text = newAmmo;
_parent.itemArray[myIndex] = null;
blip.removeMovieClip();
this.removeMovieClip();
}
};
Symbol 215 MovieClip [pesticide] Frame 1
stop();
ready = true;
Symbol 215 MovieClip [pesticide] Frame 2
ready = false;
Symbol 219 MovieClip [pesticideAmmo] Frame 1
myIndex = _parent.itemArray.length;
_parent.itemArray[myIndex] = this;
blipPlace = new Object();
blipPlace._x = _x / _parent.bg.mapScale;
blipPlace._y = _y / _parent.bg.mapScale;
blipClip = _parent.pesticideAmmo.blipClip;
_parent.stats.map.attachMovie(blipClip, blipClip + _parent.stats.map.layer, _parent.stats.map.layer, blipPlace);
blip = _parent.stats.map[blipClip + _parent.stats.map.layer];
_parent.stats.map.layer++;
this.onEnterFrame = function () {
if (hitTest(_parent.ship) && (!_parent.ship.dead)) {
_parent.pesticideAmmo.weapon.ammo = _parent.pesticideAmmo.weapon.ammo + _parent.pesticideAmmo.amount;
newAmmo = new String(_parent.pesticideAmmo.weapon.ammo);
_parent.stats.pesticideAmmo.text = "";
_parent.stats.pesticideAmmo.text = newAmmo;
_parent.itemArray[myIndex] = null;
blip.removeMovieClip();
this.removeMovieClip();
}
};
Symbol 226 MovieClip [pulse] Frame 1
stop();
ready = true;
Symbol 226 MovieClip [pulse] Frame 2
ready = false;
Symbol 243 MovieClip [nuke] Frame 1
stop();
ready = true;
Symbol 243 MovieClip [nuke] Frame 2
ready = false;
Symbol 246 MovieClip [nukeAmmo] Frame 1
myIndex = _parent.itemArray.length;
_parent.itemArray[myIndex] = this;
blipPlace = new Object();
blipPlace._x = _x / _parent.bg.mapScale;
blipPlace._y = _y / _parent.bg.mapScale;
blipClip = _parent.nukeAmmo.blipClip;
_parent.stats.map.attachMovie(blipClip, blipClip + _parent.stats.map.layer, _parent.stats.map.layer, blipPlace);
blip = _parent.stats.map[blipClip + _parent.stats.map.layer];
_parent.stats.map.layer++;
this.onEnterFrame = function () {
if (hitTest(_parent.ship) && (!_parent.ship.dead)) {
_parent.nukeAmmo.weapon.ammo = _parent.nukeAmmo.weapon.ammo + _parent.nukeAmmo.amount;
newAmmo = new String(_parent.nukeAmmo.weapon.ammo);
_parent.stats.nukeAmmo.text = "";
_parent.stats.nukeAmmo.text = newAmmo;
_parent.itemArray[myIndex] = null;
blip.removeMovieClip();
this.removeMovieClip();
}
};
Symbol 256 MovieClip [beacon] Frame 1
stop();
ready = true;
Symbol 256 MovieClip [beacon] Frame 2
ready = false;
Symbol 260 MovieClip [beaconAmmo] Frame 1
myIndex = _parent.itemArray.length;
_parent.itemArray[myIndex] = this;
refScale = _xscale;
blipPlace = new Object();
blipPlace._x = _x / _parent.bg.mapScale;
blipPlace._y = _y / _parent.bg.mapScale;
blipClip = _parent.beaconAmmo.blipClip;
_parent.stats.map.attachMovie(blipClip, blipClip + _parent.stats.map.layer, _parent.stats.map.layer, blipPlace);
blip = _parent.stats.map[blipClip + _parent.stats.map.layer];
_parent.stats.map.layer++;
this.onEnterFrame = function () {
clip._xscale = (clip._yscale = clip._yscale + 3);
if (clip._xscale > refScale) {
clip._xscale = (clip._yscale = refScale / 20);
}
if (hitTest(_parent.ship) && (!_parent.ship.dead)) {
_parent.beaconAmmo.weapon.ammo = _parent.beaconAmmo.weapon.ammo + _parent.beaconAmmo.amount;
newAmmo = new String(_parent.beaconAmmo.weapon.ammo);
_parent.stats.beaconAmmo.text = "";
_parent.stats.beaconAmmo.text = newAmmo;
_parent.itemArray[myIndex] = null;
blip.removeMovieClip();
this.removeMovieClip();
}
};
Symbol 266 MovieClip [torpedo] Frame 1
stop();
ready = true;
Symbol 266 MovieClip [torpedo] Frame 2
ready = false;
Symbol 269 MovieClip [torpedoAmmo] Frame 1
myIndex = _parent.itemArray.length;
_parent.itemArray[myIndex] = this;
blipPlace = new Object();
blipPlace._x = _x / _parent.bg.mapScale;
blipPlace._y = _y / _parent.bg.mapScale;
blipClip = _parent.torpedoAmmo.blipClip;
_parent.stats.map.attachMovie(blipClip, blipClip + _parent.stats.map.layer, _parent.stats.map.layer, blipPlace);
blip = _parent.stats.map[blipClip + _parent.stats.map.layer];
_parent.stats.map.layer++;
this.onEnterFrame = function () {
if (hitTest(_parent.ship) && (!_parent.ship.dead)) {
_parent.torpedoAmmo.weapon.ammo = _parent.torpedoAmmo.weapon.ammo + _parent.torpedoAmmo.amount;
newAmmo = new String(_parent.torpedoAmmo.weapon.ammo);
_parent.stats.torpedoAmmo.text = "";
_parent.stats.torpedoAmmo.text = newAmmo;
_parent.itemArray[myIndex] = null;
blip.removeMovieClip();
this.removeMovieClip();
}
};
Symbol 312 Button
on (release) {
if (_quality == "HIGH") {
_quality = "MEDIUM";
} else if (_quality == "MEDIUM") {
_quality = "LOW";
} else if (_quality == "LOW") {
_quality = "HIGH";
}
}
Symbol 327 MovieClip Frame 4
if (!_parent._parent.paused) {
_parent.pushVector(0, _parent.accel_p);
}
Symbol 327 MovieClip Frame 17
if (!_parent._parent.paused) {
_parent.pushVector(0, _parent.accel_p);
}
Symbol 329 MovieClip Frame 1
stop();
Symbol 329 MovieClip Frame 2
stop();
Symbol 329 MovieClip Frame 3
stop();
Symbol 329 MovieClip Frame 4
stop();
Symbol 329 MovieClip Frame 5
stop();
Symbol 331 MovieClip Frame 1
stop();
Symbol 332 MovieClip [statBar] Frame 1
newAmmo = new String(_parent.heavyAmmo.weapon.ammo);
heavyLaserAmmo.text = "";
heavyLaserAmmo.text = newAmmo;
newAmmo = new String(_parent.spreaderAmmo.weapon.ammo);
spreaderAmmo.text = "";
spreaderAmmo.text = newAmmo;
newAmmo = new String(_parent.waveAmmo.weapon.ammo);
waveAmmo.text = "";
waveAmmo.text = newAmmo;
newAmmo = new String(_parent.foamAmmo.weapon.ammo);
foamAmmo.text = "";
foamAmmo.text = newAmmo;
newAmmo = new String(_parent.antibodyAmmo.weapon.ammo);
antibodyAmmo.text = "";
antibodyAmmo.text = newAmmo;
newAmmo = new String(_parent.antibioticAmmo.weapon.ammo);
antibioticAmmo.text = "";
antibioticAmmo.text = newAmmo;
newAmmo = new String(_parent.pesticideAmmo.weapon.ammo);
pesticideAmmo.text = "";
pesticideAmmo.text = newAmmo;
newAmmo = new String(_parent.nukeAmmo.weapon.ammo);
nukeAmmo.text = "";
nukeAmmo.text = newAmmo;
newAmmo = new String(_parent.torpedoAmmo.weapon.ammo);
torpedoAmmo.text = "";
torpedoAmmo.text = newAmmo;
newAmmo = new String(_parent.beaconAmmo.weapon.ammo);
beaconAmmo.text = "";
beaconAmmo.text = newAmmo;
Symbol 342 MovieClip [redBlip] Frame 1
stop();
Symbol 398 MovieClip Frame 1
stop();
Symbol 398 MovieClip Frame 8
gotoAndStop (1);
Symbol 400 MovieClip [laserTurretShot] Frame 1
function shotControl() {
if (!_parent.paused) {
lifeCount++;
_x = (_x + xSpeed);
_y = (_y - ySpeed);
if ((lifeCount % 2) == 0) {
for (name in _parent.spermArray) {
if (hitTest(_parent.spermArray[name].bar) && (!_parent.spermArray[name].dead)) {
_parent.numHits++;
_parent.spermArray[name].flash = true;
_parent.spermArray[name].HP = _parent.spermArray[name].HP - damage;
die();
}
}
}
if (_parent.bg.walls.hitTest(_x, _y, true)) {
die();
}
if (lifeCount > lifeSpan) {
die();
}
}
}
function die() {
delete this.onEnterFrame;
this.removeMovieClip();
}
_parent.numShots++;
speed = _parent.laserTurret.speed;
damage = _parent.laserTurret.power;
lifeSpan = 60;
xSpeed = (speed * Math.sin((_rotation * Math.PI) / 180)) + shipXSpeed;
ySpeed = (speed * Math.cos((_rotation * Math.PI) / 180)) + shipYSpeed;
this.onEnterFrame = shotControl;
Symbol 410 MovieClip [bacteriaShot] Frame 1
function shotControl() {
if (!_parent.paused) {
lifeCount++;
_x = (_x + xSpeed);
_y = (_y - ySpeed);
if (hitTest(_parent.ship) && (!_parent.ship.flash)) {
_parent.ship.flash = true;
_parent.ship.HP = _parent.ship.HP - damage;
die();
}
if (_parent.bg.walls.hitTest(_x, _y, true)) {
die();
}
if (lifeCount > lifeSpan) {
die();
}
}
}
function pushDir(xPush, yPush) {
xSpeed = xSpeed + xPush;
ySpeed = ySpeed - yPush;
}
function die() {
_parent.enemyShots[myIndex] = null;
delete this.onEnterFrame;
this.removeMovieClip();
}
lifeSpan = 24;
speed = 8;
damage = _parent.bacteria1.power;
myIndex = _parent.enemyShots.length;
_parent.enemyShots[myIndex] = this;
xSpeed = (speed * Math.sin((_rotation * Math.PI) / 180)) + shipXSpeed;
ySpeed = (speed * Math.cos((_rotation * Math.PI) / 180)) + shipYSpeed;
this.onEnterFrame = shotControl;
Symbol 416 MovieClip [nukeShot] Frame 1
function shotControl() {
if (!_parent.paused) {
lifeCount++;
_x = (_x + xSpeed);
_y = (_y - ySpeed);
xSpeed = xSpeed * 0.95;
ySpeed = ySpeed * 0.95;
if ((lifeCount % 2) == 0) {
for (name in _parent.spermArray) {
if (hitTest(_parent.spermArray[name].bar) && (!_parent.spermArray[name].dead)) {
_parent.numHits++;
_parent.spermArray[name].flash = true;
_parent.spermArray[name].HP = _parent.spermArray[name].HP - damage;
die();
}
}
}
if (_parent.bg.walls.hitTest(_x, _y, true)) {
die();
}
if (lifeCount > lifeSpan) {
die();
}
}
}
function die() {
delete this.onEnterFrame;
play();
}
stop();
_parent.numShots++;
speed = _parent.nuke.speed;
damage = _parent.nuke.power;
lifeSpan = 40;
xSpeed = (speed * Math.sin((_rotation * Math.PI) / 180)) + shipXSpeed;
ySpeed = (speed * Math.cos((_rotation * Math.PI) / 180)) + shipYSpeed;
this.onEnterFrame = shotControl;
Symbol 416 MovieClip [nukeShot] Frame 2
function shotControl2() {
if (!paused) {
explosionCount++;
if ((explosionCount % 3) == 0) {
for (name in _parent.spermArray) {
if ((hitTest(_parent.spermArray[name].bar) && (!_parent.spermArray[name].dead)) && (!_parent.spermArray[name].flash)) {
_parent.numHits++;
_parent.spermArray[name].flash = true;
_parent.spermArray[name].HP = _parent.spermArray[name].HP - damage;
die();
}
}
}
}
}
this.onEnterFrame = shotControl2;
Symbol 416 MovieClip [nukeShot] Frame 25
this.removeMovieClip();
Symbol 417 MovieClip [foamShot] Frame 1
function shotControl() {
if (!_parent.paused) {
lifeCount++;
_x = (_x + xSpeed);
_y = (_y - ySpeed);
xSpeed = xSpeed * 0.98;
ySpeed = ySpeed * 0.98;
if (Math.abs(ySpeed) < 0.01) {
ySpeed = 0;
}
if (Math.abs(xSpeed) < 0.01) {
xSpeed = 0;
}
if ((lifeCount % 4) == 0) {
for (name in _parent.spermArray) {
if (((_parent.spermArray[name].type == "sperm") && (hitTest(_parent.spermArray[name].bar))) && (!_parent.spermArray[name].dead)) {
_parent.spermArray[name].spawnPowerup = (true._parent.spermArray[name].flash = true);
_parent.spermArray[name].HP = _parent.spermArray[name].HP - damage;
}
}
}
if (_parent.bg.walls.hitTest(_x, _y, true)) {
xSpeed = 0;
ySpeed = 0;
}
if (lifeCount > lifeSpan) {
die();
}
}
}
function die() {
delete this.onEnterFrame;
play();
}
speed = _parent.foam.speed;
damage = _parent.foam.power;
lifeSpan = 150;
xSpeed = shipXSpeed;
ySpeed = shipYSpeed;
this.onEnterFrame = shotControl;
Symbol 417 MovieClip [foamShot] Frame 9
stop();
Symbol 417 MovieClip [foamShot] Frame 10
this.removeMovieClip();
Symbol 418 MovieClip [antiBodyShot] Frame 1
function shotControl() {
if (!_parent.paused) {
lifeCount++;
_x = (_x + xSpeed);
_y = (_y - ySpeed);
xSpeed = xSpeed * 0.98;
ySpeed = ySpeed * 0.98;
if (Math.abs(ySpeed) < 0.01) {
ySpeed = 0;
}
if (Math.abs(xSpeed) < 0.01) {
xSpeed = 0;
}
if ((lifeCount % 4) == 0) {
for (name in _parent.spermArray) {
if (hitTest(_parent.spermArray[name].bar) && (!_parent.spermArray[name].dead)) {
_parent.spermArray[name].flash = true;
if (_parent.spermArray[name].type == "virus") {
_parent.spermArray[name].spawnPowerup = true;
_parent.spermArray[name].HP = _parent.spermArray[name].HP - (damage * 16);
} else {
_parent.spermArray[name].HP = _parent.spermArray[name].HP - (damage / 2);
}
}
}
}
if (_parent.bg.walls.hitTest(_x + (50 * Math.sin((_rotation * Math.PI) / 180)), _y - (50 * Math.cos((_rotation * Math.PI) / 180)), true)) {
xSpeed = 0;
ySpeed = 0;
}
if (lifeCount > lifeSpan) {
die();
}
}
}
function die() {
delete this.onEnterFrame;
play();
}
stop();
speed = _parent.antiBody.speed;
damage = _parent.antiBody.power;
lifeSpan = 50;
xSpeed = (speed * Math.sin((_rotation * Math.PI) / 180)) + shipXSpeed;
ySpeed = (speed * Math.cos((_rotation * Math.PI) / 180)) + shipYSpeed;
this.onEnterFrame = shotControl;
Symbol 418 MovieClip [antiBodyShot] Frame 2
this.removeMovieClip();
Symbol 425 MovieClip [antibioticShot] Frame 1
speed = _parent.antibiotic.speed;
damage = _parent.antibiotic.power;
lifeSpan = 50;
_x = (_x + shipXSpeed);
_y = (_y - shipYSpeed);
this.onEnterFrame = function () {
_x = (_parent.ship._x + _parent.ship.xSpeed);
_y = (_parent.ship._y - _parent.ship.ySpeed);
_rotation = _parent.ship._rotation;
};
for (name in _parent.spermArray) {
if (hitTest(_parent.spermArray[name].bar) && (!_parent.spermArray[name].dead)) {
_parent.spermArray[name].flash = true;
if (_parent.spermArray[name].type == "bacteria") {
_parent.spermArray[name].spawnPowerup = true;
_parent.spermArray[name].HP = _parent.spermArray[name].HP - (damage * 8);
} else {
_parent.spermArray[name].HP = _parent.spermArray[name].HP - damage;
}
}
}
Symbol 425 MovieClip [antibioticShot] Frame 4
this.removeMovieClip();
Symbol 428 MovieClip [pesticideShot] Frame 1
function shotControl() {
if (!_parent.paused) {
lifeCount++;
_x = (_parent.ship._x + _parent.ship.xSpeed);
_y = (_parent.ship._y - _parent.ship.ySpeed);
_rotation = _parent.ship._rotation;
_alpha = (_alpha - 2);
if (Math.abs(ySpeed) < 0.01) {
ySpeed = 0;
}
if (Math.abs(xSpeed) < 0.01) {
xSpeed = 0;
}
if ((lifeCount % 4) == 0) {
for (name in _parent.spermArray) {
if (hitTest(_parent.spermArray[name].bar) && (!_parent.spermArray[name].dead)) {
_parent.spermArray[name].flash = true;
if (_parent.spermArray[name].type == "bug") {
_parent.spermArray[name].spawnPowerup = true;
_parent.spermArray[name].HP = _parent.spermArray[name].HP - (damage * 8);
} else {
_parent.spermArray[name].HP = _parent.spermArray[name].HP - damage;
}
}
}
}
if (_parent.bg.walls.hitTest(_x + (50 * Math.sin((_rotation * Math.PI) / 180)), _y - (50 * Math.cos((_rotation * Math.PI) / 180)), true)) {
xSpeed = 0;
ySpeed = 0;
}
if (lifeCount > lifeSpan) {
die();
}
}
}
function die() {
delete this.onEnterFrame;
play();
}
stop();
speed = _parent.pesticide.speed;
damage = _parent.pesticide.power;
lifeSpan = 50;
this.onEnterFrame = shotControl;
Symbol 428 MovieClip [pesticideShot] Frame 2
this.removeMovieClip();
Symbol 430 MovieClip [torpedoShot] Frame 1
function shotControl() {
if (!_parent.paused) {
lifeCount++;
xSpeed = xSpeed + (accel * Math.sin((_rotation * Math.PI) / 180));
ySpeed = ySpeed + (accel * Math.cos((_rotation * Math.PI) / 180));
xSpeed = xSpeed * 0.9;
ySpeed = ySpeed * 0.9;
_x = (_x + xSpeed);
_y = (_y - ySpeed);
if ((lifeCount % 3) == 0) {
for (name in _parent.spermArray) {
if (hitTest(_parent.spermArray[name].bar) && (!_parent.spermArray[name].dead)) {
targ = _parent.spermArray[name];
play();
}
}
}
if (_parent.bg.walls.hitTest(_x, _y, true)) {
die();
}
if (lifeCount > lifeSpan) {
die();
}
}
}
function die() {
delete this.onEnterFrame;
gotoAndPlay (3);
}
stop();
_parent.numShots++;
speed = _parent.torpedo.speed;
damage = _parent.torpedo.power;
lifeSpan = 1000;
xSpeed = shipXSpeed;
ySpeed = shipYSpeed;
accel = speed / 2;
turnSpeed = 10;
this.onEnterFrame = shotControl;
Symbol 430 MovieClip [torpedoShot] Frame 2
function getPosition() {
targetVectorX = targ._x - _x;
targetVectorY = _y - targ._y;
hypVector = Math.sqrt((targetVectorX * targetVectorX) + (targetVectorY * targetVectorY));
targetThetaX = Math.asin(targetVectorX / hypVector) / (Math.PI/180);
targetThetaY = Math.acos(targetVectorY / hypVector) / (Math.PI/180);
if (targetVectorY < 0) {
targetTheta = 180 - targetThetaX;
} else {
targetTheta = targetThetaX;
}
}
function getMovement() {
if ((Math.abs(targetTheta - _rotation) < 10) || (Math.abs(targetTheta - _rotation) > 350)) {
_rotation = targetTheta;
turning = 0;
}
if (_rotation < targetTheta) {
if (turning < turnSpeed) {
turning++;
}
} else if (_rotation > targetTheta) {
if (turning > (-turnSpeed)) {
turning--;
}
}
_rotation = (_rotation + turning);
if (this.hitTest(targ.x, targ.y)) {
getWayPoint();
}
xSpeed = xSpeed + (accel * Math.sin((_rotation * Math.PI) / 180));
ySpeed = ySpeed + (accel * Math.cos((_rotation * Math.PI) / 180));
xSpeed = xSpeed * 0.95;
ySpeed = ySpeed * 0.95;
_x = (_x + xSpeed);
_y = (_y - ySpeed);
}
stop();
accel = speed;
this.onEnterFrame = function () {
if (!_parent.paused) {
getPosition();
getMovement();
lifeCount++;
for (name in _parent.spermArray) {
if (hitTest(_parent.spermArray[name].bar) && (!_parent.spermArray[name].dead)) {
_parent.numHits++;
_parent.spermArray[name].flash = true;
_parent.spermArray[name].HP = _parent.spermArray[name].HP - damage;
die();
}
}
if (_parent.bg.walls.hitTest(_x, _y, true)) {
die();
}
if (lifeCount > lifeSpan) {
die();
}
}
};
Symbol 430 MovieClip [torpedoShot] Frame 3
this.onEnterFrame = null;
Symbol 430 MovieClip [torpedoShot] Frame 25
this.removeMovieClip();
Symbol 431 MovieClip [spreaderShot] Frame 1
function shotControl() {
if (!_parent.paused) {
lifeCount++;
_x = (_x + xSpeed);
_y = (_y - ySpeed);
if ((lifeCount % 3) == 0) {
for (name in _parent.spermArray) {
if (hitTest(_parent.spermArray[name].bar) && (!_parent.spermArray[name].dead)) {
_parent.numHits++;
_parent.spermArray[name].flash = true;
_parent.spermArray[name].HP = _parent.spermArray[name].HP - damage;
die();
}
}
}
if (_parent.bg.walls.hitTest(_x, _y, true)) {
die();
}
if (lifeCount > lifeSpan) {
die();
}
}
}
function die() {
delete this.onEnterFrame;
this.removeMovieClip();
}
speed = _parent.spreader.speed;
damage = _parent.spreader.power;
lifeSpan = 25;
if (!duplicate) {
_parent.numShots++;
shotLeft = new Object();
shotLeft._y = _y;
shotLeft._x = _x;
shotLeft._rotation = _rotation - 10;
shotLeft.shipXSpeed = shipXSpeed;
shotLeft.shipYSpeed = shipYSpeed;
shotLeft.duplicate = true;
shotRight = new Object();
shotRight._y = _y;
shotRight._x = _x;
shotRight._rotation = _rotation + 10;
shotRight.shipXSpeed = shipXSpeed;
shotRight.shipYSpeed = shipYSpeed;
shotRight.duplicate = true;
this.duplicateMovieClip("shot" + _parent.layer, _parent.layer, shotLeft);
_parent.layer++;
this.duplicateMovieClip("shot" + _parent.layer, _parent.layer, shotRight);
_parent.layer++;
}
this.onEnterFrame = shotControl;
xSpeed = (speed * Math.sin((_rotation * Math.PI) / 180)) + shipXSpeed;
ySpeed = (speed * Math.cos((_rotation * Math.PI) / 180)) + shipYSpeed;
Symbol 433 MovieClip [heavyLaserShot] Frame 1
function shotControl() {
if (!_parent.paused) {
lifeCount++;
_x = (_x + xSpeed);
_y = (_y - ySpeed);
if ((lifeCount % 2) == 0) {
for (name in _parent.spermArray) {
if (hitTest(_parent.spermArray[name].bar) && (!_parent.spermArray[name].dead)) {
_parent.numHits++;
_parent.spermArray[name].flash = true;
_parent.spermArray[name].HP = _parent.spermArray[name].HP - damage;
die();
}
}
}
if (_parent.bg.walls.hitTest(_x, _y, true)) {
die();
}
if (lifeCount > lifeSpan) {
die();
}
}
}
function die() {
delete this.onEnterFrame;
this.removeMovieClip();
}
_parent.numShots++;
speed = _parent.heavyLaser.speed;
damage = _parent.heavyLaser.power;
lifeSpan = 50;
this.onEnterFrame = shotControl;
xSpeed = (speed * Math.sin((_rotation * Math.PI) / 180)) + shipXSpeed;
ySpeed = (speed * Math.cos((_rotation * Math.PI) / 180)) + shipYSpeed;
Symbol 435 MovieClip [waveShot] Frame 1
function shotControl() {
if (!_parent.paused) {
_alpha = (_alpha - 12);
if (_alpha < 0) {
die();
}
}
}
function die() {
delete this.onEnterFrame;
this.removeMovieClip();
}
damage = _parent.wave.power;
_parent.numShots++;
_x = _parent.ship._x;
_y = _parent.ship._y;
for (name in _parent.spermArray) {
if (hitTest(_parent.spermArray[name].bar)) {
_parent.numHits++;
_parent.spermArray[name].flash = true;
_parent.spermArray[name].HP = _parent.spermArray[name].HP - damage;
}
}
this.onEnterFrame = shotControl;
Symbol 437 MovieClip [pulseShot] Frame 1
function shotControl() {
if (!_parent.paused) {
lifeCount++;
_x = _parent.ship._x;
_y = _parent.ship._y;
_alpha = (_alpha - 6);
_xscale = (_xscale + 50);
_yscale = (_xscale + 50);
if ((lifeCount % 2) == 0) {
for (name in _parent.spermArray) {
if (hitTest(_parent.spermArray[name].bar)) {
xDist = _parent.spermArray[name]._x - _parent.ship._x;
yDist = _parent.spermArray[name]._y - _parent.ship._y;
hypDist = Math.sqrt((xDist * xDist) + (yDist * yDist));
_parent.spermArray[name].pushDir(damage * (xDist / hypDist), (-damage) * (yDist / hypDist));
}
}
for (name in _parent.enemyShots) {
if (hitTest(_parent.enemyShots[name])) {
xDist = _parent.enemyShots[name]._x - _parent.ship._x;
yDist = _parent.enemyShots[name]._y - _parent.ship._y;
hypDist = Math.sqrt((xDist * xDist) + (yDist * yDist));
_parent.enemyShots[name].pushDir((2 * damage) * (xDist / hypDist), (-2 * damage) * (yDist / hypDist));
}
}
}
if (lifeCount > 10) {
die();
}
}
}
function die() {
delete this.onEnterFrame;
this.removeMovieClip();
}
damage = _parent.pulse.power;
this.onEnterFrame = shotControl;
Symbol 439 MovieClip [beaconShot] Frame 1
function shotControl() {
if (!_parent.paused) {
lifeCount++;
_x = _parent.ship._x;
_y = _parent.ship._y;
_alpha = (_alpha - 6);
_xscale = (_xscale + 50);
_yscale = (_xscale + 50);
if (lifeCount > 10) {
die();
}
}
}
function die() {
delete this.onEnterFrame;
this.removeMovieClip();
}
damage = _parent.pulse.power;
this.onEnterFrame = shotControl;
for (name in _parent.spermArray) {
if (_parent.spermArray[name].type == "sperm") {
_parent.spermArray[name].setWaypoint(_parent.ship._x, _parent.ship._y);
}
}
Symbol 448 MovieClip [heavyLaser] Frame 1
stop();
ready = true;
Symbol 448 MovieClip [heavyLaser] Frame 2
_parent.pushVector(0, -5);
ready = false;
Symbol 450 MovieClip [laserTurret] Frame 1
stop();
ready = true;
Symbol 450 MovieClip [laserTurret] Frame 2
_parent.pushVector(0, -1.5);
ready = false;
Symbol 451 MovieClip [spreader] Frame 1
stop();
ready = true;
Symbol 451 MovieClip [spreader] Frame 2
_parent.veloc = _parent.veloc - 2;
ready = false;
Symbol 453 MovieClip [wave] Frame 1
stop();
ready = true;
Symbol 453 MovieClip [wave] Frame 2
ready = false;
Symbol 456 MovieClip [sperm1] Frame 1
function flightControl() {
if (!_parent.paused) {
if (!dead) {
lifeCount++;
hit();
if (!targ) {
getWayPoint();
}
if ((lifeCount % 6) == 0) {
getPosition();
}
getMovement();
checkBounds();
moveShip();
doPhysics();
resetForce();
} else {
die();
}
}
}
function checkBounds() {
if (bar.hitTest(_parent.ship) && (!_parent.ship.flash)) {
_parent.ship.pushDir(10 * sin(_rotation * RAD), 10 * cos(_rotation * RAD));
pushDir(-15 * sin(_rotation * RAD), -15 * cos(_rotation * RAD));
_parent.ship.flash = true;
_parent.ship.HP = _parent.ship.HP - collisionDamage_p;
}
if (_parent.bg.walls.hitTest(_x, _y, true)) {
framesStuck++;
if (changeSpeed) {
xSpeed = xSpeed * -1;
ySpeed = ySpeed * -1;
changeSpeed = false;
bumps++;
}
if (framesStuck > 10) {
outOfBounds();
}
} else {
framesStuck = 0;
if (!changeSpeed) {
changeSpeed = true;
}
}
if (bumps > 2) {
getWayPoint();
bumps = 0;
}
}
function getPosition() {
targetVectorX = targ.x - _x;
targetVectorY = _y - targ.y;
hypVector = Math.sqrt((targetVectorX * targetVectorX) + (targetVectorY * targetVectorY));
targetThetaX = Math.asin(targetVectorX / hypVector) / RAD;
targetThetaY = Math.acos(targetVectorY / hypVector) / RAD;
if (targetVectorY < 0) {
targetTheta = 180 - targetThetaX;
} else {
targetTheta = targetThetaX;
}
}
function getMovement() {
if ((Math.abs(targetTheta - _rotation) < 10) || (Math.abs(targetTheta - _rotation) > 350)) {
_rotation = targetTheta;
turning = 0;
}
if (_rotation < targetTheta) {
if (turning < turnSpeed_p) {
turning++;
}
} else if (_rotation > targetTheta) {
if (turning > (-turnSpeed_p)) {
turning--;
}
}
if (this.hitTest(targ.x, targ.y)) {
getWayPoint();
}
pushVector(0, accel_p);
_rotation = (_rotation + turning);
}
function doPhysics() {
if (changeSpeed) {
xSpeed = (xSpeed + xForce) * INERTIA;
ySpeed = (ySpeed + yForce) * INERTIA;
}
if (Math.abs(xSpeed) < 0.05) {
xSpeed = 0;
}
if (Math.abs(ySpeed) < 0.05) {
ySpeed = 0;
}
}
function moveShip() {
if (ySpeed > 0) {
rySpeed = Math.floor(10 * ySpeed) / 10;
} else {
rySpeed = Math.ceil(10 * ySpeed) / 10;
}
if (xSpeed > 0) {
rxSpeed = Math.floor(10 * xSpeed) / 10;
} else {
rxSpeed = Math.ceil(10 * xSpeed) / 10;
}
_y = (_y - rySpeed);
_x = (_x + rxSpeed);
blip._x = _x / _parent.bg.mapScale;
blip._y = _y / _parent.bg.mapScale;
blip._rotation = _rotation;
if (blip && (!blip.hitTest(_parent.stats.map.bounds))) {
stuckCount++;
}
if (stuckCount > 25) {
outOfBounds();
}
rot = _rotation;
if (_parent.exits.hitTest(_x, _y, true)) {
_parent.numEscaped++;
blip.gotoAndPlay("exit");
this.onEnterFrame = exit;
}
}
function pushVector(xPush, yPush) {
xForce = xForce + ((xPush * cos(RAD * _rotation)) + (yPush * sin(RAD * _rotation)));
yForce = yForce + ((xPush * sin(RAD * _rotation)) + (yPush * cos(RAD * _rotation)));
}
function pushDir(xPush, yPush) {
xForce = xForce + xPush;
yForce = yForce + yPush;
}
function resetForce() {
xForce = 0;
yForce = 0;
}
function getWayPoint() {
randomNdx = Math.floor(Math.random() * _root.bg.wayPoint.length);
targ = _parent.bg.wayPoint[randomNdx];
}
function setWayPoint(wpx, wpy) {
delete targ;
targ = new Object();
targ.x = wpx;
targ.y = wpy;
}
function outOfBounds() {
if (spawnPowerUp) {
_parent.makePowerUp(_x, _y);
}
_parent.numberOfSperm--;
_parent.spermArray[myIndex] = null;
blip.removeMovieClip();
this.removeMovieClip();
}
function die() {
if ((!dead) && ((Math.random() * 100) < proto.powerUpChance)) {
spawnPowerUp = true;
}
dead = true;
if (_alpha > 0) {
_alpha = (_alpha - 2);
} else {
_parent.numberOfSpermKilled++;
_parent.numKilled++;
outOfBounds();
}
}
function hit() {
if (HP <= 0) {
die();
}
if (flash) {
flashCount++;
if (!redFlag) {
redFlag = true;
spermColor.setTransform(redFlash);
} else {
redFlag = false;
spermColor.setTransform(normalColor);
if (flashCount > 2) {
flash = false;
flashCount = 0;
}
}
}
}
function exit() {
_y = (_y - (ySpeed / 5));
_x = (_x + (xSpeed / 5));
_yscale = (_yscale - 2);
_xscale = _yscale;
if (_yscale < 10) {
outOfBounds();
}
}
myIndex = _parent.spermArray.length;
_parent.spermArray[myIndex] = this;
type = "sperm";
proto = _parent.sperm1;
redFlash = new Object();
redFlash.ra = 100;
redFlash.ga = 50;
redFlash.ba = 0;
flash = true;
normalColor = new Object();
normalColor.ra = (normalColor.ba = (normalColor.ga = 100));
spermColor = new Color(this);
INERTIA = 0.95;
RAD = (Math.PI/180);
MYBLIP_LAYER = _parent.stats.map.layer++;
cos = Math.cos;
sin = Math.sin;
turnSpeed_p = proto.turnSpeed;
accel_p = proto.accel;
HP = proto.HP;
collisionDamage_p = proto.collisionDamage;
this.onEnterFrame = flightControl;
_parent.stats.map.attachMovie(proto.blipClip, "blip" + MYBLIP_LAYER, MYBLIP_LAYER);
blip = _parent.stats.map["blip" + MYBLIP_LAYER];
getWayPoint();
gotoAndPlay (2);
Symbol 457 MovieClip [virus1] Frame 1
function flightControl() {
if (!_parent.paused) {
if (!dead) {
lifeCount++;
hit();
if (!targ) {
getWayPoint();
}
if ((lifeCount % 3) == 0) {
getPosition();
}
getMovement();
checkBounds();
moveShip();
doPhysics();
resetForce();
} else {
die();
}
}
}
function checkBounds() {
if (bar.hitTest(_parent.ship) && (!_parent.ship.flash)) {
_parent.ship.pushDir(10 * sin(_rotation * RAD), 10 * cos(_rotation * RAD));
pushDir(-10 * sin(_rotation * RAD), -10 * cos(_rotation * RAD));
_parent.ship.flash = true;
_parent.ship.HP = _parent.ship.HP - collisionDamage_p;
}
if (_parent.bg.walls.hitTest(_x, _y, true)) {
framesStuck++;
if (changeSpeed) {
xSpeed = xSpeed * -1;
ySpeed = ySpeed * -1;
changeSpeed = false;
bumps++;
}
if (framesStuck > 10) {
outOfBounds();
}
} else {
framesStuck = 0;
if (!changeSpeed) {
changeSpeed = true;
}
}
if (bumps > 2) {
getWayPoint();
bumps = 0;
}
}
function getPosition() {
if ((Math.abs(_y - _parent.ship._y) < 200) && (Math.abs(_x - _parent.ship._x) < 200)) {
targetVectorX = _parent.ship._x - _x;
targetVectorY = _y - _parent.ship._y;
} else {
targetVectorX = targ.x - _x;
targetVectorY = _y - targ.y;
}
hypVector = Math.sqrt((targetVectorX * targetVectorX) + (targetVectorY * targetVectorY));
targetThetaX = Math.asin(targetVectorX / hypVector) / RAD;
targetThetaY = Math.acos(targetVectorY / hypVector) / RAD;
if (targetVectorY < 0) {
targetTheta = 180 - targetThetaX;
} else {
targetTheta = targetThetaX;
}
}
function getMovement() {
if ((Math.abs(targetTheta - _rotation) < 10) || (Math.abs(targetTheta - _rotation) > 350)) {
_rotation = targetTheta;
turning = 0;
}
if (_rotation < targetTheta) {
if (turning < turnSpeed_p) {
turning++;
}
} else if (_rotation > targetTheta) {
if (turning > (-turnSpeed_p)) {
turning--;
}
}
if (this.hitTest(targ.x, targ.y)) {
getWayPoint();
}
_rotation = (_rotation + turning);
}
function doPhysics() {
if (changeSpeed) {
xSpeed = (xSpeed + xForce) * INERTIA;
ySpeed = (ySpeed + yForce) * INERTIA;
}
if (Math.abs(xSpeed) < 0.05) {
xSpeed = 0;
}
if (Math.abs(ySpeed) < 0.05) {
ySpeed = 0;
}
}
function moveShip() {
if (ySpeed > 0) {
rySpeed = Math.floor(10 * ySpeed) / 10;
} else {
rySpeed = Math.ceil(10 * ySpeed) / 10;
}
if (xSpeed > 0) {
rxSpeed = Math.floor(10 * xSpeed) / 10;
} else {
rxSpeed = Math.ceil(10 * xSpeed) / 10;
}
_y = (_y - rySpeed);
_x = (_x + rxSpeed);
blip._x = _x / _parent.bg.mapScale;
blip._y = _y / _parent.bg.mapScale;
blip._rotation = _rotation;
if (blip && (!blip.hitTest(_parent.stats.map.bounds))) {
stuckCount++;
}
if (stuckCount > 25) {
outOfBounds();
}
rot = _rotation;
}
function pushVector(xPush, yPush) {
xForce = xForce + ((xPush * cos(RAD * _rotation)) + (yPush * sin(RAD * _rotation)));
yForce = yForce + ((xPush * sin(RAD * _rotation)) + (yPush * cos(RAD * _rotation)));
}
function pushDir(xPush, yPush) {
xForce = xForce + xPush;
yForce = yForce + yPush;
}
function resetForce() {
xForce = 0;
yForce = 0;
}
function getWayPoint() {
randomNdx = Math.floor(Math.random() * _root.bg.wayPoint.length);
targ = _parent.bg.wayPoint[randomNdx];
}
function setWayPoint(wpx, wpy) {
delete targ;
targ = new Object();
targ.x = wpx;
targ.y = wpy;
}
function outOfBounds() {
if (spawnPowerUp) {
_parent.makePowerUp(_x, _y);
}
_parent.numberOfViruses--;
_parent.spermArray[myIndex] = null;
blip.removeMovieClip();
this.removeMovieClip();
}
function die() {
if ((!dead) && ((Math.random() * 100) < proto.powerUpChance)) {
spawnPowerUp = true;
}
dead = true;
if (_alpha > 0) {
_alpha = (_alpha - 2);
} else {
_parent.numberOfVirusesKilled++;
_parent.numKilled++;
outOfBounds();
}
}
function hit() {
if (HP <= 0) {
die();
}
if (flash) {
flashCount++;
if (!redFlag) {
redFlag = true;
spermColor.setTransform(redFlash);
} else {
redFlag = false;
spermColor.setTransform(normalColor);
if (flashCount > 2) {
flash = false;
flashCount = 0;
}
}
}
}
function exit() {
_y = (_y - (ySpeed / 5));
_x = (_x + (xSpeed / 5));
_yscale = (_yscale - 2);
_xscale = _yscale;
if (_yscale < 10) {
outOfBounds();
}
}
myIndex = _parent.spermArray.length;
_parent.spermArray[myIndex] = this;
type = "virus";
proto = _parent.virus1;
redFlash = new Object();
redFlash.ra = 100;
redFlash.ga = 50;
redFlash.ba = 0;
flash = true;
normalColor = new Object();
normalColor.ra = (normalColor.ba = (normalColor.ga = 100));
spermColor = new Color(this);
INERTIA = 0.95;
RAD = (Math.PI/180);
MYBLIP_LAYER = _parent.stats.map.layer++;
cos = Math.cos;
sin = Math.sin;
turnSpeed_p = proto.turnSpeed;
accel_p = proto.accel;
HP = proto.HP;
collisionDamage_p = proto.collisionDamage;
this.onEnterFrame = flightControl;
_parent.stats.map.attachMovie(proto.blipClip, "blip" + MYBLIP_LAYER, MYBLIP_LAYER);
blip = _parent.stats.map["blip" + MYBLIP_LAYER];
getWayPoint();
gotoAndPlay (2);
Symbol 458 MovieClip [bug1] Frame 1
function flightControl() {
if (!_parent.paused) {
if (!dead) {
lifeCount++;
hit();
if (!targ) {
getWayPoint();
}
if ((lifeCount % 3) == 0) {
getPosition();
}
getMovement();
checkBounds();
moveShip();
doPhysics();
resetForce();
} else {
die();
}
}
}
function checkBounds() {
if (bar.hitTest(_parent.ship) && (!_parent.ship.flash)) {
_parent.ship.pushDir(10 * sin(_rotation * RAD), 10 * cos(_rotation * RAD));
pushDir(-10 * sin(_rotation * RAD), -10 * cos(_rotation * RAD));
_parent.ship.flash = true;
_parent.ship.HP = _parent.ship.HP - collisionDamage_p;
}
if (_parent.bg.walls.hitTest(_x, _y, true)) {
framesStuck++;
if (changeSpeed) {
xSpeed = xSpeed * -1;
ySpeed = ySpeed * -1;
changeSpeed = false;
bumps++;
}
if (framesStuck > 10) {
outOfBounds();
}
} else {
framesStuck = 0;
if (!changeSpeed) {
changeSpeed = true;
}
}
if (bumps > 2) {
getWayPoint();
bumps = 0;
}
}
function getPosition() {
if ((Math.abs(_y - _parent.ship._y) < 200) && (Math.abs(_x - _parent.ship._x) < 200)) {
targetVectorX = _parent.ship._x - _x;
targetVectorY = _y - _parent.ship._y;
} else {
targetVectorX = targ.x - _x;
targetVectorY = _y - targ.y;
}
hypVector = Math.sqrt((targetVectorX * targetVectorX) + (targetVectorY * targetVectorY));
targetThetaX = Math.asin(targetVectorX / hypVector) / RAD;
targetThetaY = Math.acos(targetVectorY / hypVector) / RAD;
if (targetVectorY < 0) {
targetTheta = 180 - targetThetaX;
} else {
targetTheta = targetThetaX;
}
}
function getMovement() {
if ((Math.abs(targetTheta - _rotation) < 10) || (Math.abs(targetTheta - _rotation) > 350)) {
_rotation = targetTheta;
turning = 0;
}
if (_rotation < targetTheta) {
if (turning < turnSpeed_p) {
turning++;
}
} else if (_rotation > targetTheta) {
if (turning > (-turnSpeed_p)) {
turning--;
}
}
if (this.hitTest(targ.x, targ.y)) {
getWayPoint();
}
pushVector(0, accel_p);
_rotation = (_rotation + turning);
}
function doPhysics() {
if (changeSpeed) {
xSpeed = (xSpeed + xForce) * INERTIA;
ySpeed = (ySpeed + yForce) * INERTIA;
}
if (Math.abs(xSpeed) < 0.05) {
xSpeed = 0;
}
if (Math.abs(ySpeed) < 0.05) {
ySpeed = 0;
}
}
function moveShip() {
if (ySpeed > 0) {
rySpeed = Math.floor(10 * ySpeed) / 10;
} else {
rySpeed = Math.ceil(10 * ySpeed) / 10;
}
if (xSpeed > 0) {
rxSpeed = Math.floor(10 * xSpeed) / 10;
} else {
rxSpeed = Math.ceil(10 * xSpeed) / 10;
}
_y = (_y - rySpeed);
_x = (_x + rxSpeed);
blip._x = _x / _parent.bg.mapScale;
blip._y = _y / _parent.bg.mapScale;
blip._rotation = _rotation;
if (blip && (!blip.hitTest(_parent.stats.map.bounds))) {
stuckCount++;
}
if (stuckCount > 25) {
outOfBounds();
}
rot = _rotation;
}
function pushVector(xPush, yPush) {
xForce = xForce + ((xPush * cos(RAD * _rotation)) + (yPush * sin(RAD * _rotation)));
yForce = yForce + ((xPush * sin(RAD * _rotation)) + (yPush * cos(RAD * _rotation)));
}
function pushDir(xPush, yPush) {
xForce = xForce + xPush;
yForce = yForce + yPush;
}
function resetForce() {
xForce = 0;
yForce = 0;
}
function getWayPoint() {
randomNdx = Math.floor(Math.random() * _root.bg.wayPoint.length);
targ = _parent.bg.wayPoint[randomNdx];
}
function setWayPoint(wpx, wpy) {
delete targ;
targ = new Object();
targ.x = wpx;
targ.y = wpy;
}
function outOfBounds() {
if (spawnPowerUp) {
_parent.makePowerUp(_x, _y);
}
_parent.numberOfBugs--;
_parent.spermArray[myIndex] = null;
blip.removeMovieClip();
this.removeMovieClip();
}
function die() {
if ((!dead) && ((Math.random() * 100) < proto.powerUpChance)) {
spawnPowerUp = true;
}
dead = true;
if (_alpha > 0) {
_alpha = (_alpha - 2);
} else {
_parent.numberOfBugsKilled++;
_parent.numKilled++;
outOfBounds();
}
}
function hit() {
if (HP <= 0) {
die();
}
if (flash) {
flashCount++;
if (!redFlag) {
redFlag = true;
spermColor.setTransform(redFlash);
} else {
redFlag = false;
spermColor.setTransform(normalColor);
if (flashCount > 2) {
flash = false;
flashCount = 0;
}
}
}
}
function exit() {
_y = (_y - (ySpeed / 5));
_x = (_x + (xSpeed / 5));
_yscale = (_yscale - 2);
_xscale = _yscale;
if (_yscale < 10) {
outOfBounds();
}
}
myIndex = _parent.spermArray.length;
_parent.spermArray[myIndex] = this;
type = "bug";
proto = _parent.bug1;
redFlash = new Object();
redFlash.ra = 100;
redFlash.ga = 50;
redFlash.ba = 0;
flash = true;
normalColor = new Object();
normalColor.ra = (normalColor.ba = (normalColor.ga = 100));
spermColor = new Color(this);
INERTIA = 0.95;
RAD = (Math.PI/180);
MYBLIP_LAYER = _parent.stats.map.layer++;
cos = Math.cos;
sin = Math.sin;
turnSpeed_p = proto.turnSpeed;
accel_p = proto.accel;
HP = proto.HP;
collisionDamage_p = proto.collisionDamage;
this.onEnterFrame = flightControl;
_parent.stats.map.attachMovie(proto.blipClip, "blip" + MYBLIP_LAYER, MYBLIP_LAYER);
blip = _parent.stats.map["blip" + MYBLIP_LAYER];
getWayPoint();
gotoAndPlay (2);
Symbol 459 MovieClip [bacteria1] Frame 1
function flightControl() {
if (!_parent.paused) {
if (!dead) {
lifeCount++;
hit();
if (!targ) {
getWayPoint();
}
if ((lifeCount % 3) == 0) {
getPosition();
}
if ((lifeCount % 48) == 0) {
fireGun();
}
getMovement();
checkBounds();
moveShip();
doPhysics();
resetForce();
} else {
die();
}
}
}
function checkBounds() {
if (bar.hitTest(_parent.ship) && (!_parent.ship.flash)) {
_parent.ship.pushDir(10 * sin(_rotation * RAD), 10 * cos(_rotation * RAD));
pushDir(-10 * sin(_rotation * RAD), -10 * cos(_rotation * RAD));
_parent.ship.flash = true;
_parent.ship.HP = _parent.ship.HP - collisionDamage_p;
}
if (_parent.bg.walls.hitTest(_x, _y, true)) {
framesStuck++;
if (changeSpeed) {
xSpeed = xSpeed * -1;
ySpeed = ySpeed * -1;
changeSpeed = false;
bumps++;
}
if (framesStuck > 10) {
outOfBounds();
}
} else {
framesStuck = 0;
if (!changeSpeed) {
changeSpeed = true;
}
}
if (bumps > 2) {
getWayPoint();
bumps = 0;
}
}
function getPosition() {
if ((Math.abs(_y - _parent.ship._y) < 300) && (Math.abs(_x - _parent.ship._x) < 300)) {
targetVectorX = _parent.ship._x - _x;
targetVectorY = _y - _parent.ship._y;
} else {
targetVectorX = targ.x - _x;
targetVectorY = _y - targ.y;
}
hypVector = Math.sqrt((targetVectorX * targetVectorX) + (targetVectorY * targetVectorY));
targetThetaX = Math.asin(targetVectorX / hypVector) / RAD;
targetThetaY = Math.acos(targetVectorY / hypVector) / RAD;
if (targetVectorY < 0) {
targetTheta = 180 - targetThetaX;
} else {
targetTheta = targetThetaX;
}
}
function getMovement() {
_rotation = targetTheta;
pushVector(0, accel_p);
if (this.hitTest(targ.x, targ.y)) {
getWayPoint();
}
}
function doPhysics() {
if (changeSpeed) {
xSpeed = (xSpeed + xForce) * INERTIA;
ySpeed = (ySpeed + yForce) * INERTIA;
}
if (Math.abs(xSpeed) < 0.05) {
xSpeed = 0;
}
if (Math.abs(ySpeed) < 0.05) {
ySpeed = 0;
}
}
function moveShip() {
if (ySpeed > 0) {
rySpeed = Math.floor(10 * ySpeed) / 10;
} else {
rySpeed = Math.ceil(10 * ySpeed) / 10;
}
if (xSpeed > 0) {
rxSpeed = Math.floor(10 * xSpeed) / 10;
} else {
rxSpeed = Math.ceil(10 * xSpeed) / 10;
}
_y = (_y - rySpeed);
_x = (_x + rxSpeed);
blip._x = _x / _parent.bg.mapScale;
blip._y = _y / _parent.bg.mapScale;
blip._rotation = _rotation;
if (blip && (!blip.hitTest(_parent.stats.map.bounds))) {
stuckCount++;
}
if (stuckCount > 25) {
outOfBounds();
}
rot = _rotation;
}
function pushVector(xPush, yPush) {
xForce = xForce + ((xPush * cos(RAD * _rotation)) + (yPush * sin(RAD * _rotation)));
yForce = yForce + ((xPush * sin(RAD * _rotation)) + (yPush * cos(RAD * _rotation)));
}
function pushDir(xPush, yPush) {
xForce = xForce + xPush;
yForce = yForce + yPush;
}
function resetForce() {
xForce = 0;
yForce = 0;
}
function getWayPoint() {
randomNdx = Math.floor(Math.random() * _root.bg.wayPoint.length);
targ = _parent.bg.wayPoint[randomNdx];
}
function setWayPoint(wpx, wpy) {
delete targ;
targ = new Object();
targ.x = wpx;
targ.y = wpy;
}
function outOfBounds() {
if (spawnPowerUp) {
_parent.makePowerUp(_x, _y);
}
_parent.numberOfBacteria--;
_parent.spermArray[myIndex] = null;
blip.removeMovieClip();
this.removeMovieClip();
}
function die() {
if ((!dead) && ((Math.random() * 100) < proto.powerUpChance)) {
spawnPowerUp = true;
}
dead = true;
if (_alpha > 0) {
_alpha = (_alpha - 2);
} else {
_parent.numberOfBacteriaKilled++;
_parent.numKilled++;
outOfBounds();
}
}
function hit() {
if (HP <= 0) {
die();
}
if (flash) {
flashCount++;
if (!redFlag) {
redFlag = true;
spermColor.setTransform(redFlash);
} else {
redFlag = false;
spermColor.setTransform(normalColor);
if (flashCount > 2) {
flash = false;
flashCount = 0;
}
}
}
}
function exit() {
_y = (_y - (ySpeed / 5));
_x = (_x + (xSpeed / 5));
_yscale = (_yscale - 2);
_xscale = _yscale;
if (_yscale < 10) {
outOfBounds();
}
}
function fireGun() {
shotPlace = new Object();
shotPlace._x = _x;
shotPlace._y = _y;
shotPlace._rotation = _rotation;
_parent.attachMovie("bacteriaShot", "bacteriaShot" + _parent.layer, _parent.layer++, shotPlace);
}
myIndex = _parent.spermArray.length;
_parent.spermArray[myIndex] = this;
type = "bacteria";
proto = _parent.bacteria1;
redFlash = new Object();
redFlash.ra = 100;
redFlash.ga = 50;
redFlash.ba = 0;
flash = true;
normalColor = new Object();
normalColor.ra = (normalColor.ba = (normalColor.ga = 100));
spermColor = new Color(this);
INERTIA = 0.95;
RAD = (Math.PI/180);
MYBLIP_LAYER = _parent.stats.map.layer++;
cos = Math.cos;
sin = Math.sin;
turnSpeed_p = proto.turnSpeed;
accel_p = proto.accel;
HP = proto.HP;
collisionDamage_p = proto.collisionDamage;
this.onEnterFrame = flightControl;
_parent.stats.map.attachMovie(proto.blipClip, "blip" + MYBLIP_LAYER, MYBLIP_LAYER);
blip = _parent.stats.map["blip" + MYBLIP_LAYER];
getWayPoint();
gotoAndPlay (2);
Symbol 462 MovieClip [healthUp] Frame 1
myIndex = _parent.itemArray.length;
_parent.itemArray[myIndex] = this;
blipPlace = new Object();
blipPlace._x = _x / _parent.bg.mapScale;
blipPlace._y = _y / _parent.bg.mapScale;
blipClip = _parent.health.blipClip;
_parent.stats.map.attachMovie(blipClip, blipClip + _parent.stats.map.layer, _parent.stats.map.layer, blipPlace);
blip = _parent.stats.map[blipClip + _parent.stats.map.layer];
_parent.stats.map.layer++;
this.onEnterFrame = function () {
if (hitTest(_parent.ship) && (!_parent.ship.dead)) {
_parent.ship.HP = _parent.ship.HP + _parent.health.amount;
if (_parent.ship.HP > 100) {
_parent.ship.HP = 100;
}
_parent.itemArray[myIndex] = null;
blip.removeMovieClip();
this.removeMovieClip();
}
};
Symbol 464 MovieClip [lifeUp] Frame 1
myIndex = _parent.itemArray.length;
_parent.itemArray[myIndex] = this;
blipPlace = new Object();
blipPlace._x = _x / _parent.bg.mapScale;
blipPlace._y = _y / _parent.bg.mapScale;
blipClip = _parent.lifeUp.blipClip;
_parent.stats.map.attachMovie(blipClip, blipClip + _parent.stats.map.layer, _parent.stats.map.layer, blipPlace);
blip = _parent.stats.map[blipClip + _parent.stats.map.layer];
_parent.stats.map.layer++;
this.onEnterFrame = function () {
if (hitTest(_parent.ship) && (!_parent.ship.dead)) {
_parent.ship.proto.lives++;
_parent.itemArray[myIndex] = null;
blip.removeMovieClip();
this.removeMovieClip();
}
};
Symbol 465 MovieClip [ship360] Frame 1
function flightControl() {
if (!_parent.paused) {
if (!dead) {
hit();
doStats();
getKeys();
checkBounds();
moveShip();
doPhysics();
resetForce();
} else {
die();
}
}
}
function buildShip() {
attachMovie("chassis", "chassis", CHASSIS_LAYER);
_parent.stats.map.attachMovie("greenBlip", "blip" + MYBLIP_LAYER, MYBLIP_LAYER);
blip = _parent.stats.map["blip" + MYBLIP_LAYER];
attachPrimary();
attachSecondary();
attachHeavy();
}
function nextPrimary() {
nextPrimary_press = true;
firstPrimaryNdx = primaryNdx;
primaryNdx++;
if (primaryNdx >= primaryArray.length) {
primaryNdx = 0;
}
do {
if (!((_parent[primaryArray[primaryNdx]].ammo <= 0) && (_parent[primaryArray[primaryNdx]].ammo != "INF"))) {
break;
}
primaryNdx++;
if (primaryNdx >= primaryArray.length) {
primaryNdx = 0;
}
} while (primaryNdx != firstPrimaryNdx);
_parent.stats.primarySelector.gotoAndStop(primaryNdx + 1);
attachPrimary();
}
function attachPrimary() {
currentPrimary = _parent[primaryArray[primaryNdx]];
attachMovie(currentPrimary.clip, "primaryWeapon", PRIMARY_LAYER);
_parent.stats.ammo.text = currentPrimary.ammo;
}
function nextSecondary() {
nextSecondary_press = true;
firstSecondaryNdx = secondaryNdx;
secondaryNdx++;
if (secondaryNdx >= secondaryArray.length) {
secondaryNdx = 0;
}
do {
if (!((_parent[secondaryArray[secondaryNdx]].ammo <= 0) && (_parent[secondaryArray[secondaryNdx]].ammo != "INF"))) {
break;
}
secondaryNdx++;
if (secondaryNdx >= secondaryArray.length) {
secondaryNdx = 0;
}
} while (secondaryNdx != firstSecondaryNdx);
_parent.stats.secondarySelector.gotoAndStop(secondaryNdx + 1);
attachSecondary();
}
function attachSecondary() {
currentSecondary = _parent[secondaryArray[secondaryNdx]];
attachMovie(currentSecondary.clip, "secondaryWeapon", SECONDARY_LAYER);
_parent.stats.ammo2.text = currentSecondary.ammo;
}
function nextHeavy() {
nextHeavy_press = true;
firstHeavyNdx = heavyNdx;
heavyNdx++;
if (heavyNdx >= heavyArray.length) {
heavyNdx = 0;
}
do {
if (!((_parent[heavyArray[heavyNdx]].ammo <= 0) && (_parent[heavyArray[heavyNdx]].ammo != "INF"))) {
break;
}
heavyNdx++;
if (heavyNdx >= heavyArray.length) {
heavyNdx = 0;
}
} while (heavyNdx != firstHeavyNdx);
_parent.stats.heavySelector.gotoAndStop(heavyNdx + 1);
attachHeavy();
}
function attachHeavy() {
currentHeavy = _parent[heavyArray[heavyNdx]];
attachMovie(currentHeavy.clip, "heavyWeapon", HEAVY_LAYER);
_parent.stats.ammo3.text = currentHeavy.ammo;
}
function firePrimary() {
if (currentPrimary.ammo != 0) {
if (energy_p > currentPrimary.usage) {
currentPrimary.fire();
primaryWeapon.play();
energy_p = energy_p - currentPrimary.usage;
}
} else {
nextPrimary();
primaryReadyFire = false;
}
}
function fireSecondary() {
if (currentSecondary.ammo != 0) {
if (energy_p > currentSecondary.usage) {
currentSecondary.fire();
secondaryWeapon.play();
energy_p = energy_p - currentSecondary.usage;
}
} else {
nextSecondary();
secondaryReadyFire = false;
}
}
function fireHeavy() {
if (currentHeavy.ammo != 0) {
if (energy_p > currentHeavy.usage) {
currentHeavy.fire();
heavyWeapon.play();
energy_p = energy_p - currentHeavy.usage;
}
} else {
nextHeavy();
heavyReadyFire = false;
}
}
function checkBounds() {
if (_parent.bg.walls.hitTest(_x, _y, true) && (changeSpeed)) {
xSpeed = xSpeed * -1;
ySpeed = ySpeed * -1;
changeSpeed = false;
} else {
changeSpeed = true;
}
}
function getKeys() {
if (Key.isDown(turnRight_k)) {
_rotation = (_rotation + turnSpeed_p);
} else if (Key.isDown(turnLeft_k)) {
_rotation = (_rotation - turnSpeed_p);
}
if (Key.isDown(accel_k)) {
pushVector(0, accel_p);
} else if (Key.isDown(decel_k)) {
pushVector(0, -accel_p);
}
if (Key.isDown(brake_k)) {
xSpeed = xSpeed * brake_p;
ySpeed = ySpeed * brake_p;
}
if (Key.isDown(switchPrimary_k)) {
if ((!nextPrimary_press) && (primaryWeapon.ready)) {
nextPrimary();
}
} else {
nextPrimary_press = false;
}
if (Key.isDown(switchSecondary_k)) {
if ((!nextSecondary_press) && (secondaryWeapon.ready)) {
nextSecondary();
}
} else {
nextSecondary_press = false;
}
if (Key.isDown(switchHeavy_k)) {
if ((!nextHeavy_press) && (heavyWeapon.ready)) {
nextHeavy();
}
} else {
nextHeavy_press = false;
}
if (Key.isDown(primary_k)) {
if (primaryWeapon.ready && (primaryReadyFire)) {
firePrimary();
}
} else {
primaryReadyFire = true;
}
if (Key.isDown(secondary_k)) {
if (secondaryWeapon.ready && (secondaryReadyFire)) {
fireSecondary();
}
} else {
secondaryReadyFire = true;
}
if (Key.isDown(heavy_k)) {
if (heavyWeapon.ready && (heavyReadyFire)) {
fireHeavy();
}
} else {
heavyReadyFire = true;
}
}
function doPhysics() {
if (changeSpeed) {
xSpeed = (xSpeed + xForce) * INERTIA;
ySpeed = (ySpeed + yForce) * INERTIA;
}
if (Math.abs(xSpeed) < 0.05) {
xSpeed = 0;
}
if (Math.abs(ySpeed) < 0.05) {
ySpeed = 0;
}
}
function moveShip() {
if (ySpeed > 0) {
rySpeed = Math.floor(10 * ySpeed) / 10;
} else {
rySpeed = Math.ceil(10 * ySpeed) / 10;
}
if (xSpeed > 0) {
rxSpeed = Math.floor(10 * xSpeed) / 10;
} else {
rxSpeed = Math.ceil(10 * xSpeed) / 10;
}
_y = (_y - rySpeed);
_x = (_x + rxSpeed);
_parent._y = _parent._y + rySpeed;
_parent._x = _parent._x - rxSpeed;
_parent.stats._y = (-_parent._y) + 390;
_parent.stats._x = -_parent._x;
blip._x = _x / _parent.bg.mapScale;
blip._y = _y / _parent.bg.mapScale;
blip._rotation = _rotation;
}
function pushVector(xPush, yPush) {
xForce = xForce + ((xPush * cos(RAD * _rotation)) + (yPush * sin(RAD * _rotation)));
yForce = yForce + ((xPush * sin(RAD * _rotation)) + (yPush * cos(RAD * _rotation)));
}
function pushDir(xPush, yPush) {
xForce = xForce + xPush;
yForce = yForce + yPush;
}
function resetForce() {
xForce = 0;
yForce = 0;
}
function hit() {
if (flash) {
if (!noHit) {
_parent.hit.start();
}
noHit = true;
flashCount++;
if (!redFlag) {
redFlag = true;
shipColor.setTransform(redFlash);
} else {
redFlag = false;
shipColor.setTransform(normalColor);
if (flashCount > 25) {
flash = false;
noHit = false;
flashCount = 0;
}
}
}
}
function doStats() {
if (energy_p > 0) {
_parent.stats.energyBar._yscale = (energy_p / MAXENERGY) * 100;
} else {
_parent.stats.energyBar._yscale = 0;
}
if (HP <= 0) {
HP = 0;
dead = true;
}
_parent.stats.healthBar._xscale = (HP / MAXHP) * 100;
if (energy_p < MAXENERGY) {
energy_p = energy_p + recharge_p;
} else {
energy_p = MAXENERGY;
}
_parent.stats.ammo.text = currentPrimary.ammo;
_parent.stats.ammo2.text = currentSecondary.ammo;
_parent.stats.ammo3.text = currentHeavy.ammo;
}
function die() {
dieCount++;
if (!dead2) {
_parent.explosion.start();
blip.removeMovieClip();
shipColor.setTransform(normalColor);
dead2 = true;
chassisX = (Math.random() * 20) - 10;
chassisY = (Math.random() * 20) - 10;
chassisR = (Math.random() * 40) - 20;
primaryX = (Math.random() * 20) - 10;
primaryY = (Math.random() * 20) - 10;
primaryR = (Math.random() * 40) - 20;
secondaryX = (Math.random() * 20) - 10;
secondaryY = (Math.random() * 20) - 10;
secondaryR = (Math.random() * 40) - 20;
heavyX = (Math.random() * 20) - 10;
heavyY = (Math.random() * 20) - 10;
heavyR = (Math.random() * 40) - 20;
}
chassis._x = chassis._x + chassisX;
chassis._y = chassis._y + chassisY;
chassis._rotation = chassis._rotation + chassisR;
primaryWeapon._x = primaryWeapon._x + primaryX;
primaryWeapon._y = primaryWeapon._y + primaryY;
primaryWeapon._rotation = primaryWeapon._rotation + primaryR;
secondaryWeapon._x = secondaryWeapon._x + secondaryX;
secondaryWeapon._y = secondaryWeapon._y + secondaryY;
secondaryWeapon._rotation = secondaryWeapon._rotation + secondaryR;
heavyWeapon._x = heavyWeapon._x + heavyX;
heavyWeapon._y = heavyWeapon._y + heavyY;
heavyWeapon._rotation = heavyWeapon._rotation + heavyR;
if (dieCount > 50) {
proto.lives--;
dieCount = 0;
dead = false;
dead2 = false;
_parent.centerScreen();
gotoAndPlay (1);
}
}
redFlash = new Object();
redFlash.ra = 100;
redFlash.ga = 50;
redFlash.ba = 0;
flash = true;
normalColor = new Object();
normalColor.ra = (normalColor.ba = (normalColor.ga = 100));
shipColor = new Color(this);
_yscale = (100 * _parent.shipScale);
_xscale = (100 * _parent.shipScale);
proto = _parent.ship360;
if (proto.lives < 0) {
_parent.gameOver();
}
_x = _parent.bg.startPoint.x;
_y = (_parent.bg.startPoint.y - 55);
INERTIA = 0.95;
RAD = (Math.PI/180);
MYBLIP_LAYER = _parent.stats.map.layer++;
HEAVY_LAYER = 0;
SECONDARY_LAYER = 1;
CHASSIS_LAYER = 2;
PRIMARY_LAYER = 3;
cos = Math.cos;
sin = Math.sin;
brake_k = 32;
accel_k = 38;
decel_k = 40;
turnRight_k = 39;
turnLeft_k = 37;
primary_k = 65;
secondary_k = 83;
heavy_k = 68;
switchPrimary_k = 90;
switchSecondary_k = 88;
switchHeavy_k = 67;
turnSpeed_p = proto.turnSpeed;
accel_p = proto.accel;
recharge_p = proto.recharge;
MAXHP = proto.MAXHP;
MAXENERGY = proto.MAXENERGY;
energy_p = MAXENERGY;
HP = MAXHP;
brake_p = proto.brake;
chassis_p = "chassis";
primaryNdx = (secondaryNdx = (heavyNdx = 0));
_parent.stats.primarySelector.gotoAndStop(primaryNdx);
_parent.stats.secondarySelector.gotoAndStop(secondaryNdx);
_parent.stats.heavySelector.gotoAndStop(heavyNdx);
primaryArray = new Array("laserTurret", "heavyLaser", "spreader", "wave");
secondaryArray = new Array("foam", "antibody", "antibiotic", "pesticide");
heavyArray = new Array("pulse", "torpedo", "nuke", "beacon");
buildShip();
this.onEnterFrame = flightControl;
Symbol 465 MovieClip [ship360] Frame 2
stop();
Symbol 473 MovieClip [secretAmmo] Frame 1
myIndex = _parent.itemArray.length;
_parent.itemArray[myIndex] = this;
this.onEnterFrame = function () {
if (hitTest(_parent.ship) && (!_parent.ship.dead)) {
_parent.pickedUpSecretAmmo = true;
_parent.waveAmmo.weapon.ammo = _parent.waveAmmo.weapon.ammo + 40;
_parent.heavyAmmo.weapon.ammo = _parent.heavyAmmo.weapon.ammo + 40;
_parent.spreaderAmmo.weapon.ammo = _parent.spreaderAmmo.weapon.ammo + 40;
_parent.nukeAmmo.weapon.ammo = _parent.nukeAmmo.weapon.ammo + 10;
_parent.torpedoAmmo.weapon.ammo = _parent.torpedoAmmo.weapon.ammo + 20;
_parent.beaconAmmo.weapon.ammo = _parent.beaconAmmo.weapon.ammo + 10;
_parent.foamAmmo.weapon.ammo = _parent.foamAmmo.weapon.ammo + 20;
_parent.antibioticAmmo.weapon.ammo = _parent.antibioticAmmo.weapon.ammo + 50;
_parent.antibodyAmmo.weapon.ammo = _parent.antibodyAmmo.weapon.ammo + 20;
_parent.pesticideAmmo.weapon.ammo = _parent.pesticideAmmo.weapon.ammo + 20;
_parent.ship.HP = 100;
newAmmo = new String(_parent.waveAmmo.weapon.ammo);
_parent.stats.waveAmmo.text = "";
_parent.stats.waveAmmo.text = newAmmo;
newAmmo = new String(_parent.heavyAmmo.weapon.ammo);
_parent.stats.heavyLaserAmmo.text = "";
_parent.stats.heavyLaserAmmo.text = newAmmo;
newAmmo = new String(_parent.spreaderAmmo.weapon.ammo);
_parent.stats.spreaderAmmo.text = "";
_parent.stats.spreaderAmmo.text = newAmmo;
newAmmo = new String(_parent.nukeAmmo.weapon.ammo);
_parent.stats.nukeAmmo.text = "";
_parent.stats.nukeAmmo.text = newAmmo;
newAmmo = new String(_parent.torpedoAmmo.weapon.ammo);
_parent.stats.torpedoAmmo.text = "";
_parent.stats.torpedoAmmo.text = newAmmo;
newAmmo = new String(_parent.beaconAmmo.weapon.ammo);
_parent.stats.beaconAmmo.text = "";
_parent.stats.beaconAmmo.text = newAmmo;
newAmmo = new String(_parent.foamAmmo.weapon.ammo);
_parent.stats.foamAmmo.text = "";
_parent.stats.foamAmmo.text = newAmmo;
newAmmo = new String(_parent.antibioticAmmo.weapon.ammo);
_parent.stats.antibioticAmmo.text = "";
_parent.stats.antibioticAmmo.text = newAmmo;
newAmmo = new String(_parent.antibodyAmmo.weapon.ammo);
_parent.stats.antibodyAmmo.text = "";
_parent.stats.antibodyAmmo.text = newAmmo;
newAmmo = new String(_parent.pesticideAmmo.weapon.ammo);
_parent.itemArray[myIndex] = null;
_parent.stats.pesticideAmmo.text = "";
_parent.stats.pesticideAmmo.text = newAmmo;
this.removeMovieClip();
}
};
Symbol 480 Button
on (release) {
for (name in _parent.itemArray) {
_parent.itemArray[name].removeMovieClip();
}
for (name in _parent.spermArray) {
_parent.spermArray[name].removeMovieClip();
}
_parent.ship.removeMovieClip();
_parent.stats.removeMovieClip();
_parent._x = 0;
_parent._y = 0;
_parent.gotoAndPlay("init");
this.removeMovieClip;
}
Symbol 484 Button
on (release) {
for (name in _parent.itemArray) {
_parent.itemArray[name].removeMovieClip();
}
for (name in _parent.spermArray) {
_parent.spermArray[name].removeMovieClip();
}
_parent.ship.removeMovieClip();
_parent.stats.removeMovieClip();
_parent._x = 0;
_parent._y = 0;
_parent.gotoAndPlay("levelSelect");
this.removeMovieClip();
}
Symbol 488 Button
on (release) {
_parent.paused = false;
this.removeMovieClip();
}
Symbol 493 Button
on (release) {
_parent.playMusic();
}
Symbol 497 Button
on (release) {
stopAllSounds();
}
Symbol 507 MovieClip [egg1] Frame 1
function flightControl() {
if (!_parent.paused) {
if (!dead) {
lifeCount++;
if ((lifeCount % 30) == 0) {
fireGun();
}
if ((lifeCount % 35) == 0) {
fireGun();
}
if ((lifeCount % 42) == 0) {
fireGun();
}
if ((lifeCount % flashInterval) == 0) {
flashOn();
}
if ((lifeCount % flashInterval) == 1) {
flashOff();
}
hit();
rotate();
checkBounds();
} else {
die();
}
}
}
function checkBounds() {
if (hitTest(_parent.ship._x, _parent.ship._y, true) && (!_parent.ship.eggHit)) {
_parent.ship.xSpeed = _parent.ship.xSpeed * -1.2;
_parent.ship.ySpeed = _parent.ship.ySpeed * -1.2;
_parent.ship.moveShip();
_parent.ship.eggHit = true;
} else {
_parent.ship.eggHit = false;
}
}
function rotate() {
this._rotation = this._rotation + turnSpeed_p;
}
function outOfBounds() {
if (spawnPowerUp) {
_parent.makePowerUp(_x, _y);
}
_parent.numberOfEggs--;
_parent.spermArray[myIndex] = null;
blip.removeMovieClip();
this.removeMovieClip();
}
function die() {
dead = true;
if (_alpha > 0) {
_alpha = (_alpha - 2);
} else {
_parent.numberOfEggsKilled = 1;
_parent.numKilled++;
outOfBounds();
}
}
function hit() {
if (turnSpeed_p > 0) {
turnSpeed_p = ((1 - (HP / MAXHP)) * 8) + 2;
} else {
turnSpeed_p = -1 * (((1 - (HP / MAXHP)) * 8) + 2);
}
if (HP <= 0) {
die();
}
if (flash) {
flashCount++;
if (!redFlag) {
redFlag = true;
spermColor.setTransform(redFlash);
} else {
redFlag = false;
spermColor.setTransform(normalColor);
if (flashCount > 2) {
flash = false;
flashCount = 0;
}
}
}
if (((HP / MAXHP) * 100) > 50) {
flashInterval = 100000 /* 0x0186A0 */;
} else if (((HP / MAXHP) * 100) > 25) {
flashInterval = 30;
} else if (((HP / MAXHP) * 100) > 12) {
flashInterval = 15;
} else if (((HP / MAXHP) * 100) > 6) {
flashInterval = 5;
}
}
function fireGun() {
shotPlace = new Object();
shotPlace._x = _x + (((19 * _xscale) / 100) * Math.sin(_rotation * RAD));
shotPlace._y = _y - (((19 * _xscale) / 100) * Math.cos(_rotation * RAD));
shotPlace._rotation = _rotation;
_parent.attachMovie("eggShot", "eggShot" + _parent.layer, _parent.layer++, shotPlace);
num = (Math.random() * 4) - 2;
turnSpeed_p = turnSpeed_p * (num / Math.abs(num));
}
function flashOn() {
spermColor.setTransform(redFlash);
}
function flashOff() {
spermColor.setTransform(normalColor);
}
myIndex = _parent.spermArray.length;
_parent.spermArray[myIndex] = this;
_parent.spermArray[myIndex + 1] = this.eggBar;
type = "egg";
proto = _parent.egg1;
flashInterval == 999999;
redFlash = new Object();
redFlash.ra = 100;
redFlash.ga = 50;
redFlash.ba = 0;
flash = true;
normalColor = new Object();
normalColor.ra = (normalColor.ba = (normalColor.ga = 100));
this._xscale = _parent.bg._xscale;
this._yscale = _parent.bg._yscale;
spermColor = new Color(this);
INERTIA = 0.95;
RAD = (Math.PI/180);
MYBLIP_LAYER = _parent.stats.map.layer++;
cos = Math.cos;
sin = Math.sin;
turnSpeed_p = proto.turnSpeed;
accel_p = proto.accel;
MAXHP = proto.HP;
HP = MAXHP;
collisionDamage_p = proto.collisionDamage;
this.onEnterFrame = flightControl;
_parent.stats.map.attachMovie(proto.blipClip, "blip" + MYBLIP_LAYER, MYBLIP_LAYER);
blip = _parent.stats.map["blip" + MYBLIP_LAYER];
blip._x = _x / _parent.bg.mapScale;
blip._y = _y / _parent.bg.mapScale;
blip._xscale = (blip._yscale = _parent.bg.mapScale);
getWayPoint();
gotoAndPlay (2);
Symbol 510 MovieClip [eggShot] Frame 1
function shotControl() {
if (!_parent.paused) {
lifeCount++;
xForce = xForce + (speed * Math.sin((_rotation * Math.PI) / 180));
yForce = yForce + (speed * Math.cos((_rotation * Math.PI) / 180));
xSpeed = xSpeed + xForce;
ySpeed = ySpeed + yForce;
_x = (_x + xSpeed);
_y = (_y - ySpeed);
xSpeed = xSpeed * 0.95;
ySpeed = ySpeed * 0.95;
xForce = 0;
yForce = 0;
if (wiggle) {
_rotation = (_rotation + ((Math.random() * 4) - 2));
} else {
_rotation = (_rotation + rot);
}
if (hitTest(_parent.ship) && (!_parent.ship.flash)) {
_parent.ship.flash = true;
_parent.ship.HP = _parent.ship.HP - damage;
die();
}
if (_parent.bg.walls.hitTest(_x, _y, true)) {
die();
}
if (lifeCount > lifeSpan) {
die();
}
}
}
function pushDir(xPush, yPush) {
xForce = xForce + xPush;
yForce = yForce - yPush;
}
function die() {
_parent.enemyShots[myIndex] = null;
delete this.onEnterFrame;
this.removeMovieClip();
}
lifeSpan = 24;
speed = 1.2;
damage = _parent.egg1.power;
myIndex = _parent.enemyShots.length;
_parent.enemyShots[myIndex] = this;
this.onEnterFrame = shotControl;
rot = (Math.random() * 14) - 7;
if (Math.abs(rot) < 2) {
wiggle = true;
}
Symbol 521 MovieClip [worm1] Frame 1
function flightControl() {
if (!_parent.paused) {
if (!dead) {
lifeCount++;
hit();
if (!targ) {
getWayPoint();
}
if ((lifeCount % 3) == 0) {
getPosition();
}
getMovement();
checkBounds();
moveShip();
doPhysics();
resetForce();
} else {
die();
}
}
}
function checkBounds() {
if (bar.hitTest(_parent.ship) && (!_parent.ship.flash)) {
_parent.ship.pushDir(10 * sin(_rotation * RAD), 10 * cos(_rotation * RAD));
pushDir(-10 * sin(_rotation * RAD), -10 * cos(_rotation * RAD));
_parent.ship.flash = true;
_parent.ship.HP = _parent.ship.HP - collisionDamage_p;
}
if (_parent.bg.walls.hitTest(_x, _y, true)) {
framesStuck++;
if (changeSpeed) {
xSpeed = xSpeed * -1;
ySpeed = ySpeed * -1;
changeSpeed = false;
bumps++;
}
if (framesStuck > 10) {
outOfBounds();
}
} else {
framesStuck = 0;
if (!changeSpeed) {
changeSpeed = true;
}
}
if (bumps > 2) {
getWayPoint();
bumps = 0;
}
}
function getPosition() {
targetVectorX = targ.x - _x;
targetVectorY = _y - targ.y;
hypVector = Math.sqrt((targetVectorX * targetVectorX) + (targetVectorY * targetVectorY));
targetThetaX = Math.asin(targetVectorX / hypVector) / RAD;
targetThetaY = Math.acos(targetVectorY / hypVector) / RAD;
if (targetVectorY < 0) {
targetTheta = 180 - targetThetaX;
} else {
targetTheta = targetThetaX;
}
}
function getMovement() {
if ((Math.abs(targetTheta - _rotation) < 10) || (Math.abs(targetTheta - _rotation) > 350)) {
_rotation = targetTheta;
turning = 0;
}
if (_rotation < targetTheta) {
if (turning < turnSpeed_p) {
turning++;
}
} else if (_rotation > targetTheta) {
if (turning > (-turnSpeed_p)) {
turning--;
}
}
if (this.hitTest(targ.x, targ.y)) {
getWayPoint();
}
_rotation = (_rotation + turning);
}
function doPhysics() {
if (changeSpeed) {
xSpeed = (xSpeed + xForce) * INERTIA;
ySpeed = (ySpeed + yForce) * INERTIA;
}
if (Math.abs(xSpeed) < 0.05) {
xSpeed = 0;
}
if (Math.abs(ySpeed) < 0.05) {
ySpeed = 0;
}
}
function moveShip() {
if (ySpeed > 0) {
rySpeed = Math.floor(10 * ySpeed) / 10;
} else {
rySpeed = Math.ceil(10 * ySpeed) / 10;
}
if (xSpeed > 0) {
rxSpeed = Math.floor(10 * xSpeed) / 10;
} else {
rxSpeed = Math.ceil(10 * xSpeed) / 10;
}
_y = (_y - rySpeed);
_x = (_x + rxSpeed);
blip._x = _x / _parent.bg.mapScale;
blip._y = _y / _parent.bg.mapScale;
blip._rotation = _rotation;
if (blip && (!blip.hitTest(_parent.stats.map.bounds))) {
stuckCount++;
}
if (stuckCount > 25) {
outOfBounds();
}
rot = _rotation;
if (_parent.exits.hitTest(_x, _y, true)) {
_parent.numEscaped++;
blip.gotoAndPlay("exit");
this.onEnterFrame = exit;
}
}
function pushVector(xPush, yPush) {
xForce = xForce + ((xPush * cos(RAD * _rotation)) + (yPush * sin(RAD * _rotation)));
yForce = yForce + ((xPush * sin(RAD * _rotation)) + (yPush * cos(RAD * _rotation)));
}
function pushDir(xPush, yPush) {
xForce = xForce + xPush;
yForce = yForce + yPush;
}
function resetForce() {
xForce = 0;
yForce = 0;
}
function getWayPoint() {
randomNdx = Math.floor(Math.random() * _root.bg.wayPoint.length);
targ = _parent.bg.wayPoint[randomNdx];
}
function setWayPoint(wpx, wpy) {
delete targ;
targ = new Object();
targ.x = wpx;
targ.y = wpy;
}
function outOfBounds() {
if (spawnPowerUp) {
_parent.makePowerUp(_x, _y);
}
_parent.numberOfBugs--;
_parent.spermArray[myIndex] = null;
blip.removeMovieClip();
this.removeMovieClip();
}
function die() {
if ((!dead) && ((Math.random() * 100) < proto.powerUpChance)) {
spawnPowerUp = true;
}
dead = true;
if (_alpha > 0) {
_alpha = (_alpha - 2);
} else {
_parent.numberOfBugsKilled++;
_parent.numKilled++;
outOfBounds();
}
}
function hit() {
if (HP <= 0) {
die();
}
if (flash) {
flashCount++;
if (!redFlag) {
redFlag = true;
spermColor.setTransform(redFlash);
} else {
redFlag = false;
spermColor.setTransform(normalColor);
if (flashCount > 2) {
flash = false;
flashCount = 0;
}
}
}
}
function exit() {
_y = (_y - (ySpeed / 5));
_x = (_x + (xSpeed / 5));
_yscale = (_yscale - 2);
_xscale = _yscale;
if (_yscale < 10) {
outOfBounds();
}
}
myIndex = _parent.spermArray.length;
_parent.spermArray[myIndex] = this;
type = "bug";
proto = _parent.worm1;
redFlash = new Object();
redFlash.ra = 100;
redFlash.ga = 50;
redFlash.ba = 0;
flash = true;
normalColor = new Object();
normalColor.ra = (normalColor.ba = (normalColor.ga = 100));
spermColor = new Color(this);
INERTIA = 0.85;
RAD = (Math.PI/180);
MYBLIP_LAYER = _parent.stats.map.layer++;
cos = Math.cos;
sin = Math.sin;
turnSpeed_p = proto.turnSpeed;
accel_p = proto.accel;
HP = proto.HP;
collisionDamage_p = proto.collisionDamage;
this.onEnterFrame = flightControl;
_parent.stats.map.attachMovie(proto.blipClip, "blip" + MYBLIP_LAYER, MYBLIP_LAYER);
blip = _parent.stats.map["blip" + MYBLIP_LAYER];
getWayPoint();
gotoAndPlay (2);
Symbol 531 MovieClip Frame 1
this.onEnterframe = function () {
_rotation = (_rotation + 5);
};
Symbol 532 MovieClip [bacteria2] Frame 1
function flightControl() {
if (!_parent.paused) {
if (!dead) {
lifeCount++;
hit();
if (!targ) {
getWayPoint();
}
if ((lifeCount % 3) == 0) {
getPosition();
}
if (((lifeCount % 24) == 0) && (shipFollow)) {
fireGun();
}
getMovement();
checkBounds();
moveShip();
doPhysics();
resetForce();
} else {
die();
}
}
}
function checkBounds() {
if (bar.hitTest(_parent.ship) && (!_parent.ship.flash)) {
_parent.ship.pushDir(10 * sin(_rotation * RAD), 10 * cos(_rotation * RAD));
pushDir(-10 * sin(_rotation * RAD), -10 * cos(_rotation * RAD));
_parent.ship.flash = true;
_parent.ship.HP = _parent.ship.HP - collisionDamage_p;
}
if (_parent.bg.walls.hitTest(_x, _y, true)) {
framesStuck++;
if (changeSpeed) {
xSpeed = xSpeed * -1;
ySpeed = ySpeed * -1;
changeSpeed = false;
bumps++;
}
if (framesStuck > 10) {
outOfBounds();
}
} else {
framesStuck = 0;
if (!changeSpeed) {
changeSpeed = true;
}
}
if (bumps > 2) {
getWayPoint();
bumps = 0;
}
}
function getPosition() {
if ((Math.abs(_y - _parent.ship._y) < 300) && (Math.abs(_x - _parent.ship._x) < 300)) {
targetVectorX = _parent.ship._x - _x;
targetVectorY = _y - _parent.ship._y;
shipFollow = true;
} else {
shipFollow = false;
targetVectorX = targ.x - _x;
targetVectorY = _y - targ.y;
}
hypVector = Math.sqrt((targetVectorX * targetVectorX) + (targetVectorY * targetVectorY));
targetThetaX = Math.asin(targetVectorX / hypVector) / RAD;
targetThetaY = Math.acos(targetVectorY / hypVector) / RAD;
if (targetVectorY < 0) {
targetTheta = 180 - targetThetaX;
} else {
targetTheta = targetThetaX;
}
}
function getMovement() {
_rotation = targetTheta;
pushVector(0, accel_p);
if (this.hitTest(targ.x, targ.y)) {
getWayPoint();
}
}
function doPhysics() {
if (changeSpeed) {
xSpeed = (xSpeed + xForce) * INERTIA;
ySpeed = (ySpeed + yForce) * INERTIA;
}
if (Math.abs(xSpeed) < 0.05) {
xSpeed = 0;
}
if (Math.abs(ySpeed) < 0.05) {
ySpeed = 0;
}
}
function moveShip() {
if (ySpeed > 0) {
rySpeed = Math.floor(10 * ySpeed) / 10;
} else {
rySpeed = Math.ceil(10 * ySpeed) / 10;
}
if (xSpeed > 0) {
rxSpeed = Math.floor(10 * xSpeed) / 10;
} else {
rxSpeed = Math.ceil(10 * xSpeed) / 10;
}
_y = (_y - rySpeed);
_x = (_x + rxSpeed);
blip._x = _x / _parent.bg.mapScale;
blip._y = _y / _parent.bg.mapScale;
blip._rotation = _rotation;
if (blip && (!blip.hitTest(_parent.stats.map.bounds))) {
stuckCount++;
}
if (stuckCount > 25) {
outOfBounds();
}
rot = _rotation;
}
function pushVector(xPush, yPush) {
xForce = xForce + ((xPush * cos(RAD * _rotation)) + (yPush * sin(RAD * _rotation)));
yForce = yForce + ((xPush * sin(RAD * _rotation)) + (yPush * cos(RAD * _rotation)));
}
function pushDir(xPush, yPush) {
xForce = xForce + xPush;
yForce = yForce + yPush;
}
function resetForce() {
xForce = 0;
yForce = 0;
}
function getWayPoint() {
randomNdx = Math.floor(Math.random() * _root.bg.wayPoint.length);
targ = _parent.bg.wayPoint[randomNdx];
}
function setWayPoint(wpx, wpy) {
delete targ;
targ = new Object();
targ.x = wpx;
targ.y = wpy;
}
function outOfBounds() {
if (spawnPowerUp) {
_parent.makePowerUp(_x, _y);
}
_parent.numberOfBacteria--;
_parent.spermArray[myIndex] = null;
blip.removeMovieClip();
this.removeMovieClip();
}
function die() {
if ((!dead) && ((Math.random() * 100) < proto.powerUpChance)) {
spawnPowerUp = true;
}
dead = true;
if (_alpha > 0) {
_alpha = (_alpha - 2);
} else {
_parent.numberOfBacteriaKilled++;
_parent.numKilled++;
outOfBounds();
}
}
function hit() {
if (HP <= 0) {
die();
}
if (flash) {
flashCount++;
if (!redFlag) {
redFlag = true;
spermColor.setTransform(redFlash);
} else {
redFlag = false;
spermColor.setTransform(normalColor);
if (flashCount > 2) {
flash = false;
flashCount = 0;
}
}
}
}
function exit() {
_y = (_y - (ySpeed / 5));
_x = (_x + (xSpeed / 5));
_yscale = (_yscale - 2);
_xscale = _yscale;
if (_yscale < 10) {
outOfBounds();
}
}
function fireGun() {
shotPlace = new Object();
shotPlace._x = _x;
shotPlace._y = _y;
shotPlace._rotation = _rotation;
_parent.attachMovie("bacteriaShot", "bacteriaShot" + _parent.layer, _parent.layer++, shotPlace);
}
myIndex = _parent.spermArray.length;
_parent.spermArray[myIndex] = this;
type = "bacteria";
proto = _parent.bacteria1;
redFlash = new Object();
redFlash.ra = 100;
redFlash.ga = 50;
redFlash.ba = 0;
flash = true;
normalColor = new Object();
normalColor.ra = (normalColor.ba = (normalColor.ga = 100));
spermColor = new Color(this);
INERTIA = 0.95;
RAD = (Math.PI/180);
MYBLIP_LAYER = _parent.stats.map.layer++;
cos = Math.cos;
sin = Math.sin;
turnSpeed_p = proto.turnSpeed;
accel_p = proto.accel;
HP = proto.HP;
collisionDamage_p = proto.collisionDamage;
this.onEnterFrame = flightControl;
_parent.stats.map.attachMovie(proto.blipClip, "blip" + MYBLIP_LAYER, MYBLIP_LAYER);
blip = _parent.stats.map["blip" + MYBLIP_LAYER];
getWayPoint();
gotoAndPlay (2);
Symbol 533 MovieClip [bug2] Frame 1
function flightControl() {
if (!_parent.paused) {
if (!dead) {
lifeCount++;
hit();
if (!targ) {
getWayPoint();
}
if ((lifeCount % 3) == 0) {
getPosition();
}
getMovement();
checkBounds();
moveShip();
doPhysics();
resetForce();
} else {
die();
}
}
}
function checkBounds() {
if (bar.hitTest(_parent.ship) && (!_parent.ship.flash)) {
_parent.ship.pushDir(10 * sin(_rotation * RAD), 10 * cos(_rotation * RAD));
pushDir(-10 * sin(_rotation * RAD), -10 * cos(_rotation * RAD));
_parent.ship.flash = true;
_parent.ship.HP = _parent.ship.HP - collisionDamage_p;
}
if (_parent.bg.walls.hitTest(_x, _y, true)) {
framesStuck++;
if (changeSpeed) {
xSpeed = xSpeed * -1;
ySpeed = ySpeed * -1;
changeSpeed = false;
bumps++;
}
if (framesStuck > 10) {
outOfBounds();
}
} else {
framesStuck = 0;
if (!changeSpeed) {
changeSpeed = true;
}
}
if (bumps > 2) {
getWayPoint();
bumps = 0;
}
}
function getPosition() {
targetVectorX = targ.x - _x;
targetVectorY = _y - targ.y;
hypVector = Math.sqrt((targetVectorX * targetVectorX) + (targetVectorY * targetVectorY));
targetThetaX = Math.asin(targetVectorX / hypVector) / RAD;
targetThetaY = Math.acos(targetVectorY / hypVector) / RAD;
if (targetVectorY < 0) {
targetTheta = 180 - targetThetaX;
} else {
targetTheta = targetThetaX;
}
}
function getMovement() {
if ((Math.abs(targetTheta - _rotation) < 10) || (Math.abs(targetTheta - _rotation) > 350)) {
_rotation = targetTheta;
turning = 0;
}
if (_rotation < targetTheta) {
if (turning < turnSpeed_p) {
turning++;
}
} else if (_rotation > targetTheta) {
if (turning > (-turnSpeed_p)) {
turning--;
}
}
if (this.hitTest(targ.x, targ.y)) {
getWayPoint();
}
pushVector(0, accel_p);
_rotation = (_rotation + turning);
}
function doPhysics() {
if (changeSpeed) {
xSpeed = (xSpeed + xForce) * INERTIA;
ySpeed = (ySpeed + yForce) * INERTIA;
}
if (Math.abs(xSpeed) < 0.05) {
xSpeed = 0;
}
if (Math.abs(ySpeed) < 0.05) {
ySpeed = 0;
}
}
function moveShip() {
if (ySpeed > 0) {
rySpeed = Math.floor(10 * ySpeed) / 10;
} else {
rySpeed = Math.ceil(10 * ySpeed) / 10;
}
if (xSpeed > 0) {
rxSpeed = Math.floor(10 * xSpeed) / 10;
} else {
rxSpeed = Math.ceil(10 * xSpeed) / 10;
}
_y = (_y - rySpeed);
_x = (_x + rxSpeed);
blip._x = _x / _parent.bg.mapScale;
blip._y = _y / _parent.bg.mapScale;
blip._rotation = _rotation;
if (blip && (!blip.hitTest(_parent.stats.map.bounds))) {
stuckCount++;
}
if (stuckCount > 25) {
outOfBounds();
}
rot = _rotation;
if (_parent.exits.hitTest(_x, _y, true)) {
_parent.numEscaped++;
blip.gotoAndPlay("exit");
this.onEnterFrame = exit;
}
}
function pushVector(xPush, yPush) {
xForce = xForce + ((xPush * cos(RAD * _rotation)) + (yPush * sin(RAD * _rotation)));
yForce = yForce + ((xPush * sin(RAD * _rotation)) + (yPush * cos(RAD * _rotation)));
}
function pushDir(xPush, yPush) {
xForce = xForce + xPush;
yForce = yForce + yPush;
}
function resetForce() {
xForce = 0;
yForce = 0;
}
function getWayPoint() {
randomNdx = Math.floor(Math.random() * _root.bg.wayPoint.length);
targ = _parent.bg.wayPoint[randomNdx];
}
function setWayPoint(wpx, wpy) {
delete targ;
targ = new Object();
targ.x = wpx;
targ.y = wpy;
}
function outOfBounds() {
if (spawnPowerUp) {
_parent.makePowerUp(_x, _y);
}
_parent.numberOfBugs--;
_parent.spermArray[myIndex] = null;
blip.removeMovieClip();
this.removeMovieClip();
}
function die() {
if ((!dead) && ((Math.random() * 100) < proto.powerUpChance)) {
spawnPowerUp = true;
}
dead = true;
if (_alpha > 0) {
_alpha = (_alpha - 2);
} else {
_parent.numberOfBugsKilled++;
_parent.numKilled++;
outOfBounds();
}
}
function hit() {
if (HP <= 0) {
die();
}
if (flash) {
flashCount++;
if (!redFlag) {
redFlag = true;
spermColor.setTransform(redFlash);
} else {
redFlag = false;
spermColor.setTransform(normalColor);
if (flashCount > 2) {
flash = false;
flashCount = 0;
}
}
}
}
function exit() {
_y = (_y - (ySpeed / 5));
_x = (_x + (xSpeed / 5));
_yscale = (_yscale - 2);
_xscale = _yscale;
if (_yscale < 10) {
outOfBounds();
}
}
myIndex = _parent.spermArray.length;
_parent.spermArray[myIndex] = this;
type = "bug";
proto = _parent.bug2;
redFlash = new Object();
redFlash.ra = 100;
redFlash.ga = 50;
redFlash.ba = 0;
flash = true;
normalColor = new Object();
normalColor.ra = (normalColor.ba = (normalColor.ga = 100));
spermColor = new Color(this);
INERTIA = 0.95;
RAD = (Math.PI/180);
MYBLIP_LAYER = _parent.stats.map.layer++;
cos = Math.cos;
sin = Math.sin;
turnSpeed_p = proto.turnSpeed;
accel_p = proto.accel;
HP = proto.HP;
collisionDamage_p = proto.collisionDamage;
this.onEnterFrame = flightControl;
_parent.stats.map.attachMovie(proto.blipClip, "blip" + MYBLIP_LAYER, MYBLIP_LAYER);
blip = _parent.stats.map["blip" + MYBLIP_LAYER];
getWayPoint();
gotoAndPlay (2);
Symbol 549 MovieClip [bigBug] Frame 1
function flightControl() {
if (!_parent.paused) {
if (!dead) {
lifeCount++;
hit();
if (!targ) {
getWayPoint();
}
if ((lifeCount % 3) == 0) {
getPosition();
}
getMovement();
checkBounds();
moveShip();
doPhysics();
resetForce();
} else {
die();
}
}
}
function checkBounds() {
if (bar.hitTest(_parent.ship) && (!_parent.ship.flash)) {
_parent.ship.pushDir(10 * sin(_rotation * RAD), 10 * cos(_rotation * RAD));
pushDir(-10 * sin(_rotation * RAD), -10 * cos(_rotation * RAD));
_parent.ship.flash = true;
_parent.ship.HP = _parent.ship.HP - collisionDamage_p;
}
if (_parent.bg.walls.hitTest(_x, _y, true)) {
framesStuck++;
if (changeSpeed) {
xSpeed = xSpeed * -1;
ySpeed = ySpeed * -1;
changeSpeed = false;
bumps++;
}
if (framesStuck > 10) {
outOfBounds();
}
} else {
framesStuck = 0;
if (!changeSpeed) {
changeSpeed = true;
}
}
if (bumps > 2) {
getWayPoint();
bumps = 0;
}
}
function getPosition() {
if ((Math.abs(_y - _parent.ship._y) < 200) && (Math.abs(_x - _parent.ship._x) < 200)) {
targetVectorX = _parent.ship._x - _x;
targetVectorY = _y - _parent.ship._y;
accel_p = proto.accel * 2;
} else {
targetVectorX = targ.x - _x;
targetVectorY = _y - targ.y;
accel_p = proto.accel;
}
hypVector = Math.sqrt((targetVectorX * targetVectorX) + (targetVectorY * targetVectorY));
targetThetaX = Math.asin(targetVectorX / hypVector) / RAD;
targetThetaY = Math.acos(targetVectorY / hypVector) / RAD;
if (targetVectorY < 0) {
targetTheta = 180 - targetThetaX;
} else {
targetTheta = targetThetaX;
}
}
function getMovement() {
if ((Math.abs(targetTheta - _rotation) < 10) || (Math.abs(targetTheta - _rotation) > 350)) {
_rotation = targetTheta;
turning = 0;
}
if (_rotation < targetTheta) {
if (turning < turnSpeed_p) {
turning++;
}
} else if (_rotation > targetTheta) {
if (turning > (-turnSpeed_p)) {
turning--;
}
}
if (this.hitTest(targ.x, targ.y)) {
getWayPoint();
}
pushVector(0, accel_p);
_rotation = (_rotation + turning);
}
function doPhysics() {
if (changeSpeed) {
xSpeed = (xSpeed + xForce) * INERTIA;
ySpeed = (ySpeed + yForce) * INERTIA;
}
if (Math.abs(xSpeed) < 0.05) {
xSpeed = 0;
}
if (Math.abs(ySpeed) < 0.05) {
ySpeed = 0;
}
}
function moveShip() {
if (ySpeed > 0) {
rySpeed = Math.floor(10 * ySpeed) / 10;
} else {
rySpeed = Math.ceil(10 * ySpeed) / 10;
}
if (xSpeed > 0) {
rxSpeed = Math.floor(10 * xSpeed) / 10;
} else {
rxSpeed = Math.ceil(10 * xSpeed) / 10;
}
_y = (_y - rySpeed);
_x = (_x + rxSpeed);
blip._x = _x / _parent.bg.mapScale;
blip._y = _y / _parent.bg.mapScale;
blip._rotation = _rotation;
if (blip && (!blip.hitTest(_parent.stats.map.bounds))) {
stuckCount++;
}
if (stuckCount > 25) {
outOfBounds();
}
rot = _rotation;
}
function pushVector(xPush, yPush) {
xForce = xForce + ((xPush * cos(RAD * _rotation)) + (yPush * sin(RAD * _rotation)));
yForce = yForce + ((xPush * sin(RAD * _rotation)) + (yPush * cos(RAD * _rotation)));
}
function pushDir(xPush, yPush) {
xForce = xForce + xPush;
yForce = yForce + yPush;
}
function resetForce() {
xForce = 0;
yForce = 0;
}
function getWayPoint() {
randomNdx = Math.floor(Math.random() * _root.bg.wayPoint.length);
targ = _parent.bg.wayPoint[randomNdx];
}
function setWayPoint(wpx, wpy) {
delete targ;
targ = new Object();
targ.x = wpx;
targ.y = wpy;
}
function outOfBounds() {
if (spawnPowerUp) {
_parent.makePowerUp(_x, _y);
}
_parent.numberOfBugs--;
_parent.spermArray[myIndex] = null;
blip.removeMovieClip();
this.removeMovieClip();
}
function die() {
if ((!dead) && ((Math.random() * 100) < proto.powerUpChance)) {
spawnPowerUp = true;
}
dead = true;
if (_alpha > 0) {
_alpha = (_alpha - 2);
} else {
_parent.numberOfBugsKilled++;
_parent.numKilled++;
outOfBounds();
}
}
function hit() {
if (HP <= 0) {
die();
}
if (flash) {
flashCount++;
if (!redFlag) {
redFlag = true;
spermColor.setTransform(redFlash);
} else {
redFlag = false;
spermColor.setTransform(normalColor);
if (flashCount > 2) {
flash = false;
flashCount = 0;
}
}
}
}
function exit() {
_y = (_y - (ySpeed / 5));
_x = (_x + (xSpeed / 5));
_yscale = (_yscale - 2);
_xscale = _yscale;
if (_yscale < 10) {
outOfBounds();
}
}
myIndex = _parent.spermArray.length;
_parent.spermArray[myIndex] = this;
_parent.spermArray[myindex + 1] = innerBar;
type = "bug";
proto = _parent.bigBug;
redFlash = new Object();
redFlash.ra = 100;
redFlash.ga = 50;
redFlash.ba = 0;
flash = true;
normalColor = new Object();
normalColor.ra = (normalColor.ba = (normalColor.ga = 100));
spermColor = new Color(this);
INERTIA = 0.95;
RAD = (Math.PI/180);
MYBLIP_LAYER = _parent.stats.map.layer++;
cos = Math.cos;
sin = Math.sin;
turnSpeed_p = proto.turnSpeed;
accel_p = proto.accel;
HP = proto.HP;
collisionDamage_p = proto.collisionDamage;
this.onEnterFrame = flightControl;
_parent.stats.map.attachMovie(proto.blipClip, "blip" + MYBLIP_LAYER, MYBLIP_LAYER);
blip = _parent.stats.map["blip" + MYBLIP_LAYER];
getWayPoint();
gotoAndPlay (2);
Symbol 561 MovieClip [sperm2] Frame 1
function flightControl() {
if (!_parent.paused) {
if (!dead) {
lifeCount++;
hit();
if (!targ) {
getWayPoint();
}
if ((lifeCount % 6) == 0) {
getPosition();
}
getMovement();
checkBounds();
moveShip();
doPhysics();
resetForce();
} else {
die();
}
}
}
function checkBounds() {
if (bar.hitTest(_parent.ship) && (!_parent.ship.flash)) {
_parent.ship.pushDir(10 * sin(_rotation * RAD), 10 * cos(_rotation * RAD));
pushDir(-15 * sin(_rotation * RAD), -15 * cos(_rotation * RAD));
_parent.ship.flash = true;
_parent.ship.HP = _parent.ship.HP - collisionDamage_p;
}
if (_parent.bg.walls.hitTest(_x, _y, true)) {
framesStuck++;
if (changeSpeed) {
xSpeed = xSpeed * -1;
ySpeed = ySpeed * -1;
changeSpeed = false;
bumps++;
}
if (framesStuck > 10) {
outOfBounds();
}
} else {
framesStuck = 0;
if (!changeSpeed) {
changeSpeed = true;
}
}
if (bumps > 2) {
getWayPoint();
bumps = 0;
}
}
function getPosition() {
targetVectorX = targ.x - _x;
targetVectorY = _y - targ.y;
hypVector = Math.sqrt((targetVectorX * targetVectorX) + (targetVectorY * targetVectorY));
targetThetaX = Math.asin(targetVectorX / hypVector) / RAD;
targetThetaY = Math.acos(targetVectorY / hypVector) / RAD;
if (targetVectorY < 0) {
targetTheta = 180 - targetThetaX;
} else {
targetTheta = targetThetaX;
}
}
function getMovement() {
if ((Math.abs(targetTheta - _rotation) < 10) || (Math.abs(targetTheta - _rotation) > 350)) {
_rotation = targetTheta;
turning = 0;
}
if (_rotation < targetTheta) {
if (turning < turnSpeed_p) {
turning++;
}
} else if (_rotation > targetTheta) {
if (turning > (-turnSpeed_p)) {
turning--;
}
}
if (this.hitTest(targ.x, targ.y)) {
getWayPoint();
}
pushVector(0, accel_p);
_rotation = (_rotation + turning);
}
function doPhysics() {
if (changeSpeed) {
xSpeed = (xSpeed + xForce) * INERTIA;
ySpeed = (ySpeed + yForce) * INERTIA;
}
if (Math.abs(xSpeed) < 0.05) {
xSpeed = 0;
}
if (Math.abs(ySpeed) < 0.05) {
ySpeed = 0;
}
}
function moveShip() {
if (ySpeed > 0) {
rySpeed = Math.floor(10 * ySpeed) / 10;
} else {
rySpeed = Math.ceil(10 * ySpeed) / 10;
}
if (xSpeed > 0) {
rxSpeed = Math.floor(10 * xSpeed) / 10;
} else {
rxSpeed = Math.ceil(10 * xSpeed) / 10;
}
_y = (_y - rySpeed);
_x = (_x + rxSpeed);
blip._x = _x / _parent.bg.mapScale;
blip._y = _y / _parent.bg.mapScale;
blip._rotation = _rotation;
if (blip && (!blip.hitTest(_parent.stats.map.bounds))) {
stuckCount++;
}
if (stuckCount > 25) {
outOfBounds();
}
rot = _rotation;
if (_parent.exits.hitTest(_x, _y, true)) {
blip.gotoAndPlay("exit");
this.onEnterFrame = exit;
}
}
function pushVector(xPush, yPush) {
xForce = xForce + ((xPush * cos(RAD * _rotation)) + (yPush * sin(RAD * _rotation)));
yForce = yForce + ((xPush * sin(RAD * _rotation)) + (yPush * cos(RAD * _rotation)));
}
function pushDir(xPush, yPush) {
xForce = xForce + xPush;
yForce = yForce + yPush;
}
function resetForce() {
xForce = 0;
yForce = 0;
}
function getWayPoint() {
targ = _parent.bg.exit;
}
function setWayPoint(wpx, wpy) {
delete targ;
targ = new Object();
targ.x = wpx;
targ.y = wpy;
}
function outOfBounds() {
if (spawnPowerUp) {
_parent.makePowerUp(_x, _y);
}
_parent.numberOfSperm--;
_parent.spermArray[myIndex] = null;
blip.removeMovieClip();
this.removeMovieClip();
}
function die() {
if ((!dead) && ((Math.random() * 100) < proto.powerUpChance)) {
spawnPowerUp = true;
}
dead = true;
if (_alpha > 0) {
_alpha = (_alpha - 2);
} else {
_parent.numberOfSpermKilled++;
_parent.numKilled++;
outOfBounds();
}
}
function hit() {
if (HP <= 0) {
die();
}
if (flash) {
flashCount++;
if (!redFlag) {
redFlag = true;
spermColor.setTransform(redFlash);
} else {
redFlag = false;
spermColor.setTransform(normalColor);
if (flashCount > 2) {
flash = false;
flashCount = 0;
}
}
}
}
function exit() {
_y = (_y - (ySpeed / 5));
_x = (_x + (xSpeed / 5));
_yscale = (_yscale - 2);
_xscale = _yscale;
if (_yscale < 10) {
outOfBounds();
}
}
myIndex = _parent.spermArray.length;
_parent.spermArray[myIndex] = this;
type = "sperm";
proto = _parent.sperm2;
redFlash = new Object();
redFlash.ra = 100;
redFlash.ga = 50;
redFlash.ba = 0;
flash = true;
normalColor = new Object();
normalColor.ra = (normalColor.ba = (normalColor.ga = 100));
spermColor = new Color(this);
INERTIA = 0.95;
RAD = (Math.PI/180);
MYBLIP_LAYER = _parent.stats.map.layer++;
cos = Math.cos;
sin = Math.sin;
turnSpeed_p = proto.turnSpeed;
accel_p = proto.accel;
HP = proto.HP;
collisionDamage_p = proto.collisionDamage;
this.onEnterFrame = flightControl;
_parent.stats.map.attachMovie(proto.blipClip, "blip" + MYBLIP_LAYER, MYBLIP_LAYER);
blip = _parent.stats.map["blip" + MYBLIP_LAYER];
getWayPoint();
gotoAndPlay (2);
Symbol 562 MovieClip [worm2] Frame 1
function flightControl() {
if (!_parent.paused) {
if (!dead) {
lifeCount++;
hit();
if (!targ) {
getWayPoint();
}
if ((lifeCount % 3) == 0) {
getPosition();
}
getMovement();
checkBounds();
moveShip();
doPhysics();
resetForce();
} else {
die();
}
}
}
function checkBounds() {
if (bar.hitTest(_parent.ship) && (!_parent.ship.flash)) {
_parent.ship.pushDir(10 * sin(_rotation * RAD), 10 * cos(_rotation * RAD));
pushDir(-10 * sin(_rotation * RAD), -10 * cos(_rotation * RAD));
_parent.ship.flash = true;
_parent.ship.HP = _parent.ship.HP - collisionDamage_p;
}
if (_parent.bg.walls.hitTest(_x, _y, true)) {
framesStuck++;
if (changeSpeed) {
xSpeed = xSpeed * -1;
ySpeed = ySpeed * -1;
changeSpeed = false;
bumps++;
}
if (framesStuck > 10) {
outOfBounds();
}
} else {
framesStuck = 0;
if (!changeSpeed) {
changeSpeed = true;
}
}
if (bumps > 2) {
getWayPoint();
bumps = 0;
}
}
function getPosition() {
if ((Math.abs(_y - _parent.ship._y) < 200) && (Math.abs(_x - _parent.ship._x) < 200)) {
targetVectorX = _parent.ship._x - _x;
targetVectorY = _y - _parent.ship._y;
} else {
targetVectorX = targ.x - _x;
targetVectorY = _y - targ.y;
}
hypVector = Math.sqrt((targetVectorX * targetVectorX) + (targetVectorY * targetVectorY));
targetThetaX = Math.asin(targetVectorX / hypVector) / RAD;
targetThetaY = Math.acos(targetVectorY / hypVector) / RAD;
if (targetVectorY < 0) {
targetTheta = 180 - targetThetaX;
} else {
targetTheta = targetThetaX;
}
}
function getMovement() {
if ((Math.abs(targetTheta - _rotation) < 10) || (Math.abs(targetTheta - _rotation) > 350)) {
_rotation = targetTheta;
turning = 0;
}
if (_rotation < targetTheta) {
if (turning < turnSpeed_p) {
turning++;
}
} else if (_rotation > targetTheta) {
if (turning > (-turnSpeed_p)) {
turning--;
}
}
if (this.hitTest(targ.x, targ.y)) {
getWayPoint();
}
_rotation = (_rotation + turning);
}
function doPhysics() {
if (changeSpeed) {
xSpeed = (xSpeed + xForce) * INERTIA;
ySpeed = (ySpeed + yForce) * INERTIA;
}
if (Math.abs(xSpeed) < 0.05) {
xSpeed = 0;
}
if (Math.abs(ySpeed) < 0.05) {
ySpeed = 0;
}
}
function moveShip() {
if (ySpeed > 0) {
rySpeed = Math.floor(10 * ySpeed) / 10;
} else {
rySpeed = Math.ceil(10 * ySpeed) / 10;
}
if (xSpeed > 0) {
rxSpeed = Math.floor(10 * xSpeed) / 10;
} else {
rxSpeed = Math.ceil(10 * xSpeed) / 10;
}
_y = (_y - rySpeed);
_x = (_x + rxSpeed);
blip._x = _x / _parent.bg.mapScale;
blip._y = _y / _parent.bg.mapScale;
blip._rotation = _rotation;
if (blip && (!blip.hitTest(_parent.stats.map.bounds))) {
stuckCount++;
}
if (stuckCount > 25) {
outOfBounds();
}
rot = _rotation;
}
function pushVector(xPush, yPush) {
xForce = xForce + ((xPush * cos(RAD * _rotation)) + (yPush * sin(RAD * _rotation)));
yForce = yForce + ((xPush * sin(RAD * _rotation)) + (yPush * cos(RAD * _rotation)));
}
function pushDir(xPush, yPush) {
xForce = xForce + xPush;
yForce = yForce + yPush;
}
function resetForce() {
xForce = 0;
yForce = 0;
}
function getWayPoint() {
randomNdx = Math.floor(Math.random() * _root.bg.wayPoint.length);
targ = _parent.bg.wayPoint[randomNdx];
}
function setWayPoint(wpx, wpy) {
delete targ;
targ = new Object();
targ.x = wpx;
targ.y = wpy;
}
function outOfBounds() {
if (spawnPowerUp) {
_parent.makePowerUp(_x, _y);
}
_parent.numberOfBugs--;
_parent.spermArray[myIndex] = null;
blip.removeMovieClip();
this.removeMovieClip();
}
function die() {
if ((!dead) && ((Math.random() * 100) < proto.powerUpChance)) {
spawnPowerUp = true;
}
dead = true;
if (_alpha > 0) {
_alpha = (_alpha - 2);
} else {
_parent.numberOfBugsKilled++;
_parent.numKilled++;
outOfBounds();
}
}
function hit() {
if (HP <= 0) {
die();
}
if (flash) {
flashCount++;
if (!redFlag) {
redFlag = true;
spermColor.setTransform(redFlash);
} else {
redFlag = false;
spermColor.setTransform(normalColor);
if (flashCount > 2) {
flash = false;
flashCount = 0;
}
}
}
}
function exit() {
_y = (_y - (ySpeed / 5));
_x = (_x + (xSpeed / 5));
_yscale = (_yscale - 2);
_xscale = _yscale;
if (_yscale < 10) {
outOfBounds();
}
}
myIndex = _parent.spermArray.length;
_parent.spermArray[myIndex] = this;
type = "bug";
proto = _parent.worm2;
redFlash = new Object();
redFlash.ra = 100;
redFlash.ga = 50;
redFlash.ba = 0;
flash = true;
normalColor = new Object();
normalColor.ra = (normalColor.ba = (normalColor.ga = 100));
spermColor = new Color(this);
INERTIA = 0.85;
RAD = (Math.PI/180);
MYBLIP_LAYER = _parent.stats.map.layer++;
cos = Math.cos;
sin = Math.sin;
turnSpeed_p = proto.turnSpeed;
accel_p = proto.accel;
HP = proto.HP;
collisionDamage_p = proto.collisionDamage;
this.onEnterFrame = flightControl;
_parent.stats.map.attachMovie(proto.blipClip, "blip" + MYBLIP_LAYER, MYBLIP_LAYER);
blip = _parent.stats.map["blip" + MYBLIP_LAYER];
getWayPoint();
gotoAndPlay (2);
Symbol 563 MovieClip [virus2] Frame 1
function flightControl() {
if (!_parent.paused) {
if (!dead) {
lifeCount++;
hit();
if (!targ) {
getWayPoint();
}
if ((lifeCount % 3) == 0) {
getPosition();
}
getMovement();
checkBounds();
moveShip();
doPhysics();
resetForce();
} else {
die();
}
}
}
function checkBounds() {
if (bar.hitTest(_parent.ship) && (!_parent.ship.flash)) {
_parent.ship.pushDir(10 * sin(_rotation * RAD), 10 * cos(_rotation * RAD));
pushDir(-10 * sin(_rotation * RAD), -10 * cos(_rotation * RAD));
_parent.ship.flash = true;
_parent.ship.HP = _parent.ship.HP - collisionDamage_p;
}
if (_parent.bg.walls.hitTest(_x, _y, true)) {
framesStuck++;
if (changeSpeed) {
xSpeed = xSpeed * -1;
ySpeed = ySpeed * -1;
changeSpeed = false;
bumps++;
}
if (framesStuck > 10) {
outOfBounds();
}
} else {
framesStuck = 0;
if (!changeSpeed) {
changeSpeed = true;
}
}
if (bumps > 2) {
getWayPoint();
bumps = 0;
}
}
function getPosition() {
targetVectorX = targ.x - _x;
targetVectorY = _y - targ.y;
hypVector = Math.sqrt((targetVectorX * targetVectorX) + (targetVectorY * targetVectorY));
targetThetaX = Math.asin(targetVectorX / hypVector) / RAD;
targetThetaY = Math.acos(targetVectorY / hypVector) / RAD;
if (targetVectorY < 0) {
targetTheta = 180 - targetThetaX;
} else {
targetTheta = targetThetaX;
}
}
function getMovement() {
if ((Math.abs(targetTheta - _rotation) < 10) || (Math.abs(targetTheta - _rotation) > 350)) {
_rotation = targetTheta;
turning = 0;
}
if (_rotation < targetTheta) {
if (turning < turnSpeed_p) {
turning++;
}
} else if (_rotation > targetTheta) {
if (turning > (-turnSpeed_p)) {
turning--;
}
}
if (this.hitTest(targ.x, targ.y)) {
getWayPoint();
}
_rotation = (_rotation + turning);
}
function doPhysics() {
if (changeSpeed) {
xSpeed = (xSpeed + xForce) * INERTIA;
ySpeed = (ySpeed + yForce) * INERTIA;
}
if (Math.abs(xSpeed) < 0.05) {
xSpeed = 0;
}
if (Math.abs(ySpeed) < 0.05) {
ySpeed = 0;
}
}
function moveShip() {
if (ySpeed > 0) {
rySpeed = Math.floor(10 * ySpeed) / 10;
} else {
rySpeed = Math.ceil(10 * ySpeed) / 10;
}
if (xSpeed > 0) {
rxSpeed = Math.floor(10 * xSpeed) / 10;
} else {
rxSpeed = Math.ceil(10 * xSpeed) / 10;
}
_y = (_y - rySpeed);
_x = (_x + rxSpeed);
blip._x = _x / _parent.bg.mapScale;
blip._y = _y / _parent.bg.mapScale;
blip._rotation = _rotation;
if (blip && (!blip.hitTest(_parent.stats.map.bounds))) {
stuckCount++;
}
if (stuckCount > 25) {
outOfBounds();
}
rot = _rotation;
if (_parent.exits.hitTest(_x, _y, true)) {
_parent.numEscaped++;
blip.gotoAndPlay("exit");
this.onEnterFrame = exit;
}
}
function pushVector(xPush, yPush) {
xForce = xForce + ((xPush * cos(RAD * _rotation)) + (yPush * sin(RAD * _rotation)));
yForce = yForce + ((xPush * sin(RAD * _rotation)) + (yPush * cos(RAD * _rotation)));
}
function pushDir(xPush, yPush) {
xForce = xForce + xPush;
yForce = yForce + yPush;
}
function resetForce() {
xForce = 0;
yForce = 0;
}
function getWayPoint() {
randomNdx = Math.floor(Math.random() * _root.bg.wayPoint.length);
targ = _parent.bg.wayPoint[randomNdx];
}
function setWayPoint(wpx, wpy) {
delete targ;
targ = new Object();
targ.x = wpx;
targ.y = wpy;
}
function outOfBounds() {
if (spawnPowerUp) {
_parent.makePowerUp(_x, _y);
}
_parent.numberOfViruses--;
_parent.spermArray[myIndex] = null;
blip.removeMovieClip();
this.removeMovieClip();
}
function die() {
if ((!dead) && ((Math.random() * 100) < proto.powerUpChance)) {
spawnPowerUp = true;
}
dead = true;
if (_alpha > 0) {
_alpha = (_alpha - 2);
} else {
_parent.numberOfVirusesKilled++;
_parent.numKilled++;
outOfBounds();
}
}
function hit() {
if (HP <= 0) {
die();
}
if (flash) {
flashCount++;
if (!redFlag) {
redFlag = true;
spermColor.setTransform(redFlash);
} else {
redFlag = false;
spermColor.setTransform(normalColor);
if (flashCount > 2) {
flash = false;
flashCount = 0;
}
}
}
}
function exit() {
_y = (_y - (ySpeed / 5));
_x = (_x + (xSpeed / 5));
_yscale = (_yscale - 2);
_xscale = _yscale;
if (_yscale < 10) {
outOfBounds();
}
}
myIndex = _parent.spermArray.length;
_parent.spermArray[myIndex] = this;
type = "virus";
proto = _parent.virus2;
redFlash = new Object();
redFlash.ra = 100;
redFlash.ga = 50;
redFlash.ba = 0;
flash = true;
normalColor = new Object();
normalColor.ra = (normalColor.ba = (normalColor.ga = 100));
spermColor = new Color(this);
INERTIA = 0.95;
RAD = (Math.PI/180);
MYBLIP_LAYER = _parent.stats.map.layer++;
cos = Math.cos;
sin = Math.sin;
turnSpeed_p = proto.turnSpeed;
accel_p = proto.accel;
HP = proto.HP;
collisionDamage_p = proto.collisionDamage;
this.onEnterFrame = flightControl;
_parent.stats.map.attachMovie(proto.blipClip, "blip" + MYBLIP_LAYER, MYBLIP_LAYER);
blip = _parent.stats.map["blip" + MYBLIP_LAYER];
getWayPoint();
gotoAndPlay (2);
Symbol 590 MovieClip Frame 1
if (!loaded) {
HP = 5;
loaded = true;
attachMovie("virusHeadBar", "bar", 10);
bart = true;
type = "virus";
}
this.onEnterFrame = function () {
if (HP <= 0) {
_alpha = 10;
HP = 1;
bar.removeMovieClip();
bart = false;
dead = true;
}
if (_alpha < 100) {
_alpha = (_alpha + 1.5);
}
if ((_alpha > 90) && (!bart)) {
attachMovie("virusHeadBar", "bar", 10);
bart = true;
dead = false;
HP = 5;
}
};
Symbol 602 MovieClip Frame 1
if (!loaded) {
HP = 5;
loaded = true;
attachMovie("virusHeadBar", "bar", 10);
bart = true;
type = "virus";
}
this.onEnterFrame = function () {
if (HP <= 0) {
_alpha = 10;
HP = 1;
bar.removeMovieClip();
bart = false;
dead = true;
}
if (_alpha < 100) {
_alpha = (_alpha + 1.5);
}
if ((_alpha > 90) && (!bart)) {
attachMovie("virusHeadBar", "bar", 10);
bart = true;
dead = false;
HP = 5;
}
};
Symbol 604 MovieClip Frame 1
if (!loaded) {
HP = 5;
loaded = true;
attachMovie("virusHeadBar", "bar", 10);
bart = true;
type = "virus";
}
this.onEnterFrame = function () {
if (HP <= 0) {
_alpha = 10;
HP = 1;
bar.removeMovieClip();
bart = false;
dead = true;
}
if (_alpha < 100) {
_alpha = (_alpha + 1.5);
}
if ((_alpha > 90) && (!bart)) {
attachMovie("virusHeadBar", "bar", 10);
bart = true;
dead = false;
HP = 5;
}
};
Symbol 605 MovieClip Frame 1
this.onEnterFrame = function () {
_rotation = (_rotation + 7);
};
Symbol 606 MovieClip [bigVirus] Frame 1
function flightControl() {
if (!_parent.paused) {
if (!dead) {
lifeCount++;
hit();
if (!targ) {
getWayPoint();
}
if ((lifeCount % 3) == 0) {
getPosition();
}
if ((lifeCount % 48) == 0) {
fireGun();
}
getMovement();
checkBounds();
moveShip();
doPhysics();
resetForce();
} else {
die();
}
}
}
function checkBounds() {
if (bar.hitTest(_parent.ship) && (!_parent.ship.flash)) {
_parent.ship.pushDir(10 * sin(_rotation * RAD), 10 * cos(_rotation * RAD));
pushDir(-10 * sin(_rotation * RAD), -10 * cos(_rotation * RAD));
_parent.ship.flash = true;
_parent.ship.HP = _parent.ship.HP - collisionDamage_p;
}
if (_parent.bg.walls.hitTest(_x, _y, true)) {
framesStuck++;
if (changeSpeed) {
xSpeed = xSpeed * -1;
ySpeed = ySpeed * -1;
changeSpeed = false;
bumps++;
}
if (framesStuck > 10) {
outOfBounds();
}
} else {
framesStuck = 0;
if (!changeSpeed) {
changeSpeed = true;
}
}
if (bumps > 2) {
randomNdx = randomNdx - (ndxDir * 2);
getWayPoint();
bumps = 0;
}
}
function getPosition() {
if ((Math.abs(_y - _parent.ship._y) < 300) && (Math.abs(_x - _parent.ship._x) < 300)) {
targetVectorX = _parent.ship._x - _x;
targetVectorY = _y - _parent.ship._y;
} else {
targetVectorX = targ.x - _x;
targetVectorY = _y - targ.y;
}
hypVector = Math.sqrt((targetVectorX * targetVectorX) + (targetVectorY * targetVectorY));
targetThetaX = Math.asin(targetVectorX / hypVector) / RAD;
targetThetaY = Math.acos(targetVectorY / hypVector) / RAD;
if (targetVectorY < 0) {
targetTheta = 180 - targetThetaX;
} else {
targetTheta = targetThetaX;
}
}
function getMovement() {
_rotation = targetTheta;
pushVector(0, accel_p);
if (this.hitTest(targ.x, targ.y)) {
getWayPoint();
}
}
function doPhysics() {
if (changeSpeed) {
xSpeed = (xSpeed + xForce) * INERTIA;
ySpeed = (ySpeed + yForce) * INERTIA;
}
if (Math.abs(xSpeed) < 0.05) {
xSpeed = 0;
}
if (Math.abs(ySpeed) < 0.05) {
ySpeed = 0;
}
}
function moveShip() {
if (ySpeed > 0) {
rySpeed = Math.floor(10 * ySpeed) / 10;
} else {
rySpeed = Math.ceil(10 * ySpeed) / 10;
}
if (xSpeed > 0) {
rxSpeed = Math.floor(10 * xSpeed) / 10;
} else {
rxSpeed = Math.ceil(10 * xSpeed) / 10;
}
_y = (_y - rySpeed);
_x = (_x + rxSpeed);
blip._x = _x / _parent.bg.mapScale;
blip._y = _y / _parent.bg.mapScale;
blip._rotation = _rotation;
if (blip && (!blip.hitTest(_parent.stats.map.bounds))) {
stuckCount++;
}
if (stuckCount > 25) {
outOfBounds();
}
rot = _rotation;
}
function pushVector(xPush, yPush) {
xForce = xForce + ((xPush * cos(RAD * _rotation)) + (yPush * sin(RAD * _rotation)));
yForce = yForce + ((xPush * sin(RAD * _rotation)) + (yPush * cos(RAD * _rotation)));
}
function pushDir(xPush, yPush) {
xForce = xForce + xPush;
yForce = yForce + yPush;
}
function resetForce() {
xForce = 0;
yForce = 0;
}
function getWayPoint() {
randomNdx = randomNdx + ndxDir;
if (randomNdx >= _parent.bg.wayPoint.length) {
ndxDir = -1;
}
if (randomNdx <= 1) {
ndxDir = 1;
}
targ = _parent.bg.wayPoint[_parent.bg.wayPoint.length - randomNdx];
}
function setWayPoint(wpx, wpy) {
delete targ;
targ = new Object();
targ.x = wpx;
targ.y = wpy;
}
function outOfBounds() {
if (spawnPowerUp) {
_parent.makePowerUp(_x, _y);
}
_parent.numberOfBigViruses--;
_parent.spermArray[myIndex] = null;
blip.removeMovieClip();
this.removeMovieClip();
}
function die() {
if ((!dead) && ((Math.random() * 100) < proto.powerUpChance)) {
spawnPowerUp = true;
}
dead = true;
if (_alpha > 0) {
_alpha = (_alpha - 2);
} else {
_parent.numberOfBigVirusesKilled++;
_parent.numKilled++;
outOfBounds();
}
}
function hit() {
if (HP <= 0) {
die();
}
if (flash) {
flashCount++;
if (!redFlag) {
redFlag = true;
spermColor.setTransform(redFlash);
} else {
redFlag = false;
spermColor.setTransform(normalColor);
if (flashCount > 2) {
flash = false;
flashCount = 0;
}
}
}
}
function exit() {
_y = (_y - (ySpeed / 5));
_x = (_x + (xSpeed / 5));
_yscale = (_yscale - 2);
_xscale = _yscale;
if (_yscale < 10) {
outOfBounds();
}
}
function fireGun() {
shotPlace = new Object();
shotPlace._x = _x;
shotPlace._y = _y;
shotPlace._rotation = _rotation - 180;
_parent.attachMovie("bacteriaShot", "bacteriaShot" + _parent.layer, _parent.layer++, shotPlace);
}
myIndex = _parent.spermArray.length;
_parent.spermArray[myIndex] = this;
_parent.spermArray[myIndex + 1] = inner.head1;
inner.head1.index = myIndex + 1;
_parent.spermArray[myIndex + 2] = inner.head2;
inner.head2.index = myIndex + 2;
_parent.spermArray[myIndex + 3] = inner.head3;
inner.head3.index = myIndex + 3;
_parent.spermArray[myIndex + 4] = inner.head4;
inner.head4.index = myIndex + 4;
_parent.spermArray[myIndex + 5] = inner.head5;
inner.head5.index = myIndex + 5;
_parent.spermArray[myIndex + 6] = inner.head6;
inner.head6.index = myIndex + 6;
type = "null";
proto = _parent.bigVirus;
ndxDir = 1;
redFlash = new Object();
redFlash.ra = 100;
redFlash.ga = 50;
redFlash.ba = 0;
flash = true;
normalColor = new Object();
normalColor.ra = (normalColor.ba = (normalColor.ga = 100));
spermColor = new Color(this);
INERTIA = 0.95;
RAD = (Math.PI/180);
MYBLIP_LAYER = _parent.stats.map.layer++;
cos = Math.cos;
sin = Math.sin;
turnSpeed_p = proto.turnSpeed;
accel_p = proto.accel;
HP = proto.HP;
collisionDamage_p = proto.collisionDamage;
this.onEnterFrame = flightControl;
_parent.stats.map.attachMovie(proto.blipClip, "blip" + MYBLIP_LAYER, MYBLIP_LAYER);
blip = _parent.stats.map["blip" + MYBLIP_LAYER];
getWayPoint();
gotoAndPlay (2);
Symbol 609 MovieClip [bigBug2] Frame 1
function flightControl() {
if (!_parent.paused) {
if (!dead) {
lifeCount++;
hit();
if (!targ) {
getWayPoint();
}
if ((lifeCount % 3) == 0) {
getPosition();
}
getMovement();
checkBounds();
moveShip();
doPhysics();
resetForce();
} else {
die();
}
}
}
function checkBounds() {
if (bar.hitTest(_parent.ship) && (!_parent.ship.flash)) {
_parent.ship.pushDir(10 * sin(_rotation * RAD), 10 * cos(_rotation * RAD));
pushDir(-10 * sin(_rotation * RAD), -10 * cos(_rotation * RAD));
_parent.ship.flash = true;
_parent.ship.HP = _parent.ship.HP - collisionDamage_p;
}
if (_parent.bg.walls.hitTest(_x, _y, true)) {
framesStuck++;
if (changeSpeed) {
xSpeed = xSpeed * -1;
ySpeed = ySpeed * -1;
changeSpeed = false;
bumps++;
}
if (framesStuck > 10) {
outOfBounds();
}
} else {
framesStuck = 0;
if (!changeSpeed) {
changeSpeed = true;
}
}
if (bumps > 2) {
getWayPoint();
bumps = 0;
}
}
function getPosition() {
if ((Math.abs(_y - _parent.ship._y) < 200) && (Math.abs(_x - _parent.ship._x) < 200)) {
targetVectorX = _parent.ship._x - _x;
targetVectorY = _y - _parent.ship._y;
accel_p = proto.accel * 2;
} else {
targetVectorX = targ.x - _x;
targetVectorY = _y - targ.y;
accel_p = proto.accel;
}
hypVector = Math.sqrt((targetVectorX * targetVectorX) + (targetVectorY * targetVectorY));
targetThetaX = Math.asin(targetVectorX / hypVector) / RAD;
targetThetaY = Math.acos(targetVectorY / hypVector) / RAD;
if (targetVectorY < 0) {
targetTheta = 180 - targetThetaX;
} else {
targetTheta = targetThetaX;
}
}
function getMovement() {
if ((Math.abs(targetTheta - _rotation) < 10) || (Math.abs(targetTheta - _rotation) > 350)) {
_rotation = targetTheta;
turning = 0;
}
if (_rotation < targetTheta) {
if (turning < turnSpeed_p) {
turning++;
}
} else if (_rotation > targetTheta) {
if (turning > (-turnSpeed_p)) {
turning--;
}
}
if (this.hitTest(targ.x, targ.y)) {
getWayPoint();
}
pushVector(0, accel_p);
_rotation = (_rotation + turning);
}
function doPhysics() {
if (changeSpeed) {
xSpeed = (xSpeed + xForce) * INERTIA;
ySpeed = (ySpeed + yForce) * INERTIA;
}
if (Math.abs(xSpeed) < 0.05) {
xSpeed = 0;
}
if (Math.abs(ySpeed) < 0.05) {
ySpeed = 0;
}
}
function moveShip() {
if (ySpeed > 0) {
rySpeed = Math.floor(10 * ySpeed) / 10;
} else {
rySpeed = Math.ceil(10 * ySpeed) / 10;
}
if (xSpeed > 0) {
rxSpeed = Math.floor(10 * xSpeed) / 10;
} else {
rxSpeed = Math.ceil(10 * xSpeed) / 10;
}
_y = (_y - rySpeed);
_x = (_x + rxSpeed);
blip._x = _x / _parent.bg.mapScale;
blip._y = _y / _parent.bg.mapScale;
blip._rotation = _rotation;
if (blip && (!blip.hitTest(_parent.stats.map.bounds))) {
stuckCount++;
}
if (stuckCount > 25) {
outOfBounds();
}
rot = _rotation;
}
function pushVector(xPush, yPush) {
xForce = xForce + ((xPush * cos(RAD * _rotation)) + (yPush * sin(RAD * _rotation)));
yForce = yForce + ((xPush * sin(RAD * _rotation)) + (yPush * cos(RAD * _rotation)));
}
function pushDir(xPush, yPush) {
xForce = xForce + xPush;
yForce = yForce + yPush;
}
function resetForce() {
xForce = 0;
yForce = 0;
}
function getWayPoint() {
randomNdx = Math.floor(Math.random() * _root.bg.wayPoint.length);
targ = _parent.bg.wayPoint[randomNdx];
}
function setWayPoint(wpx, wpy) {
delete targ;
targ = new Object();
targ.x = wpx;
targ.y = wpy;
}
function outOfBounds() {
if (spawnPowerUp) {
_parent.makePowerUp(_x, _y);
}
_parent.numberOfBugs--;
_parent.spermArray[myIndex] = null;
blip.removeMovieClip();
this.removeMovieClip();
}
function die() {
if ((!dead) && ((Math.random() * 100) < proto.powerUpChance)) {
spawnPowerUp = true;
}
dead = true;
if (_alpha > 0) {
_alpha = (_alpha - 2);
} else {
_parent.numberOfBugsKilled++;
_parent.numKilled++;
outOfBounds();
}
}
function hit() {
if (HP <= 0) {
die();
}
if (flash) {
flashCount++;
if (!redFlag) {
redFlag = true;
spermColor.setTransform(redFlash);
} else {
redFlag = false;
spermColor.setTransform(normalColor);
if (flashCount > 2) {
flash = false;
flashCount = 0;
}
}
}
}
function exit() {
_y = (_y - (ySpeed / 5));
_x = (_x + (xSpeed / 5));
_yscale = (_yscale - 2);
_xscale = _yscale;
if (_yscale < 10) {
outOfBounds();
}
}
myIndex = _parent.spermArray.length;
_parent.spermArray[myIndex] = this;
_parent.spermArray[myindex + 1] = innerBar;
type = "bug";
proto = _parent.bigBug2;
redFlash = new Object();
redFlash.ra = 100;
redFlash.ga = 50;
redFlash.ba = 0;
flash = true;
normalColor = new Object();
normalColor.ra = (normalColor.ba = (normalColor.ga = 100));
spermColor = new Color(this);
INERTIA = 0.95;
RAD = (Math.PI/180);
MYBLIP_LAYER = _parent.stats.map.layer++;
cos = Math.cos;
sin = Math.sin;
turnSpeed_p = proto.turnSpeed;
accel_p = proto.accel;
HP = proto.HP;
collisionDamage_p = proto.collisionDamage;
this.onEnterFrame = flightControl;
_parent.stats.map.attachMovie(proto.blipClip, "blip" + MYBLIP_LAYER, MYBLIP_LAYER);
blip = _parent.stats.map["blip" + MYBLIP_LAYER];
getWayPoint();
gotoAndPlay (2);
Symbol 617 MovieClip [sperm3] Frame 1
function flightControl() {
if (!_parent.paused) {
if (!dead) {
lifeCount++;
hit();
if (!targ) {
getWayPoint();
}
if ((lifeCount % 3) == 0) {
getPosition();
}
getMovement();
checkBounds();
moveShip();
doPhysics();
resetForce();
} else {
die();
}
}
}
function checkBounds() {
if (bar.hitTest(_parent.ship) && (!_parent.ship.flash)) {
_parent.ship.pushDir(10 * sin(_rotation * RAD), 10 * cos(_rotation * RAD));
pushDir(-10 * sin(_rotation * RAD), -10 * cos(_rotation * RAD));
_parent.ship.flash = true;
_parent.ship.HP = _parent.ship.HP - collisionDamage_p;
}
if (_parent.bg.walls.hitTest(_x, _y, true)) {
framesStuck++;
if (changeSpeed) {
xSpeed = xSpeed * -1;
ySpeed = ySpeed * -1;
changeSpeed = false;
bumps++;
}
if (framesStuck > 10) {
outOfBounds();
}
} else {
framesStuck = 0;
if (!changeSpeed) {
changeSpeed = true;
}
}
if (bumps > 2) {
getWayPoint();
bumps = 0;
}
}
function getPosition() {
if ((Math.abs(_y - _parent.ship._y) < 200) && (Math.abs(_x - _parent.ship._x) < 200)) {
targetVectorX = _parent.ship._x - _x;
targetVectorY = _y - _parent.ship._y;
} else {
targetVectorX = targ.x - _x;
targetVectorY = _y - targ.y;
}
hypVector = Math.sqrt((targetVectorX * targetVectorX) + (targetVectorY * targetVectorY));
targetThetaX = Math.asin(targetVectorX / hypVector) / RAD;
targetThetaY = Math.acos(targetVectorY / hypVector) / RAD;
if (targetVectorY < 0) {
targetTheta = 180 - targetThetaX;
} else {
targetTheta = targetThetaX;
}
}
function getMovement() {
if ((Math.abs(targetTheta - _rotation) < 10) || (Math.abs(targetTheta - _rotation) > 350)) {
_rotation = targetTheta;
turning = 0;
}
if (_rotation < targetTheta) {
if (turning < turnSpeed_p) {
turning++;
}
} else if (_rotation > targetTheta) {
if (turning > (-turnSpeed_p)) {
turning--;
}
}
if (this.hitTest(targ.x, targ.y)) {
getWayPoint();
}
pushVector(0, accel_p);
_rotation = (_rotation + turning);
}
function doPhysics() {
if (changeSpeed) {
xSpeed = (xSpeed + xForce) * INERTIA;
ySpeed = (ySpeed + yForce) * INERTIA;
}
if (Math.abs(xSpeed) < 0.05) {
xSpeed = 0;
}
if (Math.abs(ySpeed) < 0.05) {
ySpeed = 0;
}
}
function moveShip() {
if (ySpeed > 0) {
rySpeed = Math.floor(10 * ySpeed) / 10;
} else {
rySpeed = Math.ceil(10 * ySpeed) / 10;
}
if (xSpeed > 0) {
rxSpeed = Math.floor(10 * xSpeed) / 10;
} else {
rxSpeed = Math.ceil(10 * xSpeed) / 10;
}
_y = (_y - rySpeed);
_x = (_x + rxSpeed);
blip._x = _x / _parent.bg.mapScale;
blip._y = _y / _parent.bg.mapScale;
blip._rotation = _rotation;
if (blip && (!blip.hitTest(_parent.stats.map.bounds))) {
stuckCount++;
}
if (stuckCount > 25) {
outOfBounds();
}
rot = _rotation;
}
function pushVector(xPush, yPush) {
xForce = xForce + ((xPush * cos(RAD * _rotation)) + (yPush * sin(RAD * _rotation)));
yForce = yForce + ((xPush * sin(RAD * _rotation)) + (yPush * cos(RAD * _rotation)));
}
function pushDir(xPush, yPush) {
xForce = xForce + xPush;
yForce = yForce + yPush;
}
function resetForce() {
xForce = 0;
yForce = 0;
}
function getWayPoint() {
randomNdx = Math.floor(Math.random() * _root.bg.wayPoint.length);
targ = _parent.bg.wayPoint[randomNdx];
}
function setWayPoint(wpx, wpy) {
delete targ;
targ = new Object();
targ.x = wpx;
targ.y = wpy;
}
function outOfBounds() {
if (spawnPowerUp) {
_parent.makePowerUp(_x, _y);
}
_parent.numberOfSperm--;
_parent.spermArray[myIndex] = null;
blip.removeMovieClip();
this.removeMovieClip();
}
function die() {
if ((!dead) && ((Math.random() * 100) < proto.powerUpChance)) {
spawnPowerUp = true;
}
dead = true;
if (_alpha > 0) {
_alpha = (_alpha - 2);
} else {
_parent.numberOfSpermKilled++;
_parent.numKilled++;
outOfBounds();
}
}
function hit() {
if (HP <= 0) {
die();
}
if (flash) {
flashCount++;
if (!redFlag) {
redFlag = true;
spermColor.setTransform(redFlash);
} else {
redFlag = false;
spermColor.setTransform(normalColor);
if (flashCount > 2) {
flash = false;
flashCount = 0;
}
}
}
}
function exit() {
_y = (_y - (ySpeed / 5));
_x = (_x + (xSpeed / 5));
_yscale = (_yscale - 2);
_xscale = _yscale;
if (_yscale < 10) {
outOfBounds();
}
}
myIndex = _parent.spermArray.length;
_parent.spermArray[myIndex] = this;
type = "sperm";
proto = _parent.sperm3;
redFlash = new Object();
redFlash.ra = 100;
redFlash.ga = 50;
redFlash.ba = 0;
flash = true;
normalColor = new Object();
normalColor.ra = (normalColor.ba = (normalColor.ga = 100));
spermColor = new Color(this);
INERTIA = 0.95;
RAD = (Math.PI/180);
MYBLIP_LAYER = _parent.stats.map.layer++;
cos = Math.cos;
sin = Math.sin;
turnSpeed_p = proto.turnSpeed;
accel_p = proto.accel;
HP = proto.HP;
collisionDamage_p = proto.collisionDamage;
this.onEnterFrame = flightControl;
_parent.stats.map.attachMovie(proto.blipClip, "blip" + MYBLIP_LAYER, MYBLIP_LAYER);
blip = _parent.stats.map["blip" + MYBLIP_LAYER];
getWayPoint();
gotoAndPlay (2);
Symbol 632 MovieClip Frame 1
function hit() {
if (flash == true) {
_parent.flash = true;
_parent.HP = HP;
flash = false;
}
}
HP = _parent.HP;
this.onEnterFrame = hit;
Symbol 634 MovieClip [penis] Frame 1
function flightControl() {
if (!_parent.paused) {
if (!dead) {
lifeCount++;
if ((lifeCount % 30) == 0) {
fireGun();
}
if ((lifeCount % 35) == 0) {
fireGun();
}
if ((lifeCount % 42) == 0) {
fireGun();
}
if ((lifeCount % flashInterval) == 0) {
flashOn();
}
if ((lifeCount % flashInterval) == 1) {
flashOff();
}
hit();
rotate();
checkBounds();
} else {
die();
}
}
}
function checkBounds() {
cockBounds = cock.getBounds(_parent);
cockX = (cockBounds.xMax + cockBounds.xMin) / 2;
cockY = cockBounds.yMin;
if ((cock.hitTest(_parent.ship._x, _parent.ship._y, true) && (!_parent.ship.eggHit)) && (!_parent.ship.deadv)) {
_parent.ship.pushDir((-(cockX - _parent.ship._x)) / 10, (-(cockY - _parent.ship._y)) / 10);
_parent.ship.eggHit = true;
} else {
_parent.ship.eggHit = false;
}
}
function rotate() {
cockSpeed = cockSpeed + accel;
cockSpeed = cockSpeed * INERTIA;
cock._y = cock._y - cockSpeed;
if ((cock._y < cockDepth) && (cockDir == "up")) {
accel = accel * -1;
cockDir = "down";
makeSperm();
}
if ((cock._y > cockStart) && (cockDir == "down")) {
accel = accel * -1;
cockDir = "up";
getCockDepth();
}
}
function getCockDepth() {
cockDepth = (Math.random() * 80) + 80;
accel = (Math.random() * 1.5) + 1;
}
function outOfBounds() {
if (spawnPowerUp) {
_parent.makePowerUp(_x, _y);
}
_parent.numberOfEggs--;
_parent.spermArray[myIndex] = null;
blip.removeMovieClip();
this.removeMovieClip();
}
function die() {
dead = true;
if (_alpha > 0) {
_alpha = (_alpha - 2);
} else {
_parent.numberOfEggsKilled = 1;
_parent.numKilled++;
outOfBounds();
}
}
function hit() {
if (turnSpeed_p > 0) {
turnSpeed_p = ((1 - (HP / MAXHP)) * 8) + 2;
} else {
turnSpeed_p = -1 * (((1 - (HP / MAXHP)) * 8) + 2);
}
if (HP <= 0) {
die();
}
if (flash) {
flashCount++;
if (!redFlag) {
redFlag = true;
spermColor.setTransform(redFlash);
} else {
redFlag = false;
spermColor.setTransform(normalColor);
if (flashCount > 2) {
flash = false;
flashCount = 0;
}
}
}
if (((HP / MAXHP) * 100) > 50) {
flashInterval = 100000 /* 0x0186A0 */;
} else if (((HP / MAXHP) * 100) > 25) {
flashInterval = 30;
} else if (((HP / MAXHP) * 100) > 12) {
flashInterval = 15;
} else if (((HP / MAXHP) * 100) > 6) {
flashInterval = 5;
}
}
function fireGun() {
shotPlace = new Object();
shotPlace._x = _x + (((19 * _xscale) / 100) * Math.sin(_rotation * RAD));
shotPlace._y = _y - (((19 * _xscale) / 100) * Math.cos(_rotation * RAD));
shotPlace._rotation = _rotation;
_parent.attachMovie("eggShot", "eggShot" + _parent.layer, _parent.layer++, shotPlace);
num = (Math.random() * 4) - 2;
turnSpeed_p = turnSpeed_p * (num / Math.abs(num));
}
function flashOn() {
spermColor.setTransform(redFlash);
}
function flashOff() {
spermColor.setTransform(normalColor);
}
function makeSperm() {
if (_parent.numberOfSperm <= (gizzCount / 2)) {
_parent.squish.start();
i = 0;
while (_parent.numberOfSperm < gizzCount) {
if ((i % 2) == 0) {
_parent.sperm1.spermSpawn();
} else {
_parent.sperm3.spermSpawn();
}
_parent.numberOfSperm++;
i++;
}
}
}
myIndex = _parent.spermArray.length;
_parent.spermArray[myIndex] = cock;
_parent.spermArray[myIndex + 1] = cock.cockBar;
_parent.spermArray[myIndex + 2] = cock.cockBar2;
type = "egg";
proto = _parent.penis;
cockStart = cock._y;
cockDir = "up";
getCockDepth();
flashInterval == 999999;
redFlash = new Object();
redFlash.ra = 100;
redFlash.ga = 50;
redFlash.ba = 0;
flash = true;
normalColor = new Object();
normalColor.ra = (normalColor.ba = (normalColor.ga = 100));
this._xscale = _parent.bg._xscale;
this._yscale = _parent.bg._yscale;
spermColor = new Color(cock);
INERTIA = 0.7;
MAXHP = proto.HP;
HP = MAXHP;
collisionDamage_p = proto.collisionDamage;
accel = proto.accel;
gizzCount = proto.power;
this.onEnterFrame = flightControl;
Symbol 639 MovieClip Frame 1
stop();
Symbol 652 Button
on (release) {
gotoAndPlay (27);
}
Symbol 656 Button
on (release) {
gotoAndPlay (19);
}
Symbol 660 Button
on (release) {
gotoAndPlay (2);
}
Symbol 663 Button
on (release) {
getPassword(passInput);
passInput = "";
}
Symbol 664 Button
on (release) {
gotoAndPlay (14);
}
Symbol 670 Button
on (release) {
difficulty = "hard";
gotoAndPlay(nextLevel);
}
Symbol 674 Button
on (release) {
difficulty = "medium";
gotoAndPlay(nextLevel);
}
Symbol 677 Button
on (release) {
difficulty = "easy";
gotoAndPlay(nextLevel);
}
Symbol 684 Button
on (release) {
gotoAndStop (2);
}
Symbol 700 Button
on (release) {
_parent.gotoAndPlay("vagina");
}
Symbol 714 Button
on (release) {
_parent.gotoAndPlay("uterus");
}
Symbol 727 Button
on (release) {
_parent.gotoAndPlay("ovary");
}
Symbol 740 Button
on (release) {
_parent.gotoAndPlay("rectum");
}
Symbol 751 Button
on (release) {
_parent.gotoAndPlay("sigmoid");
}
Symbol 764 Button
on (release) {
_parent.gotoAndPlay("bladder");
}
Symbol 776 Button
on (release) {
_parent.gotoAndPlay("kidney");
}
Symbol 778 Button
on (release) {
gotoAndStop (1);
}
Symbol 790 Button
on (release) {
_parent.gotoAndPlay("mouth");
}
Symbol 797 Button
on (release) {
_parent.gotoAndPlay("stomach");
}
Symbol 810 Button
on (release) {
_parent.gotoAndPlay("intestine");
}
Symbol 811 MovieClip Frame 1
stop();
if (!_parent.unlockedRectum) {
rectumButton._visible = false;
if (!_parent.unlockedSigmoid) {
colonButton._visible = false;
if (((!_parent.unlockedMouth) && (!_parent.unlockedStomach)) && (!_parent.unlockedIntestine)) {
nextButton._visible = false;
if (!_parent.unlockedKidney) {
kidneyButton._visible = false;
if (!_parent.unlockedBladder) {
bladderButton._visible = false;
if (!_parent.unlockedOvary) {
ovaryButton._visible = false;
if (!_parent.unlockedUterus) {
uterusButton._visible = false;
}
}
}
}
}
}
}
Symbol 811 MovieClip Frame 2
stop();
if (((!_parent.unlockedIntestine) && (!_parent.unlockedSigmoid)) && (!_parent.unlockedRectum)) {
intestineButton._visible = false;
if (!_parent.unlockedStomach) {
stomachButton._visible = false;
}
}
Symbol 813 Button
on (release) {
gotoAndPlay (51);
}
Symbol 827 Button
on (release) {
_parent.gotoAndPlay("levelSelect");
}
Symbol 830 MovieClip Frame 1
function wait() {
waitCount++;
if (waitCount > 40) {
waitCount = 0;
this.onEnterFrame = countKilled;
}
}
function countKilled() {
if (nmeKilledShow < _parent.numKilled) {
_parent.hiss.start();
nmeKilledShow++;
} else {
killScore = _parent.numKilled * _parent.currentLevel.killVal;
if (_parent.numShots != 0) {
accuracy = Math.round((_parent.numHits / _parent.numShots) * 100);
} else {
accuracy = 100;
}
if (accuracy < 25) {
accuracyScore = 0;
} else if (accuracy < 75) {
accuracyScore = accuracy * 50;
} else if (accuracy < 100) {
accuracyScore = accuracy * 70;
} else if (accuracy >= 100) {
accuracy = 100;
accuracyScore = accuracy * 100;
}
countAccuracy();
this.onEnterFrame = countEscaped;
}
}
function countAccuracy() {
accuracyShow = accuracy + "%";
}
function countEscaped() {
if (nmeEscapedShow < _parent.numEscaped) {
nmeEscapedShow++;
} else {
escapeScore = _parent.numEscaped * 200;
showTotals();
this.onEnterFrame = null;
}
}
function showTotals() {
totalScore = (killScore + accuracyScore) - escapeScore;
_parent.totalScore = _parent.totalScore + totalScore;
thisGrade = levelGrade.letter;
if (levelGrade.value >= _parent.currentLevel.passingGrade.value) {
_parent.spendableScore = _parent.spendableScore + totalScore;
_parent["unlocked" + _parent.currentLevel.nextLevel] = true;
_parent.results.text = "Passing Score! \nPassword: " + _parent.currentLevel.pass;
} else {
_parent.results.text = "Failed! Need better score to unlock next level \nand earn points to spend!";
}
nextButton._visible = true;
}
stop();
nmeKilledShow = 0;
nmeEscapedShow = 0;
accuracyShow = "0%";
totalNme = _parent.numKilled + _parent.numEscaped;
percentKilled = Math.round((_parent.numKilled / totalNme) * 100);
nextButton._visible = false;
if (percentKilled >= 100) {
levelGrade = _parent.gradeAPlus;
} else if (percentKilled >= 95) {
levelGrade = _parent.gradeA;
} else if (percentKilled >= 90) {
levelGrade = _parent.gradeB;
} else if (percentKilled >= 83) {
levelGrade = _parent.gradeC;
} else if (percentKilled >= 75) {
levelGrade = _parent.gradeD;
} else if (percentKilled >= 66) {
levelGrade = _parent.gradeDMinus;
} else if (percentKilled >= 50) {
levelGrade = _parent.gradeF;
}
this.onEnterFrame = wait;
Symbol 833 Button
on (release) {
currentBrake = buyUpgrade(currentBrake, "brake");
}
Symbol 836 Button
on (release) {
currentTurn = buyUpgrade(currentTurn, "turnSpeed");
}
Symbol 838 Button
on (release) {
currentAccel = buyUpgrade(currentAccel, "accel");
}
Symbol 840 Button
on (release) {
buyAmmo(heavyLaser, 10, 200);
}
Symbol 842 Button
on (release) {
buyAmmo(wave, 10, 200);
}
Symbol 844 Button
on (release) {
buyAmmo(spreader, 10, 200);
}
Symbol 845 Button
on (release) {
buyAmmo(foam, 5, 200);
}
Symbol 847 Button
on (release) {
buyAmmo(antibody, 5, 200);
}
Symbol 849 Button
on (release) {
buyAmmo(antibiotic, 10, 200);
}
Symbol 851 Button
on (release) {
buyAmmo(pesticide, 5, 200);
}
Symbol 853 Button
on (release) {
buyAmmo(torpedo, 5, 200);
}
Symbol 855 Button
on (release) {
buyAmmo(nuke, 2, 500);
}
Symbol 856 MovieClip Frame 1
refScale = _xscale;
this.onEnterFrame = function () {
clip._xscale = (clip._yscale = clip._yscale + 3);
if (clip._xscale > refScale) {
clip._xscale = (clip._yscale = refScale / 20);
}
};
Symbol 858 Button
on (release) {
buyAmmo(beacon, 1, 1000);
}
Symbol 860 Button
on (release) {
if (spendableScore >= currentWeap.price) {
spendableScore = spendableScore - currentWeap.price;
laserTurret.power = currentWeap.value;
heavyLaser.power = currentWeap.value * 2;
spreader.power = currentWeap.value;
wave.power = currentWeap.value;
currentWeap = currentWeap.next;
play();
}
}
Symbol 896 Button
on (release) {
currentRecharge = buyUpgrade(currentRecharge, "recharge");
}
Symbol 898 Button
on (release) {
currentEnergy = buyUpgrade(currentEnergy, "MAXENERGY");
}
Symbol 899 Button
on (release) {
currentShields = buyUpgrade(currentShields, "MAXHP");
}
Symbol 914 Button
on (release) {
if (spendableScore >= 1000) {
ship360.lives++;
spendableScore = spendableScore - 1000;
play();
}
}
Symbol 917 Button
on (release) {
gotoAndPlay (35);
}
Symbol 924 MovieClip Frame 1
function Point(px, py) {
this.x = px * pointScale;
this.y = py * pointScale;
}
wayPoint = new Array();
Point.prototype = new Object();
_yscale = (600 * _parent.cheatScale);
_xscale = (600 * _parent.cheatScale);
_parent.exits._xscale = (_parent.exits._yscale = 600 * _parent.cheatScale);
_parent.backDrop._xscale = (_parent.backDrop._yscale = 600 * _parent.cheatScale);
mapScale = 17.4 * _parent.cheatScale;
pointScale = 6 * _parent.cheatScale;
startPoint = new Point(115, 40);
wayPoint[0] = new Point(75, 250);
wayPoint[1] = new Point(90, 250);
wayPoint[2] = new Point(105, 250);
wayPoint[3] = new Point(120, 250);
wayPoint[4] = new Point(135, 250);
wayPoint[5] = new Point(160, 200);
wayPoint[6] = new Point(140, 200);
wayPoint[7] = new Point(120, 200);
wayPoint[8] = new Point(100, 200);
wayPoint[9] = new Point(80, 200);
wayPoint[10] = new Point(70, 160);
wayPoint[11] = new Point(90, 160);
wayPoint[12] = new Point(110, 160);
wayPoint[13] = new Point(130, 160);
wayPoint[14] = new Point(150, 160);
wayPoint[15] = new Point(170, 120);
wayPoint[16] = new Point(140, 120);
wayPoint[17] = new Point(110, 120);
wayPoint[18] = new Point(80, 120);
wayPoint[19] = new Point(60, 120);
wayPoint[20] = new Point(116, 4);
secretPlace = new Point(179, 330);
spawnPlaceArray = new Array(1, 3, 5, 7, 9, 11, 13, 15, 17, 19);
spermSpawnPlaceArray = new Array(0, 1, 2, 3, 4);
Symbol 929 MovieClip Frame 1
function Point(px, py) {
this.x = px * pointScale;
this.y = py * pointScale;
}
wayPoint = new Array();
Point.prototype = new Object();
_yscale = (750 * _parent.cheatScale);
_xscale = (750 * _parent.cheatScale);
_parent.exits._xscale = (_parent.exits._yscale = 750 * _parent.cheatScale);
_parent.backDrop._xscale = (_parent.backDrop._yscale = 750 * _parent.cheatScale);
mapScale = 22.5 * _parent.cheatScale;
pointScale = 7.5 * _parent.cheatScale;
startPoint = new Point(125, 95);
eggPlace = new Point(220, 155);
wayPoint[0] = new Point(135, 100);
wayPoint[1] = new Point(171, 160);
wayPoint[2] = new Point(193, 230);
wayPoint[3] = new Point(253, 190);
wayPoint[4] = new Point(293, 148);
wayPoint[5] = new Point(365, 145);
wayPoint[6] = new Point(240, 122);
spawnPlaceArray = new Array(0, 1, 2, 3, 4, 5, 6);
spermSpawnPlaceArray = new Array(0, 1, 2, 3, 4, 5, 6);
Symbol 933 MovieClip Frame 1
function Point(px, py) {
this.x = px * pointScale;
this.y = py * pointScale;
}
wayPoint = new Array();
Point.prototype = new Object();
_yscale = (750 * _parent.cheatScale);
_xscale = (750 * _parent.cheatScale);
_parent.exits._xscale = (_parent.exits._yscale = 750 * _parent.cheatScale);
_parent.backDrop._xscale = (_parent.backDrop._yscale = 750 * _parent.cheatScale);
mapScale = 26.25 * _parent.cheatScale;
pointScale = 7.5 * _parent.cheatScale;
startPoint = new Point(246, 276);
wayPoint[0] = new Point(180, 60);
wayPoint[1] = new Point(200, 60);
wayPoint[2] = new Point(220, 60);
wayPoint[3] = new Point(240, 60);
wayPoint[4] = new Point(260, 60);
wayPoint[5] = new Point(280, 60);
wayPoint[6] = new Point(300, 60);
wayPoint[7] = new Point(310, 60);
wayPoint[8] = new Point(140, 125);
wayPoint[9] = new Point(170, 125);
wayPoint[10] = new Point(200, 125);
wayPoint[11] = new Point(230, 125);
wayPoint[12] = new Point(260, 125);
wayPoint[13] = new Point(290, 125);
wayPoint[14] = new Point(320, 125);
wayPoint[15] = new Point(350, 125);
wayPoint[16] = new Point(140, 155);
wayPoint[17] = new Point(170, 155);
wayPoint[18] = new Point(200, 155);
wayPoint[19] = new Point(230, 155);
wayPoint[20] = new Point(260, 155);
wayPoint[21] = new Point(290, 155);
wayPoint[22] = new Point(320, 155);
wayPoint[23] = new Point(350, 155);
wayPoint[24] = new Point(170, 240);
wayPoint[25] = new Point(210, 240);
wayPoint[26] = new Point(240, 240);
wayPoint[27] = new Point(270, 240);
wayPoint[28] = new Point(320, 240);
spawnPlaceArray = new Array(0, 1, 2, 3, 4, 5, 6, 10, 11, 12, 13);
spermSpawnPlaceArray = new Array(0, 1, 2, 3, 4, 5, 6, 10, 11, 12, 13);
Symbol 938 MovieClip Frame 1
function Point(px, py) {
this.x = px * pointScale;
this.y = py * pointScale;
}
wayPoint = new Array();
Point.prototype = new Object();
_yscale = (750 * _parent.cheatScale);
_xscale = (750 * _parent.cheatScale);
_parent.exits._xscale = (_parent.exits._yscale = 750 * _parent.cheatScale);
_parent.backDrop._xscale = (_parent.backDrop._yscale = 750 * _parent.cheatScale);
mapScale = 30 * _parent.cheatScale;
pointScale = 7.5 * _parent.cheatScale;
startPoint = new Point(230, 210);
eggPlace = new Point(250, 100);
wayPoint[0] = new Point(250, 100);
wayPoint[1] = new Point(240, 320);
wayPoint[2] = new Point(330, 220);
spawnPlaceArray = new Array(0, 1, 2);
spermSpawnPlaceArray = new Array(0, 1, 2);
Symbol 942 MovieClip Frame 1
function Point(px, py) {
this.x = px * pointScale;
this.y = py * pointScale;
}
wayPoint = new Array();
Point.prototype = new Object();
_yscale = (500 * _parent.cheatScale);
_xscale = (500 * _parent.cheatScale);
_parent.exits._xscale = (_parent.exits._yscale = 500 * _parent.cheatScale);
_parent.backDrop._xscale = (_parent.backDrop._yscale = 500 * _parent.cheatScale);
mapScale = 20 * _parent.cheatScale;
pointScale = 5 * _parent.cheatScale;
startPoint = new Point(230, 210);
wayPoint[0] = new Point(131, 245);
wayPoint[1] = new Point(330, 245);
wayPoint[2] = new Point(317, 290);
wayPoint[3] = new Point(146, 290);
wayPoint[4] = new Point(170, 320);
wayPoint[5] = new Point(296, 320);
wayPoint[6] = new Point(230, 345);
wayPoint[7] = new Point(266, 345);
wayPoint[8] = new Point(180, 245);
wayPoint[9] = new Point(230, 245);
wayPoint[10] = new Point(280, 245);
wayPoint[11] = new Point(200, 290);
wayPoint[12] = new Point(250, 290);
wayPoint[13] = new Point(210, 320);
wayPoint[14] = new Point(240, 320);
wayPoint[15] = new Point(270, 320);
wayPoint[16] = new Point(130, 130);
wayPoint[17] = new Point(320, 130);
wayPoint[18] = new Point(180, 130);
wayPoint[19] = new Point(270, 133);
wayPoint[20] = new Point(230, 70);
exit = wayPoint[20];
spawnPlaceArray = new Array(0, 1, 2, 3, 4, 5, 6, 7);
spermSpawnPlaceArray = new Array(0, 1, 2, 3, 4, 5, 6, 7);
Symbol 948 MovieClip Frame 1
function Point(px, py) {
this.x = px * pointScale;
this.y = py * pointScale;
}
wayPoint = new Array();
Point.prototype = new Object();
_yscale = (500 * _parent.cheatScale);
_xscale = (500 * _parent.cheatScale);
_parent.exits._xscale = (_parent.exits._yscale = 500 * _parent.cheatScale);
_parent.backDrop._xscale = (_parent.backDrop._yscale = 500 * _parent.cheatScale);
mapScale = 20 * _parent.cheatScale;
pointScale = 5 * _parent.cheatScale;
startPoint = new Point(350, 120);
wayPoint[0] = new Point(220, 135);
wayPoint[1] = new Point(380, 135);
wayPoint[2] = new Point(195, 200);
wayPoint[3] = new Point(375, 200);
wayPoint[4] = new Point(170, 245);
wayPoint[5] = new Point(350, 245);
wayPoint[6] = new Point(100, 310);
wayPoint[7] = new Point(300, 310);
wayPoint[8] = new Point(200, 310);
wayPoint[9] = new Point(280, 135);
wayPoint[10] = new Point(320, 135);
wayPoint[11] = new Point(360, 135);
wayPoint[12] = new Point(235, 200);
wayPoint[13] = new Point(275, 200);
wayPoint[14] = new Point(340, 200);
wayPoint[15] = new Point(200, 245);
wayPoint[16] = new Point(250, 245);
wayPoint[17] = new Point(300, 245);
wayPoint[18] = new Point(150, 310);
wayPoint[19] = new Point(230, 310);
wayPoint[20] = new Point(80, 355);
exit = wayPoint[20];
spawnPlaceArray = new Array(0, 1, 2, 3, 4, 5, 6, 7);
spermSpawnPlaceArray = new Array(0, 1, 2, 3, 4, 5, 6, 7);
Symbol 950 MovieClip Frame 1
function Point(px, py) {
this.x = px * pointScale;
this.y = py * pointScale;
}
wayPoint = new Array();
Point.prototype = new Object();
_yscale = (500 * _parent.cheatScale);
_xscale = (500 * _parent.cheatScale);
_parent.exits._xscale = (_parent.exits._yscale = 500 * _parent.cheatScale);
_parent.backDrop._xscale = (_parent.backDrop._yscale = 500 * _parent.cheatScale);
mapScale = 20 * _parent.cheatScale;
pointScale = 5 * _parent.cheatScale;
startPoint = new Point(82, 90);
wayPoint[0] = new Point(82, 90);
wayPoint[1] = new Point(366, 138);
wayPoint[2] = new Point(406, 190);
wayPoint[3] = new Point(362, 230);
wayPoint[4] = new Point(102, 224);
wayPoint[5] = new Point(76, 274);
wayPoint[6] = new Point(122, 334);
wayPoint[7] = new Point(348, 344);
spawnPlaceArray = new Array(1, 2, 3, 4, 5, 6, 7);
spermSpawnPlaceArray = new Array();
spermSpawnPlaceArray[0] = 7;
Symbol 952 MovieClip Frame 1
function Point(px, py) {
this.x = px * pointScale;
this.y = py * pointScale;
}
wayPoint = new Array();
Point.prototype = new Object();
_yscale = (500 * _parent.cheatScale);
_xscale = (500 * _parent.cheatScale);
_parent.exits._xscale = (_parent.exits._yscale = 500 * _parent.cheatScale);
_parent.backDrop._xscale = (_parent.backDrop._yscale = 500 * _parent.cheatScale);
mapScale = 20 * _parent.cheatScale;
pointScale = 5 * _parent.cheatScale;
startPoint = new Point(250, 60);
wayPoint[0] = new Point(220, 135);
wayPoint[1] = new Point(380, 135);
wayPoint[2] = new Point(195, 200);
wayPoint[3] = new Point(375, 200);
wayPoint[4] = new Point(170, 245);
wayPoint[5] = new Point(350, 245);
wayPoint[6] = new Point(140, 310);
wayPoint[7] = new Point(300, 310);
wayPoint[8] = new Point(200, 310);
wayPoint[9] = new Point(280, 135);
wayPoint[10] = new Point(320, 135);
wayPoint[11] = new Point(360, 135);
wayPoint[12] = new Point(235, 200);
wayPoint[13] = new Point(275, 200);
wayPoint[14] = new Point(340, 200);
wayPoint[15] = new Point(200, 245);
wayPoint[16] = new Point(250, 245);
wayPoint[17] = new Point(300, 245);
wayPoint[18] = new Point(150, 310);
wayPoint[19] = new Point(230, 310);
wayPoint[20] = new Point(250, 100);
exit = wayPoint[20];
spawnPlaceArray = new Array(0, 1, 2, 3, 4, 5, 6, 7);
spermSpawnPlaceArray = new Array(0, 1, 2, 3, 4, 5, 6, 7);
Symbol 957 MovieClip Frame 1
function Point(px, py) {
this.x = px * pointScale;
this.y = py * pointScale;
}
wayPoint = new Array();
Point.prototype = new Object();
_yscale = (500 * _parent.cheatScale);
_xscale = (500 * _parent.cheatScale);
_parent.exits._xscale = (_parent.exits._yscale = 500 * _parent.cheatScale);
_parent.backDrop._xscale = (_parent.backDrop._yscale = 500 * _parent.cheatScale);
mapScale = 20 * _parent.cheatScale;
pointScale = 5 * _parent.cheatScale;
startPoint = new Point(250, 60);
wayPoint[0] = new Point(0, 0);
wayPoint[1] = new Point(250, 200);
wayPoint[2] = new Point(160, 90);
wayPoint[3] = new Point(320, 90);
wayPoint[4] = new Point(120, 150);
wayPoint[5] = new Point(370, 150);
wayPoint[6] = new Point(170, 200);
wayPoint[7] = new Point(240, 200);
spawnPlaceArray = new Array();
spawnPlaceArray[0] = 0;
spermSpawnPlaceArray = new Array();
spermSpawnPlaceArray[0] = 1;
this.onEnterFrame = function () {
wayPoint[1].y = _parent.egg.cockY;
};
Symbol 961 Button
on (release) {
gotoAndPlay (8);
}
Symbol 964 Button
on (release) {
ship360.lives = 2;
gotoAndPlay (35);
}
Symbol 966 Button
on (release) {
gotoAndPlay (43);
}
Symbol 980 MovieClip Frame 182
_parent.play();
Symbol 1030 MovieClip Frame 99
stop();
Symbol 1034 MovieClip Frame 1
stop();
Symbol 1034 MovieClip Frame 157
_parent.gotoAndPlay("start");