Frame 1
_accProps = new Object();
_accProps.silent = true;
function clean() {
var _local1 = _root;
for (i in _local1) {
_local1[i].removeMovieClip();
}
}
fscommand ("fullscreen", false);
fscommand ("allowscale", false);
fscommand ("showmenu", false);
_root.clean();
newFooter.soundController.gotoAndStop(2);
function init() {
var _local1 = _root;
tarce("init called");
var point = new Object();
_local1.enemyArr = new Array();
_local1.totEnmyDied = new Array();
_local1.shipPower = 1;
_local1.newFooter.myLife1._visible = true;
_local1.newFooter.myLife2._visible = true;
_local1.newFooter.myLife3._visible = true;
_local1.bonus = 1;
_local1.shield = 0;
_local1.level = 1;
_local1.pattern = 1;
_local1.timerUnit = 1;
_local1.totalPatternDone = 1;
}
function checkLevel() {
var _local1 = _root;
_local1.levelOver = 1;
_local1.level++;
_local1.timerUnit = _local1.timerUnit + 0.5;
_local1.initialTime = _local1.initialTime + 15;
_local1.levelup.gotoAndPlay(2);
trace("Level up.....");
_local1.levelUpObject.start();
_local1.newFooter.score = _local1.newFooter.score + 1000;
_local1.dbInterface.updateScore(_local1.newFooter.score);
_local1.lifeCheck = _local1.lifeCheck + 1000;
}
function genrateNewPattern(num) {
var _local2 = _root;
var _local1 = 50;
var iniY = 20;
var _local3 = 0;
var row = 3;
var col = 5;
_local2.pattern = num;
_local2.ctrMove = 0;
switch (num) {
case 1 :
_local2.gContainer_mc._x = -597;
_local2.gContainer_mc._y = 23;
_local2.startX = _local2.gContainer_mc._x;
_local2.StartY = _local2.gContainer_mc._y;
row = 3;
col = 5;
var i = 0;
while (i < row) {
var j = 0;
while (j < col) {
_local3++;
var mc = _local2.gContainer_mc.attachMovie("gTarget_mc", "gTarget_mc" + _local3, 1500 + _local3);
mc._x = _local1;
mc._y = iniY;
mc.enemyPower = _local2.level;
mc.gotoAndStop(_local2.pattern);
_local1 = _local1 + 100;
j++;
}
_local1 = (50 * i) / 2;
iniY = iniY + 50;
i++;
}
_local2.gamePaused = false;
return;
case 2 :
_local2.gContainer_mc._x = -597;
_local2.gContainer_mc._y = 22;
_local2.startX = _local2.gContainer_mc._x;
_local2.StartY = _local2.gContainer_mc._y;
row = 3;
col = 5;
var i = 0;
while (i < row) {
var l = 0;
var j = 0;
while (j < col) {
_local3++;
l++;
var mc = _local2.gContainer_mc.attachMovie("gTarget_mc", "gTarget_mc" + _local3, 1500 + _local3);
mc._x = _local1;
mc._y = iniY;
mc.enemyPower = _local2.level;
mc.gotoAndStop(_local2.pattern);
if (l == 2) {
_local1 = _local1 + 150;
} else if (l == 3) {
_local1 = _local1 + 150;
} else {
_local1 = _local1 + 75;
}
j++;
}
_local1 = 50;
iniY = iniY + 50;
i++;
}
_local2.gamePaused = false;
return;
case 3 :
_local2.gContainer_mc._x = 75;
_local2.gContainer_mc._y = -100;
_local2.startX = _local2.gContainer_mc._x;
_local2.StartY = _local2.gContainer_mc._y;
row = 3;
col = 5;
var i = 0;
while (i < row) {
var j = 0;
while (j < col) {
_local3++;
var mc = _local2.gContainer_mc.attachMovie("gTarget_mc", "gTarget_mc" + _local3, 1500 + _local3);
mc._x = _local1;
mc._y = iniY;
_local1 = _local1 + 100;
mc.enemyPower = _local2.level;
mc.gotoAndStop(_local2.pattern);
j++;
}
_local1 = (50 * i) / 2;
iniY = iniY + 50;
i++;
}
_local2.gamePaused = false;
return;
case 4 :
_local2.gContainer_mc._x = 0;
_local2.gContainer_mc._y = -80;
_local2.startX = _local2.gContainer_mc._x;
_local2.StartY = _local2.gContainer_mc._y;
row = 3;
col = 6;
var i = 0;
while (i < row) {
var j = 0;
while (j < col) {
_local3++;
var mc = _local2.gContainer_mc.attachMovie("gTarget_mc", "gTarget_mc" + _local3, 1500 + _local3);
mc._x = _local1;
mc._y = iniY;
_local1 = _local1 + 100;
mc.enemyPower = _local2.level;
mc.gotoAndStop(_local2.pattern);
j++;
}
_local1 = 50 * (i + 2);
iniY = iniY + 50;
col--;
i++;
}
_local2.gamePaused = false;
return;
case 5 :
_local2.gContainer_mc._x = 25;
_local2.gContainer_mc._y = -100;
_local2.startX = _local2.gContainer_mc._x;
_local2.StartY = _local2.gContainer_mc._y;
row = 3;
col = 5;
var i = 0;
while (i < row) {
var l = 0;
var j = 0;
while (j < col) {
_local3++;
l++;
var mc = _local2.gContainer_mc.attachMovie("gTarget_mc", "gTarget_mc" + _local3, 1500 + _local3);
mc._x = _local1;
mc._y = iniY;
mc.enemyPower = _local2.level;
mc.gotoAndStop(_local2.pattern);
if (l == 2) {
_local1 = _local1 + 150;
} else if (l == 3) {
_local1 = _local1 + 150;
} else {
_local1 = _local1 + 75;
}
j++;
}
_local1 = 50;
iniY = iniY + 50;
i++;
}
_local2.gamePaused = false;
return;
case 6 :
_local2.gContainer_mc._x = 75;
_local2.gContainer_mc._y = -100;
_local2.startX = _local2.gContainer_mc._x;
_local2.StartY = _local2.gContainer_mc._y;
row = 2;
col = 5;
_local1 = 25;
iniY = 20;
var i = 0;
while (i < row) {
var l = 0;
var j = 0;
while (j < col) {
_local3++;
l++;
var mc = _local2.gContainer_mc.attachMovie("gTarget_mc", "gTarget_mc" + _local3, 1500 + _local3);
mc._x = _local1;
mc._y = iniY;
mc.enemyPower = _local2.level;
mc.gotoAndStop(_local2.pattern);
if (i == 0) {
_local1 = _local1 + 100;
} else if ((j % 2) == 0) {
_local1 = _local1 + 50;
} else if (j == 0) {
_local1 = _local1 + 50;
} else {
_local1 = _local1 + 50;
}
j++;
}
col = col * 2;
_local1 = 0;
iniY = iniY + 50;
i++;
}
_local2.gamePaused = false;
return;
case 7 :
row = 3;
_local2.gContainer_mc._x = 75;
_local2.gContainer_mc._y = -100;
_local2.startX = _local2.gContainer_mc._x;
_local2.StartY = _local2.gContainer_mc._y;
var customPattern = 2;
var myCtr = 0;
_local1 = 25;
iniY = 20;
var i = 0;
while (i < row) {
var l = 0;
_local1 = 25;
if (i == 0) {
col = 6;
} else if (i == 1) {
col = 3;
_local1 = 50;
} else {
col = 6;
}
customPattern = 2;
var j = 0;
while (j < col) {
_local3++;
l++;
var mc = _local2.gContainer_mc.attachMovie("gTarget_mc", "gTarget_mc" + _local3, 1500 + _local3);
mc._x = _local1;
mc._y = iniY;
mc.enemyPower = _local2.level;
mc.gotoAndStop(customPattern);
if (i != 1) {
if ((j % 2) == 0) {
_local1 = _local1 + 50;
} else if (j == 0) {
_local1 = _local1 + 50;
} else {
_local1 = _local1 + 100;
}
myCtr++;
if (myCtr == 2) {
myCtr = 0;
customPattern++;
}
} else {
customPattern++;
_local1 = _local1 + 150;
}
j++;
}
iniY = iniY + 50;
customPattern = 2;
i++;
}
_local2.gamePaused = false;
return;
case 8 :
_local2.gContainer_mc._x = 25;
_local2.gContainer_mc._y = -100;
_local2.startX = _local2.gContainer_mc._x;
_local2.StartY = _local2.gContainer_mc._y;
row = 2;
col = 3;
var customPattern = 1;
_local1 = 25;
iniY = 20;
var gapX = _local1;
var m = 0;
while (m < 3) {
var i = 0;
while (i < row) {
var j = 0;
while (j < col) {
_local3++;
var mc = _local2.gContainer_mc.attachMovie("gTarget_mc", "gTarget_mc" + _local3, 1500 + _local3);
mc._x = _local1;
mc._y = iniY;
mc.enemyPower = _local2.level;
mc.gotoAndStop(customPattern);
_local1 = _local1 + 50;
j++;
}
col--;
iniY = iniY + 50;
_local1 = gapX + 25;
i++;
}
row = 2;
col = 3;
_local1 = gapX + 200;
iniY = 20;
gapX = _local1;
customPattern++;
m++;
}
_local2.gamePaused = false;
return;
case 9 :
_local2.gContainer_mc._x = -50;
_local2.gContainer_mc._y = -100;
_local2.startX = _local2.gContainer_mc._x;
_local2.StartY = _local2.gContainer_mc._y;
row = 2;
col = 3;
var customPattern = 9;
_local1 = 25;
iniY = 20;
var gapX = (_local1 * 2);
var m = 0;
while (m < 3) {
var i = 0;
while (i < row) {
var j = 0;
while (j < col) {
_local3++;
var mc = _local2.gContainer_mc.attachMovie("gTarget_mc", "gTarget_mc" + _local3, 1500 + _local3);
mc._x = _local1;
mc._y = iniY;
mc.enemyPower = _local2.level;
mc.gotoAndStop(customPattern);
_local1 = _local1 + 70;
j++;
}
col--;
iniY = iniY + 50;
_local1 = gapX + 25;
i++;
}
row = 2;
col = 3;
_local1 = gapX + 240;
iniY = 20;
gapX = _local1;
if (m == 1) {
customPattern = 9;
} else {
customPattern = 7;
}
m++;
}
_local2.gamePaused = false;
return;
case 10 :
_local2.gContainer_mc._x = -40;
_local2.gContainer_mc._y = -100;
_local2.startX = _local2.gContainer_mc._x;
_local2.StartY = _local2.gContainer_mc._y;
row = 2;
col = 3;
var customPattern = 10;
_local1 = 25;
iniY = 20;
var gapX = (_local1 * 2);
var m = 0;
while (m < 3) {
var i = 0;
while (i < row) {
var j = 0;
while (j < col) {
_local3++;
var mc = _local2.gContainer_mc.attachMovie("gTarget_mc", "gTarget_mc" + _local3, 1500 + _local3);
mc._x = _local1;
mc._y = iniY;
mc.enemyPower = _local2.level;
mc.gotoAndStop(customPattern);
_local1 = _local1 + 70;
j++;
}
col--;
iniY = iniY + 50;
_local1 = gapX + 25;
i++;
}
row = 2;
col = 3;
_local1 = gapX + 230;
iniY = 20;
gapX = _local1;
if (m == 1) {
customPattern = 10;
} else {
customPattern = 2;
}
m++;
}
_local2.gamePaused = false;
return;
}
}
function callRestartTimer1() {
var _local1 = _root;
var ctr = 0;
_local1.createEmptyMovieClip("restartTimer_mc", 98);
restartTimer_mc.onEnterFrame = function () {
var _local1 = _root;
if (_local1.pausePress == false) {
ctr++;
if (ctr == 10) {
_local1.allow = true;
ctr = 0;
_local1.restartTimer_mc.onEnterFrame = null;
removeMovieClip(this);
}
}
};
}
function callTimer() {
var _local1 = _root;
_local1.createEmptyMovieClip("timer_mc", 99);
timer_mc.onEnterFrame = function () {
var _local1 = _root;
if (_local1.pausePress == false) {
_local1.ctr++;
if (_local1.ctr == 10) {
_local1.allow = true;
_local1.ctr = 0;
_local1.timer_mc.onEnterFrame = null;
removeMovieClip(this);
}
}
};
}
function hitMissle() {
var _local2 = _root;
_local2.ctr1++;
shotCount++;
depth = (shotCount % 100) + 100;
var _local1 = _local2.attachMovie("shipLaser" + _local2.bonus, "sparo" + _local2.ctr1, _local2.ctr1);
_local1._x = ship._x;
_local1._y = ship._y;
_local1.n = 200;
_local1.shotCount = 0;
if (_local2.bonus == 1) {
_local1.m1.onEnterFrame = runMissle;
soundLaser1.start();
} else if (_local2.bonus == 2) {
_local1.m1.onEnterFrame = runMissle;
_local1.m2.onEnterFrame = runMissle;
soundLaser2.start();
} else if (_local2.bonus == 3) {
_local1.m1.onEnterFrame = runMissle;
_local1.m2.onEnterFrame = runMissle;
_local1.m3.onEnterFrame = runMissle;
soundLaser3.start();
} else if (_local2.bonus == 4) {
_local1.m2.onEnterFrame = runMissle;
_local1.m3.onEnterFrame = runMissle;
_local1.m4.onEnterFrame = runMissle;
_local1.m5.onEnterFrame = runMissle;
soundLaser3.start();
} else if (_local2.bonus == 5) {
_local1.m2.onEnterFrame = runMissle;
_local1.m3.onEnterFrame = runMissle;
_local1.m4.onEnterFrame = runMissle;
_local1.m5.onEnterFrame = runMissle;
soundLaser3.start();
}
}
function runMissle() {
var _local1 = this;
var _local2 = _root;
if (_local2.pausePress == false) {
if ((_local1._parent._y > -400) && (_local1._parent._y < 350)) {
if (_local2.bonus > 3) {
_local1._parent._y = _local1._parent._y - 7;
} else {
_local1._parent._y = _local1._parent._y - shipMissleSpeed;
}
if (_local1.hitTest(_local2.missleAreaClip) == false) {
_local1.gotoAndStop(2);
}
if (_local1.hitTest(_local2.gContainer_mc.gTarget_mc1)) {
_local1.gotoAndStop(2);
missleStatus(1, _local1);
} else if (_local1.hitTest(_local2.gContainer_mc.gTarget_mc2)) {
_local1.gotoAndStop(2);
missleStatus(2, _local1);
} else if (_local1.hitTest(_local2.gContainer_mc.gTarget_mc3)) {
_local1.gotoAndStop(2);
missleStatus(3, _local1);
} else if (_local1.hitTest(_local2.gContainer_mc.gTarget_mc4)) {
_local1.gotoAndStop(2);
missleStatus(4, _local1);
} else if (_local1.hitTest(_local2.gContainer_mc.gTarget_mc5)) {
_local1.gotoAndStop(2);
missleStatus(5, _local1);
} else if (_local1.hitTest(_local2.gContainer_mc.gTarget_mc6)) {
_local1.gotoAndStop(2);
missleStatus(6, _local1);
} else if (_local1.hitTest(_local2.gContainer_mc.gTarget_mc7)) {
_local1.gotoAndStop(2);
missleStatus(7, _local1);
} else if (_local1.hitTest(_local2.gContainer_mc.gTarget_mc8)) {
_local1.gotoAndStop(2);
missleStatus(8, _local1);
} else if (_local1.hitTest(_local2.gContainer_mc.gTarget_mc9)) {
_local1.gotoAndStop(2);
missleStatus(9, _local1);
} else if (_local1.hitTest(_local2.gContainer_mc.gTarget_mc10)) {
_local1.gotoAndStop(2);
missleStatus(10, _local1);
} else if (_local1.hitTest(_local2.gContainer_mc.gTarget_mc11)) {
_local1.gotoAndStop(2);
missleStatus(11, _local1);
} else if (_local1.hitTest(_local2.gContainer_mc.gTarget_mc12)) {
_local1.gotoAndStop(2);
missleStatus(12, _local1);
} else if (_local1.hitTest(_local2.gContainer_mc.gTarget_mc13)) {
_local1.gotoAndStop(2);
missleStatus(13, _local1);
} else if (_local1.hitTest(_local2.gContainer_mc.gTarget_mc14)) {
_local1.gotoAndStop(2);
missleStatus(14, _local1);
} else if (_local1.hitTest(_local2.gContainer_mc.gTarget_mc15)) {
_local1.gotoAndStop(2);
missleStatus(15, _local1);
} else if (_local1.hitTest(_local2.gTarget_mc16)) {
_local1.gotoAndStop(2);
missleStatus(16, _local1);
} else if (_local1.hitTest(_local2.gTarget_mc17)) {
_local1.gotoAndStop(2);
missleStatus(17, _local1);
} else if (_local1.hitTest(_local2.gTarget_mc18)) {
_local1.gotoAndStop(2);
missleStatus(18, _local1);
}
} else {
removeMovieClip(_local1._parent);
}
}
}
function missleStatus(num, mc) {
var _local1 = _root;
var _local2 = num;
if (_local1.pausePress == false) {
if (_local2 != 0) {
if (_local2 < 16) {
var _local3 = _local1.gContainer_mc["gTarget_mc" + _local2];
} else {
var _local3 = _local1["gTarget_mc" + _local2];
}
_local3.enemyPower--;
if (_local3.enemyPower == 0) {
var point = new Object();
point.x = _local3._x;
point.y = _local3._y;
if ((_local2 == 17) || (_local2 == 18)) {
_local1.newFooter.score = _local1.newFooter.score + 250;
_local1.dbInterface.updateScore(_local1.newFooter.score);
_local1.lifeCheck = _local1.lifeCheck + 250;
} else {
_local1.newFooter.score = _local1.newFooter.score + (30 * _local1.totalPatternDone);
_local1.dbInterface.updateScore(_local1.newFooter.score);
_local1.lifeCheck = _local1.lifeCheck + (30 * _local1.totalPatternDone);
}
removeMovieClip(_local3);
if (_local2 < 16) {
var explod = _local1.gContainer_mc.attachMovie("explod_mc", "explod_mc" + _local2, 100 + _local2);
if (random(100) > 70) {
var explodBonus = _local1.attachMovie("extraBonusClip", "extraBonusClip" + _local2, 200 + _local2);
}
} else if (_local2 == 16) {
var explod = _local1.attachMovie("explodMonster_mc", "explodMonster_mc", 1015);
_local1.randomMonster = true;
_local1.ctrMonster = 0;
_local1.newFooter.score = _local1.newFooter.score + 50;
_local1.dbInterface.updateScore(_local1.newFooter.score);
_local1.lifeCheck = _local1.lifeCheck + 50;
if (random(100) > 50) {
var explodBonus = _local1.attachMovie("extraBonusClip75", "extraBonusClip75", 1017);
}
} else {
var explod = _local1.attachMovie("SpikyBlastClip", "SpikyBlastClip", 1025);
if (_local2 == 17) {
sbhit1 = true;
} else if (_local2 == 18) {
sbhit2 = true;
}
if ((sbhit1 == true) && (sbhit2 == true)) {
_local1.randomSpikyBalls = true;
_local1.ctrSpikyBall = 0;
}
}
explod._x = point.x;
explod._y = point.y;
targetTemp = new Object();
targetTemp.x = explod._x;
targetTemp.y = explod._y;
if (_local2 < 16) {
_local1.gContainer_mc.localToGlobal(targetTemp);
} else if (_local2 == 16) {
_local1.localToGlobal(targetTemp);
}
explodBonus._x = targetTemp.x;
explodBonus._y = targetTemp.y;
} else if (_local2 < 16) {
_local3._alpha = 100 / _local1.level;
} else {
_local3._alpha = 50;
}
if (mc != _local1.ship) {
removeMovieClip(mc);
} else if ((_local1.shipImmune == false) && (_local1.ship._currentframe == 1)) {
_local1.shield++;
_local1.ship.play();
}
}
}
}
function genrateRandomBonus() {
var _local1 = _root;
var _local2 = this;
_local1.randomBonus = false;
var hit = false;
var ran = (random(5) + 1);
var _local3 = _local1.attachMovie("bonus" + ran, "bonus_mc", 1000);
_local3._x = 10 + random(400);
_local3._y = -20;
var speed = (random(10) + 2);
_local3.onEnterFrame = function () {
var _local1 = _root;
var _local2 = this;
if (_local1.pausePress == false) {
if (_local2._y < 350) {
_local2._y = _local2._y + speed;
if (_local2.hitTest(_local1.ship.hitter) && (hit == false)) {
_local1.ship.glow.gotoAndPlay(2);
var _local3 = new Object();
_local3.x = _local2._x;
_local3.y = _local2._y;
_local2.gotoAndPlay(2);
if (_local1.shipPower < 5) {
_local1.bonus++;
_local1.shipPower++;
}
if (_local1.shipPower != 5) {
_local1.newFooter.score = _local1.newFooter.score + 10;
_local1.dbInterface.updateScore(_local1.newFooter.score);
_local1.lifeCheck = _local1.lifeCheck + 10;
} else {
_local1.newFooter.score = _local1.newFooter.score + 100;
_local1.dbInterface.updateScore(_local1.newFooter.score);
_local1.lifeCheck = _local1.lifeCheck + 100;
}
hit = true;
}
} else {
_local1.randomBonus = true;
_local1.ctrBonus = 0;
removeMovieClip(_local2);
}
}
};
}
function genrateRandomMonster() {
var _local1 = _root;
var _local2 = this;
_local1.cross_hairs._x = _local1.crossHairsX;
_local1.cross_hairs._y = _local1.crossHairsY;
_local1.randomMonster = false;
var mhit = false;
var mc = _local1.attachMovie("monster", "gTarget_mc16", 1100);
_local1.MonsterName = mc;
mc._x = _local1.ship._x;
mc._y = -50;
mc.enemyPower = 10;
var speed = (random(10) + 2);
radius = 120;
degrees = 0;
Pcheck1 = 1;
Pcheck2 = 1;
Pcheck3 = 1;
mc.onEnterFrame = function () {
var _local1 = _root;
var _local2 = this;
if (_local1.pausePress == false) {
if (_local1.levelOver == 1) {
_local1.levelOver = 0;
_local1.cross_hairs._x = _local1.crossHairsX;
_local1.cross_hairs._y = _local1.crossHairsY;
_local1.randomMonster = true;
_local1.ctrMonster = 0;
removeMovieClip(_local2);
}
if (_local1.Mpattern1 == true) {
if (Pcheck1 == 1) {
Pcheck1 = 0;
P1moves = true;
mc._x = -20;
mc._y = 70;
}
}
if (_local1.Mpattern2 == true) {
if (Pcheck2 == 1) {
Pcheck2 = 0;
mc._x = 600;
mc._y = 70;
}
}
if (_local1.Mpattern3 == true) {
if (Pcheck3 == 1) {
Pcheck3 = 0;
mc._x = -30;
mc._y = 40;
}
}
if (_local2._y < 370) {
if (mhit == false) {
if (_local1.Mpattern1 == true) {
if (p1moves == true) {
_local2._x = _local2._x + speed;
if (_local2._x > 550) {
p1moves = false;
_local2._y = _local2._y + 30;
}
} else if (p1moves == false) {
_local2._x = _local2._x - speed;
if (_local2._x < 30) {
p1moves = true;
_local2._y = _local2._y + 30;
}
}
}
if (_local1.Mpattern2 == true) {
if (_local2._x <= 600) {
_local2._x = _local2._x - speed;
}
if (_local2._x < 30) {
_local2._x = 600;
}
}
if (_local1.Mpattern3 == true) {
angle = degrees * (Math.PI/180);
degrees = degrees + 2;
xpos = radius * Math.cos(angle);
ypos = radius * Math.sin(angle);
_local2._x = xpos + _local1.cross_hairs._x;
_local2._y = ypos + _local1.cross_hairs._y;
_local1.cross_hairs._y = _local1.cross_hairs._y + 0.2;
}
if (_local2.hitTest(_local1.ship.hitter)) {
var _local3 = new Object();
_local3.x = _local2._x;
_local3.y = _local2._y;
removeMovieClip(_local2);
var explod = _local1.attachMovie("explodMonster_mc", "explodMonster_mc", 1115);
explod._x = _local3.x;
explod._y = _local3.y;
_local1.randomMonster = true;
_local1.ctrMonster = 0;
if ((_local1.shipImmune == false) && (_local1.ship._currentframe == 1)) {
_local1.countoff = true;
_local1.shield++;
_local1.ship.play();
}
mhit = true;
}
}
} else {
_local1.cross_hairs._x = _local1.crossHairsX;
_local1.cross_hairs._y = _local1.crossHairsY;
_local1.randomMonster = true;
_local1.ctrMonster = 0;
removeMovieClip(_local2);
}
}
};
}
function genrateSpikyBalls() {
var _local1 = _root;
var _local2 = this;
_local1.randomSpikyBalls = false;
sbhit1 = false;
sbhit2 = false;
var mc1 = _local1.attachMovie("spikyBall", "gTarget_mc17", 1110);
var mc2 = _local1.attachMovie("spikyBall", "gTarget_mc18", 1111);
mc1._x = 70;
mc1._y = -20;
mc2._x = 530;
mc2._y = -20;
mc1.enemyPower = 5;
mc2.enemyPower = 5;
spikyHMovement = 7;
var speed = 2;
var horiMovementBoolean = false;
mc1.onEnterFrame = function () {
var _local1 = _root;
var _local2 = this;
if (_local1.pausePress == false) {
if (_local2._y < 350) {
if (sbhit1 == false) {
if (horiMovementBoolean == false) {
_local2._y = _local2._y + speed;
}
if (_local2.hitTest(mc2)) {
var point = new Object();
point.x = _local2._x;
point.y = _local2._y;
removeMovieClip(_local2);
var explod = _local1.attachMovie("SpikyBlastClip", "SpikyBlastClip1", 1025);
explod._x = point.x;
explod._y = point.y;
var _local3 = new Object();
_local3.x = mc2._x;
_local3.y = mc2._y;
removeMovieClip(mc2);
var explod2 = _local1.attachMovie("SpikyBlastClip", "SpikyBlastClip2", 1026);
explod2._x = _local3.x;
explod2._y = _local3.y;
_local1.newFooter.score = _local1.newFooter.score + 500;
_local1.dbInterface.updateScore(_local1.newFooter.score);
_local1.lifeCheck = _local1.lifeCheck + 500;
sbhit1 = true;
sbhit2 = true;
_local1.randomSpikyBalls = true;
_local1.ctrSpikyBall = 0;
} else if (_local2.hitTest(_local1.ship.hitter) || ((_local1.ship._currentframe != 1) && (sbhit1 == false))) {
var point = new Object();
point.x = _local2._x;
point.y = _local2._y;
removeMovieClip(_local2);
var explod = _local1.attachMovie("SpikyBlastClip", "SpikyBlastClip1", 1025);
explod._x = point.x;
explod._y = point.y;
if ((_local1.shipImmune == false) && (_local1.ship._currentframe == 1)) {
_local1.countoff = true;
_local1.shield++;
_local1.ship.play();
}
sbhit1 = true;
if ((sbhit1 == true) && (sbhit2 == true)) {
_local1.randomSpikyBalls = true;
_local1.ctrSpikyBall = 0;
}
} else {
spikyLowerLimit = _local2._y - 10;
spikyUpperLimit = _local2._y + 10;
if ((spikyLowerLimit < _local1.ship._y) && (spikyUpperLimit > _local1.ship._y)) {
horiMovementBoolean = true;
}
if (horiMovementBoolean == true) {
_local2._x = _local2._x + spikyHMovement;
}
if (_local2._x > 600) {
_local1.randomSpikyBalls = true;
_local1.ctrSpikyBall = 0;
removeMovieClip(_local2);
}
}
}
} else {
_local1.randomSpikyBalls = true;
_local1.ctrSpikyBall = 0;
removeMovieClip(_local2);
}
}
};
mc2.onEnterFrame = function () {
var _local1 = _root;
var _local2 = this;
if (_local1.pausePress == false) {
if (_local2._y < 350) {
if (sbhit2 == false) {
if (horiMovementBoolean == false) {
_local2._y = _local2._y + speed;
}
if (_local2.hitTest(_local1.ship.hitter) || ((_local1.ship._currentframe != 1) && (sbhit2 == false))) {
var _local3 = new Object();
_local3.x = _local2._x;
_local3.y = _local2._y;
removeMovieClip(_local2);
var explod = _local1.attachMovie("SpikyBlastClip", "SpikyBlastClip2", 1026);
explod._x = _local3.x;
explod._y = _local3.y;
if ((_local1.shipImmune == false) && (_local1.ship._currentframe == 1)) {
_local1.countoff = true;
_local1.shield++;
_local1.ship.play();
}
sbhit2 = true;
if ((sbhit1 == true) && (sbhit2 == true)) {
_local1.randomSpikyBalls = true;
_local1.ctrSpikyBall = 0;
}
} else {
spikyLowerLimit = _local2._y - 10;
spikyUpperLimit = _local2._y + 10;
if ((spikyLowerLimit < _local1.ship._y) && (spikyUpperLimit > _local1.ship._y)) {
horiMovementBoolean = true;
}
if (horiMovementBoolean == true) {
_local2._x = _local2._x - spikyHMovement;
}
if (_local2._x < 0) {
_local1.randomSpikyBalls = true;
_local1.ctrSpikyBall = 0;
removeMovieClip(_local2);
}
}
}
} else {
_local1.randomSpikyBalls = true;
_local1.ctrSpikyBall = 0;
removeMovieClip(_local2);
}
}
};
}
function monsterFire() {
var _local1 = _root;
var _local3 = this;
_local1.monsterFireCtr++;
var mc1 = _local1.attachMovie("enemyLaser_mc", "enemyLaser_mc" + _local1.monsterFireCtr, 2820 + _local1.monsterFireCtr);
var _local2 = new Object();
_local2.x = _local1.monsterName._x - 10;
_local2.y = _local1.monsterName._y;
mc1._x = _local2.x;
mc1._y = _local2.y;
var speed = (random(10) + 2);
mc1.onEnterFrame = function () {
var _local1 = _root;
var _local2 = this;
if (_local1.pausePress == false) {
if (_local2._y < 350) {
_local2._y = _local2._y + speed;
if (_local2.hitTest(_local1.ship.hitter) && (_local1.ship._currentframe == 1)) {
removeMovieClip(_local2);
if (_local1.shipImmune == false) {
_local1.countoff = true;
_local1.shield++;
_local1.ship.play();
}
}
} else {
removeMovieClip(_local2);
}
}
};
}
function enemyFire(num) {
var _local1 = _root;
var target = _local1.gContainer_mc["gTarget_mc" + num];
if (target) {
_local1.enemyFireCtr++;
var _local3 = _local1.attachMovie("enemyLaser_mc", "enemyLaser_mc" + _local1.enemyFireCtr, 2000 + _local1.enemyFireCtr);
var _local2 = new Object();
_local2.x = target._x;
_local2.y = target._y;
_local1.gContainer_mc.localToGlobal(_local2);
_local3._x = _local2.x;
_local3._y = _local2.y;
var speed = (random(10) + 2);
_local3.onEnterFrame = function () {
var _local1 = _root;
var _local2 = this;
if (_local1.pausePress == false) {
if (_local2._y < 350) {
_local2._y = _local2._y + speed;
if (_local2.hitTest(_local1.ship.hitter) && (_local1.ship._currentframe == 1)) {
removeMovieClip(_local2);
if (_local1.shipImmune == false) {
_local1.countoff = true;
_local1.shield++;
_local1.ship.play();
}
}
} else {
removeMovieClip(_local2);
}
}
};
}
}
sObj = new Sound();
sObj.attachSound("bgMusicNew");
_root.volume1 = 100;
sObj.setVolume(_root.volume1);
sObj.start(0, 10000);
if (stopVar == undefined) {
stop();
stopVar = 1;
}
powerUpSound1 = new Sound();
powerUpSound2 = new Sound();
powerUpSound3 = new Sound();
powerUpSound1.attachSound("powerup1");
powerUpSound2.attachSound("powerup2");
powerUpSound3.attachSound("powerup3");
levelComObject = new Sound();
levelUpObject = new Sound();
extraLifeObject = new Sound();
levelComObject.attachSound("levelCompleteSound");
levelUpObject.attachSound("levelUpSound");
extraLifeObject.attachSound("extraLifeSound");
playonce = 0;
_root.levelOver = 0;
Instance of Symbol 184 MovieClip in Frame 1
onClipEvent (load) {
this.swapDepths(1299999);
}
Instance of Symbol 212 MovieClip "loadingClip" in Frame 1
onClipEvent (load) {
_parent.loadDep = this.getDepth();
this.swapDepths(1299998);
}
Instance of Symbol 219 MovieClip "cross_hairs" in Frame 1
onClipEvent (load) {
_root.crossHairsX = this._x;
_root.crossHairsY = this._y;
}
Instance of Symbol 221 MovieClip in Frame 1
/* no clip actions */
Instance of Symbol 223 MovieClip in Frame 1
onClipEvent (load) {
_root.pausePress = false;
}
onClipEvent (enterFrame) {
if (_root.pausePress == true) {
_root.volume1 = 0;
_root.sObj.setVolume(_root.volume1);
}
if (_root.pausePress == false) {
_root.volume1 = 100;
_root.sObj.setVolume(_root.volume1);
}
}
Instance of Symbol 241 MovieClip "bar" in Frame 1
onClipEvent (load) {
_parent.barDep = this.getDepth();
this.swapDepths(1299995);
}
Instance of Symbol 302 MovieClip "pause_mc" in Frame 1
onClipEvent (load) {
_parent.pauseDep = this.getDepth();
this.swapDepths(1299996);
}
Instance of Symbol 340 MovieClip "newFooter" in Frame 1
onClipEvent (load) {
_parent.shildDep = this.getDepth();
this.swapDepths(1299994);
}
Instance of Symbol 347 MovieClip "titleClip" in Frame 1
onClipEvent (load) {
_parent.titleDep = this.getDepth();
this.swapDepths(1299992);
}
Frame 2
function resetTimer() {
var _local1 = _root;
if (_local1.ship._currentframe == 1) {
var temp = (160 - Math.round(_local1.percent));
_local1.percent = Math.round(_local1.percent);
_local1.createEmptyMovieClip("timerReset_mc", 30000);
_local1.timerReset_mc.onEnterFrame = function () {
var _local1 = _root;
if (_local1.pausePress == false) {
_local1.percent++;
if (temp != 0) {
_local1.newFooter.score++;
_local1.dbInterface.updateScore(_local1.newFooter.score);
_local1.lifeCheck++;
temp--;
}
if ((_local1.ship._currentframe != 1) && (_local1.percent < 160)) {
_local1.timer = 0;
genrateNewPattern(_local1.pattern);
removeMovieClip(this);
}
setProperty("bar", _x , _local1.percent);
if (_local1.percent > 160) {
_local1.timer = 0;
genrateNewPattern(_local1.pattern);
removeMovieClip(this);
}
}
};
} else {
_local1.timer = 0;
genrateNewPattern(_local1.pattern);
}
}
var Redge;
_global.enemyHit = 0;
var Ledge;
var frameRate = 30;
var timer = 0;
var initialTime = 20;
var gamePaused = false;
var shipPower;
var percent = 0;
var Uedge;
var Dedge;
var shipSpeed = 7;
var shipMissleSpeed = 12;
var shipDead = false;
var sy = ship._y;
var ang = 0;
var shield;
var shipImmune;
_root.Redge = 600 - (ship._width / 2);
_root.Ledge = 0 + (ship._width / 2);
_root.Updge = 10 + (ship._height / 2);
_root.Downdge = 360 - (ship._height / 2);
_root.Uedge = 380 - (ship._height / 2);
_root.Dedge = 0 + (ship._height / 2);
var randomBonus = true;
var randomMonster = true;
var randomSpikyBalls = true;
var spikyBallDelay = 1440;
var regenerateBonus = 0;
var regenerateMonster = 0;
var spikyBallRandomTime = random(spikyBallDelay);
var enemyMissleCtr = 0;
var monsterMissleCtr = 0;
var startX;
var startY;
stop();
var ctr = 0;
var ctr1 = 0;
var ctrBonus = 0;
var ctrMonster = 0;
var ctrSpikyBall = 0;
var ctrMove = 0;
var l = 0;
_root.allow = true;
_root.newFooter.score = 0;
_root.dbInterface.updateScore(_root.newFooter.score);
var lifeCheck = 0;
var enemyFireCtr = 0;
var monsterFireCtr = 0;
var pattern;
var patternCount = 8;
var levelCount = 3;
var enemyCount = 15;
var temp = 0;
var bonus;
var timerUnit;
var totalPatternDone;
var soundLaser1 = new Sound();
soundLaser1.attachSound("sound1");
var soundLaser2 = new Sound();
soundLaser2.attachSound("sound2");
var soundLaser3 = new Sound();
soundLaser3.attachSound("sound3");
var sndObj = new Sound();
this.sndObj.attachSound("sp031");
this.sndObj.start(0, 1000000);
_root.createEmptyMovieClip("main_mc", 10000);
main_mc.onEnterFrame = function () {
var _local1 = _root;
var _local2 = _global;
if (_local1.pausePress == false) {
if ((_local1._currentframe == 2) && (_local1.gamePaused == false)) {
if (_local2.enemyHit == _local1.enemyCount) {
trace("LEVEL COMPLETED ___________");
_local1.completedLevel = 1;
_local1.levelComObject.start();
_local1.pattern = _local1.pattern + 1;
_local1.totalPatternDone++;
_local1.gamePaused = true;
if (_local1.pattern == 11) {
_local1.pattern = 1;
resetTimer();
checkLevel();
} else if (_local1.pattern < 11) {
if ((_local1.completedLevel == 1) && (_local1.shipDestroy == 1)) {
_local1.timer = 0;
genrateNewPattern(_local1.pattern);
_local1.completedLevel = 0;
_local1.shipDestroy = 0;
} else {
resetTimer();
}
}
_local2.enemyHit = 0;
_local1.enemyArr = [];
}
if (_local1.pattern < 3) {
if (gContainer_mc._x < 610) {
gContainer_mc._x = gContainer_mc._x + 6;
} else if (gContainer_mc._x >= 610) {
_local1.gContainer_mc._x = _local1.startX;
_local1.gContainer_mc._y = _local1.StartY;
}
} else if ((_local1.pattern >= 3) && (_local1.pattern <= 6)) {
if (gContainer_mc._y < 380) {
if (_local1.ctrMove < 50) {
gContainer_mc._y = gContainer_mc._y + 2;
_local1.ctrMove = _local1.ctrMove + 1;
} else if ((_local1.ctrMove >= 50) && (_local1.ctrMove < 100)) {
gContainer_mc._x = gContainer_mc._x + 2;
_local1.ctrMove = _local1.ctrMove + 2;
} else if ((_local1.ctrMove >= 100) && (_local1.ctrMove < 150)) {
gContainer_mc._y = gContainer_mc._y + 2;
_local1.ctrMove = _local1.ctrMove + 2;
} else if ((_local1.ctrMove >= 150) && (_local1.ctrMove < 200)) {
gContainer_mc._x = gContainer_mc._x - 2;
_local1.ctrMove = _local1.ctrMove + 1;
} else if ((_local1.ctrMove >= 200) && (_local1.ctrMove < 250)) {
gContainer_mc._y = gContainer_mc._y + 2;
_local1.ctrMove = _local1.ctrMove + 2;
} else if ((_local1.ctrMove >= 250) && (_local1.ctrMove < 300)) {
gContainer_mc._x = gContainer_mc._x + 2;
_local1.ctrMove = _local1.ctrMove + 1;
} else if ((_local1.ctrMove >= 300) && (_local1.ctrMove < 350)) {
gContainer_mc._y = gContainer_mc._y + 2;
_local1.ctrMove = _local1.ctrMove + 2;
} else if ((_local1.ctrMove >= 350) && (_local1.ctrMove < 400)) {
gContainer_mc._x = gContainer_mc._x - 2;
_local1.ctrMove = _local1.ctrMove + 1;
} else if ((_local1.ctrMove >= 400) && (_local1.ctrMove < 450)) {
gContainer_mc._y = gContainer_mc._y + 2;
_local1.ctrMove = _local1.ctrMove + 2;
} else if ((_local1.ctrMove >= 450) && (_local1.ctrMove < 500)) {
gContainer_mc._x = gContainer_mc._x + 2;
_local1.ctrMove = _local1.ctrMove + 1;
} else if ((_local1.ctrMove >= 500) && (_local1.ctrMove < 550)) {
gContainer_mc._y = gContainer_mc._y + 2;
_local1.ctrMove = _local1.ctrMove + 2;
} else if ((_local1.ctrMove >= 550) && (_local1.ctrMove < 600)) {
gContainer_mc._x = gContainer_mc._x - 2;
_local1.ctrMove = _local1.ctrMove + 1;
} else if (_local1.ctrMove >= 600) {
gContainer_mc._y = gContainer_mc._y + 2;
_local1.ctrMove = _local1.ctrMove + 1;
}
} else if (gContainer_mc._y >= 380) {
_local1.ctrMove = 0;
_local1.gContainer_mc._x = _local1.startX;
_local1.gContainer_mc._y = _local1.StartY;
}
} else if ((_local1.pattern >= 7) && (_local1.pattern <= 8)) {
if (gContainer_mc._y < 380) {
if (_local1.ctrMove < 50) {
gContainer_mc._y = gContainer_mc._y + 2;
_local1.ctrMove = _local1.ctrMove + 1;
} else if ((_local1.ctrMove >= 50) && (_local1.ctrMove < 100)) {
gContainer_mc._x = gContainer_mc._x + 2;
_local1.ctrMove = _local1.ctrMove + 2;
} else if ((_local1.ctrMove >= 100) && (_local1.ctrMove < 150)) {
gContainer_mc._y = gContainer_mc._y + 4;
_local1.ctrMove = _local1.ctrMove + 4;
} else if ((_local1.ctrMove >= 150) && (_local1.ctrMove < 200)) {
gContainer_mc._x = gContainer_mc._x - 2;
_local1.ctrMove = _local1.ctrMove + 1;
} else if ((_local1.ctrMove >= 200) && (_local1.ctrMove < 250)) {
gContainer_mc._y = gContainer_mc._y + 4;
_local1.ctrMove = _local1.ctrMove + 4;
} else if ((_local1.ctrMove >= 250) && (_local1.ctrMove < 300)) {
gContainer_mc._x = gContainer_mc._x + 2;
_local1.ctrMove = _local1.ctrMove + 1;
} else if ((_local1.ctrMove >= 300) && (_local1.ctrMove < 350)) {
gContainer_mc._y = gContainer_mc._y + 4;
_local1.ctrMove = _local1.ctrMove + 4;
} else if ((_local1.ctrMove >= 350) && (_local1.ctrMove < 400)) {
gContainer_mc._x = gContainer_mc._x - 2;
_local1.ctrMove = _local1.ctrMove + 1;
} else if ((_local1.ctrMove >= 400) && (_local1.ctrMove < 450)) {
gContainer_mc._y = gContainer_mc._y + 4;
_local1.ctrMove = _local1.ctrMove + 4;
} else if ((_local1.ctrMove >= 450) && (_local1.ctrMove < 500)) {
gContainer_mc._x = gContainer_mc._x + 2;
_local1.ctrMove = _local1.ctrMove + 1;
} else if ((_local1.ctrMove >= 500) && (_local1.ctrMove < 550)) {
gContainer_mc._y = gContainer_mc._y + 4;
_local1.ctrMove = _local1.ctrMove + 4;
} else if ((_local1.ctrMove >= 550) && (_local1.ctrMove < 600)) {
gContainer_mc._x = gContainer_mc._x - 2;
_local1.ctrMove = _local1.ctrMove + 1;
} else if (_local1.ctrMove >= 600) {
gContainer_mc._y = gContainer_mc._y + 4;
_local1.ctrMove = _local1.ctrMove + 4;
}
} else if (gContainer_mc._y >= 380) {
_local1.ctrMove = 0;
_local1.gContainer_mc._x = _local1.startX;
_local1.gContainer_mc._y = _local1.StartY;
}
} else if ((_local1.pattern >= 9) && (_local1.pattern <= 10)) {
if (gContainer_mc._y < 380) {
if (_local1.ctrMove < 50) {
gContainer_mc._y = gContainer_mc._y + 2;
_local1.ctrMove = _local1.ctrMove + 1;
} else if ((_local1.ctrMove >= 50) && (_local1.ctrMove < 100)) {
gContainer_mc._x = gContainer_mc._x + 2;
_local1.ctrMove = _local1.ctrMove + 2;
} else if ((_local1.ctrMove >= 100) && (_local1.ctrMove < 150)) {
gContainer_mc._y = gContainer_mc._y + 4;
_local1.ctrMove = _local1.ctrMove + 4;
} else if ((_local1.ctrMove >= 150) && (_local1.ctrMove < 200)) {
gContainer_mc._x = gContainer_mc._x - 2;
_local1.ctrMove = _local1.ctrMove + 1;
} else if ((_local1.ctrMove >= 200) && (_local1.ctrMove < 250)) {
gContainer_mc._y = gContainer_mc._y + 4;
_local1.ctrMove = _local1.ctrMove + 4;
} else if ((_local1.ctrMove >= 250) && (_local1.ctrMove < 300)) {
gContainer_mc._x = gContainer_mc._x + 2;
_local1.ctrMove = _local1.ctrMove + 1;
} else if ((_local1.ctrMove >= 300) && (_local1.ctrMove < 350)) {
gContainer_mc._y = gContainer_mc._y + 4;
_local1.ctrMove = _local1.ctrMove + 4;
} else if ((_local1.ctrMove >= 350) && (_local1.ctrMove < 400)) {
gContainer_mc._x = gContainer_mc._x - 2;
_local1.ctrMove = _local1.ctrMove + 1;
} else if ((_local1.ctrMove >= 400) && (_local1.ctrMove < 450)) {
gContainer_mc._y = gContainer_mc._y + 4;
_local1.ctrMove = _local1.ctrMove + 4;
} else if ((_local1.ctrMove >= 450) && (_local1.ctrMove < 500)) {
gContainer_mc._x = gContainer_mc._x + 2;
_local1.ctrMove = _local1.ctrMove + 1;
} else if ((_local1.ctrMove >= 500) && (_local1.ctrMove < 550)) {
gContainer_mc._y = gContainer_mc._y + 4;
_local1.ctrMove = _local1.ctrMove + 4;
} else if ((_local1.ctrMove >= 550) && (_local1.ctrMove < 600)) {
gContainer_mc._x = gContainer_mc._x - 2;
_local1.ctrMove = _local1.ctrMove + 1;
} else if (_local1.ctrMove >= 600) {
gContainer_mc._y = gContainer_mc._y + 4;
_local1.ctrMove = _local1.ctrMove + 4;
}
} else if (gContainer_mc._y >= 380) {
_local1.ctrMove = 0;
_local1.gContainer_mc._x = _local1.startX;
_local1.gContainer_mc._y = _local1.StartY;
}
}
if ((_local1.ctrBonus == 100) && (_local1.randomBonus == false)) {
_local1.regenerateBonus++;
if (_local1.regenerateBonus >= 500) {
_local1.randomBonus = true;
}
}
if (_local1.ctrBonus < 100) {
_local1.ctrBonus++;
} else if ((_local1.ctrBonus == 100) && (_local1.randomBonus == true)) {
_local1.regenerateBonus = 0;
genrateRandomBonus();
}
if (((_local1.ctrMonster == 50) && (_local1.randomMonster == false)) && (_local1.pattern > 6)) {
_local1.regenerateMonster++;
if (_local1.regenerateMonster >= 800) {
trace("regenerate Monster ***********************");
_local1.randomMonster = true;
}
}
if ((_local1.ctrMonster < 50) && (_local1.pattern > 6)) {
_local1.ctrMonster++;
} else if ((_local1.ctrMonster == 50) && (_local1.randomMonster == true)) {
_local1.Mpattern1 = false;
_local1.Mpattern2 = false;
_local1.Mpattern3 = false;
_local1.regenerateMonster = 0;
genrateRandomMonster();
}
if ((_local1.ctrSpikyBall < (50 + spikyBallRandomTime)) && (_local1.pattern > 2)) {
_local1.ctrSpikyBall++;
} else if ((_local1.ctrSpikyBall == (50 + spikyBallRandomTime)) && (_local1.randomSpikyBalls == true)) {
spikyBallRandomTime = random(spikyBallDelay) + 100;
genrateSpikyBalls();
}
if (_local1.lifeCheck >= 35000) {
if (_local1.shield == 2) {
_local1.extraLife.gotoAndPlay(2);
_local1.shield--;
_local1.newFooter.myLife2._visible = true;
_local1.extraLifeObject.start();
} else if (_local1.shield == 1) {
_local1.extraLife.gotoAndPlay(2);
_local1.shield--;
_local1.newFooter.myLife1._visible = true;
_local1.newFooter.myLife2._visible = true;
_local1.extraLifeObject.start();
}
_local1.lifeCheck = 0;
}
if (_local1.enemyMissleCtr < 15) {
_local1.enemyMissleCtr++;
} else if (_local1.enemyMissleCtr >= 15) {
_local1.enemyMissleCtr = 0;
var _local3 = random(15) + 1;
enemyFire(_local3);
}
if (_local1.monsterMissleCtr < 25) {
_local1.monsterMissleCtr++;
} else if ((_local1.monsterMissleCtr >= 25) && (_local1.pattern > 6)) {
_local1.monsterMissleCtr = 0;
monsterFire();
}
if (_local1.timer == 0) {
_local1.percent = 0;
}
_local1.timer = _local1.timer + _local1.timerUnit;
_local1.percent = (_local1.timer / (_local1.initialTime * _local1.frameRate)) * 160;
setProperty("bar", _x , _local1.percent);
if (_local1.timer >= (_local1.initialTime * _local1.frameRate)) {
if (_local2.enemyHit <= _local1.enemyCount) {
_local1.gamePaused = true;
if (_local1.ship._currentframe == 1) {
_local1.shipDestroy = 1;
_local1.shield++;
_local1.ship.play(2);
}
}
}
}
}
};
ship.onEnterFrame = function () {
var _local1 = _root;
var _local2 = this;
if (_local1.pausePress == false) {
if (ship._currentframe == 1) {
if (_local2.hitTest(_local1.gContainer_mc)) {
if (_local2.hitter.hitTest(_local1.gContainer_mc.gTarget_mc1)) {
if (_local1.shipImmune == false) {
missleStatus(1, _local2);
}
} else if (_local2.hitter.hitTest(_local1.gContainer_mc.gTarget_mc2)) {
if (_local1.shipImmune == false) {
missleStatus(2, _local2);
}
} else if (_local2.hitter.hitTest(_local1.gContainer_mc.gTarget_mc3)) {
if (_local1.shipImmune == false) {
missleStatus(3, _local2);
}
} else if (_local2.hitter.hitTest(_local1.gContainer_mc.gTarget_mc4)) {
if (_local1.shipImmune == false) {
missleStatus(4, _local2);
}
} else if (_local2.hitter.hitTest(_local1.gContainer_mc.gTarget_mc5)) {
if (_local1.shipImmune == false) {
missleStatus(5, _local2);
}
} else if (_local2.hitter.hitTest(_local1.gContainer_mc.gTarget_mc6)) {
if (_local1.shipImmune == false) {
missleStatus(6, _local2);
}
} else if (_local2.hitter.hitTest(_local1.gContainer_mc.gTarget_mc7)) {
if (_local1.shipImmune == false) {
missleStatus(7, _local2);
}
} else if (_local2.hitter.hitTest(_local1.gContainer_mc.gTarget_mc8)) {
if (_local1.shipImmune == false) {
missleStatus(8, _local2);
}
} else if (_local2.hitter.hitTest(_local1.gContainer_mc.gTarget_mc9)) {
if (_local1.shipImmune == false) {
missleStatus(9, _local2);
}
} else if (_local2.hitter.hitTest(_local1.gContainer_mc.gTarget_mc10)) {
if (_local1.shipImmune == false) {
missleStatus(10, _local2);
}
} else if (_local2.hitter.hitTest(_local1.gContainer_mc.gTarget_mc11)) {
if (_local1.shipImmune == false) {
missleStatus(11, _local2);
}
} else if (_local2.hitter.hitTest(_local1.gContainer_mc.gTarget_mc12)) {
if (_local1.shipImmune == false) {
missleStatus(12, _local2);
}
} else if (_local2.hitter.hitTest(_local1.gContainer_mc.gTarget_mc13)) {
if (_local1.shipImmune == false) {
missleStatus(13, _local2);
}
} else if (_local2.hitter.hitTest(_local1.gContainer_mc.gTarget_mc14)) {
if (_local1.shipImmune == false) {
missleStatus(14, _local2);
}
} else if (_local2.hitter.hitTest(_local1.gContainer_mc.gTarget_mc15)) {
if (_local1.shipImmune == false) {
missleStatus(15, _local2);
}
}
}
if (Key.isDown(39) and (ship._x <= _local1.Redge)) {
ship._x = ship._x + _local1.shipSpeed;
}
if (Key.isDown(37) and (ship._x >= _local1.Ledge)) {
ship._x = ship._x - _local1.shipSpeed;
}
if (Key.isDown(38) and (ship._y >= _local1.Updge)) {
ship._y = ship._y - _local1.shipSpeed;
}
if (Key.isDown(40) and (ship._y <= _local1.Downdge)) {
ship._y = ship._y + _local1.shipSpeed;
}
if (Key.isDown(32)) {
if (_local1.allow) {
_local1.allow = false;
_local1.hitMissle();
_local1.callTimer();
}
}
}
}
};
if (_root.pausePress == false) {
init();
genrateNewPattern(_root.pattern);
}
_root.Ftime = 1;
var keyListener = new Object();
_root.blockSpace = false;
keyListener.onKeyDown = function () {
var _local1 = _root;
if (Key.isDown(80)) {
if (_local1.blockSpace == false) {
if (_local1.Ftime == 1) {
pause_mc.gotoAndStop(2);
Ptextmc.gotoAndStop(2);
_local1.Ftime = 0;
_local1.pausePress = true;
backgroundImg.stop();
_local1.blockSpace = true;
} else if (_local1.Ftime == 0) {
pause_mc.gotoAndStop(1);
_local1.pausePress = false;
Ptextmc.gotoAndStop(1);
backgroundImg.play();
_local1.Ftime = 1;
_local1.blockSpace = true;
}
}
}
};
keyListener.onKeyUp = function () {
if (_root.blockSpace == true) {
_root.blockSpace = false;
}
};
Key.addListener(keyListener);
Instance of Symbol 358 MovieClip "Ptextmc" in Frame 2
onClipEvent (load) {
this.swapDepths(16579);
}
Frame 3
stop();
Frame 5
_root.clean();
loadingClip.swapDepths(1299998);
gameSound = true;
stopAllSounds();
bgsndClip.stop();
Symbol 15 MovieClip Frame 1
stop();
Symbol 15 MovieClip Frame 6
removeMovieClip(this._parent);
Instance of Symbol 15 MovieClip in Symbol 16 MovieClip [extraBonusClip] Frame 1
onClipEvent (load) {
hittedOnce = 0;
}
onClipEvent (enterFrame) {
if (_root.pausePress == false) {
_y = (_y + (random(6) + 2));
if (this.hitTest(_root.ship.hitter) && (hittedOnce == 0)) {
_root.newFooter.score = _root.newFooter.score + 50;
_root.dbInterface.updateScore(_root.newFooter.score);
_root.lifeCheck = _root.lifeCheck + 50;
hittedOnce = 1;
_root.powerUpSound3.start();
gotoAndPlay ("playFr");
}
if (this.hitTest(_root.newFooter)) {
gotoAndStop (6);
}
}
}
Symbol 18 MovieClip Frame 10
stop();
Symbol 20 MovieClip Frame 10
stop();
Symbol 64 MovieClip Frame 21
removeMovieClip(this._parent);
Symbol 88 MovieClip [gTarget_mc] Frame 1
stop();
Symbol 88 MovieClip [gTarget_mc] Frame 2
stop();
Symbol 88 MovieClip [gTarget_mc] Frame 3
stop();
Symbol 88 MovieClip [gTarget_mc] Frame 4
stop();
Symbol 88 MovieClip [gTarget_mc] Frame 5
stop();
Symbol 88 MovieClip [gTarget_mc] Frame 6
stop();
Symbol 88 MovieClip [gTarget_mc] Frame 7
stop();
Symbol 88 MovieClip [gTarget_mc] Frame 8
stop();
Symbol 88 MovieClip [gTarget_mc] Frame 9
stop();
Symbol 88 MovieClip [gTarget_mc] Frame 10
stop();
Symbol 130 MovieClip Frame 20
stop();
Symbol 131 MovieClip Frame 17
removeMovieClip(this._parent);
Symbol 134 MovieClip Frame 17
_root.enemyArr.push(1);
_root.totEnmyDied.push(1);
_global.enemyHit++;
removeMovieClip(this._parent);
Symbol 139 MovieClip Frame 1
stop();
Symbol 139 MovieClip Frame 2
stop();
Symbol 140 MovieClip [shipLaser2] Frame 1
stop();
Symbol 141 MovieClip Frame 1
stop();
Symbol 141 MovieClip Frame 2
stop();
Symbol 142 MovieClip [shipLaser5] Frame 1
stop();
Instance of Symbol 141 MovieClip "m5" in Symbol 142 MovieClip [shipLaser5] Frame 1
onClipEvent (enterFrame) {
_x = (_x + 35);
_y = (_y + 28);
}
Instance of Symbol 141 MovieClip "m4" in Symbol 142 MovieClip [shipLaser5] Frame 1
onClipEvent (enterFrame) {
_x = (_x - 35);
_y = (_y + 28);
}
Instance of Symbol 141 MovieClip "m3" in Symbol 142 MovieClip [shipLaser5] Frame 1
/* no clip actions */
Symbol 143 MovieClip [shipLaser4] Frame 1
stop();
Instance of Symbol 141 MovieClip "m5" in Symbol 143 MovieClip [shipLaser4] Frame 1
onClipEvent (enterFrame) {
_x = (_x + 30);
}
Instance of Symbol 141 MovieClip "m4" in Symbol 143 MovieClip [shipLaser4] Frame 1
onClipEvent (enterFrame) {
_x = (_x - 30);
}
Instance of Symbol 141 MovieClip "m3" in Symbol 143 MovieClip [shipLaser4] Frame 1
/* no clip actions */
Symbol 144 MovieClip [shipLaser3] Frame 1
stop();
Instance of Symbol 141 MovieClip "m3" in Symbol 144 MovieClip [shipLaser3] Frame 1
/* no clip actions */
Symbol 146 MovieClip Frame 1
stop();
Symbol 146 MovieClip Frame 2
stop();
Symbol 147 MovieClip [shipLaser1] Frame 1
stop();
Symbol 152 MovieClip [bonus5] Frame 1
stop();
Symbol 152 MovieClip [bonus5] Frame 2
if (_root.bonus == 1) {
_root.playonce = 0;
}
if (_root.bonus == 2) {
_root.playonce = 0;
_root.powerUpSound2.start();
}
if (_root.bonus >= 3) {
_root.playonce = _root.playonce + 1;
if (_root.playonce == 1) {
_root.powerUpSound3.start();
} else {
_root.powerUpSound1.start();
}
}
Symbol 152 MovieClip [bonus5] Frame 9
Symbol 152 MovieClip [bonus5] Frame 10
stop();
_root.randomBonus = true;
_root.ctrBonus = 0;
removeMovieClip(this._parent._parent);
Symbol 156 MovieClip [bonus4] Frame 1
stop();
Symbol 156 MovieClip [bonus4] Frame 2
if (_root.bonus == 1) {
_root.playonce = 0;
}
if (_root.bonus == 2) {
_root.playonce = 0;
_root.powerUpSound2.start();
}
if (_root.bonus >= 3) {
_root.playonce = _root.playonce + 1;
if (_root.playonce == 1) {
_root.powerUpSound3.start();
} else {
_root.powerUpSound1.start();
}
}
Symbol 156 MovieClip [bonus4] Frame 9
Symbol 156 MovieClip [bonus4] Frame 10
stop();
_root.randomBonus = true;
_root.ctrBonus = 0;
removeMovieClip(this._parent._parent);
Symbol 159 MovieClip [bonus3] Frame 1
stop();
Symbol 159 MovieClip [bonus3] Frame 2
if (_root.bonus == 1) {
_root.playonce = 0;
}
if (_root.bonus == 2) {
_root.playonce = 0;
_root.powerUpSound2.start();
}
if (_root.bonus >= 3) {
_root.playonce = _root.playonce + 1;
if (_root.playonce == 1) {
_root.powerUpSound3.start();
} else {
_root.powerUpSound1.start();
}
}
Symbol 159 MovieClip [bonus3] Frame 9
Symbol 159 MovieClip [bonus3] Frame 10
stop();
_root.randomBonus = true;
_root.ctrBonus = 0;
removeMovieClip(this._parent._parent);
Symbol 162 MovieClip [enemyLaser_mc] Frame 1
stop();
Symbol 162 MovieClip [enemyLaser_mc] Frame 2
stop();
Symbol 165 MovieClip Frame 17
_root.enemyArr.push(1);
_root.totEnmyDied.push(1);
_global.enemyHit++;
removeMovieClip(this._parent);
Symbol 166 MovieClip [ship2] Frame 1
stop();
Symbol 166 MovieClip [ship2] Frame 2
stop();
Symbol 169 MovieClip [monster] Frame 1
stop();
ran = random(3) + 2;
gotoAndStop(ran);
Symbol 169 MovieClip [monster] Frame 2
stop();
_root.Mpattern1 = true;
Symbol 169 MovieClip [monster] Frame 3
stop();
_root.Mpattern2 = true;
Symbol 169 MovieClip [monster] Frame 4
stop();
_root.Mpattern3 = true;
Symbol 173 MovieClip [bonus1] Frame 1
stop();
Symbol 173 MovieClip [bonus1] Frame 2
if (_root.bonus == 1) {
_root.playonce = 0;
}
if (_root.bonus == 2) {
_root.playonce = 0;
_root.powerUpSound2.start();
}
if (_root.bonus >= 3) {
_root.playonce = _root.playonce + 1;
if (_root.playonce == 1) {
_root.powerUpSound3.start();
} else {
_root.powerUpSound1.start();
}
}
Symbol 173 MovieClip [bonus1] Frame 9
Symbol 173 MovieClip [bonus1] Frame 10
stop();
_root.randomBonus = true;
_root.ctrBonus = 0;
removeMovieClip(this._parent._parent);
Symbol 178 MovieClip [bonus2] Frame 1
stop();
Symbol 178 MovieClip [bonus2] Frame 2
if (_root.bonus == 1) {
_root.playonce = 0;
}
if (_root.bonus == 2) {
_root.playonce = 0;
_root.powerUpSound2.start();
}
if (_root.bonus >= 3) {
_root.playonce = _root.playonce + 1;
if (_root.playonce == 1) {
_root.powerUpSound3.start();
} else {
_root.powerUpSound1.start();
}
}
Symbol 178 MovieClip [bonus2] Frame 10
stop();
_root.randomBonus = true;
_root.ctrBonus = 0;
removeMovieClip(this._parent._parent);
Symbol 181 MovieClip Frame 1
stop();
Symbol 181 MovieClip Frame 6
removeMovieClip(this._parent);
Instance of Symbol 181 MovieClip in Symbol 182 MovieClip [extraBonusClip75] Frame 1
onClipEvent (load) {
hittedOnce = 0;
}
onClipEvent (enterFrame) {
if (_root.pausePress == false) {
_y = (_y + (random(6) + 2));
if (this.hitTest(_root.ship.hitter) && (hittedOnce == 0)) {
_root.newFooter.score = _root.newFooter.score + 75;
_root.dbInterface.updateScore(_root.newFooter.score);
_root.lifeCheck = _root.lifeCheck + 75;
hittedOnce = 1;
_root.powerUpSound3.start();
gotoAndPlay ("playFr");
}
if (this.hitTest(_root.newFooter)) {
gotoAndStop (6);
}
}
}
Symbol 192 MovieClip Frame 1
stop();
Symbol 196 Button
on (release) {
getURL ("http://www.amazon.com/gp/redirect.html?ie=UTF8&location=http%3A%2F%2Fwww.amazon.com%2FOne-X-Three-Days-Grace%2Fdp%2FB000FBGBPC%2Fsr%3D8-1%2Fqid%3D1167822935%3Fie%3DUTF8%26s%3Dmusic&tag=ikoncitycom-20&linkCode=ur2&camp=1789&creative=9325", "_blank");
}
Symbol 203 Button
on (release) {
getURL ("http://www.ikoncity.com", "_blank");
}
Symbol 207 Button
on (release) {
gotoAndStop (3);
}
Symbol 212 MovieClip Frame 1
stop();
LoaderBlk.useHandCursor = false;
Instance of Symbol 192 MovieClip in Symbol 212 MovieClip Frame 1
onClipEvent (load) {
total = _parent._parent.getBytesTotal();
}
onClipEvent (enterFrame) {
loaded = _parent._parent.getBytesLoaded();
percent = int((loaded / total) * 100);
gotoAndStop(percent);
perText = percent + "%";
if (percent >= 100) {
_parent.gotoAndStop(2);
}
}
Symbol 212 MovieClip Frame 2
stop();
btn.useHandCursor = false;
_parent.newFooter.soundController.gotoAndStop(2);
_parent.bgsndClip.gotoAndPlay(2);
Symbol 212 MovieClip Frame 3
stop();
_parent.loadingClip.swapDepths(_parent.loadDep);
_parent.gotoAndPlay(1);
Symbol 217 MovieClip Frame 1
stop();
Symbol 217 MovieClip Frame 2
play();
Symbol 217 MovieClip Frame 4740
gotoAndPlay (2);
Symbol 234 MovieClip Frame 1
stop();
Symbol 234 MovieClip Frame 40
gotoAndStop (1);
Symbol 238 MovieClip Frame 1
stop();
Symbol 238 MovieClip Frame 40
gotoAndStop (1);
Symbol 247 MovieClip Frame 1
stop();
Symbol 296 MovieClip Frame 1
stop();
var ctr = 0;
_root.shipImmune = true;
_root.bonus = 1;
_root.shipPower = 1;
_root.ship._x = 300;
_root.ship._y = 330;
_root.timer = 0;
_root.gamePaused = false;
_root.gContainer_mc._x = _root.startX;
_root.gContainer_mc._y = _root.StartY;
_root.ctrMove = 0;
this.createEmptyMovieClip("immuneTimer_mc", 97);
this.immuneTimer_mc.onEnterFrame = function () {
var _local1 = this;
_local1._parent.ctr++;
if (_local1._parent.ctr == 100) {
_root.shipImmune = false;
_local1._parent.immune_mc._visible = false;
_local1.onEnterFrame = undefined;
delete _local1.onEnterFrame;
}
};
Symbol 296 MovieClip Frame 23
if (_root.shield == 1) {
_root.newFooter.myLife1._visible = false;
_root.newFooter.myLife2._visible = true;
_root.newFooter.myLife3._visible = true;
gotoAndStop (1);
} else if (_root.shield == 2) {
_root.newFooter.myLife1._visible = false;
_root.newFooter.myLife2._visible = false;
_root.newFooter.myLife3._visible = true;
gotoAndStop (1);
} else if (_root.shield >= 3) {
_root.clean();
_root.newFooter.myLife1._visible = false;
_root.newFooter.myLife2._visible = false;
_root.newFooter.myLife3._visible = false;
_root.timer = 0;
_parent.finalScore = _parent.newFooter.score;
_parent.titleClip.swapDepths(_parent.titleDep);
_parent.bar.swapDepths(_parent.barDep);
_parent.newFooter.swapDepths(_parent.shildDep);
_parent.pause_mc.swapDepths(_parent.pauseDep);
_root.gotoAndStop("over");
}
Symbol 298 Button
on (release) {
_root.pausePress = true;
_root.blockSpace = false;
_root.Ftime = 0;
_parent.Ptextmc.gotoAndStop(2);
gotoAndStop (2);
_parent.backgroundImg.stop();
}
Symbol 300 Button
on (release) {
_root.pausePress = false;
gotoAndStop (1);
_parent.Ptextmc.gotoAndStop(1);
_root.blockSpace = false;
_root.Ftime = 1;
_parent.backgroundImg.play();
}
Symbol 302 MovieClip Frame 1
stop();
Symbol 302 MovieClip Frame 2
stop();
Symbol 308 MovieClip Frame 1
stop();
Symbol 308 MovieClip Frame 100
stop();
Symbol 317 Button
on (release) {
_parent._parent.bgsndClip.stop();
gotoAndStop (3);
}
Symbol 320 MovieClip Frame 1
titleMc.autoSize = true;
titletxt = "YOU ARE LISTENING TO-THREE DAYS GRACE";
Symbol 327 Button
on (release) {
_parent._parent.bgsndClip.play();
gotoAndStop (2);
}
Symbol 330 MovieClip Frame 1
stop();
Instance of Symbol 310 MovieClip in Symbol 330 MovieClip Frame 1
onClipEvent (load) {
speed = 0.6;
tClipX = _parent.tClip._x + 180;
}
onClipEvent (enterFrame) {
if ((_parent.tClip.hitTest(_parent.hit1) || (_parent.tClip.hitTest(_parent.hit2))) || (_parent.tClip.hitTest(_parent.hit3))) {
_parent.tClip._x = _parent.tClip._x - speed;
} else if (_parent.hit3._x < _parent.tClip._x) {
_parent.tClip._x = _parent.tClip._x - speed;
} else {
_parent.tClip._x = tClipX;
}
}
Symbol 330 MovieClip Frame 2
stop();
Symbol 330 MovieClip Frame 3
stop();
Symbol 344 MovieClip Frame 1
b_btn.useHandCursor = false;
Symbol 352 MovieClip Frame 1
soundObj = new Sound(_parent);
soundObj.attachSound("bgMusicNew");
soundObj.setVolume(20);
Symbol 358 MovieClip Frame 1
stop();
Symbol 358 MovieClip Frame 2
stop();
Symbol 360 MovieClip Frame 20
stop();
Symbol 369 Button
on (release) {
getURL ("http://musicbox.sonybmg.com/video/three_days_grace/pain", "_blank");
}
Symbol 373 Button
on (release) {
getURL ("http://www.myspace.com/threedaysgrace", "_blank");
}
Symbol 377 Button
on (release) {
getURL ("http://www.threedaysgrace.com", "_blank");
}
Symbol 381 Button
on (release) {
getURL ("http://www.threedaysgrace.com", "_blank");
}
Symbol 385 Button
on (release) {
getURL ("http://www.threedaysgrace.com/ikoncity/ThreeDaysGraceGame.html", "_blank");
}
Symbol 389 Button
on (release) {
_parent.loadingClip.gotoAndStop(2);
}
Symbol 394 MovieClip Frame 41
stop();