Frame 1
stop();
loaded = 0;
loadingDone = false;
exlevel = 0;
paused = false;
onEnterFrame = function () {
if (!loadingDone) {
loaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (loaded >= 100) {
loadingDone = true;
}
}
if (exlevel > 900) {
exlevel = 0;
}
};
Instance of Symbol 351 MovieClip "prebg" in Frame 1
onClipEvent (load) {
swapDepths(2000);
}
onClipEvent (enterFrame) {
if (_root.prejet._x == undefined) {
_alpha = (_alpha + ((100 - _alpha) / 10));
_root.ocean._alpha = _root.ocean._alpha + ((-_root.ocean._alpha) / 10);
_xscale = (_xscale + ((200 - _xscale) / 10));
_yscale = (_yscale + ((200 - _yscale) / 10));
_y = (200 - (_width / 2));
_x = (200 - (_width / 2));
}
}
Instance of Symbol 151 MovieClip "prejet" in Frame 1
onClipEvent (load) {
s = Math.PI;
swapDepths(999);
}
onClipEvent (enterFrame) {
s = s + 0.10471975511966;
if (s > (Math.PI*2)) {
s = s - (Math.PI*2);
}
_x = (200 + (Math.sin(s) * 100));
_parent.ocean._x = -_x;
var clip = _parent.attachMovie("JG_Exhaust", "ex" + _parent.exlevel, _parent.exlevel);
clip._x = ((_x + ex1._x) + (Math.random() * 2)) - 1;
clip._y = _y + ex1._y;
clip._xscale = (clip._yscale = 90 + (Math.random() * 20));
xd = clip._x - e1._x;
yd = clip._y - e1._y;
d = Math.sqrt((xd * xd) + (yd * yd));
clip._rotation = (Math.atan2(e1._y - clip._y, e1._x - clip._x) * 57.2957795130823) + 90;
e1 = clip;
_parent.exlevel++;
clip = _parent.attachMovie("JG_Exhaust", "ex" + _parent.exlevel, _parent.exlevel);
clip._x = ((_x + ex2._x) + (Math.random() * 2)) - 1;
clip._y = _y + ex2._y;
clip._xscale = (clip._yscale = 90 + (Math.random() * 20));
xd = clip._x - e2._x;
yd = clip._y - e2._y;
d = Math.sqrt((xd * xd) + (yd * yd));
clip._rotation = (Math.atan2(e2._y - clip._y, e2._x - clip._x) * 57.2957795130823) + 90;
e2 = clip;
_parent.exlevel++;
}
Instance of Symbol 201 MovieClip "preag" in Frame 1
onClipEvent (load) {
swapDepths(3000);
}
Frame 3
stop();
Frame 4
stop();
_root.attachMovie("JetGame", "game", 0);
game._x = 0;
game._y = 0;
Symbol 4 MovieClip Frame 1
stop();
Symbol 6 MovieClip Frame 1
stop();
_visible = false;
Symbol 7 MovieClip Frame 1
function doExhaust() {
var _local2 = _parent.attachMovie("JG_Exhaust", "ex" + _parent.exlevel, _parent.exlevel);
_local2._x = ((_x + ex._x) + (Math.random() * 2)) - 1;
_local2._y = _y + ex._y;
_local2._xscale = (_local2._yscale = 90 + (Math.random() * 20));
_local2._xscale = _local2._xscale * 1.5;
xd = _local2._x - e1._x;
yd = _local2._y - e1._y;
d = Math.sqrt((xd * xd) + (yd * yd));
_local2._rotation = (Math.atan2(e1._y - _local2._y, e1._x - _local2._x) * 57.2957795130823) + 90;
e1 = _local2;
_parent.exlevel++;
_local2 = _parent.attachMovie("JG_WingTrail", "ex" + _parent.exlevel, _parent.exlevel);
_local2._x = _x + wingtip1._x;
_local2._y = _y + wingtip1._y;
xd = _local2._x - w1._x;
yd = _local2._y - w1._y;
d = Math.sqrt((xd * xd) + (yd * yd));
_local2._height = d;
_local2._rotation = (Math.atan2(w1._y - _local2._y, w1._x - _local2._x) * 57.2957795130823) + 90;
w1 = _local2;
_parent.exlevel++;
_local2 = _parent.attachMovie("JG_WingTrail", "ex" + _parent.exlevel, _parent.exlevel);
_local2._x = _x + wingtip2._x;
_local2._y = _y + wingtip2._y;
xd = _local2._x - w2._x;
yd = _local2._y - w2._y;
d = Math.sqrt((xd * xd) + (yd * yd));
_local2._height = d;
_local2._rotation = (Math.atan2(w2._y - _local2._y, w2._x - _local2._x) * 57.2957795130823) + 90;
w2 = _local2;
_parent.exlevel++;
}
function doMove() {
if (!started) {
if (_y <= 330) {
started = true;
}
_y = (_y + ((320 - _y) / 10));
} else {
if (Key.isDown(39)) {
xv = xv + 2;
} else if (Key.isDown(37)) {
xv = xv - 2;
} else if (xv > 0) {
xv = xv - 2;
} else if (xv < 0) {
xv = xv + 2;
}
if (Key.isDown(38)) {
yv = yv - 2;
} else if (Key.isDown(40)) {
yv = yv + 2;
} else if (yv > 0) {
yv = yv - 2;
} else if (yv < 0) {
yv = yv + 2;
}
if (xv > speed) {
xv = speed;
}
if (xv < (-speed)) {
xv = -speed;
}
if (yv > speed) {
yv = speed;
}
if (yv < (-speed)) {
yv = -speed;
}
_x = (_x + xv);
_y = (_y + yv);
if (_x > 350) {
_x = 350;
xv = 0;
} else if (_x < 50) {
_x = 50;
xv = 0;
}
if (_y > 350) {
_y = 350;
yv = 0;
} else if (_y < 50) {
_y = 50;
yv = 0;
}
}
}
function doFire() {
if (Key.isDown(90)) {
if (firetimer == 0) {
if (superShots > 0) {
firetimer = 2;
} else {
firetimer = 3;
}
g = null;
if (gun == 0) {
gun = 1;
g = c1;
} else {
gun = 0;
g = c2;
}
var _local2 = _parent.attachMovie("JG_GoodCannon", "ex" + _parent.shotlevel, _parent.shotlevel);
_local2._x = _x + g._x;
_local2._y = (_y + g._y) - 30;
_parent.shotlevel++;
if (superShots > 0) {
_local2.issuper = true;
_local2._xscale = (_local2._yscale = 200);
_parent.playSound("evillaser");
superShots--;
} else {
_parent.playSound("goodlaser");
}
_local2 = _parent.attachMovie("JG_GoodCannonDeath", "ex" + _parent.shotlevel, _parent.shotlevel);
_local2._x = _x + g._x;
_local2._y = _y + g._y;
_local2._xscale = (_local2._yscale = 50);
_local2._rotation = Math.random() * 360;
_parent.shotlevel++;
}
}
if (Key.isDown(32)) {
if ((missiletimer == 0) && (missiles > 0)) {
missiletimer = 10;
missiles--;
g = null;
if (missileleft) {
missileleft = false;
g = c1;
} else {
missileleft = true;
g = c2;
}
var _local2 = _parent.attachMovie("JG_Missile", "mis" + _parent.projlevel, _parent.projlevel);
_local2._x = _x + g._x;
_local2._y = _y + g._y;
_local2.left = missileleft;
_parent.projlevel++;
}
}
if (firetimer > 0) {
firetimer--;
}
if (missiletimer > 0) {
missiletimer--;
}
}
started = false;
reset = true;
w1 = null;
w2 = null;
e1 = null;
xd = 0;
yd = 0;
d = 0;
ym = 0;
firetimer = 0;
missiletimer = 0;
missileleft = true;
gun = 0;
health = 100;
hitTimer = 0;
missiles = 2;
superShots = 0;
exploding = false;
expDone = false;
expTimer = 0;
alive = true;
won = false;
xv = 0;
yv = 0;
_y = 500;
_x = 200;
speed = 10;
swapDepths(5001);
onEnterFrame = function () {
if (_parent.paused) {
return(undefined);
}
if (reset) {
w1 = null;
w2 = null;
e1 = null;
xd = 0;
yd = 0;
d = 0;
ym = 0;
firetimer = 0;
missiletimer = 0;
missileleft = true;
gun = 0;
health = 100;
hitTimer = 0;
missiles = 2;
superShots = 0;
exploding = false;
expDone = false;
expTimer = 0;
alive = true;
xv = 0;
yv = 0;
_y = 500;
_x = 200;
speed = 10;
started = false;
_visible = true;
won = false;
spd = 1;
reset = false;
}
if (won) {
if (_y > -100) {
_x = (_x + ((200 - _x) / 10));
_y = (_y - spd);
spd = spd + 1;
} else {
_parent.screen.gotoAndStop(3);
}
} else if (!exploding) {
_visible = true;
doMove();
doFire();
doExhaust();
if (health <= 0) {
exploding = true;
}
if (hitTimer > 0) {
if ((hitTimer % 2) == 0) {
hit.gotoAndStop(1);
} else {
hit.gotoAndStop(2);
}
hitTimer--;
} else {
hit.gotoAndStop(1);
}
} else {
alive = false;
_visible = false;
if (!expDone) {
expTimer++;
if ((expTimer % 4) == 0) {
var _local4 = -1;
while (_local4 <= 1) {
_parent.attachMovie("JG_BombDeath", "ex" + _parent.projlevel, _parent.projlevel);
var _local2 = _parent["ex" + _parent.projlevel];
_local2._x = _x + ((_local4 * expTimer) * 5);
_local2._y = _y + expTimer;
_parent.projlevel++;
var _local3 = 0;
while (_local3 < 20) {
_parent.attachMovie("JG_BombSpark", "ex" + _parent.projlevel, _parent.projlevel);
_local2 = _parent["ex" + _parent.projlevel];
_local2._x = _x;
_local2._y = _y;
rot = Math.random() * 360;
_local2.xm = Math.sin((Math.PI/180) * rot);
_local2.ym = Math.cos((Math.PI/180) * rot);
_parent.projlevel++;
_local3++;
}
_parent.screenshake();
_parent.screenflash();
_local4 = _local4 + 2;
}
_parent.playExplosion();
}
if (expTimer >= 40) {
expDone = true;
_parent.screen.gotoAndStop(2);
}
}
}
};
Instance of Symbol 4 MovieClip "superAura" in Symbol 7 MovieClip Frame 1
onClipEvent (load) {
inc = true;
}
onClipEvent (enterFrame) {
if (_parent.superShots > 0) {
_visible = true;
} else {
_visible = false;
}
if (inc) {
_alpha = (_alpha + 3);
if (_alpha >= 100) {
inc = false;
}
} else {
_alpha = (_alpha - 3);
if (_alpha <= 50) {
inc = true;
}
}
}
Symbol 9 MovieClip Frame 1
i = 0;
while (i < 100) {
attachMovie("JG_WaterRipple", "r" + i, i);
clip = this["r" + i];
clip._x = Math.random() * 800;
clip._y = Math.random() * 800;
clip._xscale = (clip._yscale = Math.random() * 60);
clip.gotoAndStop(Math.floor(Math.random() * 2) + 1);
i++;
}
onEnterFrame = function () {
if (_parent.paused) {
return(undefined);
}
_yscale = (150 - (50 * _parent.jetheight));
_xscale = (150 - (50 * _parent.jetheight));
_y = (-200 + (200 * (_parent.jetheight - 1)));
_x = (-200 + (200 * (_parent.jetheight - 1)));
_alpha = (150 - (50 * _parent.jetheight));
i = 0;
while (i < 100) {
clip = this["r" + i];
clip._y = clip._y + 24;
if (clip._y > 800) {
clip._x = Math.random() * 800;
clip._y = Math.random() * 24;
clip._xscale = (clip._yscale = Math.random() * 60);
}
i++;
}
};
Symbol 140 MovieClip Frame 1
ta = 20;
onEnterFrame = function () {
if (_parent._parent.goodjet.superShots > 0) {
ta = 80;
tf = Math.floor((_parent._parent.goodjet.superShots / 100) * 32) + 2;
} else {
ta = 20;
tf = 2;
}
gotoAndStop(_currentframe + Math.ceil((tf - _currentframe) / 3));
_alpha = (_alpha + ((ta - _alpha) / 3));
};
gotoAndStop (2);
Symbol 141 MovieClip Frame 1
stop();
swapDepths(9000);
onEnterFrame = function () {
rack.gotoAndStop(_parent.goodjet.missiles + 1);
if (_parent.diff < 5) {
prog.tx = 266;
ehp.tx = 500;
eicon.tx = 385;
} else {
prog.tx = 500;
ehp.tx = 268;
eicon.tx = 260;
}
hp.gotoAndStop(Math.ceil(_parent.goodjet.health / 5) + 1);
if (_parent.diff == 5) {
ehp.gotoAndStop(Math.ceil(_parent.eviljet.health / 15) + 41);
} else if (_parent.diff == 6) {
ehp.gotoAndStop(Math.ceil(_parent.eviljet.health / 20) + 21);
} else {
ehp.gotoAndStop(Math.ceil(_parent.eviljet.health / 25) + 1);
}
};
Instance of Symbol 98 MovieClip "ehp" in Symbol 141 MovieClip Frame 1
onClipEvent (load) {
tx = 500;
}
onClipEvent (enterFrame) {
_x = (_x + ((tx - _x) / 3));
}
Instance of Symbol 100 MovieClip "prog" in Symbol 141 MovieClip Frame 1
onClipEvent (load) {
tx = 266;
}
onClipEvent (enterFrame) {
_x = (_x + ((tx - _x) / 3));
}
Instance of Symbol 102 MovieClip "eicon" in Symbol 141 MovieClip Frame 1
onClipEvent (load) {
tx = 385;
}
onClipEvent (enterFrame) {
_x = (_x + ((tx - _x) / 3));
}
Instance of Symbol 104 MovieClip in Symbol 141 MovieClip Frame 1
onClipEvent (load) {
tx = 135;
}
onClipEvent (enterFrame) {
if (_parent._parent.diff <= 4) {
tx = 266 + ((_parent._parent.totaltime / 16500) * 120);
} else {
tx = 135;
}
_x = (_x + ((tx - _x) / 3));
}
Symbol 151 MovieClip Frame 1
stop();
Symbol 164 MovieClip Frame 1
onEnterFrame = function () {
if (barrel._y > 0) {
barrel._y--;
}
};
Symbol 200 Button
on (release) {
getURL ("http://www.armorgames.com", "blank");
}
Symbol 212 Button
on (release) {
_parent.tv = 100;
_parent.paused = false;
}
Symbol 221 Button
on (release) {
_parent.init(0);
}
Symbol 225 Button
on (release) {
_parent.init(_parent.lastDiff);
}
Symbol 237 Button
on (release) {
_parent.init(0);
}
Symbol 238 MovieClip Frame 1
swapDepths(100005);
stop();
onEnterFrame = function () {
if (_currentframe == 1) {
if (_parent.paused) {
_alpha = (_alpha + ((100 - _alpha) / 3));
} else {
_alpha = (_alpha + ((-_alpha) / 3));
}
if (_alpha < 5) {
_visible = false;
} else {
_visible = true;
}
} else if (_currentframe == 2) {
_visible = true;
if ((!_parent.goodjet.alive) && (_parent.goodjet.expDone)) {
_alpha = (_alpha + ((100 - _alpha) / 3));
} else {
_alpha = 0;
}
} else if (_currentframe == 3) {
_visible = true;
_alpha = (_alpha + ((100 - _alpha) / 3));
}
};
Instance of Symbol 167 MovieClip in Symbol 238 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation + 3);
}
Instance of Symbol 167 MovieClip in Symbol 238 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation + 3);
}
Instance of Symbol 167 MovieClip in Symbol 238 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation + 3);
}
Symbol 240 MovieClip Frame 1
stop();
_alpha = 0;
swapDepths(20000);
onEnterFrame = function () {
_alpha = (_alpha + ((-_alpha) / 3));
};
Symbol 241 MovieClip [JetGame] Frame 1
function setRegularMusic() {
music.stop();
music = new Sound();
music.attachSound("bgmusic");
if (useMusic) {
music.start();
}
music.onSoundComplete = function () {
if (useMusic) {
music.start();
}
};
}
function setBossMusic() {
music.stop();
music = new Sound();
music.attachSound("bossmusic");
if (useMusic) {
music.start();
}
music.onSoundComplete = function () {
if (useMusic) {
music.start();
}
};
}
function init(d) {
exlevel = 1000;
projlevel = 2000;
jetlevel = 4000;
shotlevel = 6000;
smokelevel = 8000;
jetheight = 1;
eggtimer = 300;
eggtimer2 = 0;
missiletimer = 200;
jettimer = 300;
bombertimer = 500;
gametime = 0;
totaltime = 0;
diff = d;
goodjet.reset = true;
i = 0;
while (i < targets.length) {
targets[i].removeMovieClip();
i++;
}
targets = new Array();
screen.gotoAndStop(1);
screen._alpha = 0;
if (d == 0) {
totaltime = 0;
} else if (d == 1) {
totaltime = 2000;
} else if (d == 2) {
totaltime = 4500;
} else if (d == 3) {
totaltime = 7500;
} else if (d == 4) {
totaltime = 11500;
} else if (d >= 5) {
totaltime = 16500;
}
if (d < 5) {
setRegularMusic();
} else {
setBossMusic();
}
}
function screenshake() {
shaketimer = 10;
}
function screenflash() {
sf._alpha = 100;
}
function playExplosion() {
if (useSound) {
var _local1 = new Sound();
_local1.attachSound("explosion" + (Math.floor(Math.random() * 5) + 1));
_local1.start();
}
}
function playSound(s) {
if (useSound) {
var _local1 = new Sound();
_local1.attachSound(s);
_local1.start();
}
}
stop();
_root._quality = "MEDIUM";
jh = true;
targets = new Array();
shaketimer = 0;
tv = 100;
cv = 100;
GMODE_story = 0;
GMODE_arcade = 1;
arcadeTimeInc = 2000;
ducount = 0;
pauseTimer = 0;
qualTimer = 0;
musTimer = 0;
sndTimer = 0;
paused = false;
useMusic = true;
useSound = true;
lastDiff = 0;
juststarted = true;
music = null;
gmode = GMODE_arcade;
onEnterFrame = function () {
cv = cv + ((tv - cv) / 4);
music.setVolume(cv);
if (qualTimer <= 0) {
if (Key.isDown(81)) {
if (_root._quality == "LOW") {
_root._quality = "HIGH";
} else if (_root._quality == "HIGH") {
_root._quality = "MEDIUM";
} else if (_root._quality == "MEDIUM") {
_root._quality = "LOW";
}
qualTimer = 5;
}
} else {
qualTimer--;
}
if (pauseTimer <= 0) {
if (Key.isDown(80) || (juststarted)) {
paused = !paused;
pauseTimer = 10;
if (paused) {
tv = 20;
} else {
tv = 100;
}
juststarted = false;
}
} else {
pauseTimer--;
}
if (musTimer <= 0) {
if (Key.isDown(77)) {
useMusic = !useMusic;
musTimer = 10;
if (useMusic) {
music.start();
} else {
music.stop();
}
}
} else {
musTimer--;
}
if (sndTimer <= 0) {
if (Key.isDown(83)) {
useSound = !useSound;
sndTimer = 10;
}
} else {
sndTimer--;
}
if (paused) {
return(undefined);
}
if (exlevel >= 1900) {
exlevel = 1000;
}
if (projlevel >= 2900) {
projlevel = 2000;
}
if (jetlevel >= 4900) {
projlevel = 4000;
}
if (shotlevel >= 6900) {
shotlevel = 6000;
}
if (smokelevel >= 8900) {
smokelevel = 8000;
}
if (Math.floor(Math.random() * 50) == 0) {
jh = !jh;
}
if (jetheight <= 1) {
jh = true;
} else if (jetheight >= 1.5) {
jh = false;
}
if (jh) {
jetheight = jetheight + 0.005;
} else {
jetheight = jetheight - 0.005;
}
if (shaketimer > 0) {
shaketimer--;
_y = (((shaketimer % 2) == 0) ? (shaketimer * 2) : ((-shaketimer) * 2));
_x = (((shaketimer % 2) == 0) ? (shaketimer * 2) : ((-shaketimer) * 2));
}
if (!goodjet.alive) {
return(undefined);
}
if (((diff >= 5) && (eviljet == undefined)) && (!goodjet.won)) {
if (targets.length == 0) {
attachMovie("JG_EvilJet", "eviljet", 5000);
targets.push(this.eviljet);
hud.ehp.tx = 268;
hud.prog.tx = 500;
hud.eicon.tx = 260;
setBossMusic();
}
}
if ((diff >= 5) && (!eviljet.alive)) {
return(undefined);
}
gametime++;
totaltime++;
if (diff >= 5) {
if (diff == 5) {
if (missiletimer <= 0) {
missiletimer = 100;
attachMovie("JG_EvilMissile", "mis" + projlevel, projlevel);
projlevel++;
} else {
missiletimer--;
}
if (jettimer <= 0) {
jettimer = 180;
b = attachMovie("JG_BadJet", "jet" + jetlevel, jetlevel);
jetlevel++;
} else {
jettimer--;
}
} else if (diff == 6) {
if (missiletimer <= 0) {
missiletimer = 80;
attachMovie("JG_EvilMissile", "mis" + projlevel, projlevel);
projlevel++;
} else {
missiletimer--;
}
if (jettimer <= 0) {
jettimer = 160;
b = attachMovie("JG_BadJet", "jet" + jetlevel, jetlevel);
jetlevel++;
} else {
jettimer--;
}
} else if (diff == 7) {
if (missiletimer <= 0) {
missiletimer = 70;
attachMovie("JG_EvilMissile", "mis" + projlevel, projlevel);
projlevel++;
} else {
missiletimer--;
}
if (jettimer <= 0) {
jettimer = 180;
b = attachMovie("JG_BadJet", "jet" + jetlevel, jetlevel);
jetlevel++;
} else {
jettimer--;
}
}
} else {
if (ducount > 0) {
ducount--;
d = attachMovie("JG_DiffUp", "du" + shotlevel, shotlevel);
d._x = 10;
d._y = 80;
shotlevel++;
}
if (diff == 0) {
if (missiletimer <= 0) {
missiletimer = 150;
attachMovie("JG_EvilMissile", "mis" + projlevel, projlevel);
projlevel++;
} else {
missiletimer--;
}
if (jettimer <= 0) {
jettimer = 200;
b = attachMovie("JG_BadJet", "jet" + jetlevel, jetlevel);
jetlevel++;
} else {
jettimer--;
}
if (gametime > 2000) {
diff++;
gametime = 0;
ducount = 10;
}
} else if (diff == 1) {
if (missiletimer <= 0) {
missiletimer = 100;
attachMovie("JG_EvilMissile", "mis" + projlevel, projlevel);
projlevel++;
} else {
missiletimer--;
}
if (jettimer <= 0) {
jettimer = 150;
b = attachMovie("JG_BadJet", "jet" + jetlevel, jetlevel);
jetlevel++;
} else {
jettimer--;
}
if (eggtimer <= 0) {
eggtimer = 400;
i = 0;
while (i < 4) {
b = attachMovie("JG_EggBomb", "eb" + jetlevel, jetlevel);
b._x = ((i * 300) / 4) + 50;
b._y = -20;
jetlevel++;
i++;
}
} else {
eggtimer--;
}
if (gametime > 2500) {
diff++;
gametime = 0;
ducount = 10;
}
} else if (diff == 2) {
if (missiletimer <= 0) {
missiletimer = 100;
attachMovie("JG_EvilMissile", "mis" + projlevel, projlevel);
projlevel++;
} else {
missiletimer--;
}
if (jettimer <= 0) {
jettimer = 150;
b = attachMovie("JG_BadJet", "jet" + jetlevel, jetlevel);
jetlevel++;
} else {
jettimer--;
}
if (eggtimer <= 0) {
eggtimer = 250;
i = 0;
while (i < 6) {
b = attachMovie("JG_EggBomb", "eb" + jetlevel, jetlevel);
b._x = ((i * 300) / 6) + 50;
b._y = -20;
jetlevel++;
i++;
}
} else {
eggtimer--;
}
if (gametime > 3000) {
diff++;
gametime = 0;
ducount = 10;
}
} else if (diff == 3) {
if (missiletimer <= 0) {
missiletimer = 80;
attachMovie("JG_EvilMissile", "mis" + projlevel, projlevel);
projlevel++;
} else {
missiletimer--;
}
if (jettimer <= 0) {
jettimer = 160;
b = attachMovie("JG_BadJet", "jet" + jetlevel, jetlevel);
jetlevel++;
} else {
jettimer--;
}
if (eggtimer <= 0) {
eggtimer = 300;
i = 0;
while (i < 6) {
b = attachMovie("JG_EggBomb", "eb" + jetlevel, jetlevel);
b._x = ((i * 300) / 6) + 50;
b._y = -20;
jetlevel++;
i++;
}
} else {
eggtimer--;
}
if (bombertimer <= 0) {
bombertimer = 500;
bmr = attachMovie("JG_BadBomber", "bmr" + jetlevel, jetlevel);
jetlevel++;
} else {
bombertimer--;
}
if (gametime > 4000) {
diff++;
gametime = 0;
ducount = 10;
}
} else if (diff == 4) {
if (missiletimer <= 0) {
missiletimer = 60;
attachMovie("JG_EvilMissile", "mis" + projlevel, projlevel);
projlevel++;
} else {
missiletimer--;
}
if (jettimer <= 0) {
jettimer = 120;
b = attachMovie("JG_BadJet", "jet" + jetlevel, jetlevel);
jetlevel++;
} else {
jettimer--;
}
if (eggtimer <= 0) {
eggtimer = 250;
i = 0;
while (i < 6) {
b = attachMovie("JG_EggBomb", "eb" + jetlevel, jetlevel);
b._x = ((i * 300) / 6) + 50;
b._y = -20;
jetlevel++;
i++;
}
} else {
eggtimer--;
}
if (bombertimer <= 0) {
bombertimer = 350;
bmr = attachMovie("JG_BadBomber", "bmr" + jetlevel, jetlevel);
jetlevel++;
} else {
bombertimer--;
}
if (gametime > 5000) {
diff++;
gametime = 0;
ducount = 10;
}
}
}
lastDiff = diff;
};
init(0);
Symbol 244 MovieClip Frame 1
stop();
Symbol 251 MovieClip [JG_EvilJet] Frame 1
function doAI() {
if (flyoff) {
_x = (_x + ((200 - _x) / 15));
_y = (_y - 4);
return(undefined);
}
if (attackmode == A_none) {
if (choosetimer == 0) {
movemode = M_weave;
if (_parent.goodjet.alive) {
r = attackpattern[patternpos];
if ((++patternpos) > attackpattern.length) {
patternpos = 0;
}
if (r == 0) {
attackmode = A_burst;
bursttimer = 6;
firetimer = 0;
} else if (r == 1) {
attackmode = A_bomb;
} else if (r == 2) {
attackmode = A_sonicboom;
boomdone = false;
boomyt = _parent.goodjet._y;
} else if (r == 3) {
attackmode = A_summon;
summonBomber = null;
summonDone = false;
summonReturned = false;
}
choosetimer = 30;
}
} else {
choosetimer--;
}
}
if (attackmode == A_burst) {
if (bursttimer < 0) {
attackmode = A_none;
bursttimer = 0;
firetimer = 0;
} else if (firetimer == 0) {
var _local3 = _parent.attachMovie("JG_EvilCannon", "ex" + _parent.shotlevel, _parent.shotlevel);
_local3._x = _x + turret._x;
_local3._y = _y + turret._y;
_local3._rotation = ((Math.atan2(_parent.goodjet._y - _local3._y, _parent.goodjet._x - _local3._x) * 57.2957795130823) + 90) + ((bursttimer - 3) * 3);
_parent.shotlevel++;
_parent.playSound("evillaser");
firetimer = 2;
bursttimer--;
} else {
firetimer--;
}
} else if (attackmode == A_bomb) {
if (matched) {
var _local3 = _parent.attachMovie("JG_Bomb", "bomb" + _parent.projlevel, _parent.projlevel);
_local3._x = _x + turret._x;
_local3._y = _y + turret._y;
_parent.projlevel++;
attackmode = A_none;
}
} else if (attackmode == A_sonicboom) {
if (boomdone) {
if (_y < 60) {
attackmode = A_none;
weavex = 1;
booming = false;
}
} else if ((Math.abs(_x - 200) < 20) && (_y > boomyt)) {
_parent.screenshake();
_parent.screenflash();
_parent.playExplosion();
var _local3 = _parent.attachMovie("JG_SonicBoom", "bomb" + _parent.projlevel, _parent.projlevel);
_local3._xscale = (_local3._yscale = 150);
_local3._x = _x;
_local3._y = _y - 50;
_parent.projlevel++;
dist = Math.abs(_x - _parent.goodjet._x);
dist2 = Math.abs(_y - _parent.goodjet._y);
if ((dist < 125) && (dist2 < 75)) {
_parent.goodjet.health = _parent.goodjet.health - (10 - Math.ceil((dist / 125) * 10));
_parent.goodjet.hitTimer = 15;
}
boomdone = true;
booming = true;
}
} else if (attackmode == A_summon) {
if (!summonDone) {
if (summonBomber == null) {
_y = (_y - 4);
if (_y < -50) {
summonBomber = _parent.attachMovie("JG_BadBomber", "bmr" + _parent.jetlevel, _parent.jetlevel);
_parent.jetlevel++;
i = 0;
while (i < _parent.targets.length) {
if (_parent.targets[i] == this) {
_parent.targets.splice(i, 1);
}
i++;
}
summonDone = true;
}
}
} else if (!summonReturned) {
if (summonBomber.life == undefined) {
summonReturned = true;
_parent.targets.push(this);
}
} else {
_y = (_y + 4);
if (_y > 40) {
attackmode = A_none;
}
}
}
if (health <= 0) {
if (_parent.diff == 5) {
health = 400;
attackpattern = ap2;
attackpos = 0;
fire1._visible = true;
_parent.diff++;
} else if (_parent.diff == 6) {
health = 500;
attackpattern = ap3;
attackpos = 0;
fire2._visible = true;
_parent.diff++;
} else if (_parent.diff == 7) {
fire3._visible = true;
alive = false;
_parent.diff++;
}
}
}
function doMove() {
if (attackmode == A_sonicboom) {
_x = (_x + ((200 - _x) / 10));
if (boomdone) {
_y = (_y + ((50 - _y) / 5));
} else {
_y = (_y + 8);
}
} else {
if (movemode == M_weave) {
if (weavex == -1) {
if (Math.abs(_x - 50) < 20) {
weavex = 0;
}
_x = (_x + ((50 - _x) / 20));
} else if (weavex == 0) {
if (Math.abs(_x - 200) < 20) {
weavex = 1;
}
_x = (_x + ((200 - (200 - _x)) / 15));
} else if (weavex == 1) {
if (Math.abs(_x - 350) < 20) {
weavex = 2;
}
_x = (_x + ((350 - _x) / 15));
} else if (weavex == 2) {
if (Math.abs(_x - 200) < 20) {
weavex = 3;
}
_x = (_x + ((-200 - (200 - _x)) / 15));
} else if (weavex == 3) {
if (Math.abs(_x - 50) < 20) {
weavex = 0;
}
_x = (_x + ((50 - _x) / 15));
}
}
if (Math.abs(_x - _parent.goodjet._x) < 25) {
matched = true;
} else {
matched = false;
}
if (attackmode != A_summon) {
if (ym == 0) {
if (_y < 40) {
ym = 1;
}
_y = (_y-1);
} else {
if (_y > 60) {
ym = 0;
}
_y = (_y+1);
}
}
}
}
function doExhaust() {
var _local2 = _parent.attachMovie("JG_Exhaust", "ex" + _parent.exlevel, _parent.exlevel);
_local2._x = ((_x + ex1._x) + (Math.random() * 2)) - 1;
_local2._y = _y + ex1._y;
_local2._xscale = (_local2._yscale = (90 + (Math.random() * 20)) + ((booming && (e1._xscale < 110)) ? 100 : 0));
xd = _local2._x - e1._x;
yd = _local2._y - e1._y;
d = Math.sqrt((xd * xd) + (yd * yd));
_local2._rotation = (Math.atan2(e1._y - _local2._y, e1._x - _local2._x) * 57.2957795130823) + 90;
e1 = _local2;
_parent.exlevel++;
_local2 = _parent.attachMovie("JG_Exhaust", "ex" + _parent.exlevel, _parent.exlevel);
_local2._x = ((_x + ex2._x) + (Math.random() * 2)) - 1;
_local2._y = _y + ex2._y;
_local2._xscale = (_local2._yscale = (90 + (Math.random() * 20)) + ((booming && (e2._xscale < 110)) ? 100 : 0));
xd = _local2._x - e2._x;
yd = _local2._y - e2._y;
d = Math.sqrt((xd * xd) + (yd * yd));
_local2._rotation = (Math.atan2(e2._y - _local2._y, e2._x - _local2._x) * 57.2957795130823) + 90;
e2 = _local2;
_parent.exlevel++;
i = 0;
while (i < (_parent.diff - 5)) {
_local2 = _parent.attachMovie("JG_Smoke", "ex" + _parent.smokelevel, _parent.smokelevel);
_local2._x = _x + smoke[i]._x;
_local2._y = _y + smoke[i]._y;
_local2._rotation = Math.random() * 360;
_local2._alpha = 75;
_local2._xscale = (_local2._yscale = 80 + (Math.random() * 40));
_parent.smokelevel++;
i++;
}
_local2 = _parent.attachMovie("JG_WingTrail", "ex" + _parent.exlevel, _parent.exlevel);
_local2._x = _x + wingtip1._x;
_local2._y = _y + wingtip1._y;
xd = _local2._x - w1._x;
yd = _local2._y - w1._y;
d = Math.sqrt((xd * xd) + (yd * yd));
_local2._height = d;
_local2._rotation = (Math.atan2(w1._y - _local2._y, w1._x - _local2._x) * 57.2957795130823) + 90;
w1 = _local2;
_parent.exlevel++;
_local2 = _parent.attachMovie("JG_WingTrail", "ex" + _parent.exlevel, _parent.exlevel);
_local2._x = _x + wingtip2._x;
_local2._y = _y + wingtip2._y;
xd = _local2._x - w2._x;
yd = _local2._y - w2._y;
d = Math.sqrt((xd * xd) + (yd * yd));
_local2._height = d;
_local2._rotation = (Math.atan2(w2._y - _local2._y, w2._x - _local2._x) * 57.2957795130823) + 90;
w2 = _local2;
_parent.exlevel++;
}
swapDepths(5000);
w1 = null;
w2 = null;
e1 = null;
e2 = null;
xd = 0;
yd = 0;
d = 0;
ym = 1;
health = 300;
hitTimer = 0;
flyoff = false;
smoke = new Array(smoke1, smoke2, smoke3);
alive = true;
removed = false;
expTimer = 0;
expDone = false;
mistarg = true;
_x = 50;
_y = -50;
M_weave = 0;
weavex = 0;
M_match = 1;
matched = false;
A_none = 0;
choosetimer = 100;
A_burst = 1;
bursttimer = 0;
firetimer = 0;
A_bomb = 2;
A_sonicboom = 3;
A_summon = 4;
summonBomber = null;
summonDone = false;
summonReturned = false;
boomdone = false;
booming = false;
boomyt = 0;
movemode = M_weave;
attackmode = A_none;
ap1 = new Array(0, 0, 1, 0, 2, 0, 1, 2);
ap2 = new Array(0, 1, 1, 0, 2, 1, 0, 2, 3);
ap3 = new Array(1, 1, 1, 3, 2, 1, 1, 1, 3, 2);
attackpattern = ap1;
patternpos = 0;
fire1._visible = false;
fire2._visible = false;
fire3._visible = false;
if (_parent.diff == 5) {
health = 300;
attackpattern = ap1;
attackpos = 0;
} else if (_parent.diff == 6) {
health = 400;
attackpattern = ap2;
attackpos = 0;
fire1._visible = true;
} else if (_parent.diff == 7) {
health = 500;
attackpattern = ap3;
attackpos = 0;
fire1._visible = true;
fire2._visible = true;
}
onEnterFrame = function () {
if (_parent.paused) {
return(undefined);
}
if (alive) {
doAI();
if (!flyoff) {
doMove();
doExhaust();
}
if (hitTimer > 0) {
if ((hitTimer % 2) == 0) {
hit.gotoAndStop(1);
} else {
hit.gotoAndStop(2);
}
hitTimer--;
} else {
hit.gotoAndStop(1);
}
} else {
_visible = false;
if (!removed) {
i = 0;
while (i < _parent.targets.length) {
if (_parent.targets[i] == this) {
_parent.targets.splice(i, 1);
} else {
_parent.targets[i].health = -1;
}
i++;
}
removed = true;
}
if (!expDone) {
expTimer++;
if ((expTimer % 4) == 0) {
var _local4 = -1;
while (_local4 <= 1) {
_parent.attachMovie("JG_BombDeath", "ex" + _parent.projlevel, _parent.projlevel);
var _local3 = _parent["ex" + _parent.projlevel];
_local3._x = _x + ((_local4 * expTimer) * 5);
_local3._y = _y + expTimer;
_parent.projlevel++;
var i = 0;
while (i < 20) {
_parent.attachMovie("JG_BombSpark", "ex" + _parent.projlevel, _parent.projlevel);
_local3 = _parent["ex" + _parent.projlevel];
_local3._x = _x;
_local3._y = _y;
rot = Math.random() * 360;
_local3.xm = Math.sin((Math.PI/180) * rot);
_local3.ym = Math.cos((Math.PI/180) * rot);
_parent.projlevel++;
i++;
}
_parent.screenshake();
_parent.screenflash();
_local4 = _local4 + 2;
}
_parent.playExplosion();
}
if (expTimer >= 40) {
expDone = true;
}
} else {
_parent.goodjet.won = true;
this.removeMovieClip();
}
}
};
Symbol 254 MovieClip [JG_Smoke] Frame 1
onEnterFrame = function () {
_y = (_y + 10);
};
Symbol 254 MovieClip [JG_Smoke] Frame 16
this.removeMovieClip();
Symbol 257 MovieClip Frame 11
this._parent.removeMovieClip();
Symbol 258 MovieClip [JG_Exhaust] Frame 1
onEnterFrame = function () {
_y = (_y + 14);
};
Symbol 261 MovieClip [JG_WingTrail] Frame 1
onEnterFrame = function () {
_y = (_y + 14);
};
Symbol 261 MovieClip [JG_WingTrail] Frame 31
this.removeMovieClip();
Symbol 267 MovieClip [JG_GoodCannon] Frame 1
stop();
lastHit = 0;
onEnterFrame = function () {
if (_parent.paused) {
return(undefined);
}
if (issuper) {
_y = (_y - 50);
} else {
_y = (_y - 35);
}
if (lastHit <= 0) {
i = 0;
while (i < _parent.targets.length) {
t = _parent.targets[i];
if (t.hitTest(this)) {
_parent.attachMovie("JG_GoodCannonDeath", "exp" + _parent.shotlevel, _parent.shotlevel);
clip = _parent["exp" + _parent.shotlevel];
clip._x = _x;
clip._y = _y;
clip._rotation = Math.random() * 360;
clip._xscale = (clip._yscale = (clip._alpha = 60 + (Math.random() * 80)));
_parent.shotlevel++;
t.hitTimer = 1;
if (issuper) {
t.health = t.health - 2;
clip._xscale = (clip._yscale = 200);
_yscale = 100;
_xscale = 100;
issuper = false;
lastHit = 3;
} else {
t.health = t.health - 1;
this.removeMovieClip();
}
}
i++;
}
} else {
lastHit--;
}
if (_y < -50) {
this.removeMovieClip();
}
};
Symbol 273 MovieClip [JG_EvilCannonDeath] Frame 6
this.removeMovieClip();
Symbol 279 MovieClip [JG_GoodCannonDeath] Frame 6
this.removeMovieClip();
Symbol 280 MovieClip [JG_EvilCannon] Frame 1
onEnterFrame = function () {
if (_parent.paused) {
return(undefined);
}
_x = (_x + (Math.sin((Math.PI/180) * _rotation) * 15));
_y = (_y - (Math.cos((Math.PI/180) * _rotation) * 15));
t = _parent.goodjet;
if (t.hitTest(this)) {
_parent.attachMovie("JG_EvilCannonDeath", "exp" + _parent.shotlevel, _parent.shotlevel);
clip = _parent["exp" + _parent.shotlevel];
clip._x = _x;
clip._y = _y;
clip._rotation = Math.random() * 360;
clip._xscale = (clip._yscale = (clip._alpha = 100 + (Math.random() * 50)));
_parent.shotlevel++;
t.hitTimer = 1;
t.health = t.health - 1.5;
this.removeMovieClip();
}
if ((((_y < -50) || (_y > 450)) || (_x < -50)) || (_x > 450)) {
this.removeMovieClip();
}
};
Symbol 282 MovieClip [JG_Bomb] Frame 1
stop();
life = 0;
onEnterFrame = function () {
if (_parent.paused) {
return(undefined);
}
life++;
_y = (_y + life);
_rotation = (_rotation+1);
if (Math.abs(_y - _parent.goodjet._y) < 20) {
_parent.attachMovie("JG_BombDeath", "ex" + _parent.projlevel, _parent.projlevel);
var _local3 = _parent["ex" + _parent.projlevel];
_local3._x = _x;
_local3._y = _y;
_parent.projlevel++;
var _local4 = 0;
while (_local4 < 20) {
_parent.attachMovie("JG_BombSpark", "ex" + _parent.projlevel, _parent.projlevel);
_local3 = _parent["ex" + _parent.projlevel];
_local3._x = _x;
_local3._y = _y;
rot = Math.random() * 360;
_local3.xm = Math.sin((Math.PI/180) * rot);
_local3.ym = Math.cos((Math.PI/180) * rot);
_parent.projlevel++;
_local4++;
}
xd = _parent.goodjet._x - _x;
yd = _parent.goodjet._y - _y;
dist = Math.sqrt((xd * xd) + (yd * yd));
if (dist < 150) {
_parent.goodjet.hitTimer = 15;
_parent.goodjet.health = _parent.goodjet.health - (10 - Math.ceil((15 / dist) * 10));
}
_parent.screenshake();
_parent.screenflash();
_parent.playExplosion();
this.removeMovieClip();
}
if (_y > 450) {
this.removeMovieClip();
}
};
Symbol 297 MovieClip [JG_BombDeath] Frame 11
this.removeMovieClip();
Symbol 300 MovieClip [JG_BombSpark] Frame 1
life = (Math.random() * 20) + 10;
onEnterFrame = function () {
_x = (_x + (xm * life));
_y = (_y - (ym * life));
life--;
_y = (_y + (25 - life));
_rotation = ((Math.atan2(ym, xm) * 57.2957795130823) + 90);
};
Symbol 300 MovieClip [JG_BombSpark] Frame 16
this.removeMovieClip();
Symbol 303 MovieClip [JG_SonicBoom] Frame 1
onEnterFrame = function () {
_y = (_y + 40);
};
Symbol 303 MovieClip [JG_SonicBoom] Frame 7
this.removeMovieClip();
Symbol 307 MovieClip [JG_EvilMissile] Frame 1
if (started == undefined) {
life = 60;
speed = 30;
health = 1;
e1 = null;
mistarg = false;
_y = (Math.round(Math.random() * 250) + 100);
side = Math.round(Math.random());
indicator = _parent.attachMovie("JG_MissileIndicator", "ind" + _parent.shotlevel, _parent.shotlevel);
indicator._y = _y;
_parent.shotlevel++;
if (side == 0) {
_x = -100;
_rotation = 90;
indicator._x = 20;
} else {
_x = 500;
_rotation = 270;
indicator._x = 380;
}
indicator._rotation = _rotation;
started = true;
}
onEnterFrame = function () {
if (_currentframe == 11) {
gotoAndPlay (2);
}
if (_parent.paused) {
return(undefined);
}
if (life > 0) {
life--;
} else {
if (indicator != null) {
indicator.removeMovieClip();
indicator = null;
_parent.targets.push(this);
}
_x = (_x + (Math.sin((Math.PI/180) * _rotation) * speed));
_y = (_y - (Math.cos((Math.PI/180) * _rotation) * speed));
t = _parent.goodjet;
if (t.hitTest(this) || (health <= 0)) {
_parent.attachMovie("JG_BombDeath", "ex" + _parent.projlevel, _parent.projlevel);
var _local4 = _parent["ex" + _parent.projlevel];
_local4._x = _x;
_local4._y = _y;
_parent.projlevel++;
var _local3 = 0;
while (_local3 < 20) {
_parent.attachMovie("JG_BombSpark", "ex" + _parent.projlevel, _parent.projlevel);
_local4 = _parent["ex" + _parent.projlevel];
_local4._x = _x;
_local4._y = _y;
rot = Math.random() * 360;
_local4.xm = Math.sin((Math.PI/180) * rot);
_local4.ym = Math.cos((Math.PI/180) * rot);
_parent.projlevel++;
_local3++;
}
if (health <= 0) {
_local4 = _parent.attachMovie("JG_MissilePowerup", "ex" + _parent.projlevel, _parent.projlevel);
_local4._x = _x;
_local4._y = _y;
_parent.projlevel++;
} else {
t.hitTimer = 30;
t.health = t.health - 10;
}
_parent.screenshake();
_parent.screenflash();
_local3 = 0;
while (_local3 < _parent.targets.length) {
if (_parent.targets[_local3] == this) {
_parent.targets.splice(_local3, 1);
}
_local3++;
}
_parent.playExplosion();
this.removeMovieClip();
}
var _local4 = _parent.attachMovie("JG_Exhaust", "ex" + _parent.exlevel, _parent.exlevel);
_local4._x = _x - (Math.sin((Math.PI/180) * _rotation) * 25);
_local4._y = _y + (Math.cos((Math.PI/180) * _rotation) * 25);
_local4._xscale = 40 + (Math.random() * 20);
_local4._yscale = speed * 10;
xd = _local4._x - e1._x;
yd = _local4._y - e1._y;
d = Math.sqrt((xd * xd) + (yd * yd));
_local4._rotation = (Math.atan2(e1._y - _local4._y, e1._x - _local4._x) * 57.2957795130823) + 90;
e1 = _local4;
_parent.exlevel++;
if ((((_y < -150) || (_y > 550)) || (_x < -150)) || (_x > 550)) {
var _local3 = 0;
while (_local3 < _parent.targets.length) {
if (_parent.targets[_local3] == this) {
_parent.targets.splice(_local3, 1);
}
_local3++;
}
this.removeMovieClip();
}
}
};
gotoAndPlay (2);
Symbol 314 MovieClip [JG_Missile] Frame 1
if (!started) {
speed = 10;
life = 0;
started = true;
}
onEnterFrame = function () {
if (_currentframe == 11) {
gotoAndPlay (2);
}
if (life >= 10) {
target = null;
dist = 1000;
i = 0;
while (i < _parent.targets.length) {
if (_parent.targets[i].mistarg) {
if (Math.abs(_parent.targets[i]._x - _x) < dist) {
dist = Math.abs(_root.targets[i]._x - _x);
target = _parent.targets[i];
}
}
i++;
}
ang = (Math.atan2(target._y - _y, target._x - _x) * 57.2957795130823) + 90;
if (_rotation < 0) {
tempRot = 360 + (_rotation % 360);
} else {
tempRot = _rotation % 360;
}
if (ang < 0) {
ang = ang + 360;
}
r = ang - (tempRot % 360);
if ((r < -180) || ((r < 180) && (r > 0))) {
_rotation = (_rotation + 3);
} else {
_rotation = (_rotation - 3);
}
_x = (_x + (Math.sin((Math.PI/180) * _rotation) * speed));
_y = (_y - (Math.cos((Math.PI/180) * _rotation) * speed));
speed = speed + 2;
i = 0;
while (i < _parent.targets.length) {
t = _parent.targets[i];
if (this.hitTest(t)) {
_parent.attachMovie("JG_BombDeath", "ex" + _parent.projlevel, _parent.projlevel);
var _local4 = _parent["ex" + _parent.projlevel];
_local4._x = _x;
_local4._y = _y;
_parent.projlevel++;
var i = 0;
while (i < 20) {
_parent.attachMovie("JG_BombSpark", "ex" + _parent.projlevel, _parent.projlevel);
_local4 = _parent["ex" + _parent.projlevel];
_local4._x = _x;
_local4._y = _y;
rot = Math.random() * 360;
_local4.xm = Math.sin((Math.PI/180) * rot);
_local4.ym = Math.cos((Math.PI/180) * rot);
_parent.projlevel++;
i++;
}
t.hitTimer = 15;
t.health = t.health - 20;
_parent.screenflash();
_parent.screenshake();
_parent.playExplosion();
this.removeMovieClip();
}
i++;
}
var _local4 = _parent.attachMovie("JG_Exhaust", "ex" + _parent.exlevel, _parent.exlevel);
_local4._x = _x - (Math.sin((Math.PI/180) * _rotation) * 25);
_local4._y = _y + (Math.cos((Math.PI/180) * _rotation) * 25);
_local4._xscale = 40 + (Math.random() * 20);
_local4._yscale = speed * 10;
xd = _local4._x - e1._x;
yd = _local4._y - e1._y;
d = Math.sqrt((xd * xd) + (yd * yd));
_local4._rotation = (Math.atan2(e1._y - _local4._y, e1._x - _local4._x) * 57.2957795130823) + 90;
e1 = _local4;
_parent.exlevel++;
} else {
if (left) {
_x = (_x + 3);
} else {
_x = (_x - 3);
}
if (life == 9) {
_parent.playSound("missilelaunch");
}
_y = (_y + life);
life++;
}
if ((((_x < -50) || (_x > 450)) || (_y < -50)) || (_y > 450)) {
this.removeMovieClip();
}
};
gotoAndPlay (2);
Symbol 318 MovieClip [JG_MissileIndicator] Frame 1
life = 60;
onEnterFrame = function () {
if (_parent.paused) {
return(undefined);
}
if (life > 30) {
if ((Math.floor(life / 4) % 2) == 0) {
triangle._visible = true;
} else {
triangle._visible = false;
}
} else if (life > 15) {
if ((Math.floor(life / 2) % 2) == 0) {
triangle._visible = true;
} else {
triangle._visible = false;
}
} else if (life > 7) {
if ((life % 2) == 0) {
triangle._visible = true;
} else {
triangle._visible = false;
}
}
triangle._xscale = (triangle._yscale = life + 40);
life--;
};
Symbol 319 MovieClip [JG_HealthPowerup] Frame 1
hit = false;
onEnterFrame = function () {
if (_parent.paused) {
return(undefined);
}
_y = (_y+1);
if (hit) {
_rotation = (_rotation + 15);
_yscale = (_yscale - 10);
_xscale = (_yscale - 10);
if (_xscale <= 0) {
this.removeMovieClip();
}
} else {
if (this.hitTest(_parent.goodjet) && (_parent.goodjet.alive)) {
_parent.goodjet.health = _parent.goodjet.health + 10;
if (_parent.goodjet.health > 100) {
_parent.goodjet.health = 100;
}
hit = true;
}
if (!_parent.goodjet.alive) {
this.removeMovieClip();
}
}
};
Instance of Symbol 167 MovieClip in Symbol 319 MovieClip [JG_HealthPowerup] Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation + 3);
}
Symbol 320 MovieClip [JG_WeaponPowerup] Frame 1
hit = false;
onEnterFrame = function () {
if (_parent.paused) {
return(undefined);
}
_y = (_y+1);
if (hit) {
_rotation = (_rotation + 15);
_yscale = (_yscale - 10);
_xscale = (_yscale - 10);
if (_xscale <= 0) {
this.removeMovieClip();
}
} else {
if (this.hitTest(_parent.goodjet) && (_parent.goodjet.alive)) {
_parent.goodjet.superShots = _parent.goodjet.superShots + 50;
if (_parent.goodjet.superShots > 100) {
_parent.goodjet.superShots = 100;
}
hit = true;
}
if (!_parent.goodjet.alive) {
this.removeMovieClip();
}
}
};
Instance of Symbol 167 MovieClip in Symbol 320 MovieClip [JG_WeaponPowerup] Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation + 3);
}
Symbol 321 MovieClip [JG_MissilePowerup] Frame 1
hit = false;
onEnterFrame = function () {
if (_parent.paused) {
return(undefined);
}
_y = (_y+1);
if (hit) {
_rotation = (_rotation + 15);
_yscale = (_yscale - 10);
_xscale = (_yscale - 10);
if (_xscale <= 0) {
this.removeMovieClip();
}
} else {
if (this.hitTest(_parent.goodjet) && (_parent.goodjet.alive)) {
if (_parent.goodjet.missiles < 4) {
_parent.goodjet.missiles++;
}
hit = true;
}
if (!_parent.goodjet.alive) {
this.removeMovieClip();
}
}
};
Instance of Symbol 167 MovieClip in Symbol 321 MovieClip [JG_MissilePowerup] Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation + 3);
}
Symbol 322 MovieClip [JG_BadJet] Frame 1
function doAI() {
if (health <= 0) {
_parent.attachMovie("JG_BombDeath", "ex" + _parent.projlevel, _parent.projlevel);
var _local4 = _parent["ex" + _parent.projlevel];
_local4._x = _x;
_local4._y = _y;
_parent.projlevel++;
var _local3 = 0;
while (_local3 < 20) {
_parent.attachMovie("JG_BombSpark", "ex" + _parent.projlevel, _parent.projlevel);
_local4 = _parent["ex" + _parent.projlevel];
_local4._x = _x;
_local4._y = _y;
rot = Math.random() * 360;
_local4.xm = Math.sin((Math.PI/180) * rot);
_local4.ym = Math.cos((Math.PI/180) * rot);
_parent.projlevel++;
_local3++;
}
_local4 = _parent.attachMovie("JG_HealthPowerup", "ex" + _parent.projlevel, _parent.projlevel);
_local4._x = _x;
_local4._y = _y;
_parent.projlevel++;
_parent.screenshake();
_parent.screenflash();
_local3 = 0;
while (_local3 < _parent.targets.length) {
if (_parent.targets[_local3] == this) {
_parent.targets.splice(_local3, 1);
}
_local3++;
}
_parent.playExplosion();
this.removeMovieClip();
}
if (_parent.goodjet.alive) {
if (_parent.diff <= 4) {
num = 6;
} else {
num = 3;
}
if (bursttimer > num) {
bursttimer--;
} else if (bursttimer < 0) {
bursttimer = 70;
firetimer = 0;
} else if (firetimer == 0) {
var _local4 = _parent.attachMovie("JG_EvilCannon", "ex" + _parent.shotlevel, _parent.shotlevel);
_local4._x = _x + turret._x;
_local4._y = _y + turret._y;
_local4._rotation = ((Math.atan2(_parent.goodjet._y - _local4._y, _parent.goodjet._x - _local4._x) * 57.2957795130823) + 90) + ((bursttimer - (num / 2)) * 3);
_parent.shotlevel++;
_parent.playSound("evillaser");
firetimer = 2;
bursttimer--;
} else {
firetimer--;
}
}
}
function doMove() {
if (movetimer <= 0) {
movetimer = 200;
tx = (Math.random() * 300) + 50;
ty = (Math.random() * 150) + 100;
} else {
movetimer--;
}
deg = deg + 0.15707963267949;
cx = tx + (Math.sin(deg) * 20);
cy = ty + (Math.cos(deg) * 20);
_x = (_x + ((cx - _x) / 10));
_y = (_y + ((cy - _y) / 10));
}
function doExhaust() {
var _local2 = _parent.attachMovie("JG_Exhaust", "ex" + _parent.exlevel, _parent.exlevel);
_local2._x = ((_x + ex1._x) + (Math.random() * 2)) - 1;
_local2._y = _y + ex1._y;
_local2._xscale = (_local2._yscale = 90 + (Math.random() * 20));
xd = _local2._x - e1._x;
yd = _local2._y - e1._y;
d = Math.sqrt((xd * xd) + (yd * yd));
_local2._rotation = (Math.atan2(e1._y - _local2._y, e1._x - _local2._x) * 57.2957795130823) + 90;
e1 = _local2;
_parent.exlevel++;
_local2 = _parent.attachMovie("JG_Exhaust", "ex" + _parent.exlevel, _parent.exlevel);
_local2._x = ((_x + ex2._x) + (Math.random() * 2)) - 1;
_local2._y = _y + ex2._y;
_local2._xscale = (_local2._yscale = 90 + (Math.random() * 20));
xd = _local2._x - e2._x;
yd = _local2._y - e2._y;
d = Math.sqrt((xd * xd) + (yd * yd));
_local2._rotation = (Math.atan2(e2._y - _local2._y, e2._x - _local2._x) * 57.2957795130823) + 90;
e2 = _local2;
_parent.exlevel++;
_local2 = _parent.attachMovie("JG_WingTrail", "ex" + _parent.exlevel, _parent.exlevel);
_local2._x = _x + wingtip1._x;
_local2._y = _y + wingtip1._y;
xd = _local2._x - w1._x;
yd = _local2._y - w1._y;
d = Math.sqrt((xd * xd) + (yd * yd));
_local2._height = d;
_local2._rotation = (Math.atan2(w1._y - _local2._y, w1._x - _local2._x) * 57.2957795130823) + 90;
w1 = _local2;
_parent.exlevel++;
_local2 = _parent.attachMovie("JG_WingTrail", "ex" + _parent.exlevel, _parent.exlevel);
_local2._x = _x + wingtip2._x;
_local2._y = _y + wingtip2._y;
xd = _local2._x - w2._x;
yd = _local2._y - w2._y;
d = Math.sqrt((xd * xd) + (yd * yd));
_local2._height = d;
_local2._rotation = (Math.atan2(w2._y - _local2._y, w2._x - _local2._x) * 57.2957795130823) + 90;
w2 = _local2;
_parent.exlevel++;
}
w1 = null;
w2 = null;
e1 = null;
e2 = null;
xd = 0;
yd = 0;
d = 0;
ym = 0;
health = 15;
hitTimer = 0;
mistarg = true;
_parent.playSound("jetfly");
side = Math.round(Math.random());
if (side == 0) {
_x = -50;
} else {
_x = 450;
}
_y = 100;
tx = (Math.random() * 300) + 50;
ty = (Math.random() * 150) + 100;
cx = tx;
cy = ty;
deg = 0;
movetimer = 200;
bursttimer = 70;
firetimer = 0;
_parent.targets.push(this);
onEnterFrame = function () {
if (_parent.paused) {
return(undefined);
}
doAI();
doMove();
doExhaust();
if (hitTimer > 0) {
if ((hitTimer % 2) == 0) {
hit.gotoAndStop(1);
} else {
hit.gotoAndStop(2);
}
hitTimer--;
} else {
hit.gotoAndStop(1);
}
};
Symbol 324 MovieClip [JG_BadBomber] Frame 1
_parent.targets.push(this);
if (Math.random() > 0.5) {
_x = -100;
xm = 3;
} else {
_x = 500;
xm = -3;
}
_y = -50;
mistarg = false;
_parent.playSound("bomberfly");
dropped = false;
life = 0;
firetimer = 0;
gun = true;
onEnterFrame = function () {
if (_parent.paused) {
return(undefined);
}
i = 1;
while (i <= 4) {
var _local3 = _parent.attachMovie("JG_Exhaust", "ex" + _parent.exlevel, _parent.exlevel);
_local3._x = ((_x + this["ex" + i]._x) + (Math.random() * 2)) - 1;
_local3._y = _y + this["ex" + i]._y;
_local3._xscale = (_local3._yscale = 90 + (Math.random() * 20));
xd = _local3._x - this["e" + i]._x;
yd = _local3._y - this["e" + i]._y;
d = Math.sqrt((xd * xd) + (yd * yd));
_local3._rotation = (Math.atan2(this["e" + i]._y - _local3._y, this["e" + i]._x - _local3._x) * 57.2957795130823) + 90;
this["e" + i] = _local3;
_parent.exlevel++;
i++;
}
var _local3 = _parent.attachMovie("JG_WingTrail", "ex" + _parent.exlevel, _parent.exlevel);
_local3._x = _x + wingtip1._x;
_local3._y = _y + wingtip1._y;
xd = _local3._x - w1._x;
yd = _local3._y - w1._y;
d = Math.sqrt((xd * xd) + (yd * yd));
_local3._height = d;
_local3._rotation = (Math.atan2(w1._y - _local3._y, w1._x - _local3._x) * 57.2957795130823) + 90;
w1 = _local3;
_parent.exlevel++;
_local3 = _parent.attachMovie("JG_WingTrail", "ex" + _parent.exlevel, _parent.exlevel);
_local3._x = _x + wingtip2._x;
_local3._y = _y + wingtip2._y;
xd = _local3._x - w2._x;
yd = _local3._y - w2._y;
d = Math.sqrt((xd * xd) + (yd * yd));
_local3._height = d;
_local3._rotation = (Math.atan2(w2._y - _local3._y, w2._x - _local3._x) * 57.2957795130823) + 90;
w2 = _local3;
_parent.exlevel++;
_x = (_x + xm);
_y = (_y + (0.5 + (Math.sin((_x * Math.PI) / 180) * 0.5)));
if ((((_x < -110) || (_x > 510)) || (_y < -110)) || (_y > 510)) {
i = 0;
while (i < _parent.targets.length) {
if (_parent.targets[i] == this) {
_parent.targets.splice(i, 1);
}
i++;
}
this.removeMovieClip();
}
if ((!dropped) && (Math.abs(_x - 200) < 10)) {
_local3 = _parent.attachMovie("JG_WeaponPowerup", "ex" + _parent.projlevel, _parent.projlevel);
_local3._x = _x;
_local3._y = _y + 40;
_parent.projlevel++;
dropped = true;
}
life++;
if (_parent.goodjet.alive) {
if ((life % 25) == 0) {
_local3 = _parent.attachMovie("JG_Bomb", "bomb" + _parent.projlevel, _parent.projlevel);
_local3._x = _x + bombbay._x;
_local3._y = _y + bombbay._y;
_parent.projlevel++;
}
i = 0;
while (i < 2) {
turret = this["turret" + i];
ang = (Math.atan2(_parent.goodjet._y - (_y + turret._y), _parent.goodjet._x - (_x + turret._x)) * 57.2957795130823) + 90;
if (turret._rotation < 0) {
tempRot = 360 + (turret._rotation % 360);
} else {
tempRot = turret._rotation % 360;
}
if (ang < 0) {
ang = ang + 360;
}
r = ang - (tempRot % 360);
if ((r < -180) || ((r < 180) && (r > 0))) {
turret._rotation = turret._rotation + 3;
} else {
turret._rotation = turret._rotation - 3;
}
i++;
}
if (firetimer == 0) {
g = null;
if (gun) {
g = turret0;
} else {
g = turret1;
}
gun = !gun;
_local3 = _parent.attachMovie("JG_FlakShell", "ex" + _parent.shotlevel, _parent.shotlevel);
_local3.tx = (_parent.goodjet._x + (Math.random() * 100)) - 50;
_local3.ty = (_parent.goodjet._y + (Math.random() * 100)) - 50;
_local3._x = _x + g._x;
_local3._y = _y + g._y;
_local3._rotation = (Math.atan2(_local3.ty - (_y + turret._y), _local3.tx - (_x + turret._x)) * 57.2957795130823) + 90;
_parent.shotlevel++;
firetimer = 30;
} else {
firetimer--;
}
}
};
Symbol 327 MovieClip [JG_DiffUp] Frame 1
life = 40;
onEnterFrame = function () {
if (_parent.paused) {
return(undefined);
}
life--;
if (life < 0) {
_visible = true;
_alpha = (_alpha - 10);
_x = (_x + ((Math.random() * 6) - 3));
_y = (_y + ((Math.random() * 6) - 3));
if (_alpha <= 0) {
this.removeMovieClip();
}
} else if ((Math.floor(_parent.gametime / 2) % 2) == 0) {
_visible = false;
} else {
_visible = true;
}
};
Symbol 332 MovieClip [JG_EggBomb] Frame 1
stop();
health = 1;
x = _x;
y = _y;
cx = _x;
cy = _y;
deg = (Math.random() * Math.PI) * 2;
mistarg = false;
_parent.targets.push(this);
onEnterFrame = function () {
if (_parent.paused) {
return(undefined);
}
xd = _x - _parent.goodjet._x;
yd = _y - _parent.goodjet._y;
dist = Math.sqrt((xd * xd) + (yd * yd));
if (_parent.goodjet.alive && ((dist < 40) || (health <= 0))) {
_parent.attachMovie("JG_BombDeath", "ex" + _parent.projlevel, _parent.projlevel);
var _local4 = _parent["ex" + _parent.projlevel];
_local4._x = _x;
_local4._y = _y;
_parent.projlevel++;
var _local3 = 0;
while (_local3 < 20) {
_parent.attachMovie("JG_BombSpark", "ex" + _parent.projlevel, _parent.projlevel);
_local4 = _parent["ex" + _parent.projlevel];
_local4._x = _x;
_local4._y = _y;
rot = Math.random() * 360;
_local4.xm = Math.sin((Math.PI/180) * rot);
_local4.ym = Math.cos((Math.PI/180) * rot);
_parent.projlevel++;
_local3++;
}
xd = _parent.goodjet._x - _x;
yd = _parent.goodjet._y - _y;
dist = Math.sqrt((xd * xd) + (yd * yd));
if (dist < 100) {
_parent.goodjet.hitTimer = 15;
_parent.goodjet.health = _parent.goodjet.health - (10 - Math.ceil(dist / 10));
}
_parent.screenshake();
_parent.screenflash();
_local3 = 0;
while (_local3 < _parent.targets.length) {
if (_parent.targets[_local3] == this) {
_parent.targets.splice(_local3, 1);
}
_local3++;
}
_parent.playExplosion();
this.removeMovieClip();
}
if (_y > 450) {
var _local3 = 0;
while (_local3 < _parent.targets.length) {
if (_parent.targets[_local3] == this) {
_parent.targets.splice(_local3, 1);
}
_local3++;
}
this.removeMovieClip();
}
y = y + 4;
if (_parent.godjet.alive) {
if (xd < -100) {
x = x + 3;
} else if (xd < -50) {
x = x + 1;
} else if (xd > 50) {
x = x - 1;
} else if (xd > 100) {
x = x - 3;
}
}
deg = deg + 0.20943951023932;
cx = x + (Math.sin(deg) * 20);
cy = y + (Math.cos(deg) * 10);
_x = (_x + ((cx - _x) / 10));
_y = (_y + ((cy - _y) / 10));
};
Symbol 335 MovieClip [JG_FlakShell] Frame 1
onEnterFrame = function () {
if (_parent.paused) {
return(undefined);
}
_x = (_x + (Math.sin((Math.PI/180) * _rotation) * 6));
_y = (_y - (Math.cos((Math.PI/180) * _rotation) * 6));
t = _parent.goodjet;
s = _parent.attachMovie("JG_FlakSmoke", "sm" + _parent.exlevel, _parent.exlevel);
s._x = (_x + (Math.random() * 6)) - 3;
s._y = (_y + (Math.random() * 6)) - 3;
_parent.exlevel++;
if ((Math.abs(_x - tx) < 10) && (Math.abs(_y - ty))) {
i = 0;
while (i < 4) {
_parent.attachMovie("JG_FlakDeath", "exp" + _parent.shotlevel, _parent.shotlevel);
clip = _parent["exp" + _parent.shotlevel];
clip._x = _x;
clip._y = _y;
clip._rotation = Math.random() * 360;
clip._xscale = (clip._yscale = (Math.random() * 50) + 100);
clip._alpha = (Math.random() * 50) + 50;
_parent.shotlevel++;
i++;
}
var i = 0;
while (i < 6) {
_parent.attachMovie("JG_BombSpark", "ex" + _parent.projlevel, _parent.projlevel);
clip = _parent["ex" + _parent.projlevel];
clip._x = _x;
clip._y = _y;
rot = Math.random() * 360;
clip.xm = Math.sin((Math.PI/180) * rot);
clip.ym = Math.cos((Math.PI/180) * rot);
_parent.projlevel++;
i++;
}
_parent.screenshake();
_parent.playExplosion();
xd = _x - _parent.goodjet._x;
yd = _y - _parent.goodjet._y;
dist = Math.sqrt((xd * xd) + (yd * yd));
if (dist < 50) {
t.hitTimer = 6;
t.health = t.health - 3;
}
this.removeMovieClip();
}
if ((((_y < -50) || (_y > 450)) || (_x < -50)) || (_x > 450)) {
this.removeMovieClip();
}
};
Symbol 338 MovieClip [JG_FlakSmoke] Frame 11
this.removeMovieClip();
Symbol 344 MovieClip [JG_FlakDeath] Frame 21
this.removeMovieClip();
Symbol 346 Button
on (release) {
_root.gotoAndPlay(2);
_root.preag.removeMovieClip();
_root.prebg.removeMovieClip();
}
Instance of Symbol 348 MovieClip in Symbol 349 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = (_rotation + 1);
}
Instance of Symbol 229 MovieClip in Symbol 351 MovieClip Frame 1
onClipEvent (load) {
_parent.playclip._alpha = 0;
_parent.playclip._visible = false;
}
onClipEvent (enterFrame) {
if (_root.prejet._x == undefined) {
_xscale = (_xscale + ((50 - _xscale) / 10));
_yscale = (_yscale + ((50 - _yscale) / 10));
_y = (_y + ((120 - _y) / 10));
_x = (200 - (_width / 2));
gotoAndStop (1);
_parent.playclip._visible = true;
_parent.playclip._alpha = _parent.playclip._alpha + ((100 - _parent.playclip._alpha) / 10);
}
}
Symbol 355 MovieClip Frame 1
swapDepths(1000);
onEnterFrame = function () {
if (_currentframe == 11) {
gotoAndPlay (2);
}
target = _root.prejet;
ang = (Math.atan2(target._y - _y, target._x - _x) * 57.2957795130823) + 90;
_rotation = ang;
_x = (_x + (Math.sin((Math.PI/180) * _rotation) * 20));
_y = (70 + (300 - (_root.loaded * 3)));
if (_root.loadingDone) {
_parent.attachMovie("JG_BombDeath", "ex" + _parent.exlevel, _parent.exlevel);
var _local5 = _parent["ex" + _parent.exlevel];
_local5._x = _x;
_local5._y = _y;
_parent.exlevel++;
var _local4 = 0;
while (_local4 < 20) {
_parent.attachMovie("JG_BombSpark", "ex" + _parent.exlevel, _parent.exlevel);
_local5 = _parent["ex" + _parent.exlevel];
_local5._x = _x;
_local5._y = _y;
rot = Math.random() * 360;
_local5.xm = Math.sin((Math.PI/180) * rot);
_local5.ym = Math.cos((Math.PI/180) * rot);
_parent.exlevel++;
_local4++;
}
_root.prejet.removeMovieClip();
this.removeMovieClip();
}
var _local5 = _parent.attachMovie("JG_Exhaust", "ex" + _parent.exlevel, _parent.exlevel);
_local5._x = _x - (Math.sin((Math.PI/180) * _rotation) * 25);
_local5._y = _y + (Math.cos((Math.PI/180) * _rotation) * 25);
_local5._xscale = 40 + (Math.random() * 20);
_local5._yscale = speed * 10;
xd = _local5._x - e1._x;
yd = _local5._y - e1._y;
d = Math.sqrt((xd * xd) + (yd * yd));
_local5._rotation = (Math.atan2(e1._y - _local5._y, e1._x - _local5._x) * 57.2957795130823) + 90;
e1 = _local5;
_parent.exlevel++;
};
gotoAndPlay (2);
Symbol 369 MovieClip Frame 1
stopAllSounds();
Symbol 370 Button
on (release) {
getURL ("http://www.armorgames.com", "blank");
}
Symbol 371 MovieClip Frame 140
_root.play();