Frame 1
stop();
_root.WPI_ArcadeStartSingleGame = function () {
trace("WPI_ArcadeStartSingleGame called - the current game has started");
};
_root.WPI_ArcadeStopSingleGame = function (score) {
trace("WPI_ArcadeStopSingleGame called - the current game has finished with score: " + score);
};
Frame 3
function shootweapon() {
if (currentweapon == "singlelazer") {
this.attachMovie("lazer", "weapons" + weaponcount, this.getNextHighestDepth(), {_x:ship._x, _y:ship._y});
weapons.push("weapons" + weaponcount);
weaponcount++;
} else if (currentweapon == "trishot") {
this.attachMovie("lazerleft", "weapons" + weaponcount, this.getNextHighestDepth(), {_x:ship._x, _y:ship._y});
weapons.push("weapons" + weaponcount);
weaponcount++;
this.attachMovie("lazer", "weapons" + weaponcount, this.getNextHighestDepth(), {_x:ship._x, _y:ship._y});
weapons.push("weapons" + weaponcount);
weaponcount++;
this.attachMovie("lazerright", "weapons" + weaponcount, this.getNextHighestDepth(), {_x:ship._x, _y:ship._y});
weapons.push("weapons" + weaponcount);
weaponcount++;
}
}
function insertenemy(enemytype, xpos, ypos) {
this.attachMovie(enemytype, "enemy" + enemycount, this.getNextHighestDepth(), {_x:xpos, _y:ypos});
enemies.push("enemy" + enemycount);
enemycount++;
}
function removeenemy(enemyid) {
enemysearch = 0;
while (enemysearch < enemies.length) {
if (enemies[enemysearch] == enemyid) {
enemies.splice(enemysearch, 1);
break;
}
enemysearch++;
}
eval (enemyid).removeMovieClip();
}
function removeweapon(weaponid) {
weaponsearch = 0;
while (weaponsearch < weapons.length) {
if (weapons[weaponsearch] == weaponid) {
weapons.splice(weaponsearch, 1);
break;
}
weaponsearch++;
}
eval (weaponid).removeMovieClip();
}
function addpoints(points) {
score = score + points;
}
function hitship() {
if (ship._currentframe == 1) {
currentweapon = "singlelazer";
hit.start(0, 0);
ship.gotoAndPlay("shiphit");
}
}
function respawnship() {
if (ship != undefined) {
removeMovieClip(ship);
}
this.attachMovie("ship", "ship", this.getNextHighestDepth(), {_x:Stage.width / 2.5, _y:Stage.height - 150});
}
function loselife() {
if (lives > 0) {
lives--;
respawnship();
} else {
if (ship != undefined) {
removeMovieClip(ship);
}
losegame();
}
}
function resetlevel() {
enemyloop = 0;
while (enemyloop < enemies.length) {
eval (enemies[enemyloop]).removeMovieClip();
enemyloop++;
}
weaponloop = 0;
while (weaponloop < weapons.length) {
eval (weapons[weaponloop]).removeMovieClip();
weaponloop++;
}
enemies = [];
weapons = [];
enemycount = 0;
weaponcount = 0;
currentenemies = new Array().concat(eval (("level" + currentlevel) + "enemies"));
levelposition = 0;
if (ship != undefined) {
ship.removeMovieClip();
}
if (currentlevel > 0) {
this.attachMovie("showlevel", "showlevel", this.getNextHighestDepth(), {_x:Stage.width / 2, _y:Stage.height / 3});
}
}
function newgame() {
lives = 5;
score = 0;
currentlevel = 1;
resetlevel();
respawnship();
}
function showmainscreen() {
currentlevel = 0;
resetlevel();
this.attachMovie("mainscreen", "mainscreen", this.getNextHighestDepth(), {_x:Stage.width / 2, _y:Stage.height / 3});
}
function losegame() {
currentlevel = 0;
resetlevel();
this.attachMovie("losegame", "losegame", this.getNextHighestDepth(), {_x:Stage.width / 2, _y:Stage.height / 3});
}
function winlevel() {
currentlevel++;
lives++;
resetlevel();
if (totallevels >= currentlevel) {
respawnship();
} else {
this.attachMovie("wingame", "wingame", this.getNextHighestDepth(), {_x:Stage.width / 2, _y:Stage.height / 3});
}
}
stop();
var shoot = new Sound();
shoot.attachSound("SpaceGun");
var hit = new Sound();
hit.attachSound("ShipHit");
var lives = 5;
var score = 0;
var level0enemies = [];
var level1enemies = [[40, "enemyship3", 400], [140, "enemyship3", 200], [200, "enemyship3", 300], [300, "enemyship3", 350], [400, "enemyship3", 150], [400, "enemyship3", 400], [460, "enemyship3", 280], [520, "enemyship1", 10], [580, "enemyship3", 50], [620, "enemyship3", 450], [700, "enemyship3", 350], [850, "enemyship1", 50], [880, "enemyship3", 500], [910, "enemyship3", 450], [1000, "enemyship1", 350], [1030, "enemyship1", 310], [1060, "enemyship1", 270], [1200, "enemyship3", 150], [1200, "enemyship3", 380], [1200, "enemyship3", 500], [1300, "enemyship1", 0], [1300, "enemyship1", 600], [1400, "enemyship1", 0], [1400, "enemyship1", 600], [1550, "enemyship3", 200], [1550, "enemyship3", 400], [1600, "enemyship1", 0], [1600, "enemyship1", 300], [1600, "enemyship1", 600], [1800, "enemyboulder1", 400], [1950, "enemyship3", 400], [1950, "enemyship3", 200], [2000, "poweruptrishot", 400], [2100, "enemyboulder1", 300], [2300, "enemyboulder1", 100], [2350, "enemyboulder1", 200], [2410, "enemyboulder1", 400], [2440, "enemyship1", 300], [2500, "enemyboulder1", 400], [2510, "enemyboulder1", 300], [2515, "poweruplevelup", 200], [2520, "enemyboulder1", 100], [2530, "enemyboulder1", 500], [2540, "enemyboulder1", 200], [2550, "enemyboulder1", 100], [2560, "enemyboulder1", 300], [2590, "enemyship3", 400], [2590, "enemyship3", 200], [2650, "enemyboulder1", 400], [2655, "enemyboulder1", 300], [2670, "enemyboulder1", 100], [2675, "enemyboulder1", 500], [2680, "enemyboulder1", 200], [2685, "enemyboulder1", 100], [2690, "enemyboulder1", 300], [2710, "enemyship1", 100], [2715, "enemyship1", 500], [2810, "enemyship3", 150], [2840, "enemyship3", 450], [2880, "enemyship1", 100], [2885, "enemyship1", 200], [2890, "enemyship1", 300], [2900, "enemyship1", 400], [2910, "enemyship1", 500], [3080, "enemyboulder1", 400], [3085, "enemyboulder1", 300], [3089, "poweruplevelup", 400], [3100, "enemyboulder1", 400], [3110, "enemyboulder1", 100], [3145, "enemyship1", 300], [3245, "enemyship2", 150], [3248, "enemyship2", 450], [3350, "enemyboulder1", 400], [3400, "enemyboulder1", 100], [3400, "enemyboulder1", 500], [3500, "enemyboulder1", 300], [3525, "poweruplevelup", 300], [3550, "enemyboulder1", 200], [3700, "enemyship2", 300], [3750, "poweruplevelup", 300], [3850, "poweruptrishot", 400], [4000, "enemybosslevel1", 300]];
var level2enemies = [[200, "enemyship3", 300], [350, "enemyship4", 150], [400, "enemyship4", 450], [500, "enemyboulder1", 200], [505, "enemyboulder1", 400], [510, "enemyboulder1", 100], [515, "enemyboulder1", 300], [520, "enemyboulder1", 500], [525, "enemyboulder1", 200], [530, "enemyboulder1", 400], [535, "enemyboulder1", 100], [540, "enemyboulder1", 300], [545, "enemyboulder1", 500], [580, "enemyship4", 300], [650, "enemyship1", 200], [660, "enemyship1", 100], [700, "enemyship1", 400], [710, "enemyship1", 500], [850, "enemyship3", 200], [850, "enemyship3", 400], [900, "enemyship3", 300], [950, "enemyship3", 100], [950, "enemyship3", 300], [950, "enemyship3", 500], [1000, "enemyship2", 300], [1100, "enemyship4", 100], [1150, "enemyship4", 500], [1350, "enemybosslevel2", 0]];
var totallevels = 2;
var currentweapon = "singlelazer";
var currentlevel = 0;
var cooldowntime = 8;
var guncooldown = 0;
var enemies = [];
var weapons = [];
var enemycount = 0;
var weaponcount = 0;
var currentenemies = [];
var levelposition = 0;
var gamepaused = false;
showmainscreen();
onEnterFrame = function () {
if (Key.isDown(13)) {
gamepaused = !gamepaused;
}
if (!gamepaused) {
levelposition++;
while ((currentenemies[0][0] <= levelposition) && (currentenemies.length > 0)) {
insertenemy(currentenemies[0][1], currentenemies[0][2], 0);
currentenemies.shift();
}
guncooldown = Math.max(0, guncooldown - 1);
enemysearch = 0;
while (enemysearch < enemies.length) {
eval (enemies[enemysearch]).enemyaction();
enemysearch++;
}
weaponsearch = 0;
while (weaponsearch < weapons.length) {
eval (weapons[weaponsearch]).weaponaction();
weaponsearch++;
}
if (Key.isDown(32)) {
if (guncooldown == 0) {
shoot.start(0, 0);
guncooldown = cooldowntime;
shootweapon();
}
}
if (Key.isDown(37)) {
ship._x = Math.max(ship._width / 2, ship._x - 7);
}
if (Key.isDown(39)) {
ship._x = Math.min(Stage.width - (ship._width * 3.5), ship._x + 7);
}
if (Key.isDown(38)) {
ship._y = Math.max(0, ship._y - 7);
}
if (Key.isDown(40)) {
ship._y = Math.min(Stage.height - ship._height, ship._y + 7);
}
}
};
Frame 4
stop();
Frame 5
stop();
Symbol 8 MovieClip [hitarea] Frame 1
Symbol 13 MovieClip [enemyboulder2] Frame 1
function takedamage(strength) {
_parent.addpoints(50);
gotoAndPlay ("explode");
}
function enemyaction() {
_x = (_x + xmov);
_y = (_y + ymov);
if (hitarea.hitTest(_parent.ship.hitarea)) {
_parent.hitship();
}
if ((((_y > Stage.height) || (_y < 0)) || (_x > Stage.width)) || (_x < 0)) {
_parent.removeenemy(_name);
}
if (_x > 583) {
_parent.removeenemy(_name);
}
}
stop();
xmov = (Math.random() * 4) - 2;
if (xmov <= 0) {
xmov = xmov - 1;
} else {
xmov = xmov + 1;
}
ymov = (Math.random() * 4) - 2;
if (ymov <= 0) {
ymov = ymov - 1;
} else {
ymov = ymov + 1;
}
_rotation = (Math.random() * 360);
Symbol 13 MovieClip [enemyboulder2] Frame 5
_parent.removeenemy(_name);
Symbol 17 MovieClip [enemyboulder1] Frame 1
function takedamage(strength) {
health = health - strength;
if (health <= 0) {
_parent.addpoints(50);
boulder.start(0, 0);
gotoAndStop ("explode");
} else {
_parent.addpoints(10);
gotoAndPlay ("takedamage");
}
}
function enemyaction() {
_x = (_x + xmov);
_y = (_y + ymov);
if (hitarea.hitTest(_parent.ship.hitarea)) {
_parent.hitship();
}
if (_y > Stage.height) {
_parent.removeenemy(_name);
}
}
stop();
var boulder = new Sound();
boulder.attachSound("crash");
xmov = (Math.random() * 4) - 2;
ymov = 8;
_rotation = (Math.random() * 360);
health = 2;
Symbol 17 MovieClip [enemyboulder1] Frame 2
_parent.insertenemy("enemyboulder2", _x, _y);
_parent.insertenemy("enemyboulder2", _x, _y);
_parent.insertenemy("enemyboulder2", _x, _y);
_parent.removeenemy(_name);
Symbol 17 MovieClip [enemyboulder1] Frame 4
stop();
Symbol 29 MovieClip Frame 12
_parent._parent.removeenemy(_parent._name);
Symbol 31 MovieClip [enemyship2] Frame 1
function takedamage(strength) {
health = health - strength;
if (health <= 0) {
_parent.addpoints(300);
boulder.start(0, 0);
gotoAndStop ("explode");
} else {
_parent.addpoints(10);
gotoAndPlay ("takedamage");
}
}
function enemyaction() {
guncooldown--;
if (guncooldown == 0) {
shoot.start(0, 0);
guncooldown = 30;
_parent.insertenemy("enemylazer2", _x, _y);
}
_y = (_y + 3);
if (hitarea.hitTest(_parent.ship.hitarea)) {
_parent.hitship();
}
if (_y > Stage.height) {
_parent.removeenemy(_name);
}
}
var boulder = new Sound();
boulder.attachSound("crash");
var shoot = new Sound();
shoot.attachSound("SpaceGun");
stop();
health = 3;
guncooldown = 30;
Symbol 31 MovieClip [enemyship2] Frame 4
stop();
Symbol 39 MovieClip [enemyship3explosion] Frame 25
_parent._parent.removeenemy(_parent._name);
Symbol 42 MovieClip [enemyship3] Frame 1
function takedamage(strength) {
health = health - strength;
if (health <= 0) {
_parent.addpoints(100);
gotoAndStop ("explode");
} else {
_parent.addpoints(10);
gotoAndPlay ("takedamage");
}
}
function enemyaction() {
if (moveright) {
_x = (_x + 5);
if (_x > (startx + maxdist)) {
moveright = false;
}
} else {
_x = (_x - 5);
if (_x < (startx - maxdist)) {
moveright = true;
}
}
_y = (_y + 4);
if (hitarea.hitTest(_parent.ship.hitarea)) {
_parent.hitship();
}
if (_y > Stage.height) {
_parent.removeenemy(_name);
}
}
stop();
health = 1;
moveright = true;
maxdist = 70;
startx = _x;
Symbol 42 MovieClip [enemyship3] Frame 4
stop();
Symbol 48 MovieClip Frame 12
_parent._parent.removeenemy(_parent._name);
Symbol 50 MovieClip [enemyship4] Frame 1
function takedamage(strength) {
health = health - strength;
if (health <= 0) {
_parent.addpoints(350);
boulder.start(0, 0);
gotoAndStop ("explode");
} else {
_parent.addpoints(10);
gotoAndPlay ("takedamage");
}
}
function enemyaction() {
guncooldown--;
if (guncooldown == 0) {
shoot.start(0, 0);
guncooldown = 50;
_parent.insertenemy("enemylazer1", _x, _y + 20);
_parent.insertenemy("enemylazer3", _x, _y + 20);
_parent.insertenemy("enemylazer4", _x, _y + 20);
}
_y = (_y + 3);
if (hitarea.hitTest(_parent.ship.hitarea)) {
_parent.hitship();
}
if (_y > Stage.height) {
_parent.removeenemy(_name);
}
}
stop();
var shoot = new Sound();
shoot.attachSound("SpaceGun");
var boulder = new Sound();
boulder.attachSound("crash");
health = 5;
guncooldown = 50;
Symbol 50 MovieClip [enemyship4] Frame 4
stop();
Symbol 51 MovieClip [enemybosslevel2] Frame 1
function multiplehittests(weapon, weaponstrength) {
seg = 1;
while (seg <= segments) {
if (eval ("segment" + seg) != undefined) {
if (eval (("segment" + seg) + ".hitarea").hitTest(eval ("_level0." + weapon))) {
eval ("segment" + seg).takedamage(weaponstrength);
return(1);
}
}
seg++;
}
return(0);
}
function enemyaction() {
dead = true;
seg = 1;
while (seg <= segments) {
if (eval ("segment" + seg) != undefined) {
dead = false;
eval ("segment" + seg).segmentaction();
}
seg++;
}
if (dead) {
_parent.winlevel();
}
}
segments = 12;
multiplehitareas = true;
seg = 1;
while (seg < segments) {
this.attachMovie("enemyboss2segment", "segment" + seg, this.getNextHighestDepth(), {_x:0, _y:0});
seg++;
}
Symbol 65 MovieClip [enemybosslevel1explosion] Frame 29
_parent._parent.winlevel();
Symbol 68 MovieClip [enemybosslevel1] Frame 1
function takedamage(strength) {
health = health - strength;
if (health <= 0) {
_parent.addpoints(800);
boulder.start(0, 0);
gotoAndStop ("explode");
} else {
_parent.addpoints(10);
gotoAndPlay ("takedamage");
}
}
function enemyaction() {
guncooldown--;
if (guncooldown == 0) {
guncooldown = 20;
shoot.start(0, 0);
_parent.insertenemy("enemylazer1", _x, _y + 20);
}
if (_parent.ship._x > _x) {
_x = (_x + 3);
} else {
_x = (_x - 3);
}
if (hitarea.hitTest(_parent.ship.hitarea)) {
_parent.hitship();
}
}
stop();
var boulder = new Sound();
boulder.attachSound("crash");
var shoot = new Sound();
shoot.attachSound("SpaceGun");
health = 25;
guncooldown = 20;
_y = 20;
Symbol 68 MovieClip [enemybosslevel1] Frame 4
stop();
Symbol 75 MovieClip [poweruptrishot] Frame 1
function enemyaction() {
_y = (_y + 2);
if (hitarea.hitTest(_parent.ship.hitarea)) {
powerup.start(0, 0);
_parent.currentweapon = "trishot";
_parent.removeenemy(_name);
}
if (_y > Stage.height) {
_parent.removeenemy(_name);
}
}
var powerup = new Sound();
powerup.attachSound("PowerUp");
Symbol 81 MovieClip [poweruplevelup] Frame 1
function enemyaction() {
_y = (_y + 2);
if (hitarea.hitTest(_parent.ship.hitarea)) {
_parent.lives++;
powerup.start(0, 0);
_parent.removeenemy(_name);
}
if (_y > Stage.height) {
_parent.removeenemy(_name);
}
}
var powerup = new Sound();
powerup.attachSound("PowerUp");
Symbol 89 MovieClip [enemyship1explosion] Frame 25
_parent._parent.removeenemy(_parent._name);
Symbol 92 MovieClip [enemyship1] Frame 1
function takedamage(strength) {
health = health - strength;
if (health <= 0) {
_parent.addpoints(200);
gotoAndStop ("explode");
} else {
_parent.addpoints(10);
gotoAndPlay ("takedamage");
}
}
function enemyaction() {
guncooldown--;
if (guncooldown == 0) {
shoot.start(0, 0);
guncooldown = 50;
_parent.insertenemy("enemylazer1", _x, _y + 20);
}
if (_parent.ship._x > _x) {
_x = (_x + 1);
} else {
_x = (_x - 1);
}
_y = (_y + 2);
if (hitarea.hitTest(_parent.ship.hitarea)) {
_parent.hitship();
}
if (_y > Stage.height) {
_parent.removeenemy(_name);
}
}
var shoot = new Sound();
shoot.attachSound("SpaceGun");
stop();
health = 2;
guncooldown = 50;
Symbol 92 MovieClip [enemyship1] Frame 4
stop();
Symbol 117 MovieClip [ship] Frame 1
stop();
if (warmedup == undefined) {
gotoAndPlay ("warmup");
}
Symbol 117 MovieClip [ship] Frame 2
play();
Symbol 117 MovieClip [ship] Frame 14
_parent.loselife();
Symbol 117 MovieClip [ship] Frame 76
warmedup = 1;
Symbol 120 MovieClip [enemylazer2] Frame 1
function enemyaction() {
_x = (_x + xmov);
_y = (_y + ymov);
if (this.hitTest(_parent.ship.hitarea)) {
_parent.hitship();
}
if ((((__y > Stage.height) || (_y < 0)) || (_x > Stage.width)) || (_x < 0)) {
_parent.removeenemy(_name);
}
}
movespeed = 16;
xdist = _parent.ship._x - _x;
ydist = _parent.ship._y - _y;
totaldist = Math.abs(xdist) + Math.abs(ydist);
_rotation = ((Math.atan2(ydist, xdist) / Math.PI) * 180);
xmov = movespeed * (xdist / totaldist);
ymov = movespeed * (ydist / totaldist);
Symbol 123 MovieClip [enemylazer4] Frame 1
function enemyaction() {
_x = (_x - 10);
_y = (_y + 10);
if (this.hitTest(_parent.ship.hitarea)) {
_parent.hitship();
}
if (_y > Stage.height) {
_parent.removeenemy(_name);
}
}
Symbol 126 MovieClip [enemylazer3] Frame 1
function enemyaction() {
_x = (_x + 10);
_y = (_y + 10);
if (this.hitTest(_parent.ship.hitarea)) {
_parent.hitship();
}
if (_y > Stage.height) {
_parent.removeenemy(_name);
}
}
Symbol 129 MovieClip [enemylazer1] Frame 1
function enemyaction() {
_y = (_y + 10);
if (this.hitTest(_parent.ship.hitarea)) {
_parent.hitship();
}
if (_y > Stage.height) {
_parent.removeenemy(_name);
}
}
Symbol 132 MovieClip [lazerleft] Frame 1
function weaponaction() {
_y = (_y - 20);
_x = (_x - 20);
if ((_y + _height) < 0) {
_parent.removeweapon(_name);
}
curenemy = 0;
while (curenemy < _parent.enemies.length) {
if (!eval ("_parent." + _parent.enemies[curenemy]).multiplehitareas) {
if (this.hitTest(eval (("_parent." + _parent.enemies[curenemy]) + ".hitarea"))) {
eval ("_parent." + _parent.enemies[curenemy]).takedamage(weaponstrength);
_parent.removeweapon(_name);
}
} else if (eval ("_parent." + _parent.enemies[curenemy]).multiplehittests(_name, weaponstrength)) {
_parent.removeweapon(_name);
}
curenemy++;
}
}
weaponstrength = 1;
Symbol 135 MovieClip [lazerright] Frame 1
function weaponaction() {
_y = (_y - 20);
_x = (_x + 20);
if ((_y + _height) < 0) {
_parent.removeweapon(_name);
}
curenemy = 0;
while (curenemy < _parent.enemies.length) {
if (!eval ("_parent." + _parent.enemies[curenemy]).multiplehitareas) {
if (this.hitTest(eval (("_parent." + _parent.enemies[curenemy]) + ".hitarea"))) {
eval ("_parent." + _parent.enemies[curenemy]).takedamage(weaponstrength);
_parent.removeweapon(_name);
}
} else if (eval ("_parent." + _parent.enemies[curenemy]).multiplehittests(_name, weaponstrength)) {
_parent.removeweapon(_name);
}
curenemy++;
}
}
weaponstrength = 1;
Symbol 138 MovieClip [lazer] Frame 1
function weaponaction() {
_y = (_y - 20);
if ((_y + _height) < 0) {
_parent.removeweapon(_name);
}
curenemy = 0;
while (curenemy < _parent.enemies.length) {
if (!eval ("_parent." + _parent.enemies[curenemy]).multiplehitareas) {
if (this.hitTest(eval (("_parent." + _parent.enemies[curenemy]) + ".hitarea"))) {
eval ("_parent." + _parent.enemies[curenemy]).takedamage(weaponstrength);
_parent.removeweapon(_name);
}
} else if (eval ("_parent." + _parent.enemies[curenemy]).multiplehittests(_name, weaponstrength)) {
_parent.removeweapon(_name);
}
curenemy++;
}
}
weaponstrength = 1;
Symbol 146 MovieClip Frame 90
stop();
Symbol 147 MovieClip [showlevel] Frame 1
counter = 0;
onEnterFrame = function () {
counter++;
if (counter > 90) {
removeMovieClip(this);
}
};
Symbol 164 Button
on (release) {
_root.WPI_ArcadeStartSingleGame();
_parent.newgame();
this.removeMovieClip();
}
Symbol 169 Button
on (release) {
_parent.gotoAndStop(5);
this.removeMovieClip();
}
Symbol 174 Button
on (release) {
gotoAndStop (4);
}
Symbol 176 Button
on (release) {
_parent.gotoAndStop(4);
this.removeMovieClip();
}
Symbol 177 MovieClip [wingame] Frame 1
_root.WPI_ArcadeStopSingleGame(_parent.score);
Symbol 182 Button
on (press) {
_root.WPI_ArcadeStartSingleGame();
_parent.newgame();
this.removeMovieClip();
}
Symbol 183 Button
on (release) {
gotoAndStop (4);
}
Symbol 184 Button
on (release) {
_parent.gotoAndStop(3);
this.removeMovieClip();
}
Symbol 185 MovieClip [losegame] Frame 1
_root.WPI_ArcadeStopSingleGame(_parent.score);
Symbol 186 Button
on (release) {
gotoAndStop (4);
}
Symbol 192 MovieClip [mainscreen] Frame 1
onEnterFrame = function () {
if (Key.isDown(17)) {
_parent.newgame();
this.removeMovieClip();
}
};
Instance of Symbol 199 MovieClip in Symbol 203 MovieClip Frame 37
onClipEvent (enterFrame) {
if (this.hitTest(_root.ship)) {
_root.ep = _root.ep + 30;
}
}
Symbol 204 MovieClip [enemyboss2segment] Frame 1
function segmentaction() {
lastrotation = _rotation;
nextsegment = _name.substr(7, _name.length - 7);
if (eval ("_parent.segment" + (parseInt(nextsegment) - 1)) == undefined) {
this.gotoAndStop("createhead");
} else {
_rotation = eval ("_parent.segment" + (parseInt(nextsegment) - 1)).lastrotation;
rotationinradians = (eval ("_parent.segment" + (parseInt(nextsegment) - 1))._rotation * Math.PI) / 180;
_x = (eval ("_parent.segment" + (parseInt(nextsegment) - 1))._x - (Math.cos(rotationinradians) * segdistance));
_y = (eval ("_parent.segment" + (parseInt(nextsegment) - 1))._y - (Math.sin(rotationinradians) * segdistance));
}
if (hitarea.hitTest(_parent._parent.ship.hitarea)) {
_parent._parent.hitship();
}
}
function takedamage(strength) {
health = health - strength;
if (health <= 0) {
_parent._parent.addpoints(30);
removeMovieClip(this);
} else {
_parent._parent.addpoints(5);
gotoAndPlay ("bodydamage");
}
}
stop();
segdistance = 30;
lastrotation = 0;
health = 2;
Symbol 204 MovieClip [enemyboss2segment] Frame 2
play();
Symbol 204 MovieClip [enemyboss2segment] Frame 3
function segmentaction() {
lastrotation = _rotation;
nextsegment = _name.substr(7, _name.length - 7);
if (eval ("_parent.segment" + (parseInt(nextsegment) - 1)) == undefined) {
this.gotoAndStop("createhead");
} else {
_rotation = eval ("_parent.segment" + (parseInt(nextsegment) - 1)).lastrotation;
rotationinradians = (eval ("_parent.segment" + (parseInt(nextsegment) - 1))._rotation * Math.PI) / 180;
_x = (eval ("_parent.segment" + (parseInt(nextsegment) - 1))._x - (Math.cos(rotationinradians) * segdistance));
_y = (eval ("_parent.segment" + (parseInt(nextsegment) - 1))._y - (Math.sin(rotationinradians) * segdistance));
}
if (hitarea.hitTest(_parent._parent.ship.hitarea)) {
_parent._parent.hitship();
}
}
function takedamage(strength) {
health = health - strength;
if (health <= 0) {
_parent._parent.addpoints(30);
removeMovieClip(this);
} else {
_parent._parent.addpoints(5);
gotoAndPlay ("bodydamage");
}
}
stop();
segdistance = 30;
lastrotation = 0;
Symbol 204 MovieClip [enemyboss2segment] Frame 5
function segmentaction() {
lastrotation = _rotation;
xdist = _level0.ship._x - _x;
ydist = _level0.ship._y - _y;
anglechange = ((Math.atan2(ydist, xdist) / Math.PI) * 180) - _rotation;
if (Math.abs(anglechange) > 180) {
anglechange = anglechange * -1;
}
anglechange = Math.min(rotationspeed, Math.max(-rotationspeed, anglechange));
_rotation = (_rotation + anglechange);
rotationinradians = (_rotation * Math.PI) / 180;
_x = (_x + (Math.cos(rotationinradians) * movespeed));
_y = (_y + (Math.sin(rotationinradians) * movespeed));
if (hitarea.hitTest(_parent._parent.ship.hitarea)) {
_parent._parent.hitship();
}
}
function takedamage(strength) {
health = health - strength;
if (health <= 0) {
_parent._parent.addpoints(2000);
gotoAndPlay ("explode");
boulder.start(0, 0);
} else {
_parent._parent.addpoints(10);
gotoAndPlay ("headdamage");
}
}
stop();
var boulder = new Sound();
boulder.attachSound("crash");
movespeed = 3;
rotationspeed = 2.5;
lastrotation = 0;
health = 20;
Symbol 204 MovieClip [enemyboss2segment] Frame 7
function segmentaction() {
lastrotation = _rotation;
xdist = _level0.ship._x - _x;
ydist = _level0.ship._y - _y;
anglechange = ((Math.atan2(ydist, xdist) / Math.PI) * 180) - _rotation;
if (Math.abs(anglechange) > 180) {
anglechange = anglechange * -1;
}
anglechange = Math.min(rotationspeed, Math.max(-rotationspeed, anglechange));
_rotation = (_rotation + anglechange);
rotationinradians = (_rotation * Math.PI) / 180;
_x = (_x + (Math.cos(rotationinradians) * movespeed));
_y = (_y + (Math.sin(rotationinradians) * movespeed));
if (hitarea.hitTest(_parent._parent.ship.hitarea)) {
_parent._parent.hitship();
}
}
function takedamage(strength) {
health = health - strength;
if (health <= 0) {
_parent._parent.addpoints(100);
gotoAndPlay ("explode");
} else {
_parent._parent.addpoints(10);
gotoAndPlay ("headdamage");
}
}
stop();
movespeed = 3;
rotationspeed = 2.5;
lastrotation = 0;
Symbol 204 MovieClip [enemyboss2segment] Frame 19
removeMovieClip(this);
Symbol 209 MovieClip Frame 17
gotoAndPlay (15);
Symbol 210 Button
on (release) {
getURL ("http://www.wiggiworld.com", "_blank");
}
Symbol 219 MovieClip Frame 15
stop();
Symbol 221 Button
on (release) {
_root.gotoAndPlay("start");
}
Symbol 235 MovieClip Frame 1
stop();
this.onEnterFrame = function () {
bl = _root.getBytesLoaded();
bt = _root.getBytesTotal();
perc = (bl / bt) * 100;
bar.bar._xscale = perc;
if (perc >= 100) {
this.gotoAndPlay("goplay");
delete this.onEnterFrame;
}
};
Symbol 235 MovieClip Frame 25
stop();
Symbol 280 Button
on (release) {
gotoAndStop (3);
}