Frame 1
function stars() {
i = 0;
while (i <= 30) {
var _local1 = "star" + i;
attachMovie("star", _local1, i, {_x:i, _y:430});
i++;
}
}
function startGame() {
attachMovie("enemy1", "enemy501", 501, {_x:random(350) + 25, _y:-230 + random(200)});
attachMovie("ship", "ship", 601, {_x:200, _y:350});
attachMovie("stats", "statbar", 611, {_x:0, _y:400});
_root.statbar.level = 1;
_root.statbar.score = 0;
_root.statbar.futurescore = 0;
_root.statbar.lives = 3;
_root.ship.speed = 3;
_root.ship.lastdeath = 0;
_root.ship.frame = 0;
_root.ship.lastshot = 0;
_root.ship.shotcount = 201;
_root.ship.shootingspeed = 25;
_root.upgradedepth = 301;
_root.totalenemies = 1;
_root.enemydepth = 502;
_root.shotdepth = 101;
_root.bossesDefeated = 1;
_root.enemiesDefeated = 0;
_root.paused = 0;
_root.down = 0;
_root.shotKind = "bullet";
_root.upgradestxt = 401;
_root.upgradedisp = 0;
}
function enemies(name) {
removeMovieClip("_root." + name);
if (_root.enemydepth > 599) {
enemydepth = 501;
}
if (_root.statbar.level <= _root.bossesDefeated) {
if (_root.totalenemies < (_root.statbar.level - 1)) {
i = _root.totalenemies;
while (i < _root.statbar.level) {
num = random(300 + (_root.statbar.level * 100));
if (num < 400) {
num = 1;
} else if (num < 700) {
num = 2;
} else if (num < 900) {
num = 3;
} else if (num < 1100) {
num = 4;
} else {
num = 1 + random(4);
}
num2 = 501 + _root.totalenemies;
name = "enemy" + num2;
_root.enemydepth = _root.enemydepth + 1;
_root.totalenemies = _root.totalenemies + 1;
attachMovie("enemy" + num, name, enemydepth, {_x:random(350) + 25, _y:-320 + random(300)});
if (_root.enemydepth > 599) {
enemydepth = 501;
}
i++;
}
} else {
num = random(300 + (_root.statbar.level * 100));
if (num < (_root.statbar.level * 5)) {
num = 5;
} else if (num < 400) {
num = 1;
} else if (num < 700) {
num = 2;
} else if (num < 900) {
num = 3;
} else if (num < 1100) {
num = 4;
} else {
num = 1 + random(4);
}
_root.totalenemies = _root.totalenemies + 1;
_root.enemydepth = _root.enemydepth + 1;
attachMovie("enemy" + num, name, enemydepth, {_x:random(350) + 25, _y:-300 + random(200)});
}
} else if (_root.totalenemies == 0) {
_root.enemydepth = _root.enemydepth + 1;
_root.totalenemies = _root.totalenemies + 1;
attachMovie("boss1", "enemy501", 501, {_x:200, _y:-100});
}
if (paused == 1) {
paused = 0;
pause();
}
}
function resetUpgrades() {
_root.ship.shootingspeed = 25;
_root.ship.speed = 3;
_root.shotKind = "bullet";
}
function remove() {
i = 501;
while (i <= (500 + _root.statbar.level)) {
name = "_root.enemy" + i;
removeMovieClip(name);
i++;
}
removeMovieClip(_root.ship);
removeMovieClip(_root.reset);
removeMovieClip(_root.statbar);
}
function pause() {
if (paused == 1) {
removeMovieClip("paused");
paused = 0;
for (var name in this) {
if (typeof(this[name]) == "movieclip") {
with (eval ("_root." + name)) {
play();
}
}
}
} else {
_root.attachMovie("paused", "paused", 700, {_x:200, _y:210});
paused = 1;
for (var name in this) {
if (typeof(this[name]) == "movieclip") {
with (eval ("_root." + name)) {
stop();
}
}
}
}
}
function showMenu() {
attachMovie("menu", "mainMenu", 700, {_x:100, _y:100});
}
function gameOver() {
attachMovie("gameover", "gameover", 700, {_x:100, _y:100});
_root.gameover.score = _root.statbar.futurescore;
remove();
}
function intro() {
attachMovie("uwg", "uwg", 698, {_x:0, _y:0});
}
var keyListener = new Object();
keyListener.onKeyUp = function () {
if ((Key.getCode() == 80) and (_root.statbar.lives > 0)) {
down = 0;
}
};
keyListener.onKeyDown = function () {
if ((Key.getCode() == 80) and (_root.statbar.lives > 0)) {
if (down == 0) {
pause();
down = 1;
}
}
};
Key.addListener(keyListener);
stars();
intro();
function __com_mochibot__(swfid, mc, lv) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = ((((((((((("http://" + mbc) + "/my/core.swf?mv=5&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("b45a1d7a", this, 10301);
Symbol 5 Button
on (release) {
_root.startGame();
removeMovieClip(this);
}
Symbol 7 Button
on (release) {
_root.showMenu();
removeMovieClip(this);
}
Symbol 11 Button
on (release) {
getURL ("http://www.unlimitedwebgames.com/games/wing-fighter", "_blank");
}
Symbol 12 MovieClip [gameover] Frame 1
if (score > 0) {
attachMovie("highscore", "highscore", 501, {_x:0, _y:0});
}
Symbol 15 MovieClip [laser2] Frame 1
if ((_x > 0) and (_y > -5)) {
this._y = this._y - 10;
i = 501;
while (i < (501 + _root.statbar.level)) {
enemy = ("_root.enemy" + i) + ".enemy3";
if (this.hitTest(enemy) and (getProperty(enemy, _currentframe) == 1)) {
Set(("_root.enemy" + i) + ".hp", eval (("_root.enemy" + i) + ".hp") - 2);
removeMovieClip(this);
}
i++;
}
} else if ((_y < -4) and (_x > 0)) {
removeMovieClip(this);
}
Symbol 15 MovieClip [laser2] Frame 2
this._y = this._y - 10;
Symbol 17 MovieClip [bullet] Frame 1
if ((_x > 0) and (_y > -5)) {
this._y = this._y - 8;
i = 501;
while (i < (501 + _root.statbar.level)) {
enemy = ("_root.enemy" + i) + ".enemy3";
if (this.hitTest(enemy) and (getProperty(enemy, _currentframe) == 1)) {
Set(("_root.enemy" + i) + ".hp", eval (("_root.enemy" + i) + ".hp") - 1);
removeMovieClip(this);
}
i++;
}
} else if ((_y < -4) and (_x > 0)) {
removeMovieClip(this);
}
Symbol 17 MovieClip [bullet] Frame 2
this._y = this._y - 8;
Symbol 26 MovieClip [laser1] Frame 1
if ((_y < 410) and (_root.paused == 0)) {
this._y = this._y + 5;
if (this.hitTest(_root.ship) and (_root.ship.lastdeath == 0)) {
removeMovieClip(this);
_root.ship.pship.gotoAndPlay(2);
}
} else if (_y > 405) {
removeMovieClip(this);
}
Symbol 26 MovieClip [laser1] Frame 2
this._y = this._y + 5;
Symbol 29 MovieClip [bullet2] Frame 1
if (_y < 410) {
this._y = this._y + 3;
if (this.hitTest(_root.ship) and (_root.ship.lastdeath == 0)) {
removeMovieClip(this);
_root.ship.pship.gotoAndPlay(2);
}
} else if (_y > 405) {
removeMovieClip(this);
}
Symbol 29 MovieClip [bullet2] Frame 2
this._y = this._y + 3;
Symbol 43 MovieClip [enemyship3] Frame 1
stop();
Symbol 43 MovieClip [enemyship3] Frame 2
_root.statbar.futurescore = _root.statbar.futurescore + 100;
Symbol 43 MovieClip [enemyship3] Frame 7
_alpha = (_alpha - 10);
Symbol 43 MovieClip [enemyship3] Frame 10
_alpha = (_alpha - 10);
Symbol 43 MovieClip [enemyship3] Frame 16
_alpha = (_alpha - 10);
Symbol 43 MovieClip [enemyship3] Frame 18
_alpha = (_alpha - 10);
Symbol 43 MovieClip [enemyship3] Frame 20
_alpha = (_alpha - 10);
Symbol 43 MovieClip [enemyship3] Frame 22
_alpha = (_alpha - 10);
Symbol 43 MovieClip [enemyship3] Frame 27
_alpha = (_alpha - 10);
Symbol 43 MovieClip [enemyship3] Frame 33
_root.enemiesDefeated = _root.enemiesDefeated + 1;
num = random(90);
if (_root.upgradedepth > 399) {
_root.upgradedepth = 301;
}
depth = _root.upgradedepth;
if (num == 1) {
_root.attachMovie("1up", "1up" + depth, depth, {_x:_parent._x, _y:_parent._y});
_root.upgradedepth = _root.upgradedepth + 1;
} else if ((num > 1) and (num < 5)) {
_root.attachMovie("shootingspeed", "shootingspeed" + depth, depth, {_x:_parent._x, _y:_parent._y});
_root.upgradedepth = _root.upgradedepth + 1;
} else if ((num > 4) and (num < 8)) {
_root.attachMovie("fast", "fast" + depth, depth, {_x:_parent._x, _y:_parent._y});
_root.upgradedepth = _root.upgradedepth + 1;
} else if ((num > 7) and (num < 18)) {
_root.attachMovie("points", "points" + depth, depth, {_x:_parent._x, _y:_parent._y});
_root.upgradedepth = _root.upgradedepth + 1;
} else if ((num > 17) and (num < 21)) {
_root.attachMovie("laser", "laser" + depth, depth, {_x:_parent._x, _y:_parent._y});
_root.upgradedepth = _root.upgradedepth + 1;
}
_root.totalenemies = _root.totalenemies - 1;
_root.enemies(getProperty(_parent, _name));
Symbol 44 MovieClip [enemy2] Frame 1
this._y = this._y + 1.4;
if (lastshot == undefined) {
lastshot = 0;
hp = 2;
}
if (hp < 1) {
hp = 100;
enemy3.gotoAndPlay(2);
}
if (_y > 415) {
_root.totalenemies = _root.totalenemies - 1;
_root.enemies(getProperty(this, _name));
} else {
lastshot--;
}
if ((this.hitTest(_root.ship) and (_currentframe < 3)) and (_root.ship.lastdeath == 0)) {
_root.ship.pship.gotoAndPlay(2);
}
if (((((lastshot < 1) and (_x > (_root.ship._x - 50))) and (_x < (_root.ship._x + 50))) and (_y > 100)) and (enemy3._currentframe == 1)) {
name = this._name + "bullet";
_root.lasteshot = _root.lasteshot + 1;
if (_root.shotdepth > 199) {
_root.shotdepth = 101;
} else {
_root.shotdepth = _root.shotdepth + 1;
}
_root.attachMovie("bullet2", name, _root.shotdepth, {_x:_x, _y:_y + 8});
lastshot = 50;
}
Symbol 44 MovieClip [enemy2] Frame 2
this._y = this._y + 1.4;
Symbol 56 MovieClip Frame 1
stop();
Symbol 56 MovieClip Frame 2
_root.statbar.futurescore = _root.statbar.futurescore + (1000 * _root.statbar.level);
Symbol 56 MovieClip Frame 7
_parent._alpha = _parent._alpha - 10;
Symbol 56 MovieClip Frame 10
_parent._alpha = _parent._alpha - 10;
Symbol 56 MovieClip Frame 16
_parent._alpha = _parent._alpha - 10;
Symbol 56 MovieClip Frame 18
_parent._alpha = _parent._alpha - 10;
Symbol 56 MovieClip Frame 20
_parent._alpha = _parent._alpha - 10;
_parent.gotoAndStop(3);
Symbol 56 MovieClip Frame 22
_parent._alpha = _parent._alpha - 10;
Symbol 56 MovieClip Frame 27
_parent._alpha = _parent._alpha - 10;
Symbol 56 MovieClip Frame 33
if (_root.upgradedepth > 399) {
_root.upgradedepth = 301;
}
depth = _root.upgradedepth;
_root.attachMovie("1up", "1up" + depth, depth, {_x:_parent._x, _y:_parent._y});
_root.upgradedepth = _root.upgradedepth + 1;
_root.totalenemies = _root.totalenemies - 1;
_root.bossesDefeated = _root.bossesDefeated + 1;
_root.attachMovie("level", "level", 606, {_x:150, _y:-50});
_root.level.level = _root.statbar.level;
_root.level.name = _parent._name;
removeMovieClip(_parent);
Symbol 57 MovieClip [boss1] Frame 1
if (_y < 49) {
lastshot = 0;
hp = 15 + (5 * _root.statbar.level);
direction = (random(2) * 2) - 1;
}
if (_y < 50) {
this._y = this._y + 0.4;
} else {
if ((_x < 50) or (_x > 350)) {
direction = direction * -1;
}
_x = (_x + direction);
}
if (hp < 1) {
hp = 100;
enemy3.gotoAndPlay(2);
}
if (_y > 415) {
_root.totalenemies = _root.totalenemies - 1;
_root.enemies(getProperty(this, _name));
} else {
lastshot--;
}
if ((this.hitTest(_root.ship) and (_currentframe < 3)) and (_root.ship.lastdeath == 0)) {
_root.ship.pship.gotoAndPlay(2);
}
if (((lastshot < 1) and (enemy3._currentframe == 1)) and (_y > 49)) {
if (_root.enemydepth > 159) {
enemydepth = 132;
}
name = this._name + "bullet";
_root.lasteshot = _root.lasteshot + 1;
_root.attachMovie("laser1", name, _root.enemydepth + 1, {_x:_x - 30, _y:_y + 8});
_root.attachMovie("laser1", name + "2", _root.enemydepth + 2, {_x:_x + 30, _y:_y + 8});
_root.enemydepth = _root.enemydepth + 2;
lastshot = 50 + random(150);
}
Symbol 57 MovieClip [boss1] Frame 2
if (_y < 49) {
lastshot = 0;
hp = 15 + (2 * _root.statbar.level);
direction = (random(2) * 2) - 1;
}
if (_y < 50) {
this._y = this._y + 0.4;
} else {
if ((_x < 50) or (_x > 350)) {
direction = direction * -1;
}
_x = (_x + direction);
}
if (hp < 1) {
hp = 100;
enemy3.gotoAndPlay(2);
}
if (_y > 415) {
_root.totalenemies = _root.totalenemies - 1;
_root.enemies(getProperty(this, _name));
} else {
lastshot--;
}
if ((this.hitTest(_root.ship) and (_currentframe < 3)) and (_root.ship.lastdeath == 0)) {
_root.ship.pship.gotoAndPlay(2);
}
if (((lastshot < 1) and (enemy3._currentframe == 1)) and (_y > 49)) {
if (_root.enemydepth > 159) {
enemydepth = 132;
}
name = this._name + "bullet";
_root.lasteshot = _root.lasteshot + 1;
_root.attachMovie("laser1", name, _root.enemydepth + 1, {_x:_x - 30, _y:_y + 8});
_root.attachMovie("laser1", name + "2", _root.enemydepth + 2, {_x:_x + 30, _y:_y + 8});
_root.enemydepth = _root.enemydepth + 2;
lastshot = 50 + random(150);
}
Symbol 69 MovieClip Frame 1
stop();
Symbol 69 MovieClip Frame 2
_root.statbar.futurescore = _root.statbar.futurescore + 300;
Symbol 69 MovieClip Frame 7
_alpha = (_alpha - 10);
Symbol 69 MovieClip Frame 10
_alpha = (_alpha - 10);
Symbol 69 MovieClip Frame 16
_alpha = (_alpha - 10);
Symbol 69 MovieClip Frame 18
_alpha = (_alpha - 10);
Symbol 69 MovieClip Frame 20
_alpha = (_alpha - 10);
Symbol 69 MovieClip Frame 22
_alpha = (_alpha - 10);
Symbol 69 MovieClip Frame 27
_alpha = (_alpha - 10);
Symbol 69 MovieClip Frame 33
_root.enemiesDefeated = _root.enemiesDefeated + 1;
num = random(80);
if (_root.upgradedepth > 399) {
_root.upgradedepth = 301;
}
depth = _root.upgradedepth;
if (num == 1) {
_root.attachMovie("1up", "1up" + depth, depth, {_x:_parent._x, _y:_parent._y});
_root.upgradedepth = _root.upgradedepth + 1;
} else if ((num > 1) and (num < 5)) {
_root.attachMovie("shootingspeed", "shootingspeed" + depth, depth, {_x:_parent._x, _y:_parent._y});
_root.upgradedepth = _root.upgradedepth + 1;
} else if ((num > 4) and (num < 8)) {
_root.attachMovie("fast", "fast" + depth, depth, {_x:_parent._x, _y:_parent._y});
_root.upgradedepth = _root.upgradedepth + 1;
} else if ((num > 7) and (num < 18)) {
_root.attachMovie("points", "points" + depth, depth, {_x:_parent._x, _y:_parent._y});
_root.upgradedepth = _root.upgradedepth + 1;
} else if ((num > 17) and (num < 21)) {
_root.attachMovie("laser", "laser" + depth, depth, {_x:_parent._x, _y:_parent._y});
_root.upgradedepth = _root.upgradedepth + 1;
}
_root.totalenemies = _root.totalenemies - 1;
_root.enemies(getProperty(_parent, _name));
Symbol 70 MovieClip [enemy3] Frame 1
this._y = this._y + 1.4;
if (lastshot == undefined) {
lastshot = 0;
hp = 3;
}
if (hp < 1) {
hp = 100;
enemy3.gotoAndPlay(2);
}
if (_y > 415) {
_root.totalenemies = _root.totalenemies - 1;
_root.enemies(getProperty(this, _name));
} else {
lastshot--;
}
if ((this.hitTest(_root.ship) and (_currentframe < 3)) and (_root.ship.lastdeath == 0)) {
_root.ship.pship.gotoAndPlay(2);
}
if (((((lastshot < 1) and (_x > (_root.ship._x - 50))) and (_x < (_root.ship._x + 50))) and (_y > 100)) and (enemy3._currentframe == 1)) {
name = this._name + "bullet";
_root.lasteshot = _root.lasteshot + 1;
if (_root.shotdepth > 199) {
_root.shotdepth = 101;
} else {
_root.shotdepth = _root.shotdepth + 1;
}
_root.attachMovie("bullet2", name, _root.shotdepth, {_x:_x, _y:_y + 8});
lastshot = 42;
}
Symbol 70 MovieClip [enemy3] Frame 2
this._y = this._y + 1.4;
Symbol 81 MovieClip Frame 1
stop();
Symbol 81 MovieClip Frame 2
_root.statbar.futurescore = _root.statbar.futurescore + 1000;
Symbol 81 MovieClip Frame 7
_alpha = (_alpha - 10);
Symbol 81 MovieClip Frame 10
_alpha = (_alpha - 10);
Symbol 81 MovieClip Frame 16
_alpha = (_alpha - 10);
Symbol 81 MovieClip Frame 18
_alpha = (_alpha - 10);
Symbol 81 MovieClip Frame 20
_alpha = (_alpha - 10);
Symbol 81 MovieClip Frame 22
_alpha = (_alpha - 10);
Symbol 81 MovieClip Frame 27
_alpha = (_alpha - 10);
Symbol 81 MovieClip Frame 33
_root.enemiesDefeated = _root.enemiesDefeated + 1;
num = random(60);
if (_root.upgradedepth > 399) {
_root.upgradedepth = 301;
}
depth = _root.upgradedepth;
if (num == 1) {
_root.attachMovie("1up", "1up" + depth, depth, {_x:_parent._x, _y:_parent._y});
_root.upgradedepth = _root.upgradedepth + 1;
} else if ((num > 1) and (num < 5)) {
_root.attachMovie("shootingspeed", "shootingspeed" + depth, depth, {_x:_parent._x, _y:_parent._y});
_root.upgradedepth = _root.upgradedepth + 1;
} else if ((num > 4) and (num < 8)) {
_root.attachMovie("fast", "fast" + depth, depth, {_x:_parent._x, _y:_parent._y});
_root.upgradedepth = _root.upgradedepth + 1;
} else if ((num > 7) and (num < 18)) {
_root.attachMovie("points", "points" + depth, depth, {_x:_parent._x, _y:_parent._y});
_root.upgradedepth = _root.upgradedepth + 1;
} else if ((num > 17) and (num < 21)) {
_root.attachMovie("laser", "laser" + depth, depth, {_x:_parent._x, _y:_parent._y});
_root.upgradedepth = _root.upgradedepth + 1;
}
_root.totalenemies = _root.totalenemies - 1;
_root.enemies(getProperty(_parent, _name));
Symbol 82 MovieClip [enemy5] Frame 1
this._x = this._x - 1.5;
if (lastshot == undefined) {
lastshot = 0;
hp = 1;
}
if (hp < 1) {
hp = 100;
enemy3.gotoAndPlay(2);
}
if (_y < 50) {
_y = (20 + random(100));
_x = 420;
}
if (_x < -10) {
_root.totalenemies = _root.totalenemies - 1;
_root.enemies(getProperty(this, _name));
} else {
lastshot--;
}
if ((this.hitTest(_root.ship) and (_currentframe < 3)) and (_root.ship.lastdeath == 0)) {
_root.ship.pship.gotoAndPlay(2);
}
if ((((lastshot < 1) and (_x > (_root.ship._x - 50))) and (_x < (_root.ship._x + 50))) and (enemy3._currentframe == 1)) {
name = this._name + "bullet";
_root.lasteshot = _root.lasteshot + 1;
if (_root.shotdepth > 199) {
_root.shotdepth = 101;
} else {
_root.shotdepth = _root.shotdepth + 1;
}
_root.attachMovie("bullet2", name, _root.shotdepth, {_x:_x, _y:_y + 4});
lastshot = 50;
}
Symbol 82 MovieClip [enemy5] Frame 2
this._x = this._x - 1.5;
Symbol 94 MovieClip [enemyship4] Frame 1
stop();
Symbol 94 MovieClip [enemyship4] Frame 2
_root.statbar.futurescore = _root.statbar.futurescore + 500;
Symbol 94 MovieClip [enemyship4] Frame 7
_alpha = (_alpha - 10);
Symbol 94 MovieClip [enemyship4] Frame 10
_alpha = (_alpha - 10);
Symbol 94 MovieClip [enemyship4] Frame 16
_alpha = (_alpha - 10);
Symbol 94 MovieClip [enemyship4] Frame 18
_alpha = (_alpha - 10);
Symbol 94 MovieClip [enemyship4] Frame 20
_alpha = (_alpha - 10);
Symbol 94 MovieClip [enemyship4] Frame 22
_alpha = (_alpha - 10);
Symbol 94 MovieClip [enemyship4] Frame 27
_alpha = (_alpha - 10);
Symbol 94 MovieClip [enemyship4] Frame 33
_root.enemiesDefeated = _root.enemiesDefeated + 1;
num = random(70);
if (_root.upgradedepth > 399) {
_root.upgradedepth = 301;
}
depth = _root.upgradedepth;
if (num == 1) {
_root.attachMovie("1up", "1up" + depth, depth, {_x:_parent._x, _y:_parent._y});
_root.upgradedepth = _root.upgradedepth + 1;
} else if ((num > 1) and (num < 5)) {
_root.attachMovie("shootingspeed", "shootingspeed" + depth, depth, {_x:_parent._x, _y:_parent._y});
_root.upgradedepth = _root.upgradedepth + 1;
} else if ((num > 4) and (num < 8)) {
_root.attachMovie("fast", "fast" + depth, depth, {_x:_parent._x, _y:_parent._y});
_root.upgradedepth = _root.upgradedepth + 1;
} else if ((num > 7) and (num < 18)) {
_root.attachMovie("points", "points" + depth, depth, {_x:_parent._x, _y:_parent._y});
_root.upgradedepth = _root.upgradedepth + 1;
} else if ((num > 17) and (num < 21)) {
_root.attachMovie("laser", "laser" + depth, depth, {_x:_parent._x, _y:_parent._y});
_root.upgradedepth = _root.upgradedepth + 1;
}
_root.totalenemies = _root.totalenemies - 1;
_root.enemies(getProperty(_parent, _name));
Symbol 95 MovieClip [enemy4] Frame 1
this._y = this._y + 1.4;
if (lastshot == undefined) {
lastshot = 0;
hp = 4;
}
if (hp < 1) {
hp = 100;
enemy3.gotoAndPlay(2);
}
if (_y > 415) {
_root.totalenemies = _root.totalenemies - 1;
_root.enemies(getProperty(this, _name));
} else {
lastshot--;
}
if ((this.hitTest(_root.ship) and (_currentframe < 3)) and (_root.ship.lastdeath == 0)) {
_root.ship.pship.gotoAndPlay(2);
}
if (((((lastshot < 1) and (_x > (_root.ship._x - 50))) and (_x < (_root.ship._x + 50))) and (_y > 100)) and (enemy3._currentframe == 1)) {
name = this._name + "bullet";
_root.lasteshot = _root.lasteshot + 1;
if (_root.shotdepth > 199) {
_root.shotdepth = 101;
} else {
_root.shotdepth = _root.shotdepth + 1;
}
_root.attachMovie("bullet2", name, _root.shotdepth, {_x:_x, _y:_y + 8});
lastshot = 35;
}
Symbol 95 MovieClip [enemy4] Frame 2
this._y = this._y + 1.4;
Symbol 107 MovieClip [enemyship2] Frame 1
stop();
Symbol 107 MovieClip [enemyship2] Frame 2
_root.statbar.futurescore = _root.statbar.futurescore + 50;
Symbol 107 MovieClip [enemyship2] Frame 7
_alpha = (_alpha - 10);
Symbol 107 MovieClip [enemyship2] Frame 10
_alpha = (_alpha - 10);
Symbol 107 MovieClip [enemyship2] Frame 16
_alpha = (_alpha - 10);
Symbol 107 MovieClip [enemyship2] Frame 18
_alpha = (_alpha - 10);
Symbol 107 MovieClip [enemyship2] Frame 20
_alpha = (_alpha - 10);
Symbol 107 MovieClip [enemyship2] Frame 22
_alpha = (_alpha - 10);
Symbol 107 MovieClip [enemyship2] Frame 27
_alpha = (_alpha - 10);
Symbol 107 MovieClip [enemyship2] Frame 33
_root.enemiesDefeated = _root.enemiesDefeated + 1;
num = random(100);
if (_root.upgradedepth > 399) {
_root.upgradedepth = 301;
}
depth = _root.upgradedepth;
if (num == 1) {
_root.attachMovie("1up", "1up" + depth, depth, {_x:_parent._x, _y:_parent._y});
_root.upgradedepth = _root.upgradedepth + 1;
} else if ((num > 1) and (num < 5)) {
_root.attachMovie("shootingspeed", "shootingspeed" + depth, depth, {_x:_parent._x, _y:_parent._y});
_root.upgradedepth = _root.upgradedepth + 1;
} else if ((num > 4) and (num < 8)) {
_root.attachMovie("fast", "fast" + depth, depth, {_x:_parent._x, _y:_parent._y});
_root.upgradedepth = _root.upgradedepth + 1;
} else if ((num > 7) and (num < 18)) {
_root.attachMovie("points", "points" + depth, depth, {_x:_parent._x, _y:_parent._y});
_root.upgradedepth = _root.upgradedepth + 1;
} else if ((num > 17) and (num < 21)) {
_root.attachMovie("laser", "laser" + depth, depth, {_x:_parent._x, _y:_parent._y});
_root.upgradedepth = _root.upgradedepth + 1;
}
_root.totalenemies = _root.totalenemies - 1;
_root.enemies(_parent._name);
Symbol 108 MovieClip [enemy1] Frame 1
this._y = this._y + 1.4;
if (lastshot == undefined) {
lastshot = 0;
hp = 1;
}
if (hp < 1) {
hp = 100;
enemy3.gotoAndPlay(2);
}
if (_y > 415) {
_root.totalenemies = _root.totalenemies - 1;
_root.enemies(getProperty(this, _name));
} else {
lastshot--;
}
if ((this.hitTest(_root.ship) and (_currentframe < 3)) and (_root.ship.lastdeath == 0)) {
_root.ship.pship.gotoAndPlay(2);
}
if (((((lastshot < 1) and (_x > (_root.ship._x - 50))) and (_x < (_root.ship._x + 50))) and (_y > 100)) and (enemy3._currentframe == 1)) {
name = this._name + "bullet";
_root.lasteshot = _root.lasteshot + 1;
if (_root.shotdepth > 199) {
_root.shotdepth = 101;
} else {
_root.shotdepth = _root.shotdepth + 1;
}
_root.attachMovie("bullet2", name, _root.shotdepth, {_x:_x, _y:_y + 8});
lastshot = 100;
}
Symbol 108 MovieClip [enemy1] Frame 2
this._y = this._y + 1.4;
Symbol 123 MovieClip Frame 1
stop();
Symbol 123 MovieClip Frame 2
_parent.lastdeath = -1;
Symbol 123 MovieClip Frame 4
_alpha = (_alpha - 10);
Symbol 123 MovieClip Frame 10
_alpha = (_alpha - 10);
Symbol 123 MovieClip Frame 16
_alpha = (_alpha - 10);
Symbol 123 MovieClip Frame 21
_alpha = (_alpha - 10);
Symbol 123 MovieClip Frame 26
_alpha = (_alpha - 10);
Symbol 123 MovieClip Frame 30
_alpha = (_alpha - 10);
Symbol 123 MovieClip Frame 34
_root.statbar.lives = _root.statbar.lives - 1;
_alpha = 100;
gotoAndPlay (1);
_parent._x = -20;
_parent._y = -100;
_parent.lastdeath = 200;
_root.resetUpgrades();
Symbol 124 MovieClip [ship] Frame 1
if (lastdeath > 0) {
lastdeath--;
_alpha = (100 - (lastdeath * 0.4));
}
if (((_x < 0) and (_y < 0)) and (_root.statbar.lives > 0)) {
_x = 200;
_y = 350;
} else if (_root.statbar.lives == 0) {
_root.gameOver();
}
if ((Key.isDown(39) and (_x < 385)) and (_x > 0)) {
_x = (_x + speed);
}
if ((Key.isDown(37) and (_x > 15)) and (_x < 400)) {
_x = (_x - speed);
}
if ((Key.isDown(38) and (_y > 15)) and (_y < 400)) {
_y = (_y - speed);
}
if ((Key.isDown(40) and (_y < 385)) and (_y > 0)) {
_y = (_y + speed);
}
if (lastshot > 0) {
lastshot--;
}
if (Key.isDown(32)) {
if (shotcount > 299) {
shotcount = 201;
}
if (lastshot < 1) {
name = "shot" + shotcount;
_root.attachMovie(_root.shotKind, name, shotcount, {_x:_x, _y:_y});
shotcount++;
lastshot = shootingspeed;
}
}
if (_root.statbar.futurescore > _root.statbar.score) {
_root.statbar.score = _root.statbar.score + 10;
if ((_root.enemiesDefeated * 100) >= ((1000 * _root.statbar.level) * _root.statbar.level)) {
_root.statbar.level = _root.statbar.level + 1;
}
}
Symbol 124 MovieClip [ship] Frame 2
if (lastdeath > 0) {
lastdeath--;
_alpha = (100 - (lastdeath * 0.4));
}
if (((_x < 0) and (_y < 0)) and (_root.statbar.lives > 0)) {
_x = 200;
_y = 350;
} else if (_root.statbar.lives == 0) {
_root.gameOver();
}
if ((Key.isDown(39) and (_x < 385)) and (_x > 0)) {
_x = (_x + speed);
}
if ((Key.isDown(37) and (_x > 15)) and (_x < 400)) {
_x = (_x - speed);
}
if ((Key.isDown(38) and (_y > 15)) and (_y < 400)) {
_y = (_y - speed);
}
if ((Key.isDown(40) and (_y < 385)) and (_y > 0)) {
_y = (_y + speed);
}
if (lastshot > 0) {
lastshot--;
}
if (Key.isDown(32)) {
if (shotcount > 299) {
shotcount = 201;
}
if (lastshot < 1) {
name = "shot" + shotcount;
_root.attachMovie(_root.shotKind, name, shotcount, {_x:_x, _y:_y});
shotcount++;
lastshot = shootingspeed;
}
}
if (_root.statbar.futurescore > _root.statbar.score) {
_root.statbar.score = _root.statbar.score + 10;
if ((_root.enemiesDefeated * 100) >= ((1000 * _root.statbar.level) * _root.statbar.level)) {
_root.statbar.level = _root.statbar.level + 1;
}
}
Symbol 127 MovieClip [star] Frame 1
if (_y > 410) {
_x = random(400);
_y = (-random(400));
speed = random(3);
_alpha = 30;
_xscale = 10;
_yscale = 10;
} else if ((speed == undefined) or (speed < 1)) {
var speed = 4;
}
_y = (_y + speed);
Symbol 127 MovieClip [star] Frame 2
if (_y > 410) {
_x = random(400);
_y = (-random(400));
speed = random(3);
_alpha = 30;
_xscale = 10;
_yscale = 10;
} else if ((speed == undefined) or (speed < 1)) {
var speed = 4;
}
_y = (_y + speed);
Symbol 131 Button
on (release) {
_root.intro.gotoAndPlay(81);
removeMovieClip(this);
_root.startGame();
}
Symbol 133 Button
on (release) {
nextFrame();
}
Symbol 135 Button
on (release) {
getURL ("http://www.unlimitedwebgames.com/highscores/wing-fighter", "_blank");
}
Symbol 137 Button
on (release) {
getURL ("http://www.webgamedesign.com", _blank);
}
Symbol 139 Button
on (release) {
getURL ("http://www.unlimitedwebgames.com", "_blank");
}
Symbol 142 Button
on (release) {
getURL ("http://www.unlimitedwebgames.com/free-content.php", "_blank");
}
on (rollOver) {
addGame.gotoAndStop(2);
}
on (rollOut) {
addGame.gotoAndStop(1);
}
Symbol 164 Button
on (release) {
prevFrame();
}
Symbol 166 Button
on (release) {
nextFrame();
}
Symbol 170 Button
on (release) {
gotoAndStop (1);
}
Symbol 172 MovieClip [menu] Frame 1
stop();
Instance of Symbol 159 MovieClip in Symbol 172 MovieClip [menu] Frame 1
on (release) {
getURL ("http://www.unlimitedwebgames.com", "_blank");
}
Symbol 172 MovieClip [menu] Frame 2
stop();
Symbol 172 MovieClip [menu] Frame 3
stop();
Symbol 172 MovieClip [menu] Frame 4
stop();
Symbol 177 MovieClip [intro] Frame 80
_alpha = (_alpha - 0.1);
Symbol 177 MovieClip [intro] Frame 81
if (_alpha > 0) {
gotoAndPlay (80);
} else {
removeMovieClip(this);
_root.showMenu();
}
Symbol 179 MovieClip [1up] Frame 1
_y = (_y + 1);
if (this.hitTest(_root.ship)) {
if (_root.upgradestxt > 499) {
_root.upgradestxt = 401;
}
_root.upgradestxt = _root.upgradestxt + 1;
_root.attachMovie("upgrade", "upgrade" + _root.upgradestxt, _root.upgradestxt, {_x:550, _y:395});
with (eval ("_root.upgrade" + _root.upgradestxt)) {
gotoAndPlay(7);
}
_root.statbar.lives = _root.statbar.lives + 1;
removeMovieClip(this);
}
if (_y > 410) {
removeMovieClip(this);
}
Symbol 179 MovieClip [1up] Frame 2
_y = (_y + 1);
Symbol 181 MovieClip [shootingspeed] Frame 1
_y = (_y + 1);
if (this.hitTest(_root.ship)) {
if (_root.ship.shootingspeed > 17) {
if (_root.upgradestxt > 499) {
_root.upgradestxt = 401;
}
_root.upgradestxt = _root.upgradestxt + 1;
_root.attachMovie("upgrade", "upgrade" + _root.upgradestxt, _root.upgradestxt, {_x:550, _y:395});
with (eval ("_root.upgrade" + _root.upgradestxt)) {
gotoAndPlay(3);
}
_root.ship.shootingspeed = _root.ship.shootingspeed - 3;
} else {
_root.attachMovie("upgrade", "upgrade" + _root.upgradestxt, _root.upgradestxt, {_x:550, _y:395});
with (eval ("_root.upgrade" + _root.upgradestxt)) {
gotoAndPlay(11);
}
_root.statbar.futurescore = _root.statbar.futurescore + 300;
}
removeMovieClip(this);
}
if (_y > 410) {
removeMovieClip(this);
}
Symbol 181 MovieClip [shootingspeed] Frame 2
_y = (_y + 1);
Symbol 183 MovieClip [fast] Frame 1
_y = (_y + 1);
if (this.hitTest(_root.ship)) {
if (_root.upgradestxt > 499) {
_root.upgradestxt = 401;
}
_root.upgradestxt = _root.upgradestxt + 1;
if (_root.ship.speed <= 8) {
_root.attachMovie("upgrade", "upgrade" + _root.upgradestxt, _root.upgradestxt, {_x:550, _y:395});
with (eval ("_root.upgrade" + _root.upgradestxt)) {
gotoAndPlay(5);
}
_root.ship.speed = _root.ship.speed + 1;
} else {
_root.attachMovie("upgrade", "upgrade" + _root.upgradestxt, _root.upgradestxt, {_x:550, _y:395});
with (eval ("_root.upgrade" + _root.upgradestxt)) {
gotoAndPlay(11);
}
_root.statbar.futurescore = _root.statbar.futurescore + 300;
}
removeMovieClip(this);
}
if (_y > 410) {
removeMovieClip(this);
}
Symbol 183 MovieClip [fast] Frame 2
_y = (_y + 1);
Symbol 185 MovieClip [laser] Frame 1
_y = (_y + 1);
if (this.hitTest(_root.ship)) {
if (_root.shotKind != "laser2") {
if (_root.upgradestxt > 499) {
_root.upgradestxt = 401;
}
_root.upgradestxt = _root.upgradestxt + 1;
_root.attachMovie("upgrade", "upgrade" + _root.upgradestxt, _root.upgradestxt, {_x:550, _y:395});
with (eval ("_root.upgrade" + _root.upgradestxt)) {
gotoAndPlay(9);
}
_root.shotKind = "laser2";
} else {
_root.attachMovie("upgrade", "upgrade" + _root.upgradestxt, _root.upgradestxt, {_x:550, _y:395});
with (eval ("_root.upgrade" + _root.upgradestxt)) {
gotoAndPlay(11);
}
_root.statbar.futurescore = _root.statbar.futurescore + 300;
}
removeMovieClip(this);
}
if (_y > 400) {
removeMovieClip(this);
}
Symbol 185 MovieClip [laser] Frame 2
_y = (_y + 1);
Symbol 187 MovieClip [points] Frame 1
_y = (_y + 1);
if (this.hitTest(_root.ship)) {
if (_root.upgradestxt > 499) {
_root.upgradestxt = 401;
}
_root.upgradestxt = _root.upgradestxt + 1;
_root.attachMovie("upgrade", "upgrade" + _root.upgradestxt, _root.upgradestxt, {_x:550, _y:395});
with (eval ("_root.upgrade" + _root.upgradestxt)) {
gotoAndPlay(1);
}
_root.statbar.futurescore = _root.statbar.futurescore + 50;
removeMovieClip(this);
}
if (_y > 400) {
removeMovieClip(this);
}
Symbol 187 MovieClip [points] Frame 2
_y = (_y + 1);
Symbol 191 MovieClip [level] Frame 1
if (_y < 400) {
_root.statbar.showlevel = _root.statbar.level;
_y = (_y + 1);
} else {
_root.enemies(name);
removeMovieClip(this);
}
Symbol 191 MovieClip [level] Frame 2
if (_y < 400) {
_y = (_y + 1);
}
Symbol 198 MovieClip [upgrade] Frame 1
if (direction == undefined) {
_root.upgradedisp = _name;
_alpha = 1;
direction = 5;
time = 0;
_x = 395;
_y = 397;
}
if (_alpha > 99) {
time = time + 1;
direction = 0;
}
if ((time > 80) or (_root.upgradedisp != _name)) {
direction = -5;
}
_alpha = (_alpha + direction);
if ((_alpha < 1) and (time > 1)) {
removeMovieClip(this);
}
Symbol 198 MovieClip [upgrade] Frame 2
gotoAndPlay (1);
Symbol 198 MovieClip [upgrade] Frame 3
if (_alpha > 99) {
time = time + 1;
direction = 0;
}
if ((time > 80) or (_root.upgradedisp != _name)) {
direction = -5;
}
_alpha = (_alpha + direction);
if ((_alpha < 1) and (time > 1)) {
removeMovieClip(this);
}
Symbol 198 MovieClip [upgrade] Frame 4
gotoAndPlay (3);
Symbol 198 MovieClip [upgrade] Frame 5
if (_alpha > 99) {
time = time + 1;
direction = 0;
}
if ((time > 80) or (_root.upgradedisp != _name)) {
direction = -5;
}
_alpha = (_alpha + direction);
if ((_alpha < 1) and (time > 1)) {
removeMovieClip(this);
}
Symbol 198 MovieClip [upgrade] Frame 6
gotoAndPlay (5);
Symbol 198 MovieClip [upgrade] Frame 7
if (_alpha > 99) {
time = time + 1;
direction = 0;
}
if ((time > 80) or (_root.upgradedisp != _name)) {
direction = -5;
}
_alpha = (_alpha + direction);
if ((_alpha < 1) and (time > 1)) {
removeMovieClip(this);
}
Symbol 198 MovieClip [upgrade] Frame 8
gotoAndPlay (7);
Symbol 198 MovieClip [upgrade] Frame 9
if (_alpha > 99) {
time = time + 1;
direction = 0;
}
if ((time > 80) or (_root.upgradedisp != _name)) {
direction = -5;
}
_alpha = (_alpha + direction);
if ((_alpha < 1) and (time > 1)) {
removeMovieClip(this);
}
Symbol 198 MovieClip [upgrade] Frame 10
gotoAndPlay (9);
Symbol 198 MovieClip [upgrade] Frame 11
if (_alpha > 99) {
time = time + 1;
direction = 0;
}
if ((time > 80) or (_root.upgradedisp != _name)) {
direction = -5;
}
_alpha = (_alpha + direction);
if ((_alpha < 1) and (time > 1)) {
removeMovieClip(this);
}
Symbol 198 MovieClip [upgrade] Frame 12
gotoAndPlay (11);
Symbol 205 MovieClip Frame 1
time = 1;
Symbol 205 MovieClip Frame 193
time = time + 1;
if (time > 50) {
_root.attachMovie("intro", "intro", 699, {_x:0, _y:0});
removeMovieClip(_parent);
} else {
gotoAndPlay (192);
}
Instance of Symbol 205 MovieClip in Symbol 206 MovieClip [uwg] Frame 1
on (release) {
getURL ("http://www.unlimitedwebgames.com", "_blank");
}