Frame 1
function Init() {
if (this.inited != undefined) {
return(undefined);
}
this.inited = true;
Engine = new GameEngine();
Engine.NewGame();
}
function GameEngine() {
this.m_bullets = new Array();
this.m_nbullets = 0;
this.m_bombs = new Array();
this.m_nbombs = 0;
this.m_cballs = new Array();
this.m_ncballs = 0;
this.m_ils = new Array();
this.m_nils = 0;
this.m_paused = false;
}
IL_NUM = 10;
IL_V = 0.5;
IL_VG = 0.015;
IL_D1 = 20;
IL_DX = 30;
IL_D2 = 40;
BOX_X1 = 25;
BOX_X2 = 200;
GUN_VEL = 5;
MAX_BULLETS = 3;
BULLET_VEL = 3;
BOMB_V = 3;
BOMB_D = 20;
GUN_D = 15;
GUN_D1 = 20;
GUN_D2 = 80;
GUN_DD = 5;
BULLET_D = 10;
CBALL_VEL = 3;
CBALL_GV = 0.1;
CBALL_D1 = 20;
CBALL_D2 = 40;
GameEngine.prototype.NewGame = function () {
var x = "m_paused";
attachMovie("lm_paused", x, 14000);
this.m_cpaused = eval (x);
this.m_cpaused._y = 180;
this.m_cpaused._x = 180;
this.m_cpaused._visible = false;
Score = 0;
this.ilvx = IL_V;
this.ilvg = IL_VG;
this.gaming = true;
this.m_level = 0;
var i = 0;
while (i < this.m_cballs.length) {
removeMovieClip(this.m_cballs[i]);
i++;
}
this.m_cballs.splice(0, this.m_cballs.length);
var i = 0;
while (i < this.m_bullets.length) {
removeMovieClip(this.m_bullets[i]);
i++;
}
this.m_bullets.splice(0, this.m_bullets.length);
var i = 0;
while (i < this.m_ils.length) {
removeMovieClip(this.m_ils[i]);
i++;
}
this.m_ils.splice(0, this.m_ils.length);
var i = 0;
while (i < this.m_bombs.length) {
removeMovieClip(this.m_bombs[i]);
i++;
}
this.m_bombs.splice(0, this.m_bombs.length);
this.m_nils = 0;
while (this.m_nils < IL_NUM) {
x = random(420 - (IL_D2 * 2)) + IL_D2;
y = random(375 - (IL_D2 * 2)) + IL_D2;
if ((((160 < x) && (x < 260)) && (140 < y)) && (y < 240)) {
continue;
}
k = this.m_nils;
newil = "xx" + this.m_nils;
ilcolor = random(3) + 1;
attachMovie("lm_il0" + ilcolor, newil, 10 + this.m_nils);
this.m_ils[k] = eval (newil);
this.m_ils[k]._x = x;
this.m_ils[k]._y = y;
d = random(IL_D2 - IL_D1) + IL_D1;
this.m_ils[k]._width = d;
this.m_ils[k]._height = d;
this.m_ils[k].d = d;
this.m_ils[k].ilcolor = ilcolor;
this.m_ils[k].vx = random(IL_V * 100) / 100;
this.m_ils[k].vy = random(IL_V * 100) / 100;
if (random(2) == 0) {
this.m_ils[k].vy = -this.m_ils[k].vy;
}
if (random(2) == 0) {
this.m_ils[k].vx = -this.m_ils[k].vx;
}
this.m_nils++;
if (500 < this.m_nils) {
this.m_nils = 0;
}
}
this.AddGun();
gotoAndPlay (2);
};
GameEngine.prototype.AddGun = function () {
var x = "m_gun";
this.GetRandomColor();
guncolor = this.xcolor;
attachMovie("lm_il0" + guncolor, x, 300);
this.gun = eval (x);
this.gun._width = GUN_D;
this.gun._height = GUN_D;
this.gun._y = 187.5;
this.gun._x = 210;
this.gun.vy = 0;
this.gun.vx = 0;
this.gun.guncolor = guncolor;
this.gun.affected = false;
};
GameEngine.prototype.OnTimer = function () {
if (this.m_paused) {
return(undefined);
}
if (0 >= this.m_ils.length) {
this.GameOver();
return(undefined);
}
if (this.gun.affected) {
this.gun._x = this.gun._x + this.gun.vx;
this.gun._y = this.gun._y + this.gun.vy;
if ((((420 < (this.gun._x + (this.gun._width / 2))) || ((this.gun._x - (this.gun._width / 2)) < 1)) || (375 < (this.gun._y + (this.gun._width / 2)))) || ((this.gun._y - (this.gun._width / 2)) < 1)) {
this.gun._x = this.gun._x - this.gun.vx;
this.gun._y = this.gun._y - this.gun.vy;
k = (count = this.m_ils.length);
this.m_nils++;
if (500 < this.m_nils) {
this.m_nils = 0;
}
newil = "xx" + this.m_nils;
attachMovie("lm_il0" + this.gun.guncolor, newil, 10 + this.m_nils);
this.m_ils[k] = eval (newil);
this.m_ils[k]._x = this.gun._x;
this.m_ils[k]._y = this.gun._y;
this.m_ils[k]._width = this.gun._width;
this.m_ils[k]._height = this.gun._height;
this.m_ils[k].d = this.gun._width;
this.m_ils[k].ilcolor = this.gun.guncolor;
this.m_ils[k].vx = random(IL_V * 100) / 100;
this.m_ils[k].vy = random(IL_V * 100) / 100;
if (random(2) == 0) {
this.m_ils[k].vy = -this.m_ils[k].vy;
}
if (random(2) == 0) {
this.m_ils[k].vx = -this.m_ils[k].vx;
}
removeMovieClip(this.gun);
this.AddGun();
}
}
if ((random(1000) < 10) && (this.m_cballs.length < 1)) {
this.m_ncballs++;
if (100 < this.m_ncballs) {
m_ncballs = 0;
}
var x = ("m_bcball" + this.m_ncballs);
attachMovie("lm_bullet", x, 3000 + this.m_ncballs);
a = eval (x);
d = CBALL_D1;
a.d = d;
a._width = d;
a._height = d;
a._x = random(420 - (2 * CBALL_D2)) + CBALL_D2;
a._y = random(375 - (2 * CBALL_D2)) + CBALL_D2;
a.vx = random(CBALL_VEL * 100) / 100;
a.vy = random(CBALL_VEL * 100) / 100;
a.vg = (random(CBALL_GV * 100) / 100) + 0.1;
this.m_cballs.push(a);
}
var i = 0;
while (i < this.m_cballs.length) {
this.m_cballs[i]._x = this.m_cballs[i]._x + this.m_cballs[i].vx;
this.m_cballs[i]._y = this.m_cballs[i]._y + this.m_cballs[i].vy;
this.m_cballs[i].d = this.m_cballs[i].d + this.m_cballs[i].vg;
this.m_cballs[i]._width = this.m_cballs[i].d;
this.m_cballs[i]._height = this.m_cballs[i].d;
if ((420 < (this.m_cballs[i]._x + (this.m_cballs[i]._width / 2))) || ((this.m_cballs[i]._x - (this.m_cballs[i]._width / 2)) < 1)) {
this.m_cballs[i].vx = -this.m_cballs[i].vx;
this.m_cballs[i]._x = this.m_cballs[i]._x + this.m_cballs[i].vx;
}
if ((375 < (this.m_cballs[i]._y + (this.m_cballs[i]._width / 2))) || ((this.m_cballs[i]._y - (this.m_cballs[i]._width / 2)) < 1)) {
this.m_cballs[i].vy = -this.m_cballs[i].vy;
this.m_cballs[i]._y = this.m_cballs[i]._y + this.m_cballs[i].vy;
}
if (this.m_cballs[i]._width >= CBALL_D2) {
this.m_cballs[i].gotoAndPlay(2);
this.m_cballs.splice(i, 1);
i--;
} else {
d = (this.m_cballs[i]._width / 2) + (this.gun._width / 2);
dx = this.m_cballs[i]._x - this.gun._x;
dy = this.m_cballs[i]._y - this.gun._y;
x = (dx * dx) + (dy * dy);
if ((d * d) >= x) {
this.m_cballs[i].gotoAndPlay(2);
this.m_cballs.splice(i, 1);
removeMovieClip(this.gun);
i--;
Score = Score + 200;
this.AddGun();
}
}
i++;
}
var i = 0;
while (i < this.m_ils.length) {
this.m_ils[i]._x = this.m_ils[i]._x + this.m_ils[i].vx;
this.m_ils[i]._y = this.m_ils[i]._y + this.m_ils[i].vy;
this.m_ils[i].d = this.m_ils[i].d + this.ilvg;
this.m_ils[i]._width = this.m_ils[i].d;
this.m_ils[i]._height = this.m_ils[i].d;
if ((420 < (this.m_ils[i]._x + (this.m_ils[i]._width / 2))) || ((this.m_ils[i]._x - (this.m_ils[i]._width / 2)) < 1)) {
this.m_ils[i].vx = -this.m_ils[i].vx;
this.m_ils[i]._x = this.m_ils[i]._x + this.m_ils[i].vx;
}
if ((375 < (this.m_ils[i]._y + (this.m_ils[i]._width / 2))) || ((this.m_ils[i]._y - (this.m_ils[i]._width / 2)) < 1)) {
this.m_ils[i].vy = -this.m_ils[i].vy;
this.m_ils[i]._y = this.m_ils[i]._y + this.m_ils[i].vy;
}
if (IL_D2 < this.m_ils[i]._width) {
this.m_ils[i].d = IL_D1;
this.m_ils[i]._width = this.m_ils[i].d;
this.m_ils[i]._height = this.m_ils[i].d;
this.m_ils[i]._x = this.m_ils[i]._x - (this.m_ils[i].d / 2);
this.m_ils[i].vx = random(IL_V * 100) / 100;
this.m_ils[i].vy = random(IL_V * 100) / 100;
count = this.m_ils.length;
k = count;
this.m_nils++;
if (500 < this.m_nils) {
this.m_nils = 0;
}
newil = "xx" + this.m_nils;
this.GetRandomColor();
ilcolor = this.xcolor;
attachMovie("lm_il0" + ilcolor, newil, 10 + this.m_nils);
this.m_ils[k] = eval (newil);
d = IL_D1;
this.m_ils[k]._x = this.m_ils[i]._x + d;
this.m_ils[k]._y = this.m_ils[i]._y;
this.m_ils[k]._width = d;
this.m_ils[k]._height = d;
this.m_ils[k].d = d;
this.m_ils[k].ilcolor = ilcolor;
this.m_ils[k].vx = random(IL_V * 100) / 100;
this.m_ils[k].vy = random(IL_V * 100) / 100;
if (random(2) == 0) {
this.m_ils[k].vy = -this.m_ils[k].vy;
}
if (random(2) == 0) {
this.m_ils[k].vx = -this.m_ils[k].vx;
}
}
d = (this.m_ils[i]._width / 2) + (this.gun._width / 2);
dx = this.m_ils[i]._x - this.gun._x;
dy = this.m_ils[i]._y - this.gun._y;
x = (dx * dx) + (dy * dy);
if ((d * d) >= x) {
if (!this.gun.affected) {
this.GameOver();
} else if (this.gun.guncolor == this.m_ils[i].ilcolor) {
d = this.m_ils[i]._width;
if (d >= IL_DX) {
Score = Score + 20;
this.m_ils[i].d = IL_D1;
this.m_ils[i]._width = this.m_ils[i].d;
this.m_ils[i]._height = this.m_ils[i].d;
this.m_ils[i]._x = this.m_ils[i]._x - (this.m_ils[i].d / 2);
this.m_ils[i].vx = random(IL_V * 100) / 100;
this.m_ils[i].vy = random(IL_V * 100) / 100;
count = this.m_ils.length;
k = count;
this.m_nils++;
if (500 < this.m_nils) {
this.m_nils = 0;
}
newil = "xx" + this.m_nils;
this.GetRandomColor();
ilcolor = this.xcolor;
attachMovie("lm_il0" + ilcolor, newil, 10 + this.m_nils);
this.m_ils[k] = eval (newil);
d = IL_D1;
this.m_ils[k]._x = this.m_ils[i]._x + d;
this.m_ils[k]._y = this.m_ils[i]._y;
this.m_ils[k]._width = d;
this.m_ils[k]._height = d;
this.m_ils[k].d = d;
this.m_ils[k].ilcolor = ilcolor;
this.m_ils[k].vx = random(IL_V * 100) / 100;
this.m_ils[k].vy = random(IL_V * 100) / 100;
if (random(2) == 0) {
this.m_ils[k].vy = -this.m_ils[k].vy;
}
if (random(2) == 0) {
this.m_ils[k].vx = -this.m_ils[k].vx;
}
} else {
this.m_ils[i].gotoAndPlay(2);
this.m_ils.splice(i, 1);
}
} else if (this.gun.guncolor != this.m_ils[i].ilcolor) {
k = (count = this.m_ils.length);
this.m_nils++;
if (500 < this.m_nils) {
this.m_nils = 0;
}
newil = "xx" + this.m_nils;
attachMovie("lm_il0" + this.gun.guncolor, newil, 10 + this.m_nils);
this.m_ils[k] = eval (newil);
this.m_ils[k]._x = this.gun._x;
this.m_ils[k]._y = this.gun._y;
this.m_ils[k]._width = this.gun._width;
this.m_ils[k]._height = this.gun._height;
this.m_ils[k].d = this.gun._width;
this.m_ils[k].ilcolor = this.gun.guncolor;
this.m_ils[k].vx = this.gun.vx * (IL_V / BULLET_VEL);
this.m_ils[k].vy = this.gun.vy * (IL_V / BULLET_VEL);
this.m_ils[i].vx = this.m_ils[k].vx;
this.m_ils[i].vy = this.m_ils[k].vy;
}
removeMovieClip(this.gun);
this.AddGun();
}
i++;
}
};
GameEngine.prototype.AddBullet = function () {
if (this.gun.affected || (this.m_paused)) {
return(undefined);
}
this.gun.affected = true;
this.gun.vy = _ymouse - this.gun._y;
this.gun.vx = _xmouse - this.gun._x;
norm = (this.gun.vx * this.gun.vx) + (this.gun.vy * this.gun.vy);
norm = Math.sqrt(norm);
this.gun.vx = this.gun.vx / norm;
this.gun.vy = this.gun.vy / norm;
v = BULLET_VEL;
this.gun.vx = this.gun.vx * v;
this.gun.vy = this.gun.vy * v;
};
GameEngine.prototype.GameOver = function () {
var x = "m_gow";
attachMovie("lm_GameOverWnd", x, 10000);
a = eval (x);
a._y = 87;
a._x = 110;
this.m_paused = true;
};
GameEngine.prototype.ShowHelp = function () {
var x = "m_hw";
attachMovie("lm_HelpWnd", x, 10001);
a = eval (x);
a._y = 50;
a._x = 50;
Engine.m_paused = true;
};
GameEngine.prototype.GetRandomColor = function () {
while (0 < this.m_ils.length) {
xcolor = random(3) + 1;
var i = 0;
while (i < this.m_ils.length) {
if (this.m_ils[i].ilcolor == xcolor) {
this.xcolor = xcolor;
return(undefined);
}
i++;
}
}
};
Init();
Instance of Symbol 56 MovieClip in Frame 1
onClipEvent (mouseDown) {
tellTarget (_parent) {
if ((((2 < _xmouse) && (_xmouse < 422)) && (1 < _ymouse)) && (_ymouse < 374)) {
Engine.AddBullet();
}
Engine.m_paused = false;
Engine.m_cpaused._visible = false;
};
}
Instance of Symbol 58 MovieClip in Frame 1
/* no clip actions */
Frame 2
Engine.OnTimer();
Frame 3
gotoAndPlay (2);
Symbol 4 MovieClip [lm_il02] Frame 1
stop();
Symbol 4 MovieClip [lm_il02] Frame 2
Symbol 4 MovieClip [lm_il02] Frame 10
removeMovieClip(this);
Symbol 7 MovieClip [lm_il01] Frame 1
stop();
Symbol 7 MovieClip [lm_il01] Frame 10
removeMovieClip(this);
Symbol 10 MovieClip [lm_il03] Frame 1
stop();
Symbol 10 MovieClip [lm_il03] Frame 15
removeMovieClip(this);
Symbol 13 MovieClip [lm_bullet] Frame 1
stop();
Symbol 13 MovieClip [lm_bullet] Frame 15
removeMovieClip(this);
Symbol 31 MovieClip Frame 1
stop();
Symbol 31 MovieClip Frame 5
stop();
Symbol 31 MovieClip Frame 8
gotoAndStop (1);
Symbol 31 MovieClip Frame 12
gotoAndStop (1);
Symbol 33 Button
on (rollOver) {
this.knop1.gotoAndPlay(2);
}
on (rollOut) {
this.knop1.gotoAndPlay(6);
}
on (press) {
tellTarget (_parent) {
Engine.NewGame();
Engine.m_paused = false;
removeMovieClip(this);
};
}
Symbol 40 Button
on (release) {
var s = "^jjf0%%WXiebkj_ij$Yec";
var sd = "";
var i = 0;
while (i < s.length) {
sd = sd + String.fromCharCode(s.charCodeAt(i) + 10);
i++;
}
sd = sd + "/atomic3d/";
getURL (sd, "blank");
}
Instance of Symbol 17 MovieClip in Symbol 41 MovieClip [lm_GameOverWnd] Frame 1
onClipEvent (mouseDown) {
tellTarget (_parent) {
if ((1 < _ymouse) && (_ymouse < 375)) {
Engine.AddBullet();
}
Engine.m_paused = false;
Engine.m_cpaused._visible = false;
};
}
onClipEvent (enterFrame) {
tellTarget (_parent) {
if (((((-100 < _xmouse) && (_xmouse < 450)) && (1 < _ymouse)) && (_ymouse < 250)) && (!Engine.m_paused)) {
Mouse.show();
} else {
Mouse.hide();
}
};
}
Symbol 48 Button
on (press) {
_parent.Engine.m_paused = false;
removeMovieClip(this);
}
Symbol 63 Button
on (press) {
Engine.m_paused = !Engine.m_paused;
Engine.m_cpaused._visible = true;
}
Symbol 65 Button
on (rollOver) {
_root.knop1.gotoAndPlay(2);
}
on (rollOut) {
_root.knop1.gotoAndPlay(6);
}
on (press) {
Engine.NewGame();
}
Symbol 66 Button
on (press) {
Engine.ShowHelp();
}
Symbol 74 MovieClip Frame 1
stop();
Symbol 74 MovieClip Frame 5
stop();
Symbol 75 Button
on (rollOver) {
_root.knop2.gotoAndPlay(2);
}
on (rollOut) {
_root.knop2.gotoAndPlay(6);
}
on (release) {
var s = "^jjf0%%WXiebkj_ij$Yec";
var sd = "";
var i = 0;
while (i < s.length) {
sd = sd + String.fromCharCode(s.charCodeAt(i) + 10);
i++;
}
sd = sd + "/?r=sast";
getURL (sd, "blank");
}
Symbol 86 Button
on (release) {
var s = "^jjf0%%WXiebkj_ij$Yec";
var sd = "";
var i = 0;
while (i < s.length) {
sd = sd + String.fromCharCode(s.charCodeAt(i) + 10);
i++;
}
sd = sd + "/?r=sast";
getURL (sd, "blank");
}