Frame 2
loadedbytes = getBytesLoaded();
totalbytes = getBytesTotal();
loadedkbytes = Math.ceil(loadedbytes / 1000);
totalkbytes = Math.ceil(totalbytes / 1000);
txt_load = (loadedbytes + " bytes loaded out of ") + totalbytes;
if ((loadedbytes >= totalbytes) and (loadedbytes > 0)) {
gotoAndPlay (11);
}
Frame 3
gotoAndPlay(_currentframe - 1);
Frame 11
Frame 12
CLASS_world = function () {
this.objectStack = new Array();
this.time = 0;
this.score = 0;
this.level = 0;
this.levelStack = null;
this.objectList = null;
};
CLASS_world.prototype.buildData = function () {
level1 = new Object();
level1.name = "Mission 1";
level1.description = "Greetings Zaphod and Aztec,<br>the ceremony tonight requires four earth chickens.<br>Please capture them and have them beamed to me as soon as possible,<br>the Supreme Elder of Planet X<br> ps. press the big red button to begin";
level1.password = "1234";
level1.backdrop = 1;
level1.objects = new Array(0, 0, 0, 0, 0, 0);
level1.target = 4;
level1.time = 1900;
level2 = new Object();
level2.name = "Mission 2";
level2.description = "Zaphod, Aztec<br>we need to fully understand why the earth men sacrifice so many of their cows to the god of the golden arches. <br>Capture us three earth cows and you shall be heros on PLanet X<br> Hail Gorax!";
level2.password = "3789";
level2.backdrop = 2;
level2.objects = new Array(1, 1, 1, 1);
level2.target = 3;
level2.time = 1900;
level3 = new Object();
level3.name = "Mission 3";
level3.description = "We need to study the earth men<br>Capture one of the simple farm folk and his chicken and have them beamed aboard<br>Try not to mutate him too badly on the way up this time";
level3.password = "2254";
level3.backdrop = 1;
level3.objects = new Array(2, 0);
level3.target = 2;
level3.time = 1900;
level4 = new Object();
level4.name = "Mission 4";
level4.description = "We said don't mutate him!!<br>What you did to the last one had attracted the attention of the damn MIB's!<br>Capture another earth man and avoid the MIB's";
level4.password = "7776";
level4.backdrop = 3;
level4.objects = new Array(2, 3);
level4.target = 1;
level4.time = 1900;
level5 = new Object();
level5.name = "Mission 5";
level5.description = "We need a break from all these experiments<br>Collect 4 earth chickens and 1 cow for our post-experiment banquet!";
level5.password = "1119";
level5.backdrop = 2;
level5.objects = new Array(0, 0, 0, 0, 1);
level5.target = 5;
level5.time = 1900;
level6 = new Object();
level6.name = "Mission 6";
level6.description = "One of our best spies is waiting to be beamed back up to the ship<br>He is at the earth mans secret base he is dsiguised as an earth chicken<br>Remember avoid all MIB's";
level6.password = "4443";
level6.backdrop = 1;
level6.objects = new Array(0, 3, 3);
level6.target = 1;
level6.time = 1900;
level7 = new Object();
level7.name = "Mission 7";
level7.description = "The ship is about to take off<br>You don't have much time to get 1 more chicken, one cow and one of those wierd guys with buck teeth<br>Glory will be ours back on Planet X<br>Hail Gorax!";
level7.password = "1024";
level7.backdrop = 3;
level7.objects = new Array(0, 1, 2, 3, 3);
level7.target = 3;
level7.time = 900;
this.levelStack = new Array(level1, level2, level3, level4, level5, level6, level7);
var chicken = new Object();
chicken.speed = 3;
chicken.sprite = 1;
chicken.value = 1;
chicken.sound1 = "chk_1";
chicken.sound2 = "chk_2";
var cow = new Object();
cow.speed = 2;
cow.sprite = 2;
cow.value = 1;
cow.sound1 = "moo_1";
cow.sound2 = "moo_2";
var hick = new Object();
hick.speed = 2;
hick.sprite = 3;
hick.value = 1;
hick.sound1 = "hotDamn";
hick.sound2 = "hotDamn";
var fbi = new Object();
fbi.speed = 2;
fbi.sprite = 4;
fbi.value = -1;
fbi.sound1 = "";
fbi.sound2 = "";
this.objectList = new Array(chicken, cow, hick, fbi);
};
CLASS_world.prototype.beginGame = function () {
gotoAndPlay (60);
};
CLASS_world.prototype.buildMusic = function () {
this.bgm = new Sound();
this.bgm.attachSound("country_1");
};
CLASS_world.prototype.playMusic = function () {
this.bgm.start(0, 999);
};
CLASS_world.prototype.stopMusic = function () {
this.bgm.stop();
};
CLASS_world.prototype.buildObjects = function () {
var r1 = 0;
var numberOfObjects = this.levelStack[this.level].objects.length;
r1 = 0;
while (r1 < numberOfObjects) {
var objectType = this.levelStack[this.level].objects[r1];
var newObject = new CLASS_object(objectType, r1);
this.objectStack.push(newObject);
r1++;
}
Mc_backdrop.gotoAndStop(this.levelStack[this.level].backdrop);
this.beam = new Sound();
this.beam.attachSound("phaser");
this.boing = new Sound();
this.boing.attachSound("boing");
};
CLASS_world.prototype.getReady = function () {
Mc_getReady._visible = true;
Mc_getready.gotoAndPlay(2);
};
CLASS_world.prototype.stepObjects = function () {
var amountOfObjects = this.objectStack.length;
var r1 = 0;
r1 = 0;
while (r1 < amountOfObjects) {
this.objectStack[r1].step();
r1++;
}
};
CLASS_world.prototype.checkScore = function () {
if (this.score <= 0) {
gotoAndPlay (23);
Mc_complete.play();
Mc_complete.mode = "success";
this.score = 0;
this.level++;
}
};
CLASS_world.prototype.killObjects = function () {
alien1.sprite.removeMovieClip();
alien2.sprite.removeMovieClip();
alien1.shadow.removeMovieClip();
alien2.shadow.removeMovieClip();
alien1 = null;
alien2 = null;
var numberOfObjects = this.objectStack.length;
r1 = 0;
while (r1 < numberOfObjects) {
this.objectStack[r1].sprite.removeMovieClip();
this.objectStack[r1] = null;
r1++;
}
};
CLASS_world.prototype.gameOver = function () {
timer = 0;
this.level = 0;
this.bgm.stop();
_root.gameOver = true;
gotoAndPlay (23);
Mc_message.gotoAndStop(2);
};
CLASS_world.prototype.displayLeveltext = function () {
Mc_hud.heading = (this.levelStack[this.level].name + " access code: ") + this.levelStack[this.level].password;
Mc_hud.body = this.levelStack[this.level].description;
};
CLASS_world.prototype.setTime = function () {
this.time = this.levelStack[this.level].time;
};
CLASS_world.prototype.checkForObjects = function (x, y) {
var caughtStack = new Array();
var xLeft = (x - 34);
var xRight = (x + 34);
var amountOfObjects = this.objectStack.length;
var r1 = 0;
r1 = 0;
while (r1 < amountOfObjects) {
if (((this.objectStack[r1].sprite._x >= xLeft) && (this.objectStack[r1].sprite._x <= xRight)) && (this.objectStack[r1].mode != "dead")) {
caughtStack.push(this.objectStack[r1]);
}
r1++;
}
return(caughtStack);
};
Frame 13
CLASS_object = function (type, id) {
this.type = type;
this.sprite = Mc_cow.duplicateMovieClip("Object" + Math.random(), 150 + id);
this.sprite.parent = this;
this.sprite.gotoAndStop(world.objectList[type].sprite);
this.sfx_1 = new Sound();
this.sfx_1.attachSound(world.objectList[type].sound1);
this.sfx_2 = new Sound();
this.sfx_2.attachSound(world.objectList[type].sound2);
this.sprite._y = 310 + (id * 5);
this.sprite._x = Math.random() * 350;
this.timer = 0;
this.speed = world.objectList[type].speed;
this.mode = "roam";
this.dir = -1;
};
CLASS_object.prototype.step = function () {
if (this.mode == "roam") {
if (this.dir == 1) {
this.sprite._x = this.sprite._x + this.speed;
} else if (this.dir == -1) {
this.sprite._x = this.sprite._x - this.speed;
}
} else if (this.mode == "caught") {
this.sprite._y = this.sprite._y - 6;
}
if (this.sprite._x > 580) {
this.sprite._x = -30;
}
if (this.sprite._x < -30) {
this.sprite._x = 580;
}
if ((this.sprite._y < -100) && (this.mode != "dead")) {
this.mode = "dead";
if (world.objectList[this.type].value == -1) {
world.killObjects();
world.gameOver();
} else {
world.score = world.score - world.objectList[this.type].value;
world.checkScore();
}
}
var event = int(Math.random() * 200);
if (((event == 10) && (this.dir == 1)) && (this.mode == "roam")) {
this.sprite.Mc_sprite.gotoAndPlay("walk_backward");
this.dir = -1;
} else if (((event == 10) && (this.dir == -1)) && (this.mode == "roam")) {
this.sprite.Mc_sprite.gotoAndPlay("walk_forward");
this.dir = 1;
}
};
Frame 14
CLASS_alien = function (id, control) {
this.id = id;
this.control = control;
if (id == 1) {
this.sprite = Mc_zaphod;
this.shadow = Mc_shadow_z;
} else if (id == 5) {
this.sprite = Mc_aztec;
this.shadow = Mc_shadow_a;
}
this.sprite.Mc_beam._visible = false;
this.sprite.parent = this;
this.sprite._y = 275 + this.id;
this.sprite._x = (Math.random() * 350) + 200;
this.timer = 50;
this.mode = "roam";
this.dir = 1;
this.tick = 0;
};
CLASS_alien.prototype.step = function () {
if (this.mode == "roam") {
this.shadow._y = this.sprite._y + 73;
if (this.dir == 1) {
this.sprite._x = this.sprite._x + 5;
this.shadow._x = this.sprite._x + 3;
} else if (this.dir == -1) {
this.sprite._x = this.sprite._x - 5;
this.shadow._x = this.sprite._x - 3;
}
} else if (this.mode == "set") {
this.dir = 2;
this.sprite.gotoAndStop(3);
this.timer--;
this.sprite.timer = this.timer;
} else if (this.mode == "fire") {
this.sprite.Mc_beam._visible = true;
this.sprite.Mc_beam._alpha = 24;
world.beam.start(0, 1);
var check = world.checkForObjects(this.sprite._x, this.sprite._y);
if (check[0] == undefined) {
} else {
var c = check.length;
var r1 = 0;
r1 = 0;
while (r1 < c) {
var ranSfx = (Math.round(Math.random() * 1) + 1);
if (ranSfx == 1) {
check[r1].sfx_1.start(0, 0);
} else if (ranSfx == 2) {
check[r1].sfx_2.start(0, 0);
}
if (check[r1].dir == 1) {
check[r1].sprite.Mc_sprite.gotoAndPlay("shock_front");
} else if (check[r1].dir == -1) {
check[r1].sprite.Mc_sprite.gotoAndPlay("shock_back");
}
check[r1].mode = "caught";
r1++;
}
}
this.mode = "flying";
this.sprite.timer = "";
} else if (this.mode == "flying") {
this.sprite._y = this.sprite._y - 6;
this.shadow._width--;
this.shadow._height--;
} else if (this.mode == "appear") {
this.sprite._width = this.sprite._width + 6.7;
this.sprite._height = this.sprite._height + 38.7;
this.sprite.timer = "";
this.tick++;
if (this.tick == 10) {
this.tick = 0;
this.mode = "roam";
this.shadow._visible = true;
}
}
if (this.timer <= 0) {
this.mode = "fire";
this.timer = 50;
}
if (this.sprite._x > 580) {
this.sprite._x = -30;
}
if (this.sprite._x < -30) {
this.sprite._x = 580;
}
if (this.sprite._y < -250) {
this.sprite.Mc_beam._visible = false;
this.sprite.gotoAndStop(1);
this.dir = 1;
this.sprite._width = 0;
this.sprite._height = 0;
this.sprite._y = 275 + this.id;
this.shadow._visible = false;
this.shadow._width = 50;
this.shadow._height = 17;
this.mode = "appear";
world.boing.start(0, 0);
this.timer = 50;
this.sprite.timer = 0;
}
var event = int(Math.random() * 100);
if ((event == 10) && (this.dir == 1)) {
this.sprite.gotoAndStop(2);
this.dir = -1;
} else if ((event == 10) && (this.dir == -1)) {
this.sprite.gotoAndStop(1);
this.dir = 1;
}
};
Frame 15
CLASS_bot = function (object) {
this.iq = 50;
this.player = object;
};
CLASS_bot.prototype.step = function () {
var randomEvent = Math.round(Math.random() * this.iq);
if ((randomEvent == 20) && (this.player.mode == "roam")) {
this.player.mode = "set";
}
};
Frame 16
_root._quality = "low";
world = new CLASS_world();
world.buildData();
gotoAndPlay (39);
Instance of Symbol 113 MovieClip "Mc_aztec" in Frame 17
on (press) {
if (this.parent.mode == "roam") {
this.parent.mode = "set";
}
}
Instance of Symbol 136 MovieClip "Mc_zaphod" in Frame 17
on (press) {
if (this.parent.mode == "roam") {
this.parent.mode = "set";
}
}
Frame 18
_quality = "low";
alien1 = new CLASS_alien(1, "human");
alien2 = new CLASS_alien(5, "human");
world.buildMusic();
world.setTime();
world.score = world.levelStack[world.level].target;
world.buildObjects();
world.getReady();
stop();
Frame 20
alien1.step();
alien2.step();
world.stepObjects();
Mc_status.Mc_timeBar._width = world.time / 10;
Mc_status.score = world.score;
world.time--;
if (world.time <= 0) {
world.killObjects();
world.gameOver();
}
gotoAndPlay (19);
Frame 23
if (Mc_message._y < 225) {
Mc_message._y = Mc_message._y + 5;
gotoAndPlay (22);
if (_root.gameOver == true) {
Mc_message.gotoAndStop(2);
}
timer2 = 0;
} else if (timer2 > 75) {
if (Mc_message._currentframe == 1) {
gotoAndPlay (24);
_root.gameOver = false;
} else if (Mc_message._currentframe == 2) {
timer = 0;
_root.gameOver = false;
gotoAndPlay (29);
}
} else {
timer2++;
gotoAndPlay (22);
}
Frame 24
world.killObjects();
Frame 25
if (world.level == 7) {
gotoAndStop (70);
}
world.displayLeveltext();
world.stopMusic();
this.stop();
Frame 29
Frame 30
timer++;
if (timer > 200) {
timer = 0;
gotoAndPlay (39);
} else {
gotoAndPlay (29);
}
Frame 39
world.killObjects();
titleMusic = new Sound();
titleMusic.attachSound("snd_titleMusic");
titleMusic.start(0, 999);
Instance of Symbol 179 MovieClip in Frame 39
on (press) {
gotoAndStop (70);
}
Frame 40
_root._quality = "high";
stop();
Frame 60
timer = 0;
_root._quality = "low";
var beamSound = new Sound();
beamSound.attachSound("phaser");
beamSound.start();
Instance of Symbol 206 MovieClip in Frame 60
onClipEvent (enterFrame) {
this._x = this._x - 4;
this._y = this._y - 4;
this._width = this._width - 2;
this._height = this._height - 4;
this._rotation = this._rotation - 10;
}
Instance of Symbol 207 MovieClip in Frame 60
onClipEvent (enterFrame) {
this._x = this._x - 4;
this._y = this._y + 4;
this._width = this._width + 2;
this._height = this._height + 4;
this._rotation = this._rotation + 10;
}
Frame 62
timer++;
if (timer > 50) {
timer = 0;
beamSound.stop();
gotoAndPlay (18);
} else {
gotoAndPlay (61);
beamSound.start();
}
Frame 70
stop();
Frame 80
stop();
Symbol 17 MovieClip Frame 1
stop();
Symbol 17 MovieClip Frame 173
_parent.play();
this._visible = false;
_parent.world.playMusic();
stop();
Symbol 39 MovieClip Frame 21
gotoAndPlay (1);
Symbol 39 MovieClip Frame 44
gotoAndPlay (22);
Symbol 39 MovieClip Frame 46
gotoAndPlay (45);
Symbol 39 MovieClip Frame 48
stop();
Symbol 39 MovieClip Frame 50
stop();
Symbol 52 MovieClip Frame 24
gotoAndPlay (1);
Symbol 52 MovieClip Frame 48
gotoAndPlay (25);
Symbol 52 MovieClip Frame 50
gotoAndPlay (49);
Symbol 52 MovieClip Frame 61
gotoAndPlay(_currentframe - 1);
Symbol 52 MovieClip Frame 74
gotoAndPlay(_currentframe - 1);
Symbol 52 MovieClip Frame 76
gotoAndPlay (75);
Symbol 52 MovieClip Frame 78
gotoAndPlay (77);
Symbol 69 MovieClip Frame 21
gotoAndPlay (1);
Symbol 69 MovieClip Frame 42
gotoAndPlay (22);
Symbol 69 MovieClip Frame 54
stop();
Symbol 69 MovieClip Frame 65
stop();
Symbol 88 MovieClip Frame 21
gotoAndPlay (1);
Symbol 88 MovieClip Frame 43
gotoAndPlay (22);
Symbol 88 MovieClip Frame 61
stop();
Symbol 88 MovieClip Frame 76
stop();
Symbol 89 MovieClip Frame 1
stop();
Symbol 89 MovieClip Frame 4
stop();
Symbol 112 MovieClip Frame 35
stop();
Symbol 113 MovieClip Frame 1
stop();
Symbol 135 MovieClip Frame 35
stop();
Symbol 136 MovieClip Frame 1
stop();
Symbol 143 MovieClip Frame 1
stop();
Symbol 148 MovieClip Frame 1
stop();
Symbol 148 MovieClip Frame 2
stop();
Symbol 153 Button
on (release) {
world.beginGame();
}
Instance of Symbol 162 MovieClip in Symbol 165 MovieClip Frame 1
onClipEvent (enterFrame) {
this._rotation = this._rotation - 4;
}
Instance of Symbol 162 MovieClip in Symbol 165 MovieClip Frame 1
onClipEvent (enterFrame) {
this._rotation = this._rotation + 5;
}
Instance of Symbol 164 MovieClip in Symbol 165 MovieClip Frame 1
onClipEvent (enterFrame) {
this._rotation = this._rotation - 10;
}
Instance of Symbol 162 MovieClip in Symbol 165 MovieClip Frame 1
onClipEvent (enterFrame) {
this._rotation = this._rotation + 10;
}
Symbol 169 Button
on (press) {
gotoAndStop (80);
}
Symbol 173 Button
on (press) {
gotoAndStop (50);
}
Symbol 177 Button
on (press) {
titleMusic.stop();
gotoAndPlay (24);
}
Instance of Symbol 164 MovieClip in Symbol 179 MovieClip Frame 1
onClipEvent (enterFrame) {
this._rotation = this._rotation + 1;
}
Instance of Symbol 164 MovieClip in Symbol 179 MovieClip Frame 1
onClipEvent (enterFrame) {
this._rotation = this._rotation + 1;
}
Instance of Symbol 164 MovieClip in Symbol 179 MovieClip Frame 1
onClipEvent (enterFrame) {
this._rotation = this._rotation - 1;
}
Instance of Symbol 164 MovieClip in Symbol 179 MovieClip Frame 1
onClipEvent (enterFrame) {
this._rotation = this._rotation + 1;
}
Instance of Symbol 162 MovieClip in Symbol 179 MovieClip Frame 1
onClipEvent (enterFrame) {
this._rotation = this._rotation + 2;
}
Instance of Symbol 162 MovieClip in Symbol 179 MovieClip Frame 1
onClipEvent (enterFrame) {
this._rotation = this._rotation + 2;
}
Symbol 187 MovieClip Frame 1
Instance of Symbol 184 MovieClip in Symbol 187 MovieClip Frame 1
/* no clip actions */
Symbol 189 Button
on (press) {
var numOfLevels = _root.world.levelStack.length;
var r1 = 0;
levelCode = String(codeText);
r1 = 0;
while (r1 < numOfLevels) {
currentLevel = _root.world.levelStack[r1];
if (levelCode == currentLevel.password) {
_root.world.level = r1;
}
r1++;
}
gotoAndStop (40);
}
Symbol 190 Button
on (press) {
codetext = "";
}
Symbol 191 Button
on (press) {
codetext = codetext + "9";
}
Symbol 192 Button
on (press) {
codetext = codetext + "8";
}
Symbol 193 Button
on (press) {
codetext = codetext + "7";
}
Symbol 194 Button
on (press) {
codetext = codetext + "0";
}
Symbol 195 Button
on (press) {
codetext = codetext + "6";
}
Symbol 196 Button
on (press) {
codetext = codetext + "5";
}
Symbol 197 Button
on (press) {
codetext = codetext + "4";
}
Symbol 198 Button
on (press) {
codetext = codetext + "3";
}
Symbol 199 Button
on (press) {
codetext = codetext + "2";
}
Symbol 200 Button
on (press) {
codetext = codetext + "1";
}
Symbol 203 Button
on (press) {
gotoAndStop (40);
}
Instance of Symbol 164 MovieClip in Symbol 205 MovieClip Frame 1
onClipEvent (enterFrame) {
this._width = this._width + Math.round(Math.random() * 2);
this._width = this._width - Math.round(Math.random() * 2);
this._height = this._height + Math.round(Math.random() * 2);
this._height = this._height - Math.round(Math.random() * 2);
this._rotation = this._rotation - 1;
}
Instance of Symbol 164 MovieClip in Symbol 205 MovieClip Frame 1
onClipEvent (enterFrame) {
this._width = this._width + Math.round(Math.random() * 2);
this._width = this._width - Math.round(Math.random() * 2);
this._height = this._height + Math.round(Math.random() * 2);
this._height = this._height - Math.round(Math.random() * 2);
this._rotation = this._rotation + 1;
}
Instance of Symbol 164 MovieClip in Symbol 205 MovieClip Frame 1
onClipEvent (enterFrame) {
this._width = this._width + Math.round(Math.random() * 2);
this._width = this._width - Math.round(Math.random() * 2);
this._height = this._height + Math.round(Math.random() * 2);
this._height = this._height - Math.round(Math.random() * 2);
this._rotation = this._rotation - 2;
}
Instance of Symbol 162 MovieClip in Symbol 205 MovieClip Frame 1
onClipEvent (enterFrame) {
this._width = this._width + Math.round(Math.random() * 2);
this._width = this._width - Math.round(Math.random() * 2);
this._height = this._height + Math.round(Math.random() * 2);
this._height = this._height - Math.round(Math.random() * 2);
this._rotation = this._rotation + 2;
}
Symbol 209 Button
on (press) {
getURL ("http://www.errorware.co.uk", "_new");
}
Symbol 211 Button
on (press) {
gotoAndStop (40);
}