Frame 2
function DispatchGameData() {
var _local1 = _root;
_local1.score = _local1.gameSCORE + 969696;
this.loadVariables((_local1.dir + "game_record.") + _local1.scripttype, "POST");
}
this.stop();
var score = 0;
var shotSound = new Sound();
shotSound.attachSound("shoot.wav");
shotSound.setVolume(100);
Instance of Symbol 74 MovieClip in Frame 2
onClipEvent (load) {
this.swapDepths(50000);
}
onClipEvent (enterFrame) {
if (_root.gameLEVEL > 0) {
this.score = "SCORE : " + _root.gameSCORE;
this.level = "LEVEL : " + _root.gameLEVEL;
} else {
this.level = "";
this.score = "";
}
}
Instance of Symbol 86 MovieClip "gameMegMC" in Frame 2
onClipEvent (load) {
this.swapDepths(50001);
_root.galagaMC.gameSetup();
}
Symbol 13 MovieClip [playMC1] Frame 1
this.stop();
this.box._visible = false;
Symbol 13 MovieClip [playMC1] Frame 2
this.stop();
Symbol 13 MovieClip [playMC1] Frame 3
this.stop();
Symbol 13 MovieClip [playMC1] Frame 15
this._visible = false;
this.stop();
Symbol 21 MovieClip [bugMC1] Frame 1
this.stop();
this.box._visible = false;
Symbol 21 MovieClip [bugMC1] Frame 2
this.stop();
Symbol 21 MovieClip [bugMC1] Frame 12
this.removeMovieClip();
Symbol 26 MovieClip [bugMC4] Frame 1
this.stop();
this.box._visible = false;
Symbol 26 MovieClip [bugMC4] Frame 2
this.stop();
Symbol 26 MovieClip [bugMC4] Frame 12
this.removeMovieClip();
Symbol 32 MovieClip [bugMC3] Frame 1
this.stop();
this.box._visible = false;
Symbol 32 MovieClip [bugMC3] Frame 2
this.stop();
Symbol 32 MovieClip [bugMC3] Frame 12
this.removeMovieClip();
Symbol 39 MovieClip [bugMC2] Frame 1
this.stop();
this.box._visible = false;
Symbol 39 MovieClip [bugMC2] Frame 2
this.stop();
Symbol 39 MovieClip [bugMC2] Frame 12
this.removeMovieClip();
Symbol 43 MovieClip [shotMC2] Frame 12
this.stop();
Symbol 43 MovieClip [shotMC2] Frame 24
this.removeMovieClip();
Symbol 46 MovieClip [shotMC1] Frame 10
this.gotoAndPlay(1);
Symbol 46 MovieClip [shotMC1] Frame 12
this._y = this._y + this.Speed;
this.Speed = 0;
this.MOVE = false;
Symbol 46 MovieClip [shotMC1] Frame 19
this.playShotHide();
Symbol 50 MovieClip [bugMC101] Frame 1
this.stop();
this.box._visible = false;
Symbol 50 MovieClip [bugMC101] Frame 16
this.removeMovieClip();
Symbol 54 MovieClip [bugMC5] Frame 1
this.stop();
this.box._visible = false;
Symbol 54 MovieClip [bugMC5] Frame 12
this.removeMovieClip();
Symbol 59 MovieClip [gameoverMc] Frame 25
this.stop();
Symbol 66 MovieClip Frame 1
#initclip 1
Color.prototype.setTintOffset = function (r, g, b, a) {
var _local1 = new Object();
_local1.rb = r;
_local1.gb = g;
_local1.bb = b;
_local1.aa = a;
this.setTransform(_local1);
};
MovieClip.prototype.setColor = function (r, g, b, a) {
var _local1 = new Color(this);
_local1.setTintOffset(r, g, b, a);
};
MovieClip.prototype.Limit = function (x, y, max) {
var _local1 = this;
if ((Math.abs(_local1._x - x) < max) && (Math.abs(_local1._y - y) < max)) {
_local1._x = x;
_local1._y = y;
return(true);
}
return(false);
};
MovieClip.prototype.rotateTo = function (targetX, targetY) {
var _local1 = this;
var _local3 = targetX - _local1._x;
var _local2 = targetY - _local1._y;
_local1._rotation = (Math.atan2(_local2, _local3) * 180) / Math.PI;
};
MovieClip.prototype.Shot = function () {
var _local1 = this;
var _local2 = _root;
duplicateMovieClip (_local2.bugShotMC1, "bs" + _local1.NUM, _local1.NUM + 300);
_local2["bs" + _local1.NUM]._x = _local1._x;
_local2["bs" + _local1.NUM]._y = _local1._y;
};
MovieClip.prototype.addXY = function (targetX, targetY, speed) {
var _local1 = this;
if (!_local1.TXY) {
_local1.TXY = new Array();
}
_local1.TXY.push([targetX, targetY, speed]);
_local1.swapDepths(_local1.NUM + 200);
_local1.MOVE = true;
};
MovieClip.prototype.delXY = function () {
var _local1 = this;
if (!_local1.TXY) {
_local1.TXY = new Array();
}
if (_local1.TXY.length > 0) {
i = 0;
while (i < (_local1.TXY.length - 1)) {
_local1.TXY[i] = _local1.TXY[i + 1];
i++;
}
if (TXY[0][0] < _local1._x) {
if (TXY[0][1] < _local1._y) {
_local1.RS = -5;
} else {
_local1.RS = -5;
}
} else if (TXY[0][1] < _local1._y) {
_local1.RS = 5;
} else {
_local1.RS = 5;
}
_local1.TXY.pop();
}
if (_local1.TXY.length < 1) {
_local1.swapDepths(_local1.NUM + 100);
_local1._rotation = -90;
_local1.MOVE = false;
}
};
MovieClip.prototype.moveXY2 = function () {
var _local1 = this;
if (_local1.TXY.length > 0) {
if (_local1._y > 420) {
_local1._y = -20;
_local1.delXY();
return(false);
}
TX = _local1.TXY[0][0];
TY = _local1.TXY[0][1];
SP = _local1.TXY[0][2];
diffX = TX - _local1._x;
diffY = TY - _local1._y;
r2 = (Math.atan2(diffY, diffX) * 180) / Math.PI;
r = _local1._rotation;
if (Math.round(r - r2) < Math.round(_local1.RS)) {
_local1._rotation = r2;
} else {
_local1._rotation = _local1._rotation + _local1.RS;
}
t = (r * Math.PI) / 180;
a = SP * Math.cos(t);
b = SP * Math.sin(t);
if (_local1.Limit(TX, TY, SP)) {
_local1.delXY();
} else {
_local1._x = _local1._x + a;
_local1._y = _local1._y + b;
}
}
return(undefined);
};
MovieClip.prototype.moveXY = function () {
var _local1 = this;
if (_local1.TXY.length > 0) {
TX = _local1.TXY[0][0];
TY = _local1.TXY[0][1];
SP = _local1.TXY[0][2];
if (_local1._y > 420) {
_local1._y = -20;
_local1.delXY();
return(false);
}
t = (_local1._rotation * Math.PI) / 180;
a = SP * Math.cos(t);
b = SP * Math.sin(t);
if (_local1.Limit(TX, TY, SP)) {
_local1._x = TX;
_local1._y = TY;
_local1.delXY();
} else {
_local1.rotateTo(TX, TY);
_local1._x = _local1._x + a;
_local1._y = _local1._y + b;
}
}
return(undefined);
};
MovieClip.prototype.moveXY3 = function () {
var _local1 = this;
if (_local1.TXY.length > 0) {
TX = _local1.TXY[0][0];
TY = _local1.TXY[0][1];
SP = _local1.TXY[0][2];
if (_local1._y > 420) {
_local1._y = -20;
_local1.delXY();
return(false);
}
a = (TX - _local1._x) * 0.2;
if (Math.abs(a) > SP) {
if (a > 0) {
a = SP;
} else {
a = -SP;
}
}
b = (TY - _local1._y) * 0.2;
if (Math.abs(b) > SP) {
if (b > 0) {
b = SP;
} else {
b = -SP;
}
}
_local1.rotateTo(TX, TY);
SP = Math.floor(SP / 2);
if ((Math.abs(a) < SP) && (Math.abs(b) < SP)) {
_local1._x = TX;
_local1._y = TY;
_local1.delXY();
} else {
_local1._x = _local1._x + a;
_local1._y = _local1._y + b;
}
}
return(undefined);
};
MovieClip.prototype.smoothMove = function (targetX, targetY, speed) {
var _local1 = this;
_local1._x = _local1._x + (speed * (targetX - _local1._x));
_local1._y = _local1._y + (speed * (targetY - _local1._y));
};
#endinitclip
this._visible = false;
Symbol 68 MovieClip Frame 1
_root.gameVISIBLE = false;
_root.gameSTART = false;
_root.gameLEVEL = 1;
_root.gameLINE = 0;
_root.gameSPEED = 4;
_root.gameFRAME = 0;
_root.gameSCORE = 0;
_root.wait = 0;
_root.bugNo = 0;
_root.bugNum = 0;
_root.bugMax = 0;
_root.bugDepths = 200;
_root.bugShotNo = 0;
_root.bugShotNum = 0;
_root.bugShotMax = 50;
_root.bugShotDepths = 1000;
_root.bugShotSpeed = 10;
_root.bugTempMove = 8;
_root.bugTempMax = 10;
_root.bugTempBouns = 8;
_root.playNum = 2;
_root.playMax = 4;
_root.playSpeed = 8;
_root.playDepths = 600;
_root.playCloneDepths = 700;
_root.playShotNo = 0;
_root.playShotNum = 0;
_root.playShotLimit = 5;
_root.playShotMax = 10;
_root.playShotDepths = 800;
_root.playShotCloneDepths = 900;
_root.playShotSpeed = 15;
_root.bugLoopNum = 0;
_root.bugLoopMax = 32;
this._visible = false;
this.stop();
function makePlayShotMC() {
var _local1 = _root;
var _local2 = this;
i = 1;
while (i <= _local1.playShotMax) {
name = "psc" + i;
_local1.attachMovie("shotMC1", name, i + _local1.playShotCloneDepths);
cpMC = _local1[name];
cpMC.NUM = i;
cpMC._visible = false;
cpMC._xscale = (cpMC._yscale = 100);
cpMC._x = 10 + ((i * cpMC._width) * 1.5);
cpMC._y = 385;
cpMC.setColor(-50, -50, -50, 50);
cpMC.onEnterFrame = function () {
var _local1 = this;
var _local2 = _root;
if ((_local2.gameFRAME % 5) == 0) {
if (_local1.NUM <= _local2.playShotLimit) {
_local1._visible = true;
if (_local1.NUM <= (_local2.playShotLimit - _local2.playShotNum)) {
_local1.setColor(0, 0, 0, 100);
} else {
_local1.setColor(-50, -50, -50, 50);
}
} else {
_local1._visible = false;
}
}
};
name = "ps" + i;
_local1.attachMovie("shotMC1", name, i + _local1.playShotDepths);
cpMC = _local1[name];
cpMC._visible = false;
cpMC.HIT = false;
cpMC.MOVE = false;
cpMC.Speed = 0;
cpMC._xscale = (cpMC._yscale = 100);
cpMC._x = -100;
cpMC._y = -100;
cpMC.onEnterFrame = function () {
var _local1 = _root;
var _local2 = this;
if (_local2.MOVE == true) {
_local2._y = _local2._y - _local2.Speed;
if (_local2._y < -10) {
_local2.playShotHide();
}
i = 0;
while (i < _local1.bugMAX) {
name = "bug" + i;
if (_local1[name]._visible == true) {
if (_local1[name].box.hitTest(_local2.box)) {
_local1[name].LIFE--;
if (_local1[name].LIFE < 1) {
_local1[name].swapDepths(_local1[name].NUM + 100);
_local1[name].gotoAndPlay("DIE");
_local1.gameSCORE = _local1.gameSCORE + 100;
} else {
_local1.gameSCORE = _local1.gameSCORE + 10;
}
_local2._x = _local1[name]._x;
_local2._y = _local1[name]._y;
_local2.gotoAndPlay("DIE");
}
}
i++;
}
}
};
cpMC.playShotHide = function () {
var _local1 = this;
_local1.HIT = false;
_local1.MOVE = false;
_local1.Speed = 0;
_local1._x = -100;
_local1._y = -100;
_local1._visible = false;
if (_root.playShotNum > 0) {
_root.playShotNum--;
}
};
i++;
}
}
function makePlayMC() {
var _local1 = _root;
var _local2 = this;
_local1.gameVISIBLE = true;
i = 0;
while (i < _local1.playMAX) {
name = "playcloneMC" + i;
_local1.attachMovie("playMC1", name, i + _local1.playCloneDepths);
cpMC = _local1[name];
cpMC._visible = false;
cpMC._xscale = (cpMC._yscale = 40);
cpMC._x = 290 - ((i * cpMC._width) * 1.2);
cpMC._y = 385;
cpMC.NUM = i;
cpMC.onEnterFrame = function () {
var _local1 = this;
var _local2 = _root;
if ((_local2.gameFRAME % 5) == 0) {
if (_local1.NUM < _local2.playNum) {
_local1._visible = true;
if (_local2.playMC._currentframe < 4) {
_local1.gotoAndStop(_local2.playMC._currentframe);
} else {
_local1.gotoAndStop("ALIVE");
}
} else {
_local1._visible = false;
}
}
};
i++;
}
name = "playMC";
_local1.attachMovie("playMC1", name, i + _local1.playDepths);
cpMC = _local1[name];
cpMC.LIFE = 0;
cpMC._x = 100;
cpMC._y = 360;
cpMC._visible = false;
cpMC._xscale = (cpMC._yscale = 60);
cpMC.speedX = _local1.playSpeed;
cpMC.shotCHECK = true;
cpMC.onEnterFrame = function () {
var _local1 = this;
var _local2 = _root;
if (_local1.LIFE > 0) {
if (_local1._x > _local2._xmouse) {
if (_local1._x < (_local2._xmouse + _local2.playSpeed)) {
_local1._x = _local2._xmouse;
} else if (_local1._x > (_local2._xmouse + (_local2.playSpeed * 2))) {
_local1._x = _local1._x - _local2.playSpeed;
_local1.gotoAndStop("LEFT");
} else {
_local1._x = _local1._x - (_local2.playSpeed / 2);
_local1.gotoAndStop("ALIVE");
}
if (_local1._x < (_local1._width / 2)) {
_local1._x = _local1._width / 2;
}
} else if (_local1._x < _local2._xmouse) {
if (_local1._x > (_local2._xmouse + _local2.playSpeed)) {
_local1._x = _local2._xmouse;
} else if (_local1._x < (_local2._xmouse - (_local2.playSpeed * 2))) {
_local1._x = _local1._x + _local2.playSpeed;
_local1.gotoAndStop("RIGHT");
} else {
_local1._x = _local1._x + (_local2.playSpeed / 2);
_local1.gotoAndStop("ALIVE");
}
if (_local1._x > (300 - (_local1._width / 2))) {
_local1._x = 300 - (_local1._width / 2);
}
} else {
_local1.gotoAndStop("ALIVE");
}
if (Key.isDown(32)) {
if ((_local1._visible == true) && (_local1.LIFE > 0)) {
_local2.shotSound.start();
_local1.playShotShow();
}
}
}
};
cpMC.onMouseDown = function () {
var _local1 = this;
if ((_local1._visible == true) && (_local1.LIFE > 0)) {
_root.shotSound.start();
_local1.playShotShow();
}
};
cpMC.playShotShow = function () {
var _local1 = _root;
if (_local1.playShotNum < _local1.playShotLimit) {
_local1.playShotNo++;
_local1.playShotNum++;
if (_local1.playShotNo > _local1.playShotMax) {
_local1.playShotNo = 1;
}
name = "ps" + _local1.playShotNo;
_local1[name]._x = this._x;
_local1[name]._y = this._y;
_local1[name]._visible = true;
_local1[name].Speed = _local1.playShotSpeed;
_local1[name].HIT = true;
_local1[name].MOVE = true;
}
};
}
function bugShot(mc) {
var _local1 = _root;
var _local2 = this;
name = "bs" + _local1.bugShotNo;
_local1.attachMovie("shotMC2", name, _local1.bugShotNo + _local1.bugShotDepths);
_local1.bugShotNo++;
if (_local1.bugShotNo >= _local1.bugShotMax) {
_local1.bugShotNo = 0;
}
cpMC = _local1[name];
cpMC._x = mc._x;
cpMC._y = mc._y;
cpMC.LIFE = 100;
cpMC.speedY = 12;
cpMC.onEnterFrame = function () {
var _local1 = this;
var _local2 = _root;
if (_local1.LIFE > 0) {
_local1._y = _local1._y + _local1.speedY;
if (_local1._y > 420) {
_local1.removeMovieClip();
}
if ((_local2.playMC._currentframe <= 3) && (_local2.playMC.box.hitTest(_local1.box))) {
_local2.playMC.LIFE = 0;
_local2.playMC.gotoAndPlay("DIE");
_local1.LIFE = 0;
_local1.gotoAndPlay("DIE");
}
}
};
}
function makeBugMC(num, mcType, life, x, y) {
var _local1 = this;
var _local2 = _root;
var _local3 = num;
name = "bug" + _local3;
_local2.attachMovie("bugMC" + mcType, name, _local3 + _local2.bugDepths);
_local2.bugNum++;
cpMC = _local2[name];
cpMC.RS = 10;
cpMC.LIFE = life;
cpMC.NUM = _local3;
cpMC.START = false;
cpMC.MOVE = false;
cpMC.SHOT = 60 + random(60);
cpMC._x = (cpMC.TX = x);
cpMC._y = (cpMC.TY = y);
cpMC.SP = _local2.gameSPEED;
cpMC._xscale = (cpMC._yscale = 45);
cpMC._visible = false;
cpMC.onEnterFrame = function () {
var _local1 = this;
var _local2 = _root;
if (_local1.START) {
if (_local1.MOVE) {
_local1.moveXY();
if (_local1._y > 340) {
if (_local1.box.hitTest(_local2.playMC.box)) {
_local2.playMC.LIFE = 0;
_local2.playMC.gotoAndPlay("DIE");
_local2.gotoAndPlay("DIE");
}
} else if (_local1._y < -30) {
_local1.removeMovieClip();
}
}
if (_local1.SHOT > 0) {
_local1.SHOT--;
if (_local1.SHOT == 0) {
bugShot(_local1);
}
}
}
};
cpMC.onUnload = function () {
_root.bugNum--;
};
return(cpMC);
}
function makeBugMCs() {
}
function bugShowBonus() {
var _local1 = _root;
num = _local1.bugTempBouns;
speed = 2;
if (_local1["bug" + num]) {
return(false);
}
if (_local1.bugMax < _local1.bugTempMax) {
_local1.bugMax = _local1.bugTempMax;
}
cpMC = this.makeBugMC(num, 5, 6, -100, -100);
cpMC._x = (cpMC.TX = 350);
cpMC._y = (cpMC.TY = 35);
cpMC._rotation = 180;
cpMC.addXY(-50, 35, speed);
cpMC.addXY(-50, -50, 20);
cpMC.START = true;
cpMC.MOVE = true;
cpMC._visible = true;
return(undefined);
}
function bugShow() {
var _local1 = _root;
var _local2 = this;
if (_local1.gameLINE >= _local1.bugTYPE[_local1.gameLEVEL].length) {
return(false);
}
n = _local1.bugTYPE[_local1.gameLEVEL][_local1.gameLINE++];
if (_local1.bugMax < _local1.bugTempMax) {
_local1.bugMax = _local1.bugTempMax;
}
area = (_local1.gameLINE - 1) % 4;
i = 0;
while (i < 16) {
xx = int(i / 2);
yy = int(i % 2);
if (i >= _local1.bugTempMove) {
num = _local1.bugMax;
TX = (int(_local1.bugAREA[_local1.bugLoopNum] % 8) * 30) + 45;
TY = ((3 - int(_local1.bugAREA[_local1.bugLoopNum] / 8)) * 30) + 60;
_local1.bugMax++;
_local1.bugLoopNum++;
} else {
num = i;
TX = random(200) + 50;
TY = -50;
}
cpMC = _local2.makeBugMC(num, n, n + 1, -100, -100);
speed = _local1.gameSPEED + 4;
switch (area) {
case 0 :
x = -20 - (xx * 25);
y = 300 + (yy * 25);
cpMC._x = (cpMC.TX = x);
cpMC._y = (cpMC.TY = y);
cpMC.addXY(200, y, speed);
j = 0;
while (j < 24) {
t = (((360 - j) * 15) * Math.PI) / 180;
a = (100 + (yy * 25)) * Math.cos(t);
b = (100 + (yy * 25)) * Math.sin(t);
if (yy > 0) {
s = speed * 1.3;
} else {
s = speed;
}
cpMC.addXY(150 + a, 180 + b, s);
j++;
}
cpMC._rotation = 0;
break;
case 1 :
x = 320 + (xx * 25);
y = 300 + (yy * 25);
cpMC._x = (cpMC.TX = x);
cpMC._y = (cpMC.TY = y);
cpMC.addXY(100, y, speed);
j = 0;
while (j < 24) {
t = (((180 + j) * 15) * Math.PI) / 180;
a = (100 + (yy * 25)) * Math.cos(t);
b = (100 + (yy * 25)) * Math.sin(t);
if (yy > 0) {
s = speed * 1.3;
} else {
s = speed;
}
cpMC.addXY(150 + a, 180 + b, s);
j++;
}
cpMC._rotation = 180;
break;
case 2 :
x = -20 - (xx * 25);
y = 100 - (yy * 25);
cpMC._x = (cpMC.TX = x);
cpMC._y = (cpMC.TY = y);
cpMC.addXY(200, y, speed);
j = 0;
while (j < 36) {
t = (((360 + j) * 15) * Math.PI) / 180;
a = (100 + (yy * 25)) * Math.cos(t);
b = (100 + (yy * 25)) * Math.sin(t);
if (yy > 0) {
s = speed * 1.3;
} else {
s = speed;
}
cpMC.addXY(150 + a, 180 + b, s);
j++;
}
cpMC._rotation = 0;
break;
case 3 :
x = 320 + (xx * 25);
y = 100 - (yy * 25);
cpMC._x = (cpMC.TX = x);
cpMC._y = (cpMC.TY = y);
cpMC.addXY(100, y, speed);
j = 0;
while (j < 36) {
t = (((180 - j) * 15) * Math.PI) / 180;
a = (100 + (yy * 25)) * Math.cos(t);
b = (100 + (yy * 25)) * Math.sin(t);
if (yy > 0) {
s = speed * 1.3;
} else {
s = speed;
}
cpMC.addXY(150 + a, 180 + b, s);
j++;
}
cpMC._rotation = 180;
}
cpMC.addXY(TX, TY, speed);
cpMC.START = true;
cpMC.MOVE = true;
cpMC._visible = true;
i++;
}
return(undefined);
}
_root.bugAREA = new Array();
_root.bugTYPE = new Array();
_root.bugTYPE[1] = [1, 1, 1, 2];
_root.bugTYPE[2] = [1, 1, 2, 2];
_root.bugTYPE[3] = [1, 2, 2, 3];
_root.bugTYPE[4] = [1, 2, 3, 3];
_root.bugTYPE[5] = [2, 2, 3, 3];
_root.bugTYPE[6] = [2, 3, 3, 4];
_root.bugTYPE[7] = [2, 3, 4, 4];
_root.bugTYPE[8] = [3, 3, 4, 4];
_root.bugTYPE[9] = [3, 4, 4, 5];
_root.bugTYPE[10] = [4, 4, 4, 5];
_root.bugTYPE[11] = [4, 4, 5, 5];
_root.bugTYPE[13] = [4, 5, 5, 5];
_root.bugTYPE[14] = [5, 5, 5, 5];
_root.bugTYPE[15] = [5, 5, 5, 5];
_root.bugTYPE[17] = [5, 5, 5, 5];
_root.bugTYPE[18] = [5, 5, 5, 5];
_root.bugTYPE[19] = [5, 5, 5, 5];
_root.bugTYPE[20] = [5, 5, 5, 5];
_root.bugTYPE[21] = [5, 5, 5, 5];
function gameSetup() {
var _local1 = _root;
var _local2 = this;
_local1.gameLEVEL = 1;
if (_local1.gameLEVEL > 21) {
_local1.gameLEVEL = 21;
}
_local1.gameSPEED = _local1.gameLEVEL + 4;
_local1.gameSCORE = 0;
_local1.gameSTART = false;
_local1.gameMegMC.gotoAndPlay("START");
_local1.gameMegMC._visible = true;
i = 0;
while (i < 32) {
_local1.bugAREA[i] = i;
i++;
}
_local2.gameClear();
if (_local1.gameVISIBLE == false) {
_local2.makePlayMC();
_local2.makePlayShotMC();
_local2.makeBugMCs();
_local2.makeBugShotMC();
}
_local1.gameSTART = false;
}
function gameStart() {
var _local1 = _root;
_local1.gameLEVEL = 1;
_local1.gameSPEED = _local1.gameLEVEL + 4;
_local1.gameSCORE = 0;
_local1.playNum = 5;
_local1.playShotLimit = 5;
_local1.playNum--;
_local1.playMC.LIFE = 10;
_local1.playMC._visible = true;
_local1.playMC.gotoAndPlay("ALIVE");
}
function gameClear() {
var _local1 = _root;
i = 0;
while (i < _local1.bugMax) {
_local1["bug" + i].removeMovieClip();
i++;
}
i = 0;
while (i < _local1.bugShotMax) {
_local1["bs" + i].removeMovieClip();
i++;
}
_local1.bugNo = 0;
_local1.bugMax = 0;
_local1.bugShotNo = 0;
_local1.playShotNo = 0;
_local1.playShotNum = 0;
_local1.gameFRAME = 0;
_local1.gameLINE = 0;
_local1.bugLoopNum = 0;
}
function gameOver() {
var _local1 = _root;
if (_local1.dbconnect == "yes") {
_local1.DispatchGameData();
}
this.gameClear();
_local1.gameSTART = false;
_local1.gameMegMC.gotoAndStop("gameover");
_local1.gameMegMC._visible = true;
}
function gameNext() {
var _local1 = _root;
_local1.gameLEVEL++;
if (_local1.gameLEVEL > 21) {
_local1.gameLEVEL = 21;
}
_local1.gameSPEED = _local1.gameLEVEL + 4;
this.gameClear();
_local1.gameMegMC.gotoAndPlay("LEVEL");
}
this.onEnterFrame = function () {
var _local1 = _root;
var _local2 = this;
if (_local1.gameSTART == true) {
if ((_local1.gameFRAME % 10) == 0) {
if (_local1.bugLoopNum < _local1.bugLoopMax) {
if ((_local1.gameFRAME % 300) == 50) {
_local2.bugShow();
} else if ((_local1.gameFRAME % 150) == 0) {
_local2.bugShowBonus();
}
} else if ((_local1.gameFRAME % 280) == 0) {
_local2.bugShowBonus();
} else if ((_local1.bugNum <= 0) && (_local1.bugLoopNum >= 32)) {
_local2.gameNext();
} else if ((_local1.gameFRAME % 50) == 0) {
i = 0;
while (i < _local1.bugMax) {
if (_local1["bug" + i].MOVE == false) {
if (random(10) == 0) {
_local1["bug" + i].MOVE = true;
_local1["bug" + i].addXY(random(260) + 20, 500, _local1.gameSPEED);
_local1["bug" + i].addXY(_local1["bug" + i]._x, _local1["bug" + i]._y, _local1.gameSPEED);
} else if (random(5) == 3) {
_local1["bug" + i].SHOT = 20 + random(40);
}
}
i++;
}
}
if (_local1.playMC.LIFE <= 0) {
_local1.wait++;
if (_local1.wait > 3) {
_local1.wait = 0;
if (_local1.playNum > 0) {
_local1.playNum--;
_local1.playMC.LIFE = 10;
_local1.playMC._visible = true;
_local1.playMC.gotoAndPlay("ALIVE");
} else {
_local2.gameOver();
}
}
}
}
_local1.gameFRAME++;
}
};
Symbol 78 Button
on (release) {
_root.galagaMC.gameStart();
this.gotoAndPlay("LEVEL");
}
Symbol 86 MovieClip Frame 1
this.stop();
Symbol 86 MovieClip Frame 3
this._visible = true;
this.level = _root.gameLEVEL;
Symbol 86 MovieClip Frame 22
this._visible = false;
_root.gameSTART = true;
Symbol 88 Button
on (press) {
getURL ("http://www.game24.co.kr", "_self");
}