Frame 1
initLaser = undefined;
initNumLasers = undefined;
music = 1;
sounds = 1;
var GLOBALSOUND = new Sound();
var muted = false;
stop();
Instance of Symbol 535 MovieClip "loader" in Frame 1
onClipEvent (enterFrame) {
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
Frame = Math.ceil((30 * PercentLoaded) / 100);
if (_currentframe != 31) {
gotoAndStop(Frame);
}
if (PercentLoaded == 100) {
Text.gotoAndStop(21);
}
}
Frame 2
stop();
Instance of Symbol 572 MovieClip "menu" in Frame 2
onClipEvent (load) {
S = new Sound(this);
S.attachSound("forBoris");
S.setVolume(20);
S.start(0, 10000);
}
onClipEvent (enterFrame) {
if (_root.music == 1) {
S.setVolume(20);
} else {
S.setVolume(0);
}
}
Frame 3
stop();
Frame 4
stop();
Frame 5
function collisionTest() {
var _local3 = 0;
while (_local3 < powerups.length) {
if (powerups[_local3].hitTest(_root.ship)) {
_root.wFlash._alpha = 35;
powerups[_local3].dead = true;
}
_local3++;
}
_local3 = 0;
while (_local3 < eProjectiles.length) {
if (eProjectiles[_local3].hitTest(_root.ship)) {
placeExplosion(eProjectiles[_local3].Ex, eProjectiles[_local3]._x, eProjectiles[_local3]._y);
if (_root.ship.shieldTime > 0) {
_root.ship.life = _root.ship.life - (eProjectiles[_local3].damage / 3);
} else {
_root.ship.life = _root.ship.life - eProjectiles[_local3].damage;
}
eProjectiles[_local3].dead = true;
}
_local3++;
}
_local3 = 0;
while (_local3 < enemies.length) {
if (enemies[_local3].hitTest(_root.ship) && (enemies[_local3].life > 0)) {
if (_root.ship.shieldTime > 0) {
_root.ship.life = _root.ship.life - (enemies[_local3].life / 3);
} else {
_root.ship.life = _root.ship.life - enemies[_local3].life;
}
enemies[_local3].life = 0;
}
var _local2 = 0;
while (_local2 < pProjectiles.length) {
if ((enemies[_local3].hitTest(pProjectiles[_local2]) && (enemies[_local3].life > 0)) && (!pProjectiles[_local2].discharged)) {
enemies[_local3].gotoAndStop(2);
enemies[_local3].life = enemies[_local3].life - pProjectiles[_local2].damage;
if ((_root.ship.laser == 3) && (pProjectiles[_local2].chainsLeft > 0)) {
placeExplosion(2, pProjectiles[_local2]._x, enemies[_local3]._y);
var _local4 = _local3;
if (enemies.length > 1) {
while (_local4 == _local3) {
_local4 = random(enemies.length);
}
}
addPProjectile(3, enemies[_local3]._x, enemies[_local3]._y, _local4, pProjectiles[_local2].chainsLeft - 1, true);
pProjectiles[_local2].dead = true;
}
if (_root.ship.laser != 3) {
placeExplosion(1, pProjectiles[_local2]._x, pProjectiles[_local2]._y);
pProjectiles[_local2].dead = true;
}
}
_local2++;
}
_local3++;
}
}
function addEnemy(type, R, S) {
if (type == 1) {
var _local4 = "ene1";
var _local5 = 100;
var _local8 = 7;
var speed = 2;
var explosionFrame = 15;
var score = 50;
var shotChance = 70;
var puChance = 5;
var puType = 1;
} else if (type == 2) {
var _local4 = "ene2";
var _local5 = 100;
var _local8 = 16;
var speed = 0.8;
var explosionFrame = 24;
var score = 160;
var shotChance = 100;
var puChance = 3;
var puType = 2;
} else if (type == 3) {
var _local4 = "Space rock 1";
var _local5 = random(50) + 25;
var _local8 = (_local5 / 25) * 3;
var speed = (_local5 / 15);
var explosionFrame = 8;
var score = (10 * _local8);
var shotChance = -1;
var puChance = -1;
var puType = -1;
} else if (type == 4) {
var _local4 = "ene3";
var _local5 = 100;
var _local8 = 4;
var speed = 6;
var explosionFrame = 12;
var score = 80;
var shotChance = -1;
var puChance = 3;
var puType = 3;
} else if (type == 5) {
var _local4 = "ene5";
var _local5 = 100;
var _local8 = 18;
var speed = 5.7;
var explosionFrame = 20;
var score = 350;
var shotChance = 80;
var puChance = 4;
var puType = 5;
var e5ShotDelay = 4;
} else if (type == 6) {
var _local4 = "ene6";
var _local5 = 50;
var _local8 = 45;
var speed = 0.7;
var explosionFrame = 10;
var score = 550;
var shotChance = 60;
var puChance = 1;
var puType = 6;
}
var _local6 = _root.getNextHighestDepth();
var _local10 = random(550);
var _local7 = enemies.length;
enemies.push(_root.attachMovie(_local4, (_local4 + "_") + _local6, _local6, {_x:_local10, _y:-10, _xscale:_local5, _yscale:_local5, life:_local8, dead:false, Index:_local7, _rotation:R}));
enemies[_local7].onEnterFrame = function () {
if (((((_root._currentframe == 2) || (_root.won)) || (_root.lost)) || (this.dead)) || (this._y > (Stage.height + (this._width / 2)))) {
if (this._y > (Stage.height + (this._width / 2))) {
if (_root.score > 0) {
_root.score = _root.score - (score / 2);
}
}
removeEnemy(this.Index);
}
if (!_root.Paused) {
if (this.hit._currentframe == 3) {
this.gotoAndStop(1);
}
if (type == 4) {
this._rotation = (Math.atan2(this._y - _root.ship._y, this._x - _root.ship._x) * 57.2957795130823) + 90;
}
if (type == 5) {
if ((this._x < (_root.ship._x + 6)) && (this._x > (_root.ship._x - 6))) {
if (e5ShotDelay == 4) {
e5ShotDelay = 3;
addEProjectile(type, this._x, this._y + (this._width / 2));
} else {
if (e5ShotDelay < 4) {
e5ShotDelay--;
}
if (e5ShotDelay <= 0) {
e5ShotDelay = 4;
}
}
}
}
if ((random(shotChance) == 0) && (shotChance != -1)) {
if (type == 2) {
var _local4 = _root.attachMovie("Plasma suck", "Plasma suck", _root.getNextHighestDepth(), {_xscale:30, _yscale:30, _x:this._x, _y:this._y + 20, parent:this});
_local4.onEnterFrame = function () {
if (!_root.Paused) {
this._x = this.parent._x;
this._y = this.parent._y + 20;
if (this.parent.life <= 0) {
removeMovieClip(this);
}
if (this._currentframe == 45) {
addEProjectile(type, this.parent._x, this.parent._y + (this.parent._width / 2));
removeMovieClip(this);
}
}
};
} else if (type == 6) {
if (this._currentframe == 1) {
this.gotoAndStop(4);
}
} else {
addEProjectile(type, this._x, this._y + (this._width / 2));
}
}
if (this.life <= 0) {
if (this._currentframe == 1) {
exSnd = new Sound(this);
exSnd.attachSound("explosion");
if (sounds == 1) {
exSnd.setVolume(70);
} else {
exSnd.setVolume(0);
}
exSnd.start();
this.gotoAndStop(3);
_root.score = _root.score + score;
if (random(4) == 0) {
var _local5 = _root.attachMovie("deadAlien", "deadAlien", _root.getNextHighestDepth(), {_x:this._x, _y:this._y, _xscale:30, _yscale:30, _rotation:random(180)});
_local5.onEnterFrame = function () {
if (!_root.Paused) {
this._y = this._y + 2;
if ((this._currentframe == 2) && (this.deadAlienDeath._currentframe == 19)) {
_root.score = _root.score + 100;
this.removeMovieClip(this);
}
if (_root.won || (_root.lost)) {
this.removeMovieClip(this);
}
if (this.hitTest(_root.ship)) {
this.gotoAndStop(2);
}
var _local3 = 0;
while (_local3 < pProjectiles.length) {
if (this.hitTest(pProjectiles[_local3])) {
this.gotoAndStop(2);
}
_local3++;
}
}
};
}
if ((random(puChance) == 0) && (puChance != -1)) {
if (puType == 1) {
if (random(2) == 1) {
addPowerup(1, this._x, this._y);
} else {
addPowerup(2, this._x, this._y);
}
}
if (puType == 2) {
if (random(2) == 1) {
addPowerup(1, this._x, this._y);
} else {
addPowerup(3, this._x, this._y);
}
}
if (puType == 3) {
if (random(2) == 1) {
addPowerup(1, this._x, this._y);
} else {
addPowerup(4, this._x, this._y);
}
}
if (puType == 5) {
if (random(2) == 1) {
addPowerup(1, this._x, this._y);
} else {
addPowerup(5, this._x, this._y);
}
}
if (puType == 6) {
if (random(2) == 1) {
addPowerup(1, this._x, this._y);
} else {
addPowerup(6, this._x, this._y);
}
}
}
}
if (this.explosion._currentframe == explosionFrame) {
this.dead = true;
}
}
if (Key.isDown(39) && ((_root.ship._x + (_root.ship._width / 2)) > (Stage.width - 5))) {
this._x = this._x - _root.ship.speed;
}
if (Key.isDown(37) && ((_root.ship._x - (_root.ship._width / 2)) < 5)) {
this._x = this._x + _root.ship.speed;
}
if (type != 5) {
if (S) {
this._y = this._y + 4;
} else {
this._y = this._y + (speed + _root.boost);
}
}
if (type == 4) {
if (this._y < _root.ship._y) {
this._y = this._y + (0.5 * Math.cos(this._rotation * (Math.PI/180)));
}
if (S) {
this._x = this._x - ((speed * 1.4) * Math.sin(this._rotation * (Math.PI/180)));
} else {
this._x = this._x - (speed * Math.sin(this._rotation * (Math.PI/180)));
}
} else if ((type != 3) && (type != 5)) {
if (_root.ship._x > this._x) {
this._x = this._x + (speed - (speed / 2));
}
if (_root.ship._x < this._x) {
this._x = this._x - (speed - (speed / 2));
}
} else if (type == 5) {
if ((this._x > Stage.width) || (this._x < 0)) {
speed = speed * -1;
}
this._x = this._x + speed;
this._y = this._y + 0.6;
}
if (type == 6) {
if (this.attack._currentframe == 20) {
addEProjectile(type, this._x + 13, (this._y + (this._width / 2)) - 20);
this.gotoAndStop(6);
}
}
}
};
}
function removeEnemy(Index) {
var _local3 = enemies.slice(0, Index);
var _local2 = enemies.slice(Index + 1);
removeMovieClip(enemies[Index]);
var _local1 = 0;
while (_local1 < _local2.length) {
_local2[_local1].Index--;
_local1++;
}
enemies = _local3.concat(_local2);
}
function removeEProjectile(Index) {
var _local3 = eProjectiles.slice(0, Index);
var _local2 = eProjectiles.slice(Index + 1);
removeMovieClip(eProjectiles[Index]);
var _local1 = 0;
while (_local1 < _local2.length) {
_local2[_local1].Index--;
_local1++;
}
eProjectiles = _local3.concat(_local2);
}
function removePProjectile(Index) {
var _local3 = pProjectiles.slice(0, Index);
var _local2 = pProjectiles.slice(Index + 1);
removeMovieClip(pProjectiles[Index]);
var _local1 = 0;
while (_local1 < _local2.length) {
_local2[_local1].Index--;
_local1++;
}
pProjectiles = _local3.concat(_local2);
}
function removePowerup(Index) {
var _local3 = powerups.slice(0, Index);
var _local2 = powerups.slice(Index + 1);
removeMovieClip(powerups[Index]);
var _local1 = 0;
while (_local1 < _local2.length) {
_local2[_local1].Index--;
_local1++;
}
powerups = _local3.concat(_local2);
}
function addEProjectile(type, X, Y) {
if (type == 1) {
var _local3 = "laser3";
var _local5 = 1;
var speed = 10;
var _local4 = 1;
}
if (type == 2) {
var _local3 = "laser4";
var _local5 = 4;
var speed = 8;
var _local4 = 2;
}
if (type == 5) {
var _local3 = "ene5shot";
var _local5 = 1.5;
var speed = 17;
var _local4 = 2;
}
if (type == 6) {
var _local3 = "ene6shot";
var _local5 = 6;
var speed = 7;
var _local4 = 2;
}
depth = _root.getNextHighestDepth();
I = eProjectiles.length;
eProjectiles.push(_root.attachMovie(_local3, (_local3 + "_") + depth, depth, {_x:X, _y:Y, damage:_local5, dead:false, Index:I, Ex:_local4}));
eProjectiles[I].onEnterFrame = function () {
if (((((_root._currentframe == 2) || (_root.won)) || (_root.lost)) || (this.dead)) || (this._y > Stage.height)) {
removeEProjectile(this.Index);
}
if (!_root.Paused) {
if (Key.isDown(39) && ((_root.ship._x + (_root.ship._width / 2)) > (Stage.width - 5))) {
this._x = this._x - _root.ship.speed;
}
if (Key.isDown(37) && ((_root.ship._x - (_root.ship._width / 2)) < 5)) {
this._x = this._x + _root.ship.speed;
}
this._y = this._y + speed;
if (type == 6) {
this._rotation = (Math.atan2(this._y - _root.ship._y, this._x - _root.ship._x) * 57.2957795130823) + 90;
if (this._y < _root.ship._y) {
this._y = this._y + (0.666666666666667 * Math.cos(this._rotation * (Math.PI/180)));
}
this._x = this._x - (speed * Math.sin(this._rotation * (Math.PI/180)));
}
}
};
}
function addPProjectile(type, X, Y, nE, cL, silent) {
if (type == 1) {
var _local3 = "laser1";
var _local5 = 3;
var speed = 20;
var SOUND = "lasershot";
}
if (type == 2) {
var _local3 = "spindle";
var _local5 = 7;
var speed = 10;
var SOUND = "spindleSound";
}
if (type == 3) {
if (cL == undefined) {
var _local4 = _root.ship.numLasers;
} else {
var _local4 = cL;
}
var _local3 = "Chain Lightning";
var _local5 = 1.5;
var speed = 0;
var SOUND = "lightningSound";
}
depth = _root.getNextHighestDepth();
I = pProjectiles.length;
pProjectiles.push(_root.attachMovie(_local3, (_local3 + "_") + depth, depth, {_x:X, _y:Y, damage:_local5, dead:false, Index:I, R:0, chainsLeft:_local4, isLoaded:false}));
pProjectiles[I].onEnterFrame = function () {
if (!this.isLoaded) {
this.isLoaded = true;
this.S = new Sound(this);
this.S.attachSound(SOUND);
if ((sounds == 1) && (!silent)) {
this.S.setVolume(35);
this.S.start();
} else {
this.S.setVolume(0);
}
}
if (((((_root._currentframe == 2) || (_root.won)) || (_root.lost)) || (this.dead)) || (this._y < 0)) {
if (this.dead) {
S = new Sound(this);
S.attachSound(explosion);
S.start();
}
removePProjectile(this.Index);
}
if (!_root.Paused) {
if (type == 3) {
this._rotation = (Math.atan2(this._y - _root.enemies[nE]._y, this._x - _root.enemies[nE]._x) * 57.2957795130823) - 90;
if (this._currentframe == 11) {
this.dead = true;
}
}
if (Key.isDown(39) && ((_root.ship._x + (_root.ship._width / 2)) > (Stage.width - 5))) {
this._x = this._x - _root.ship.speed;
}
if (Key.isDown(37) && ((_root.ship._x - (_root.ship._width / 2)) < 5)) {
this._x = this._x + _root.ship.speed;
}
if (type == 1) {
this._y = this._y - (speed - boost);
}
if (type == 2) {
if (this.hitTest(_root.ship) && (this.R > (speed * 50))) {
removeMovieClip(this);
}
if (this.R > (speed * 50)) {
this._rotation = (Math.atan2(this._y - _root.ship._y, this._x - _root.ship._x) * 57.2957795130823) + 90;
} else if ((this.R > (speed * 26)) && (this.R < (speed * 38))) {
this.R = this.R + speed;
this._rotation = this._rotation + 0;
} else {
this.R = this.R + speed;
this._rotation = this._rotation + speed;
}
this._y = this._y + (15 * Math.cos(this._rotation * (Math.PI/180)));
this._x = this._x - (15 * Math.sin(this._rotation * (Math.PI/180)));
}
}
};
}
function addPowerup(type, X, Y) {
if (type == 1) {
var _local3 = "puLife";
var speed = 8;
}
if (type == 2) {
var _local3 = "puEnergy";
var speed = 8;
}
if (type == 3) {
var _local3 = "puLaser";
var speed = 8;
}
if (type == 4) {
var _local3 = "puShield";
var speed = 6;
}
if (type == 5) {
var _local3 = "puSpindle";
var speed = 5;
var _local4 = 37;
}
if (type == 6) {
var _local3 = "puShock";
var speed = 6;
var _local4 = 90;
}
depth = _root.getNextHighestDepth();
I = powerups.length;
powerups.push(_root.attachMovie(_local3, (_local3 + "_") + depth, depth, {_x:X, _y:Y, dead:false, Index:I, _xscale:_local4, _yscale:_local4}));
powerups[I].onEnterFrame = function () {
if (!_root.Paused) {
if (this.dead) {
if (type == 1) {
_root.ship.life = _root.ship.life + 5;
if (_root.ship.life > _root.ship.mLife) {
_root.ship.life = _root.ship.mLife;
}
}
if (type == 2) {
_root.ship.energy = _root.ship.energy + 50;
if (_root.ship.energy > _root.ship.mEnergy) {
_root.ship.energy = _root.ship.mEnergy;
}
}
if (type == 3) {
if (_root.ship.numLasers < 5) {
_root.ship.numLasers++;
}
}
if (type == 4) {
_root.ship.shield = true;
}
if (type == 5) {
_root.ship.laser = 2;
_root.ship.numLasers = 1;
}
if (type == 6) {
_root.ship.laser = 3;
_root.ship.numLasers = 1;
}
}
if (((_root.won || (_root.lost)) || (this.dead)) || (this._y > Stage.height)) {
removePowerup(this.Index);
}
if (Key.isDown(39) && ((_root.ship._x + (_root.ship._width / 2)) > (Stage.width - 5))) {
this._x = this._x - _root.ship.speed;
}
if (Key.isDown(37) && ((_root.ship._x - (_root.ship._width / 2)) < 5)) {
this._x = this._x + _root.ship.speed;
}
this._y = this._y + (speed + boost);
}
};
}
function placeExplosion(type, X, Y, size, rotation) {
if (type == 1) {
Name = "sExplosion";
exF = 12;
if ((size > 0) && (size <= 10000)) {
s = size;
} else {
s = 50;
}
}
if (type == 2) {
Name = "fExplosion";
exF = 11;
if ((size > 0) && (size <= 10000)) {
s = size;
} else {
s = 90;
}
}
var _local4 = attachMovie(Name, Name, _root.getNextHighestDepth(), {_x:X, _y:Y, _xscale:s, _yscale:s, _rotation:rotation});
_local4.onEnterFrame = function () {
if (_root._currentframe == 3) {
removeMovieClip(this);
}
if (!_root.Paused) {
if (this._currentframe == exF) {
removeMovieClip(this);
}
}
};
}
function boss1Shoot(type) {
if (type == 1) {
var g = (new flash.filters.GlowFilter(16737792, 1, 10, 10, 1.2, 3, false, false));
var b = (new flash.filters.BlurFilter(2, 2, 1));
var _local7 = _root.attachMovie("boss1shot", "boss1shot", _root.getNextHighestDepth(), {_x:_root.boss1._x, _y:_root.boss1._y + (_root.boss1._height / 2)});
_local7.onEnterFrame = function () {
if (_root._currentframe == 2) {
removeMovieClip(this);
}
if (!_root.Paused) {
g.blurY = g.blurY + 5;
g.blurX = g.blurX + 8;
g.strength = g.strength + 0.5;
b.blurX = b.blurX + 10;
b.blurY = b.blurY + 4;
this.filters = [b, g];
if (g.blurX > 100) {
if ((_root.ship._x < (this._x + 75)) && (_root.ship._x > (this._x - 75))) {
var _local3 = 0;
while (_local3 < (random(5) + 2)) {
placeExplosion(random(2) + 1, (this._x + random(50)) - 25, (_root.ship._y + random(50)) - 25, random(80) + 30);
_local3++;
}
_root.ship.life = _root.ship.life - 5;
}
_root.wFlash._alpha = 50;
removeMovieClip(this);
}
}
};
}
if (type == 2) {
var g = (new flash.filters.GlowFilter(65280, 1, 10, 10, 0.7, 2, false, false));
var b = (new flash.filters.BlurFilter(8, 8, 1));
var _local3 = 0;
while (_local3 < 2) {
if (_local3 == 1) {
var _local5 = _root.boss1._x - (_root.boss1._width / 2);
var _local4 = _root.boss1._y + 30;
} else {
var _local5 = _root.boss1._x + (_root.boss1._width / 2);
var _local4 = _root.boss1._y + 30;
}
var _local6 = _root.attachMovie("boss1bomb", "boss1bomb_" + _local3, _root.getNextHighestDepth(), {_x:_local5, _y:_local4, homeX:_root.ship._x, homeY:_root.ship._y});
_local6.onEnterFrame = function () {
if (((((((this._x > (Stage.width + 100)) || (this._x < -100)) || (this._y < 0)) || (this._y > Stage.height)) || (_root._currentframe == 2)) || (_root.won)) || (_root.lost)) {
removeMovieClip(this);
}
if (!_root.Paused) {
this.filters = [b, g];
if (this.sInc) {
g.strength = g.strength + 0.1;
g.blurX = g.blurX + 1.5;
g.blurY = g.blurY + 1.5;
if (g.strength > 2) {
this.sInc = false;
}
} else {
g.blurX = g.blurX - 1.5;
g.blurY = g.blurY - 1.5;
g.strength = g.strength - 0.1;
if (g.strength < 0.3) {
this.sInc = true;
}
}
if (this.hitTest(_root.ship)) {
placeExplosion(2, this._x, this._y, 100, this._rotation + 180);
_root.ship.life = _root.ship.life - 2;
removeMovieClip(this);
}
if ((((this._x > (Stage.width + 100)) || (this._x < -100)) || (this._y < 0)) || (this._y > Stage.height)) {
removeMovieClip(this);
}
if (this._y < (this.homeY - 10)) {
this._rotation = (Math.atan2(this._y - this.homeY, this._x - this.homeX) * 57.2957795130823) - 90;
}
this._y = this._y - (10 * Math.cos(this._rotation * (Math.PI/180)));
this._x = this._x + (10 * Math.sin(this._rotation * (Math.PI/180)));
}
};
_local3++;
}
}
}
function createBoss(type) {
if (type == 1) {
b1 = _root.attachMovie("boss1", "boss1", _root.getNextHighestDepth(), {_x:Stage.width / 2, _y:-200, life:300});
b1.onEnterFrame = function () {
if ((_root.won || (_root.lost)) || (_root._currentframe == 2)) {
removeMovieClip(this);
}
if (!_root.Paused) {
if (this.hitTest(_root.ship) && (_root.ship.life > 0)) {
placeExplosion(1, _root.ship._x, _root.ship._y - (_root.ship._height / 2), 170);
this.life = this.life - _root.ship.life;
if (this.life > 0) {
_root.ship.life = _root.ship.life - this.life;
}
}
if (this.life <= 0) {
this.gotoAndStop(5);
}
if (this.dead) {
score = score + 2200;
_root.boss1dead = true;
removeMovieClip(this);
}
if (((this._y > (this._height / 2)) && (this._currentframe == 1)) && (random(150) == 1)) {
this.gotoAndStop(6);
}
if (((this.rOpen.rp._currentframe == 8) && (!this.rShot)) && (random(20) == 1)) {
this.gotoAndStop(7);
boss1Shoot(2);
if (random(4) == 1) {
this.stopRockets = true;
}
}
if (this.rShoot.shootBomb._currentframe == 11) {
if (this.stopRockets) {
this.rShot = true;
}
this.gotoAndStop(6);
this.rOpen.rp.gotoAndStop(8);
this.rOpen.rp2.gotoAndStop(8);
}
if (this.rShot) {
this.rShot = false;
this.gotoAndStop(8);
}
if (((this._y > (this._height / 2)) && (this._currentframe == 1)) && (random(120) == 1)) {
this.gotoAndStop(2);
}
if (this.shot) {
this.shot = false;
this.gotoAndStop(4);
}
if (((this.opened._currentframe == 22) && (!this.shot)) && (random(25) == 1)) {
boss1Shoot(1);
this.shot = true;
}
if (this.hit._currentframe == 5) {
this.gotoAndStop(2);
this.opened.gotoAndStop(22);
}
var _local3 = 0;
while (_local3 < _root.pProjectiles.length) {
if (this.hitTest(pProjectiles[_local3]) && (!pProjectiles[_local3].discharged)) {
placeExplosion(1, pProjectiles[_local3]._x, pProjectiles[_local3]._y);
pProjectiles[_local3].dead = true;
if ((this._currentframe == 2) || (this._currentframe == 3)) {
if (this._currentframe != 3) {
this.gotoAndStop(3);
}
this.life = this.life - pProjectiles[_local3].damage;
} else if (!squiggleShieldActive) {
squiggleShieldActive = true;
var _local4 = _root.attachMovie("Sqiggle sheild", "Sqiggle sheild", _root.getNextHighestDepth(), {_x:this._x - 25, _y:this._y + 60});
_local4.onEnterFrame = function () {
if (!_root.Paused) {
if (this._currentframe == 10) {
squiggleShieldActive = false;
removeMovieClip(this);
}
}
};
}
}
_local3++;
}
if ((_root.ship._y - this._y) < (((this._height / 2) + (_root.ship._height / 2)) + 30)) {
this.moveUp = true;
}
if (this.moveUp) {
if (this._y > (this._height / 2)) {
this._y = this._y - (2.5 + _root.boost);
} else {
this.moveUp = false;
}
} else {
this._y = this._y + (0.8 + _root.boost);
}
if (_root.ship._x < this._x) {
this._x = this._x - 0.5;
}
if (_root.ship._x > this._x) {
this._x = this._x + 0.5;
}
if (Key.isDown(39) && ((_root.ship._x + (_root.ship._width / 2)) > (Stage.width - 5))) {
this._x = this._x - _root.ship.speed;
}
if (Key.isDown(37) && ((_root.ship._x - (_root.ship._width / 2)) < 5)) {
this._x = this._x + _root.ship.speed;
}
}
};
}
if (type == 2) {
b2 = _root.attachMovie("boss2", "boss2", _root.getNextHighestDepth(), {_x:Stage.width / 2, _y:-200, life:400});
b2.onEnterFrame = function () {
if ((_root.won || (_root.lost)) || (_root._currentframe == 2)) {
removeMovieClip(this);
}
if (!_root.Paused) {
if (this.hitTest(_root.ship) && (_root.ship.life > 0)) {
placeExplosion(1, _root.ship._x, _root.ship._y - (_root.ship._height / 2), 170);
this.life = this.life - _root.ship.life;
if (this.life > 0) {
_root.ship.life = _root.ship.life - this.life;
}
}
if (this.dead) {
score = score + 10000;
_root.boss2dead = true;
_root.won = true;
removeMovieClip(this);
}
if (_root.ship._x < this._x) {
this._x = this._x - 1.3;
}
if (_root.ship._x > this._x) {
this._x = this._x + 1.3;
}
if (this._currentframe == 1) {
if (this._y < 80) {
this._y = this._y + 2;
}
}
if (this._currentframe > 18) {
if (this._y < 160) {
this._y = this._y + 1;
}
}
}
};
}
}
var mainSound = _root.createEmptyMovieClip("mainSound", _root.getNextHighestDepth());
Snd = new Sound(mainSound);
Snd.attachSound("psytonic");
var currentMusic = "psytonic";
Snd.setVolume(40);
Snd.start(0, 10000);
var enemies = new Array();
var eProjectiles = new Array();
var pProjectiles = new Array();
var powerups = new Array();
var startingHealth = 25;
var startingSpeed = 5;
var startingEnergy = 100;
var BOSS1 = false;
var squiggleShieldActive = false;
var BOSS2 = false;
var boss1dead = false;
var boss2dead = false;
var level2 = false;
var level2time = -1;
var Paused = false;
var pausedCheck = true;
boost = 0;
time = 1;
score = 0;
lost = false;
won = false;
Frame 6
if (music == 1) {
if (currentMusic == "psytonic") {
Snd.setVolume(40);
}
if (currentMusic == "digital_dimention") {
Snd.setVolume(100);
}
} else {
Snd.setVolume(0);
}
if (!_root.Paused) {
if ((Key.isDown(80) && (pauseCheck == true)) && (time > 4)) {
_root.pauseCheck = false;
pm = _root.attachMovie("Pause menu", "PauseMenu", _root.getNextHighestDepth(), {_x:280, _y:200});
pm.onEnterFrame = function () {
if (_root._currentframe == 2) {
removeMovieClip(this);
}
};
_root.Paused = true;
}
if (_root.boost < 0) {
_root.boost = 0;
}
if (_root.wFlash._alpha > 0) {
_root.wFlash._alpha = _root.wFlash._alpha - 10;
}
if (ship.shieldTime > 0) {
var glow = (new flash.filters.GlowFilter(52224, 1, 10, 10, 1, 3, false, false));
var myTempFilters = ship.filters;
myTempFilters.push(glow);
ship.filters = myTempFilters;
}
if (ship.inBoost == true) {
var glow = (new flash.filters.GlowFilter(3381759, 1, 65, 65, 2, 3, false, false));
var blur = (new flash.filters.BlurFilter(12, 12, 3));
var myTempFilters = ship.filters;
myTempFilters.push(glow);
myTempFilters.push(blur);
ship.filters = myTempFilters;
}
collisionTest();
if ((time < 30) && (time > 5)) {
if (random(70 - boost) == 0) {
if (enemies.length < 7) {
addEnemy(3);
}
}
if (random(50 - boost) == 0) {
if (enemies.length < 7) {
addEnemy(1);
}
}
}
if ((time > 30) && (time < 70)) {
if (random(150 - boost) == 0) {
if (enemies.length < 7) {
addEnemy(3);
}
}
if (random(100 - boost) == 0) {
if (enemies.length < 7) {
addEnemy(1);
}
}
if (random(120 - boost) == 0) {
if (enemies.length < 7) {
addEnemy(2);
}
}
}
if ((time > 70) && (time < 120)) {
if (random(15 - boost) == 0) {
if (enemies.length < 10) {
addEnemy(4);
}
}
}
if (((!level2) && (time > 123)) && (!BOSS1)) {
BOSS1 = true;
createBoss(1);
}
if ((level2 && (time > (level2time + 5))) && (time < (level2time + 100))) {
if (random(90 - boost) == 0) {
if (enemies.length < 5) {
addEnemy(5);
}
}
}
if ((level2 && (time > (level2time + 90))) && (time < (level2time + 170))) {
if (random(150 - boost) == 0) {
if (enemies.length < 4) {
addEnemy(6);
}
}
}
if ((level2 && (time > (level2time + 150))) && (time < (level2time + 200))) {
if (random(140 - boost) == 0) {
if (enemies.length < 7) {
addEnemy(1);
}
}
if (random(180 - boost) == 0) {
if (enemies.length < 7) {
addEnemy(6);
}
}
}
if ((level2 && (time > (level2time + 190))) && (time < (level2time + 250))) {
if (random(140 - boost) == 0) {
if (enemies.length < 15) {
addEnemy(1);
}
}
if (random(70 - boost) == 0) {
if (enemies.length < 15) {
addEnemy(4);
}
}
}
if ((level2 && (time > (level2time + 250))) && (!BOSS2)) {
BOSS2 = true;
createBoss(2);
}
if (boss1dead && (level2time == -1)) {
level2time = time;
}
time = time + (1 / (33 - _root.boost));
_root.tTime.text = Math.round(time);
_root.txtScore.text = _root.score;
}
if (!Key.isDown(80)) {
pauseCheck = true;
}
Instance of Symbol 689 MovieClip "stars" in Frame 6
onClipEvent (load) {
function createStar(depth) {
size = random(100);
startX = random(this._width) - (this._width / 2);
var _local4 = this.attachMovie("star", "star_" + depth, depth, {_x:startX, _y:-210, _xscale:size, _yscale:size, colorset:false});
_local4.onEnterFrame = function () {
if (!_root.Paused) {
if ((!this.colorset) && (_root.boss1dead)) {
var _local3 = new Color(this);
_local3.setRGB(random(16000000));
this.colorset = true;
}
if (Key.isDown(39) && ((_root.ship._x + (_root.ship._width / 2)) > (Stage.width - 5))) {
this._x = this._x - _root.ship.speed;
}
if (Key.isDown(37) && ((_root.ship._x - (_root.ship._width / 2)) < 5)) {
this._x = this._x + _root.ship.speed;
}
this._y = this._y + ((this._xscale / 40) * (starSpeed + _root.boost));
if (((this._y > 200) || (_root.won)) || (_root.lost)) {
removeMovieClip(this);
}
}
};
}
starSpeed = 4;
d = 0;
}
onClipEvent (enterFrame) {
if (!_root.Paused) {
if (d > 500) {
d = 0;
}
if (_root.ship._alpha > 0) {
createStar(d);
}
d++;
}
}
Instance of Symbol 694 MovieClip in Frame 6
onClipEvent (enterFrame) {
if (!_root.Paused) {
if ((_root.boss1dead && (_y < 300)) && (!_root.level2)) {
this._y = this._y + (_root.ship.speed + _root.boost);
}
if (this.hitTest(_root.ship)) {
_root.ship._xscale = _root.ship._xscale - 0.8;
_root.ship._yscale = _root.ship._yscale - 0.8;
}
if ((_root.ship._xscale <= 10) && (!_root.level2)) {
_root.initLaser = _root.ship.laser;
_root.initNumLasers = _root.ship.numLasers;
_root.won = true;
}
}
}
Instance of Symbol 665 MovieClip "ship" in Frame 6
onClipEvent (load) {
function shoot(num) {
if (laser == 3) {
_root.addPProjectile(laser, this._x, this._y - (this._width / 2));
} else {
if ((laser == 2) && (num > 2)) {
num = 2;
}
var _local3 = 0;
while (_local3 < num) {
energy = energy - 3;
if ((_local3 % 2) == 1) {
multiplier = 1;
} else {
multiplier = -1;
}
if ((num % 2) == 1) {
_root.addPProjectile(laser, this._x + (10 * ((_local3 + (_local3 % 2)) * multiplier)), this._y - (this._width / 2));
} else {
_root.addPProjectile(laser, (this._x + (10 * ((_local3 + (_local3 % 2)) * multiplier))) - 10, this._y - (this._width / 2));
}
_local3++;
}
}
}
if (_root.initLaser == undefined) {
laser = 1;
} else {
laser = _root.initLaser;
}
xS = _xscale;
yS = _yscale;
inBoost = false;
shield = false;
shieldTime = 0;
if (!_root.level2) {
_alpha = 0;
} else {
_xscale = 1;
_yscale = 1;
}
delay = 0;
speed = _root.startingSpeed;
mLife = _root.startingHealth;
mEnergy = _root.startingEnergy;
life = mLife;
energy = mEnergy;
level = 1;
if (_root.initNumLasers == undefined) {
numLasers = 1;
} else {
numLasers = _root.initNumLasers;
}
}
onClipEvent (enterFrame) {
if (!_root.Paused) {
if (life <= 0) {
gotoAndStop (11);
if (this.explosion._currentframe == 20) {
_root.lost = true;
}
}
if ((laser == 1) && (mDelay != 8)) {
mDelay = 8;
}
if ((laser == 2) && (mDelay != 12)) {
mDelay = 12;
}
if ((laser == 3) & (mDelay != 15)) {
mDelay = 15;
}
if ((this._alpha > 0) && (this.life > 0)) {
delay++;
if (Key.isDown(32)) {
if ((delay > mDelay) && (energy > 0)) {
delay = 0;
shoot(numLasers);
}
}
if ((life < 10) && (_currentframe == 1)) {
gotoAndStop (4);
}
if ((life > 10) && (_currentframe == 4)) {
gotoAndStop (1);
}
if (Key.isDown(37)) {
if (life >= 10) {
gotoAndStop (5);
} else if (life < 10) {
gotoAndStop (7);
}
if (this._x > (this._width / 2)) {
this._x = this._x - speed;
}
} else {
if (_currentframe == 7) {
hLTurn.gotoAndPlay(5);
}
if (_currentframe == 5) {
LTurn.gotoAndPlay(5);
}
}
if (Key.isDown(39)) {
if (life > 10) {
gotoAndStop (6);
} else if (life < 10) {
gotoAndStop (8);
}
if (this._x < (Stage.width - (this._width / 2))) {
this._x = this._x + speed;
}
} else {
if (_currentframe == 6) {
RTurn.gotoAndPlay(5);
}
if (_currentframe == 8) {
hRTurn.gotoAndPlay(5);
}
}
if (Key.isDown(38)) {
if (this._y > (this._height / 2)) {
this._y = this._y - speed;
}
}
if (Key.isDown(40)) {
if (this._y < (Stage.height - (this._height / 2))) {
this._y = this._y + speed;
}
}
if ((Key.isDown(66) || ((_root.spaceDock._currentframe > 65) && (!_root.level2))) && (energy > 0)) {
if (energy > 0) {
if ((((this._currentframe != 2) && (!inBoost)) && (!Key.isDown(39))) && (!Key.isDown(37))) {
this.gotoAndStop(2);
}
if ((this.transforming._currentframe == 10) || ((Key.isDown(39) || (Key.isDown(37))) && (!inBoost))) {
gotoAndStop (1);
if (!this.inBoost) {
this.inBoost = true;
}
}
energy--;
if (_root.boost < 15) {
_root.boost = _root.boost + 0.4;
}
} else if (this.inBoost) {
this.inBoost = false;
}
} else {
if (_root.boost > 0) {
_root.boost = _root.boost - 1;
}
if (this.inBoost) {
this.inBoost = false;
if (_root.boost > 5.3) {
_root.wFlash._alpha = 100;
}
}
}
if (energy < mEnergy) {
energy = energy + 0.4;
}
if (shieldTime > 0) {
shieldTime = shieldTime - 0.0303030303030303;
}
if (shield) {
shieldTime = 5;
shield = false;
}
}
}
}
Instance of Symbol 702 MovieClip "spaceDock" in Frame 6
onClipEvent (load) {
if (_root.level2) {
this.gotoAndStop(90);
}
}
onClipEvent (enterFrame) {
if (_root.level2) {
if (_root.ship._xscale < _root.ship.xS) {
_root.ship._xscale++;
_root.ship._yscale++;
}
this._y = this._y + (_root.ship.speed + _root.boost);
} else {
if (this._currentframe == 81) {
unloadMovie (this);
}
if (this._currentframe > 65) {
_root.ship._alpha = 100;
this._y = this._y + 22;
}
}
}
Instance of Symbol 704 MovieClip in Frame 6
onClipEvent (enterFrame) {
if (_root.ship.energy >= 0) {
_xscale = _root.ship.energy;
}
}
Instance of Symbol 708 MovieClip in Frame 6
onClipEvent (enterFrame) {
if (_root.ship.life >= 0) {
_xscale = ((_root.ship.life / 25) * 100);
}
}
Instance of Symbol 714 MovieClip in Frame 6
onClipEvent (load) {
_xscale = ((_root.startingHealth / 25) * 100);
}
Instance of Symbol 715 MovieClip in Frame 6
onClipEvent (load) {
_xscale = _root.startingEnergy;
}
Frame 7
if (_root.won) {
_root.Snd.stop();
if (boss2dead) {
_root.gotoAndStop(11);
} else {
_root.gotoAndStop(9);
}
} else if (!_root.lost) {
gotoAndPlay (6);
} else {
_root.Snd.stop();
gotoAndStop (8);
}
Frame 8
stop();
Instance of Symbol 732 MovieClip in Frame 8
onClipEvent (load) {
S = new Sound(this);
S.attachSound("laugh");
if (_root.sounds == 1) {
S.setVolume(50);
} else {
S.setVolume(0);
}
S.start();
}
Frame 9
um.txtScore.text = score;
Instance of Symbol 790 MovieClip "um" in Frame 9
onClipEvent (load) {
S = new Sound(this);
S.attachSound("forBoris");
if (_root.music == 1) {
S.setVolume(20);
} else {
S.setVolume(0);
}
S.start(0, 10000);
}
Frame 11
stop();
Instance of Symbol 807 MovieClip "credscr" in Frame 11
onClipEvent (load) {
S = new Sound(this);
S.attachSound("battleMusic1");
if (_root.music == 1) {
S.setVolume(50);
} else {
S.setVolume(0);
}
S.start(0, 10);
}
Symbol 29 Button
on (release) {
_root.optionsMenu.removeMovieClip(this);
}
Symbol 31 Button
on (press) {
_root._quality = "high";
}
Symbol 32 Button
on (press) {
_root._quality = "medium";
}
Symbol 33 Button
on (press) {
_root._quality = "low";
}
Symbol 34 Button
on (press) {
_root.music = 1;
}
Symbol 35 Button
on (press) {
_root.music = 0;
}
Symbol 36 Button
on (press) {
_root.sounds = 1;
}
Symbol 37 Button
on (press) {
_root.sounds = 0;
}
Symbol 64 MovieClip Frame 3
stop();
Symbol 82 MovieClip Frame 12
stop();
Symbol 83 MovieClip [ene3] Frame 1
stop();
Symbol 83 MovieClip [ene3] Frame 2
stop();
Symbol 83 MovieClip [ene3] Frame 3
stop();
Instance of Symbol 97 MovieClip in Symbol 98 MovieClip Frame 1
on (press) {
_root.Snd.stop();
_root.gotoAndPlay(2);
}
Instance of Symbol 97 MovieClip in Symbol 98 MovieClip Frame 1
on (press) {
_parent._parent.removeMovieClip();
}
Symbol 107 Button
on (press) {
_root.attachMovie("optionsMenu", "optionsMenu", _root.getNextHighestDepth(), {_x:275, _y:200});
}
Instance of Symbol 97 MovieClip in Symbol 109 MovieClip [Pause menu] Frame 1
onClipEvent (enterFrame) {
if (_root.Paused) {
if (Key.isDown(80) && (_root.pauseCheck == true)) {
_root.Paused = false;
_root.pauseCheck = false;
_parent.removeMovieClip();
}
}
}
on (press) {
_root.Paused = false;
_parent.removeMovieClip();
}
Instance of Symbol 97 MovieClip in Symbol 109 MovieClip [Pause menu] Frame 1
on (press) {
sm1 = _parent.attachMovie("sub-menu 1", "sm1", _parent.getNextHighestDepth(), {_x:50, _y:50});
}
Symbol 143 MovieClip Frame 1
stop();
Symbol 143 MovieClip Frame 44
stop();
Instance of Symbol 143 MovieClip in Symbol 144 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((_root.boss2._currentframe > 2) && (this._currentframe == 1)) {
this.gotoAndPlay(2);
}
}
Instance of Symbol 143 MovieClip in Symbol 145 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((_root.boss2._currentframe > 2) && (this._currentframe == 1)) {
this.gotoAndPlay(2);
}
}
Symbol 147 MovieClip Frame 1
stop();
Instance of Symbol 143 MovieClip in Symbol 147 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((_root.boss2._currentframe > 2) && (this._currentframe == 1)) {
this.gotoAndPlay(2);
}
}
Instance of Symbol 143 MovieClip in Symbol 147 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((_root.boss2._currentframe > 2) && (this._currentframe == 1)) {
this.gotoAndPlay(2);
}
}
Symbol 147 MovieClip Frame 50
var i = 0;
while (i < random(40)) {
_root.placeExplosion(1, _root.boss2._x + (random(200) - 100), _root.boss2._y - (random(200) - 100), random(250) + 50, random(360));
i++;
}
Symbol 147 MovieClip Frame 59
_root.boss2.dead = true;
stop();
Symbol 161 MovieClip Frame 1
stop();
Symbol 161 MovieClip Frame 2
stop();
Symbol 162 MovieClip [boss2] Frame 1
stop();
Instance of Symbol 150 MovieClip in Symbol 162 MovieClip [boss2] Frame 1
onClipEvent (load) {
var life = 150;
}
onClipEvent (enterFrame) {
if (life <= 0) {
_root.placeExplosion(1, this._x + _parent._x, this._y + _parent._y, 300);
_root.placeExplosion(1, (this._x + _parent._x) - (this._width / 2), this._y + _parent._y, 300);
_root.placeExplosion(1, (this._x + _parent._x) + (this._width / 2), this._y + _parent._y, 300);
_parent.gotoAndPlay(2);
}
var i = 0;
while (i < _root.pProjectiles.length) {
if (this.hitTest(_root.pProjectiles[i])) {
this.life = this.life - _root.pProjectiles[i].damage;
if (_root.ship.laser != 3) {
_root.placeExplosion(1, _root.pProjectiles[i]._x, _root.pProjectiles[i]._y);
} else {
this.life = this.life - 7;
_root.placeExplosion(2, _root.pProjectiles[i]._x, this._y + _parent._y);
}
_root.pProjectiles[i].dead = true;
}
i++;
}
}
Instance of Symbol 161 MovieClip in Symbol 162 MovieClip [boss2] Frame 1
onClipEvent (load) {
function laserEyes() {
gotoAndPlay (2);
laserflag1 = true;
var g = (new flash.filters.GlowFilter(16711680, 1, 10, 10, 1.2, 3, false, false));
var b = (new flash.filters.BlurFilter(2, 2, 1));
var _local5 = _root.attachMovie("boss2laserEyes", "boss2laserEyes1", _root.getNextHighestDepth(), {Parent:this, GrandParent:_parent, _x:(this._x + _parent._x) - 38, _y:(this._y + _parent._y) - 25, _rotation:-30, _yscale:0, num:0});
_local5.onEnterFrame = function () {
if (this._yscale < 100) {
this._yscale = this._yscale + 10;
}
if (g.blurY < 15) {
g.blurY = g.blurY + 5;
g.blurX = g.blurX + 8;
g.strength = g.strength + 0.5;
b.blurX = b.blurX + 10;
b.blurY = b.blurY + 4;
this.filters = [b, g];
}
this.num = this.num + 5;
if (this.num >= 150) {
laserflag1 = false;
gotoAndStop (1);
removeMovieClip(this);
}
this._rotation = this._rotation + 5;
this._x = (this.Parent._x + this.GrandParent._x) - 38;
this._y = (this.Parent._y + this.GrandParent._y) - 25;
if (this.hitTest(_root.ship)) {
_root.ship.life = _root.ship.life - 0.2;
}
};
var g2 = (new flash.filters.GlowFilter(16711680, 1, 10, 10, 1.2, 3, false, false));
var b2 = (new flash.filters.BlurFilter(2, 2, 1));
var _local4 = _root.attachMovie("boss2laserEyes", "boss2laserEyes2", _root.getNextHighestDepth(), {Parent:this, GrandParent:_parent, _x:(this._x + _parent._x) + 38, _y:(this._y + _parent._y) - 25, _rotation:30, _yscale:0, num:0});
_local4.onEnterFrame = function () {
if (this._yscale < 100) {
this._yscale = this._yscale + 10;
}
if (g2.blurY < 15) {
g2.blurY = g2.blurY + 5;
g2.blurX = g2.blurX + 8;
g2.strength = g2.strength + 0.5;
b2.blurX = b2.blurX + 10;
b2.blurY = b2.blurY + 4;
this.filters = [b2, g2];
}
this.num = this.num + 5;
if (this.num >= 150) {
removeMovieClip(this);
}
this._rotation = this._rotation - 5;
this._x = (this.Parent._x + this.GrandParent._x) + 38;
this._y = (this.Parent._y + this.GrandParent._y) - 25;
if (this.hitTest(_root.ship)) {
_root.ship.life = _root.ship.life - 0.2;
}
};
}
function shoot1() {
var g = (new flash.filters.GlowFilter(16711680, 1, 10, 10, 1.2, 3, false, false));
var b = (new flash.filters.BlurFilter(2, 2, 1));
var _local5 = _root.attachMovie("boss2shot", "boss2shot", _root.getNextHighestDepth(), {_x:(this._x + _parent._x) + 5, _y:(this._y + _parent._y) + (this._height / 2)});
_local5.onEnterFrame = function () {
if (_root._currentframe == 2) {
removeMovieClip(this);
}
if (!_root.Paused) {
g.blurY = g.blurY + 5;
g.blurX = g.blurX + 8;
g.strength = g.strength + 0.5;
b.blurX = b.blurX + 10;
b.blurY = b.blurY + 4;
this.filters = [b, g];
if (g.blurX > 30) {
if ((_root.ship._x < (this._x + 75)) && (_root.ship._x > (this._x - 75))) {
var _local3 = 0;
while (_local3 < (random(4) + 1)) {
_root.placeExplosion(random(2) + 1, (this._x + random(50)) - 25, (_root.ship._y + random(50)) - 25, random(80) + 30);
_local3++;
}
_root.ship.life = _root.ship.life - 2;
}
_root.wFlash._alpha = 30;
removeMovieClip(this);
}
}
};
}
var shooting1 = false;
var shooting1flag1 = false;
var shooting1flag2 = 0;
var laserflag1 = false;
}
onClipEvent (enterFrame) {
if ((random(300) == 0) && (!laserflag1)) {
shooting1 = true;
}
if ((random(200) == 0) && (!laserflag1)) {
laserEyes();
}
var i = 0;
while (i < _root.pProjectiles.length) {
if (this.hitTest(_root.pProjectiles[i])) {
if (_root.ship.laser != 3) {
_root.removePProjectile(i);
} else if ((_root.pProjectiles[i]._x < ((this._x + _parent._x) + (this._width / 2))) && (_root.pProjectiles[i]._x > ((this._x + _parent._x) - (this._width / 2)))) {
_root.removePProjectile(i);
}
sc1 = _root.attachMovie("Sheild clip 1", "Sheild clip 1", _root.getNextHighestDepth(), {_x:this._x + _parent._x, _y:(this._y + _parent._y) + 30, _alpha:20});
sc1.onEnterFrame = function () {
if (this._currentframe == 9) {
removeMovieClip(this);
}
};
}
i++;
}
if (shooting1) {
if ((this._x > -104) && (!shooting1flag1)) {
gotoAndStop (2);
this._x = this._x - 4.5;
} else {
shooting1flag1 = true;
}
if (shooting1flag1 && (this._x < 100)) {
this._x = this._x + 5;
if (shooting1flag2 == 0) {
shoot1();
shooting1flag2 = 5;
} else {
shooting1flag2--;
}
if (this._x >= 99) {
shooting1flag1 = false;
shooting1 = false;
shooting1flag2 = 0;
gotoAndStop (1);
}
}
} else {
if ((_root.ship._x > (this._x + _parent._x)) && (this._x < 100)) {
this._x = this._x + 2.5;
}
if ((_root.ship._x < (this._x + _parent._x)) && (this._x > -104)) {
this._x = this._x - 2.5;
}
}
}
Instance of Symbol 147 MovieClip "boss2Body" in Symbol 162 MovieClip [boss2] Frame 18
onClipEvent (load) {
function tractor() {
var g = (new flash.filters.GlowFilter(16711680, 1, 10, 10, 1.2, 3, false, false));
var b = (new flash.filters.BlurFilter(2, 2, 1));
var _local4 = _root.attachMovie("boss2shot", "boss2shot", _root.getNextHighestDepth(), {_x:(this._x + _parent._x) + 5, _y:((this._y + _parent._y) + (this._height / 2)) - 40});
_local4.onEnterFrame = function () {
if (_root.ship._x < this._x) {
this._x = this._x - 1.3;
}
if (_root.ship._x > this._x) {
this._x = this._x + 1.3;
}
if (_root._currentframe == 2) {
removeMovieClip(this);
}
if (!_root.Paused) {
if (g.blurX > 100) {
if ((_root.ship._x < (this._x + 75)) && (_root.ship._x > (this._x - 75))) {
_root.ship._y = _root.ship._y - 8.5;
} else {
tractorFlag2 = true;
removeMovieClip(this);
}
} else {
g.blurY = g.blurY + 5;
g.blurX = g.blurX + 8;
g.strength = g.strength + 0.5;
b.blurX = b.blurX + 10;
b.blurY = b.blurY + 4;
this.filters = [b, g];
}
}
};
}
var tractorFlag = false;
var tractorFlag2 = false;
}
onClipEvent (enterFrame) {
if ((_root.boss2.life <= 0) && (this._currentframe == 1)) {
this.gotoAndPlay(2);
_root.boss2.head._alpha = 0;
var i = 0;
while (i < random(40)) {
_root.placeExplosion(1, _root.boss2._x + (random(200) - 100), _root.boss2._y - (random(200) - 100), random(250) + 50, random(360));
i++;
}
}
if (this._currentframe == 1) {
if ((random(150) == 0) && (_root.boss2._currentframe == 40)) {
_root.boss2.gotoAndPlay(41);
}
if ((_root.boss2._currentframe == 50) && (!this.tractorFlag)) {
this.tractorFlag = true;
tractor();
}
if (this.tractorFlag2 && (_root.boss2._currentframe > 40)) {
this.tractorFlag2 = false;
_root.boss2.gotoAndPlay(24);
}
if ((_root.boss2._currentframe == 40) && (this.tractorFlag)) {
this.tractorFlag = false;
}
if (random(400) == 0) {
var fl = _root.attachMovie("fighterLaunch", "fighterLaunch", _root.getNextHighestDepth(), {_x:_root.boss2._x + 188.9, _y:_root.boss2._y - 90});
fl.onEnterFrame = function () {
if (this._currentframe == 15) {
_root.addEnemy(4, 55.1, true);
_root.enemies[_root.enemies.length - 1]._x = this._x + 90;
_root.enemies[_root.enemies.length - 1]._y = this._y + 165;
removeMovieClip(this);
}
};
}
if (random(400) == 0) {
var fl = _root.attachMovie("fighterLaunch", "fighterLaunch", _root.getNextHighestDepth(), {_x:_root.boss2._x - 188.9, _y:_root.boss2._y - 90, _xscale:-100});
fl.onEnterFrame = function () {
if (this._currentframe == 15) {
_root.addEnemy(4, -34.9, true);
_root.enemies[_root.enemies.length - 1]._x = this._x - 90;
_root.enemies[_root.enemies.length - 1]._y = this._y + 165;
removeMovieClip(this);
}
};
}
var i = 0;
while (i < _root.pProjectiles.length) {
if (this.hitTest(_root.pProjectiles[i])) {
_root.boss2.life = _root.boss2.life - _root.pProjectiles[i].damage;
if (_root.ship.laser != 3) {
_root.placeExplosion(1, _root.pProjectiles[i]._x, _root.pProjectiles[i]._y);
} else {
_root.boss2.life = _root.boss2.life - 7;
_root.placeExplosion(2, _root.pProjectiles[i]._x, this._y + this._parent._y);
}
_root.pProjectiles[i].dead = true;
}
i++;
}
}
}
Symbol 162 MovieClip [boss2] Frame 40
stop();
Symbol 162 MovieClip [boss2] Frame 50
stop();
Symbol 179 MovieClip [Sqiggle sheild] Frame 10
stop();
Symbol 189 MovieClip [fExplosion] Frame 11
stop();
Symbol 195 MovieClip [Plasma suck] Frame 45
stop();
Symbol 219 MovieClip Frame 8
stop();
Symbol 220 MovieClip [Space rock 1] Frame 1
stop();
Symbol 220 MovieClip [Space rock 1] Frame 2
stop();
Symbol 220 MovieClip [Space rock 1] Frame 3
stop();
Symbol 241 MovieClip Frame 3
stop();
Symbol 257 MovieClip [ene2] Frame 1
stop();
Symbol 257 MovieClip [ene2] Frame 2
stop();
Symbol 257 MovieClip [ene2] Frame 3
stop();
Symbol 300 MovieClip Frame 22
stop();
Symbol 310 MovieClip Frame 5
stop();
Symbol 313 MovieClip Frame 22
_parent.gotoAndStop(1);
Symbol 323 MovieClip Frame 14
_root.boss1.dead = true;
Symbol 332 MovieClip Frame 8
stop();
Symbol 335 MovieClip Frame 11
stop();
Symbol 345 MovieClip Frame 8
_parent._parent.gotoAndStop(1);
Symbol 347 MovieClip [boss1] Frame 1
stop();
Symbol 347 MovieClip [boss1] Frame 2
stop();
Symbol 347 MovieClip [boss1] Frame 3
stop();
Symbol 347 MovieClip [boss1] Frame 4
stop();
Symbol 347 MovieClip [boss1] Frame 5
stop();
Symbol 347 MovieClip [boss1] Frame 6
stop();
Symbol 347 MovieClip [boss1] Frame 7
stop();
Symbol 347 MovieClip [boss1] Frame 8
stop();
Symbol 361 MovieClip Frame 3
stop();
Symbol 373 MovieClip Frame 20
stop();
Symbol 374 MovieClip [ene5] Frame 1
stop();
Symbol 374 MovieClip [ene5] Frame 2
stop();
Symbol 374 MovieClip [ene5] Frame 3
stop();
Symbol 385 MovieClip Frame 3
stop();
Symbol 393 MovieClip Frame 10
stop();
Symbol 398 MovieClip Frame 20
_parent.gotoAndPlay(5);
Symbol 404 MovieClip Frame 20
stop();
Symbol 405 MovieClip Frame 20
_parent.gotoAndPlay(1);
Symbol 406 MovieClip [ene6] Frame 1
stop();
Symbol 406 MovieClip [ene6] Frame 2
stop();
Symbol 406 MovieClip [ene6] Frame 3
stop();
Symbol 406 MovieClip [ene6] Frame 4
stop();
Symbol 406 MovieClip [ene6] Frame 5
stop();
Symbol 406 MovieClip [ene6] Frame 6
stop();
Symbol 431 MovieClip Frame 3
stop();
Symbol 443 MovieClip Frame 15
stop();
Symbol 444 MovieClip [ene1] Frame 1
stop();
Symbol 444 MovieClip [ene1] Frame 2
stop();
Symbol 444 MovieClip [ene1] Frame 3
stop();
Symbol 455 Button
on (press) {
_parent.gotoAndStop(31);
}
Symbol 456 MovieClip Frame 20
gotoAndPlay (1);
Symbol 456 MovieClip Frame 21
stop();
Symbol 499 MovieClip Frame 31
stop();
Symbol 534 MovieClip Frame 140
_root.gotoAndPlay(_root._currentframe + 1);
Symbol 535 MovieClip Frame 1
stop();
Symbol 540 Button
on (press) {
getURL ("http://java-gaming.com", blank);
}
Symbol 543 Button
on (press) {
getURL ("http://flashninjaclan.com/", blank);
}
Symbol 563 Button
on (press) {
getURL ("http://flashninjaclan.com", blank);
}
Symbol 564 Button
on (press) {
_root.menuChoice = 1;
_root.menu.play();
}
Symbol 565 Button
on (press) {
_root.attachMovie("optionsMenu", "optionsMenu", _root.getNextHighestDepth(), {_x:275, _y:200});
}
Symbol 566 Button
on (press) {
_root.menuChoice = 3;
_root.menu.play();
}
Symbol 567 Button
on (press) {
_root.menuChoice = 2;
_root.menu.play();
}
Symbol 568 Button
on (press) {
getURL ("http://flashninjaclan.com", blank);
}
Symbol 569 Button
on (press) {
getURL ("http://java-gaming.com", blank);
}
Symbol 572 MovieClip Frame 35
Symbol 572 MovieClip Frame 65
stop();
Symbol 572 MovieClip Frame 76
S.stop();
if (_root.menuChoice == 1) {
_root.gotoAndPlay(4);
}
if (_root.menuChoice == 2) {
_root.gotoAndPlay(3);
}
if (_root.menuChoice == 3) {
_root.gotoAndPlay(11);
}
Symbol 574 Button
on (press) {
if (muted == false) {
muted = true;
GLOBALSOUND.setVolume(0);
} else {
muted = false;
GLOBALSOUND.setVolume(100);
}
}
Symbol 608 MovieClip Frame 11
_parent.gotoAndStop(1);
Symbol 618 MovieClip Frame 4
stop();
Symbol 618 MovieClip Frame 6
_root.ship.gotoAndStop(1);
Symbol 624 MovieClip Frame 4
stop();
Symbol 624 MovieClip Frame 6
_root.ship.gotoAndStop(1);
Symbol 630 MovieClip Frame 4
stop();
Symbol 630 MovieClip Frame 6
_root.ship.gotoAndStop(1);
Symbol 636 MovieClip Frame 4
stop();
Symbol 636 MovieClip Frame 6
_root.ship.gotoAndStop(1);
Symbol 642 MovieClip Frame 4
stop();
Symbol 642 MovieClip Frame 6
if (Key.isDown(66)) {
_root.ship.gotoAndStop(3);
} else {
_root.ship.gotoAndStop(1);
}
Symbol 649 MovieClip Frame 4
stop();
Symbol 649 MovieClip Frame 6
if (Key.isDown(66)) {
_root.ship.gotoAndStop(3);
} else {
_root.ship.gotoAndStop(1);
}
Symbol 664 MovieClip Frame 20
stop();
Symbol 665 MovieClip Frame 1
if (_root.ship.life < 10) {
gotoAndStop (4);
} else {
stop();
}
Symbol 665 MovieClip Frame 2
stop();
Symbol 665 MovieClip Frame 3
stop();
Symbol 665 MovieClip Frame 4
stop();
Symbol 665 MovieClip Frame 5
stop();
Symbol 665 MovieClip Frame 6
stop();
Symbol 665 MovieClip Frame 7
stop();
Symbol 665 MovieClip Frame 8
stop();
Symbol 665 MovieClip Frame 9
stop();
Symbol 665 MovieClip Frame 10
stop();
Symbol 665 MovieClip Frame 11
stop();
Instance of Symbol 672 MovieClip in Symbol 673 MovieClip Frame 1
on (press) {
_root.gotoAndPlay(2);
}
Symbol 673 MovieClip Frame 2
gotoAndPlay (1);
Symbol 687 MovieClip Frame 1
a = new Sound(this);
a.attachSound("3031final");
if (_root.music == 0) {
a.setVolume(0);
}
a.start(0, 99);
Instance of Symbol 686 MovieClip in Symbol 687 MovieClip Frame 1
on (press) {
_parent.gotoAndStop(2365);
}
Symbol 687 MovieClip Frame 2365
a.stop();
_root.gotoAndPlay(_root._currentframe + 1);
Instance of Symbol 686 MovieClip in Symbol 687 MovieClip Frame 2365
on (press) {
_parent.a.stop();
_root.gotoAndPlay(_root._currentframe + 1);
}
Instance of Symbol 601 MovieClip in Symbol 702 MovieClip Frame 66
onClipEvent (enterFrame) {
_alpha = 0;
}
Symbol 702 MovieClip Frame 89
stop();
Symbol 702 MovieClip Frame 90
stop();
Symbol 731 Button
on (press) {
_root.gotoAndPlay(2);
}
Symbol 732 MovieClip Frame 76
stop();
Symbol 752 Button
on (press) {
_root.um.S.stop();
_root.won = false;
_root.level2 = true;
_root.currentMusic = "digital_dimention";
_root.Snd.attachSound("digital_dimention");
_root.Snd.start(0, 10000);
_root.gotoAndPlay(6);
}
Symbol 768 MovieClip Frame 1
stop();
Symbol 768 MovieClip Frame 2
stop();
Symbol 790 MovieClip Frame 1
stop();
Instance of Symbol 772 MovieClip in Symbol 790 MovieClip Frame 1
onClipEvent (load) {
tp = 0;
}
on (press) {
if ((_root.score > 1500) && (tp < 5)) {
_root.score = _root.score - 1500;
_parent.txtScore.text = _parent.txtScore.text - 1500;
_root.startingEnergy = _root.startingEnergy + 20;
tp++;
if (tp == 1) {
_parent.ei_1.gotoAndStop(2);
}
if (tp == 2) {
_parent.ei_2.gotoAndStop(2);
}
if (tp == 3) {
_parent.ei_3.gotoAndStop(2);
}
if (tp == 4) {
_parent.ei_4.gotoAndStop(2);
}
if (tp == 5) {
_parent.ei_5.gotoAndStop(2);
}
}
}
Instance of Symbol 772 MovieClip in Symbol 790 MovieClip Frame 1
onClipEvent (load) {
tp = 0;
}
on (press) {
if ((_root.score > 1000) && (tp < 5)) {
_root.score = _root.score - 1000;
_parent.txtScore.text = _parent.txtScore.text - 1000;
_root.startingSpeed = _root.startingSpeed + 1;
tp++;
if (tp == 1) {
_parent.si_1.gotoAndStop(2);
}
if (tp == 2) {
_parent.si_2.gotoAndStop(2);
}
if (tp == 3) {
_parent.si_3.gotoAndStop(2);
}
if (tp == 4) {
_parent.si_4.gotoAndStop(2);
}
if (tp == 5) {
_parent.si_5.gotoAndStop(2);
}
}
}
Instance of Symbol 772 MovieClip in Symbol 790 MovieClip Frame 1
onClipEvent (load) {
tp = 0;
}
on (press) {
if ((_root.score > 2000) && (tp < 5)) {
_root.score = _root.score - 2000;
_parent.txtScore.text = _parent.txtScore.text - 2000;
_root.startingHealth = _root.startingHealth + 5;
tp++;
if (tp == 1) {
_parent.hi_1.gotoAndStop(2);
}
if (tp == 2) {
_parent.hi_2.gotoAndStop(2);
}
if (tp == 3) {
_parent.hi_3.gotoAndStop(2);
}
if (tp == 4) {
_parent.hi_4.gotoAndStop(2);
}
if (tp == 5) {
_parent.hi_5.gotoAndStop(2);
}
}
}
Symbol 804 Button
on (release) {
_root.credscr.S.stop();
_root.gotoAndPlay(2);
}
Instance of Symbol 806 MovieClip in Symbol 807 MovieClip Frame 1
on (press) {
getURL ("http://myspace.com/mejibo", blank);
}
Instance of Symbol 806 MovieClip in Symbol 807 MovieClip Frame 1
on (press) {
getURL ("mailto:madcheshiregirl@aol.com");
}