Frame 1
rockets = 5;
power = 1;
engine = false;
life = 3;
speed = 10;
time = 15;
level = 1;
bosscount = 0;
score = 200;
easy = false;
Mouse.hide();
cursor._visible = true;
tut = false;
showengine = false;
vorne = true;
Instance of Symbol 466 MovieClip "cursor" in Frame 1
onClipEvent (enterFrame) {
startDrag (this, true);
}
Frame 3
stop();
easy = false;
normal = false;
normalgraph._visible = false;
easygraph._visible = false;
color = "Select a color";
color_txt.text = color;
Frame 4
if (color == "Select a color") {
gotoAndPlay (3);
}
if ((normal == false) && (easy == false)) {
gotoAndPlay (3);
}
if (easy == true) {
life = 5;
score = 500;
}
Frame 278
stop();
Frame 279
stop();
Frame 280
stop();
Frame 281
stop();
Frame 333
stop();
Frame 334
stop();
Frame 383
stopAllSounds();
gotoAndPlay (574);
Frame 384
stop();
Frame 385
stop();
player1SO = SharedObject.getLocal("playerInfo1");
player1 = new Object();
player1.level = player1SO.data.playerDat.level;
player1.score = player1SO.data.playerDat.score;
player1.color = player1SO.data.playerDat.color;
levelX1 = player1.level;
lvl1_txt.text = levelX1;
scoreX1 = player1.score;
scr1_txt.text = scoreX1;
colorX1 = player1.color;
clr1_txt.text = colorX1;
player2SO = SharedObject.getLocal("playerInfo2");
player2 = new Object();
player2.level = player2SO.data.playerDat.level;
player2.score = player2SO.data.playerDat.score;
player2.color = player2SO.data.playerDat.color;
levelX2 = player2.level;
lvl2_txt.text = levelX2;
scoreX2 = player2.score;
scr2_txt.text = scoreX2;
colorX2 = player2.color;
clr2_txt.text = colorX2;
player3SO = SharedObject.getLocal("playerInfo3");
player3 = new Object();
player3.level = player3SO.data.playerDat.level;
player3.score = player3SO.data.playerDat.score;
player3.color = player3SO.data.playerDat.color;
levelX3 = player3.level;
lvl3_txt.text = levelX3;
scoreX3 = player3.score;
scr3_txt.text = scoreX3;
colorX3 = player3.color;
clr3_txt.text = colorX3;
loadPlayer1 = function () {
player1SO = SharedObject.getLocal("playerInfo1");
player1 = new Object();
player1.score = player1SO.data.playerDat.score;
player1.level = player1SO.data.playerDat.level;
player1.bosscount = player1SO.data.playerDat.bosscount;
player1.life = player1SO.data.playerDat.life;
player1.color = player1SO.data.playerDat.color;
player1.rockets = player1SO.data.playerDat.rockets;
player1.speed = player1SO.data.playerDat.speed;
player1.time = player1SO.data.playerDat.time;
player1.engine = player1SO.data.playerDat.engine;
player1.showengine = player1SO.data.playerDat.showengine;
player1.power = player1SO.data.playerDat.power;
player1.easy = player1SO.data.playerDat.easy;
};
loadButton1.onRelease = function () {
loadPlayer1();
rockets = player1.rockets;
speed = player1.speed;
life = player1.life;
level = player1.level;
bosscount = player1.bosscount;
color = player1.color;
time = player1.time;
engine = player1.engine;
showengine = player1.showengine;
power = player1.power;
score = player1.score;
easy = player1.easy;
};
loadPlayer2 = function () {
player2SO = SharedObject.getLocal("playerInfo2");
player2 = new Object();
player2.score = player2SO.data.playerDat.score;
player2.level = player2SO.data.playerDat.level;
player2.bosscount = player2SO.data.playerDat.bosscount;
player2.life = player2SO.data.playerDat.life;
player2.color = player2SO.data.playerDat.color;
player2.rockets = player2SO.data.playerDat.rockets;
player2.speed = player2SO.data.playerDat.speed;
player2.time = player2SO.data.playerDat.time;
player2.engine = player2SO.data.playerDat.engine;
player2.showengine = player2SO.data.playerDat.showengine;
player2.power = player2SO.data.playerDat.power;
player2.easy = player2SO.data.playerDat.easy;
};
loadButton2.onRelease = function () {
loadPlayer2();
rockets = player2.rockets;
speed = player2.speed;
life = player2.life;
level = player2.level;
bosscount = player2.bosscount;
color = player2.color;
time = player2.time;
engine = player2.engine;
showengine = player2.showengine;
power = player2.power;
score = player2.score;
easy = player2.easy;
};
loadPlayer3 = function () {
player3SO = SharedObject.getLocal("playerInfo3");
player3 = new Object();
player3.score = player3SO.data.playerDat.score;
player3.level = player3SO.data.playerDat.level;
player3.bosscount = player3SO.data.playerDat.bosscount;
player3.life = player3SO.data.playerDat.life;
player3.color = player3SO.data.playerDat.color;
player3.rockets = player3SO.data.playerDat.rockets;
player3.speed = player3SO.data.playerDat.speed;
player3.time = player3SO.data.playerDat.time;
player3.engine = player3SO.data.playerDat.engine;
player3.showengine = player3SO.data.playerDat.showengine;
player3.power = player3SO.data.playerDat.power;
player3.easy = player3SO.data.playerDat.easy;
};
loadButton3.onRelease = function () {
loadPlayer3();
rockets = player3.rockets;
speed = player3.speed;
life = player3.life;
level = player3.level;
bosscount = player3.bosscount;
color = player3.color;
time = player3.time;
engine = player3.engine;
showengine = player3.showengine;
power = player3.power;
score = player3.score;
easy = player3.easy;
};
Frame 386
player1SO = SharedObject.getLocal("playerInfo1");
player1 = new Object();
player1.level = player1SO.data.playerDat.level;
player1.score = player1SO.data.playerDat.score;
player1.color = player1SO.data.playerDat.color;
levelX1 = player1.level;
lvl1_txt.text = levelX1;
scoreX1 = player1.score;
scr1_txt.text = scoreX1;
colorX1 = player1.color;
clr1_txt.text = colorX1;
player2SO = SharedObject.getLocal("playerInfo2");
player2 = new Object();
player2.level = player2SO.data.playerDat.level;
player2.score = player2SO.data.playerDat.score;
player2.color = player2SO.data.playerDat.color;
levelX2 = player2.level;
lvl2_txt.text = levelX2;
scoreX2 = player2.score;
scr2_txt.text = scoreX2;
colorX2 = player2.color;
clr2_txt.text = colorX2;
player3SO = SharedObject.getLocal("playerInfo3");
player3 = new Object();
player3.level = player3SO.data.playerDat.level;
player3.score = player3SO.data.playerDat.score;
player3.color = player3SO.data.playerDat.color;
levelX3 = player3.level;
lvl3_txt.text = levelX3;
scoreX3 = player3.score;
scr3_txt.text = scoreX3;
colorX3 = player3.color;
clr3_txt.text = colorX3;
Frame 433
stopAllSounds();
gotoAndPlay (574);
Frame 434
rocketsX = 5;
powerX = 1;
engineX = false;
lifeX = 1;
speedX = 10;
timeXX = 15;
levelX = 1;
cursor._visible = true;
gift_txt._visible = false;
scoreX = 0;
score_txt.text = scoreX;
life_txt.text = lifeX;
stoptut == false;
if (color == "red") {
shipred._visible = true;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipred;
} else if (color == "green") {
shipred._visible = false;
shipgreen._visible = true;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipgreen;
} else if (color == "white") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = true;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipwhite;
} else if (color == "blue") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = true;
shipbrown._visible = false;
ship = shipblue;
} else if (color == "brown") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = true;
ship = shipbrown;
}
Instance of Symbol 466 MovieClip "cursor" in Frame 434
onClipEvent (enterFrame) {
startDrag (this, true);
}
Frame 466
stop();
stopAllSounds();
setup = function () {
firing = false;
rockets_txt.text = rocketsX;
score_txt.text = scoreX;
timeX = timeXX;
enemyTime = 0;
enemyRate = 45;
giftTime = 0;
giftRate = 260;
giftzTime = 0;
giftzRate = 160;
superTime = 0;
superRate = 800;
gift_txt.text = 0;
giveGift = false;
giveGift2 = false;
giveGift3 = false;
giveGift4 = false;
giftz = false;
superGift = false;
rocket = false;
rockets_txt._visible = false;
counter = 0;
life_txt.text = lifeX;
giftcounter = 0;
supercounter = 0;
cursor._visible = false;
ship.onMouseDown = function () {
firing = true;
repeatTime = 0;
};
ship.onMouseUp = function () {
firing = false;
};
ship.onEnterFrame = function () {
this.destx = _xmouse;
this.desty = _ymouse;
var _local5 = this.destx - this._x;
var _local4 = this.desty - this._y;
if (engineX == true) {
this._x = this._x + (_local5 * 0.5);
this._y = this._y + (_local4 * 0.5);
} else if (engineX == false) {
this._x = this._x + (_local5 * 0.15);
this._y = this._y + (_local4 * 0.15);
}
var _local3 = new Object();
_local3.onKeyDown = function () {
if (Key.isDown(39)) {
_root.tuttext.play();
}
if ((Key.isDown(32) && (powerX > 0)) && (scoreX > 9)) {
createProjectile2("power", ship._x, ship._y - 5, 0, -30);
powerX--;
scoreX = scoreX - 10;
score_txt.text = scoreX;
if (powerX == 0) {
ifpower._visible = false;
}
}
if (Key.isDown(40)) {
rocket = true;
rockets_txt._visible = true;
}
if (Key.isDown(38)) {
rocket = false;
rockets_txt._visible = false;
}
};
Key.addListener(_local3);
if ((((firing && (repeatTime == 0)) && (rocket == true)) && (superGift == true)) && (rockets > 0)) {
createProjectile2("rocket2", this._x, this._y - 5, 0, -8);
fireRate = 30;
rockets--;
rockets_txt.text = rockets;
} else if (((firing && (repeatTime == 0)) && (rocket == true)) && (rocketsX > 0)) {
createProjectile2("rocket", this._x, this._y - 5, 0, -7);
fireRate = 30;
rocketsX--;
rockets_txt.text = rocketsX;
} else if ((firing && (repeatTime == 0)) && (superGift == true)) {
createProjectile("bullet2", this._x, this._y - 5, 0, -10);
createProjectile("bullet2", this._x, this._y - 5, -3, -10);
createProjectile("bullet2", this._x, this._y - 5, 3, -10);
fireRate = 6;
powerup_txt.text = "Power!!";
powerup_txt._visible = true;
} else if (((((firing && (repeatTime == 0)) && (giveGift == true)) && (giveGift2 == true)) && (giveGift3 == true)) && (giveGift4 == true)) {
createProjectile("supercannon", this._x, this._y - 5, 0, -60);
fireRate = 4;
powerup_txt.text = "Power up 4";
} else if ((((firing && (repeatTime == 0)) && (giveGift == true)) && (giveGift2 == true)) && (giveGift3 == true)) {
createProjectile("laser", this._x, this._y - 5, 0, -95);
fireRate = 2;
powerup_txt.text = "Power up 3";
} else if (((firing && (repeatTime == 0)) && (giveGift == true)) && (giveGift2 == true)) {
createProjectile("super2", this._x, this._y - 5, 0, -45);
fireRate = 5;
powerup_txt.text = "Power up 2";
} else if ((firing && (repeatTime == 0)) && (giveGift == true)) {
createProjectile("super", this._x, this._y - 5, 0, -35);
fireRate = 7;
powerup_txt.text = "Power up 1";
powerup_txt._visible = true;
} else if (firing && (repeatTime == 0)) {
createProjectile("bullet", this._x, this._y - 5, 0, -speedX);
fireRate = 9;
}
repeatTime++;
repeatTime = repeatTime % fireRate;
if ((enemyTime == 0) && (counter < 117)) {
var _local6 = (Math.random() * 100) + 80;
createenemy("tut", _local6, -70);
if (((enemyTime == 0) && (counter > 25)) && (counter < 117)) {
_local6 = (Math.random() * 100) + 80;
createenemy("tut", 400 - _local6, -70);
}
}
enemyTime++;
enemyTime = enemyTime % enemyRate;
if (((giftTime == 0) && (counter > 10)) && (counter < 117)) {
var _local6 = (Math.random() * 100) + 80;
creategift("gift_mc", 200, -30);
}
giftTime++;
giftTime = giftTime % giftRate;
if (giftzTime == 0) {
var _local6 = (Math.random() * 100) + 80;
creategiftz("giftz_mc", 200, -30);
}
giftzTime++;
giftzTime = giftzTime % giftzRate;
if (((superTime == 0) && (counter > 5)) && (counter < 117)) {
var _local6 = (Math.random() * 100) + 80;
createsuper("supergift_mc", 200, -30);
}
superTime++;
superTime = superTime % superRate;
};
doCounter = function () {
counter++;
if (tuttext._currentframe == 114) {
enemyLayer.removeMovieClip();
projectileLayer.removeMovieClip();
projectileLayer2.removeMovieClip();
giftLayer.removeMovieClip();
giftzLayer.removeMovieClip();
gift_txt._visible = false;
rockets_txt._visible = false;
powerup_txt._visible = false;
clearInterval(countID);
clearInterval(giftcountID);
clearInterval(supercountID);
gotoAndPlay (467);
ship.swapDepths(cursor);
}
};
superdoCounter = function () {
supercounter--;
gift_txt.text = supercounter;
gift_txt._visible = true;
powerup_txt._visible = true;
clearInterval(giftcountID);
if (supercounter < 0) {
superGift = false;
gift_txt._visible = false;
powerup_txt._visible = false;
timeX = timeXX;
clearInterval(supercountID);
}
};
giftdoCounter = function () {
giftcounter--;
gift_txt.text = giftcounter;
gift_txt._visible = true;
powerup_txt._visible = true;
if (giftcounter < 0) {
giveGift4 = false;
giveGift3 = false;
giveGift2 = false;
giveGift = false;
gift_txt._visible = false;
powerup_txt._visible = false;
timeX = timeXX;
clearInterval(giftcountID);
}
};
countID = setInterval(doCounter, 1000);
_root.createEmptyMovieClip("projectileLayer2", 100);
projectileCount2 = 0;
_root.createEmptyMovieClip("projectileLayer", 99);
projectileCount = 0;
_root.createEmptyMovieClip("enemyLayer", 98);
enemyCount = 0;
_root.createEmptyMovieClip("giftLayer", 97);
giftCount = 0;
_root.createEmptyMovieClip("giftzLayer", 96);
giftzCount = 0;
_root.createEmptyMovieClip("superLayer", 95);
superCount = 0;
ship.swapDepths(101);
ship.gotoAndStop(1);
bgscroller.onEnterFrame = function () {
if (this._y >= 500) {
this._y = 0;
}
this._y = this._y + 5;
};
};
createProjectile = function (type, x, y, dx, dy) {
var _local4 = "proj" + projectileCount;
projectileLayer.attachMovie(type, _local4, projectileCount);
projectileLayer[_local4]._x = x;
projectileLayer[_local4]._y = y;
projectileLayer[_local4].dx = dx;
projectileLayer[_local4].dy = dy;
projectileLayer[_local4].onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
if (this._y < -190) {
this.removeMovieClip();
}
var _local2 = 0;
while (_local2 < 10) {
var _local3 = "enemy" + _local2;
if (this.hitTest(enemyLayer[_local3]) && (enemyLayer[_local3]._currentframe == 1)) {
enemyLayer[_local3].play();
scoreX++;
score_txt.text = scoreX;
this.removeMovieClip();
}
_local2++;
}
};
projectileCount++;
projectileCount = projectileCount % 20;
};
createProjectile2 = function (type, x, y, dx, dy) {
var _local4 = "proj2" + projectileCount2;
projectileLayer2.attachMovie(type, _local4, projectileCount2);
projectileLayer2[_local4]._x = x;
projectileLayer2[_local4]._y = y;
projectileLayer2[_local4].dx = dx;
projectileLayer2[_local4].dy = dy;
projectileLayer2[_local4].onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
if (this._y < -80) {
this.removeMovieClip();
}
var _local2 = 0;
while (_local2 < 10) {
var _local3 = "enemy" + _local2;
if (this.hitTest(enemyLayer[_local3]) && (enemyLayer[_local3]._currentframe == 1)) {
enemyLayer[_local3].play();
scoreX++;
score_txt.text = scoreX;
}
_local2++;
}
};
projectileCount2++;
projectileCount2 = projectileCount2 % 10;
};
createenemy = function (type, x, y) {
var _local2 = "enemy" + enemyCount;
enemyLayer.attachMovie(type, _local2, enemyCount);
enemyLayer[_local2]._x = x;
enemyLayer[_local2].xline = x;
enemyLayer[_local2]._y = y;
enemyLayer[_local2].dy = (Math.random() * 10) + 5;
enemyLayer[_local2].t = Math.random() * 6.28;
enemyLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.1;
if (this._y > 560) {
this.removeMovieClip();
}
};
enemyCount++;
enemyCount = enemyCount % 10;
};
creategift = function (type, x, y) {
var _local2 = "gift" + giftCount;
giftLayer.attachMovie(type, _local2, giftCount);
giftLayer[_local2]._x = x;
giftLayer[_local2].xline = x;
giftLayer[_local2]._y = y;
giftLayer[_local2].dy = (Math.random() * 12) + 12;
giftLayer[_local2].t = Math.random() * 7.28;
giftLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.1;
if (((superGift == true) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
this.removeMovieClip();
} else if (((((giveGift == true) && (giveGift2 == true)) && (giveGift3 == true)) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift4 = true;
this.removeMovieClip();
} else if ((((giveGift == true) && (giveGift2 == true)) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift3 = true;
this.removeMovieClip();
} else if (((giveGift == true) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift2 = true;
this.removeMovieClip();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift = true;
this.removeMovieClip();
giftcounter = timeX;
giftcountID = setInterval(giftdoCounter, 1000);
}
if (this._y > 500) {
this.removeMovieClip();
}
};
giftCount++;
giftCount = giftCount % 10;
};
creategiftz = function (type, x, y) {
var _local2 = "giftz" + giftzCount;
giftzLayer.attachMovie(type, _local2, giftzCount);
giftzLayer[_local2]._x = x;
giftzLayer[_local2].xline = x;
giftzLayer[_local2]._y = y;
giftzLayer[_local2].dy = (Math.random() * 16) + 5;
giftzLayer[_local2].t = Math.random() * 7.28;
giftzLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.2;
if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
scoreX = scoreX + 5;
score_txt.text = scoreX;
this.removeMovieClip();
}
if (this._y > 500) {
this.removeMovieClip();
}
};
giftzCount++;
giftzCount = giftzCount % 10;
};
createsuper = function (type, x, y) {
var _local2 = "supergift" + superCount;
superLayer.attachMovie(type, _local2, superCount);
superLayer[_local2]._x = x;
superLayer[_local2].xline = x;
superLayer[_local2]._y = y;
superLayer[_local2].dy = (Math.random() * 10) + 12;
superLayer[_local2].t = Math.random() * 7.28;
superLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.2;
if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
superGift = true;
giveGift = false;
giveGift2 = false;
giveGift3 = false;
supercounter = (timeX = timeX - 8);
supercountID = setInterval(superdoCounter, 1000);
this.removeMovieClip();
scoreX = scoreX + 5;
cursor._visible = false;
}
if (this._y > 500) {
this.removeMovieClip();
}
};
superCount++;
superCount = superCount % 10;
};
startButton.onRelease = function () {
setup();
ifpower._visible = true;
this._visible = false;
music = new Sound();
music.attachSound("mellow");
music.start(0, 99);
tuttext.play();
};
Frame 573
stopAllSounds();
if (tut == true) {
gotoAndPlay (334);
tut = false;
ship.removeMovieClip();
cursor._visible = true;
} else if (tut == false) {
gotoAndPlay (636);
ship.removeMovieClip();
cursor._visible = true;
}
Frame 574
stopAllSounds();
boss = true;
if (level == undefined) {
rockets = 5;
power = 1;
engine = false;
life = 3;
speed = 10;
time = 15;
level = 1;
bosscount = 0;
score = 200;
easy = false;
Mouse.hide();
cursor._visible = true;
tut = false;
showengine = false;
vorne = true;
color = "red";
easy = false;
}
score_txt.text = score;
lvl6._visible = false;
lvl8._visible = true;
if (level > 6) {
lvl6._visible = true;
}
if (level == 9) {
lvl8._visible = false;
}
Instance of Symbol 466 MovieClip "cursor" in Frame 574
onClipEvent (enterFrame) {
startDrag (this, true);
}
Frame 594
stop();
if (level == 9) {
gotoAndStop (602);
}
if (level == 8) {
gotoAndStop (601);
} else if (level == 7) {
gotoAndStop (600);
} else if (level == 6) {
gotoAndStop (599);
} else if (level == 5) {
gotoAndStop (598);
} else if (level == 4) {
gotoAndStop (597);
} else if (level == 3) {
gotoAndStop (596);
} else if (level == 2) {
gotoAndStop (595);
}
Frame 603
lvl6._visible = false;
lvl8._visible = true;
if (level > 5) {
lvl6._visible = true;
}
if (level > 7) {
lvl8._visible = false;
}
Frame 635
if (now == 8) {
gotoAndPlay (5552);
} else if (now == 7) {
gotoAndPlay (4779);
} else if (now == 6) {
gotoAndPlay (3892);
} else if (now == 5) {
gotoAndPlay (3431);
} else if (now == 4) {
gotoAndPlay (2996);
} else if (now == 3) {
gotoAndPlay (2485);
} else if (now == 2) {
gotoAndPlay (1407);
} else if (now == 1) {
gotoAndPlay (881);
}
Frame 636
stop();
if (level == undefined) {
rockets = 5;
power = 1;
engine = false;
life = 3;
speed = 10;
time = 15;
level = 1;
bosscount = 0;
score = 200;
easy = false;
Mouse.hide();
cursor._visible = true;
tut = false;
showengine = false;
vorne = true;
color = "red";
easy = false;
}
Instance of Symbol 466 MovieClip "cursor" in Frame 636
onClipEvent (enterFrame) {
startDrag (this, true);
}
Frame 637
stop();
score_txt.text = score;
rockets_txt.text = rockets;
speed_txt.text = speed;
life_txt.text = life;
time_txt.text = time;
engineButton._visible = false;
if ((showengine == true) && (engine == false)) {
engineButton._visible = true;
} else if ((showengine == true) && (engine == true)) {
engineButton._visible = false;
}
Instance of Symbol 466 MovieClip "cursor" in Frame 637
onClipEvent (enterFrame) {
startDrag (this, true);
}
Frame 638
stop();
level_txt.text = level;
killed_txt.text = bosscount;
blaster_txt.text = power;
color_txt.text = color;
life_txt.text = life;
speed_txt.text = speed;
time_txt.text = time;
rockets_txt.text = rockets;
score_txt.text = score;
if (easy == true) {
difficulty_txt.text = "Easy";
}
if (easy == false) {
difficulty_txt.text = "Normal";
}
if (engine == false) {
engine_txt.text = "Basic";
}
if (engine == true) {
engine_txt.text = "Advanced";
}
if (color == "red") {
red._visible = true;
green._visible = false;
white._visible = false;
blue._visible = false;
brown._visible = false;
} else if (color == "green") {
red._visible = false;
green._visible = true;
white._visible = false;
blue._visible = false;
brown._visible = false;
} else if (color == "white") {
red._visible = false;
green._visible = false;
white._visible = true;
blue._visible = false;
brown._visible = false;
} else if (color == "blue") {
red._visible = false;
green._visible = false;
white._visible = false;
blue._visible = true;
brown._visible = false;
} else if (color == "brown") {
red._visible = false;
green._visible = false;
white._visible = false;
blue._visible = false;
brown._visible = true;
}
Frame 639
stop();
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
color_txt.text = color;
if (color == "red") {
shipred._visible = true;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
} else if (color == "green") {
shipred._visible = false;
shipgreen._visible = true;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
} else if (color == "white") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = true;
shipblue._visible = false;
shipbrown._visible = false;
} else if (color == "blue") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = true;
shipbrown._visible = false;
} else if (color == "brown") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = true;
}
Frame 640
stop();
if (color == "red") {
red._visible = true;
green._visible = false;
white._visible = false;
blue._visible = false;
brown._visible = false;
} else if (color == "green") {
red._visible = false;
green._visible = true;
white._visible = false;
blue._visible = false;
brown._visible = false;
} else if (color == "white") {
red._visible = false;
green._visible = false;
white._visible = true;
blue._visible = false;
brown._visible = false;
} else if (color == "blue") {
red._visible = false;
green._visible = false;
white._visible = false;
blue._visible = true;
brown._visible = false;
} else if (color == "brown") {
red._visible = false;
green._visible = false;
white._visible = false;
blue._visible = false;
brown._visible = true;
}
score_txt.text = score;
level_txt.text = level;
color_txt.text = color;
life_txt.text = life;
blasters_txt.text = power;
Frame 641
stop();
player1SO = SharedObject.getLocal("playerInfo1");
player1 = new Object();
player1.level = player1SO.data.playerDat.level;
player1.score = player1SO.data.playerDat.score;
player1.color = player1SO.data.playerDat.color;
levelX1 = player1.level;
lvl1_txt.text = levelX1;
scoreX1 = player1.score;
scr1_txt.text = scoreX1;
colorX1 = player1.color;
clr1_txt.text = colorX1;
player2SO = SharedObject.getLocal("playerInfo2");
player2 = new Object();
player2.level = player2SO.data.playerDat.level;
player2.score = player2SO.data.playerDat.score;
player2.color = player2SO.data.playerDat.color;
levelX2 = player2.level;
lvl2_txt.text = levelX2;
scoreX2 = player2.score;
scr2_txt.text = scoreX2;
colorX2 = player2.color;
clr2_txt.text = colorX2;
player3SO = SharedObject.getLocal("playerInfo3");
player3 = new Object();
player3.level = player3SO.data.playerDat.level;
player3.score = player3SO.data.playerDat.score;
player3.color = player3SO.data.playerDat.color;
levelX3 = player3.level;
lvl3_txt.text = levelX3;
scoreX3 = player3.score;
scr3_txt.text = scoreX3;
colorX3 = player3.color;
clr3_txt.text = colorX3;
if (color == "red") {
red._visible = true;
green._visible = false;
white._visible = false;
blue._visible = false;
brown._visible = false;
} else if (color == "green") {
red._visible = false;
green._visible = true;
white._visible = false;
blue._visible = false;
brown._visible = false;
} else if (color == "white") {
red._visible = false;
green._visible = false;
white._visible = true;
blue._visible = false;
brown._visible = false;
} else if (color == "blue") {
red._visible = false;
green._visible = false;
white._visible = false;
blue._visible = true;
brown._visible = false;
} else if (color == "brown") {
red._visible = false;
green._visible = false;
white._visible = false;
blue._visible = false;
brown._visible = true;
}
score_txt.text = score;
level_txt.text = level;
color_txt.text = color;
life_txt.text = life;
blasters_txt.text = power;
setPlayerInfo1 = function () {
player1 = new Object();
player1.score = score;
player1.level = level;
player1.bosscount = bosscount;
player1.life = life;
player1.color = color;
player1.rockets = rockets;
player1.speed = speed;
player1.time = time;
player1.engine = engine;
player1.showengine = showengine;
player1.power = power;
player1.easy = easy;
};
savePlayer1 = function () {
player1SO = SharedObject.getLocal("playerInfo1");
player1SO.data.playerDat = player1;
plater1SO.flush();
};
saveButton1.onRelease = function () {
setPlayerInfo1();
savePlayer1();
levelX1 = player1.level;
lvl1_txt.text = levelX1;
scoreX1 = player1.score;
scr1_txt.text = scoreX1;
colorX1 = player1.color;
clr1_txt.text = colorX1;
};
setPlayerInfo2 = function () {
player2 = new Object();
player2.score = score;
player2.level = level;
player2.bosscount = bosscount;
player2.life = life;
player2.color = color;
player2.rockets = rockets;
player2.speed = speed;
player2.time = time;
player2.engine = engine;
player2.showengine = showengine;
player2.power = power;
player2.easy = easy;
};
savePlayer2 = function () {
player2SO = SharedObject.getLocal("playerInfo2");
player2SO.data.playerDat = player2;
plater2SO.flush();
};
saveButton2.onRelease = function () {
setPlayerInfo2();
savePlayer2();
levelX2 = player2.level;
lvl2_txt.text = levelX2;
scoreX2 = player2.score;
scr2_txt.text = scoreX2;
colorX2 = player2.color;
clr2_txt.text = colorX2;
};
setPlayerInfo3 = function () {
player3 = new Object();
player3.score = score;
player3.level = level;
player3.bosscount = bosscount;
player3.life = life;
player3.color = color;
player3.rockets = rockets;
player3.speed = speed;
player3.time = time;
player3.engine = engine;
player3.showengine = showengine;
player3.power = power;
player3.easy = easy;
};
savePlayer3 = function () {
player3SO = SharedObject.getLocal("playerInfo3");
player3SO.data.playerDat = player3;
plater3SO.flush();
};
saveButton3.onRelease = function () {
setPlayerInfo3();
savePlayer3();
levelX3 = player3.level;
lvl3_txt.text = levelX3;
scoreX3 = player3.score;
scr3_txt.text = scoreX3;
colorX3 = player3.color;
clr3_txt.text = colorX3;
};
Frame 642
stop();
player1SO = SharedObject.getLocal("playerInfo1");
player1 = new Object();
player1.level = player1SO.data.playerDat.level;
player1.score = player1SO.data.playerDat.score;
player1.color = player1SO.data.playerDat.color;
levelX1 = player1.level;
lvl1_txt.text = levelX1;
scoreX1 = player1.score;
scr1_txt.text = scoreX1;
colorX1 = player1.color;
clr1_txt.text = colorX1;
player2SO = SharedObject.getLocal("playerInfo2");
player2 = new Object();
player2.level = player2SO.data.playerDat.level;
player2.score = player2SO.data.playerDat.score;
player2.color = player2SO.data.playerDat.color;
levelX2 = player2.level;
lvl2_txt.text = levelX2;
scoreX2 = player2.score;
scr2_txt.text = scoreX2;
colorX2 = player2.color;
clr2_txt.text = colorX2;
player3SO = SharedObject.getLocal("playerInfo3");
player3 = new Object();
player3.level = player3SO.data.playerDat.level;
player3.score = player3SO.data.playerDat.score;
player3.color = player3SO.data.playerDat.color;
levelX3 = player3.level;
lvl3_txt.text = levelX3;
scoreX3 = player3.score;
scr3_txt.text = scoreX3;
colorX3 = player3.color;
clr3_txt.text = colorX3;
if (color == "red") {
red._visible = true;
green._visible = false;
white._visible = false;
blue._visible = false;
brown._visible = false;
} else if (color == "green") {
red._visible = false;
green._visible = true;
white._visible = false;
blue._visible = false;
brown._visible = false;
} else if (color == "white") {
red._visible = false;
green._visible = false;
white._visible = true;
blue._visible = false;
brown._visible = false;
} else if (color == "blue") {
red._visible = false;
green._visible = false;
white._visible = false;
blue._visible = true;
brown._visible = false;
} else if (color == "brown") {
red._visible = false;
green._visible = false;
white._visible = false;
blue._visible = false;
brown._visible = true;
}
score_txt.text = score;
level_txt.text = level;
color_txt.text = color;
life_txt.text = life;
blasters_txt.text = power;
loadPlayer1 = function () {
player1SO = SharedObject.getLocal("playerInfo1");
player1 = new Object();
player1.score = player1SO.data.playerDat.score;
player1.level = player1SO.data.playerDat.level;
player1.bosscount = player1SO.data.playerDat.bosscount;
player1.life = player1SO.data.playerDat.life;
player1.color = player1SO.data.playerDat.color;
player1.rockets = player1SO.data.playerDat.rockets;
player1.speed = player1SO.data.playerDat.speed;
player1.time = player1SO.data.playerDat.time;
player1.engine = player1SO.data.playerDat.engine;
player1.showengine = player1SO.data.playerDat.showengine;
player1.power = player1SO.data.playerDat.power;
player1.easy = player1SO.data.playerDat.easy;
};
loadButton1.onRelease = function () {
loadPlayer1();
rockets = player1.rockets;
speed = player1.speed;
life = player1.life;
level = player1.level;
bosscount = player1.bosscount;
color = player1.color;
time = player1.time;
engine = player1.engine;
showengine = player1.showengine;
power = player1.power;
score = player1.score;
easy = player1.easy;
level_txt.text = level;
name_txt.text = pname;
life_txt.text = life;
color_txt.text = color;
blasters_txt.text = power;
score_txt.text = score;
blink.play();
if (color == "red") {
red._visible = true;
green._visible = false;
white._visible = false;
blue._visible = false;
brown._visible = false;
} else if (color == "green") {
red._visible = false;
green._visible = true;
white._visible = false;
blue._visible = false;
brown._visible = false;
} else if (color == "white") {
red._visible = false;
green._visible = false;
white._visible = true;
blue._visible = false;
brown._visible = false;
} else if (color == "blue") {
red._visible = false;
green._visible = false;
white._visible = false;
blue._visible = true;
brown._visible = false;
} else if (color == "brown") {
red._visible = false;
green._visible = false;
white._visible = false;
blue._visible = false;
brown._visible = true;
}
};
loadPlayer2 = function () {
player2SO = SharedObject.getLocal("playerInfo2");
player2 = new Object();
player2.score = player2SO.data.playerDat.score;
player2.level = player2SO.data.playerDat.level;
player2.bosscount = player2SO.data.playerDat.bosscount;
player2.life = player2SO.data.playerDat.life;
player2.color = player2SO.data.playerDat.color;
player2.rockets = player2SO.data.playerDat.rockets;
player2.speed = player2SO.data.playerDat.speed;
player2.time = player2SO.data.playerDat.time;
player2.engine = player2SO.data.playerDat.engine;
player2.showengine = player2SO.data.playerDat.showengine;
player2.power = player2SO.data.playerDat.power;
player2.easy = player2SO.data.playerDat.easy;
};
loadButton2.onRelease = function () {
loadPlayer2();
rockets = player2.rockets;
speed = player2.speed;
life = player2.life;
level = player2.level;
bosscount = player2.bosscount;
color = player2.color;
time = player2.time;
engine = player2.engine;
showengine = player2.showengine;
power = player2.power;
score = player2.score;
easy = player2.easy;
level_txt.text = level;
name_txt.text = pname;
life_txt.text = life;
color_txt.text = color;
blasters_txt.text = power;
score_txt.text = score;
blink.play();
if (color == "red") {
red._visible = true;
green._visible = false;
white._visible = false;
blue._visible = false;
brown._visible = false;
} else if (color == "green") {
red._visible = false;
green._visible = true;
white._visible = false;
blue._visible = false;
brown._visible = false;
} else if (color == "white") {
red._visible = false;
green._visible = false;
white._visible = true;
blue._visible = false;
brown._visible = false;
} else if (color == "blue") {
red._visible = false;
green._visible = false;
white._visible = false;
blue._visible = true;
brown._visible = false;
} else if (color == "brown") {
red._visible = false;
green._visible = false;
white._visible = false;
blue._visible = false;
brown._visible = true;
}
};
loadPlayer3 = function () {
player3SO = SharedObject.getLocal("playerInfo3");
player3 = new Object();
player3.score = player3SO.data.playerDat.score;
player3.level = player3SO.data.playerDat.level;
player3.bosscount = player3SO.data.playerDat.bosscount;
player3.life = player3SO.data.playerDat.life;
player3.color = player3SO.data.playerDat.color;
player3.rockets = player3SO.data.playerDat.rockets;
player3.speed = player3SO.data.playerDat.speed;
player3.time = player3SO.data.playerDat.time;
player3.engine = player3SO.data.playerDat.engine;
player3.showengine = player3SO.data.playerDat.showengine;
player3.power = player3SO.data.playerDat.power;
player3.easy = player3SO.data.playerDat.easy;
};
loadButton3.onRelease = function () {
loadPlayer3();
rockets = player3.rockets;
speed = player3.speed;
life = player3.life;
level = player3.level;
bosscount = player3.bosscount;
color = player3.color;
time = player3.time;
engine = player3.engine;
showengine = player3.showengine;
power = player3.power;
score = player3.score;
easy = player3.easy;
level_txt.text = level;
name_txt.text = pname;
life_txt.text = life;
color_txt.text = color;
blasters_txt.text = power;
score_txt.text = score;
blink.play();
if (color == "red") {
red._visible = true;
green._visible = false;
white._visible = false;
blue._visible = false;
brown._visible = false;
} else if (color == "green") {
red._visible = false;
green._visible = true;
white._visible = false;
blue._visible = false;
brown._visible = false;
} else if (color == "white") {
red._visible = false;
green._visible = false;
white._visible = true;
blue._visible = false;
brown._visible = false;
} else if (color == "blue") {
red._visible = false;
green._visible = false;
white._visible = false;
blue._visible = true;
brown._visible = false;
} else if (color == "brown") {
red._visible = false;
green._visible = false;
white._visible = false;
blue._visible = false;
brown._visible = true;
}
};
Frame 643
stop();
if (color == "red") {
red._visible = true;
green._visible = false;
white._visible = false;
blue._visible = false;
brown._visible = false;
} else if (color == "green") {
red._visible = false;
green._visible = true;
white._visible = false;
blue._visible = false;
brown._visible = false;
} else if (color == "white") {
red._visible = false;
green._visible = false;
white._visible = true;
blue._visible = false;
brown._visible = false;
} else if (color == "blue") {
red._visible = false;
green._visible = false;
white._visible = false;
blue._visible = true;
brown._visible = false;
} else if (color == "brown") {
red._visible = false;
green._visible = false;
white._visible = false;
blue._visible = false;
brown._visible = true;
}
score_txt.text = score;
level_txt.text = level;
color_txt.text = color;
life_txt.text = life;
blasters_txt.text = power;
Frame 644
if (color == "red") {
red._visible = true;
green._visible = false;
white._visible = false;
blue._visible = false;
brown._visible = false;
} else if (color == "green") {
red._visible = false;
green._visible = true;
white._visible = false;
blue._visible = false;
brown._visible = false;
} else if (color == "white") {
red._visible = false;
green._visible = false;
white._visible = true;
blue._visible = false;
brown._visible = false;
} else if (color == "blue") {
red._visible = false;
green._visible = false;
white._visible = false;
blue._visible = true;
brown._visible = false;
} else if (color == "brown") {
red._visible = false;
green._visible = false;
white._visible = false;
blue._visible = false;
brown._visible = true;
}
score_txt.text = score;
level_txt.text = level;
color_txt.text = color;
life_txt.text = life;
blasters_txt.text = power;
Instance of Symbol 466 MovieClip "cursor" in Frame 644
onClipEvent (enterFrame) {
startDrag (this, true);
}
Frame 699
gotoAndPlay (1);
stopAllSounds();
Frame 700
stop();
stopAllSounds();
levelnametxt.onSetFocus = function () {
cursor._visible = false;
};
levelnametxt.onKillFocus = function () {
cursor._visible = true;
};
overbg1._visible = false;
overbg2._visible = false;
overbg3._visible = false;
overbg4._visible = false;
overbg5._visible = false;
overbg6._visible = false;
overbg7._visible = false;
overbg8._visible = false;
levelname = "'Unnamed'";
bglevel.text = "Choose";
enmtype = 1;
bg = 1;
giftinterval = 6;
enminterval = 5;
bgspeed = 6;
customcounter = 100;
rate = 90;
enm1 = true;
enm2 = false;
enm3 = false;
enm4 = false;
enm4count = 40;
enm1type = "2";
enm1types = false;
enm2type = "1";
enm2types = false;
enm3type = "1";
enm3types = false;
enm4type = "2";
enm4types = true;
if (enm1 == true) {
enmdie = 2;
enmspeed = 12;
enmspeed2 = 13;
enm1type = "1";
}
if (enm2 == true) {
enmdie = 3;
enmspeed = 14;
enmspeed2 = 13;
enm1type = "3";
}
if (enm3 == true) {
enmdie = 7;
enmspeed = 12;
enmspeed2 = 8;
enm1type = "6";
}
if (enm4 == true) {
enmdie = 4;
enmspeed = 17;
enmspeed2 = 14;
enm1type = "8";
}
Instance of Symbol 466 MovieClip "cursor" in Frame 700
onClipEvent (enterFrame) {
startDrag (this, true);
}
Frame 702
gift_txt._visible = false;
levelbackButton._visible = true;
scoreX = 0;
score_txt.text = scoreX;
lifeX = life;
if (color == "red") {
shipred._visible = true;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipred;
} else if (color == "green") {
shipred._visible = false;
shipgreen._visible = true;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipgreen;
} else if (color == "white") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = true;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipwhite;
} else if (color == "blue") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = true;
shipbrown._visible = false;
ship = shipblue;
} else if (color == "brown") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = true;
ship = shipbrown;
}
Instance of Symbol 466 MovieClip "cursor" in Frame 702
onClipEvent (enterFrame) {
startDrag (this, true);
}
Frame 729
stop();
setup = function () {
firing = false;
rocketsX = rockets;
rockets_txt.text = rocketsX;
score_txt.text = scoreX;
timeX = time;
powerX = power;
enemyTime = 0;
enemyRate = rate - 50;
enemy2Time = 0;
enemy2Rate = rate;
enemy3Time = 0;
enemy3Rate = rate;
mineTime = 0;
mineRate = rate;
rockTime = 0;
rockRate = rate;
giftTime = 0;
giftRate = rate + 180;
giftzTime = 0;
giftzRate = rate + 60;
superTime = 0;
superRate = rate + 800;
gift_txt.text = 0;
giveGift = false;
giveGift2 = false;
giveGift3 = false;
giveGift4 = false;
giftz = false;
superGift = false;
rocket = false;
rockets_txt._visible = false;
counter = 0;
counter_txt.text = counter;
giftcounter = 0;
supercounter = 0;
enemy2Die = enmdie;
enemy3Die = enmdie;
enemy4Die = enmdie;
cursor._visible = false;
levelbackButton._visible = false;
ship.onMouseDown = function () {
firing = true;
repeatTime = 0;
};
ship.onMouseUp = function () {
firing = false;
};
ship.onEnterFrame = function () {
this.destx = _xmouse;
this.desty = _ymouse;
var _local4 = this.destx - this._x;
var _local3 = this.desty - this._y;
if (this._x > 400) {
this._x = 350;
}
if (this._x < 0) {
this._x = 50;
}
if (this._y > 500) {
this._y = 450;
}
if (this._y < 0) {
this._y = 50;
}
if (engine == true) {
this._x = this._x + (_local4 * 0.5);
this._y = this._y + (_local3 * 0.5);
} else if (engine == false) {
this._x = this._x + (_local4 * 0.15);
this._y = this._y + (_local3 * 0.15);
}
var _local2 = new Object();
_local2.onKeyDown = function () {
if ((Key.isDown(32) && (powerX > 0)) && (scoreX > 9)) {
createProjectile2("power", ship._x, ship._y - 5, 0, -30);
powerX--;
scoreX = scoreX - 10;
score_txt.text = scoreX;
if (powerX == 0) {
ifpower._visible = false;
}
}
if (Key.isDown(40)) {
rocket = true;
rockets_txt._visible = true;
}
if (Key.isDown(38)) {
rocket = false;
rockets_txt._visible = false;
}
};
Key.addListener(_local2);
if ((((firing && (repeatTime == 0)) && (rocket == true)) && (superGift == true)) && (rocketsX > 0)) {
createProjectile2("rocket2", this._x, this._y - 5, 0, -8);
fireRate = 30;
rocketsX--;
rockets_txt.text = rocketsX;
} else if (((firing && (repeatTime == 0)) && (rocket == true)) && (rocketsX > 0)) {
createProjectile2("rocket", this._x, this._y - 5, 0, -7);
fireRate = 30;
rocketsX--;
rockets_txt.text = rocketsX;
} else if ((firing && (repeatTime == 0)) && (superGift == true)) {
createProjectile("bullet2", this._x, this._y - 5, 0, -10);
createProjectile("bullet2", this._x, this._y - 5, -3, -10);
createProjectile("bullet2", this._x, this._y - 5, 3, -10);
fireRate = 6;
powerup_txt.text = "Power!!";
powerup_txt._visible = true;
} else if (((((firing && (repeatTime == 0)) && (giveGift == true)) && (giveGift2 == true)) && (giveGift3 == true)) && (giveGift4 == true)) {
createProjectile("supercannon", this._x, this._y - 5, 0, -60);
fireRate = 3;
powerup_txt.text = "Power up 4";
} else if ((((firing && (repeatTime == 0)) && (giveGift == true)) && (giveGift2 == true)) && (giveGift3 == true)) {
createProjectile("laser", this._x, this._y - 5, 0, -95);
fireRate = 2;
powerup_txt.text = "Power up 3";
} else if (((firing && (repeatTime == 0)) && (giveGift == true)) && (giveGift2 == true)) {
createProjectile("super2", this._x, this._y - 5, 0, -45);
fireRate = 5;
powerup_txt.text = "Power up 2";
} else if ((firing && (repeatTime == 0)) && (giveGift == true)) {
createProjectile("super", this._x, this._y - 5, 0, -35);
fireRate = 7;
powerup_txt.text = "Power up 1";
powerup_txt._visible = true;
} else if (firing && (repeatTime == 0)) {
createProjectile("bullet", this._x, this._y - 5, 0, -speed);
fireRate = 9;
}
repeatTime++;
repeatTime = repeatTime % fireRate;
if (((enm1 == true) && (enemyTime == 0)) && (counter < 117)) {
var _local5 = (Math.random() * 100) + 80;
createenemy(enm1type, _local5, -30);
}
enemyTime++;
enemyTime = enemyTime % enemyRate;
if ((((enm2 == true) && (enemy2Time == 0)) && (counter > 40)) && (counter < 117)) {
var _local5 = (Math.random() * 100) + 80;
createenemy2(enm2type, _local5, -30);
}
enemy2Time++;
enemy2Time = enemy2Time % enemy2Rate;
if ((((enm3 == true) && (enemy3Time == 0)) && (counter > 40)) && (counter < 117)) {
var _local5 = (Math.random() * 100) + 80;
createenemy3(enm3type, _local5, -30);
}
enemy3Time++;
enemy3Time = enemy3Time % enemy3Rate;
if ((((enm4 == true) && (enemy4Time == 0)) && (counter > enm4count)) && (counter < 117)) {
var _local5 = (Math.random() * 100) + 80;
createenemy4(enm4type, _local5, -30);
}
enemy4Time++;
enemy4Time = enemy4Time % enemy4Rate;
if (((rockTime == 0) && (counter > 5)) && (counter < 117)) {
var _local5 = (Math.random() * 100) + 80;
createrock("rock", Math.floor(Math.random() * 380) + 10, -30);
if ((((easy == false) && (rockTime == 0)) && (counter > 20)) && (counter < 117)) {
_local5 = (Math.random() * 100) + 80;
createrock("rock2", Math.floor(Math.random() * 380) + 10, Math.floor(Math.random() * -80) + -170);
}
}
rockTime++;
rockTime = rockTime % rockRate;
if (((mineTime == 0) && (counter > 80)) && (counter < 117)) {
var _local5 = (Math.random() * 100) + 80;
createmine("mine", Math.floor(Math.random() * 380) + 10, Math.floor(Math.random() * 130) + 90);
}
mineTime++;
mineTime = mineTime % mineRate;
if (((giftTime == 0) && (counter > 10)) && (counter < 117)) {
var _local5 = (Math.random() * 100) + 80;
creategift("gift_mc", 200, -30);
}
giftTime++;
giftTime = giftTime % giftRate;
if (giftzTime == 0) {
var _local5 = (Math.random() * 100) + 80;
creategiftz("giftz_mc", 200, -30);
}
giftzTime++;
giftzTime = giftzTime % giftzRate;
if (((superTime == 0) && (counter > 0)) && (counter < 110)) {
var _local5 = (Math.random() * 100) + 80;
createsuper("supergift_mc", 200, -30);
}
superTime++;
superTime = superTime % superRate;
};
doCounter = function () {
counter++;
counter_txt.text = counter;
if (counter == customcounter) {
enemyLayer.removeMovieClip();
enemy2Layer.removeMovieClip();
enemy3Layer.removeMovieClip();
enemy4Layer.removeMovieClip();
projectileLayer.removeMovieClip();
projectileLayer2.removeMovieClip();
giftLayer.removeMovieClip();
giftzLayer.removeMovieClip();
superLayer.removeMovieClip();
rockLayer.removeMovieClip();
mineLayer.removeMovieClip();
gift_txt._visible = false;
rockets_txt._visible = false;
powerup_txt._visible = false;
clearInterval(countID);
clearInterval(giftcountID);
clearInterval(supercountID);
gotoAndPlay (730);
score = score + scoreX;
ship.swapDepths(cursor);
}
};
doLose = function () {
delete ship.onEnterFrame;
delete bgscroller.onEnterFrame;
enemyLayer.removeMovieClip();
enemy2Layer.removeMovieClip();
enemy3Layer.removeMovieClip();
enemy4Layer.removeMovieClip();
projectileLayer.removeMovieClip();
projectileLayer2.removeMovieClip();
giftLayer.removeMovieClip();
giftzLayer.removeMovieClip();
superLayer.removeMovieClip();
rockLayer.removeMovieClip();
mineLayer.removeMovieClip();
startButton._visible = true;
gift_txt._visible = false;
rockets_txt._visible = false;
powerup_txt._visible = false;
clearInterval(countID);
clearInterval(giftcountID);
clearInterval(supercountID);
cursor._visible = true;
levelbackButton._visible = true;
scoreX = 0;
lifeX = life;
powerX = power;
music.stop();
};
superdoCounter = function () {
supercounter--;
gift_txt.text = supercounter;
gift_txt._visible = true;
powerup_txt._visible = true;
clearInterval(giftcountID);
if (supercounter < 0) {
superGift = false;
gift_txt._visible = false;
powerup_txt._visible = false;
timeX = time;
clearInterval(supercountID);
}
};
giftdoCounter = function () {
giftcounter--;
gift_txt.text = giftcounter;
gift_txt._visible = true;
powerup_txt._visible = true;
if (giftcounter < 0) {
giveGift4 = false;
giveGift3 = false;
giveGift2 = false;
giveGift = false;
gift_txt._visible = false;
powerup_txt._visible = false;
timeX = time;
clearInterval(giftcountID);
}
};
countID = setInterval(doCounter, 1000);
_root.createEmptyMovieClip("projectileLayer2", 100);
projectileCount2 = 0;
_root.createEmptyMovieClip("projectileLayer", 99);
projectileCount = 0;
_root.createEmptyMovieClip("enemyLayer", 98);
enemyCount = 0;
if (extracount == 2) {
_root.createEmptyMovieClip("enemy2Layer", 97);
enemy2Count = 0;
}
if (extracount == 3) {
_root.createEmptyMovieClip("enemy3Layer", 96);
enemy3Count = 0;
}
if (extracount == 4) {
_root.createEmptyMovieClip("enemy4Layer", 95);
enemy4Count = 0;
}
_root.createEmptyMovieClip("giftLayer", 94);
giftCount = 0;
_root.createEmptyMovieClip("giftzLayer", 93);
giftzCount = 0;
_root.createEmptyMovieClip("superLayer", 92);
superCount = 0;
if (rock == true) {
_root.createEmptyMovieClip("rockLayer", 91);
rockCount = 0;
}
if (mine == true) {
_root.createEmptyMovieClip("mineLayer", 90);
mineCount = 0;
}
ship.swapDepths(101);
ship.gotoAndStop(1);
bgscroller.onEnterFrame = function () {
if (this._y >= 500) {
this._y = 0;
}
this._y = this._y + bgspeed;
};
};
createProjectile = function (type, x, y, dx, dy) {
var _local4 = "proj" + projectileCount;
projectileLayer.attachMovie(type, _local4, projectileCount);
projectileLayer[_local4]._x = x;
projectileLayer[_local4]._y = y;
projectileLayer[_local4].dx = dx;
projectileLayer[_local4].dy = dy;
projectileLayer[_local4].onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
if (this._y < -190) {
this.removeMovieClip();
}
var _local2 = 0;
while (_local2 < 10) {
var _local3 = "mine" + _local2;
if ((this.hitTest(mineLayer[_local3]) && (mineLayer[_local3]._currentframe == 17)) && (giveGift3 == true)) {
mineLayer[_local3].gotoAndPlay(18);
this.removeMovieClip();
}
if ((this.hitTest(mineLayer[_local3]) && (mineLayer[_local3]._currentframe < 17)) && (giveGift3 == true)) {
mineLayer[_local3].gotoAndPlay(18);
this.removeMovieClip();
}
_local3 = "enemy" + _local2;
if (this.hitTest(enemyLayer[_local3]) && (enemyLayer[_local3]._currentframe == 1)) {
enemyLayer[_local3].play();
scoreX++;
score_txt.text = scoreX;
this.removeMovieClip();
}
_local3 = "enemy2" + _local2;
if ((this.hitTest(enemy2Layer[_local3]) && (enemy2Layer[_local3]._currentframe == 1)) && (enemy2Die == 0)) {
enemy2Die++;
enemy2Layer[_local3].play();
scoreX = scoreX + 2;
score_txt.text = scoreX;
this.removeMovieClip();
} else if (this.hitTest(enemy2Layer[_local3]) && (enemy2Layer[_local3]._currentframe == 1)) {
enemy2Die--;
this.removeMovieClip();
}
_local2++;
}
};
projectileCount++;
projectileCount = projectileCount % 20;
};
createProjectile2 = function (type, x, y, dx, dy) {
var _local4 = "proj2" + projectileCount2;
projectileLayer2.attachMovie(type, _local4, projectileCount2);
projectileLayer2[_local4]._x = x;
projectileLayer2[_local4]._y = y;
projectileLayer2[_local4].dx = dx;
projectileLayer2[_local4].dy = dy;
projectileLayer2[_local4].onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
if (this._y < -80) {
this.removeMovieClip();
}
var _local2 = 0;
while (_local2 < 10) {
var _local3 = "rock" + _local2;
if (this.hitTest(rockLayer[_local3]) && (rockLayer[_local3]._currentframe == 1)) {
rockLayer[_local3].play();
}
_local3 = "mine" + _local2;
if (this.hitTest(mineLayer[_local3]) && (mineLayer[_local3]._currentframe < 18)) {
mineLayer[_local3].gotoAndPlay(18);
}
_local3 = "enemy" + _local2;
if (this.hitTest(enemyLayer[_local3]) && (enemyLayer[_local3]._currentframe == 1)) {
enemyLayer[_local3].play();
scoreX++;
score_txt.text = scoreX;
}
_local3 = "enemy2" + _local2;
if (this.hitTest(enemy2Layer[_local3]) && (enemy2Layer[_local3]._currentframe == 1)) {
enemy2Die = 1;
enemy2Layer[_local3].play();
scoreX = scoreX + 2;
score_txt.text = scoreX;
}
_local2++;
}
};
projectileCount2++;
projectileCount2 = projectileCount2 % 10;
};
createenemy = function (type, x, y) {
if (enm1 == true) {
var _local2 = "enemy" + enemyCount;
var _local3 = enmspeed;
if (enm1types == true) {
_local3 = enmspeed2;
}
enemyLayer.attachMovie(type, _local2, enemyCount);
enemyLayer[_local2]._x = x;
enemyLayer[_local2].xline = x;
enemyLayer[_local2]._y = y;
enemyLayer[_local2].dy = Math.random() * _local3;
enemyLayer[_local2].t = Math.random() * 6.28;
enemyLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.1;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (lifeX < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
lifeX--;
lifeloss.play();
life_txt.text = lifeX;
ship.gotoAndPlay(68);
}
if (this._y > 560) {
this.removeMovieClip();
}
};
}
enemyCount++;
enemyCount = enemyCount % 20;
};
createenemy2 = function (type, x, y) {
if (enm2 == true) {
var _local2 = "enemy2" + enemy2Count;
var _local3 = enmspeed;
if (enm2types == true) {
_local3 = enmspeed2;
}
enemy2Layer.attachMovie(type, _local2, enemy2Count);
enemy2Layer[_local2]._x = x;
enemy2Layer[_local2].xline = x;
enemy2Layer[_local2]._y = y;
enemy2Layer[_local2].dy = Math.random() * _local3;
enemy2Layer[_local2].t = Math.random() * 6.28;
enemy2Layer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.1;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (lifeX < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
lifeX--;
lifeloss.play();
life_txt.text = lifeX;
ship.gotoAndPlay(68);
}
if (((enm2types == true) && (this._y > 560)) && (enemy2Die == 0)) {
this.removeMovieClip();
enemy2Die = enmdie;
} else if ((enm2types == true) && (this._y > 560)) {
this.removeMovieClip();
}
};
}
enemy2Count++;
enemy2Count = enemy2Count % 20;
};
createenemy3 = function (type, x, y) {
if (enm3 == true) {
var _local2 = "enemy3" + enemy3Count;
var _local3 = enmspeed;
if (enm1types == true) {
_local3 = enmspeed2;
}
enemy3Layer.attachMovie(type, _local2, enemy3Count);
enemy3Layer[_local2]._x = x;
enemy3Layer[_local2].xline = x;
enemy3Layer[_local2]._y = y;
enemy3Layer[_local2].dy = Math.random() * _local3;
enemy3Layer[_local2].t = Math.random() * 6.38;
enemy3Layer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.1;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (lifeX < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
lifeX--;
lifeloss.play();
life_txt.text = lifeX;
ship.gotoAndPlay(68);
}
if ((this._y > 560) && (enemy3Die == 0)) {
this.removeMovieClip();
enemy3Die = enmdie;
} else if (this._y > 560) {
this.removeMovieClip();
}
};
}
enemy3Count++;
enemy3Count = enemy3Count % 10;
};
createenemy4 = function (type, x, y) {
var _local2 = "enemy4" + enemy4Count;
var _local3 = enmspeed;
if (enm1types == true) {
_local3 = enmspeed2;
}
enemy4Layer.attachMovie(type, _local2, enemy4Count);
enemy4Layer[_local2]._x = x;
enemy4Layer[_local2].xline = x;
enemy4Layer[_local2]._y = y;
enemy4Layer[_local2].dy = Math.random() * _local3;
enemy4Layer[_local2].t = Math.random() * 6.48;
enemy4Layer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.1;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (lifeX < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
lifeX--;
lifeloss.play();
life_txt.text = lifeX;
ship.gotoAndPlay(68);
}
if ((this._y > 560) && (enemy4Die == 0)) {
this.removeMovieClip();
enemy4Die = enmdie;
} else if (this._y > 560) {
this.removeMovieClip();
}
};
enemy4Count++;
enemy4Count = enemy4Count % 10;
};
creategift = function (type, x, y) {
var _local2 = "gift" + giftCount;
giftLayer.attachMovie(type, _local2, giftCount);
giftLayer[_local2]._x = x;
giftLayer[_local2].xline = x;
giftLayer[_local2]._y = y;
giftLayer[_local2].dy = (Math.random() * 16) + 12;
giftLayer[_local2].t = Math.random() * 7.28;
giftLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.1;
if (((superGift == true) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
this.removeMovieClip();
} else if (((((giveGift == true) && (giveGift2 == true)) && (giveGift3 == true)) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift4 = true;
this.removeMovieClip();
} else if ((((giveGift == true) && (giveGift2 == true)) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift3 = true;
this.removeMovieClip();
} else if (((giveGift == true) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift2 = true;
this.removeMovieClip();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift = true;
this.removeMovieClip();
giftcounter = timeX;
giftcountID = setInterval(giftdoCounter, 1000);
}
if (this._y > 500) {
this.removeMovieClip();
}
};
giftCount++;
giftCount = giftCount % 10;
};
creategiftz = function (type, x, y) {
var _local2 = "giftz" + giftzCount;
giftzLayer.attachMovie(type, _local2, giftzCount);
giftzLayer[_local2]._x = x;
giftzLayer[_local2].xline = x;
giftzLayer[_local2]._y = y;
giftzLayer[_local2].dy = (Math.random() * 16) + 6;
giftzLayer[_local2].t = Math.random() * 7.28;
giftzLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.2;
if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
scoreX = scoreX + 5;
score_txt.text = scoreX;
this.removeMovieClip();
}
if (this._y > 500) {
this.removeMovieClip();
}
};
giftzCount++;
giftzCount = giftzCount % 10;
};
createsuper = function (type, x, y) {
var _local2 = "supergift" + superCount;
superLayer.attachMovie(type, _local2, superCount);
superLayer[_local2]._x = x;
superLayer[_local2].xline = x;
superLayer[_local2]._y = y;
superLayer[_local2].dy = (Math.random() * 16) + 10;
superLayer[_local2].t = Math.random() * 7.28;
superLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.2;
if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
superGift = true;
giveGift = false;
giveGift2 = false;
giveGift3 = false;
supercounter = (timeX = timeX - 8);
supercountID = setInterval(superdoCounter, 1000);
this.removeMovieClip();
scoreX = scoreX + 5;
}
if (this._y > 500) {
this.removeMovieClip();
}
};
superCount++;
superCount = superCount % 10;
};
createrock = function (type, x, y) {
if (rock == true) {
var _local2 = "rock" + rockCount;
rockLayer.attachMovie(type, _local2, rockCount);
rockLayer[_local2]._x = x;
rockLayer[_local2].xline = x;
rockLayer[_local2]._y = y;
rockLayer[_local2].dy = 5;
rockLayer[_local2].onEnterFrame = function () {
this._y = this._y + this.dy;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (lifeX < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
lifeX--;
lifeloss.play();
life_txt.text = lifeX;
ship.gotoAndPlay(68);
}
if (this._y > 510) {
this.removeMovieClip();
}
};
}
rockCount++;
rockCount = rockCount % 10;
};
createmine = function (type, x, y) {
if (mine == true) {
var _local2 = "mine" + mineCount;
mineLayer.attachMovie(type, _local2, mineCount);
mineLayer[_local2]._x = x;
mineLayer[_local2].xline = x;
mineLayer[_local2]._y = y;
mineLayer[_local2].dy = 5;
mineLayer[_local2].onEnterFrame = function () {
this._y = this._y + this.dy;
if (((this._currentframe == 17) && (ship.hitTest(this._x, this._y, true))) && (lifeX < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 17) && (ship.hitTest(this._x, this._y, true))) {
this.play();
lifeX--;
lifeloss.play();
life_txt.text = lifeX;
ship.gotoAndPlay(68);
}
if (this._y > 510) {
this.removeMovieClip();
}
};
}
mineCount++;
mineCount = mineCount % 10;
};
startButton.onRelease = function () {
setup();
this._visible = false;
ifpower._visible = true;
scoreX = scoreX - score_txt.text;
life_txt.text = lifeX;
music = new Sound();
music.attachSound("dream");
music.start(0, 99);
};
Frame 880
stopAllSounds();
gotoAndPlay (700);
ship.removeMovieClip();
cursor._visible = true;
Frame 881
if (level > 1) {
gotoAndPlay (1159);
}
Instance of Symbol 466 MovieClip "cursor" in Frame 881
onClipEvent (enterFrame) {
startDrag (this, true);
}
Frame 909
stopAllSounds();
Frame 914
stop();
Frame 966
stop();
Frame 967
stop();
Frame 968
stop();
Frame 1018
stop();
Frame 1074
stop();
Frame 1075
stop();
Frame 1158
gotoAndPlay (1194);
Frame 1194
stopAllSounds();
gift_txt._visible = false;
levelbackButton._visible = true;
scoreX = 0;
score_txt.text = scoreX;
life_txt.text = life;
if (color == "red") {
shipred._visible = true;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipred;
} else if (color == "green") {
shipred._visible = false;
shipgreen._visible = true;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipgreen;
} else if (color == "white") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = true;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipwhite;
} else if (color == "blue") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = true;
shipbrown._visible = false;
ship = shipblue;
} else if (color == "brown") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = true;
ship = shipbrown;
}
Instance of Symbol 466 MovieClip "cursor" in Frame 1194
onClipEvent (enterFrame) {
startDrag (this, true);
}
Frame 1222
stop();
setup = function () {
firing = false;
rockets_txt.text = rockets;
score_txt.text = scoreX;
timeX = time;
powerX = power;
enemyTime = 0;
enemyRate = 40;
enemy2Time = 0;
enemy2Rate = 100;
mineTime = 0;
mineRate = 100;
rockTime = 0;
rockRate = 100;
giftTime = 0;
giftRate = 290;
giftzTime = 0;
giftzRate = 160;
superTime = 0;
superRate = 1000;
gift_txt.text = 0;
giveGift = false;
giveGift2 = false;
giveGift3 = false;
giveGift4 = false;
giftz = false;
superGift = false;
rocket = false;
rockets_txt._visible = false;
counter = 0;
counter_txt.text = counter;
giftcounter = 0;
supercounter = 0;
enemy2Die = 1;
cursor._visible = false;
levelbackButton._visible = false;
ship.onMouseDown = function () {
firing = true;
repeatTime = 0;
};
ship.onMouseUp = function () {
firing = false;
};
ship.onEnterFrame = function () {
this.destx = _xmouse;
this.desty = _ymouse;
var _local4 = this.destx - this._x;
var _local3 = this.desty - this._y;
if (this._x > 400) {
this._x = 350;
}
if (this._x < 0) {
this._x = 50;
}
if (this._y > 500) {
this._y = 450;
}
if (this._y < 0) {
this._y = 50;
}
if (engine == true) {
this._x = this._x + (_local4 * 0.5);
this._y = this._y + (_local3 * 0.5);
} else if (engine == false) {
this._x = this._x + (_local4 * 0.15);
this._y = this._y + (_local3 * 0.15);
}
var _local2 = new Object();
_local2.onKeyDown = function () {
if ((Key.isDown(32) && (powerX > 0)) && (scoreX > 9)) {
createProjectile2("power", ship._x, ship._y - 5, 0, -30);
powerX--;
scoreX = scoreX - 10;
score_txt.text = scoreX;
if (powerX == 0) {
ifpower._visible = false;
}
}
if (Key.isDown(40)) {
rocket = true;
rockets_txt._visible = true;
}
if (Key.isDown(38)) {
rocket = false;
rockets_txt._visible = false;
}
};
Key.addListener(_local2);
if ((((firing && (repeatTime == 0)) && (rocket == true)) && (superGift == true)) && (rockets > 0)) {
createProjectile2("rocket2", this._x, this._y - 5, 0, -8);
fireRate = 30;
rockets--;
rockets_txt.text = rockets;
} else if (((firing && (repeatTime == 0)) && (rocket == true)) && (rockets > 0)) {
createProjectile2("rocket", this._x, this._y - 5, 0, -7);
fireRate = 30;
rockets--;
rockets_txt.text = rockets;
} else if ((firing && (repeatTime == 0)) && (superGift == true)) {
createProjectile("bullet2", this._x, this._y - 5, 0, -10);
createProjectile("bullet2", this._x, this._y - 5, -3, -10);
createProjectile("bullet2", this._x, this._y - 5, 3, -10);
fireRate = 6;
powerup_txt.text = "Power!!";
powerup_txt._visible = true;
} else if (((((firing && (repeatTime == 0)) && (giveGift == true)) && (giveGift2 == true)) && (giveGift3 == true)) && (giveGift4 == true)) {
createProjectile("supercannon", this._x, this._y - 5, 0, -60);
fireRate = 3;
powerup_txt.text = "Power up 4";
} else if ((((firing && (repeatTime == 0)) && (giveGift == true)) && (giveGift2 == true)) && (giveGift3 == true)) {
createProjectile("laser", this._x, this._y - 5, 0, -95);
fireRate = 2;
powerup_txt.text = "Power up 3";
} else if (((firing && (repeatTime == 0)) && (giveGift == true)) && (giveGift2 == true)) {
createProjectile("super2", this._x, this._y - 5, 0, -45);
fireRate = 5;
powerup_txt.text = "Power up 2";
} else if ((firing && (repeatTime == 0)) && (giveGift == true)) {
createProjectile("super", this._x, this._y - 5, 0, -35);
fireRate = 7;
powerup_txt.text = "Power up 1";
powerup_txt._visible = true;
} else if (firing && (repeatTime == 0)) {
createProjectile("bullet", this._x, this._y - 5, 0, -speed);
fireRate = 9;
}
repeatTime++;
repeatTime = repeatTime % fireRate;
if ((enemyTime == 0) && (counter < 117)) {
var _local5 = (Math.random() * 100) + 80;
createenemy("1", _local5, -30);
if (((enemyTime == 0) && (counter > 10)) && (counter < 117)) {
_local5 = (Math.random() * 100) + 80;
createenemy("1", 400 - _local5, -50);
}
}
enemyTime++;
enemyTime = enemyTime % enemyRate;
if (((enemy2Time == 0) && (counter > 40)) && (counter < 117)) {
var _local5 = (Math.random() * 100) + 80;
createenemy2("2", _local5, -30);
}
enemy2Time++;
enemy2Time = enemy2Time % enemy2Rate;
if (((rockTime == 0) && (counter > 5)) && (counter < 117)) {
var _local5 = (Math.random() * 100) + 80;
createrock("rock", Math.floor(Math.random() * 380) + 10, -30);
if ((((easy == false) && (rockTime == 0)) && (counter > 20)) && (counter < 117)) {
_local5 = (Math.random() * 100) + 80;
createrock("rock2", Math.floor(Math.random() * 380) + 10, Math.floor(Math.random() * -80) + -170);
}
}
rockTime++;
rockTime = rockTime % rockRate;
if (((mineTime == 0) && (counter > 80)) && (counter < 117)) {
var _local5 = (Math.random() * 100) + 80;
createmine("mine", Math.floor(Math.random() * 380) + 10, Math.floor(Math.random() * 130) + 90);
}
mineTime++;
mineTime = mineTime % mineRate;
if (((giftTime == 0) && (counter > 10)) && (counter < 117)) {
var _local5 = (Math.random() * 100) + 80;
creategift("gift_mc", 200, -30);
}
giftTime++;
giftTime = giftTime % giftRate;
if (giftzTime == 0) {
var _local5 = (Math.random() * 100) + 80;
creategiftz("giftz_mc", 200, -30);
}
giftzTime++;
giftzTime = giftzTime % giftzRate;
if (((superTime == 0) && (counter > 0)) && (counter < 110)) {
var _local5 = (Math.random() * 100) + 80;
createsuper("supergift_mc", 200, -30);
}
superTime++;
superTime = superTime % superRate;
};
doCounter = function () {
counter++;
counter_txt.text = counter;
if (counter == 120) {
if (level == 1) {
level++;
}
enemyLayer.removeMovieClip();
enemy2Layer.removeMovieClip();
projectileLayer.removeMovieClip();
projectileLayer2.removeMovieClip();
giftLayer.removeMovieClip();
giftzLayer.removeMovieClip();
superLayer.removeMovieClip();
rockLayer.removeMovieClip();
mineLayer.removeMovieClip();
gift_txt._visible = false;
rockets_txt._visible = false;
powerup_txt._visible = false;
clearInterval(countID);
clearInterval(giftcountID);
clearInterval(supercountID);
gotoAndPlay (1223);
score = score + scoreX;
ship.swapDepths(cursor);
}
};
doLose = function () {
delete ship.onEnterFrame;
delete bgscroller.onEnterFrame;
enemyLayer.removeMovieClip();
enemy2Layer.removeMovieClip();
projectileLayer.removeMovieClip();
projectileLayer2.removeMovieClip();
giftLayer.removeMovieClip();
giftzLayer.removeMovieClip();
superLayer.removeMovieClip();
rockLayer.removeMovieClip();
mineLayer.removeMovieClip();
startButton._visible = true;
gift_txt._visible = false;
rockets_txt._visible = false;
powerup_txt._visible = false;
clearInterval(countID);
clearInterval(giftcountID);
clearInterval(supercountID);
cursor._visible = true;
levelbackButton._visible = true;
scoreX = 0;
powerX = power;
music.stop();
};
superdoCounter = function () {
supercounter--;
gift_txt.text = supercounter;
gift_txt._visible = true;
powerup_txt._visible = true;
clearInterval(giftcountID);
if (supercounter < 0) {
superGift = false;
gift_txt._visible = false;
powerup_txt._visible = false;
timeX = time;
clearInterval(supercountID);
}
};
giftdoCounter = function () {
giftcounter--;
gift_txt.text = giftcounter;
gift_txt._visible = true;
powerup_txt._visible = true;
if (giftcounter < 0) {
giveGift4 = false;
giveGift3 = false;
giveGift2 = false;
giveGift = false;
gift_txt._visible = false;
powerup_txt._visible = false;
timeX = time;
clearInterval(giftcountID);
}
};
countID = setInterval(doCounter, 1000);
_root.createEmptyMovieClip("projectileLayer2", 100);
projectileCount2 = 0;
_root.createEmptyMovieClip("projectileLayer", 99);
projectileCount = 0;
_root.createEmptyMovieClip("enemyLayer", 98);
enemyCount = 0;
_root.createEmptyMovieClip("enemy2Layer", 97);
enemy2Count = 0;
_root.createEmptyMovieClip("giftLayer", 96);
giftCount = 0;
_root.createEmptyMovieClip("giftzLayer", 95);
giftzCount = 0;
_root.createEmptyMovieClip("superLayer", 94);
superCount = 0;
_root.createEmptyMovieClip("rockLayer", 93);
rockCount = 0;
_root.createEmptyMovieClip("mineLayer", 92);
mineCount = 0;
ship.swapDepths(101);
ship.gotoAndStop(1);
bgscroller.onEnterFrame = function () {
if (this._y >= 500) {
this._y = 0;
}
this._y = this._y + 5;
};
};
createProjectile = function (type, x, y, dx, dy) {
var _local4 = "proj" + projectileCount;
projectileLayer.attachMovie(type, _local4, projectileCount);
projectileLayer[_local4]._x = x;
projectileLayer[_local4]._y = y;
projectileLayer[_local4].dx = dx;
projectileLayer[_local4].dy = dy;
projectileLayer[_local4].onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
if (this._y < -190) {
this.removeMovieClip();
}
var _local2 = 0;
while (_local2 < 10) {
var _local3 = "mine" + _local2;
if ((this.hitTest(mineLayer[_local3]) && (mineLayer[_local3]._currentframe == 17)) && (giveGift3 == true)) {
mineLayer[_local3].gotoAndPlay(18);
this.removeMovieClip();
}
if ((this.hitTest(mineLayer[_local3]) && (mineLayer[_local3]._currentframe < 17)) && (giveGift3 == true)) {
mineLayer[_local3].gotoAndPlay(18);
this.removeMovieClip();
}
_local3 = "enemy" + _local2;
if (this.hitTest(enemyLayer[_local3]) && (enemyLayer[_local3]._currentframe == 1)) {
enemyLayer[_local3].play();
scoreX++;
score_txt.text = scoreX;
this.removeMovieClip();
}
_local3 = "enemy2" + _local2;
if ((this.hitTest(enemy2Layer[_local3]) && (enemy2Layer[_local3]._currentframe == 1)) && (enemy2Die == 0)) {
enemy2Die++;
enemy2Layer[_local3].play();
scoreX = scoreX + 2;
score_txt.text = scoreX;
this.removeMovieClip();
} else if (this.hitTest(enemy2Layer[_local3]) && (enemy2Layer[_local3]._currentframe == 1)) {
enemy2Die--;
this.removeMovieClip();
}
_local2++;
}
};
projectileCount++;
projectileCount = projectileCount % 20;
};
createProjectile2 = function (type, x, y, dx, dy) {
var _local4 = "proj2" + projectileCount2;
projectileLayer2.attachMovie(type, _local4, projectileCount2);
projectileLayer2[_local4]._x = x;
projectileLayer2[_local4]._y = y;
projectileLayer2[_local4].dx = dx;
projectileLayer2[_local4].dy = dy;
projectileLayer2[_local4].onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
if (this._y < -80) {
this.removeMovieClip();
}
var _local2 = 0;
while (_local2 < 10) {
var _local3 = "rock" + _local2;
if (this.hitTest(rockLayer[_local3]) && (rockLayer[_local3]._currentframe == 1)) {
rockLayer[_local3].play();
}
_local3 = "mine" + _local2;
if (this.hitTest(mineLayer[_local3]) && (mineLayer[_local3]._currentframe < 18)) {
mineLayer[_local3].gotoAndPlay(18);
}
_local3 = "enemy" + _local2;
if (this.hitTest(enemyLayer[_local3]) && (enemyLayer[_local3]._currentframe == 1)) {
enemyLayer[_local3].play();
scoreX++;
score_txt.text = scoreX;
}
_local3 = "enemy2" + _local2;
if (this.hitTest(enemy2Layer[_local3]) && (enemy2Layer[_local3]._currentframe == 1)) {
enemy2Die = 1;
enemy2Layer[_local3].play();
scoreX = scoreX + 2;
score_txt.text = scoreX;
}
_local2++;
}
};
projectileCount2++;
projectileCount2 = projectileCount2 % 10;
};
createenemy = function (type, x, y) {
var _local2 = "enemy" + enemyCount;
enemyLayer.attachMovie(type, _local2, enemyCount);
enemyLayer[_local2]._x = x;
enemyLayer[_local2].xline = x;
enemyLayer[_local2]._y = y;
enemyLayer[_local2].dy = (Math.random() * 7) + 5;
enemyLayer[_local2].t = Math.random() * 6.28;
enemyLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.1;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if (this._y > 560) {
this.removeMovieClip();
}
};
enemyCount++;
enemyCount = enemyCount % 10;
};
createenemy2 = function (type, x, y) {
var _local2 = "enemy2" + enemy2Count;
enemy2Layer.attachMovie(type, _local2, enemy2Count);
enemy2Layer[_local2]._x = x;
enemy2Layer[_local2].xline = x;
enemy2Layer[_local2]._y = y;
enemy2Layer[_local2].dy = (Math.random() * 7) + 6;
enemy2Layer[_local2].t = Math.random() * 6.28;
enemy2Layer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.1;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if ((this._y > 560) && (enemy2Die == 0)) {
this.removeMovieClip();
enemy2Die++;
} else if (this._y > 560) {
this.removeMovieClip();
}
};
enemy2Count++;
enemy2Count = enemy2Count % 10;
};
creategift = function (type, x, y) {
var _local2 = "gift" + giftCount;
giftLayer.attachMovie(type, _local2, giftCount);
giftLayer[_local2]._x = x;
giftLayer[_local2].xline = x;
giftLayer[_local2]._y = y;
giftLayer[_local2].dy = (Math.random() * 16) + 12;
giftLayer[_local2].t = Math.random() * 7.28;
giftLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.1;
if (((superGift == true) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
this.removeMovieClip();
} else if (((((giveGift == true) && (giveGift2 == true)) && (giveGift3 == true)) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift4 = true;
this.removeMovieClip();
} else if ((((giveGift == true) && (giveGift2 == true)) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift3 = true;
this.removeMovieClip();
} else if (((giveGift == true) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift2 = true;
this.removeMovieClip();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift = true;
this.removeMovieClip();
giftcounter = timeX;
giftcountID = setInterval(giftdoCounter, 1000);
}
if (this._y > 500) {
this.removeMovieClip();
}
};
giftCount++;
giftCount = giftCount % 10;
};
creategiftz = function (type, x, y) {
var _local2 = "giftz" + giftzCount;
giftzLayer.attachMovie(type, _local2, giftzCount);
giftzLayer[_local2]._x = x;
giftzLayer[_local2].xline = x;
giftzLayer[_local2]._y = y;
giftzLayer[_local2].dy = (Math.random() * 16) + 6;
giftzLayer[_local2].t = Math.random() * 7.28;
giftzLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.2;
if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
scoreX = scoreX + 5;
score_txt.text = scoreX;
this.removeMovieClip();
}
if (this._y > 500) {
this.removeMovieClip();
}
};
giftzCount++;
giftzCount = giftzCount % 10;
};
createsuper = function (type, x, y) {
var _local2 = "supergift" + superCount;
superLayer.attachMovie(type, _local2, superCount);
superLayer[_local2]._x = x;
superLayer[_local2].xline = x;
superLayer[_local2]._y = y;
superLayer[_local2].dy = (Math.random() * 16) + 10;
superLayer[_local2].t = Math.random() * 7.28;
superLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.2;
if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
superGift = true;
giveGift = false;
giveGift2 = false;
giveGift3 = false;
supercounter = (timeX = timeX - 8);
supercountID = setInterval(superdoCounter, 1000);
this.removeMovieClip();
scoreX = scoreX + 5;
}
if (this._y > 500) {
this.removeMovieClip();
}
};
superCount++;
superCount = superCount % 10;
};
createrock = function (type, x, y) {
var _local2 = "rock" + rockCount;
rockLayer.attachMovie(type, _local2, rockCount);
rockLayer[_local2]._x = x;
rockLayer[_local2].xline = x;
rockLayer[_local2]._y = y;
rockLayer[_local2].dy = 5;
rockLayer[_local2].onEnterFrame = function () {
this._y = this._y + this.dy;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if (this._y > 510) {
this.removeMovieClip();
}
};
rockCount++;
rockCount = rockCount % 10;
};
createmine = function (type, x, y) {
var _local2 = "mine" + mineCount;
mineLayer.attachMovie(type, _local2, mineCount);
mineLayer[_local2]._x = x;
mineLayer[_local2].xline = x;
mineLayer[_local2]._y = y;
mineLayer[_local2].dy = 5;
mineLayer[_local2].onEnterFrame = function () {
this._y = this._y + this.dy;
if (((this._currentframe == 17) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 17) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if (this._y > 510) {
this.removeMovieClip();
}
};
mineCount++;
mineCount = mineCount % 10;
};
startButton.onRelease = function () {
setup();
this._visible = false;
ifpower._visible = true;
scoreX = scoreX - score_txt.text;
music = new Sound();
music.attachSound("dream");
music.start(0, 99);
};
Frame 1406
stopAllSounds();
gotoAndPlay (574);
ship.removeMovieClip();
cursor._visible = true;
Frame 1407
if (level > 2) {
gotoAndPlay (1687);
}
Instance of Symbol 466 MovieClip "cursor" in Frame 1407
onClipEvent (enterFrame) {
startDrag (this, true);
}
Frame 1435
stopAllSounds();
Frame 1440
stop();
Frame 1441
stop();
Frame 1524
stop();
Frame 1605
stop();
Frame 1606
stop();
Frame 1686
gotoAndPlay (1722);
Frame 1722
stopAllSounds();
gift_txt._visible = false;
levelbackButton._visible = true;
scoreX = 0;
score_txt.text = scoreX;
life_txt.text = life;
if (color == "red") {
shipred._visible = true;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipred;
} else if (color == "green") {
shipred._visible = false;
shipgreen._visible = true;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipgreen;
} else if (color == "white") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = true;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipwhite;
} else if (color == "blue") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = true;
shipbrown._visible = false;
ship = shipblue;
} else if (color == "brown") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = true;
ship = shipbrown;
}
Instance of Symbol 466 MovieClip "cursor" in Frame 1722
onClipEvent (enterFrame) {
startDrag (this, true);
}
Frame 1750
stop();
setup = function () {
firing = false;
rockets_txt.text = rockets;
score_txt.text = scoreX;
timeX = time;
powerX = power;
enemyTime = 0;
enemyRate = 40;
enemy2Time = 0;
enemy2Rate = 100;
enemy3Time = 0;
enemy3Rate = 110;
mineTime = 0;
mineRate = 100;
rockTime = 0;
rockRate = 100;
giftTime = 0;
giftRate = 280;
giftzTime = 0;
giftzRate = 160;
superTime = 0;
superRate = 1000;
gift_txt.text = 0;
giveGift = false;
giveGift2 = false;
giveGift3 = false;
giveGift4 = false;
giftz = false;
superGift = false;
rocket = false;
rockets_txt._visible = false;
counter = 0;
counter_txt.text = counter;
giftcounter = 0;
supercounter = 0;
enemy2Die = 1;
enemy3Die = 3;
cursor._visible = false;
levelbackButton._visible = false;
ship.onMouseDown = function () {
firing = true;
repeatTime = 0;
};
ship.onMouseUp = function () {
firing = false;
};
ship.onEnterFrame = function () {
this.destx = _xmouse;
this.desty = _ymouse;
var _local4 = this.destx - this._x;
var _local3 = this.desty - this._y;
if (this._x > 400) {
this._x = 350;
}
if (this._x < 0) {
this._x = 50;
}
if (this._y > 500) {
this._y = 450;
}
if (this._y < 0) {
this._y = 50;
}
if (engine == true) {
this._x = this._x + (_local4 * 0.5);
this._y = this._y + (_local3 * 0.5);
} else if (engine == false) {
this._x = this._x + (_local4 * 0.15);
this._y = this._y + (_local3 * 0.15);
}
var _local2 = new Object();
_local2.onKeyDown = function () {
if ((Key.isDown(32) && (powerX > 0)) && (scoreX > 9)) {
createProjectile2("power", ship._x, ship._y - 5, 0, -30);
powerX--;
scoreX = scoreX - 10;
score_txt.text = scoreX;
if (powerX == 0) {
ifpower._visible = false;
}
}
if (Key.isDown(40)) {
rocket = true;
rockets_txt._visible = true;
}
if (Key.isDown(38)) {
rocket = false;
rockets_txt._visible = false;
}
};
Key.addListener(_local2);
if ((((firing && (repeatTime == 0)) && (rocket == true)) && (superGift == true)) && (rockets > 0)) {
createProjectile2("rocket2", this._x, this._y - 5, 0, -8);
fireRate = 30;
rockets--;
rockets_txt.text = rockets;
} else if (((firing && (repeatTime == 0)) && (rocket == true)) && (rockets > 0)) {
createProjectile2("rocket", this._x, this._y - 5, 0, -7);
fireRate = 30;
rockets--;
rockets_txt.text = rockets;
} else if ((firing && (repeatTime == 0)) && (superGift == true)) {
createProjectile("bullet2", this._x, this._y - 5, 0, -10);
createProjectile("bullet2", this._x, this._y - 5, -3, -10);
createProjectile("bullet2", this._x, this._y - 5, 3, -10);
fireRate = 6;
powerup_txt.text = "Power!!";
powerup_txt._visible = true;
} else if (((((firing && (repeatTime == 0)) && (giveGift == true)) && (giveGift2 == true)) && (giveGift3 == true)) && (giveGift4 == true)) {
createProjectile("supercannon", this._x, this._y - 5, 0, -60);
fireRate = 3;
powerup_txt.text = "Power up 4";
} else if ((((firing && (repeatTime == 0)) && (giveGift == true)) && (giveGift2 == true)) && (giveGift3 == true)) {
createProjectile("laser", this._x, this._y - 5, 0, -95);
fireRate = 2;
powerup_txt.text = "Power up 3";
} else if (((firing && (repeatTime == 0)) && (giveGift == true)) && (giveGift2 == true)) {
createProjectile("super2", this._x, this._y - 5, 0, -45);
fireRate = 5;
powerup_txt.text = "Power up 2";
} else if ((firing && (repeatTime == 0)) && (giveGift == true)) {
createProjectile("super", this._x, this._y - 5, 0, -35);
fireRate = 7;
powerup_txt.text = "Power up 1";
powerup_txt._visible = true;
} else if (firing && (repeatTime == 0)) {
createProjectile("bullet", this._x, this._y - 5, 0, -speed);
fireRate = 9;
}
repeatTime++;
repeatTime = repeatTime % fireRate;
if ((enemyTime == 0) && (counter < 127)) {
var _local5 = (Math.random() * 100) + 80;
createenemy("1", _local5, -30);
if (((enemyTime == 0) && (counter > 2)) && (counter < 60)) {
_local5 = (Math.random() * 100) + 80;
createenemy("1", 400 - _local5, -90);
}
if ((((easy == false) && (enemyTime == 0)) && (counter > 15)) && (counter < 127)) {
_local5 = (Math.random() * 100) + 80;
createenemy("3sh", 400 - _local5, -50);
}
if (((enemyTime == 0) && (counter > 40)) && (counter < 127)) {
_local5 = (Math.random() * 100) + 80;
createenemy("3sh", 200, -90);
}
}
enemyTime++;
enemyTime = enemyTime % enemyRate;
if (((enemy2Time == 0) && (counter > 20)) && (counter < 75)) {
var _local5 = (Math.random() * 100) + 80;
createenemy2("2", _local5, -30);
}
enemy2Time++;
enemy2Time = enemy2Time % enemy2Rate;
if (((enemy3Time == 0) && (counter > 70)) && (counter < 127)) {
var _local5 = (Math.random() * 100) + 80;
createenemy3("4", 200, -30);
}
enemy3Time++;
enemy3Time = enemy3Time % enemy3Rate;
if (((rockTime == 0) && (counter > 5)) && (counter < 127)) {
var _local5 = (Math.random() * 100) + 80;
createrock("rock", Math.floor(Math.random() * 380) + 10, -30);
if (((rockTime == 0) && (counter > 10)) && (counter < 65)) {
_local5 = (Math.random() * 100) + 80;
createrock("rock2", Math.floor(Math.random() * 380) + 10, Math.floor(Math.random() * -80) + -170);
}
}
rockTime++;
rockTime = rockTime % rockRate;
if (((mineTime == 0) && (counter > 50)) && (counter < 127)) {
var _local5 = (Math.random() * 100) + 80;
createmine("mine", Math.floor(Math.random() * 380) + 10, Math.floor(Math.random() * 130) + 90);
}
mineTime++;
mineTime = mineTime % mineRate;
if (((giftTime == 0) && (counter > 10)) && (counter < 127)) {
var _local5 = (Math.random() * 100) + 80;
creategift("gift_mc", 200, -30);
}
giftTime++;
giftTime = giftTime % giftRate;
if (giftzTime == 0) {
var _local5 = (Math.random() * 100) + 80;
creategiftz("giftz_mc", 200, -30);
}
giftzTime++;
giftzTime = giftzTime % giftzRate;
if (((superTime == 0) && (counter > 10)) && (counter < 120)) {
var _local5 = (Math.random() * 100) + 80;
createsuper("supergift_mc", 200, -30);
}
superTime++;
superTime = superTime % superRate;
};
doCounter = function () {
counter++;
counter_txt.text = counter;
if (counter == 130) {
enemyLayer.removeMovieClip();
enemy2Layer.removeMovieClip();
enemy3Layer.removeMovieClip();
projectileLayer.removeMovieClip();
projectileLayer2.removeMovieClip();
giftLayer.removeMovieClip();
giftzLayer.removeMovieClip();
superLayer.removeMovieClip();
rockLayer.removeMovieClip();
mineLayer.removeMovieClip();
gift_txt._visible = false;
rockets_txt._visible = false;
powerup_txt._visible = false;
clearInterval(countID);
clearInterval(giftcountID);
clearInterval(supercountID);
gotoAndPlay (1751);
score = score + scoreX;
ship.swapDepths(cursor);
}
};
doLose = function () {
delete ship.onEnterFrame;
delete bgscroller.onEnterFrame;
enemyLayer.removeMovieClip();
enemy2Layer.removeMovieClip();
enemy3Layer.removeMovieClip();
projectileLayer.removeMovieClip();
projectileLayer2.removeMovieClip();
giftLayer.removeMovieClip();
giftzLayer.removeMovieClip();
superLayer.removeMovieClip();
rockLayer.removeMovieClip();
mineLayer.removeMovieClip();
startButton._visible = true;
gift_txt._visible = false;
rockets_txt._visible = false;
powerup_txt._visible = false;
clearInterval(countID);
clearInterval(giftcountID);
clearInterval(supercountID);
cursor._visible = true;
levelbackButton._visible = true;
scoreX = 0;
powerX = power;
music.stop();
};
superdoCounter = function () {
supercounter--;
gift_txt.text = supercounter;
gift_txt._visible = true;
powerup_txt._visible = true;
clearInterval(giftcountID);
if (supercounter < 0) {
superGift = false;
gift_txt._visible = false;
powerup_txt._visible = false;
timeX = time;
clearInterval(supercountID);
}
};
giftdoCounter = function () {
giftcounter--;
gift_txt.text = giftcounter;
gift_txt._visible = true;
powerup_txt._visible = true;
if (giftcounter < 0) {
giveGift4 = false;
giveGift3 = false;
giveGift2 = false;
giveGift = false;
gift_txt._visible = false;
powerup_txt._visible = false;
timeX = time;
clearInterval(giftcountID);
}
};
countID = setInterval(doCounter, 1000);
_root.createEmptyMovieClip("projectileLayer2", 100);
projectileCount2 = 0;
_root.createEmptyMovieClip("projectileLayer", 99);
projectileCount = 0;
_root.createEmptyMovieClip("enemyLayer", 98);
enemyCount = 0;
_root.createEmptyMovieClip("enemy2Layer", 97);
enemy2Count = 0;
_root.createEmptyMovieClip("enemy3Layer", 96);
enemy3Count = 0;
_root.createEmptyMovieClip("giftLayer", 95);
giftCount = 0;
_root.createEmptyMovieClip("giftzLayer", 94);
giftzCount = 0;
_root.createEmptyMovieClip("superLayer", 93);
superCount = 0;
_root.createEmptyMovieClip("rockLayer", 92);
rockCount = 0;
_root.createEmptyMovieClip("mineLayer", 91);
mineCount = 0;
ship.swapDepths(101);
ship.gotoAndStop(1);
bgscroller.onEnterFrame = function () {
if (this._y >= 500) {
this._y = 0;
}
this._y = this._y + 5;
};
};
createProjectile = function (type, x, y, dx, dy) {
var _local4 = "proj" + projectileCount;
projectileLayer.attachMovie(type, _local4, projectileCount);
projectileLayer[_local4]._x = x;
projectileLayer[_local4]._y = y;
projectileLayer[_local4].dx = dx;
projectileLayer[_local4].dy = dy;
projectileLayer[_local4].onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
if (this._y < -190) {
this.removeMovieClip();
}
var _local2 = 0;
while (_local2 < 20) {
var _local3 = "mine" + _local2;
if ((this.hitTest(mineLayer[_local3]) && (mineLayer[_local3]._currentframe == 17)) && (giveGift3 == true)) {
mineLayer[_local3].gotoAndPlay(18);
this.removeMovieClip();
}
if ((this.hitTest(mineLayer[_local3]) && (mineLayer[_local3]._currentframe < 17)) && (giveGift3 == true)) {
mineLayer[_local3].gotoAndPlay(18);
this.removeMovieClip();
}
_local3 = "enemy" + _local2;
if (this.hitTest(enemyLayer[_local3]) && (enemyLayer[_local3]._currentframe == 1)) {
enemyLayer[_local3].play();
scoreX++;
score_txt.text = scoreX;
this.removeMovieClip();
}
_local3 = "enemy2" + _local2;
if ((this.hitTest(enemy2Layer[_local3]) && (enemy2Layer[_local3]._currentframe == 1)) && (enemy2Die == 0)) {
enemy2Die++;
enemy2Layer[_local3].play();
scoreX = scoreX + 2;
score_txt.text = scoreX;
this.removeMovieClip();
} else if (this.hitTest(enemy2Layer[_local3]) && (enemy2Layer[_local3]._currentframe == 1)) {
enemy2Die--;
this.removeMovieClip();
}
_local3 = "enemy3" + _local2;
if ((this.hitTest(enemy3Layer[_local3]) && (enemy3Layer[_local3]._currentframe == 1)) && (enemy3Die == 0)) {
enemy3Die = 3;
enemy3Layer[_local3].play();
scoreX = scoreX + 3;
score_txt.text = scoreX;
this.removeMovieClip();
} else if (this.hitTest(enemy3Layer[_local3]) && (enemy3Layer[_local3]._currentframe == 1)) {
enemy3Die--;
this.removeMovieClip();
}
_local2++;
}
};
projectileCount++;
projectileCount = projectileCount % 20;
};
createProjectile2 = function (type, x, y, dx, dy) {
var _local4 = "proj2" + projectileCount2;
projectileLayer2.attachMovie(type, _local4, projectileCount2);
projectileLayer2[_local4]._x = x;
projectileLayer2[_local4]._y = y;
projectileLayer2[_local4].dx = dx;
projectileLayer2[_local4].dy = dy;
projectileLayer2[_local4].onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
if (this._y < -80) {
this.removeMovieClip();
}
var _local2 = 0;
while (_local2 < 20) {
var _local3 = "rock" + _local2;
if (this.hitTest(rockLayer[_local3]) && (rockLayer[_local3]._currentframe == 1)) {
rockLayer[_local3].play();
}
_local3 = "mine" + _local2;
if (this.hitTest(mineLayer[_local3]) && (mineLayer[_local3]._currentframe < 18)) {
mineLayer[_local3].gotoAndPlay(18);
}
_local3 = "enemy" + _local2;
if (this.hitTest(enemyLayer[_local3]) && (enemyLayer[_local3]._currentframe == 1)) {
enemyLayer[_local3].play();
scoreX++;
score_txt.text = scoreX;
}
_local3 = "enemy2" + _local2;
if (this.hitTest(enemy2Layer[_local3]) && (enemy2Layer[_local3]._currentframe == 1)) {
enemy2Die = 1;
enemy2Layer[_local3].play();
scoreX = scoreX + 2;
score_txt.text = scoreX;
}
_local3 = "enemy3" + _local2;
if (this.hitTest(enemy3Layer[_local3]) && (enemy3Layer[_local3]._currentframe == 1)) {
enemy3Die = 3;
enemy3Layer[_local3].play();
scoreX = scoreX + 3;
score_txt.text = scoreX;
}
_local2++;
}
};
projectileCount2++;
projectileCount2 = projectileCount2 % 10;
};
createenemy = function (type, x, y) {
var _local2 = "enemy" + enemyCount;
enemyLayer.attachMovie(type, _local2, enemyCount);
enemyLayer[_local2]._x = x;
enemyLayer[_local2].xline = x;
enemyLayer[_local2]._y = y;
enemyLayer[_local2].dy = (Math.random() * 7) + 5;
enemyLayer[_local2].t = Math.random() * 6.28;
enemyLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.1;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if (this._y > 560) {
this.removeMovieClip();
}
};
enemyCount++;
enemyCount = enemyCount % 10;
};
createenemy2 = function (type, x, y) {
var _local2 = "enemy2" + enemy2Count;
enemy2Layer.attachMovie(type, _local2, enemy2Count);
enemy2Layer[_local2]._x = x;
enemy2Layer[_local2].xline = x;
enemy2Layer[_local2]._y = y;
enemy2Layer[_local2].dy = (Math.random() * 7) + 6;
enemy2Layer[_local2].t = Math.random() * 6.28;
enemy2Layer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.1;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if ((this._y > 560) && (enemy2Die == 0)) {
this.removeMovieClip();
enemy2Die++;
} else if (this._y > 560) {
this.removeMovieClip();
}
};
enemy2Count++;
enemy2Count = enemy2Count % 20;
};
createenemy3 = function (type, x, y) {
var _local2 = "enemy3" + enemy3Count;
enemy3Layer.attachMovie(type, _local2, enemy3Count);
enemy3Layer[_local2]._x = x;
enemy3Layer[_local2].xline = x;
enemy3Layer[_local2]._y = y;
enemy3Layer[_local2].dy = (Math.random() * 8) + 6;
enemy3Layer[_local2].t = Math.random() * 6.28;
enemy3Layer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.07;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if ((this._y > 560) && (enemy3Die < 3)) {
this.removeMovieClip();
enemy3Die = 3;
} else if (this._y > 560) {
this.removeMovieClip();
}
};
enemy3Count++;
enemy3Count = enemy3Count % 10;
};
creategift = function (type, x, y) {
var _local2 = "gift" + giftCount;
giftLayer.attachMovie(type, _local2, giftCount);
giftLayer[_local2]._x = x;
giftLayer[_local2].xline = x;
giftLayer[_local2]._y = y;
giftLayer[_local2].dy = (Math.random() * 16) + 12;
giftLayer[_local2].t = Math.random() * 7.28;
giftLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.1;
if (((superGift == true) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
this.removeMovieClip();
} else if (((((giveGift == true) && (giveGift2 == true)) && (giveGift3 == true)) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift4 = true;
this.removeMovieClip();
} else if ((((giveGift == true) && (giveGift2 == true)) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift3 = true;
this.removeMovieClip();
} else if (((giveGift == true) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift2 = true;
this.removeMovieClip();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift = true;
this.removeMovieClip();
giftcounter = timeX;
giftcountID = setInterval(giftdoCounter, 1000);
}
if (this._y > 500) {
this.removeMovieClip();
}
};
giftCount++;
giftCount = giftCount % 10;
};
creategiftz = function (type, x, y) {
var _local2 = "giftz" + giftzCount;
giftzLayer.attachMovie(type, _local2, giftzCount);
giftzLayer[_local2]._x = x;
giftzLayer[_local2].xline = x;
giftzLayer[_local2]._y = y;
giftzLayer[_local2].dy = (Math.random() * 16) + 6;
giftzLayer[_local2].t = Math.random() * 7.28;
giftzLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.2;
if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
scoreX = scoreX + 5;
score_txt.text = scoreX;
this.removeMovieClip();
}
if (this._y > 500) {
this.removeMovieClip();
}
};
giftzCount++;
giftzCount = giftzCount % 10;
};
createsuper = function (type, x, y) {
var _local2 = "supergift" + superCount;
superLayer.attachMovie(type, _local2, superCount);
superLayer[_local2]._x = x;
superLayer[_local2].xline = x;
superLayer[_local2]._y = y;
superLayer[_local2].dy = (Math.random() * 16) + 10;
superLayer[_local2].t = Math.random() * 7.28;
superLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.2;
if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
superGift = true;
giveGift = false;
giveGift2 = false;
giveGift3 = false;
supercounter = (timeX = timeX - 8);
supercountID = setInterval(superdoCounter, 1000);
this.removeMovieClip();
scoreX = scoreX + 5;
}
if (this._y > 500) {
this.removeMovieClip();
}
};
superCount++;
superCount = superCount % 10;
};
createrock = function (type, x, y) {
var _local2 = "rock" + rockCount;
rockLayer.attachMovie(type, _local2, rockCount);
rockLayer[_local2]._x = x;
rockLayer[_local2].xline = x;
rockLayer[_local2]._y = y;
rockLayer[_local2].dy = 5;
rockLayer[_local2].onEnterFrame = function () {
this._y = this._y + this.dy;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if (this._y > 510) {
this.removeMovieClip();
}
};
rockCount++;
rockCount = rockCount % 10;
};
createmine = function (type, x, y) {
var _local2 = "mine" + mineCount;
mineLayer.attachMovie(type, _local2, mineCount);
mineLayer[_local2]._x = x;
mineLayer[_local2].xline = x;
mineLayer[_local2]._y = y;
mineLayer[_local2].dy = 5;
mineLayer[_local2].onEnterFrame = function () {
this._y = this._y + this.dy;
if (((this._currentframe == 17) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 17) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if (this._y > 510) {
this.removeMovieClip();
}
};
mineCount++;
mineCount = mineCount % 10;
};
startButton.onRelease = function () {
setup();
this._visible = false;
ifpower._visible = true;
scoreX = scoreX - score_txt.text;
music = new Sound();
music.attachSound("bliss");
music.start(0, 99);
};
Frame 1934
stopAllSounds();
if (boss == false) {
gotoAndPlay (574);
cursor._visible = true;
} else if (bosscount > 0) {
gotoAndPlay (574);
cursor._visible = true;
}
ship.removeMovieClip();
Instance of Symbol 466 MovieClip "cursor" in Frame 1935
onClipEvent (enterFrame) {
startDrag (this, true);
}
Frame 1965
stop();
Frame 2031
stopAllSounds();
gift_txt._visible = false;
levelbackButton._visible = true;
scoreX = 0;
score_txt.text = scoreX;
life_txt.text = life;
if (color == "red") {
shipred._visible = true;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipred;
} else if (color == "green") {
shipred._visible = false;
shipgreen._visible = true;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipgreen;
} else if (color == "white") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = true;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipwhite;
} else if (color == "blue") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = true;
shipbrown._visible = false;
ship = shipblue;
} else if (color == "brown") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = true;
ship = shipbrown;
}
Frame 2059
stop();
setup = function () {
firing = false;
rockets_txt.text = rockets;
score_txt.text = scoreX;
timeX = time;
powerX = power;
enemyTime = 0;
enemyRate = 40;
enemy2Time = 0;
enemy2Rate = 110;
bossTime = 0;
bossRate = 25;
shootTime = 0;
shootRate = 25;
shoot2Time = 0;
shoot2Rate = 125;
counter = 0;
counter_txt.text = counter;
enemy2Die = 1;
cursor._visible = false;
levelbackButton._visible = false;
if (easy == false) {
bossDie = 17;
} else if (easy == true) {
bossDie = 10;
}
ship.onMouseDown = function () {
firing = true;
repeatTime = 0;
};
ship.onMouseUp = function () {
firing = false;
};
ship.onEnterFrame = function () {
this.destx = _xmouse;
this.desty = _ymouse;
var _local4 = this.destx - this._x;
var _local3 = this.desty - this._y;
if (this._x > 400) {
this._x = 350;
}
if (this._x < 0) {
this._x = 50;
}
if (this._y > 500) {
this._y = 450;
}
if (this._y < 0) {
this._y = 50;
}
if (engine == true) {
this._x = this._x + (_local4 * 0.5);
this._y = this._y + (_local3 * 0.5);
} else if (engine == false) {
this._x = this._x + (_local4 * 0.15);
this._y = this._y + (_local3 * 0.15);
}
var _local2 = new Object();
_local2.onKeyDown = function () {
if ((Key.isDown(32) && (powerX > 0)) && (scoreX > 9)) {
createProjectile2("power", ship._x, ship._y - 5, 0, -30);
powerX--;
scoreX = scoreX - 10;
score_txt.text = scoreX;
if (powerX == 0) {
ifpower._visible = false;
}
}
if (Key.isDown(40)) {
rocket = true;
rockets_txt._visible = true;
}
if (Key.isDown(38)) {
rocket = false;
rockets_txt._visible = false;
}
};
Key.addListener(_local2);
if ((((firing && (repeatTime == 0)) && (rocket == true)) && (superGift == true)) && (rockets > 0)) {
createProjectile2("rocket2", this._x, this._y - 5, 0, -8);
fireRate = 30;
rockets--;
rockets_txt.text = rockets;
} else if (((firing && (repeatTime == 0)) && (rocket == true)) && (rockets > 0)) {
createProjectile2("rocket", this._x, this._y - 5, 0, -7);
fireRate = 30;
rockets--;
rockets_txt.text = rockets;
} else if (firing && (repeatTime == 0)) {
createProjectile("bullet", this._x, this._y - 5, 0, -speed);
fireRate = 9;
}
repeatTime++;
repeatTime = repeatTime % fireRate;
if (((bossTime == 0) && (counter > 1)) && (counter < 3)) {
createboss("boss1", 200, 5);
}
bossTime++;
bossTime = bossTime % bossRate;
if ((shootTime == 0) && (counter > 3)) {
var _local5 = 100;
createshoot("shoot", 317 - _local5, 25);
createshoot("shoot", 277 - _local5, 18);
createshoot("shoot", 357 - _local5, 18);
}
shootTime++;
shootTime = shootTime % shootRate;
if ((shoot2Time == 0) && (counter > 2)) {
var _local5 = 100;
createshoot2("shoot2", 317 - _local5, 25);
createshoot2("shoot2", 272 - _local5, 18);
createshoot2("shoot2", 362 - _local5, 18);
}
shoot2Time++;
shoot2Time = shoot2Time % shoot2Rate;
if ((enemyTime == 0) && (counter < 127)) {
var _local5 = (Math.random() * 100) + 80;
createenemy("1", _local5, -30);
if ((enemyTime == 0) && (counter > 2)) {
_local5 = (Math.random() * 100) + 80;
createenemy("1", 400 - _local5, -90);
}
}
enemyTime++;
enemyTime = enemyTime % enemyRate;
if ((enemy2Time == 0) && (counter > 10)) {
var _local5 = (Math.random() * 100) + 200;
createenemy2("2", _local5, -30);
}
enemy2Time++;
enemy2Time = enemy2Time % enemy2Rate;
flash_anm.play();
};
doCounter = function () {
counter++;
counter_txt.text = counter;
if (bossDie == 0) {
level++;
bosscount++;
enemyLayer.removeMovieClip();
enemy2Layer.removeMovieClip();
projectileLayer.removeMovieClip();
projectileLayer2.removeMovieClip();
rockets_txt._visible = false;
bossLayer.removeMovieClip();
shootLayer.removeMovieClip();
shoot2Layer.removeMovieClip();
clearInterval(countID);
gotoAndPlay (2060);
scoreX = scoreX + 200;
score_txt.text = scoreX;
score = score + scoreX;
ship.swapDepths(cursor);
music.stop();
}
};
doLose = function () {
flash_anm.stop();
flash_anm.gotoAndPlay(1);
delete ship.onEnterFrame;
delete bgscroller.onEnterFrame;
enemyLayer.removeMovieClip();
enemy2Layer.removeMovieClip();
projectileLayer.removeMovieClip();
projectileLayer2.removeMovieClip();
startButton._visible = true;
bossLayer.removeMovieClip();
shootLayer.removeMovieClip();
shoot2Layer.removeMovieClip();
rockets_txt._visible = false;
clearInterval(countID);
cursor._visible = true;
levelbackButton._visible = true;
scoreX = 0;
powerX = power;
music.stop();
};
countID = setInterval(doCounter, 1000);
_root.createEmptyMovieClip("bossLayer", 100);
bossCount = 0;
_root.createEmptyMovieClip("projectileLayer2", 99);
projectileCount2 = 0;
_root.createEmptyMovieClip("projectileLayer", 98);
projectileCount = 0;
_root.createEmptyMovieClip("enemyLayer", 97);
enemyCount = 0;
_root.createEmptyMovieClip("enemy2Layer", 96);
enemy2Count = 0;
_root.createEmptyMovieClip("shootLayer", 95);
shootCount = 0;
_root.createEmptyMovieClip("shoot2Layer", 94);
shoot2Count = 0;
ship.swapDepths(101);
ship.gotoAndStop(1);
bgscroller.onEnterFrame = function () {
if (this._y >= 500) {
this._y = 0;
}
this._y = this._y + 4;
};
};
createProjectile = function (type, x, y, dx, dy) {
var _local4 = "proj" + projectileCount;
projectileLayer.attachMovie(type, _local4, projectileCount);
projectileLayer[_local4]._x = x;
projectileLayer[_local4]._y = y;
projectileLayer[_local4].dx = dx;
projectileLayer[_local4].dy = dy;
projectileLayer[_local4].onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
if (this._y < -190) {
this.removeMovieClip();
}
var _local2 = 0;
while (_local2 < 10) {
var _local3 = "boss" + _local2;
if ((this.hitTest(bossLayer[_local3]) && (bossLayer[_local3]._currentframe == 58)) && (bossDie == 0)) {
doCounter();
scoreX = scoreX + 100;
score_txt.text = scoreX;
this.removeMovieClip();
} else if (this.hitTest(bossLayer[_local3]) && (bossLayer[_local3]._currentframe == 58)) {
bossDie--;
this.removeMovieClip();
mySoundObject = new Sound();
mySoundObject.attachSound("weird");
mySoundObject.start(0, 1);
}
_local3 = "enemy" + _local2;
if (this.hitTest(enemyLayer[_local3]) && (enemyLayer[_local3]._currentframe == 1)) {
enemyLayer[_local3].play();
scoreX++;
score_txt.text = scoreX;
this.removeMovieClip();
}
_local3 = "enemy2" + _local2;
if ((this.hitTest(enemy2Layer[_local3]) && (enemy2Layer[_local3]._currentframe == 1)) && (enemy2Die == 0)) {
enemy2Die++;
enemy2Layer[_local3].play();
scoreX = scoreX + 2;
score_txt.text = scoreX;
this.removeMovieClip();
} else if (this.hitTest(enemy2Layer[_local3]) && (enemy2Layer[_local3]._currentframe == 1)) {
enemy2Die--;
this.removeMovieClip();
}
_local2++;
}
};
projectileCount++;
projectileCount = projectileCount % 20;
};
createProjectile2 = function (type, x, y, dx, dy) {
var _local4 = "proj2" + projectileCount2;
projectileLayer2.attachMovie(type, _local4, projectileCount2);
projectileLayer2[_local4]._x = x;
projectileLayer2[_local4]._y = y;
projectileLayer2[_local4].dx = dx;
projectileLayer2[_local4].dy = dy;
projectileLayer2[_local4].onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
if (this._y < -80) {
this.removeMovieClip();
}
var _local2 = 0;
while (_local2 < 10) {
var _local3 = "enemy" + _local2;
if (this.hitTest(enemyLayer[_local3]) && (enemyLayer[_local3]._currentframe == 1)) {
enemyLayer[_local3].play();
scoreX++;
score_txt.text = scoreX;
}
_local3 = "enemy2" + _local2;
if (this.hitTest(enemy2Layer[_local3]) && (enemy2Layer[_local3]._currentframe == 1)) {
enemy2Die = 1;
enemy2Layer[_local3].play();
scoreX = scoreX + 2;
score_txt.text = scoreX;
}
_local2++;
}
};
projectileCount2++;
projectileCount2 = projectileCount2 % 10;
};
createboss = function (type, x, y) {
var _local2 = "boss" + bossCount;
bossLayer.attachMovie(type, _local2, bossCount);
bossLayer[_local2]._x = x;
bossLayer[_local2].xline = x;
bossLayer[_local2]._y = y;
bossLayer[_local2].dy = 0;
bossLayer[_local2].onEnterFrame = function () {
this._y = this._y + this.dy;
if ((this._currentframe == 51) && (ship.hitTest(this._x, this._y, true))) {
counter = 1;
doLose();
ship.play();
}
};
bossCount++;
bossCount = bossCount % 10;
};
createshoot = function (type, x, y) {
var _local2 = "shoot" + shootCount;
shootLayer.attachMovie(type, _local2, shootCount);
shootLayer[_local2]._x = x;
shootLayer[_local2].xline = x;
shootLayer[_local2]._y = y;
shootLayer[_local2].dy = 15;
shootLayer[_local2].onEnterFrame = function () {
this._y = this._y + this.dy;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
};
shootCount++;
shootCount = shootCount % 10;
};
createshoot2 = function (type, x, y) {
var _local2 = "shoot2" + shoot2Count;
shoot2Layer.attachMovie(type, _local2, shoot2Count);
shoot2Layer[_local2]._x = x;
shoot2Layer[_local2].xline = x;
shoot2Layer[_local2]._y = y;
shoot2Layer[_local2].dy = 25;
shoot2Layer[_local2].onEnterFrame = function () {
this._y = this._y + this.dy;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
};
shoot2Count++;
shoot2Count = shoot2Count % 10;
};
createenemy = function (type, x, y) {
var _local2 = "enemy" + enemyCount;
enemyLayer.attachMovie(type, _local2, enemyCount);
enemyLayer[_local2]._x = x;
enemyLayer[_local2].xline = x;
enemyLayer[_local2]._y = y;
enemyLayer[_local2].dy = (Math.random() * 7) + 6;
enemyLayer[_local2].t = Math.random() * 6.28;
enemyLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.1;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if (this._y > 560) {
this.removeMovieClip();
}
};
enemyCount++;
enemyCount = enemyCount % 10;
};
createenemy2 = function (type, x, y) {
var _local2 = "enemy2" + enemy2Count;
enemy2Layer.attachMovie(type, _local2, enemy2Count);
enemy2Layer[_local2]._x = x;
enemy2Layer[_local2].xline = x;
enemy2Layer[_local2]._y = y;
enemy2Layer[_local2].dy = (Math.random() * 7) + 6;
enemy2Layer[_local2].t = Math.random() * 6.28;
enemy2Layer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.1;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if ((this._y > 560) && (enemy2Die == 0)) {
this.removeMovieClip();
enemy2Die++;
} else if (this._y > 560) {
this.removeMovieClip();
}
};
enemy2Count++;
enemy2Count = enemy2Count % 10;
};
startButton.onRelease = function () {
setup();
this._visible = false;
ifpower._visible = true;
scoreX = scoreX - score_txt.text;
music = new Sound();
music.attachSound("raver");
music.start(0, 99);
};
Frame 2291
stopAllSounds();
ship.removeMovieClip();
cursor._visible = true;
Frame 2414
stop();
Frame 2484
stop();
Frame 2485
if (level > 3) {
gotoAndPlay (2748);
}
Instance of Symbol 466 MovieClip "cursor" in Frame 2485
onClipEvent (enterFrame) {
startDrag (this, true);
}
Frame 2486
stopAllSounds();
Frame 2544
stop();
Frame 2622
stop();
Frame 2673
stop();
Frame 2674
stop();
Frame 2675
stop();
Frame 2747
gotoAndPlay (2783);
Frame 2783
stopAllSounds();
gift_txt._visible = false;
levelbackButton._visible = true;
scoreX = 0;
score_txt.text = scoreX;
life_txt.text = life;
if (color == "red") {
shipred._visible = true;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipred;
} else if (color == "green") {
shipred._visible = false;
shipgreen._visible = true;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipgreen;
} else if (color == "white") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = true;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipwhite;
} else if (color == "blue") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = true;
shipbrown._visible = false;
ship = shipblue;
} else if (color == "brown") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = true;
ship = shipbrown;
}
Instance of Symbol 466 MovieClip "cursor" in Frame 2783
onClipEvent (enterFrame) {
startDrag (this, true);
}
Frame 2811
stop();
setup = function () {
firing = false;
rockets_txt.text = rockets;
score_txt.text = scoreX;
timeX = time;
powerX = power;
enemyTime = 0;
enemyRate = 50;
enemy2Time = 0;
enemy2Rate = 100;
enemy3Time = 0;
enemy3Rate = 130;
mineTime = 0;
mineRate = 80;
giftTime = 0;
giftRate = 270;
giftzTime = 0;
giftzRate = 160;
superTime = 0;
superRate = 900;
gift_txt.text = 0;
giveGift = false;
giveGift2 = false;
giveGift3 = false;
giveGift4 = false;
giftz = false;
superGift = false;
rocket = false;
rockets_txt._visible = false;
counter = 0;
counter_txt.text = counter;
giftcounter = 0;
supercounter = 0;
enemy2Die = 3;
enemy3Die = 3;
cursor._visible = false;
levelbackButton._visible = false;
ship.onMouseDown = function () {
firing = true;
repeatTime = 0;
};
ship.onMouseUp = function () {
firing = false;
};
ship.onEnterFrame = function () {
this.destx = _xmouse;
this.desty = _ymouse;
var _local4 = this.destx - this._x;
var _local3 = this.desty - this._y;
if (this._x > 400) {
this._x = 350;
}
if (this._x < 0) {
this._x = 50;
}
if (this._y > 500) {
this._y = 450;
}
if (this._y < 0) {
this._y = 50;
}
if (engine == true) {
this._x = this._x + (_local4 * 0.5);
this._y = this._y + (_local3 * 0.5);
} else if (engine == false) {
this._x = this._x + (_local4 * 0.15);
this._y = this._y + (_local3 * 0.15);
}
var _local2 = new Object();
_local2.onKeyDown = function () {
if ((Key.isDown(32) && (powerX > 0)) && (scoreX > 9)) {
createProjectile2("power", ship._x, ship._y - 5, 0, -30);
powerX--;
scoreX = scoreX - 10;
score_txt.text = scoreX;
if (powerX == 0) {
ifpower._visible = false;
}
}
if (Key.isDown(40)) {
rocket = true;
rockets_txt._visible = true;
}
if (Key.isDown(38)) {
rocket = false;
rockets_txt._visible = false;
}
};
Key.addListener(_local2);
if ((((firing && (repeatTime == 0)) && (rocket == true)) && (superGift == true)) && (rockets > 0)) {
createProjectile2("rocket2", this._x, this._y - 5, 0, -8);
fireRate = 30;
rockets--;
rockets_txt.text = rockets;
} else if (((firing && (repeatTime == 0)) && (rocket == true)) && (rockets > 0)) {
createProjectile2("rocket", this._x, this._y - 5, 0, -7);
fireRate = 30;
rockets--;
rockets_txt.text = rockets;
} else if ((firing && (repeatTime == 0)) && (superGift == true)) {
createProjectile("bullet2", this._x, this._y - 5, 0, -10);
createProjectile("bullet2", this._x, this._y - 5, -3, -10);
createProjectile("bullet2", this._x, this._y - 5, 3, -10);
fireRate = 6;
powerup_txt.text = "Power!!";
powerup_txt._visible = true;
} else if (((((firing && (repeatTime == 0)) && (giveGift == true)) && (giveGift2 == true)) && (giveGift3 == true)) && (giveGift4 == true)) {
createProjectile("supercannon", this._x, this._y - 5, 0, -60);
fireRate = 3;
powerup_txt.text = "Power up 4";
} else if ((((firing && (repeatTime == 0)) && (giveGift == true)) && (giveGift2 == true)) && (giveGift3 == true)) {
createProjectile("laser", this._x, this._y - 5, 0, -95);
fireRate = 2;
powerup_txt.text = "Power up 3";
} else if (((firing && (repeatTime == 0)) && (giveGift == true)) && (giveGift2 == true)) {
createProjectile("super2", this._x, this._y - 5, 0, -45);
fireRate = 5;
powerup_txt.text = "Power up 2";
} else if ((firing && (repeatTime == 0)) && (giveGift == true)) {
createProjectile("super", this._x, this._y - 5, 0, -35);
fireRate = 7;
powerup_txt.text = "Power up 1";
powerup_txt._visible = true;
} else if (firing && (repeatTime == 0)) {
createProjectile("bullet", this._x, this._y - 5, 0, -speed);
fireRate = 9;
}
repeatTime++;
repeatTime = repeatTime % fireRate;
if ((enemyTime == 0) && (counter < 147)) {
var _local5 = (Math.random() * 100) + 80;
createenemy("3", _local5, -30);
if (((enemyTime == 0) && (counter > 2)) && (counter < 147)) {
_local5 = (Math.random() * 100) + 80;
createenemy("3", 400 - _local5, -50);
}
if (((enemyTime == 0) && (counter > 40)) && (counter < 147)) {
_local5 = (Math.random() * 100) + 80;
createenemy("5", 200, -30);
}
if (((enemyTime == 0) && (counter > 100)) && (counter < 147)) {
_local5 = (Math.random() * 100) + 80;
createenemy("5", 400 - _local5, -30);
}
}
enemyTime++;
enemyTime = enemyTime % enemyRate;
if (((enemy2Time == 0) && (counter > 20)) && (counter < 147)) {
var _local5 = (Math.random() * 100) + 80;
createenemy2("4", _local5, -30);
}
enemy2Time++;
enemy2Time = enemy2Time % enemy2Rate;
if (((enemy3Time == 0) && (counter > 40)) && (counter < 147)) {
var _local5 = (Math.random() * 100) + 80;
createenemy3("4", _local5, -30);
}
enemy3Time++;
enemy3Time = enemy3Time % enemy3Rate;
if (((mineTime == 0) && (counter > 10)) && (counter < 147)) {
var _local5 = (Math.random() * 100) + 80;
createmine("mine2", Math.floor(Math.random() * 380) + 10, Math.floor(Math.random() * 330) + 30);
}
if ((((easy == false) && (mineTime == 0)) && (counter > 20)) && (counter < 147)) {
var _local5 = (Math.random() * 100) + 300;
createmine("mine2", Math.floor(Math.random() * 380) + 10, Math.floor(Math.random() * 190) + 20);
}
if (((mineTime == 0) && (counter > 80)) && (counter < 147)) {
var _local5 = (Math.random() * 100) + 300;
createmine("mine2", Math.floor(Math.random() * 380) + 10, -80);
}
mineTime++;
mineTime = mineTime % mineRate;
if (((giftTime == 0) && (counter > 10)) && (counter < 147)) {
var _local5 = (Math.random() * 100) + 80;
creategift("gift_mc", 200, -30);
}
giftTime++;
giftTime = giftTime % giftRate;
if (giftzTime == 0) {
var _local5 = (Math.random() * 100) + 80;
creategiftz("giftz_mc", 200, -30);
}
giftzTime++;
giftzTime = giftzTime % giftzRate;
if (((superTime == 0) && (counter > 20)) && (counter < 140)) {
var _local5 = (Math.random() * 100) + 80;
createsuper("supergift_mc", 200, -30);
}
superTime++;
superTime = superTime % superRate;
};
doCounter = function () {
counter++;
counter_txt.text = counter;
if (counter == 150) {
if (level == 3) {
level++;
}
enemyLayer.removeMovieClip();
enemy2Layer.removeMovieClip();
enemy3Layer.removeMovieClip();
projectileLayer.removeMovieClip();
projectileLayer2.removeMovieClip();
giftLayer.removeMovieClip();
giftzLayer.removeMovieClip();
superLayer.removeMovieClip();
mineLayer.removeMovieClip();
gift_txt._visible = false;
rockets_txt._visible = false;
powerup_txt._visible = false;
clearInterval(countID);
clearInterval(giftcountID);
clearInterval(supercountID);
gotoAndPlay (2812);
score = score + scoreX;
ship.swapDepths(cursor);
}
};
doLose = function () {
delete ship.onEnterFrame;
delete bgscroller.onEnterFrame;
enemyLayer.removeMovieClip();
enemy2Layer.removeMovieClip();
enemy3Layer.removeMovieClip();
projectileLayer.removeMovieClip();
projectileLayer2.removeMovieClip();
giftLayer.removeMovieClip();
giftzLayer.removeMovieClip();
superLayer.removeMovieClip();
mineLayer.removeMovieClip();
startButton._visible = true;
gift_txt._visible = false;
rockets_txt._visible = false;
powerup_txt._visible = false;
clearInterval(countID);
clearInterval(giftcountID);
clearInterval(supercountID);
cursor._visible = true;
levelbackButton._visible = true;
scoreX = 0;
powerX = power;
music.stop();
};
superdoCounter = function () {
supercounter--;
gift_txt.text = supercounter;
gift_txt._visible = true;
powerup_txt._visible = true;
clearInterval(giftcountID);
if (supercounter < 0) {
superGift = false;
gift_txt._visible = false;
powerup_txt._visible = false;
timeX = time;
clearInterval(supercountID);
}
};
giftdoCounter = function () {
giftcounter--;
gift_txt.text = giftcounter;
gift_txt._visible = true;
powerup_txt._visible = true;
if (giftcounter < 0) {
giveGift4 = false;
giveGift3 = false;
giveGift2 = false;
giveGift = false;
gift_txt._visible = false;
powerup_txt._visible = false;
timeX = time;
clearInterval(giftcountID);
}
};
countID = setInterval(doCounter, 1000);
_root.createEmptyMovieClip("projectileLayer2", 100);
projectileCount2 = 0;
_root.createEmptyMovieClip("projectileLayer", 99);
projectileCount = 0;
_root.createEmptyMovieClip("enemyLayer", 98);
enemyCount = 0;
_root.createEmptyMovieClip("enemy2Layer", 97);
enemy2Count = 0;
_root.createEmptyMovieClip("enemy3Layer", 96);
enemy3Count = 0;
_root.createEmptyMovieClip("giftLayer", 95);
giftCount = 0;
_root.createEmptyMovieClip("giftzLayer", 94);
giftzCount = 0;
_root.createEmptyMovieClip("superLayer", 93);
superCount = 0;
_root.createEmptyMovieClip("mineLayer", 92);
mineCount = 0;
ship.swapDepths(101);
ship.gotoAndStop(1);
bgscroller.onEnterFrame = function () {
if (this._y >= 500) {
this._y = 0;
}
this._y = this._y + 5;
};
};
createProjectile = function (type, x, y, dx, dy) {
var _local4 = "proj" + projectileCount;
projectileLayer.attachMovie(type, _local4, projectileCount);
projectileLayer[_local4]._x = x;
projectileLayer[_local4]._y = y;
projectileLayer[_local4].dx = dx;
projectileLayer[_local4].dy = dy;
projectileLayer[_local4].onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
if (this._y < -190) {
this.removeMovieClip();
}
var _local2 = 0;
while (_local2 < 10) {
var _local3 = "mine" + _local2;
if ((this.hitTest(mineLayer[_local3]) && (mineLayer[_local3]._currentframe == 17)) && (giveGift3 == true)) {
mineLayer[_local3].gotoAndPlay(18);
this.removeMovieClip();
}
if ((this.hitTest(mineLayer[_local3]) && (mineLayer[_local3]._currentframe < 17)) && (giveGift3 == true)) {
mineLayer[_local3].gotoAndPlay(18);
this.removeMovieClip();
}
_local3 = "enemy" + _local2;
if (this.hitTest(enemyLayer[_local3]) && (enemyLayer[_local3]._currentframe == 1)) {
enemyLayer[_local3].play();
scoreX++;
score_txt.text = scoreX;
this.removeMovieClip();
}
_local3 = "enemy2" + _local2;
if ((this.hitTest(enemy2Layer[_local3]) && (enemy2Layer[_local3]._currentframe == 1)) && (enemy2Die == 0)) {
enemy2Die = 3;
enemy2Layer[_local3].play();
scoreX = scoreX + 3;
score_txt.text = scoreX;
this.removeMovieClip();
} else if (this.hitTest(enemy2Layer[_local3]) && (enemy2Layer[_local3]._currentframe == 1)) {
enemy2Die--;
this.removeMovieClip();
}
_local3 = "enemy3" + _local2;
if ((this.hitTest(enemy3Layer[_local3]) && (enemy3Layer[_local3]._currentframe == 1)) && (enemy3Die == 0)) {
enemy3Die = 3;
enemy3Layer[_local3].play();
scoreX = scoreX + 3;
score_txt.text = scoreX;
this.removeMovieClip();
} else if (this.hitTest(enemy3Layer[_local3]) && (enemy3Layer[_local3]._currentframe == 1)) {
enemy3Die--;
this.removeMovieClip();
}
_local2++;
}
};
projectileCount++;
projectileCount = projectileCount % 20;
};
createProjectile2 = function (type, x, y, dx, dy) {
var _local4 = "proj2" + projectileCount2;
projectileLayer2.attachMovie(type, _local4, projectileCount2);
projectileLayer2[_local4]._x = x;
projectileLayer2[_local4]._y = y;
projectileLayer2[_local4].dx = dx;
projectileLayer2[_local4].dy = dy;
projectileLayer2[_local4].onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
if (this._y < -80) {
this.removeMovieClip();
}
var _local2 = 0;
while (_local2 < 10) {
var _local3 = "mine" + _local2;
if (this.hitTest(mineLayer[_local3]) && (mineLayer[_local3]._currentframe < 18)) {
mineLayer[_local3].gotoAndPlay(18);
}
_local3 = "enemy" + _local2;
if (this.hitTest(enemyLayer[_local3]) && (enemyLayer[_local3]._currentframe == 1)) {
enemyLayer[_local3].play();
scoreX++;
score_txt.text = scoreX;
}
_local3 = "enemy2" + _local2;
if (this.hitTest(enemy2Layer[_local3]) && (enemy2Layer[_local3]._currentframe == 1)) {
enemy2Die = 3;
enemy2Layer[_local3].play();
scoreX = scoreX + 3;
score_txt.text = scoreX;
}
_local3 = "enemy3" + _local2;
if (this.hitTest(enemy3Layer[_local3]) && (enemy3Layer[_local3]._currentframe == 1)) {
enemy3Die = 3;
enemy3Layer[_local3].play();
scoreX = scoreX + 3;
score_txt.text = scoreX;
}
_local2++;
}
};
projectileCount2++;
projectileCount2 = projectileCount2 % 10;
};
createenemy = function (type, x, y) {
var _local2 = "enemy" + enemyCount;
enemyLayer.attachMovie(type, _local2, enemyCount);
enemyLayer[_local2]._x = x;
enemyLayer[_local2].xline = x;
enemyLayer[_local2]._y = y;
enemyLayer[_local2].dy = (Math.random() * 8) + 6;
enemyLayer[_local2].t = Math.random() * 6.28;
enemyLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.08;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if (this._y > 560) {
this.removeMovieClip();
}
};
enemyCount++;
enemyCount = enemyCount % 10;
};
createenemy2 = function (type, x, y) {
var _local2 = "enemy2" + enemy2Count;
enemy2Layer.attachMovie(type, _local2, enemy2Count);
enemy2Layer[_local2]._x = x;
enemy2Layer[_local2].xline = x;
enemy2Layer[_local2]._y = y;
enemy2Layer[_local2].dy = (Math.random() * 7) + 6;
enemy2Layer[_local2].t = Math.random() * 6.28;
enemy2Layer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.07;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if ((this._y > 560) && (enemy2Die < 3)) {
this.removeMovieClip();
enemy2Die = 3;
} else if (this._y > 560) {
this.removeMovieClip();
}
};
enemy2Count++;
enemy2Count = enemy2Count % 10;
};
createenemy3 = function (type, x, y) {
var _local2 = "enemy3" + enemy3Count;
enemy3Layer.attachMovie(type, _local2, enemy3Count);
enemy3Layer[_local2]._x = x;
enemy3Layer[_local2].xline = x;
enemy3Layer[_local2]._y = y;
enemy3Layer[_local2].dy = (Math.random() * 7) + 6;
enemy3Layer[_local2].t = Math.random() * 6.38;
enemy3Layer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.07;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if ((this._y > 560) && (enemy3Die < 3)) {
this.removeMovieClip();
enemy3Die = 3;
} else if (this._y > 560) {
this.removeMovieClip();
}
};
enemy3Count++;
enemy3Count = enemy3Count % 10;
};
creategift = function (type, x, y) {
var _local2 = "gift" + giftCount;
giftLayer.attachMovie(type, _local2, giftCount);
giftLayer[_local2]._x = x;
giftLayer[_local2].xline = x;
giftLayer[_local2]._y = y;
giftLayer[_local2].dy = (Math.random() * 16) + 12;
giftLayer[_local2].t = Math.random() * 7.28;
giftLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.1;
if (((superGift == true) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
this.removeMovieClip();
} else if (((((giveGift == true) && (giveGift2 == true)) && (giveGift3 == true)) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift4 = true;
this.removeMovieClip();
} else if ((((giveGift == true) && (giveGift2 == true)) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift3 = true;
this.removeMovieClip();
} else if (((giveGift == true) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift2 = true;
this.removeMovieClip();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift = true;
this.removeMovieClip();
giftcounter = timeX;
giftcountID = setInterval(giftdoCounter, 1000);
}
if (this._y > 500) {
this.removeMovieClip();
}
};
giftCount++;
giftCount = giftCount % 10;
};
creategiftz = function (type, x, y) {
var _local2 = "giftz" + giftzCount;
giftzLayer.attachMovie(type, _local2, giftzCount);
giftzLayer[_local2]._x = x;
giftzLayer[_local2].xline = x;
giftzLayer[_local2]._y = y;
giftzLayer[_local2].dy = (Math.random() * 16) + 6;
giftzLayer[_local2].t = Math.random() * 7.28;
giftzLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.2;
if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
scoreX = scoreX + 5;
score_txt.text = scoreX;
this.removeMovieClip();
}
if (this._y > 500) {
this.removeMovieClip();
}
};
giftzCount++;
giftzCount = giftzCount % 10;
};
createsuper = function (type, x, y) {
var _local2 = "supergift" + superCount;
superLayer.attachMovie(type, _local2, superCount);
superLayer[_local2]._x = x;
superLayer[_local2].xline = x;
superLayer[_local2]._y = y;
superLayer[_local2].dy = (Math.random() * 16) + 10;
superLayer[_local2].t = Math.random() * 7.28;
superLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.2;
if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
superGift = true;
giveGift = false;
giveGift2 = false;
giveGift3 = false;
supercounter = (timeX = timeX - 8);
supercountID = setInterval(superdoCounter, 1000);
this.removeMovieClip();
scoreX = scoreX + 5;
}
if (this._y > 500) {
this.removeMovieClip();
}
};
superCount++;
superCount = superCount % 10;
};
createmine = function (type, x, y) {
var _local2 = "mine" + mineCount;
mineLayer.attachMovie(type, _local2, mineCount);
mineLayer[_local2]._x = x;
mineLayer[_local2].xline = x;
mineLayer[_local2]._y = y;
mineLayer[_local2].dy = 5;
mineLayer[_local2].onEnterFrame = function () {
this._y = this._y + this.dy;
if (((this._currentframe == 17) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 17) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if (this._y > 510) {
this.removeMovieClip();
}
};
mineCount++;
mineCount = mineCount % 10;
};
startButton.onRelease = function () {
setup();
this._visible = false;
ifpower._visible = true;
scoreX = scoreX - score_txt.text;
music = new Sound();
music.attachSound("hz");
music.start(0, 99);
};
Frame 2995
stopAllSounds();
gotoAndPlay (574);
ship.removeMovieClip();
cursor._visible = true;
Frame 2996
if (level > 4) {
gotoAndPlay (3183);
}
Instance of Symbol 466 MovieClip "cursor" in Frame 2996
onClipEvent (enterFrame) {
startDrag (this, true);
}
Frame 3041
stopAllSounds();
Frame 3051
stop();
Frame 3107
stop();
Frame 3108
stop();
Frame 3182
gotoAndPlay (3218);
Frame 3218
stopAllSounds();
gift_txt._visible = false;
levelbackButton._visible = true;
scoreX = 0;
score_txt.text = scoreX;
life_txt.text = life;
if (color == "red") {
shipred._visible = true;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipred;
} else if (color == "green") {
shipred._visible = false;
shipgreen._visible = true;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipgreen;
} else if (color == "white") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = true;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipwhite;
} else if (color == "blue") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = true;
shipbrown._visible = false;
ship = shipblue;
} else if (color == "brown") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = true;
ship = shipbrown;
}
Instance of Symbol 466 MovieClip "cursor" in Frame 3218
onClipEvent (enterFrame) {
startDrag (this, true);
}
Frame 3246
stop();
setup = function () {
firing = false;
rockets_txt.text = rockets;
score_txt.text = scoreX;
timeX = time;
powerX = power;
enemyTime = 0;
enemyRate = 45;
enemy2Time = 0;
enemy2Rate = 100;
enemy3Time = 0;
enemy3Rate = 125;
mineTime = 0;
mineRate = 70;
giftTime = 0;
giftRate = 260;
giftzTime = 0;
giftzRate = 160;
superTime = 0;
superRate = 900;
gift_txt.text = 0;
giveGift = false;
giveGift2 = false;
giveGift3 = false;
giveGift4 = false;
giftz = false;
superGift = false;
rocket = false;
rockets_txt._visible = false;
counter = 0;
counter_txt.text = counter;
giftcounter = 0;
supercounter = 0;
enemy2Die = 7;
enemy3Die = 7;
cursor._visible = false;
levelbackButton._visible = false;
ship.onMouseDown = function () {
firing = true;
repeatTime = 0;
};
ship.onMouseUp = function () {
firing = false;
};
ship.onEnterFrame = function () {
this.destx = _xmouse;
this.desty = _ymouse;
var _local4 = this.destx - this._x;
var _local3 = this.desty - this._y;
if (this._x > 400) {
this._x = 350;
}
if (this._x < 0) {
this._x = 50;
}
if (this._y > 500) {
this._y = 450;
}
if (this._y < 0) {
this._y = 50;
}
if (engine == true) {
this._x = this._x + (_local4 * 0.5);
this._y = this._y + (_local3 * 0.5);
} else if (engine == false) {
this._x = this._x + (_local4 * 0.15);
this._y = this._y + (_local3 * 0.15);
}
var _local2 = new Object();
_local2.onKeyDown = function () {
if ((Key.isDown(32) && (powerX > 0)) && (scoreX > 9)) {
createProjectile2("power", ship._x, ship._y - 5, 0, -30);
powerX--;
scoreX = scoreX - 10;
score_txt.text = scoreX;
if (powerX == 0) {
ifpower._visible = false;
}
}
if (Key.isDown(40)) {
rocket = true;
rockets_txt._visible = true;
}
if (Key.isDown(38)) {
rocket = false;
rockets_txt._visible = false;
}
};
Key.addListener(_local2);
if ((((firing && (repeatTime == 0)) && (rocket == true)) && (superGift == true)) && (rockets > 0)) {
createProjectile2("rocket2", this._x, this._y - 5, 0, -8);
fireRate = 30;
rockets--;
rockets_txt.text = rockets;
} else if (((firing && (repeatTime == 0)) && (rocket == true)) && (rockets > 0)) {
createProjectile2("rocket", this._x, this._y - 5, 0, -7);
fireRate = 30;
rockets--;
rockets_txt.text = rockets;
} else if ((firing && (repeatTime == 0)) && (superGift == true)) {
createProjectile("bullet2", this._x, this._y - 5, 0, -10);
createProjectile("bullet2", this._x, this._y - 5, -3, -10);
createProjectile("bullet2", this._x, this._y - 5, 3, -10);
fireRate = 6;
powerup_txt.text = "Power!!";
powerup_txt._visible = true;
} else if (((((firing && (repeatTime == 0)) && (giveGift == true)) && (giveGift2 == true)) && (giveGift3 == true)) && (giveGift4 == true)) {
createProjectile("supercannon", this._x, this._y - 5, 0, -60);
fireRate = 3;
powerup_txt.text = "Power up 4";
} else if ((((firing && (repeatTime == 0)) && (giveGift == true)) && (giveGift2 == true)) && (giveGift3 == true)) {
createProjectile("laser", this._x, this._y - 5, 0, -95);
fireRate = 2;
powerup_txt.text = "Power up 3";
} else if (((firing && (repeatTime == 0)) && (giveGift == true)) && (giveGift2 == true)) {
createProjectile("super2", this._x, this._y - 5, 0, -45);
fireRate = 5;
powerup_txt.text = "Power up 2";
} else if ((firing && (repeatTime == 0)) && (giveGift == true)) {
createProjectile("super", this._x, this._y - 5, 0, -35);
fireRate = 7;
powerup_txt.text = "Power up 1";
powerup_txt._visible = true;
} else if (firing && (repeatTime == 0)) {
createProjectile("bullet", this._x, this._y - 5, 0, -speed);
fireRate = 9;
}
repeatTime++;
repeatTime = repeatTime % fireRate;
if ((enemyTime == 0) && (counter < 157)) {
var _local5 = (Math.random() * 100) + 80;
createenemy("6", _local5, -30);
if (((enemyTime == 0) && (counter > 2)) && (counter < 157)) {
_local5 = (Math.random() * 100) + 80;
createenemy("6", 400 - _local5, -50);
}
if (((enemyTime == 0) && (counter > 30)) && (counter < 157)) {
_local5 = (Math.random() * 100) + 80;
createenemy("6", 200, -90);
}
}
enemyTime++;
enemyTime = enemyTime % enemyRate;
if (((enemy2Time == 0) && (counter > 8)) && (counter < 157)) {
var _local5 = (Math.random() * 100) + 80;
createenemy2("7", 200, -30);
}
enemy2Time++;
enemy2Time = enemy2Time % enemy2Rate;
if (((enemy3Time == 0) && (counter > 80)) && (counter < 157)) {
var _local5 = (Math.random() * 100) + 80;
createenemy3("7", _local5, -30);
}
enemy3Time++;
enemy3Time = enemy3Time % enemy3Rate;
if (((mineTime == 0) && (counter > 2)) && (counter < 157)) {
var _local5 = (Math.random() * 100) + 80;
createmine("mine2", Math.floor(Math.random() * 380) + 10, Math.floor(Math.random() * 330) + 30);
}
if ((((easy == false) && (mineTime == 0)) && (counter > 5)) && (counter < 157)) {
var _local5 = (Math.random() * 100) + 300;
createmine("mine2", Math.floor(Math.random() * 380) + 10, Math.floor(Math.random() * 190) + 20);
}
if (((mineTime == 0) && (counter > 30)) && (counter < 157)) {
var _local5 = (Math.random() * 100) + 300;
createmine("mine2", Math.floor(Math.random() * 380) + 10, -80);
}
if (((mineTime == 0) && (counter > 70)) && (counter < 157)) {
var _local5 = (Math.random() * 100) + 300;
createmine("mine2", Math.floor(Math.random() * 380) + 10, -80);
}
mineTime++;
mineTime = mineTime % mineRate;
if (((giftTime == 0) && (counter > 5)) && (counter < 157)) {
var _local5 = (Math.random() * 100) + 80;
creategift("gift_mc", 200, -30);
}
giftTime++;
giftTime = giftTime % giftRate;
if (giftzTime == 0) {
var _local5 = (Math.random() * 100) + 80;
creategiftz("giftz_mc", 200, -30);
}
giftzTime++;
giftzTime = giftzTime % giftzRate;
if (((superTime == 0) && (counter > 30)) && (counter < 150)) {
var _local5 = (Math.random() * 100) + 80;
createsuper("supergift_mc", 200, -30);
}
superTime++;
superTime = superTime % superRate;
};
doCounter = function () {
counter++;
counter_txt.text = counter;
if (counter == 160) {
if (level == 4) {
level++;
}
enemyLayer.removeMovieClip();
enemy2Layer.removeMovieClip();
enemy3Layer.removeMovieClip();
projectileLayer.removeMovieClip();
projectileLayer2.removeMovieClip();
giftLayer.removeMovieClip();
giftzLayer.removeMovieClip();
superLayer.removeMovieClip();
mineLayer.removeMovieClip();
gift_txt._visible = false;
rockets_txt._visible = false;
powerup_txt._visible = false;
clearInterval(countID);
clearInterval(giftcountID);
clearInterval(supercountID);
gotoAndPlay (3247);
score = score + scoreX;
ship.swapDepths(cursor);
}
};
doLose = function () {
delete ship.onEnterFrame;
delete bgscroller.onEnterFrame;
enemyLayer.removeMovieClip();
enemy2Layer.removeMovieClip();
enemy3Layer.removeMovieClip();
projectileLayer.removeMovieClip();
projectileLayer2.removeMovieClip();
giftLayer.removeMovieClip();
giftzLayer.removeMovieClip();
superLayer.removeMovieClip();
mineLayer.removeMovieClip();
startButton._visible = true;
gift_txt._visible = false;
rockets_txt._visible = false;
powerup_txt._visible = false;
clearInterval(countID);
clearInterval(giftcountID);
clearInterval(supercountID);
cursor._visible = true;
levelbackButton._visible = true;
scoreX = 0;
powerX = power;
music.stop();
};
superdoCounter = function () {
supercounter--;
gift_txt.text = supercounter;
gift_txt._visible = true;
powerup_txt._visible = true;
clearInterval(giftcountID);
if (supercounter < 0) {
superGift = false;
gift_txt._visible = false;
powerup_txt._visible = false;
timeX = time;
clearInterval(supercountID);
}
};
giftdoCounter = function () {
giftcounter--;
gift_txt.text = giftcounter;
gift_txt._visible = true;
powerup_txt._visible = true;
if (giftcounter < 0) {
giveGift4 = false;
giveGift3 = false;
giveGift2 = false;
giveGift = false;
gift_txt._visible = false;
powerup_txt._visible = false;
timeX = time;
clearInterval(giftcountID);
}
};
countID = setInterval(doCounter, 1000);
_root.createEmptyMovieClip("projectileLayer2", 100);
projectileCount2 = 0;
_root.createEmptyMovieClip("projectileLayer", 99);
projectileCount = 0;
_root.createEmptyMovieClip("enemyLayer", 98);
enemyCount = 0;
_root.createEmptyMovieClip("enemy2Layer", 97);
enemy2Count = 0;
_root.createEmptyMovieClip("enemy3Layer", 96);
enemy3Count = 0;
_root.createEmptyMovieClip("giftLayer", 95);
giftCount = 0;
_root.createEmptyMovieClip("giftzLayer", 94);
giftzCount = 0;
_root.createEmptyMovieClip("superLayer", 93);
superCount = 0;
_root.createEmptyMovieClip("mineLayer", 92);
mineCount = 0;
ship.swapDepths(101);
ship.gotoAndStop(1);
bgscroller.onEnterFrame = function () {
if (this._y >= 500) {
this._y = 0;
}
this._y = this._y + 5;
};
};
createProjectile = function (type, x, y, dx, dy) {
var _local4 = "proj" + projectileCount;
projectileLayer.attachMovie(type, _local4, projectileCount);
projectileLayer[_local4]._x = x;
projectileLayer[_local4]._y = y;
projectileLayer[_local4].dx = dx;
projectileLayer[_local4].dy = dy;
projectileLayer[_local4].onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
if (this._y < -190) {
this.removeMovieClip();
}
var _local2 = 0;
while (_local2 < 10) {
var _local3 = "mine" + _local2;
if ((this.hitTest(mineLayer[_local3]) && (mineLayer[_local3]._currentframe == 17)) && (giveGift3 == true)) {
mineLayer[_local3].gotoAndPlay(18);
this.removeMovieClip();
}
if ((this.hitTest(mineLayer[_local3]) && (mineLayer[_local3]._currentframe < 17)) && (giveGift3 == true)) {
mineLayer[_local3].gotoAndPlay(18);
this.removeMovieClip();
}
_local3 = "enemy" + _local2;
if (this.hitTest(enemyLayer[_local3]) && (enemyLayer[_local3]._currentframe == 1)) {
enemyLayer[_local3].play();
scoreX++;
score_txt.text = scoreX;
this.removeMovieClip();
}
_local3 = "enemy2" + _local2;
if ((this.hitTest(enemy2Layer[_local3]) && (enemy2Layer[_local3]._currentframe == 1)) && (enemy2Die == 0)) {
enemy2Die = 7;
enemy2Layer[_local3].play();
scoreX = scoreX + 6;
score_txt.text = scoreX;
this.removeMovieClip();
} else if (this.hitTest(enemy2Layer[_local3]) && (enemy2Layer[_local3]._currentframe == 1)) {
enemy2Die--;
this.removeMovieClip();
}
_local3 = "enemy3" + _local2;
if ((this.hitTest(enemy3Layer[_local3]) && (enemy3Layer[_local3]._currentframe == 1)) && (enemy3Die == 0)) {
enemy3Die = 7;
enemy3Layer[_local3].play();
scoreX = scoreX + 6;
score_txt.text = scoreX;
this.removeMovieClip();
} else if (this.hitTest(enemy3Layer[_local3]) && (enemy3Layer[_local3]._currentframe == 1)) {
enemy3Die--;
this.removeMovieClip();
}
_local2++;
}
};
projectileCount++;
projectileCount = projectileCount % 20;
};
createProjectile2 = function (type, x, y, dx, dy) {
var _local4 = "proj2" + projectileCount2;
projectileLayer2.attachMovie(type, _local4, projectileCount2);
projectileLayer2[_local4]._x = x;
projectileLayer2[_local4]._y = y;
projectileLayer2[_local4].dx = dx;
projectileLayer2[_local4].dy = dy;
projectileLayer2[_local4].onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
if (this._y < -80) {
this.removeMovieClip();
}
var _local2 = 0;
while (_local2 < 10) {
var _local3 = "mine" + _local2;
if (this.hitTest(mineLayer[_local3]) && (mineLayer[_local3]._currentframe < 18)) {
mineLayer[_local3].gotoAndPlay(18);
}
_local3 = "enemy" + _local2;
if (this.hitTest(enemyLayer[_local3]) && (enemyLayer[_local3]._currentframe == 1)) {
enemyLayer[_local3].play();
scoreX++;
score_txt.text = scoreX;
}
_local3 = "enemy2" + _local2;
if (this.hitTest(enemy2Layer[_local3]) && (enemy2Layer[_local3]._currentframe == 1)) {
enemy2Die = 7;
enemy2Layer[_local3].play();
scoreX = scoreX + 6;
score_txt.text = scoreX;
}
_local3 = "enemy3" + _local2;
if (this.hitTest(enemy3Layer[_local3]) && (enemy3Layer[_local3]._currentframe == 1)) {
enemy3Die = 7;
enemy3Layer[_local3].play();
scoreX = scoreX + 6;
score_txt.text = scoreX;
}
_local2++;
}
};
projectileCount2++;
projectileCount2 = projectileCount2 % 10;
};
createenemy = function (type, x, y) {
var _local2 = "enemy" + enemyCount;
enemyLayer.attachMovie(type, _local2, enemyCount);
enemyLayer[_local2]._x = x;
enemyLayer[_local2].xline = x;
enemyLayer[_local2]._y = y;
enemyLayer[_local2].dy = (Math.random() * 5) + 7;
enemyLayer[_local2].t = Math.random() * 6.28;
enemyLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.1;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if (this._y > 560) {
this.removeMovieClip();
}
};
enemyCount++;
enemyCount = enemyCount % 10;
};
createenemy2 = function (type, x, y) {
var _local2 = "enemy2" + enemy2Count;
enemy2Layer.attachMovie(type, _local2, enemy2Count);
enemy2Layer[_local2]._x = x;
enemy2Layer[_local2].xline = x;
enemy2Layer[_local2]._y = y;
enemy2Layer[_local2].dy = (Math.random() * 4) + 4;
enemy2Layer[_local2].t = Math.random() * 6.28;
enemy2Layer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.05;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if ((this._y > 560) && (enemy2Die < 7)) {
this.removeMovieClip();
enemy2Die = 7;
} else if (this._y > 560) {
this.removeMovieClip();
}
};
enemy2Count++;
enemy2Count = enemy2Count % 10;
};
createenemy3 = function (type, x, y) {
var _local2 = "enemy3" + enemy3Count;
enemy3Layer.attachMovie(type, _local2, enemy3Count);
enemy3Layer[_local2]._x = x;
enemy3Layer[_local2].xline = x;
enemy3Layer[_local2]._y = y;
enemy3Layer[_local2].dy = (Math.random() * 4) + 4;
enemy3Layer[_local2].t = Math.random() * 6.38;
enemy3Layer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.05;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if ((this._y > 560) && (enemy3Die < 7)) {
this.removeMovieClip();
enemy3Die = 7;
} else if (this._y > 560) {
this.removeMovieClip();
}
};
enemy3Count++;
enemy3Count = enemy3Count % 10;
};
creategift = function (type, x, y) {
var _local2 = "gift" + giftCount;
giftLayer.attachMovie(type, _local2, giftCount);
giftLayer[_local2]._x = x;
giftLayer[_local2].xline = x;
giftLayer[_local2]._y = y;
giftLayer[_local2].dy = (Math.random() * 16) + 12;
giftLayer[_local2].t = Math.random() * 7.28;
giftLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.1;
if (((superGift == true) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
this.removeMovieClip();
} else if (((((giveGift == true) && (giveGift2 == true)) && (giveGift3 == true)) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift4 = true;
this.removeMovieClip();
} else if ((((giveGift == true) && (giveGift2 == true)) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift3 = true;
this.removeMovieClip();
} else if (((giveGift == true) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift2 = true;
this.removeMovieClip();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift = true;
this.removeMovieClip();
giftcounter = timeX;
giftcountID = setInterval(giftdoCounter, 1000);
}
if (this._y > 500) {
this.removeMovieClip();
}
};
giftCount++;
giftCount = giftCount % 10;
};
creategiftz = function (type, x, y) {
var _local2 = "giftz" + giftzCount;
giftzLayer.attachMovie(type, _local2, giftzCount);
giftzLayer[_local2]._x = x;
giftzLayer[_local2].xline = x;
giftzLayer[_local2]._y = y;
giftzLayer[_local2].dy = (Math.random() * 16) + 6;
giftzLayer[_local2].t = Math.random() * 7.28;
giftzLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.2;
if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
scoreX = scoreX + 5;
score_txt.text = scoreX;
this.removeMovieClip();
}
if (this._y > 500) {
this.removeMovieClip();
}
};
giftzCount++;
giftzCount = giftzCount % 10;
};
createsuper = function (type, x, y) {
var _local2 = "supergift" + superCount;
superLayer.attachMovie(type, _local2, superCount);
superLayer[_local2]._x = x;
superLayer[_local2].xline = x;
superLayer[_local2]._y = y;
superLayer[_local2].dy = (Math.random() * 16) + 10;
superLayer[_local2].t = Math.random() * 7.28;
superLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.2;
if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
superGift = true;
giveGift = false;
giveGift2 = false;
giveGift3 = false;
supercounter = (timeX = timeX - 8);
supercountID = setInterval(superdoCounter, 1000);
this.removeMovieClip();
scoreX = scoreX + 5;
}
if (this._y > 500) {
this.removeMovieClip();
}
};
superCount++;
superCount = superCount % 10;
};
createmine = function (type, x, y) {
var _local2 = "mine" + mineCount;
mineLayer.attachMovie(type, _local2, mineCount);
mineLayer[_local2]._x = x;
mineLayer[_local2].xline = x;
mineLayer[_local2]._y = y;
mineLayer[_local2].dy = 5;
mineLayer[_local2].onEnterFrame = function () {
this._y = this._y + this.dy;
if (((this._currentframe == 17) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 17) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if (this._y > 510) {
this.removeMovieClip();
}
};
mineCount++;
mineCount = mineCount % 10;
};
startButton.onRelease = function () {
setup();
this._visible = false;
ifpower._visible = true;
scoreX = scoreX - score_txt.text;
music = new Sound();
music.attachSound("dewk");
music.start(0, 99);
};
Frame 3430
stopAllSounds();
gotoAndPlay (574);
ship.removeMovieClip();
cursor._visible = true;
Frame 3431
if (level > 5) {
gotoAndPlay (3644);
}
Instance of Symbol 466 MovieClip "cursor" in Frame 3431
onClipEvent (enterFrame) {
startDrag (this, true);
}
Frame 3457
stopAllSounds();
Frame 3468
stop();
Frame 3522
stop();
Frame 3574
stop();
Frame 3575
stop();
Frame 3576
if (vorne == true) {
power++;
vorne = false;
}
Frame 3643
gotoAndPlay (3679);
Frame 3679
stopAllSounds();
gift_txt._visible = false;
levelbackButton._visible = true;
scoreX = 0;
score_txt.text = scoreX;
life_txt.text = life;
if (color == "red") {
shipred._visible = true;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipred;
} else if (color == "green") {
shipred._visible = false;
shipgreen._visible = true;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipgreen;
} else if (color == "white") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = true;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipwhite;
} else if (color == "blue") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = true;
shipbrown._visible = false;
ship = shipblue;
} else if (color == "brown") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = true;
ship = shipbrown;
}
Instance of Symbol 466 MovieClip "cursor" in Frame 3679
onClipEvent (enterFrame) {
startDrag (this, true);
}
Frame 3707
stop();
setup = function () {
firing = false;
rockets_txt.text = rockets;
score_txt.text = scoreX;
timeX = time;
powerX = power;
enemyTime = 0;
enemyRate = 50;
enemy2Time = 0;
enemy2Rate = 100;
enemy3Time = 0;
enemy3Rate = 130;
enemy4Time = 0;
enemy4Rate = 140;
mineTime = 0;
mineRate = 80;
giftTime = 0;
giftRate = 270;
giftzTime = 0;
giftzRate = 160;
superTime = 0;
superRate = 900;
gift_txt.text = 0;
giveGift = false;
giveGift2 = false;
giveGift3 = false;
giveGift4 = false;
giftz = false;
superGift = false;
rocket = false;
rockets_txt._visible = false;
counter = 0;
counter_txt.text = counter;
giftcounter = 0;
supercounter = 0;
enemy2Die = 3;
enemy3Die = 3;
enemy4Die = 7;
cursor._visible = false;
levelbackButton._visible = false;
ship.onMouseDown = function () {
firing = true;
repeatTime = 0;
};
ship.onMouseUp = function () {
firing = false;
};
ship.onEnterFrame = function () {
this.destx = _xmouse;
this.desty = _ymouse;
var _local4 = this.destx - this._x;
var _local3 = this.desty - this._y;
if (this._x > 400) {
this._x = 350;
}
if (this._x < 0) {
this._x = 50;
}
if (this._y > 500) {
this._y = 450;
}
if (this._y < 0) {
this._y = 50;
}
if (engine == true) {
this._x = this._x + (_local4 * 0.5);
this._y = this._y + (_local3 * 0.5);
} else if (engine == false) {
this._x = this._x + (_local4 * 0.15);
this._y = this._y + (_local3 * 0.15);
}
var _local2 = new Object();
_local2.onKeyDown = function () {
if ((Key.isDown(32) && (powerX > 0)) && (scoreX > 9)) {
createProjectile2("power", ship._x, ship._y - 5, 0, -30);
powerX--;
scoreX = scoreX - 10;
score_txt.text = scoreX;
if (powerX == 0) {
ifpower._visible = false;
}
}
if (Key.isDown(40)) {
rocket = true;
rockets_txt._visible = true;
}
if (Key.isDown(38)) {
rocket = false;
rockets_txt._visible = false;
}
};
Key.addListener(_local2);
if ((((firing && (repeatTime == 0)) && (rocket == true)) && (superGift == true)) && (rockets > 0)) {
createProjectile2("rocket2", this._x, this._y - 5, 0, -8);
fireRate = 30;
rockets--;
rockets_txt.text = rockets;
} else if (((firing && (repeatTime == 0)) && (rocket == true)) && (rockets > 0)) {
createProjectile2("rocket", this._x, this._y - 5, 0, -7);
fireRate = 30;
rockets--;
rockets_txt.text = rockets;
} else if ((firing && (repeatTime == 0)) && (superGift == true)) {
createProjectile("bullet2", this._x, this._y - 5, 0, -10);
createProjectile("bullet2", this._x, this._y - 5, -3, -10);
createProjectile("bullet2", this._x, this._y - 5, 3, -10);
fireRate = 6;
powerup_txt.text = "Power!!";
} else if (((((firing && (repeatTime == 0)) && (giveGift == true)) && (giveGift2 == true)) && (giveGift3 == true)) && (giveGift4 == true)) {
createProjectile("supercannon", this._x, this._y - 5, 0, -60);
fireRate = 3;
powerup_txt.text = "Power up 4";
powerup_txt._visible = true;
} else if ((((firing && (repeatTime == 0)) && (giveGift == true)) && (giveGift2 == true)) && (giveGift3 == true)) {
createProjectile("laser", this._x, this._y - 5, 0, -95);
fireRate = 2;
powerup_txt.text = "Power up 3";
} else if (((firing && (repeatTime == 0)) && (giveGift == true)) && (giveGift2 == true)) {
createProjectile("super2", this._x, this._y - 5, 0, -45);
fireRate = 5;
powerup_txt.text = "Power up 2";
} else if ((firing && (repeatTime == 0)) && (giveGift == true)) {
createProjectile("super", this._x, this._y - 5, 0, -35);
fireRate = 7;
powerup_txt.text = "Power up 1";
powerup_txt._visible = true;
} else if (firing && (repeatTime == 0)) {
createProjectile("bullet", this._x, this._y - 5, 0, -speed);
fireRate = 9;
}
repeatTime++;
repeatTime = repeatTime % fireRate;
if ((enemyTime == 0) && (counter < 147)) {
var _local5 = (Math.random() * 100) + 80;
createenemy("6", _local5, -30);
if (((enemyTime == 0) && (counter > 2)) && (counter < 147)) {
_local5 = (Math.random() * 100) + 80;
createenemy("3", 400 - _local5, -50);
}
if (((enemyTime == 0) && (counter > 30)) && (counter < 147)) {
_local5 = (Math.random() * 100) + 80;
createenemy("5", 200, -40);
}
if ((((easy == false) && (enemyTime == 0)) && (counter > 100)) && (counter < 147)) {
_local5 = (Math.random() * 100) + 80;
createenemy("5", 400 - _local5, -60);
}
}
enemyTime++;
enemyTime = enemyTime % enemyRate;
if (((enemy2Time == 0) && (counter > 10)) && (counter < 147)) {
var _local5 = (Math.random() * 100) + 80;
createenemy2("4", 300, -30);
}
enemy2Time++;
enemy2Time = enemy2Time % enemy2Rate;
if (((enemy3Time == 0) && (counter > 50)) && (counter < 147)) {
var _local5 = (Math.random() * 100) + 80;
createenemy3("4", _local5, -30);
}
enemy3Time++;
enemy3Time = enemy3Time % enemy3Rate;
if (((enemy4Time == 0) && (counter > 2)) && (counter < 147)) {
var _local5 = (Math.random() * 100) + 80;
createenemy4("7", 300 - _local5, -30);
}
enemy4Time++;
enemy4Time = enemy4Time % enemy4Rate;
if ((mineTime == 0) && (counter < 147)) {
var _local5 = (Math.random() * 100) + 80;
createmine("mine2", Math.floor(Math.random() * 380) + 10, Math.floor(Math.random() * 330) + 30);
}
if ((((easy == false) && (mineTime == 0)) && (counter > 4)) && (counter < 147)) {
var _local5 = (Math.random() * 100) + 300;
createmine("mine2", Math.floor(Math.random() * 380) + 10, Math.floor(Math.random() * 190) + 20);
}
if (((mineTime == 0) && (counter > 80)) && (counter < 147)) {
var _local5 = (Math.random() * 100) + 300;
createmine("mine2", Math.floor(Math.random() * 380) + 10, -80);
}
mineTime++;
mineTime = mineTime % mineRate;
if (((giftTime == 0) && (counter > 10)) && (counter < 147)) {
var _local5 = (Math.random() * 100) + 80;
creategift("gift_mc", 200, -30);
}
giftTime++;
giftTime = giftTime % giftRate;
if (giftzTime == 0) {
var _local5 = (Math.random() * 100) + 80;
creategiftz("giftz_mc", 200, -30);
}
giftzTime++;
giftzTime = giftzTime % giftzRate;
if (((superTime == 0) && (counter > 20)) && (counter < 140)) {
var _local5 = (Math.random() * 100) + 80;
createsuper("supergift_mc", 200, -30);
}
superTime++;
superTime = superTime % superRate;
};
doCounter = function () {
counter++;
counter_txt.text = counter;
if (counter == 150) {
if (level == 5) {
level++;
}
enemyLayer.removeMovieClip();
enemy2Layer.removeMovieClip();
enemy3Layer.removeMovieClip();
enemy4Layer.removeMovieClip();
projectileLayer.removeMovieClip();
projectileLayer2.removeMovieClip();
giftLayer.removeMovieClip();
giftzLayer.removeMovieClip();
superLayer.removeMovieClip();
mineLayer.removeMovieClip();
gift_txt._visible = false;
rockets_txt._visible = false;
powerup_txt._visible = false;
clearInterval(countID);
clearInterval(giftcountID);
clearInterval(supercountID);
gotoAndPlay (3708);
score = score + scoreX;
ship.swapDepths(cursor);
showengine = true;
}
};
doLose = function () {
delete ship.onEnterFrame;
delete bgscroller.onEnterFrame;
enemyLayer.removeMovieClip();
enemy2Layer.removeMovieClip();
enemy3Layer.removeMovieClip();
enemy4Layer.removeMovieClip();
projectileLayer.removeMovieClip();
projectileLayer2.removeMovieClip();
giftLayer.removeMovieClip();
giftzLayer.removeMovieClip();
superLayer.removeMovieClip();
mineLayer.removeMovieClip();
startButton._visible = true;
gift_txt._visible = false;
rockets_txt._visible = false;
powerup_txt._visible = false;
clearInterval(countID);
clearInterval(giftcountID);
clearInterval(supercountID);
cursor._visible = true;
levelbackButton._visible = true;
scoreX = 0;
powerX = power;
music.stop();
};
superdoCounter = function () {
supercounter--;
gift_txt.text = supercounter;
gift_txt._visible = true;
powerup_txt._visible = true;
clearInterval(giftcountID);
if (supercounter < 0) {
superGift = false;
gift_txt._visible = false;
powerup_txt._visible = false;
timeX = time;
clearInterval(supercountID);
}
};
giftdoCounter = function () {
giftcounter--;
gift_txt.text = giftcounter;
gift_txt._visible = true;
powerup_txt._visible = true;
if (giftcounter < 0) {
giveGift4 = false;
giveGift3 = false;
giveGift2 = false;
giveGift = false;
gift_txt._visible = false;
powerup_txt._visible = false;
timeX = time;
clearInterval(giftcountID);
}
};
countID = setInterval(doCounter, 1000);
_root.createEmptyMovieClip("projectileLayer2", 100);
projectileCount2 = 0;
_root.createEmptyMovieClip("projectileLayer", 99);
projectileCount = 0;
_root.createEmptyMovieClip("enemyLayer", 98);
enemyCount = 0;
_root.createEmptyMovieClip("enemy2Layer", 97);
enemy2Count = 0;
_root.createEmptyMovieClip("enemy3Layer", 96);
enemy3Count = 0;
_root.createEmptyMovieClip("enemy4Layer", 95);
enemy4Count = 0;
_root.createEmptyMovieClip("giftLayer", 94);
giftCount = 0;
_root.createEmptyMovieClip("giftzLayer", 93);
giftzCount = 0;
_root.createEmptyMovieClip("superLayer", 92);
superCount = 0;
_root.createEmptyMovieClip("mineLayer", 91);
mineCount = 0;
ship.swapDepths(101);
ship.gotoAndStop(1);
bgscroller.onEnterFrame = function () {
if (this._y >= 500) {
this._y = 0;
}
this._y = this._y + 5;
};
};
createProjectile = function (type, x, y, dx, dy) {
var _local4 = "proj" + projectileCount;
projectileLayer.attachMovie(type, _local4, projectileCount);
projectileLayer[_local4]._x = x;
projectileLayer[_local4]._y = y;
projectileLayer[_local4].dx = dx;
projectileLayer[_local4].dy = dy;
projectileLayer[_local4].onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
if (this._y < -190) {
this.removeMovieClip();
}
var _local2 = 0;
while (_local2 < 10) {
var _local3 = "mine" + _local2;
if ((this.hitTest(mineLayer[_local3]) && (mineLayer[_local3]._currentframe == 17)) && (giveGift3 == true)) {
mineLayer[_local3].gotoAndPlay(18);
this.removeMovieClip();
}
if ((this.hitTest(mineLayer[_local3]) && (mineLayer[_local3]._currentframe < 17)) && (giveGift3 == true)) {
mineLayer[_local3].gotoAndPlay(18);
this.removeMovieClip();
}
_local3 = "enemy" + _local2;
if (this.hitTest(enemyLayer[_local3]) && (enemyLayer[_local3]._currentframe == 1)) {
enemyLayer[_local3].play();
scoreX++;
score_txt.text = scoreX;
this.removeMovieClip();
}
_local3 = "enemy2" + _local2;
if ((this.hitTest(enemy2Layer[_local3]) && (enemy2Layer[_local3]._currentframe == 1)) && (enemy2Die == 0)) {
enemy2Die = 3;
enemy2Layer[_local3].play();
scoreX = scoreX + 3;
score_txt.text = scoreX;
this.removeMovieClip();
} else if (this.hitTest(enemy2Layer[_local3]) && (enemy2Layer[_local3]._currentframe == 1)) {
enemy2Die--;
this.removeMovieClip();
}
_local3 = "enemy3" + _local2;
if ((this.hitTest(enemy3Layer[_local3]) && (enemy3Layer[_local3]._currentframe == 1)) && (enemy3Die == 0)) {
enemy3Die = 3;
enemy3Layer[_local3].play();
scoreX = scoreX + 3;
score_txt.text = scoreX;
this.removeMovieClip();
} else if (this.hitTest(enemy3Layer[_local3]) && (enemy3Layer[_local3]._currentframe == 1)) {
enemy3Die--;
this.removeMovieClip();
}
_local3 = "enemy4" + _local2;
if ((this.hitTest(enemy4Layer[_local3]) && (enemy4Layer[_local3]._currentframe == 1)) && (enemy4Die == 0)) {
enemy4Die = 7;
enemy4Layer[_local3].play();
scoreX = scoreX + 6;
score_txt.text = scoreX;
this.removeMovieClip();
} else if (this.hitTest(enemy4Layer[_local3]) && (enemy4Layer[_local3]._currentframe == 1)) {
enemy4Die--;
this.removeMovieClip();
}
_local2++;
}
};
projectileCount++;
projectileCount = projectileCount % 20;
};
createProjectile2 = function (type, x, y, dx, dy) {
var _local4 = "proj2" + projectileCount2;
projectileLayer2.attachMovie(type, _local4, projectileCount2);
projectileLayer2[_local4]._x = x;
projectileLayer2[_local4]._y = y;
projectileLayer2[_local4].dx = dx;
projectileLayer2[_local4].dy = dy;
projectileLayer2[_local4].onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
if (this._y < -80) {
this.removeMovieClip();
}
var _local2 = 0;
while (_local2 < 10) {
var _local3 = "mine" + _local2;
if (this.hitTest(mineLayer[_local3]) && (mineLayer[_local3]._currentframe < 18)) {
mineLayer[_local3].gotoAndPlay(18);
}
_local3 = "enemy" + _local2;
if (this.hitTest(enemyLayer[_local3]) && (enemyLayer[_local3]._currentframe == 1)) {
enemyLayer[_local3].play();
scoreX++;
score_txt.text = scoreX;
}
_local3 = "enemy2" + _local2;
if (this.hitTest(enemy2Layer[_local3]) && (enemy2Layer[_local3]._currentframe == 1)) {
enemy2Die = 3;
enemy2Layer[_local3].play();
scoreX = scoreX + 3;
score_txt.text = scoreX;
}
_local3 = "enemy3" + _local2;
if (this.hitTest(enemy3Layer[_local3]) && (enemy3Layer[_local3]._currentframe == 1)) {
enemy3Die = 3;
enemy3Layer[_local3].play();
scoreX = scoreX + 3;
score_txt.text = scoreX;
}
_local3 = "enemy4" + _local2;
if (this.hitTest(enemy4Layer[_local3]) && (enemy4Layer[_local3]._currentframe == 1)) {
enemy4Die = 7;
enemy4Layer[_local3].play();
scoreX = scoreX + 6;
score_txt.text = scoreX;
}
_local2++;
}
};
projectileCount2++;
projectileCount2 = projectileCount2 % 10;
};
createenemy = function (type, x, y) {
var _local2 = "enemy" + enemyCount;
enemyLayer.attachMovie(type, _local2, enemyCount);
enemyLayer[_local2]._x = x;
enemyLayer[_local2].xline = x;
enemyLayer[_local2]._y = y;
enemyLayer[_local2].dy = (Math.random() * 8) + 6;
enemyLayer[_local2].t = Math.random() * 6.28;
enemyLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.08;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if (this._y > 560) {
this.removeMovieClip();
}
};
enemyCount++;
enemyCount = enemyCount % 10;
};
createenemy2 = function (type, x, y) {
var _local2 = "enemy2" + enemy2Count;
enemy2Layer.attachMovie(type, _local2, enemy2Count);
enemy2Layer[_local2]._x = x;
enemy2Layer[_local2].xline = x;
enemy2Layer[_local2]._y = y;
enemy2Layer[_local2].dy = (Math.random() * 8) + 6;
enemy2Layer[_local2].t = Math.random() * 6.28;
enemy2Layer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.07;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if ((this._y > 560) && (enemy2Die < 3)) {
this.removeMovieClip();
enemy2Die = 3;
} else if (this._y > 560) {
this.removeMovieClip();
}
};
enemy2Count++;
enemy2Count = enemy2Count % 10;
};
createenemy3 = function (type, x, y) {
var _local2 = "enemy3" + enemy3Count;
enemy3Layer.attachMovie(type, _local2, enemy3Count);
enemy3Layer[_local2]._x = x;
enemy3Layer[_local2].xline = x;
enemy3Layer[_local2]._y = y;
enemy3Layer[_local2].dy = (Math.random() * 8) + 6;
enemy3Layer[_local2].t = Math.random() * 6.38;
enemy3Layer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.07;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if ((this._y > 560) && (enemy3Die < 3)) {
this.removeMovieClip();
enemy3Die = 3;
} else if (this._y > 560) {
this.removeMovieClip();
}
};
enemy3Count++;
enemy3Count = enemy3Count % 10;
};
createenemy4 = function (type, x, y) {
var _local2 = "enemy4" + enemy4Count;
enemy4Layer.attachMovie(type, _local2, enemy4Count);
enemy4Layer[_local2]._x = x;
enemy4Layer[_local2].xline = x;
enemy4Layer[_local2]._y = y;
enemy4Layer[_local2].dy = (Math.random() * 4) + 4;
enemy4Layer[_local2].t = Math.random() * 6.48;
enemy4Layer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.05;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if ((this._y > 560) && (enemy4Die < 7)) {
this.removeMovieClip();
enemy4Die = 7;
} else if (this._y > 560) {
this.removeMovieClip();
}
};
enemy4Count++;
enemy4Count = enemy4Count % 10;
};
creategift = function (type, x, y) {
var _local2 = "gift" + giftCount;
giftLayer.attachMovie(type, _local2, giftCount);
giftLayer[_local2]._x = x;
giftLayer[_local2].xline = x;
giftLayer[_local2]._y = y;
giftLayer[_local2].dy = (Math.random() * 16) + 12;
giftLayer[_local2].t = Math.random() * 7.28;
giftLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.1;
if (((superGift == true) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
this.removeMovieClip();
} else if (((((giveGift == true) && (giveGift2 == true)) && (giveGift3 == true)) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift4 = true;
this.removeMovieClip();
} else if ((((giveGift == true) && (giveGift2 == true)) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift3 = true;
this.removeMovieClip();
} else if (((giveGift == true) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift2 = true;
this.removeMovieClip();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift = true;
this.removeMovieClip();
giftcounter = timeX;
giftcountID = setInterval(giftdoCounter, 1000);
}
if (this._y > 500) {
this.removeMovieClip();
}
};
giftCount++;
giftCount = giftCount % 10;
};
creategiftz = function (type, x, y) {
var _local2 = "giftz" + giftzCount;
giftzLayer.attachMovie(type, _local2, giftzCount);
giftzLayer[_local2]._x = x;
giftzLayer[_local2].xline = x;
giftzLayer[_local2]._y = y;
giftzLayer[_local2].dy = (Math.random() * 16) + 6;
giftzLayer[_local2].t = Math.random() * 7.28;
giftzLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.2;
if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
scoreX = scoreX + 5;
score_txt.text = scoreX;
this.removeMovieClip();
}
if (this._y > 500) {
this.removeMovieClip();
}
};
giftzCount++;
giftzCount = giftzCount % 10;
};
createsuper = function (type, x, y) {
var _local2 = "supergift" + superCount;
superLayer.attachMovie(type, _local2, superCount);
superLayer[_local2]._x = x;
superLayer[_local2].xline = x;
superLayer[_local2]._y = y;
superLayer[_local2].dy = (Math.random() * 16) + 10;
superLayer[_local2].t = Math.random() * 7.28;
superLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.2;
if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
superGift = true;
giveGift = false;
giveGift2 = false;
giveGift3 = false;
supercounter = (timeX = timeX - 8);
supercountID = setInterval(superdoCounter, 1000);
this.removeMovieClip();
scoreX = scoreX + 5;
}
if (this._y > 500) {
this.removeMovieClip();
}
};
superCount++;
superCount = superCount % 10;
};
createmine = function (type, x, y) {
var _local2 = "mine" + mineCount;
mineLayer.attachMovie(type, _local2, mineCount);
mineLayer[_local2]._x = x;
mineLayer[_local2].xline = x;
mineLayer[_local2]._y = y;
mineLayer[_local2].dy = 5;
mineLayer[_local2].onEnterFrame = function () {
this._y = this._y + this.dy;
if (((this._currentframe == 17) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 17) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if (this._y > 510) {
this.removeMovieClip();
}
};
mineCount++;
mineCount = mineCount % 10;
};
startButton.onRelease = function () {
setup();
this._visible = false;
ifpower._visible = true;
scoreX = scoreX - score_txt.text;
music = new Sound();
music.attachSound("rant");
music.start(0, 99);
};
Frame 3725
if ((showengine == true) && (engine == false)) {
newitem._visible = true;
} else if (showengine == false) {
newitem._visible = false;
}
Frame 3891
stopAllSounds();
gotoAndPlay (574);
ship.removeMovieClip();
cursor._visible = true;
Frame 3892
if (level > 6) {
gotoAndPlay (4125);
}
Instance of Symbol 466 MovieClip "cursor" in Frame 3892
onClipEvent (enterFrame) {
startDrag (this, true);
}
Frame 3920
stopAllSounds();
Frame 3933
stop();
Frame 3991
stop();
Frame 3992
stop();
Frame 4044
stop();
Frame 4045
stop();
Frame 4124
gotoAndPlay (4172);
Frame 4172
stopAllSounds();
gift_txt._visible = false;
levelbackButton._visible = true;
scoreX = 0;
score_txt.text = scoreX;
life_txt.text = life;
if (color == "red") {
shipred._visible = true;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipred;
} else if (color == "green") {
shipred._visible = false;
shipgreen._visible = true;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipgreen;
} else if (color == "white") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = true;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipwhite;
} else if (color == "blue") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = true;
shipbrown._visible = false;
ship = shipblue;
} else if (color == "brown") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = true;
ship = shipbrown;
}
Instance of Symbol 466 MovieClip "cursor" in Frame 4172
onClipEvent (enterFrame) {
startDrag (this, true);
}
Frame 4200
stop();
setup = function () {
firing = false;
rockets_txt.text = rockets;
score_txt.text = scoreX;
timeX = time;
powerX = power;
enemyTime = 0;
enemyRate = 35;
enemy2Time = 0;
enemy2Rate = 90;
mineTime = 0;
mineRate = 70;
giftTime = 0;
giftRate = 250;
giftzTime = 0;
giftzRate = 160;
superTime = 0;
superRate = 850;
gift_txt.text = 0;
giveGift = false;
giveGift2 = false;
giveGift3 = false;
giveGift4 = false;
giftz = false;
superGift = false;
rocket = false;
rockets_txt._visible = false;
counter = 0;
counter_txt.text = counter;
giftcounter = 0;
supercounter = 0;
enemy2Die = 4;
cursor._visible = false;
levelbackButton._visible = false;
ship.onMouseDown = function () {
firing = true;
repeatTime = 0;
};
ship.onMouseUp = function () {
firing = false;
};
ship.onEnterFrame = function () {
this.destx = _xmouse;
this.desty = _ymouse;
var _local4 = this.destx - this._x;
var _local3 = this.desty - this._y;
if (this._x > 400) {
this._x = 350;
}
if (this._x < 0) {
this._x = 50;
}
if (this._y > 500) {
this._y = 450;
}
if (this._y < 0) {
this._y = 50;
}
if (engine == true) {
this._x = this._x + (_local4 * 0.5);
this._y = this._y + (_local3 * 0.5);
} else if (engine == false) {
this._x = this._x + (_local4 * 0.15);
this._y = this._y + (_local3 * 0.15);
}
var _local2 = new Object();
_local2.onKeyDown = function () {
if ((Key.isDown(32) && (powerX > 0)) && (scoreX > 9)) {
createProjectile2("power", ship._x, ship._y - 5, 0, -30);
powerX--;
scoreX = scoreX - 10;
score_txt.text = scoreX;
if (powerX == 0) {
ifpower._visible = false;
}
}
if (Key.isDown(40)) {
rocket = true;
rockets_txt._visible = true;
}
if (Key.isDown(38)) {
rocket = false;
rockets_txt._visible = false;
}
};
Key.addListener(_local2);
if ((((firing && (repeatTime == 0)) && (rocket == true)) && (superGift == true)) && (rockets > 0)) {
createProjectile2("rocket2", this._x, this._y - 5, 0, -8);
fireRate = 30;
rockets--;
rockets_txt.text = rockets;
} else if (((firing && (repeatTime == 0)) && (rocket == true)) && (rockets > 0)) {
createProjectile2("rocket", this._x, this._y - 5, 0, -7);
fireRate = 30;
rockets--;
rockets_txt.text = rockets;
} else if ((firing && (repeatTime == 0)) && (superGift == true)) {
createProjectile("bullet2", this._x, this._y - 5, 0, -10);
createProjectile("bullet2", this._x, this._y - 5, -3, -10);
createProjectile("bullet2", this._x, this._y - 5, 3, -10);
fireRate = 6;
powerup_txt.text = "Power!!";
powerup_txt._visible = true;
} else if (((((firing && (repeatTime == 0)) && (giveGift == true)) && (giveGift2 == true)) && (giveGift3 == true)) && (giveGift4 == true)) {
createProjectile("supercannon", this._x, this._y - 5, 0, -60);
fireRate = 3;
powerup_txt.text = "Power up 4";
} else if ((((firing && (repeatTime == 0)) && (giveGift == true)) && (giveGift2 == true)) && (giveGift3 == true)) {
createProjectile("laser", this._x, this._y - 5, 0, -95);
fireRate = 2;
powerup_txt.text = "Power up 3";
} else if (((firing && (repeatTime == 0)) && (giveGift == true)) && (giveGift2 == true)) {
createProjectile("super2", this._x, this._y - 5, 0, -45);
fireRate = 5;
powerup_txt.text = "Power up 2";
} else if ((firing && (repeatTime == 0)) && (giveGift == true)) {
createProjectile("super", this._x, this._y - 5, 0, -35);
fireRate = 7;
powerup_txt.text = "Power up 1";
powerup_txt._visible = true;
} else if (firing && (repeatTime == 0)) {
createProjectile("bullet", this._x, this._y - 5, 0, -speed);
fireRate = 9;
}
repeatTime++;
repeatTime = repeatTime % fireRate;
if ((enemyTime == 0) && (counter < 117)) {
var _local5 = (Math.random() * 100) + 80;
createenemy("8", _local5, -30);
if ((enemyTime == 0) && (counter < 117)) {
_local5 = (Math.random() * 100) + 80;
createenemy("8", 400 - _local5, -50);
}
if (((enemyTime == 0) && (counter > 10)) && (counter < 117)) {
_local5 = (Math.random() * 100) + 80;
createenemy("8", 200, -90);
}
if (((enemyTime == 0) && (counter > 50)) && (counter < 117)) {
_local5 = (Math.random() * 100) + 80;
createenemy("10", 200, -70);
}
}
enemyTime++;
enemyTime = enemyTime % enemyRate;
if (((enemy2Time == 0) && (counter > 15)) && (counter < 117)) {
var _local5 = (Math.random() * 100) + 80;
createenemy2("9", _local5, -30);
}
enemy2Time++;
enemy2Time = enemy2Time % enemy2Rate;
if ((mineTime == 0) && (counter < 117)) {
var _local5 = (Math.random() * 100) + 80;
createmine("mine2", Math.floor(Math.random() * 380) + 10, Math.floor(Math.random() * 330) + 30);
}
if ((((mineTime == 0) && (counter > 2)) && (counter < 117)) && (easy == false)) {
var _local5 = (Math.random() * 100) + 300;
createmine("mine2", Math.floor(Math.random() * 380) + 10, Math.floor(Math.random() * 190) + 20);
}
if ((((easy == false) && (mineTime == 0)) && (counter > 70)) && (counter < 117)) {
var _local5 = (Math.random() * 100) + 300;
createmine("mine2", Math.floor(Math.random() * 380) + 10, -80);
}
mineTime++;
mineTime = mineTime % mineRate;
if (((giftTime == 0) && (counter > 5)) && (counter < 117)) {
var _local5 = (Math.random() * 100) + 80;
creategift("gift_mc", 200, -30);
}
giftTime++;
giftTime = giftTime % giftRate;
if (giftzTime == 0) {
var _local5 = (Math.random() * 100) + 80;
creategiftz("giftz_mc", 200, -30);
}
giftzTime++;
giftzTime = giftzTime % giftzRate;
if (((superTime == 0) && (counter > 30)) && (counter < 110)) {
var _local5 = (Math.random() * 100) + 80;
createsuper("supergift_mc", 200, -30);
}
superTime++;
superTime = superTime % superRate;
};
doCounter = function () {
counter++;
counter_txt.text = counter;
if (counter == 120) {
enemyLayer.removeMovieClip();
enemy2Layer.removeMovieClip();
projectileLayer.removeMovieClip();
projectileLayer2.removeMovieClip();
giftLayer.removeMovieClip();
giftzLayer.removeMovieClip();
superLayer.removeMovieClip();
mineLayer.removeMovieClip();
gift_txt._visible = false;
rockets_txt._visible = false;
powerup_txt._visible = false;
clearInterval(countID);
clearInterval(giftcountID);
clearInterval(supercountID);
gotoAndPlay (4201);
score = score + scoreX;
ship.swapDepths(cursor);
}
};
doLose = function () {
delete ship.onEnterFrame;
delete bgscroller.onEnterFrame;
enemyLayer.removeMovieClip();
enemy2Layer.removeMovieClip();
projectileLayer.removeMovieClip();
projectileLayer2.removeMovieClip();
giftLayer.removeMovieClip();
giftzLayer.removeMovieClip();
superLayer.removeMovieClip();
mineLayer.removeMovieClip();
startButton._visible = true;
gift_txt._visible = false;
rockets_txt._visible = false;
powerup_txt._visible = false;
clearInterval(countID);
clearInterval(giftcountID);
clearInterval(supercountID);
cursor._visible = true;
levelbackButton._visible = true;
scoreX = 0;
powerX = power;
music.stop();
};
superdoCounter = function () {
supercounter--;
gift_txt.text = supercounter;
gift_txt._visible = true;
powerup_txt._visible = true;
clearInterval(giftcountID);
if (supercounter < 0) {
superGift = false;
gift_txt._visible = false;
powerup_txt._visible = false;
timeX = time;
clearInterval(supercountID);
}
};
giftdoCounter = function () {
giftcounter--;
gift_txt.text = giftcounter;
gift_txt._visible = true;
powerup_txt._visible = true;
if (giftcounter < 0) {
giveGift4 = false;
giveGift3 = false;
giveGift2 = false;
giveGift = false;
gift_txt._visible = false;
powerup_txt._visible = false;
timeX = time;
clearInterval(giftcountID);
}
};
countID = setInterval(doCounter, 1000);
_root.createEmptyMovieClip("projectileLayer2", 100);
projectileCount2 = 0;
_root.createEmptyMovieClip("projectileLayer", 99);
projectileCount = 0;
_root.createEmptyMovieClip("enemyLayer", 98);
enemyCount = 0;
_root.createEmptyMovieClip("enemy2Layer", 97);
enemy2Count = 0;
_root.createEmptyMovieClip("giftLayer", 96);
giftCount = 0;
_root.createEmptyMovieClip("giftzLayer", 95);
giftzCount = 0;
_root.createEmptyMovieClip("superLayer", 94);
superCount = 0;
_root.createEmptyMovieClip("mineLayer", 93);
mineCount = 0;
ship.swapDepths(101);
ship.gotoAndStop(1);
bgscroller.onEnterFrame = function () {
if (this._y >= 500) {
this._y = 0;
}
this._y = this._y + 6;
};
};
createProjectile = function (type, x, y, dx, dy) {
var _local4 = "proj" + projectileCount;
projectileLayer.attachMovie(type, _local4, projectileCount);
projectileLayer[_local4]._x = x;
projectileLayer[_local4]._y = y;
projectileLayer[_local4].dx = dx;
projectileLayer[_local4].dy = dy;
projectileLayer[_local4].onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
if (this._y < -190) {
this.removeMovieClip();
}
var _local2 = 0;
while (_local2 < 10) {
var _local3 = "mine" + _local2;
if ((this.hitTest(mineLayer[_local3]) && (mineLayer[_local3]._currentframe == 17)) && (giveGift3 == true)) {
mineLayer[_local3].gotoAndPlay(18);
this.removeMovieClip();
}
if ((this.hitTest(mineLayer[_local3]) && (mineLayer[_local3]._currentframe < 17)) && (giveGift3 == true)) {
mineLayer[_local3].gotoAndPlay(18);
this.removeMovieClip();
}
_local3 = "enemy" + _local2;
if (this.hitTest(enemyLayer[_local3]) && (enemyLayer[_local3]._currentframe == 1)) {
enemyLayer[_local3].play();
scoreX++;
score_txt.text = scoreX;
this.removeMovieClip();
}
_local3 = "enemy2" + _local2;
if ((this.hitTest(enemy2Layer[_local3]) && (enemy2Layer[_local3]._currentframe == 1)) && (enemy2Die == 0)) {
enemy2Die = 4;
enemy2Layer[_local3].play();
scoreX = scoreX + 4;
score_txt.text = scoreX;
this.removeMovieClip();
} else if (this.hitTest(enemy2Layer[_local3]) && (enemy2Layer[_local3]._currentframe == 1)) {
enemy2Die--;
this.removeMovieClip();
}
_local2++;
}
};
projectileCount++;
projectileCount = projectileCount % 20;
};
createProjectile2 = function (type, x, y, dx, dy) {
var _local4 = "proj2" + projectileCount2;
projectileLayer2.attachMovie(type, _local4, projectileCount2);
projectileLayer2[_local4]._x = x;
projectileLayer2[_local4]._y = y;
projectileLayer2[_local4].dx = dx;
projectileLayer2[_local4].dy = dy;
projectileLayer2[_local4].onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
if (this._y < -80) {
this.removeMovieClip();
}
var _local2 = 0;
while (_local2 < 10) {
var _local3 = "mine" + _local2;
if (this.hitTest(mineLayer[_local3]) && (mineLayer[_local3]._currentframe < 18)) {
mineLayer[_local3].gotoAndPlay(18);
}
_local3 = "enemy" + _local2;
if (this.hitTest(enemyLayer[_local3]) && (enemyLayer[_local3]._currentframe == 1)) {
enemyLayer[_local3].play();
scoreX++;
score_txt.text = scoreX;
}
_local3 = "enemy2" + _local2;
if (this.hitTest(enemy2Layer[_local3]) && (enemy2Layer[_local3]._currentframe == 1)) {
enemy2Die = 4;
enemy2Layer[_local3].play();
scoreX = scoreX + 4;
score_txt.text = scoreX;
}
_local2++;
}
};
projectileCount2++;
projectileCount2 = projectileCount2 % 10;
};
createenemy = function (type, x, y) {
var _local2 = "enemy" + enemyCount;
enemyLayer.attachMovie(type, _local2, enemyCount);
enemyLayer[_local2]._x = x;
enemyLayer[_local2].xline = x;
enemyLayer[_local2]._y = y;
enemyLayer[_local2].dy = (Math.random() * 8) + 9;
enemyLayer[_local2].t = Math.random() * 6.28;
enemyLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.1;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if (this._y > 560) {
this.removeMovieClip();
}
};
enemyCount++;
enemyCount = enemyCount % 10;
};
createenemy2 = function (type, x, y) {
var _local2 = "enemy2" + enemy2Count;
enemy2Layer.attachMovie(type, _local2, enemy2Count);
enemy2Layer[_local2]._x = x;
enemy2Layer[_local2].xline = x;
enemy2Layer[_local2]._y = y;
enemy2Layer[_local2].dy = (Math.random() * 5) + 9;
enemy2Layer[_local2].t = Math.random() * 6.28;
enemy2Layer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.07;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if ((this._y > 560) && (enemy2Die < 4)) {
this.removeMovieClip();
enemy2Die = 4;
} else if (this._y > 560) {
this.removeMovieClip();
}
};
enemy2Count++;
enemy2Count = enemy2Count % 10;
};
creategift = function (type, x, y) {
var _local2 = "gift" + giftCount;
giftLayer.attachMovie(type, _local2, giftCount);
giftLayer[_local2]._x = x;
giftLayer[_local2].xline = x;
giftLayer[_local2]._y = y;
giftLayer[_local2].dy = (Math.random() * 16) + 12;
giftLayer[_local2].t = Math.random() * 7.28;
giftLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.1;
if (((superGift == true) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
this.removeMovieClip();
} else if (((((giveGift == true) && (giveGift2 == true)) && (giveGift3 == true)) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift4 = true;
this.removeMovieClip();
} else if ((((giveGift == true) && (giveGift2 == true)) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift3 = true;
this.removeMovieClip();
} else if (((giveGift == true) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift2 = true;
this.removeMovieClip();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift = true;
this.removeMovieClip();
giftcounter = timeX;
giftcountID = setInterval(giftdoCounter, 1000);
}
if (this._y > 500) {
this.removeMovieClip();
}
};
giftCount++;
giftCount = giftCount % 10;
};
creategiftz = function (type, x, y) {
var _local2 = "giftz" + giftzCount;
giftzLayer.attachMovie(type, _local2, giftzCount);
giftzLayer[_local2]._x = x;
giftzLayer[_local2].xline = x;
giftzLayer[_local2]._y = y;
giftzLayer[_local2].dy = (Math.random() * 16) + 6;
giftzLayer[_local2].t = Math.random() * 7.28;
giftzLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.2;
if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
scoreX = scoreX + 5;
score_txt.text = scoreX;
this.removeMovieClip();
}
if (this._y > 500) {
this.removeMovieClip();
}
};
giftzCount++;
giftzCount = giftzCount % 10;
};
createsuper = function (type, x, y) {
var _local2 = "supergift" + superCount;
superLayer.attachMovie(type, _local2, superCount);
superLayer[_local2]._x = x;
superLayer[_local2].xline = x;
superLayer[_local2]._y = y;
superLayer[_local2].dy = (Math.random() * 16) + 10;
superLayer[_local2].t = Math.random() * 7.28;
superLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.2;
if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
superGift = true;
giveGift = false;
giveGift2 = false;
giveGift3 = false;
supercounter = (timeX = timeX - 8);
supercountID = setInterval(superdoCounter, 1000);
this.removeMovieClip();
scoreX = scoreX + 5;
}
if (this._y > 500) {
this.removeMovieClip();
}
};
superCount++;
superCount = superCount % 10;
};
createmine = function (type, x, y) {
var _local2 = "mine" + mineCount;
mineLayer.attachMovie(type, _local2, mineCount);
mineLayer[_local2]._x = x;
mineLayer[_local2].xline = x;
mineLayer[_local2]._y = y;
mineLayer[_local2].dy = 6;
mineLayer[_local2].onEnterFrame = function () {
this._y = this._y + this.dy;
if (((this._currentframe == 17) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 17) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if (this._y > 510) {
this.removeMovieClip();
}
};
mineCount++;
mineCount = mineCount % 10;
};
startButton.onRelease = function () {
setup();
this._visible = false;
ifpower._visible = true;
scoreX = scoreX - score_txt.text;
music = new Sound();
music.attachSound("arp");
music.start(0, 99);
};
Frame 4384
stopAllSounds();
if (boss == false) {
gotoAndPlay (574);
cursor._visible = true;
} else if (bosscount > 1) {
gotoAndPlay (574);
cursor._visible = true;
}
ship.removeMovieClip();
Instance of Symbol 466 MovieClip "cursor" in Frame 4385
onClipEvent (enterFrame) {
startDrag (this, true);
}
Frame 4416
stop();
Frame 4480
stopAllSounds();
gift_txt._visible = false;
levelbackButton._visible = true;
scoreX = 0;
score_txt.text = scoreX;
life_txt.text = life;
if (color == "red") {
shipred._visible = true;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipred;
} else if (color == "green") {
shipred._visible = false;
shipgreen._visible = true;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipgreen;
} else if (color == "white") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = true;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipwhite;
} else if (color == "blue") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = true;
shipbrown._visible = false;
ship = shipblue;
} else if (color == "brown") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = true;
ship = shipbrown;
}
Frame 4508
stop();
setup = function () {
firing = false;
rockets_txt.text = rockets;
score_txt.text = scoreX;
timeX = time;
powerX = power;
enemyTime = 0;
enemyRate = 30;
enemy2Time = 0;
enemy2Rate = 70;
shootTime = 1;
shootRate = 25;
counter = 0;
counter_txt.text = counter;
enemy2Die = 4;
cursor._visible = false;
levelbackButton._visible = false;
if (easy == false) {
bossDie = 30;
} else if (easy == true) {
bossDie = 20;
}
boss_ship.dx = 4;
boss_ship.onEnterFrame = function () {
this._x = this._x + this.dx;
if ((this._x + (this._width / 2)) > 450) {
this._x = 450 - (this._width / 2);
this.dx = this.dx + -7;
}
if ((this._x - (this._width / 2)) < -50) {
this._x = -50 + (this._width / 2);
this.dx = this.dx - -7;
}
};
ship.onMouseDown = function () {
firing = true;
repeatTime = 0;
repeatTime2 = 0;
};
ship.onMouseUp = function () {
firing = false;
};
ship.onEnterFrame = function () {
this.destx = _xmouse;
this.desty = _ymouse;
var _local4 = this.destx - this._x;
var _local3 = this.desty - this._y;
if (this._x > 400) {
this._x = 350;
}
if (this._x < 0) {
this._x = 50;
}
if (this._y > 500) {
this._y = 450;
}
if (this._y < 0) {
this._y = 50;
}
if (engine == true) {
this._x = this._x + (_local4 * 0.5);
this._y = this._y + (_local3 * 0.5);
} else if (engine == false) {
this._x = this._x + (_local4 * 0.15);
this._y = this._y + (_local3 * 0.15);
}
var _local2 = new Object();
_local2.onKeyDown = function () {
if ((Key.isDown(32) && (powerX > 0)) && (scoreX > 9)) {
createProjectile2("power", ship._x, ship._y - 5, 0, -30);
powerX--;
scoreX = scoreX - 10;
score_txt.text = scoreX;
if (powerX == 0) {
ifpower._visible = false;
}
}
if (Key.isDown(40)) {
rocket = true;
rockets_txt._visible = true;
}
if (Key.isDown(38)) {
rocket = false;
rockets_txt._visible = false;
}
};
Key.addListener(_local2);
if ((((firing && (repeatTime == 0)) && (rocket == true)) && (superGift == true)) && (rockets > 0)) {
createProjectile2("rocket2", this._x, this._y - 5, 0, -8);
fireRate = 30;
rockets--;
rockets_txt.text = rockets;
} else if (((firing && (repeatTime == 0)) && (rocket == true)) && (rockets > 0)) {
createProjectile2("rocket", this._x, this._y - 5, 0, -7);
fireRate = 30;
rockets--;
rockets_txt.text = rockets;
} else if (firing && (repeatTime == 0)) {
createProjectile("bullet", this._x, this._y - 5, 0, -speed);
fireRate = 9;
}
repeatTime++;
repeatTime = repeatTime % fireRate;
if (firing && (repeatTime2 == 0)) {
createshoot("bossbullet", boss_ship._x - 20, boss_ship._y + 10, 0, -speed);
createshoot("bossbullet", boss_ship._x + 20, boss_ship._y + 10, 0, -speed);
fireRate2 = 9;
}
repeatTime2++;
repeatTime2 = repeatTime2 % fireRate2;
if (enemyTime == 0) {
var _local5 = (Math.random() * 100) + 80;
createenemy("8", _local5, -30);
if ((enemyTime == 0) && (counter > 2)) {
_local5 = (Math.random() * 100) + 80;
createenemy("8", 400 - _local5, -90);
}
}
enemyTime++;
enemyTime = enemyTime % enemyRate;
if ((enemy2Time == 0) && (counter > 3)) {
var _local5 = (Math.random() * 100) + 200;
createenemy2("9", _local5, -30);
}
enemy2Time++;
enemy2Time = enemy2Time % enemy2Rate;
flash_anm.play();
};
doCounter = function () {
counter++;
counter_txt.text = counter;
if (bossDie == 0) {
level++;
bosscount++;
enemyLayer.removeMovieClip();
enemy2Layer.removeMovieClip();
projectileLayer.removeMovieClip();
projectileLayer2.removeMovieClip();
rockets_txt._visible = false;
shootLayer.removeMovieClip();
clearInterval(countID);
gotoAndPlay (4509);
boss_ship.removeMovieClip();
ship.removeMovieClip();
scoreX = scoreX + 300;
score_txt.text = scoreX;
score = score + scoreX;
music.stop();
}
};
doLose = function () {
flash_anm.stop();
flash_anm.gotoAndPlay(1);
delete ship.onEnterFrame;
delete bgscroller.onEnterFrame;
enemyLayer.removeMovieClip();
enemy2Layer.removeMovieClip();
projectileLayer.removeMovieClip();
projectileLayer2.removeMovieClip();
boss_ship.removeMovieClip();
startButton._visible = true;
shootLayer.removeMovieClip();
rockets_txt._visible = false;
clearInterval(countID);
cursor._visible = true;
levelbackButton._visible = true;
scoreX = 0;
powerX = power;
music.stop();
};
countID = setInterval(doCounter, 1000);
_root.createEmptyMovieClip("projectileLayer2", 99);
projectileCount2 = 0;
_root.createEmptyMovieClip("projectileLayer", 98);
projectileCount = 0;
_root.createEmptyMovieClip("enemyLayer", 97);
enemyCount = 0;
_root.createEmptyMovieClip("enemy2Layer", 96);
enemy2Count = 0;
_root.createEmptyMovieClip("shootLayer", 95);
shootCount = 0;
boss_ship.swapDepths(101);
ship.swapDepths(100);
ship.gotoAndStop(1);
bgscroller.onEnterFrame = function () {
if (this._y >= 500) {
this._y = 0;
}
this._y = this._y + 4;
};
};
createProjectile = function (type, x, y, dx, dy) {
var _local4 = "proj" + projectileCount;
projectileLayer.attachMovie(type, _local4, projectileCount);
projectileLayer[_local4]._x = x;
projectileLayer[_local4]._y = y;
projectileLayer[_local4].dx = dx;
projectileLayer[_local4].dy = dy;
projectileLayer[_local4].onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
if (this._y < -190) {
this.removeMovieClip();
}
var _local3 = 0;
while (_local3 < 10) {
if ((this.hitTest(boss_ship) && (boss_ship._currentframe == 1)) && (bossDie == 0)) {
doCounter();
scoreX = scoreX + 150;
score_txt.text = scoreX;
this.removeMovieClip();
} else if (this.hitTest(boss_ship) && (boss_ship._currentframe == 1)) {
bossDie--;
this.removeMovieClip();
mySoundObject = new Sound();
mySoundObject.attachSound("spacely");
mySoundObject.start(0, 1);
}
var _local2 = "enemy" + _local3;
if (this.hitTest(enemyLayer[_local2]) && (enemyLayer[_local2]._currentframe == 1)) {
enemyLayer[_local2].play();
scoreX++;
score_txt.text = scoreX;
this.removeMovieClip();
}
_local2 = "enemy2" + _local3;
if ((this.hitTest(enemy2Layer[_local2]) && (enemy2Layer[_local2]._currentframe == 1)) && (enemy2Die == 0)) {
enemy2Die = 4;
enemy2Layer[_local2].play();
scoreX = scoreX + 4;
score_txt.text = scoreX;
this.removeMovieClip();
} else if (this.hitTest(enemy2Layer[_local2]) && (enemy2Layer[_local2]._currentframe == 1)) {
enemy2Die--;
this.removeMovieClip();
}
_local3++;
}
};
projectileCount++;
projectileCount = projectileCount % 20;
};
createProjectile2 = function (type, x, y, dx, dy) {
var _local4 = "proj2" + projectileCount2;
projectileLayer2.attachMovie(type, _local4, projectileCount2);
projectileLayer2[_local4]._x = x;
projectileLayer2[_local4]._y = y;
projectileLayer2[_local4].dx = dx;
projectileLayer2[_local4].dy = dy;
projectileLayer2[_local4].onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
if (this._y < -80) {
this.removeMovieClip();
}
var _local2 = 0;
while (_local2 < 10) {
var _local3 = "enemy" + _local2;
if (this.hitTest(enemyLayer[_local3]) && (enemyLayer[_local3]._currentframe == 1)) {
enemyLayer[_local3].play();
scoreX++;
score_txt.text = scoreX;
}
_local3 = "enemy2" + _local2;
if (this.hitTest(enemy2Layer[_local3]) && (enemy2Layer[_local3]._currentframe == 1)) {
enemy2Die = 4;
enemy2Layer[_local3].play();
scoreX = scoreX + 4;
score_txt.text = scoreX;
}
_local2++;
}
};
projectileCount2++;
projectileCount2 = projectileCount2 % 10;
};
createshoot = function (type, x, y) {
var _local2 = "shoot" + shootCount;
shootLayer.attachMovie(type, _local2, shootCount);
shootLayer[_local2]._x = x;
shootLayer[_local2].xline = x;
shootLayer[_local2]._y = y;
shootLayer[_local2].dy = 15;
shootLayer[_local2].onEnterFrame = function () {
this._y = this._y + this.dy;
if (((this._currentframe > 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe > 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
};
shootCount++;
shootCount = shootCount % 20;
};
createenemy = function (type, x, y) {
var _local2 = "enemy" + enemyCount;
enemyLayer.attachMovie(type, _local2, enemyCount);
enemyLayer[_local2]._x = x;
enemyLayer[_local2].xline = x;
enemyLayer[_local2]._y = y;
enemyLayer[_local2].dy = (Math.random() * 8) + 9;
enemyLayer[_local2].t = Math.random() * 6.28;
enemyLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.1;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if (this._y > 560) {
this.removeMovieClip();
}
};
enemyCount++;
enemyCount = enemyCount % 10;
};
createenemy2 = function (type, x, y) {
var _local2 = "enemy2" + enemy2Count;
enemy2Layer.attachMovie(type, _local2, enemy2Count);
enemy2Layer[_local2]._x = x;
enemy2Layer[_local2].xline = x;
enemy2Layer[_local2]._y = y;
enemy2Layer[_local2].dy = (Math.random() * 5) + 9;
enemy2Layer[_local2].t = Math.random() * 6.28;
enemy2Layer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.1;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if ((this._y > 560) && (enemy2Die < 4)) {
this.removeMovieClip();
enemy2Die = 4;
} else if (this._y > 560) {
this.removeMovieClip();
}
};
enemy2Count++;
enemy2Count = enemy2Count % 10;
};
startButton.onRelease = function () {
setup();
this._visible = false;
ifpower._visible = true;
scoreX = scoreX - score_txt.text;
music = new Sound();
music.attachSound("scared");
music.start(0, 99);
};
Frame 4675
stopAllSounds();
cursor._visible = true;
Frame 4715
stop();
Frame 4778
stop();
Frame 4779
if (level > 7) {
gotoAndPlay (4909);
}
Instance of Symbol 466 MovieClip "cursor" in Frame 4779
onClipEvent (enterFrame) {
startDrag (this, true);
}
Frame 4815
stopAllSounds();
Frame 4830
stop();
Frame 4908
gotoAndPlay (4947);
Frame 4947
stopAllSounds();
gift_txt._visible = false;
levelbackButton._visible = true;
scoreX = 0;
score_txt.text = scoreX;
life_txt.text = life;
if (color == "red") {
shipred._visible = true;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipred;
} else if (color == "green") {
shipred._visible = false;
shipgreen._visible = true;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipgreen;
} else if (color == "white") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = true;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipwhite;
} else if (color == "blue") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = true;
shipbrown._visible = false;
ship = shipblue;
} else if (color == "brown") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = true;
ship = shipbrown;
}
Instance of Symbol 466 MovieClip "cursor" in Frame 4947
onClipEvent (enterFrame) {
startDrag (this, true);
}
Frame 4975
stop();
setup = function () {
firing = false;
rockets_txt.text = rockets;
score_txt.text = scoreX;
timeX = time;
powerX = power;
enemyTime = 0;
enemyRate = 40;
enemy2Time = 0;
enemy2Rate = 100;
enemy3Time = 0;
enemy3Rate = 120;
mineTime = 0;
mineRate = 70;
giftTime = 0;
giftRate = 250;
giftzTime = 0;
giftzRate = 160;
superTime = 0;
superRate = 850;
gift_txt.text = 0;
giveGift = false;
giveGift2 = false;
giveGift3 = false;
giveGift4 = false;
giftz = false;
superGift = false;
rocket = false;
rockets_txt._visible = false;
counter = 0;
counter_txt.text = counter;
giftcounter = 0;
supercounter = 0;
enemy2Die = 7;
enemy3Die = 7;
cursor._visible = false;
levelbackButton._visible = false;
ship.onMouseDown = function () {
firing = true;
repeatTime = 0;
};
ship.onMouseUp = function () {
firing = false;
};
ship.onEnterFrame = function () {
this.destx = _xmouse;
this.desty = _ymouse;
var _local4 = this.destx - this._x;
var _local3 = this.desty - this._y;
if (this._x > 400) {
this._x = 350;
}
if (this._x < 0) {
this._x = 50;
}
if (this._y > 500) {
this._y = 450;
}
if (this._y < 0) {
this._y = 50;
}
if (engine == true) {
this._x = this._x + (_local4 * 0.5);
this._y = this._y + (_local3 * 0.5);
} else if (engine == false) {
this._x = this._x + (_local4 * 0.15);
this._y = this._y + (_local3 * 0.15);
}
var _local2 = new Object();
_local2.onKeyDown = function () {
if ((Key.isDown(32) && (powerX > 0)) && (scoreX > 9)) {
createProjectile2("power", ship._x, ship._y - 5, 0, -30);
powerX--;
scoreX = scoreX - 10;
score_txt.text = scoreX;
if (powerX == 0) {
ifpower._visible = false;
}
}
if (Key.isDown(40)) {
rocket = true;
rockets_txt._visible = true;
}
if (Key.isDown(38)) {
rocket = false;
rockets_txt._visible = false;
}
};
Key.addListener(_local2);
if ((((firing && (repeatTime == 0)) && (rocket == true)) && (superGift == true)) && (rockets > 0)) {
createProjectile2("rocket2", this._x, this._y - 5, 0, -8);
fireRate = 30;
rockets--;
rockets_txt.text = rockets;
} else if (((firing && (repeatTime == 0)) && (rocket == true)) && (rockets > 0)) {
createProjectile2("rocket", this._x, this._y - 5, 0, -7);
fireRate = 30;
rockets--;
rockets_txt.text = rockets;
} else if ((firing && (repeatTime == 0)) && (superGift == true)) {
createProjectile("bullet2", this._x, this._y - 5, 0, -10);
createProjectile("bullet2", this._x, this._y - 5, -3, -10);
createProjectile("bullet2", this._x, this._y - 5, 3, -10);
fireRate = 6;
powerup_txt.text = "Power!!";
powerup_txt._visible = true;
} else if (((((firing && (repeatTime == 0)) && (giveGift == true)) && (giveGift2 == true)) && (giveGift3 == true)) && (giveGift4 == true)) {
createProjectile("supercannon", this._x, this._y - 5, 0, -60);
fireRate = 3;
powerup_txt.text = "Power up 4";
} else if ((((firing && (repeatTime == 0)) && (giveGift == true)) && (giveGift2 == true)) && (giveGift3 == true)) {
createProjectile("laser", this._x, this._y - 5, 0, -95);
fireRate = 2;
powerup_txt.text = "Power up 3";
} else if (((firing && (repeatTime == 0)) && (giveGift == true)) && (giveGift2 == true)) {
createProjectile("super2", this._x, this._y - 5, 0, -45);
fireRate = 5;
powerup_txt.text = "Power up 2";
} else if ((firing && (repeatTime == 0)) && (giveGift == true)) {
createProjectile("super", this._x, this._y - 5, 0, -35);
fireRate = 7;
powerup_txt.text = "Power up 1";
powerup_txt._visible = true;
} else if (firing && (repeatTime == 0)) {
createProjectile("bullet", this._x, this._y - 5, 0, -speed);
fireRate = 9;
}
repeatTime++;
repeatTime = repeatTime % fireRate;
if ((enemyTime == 0) && (counter < 107)) {
var _local5 = (Math.random() * 100) + 80;
createenemy("6", _local5, -30);
if (((enemyTime == 0) && (counter > 2)) && (counter < 107)) {
_local5 = (Math.random() * 100) + 80;
createenemy("6", 400 - _local5, -50);
}
if (((enemyTime == 0) && (counter > 20)) && (counter < 107)) {
_local5 = (Math.random() * 100) + 80;
createenemy("6", _local5, -70);
}
if (((enemyTime == 0) && (counter > 50)) && (counter < 107)) {
_local5 = (Math.random() * 100) + 80;
createenemy("6", 200, -90);
}
}
enemyTime++;
enemyTime = enemyTime % enemyRate;
if (((enemy2Time == 0) && (counter > 8)) && (counter < 107)) {
var _local5 = (Math.random() * 100) + 80;
createenemy2("7", 200, -30);
}
enemy2Time++;
enemy2Time = enemy2Time % enemy2Rate;
if (((enemy3Time == 0) && (counter > 30)) && (counter < 107)) {
var _local5 = (Math.random() * 100) + 80;
createenemy3("7", _local5, -30);
}
enemy3Time++;
enemy3Time = enemy3Time % enemy3Rate;
if (((mineTime == 0) && (counter > 2)) && (counter < 107)) {
var _local5 = (Math.random() * 100) + 80;
createmine("mine2", Math.floor(Math.random() * 380) + 10, Math.floor(Math.random() * 330) + 30);
}
if ((((easy == false) && (mineTime == 0)) && (counter > 2)) && (counter < 107)) {
var _local5 = (Math.random() * 100) + 300;
createmine("mine2", Math.floor(Math.random() * 380) + 10, Math.floor(Math.random() * 190) + 20);
}
if (((mineTime == 0) && (counter > 30)) && (counter < 107)) {
var _local5 = (Math.random() * 100) + 300;
createmine("mine2", Math.floor(Math.random() * 380) + 10, -80);
}
if (((mineTime == 0) && (counter > 70)) && (counter < 107)) {
var _local5 = (Math.random() * 100) + 300;
createmine("mine2", Math.floor(Math.random() * 380) + 10, -80);
}
mineTime++;
mineTime = mineTime % mineRate;
if (((giftTime == 0) && (counter > 5)) && (counter < 107)) {
var _local5 = (Math.random() * 100) + 80;
creategift("gift_mc", 200, -30);
}
giftTime++;
giftTime = giftTime % giftRate;
if (giftzTime == 0) {
var _local5 = (Math.random() * 100) + 80;
creategiftz("giftz_mc", 200, -30);
}
giftzTime++;
giftzTime = giftzTime % giftzRate;
if (((superTime == 0) && (counter > 30)) && (counter < 100)) {
var _local5 = (Math.random() * 100) + 80;
createsuper("supergift_mc", 200, -30);
}
superTime++;
superTime = superTime % superRate;
};
doCounter = function () {
counter++;
counter_txt.text = counter;
if (counter == 110) {
enemyLayer.removeMovieClip();
enemy2Layer.removeMovieClip();
enemy3Layer.removeMovieClip();
projectileLayer.removeMovieClip();
projectileLayer2.removeMovieClip();
giftLayer.removeMovieClip();
giftzLayer.removeMovieClip();
superLayer.removeMovieClip();
mineLayer.removeMovieClip();
gift_txt._visible = false;
rockets_txt._visible = false;
powerup_txt._visible = false;
clearInterval(countID);
clearInterval(giftcountID);
clearInterval(supercountID);
gotoAndPlay (4976);
score = score + scoreX;
ship.swapDepths(cursor);
}
};
doLose = function () {
delete ship.onEnterFrame;
delete bgscroller.onEnterFrame;
enemyLayer.removeMovieClip();
enemy2Layer.removeMovieClip();
enemy3Layer.removeMovieClip();
projectileLayer.removeMovieClip();
projectileLayer2.removeMovieClip();
giftLayer.removeMovieClip();
giftzLayer.removeMovieClip();
superLayer.removeMovieClip();
mineLayer.removeMovieClip();
startButton._visible = true;
gift_txt._visible = false;
rockets_txt._visible = false;
powerup_txt._visible = false;
clearInterval(countID);
clearInterval(giftcountID);
clearInterval(supercountID);
cursor._visible = true;
levelbackButton._visible = true;
scoreX = 0;
powerX = power;
music.stop();
};
superdoCounter = function () {
supercounter--;
gift_txt.text = supercounter;
gift_txt._visible = true;
powerup_txt._visible = true;
clearInterval(giftcountID);
if (supercounter < 0) {
superGift = false;
gift_txt._visible = false;
powerup_txt._visible = false;
timeX = time;
clearInterval(supercountID);
}
};
giftdoCounter = function () {
giftcounter--;
gift_txt.text = giftcounter;
gift_txt._visible = true;
powerup_txt._visible = true;
if (giftcounter < 0) {
giveGift4 = false;
giveGift3 = false;
giveGift2 = false;
giveGift = false;
gift_txt._visible = false;
powerup_txt._visible = false;
timeX = time;
clearInterval(giftcountID);
}
};
countID = setInterval(doCounter, 1000);
_root.createEmptyMovieClip("projectileLayer2", 100);
projectileCount2 = 0;
_root.createEmptyMovieClip("projectileLayer", 99);
projectileCount = 0;
_root.createEmptyMovieClip("enemyLayer", 98);
enemyCount = 0;
_root.createEmptyMovieClip("enemy2Layer", 97);
enemy2Count = 0;
_root.createEmptyMovieClip("enemy3Layer", 96);
enemy3Count = 0;
_root.createEmptyMovieClip("giftLayer", 95);
giftCount = 0;
_root.createEmptyMovieClip("giftzLayer", 94);
giftzCount = 0;
_root.createEmptyMovieClip("superLayer", 93);
superCount = 0;
_root.createEmptyMovieClip("mineLayer", 92);
mineCount = 0;
ship.swapDepths(101);
ship.gotoAndStop(1);
bgscroller.onEnterFrame = function () {
if (this._y >= 500) {
this._y = 0;
}
this._y = this._y + 5;
};
};
createProjectile = function (type, x, y, dx, dy) {
var _local4 = "proj" + projectileCount;
projectileLayer.attachMovie(type, _local4, projectileCount);
projectileLayer[_local4]._x = x;
projectileLayer[_local4]._y = y;
projectileLayer[_local4].dx = dx;
projectileLayer[_local4].dy = dy;
projectileLayer[_local4].onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
if (this._y < -190) {
this.removeMovieClip();
}
var _local2 = 0;
while (_local2 < 10) {
var _local3 = "mine" + _local2;
if ((this.hitTest(mineLayer[_local3]) && (mineLayer[_local3]._currentframe == 17)) && (giveGift3 == true)) {
mineLayer[_local3].gotoAndPlay(18);
this.removeMovieClip();
}
if ((this.hitTest(mineLayer[_local3]) && (mineLayer[_local3]._currentframe < 17)) && (giveGift3 == true)) {
mineLayer[_local3].gotoAndPlay(18);
this.removeMovieClip();
}
_local3 = "enemy" + _local2;
if (this.hitTest(enemyLayer[_local3]) && (enemyLayer[_local3]._currentframe == 1)) {
enemyLayer[_local3].play();
scoreX++;
score_txt.text = scoreX;
this.removeMovieClip();
}
_local3 = "enemy2" + _local2;
if ((this.hitTest(enemy2Layer[_local3]) && (enemy2Layer[_local3]._currentframe == 1)) && (enemy2Die == 0)) {
enemy2Die = 7;
enemy2Layer[_local3].play();
scoreX = scoreX + 3;
score_txt.text = scoreX;
this.removeMovieClip();
} else if (this.hitTest(enemy2Layer[_local3]) && (enemy2Layer[_local3]._currentframe == 1)) {
enemy2Die--;
this.removeMovieClip();
}
_local3 = "enemy3" + _local2;
if ((this.hitTest(enemy3Layer[_local3]) && (enemy3Layer[_local3]._currentframe == 1)) && (enemy3Die == 0)) {
enemy3Die = 7;
enemy3Layer[_local3].play();
scoreX = scoreX + 3;
score_txt.text = scoreX;
this.removeMovieClip();
} else if (this.hitTest(enemy3Layer[_local3]) && (enemy3Layer[_local3]._currentframe == 1)) {
enemy3Die--;
this.removeMovieClip();
}
_local2++;
}
};
projectileCount++;
projectileCount = projectileCount % 20;
};
createProjectile2 = function (type, x, y, dx, dy) {
var _local4 = "proj2" + projectileCount2;
projectileLayer2.attachMovie(type, _local4, projectileCount2);
projectileLayer2[_local4]._x = x;
projectileLayer2[_local4]._y = y;
projectileLayer2[_local4].dx = dx;
projectileLayer2[_local4].dy = dy;
projectileLayer2[_local4].onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
if (this._y < -80) {
this.removeMovieClip();
}
var _local2 = 0;
while (_local2 < 10) {
var _local3 = "mine" + _local2;
if (this.hitTest(mineLayer[_local3]) && (mineLayer[_local3]._currentframe < 18)) {
mineLayer[_local3].gotoAndPlay(18);
}
_local3 = "enemy" + _local2;
if (this.hitTest(enemyLayer[_local3]) && (enemyLayer[_local3]._currentframe == 1)) {
enemyLayer[_local3].play();
scoreX++;
score_txt.text = scoreX;
}
_local3 = "enemy2" + _local2;
if (this.hitTest(enemy2Layer[_local3]) && (enemy2Layer[_local3]._currentframe == 1)) {
enemy2Die = 7;
enemy2Layer[_local3].play();
scoreX = scoreX + 6;
score_txt.text = scoreX;
}
_local3 = "enemy3" + _local2;
if (this.hitTest(enemy3Layer[_local3]) && (enemy3Layer[_local3]._currentframe == 1)) {
enemy3Die = 7;
enemy3Layer[_local3].play();
scoreX = scoreX + 6;
score_txt.text = scoreX;
}
_local2++;
}
};
projectileCount2++;
projectileCount2 = projectileCount2 % 10;
};
createenemy = function (type, x, y) {
var _local2 = "enemy" + enemyCount;
enemyLayer.attachMovie(type, _local2, enemyCount);
enemyLayer[_local2]._x = x;
enemyLayer[_local2].xline = x;
enemyLayer[_local2]._y = y;
enemyLayer[_local2].dy = (Math.random() * 5) + 7;
enemyLayer[_local2].t = Math.random() * 6.28;
enemyLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.1;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if (this._y > 560) {
this.removeMovieClip();
}
};
enemyCount++;
enemyCount = enemyCount % 10;
};
createenemy2 = function (type, x, y) {
var _local2 = "enemy2" + enemy2Count;
enemy2Layer.attachMovie(type, _local2, enemy2Count);
enemy2Layer[_local2]._x = x;
enemy2Layer[_local2].xline = x;
enemy2Layer[_local2]._y = y;
enemy2Layer[_local2].dy = (Math.random() * 4) + 4;
enemy2Layer[_local2].t = Math.random() * 6.28;
enemy2Layer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.05;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if ((this._y > 560) && (enemy2Die < 7)) {
this.removeMovieClip();
enemy2Die = 7;
} else if (this._y > 560) {
this.removeMovieClip();
}
};
enemy2Count++;
enemy2Count = enemy2Count % 10;
};
createenemy3 = function (type, x, y) {
var _local2 = "enemy3" + enemy3Count;
enemy3Layer.attachMovie(type, _local2, enemy3Count);
enemy3Layer[_local2]._x = x;
enemy3Layer[_local2].xline = x;
enemy3Layer[_local2]._y = y;
enemy3Layer[_local2].dy = (Math.random() * 4) + 4;
enemy3Layer[_local2].t = Math.random() * 6.38;
enemy3Layer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.05;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if ((this._y > 560) && (enemy3Die < 7)) {
this.removeMovieClip();
enemy3Die = 7;
} else if (this._y > 560) {
this.removeMovieClip();
}
};
enemy3Count++;
enemy3Count = enemy3Count % 10;
};
creategift = function (type, x, y) {
var _local2 = "gift" + giftCount;
giftLayer.attachMovie(type, _local2, giftCount);
giftLayer[_local2]._x = x;
giftLayer[_local2].xline = x;
giftLayer[_local2]._y = y;
giftLayer[_local2].dy = (Math.random() * 16) + 12;
giftLayer[_local2].t = Math.random() * 7.28;
giftLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.1;
if (((superGift == true) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
this.removeMovieClip();
} else if (((((giveGift == true) && (giveGift2 == true)) && (giveGift3 == true)) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift4 = true;
this.removeMovieClip();
} else if ((((giveGift == true) && (giveGift2 == true)) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift3 = true;
this.removeMovieClip();
} else if (((giveGift == true) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift2 = true;
this.removeMovieClip();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift = true;
this.removeMovieClip();
giftcounter = timeX;
giftcountID = setInterval(giftdoCounter, 1000);
}
if (this._y > 500) {
this.removeMovieClip();
}
};
giftCount++;
giftCount = giftCount % 10;
};
creategiftz = function (type, x, y) {
var _local2 = "giftz" + giftzCount;
giftzLayer.attachMovie(type, _local2, giftzCount);
giftzLayer[_local2]._x = x;
giftzLayer[_local2].xline = x;
giftzLayer[_local2]._y = y;
giftzLayer[_local2].dy = (Math.random() * 16) + 6;
giftzLayer[_local2].t = Math.random() * 7.28;
giftzLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.2;
if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
scoreX = scoreX + 5;
score_txt.text = scoreX;
this.removeMovieClip();
}
if (this._y > 500) {
this.removeMovieClip();
}
};
giftzCount++;
giftzCount = giftzCount % 10;
};
createsuper = function (type, x, y) {
var _local2 = "supergift" + superCount;
superLayer.attachMovie(type, _local2, superCount);
superLayer[_local2]._x = x;
superLayer[_local2].xline = x;
superLayer[_local2]._y = y;
superLayer[_local2].dy = (Math.random() * 16) + 10;
superLayer[_local2].t = Math.random() * 7.28;
superLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.2;
if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
superGift = true;
giveGift = false;
giveGift2 = false;
giveGift3 = false;
supercounter = (timeX = timeX - 8);
supercountID = setInterval(superdoCounter, 1000);
this.removeMovieClip();
scoreX = scoreX + 5;
}
if (this._y > 500) {
this.removeMovieClip();
}
};
superCount++;
superCount = superCount % 10;
};
createmine = function (type, x, y) {
var _local2 = "mine" + mineCount;
mineLayer.attachMovie(type, _local2, mineCount);
mineLayer[_local2]._x = x;
mineLayer[_local2].xline = x;
mineLayer[_local2]._y = y;
mineLayer[_local2].dy = 5;
mineLayer[_local2].onEnterFrame = function () {
this._y = this._y + this.dy;
if (((this._currentframe == 17) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 17) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if (this._y > 510) {
this.removeMovieClip();
}
};
mineCount++;
mineCount = mineCount % 10;
};
startButton.onRelease = function () {
setup();
this._visible = false;
ifpower._visible = true;
scoreX = scoreX - score_txt.text;
music = new Sound();
music.attachSound("phony");
music.start(0, 99);
};
Frame 5159
stopAllSounds();
if (boss == false) {
gotoAndPlay (574);
cursor._visible = true;
} else if (bosscount > 2) {
gotoAndPlay (574);
cursor._visible = true;
}
ship.removeMovieClip();
Instance of Symbol 466 MovieClip "cursor" in Frame 5160
onClipEvent (enterFrame) {
startDrag (this, true);
}
Frame 5177
stopAllSounds();
Frame 5192
stop();
Frame 5256
stopAllSounds();
gift_txt._visible = false;
levelbackButton._visible = true;
scoreX = 0;
score_txt.text = scoreX;
life_txt.text = life;
if (color == "red") {
shipred._visible = true;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipred;
} else if (color == "green") {
shipred._visible = false;
shipgreen._visible = true;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipgreen;
} else if (color == "white") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = true;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipwhite;
} else if (color == "blue") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = true;
shipbrown._visible = false;
ship = shipblue;
} else if (color == "brown") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = true;
ship = shipbrown;
}
Frame 5284
stop();
setup = function () {
firing = false;
rockets_txt.text = rockets;
score_txt.text = scoreX;
timeX = time;
powerX = power;
enemyTime = 0;
enemyRate = 40;
enemy2Time = 0;
enemy2Rate = 110;
shootTime = 1;
shootRate = 35;
counter = 0;
counter_txt.text = counter;
enemy2Die = 7;
cursor._visible = false;
levelbackButton._visible = false;
if (easy == false) {
bossDie = 50;
} else if (easy == true) {
bossDie = 40;
}
boss_ship.dx = 4;
boss_ship.onEnterFrame = function () {
this._x = this._x + this.dx;
if ((this._x + (this._width / 2)) > 450) {
this._x = 450 - (this._width / 2);
this.dx = this.dx + -7;
}
if ((this._x - (this._width / 2)) < -50) {
this._x = -50 + (this._width / 2);
this.dx = this.dx - -7;
}
};
repeatTime2 = 0;
ship.onMouseDown = function () {
firing = true;
repeatTime = 0;
};
ship.onMouseUp = function () {
firing = false;
};
ship.onEnterFrame = function () {
this.destx = _xmouse;
this.desty = _ymouse;
var _local4 = this.destx - this._x;
var _local3 = this.desty - this._y;
if (this._x > 400) {
this._x = 350;
}
if (this._x < 0) {
this._x = 50;
}
if (this._y > 500) {
this._y = 450;
}
if (this._y < 0) {
this._y = 50;
}
if (engine == true) {
this._x = this._x + (_local4 * 0.5);
this._y = this._y + (_local3 * 0.5);
} else if (engine == false) {
this._x = this._x + (_local4 * 0.15);
this._y = this._y + (_local3 * 0.15);
}
var _local2 = new Object();
_local2.onKeyDown = function () {
if ((Key.isDown(32) && (powerX > 0)) && (scoreX > 9)) {
createProjectile2("power", ship._x, ship._y - 5, 0, -30);
powerX--;
scoreX = scoreX - 10;
score_txt.text = scoreX;
if (powerX == 0) {
ifpower._visible = false;
}
}
if (Key.isDown(40)) {
rocket = true;
rockets_txt._visible = true;
}
if (Key.isDown(38)) {
rocket = false;
rockets_txt._visible = false;
}
};
Key.addListener(_local2);
if ((((firing && (repeatTime == 0)) && (rocket == true)) && (superGift == true)) && (rockets > 0)) {
createProjectile2("rocket2", this._x, this._y - 5, 0, -8);
fireRate = 30;
rockets--;
rockets_txt.text = rockets;
} else if (((firing && (repeatTime == 0)) && (rocket == true)) && (rockets > 0)) {
createProjectile2("rocket", this._x, this._y - 5, 0, -7);
fireRate = 30;
rockets--;
rockets_txt.text = rockets;
} else if (firing && (repeatTime == 0)) {
createProjectile("bullet", this._x, this._y - 5, 0, -speed);
fireRate = 9;
}
repeatTime++;
repeatTime = repeatTime % fireRate;
if (repeatTime2 == 0) {
createshoot("shoot3", boss_ship._x, boss_ship._y + 5, 0, -15);
fireRate2 = 12;
}
repeatTime2++;
repeatTime2 = repeatTime2 % fireRate2;
if (enemyTime == 0) {
var _local5 = (Math.random() * 100) + 80;
createenemy("6", _local5, -30);
if ((enemyTime == 0) && (counter > 2)) {
_local5 = (Math.random() * 100) + 80;
createenemy("6", 400 - _local5, -90);
}
if ((enemyTime == 0) && (counter > 2)) {
_local5 = (Math.random() * 100) + 80;
createenemy("6", _local5, -70);
}
}
enemyTime++;
enemyTime = enemyTime % enemyRate;
if ((enemy2Time == 0) && (counter > 6)) {
var _local5 = (Math.random() * 100) + 200;
createenemy2("7", _local5, -30);
}
enemy2Time++;
enemy2Time = enemy2Time % enemy2Rate;
flash_anm.play();
};
doCounter = function () {
counter++;
counter_txt.text = counter;
if (bossDie == 0) {
level++;
bosscount++;
enemyLayer.removeMovieClip();
enemy2Layer.removeMovieClip();
projectileLayer.removeMovieClip();
projectileLayer2.removeMovieClip();
rockets_txt._visible = false;
shootLayer.removeMovieClip();
clearInterval(countID);
gotoAndPlay (5285);
scoreX = scoreX + 400;
score_txt.text = scoreX;
score = score + scoreX;
boss_ship.removeMovieClip();
ship.removeMovieClip();
music.stop();
}
};
doLose = function () {
flash_anm.stop();
flash_anm.gotoAndPlay(1);
delete ship.onEnterFrame;
delete bgscroller.onEnterFrame;
enemyLayer.removeMovieClip();
enemy2Layer.removeMovieClip();
projectileLayer.removeMovieClip();
projectileLayer2.removeMovieClip();
startButton._visible = true;
shootLayer.removeMovieClip();
rockets_txt._visible = false;
clearInterval(countID);
cursor._visible = true;
levelbackButton._visible = true;
scoreX = 0;
powerX = power;
music.stop();
};
countID = setInterval(doCounter, 1000);
_root.createEmptyMovieClip("projectileLayer2", 99);
projectileCount2 = 0;
_root.createEmptyMovieClip("projectileLayer", 98);
projectileCount = 0;
_root.createEmptyMovieClip("enemyLayer", 97);
enemyCount = 0;
_root.createEmptyMovieClip("enemy2Layer", 96);
enemy2Count = 0;
_root.createEmptyMovieClip("shootLayer", 95);
shootCount = 0;
boss_ship.swapDepths(101);
ship.swapDepths(100);
ship.gotoAndStop(1);
bgscroller.onEnterFrame = function () {
if (this._y >= 500) {
this._y = 0;
}
this._y = this._y + 3;
};
};
createProjectile = function (type, x, y, dx, dy) {
var _local4 = "proj" + projectileCount;
projectileLayer.attachMovie(type, _local4, projectileCount);
projectileLayer[_local4]._x = x;
projectileLayer[_local4]._y = y;
projectileLayer[_local4].dx = dx;
projectileLayer[_local4].dy = dy;
projectileLayer[_local4].onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
if (this._y < -190) {
this.removeMovieClip();
}
var _local3 = 0;
while (_local3 < 10) {
if ((this.hitTest(boss_ship) && (boss_ship._currentframe == 1)) && (bossDie == 0)) {
doCounter();
scoreX = scoreX + 200;
score_txt.text = scoreX;
this.removeMovieClip();
} else if (this.hitTest(boss_ship) && (boss_ship._currentframe == 1)) {
bossDie--;
this.removeMovieClip();
mySoundObject = new Sound();
mySoundObject.attachSound("laserhit");
mySoundObject.start(0, 1);
}
var _local2 = "enemy" + _local3;
if (this.hitTest(enemyLayer[_local2]) && (enemyLayer[_local2]._currentframe == 1)) {
enemyLayer[_local2].play();
scoreX++;
score_txt.text = scoreX;
this.removeMovieClip();
}
_local2 = "enemy2" + _local3;
if ((this.hitTest(enemy2Layer[_local2]) && (enemy2Layer[_local2]._currentframe == 1)) && (enemy2Die == 0)) {
enemy2Die = 7;
enemy2Layer[_local2].play();
scoreX = scoreX + 6;
score_txt.text = scoreX;
this.removeMovieClip();
} else if (this.hitTest(enemy2Layer[_local2]) && (enemy2Layer[_local2]._currentframe == 1)) {
enemy2Die--;
this.removeMovieClip();
}
_local3++;
}
};
projectileCount++;
projectileCount = projectileCount % 20;
};
createProjectile2 = function (type, x, y, dx, dy) {
var _local4 = "proj2" + projectileCount2;
projectileLayer2.attachMovie(type, _local4, projectileCount2);
projectileLayer2[_local4]._x = x;
projectileLayer2[_local4]._y = y;
projectileLayer2[_local4].dx = dx;
projectileLayer2[_local4].dy = dy;
projectileLayer2[_local4].onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
if (this._y < -80) {
this.removeMovieClip();
}
var _local2 = 0;
while (_local2 < 10) {
var _local3 = "enemy" + _local2;
if (this.hitTest(enemyLayer[_local3]) && (enemyLayer[_local3]._currentframe == 1)) {
enemyLayer[_local3].play();
scoreX++;
score_txt.text = scoreX;
}
_local3 = "enemy2" + _local2;
if (this.hitTest(enemy2Layer[_local3]) && (enemy2Layer[_local3]._currentframe == 1)) {
enemy2Die = 7;
enemy2Layer[_local3].play();
scoreX = scoreX + 6;
score_txt.text = scoreX;
}
_local2++;
}
};
projectileCount2++;
projectileCount2 = projectileCount2 % 10;
};
createshoot = function (type, x, y) {
var _local2 = "shoot" + shootCount;
shootLayer.attachMovie(type, _local2, shootCount);
shootLayer[_local2]._x = x;
shootLayer[_local2].xline = x;
shootLayer[_local2]._y = y;
shootLayer[_local2].dy = 15;
shootLayer[_local2].onEnterFrame = function () {
this._y = this._y + this.dy;
if (((this._currentframe > 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe > 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
};
shootCount++;
shootCount = shootCount % 10;
};
createenemy = function (type, x, y) {
var _local2 = "enemy" + enemyCount;
enemyLayer.attachMovie(type, _local2, enemyCount);
enemyLayer[_local2]._x = x;
enemyLayer[_local2].xline = x;
enemyLayer[_local2]._y = y;
enemyLayer[_local2].dy = (Math.random() * 5) + 7;
enemyLayer[_local2].t = Math.random() * 6.28;
enemyLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.1;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if (this._y > 560) {
this.removeMovieClip();
}
};
enemyCount++;
enemyCount = enemyCount % 10;
};
createenemy2 = function (type, x, y) {
var _local2 = "enemy2" + enemy2Count;
enemy2Layer.attachMovie(type, _local2, enemy2Count);
enemy2Layer[_local2]._x = x;
enemy2Layer[_local2].xline = x;
enemy2Layer[_local2]._y = y;
enemy2Layer[_local2].dy = (Math.random() * 4) + 4;
enemy2Layer[_local2].t = Math.random() * 6.28;
enemy2Layer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.05;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if ((this._y > 560) && (enemy2Die < 7)) {
this.removeMovieClip();
enemy2Die = 7;
} else if (this._y > 560) {
this.removeMovieClip();
}
};
enemy2Count++;
enemy2Count = enemy2Count % 10;
};
startButton.onRelease = function () {
setup();
this._visible = false;
ifpower._visible = true;
scoreX = scoreX - score_txt.text;
music = new Sound();
music.attachSound("ice");
music.start(0, 99);
};
Frame 5452
stopAllSounds();
cursor._visible = true;
Frame 5488
stop();
Frame 5551
stop();
Frame 5552
if (level > 8) {
gotoAndPlay (5793);
}
Instance of Symbol 466 MovieClip "cursor" in Frame 5552
onClipEvent (enterFrame) {
startDrag (this, true);
}
Frame 5572
stopAllSounds();
Frame 5617
stop();
Frame 5691
stop();
Frame 5792
gotoAndPlay (5828);
Frame 5828
stopAllSounds();
gift_txt._visible = false;
levelbackButton._visible = true;
scoreX = 0;
score_txt.text = scoreX;
life_txt.text = life;
if (color == "red") {
shipred._visible = true;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipred;
} else if (color == "green") {
shipred._visible = false;
shipgreen._visible = true;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipgreen;
} else if (color == "white") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = true;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipwhite;
} else if (color == "blue") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = true;
shipbrown._visible = false;
ship = shipblue;
} else if (color == "brown") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = true;
ship = shipbrown;
}
Instance of Symbol 466 MovieClip "cursor" in Frame 5828
onClipEvent (enterFrame) {
startDrag (this, true);
}
Frame 5856
stop();
setup = function () {
firing = false;
rockets_txt.text = rockets;
score_txt.text = scoreX;
timeX = time;
powerX = power;
enemyTime = 0;
enemyRate = 35;
enemy2Time = 0;
enemy2Rate = 100;
enemy3Time = 0;
enemy3Rate = 130;
enemy4Time = 0;
enemy4Rate = 190;
mineTime = 0;
mineRate = 80;
giftTime = 0;
giftRate = 250;
giftzTime = 0;
giftzRate = 160;
superTime = 0;
superRate = 850;
gift_txt.text = 0;
giveGift = false;
giveGift2 = false;
giveGift3 = false;
giveGift4 = false;
giftz = false;
superGift = false;
rocket = false;
rockets_txt._visible = false;
counter = 0;
counter_txt.text = counter;
giftcounter = 0;
supercounter = 0;
enemy2Die = 3;
enemy3Die = 3;
enemy4Die = 10;
cursor._visible = false;
levelbackButton._visible = false;
ship.onMouseDown = function () {
firing = true;
repeatTime = 0;
};
ship.onMouseUp = function () {
firing = false;
};
ship.onEnterFrame = function () {
this.destx = _xmouse;
this.desty = _ymouse;
var _local4 = this.destx - this._x;
var _local3 = this.desty - this._y;
if (this._x > 400) {
this._x = 350;
}
if (this._x < 0) {
this._x = 50;
}
if (this._y > 500) {
this._y = 450;
}
if (this._y < 0) {
this._y = 50;
}
if (engine == true) {
this._x = this._x + (_local4 * 0.5);
this._y = this._y + (_local3 * 0.5);
} else if (engine == false) {
this._x = this._x + (_local4 * 0.15);
this._y = this._y + (_local3 * 0.15);
}
var _local2 = new Object();
_local2.onKeyDown = function () {
if ((Key.isDown(32) && (powerX > 0)) && (scoreX > 9)) {
createProjectile2("power", ship._x, ship._y - 5, 0, -30);
powerX--;
scoreX = scoreX - 10;
score_txt.text = scoreX;
if (powerX == 0) {
ifpower._visible = false;
}
}
if (Key.isDown(40)) {
rocket = true;
rockets_txt._visible = true;
}
if (Key.isDown(38)) {
rocket = false;
rockets_txt._visible = false;
}
};
Key.addListener(_local2);
if ((((firing && (repeatTime == 0)) && (rocket == true)) && (superGift == true)) && (rockets > 0)) {
createProjectile2("rocket2", this._x, this._y - 5, 0, -8);
fireRate = 30;
rockets--;
rockets_txt.text = rockets;
} else if (((firing && (repeatTime == 0)) && (rocket == true)) && (rockets > 0)) {
createProjectile2("rocket", this._x, this._y - 5, 0, -7);
fireRate = 30;
rockets--;
rockets_txt.text = rockets;
} else if ((firing && (repeatTime == 0)) && (superGift == true)) {
createProjectile("bullet2", this._x, this._y - 5, 0, -10);
createProjectile("bullet2", this._x, this._y - 5, -3, -10);
createProjectile("bullet2", this._x, this._y - 5, 3, -10);
fireRate = 6;
powerup_txt.text = "Power!!";
powerup_txt._visible = true;
} else if (((((firing && (repeatTime == 0)) && (giveGift == true)) && (giveGift2 == true)) && (giveGift3 == true)) && (giveGift4 == true)) {
createProjectile("supercannon", this._x, this._y - 5, 0, -60);
fireRate = 3;
powerup_txt.text = "Power up 4";
} else if ((((firing && (repeatTime == 0)) && (giveGift == true)) && (giveGift2 == true)) && (giveGift3 == true)) {
createProjectile("laser", this._x, this._y - 5, 0, -95);
fireRate = 2;
powerup_txt.text = "Power up 3";
} else if (((firing && (repeatTime == 0)) && (giveGift == true)) && (giveGift2 == true)) {
createProjectile("super2", this._x, this._y - 5, 0, -45);
fireRate = 5;
powerup_txt.text = "Power up 2";
} else if ((firing && (repeatTime == 0)) && (giveGift == true)) {
createProjectile("super", this._x, this._y - 5, 0, -35);
fireRate = 7;
powerup_txt.text = "Power up 1";
powerup_txt._visible = true;
} else if (firing && (repeatTime == 0)) {
createProjectile("bullet", this._x, this._y - 5, 0, -speed);
fireRate = 9;
}
repeatTime++;
repeatTime = repeatTime % fireRate;
if ((enemyTime == 0) && (counter < 167)) {
var _local5 = (Math.random() * 100) + 80;
createenemy("3", _local5, -30);
if (((enemyTime == 0) && (counter > 2)) && (counter < 167)) {
_local5 = (Math.random() * 100) + 80;
createenemy("3", 400 - _local5, -50);
}
if (((enemyTime == 0) && (counter > 20)) && (counter < 167)) {
_local5 = (Math.random() * 100) + 80;
createenemy("3", 200, -70);
}
if (((enemyTime == 0) && (counter > 30)) && (counter < 167)) {
_local5 = (Math.random() * 100) + 80;
createenemy("5", 200, -40);
}
if (((enemyTime == 0) && (counter > 60)) && (counter < 167)) {
_local5 = (Math.random() * 100) + 80;
createenemy("3", _local5 - _local5, -90);
}
if ((((easy == false) && (enemyTime == 0)) && (counter > 110)) && (counter < 167)) {
_local5 = (Math.random() * 100) + 80;
createenemy("5", 400 - _local5, -60);
}
}
enemyTime++;
enemyTime = enemyTime % enemyRate;
if (((enemy2Time == 0) && (counter > 10)) && (counter < 167)) {
var _local5 = (Math.random() * 100) + 80;
createenemy2("4", 300, -30);
}
enemy2Time++;
enemy2Time = enemy2Time % enemy2Rate;
if (((enemy3Time == 0) && (counter > 50)) && (counter < 167)) {
var _local5 = (Math.random() * 100) + 80;
createenemy3("4", _local5, -30);
}
enemy3Time++;
enemy3Time = enemy3Time % enemy3Rate;
if (((enemy4Time == 0) && (counter > 80)) && (counter < 167)) {
var _local5 = (Math.random() * 100) + 80;
createenemy4("11", 300 - _local5, -50);
}
enemy4Time++;
enemy4Time = enemy4Time % enemy4Rate;
if ((mineTime == 0) && (counter < 167)) {
var _local5 = (Math.random() * 100) + 80;
createmine("mine2", Math.floor(Math.random() * 380) + 10, Math.floor(Math.random() * 330) + 30);
}
if ((((easy == false) && (mineTime == 0)) && (counter > 5)) && (counter < 167)) {
var _local5 = (Math.random() * 100) + 300;
createmine("mine2", Math.floor(Math.random() * 380) + 10, Math.floor(Math.random() * 190) + 20);
}
if ((((easy == false) && (mineTime == 0)) && (counter > 30)) && (counter < 167)) {
var _local5 = (Math.random() * 100) + 300;
createmine("mine2", Math.floor(Math.random() * 380) + 10, -80);
}
if (((mineTime == 0) && (counter > 40)) && (counter < 167)) {
var _local5 = (Math.random() * 100) + 300;
createmine("mine2", Math.floor(Math.random() * 380) + 10, -80);
}
if (((mineTime == 0) && (counter > 120)) && (counter < 167)) {
var _local5 = (Math.random() * 100) + 300;
createmine("mine2", Math.floor(Math.random() * 380) + 10, -80);
}
mineTime++;
mineTime = mineTime % mineRate;
if (((giftTime == 0) && (counter > 10)) && (counter < 167)) {
var _local5 = (Math.random() * 100) + 80;
creategift("gift_mc", 200, -30);
}
giftTime++;
giftTime = giftTime % giftRate;
if (giftzTime == 0) {
var _local5 = (Math.random() * 100) + 80;
creategiftz("giftz_mc", 200, -30);
}
giftzTime++;
giftzTime = giftzTime % giftzRate;
if (((superTime == 0) && (counter > 20)) && (counter < 160)) {
var _local5 = (Math.random() * 100) + 80;
createsuper("supergift_mc", 200, -30);
}
superTime++;
superTime = superTime % superRate;
};
doCounter = function () {
counter++;
counter_txt.text = counter;
if (counter == 170) {
enemyLayer.removeMovieClip();
enemy2Layer.removeMovieClip();
enemy3Layer.removeMovieClip();
enemy4Layer.removeMovieClip();
projectileLayer.removeMovieClip();
projectileLayer2.removeMovieClip();
giftLayer.removeMovieClip();
giftzLayer.removeMovieClip();
superLayer.removeMovieClip();
mineLayer.removeMovieClip();
gift_txt._visible = false;
rockets_txt._visible = false;
powerup_txt._visible = false;
clearInterval(countID);
clearInterval(giftcountID);
clearInterval(supercountID);
gotoAndPlay (5857);
score = score + scoreX;
ship.swapDepths(cursor);
}
};
doLose = function () {
delete ship.onEnterFrame;
delete bgscroller.onEnterFrame;
enemyLayer.removeMovieClip();
enemy2Layer.removeMovieClip();
enemy3Layer.removeMovieClip();
enemy4Layer.removeMovieClip();
projectileLayer.removeMovieClip();
projectileLayer2.removeMovieClip();
giftLayer.removeMovieClip();
giftzLayer.removeMovieClip();
superLayer.removeMovieClip();
mineLayer.removeMovieClip();
startButton._visible = true;
gift_txt._visible = false;
rockets_txt._visible = false;
powerup_txt._visible = false;
clearInterval(countID);
clearInterval(giftcountID);
clearInterval(supercountID);
cursor._visible = true;
levelbackButton._visible = true;
scoreX = 0;
powerX = power;
music.stop();
};
superdoCounter = function () {
supercounter--;
gift_txt.text = supercounter;
gift_txt._visible = true;
powerup_txt._visible = true;
clearInterval(giftcountID);
if (supercounter < 0) {
superGift = false;
gift_txt._visible = false;
powerup_txt._visible = false;
timeX = time;
clearInterval(supercountID);
}
};
giftdoCounter = function () {
giftcounter--;
gift_txt.text = giftcounter;
gift_txt._visible = true;
powerup_txt._visible = true;
if (giftcounter < 0) {
giveGift4 = false;
giveGift3 = false;
giveGift2 = false;
giveGift = false;
gift_txt._visible = false;
powerup_txt._visible = false;
timeX = time;
clearInterval(giftcountID);
}
};
countID = setInterval(doCounter, 1000);
_root.createEmptyMovieClip("projectileLayer2", 100);
projectileCount2 = 0;
_root.createEmptyMovieClip("projectileLayer", 99);
projectileCount = 0;
_root.createEmptyMovieClip("enemyLayer", 98);
enemyCount = 0;
_root.createEmptyMovieClip("enemy2Layer", 97);
enemy2Count = 0;
_root.createEmptyMovieClip("enemy3Layer", 96);
enemy3Count = 0;
_root.createEmptyMovieClip("enemy4Layer", 95);
enemy4Count = 0;
_root.createEmptyMovieClip("giftLayer", 94);
giftCount = 0;
_root.createEmptyMovieClip("giftzLayer", 93);
giftzCount = 0;
_root.createEmptyMovieClip("superLayer", 92);
superCount = 0;
_root.createEmptyMovieClip("mineLayer", 91);
mineCount = 0;
ship.swapDepths(101);
ship.gotoAndStop(1);
bgscroller.onEnterFrame = function () {
if (this._y >= 500) {
this._y = 0;
}
this._y = this._y + 5;
};
};
createProjectile = function (type, x, y, dx, dy) {
var _local4 = "proj" + projectileCount;
projectileLayer.attachMovie(type, _local4, projectileCount);
projectileLayer[_local4]._x = x;
projectileLayer[_local4]._y = y;
projectileLayer[_local4].dx = dx;
projectileLayer[_local4].dy = dy;
projectileLayer[_local4].onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
if (this._y < -190) {
this.removeMovieClip();
}
var _local2 = 0;
while (_local2 < 20) {
var _local3 = "mine" + _local2;
if ((this.hitTest(mineLayer[_local3]) && (mineLayer[_local3]._currentframe == 17)) && (giveGift3 == true)) {
mineLayer[_local3].gotoAndPlay(18);
this.removeMovieClip();
}
if ((this.hitTest(mineLayer[_local3]) && (mineLayer[_local3]._currentframe < 17)) && (giveGift3 == true)) {
mineLayer[_local3].gotoAndPlay(18);
this.removeMovieClip();
}
_local3 = "enemy" + _local2;
if (this.hitTest(enemyLayer[_local3]) && (enemyLayer[_local3]._currentframe == 1)) {
enemyLayer[_local3].play();
scoreX++;
score_txt.text = scoreX;
this.removeMovieClip();
}
_local3 = "enemy2" + _local2;
if ((this.hitTest(enemy2Layer[_local3]) && (enemy2Layer[_local3]._currentframe == 1)) && (enemy2Die == 0)) {
enemy2Die = 3;
enemy2Layer[_local3].play();
scoreX = scoreX + 3;
score_txt.text = scoreX;
this.removeMovieClip();
} else if (this.hitTest(enemy2Layer[_local3]) && (enemy2Layer[_local3]._currentframe == 1)) {
enemy2Die--;
this.removeMovieClip();
}
_local3 = "enemy3" + _local2;
if ((this.hitTest(enemy3Layer[_local3]) && (enemy3Layer[_local3]._currentframe == 1)) && (enemy3Die == 0)) {
enemy3Die = 3;
enemy3Layer[_local3].play();
scoreX = scoreX + 3;
score_txt.text = scoreX;
this.removeMovieClip();
} else if (this.hitTest(enemy3Layer[_local3]) && (enemy3Layer[_local3]._currentframe == 1)) {
enemy3Die--;
this.removeMovieClip();
}
_local3 = "enemy4" + _local2;
if ((this.hitTest(enemy4Layer[_local3]) && (enemy4Layer[_local3]._currentframe == 1)) && (enemy4Die == 0)) {
enemy4Die = 10;
enemy4Layer[_local3].play();
scoreX = scoreX + 10;
score_txt.text = scoreX;
this.removeMovieClip();
} else if (this.hitTest(enemy4Layer[_local3]) && (enemy4Layer[_local3]._currentframe == 1)) {
enemy4Die--;
this.removeMovieClip();
}
_local2++;
}
};
projectileCount++;
projectileCount = projectileCount % 20;
};
createProjectile2 = function (type, x, y, dx, dy) {
var _local4 = "proj2" + projectileCount2;
projectileLayer2.attachMovie(type, _local4, projectileCount2);
projectileLayer2[_local4]._x = x;
projectileLayer2[_local4]._y = y;
projectileLayer2[_local4].dx = dx;
projectileLayer2[_local4].dy = dy;
projectileLayer2[_local4].onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
if (this._y < -80) {
this.removeMovieClip();
}
var _local2 = 0;
while (_local2 < 20) {
var _local3 = "mine" + _local2;
if (this.hitTest(mineLayer[_local3]) && (mineLayer[_local3]._currentframe < 18)) {
mineLayer[_local3].gotoAndPlay(18);
}
_local3 = "enemy" + _local2;
if (this.hitTest(enemyLayer[_local3]) && (enemyLayer[_local3]._currentframe == 1)) {
enemyLayer[_local3].play();
scoreX++;
score_txt.text = scoreX;
}
_local3 = "enemy2" + _local2;
if (this.hitTest(enemy2Layer[_local3]) && (enemy2Layer[_local3]._currentframe == 1)) {
enemy2Die = 3;
enemy2Layer[_local3].play();
scoreX = scoreX + 3;
score_txt.text = scoreX;
}
_local3 = "enemy3" + _local2;
if (this.hitTest(enemy3Layer[_local3]) && (enemy3Layer[_local3]._currentframe == 1)) {
enemy3Die = 3;
enemy3Layer[_local3].play();
scoreX = scoreX + 3;
score_txt.text = scoreX;
}
_local3 = "enemy4" + _local2;
if (this.hitTest(enemy4Layer[_local3]) && (enemy4Layer[_local3]._currentframe == 1)) {
enemy4Die = 10;
enemy4Layer[_local3].play();
scoreX = scoreX + 10;
score_txt.text = scoreX;
}
_local2++;
}
};
projectileCount2++;
projectileCount2 = projectileCount2 % 10;
};
createenemy = function (type, x, y) {
var _local2 = "enemy" + enemyCount;
enemyLayer.attachMovie(type, _local2, enemyCount);
enemyLayer[_local2]._x = x;
enemyLayer[_local2].xline = x;
enemyLayer[_local2]._y = y;
enemyLayer[_local2].dy = (Math.random() * 8) + 6;
enemyLayer[_local2].t = Math.random() * 6.28;
enemyLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.08;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if (this._y > 560) {
this.removeMovieClip();
}
};
enemyCount++;
enemyCount = enemyCount % 20;
};
createenemy2 = function (type, x, y) {
var _local2 = "enemy2" + enemy2Count;
enemy2Layer.attachMovie(type, _local2, enemy2Count);
enemy2Layer[_local2]._x = x;
enemy2Layer[_local2].xline = x;
enemy2Layer[_local2]._y = y;
enemy2Layer[_local2].dy = (Math.random() * 8) + 6;
enemy2Layer[_local2].t = Math.random() * 6.28;
enemy2Layer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.07;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if ((this._y > 560) && (enemy2Die < 3)) {
this.removeMovieClip();
enemy2Die = 3;
} else if (this._y > 560) {
this.removeMovieClip();
}
};
enemy2Count++;
enemy2Count = enemy2Count % 10;
};
createenemy3 = function (type, x, y) {
var _local2 = "enemy3" + enemy3Count;
enemy3Layer.attachMovie(type, _local2, enemy3Count);
enemy3Layer[_local2]._x = x;
enemy3Layer[_local2].xline = x;
enemy3Layer[_local2]._y = y;
enemy3Layer[_local2].dy = (Math.random() * 8) + 6;
enemy3Layer[_local2].t = Math.random() * 6.38;
enemy3Layer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.05;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if ((this._y > 560) && (enemy3Die < 3)) {
this.removeMovieClip();
enemy3Die = 3;
} else if (this._y > 560) {
this.removeMovieClip();
}
};
enemy3Count++;
enemy3Count = enemy3Count % 10;
};
createenemy4 = function (type, x, y) {
var _local2 = "enemy4" + enemy4Count;
enemy4Layer.attachMovie(type, _local2, enemy4Count);
enemy4Layer[_local2]._x = x;
enemy4Layer[_local2].xline = x;
enemy4Layer[_local2]._y = y;
enemy4Layer[_local2].dy = (Math.random() * 3) + 5;
enemy4Layer[_local2].t = Math.random() * 6.48;
enemy4Layer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.04;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if ((this._y > 600) && (enemy4Die < 10)) {
this.removeMovieClip();
enemy4Die = 10;
} else if (this._y > 600) {
this.removeMovieClip();
}
};
enemy4Count++;
enemy4Count = enemy4Count % 10;
};
creategift = function (type, x, y) {
var _local2 = "gift" + giftCount;
giftLayer.attachMovie(type, _local2, giftCount);
giftLayer[_local2]._x = x;
giftLayer[_local2].xline = x;
giftLayer[_local2]._y = y;
giftLayer[_local2].dy = (Math.random() * 16) + 12;
giftLayer[_local2].t = Math.random() * 7.28;
giftLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.1;
if (((superGift == true) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
this.removeMovieClip();
} else if (((((giveGift == true) && (giveGift2 == true)) && (giveGift3 == true)) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift4 = true;
this.removeMovieClip();
} else if ((((giveGift == true) && (giveGift2 == true)) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift3 = true;
this.removeMovieClip();
} else if (((giveGift == true) && (this._currentframe == 1)) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift2 = true;
this.removeMovieClip();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
scoreX++;
score_txt.text = scoreX;
giveGift = true;
this.removeMovieClip();
giftcounter = timeX;
giftcountID = setInterval(giftdoCounter, 1000);
}
if (this._y > 500) {
this.removeMovieClip();
}
};
giftCount++;
giftCount = giftCount % 10;
};
creategiftz = function (type, x, y) {
var _local2 = "giftz" + giftzCount;
giftzLayer.attachMovie(type, _local2, giftzCount);
giftzLayer[_local2]._x = x;
giftzLayer[_local2].xline = x;
giftzLayer[_local2]._y = y;
giftzLayer[_local2].dy = (Math.random() * 16) + 6;
giftzLayer[_local2].t = Math.random() * 7.28;
giftzLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.2;
if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
scoreX = scoreX + 5;
score_txt.text = scoreX;
this.removeMovieClip();
}
if (this._y > 500) {
this.removeMovieClip();
}
};
giftzCount++;
giftzCount = giftzCount % 10;
};
createsuper = function (type, x, y) {
var _local2 = "supergift" + superCount;
superLayer.attachMovie(type, _local2, superCount);
superLayer[_local2]._x = x;
superLayer[_local2].xline = x;
superLayer[_local2]._y = y;
superLayer[_local2].dy = (Math.random() * 16) + 10;
superLayer[_local2].t = Math.random() * 7.28;
superLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.2;
if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
superGift = true;
giveGift = false;
giveGift2 = false;
giveGift3 = false;
supercounter = (timeX = timeX - 8);
supercountID = setInterval(superdoCounter, 1000);
this.removeMovieClip();
scoreX = scoreX + 5;
}
if (this._y > 500) {
this.removeMovieClip();
}
};
superCount++;
superCount = superCount % 10;
};
createmine = function (type, x, y) {
var _local2 = "mine" + mineCount;
mineLayer.attachMovie(type, _local2, mineCount);
mineLayer[_local2]._x = x;
mineLayer[_local2].xline = x;
mineLayer[_local2]._y = y;
mineLayer[_local2].dy = 5;
mineLayer[_local2].onEnterFrame = function () {
this._y = this._y + this.dy;
if (((this._currentframe == 17) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 17) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if (this._y > 510) {
this.removeMovieClip();
}
};
mineCount++;
mineCount = mineCount % 10;
};
startButton.onRelease = function () {
setup();
this._visible = false;
ifpower._visible = true;
scoreX = scoreX - score_txt.text;
music = new Sound();
music.attachSound("subway");
music.start(0, 99);
};
Frame 6040
stopAllSounds();
if (boss == false) {
gotoAndPlay (574);
cursor._visible = true;
} else if (bosscount > 3) {
gotoAndPlay (574);
cursor._visible = true;
}
ship.removeMovieClip();
Instance of Symbol 466 MovieClip "cursor" in Frame 6041
onClipEvent (enterFrame) {
startDrag (this, true);
}
Frame 6122
stop();
Frame 6188
stopAllSounds();
gift_txt._visible = false;
levelbackButton._visible = true;
scoreX = 0;
score_txt.text = scoreX;
life_txt.text = life;
if (color == "red") {
shipred._visible = true;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipred;
} else if (color == "green") {
shipred._visible = false;
shipgreen._visible = true;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipgreen;
} else if (color == "white") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = true;
shipblue._visible = false;
shipbrown._visible = false;
ship = shipwhite;
} else if (color == "blue") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = true;
shipbrown._visible = false;
ship = shipblue;
} else if (color == "brown") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = true;
ship = shipbrown;
}
Frame 6216
stop();
setup = function () {
firing = false;
rockets_txt.text = rockets;
score_txt.text = scoreX;
timeX = time;
powerX = power;
enemyTime = 0;
enemyRate = 30;
enemy2Time = 0;
enemy2Rate = 60;
enemy3Time = 0;
enemy3Rate = 190;
shootTime = 1;
shootRate = 25;
counter = 0;
counter_txt.text = counter;
enemy2Die = 4;
enemy3Die = 10;
cursor._visible = false;
levelbackButton._visible = false;
if (easy == false) {
bossDie = 60;
} else if (easy == true) {
bossDie = 50;
}
boss_ship.dx = 4;
boss_ship.onEnterFrame = function () {
this._x = this._x + this.dx;
if ((this._x + (this._width / 2)) > 450) {
this._x = 450 - (this._width / 2);
this.dx = this.dx + -7;
}
if ((this._x - (this._width / 2)) < -50) {
this._x = -50 + (this._width / 2);
this.dx = this.dx - -7;
}
};
repeatTime2 = 0;
ship.onMouseDown = function () {
firing = true;
repeatTime = 0;
};
ship.onMouseUp = function () {
firing = false;
};
ship.onEnterFrame = function () {
this.destx = _xmouse;
this.desty = _ymouse;
var _local4 = this.destx - this._x;
var _local3 = this.desty - this._y;
if (this._x > 400) {
this._x = 350;
}
if (this._x < 0) {
this._x = 50;
}
if (this._y > 500) {
this._y = 450;
}
if (this._y < 0) {
this._y = 50;
}
if (engine == true) {
this._x = this._x + (_local4 * 0.5);
this._y = this._y + (_local3 * 0.5);
} else if (engine == false) {
this._x = this._x + (_local4 * 0.15);
this._y = this._y + (_local3 * 0.15);
}
var _local2 = new Object();
_local2.onKeyDown = function () {
if ((Key.isDown(32) && (powerX > 0)) && (scoreX > 9)) {
createProjectile2("power", ship._x, ship._y - 5, 0, -30);
powerX--;
scoreX = scoreX - 10;
score_txt.text = scoreX;
if (powerX == 0) {
ifpower._visible = false;
}
}
if (Key.isDown(40)) {
rocket = true;
rockets_txt._visible = true;
}
if (Key.isDown(38)) {
rocket = false;
rockets_txt._visible = false;
}
};
Key.addListener(_local2);
if ((((firing && (repeatTime == 0)) && (rocket == true)) && (superGift == true)) && (rockets > 0)) {
createProjectile2("rocket2", this._x, this._y - 5, 0, -8);
fireRate = 30;
rockets--;
rockets_txt.text = rockets;
} else if (((firing && (repeatTime == 0)) && (rocket == true)) && (rockets > 0)) {
createProjectile2("rocket", this._x, this._y - 5, 0, -7);
fireRate = 30;
rockets--;
rockets_txt.text = rockets;
} else if (firing && (repeatTime == 0)) {
createProjectile("bullet", this._x, this._y - 5, 0, -speed);
fireRate = 9;
}
repeatTime++;
repeatTime = repeatTime % fireRate;
if (repeatTime2 == 0) {
createshoot("shoot4", boss_ship._x, boss_ship._y - 5, 0, 40);
fireRate2 = 30;
}
repeatTime2++;
repeatTime2 = repeatTime2 % fireRate2;
if (enemyTime == 0) {
var _local5 = (Math.random() * 100) + 80;
createenemy("3", 200, -30);
if (enemyTime == 0) {
_local5 = (Math.random() * 100) + 80;
createenemy("3", 200, -90);
}
if (enemyTime == 0) {
_local5 = (Math.random() * 100) + 80;
createenemy("3", _local5, -120);
}
}
enemyTime++;
enemyTime = enemyTime % enemyRate;
if ((enemy2Time == 0) && (counter > 3)) {
var _local5 = (Math.random() * 100) + 200;
createenemy2("4", 200, -30);
}
enemy2Time++;
enemy2Time = enemy2Time % enemy2Rate;
if ((enemy3Time == 0) && (counter > 5)) {
var _local5 = (Math.random() * 100) + 200;
createenemy3("11", 200, -30);
}
enemy3Time++;
enemy3Time = enemy3Time % enemy3Rate;
flash_anm.play();
};
doCounter = function () {
counter++;
counter_txt.text = counter;
if (bossDie == 0) {
level++;
bosscount++;
enemyLayer.removeMovieClip();
enemy2Layer.removeMovieClip();
enemy3Layer.removeMovieClip();
projectileLayer.removeMovieClip();
projectileLayer2.removeMovieClip();
rockets_txt._visible = false;
shootLayer.removeMovieClip();
clearInterval(countID);
gotoAndPlay (6217);
scoreX = scoreX + 500;
score_txt.text = scoreX;
score = score + scoreX;
boss_ship.removeMovieClip();
ship.removeMovieClip();
music.stop();
}
};
doLose = function () {
flash_anm.stop();
flash_anm.gotoAndPlay(1);
delete ship.onEnterFrame;
delete bgscroller.onEnterFrame;
enemyLayer.removeMovieClip();
enemy2Layer.removeMovieClip();
enemy3Layer.removeMovieClip();
projectileLayer.removeMovieClip();
projectileLayer2.removeMovieClip();
startButton._visible = true;
shootLayer.removeMovieClip();
rockets_txt._visible = false;
clearInterval(countID);
cursor._visible = true;
levelbackButton._visible = true;
scoreX = 0;
powerX = power;
music.stop();
};
countID = setInterval(doCounter, 1000);
_root.createEmptyMovieClip("projectileLayer2", 99);
projectileCount2 = 0;
_root.createEmptyMovieClip("projectileLayer", 98);
projectileCount = 0;
_root.createEmptyMovieClip("enemyLayer", 97);
enemyCount = 0;
_root.createEmptyMovieClip("enemy2Layer", 96);
enemy2Count = 0;
_root.createEmptyMovieClip("enemy3Layer", 95);
enemy3Count = 0;
_root.createEmptyMovieClip("shootLayer", 94);
shootCount = 0;
boss_ship.swapDepths(101);
ship.swapDepths(100);
ship.gotoAndStop(1);
};
createProjectile = function (type, x, y, dx, dy) {
var _local4 = "proj" + projectileCount;
projectileLayer.attachMovie(type, _local4, projectileCount);
projectileLayer[_local4]._x = x;
projectileLayer[_local4]._y = y;
projectileLayer[_local4].dx = dx;
projectileLayer[_local4].dy = dy;
projectileLayer[_local4].onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
if (this._y < -190) {
this.removeMovieClip();
}
var _local2 = 0;
while (_local2 < 10) {
if ((this.hitTest(boss_ship) && (boss_ship._currentframe == 1)) && (bossDie == 0)) {
doCounter();
scoreX = scoreX + 300;
score_txt.text = scoreX;
this.removeMovieClip();
} else if (this.hitTest(boss_ship) && (boss_ship._currentframe == 1)) {
bossDie--;
this.removeMovieClip();
mySoundObject = new Sound();
mySoundObject.attachSound("hit");
mySoundObject.start(0, 1);
}
var _local3 = "enemy" + _local2;
if (this.hitTest(enemyLayer[_local3]) && (enemyLayer[_local3]._currentframe == 1)) {
enemyLayer[_local3].play();
scoreX++;
score_txt.text = scoreX;
this.removeMovieClip();
}
_local3 = "enemy2" + _local2;
if ((this.hitTest(enemy2Layer[_local3]) && (enemy2Layer[_local3]._currentframe == 1)) && (enemy2Die == 0)) {
enemy2Die = 4;
enemy2Layer[_local3].play();
scoreX = scoreX + 3;
score_txt.text = scoreX;
this.removeMovieClip();
} else if (this.hitTest(enemy2Layer[_local3]) && (enemy2Layer[_local3]._currentframe == 1)) {
enemy2Die--;
this.removeMovieClip();
}
_local3 = "enemy3" + _local2;
if ((this.hitTest(enemy3Layer[_local3]) && (enemy3Layer[_local3]._currentframe == 1)) && (enemy3Die == 0)) {
enemy3Die = 10;
enemy3Layer[_local3].play();
scoreX = scoreX + 10;
score_txt.text = scoreX;
} else if (this.hitTest(enemy3Layer[_local3]) && (enemy3Layer[_local3]._currentframe == 1)) {
enemy3Die--;
this.removeMovieClip();
}
_local2++;
}
};
projectileCount++;
projectileCount = projectileCount % 20;
};
createProjectile2 = function (type, x, y, dx, dy) {
var _local4 = "proj2" + projectileCount2;
projectileLayer2.attachMovie(type, _local4, projectileCount2);
projectileLayer2[_local4]._x = x;
projectileLayer2[_local4]._y = y;
projectileLayer2[_local4].dx = dx;
projectileLayer2[_local4].dy = dy;
projectileLayer2[_local4].onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
if (this._y < -80) {
this.removeMovieClip();
}
var _local2 = 0;
while (_local2 < 10) {
var _local3 = "enemy" + _local2;
if (this.hitTest(enemyLayer[_local3]) && (enemyLayer[_local3]._currentframe == 1)) {
enemyLayer[_local3].play();
scoreX++;
score_txt.text = scoreX;
}
_local3 = "enemy2" + _local2;
if (this.hitTest(enemy2Layer[_local3]) && (enemy2Layer[_local3]._currentframe == 1)) {
enemy2Die = 4;
enemy2Layer[_local3].play();
scoreX = scoreX + 3;
score_txt.text = scoreX;
}
_local3 = "enemy3" + _local2;
if (this.hitTest(enemy3Layer[_local3]) && (enemy3Layer[_local3]._currentframe == 1)) {
enemy3Die = 10;
enemy3Layer[_local3].play();
scoreX = scoreX + 10;
score_txt.text = scoreX;
}
_local2++;
}
};
projectileCount2++;
projectileCount2 = projectileCount2 % 10;
};
createshoot = function (type, x, y) {
var _local2 = "shoot" + shootCount;
shootLayer.attachMovie(type, _local2, shootCount);
shootLayer[_local2]._x = x;
shootLayer[_local2].xline = x;
shootLayer[_local2]._y = y;
shootLayer[_local2].dy = 30;
shootLayer[_local2].onEnterFrame = function () {
this._y = this._y + this.dy;
if (((this._currentframe > 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe > 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
};
shootCount++;
shootCount = shootCount % 10;
};
createenemy = function (type, x, y) {
var _local2 = "enemy" + enemyCount;
enemyLayer.attachMovie(type, _local2, enemyCount);
enemyLayer[_local2]._x = x;
enemyLayer[_local2].xline = x;
enemyLayer[_local2]._y = y;
enemyLayer[_local2].dy = (Math.random() * 8) + 6;
enemyLayer[_local2].t = Math.random() * 6.28;
enemyLayer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.1;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if (this._y > 560) {
this.removeMovieClip();
}
};
enemyCount++;
enemyCount = enemyCount % 10;
};
createenemy2 = function (type, x, y) {
var _local2 = "enemy2" + enemy2Count;
enemy2Layer.attachMovie(type, _local2, enemy2Count);
enemy2Layer[_local2]._x = x;
enemy2Layer[_local2].xline = x;
enemy2Layer[_local2]._y = y;
enemy2Layer[_local2].dy = (Math.random() * 5) + 9;
enemy2Layer[_local2].t = Math.random() * 6.28;
enemy2Layer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.1;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if ((this._y > 560) && (enemy2Die < 4)) {
this.removeMovieClip();
enemy2Die = 4;
} else if (this._y > 560) {
this.removeMovieClip();
}
};
enemy2Count++;
enemy2Count = enemy2Count % 10;
};
createenemy3 = function (type, x, y) {
var _local2 = "enemy3" + enemy3Count;
enemy3Layer.attachMovie(type, _local2, enemy3Count);
enemy3Layer[_local2]._x = x;
enemy3Layer[_local2].xline = x;
enemy3Layer[_local2]._y = y;
enemy3Layer[_local2].dy = (Math.random() * 3) + 5;
enemy3Layer[_local2].t = Math.random() * 6.38;
enemy3Layer[_local2].onEnterFrame = function () {
this._x = this.xline + (Math.sin(this.t) * 100);
this._y = this._y + this.dy;
this.t = this.t + 0.04;
if (((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) && (life < 1)) {
counter = 1;
doLose();
ship.play();
} else if ((this._currentframe == 1) && (ship.hitTest(this._x, this._y, true))) {
this.play();
life--;
lifeloss.play();
life_txt.text = life;
ship.gotoAndPlay(68);
}
if ((this._y > 600) && (enemy3Die < 10)) {
this.removeMovieClip();
enemy3Die = 10;
} else if (this._y > 600) {
this.removeMovieClip();
}
};
enemy3Count++;
enemy3Count = enemy3Count % 10;
};
startButton.onRelease = function () {
setup();
this._visible = false;
ifpower._visible = true;
scoreX = scoreX - score_txt.text;
music = new Sound();
music.attachSound("sinistral");
music.start(0, 99);
};
Frame 6403
stopAllSounds();
cursor._visible = true;
Frame 6444
stop();
Frame 6514
stop();
stopAllSounds();
Symbol 35 MovieClip [boss1] Frame 58
stop();
Symbol 41 MovieClip Frame 46
stop();
Symbol 49 MovieClip [supercannon] Frame 6
stop();
Symbol 56 MovieClip [super] Frame 6
stop();
Symbol 66 MovieClip [bullet2] Frame 7
stop();
Symbol 70 MovieClip [bossbullet] Frame 7
stop();
Symbol 74 MovieClip [bullet] Frame 7
stop();
Symbol 78 MovieClip [laser] Frame 2
stop();
Symbol 83 MovieClip [giftz_mc] Frame 1
stop();
Symbol 89 MovieClip [supergift_mc] Frame 1
stop();
Symbol 94 MovieClip [gift_mc] Frame 1
stop();
Symbol 107 MovieClip [rock2] Frame 1
stop();
Symbol 107 MovieClip [rock2] Frame 13
this.removeMovieClip();
Symbol 113 MovieClip [rock] Frame 1
stop();
Symbol 113 MovieClip [rock] Frame 12
this.removeMovieClip();
Symbol 126 MovieClip [mine2] Frame 17
stop();
Symbol 126 MovieClip [mine2] Frame 39
this.removeMovieClip();
Symbol 132 MovieClip [mine] Frame 17
stop();
Symbol 132 MovieClip [mine] Frame 39
this.removeMovieClip();
Symbol 137 MovieClip Frame 46
stop();
Symbol 167 MovieClip [power] Frame 33
this.removeMovieClip();
Symbol 177 MovieClip [rocket2] Frame 45
this.removeMovieClip();
Symbol 184 MovieClip [rocket] Frame 41
this.removeMovieClip();
Symbol 192 MovieClip [super2] Frame 24
stop();
Symbol 204 MovieClip [tut] Frame 1
stop();
Symbol 204 MovieClip [tut] Frame 14
this.removeMovieClip();
Symbol 226 MovieClip [11] Frame 1
stop();
Symbol 226 MovieClip [11] Frame 28
this.removeMovieClip();
Symbol 231 MovieClip [shoot3] Frame 9
stop();
Symbol 239 MovieClip [shoot4] Frame 9
stop();
Symbol 249 MovieClip [3] Frame 1
stop();
Symbol 249 MovieClip [3] Frame 13
this.removeMovieClip();
Symbol 260 MovieClip [10] Frame 1
stop();
Symbol 260 MovieClip [10] Frame 15
this.removeMovieClip();
Symbol 275 MovieClip [9] Frame 1
stop();
Symbol 275 MovieClip [9] Frame 16
this.removeMovieClip();
Symbol 284 MovieClip [8] Frame 1
stop();
Symbol 284 MovieClip [8] Frame 15
this.removeMovieClip();
Symbol 298 MovieClip [7] Frame 1
stop();
Symbol 298 MovieClip [7] Frame 14
this.removeMovieClip();
Symbol 310 MovieClip [6] Frame 1
stop();
Symbol 310 MovieClip [6] Frame 14
this.removeMovieClip();
Symbol 324 MovieClip [5] Frame 1
stop();
Symbol 324 MovieClip [5] Frame 13
this.removeMovieClip();
Symbol 339 MovieClip [4] Frame 1
stop();
Symbol 339 MovieClip [4] Frame 20
this.removeMovieClip();
Symbol 349 MovieClip [3sh] Frame 1
stop();
Symbol 349 MovieClip [3sh] Frame 13
this.removeMovieClip();
Symbol 366 MovieClip [2] Frame 1
stop();
Symbol 366 MovieClip [2] Frame 23
this.removeMovieClip();
Symbol 376 MovieClip [1] Frame 1
stop();
Symbol 376 MovieClip [1] Frame 17
this.removeMovieClip();
Symbol 409 MovieClip [ship] Frame 1
stop();
Symbol 409 MovieClip [ship] Frame 67
stop();
Symbol 409 MovieClip [ship] Frame 70
gotoAndStop (1);
Symbol 440 MovieClip [ship shadow] Frame 1
stop();
Symbol 440 MovieClip [ship shadow] Frame 67
stop();
Symbol 440 MovieClip [ship shadow] Frame 70
gotoAndStop (1);
Symbol 451 Button
on (release) {
getURL ("http://www.newgrounds.com", "blank");
}
Symbol 456 Button
on (release) {
_root.play();
}
Symbol 458 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
bar._xscale = PercentLoaded;
} else {
gotoAndStop ("loaded");
}
Symbol 458 MovieClip Frame 2
gotoAndPlay (1);
Symbol 475 Button
on (release) {
gotoAndPlay (3);
}
Symbol 479 Button
on (release) {
gotoAndPlay (385);
}
Symbol 483 Button
on (release) {
normal = true;
easy = false;
normalgraph._visible = true;
easygraph._visible = false;
}
Symbol 486 Button
on (release) {
easy = true;
normal = false;
easygraph._visible = true;
normalgraph._visible = false;
}
Symbol 493 Button
on (release) {
color = "white";
color_txt.text = color;
light.play();
}
Symbol 496 Button
on (release) {
color = "green";
color_txt.text = color;
light.play();
}
Symbol 499 Button
on (release) {
color = "brown";
color_txt.text = color;
light.play();
}
Symbol 503 Button
on (release) {
color = "red";
color_txt.text = color;
light.play();
}
Symbol 507 Button
on (release) {
color = "blue";
color_txt.text = color;
light.play();
}
Symbol 512 MovieClip Frame 1
stop();
Symbol 516 Button
on (release) {
getURL ("http://rocklou.newgrounds.com/", "_blank");
}
Symbol 520 MovieClip Frame 23
stop();
Symbol 529 MovieClip Frame 149
stop();
Symbol 567 Button
on (release) {
gotoAndPlay (279);
}
Symbol 569 Button
on (release) {
gotoAndPlay (280);
}
Symbol 571 Button
on (release) {
gotoAndPlay (281);
}
Symbol 573 Button
on (release) {
gotoAndPlay (282);
}
Symbol 586 MovieClip Frame 28
stop();
Symbol 591 Button
on (release) {
gotoAndPlay (434);
tut = true;
}
Symbol 600 Button
on (release) {
gotoAndPlay (334);
}
Symbol 602 Button
on (release) {
gotoAndPlay (335);
}
Symbol 613 Button
on (release) {
gotoAndPlay (357);
}
Symbol 617 Button
on (release) {
gotoAndPlay (434);
}
Symbol 625 Button
on (release) {
play();
}
Symbol 628 Button
on (release) {
play();
}
Symbol 631 Button
on (release) {
play();
}
Symbol 635 Button
on (release) {
gotoAndPlay (3);
}
Symbol 696 MovieClip Frame 1
stop();
Symbol 696 MovieClip Frame 67
stop();
Symbol 696 MovieClip Frame 70
gotoAndStop (1);
Symbol 724 MovieClip Frame 1
stop();
Symbol 724 MovieClip Frame 67
stop();
Symbol 724 MovieClip Frame 70
gotoAndStop (1);
Symbol 752 MovieClip Frame 1
stop();
Symbol 752 MovieClip Frame 67
stop();
Symbol 752 MovieClip Frame 70
gotoAndStop (1);
Symbol 780 MovieClip Frame 1
stop();
Symbol 780 MovieClip Frame 67
stop();
Symbol 780 MovieClip Frame 70
gotoAndStop (1);
Symbol 818 MovieClip Frame 43
stop();
Symbol 829 MovieClip Frame 1
stop();
Symbol 829 MovieClip Frame 56
stop();
Symbol 829 MovieClip Frame 57
stop();
Symbol 829 MovieClip Frame 58
stop();
Symbol 829 MovieClip Frame 59
stop();
Symbol 829 MovieClip Frame 60
stop();
Symbol 829 MovieClip Frame 61
stop();
Symbol 829 MovieClip Frame 62
stop();
Symbol 829 MovieClip Frame 63
stop();
Symbol 829 MovieClip Frame 114
stop();
Symbol 861 Button
on (release) {
score = score + 100;
score_txt.text = score;
}
Symbol 865 MovieClip Frame 48
stop();
Symbol 869 Button
on (release) {
gotoAndPlay (603);
now = 1;
}
Symbol 871 Button
on (release) {
gotoAndPlay (636);
}
Symbol 875 MovieClip Frame 48
stop();
Symbol 876 Button
on (release) {
gotoAndPlay (603);
now = 1;
}
Symbol 878 Button
on (release) {
gotoAndPlay (603);
now = 2;
}
Symbol 882 MovieClip Frame 48
stop();
Symbol 886 Button
on (release) {
gotoAndPlay (603);
now = 3;
}
Symbol 890 MovieClip Frame 48
stop();
Symbol 894 Button
on (release) {
gotoAndPlay (603);
now = 4;
}
Symbol 898 MovieClip Frame 48
stop();
Symbol 901 Button
on (release) {
gotoAndPlay (603);
now = 5;
}
Symbol 905 MovieClip Frame 48
stop();
Symbol 906 Button
on (release) {
gotoAndPlay (603);
now = 6;
}
Symbol 910 MovieClip Frame 31
stop();
Symbol 914 MovieClip Frame 48
stop();
Symbol 916 Button
on (release) {
gotoAndPlay (603);
now = 7;
}
Symbol 918 Button
on (release) {
gotoAndPlay (603);
now = 8;
}
Symbol 922 MovieClip Frame 48
stop();
Symbol 924 MovieClip Frame 41
stop();
Symbol 932 MovieClip Frame 6
stop();
Symbol 934 Button
on (release) {
gotoAndPlay (637);
}
Symbol 942 Button
on (release) {
gotoAndPlay (640);
}
Symbol 951 Button
on (release) {
gotoAndPlay (434);
}
Symbol 976 MovieClip Frame 32
stop();
Symbol 979 Button
on (release) {
gotoAndPlay (638);
}
Symbol 980 Button
on (release) {
gotoAndPlay (574);
}
Symbol 985 Button
on (release) {
gotoAndPlay (639);
}
Symbol 988 Button
on (release) {
gotoAndPlay (636);
}
Symbol 1003 Button
on (release) {
if (score > 89) {
life = life + 1;
life_txt.text = life;
score = score - 90;
score_txt.text = score;
}
}
Symbol 1010 Button
on (release) {
if (score > 79) {
speed++;
speed_txt.text = speed;
score = score - 80;
score_txt.text = score;
}
}
Symbol 1014 Button
on (release) {
if (score > 209) {
time = time + 2;
time_txt.text = time;
score = score - 210;
score_txt.text = score;
}
}
Symbol 1019 Button
on (release) {
if (score > 39) {
rockets++;
rockets_txt.text = rockets;
score = score - 40;
score_txt.text = score;
}
}
Symbol 1024 Button
on (release) {
if (score > 399) {
power++;
score = score - 400;
score_txt.text = score;
}
}
Symbol 1029 Button
on (release) {
if (score > 499) {
engine = true;
score = score - 500;
score_txt.text = score;
engineButton._visible = false;
}
}
Symbol 1072 Button
on (release) {
gotoAndPlay (700);
}
Symbol 1073 Button
on (release) {
color = "white";
color_txt.text = color;
if (color == "red") {
shipred._visible = true;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
} else if (color == "green") {
shipred._visible = false;
shipgreen._visible = true;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
} else if (color == "white") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = true;
shipblue._visible = false;
shipbrown._visible = false;
} else if (color == "blue") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = true;
shipbrown._visible = false;
} else if (color == "brown") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = true;
}
}
Symbol 1074 Button
on (release) {
color = "green";
color_txt.text = color;
if (color == "red") {
shipred._visible = true;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
} else if (color == "green") {
shipred._visible = false;
shipgreen._visible = true;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
} else if (color == "white") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = true;
shipblue._visible = false;
shipbrown._visible = false;
} else if (color == "blue") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = true;
shipbrown._visible = false;
} else if (color == "brown") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = true;
}
}
Symbol 1075 Button
on (release) {
color = "brown";
color_txt.text = color;
if (color == "red") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
} else if (color == "green") {
shipred._visible = false;
shipgreen._visible = true;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
} else if (color == "white") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = true;
shipblue._visible = false;
shipbrown._visible = false;
} else if (color == "blue") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = true;
shipbrown._visible = false;
} else if (color == "brown") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = true;
}
}
Symbol 1076 Button
on (release) {
color = "red";
color_txt.text = color;
if (color == "red") {
shipred._visible = true;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
} else if (color == "green") {
shipred._visible = false;
shipgreen._visible = true;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
} else if (color == "white") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = true;
shipblue._visible = false;
shipbrown._visible = false;
} else if (color == "blue") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = true;
shipbrown._visible = false;
} else if (color == "brown") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = true;
}
}
Symbol 1077 Button
on (release) {
color = "blue";
color_txt.text = color;
if (color == "red") {
shipred._visible = true;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
} else if (color == "green") {
shipred._visible = false;
shipgreen._visible = true;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = false;
} else if (color == "white") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = true;
shipblue._visible = false;
shipbrown._visible = false;
} else if (color == "blue") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = true;
shipbrown._visible = false;
} else if (color == "brown") {
shipred._visible = false;
shipgreen._visible = false;
shipwhite._visible = false;
shipblue._visible = false;
shipbrown._visible = true;
}
}
Symbol 1103 MovieClip Frame 1
stop();
Symbol 1103 MovieClip Frame 67
stop();
Symbol 1103 MovieClip Frame 70
gotoAndStop (1);
Symbol 1129 MovieClip Frame 1
stop();
Symbol 1129 MovieClip Frame 67
stop();
Symbol 1129 MovieClip Frame 70
gotoAndStop (1);
Symbol 1155 MovieClip Frame 1
stop();
Symbol 1155 MovieClip Frame 67
stop();
Symbol 1155 MovieClip Frame 70
gotoAndStop (1);
Symbol 1181 MovieClip Frame 1
stop();
Symbol 1181 MovieClip Frame 67
stop();
Symbol 1181 MovieClip Frame 70
gotoAndStop (1);
Symbol 1188 Button
on (release) {
gotoAndPlay (642);
}
Symbol 1199 Button
on (release) {
gotoAndPlay (641);
}
Symbol 1203 Button
on (release) {
gotoAndPlay (643);
}
Symbol 1212 MovieClip Frame 1
stop();
Symbol 1253 Button
on (release) {
gotoAndPlay (640);
}
Symbol 1254 Button
on (release) {
gotoAndPlay (644);
}
Symbol 1293 Button
on (release) {
levelname = levelnametxt.text;
gotoAndPlay (701);
}
Symbol 1298 Button
on (release) {
gotoAndPlay (702);
}
Symbol 1306 Button
on (release) {
bglevel.text = "Level 1";
overbg1._visible = true;
overbg2._visible = false;
overbg3._visible = false;
overbg4._visible = false;
overbg5._visible = false;
overbg6._visible = false;
overbg7._visible = false;
overbg8._visible = false;
bgscroller.gotoAndStop(1);
}
Symbol 1309 Button
on (release) {
bglevel.text = "Level 2";
overbg1._visible = false;
overbg2._visible = true;
overbg3._visible = false;
overbg4._visible = false;
overbg5._visible = false;
overbg6._visible = false;
overbg7._visible = false;
overbg8._visible = false;
bgscroller.gotoAndStop(2);
}
Symbol 1312 Button
on (release) {
bglevel.text = "Level 3";
overbg1._visible = false;
overbg2._visible = false;
overbg3._visible = true;
overbg4._visible = false;
overbg5._visible = false;
overbg6._visible = false;
overbg7._visible = false;
overbg8._visible = false;
bgscroller.gotoAndStop(3);
}
Symbol 1315 Button
on (release) {
bglevel.text = "Level 4";
overbg1._visible = false;
overbg2._visible = false;
overbg3._visible = false;
overbg4._visible = true;
overbg5._visible = false;
overbg6._visible = false;
overbg7._visible = false;
overbg8._visible = false;
bgscroller.gotoAndStop(4);
}
Symbol 1318 Button
on (release) {
bglevel.text = "Level 5";
overbg1._visible = false;
overbg2._visible = false;
overbg3._visible = false;
overbg4._visible = false;
overbg5._visible = true;
overbg6._visible = false;
overbg7._visible = false;
overbg8._visible = false;
bgscroller.gotoAndStop(5);
}
Symbol 1321 Button
on (release) {
bglevel.text = "Level 6";
overbg1._visible = false;
overbg2._visible = false;
overbg3._visible = false;
overbg4._visible = false;
overbg5._visible = false;
overbg6._visible = true;
overbg7._visible = false;
overbg8._visible = false;
bgscroller.gotoAndStop(6);
}
Symbol 1324 Button
on (release) {
bglevel.text = "Level 7";
overbg1._visible = false;
overbg2._visible = false;
overbg3._visible = false;
overbg4._visible = false;
overbg5._visible = false;
overbg6._visible = false;
overbg7._visible = true;
overbg8._visible = false;
bgscroller.gotoAndStop(7);
}
Symbol 1328 Button
on (release) {
bglevel.text = "Level 8";
overbg1._visible = false;
overbg2._visible = false;
overbg3._visible = false;
overbg4._visible = false;
overbg5._visible = false;
overbg6._visible = false;
overbg7._visible = false;
overbg8._visible = true;
bgscroller.gotoAndStop(8);
}
Symbol 1340 Button
on (release) {
ship.gotoAndStop(7);
}
Symbol 1368 MovieClip Frame 1
stop();
Symbol 1381 Button
on (release) {
gotoAndPlay (809);
scoreX = 0;
score_txt.text = scoreX;
boss = false;
}
Symbol 1391 Button
on (release) {
gotoAndPlay (1097);
}
Symbol 1395 Button
on (release) {
gotoAndPlay (915);
}
Symbol 1411 Button
on (release) {
gotoAndPlay (967);
}
Symbol 1413 Button
on (release) {
gotoAndPlay (968);
}
Symbol 1415 Button
on (release) {
gotoAndPlay (969);
}
Symbol 1435 Button
on (release) {
gotoAndPlay (1019);
}
Symbol 1441 Button
on (release) {
gotoAndPlay (1075);
}
Symbol 1443 Button
on (release) {
gotoAndPlay (1076);
}
Symbol 1465 Button
on (release) {
gotoAndPlay (1303);
scoreX = 0;
score_txt.text = scoreX;
boss = false;
}
Symbol 1473 Button
on (release) {
gotoAndPlay (1630);
}
Symbol 1477 Button
on (release) {
gotoAndPlay (1441);
}
Symbol 1479 Button
on (release) {
gotoAndPlay (1442);
}
Symbol 1489 Button
on (release) {
gotoAndPlay (1525);
}
Symbol 1493 Button
on (release) {
gotoAndPlay (1606);
}
Symbol 1495 Button
on (release) {
gotoAndPlay (1607);
}
Symbol 1518 Button
on (release) {
gotoAndPlay (1831);
scoreX = 0;
score_txt.text = scoreX;
boss = false;
}
Symbol 1529 Button
on (release) {
gotoAndPlay (1966);
}
Symbol 1548 Button
on (release) {
gotoAndPlay (574);
scoreX = 0;
enemyLayer.removeMovieClip();
enemy2Layer.removeMovieClip();
projectileLayer.removeMovieClip();
projectileLayer2.removeMovieClip();
rockets_txt._visible = false;
bossLayer.removeMovieClip();
shootLayer.removeMovieClip();
shoot2Layer.removeMovieClip();
clearInterval(countID);
music.stop();
ship.removeMovieClip();
cursor._visible = true;
}
Symbol 1556 MovieClip Frame 1
stop();
Symbol 1590 Button
on (release) {
gotoAndPlay (2415);
}
Symbol 1600 Button
on (release) {
gotoAndPlay (2508);
}
Symbol 1601 Button
on (release) {
gotoAndPlay (641);
}
Symbol 1602 Button
on (release) {
gotoAndPlay (574);
}
Symbol 1603 Button
on (release) {
gotoAndPlay (2698);
}
Symbol 1610 Button
on (release) {
gotoAndPlay (2545);
}
Symbol 1616 Button
on (release) {
gotoAndPlay (2623);
}
Symbol 1620 Button
on (release) {
gotoAndPlay (2674);
}
Symbol 1622 Button
on (release) {
gotoAndPlay (2675);
}
Symbol 1624 Button
on (release) {
gotoAndPlay (2676);
}
Symbol 1648 Button
on (release) {
gotoAndPlay (2892);
scoreX = 0;
score_txt.text = scoreX;
}
Symbol 1652 Button
on (release) {
gotoAndPlay (3129);
}
Symbol 1673 Button
on (release) {
gotoAndPlay (3052);
}
Symbol 1678 Button
on (release) {
gotoAndPlay (3108);
}
Symbol 1680 Button
on (release) {
gotoAndPlay (3109);
}
Symbol 1702 Button
on (release) {
gotoAndPlay (3327);
scoreX = 0;
score_txt.text = scoreX;
}
Symbol 1706 Button
on (release) {
gotoAndPlay (3574);
}
Symbol 1713 Button
on (release) {
gotoAndPlay (3469);
}
Symbol 1717 Button
on (release) {
gotoAndPlay (3523);
}
Symbol 1723 Button
on (release) {
gotoAndPlay (3575);
}
Symbol 1725 Button
on (release) {
gotoAndPlay (3576);
}
Symbol 1747 Button
on (release) {
gotoAndPlay (3788);
scoreX = 0;
score_txt.text = scoreX;
}
Symbol 1753 Button
on (release) {
gotoAndPlay (4065);
}
Symbol 1760 Button
on (release) {
gotoAndPlay (3934);
}
Symbol 1764 Button
on (release) {
gotoAndPlay (3992);
}
Symbol 1766 Button
on (release) {
gotoAndPlay (3993);
}
Symbol 1770 Button
on (release) {
gotoAndPlay (4045);
}
Symbol 1772 Button
on (release) {
gotoAndPlay (4046);
}
Symbol 1794 Button
on (release) {
gotoAndPlay (4281);
scoreX = 0;
score_txt.text = scoreX;
boss = false;
}
Symbol 1803 Button
on (release) {
gotoAndPlay (4417);
}
Symbol 1818 MovieClip Frame 1
stop();
Symbol 1820 Button
on (release) {
gotoAndPlay (574);
scoreX = 0;
enemyLayer.removeMovieClip();
enemy2Layer.removeMovieClip();
projectileLayer.removeMovieClip();
projectileLayer2.removeMovieClip();
rockets_txt._visible = false;
shootLayer.removeMovieClip();
clearInterval(countID);
boss_ship.removeMovieClip();
ship.removeMovieClip();
music.stop();
}
Symbol 1829 Button
on (release) {
gotoAndPlay (4716);
}
Symbol 1835 Button
on (release) {
gotoAndPlay (4852);
}
Symbol 1842 Button
on (release) {
gotoAndPlay (4831);
}
Symbol 1864 Button
on (release) {
gotoAndPlay (5056);
scoreX = 0;
score_txt.text = scoreX;
boss = false;
}
Symbol 1873 Button
on (release) {
gotoAndPlay (5193);
}
Symbol 1890 MovieClip Frame 1
stop();
Symbol 1892 Button
on (release) {
gotoAndPlay (574);
scoreX = 0;
enemyLayer.removeMovieClip();
enemy2Layer.removeMovieClip();
projectileLayer.removeMovieClip();
projectileLayer2.removeMovieClip();
rockets_txt._visible = false;
shootLayer.removeMovieClip();
clearInterval(countID);
boss_ship.removeMovieClip();
ship.removeMovieClip();
music.stop();
}
Symbol 1900 Button
on (release) {
gotoAndPlay (5518);
}
Symbol 1906 Button
on (release) {
gotoAndPlay (5712);
}
Symbol 1913 Button
on (release) {
gotoAndPlay (5618);
}
Symbol 1916 Button
on (release) {
gotoAndPlay (5692);
}
Symbol 1938 Button
on (release) {
gotoAndPlay (5937);
scoreX = 0;
score_txt.text = scoreX;
boss = false;
}
Symbol 1949 Button
on (release) {
gotoAndPlay (6123);
}
Symbol 1970 MovieClip Frame 1
stop();
Symbol 1972 Button
on (release) {
gotoAndPlay (574);
scoreX = 0;
enemyLayer.removeMovieClip();
enemy2Layer.removeMovieClip();
enemy3Layer.removeMovieClip();
projectileLayer.removeMovieClip();
projectileLayer2.removeMovieClip();
rockets_txt._visible = false;
shootLayer.removeMovieClip();
clearInterval(countID);
boss_ship.removeMovieClip();
ship.removeMovieClip();
music.stop();
}
Symbol 1979 MovieClip Frame 1
stop();
Symbol 1990 Button
on (release) {
gotoAndPlay (6445);
}