Frame 1
if (_framesloaded >= _totalframes) {
gotoAndPlay (4);
} else {
count = _totalframes / "100";
loading = int(_framesloaded / count) add "%";
}
Frame 3
gotoAndPlay (1);
Frame 4
highscore = "1000";
Frame 6
gotoAndStop (5);
Frame 7
level = "1";
call("setlevels");
toplevel = "5";
totwep = "2";
mothercount = "500";
totbul = "5";
score = "0";
lives = "2";
shotmother1 = "1000";
shotmother2 = "1000";
shotmother3 = "1000";
shotmother4 = "2500";
shotmother5 = "2500";
shotmother6 = "5000";
bullscore = "25";
alienscr0 = "400";
alienscr1 = "300";
alienscr2 = "200";
alienscr3 = "100";
alienscr4 = "50";
wepoffx = "4";
wepoffy = "4";
alienoffx = "7";
alienoffy = "5";
shieldoffx = "22";
shieldoffy = "12";
bulloffx = "4";
bulloffy = "8";
shipoffx = "10";
shipy = "38";
xlf = "0";
levelinc = "0";
shieldfill = "200";
shieldo1 = "8";
shieldo2 = "25";
shieldo3 = "42";
shieldyo = "31";
motheroffx = "16";
motheroffy = "5";
motherinit = "100";
launch = "37";
Frame 8
call("setparameters");
quiet = "0";
quiettop = "25";
bulexpn = "1";
alientots = "0";
aliencount = "40";
dalienx = "1";
dalieny = "0";
shipx = "27";
alienfire = "0";
curwep = "1";
shieldlay = "10";
countdown = (motherinit + random(mothercount)) + "1";
motherflag = "0";
fired = "0";
fire = "0";
life = "0";
alienc = "1";
count = "0";
while (count < "5") {
ink = "0";
y = toplevel + (count * "4");
while (ink < "8") {
x = "10" + (ink * "5");
Set("alienx" add alienc, x);
Set("alieny" add alienc, y);
duplicateMovieClip ("/alien" add count, "aliens" add alienc, "200" + alienc);
setProperty("aliens" add alienc, _x , (x * "4") + alienoffx);
setProperty("aliens" add alienc, _y , (y * "4") + alienoffy);
Set((x add "adm") add y, alienc);
Set(((x + "1") add "adm") add y, alienc);
Set(((x + "2") add "adm") add y, alienc);
alienc = alienc + "1";
ink = ink + "1";
}
count = count + "1";
}
alienc = "1";
count = "0";
while (count < "5") {
ink = "0";
while (ink < "8") {
Set("alienp" add alienc, eval ("alienscr" add count));
alienc = alienc + "1";
ink = ink + "1";
}
count = count + "1";
}
smooth = (shipx * "4") - (shipoffx * "2");
duplicateMovieClip ("/shipa", "ship", "165");
setProperty("/ship", _x , (shipx * "4") - shipoffx);
setProperty("/ship", _y , ("39" * "4") + "4");
countlives = "1";
while (countlives < "4") {
duplicateMovieClip ("/lives", "lives" add countlives, "166" + countlives);
setProperty("lives" add countlives, _x , "246" - (countlives * "14"));
setProperty("lives" add countlives, _y , "5");
if (lives >= countlives) {
setProperty("lives" add countlives, _alpha , "100");
} else {
setProperty("lives" add countlives, _alpha , "30");
}
countlives = countlives + "1";
}
count = "1";
while (totwep >= count) {
Set("wepx" add count, "0");
Set("wepy" add count, "0");
count = count + "1";
}
shieldc = "1";
while (shieldc < "4") {
shieldy = "0";
shieldo = eval ("shieldo" add shieldc);
while (shieldy < "6") {
shieldx = "0";
while (shieldx < "10") {
Set(((shieldo + shieldx) add "dm") add (shieldy + shieldyo), shieldfill);
shieldx = shieldx + "1";
}
shieldy = shieldy + "2";
}
Set((shieldo add "dm") add shieldyo, "0");
Set(((shieldo + "9") add "dm") add shieldyo, "0");
Set(((shieldo + "2") add "dm") add (shieldyo + "4"), "0");
Set(((shieldo + "3") add "dm") add (shieldyo + "4"), "0");
Set(((shieldo + "4") add "dm") add (shieldyo + "4"), "0");
Set(((shieldo + "5") add "dm") add (shieldyo + "4"), "0");
Set(((shieldo + "6") add "dm") add (shieldyo + "4"), "0");
Set(((shieldo + "7") add "dm") add (shieldyo + "4"), "0");
duplicateMovieClip ("/shield", "shield" add shieldc, shieldc);
setProperty("shield" add shieldc, _x , (shieldo * "4") + shieldoffx);
setProperty("shield" add shieldc, _y , (shieldyo * "4") + shieldoffy);
setProperty("shield" add shieldc, _alpha , "100");
shieldc = shieldc + "1";
}
county = "0";
count = "1";
while (totbul >= count) {
x = (shipx - "1") + count;
y = shipy + "1";
duplicateMovieClip ("/bullet", "bullet" add count, count + "148");
setProperty("/bullet" add count, _x , (x * "4") + bulloffx);
setProperty("/bullet" add count, _y , (y * "4") + bulloffy);
Set("bullx" add count, x);
Set("bully" add count, y);
count = count + "1";
}
Frame 9
if (alientots < "40") {
if (aliencount == "0") {
call("direction");
}
while (eval ("alienp" add aliencount) == "0") {
aliencount = aliencount - "1";
if (aliencount == "0") {
call("direction");
}
}
x = eval ("alienx" add aliencount);
y = eval ("alieny" add aliencount);
if ("0" < dalieny) {
Set((x add "adm") add y, "0");
Set(((x + "1") add "adm") add y, "0");
Set(((x + "2") add "adm") add y, "0");
y = y + "2";
if (y == "39") {
gotoAndPlay (29);
}
Set((x add "adm") add y, aliencount);
Set(((x + "1") add "adm") add y, aliencount);
Set(((x + "2") add "adm") add y, aliencount);
setProperty("/aliens" add aliencount, _y , (y * "4") + alienoffy);
Set("alieny" add aliencount, y);
} else if ("0" < dalienx) {
Set((x add "adm") add y, "0");
x = x + "1";
Set(((x + "2") add "adm") add y, aliencount);
if ("54" < x) {
aliends = "1";
}
setProperty("/aliens" add aliencount, _x , (x * "4") + alienoffx);
Set("alienx" add aliencount, x);
} else if (dalienx < "0") {
Set(((x + "2") add "adm") add y, "0");
x = x - "1";
Set((x add "adm") add y, aliencount);
if (x < "2") {
aliends = "1";
}
setProperty("/aliens" add aliencount, _x , (x * "4") + alienoffx);
Set("alienx" add aliencount, x);
}
aliencount = aliencount - "1";
}
startDrag ("/mouse", true);
count = "1";
while (totwep >= count) {
y = eval ("wepy" add count);
if ("0" < y) {
x = eval ("wepx" add count);
y = y + "2";
if ((((y == "41") and (life == "0")) and (x >= shipx)) and ((shipx + "4") >= x)) {
life = "220";
nowep = "30";
}
if (y < "43") {
call("wepdown");
} else {
Set((x add "am") add (y - "2"), "0");
removeMovieClip("wep" add count);
duplicateMovieClip ("/wepexp", "wep" add count, "153" + count);
setProperty("wep" add count, _x , (x * "4") + wepoffx);
setProperty("wep" add count, _y , (y * "4") + wepoffy);
setProperty("wep" add count, _alpha , "100");
alienfire = alienfire - "1";
Set("wepy" add count, "0");
}
}
count = count + "1";
}
if (nowep == "0") {
if (eval ("wepy" add curwep) == "0") {
d = "1" + int(random("40"));
if ("0" < eval ("alienp" add d)) {
x = eval ("alienx" add d) + "1";
y = (int(eval ("alieny" add d) / "2") * "2") - "1";
Set("wepx" add curwep, x);
Set("wepy" add curwep, y);
Set((x add "am") add y, "53" + curwep);
removeMovieClip("wep" add curwep);
duplicateMovieClip ("/wep", "wep" add curwep, "153" + curwep);
alienfire = alienfire + "1";
setProperty("wep" add curwep, _x , (x * "4") + wepoffx);
setProperty("wep" add curwep, _y , ((y * "4") + "4") + wepoffy);
setProperty("wep" add curwep, _alpha , "100");
curwep = curwep + "1";
if (totwep < curwep) {
curwep = "1";
}
}
}
} else {
nowep = nowep - "1";
}
countdown = countdown - "1";
if ((countdown == "0") and (alientots < "40")) {
motherflag = "1";
mothershipx = "-3";
countdown = (motherinit + random(mothercount)) + "1";
duplicateMovieClip ("/mothership", "mothergo", "164");
setProperty("mothergo", _alpha , "100");
setProperty("mothergo", _x , (mothershipx * "4") + motheroffx);
setProperty("mothergo", _y , ("3" * "4") + motheroffy);
} else if (motherflag == "1") {
mothershipx = mothershipx + "1";
setProperty("mothergo", _x , (mothershipx * "4") + motheroffx);
if ("90" < mothershipx) {
motherflag = "0";
removeMovieClip("mothergo");
}
}
if ("0" < prizeflag) {
prizeflag = prizeflag - "1";
if (prizeflag == "0") {
removeMovieClip("prizedisplay");
}
}
if (((fired == "1") and (life == "0")) and (quiet == "0")) {
call("firepressed");
}
count = "1";
while (totbul >= count) {
y = eval ("bully" add count);
if (y < "38") {
x = eval ("bullx" add count);
call("bulletup");
} else {
call("bulletbase");
}
count = count + "1";
}
if (lives == (-"1")) {
if (life == "0") {
gotoAndPlay (29);
}
}
if (alientots == "40") {
if (((((motherflag == "0") and (fire == "0")) and (prizeflag == "0")) and (alienfire == "0")) and (life == "0")) {
if (quiet < quiettop) {
quiet = quiet + "1";
} else {
gotoAndPlay (25);
}
}
}
Frame 10
gotoAndPlay (9);
stopDrag();
x = getProperty("mouse", _x);
y = getProperty("mouse", _y);
if ("240" < x) {
x = "240";
}
if (x < "4") {
x = "4";
}
d = (x - shipoffx) / "4";
setProperty("/ship", _x , x);
shipx = int(d);
smooth = x - shipoffx;
if ("0" < life) {
life = life - "10";
if ("0" < life) {
setProperty("/ship", _xscale , life + "100");
} else {
setProperty("/ship", _xscale , "100");
setProperty("lives" add lives, _alpha , "30");
lives = lives - "1";
}
}
if (xlf == "0") {
if ("50000" < score) {
xlf = "1";
lives = lives + "1";
setProperty("lives" add lives, _alpha , "100");
}
}
Frame 11
y = y - "2";
if (y < "0") {
call("clearbullet");
} else {
d = eval ((x add "adm") add (y + "2"));
e = eval ((x add "am") add (y + "2"));
f = eval ((x add "am") add (y + "4"));
she = eval ((x add "dm") add y);
if (("0" < d) and (d < "49")) {
call("killalien");
} else if (("53" < e) and (e < "64")) {
call("killweapon");
} else if (("53" < f) and (f < "64")) {
call("killweapon");
} else if ("0" < she) {
call("killbase");
} else if ((((y == "3") and (motherflag == "1")) and (x >= mothershipx)) and ((mothershipx + "4") >= x)) {
call("shotmother");
} else {
setProperty("/bullet" add count, _y , (y * "4") + bulloffy);
Set("bully" add count, y);
}
}
Frame 12
x = (-"1") + count;
setProperty("/bullet" add count, _x , (((x * "4") + smooth) + "2") + bulloffs);
Set("bullx" add count, x + shipx);
Frame 13
fired = "0";
if (fire < totbul) {
fire = fire + "1";
if ("37" < bully1) {
bullx1 = shipx + "2";
setProperty("/bullet1", _x , (bullx1 * "4") + bulloffx);
bully1 = launch;
} else if ("37" < bully2) {
bullx2 = shipx + "2";
setProperty("/bullet2", _x , (bullx2 * "4") + bulloffx);
bully2 = launch;
} else if ("37" < bully3) {
bullx3 = shipx + "2";
setProperty("/bullet3", _x , (bullx3 * "4") + bulloffx);
bully3 = launch;
} else if ("37" < bully4) {
bullx4 = shipx + "2";
setProperty("/bullet4", _x , (bullx4 * "4") + bulloffx);
bully4 = launch;
} else if ("37" < bully5) {
bullx5 = shipx + "2";
setProperty("/bullet5", _x , (bullx5 * "4") + bulloffx);
bully5 = launch;
}
}
Frame 14
aliencount = "40";
if ("0" < dalieny) {
dalieny = "0";
} else if ("0" < aliends) {
aliends = "0";
if ("0" < dalienx) {
dalienx = -"1";
dalieny = "1";
} else if (dalienx < "0") {
dalienx = "1";
dalieny = "1";
}
}
Frame 15
y = "39";
x = (-"1") + count;
fire = fire - "1";
Set("bullx" add count, shipx + x);
Set("bully" add count, y);
setProperty("/bullet" add count, _x , (((x * "4") + smooth) + "2") + bulloffs);
setProperty("/bullet" add count, _y , (y * "4") + bulloffy);
Frame 16
score = score + eval ("alienp" add d);
alientots = alientots + "1";
Set("alienp" add d, "0");
x1 = eval ("alienx" add d);
y1 = eval ("alieny" add d);
Set((x1 add "adm") add y1, "0");
Set((("1" + x1) add "adm") add y1, "0");
Set((("2" + x1) add "adm") add y1, "0");
Set((x1 add "adm") add (y1 + "1"), "0");
Set((("1" + x1) add "adm") add (y1 + "1"), "0");
Set((("2" + x1) add "adm") add (y1 + "1"), "0");
removeMovieClip("aliens" add d);
duplicateMovieClip ("/alienexp", "aliens" add d, "200" + d);
setProperty("aliens" add d, _alpha , "100");
setProperty("aliens" add d, _x , (x1 * "4") + alienoffx);
setProperty("aliens" add d, _y , (y1 * "4") + alienoffy);
setProperty("aliens" add d, _rotation , "1" + int(random("360")));
call("clearbullet");
Frame 17
setProperty("wep" add count, _y , (y * "4") + wepoffy);
x = eval ("wepx" add count);
Set((x add "am") add (y - "2"), "0");
Set("wepy" add count, y);
Set((x add "am") add y, "53" + count);
she = eval ((x add "dm") add y);
if ("0" < she) {
call("weaponshield");
}
Frame 18
if ("0" < f) {
e = f - "53";
} else {
e = e - "53";
}
x2 = eval ("wepx" add e);
y2 = eval ("wepy" add e);
Set((x2 add "am") add y2, "0");
Set("wepy" add e, "0");
removeMovieClip("wep" add e);
duplicateMovieClip ("/wepexp", "wep" add e, "153" + e);
setProperty("wep" add e, _x , (x2 * "4") + wepoffx);
setProperty("wep" add e, _y , (y2 * "4") + wepoffy);
setProperty("wep" add e, _alpha , "100");
alienfire = alienfire - "1";
e = f;
score = score + bullscore;
call("clearbullet");
Frame 19
if (she == "200") {
duplicateMovieClip ("/shieldcov", "shieldcov" add shieldlay, shieldlay);
setProperty("shieldcov" add shieldlay, _x , (x * "4") + "4");
setProperty("shieldcov" add shieldlay, _y , (y * "4") + "4");
Set((x add "dm") add y, shieldlay);
setProperty("shieldcov" add shieldlay, _alpha , shieldred);
Set((x add "alp") add y, shieldred);
Set((x add "am") add y, "0");
Set("wepy" add count, "0");
removeMovieClip("wep" add count);
duplicateMovieClip ("/wepexp", "wep" add count, "153" + count);
setProperty("wep" add count, _x , (x * "4") + wepoffx);
setProperty("wep" add count, _y , (y * "4") + wepoffy);
setProperty("wep" add count, _alpha , "100");
alienfire = alienfire - "1";
shieldlay = shieldlay + "1";
} else {
alp = eval ((x add "alp") add y) + shieldred;
if (alp < "75") {
setProperty("shieldcov" add she, _alpha , alp);
Set((x add "alp") add y, alp);
Set((x add "am") add y, "0");
Set("wepy" add count, "0");
removeMovieClip("wep" add count);
duplicateMovieClip ("/wepexp", "wep" add count, "153" + count);
setProperty("wep" add count, _x , (x * "4") + wepoffx);
setProperty("wep" add count, _y , (y * "4") + wepoffy);
setProperty("wep" add count, _alpha , "100");
alienfire = alienfire - "1";
} else {
setProperty("shieldcov" add she, _alpha , "100");
Set((x add "dm") add y, "0");
Set((x add "am") add y, "0");
Set("wepy" add count, "0");
removeMovieClip("wep" add count);
duplicateMovieClip ("/wepexp", "wep" add count, "153" + count);
setProperty("wep" add count, _x , (x * "4") + wepoffx);
setProperty("wep" add count, _y , (y * "4") + wepoffy);
setProperty("wep" add count, _alpha , "100");
alienfire = alienfire - "1";
}
}
Frame 20
if (she == "200") {
duplicateMovieClip ("/shieldcov", "shieldcov" add shieldlay, shieldlay);
setProperty("shieldcov" add shieldlay, _x , (x * "4") + "4");
setProperty("shieldcov" add shieldlay, _y , (y * "4") + "4");
Set((x add "dm") add y, shieldlay);
setProperty("shieldcov" add shieldlay, _alpha , shieldred);
Set((x add "alp") add y, shieldred);
shieldlay = shieldlay + "1";
call("bulexp");
call("clearbullet");
} else {
alp = eval ((x add "alp") add y) + shieldred;
if (alp < "75") {
setProperty("shieldcov" add she, _alpha , alp);
Set((x add "alp") add y, alp);
call("bulexp");
call("clearbullet");
} else {
setProperty("shieldcov" add she, _alpha , "100");
Set((x add "dm") add y, "0");
call("bulexp");
call("clearbullet");
}
}
Frame 21
removeMovieClip("mothergo");
prize = eval ("shotmother" add ("1" + random("6")));
duplicateMovieClip ("/prize" add prize, "prizedisplay", "166");
setProperty("prizedisplay", _alpha , "100");
setProperty("prizedisplay", _x , (mothershipx * "4") + motheroffx);
setProperty("prizedisplay", _y , ("3" * "4") + motheroffy);
score = score + prize;
motherflag = "0";
prizeflag = "35";
call("clearbullet");
Frame 22
count = "1";
while ("5" >= count) {
removeMovieClip("bullet" add count);
count = count + "1";
}
count = "1";
while ("5" >= count) {
removeMovieClip("bulexp" add count);
count = count + "1";
}
count = "1";
while ("40" >= count) {
removeMovieClip("aliens" add count);
count = count + "1";
}
count = "1";
while ("90" >= count) {
removeMovieClip("shieldcov" add count);
count = count + "1";
}
count = "1";
while ("3" >= count) {
removeMovieClip("shield" add count);
count = count + "1";
}
removeMovieClip("ship");
count = "1";
while ("5" >= count) {
removeMovieClip("lives" add count);
count = count + "1";
}
count = "1";
while ("10" >= count) {
removeMovieClip("wep" add count);
count = count + "1";
}
removeMovieClip("mothergo");
removeMovieClip("prizedisplay");
county = "1";
while (county < "40") {
countx = "0";
while (countx < "60") {
Set((countx add "adm") add county, "0");
Set((countx add "ad") add county, "0");
Set((countx add "am") add county, "0");
countx = countx + "1";
}
county = county + "2";
}
Frame 23
toplevel1 = "5";
totwep1 = "3";
mothercount1 = "1000";
totbul1 = "5";
bulloffs1 = "0";
shieldred1 = "15";
toplevel2 = "7";
totwep2 = "3";
mothercount2 = "800";
totbul2 = "5";
bulloffs2 = "0";
shieldred2 = "20";
toplevel3 = "9";
totwep3 = "4";
mothercount3 = "600";
totbul3 = "5";
bulloffs3 = "0";
shieldred3 = "25";
toplevel4 = "11";
totwep4 = "5";
mothercount4 = "400";
totbul4 = "5";
bulloffs4 = "0";
shieldred4 = "30";
toplevel5 = "5";
totwep5 = "6";
mothercount5 = "300";
totbul5 = "3";
bulloffs5 = "4";
shieldred5 = "35";
toplevel6 = "7";
totwep6 = "7";
mothercount6 = "200";
totbul6 = "3";
bulloffs6 = "4";
shieldred6 = "35";
toplevel7 = "9";
totwep7 = "8";
mothercount7 = "100";
totbul7 = "3";
bulloffs7 = "4";
shieldred7 = "50";
toplevel8 = "11";
totwep8 = "9";
mothercount8 = "50";
totbul8 = "1";
bulloffs8 = "8";
shieldred8 = "50";
toplevel9 = "13";
totwep9 = "10";
mothercount9 = "1";
totbul9 = "1";
bulloffs9 = "8";
shieldred9 = "50";
Frame 24
toplevel = eval ("toplevel" add level);
totwep = eval ("totwep" add level);
mothercount = eval ("mothercount" add level);
totbul = eval ("totbul" add level);
bulloffs = eval ("bulloffs" add level);
shieldred = eval ("shieldred" add level);
levelinc = levelinc + "1";
Frame 26
call("clearall");
level = level + "1";
if (level == "10") {
level = "1";
}
Frame 28
gotoAndStop (27);
Frame 30
call("clearall");
scdis = score;
if (highscore < score) {
highscore = score;
}
Frame 32
gotoAndStop (31);
Frame 34
gotoAndStop (33);
Frame 35
removeMovieClip("bulexp" add bulexpn);
duplicateMovieClip ("/bulexp", "bulexp" add bulexpn, "300" + bulexpn);
setProperty("bulexp" add bulexpn, _alpha , "100");
setProperty("bulexp" add bulexpn, _x , ((x * "4") + "2") + random(bulloffx));
setProperty("bulexp" add bulexpn, _y , (y * "4") + random(bulloffy));
setProperty("bulexp" add bulexpn, _rotation , "1" + int(random("360")));
if (bulexpn == "5") {
bulexpn = "1";
} else {
bulexpn = bulexpn + "1";
}
Symbol 5 Button
on (press) {
gotoAndPlay (7);
}
Symbol 7 MovieClip Frame 11
gotoAndStop (10);
Symbol 30 Button
on (press) {
toggleHighQuality();
}
Symbol 43 MovieClip Frame 21
gotoAndStop (20);
Symbol 44 MovieClip Frame 16
gotoAndStop (15);
Symbol 46 MovieClip Frame 9
gotoAndStop (7);
Symbol 47 MovieClip Frame 6
gotoAndStop (5);
Symbol 48 MovieClip Frame 4
gotoAndStop (3);
Symbol 51 MovieClip Frame 12
stop();
Symbol 52 Button
on (press) {
fired = "1";
}
on (release) {
fired = "0";
}
on (releaseOutside) {
fired = "0";
}
Symbol 54 MovieClip Frame 60
stop();
Symbol 62 MovieClip Frame 5
gotoAndStop (4);
Symbol 73 Button
on (press) {
gotoAndPlay (33);
}
Symbol 77 Button
on (release) {
gotoAndPlay (29);
}
Symbol 79 MovieClip Frame 11
stop();
Symbol 82 MovieClip Frame 7
stop();
Symbol 83 Button
on (press) {
gotoAndPlay (8);
}
Symbol 87 Button
on (press) {
gotoAndPlay (5);
}
Symbol 91 Button
on (press) {
gotoAndPlay (9);
}
Symbol 93 MovieClip Frame 11
gotoAndStop (10);