Combined Code
movieClip 2 {
}
movieClip 3 {
}
movieClip 5 cannon_trail {
frame 1 {
alphafade = 4;
_alpha = 30;
this.onEnterFrame = function () {
_alpha = _alpha - alphafade;
if (_alpha <= 2) {
removeMovieClip(this);
delete this.onEnterFrame;
}
};
}
}
movieClip 7 {
}
movieClip 9 {
frame 1 {
function destroyed() {
this.swapDepths(1);
removeMovieClip(this);
delete this.onEnterFrame;
}
}
}
movieClip 10 {
frame 1 {
stop();
}
}
movieClip 12 {
}
movieClip 13 {
frame 1 {
stop();
}
frame 15 {
gotoAndStop(1);
}
}
movieClip 21 {
frame 1 {
stop();
}
}
movieClip 22 turret {
frame 1 {
function createShot() {
_root.bulleti += 1;
_root.bulletdepth += 1;
_root.attachMovie('turret_bullet', 'bullet' + _root.bulleti, _root.bulletdepth);
_root.Bullet[_root.BulletSize] = _root['bullet' + _root.bulleti];
_root.BulletSize += 1;
_root['bullet' + _root.bulleti]._x = _x;
_root['bullet' + _root.bulleti]._y = _y;
_root['bullet' + _root.bulleti]._rotation = _rotation;
turret.gotoAndPlay(2);
}
function damaged() {
i = 0;
while (i < 5) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('turret_shrapnel', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
++i;
}
damage += 1;
if (damage == 1) {
cannon_body.gotoAndStop(random(3) + 2);
}
if (damage == 2) {
cannon_body.gotoAndStop(cannon_body._currentframe + 4);
}
if (damage == 3) {
i = 0;
while (i < _root.PlayerSize) {
if (_root.Player[i] == this) {
_root.Player.splice(i, 1);
_root.PlayerSize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
}
stop();
time = 0;
time2 = 0;
damage = 0;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == true) {
time += 1;
this._rotation += (degrees - this._rotation) / 50;
} else {
time += 5;
this._rotation += (degrees - this._rotation) / 10;
}
lockon = false;
closest = 200;
i = 0;
while (i < _root.EnemySize) {
distance = Math.sqrt(Math.pow(_x - _root.Enemy[i]._x, 2) + Math.pow(_y - _root.Enemy[i]._y, 2));
if (distance < closest) {
lockon = true;
closest = distance;
dx = _root.Enemy[i]._x - _x;
dy = _root.Enemy[i]._y - _y;
}
++i;
}
if (time >= 30 && lockon) {
time = 0;
createShot();
}
radians = Math.atan2(dy, dx);
degrees = Math.round(radians * 180 / Math.PI);
difference = _rotation - degrees;
if (difference > 180) {
degrees += 360;
}
if (difference < -180) {
degrees -= 360;
}
frame._rotation = (landrotation + _rotation) * -1;
i = 0;
while (i <= _root.EnemySize) {
if (this.hitTest(_root.Enemy[i]._x, _root.Enemy[i]._y, true)) {
_root.Enemy[i].destroyed();
damaged();
}
++i;
}
}
};
}
}
movieClip 23 {
frame 1 {
stop();
}
}
movieClip 25 {
}
movieClip 26 cannon {
frame 1 {
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (!_root.frozen) {
this._rotation = degrees;
frozen._alpha = 0;
} else {
frozen._alpha = 100;
}
radians = Math.atan2(_root.cursor._y - this._y, _root.cursor._x - this._x);
degrees = Math.round(radians * 180 / Math.PI);
if (_root.playerhealth < 1 && !_root.playerdead) {
_root.playsound('playerexplode');
_root.playerdead = true;
_root.hud.healthbar.gotoAndStop(2);
if (!_root.wave) {
_root.wavecreated = true;
_root.attachMovie('wave', 'wave2', _root.wavedepth);
}
_root.dead = true;
_root.hud.fadeaway = true;
_root.cannon._alpha = 0;
if (_root.bossbar) {
_x = 400;
_y = 400;
}
}
}
};
}
frame 15 {
gotoAndStop(1);
}
}
movieClip 28 bullet2_2 {
frame 1 {
function createSpark(dir) {
_root.playsound('fizz');
i = 0;
while (i < 5) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('bullet2_spark', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
if (dir == 1) {
_root['enemy_piece' + _root.enemypieceI].dir = 1;
_root['enemy_piece' + _root.enemypieceI]._x = _root.bounds.left - 17;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
}
if (dir == 2) {
_root['enemy_piece' + _root.enemypieceI].dir = 2;
_root['enemy_piece' + _root.enemypieceI]._x = _root.bounds.right + 17;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
}
if (dir == 3) {
_root['enemy_piece' + _root.enemypieceI].dir = 3;
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.bounds.up - 17;
}
if (dir == 4) {
_root['enemy_piece' + _root.enemypieceI].dir = 4;
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.bounds.down + 17;
}
++i;
}
i = 0;
while (i < _root.BulletSize) {
if (_root.Bullet[i] == this) {
_root.Bullet.splice(i, 1);
_root.BulletSize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
function createTrail(xdir, ydir) {
_root.enemypiecedepth += 1;
_root.enemypieceI += 1;
_root.attachMovie('b2_trail', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
_root['enemy_piece' + _root.enemypieceI]._x -= xdir;
_root['enemy_piece' + _root.enemypieceI]._y -= ydir;
}
weaponType = 2;
this._rotation = random(360) + 1;
angle = this._rotation;
firepower = 8;
dirx = Math.cos(angle * Math.PI / 180) * firepower;
diry = Math.sin(angle * Math.PI / 180) * firepower;
this._x += dirx;
this._y += diry;
time = 0;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == true) {
_x = _x + dirx / 5;
_y = _y + diry / 5;
time += 1;
_rotation = _rotation + 2;
} else {
_x = _x + dirx;
_y = _y + diry;
time += 5;
_rotation = _rotation + 10;
}
if (time >= 5) {
createTrail(dirx, diry);
time = 0;
}
if (this._alpha < 2 || deletion) {
i = 0;
while (i < _root.BulletSize) {
if (_root.Bullet[i] == this) {
_root.Bullet.splice(i, 1);
_root.BulletSize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
if (_x < _root.bounds.left - 15) {
createSpark(1);
}
if (_x > _root.bounds.right + 15) {
createSpark(2);
}
if (_y < _root.bounds.up - 15) {
createSpark(3);
}
if (_y > _root.bounds.down + 15) {
createSpark(4);
}
}
};
}
}
movieClip 30 bullet4 {
frame 1 {
function BlowItUp() {
_root.explode();
i = 0;
while (i < 10) {
_root.bulleti += 1;
_root.bulletdepth += 1;
_root.attachMovie('bullet4_bullet', 'bullet' + _root.bulleti, _root.bulletdepth);
_root.Bullet[_root.BulletSize] = _root['bullet' + _root.bulleti];
_root.BulletSize += 1;
_root['bullet' + _root.bulleti]._x = _x;
_root['bullet' + _root.bulleti]._y = _y;
++i;
}
i = 0;
while (i < _root.BulletSize) {
if (_root.Bullet[i] == this) {
_root.Bullet.splice(i, 1);
_root.BulletSize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
function createTrail(xdir, ydir) {
_root.enemypiecedepth += 1;
_root.enemypieceI += 1;
_root.attachMovie('b4_trail', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
_root['enemy_piece' + _root.enemypieceI]._x -= xdir * 1.5;
_root['enemy_piece' + _root.enemypieceI]._y -= ydir * 1.5;
}
_root.playsound('weapon4sound');
this._x = _root.cannon._x;
this._y = _root.cannon._y;
this._rotation = _root.cannon._rotation;
rotationspeed = Math.random() * 5 + 5;
if (random(2) == 0) {
rotationspeed *= -1;
}
weaponType = 4;
angle = _root.cannon._rotation;
firepower = 15;
dirx = Math.cos(angle * Math.PI / 180) * firepower;
diry = Math.sin(angle * Math.PI / 180) * firepower;
this._x += dirx * 1.5;
this._y += diry * 1.5;
time = 0;
detonation = false;
fadeaway = 0;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == true) {
_x = _x + dirx / 5;
_y = _y + diry / 5;
time += 1;
_rotation = _rotation + rotationspeed / 5;
fadeaway += 1;
} else {
_x = _x + dirx;
_y = _y + diry;
time += 5;
_rotation = _rotation + rotationspeed;
fadeaway += 5;
}
if (detonation) {
BlowItUp();
}
if (time >= 5) {
createTrail(dirx, diry);
time = 0;
}
if (fadeaway >= 350 || _root.deleteALL == true) {
i = 0;
while (i < _root.BulletSize) {
if (_root.Bullet[i] == this) {
_root.Bullet.splice(i, 1);
_root.BulletSize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
if (_x < _root.bounds.left - 15) {
BlowItUp();
}
if (_x > _root.bounds.right + 15) {
BlowItUp();
}
if (_y < _root.bounds.up - 15) {
BlowItUp();
}
if (_y > _root.bounds.down + 15) {
BlowItUp();
}
}
};
}
}
movieClip 31 bullet2 {
frame 1 {
function createSpark(dir) {
_root.playsound('fizz');
i = 0;
while (i < 5) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('bullet2_spark', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
if (dir == 1) {
_root['enemy_piece' + _root.enemypieceI].dir = 1;
_root['enemy_piece' + _root.enemypieceI]._x = _root.bounds.left - 17;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
}
if (dir == 2) {
_root['enemy_piece' + _root.enemypieceI].dir = 2;
_root['enemy_piece' + _root.enemypieceI]._x = _root.bounds.right + 17;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
}
if (dir == 3) {
_root['enemy_piece' + _root.enemypieceI].dir = 3;
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.bounds.up - 17;
}
if (dir == 4) {
_root['enemy_piece' + _root.enemypieceI].dir = 4;
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.bounds.down + 17;
}
++i;
}
i = 0;
while (i < _root.BulletSize) {
if (_root.Bullet[i] == this) {
_root.Bullet.splice(i, 1);
_root.BulletSize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
function createTrail(xdir, ydir) {
_root.enemypiecedepth += 1;
_root.enemypieceI += 1;
_root.attachMovie('b2_trail', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
_root['enemy_piece' + _root.enemypieceI]._x -= xdir;
_root['enemy_piece' + _root.enemypieceI]._y -= ydir;
}
_root.playsound('fizz2');
this._x = _root.cannon._x;
this._y = _root.cannon._y;
this._rotation = _root.cannon._rotation;
weaponType = 2;
angle = _root.cannon._rotation;
firepower = 8;
dirx = Math.cos(angle * Math.PI / 180) * firepower;
diry = Math.sin(angle * Math.PI / 180) * firepower;
this._x += dirx * 2;
this._y += diry * 2;
time = 0;
time2 = 0;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == true) {
_x = _x + dirx / 5;
_y = _y + diry / 5;
time += 1;
time2 += 1;
_rotation = _rotation + 2;
} else {
_x = _x + dirx;
_y = _y + diry;
time += 5;
time2 += 5;
_rotation = _rotation + 10;
}
if (time >= 5) {
createTrail(dirx, diry);
time = 0;
}
if (time2 >= 600 || deletion) {
i = 0;
while (i < _root.BulletSize) {
if (_root.Bullet[i] == this) {
_root.Bullet.splice(i, 1);
_root.BulletSize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
if (_x < _root.bounds.left - 15) {
createSpark(1);
}
if (_x > _root.bounds.right + 15) {
createSpark(2);
}
if (_y < _root.bounds.up - 15) {
createSpark(3);
}
if (_y > _root.bounds.down + 15) {
createSpark(4);
}
}
};
}
}
movieClip 33 {
frame 1 {
}
}
movieClip 34 smoke {
frame 1 {
stop();
this._rotation = random(360);
_alpha = random(50) + 50;
alphafade = 0.4;
xscale = Math.random() * 2 + 2;
yscale = xscale;
time = 0;
speed = Math.random() * 2 + 2;
angle = random(360) + 1;
dirx = Math.cos(angle * Math.PI / 180) * speed;
diry = Math.sin(angle * Math.PI / 180) * speed;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == true) {
dirx *= 0.99;
diry *= 0.99;
_xscale = _xscale + xscale;
_yscale = _yscale + yscale;
trail._xscale += 4;
this._alpha -= alphafade;
time += 1;
_x = _x + dirx / 5;
_y = _y + diry / 5;
} else {
dirx *= 0.95;
diry *= 0.95;
_xscale = _xscale + xscale * 5;
_yscale = _yscale + yscale * 5;
trail._xscale += 20;
this._alpha -= alphafade * 5;
time += 5;
_x = _x + dirx;
_y = _y + diry;
}
if (time >= 5) {
time = 0;
nextFrame();
gotoAndStop(undefined);
undefined;
}
if (this._alpha < 2 || _root.deleteALL == true) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 39 {
frame 1 {
gotoAndStop(random(3) + 1);
}
}
movieClip 41 {
}
movieClip 52 {
frame 1 {
frame._alpha = 0;
gotoAndStop(random(10) + 1);
}
}
movieClip 53 fire {
frame 1 {
stop();
this._rotation = random(360);
_x = _x + (Math.random() * 30 - 15);
_y = _y + (Math.random() * 30 - 15);
alphafade = 1;
xscale = Math.random() * 3 + 5;
yscale = Math.random() * 3 + 5;
time = 0;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == true) {
_xscale = _xscale + xscale;
_yscale = _yscale + yscale;
trail._xscale += 4;
this._alpha -= alphafade;
time += 1;
} else {
_xscale = _xscale + xscale * 5;
_yscale = _yscale + yscale * 5;
trail._xscale += 20;
this._alpha -= alphafade * 5;
time += 5;
}
if (time >= 5) {
time = 0;
nextFrame();
gotoAndStop(undefined);
undefined;
}
if (this._alpha < 2 || _root.deleteALL == true) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
frame 35 {
stop();
}
}
movieClip 54 bullet5 {
frame 1 {
stop();
this._x = _root.cannon._x;
this._y = _root.cannon._y;
this._rotation = random(360);
weaponType = 5;
alphafade = 0.4;
angle = _root.cannon._rotation;
firepower = Math.random() + 5;
dirx = Math.cos(angle * Math.PI / 180) * firepower;
diry = Math.sin(angle * Math.PI / 180) * firepower;
xscale = Math.random() * 4 + 4;
yscale = Math.random() * 4 + 4;
this._x += dirx * 5;
this._y += diry * 5;
time = 0;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == true) {
_xscale = _xscale + xscale;
_yscale = _yscale + yscale;
_x = _x + dirx / 5;
_y = _y + diry / 5;
trail._xscale += 4;
this._alpha -= alphafade;
time += 1;
} else {
_xscale = _xscale + xscale * 5;
_yscale = _yscale + yscale * 5;
_x = _x + dirx;
_y = _y + diry;
trail._xscale += 20;
this._alpha -= alphafade * 5;
time += 5;
}
if (time >= 5) {
time = 0;
nextFrame();
gotoAndStop(undefined);
undefined;
}
i = 0;
while (i <= _root.EnemySize) {
if (this.hitTest(_root.Enemy[i]._x, _root.Enemy[i]._y, true)) {
_root.Enemy[i].onFire = true;
}
++i;
}
if (this._alpha < 2 || deletion) {
i = 0;
while (i < _root.BulletSize) {
if (_root.Bullet[i] == this) {
_root.Bullet.splice(i, 1);
_root.BulletSize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
frame 50 {
stop();
}
}
// unknown tag 88 length 69
movieClip 72 {
frame 1 {
gotoAndStop(random(_totalframes) + 1);
}
}
movieClip 73 bullet0 {
frame 1 {
weaponType = 10;
this._x = _root.cannon._x;
this._y = _root.cannon._y;
this._rotation = _root.cannon._rotation;
angle = _root.cannon._rotation;
firepower = 12;
dirx = Math.cos(angle * Math.PI / 180) * firepower;
diry = Math.sin(angle * Math.PI / 180) * firepower;
this._x += dirx * 3;
this._y += diry * 3;
_xscale = 30;
_yscale = 30;
frame._alpha = 0;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == true) {
_x = _x + dirx / 5;
_y = _y + diry / 5;
trail._xscale += 4;
this._alpha -= 0.1;
_xscale = _xscale + (100 - _xscale) / 50;
_yscale = _yscale + (100 - _yscale) / 50;
} else {
_x = _x + dirx;
_y = _y + diry;
trail._xscale += 20;
this._alpha -= 1.5;
_xscale = _xscale + (100 - _xscale) / 10;
_yscale = _yscale + (100 - _yscale) / 10;
}
i = 0;
while (i <= _root.EnemySize) {
if (this.hitTest(_root.Enemy[i]._x, _root.Enemy[i]._y, true)) {
_root.Enemy[i].destroyed();
}
++i;
}
if (this._alpha < 2 || deletion) {
i = 0;
while (i < _root.BulletSize) {
if (_root.Bullet[i] == this) {
_root.Bullet.splice(i, 1);
_root.BulletSize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 75 {
}
movieClip 77 {
}
movieClip 78 turret_bullet {
frame 1 {
function createSpark(dir) {
i = 0;
while (i < 5) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('bullet1_spark', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
if (dir == 1) {
_root['enemy_piece' + _root.enemypieceI].dir = 1;
_root['enemy_piece' + _root.enemypieceI]._x = _root.bounds.left - 20;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
}
if (dir == 2) {
_root['enemy_piece' + _root.enemypieceI].dir = 2;
_root['enemy_piece' + _root.enemypieceI]._x = _root.bounds.right + 20;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
}
if (dir == 3) {
_root['enemy_piece' + _root.enemypieceI].dir = 3;
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.bounds.up - 20;
}
if (dir == 4) {
_root['enemy_piece' + _root.enemypieceI].dir = 4;
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.bounds.down + 20;
}
++i;
}
i = 0;
while (i < _root.BulletSize) {
if (_root.Bullet[i] == this) {
_root.Bullet.splice(i, 1);
_root.BulletSize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
weaponType = 1;
angle = _rotation;
firepower = 15;
dirx = Math.cos(angle * Math.PI / 180) * firepower;
diry = Math.sin(angle * Math.PI / 180) * firepower;
this._x += dirx * 1.5;
this._y += diry * 1.5;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == true) {
_x = _x + dirx / 5;
_y = _y + diry / 5;
trail._xscale += 4;
this._alpha -= 0.1;
} else {
_x = _x + dirx;
_y = _y + diry;
trail._xscale += 20;
this._alpha -= 1.5;
}
if (this._alpha < 2 || deletion) {
i = 0;
while (i < _root.BulletSize) {
if (_root.Bullet[i] == this) {
_root.Bullet.splice(i, 1);
_root.BulletSize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
if (_x < _root.bounds.left - 15) {
createSpark(1);
}
if (_x > _root.bounds.right + 15) {
createSpark(2);
}
if (_y < _root.bounds.up - 15) {
createSpark(3);
}
if (_y > _root.bounds.down + 15) {
createSpark(4);
}
}
};
}
}
movieClip 80 turret_shrapnel {
frame 1 {
weaponType = 1;
this._rotation = random(360) + 1;
randomrotation = Math.random() * 10 + 1;
angle = _rotation;
firepower = Math.random() * 5 + 5;
dirx = Math.cos(angle * Math.PI / 180) * firepower;
diry = Math.sin(angle * Math.PI / 180) * firepower;
time = 0;
_xscale = Math.random() * 200 + 100;
_yscale = _xscale;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == true) {
_x = _x + dirx / 5;
_y = _y + diry / 5;
this._alpha -= 0.1;
time += 1;
_rotation = _rotation + randomrotation / 5;
} else {
_x = _x + dirx;
_y = _y + diry;
this._alpha -= 1.5;
time += 5;
_rotation = _rotation + randomrotation;
}
if (this._alpha < 2 || deletion) {
i = 0;
while (i < _root.BulletSize) {
if (_root.Bullet[i] == this) {
_root.Bullet.splice(i, 1);
_root.BulletSize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 84 {
frame 1 {
gotoAndStop(random(3) + 1);
}
}
movieClip 85 bullet4_bullet {
frame 1 {
function createSpark(dir) {
i = 0;
while (i < _root.BulletSize) {
if (_root.Bullet[i] == this) {
_root.Bullet.splice(i, 1);
_root.BulletSize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
function createTrail(xdir, ydir) {
_root.enemypiecedepth += 1;
_root.enemypieceI += 1;
_root.attachMovie('b4_trail2', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
_root['enemy_piece' + _root.enemypieceI]._x -= xdir * 2;
_root['enemy_piece' + _root.enemypieceI]._y -= ydir * 2;
}
weaponType = 1;
this._rotation = random(360) + 1;
randomrotation = Math.random() * 10 + 1;
angle = _rotation;
firepower = Math.random() * 5 + 10;
dirx = Math.cos(angle * Math.PI / 180) * firepower;
diry = Math.sin(angle * Math.PI / 180) * firepower;
time = 0;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == true) {
_x = _x + dirx / 5;
_y = _y + diry / 5;
time += 1;
_rotation = _rotation + randomrotation / 5;
} else {
_x = _x + dirx;
_y = _y + diry;
time += 5;
_rotation = _rotation + randomrotation;
}
if (time >= 5) {
time = 0;
createTrail(dirx, diry);
}
if (this._alpha < 2 || deletion) {
i = 0;
while (i < _root.BulletSize) {
if (_root.Bullet[i] == this) {
_root.Bullet.splice(i, 1);
_root.BulletSize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
if (_x < _root.bounds.left - 15) {
createSpark(1);
}
if (_x > _root.bounds.right + 15) {
createSpark(2);
}
if (_y < _root.bounds.up - 15) {
createSpark(3);
}
if (_y > _root.bounds.down + 15) {
createSpark(4);
}
}
};
}
}
movieClip 86 bullet_2 {
frame 1 {
function createSpark(dir) {
i = 0;
while (i < 5) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('bullet1_spark', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
if (dir == 1) {
_root['enemy_piece' + _root.enemypieceI].dir = 1;
_root['enemy_piece' + _root.enemypieceI]._x = _root.bounds.left - 20;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
}
if (dir == 2) {
_root['enemy_piece' + _root.enemypieceI].dir = 2;
_root['enemy_piece' + _root.enemypieceI]._x = _root.bounds.right + 20;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
}
if (dir == 3) {
_root['enemy_piece' + _root.enemypieceI].dir = 3;
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.bounds.up - 20;
}
if (dir == 4) {
_root['enemy_piece' + _root.enemypieceI].dir = 4;
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.bounds.down + 20;
}
_root['enemy_piece' + _root.enemypieceI].gotoAndStop(2);
++i;
}
i = 0;
while (i < _root.BulletSize) {
if (_root.Bullet[i] == this) {
_root.Bullet.splice(i, 1);
_root.BulletSize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
weaponType = 1;
_root.shotinterval = 2;
this._x = _root.cannon._x;
this._y = _root.cannon._y;
this._rotation = _root.cannon._rotation + Math.random() * 20 - 10;
angle = _rotation;
firepower = 20;
dirx = Math.cos(angle * Math.PI / 180) * firepower;
diry = Math.sin(angle * Math.PI / 180) * firepower;
this._x += dirx * 1.5;
this._y += diry * 1.5;
time = 0;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == true) {
_x = _x + dirx / 5;
_y = _y + diry / 5;
trail._xscale += 2;
time += 1;
time2 += 1;
} else {
_x = _x + dirx;
_y = _y + diry;
trail._xscale += 10;
time += 5;
time2 += 5;
}
if (time >= 500 || deletion) {
i = 0;
while (i < _root.BulletSize) {
if (_root.Bullet[i] == this) {
_root.Bullet.splice(i, 1);
_root.BulletSize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
if (_x < _root.bounds.left - 15) {
createSpark(1);
}
if (_x > _root.bounds.right + 15) {
createSpark(2);
}
if (_y < _root.bounds.up - 15) {
createSpark(3);
}
if (_y > _root.bounds.down + 15) {
createSpark(4);
}
}
};
}
}
movieClip 88 bullet6.6 {
frame 1 {
function createSpark(dir) {
if (dir == 1) {
dirx *= -1;
}
if (dir == 2) {
dirx *= -1;
}
if (dir == 3) {
diry *= -1;
}
if (dir == 4) {
diry *= -1;
}
_rotation = _rotation + (180 - _rotation * 2);
}
weaponType = 1;
this._x = _root.cannon._x;
this._y = _root.cannon._y;
this._rotation = _root.cannon._rotation;
angle = _rotation;
firepower = 20;
dirx = Math.cos(angle * Math.PI / 180) * firepower;
diry = Math.sin(angle * Math.PI / 180) * firepower;
this._x += dirx * 1.5;
this._y += diry * 1.5;
time = 0;
alphafade = 0.1;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == true) {
_x = _x + dirx / 5;
_y = _y + diry / 5;
time += 1;
time2 += 1;
_alpha = _alpha - alphafade;
} else {
_x = _x + dirx;
_y = _y + diry;
time += 5;
time2 += 5;
_alpha = _alpha - alphafade * 5;
}
if (time >= 500 || deletion || _alpha <= 1) {
i = 0;
while (i < _root.BulletSize) {
if (_root.Bullet[i] == this) {
_root.Bullet.splice(i, 1);
_root.BulletSize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
if (_x < _root.bounds.left - 15) {
createSpark(1);
}
if (_x > _root.bounds.right + 15) {
createSpark(2);
}
if (_y < _root.bounds.up - 15) {
createSpark(3);
}
if (_y > _root.bounds.down + 15) {
createSpark(4);
}
}
};
}
}
movieClip 90 {
}
movieClip 92 {
}
movieClip 94 {
}
movieClip 95 {
frame 40 {
}
frame 80 {
gotoAndPlay(1);
}
}
movieClip 96 bullet9alt {
frame 1 {
function createSpark(dir) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('bullet9_splosion', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
i = 0;
while (i < 5) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('bullet9_spark', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
if (dir == 1) {
_root['enemy_piece' + _root.enemypieceI].dir = 1;
_root['enemy_piece' + _root.enemypieceI]._x = _root.bounds.left - 20;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
}
if (dir == 2) {
_root['enemy_piece' + _root.enemypieceI].dir = 2;
_root['enemy_piece' + _root.enemypieceI]._x = _root.bounds.right + 20;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
}
if (dir == 3) {
_root['enemy_piece' + _root.enemypieceI].dir = 3;
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.bounds.up - 20;
}
if (dir == 4) {
_root['enemy_piece' + _root.enemypieceI].dir = 4;
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.bounds.down + 20;
}
++i;
}
i = 0;
while (i < _root.BulletSize) {
if (_root.Bullet[i] == this) {
_root.Bullet.splice(i, 1);
_root.BulletSize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
function createLightning() {
dx = _root.Enemy[i]._x - _x;
dy = _root.Enemy[i]._y - _y;
_root.Enemy[i].hp -= 100;
if (_root.Enemy[i].enemytype == 3) {
_root.Enemy[i].createPent();
}
lightningrotation = Math.atan2(dy, dx) * 180 / Math.PI;
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('lightningcharge', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
_root['enemy_piece' + _root.enemypieceI]._width = distance;
_root['enemy_piece' + _root.enemypieceI]._rotation = lightningrotation;
}
this._x = _root.cannon._x;
this._y = _root.cannon._y;
this._rotation = _root.cannon._rotation;
rotationspeed = Math.random() * 5 + 2;
if (random(2) == 0) {
rotationspeed *= -1;
}
angle = _rotation;
firepower = 6 + Math.random() * 4;
dirx = Math.cos(angle * Math.PI / 180) * firepower;
diry = Math.sin(angle * Math.PI / 180) * firepower;
this._x += dirx * 3;
this._y += diry * 3;
time = 0;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
ball.center._alpha = random(75) + 25;
ball.center._xscale = 80 + random(40);
ball.center._yscale = ball.center._xscale;
if (_root.slowmotion == true) {
_rotation = _rotation + rotationspeed;
_x = _x + dirx / 5;
_y = _y + diry / 5;
time += 1;
time2 += 1;
} else {
_rotation = _rotation + rotationspeed;
_x = _x + dirx;
_y = _y + diry;
time += 5;
time2 += 5;
}
i = 0;
while (i <= _root.EnemySize) {
if (this.hitTest(_root.Enemy[i])) {
createLightning();
_root.Enemy[i].destroyed();
deletion = true;
}
++i;
}
if (time >= 700 || deletion) {
closest = 200;
i = 0;
while (i < _root.EnemySize) {
distance = Math.sqrt(Math.pow(_x - _root.Enemy[i]._x, 2) + Math.pow(_y - _root.Enemy[i]._y, 2));
if (distance < closest) {
createLightning();
}
++i;
}
i = 0;
while (i < _root.BulletSize) {
if (_root.Bullet[i] == this) {
_root.Bullet.splice(i, 1);
_root.BulletSize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
if (_x < _root.bounds.left - 15) {
createSpark(1);
}
if (_x > _root.bounds.right + 15) {
createSpark(2);
}
if (_y < _root.bounds.up - 15) {
createSpark(3);
}
if (_y > _root.bounds.down + 15) {
createSpark(4);
}
}
};
}
}
movieClip 97 bullet9 {
frame 1 {
function createSpark(dir) {
_root.playsound('shock2.wav');
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('bullet9_splosion', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
i = 0;
while (i < 5) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('bullet9_spark', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
if (dir == 1) {
_root['enemy_piece' + _root.enemypieceI].dir = 1;
_root['enemy_piece' + _root.enemypieceI]._x = _root.bounds.left - 20;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
}
if (dir == 2) {
_root['enemy_piece' + _root.enemypieceI].dir = 2;
_root['enemy_piece' + _root.enemypieceI]._x = _root.bounds.right + 20;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
}
if (dir == 3) {
_root['enemy_piece' + _root.enemypieceI].dir = 3;
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.bounds.up - 20;
}
if (dir == 4) {
_root['enemy_piece' + _root.enemypieceI].dir = 4;
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.bounds.down + 20;
}
++i;
}
i = 0;
while (i < _root.BulletSize) {
if (_root.Bullet[i] == this) {
_root.Bullet.splice(i, 1);
_root.BulletSize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
function createTrail(xdir, ydir) {
_root.enemypiecedepth += 1;
_root.enemypieceI += 1;
_root.attachMovie('bullet9_trail', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
_root['enemy_piece' + _root.enemypieceI]._x -= xdir * 1;
_root['enemy_piece' + _root.enemypieceI]._y -= ydir * 1;
}
function overcharge() {
distance = Math.sqrt(Math.pow(_x - _root.cannon._x, 2) + Math.pow(_y - _root.cannon._y, 2));
if (distance <= 200) {
if (Key.isDown(32) || Key.isDown(17) || (ASnative(800, 2))(4)) {
dx = _x - _root.cannon._x;
dy = _y - _root.cannon._y;
lightningrotation = Math.atan2(dy, dx) * 180 / Math.PI;
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('lightningcharge', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _root.cannon._x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.cannon._y;
_root['enemy_piece' + _root.enemypieceI]._width = distance;
_root['enemy_piece' + _root.enemypieceI]._rotation = lightningrotation;
}
}
}
_root.playsound('wep7sound');
this._x = _root.cannon._x;
this._y = _root.cannon._y;
this._rotation = _root.cannon._rotation;
rotationspeed = Math.random() * 5 + 2;
if (random(2) == 0) {
rotationspeed *= -1;
}
angle = _rotation;
firepower = 6 + Math.random() * 4;
dirx = Math.cos(angle * Math.PI / 180) * firepower;
diry = Math.sin(angle * Math.PI / 180) * firepower;
this._x += dirx * 3;
this._y += diry * 3;
time = 0;
time5 = 0;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
ball.center._alpha = random(75) + 25;
ball.center._xscale = 80 + random(40);
ball.center._yscale = ball.center._xscale;
if (_root.slowmotion == true) {
_rotation = _rotation + rotationspeed;
_x = _x + dirx / 5;
_y = _y + diry / 5;
time += 1;
time2 += 1;
} else {
_rotation = _rotation + rotationspeed;
_x = _x + dirx;
_y = _y + diry;
time += 5;
time2 += 5;
}
closest = 150;
if (time2 >= 30) {
time2 = 0;
i = 0;
while (i < _root.EnemySize) {
distance = Math.sqrt(Math.pow(_x - _root.Enemy[i]._x, 2) + Math.pow(_y - _root.Enemy[i]._y, 2));
if (distance < closest) {
time5 += 1;
if (time5 > 5) {
time5 = 0;
_root.playsound('shock2.wav');
}
closest = distance;
dx = _root.Enemy[i]._x - _x;
dy = _root.Enemy[i]._y - _y;
_root.Enemy[i].hp -= 15;
if (_root.Enemy[i].isBoss) {
_root.bosshealth -= 1;
}
lightningrotation = Math.atan2(dy, dx) * 180 / Math.PI;
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('lightning', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
_root['enemy_piece' + _root.enemypieceI]._width = distance;
_root['enemy_piece' + _root.enemypieceI]._rotation = lightningrotation;
}
++i;
}
}
if (time >= 700 || deletion) {
i = 0;
while (i < _root.BulletSize) {
if (_root.Bullet[i] == this) {
_root.Bullet.splice(i, 1);
_root.BulletSize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
if (_x < _root.bounds.left - 15) {
createSpark(1);
}
if (_x > _root.bounds.right + 15) {
createSpark(2);
}
if (_y < _root.bounds.up - 15) {
createSpark(3);
}
if (_y > _root.bounds.down + 15) {
createSpark(4);
}
}
};
}
}
movieClip 99 bullet8 {
frame 1 {
function createSpark(dir) {
i = 0;
while (i < 5) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('bullet1_spark', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
if (dir == 1) {
_root['enemy_piece' + _root.enemypieceI].dir = 1;
_root['enemy_piece' + _root.enemypieceI]._x = _root.bounds.left - 20;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
}
if (dir == 2) {
_root['enemy_piece' + _root.enemypieceI].dir = 2;
_root['enemy_piece' + _root.enemypieceI]._x = _root.bounds.right + 20;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
}
if (dir == 3) {
_root['enemy_piece' + _root.enemypieceI].dir = 3;
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.bounds.up - 20;
}
if (dir == 4) {
_root['enemy_piece' + _root.enemypieceI].dir = 4;
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.bounds.down + 20;
}
++i;
}
i = 0;
while (i < _root.BulletSize) {
if (_root.Bullet[i] == this) {
_root.Bullet.splice(i, 1);
_root.BulletSize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
weaponType = 8;
this._x = _root.cannon._x;
this._y = _root.cannon._y;
this._rotation = _root.cannon._rotation;
angle = _rotation;
firepower = 5;
dirx = Math.cos(angle * Math.PI / 180) * firepower;
diry = Math.sin(angle * Math.PI / 180) * firepower;
this._x += dirx * 1.5;
this._y += diry * 1.5;
time = 0;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == true) {
_x = _x + (_root.cursor._x - _x) / 10;
_y = _y + (_root.cursor._y - _y) / 10;
time2 += 1;
} else {
_x = _x + (_root.cursor._x - _x) / 10;
_y = _y + (_root.cursor._y - _y) / 10;
time2 += 5;
}
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('gravityparticle', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI].target = this;
i = 0;
while (i <= _root.EnemySize) {
degrees = Math.atan2(_y - _root.Enemy[i]._y, _x - _root.Enemy[i]._x);
angle = degrees * 180 / Math.PI;
distance = Math.sqrt(Math.pow(_x - _root.Enemy[i]._x, 2) + Math.pow(_y - _root.Enemy[i]._y, 2));
distance /= 100;
if (distance < 0) {
distance = 0;
}
dirx2 = Math.cos(angle * Math.PI / 180) * (6 - distance);
diry2 = Math.sin(angle * Math.PI / 180) * (6 - distance);
_root.Enemy[i]._x += dirx2;
_root.Enemy[i]._y += diry2;
++i;
}
if (deletion) {
i = 0;
while (i < _root.BulletSize) {
if (_root.Bullet[i] == this) {
_root.Bullet.splice(i, 1);
_root.BulletSize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
if (_x < _root.bounds.left - 15) {
createSpark(1);
}
if (_x > _root.bounds.right + 15) {
createSpark(2);
}
if (_y < _root.bounds.up - 15) {
createSpark(3);
}
if (_y > _root.bounds.down + 15) {
createSpark(4);
}
}
};
}
}
movieClip 101 boss_bullet3 {
frame 1 {
function createSpark(dir) {
i = 0;
while (i < 5) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('boss3_bulletspark3', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
if (dir == 1) {
_root['enemy_piece' + _root.enemypieceI].dir = 1;
_root['enemy_piece' + _root.enemypieceI]._x = _root.bounds.left - 17;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
}
if (dir == 2) {
_root['enemy_piece' + _root.enemypieceI].dir = 2;
_root['enemy_piece' + _root.enemypieceI]._x = _root.bounds.right + 17;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
}
if (dir == 3) {
_root['enemy_piece' + _root.enemypieceI].dir = 3;
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.bounds.up - 17;
}
if (dir == 4) {
_root['enemy_piece' + _root.enemypieceI].dir = 4;
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.bounds.down + 17;
}
++i;
}
i = 0;
while (i < _root.BulletSize) {
if (_root.Bullet[i] == this) {
_root.Bullet.splice(i, 1);
_root.BulletSize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
weaponType = 1;
_root.playsound('emppop.wav');
angle = _rotation + Math.random() * 80 - 40;
firepower = 10;
dirx = Math.cos(angle * Math.PI / 180) * firepower;
diry = Math.sin(angle * Math.PI / 180) * firepower;
this._x += dirx * 1.5;
this._y += diry * 1.5;
time = 0;
rotationspeed = Math.random() * 20 + 10;
if (random(2) == 0) {
rotationspeed *= -1;
}
_alpha = 0;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_alpha < 100) {
_alpha = _alpha + 10;
}
if (_root.slowmotion == true) {
_x = _x + dirx / 5;
_y = _y + diry / 5;
time += 1;
time2 += 1;
_rotation = _rotation + rotationspeed / 5;
} else {
_x = _x + dirx;
_y = _y + diry;
time += 5;
time2 += 5;
_rotation = _rotation + rotationspeed;
}
if (this.hitTest(_root.cannon._x, _root.cannon._y, true)) {
_root.playsound('empsound');
_root.playerhealth -= 3;
_root.frozen = true;
_root.frozentime = 200;
i = 0;
while (i < 10) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('boss3_bullethit3', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
++i;
}
deletion = true;
}
if (time >= 500 || deletion) {
i = 0;
while (i < _root.EnemySize) {
if (_root.Enemy[i] == this) {
_root.Enemy.splice(i, 1);
_root.EnemySize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
if (_x < _root.bounds.left - 15) {
createSpark(1);
}
if (_x > _root.bounds.right + 15) {
createSpark(2);
}
if (_y < _root.bounds.up - 15) {
createSpark(3);
}
if (_y > _root.bounds.down + 15) {
createSpark(4);
}
}
};
}
}
movieClip 103 boss_bullet2 {
frame 1 {
function createSpark(dir) {
i = 0;
while (i < 5) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('boss_bulletspark2', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
if (dir == 1) {
_root['enemy_piece' + _root.enemypieceI].dir = 1;
_root['enemy_piece' + _root.enemypieceI]._x = _root.bounds.left - 17;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
}
if (dir == 2) {
_root['enemy_piece' + _root.enemypieceI].dir = 2;
_root['enemy_piece' + _root.enemypieceI]._x = _root.bounds.right + 17;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
}
if (dir == 3) {
_root['enemy_piece' + _root.enemypieceI].dir = 3;
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.bounds.up - 17;
}
if (dir == 4) {
_root['enemy_piece' + _root.enemypieceI].dir = 4;
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.bounds.down + 17;
}
++i;
}
i = 0;
while (i < _root.BulletSize) {
if (_root.Bullet[i] == this) {
_root.Bullet.splice(i, 1);
_root.BulletSize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
weaponType = 1;
_root.playsound('bossshot.wav');
angle = _rotation;
firepower = 15;
dirx = Math.cos(angle * Math.PI / 180) * firepower;
diry = Math.sin(angle * Math.PI / 180) * firepower;
this._x += dirx * 1.5;
this._y += diry * 1.5;
time = 0;
rotationspeed = Math.random() * 20 + 10;
if (random(2) == 0) {
rotationspeed *= -1;
}
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == true) {
_x = _x + dirx / 5;
_y = _y + diry / 5;
time += 1;
time2 += 1;
_rotation = _rotation + rotationspeed / 5;
} else {
_x = _x + dirx;
_y = _y + diry;
time += 5;
time2 += 5;
_rotation = _rotation + rotationspeed;
}
if (this.hitTest(_root.cannon._x, _root.cannon._y, true)) {
_root.playerhealth -= 20;
i = 0;
while (i < 10) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('boss_bullethit2', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
++i;
}
deletion = true;
}
if (time >= 500 || deletion) {
i = 0;
while (i < _root.EnemySize) {
if (_root.Enemy[i] == this) {
_root.Enemy.splice(i, 1);
_root.EnemySize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
if (_x < _root.bounds.left - 15) {
createSpark(1);
}
if (_x > _root.bounds.right + 15) {
createSpark(2);
}
if (_y < _root.bounds.up - 15) {
createSpark(3);
}
if (_y > _root.bounds.down + 15) {
createSpark(4);
}
}
};
}
}
movieClip 105 boss_circlebullet0 {
frame 1 {
function createSpark(dir) {
i = 0;
while (i < 5) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('bullet2_spark', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
myColoredObject = new Color(_root['enemy_piece' + _root.enemypieceI]);
myColoredObject.setRGB(myColor);
if (dir == 1) {
_root['enemy_piece' + _root.enemypieceI].dir = 1;
_root['enemy_piece' + _root.enemypieceI]._x = _root.bounds.left - 17;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
}
if (dir == 2) {
_root['enemy_piece' + _root.enemypieceI].dir = 2;
_root['enemy_piece' + _root.enemypieceI]._x = _root.bounds.right + 17;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
}
if (dir == 3) {
_root['enemy_piece' + _root.enemypieceI].dir = 3;
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.bounds.up - 17;
}
if (dir == 4) {
_root['enemy_piece' + _root.enemypieceI].dir = 4;
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.bounds.down + 17;
}
++i;
}
i = 0;
while (i < _root.BulletSize) {
if (_root.Bullet[i] == this) {
_root.Bullet.splice(i, 1);
_root.BulletSize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
weaponType = 1;
R = random(200);
G = random(200);
B = random(200);
myColor = '0x' + R.toString(16) + G.toString(16) + B.toString(16);
myColoredObject = new Color(this);
myColoredObject.setRGB(myColor);
angle = _rotation;
firepower = 10;
dirx = Math.cos(angle * Math.PI / 180) * firepower;
diry = Math.sin(angle * Math.PI / 180) * firepower;
this._x += dirx * 1.5;
this._y += diry * 1.5;
time = 0;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
_alpha = random(50) + 50;
_xscale = random(50) + 50;
_yscale = _xscale;
if (_root.slowmotion == true) {
_x = _x + dirx / 5;
_y = _y + diry / 5;
time += 1;
time2 += 1;
} else {
_x = _x + dirx;
_y = _y + diry;
time += 5;
time2 += 5;
}
if (this.hitTest(_root.cannon._x, _root.cannon._y, true)) {
_root.playerhealth -= 15;
i = 0;
while (i < 10) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('boss_circlebullethit', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
++i;
}
deletion = true;
}
if (time >= 500 || deletion) {
i = 0;
while (i < _root.EnemySize) {
if (_root.Enemy[i] == this) {
_root.Enemy.splice(i, 1);
_root.EnemySize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
if (_x < _root.bounds.left - 15) {
createSpark(1);
}
if (_x > _root.bounds.right + 15) {
createSpark(2);
}
if (_y < _root.bounds.up - 15) {
createSpark(3);
}
if (_y > _root.bounds.down + 15) {
createSpark(4);
}
}
};
}
}
movieClip 106 boss_circlebullet {
frame 1 {
function createSpark(dir) {
i = 0;
while (i < 5) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('bullet2_spark', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
myColoredObject = new Color(_root['enemy_piece' + _root.enemypieceI]);
myColoredObject.setRGB(16711680);
if (dir == 1) {
_root['enemy_piece' + _root.enemypieceI].dir = 1;
_root['enemy_piece' + _root.enemypieceI]._x = _root.bounds.left - 17;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
}
if (dir == 2) {
_root['enemy_piece' + _root.enemypieceI].dir = 2;
_root['enemy_piece' + _root.enemypieceI]._x = _root.bounds.right + 17;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
}
if (dir == 3) {
_root['enemy_piece' + _root.enemypieceI].dir = 3;
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.bounds.up - 17;
}
if (dir == 4) {
_root['enemy_piece' + _root.enemypieceI].dir = 4;
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.bounds.down + 17;
}
++i;
}
i = 0;
while (i < _root.BulletSize) {
if (_root.Bullet[i] == this) {
_root.Bullet.splice(i, 1);
_root.BulletSize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
weaponType = 1;
_root.playsound('bossshot.wav');
angle = _rotation;
firepower = 10;
dirx = Math.cos(angle * Math.PI / 180) * firepower;
diry = Math.sin(angle * Math.PI / 180) * firepower;
this._x += dirx * 1.5;
this._y += diry * 1.5;
time = 0;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == true) {
_x = _x + dirx / 5;
_y = _y + diry / 5;
time += 1;
time2 += 1;
} else {
_x = _x + dirx;
_y = _y + diry;
time += 5;
time2 += 5;
}
if (this.hitTest(_root.cannon._x, _root.cannon._y, true)) {
_root.playerhealth -= 20;
i = 0;
while (i < 10) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('boss_circlebullethit', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
++i;
}
deletion = true;
}
if (time >= 500 || deletion) {
i = 0;
while (i < _root.EnemySize) {
if (_root.Enemy[i] == this) {
_root.Enemy.splice(i, 1);
_root.EnemySize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
if (_x < _root.bounds.left - 15) {
createSpark(1);
}
if (_x > _root.bounds.right + 15) {
createSpark(2);
}
if (_y < _root.bounds.up - 15) {
createSpark(3);
}
if (_y > _root.bounds.down + 15) {
createSpark(4);
}
}
};
}
}
movieClip 107 bullet {
frame 1 {
function createSpark(dir) {
_root.ricochet();
i = 0;
while (i < 5) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('bullet1_spark', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
if (dir == 1) {
_root['enemy_piece' + _root.enemypieceI].dir = 1;
_root['enemy_piece' + _root.enemypieceI]._x = _root.bounds.left - 20;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
}
if (dir == 2) {
_root['enemy_piece' + _root.enemypieceI].dir = 2;
_root['enemy_piece' + _root.enemypieceI]._x = _root.bounds.right + 20;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
}
if (dir == 3) {
_root['enemy_piece' + _root.enemypieceI].dir = 3;
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.bounds.up - 20;
}
if (dir == 4) {
_root['enemy_piece' + _root.enemypieceI].dir = 4;
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.bounds.down + 20;
}
++i;
}
i = 0;
while (i < _root.BulletSize) {
if (_root.Bullet[i] == this) {
_root.Bullet.splice(i, 1);
_root.BulletSize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
_root.bulletsound();
weaponType = 1;
_root.shotinterval = 5;
this._x = _root.cannon._x;
this._y = _root.cannon._y;
this._rotation = _root.cannon._rotation;
angle = _rotation;
firepower = 20;
dirx = Math.cos(angle * Math.PI / 180) * firepower;
diry = Math.sin(angle * Math.PI / 180) * firepower;
this._x += dirx * 1.5;
this._y += diry * 1.5;
time = 0;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == true) {
_x = _x + dirx / 5;
_y = _y + diry / 5;
trail._xscale += 2;
time += 1;
time2 += 1;
} else {
_x = _x + dirx;
_y = _y + diry;
trail._xscale += 10;
time += 5;
time2 += 5;
}
if (time >= 500 || deletion) {
i = 0;
while (i < _root.BulletSize) {
if (_root.Bullet[i] == this) {
_root.Bullet.splice(i, 1);
_root.BulletSize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
if (_x < _root.bounds.left - 15) {
createSpark(1);
}
if (_x > _root.bounds.right + 15) {
createSpark(2);
}
if (_y < _root.bounds.up - 15) {
createSpark(3);
}
if (_y > _root.bounds.down + 15) {
createSpark(4);
}
}
};
}
}
movieClip 109 boss_teleport {
frame 1 {
function teleport() {
warped = true;
_root.enemypiecedepth += 1;
_root.attachMovie('teleport_effect', 'teleport_effect', _root.enemypiecedepth);
_root.teleport_effect._x = this._x;
_root.teleport_effect._y = this._y;
_root.teleport_effect.target = this;
}
function firebullet() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('boss_bullet2', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
_root['enemy_piece' + _root.enemypieceI]._rotation = angle + 170 + Math.random() * 20;
}
function showscore() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('enemyscore', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
_root['enemy_piece' + _root.enemypieceI].score = pointworth * _root.combocount;
myColoredObject = new Color('_root.enemy_piece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
}
function destroyed() {
if (_root.soundeffects) {
_root.soundnumber += 1;
_root['sound' + _root.soundnumber] = new Sound();
_root['sound' + _root.soundnumber].attachSound('playerexplode');
_root['sound' + _root.soundnumber].start(0, 0);
}
if (_root.teleport_effect) {
removeMovieClip(_root.teleport_effect);
delete _root.teleport_effect.onEnterFrame;
}
if (_root.teleport_effect2) {
removeMovieClip(_root.teleport_effect2);
delete _root.teleport_effect2.onEnterFrame;
}
_root.script.textnumber += 1;
_root.script.gotoAndPlay(_root.script._totalframes - 1);
_root.bossbar = false;
if (_quality != 'HIGH') {
piecenumber = 2;
}
i = 0;
while (i < piecenumber) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('boss_shatter1', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
myColoredObject = new Color('_root.enemy_piece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
++i;
}
deletethis();
}
function deletethis() {
_root.bg.bg_i += 1;
_root.bg.bg_depth += 1;
_root.bg.attachMovie('bg_square', 'bg_object' + _root.bg.bg_i, _root.bg.bg_depth);
_root.bg['bg_object' + _root.bg.bg_i]._x = this._x;
_root.bg['bg_object' + _root.bg.bg_i]._y = this._y;
_root.bg['bg_object' + _root.bg.bg_i]._rotation = this._rotation;
_root.bg['bg_object' + _root.bg.bg_i].colorcode = myColor;
myColoredObject = new Color('_root.bg.bg_object' + _root.bg.bg_i);
myColoredObject.setRGB(myColor);
i = 0;
while (i < _root.EnemySize) {
if (_root.Enemy[i] == this) {
_root.Enemy.splice(i, 1);
_root.EnemySize -= 1;
}
++i;
}
_root.score += pointworth * _root.combocount;
_root.playertime += 30;
showscore();
_root.combocount += 1;
removeMovieClip(this);
delete this.onEnterFrame;
}
_x = -300;
_y = -250;
pointworth = 10000;
_root.bosshealth = 1000;
_root.bossbar = true;
myColor = 16750848;
myColoredObject = new Color(this);
myColoredObject.setRGB(myColor);
speed = Math.random() + 1;
piecenumber = _root.piecenumber;
time = 0;
time2 = random(500);
time3 = -200;
safezone = 150;
rotationspeed = 8;
isBoss = true;
firemode = 2;
safezone = 220;
teleporting = true;
warped = true;
teleport();
hittimes = 0;
this.onEnterFrame = function () {
if (!_root.gamePaused && !freeze) {
if (_root.teleport_effect.teleporting) {
teleporting = true;
} else {
teleporting = false;
}
radians = Math.atan2(this._y - _root.cannon._y, this._x - _root.cannon._x);
angle = Math.round(radians * 180 / Math.PI);
dirx = Math.cos(angle * Math.PI / 180) * speed;
diry = Math.sin(angle * Math.PI / 180) * speed;
difference = _rotation - angle;
if (difference > 180) {
angle += 360;
}
if (difference < -180) {
angle -= 360;
}
if (_root.slowmotion == true) {
_rotation = _rotation + 1;
time2 += 1;
time3 += 1;
} else {
_rotation = _rotation + 5;
time2 += 5;
time3 += 5;
}
if (_root.bosshealth <= 1) {
destroyed();
}
if (time2 >= 30) {
time2 = 0;
if (!teleporting) {
firebullet();
}
}
if (onFire) {
if (!_root.slowmotion) {
_root.bosshealth -= 2;
} else {
_root.bosshealth -= 0.4;
}
onFire = false;
}
if (!teleporting) {
if (!warped) {
i = 0;
while (i < _root.BulletSize) {
if (this.hitTest(_root.Bullet[i]._x, _root.Bullet[i]._y, true)) {
switch (_root.Bullet[i].weaponType) {
case 1:
hittimes += 1;
_root.bosshealth -= 2;
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('boss_hit_1', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _root.Bullet[i]._x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.Bullet[i]._y;
_root.Bullet[i].deletion = true;
break;
case 2:
hittimes += 1;
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('boss_hit_2', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _root.Bullet[i]._x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.Bullet[i]._y;
_root.bosshealth -= 5;
_root.Bullet[i].deletion = true;
break;
case 4:
hittimes += 1;
if (!warped) {
warped = true;
teleport();
}
_root.bosshealth -= 50;
_root.Bullet[i].detonation = true;
break;
case 6:
hittimes += 1;
_root.bosshealth -= 2;
_root.Bullet[i].deletion = true;
break;
case 7:
hittimes += 1;
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('boss_hit_1', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _root.Bullet[i]._x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.Bullet[i]._y;
_root.bosshealth -= 8;
_root.Bullet[i].detonation = true;
break;
case 8:
}
}
++i;
}
}
}
if (hittimes >= 3) {
hittimes = 0;
if (!warped) {
teleport();
}
}
if (this.hitTest(_root.cannon._x, _root.cannon._y, true) || _root.deleteALL == true) {
_root.playerhealth = 0;
}
if (_root.bullet_bomb) {
if (_root.bullet_bomb.hitTest(_x, _y, true)) {
_root.bullet_bomb.detonation = true;
}
}
if (_root.wave.hitTest(this._x, this._y, true)) {
destroyed();
}
if (_root.laser) {
if (_root.laser.hitTest(this._x, this._y, true)) {
destroyed();
}
}
}
};
}
}
movieClip 111 {
frame 1 {
this.onEnterFrame = function () {
_alpha = Math.random() * 20 + 90;
_xscale = Math.random() * 20 + 90;
_yscale = _xscale;
};
}
}
movieClip 114 {
frame 1 {
function oranges() {
myColor = Math.round(Math.random() * 16777215);
myColoredObject.setRGB(myColor);
_rotation = random(360);
gotoAndStop(random(2) + 1);
}
myColoredObject = new Color(this);
apple = 0;
this.onEnterFrame = function () {
if (!_root.slowmotion) {
apple += 5;
} else {
apple += 1;
}
if (apple >= 5) {
oranges();
}
};
}
}
movieClip 115 {
frame 1 {
binary._y = Math.random() * 50 + 20;
binary._rotation = random(360);
_rotation = random(360);
rotationspeed = Math.random() * 10 + 5;
if (random(2) == 0) {
rotationspeed *= -1;
}
this.onEnterFrame = function () {
if (!_root.slowmotion) {
_rotation = _rotation + rotationspeed;
} else {
_rotation = _rotation + rotationspeed / 5;
}
};
}
}
movieClip 116 boss_final2 {
frame 1 {
function wallattack() {
warped = true;
_root.enemypiecedepth += 1;
_root.attachMovie('boss_teleportfinal', 'teleport_effect', _root.enemypiecedepth);
_root.teleport_effect._x = this._x;
_root.teleport_effect._y = this._y;
_root.teleport_effect.target = this;
}
function fireemp() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('boss_bullet3', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
_root['enemy_piece' + _root.enemypieceI]._rotation = firerotation + 180;
}
function firelaser() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('enemylaser3', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
_root['enemy_piece' + _root.enemypieceI]._rotation = firerotation - 180;
}
function firebullet() {
_root.playsound('bossshot.wav');
_root.playsound('circlething');
i = 0;
while (i < 24) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('boss_circlebullet0', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
_root['enemy_piece' + _root.enemypieceI]._rotation = firerotation + i * 15;
++i;
}
}
function binaryshatter() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('binaryshatter', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
}
function showscore() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('enemyscore', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
_root['enemy_piece' + _root.enemypieceI].score = pointworth * _root.combocount;
myColoredObject = new Color('_root.enemy_piece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
}
function destroyed() {
if (_root.soundeffects) {
_root.soundnumber += 1;
_root['sound' + _root.soundnumber] = new Sound();
_root['sound' + _root.soundnumber].attachSound('playerexplode');
_root['sound' + _root.soundnumber].start(0, 0);
}
firemode = 0;
time = 0;
time2 = 0;
time3 = 0;
wtflaser.deletion = true;
_root.pwned = true;
_root.bossbar = false;
j = 0;
while (j < 100) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('binaryshatter2', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
++j;
}
deletethis();
}
function deletethis() {
_root.levelnumber = 50;
if (!_root.dead) {
_root.attachMovie('finalscreen', 'finalscreen', _root.finalscreendepth2);
}
j = 0;
while (j < _root.EnemySize) {
if (_root.Enemy[j] == this) {
_root.Enemy.splice(j, 1);
_root.EnemySize -= 1;
}
++j;
}
_root.score += pointworth * _root.combocount;
_root.playertime += 30;
showscore();
_root.combocount += 1;
removeMovieClip(this);
delete this.onEnterFrame;
}
function createparticle() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('gravityparticle', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI].target = this;
}
_x = -500;
_y = -500;
pointworth = 1000000;
_root.bosshealth = 1000;
_root.bossbar = true;
speed = Math.random() + 1;
piecenumber = _root.piecenumber;
time = 0;
time2 = 0;
time3 = 0;
rotationspeed = 16;
isBoss = true;
firerotation = 0;
warped = true;
firemode = 0;
soundplayed = false;
this.onEnterFrame = function () {
if (!_root.gamePaused && !freeze) {
radians = Math.atan2(this._y - _root.cannon._y, this._x - _root.cannon._x);
angle = Math.round(radians * 180 / Math.PI);
dirx = Math.cos(angle * Math.PI / 180) * speed;
diry = Math.sin(angle * Math.PI / 180) * speed;
difference = firerotation - angle;
if (difference > 180) {
angle += 360;
}
if (difference < -180) {
angle -= 360;
}
if (_root.slowmotion == true) {
firerotation += (angle - firerotation) / 5;
if (firemode == 2) {
time3 += 1;
}
if (!warped) {
time += 1;
time2 += 1;
}
} else {
firerotation += angle - firerotation;
if (firemode == 2) {
time3 += 5;
}
if (!warped) {
time += 5;
time2 += 5;
}
}
if (time3 > 500) {
time3 = 0;
firemode = 3;
wallattack();
}
if (time2 > 1500 && !warped) {
time2 = 0;
firemode += 1;
if (firemode >= 5) {
firemode = 1;
}
lasercrossed = false;
}
switch (firemode) {
case 1:
if (time > 400 && !soundplayed) {
soundplayed = true;
if (_root.soundeffects) {
_root.soundnumber += 1;
_root['sound' + _root.soundnumber] = new Sound();
_root['sound' + _root.soundnumber].attachSound('bombing');
_root['sound' + _root.soundnumber].start(0, 0);
}
}
if (time >= 500) {
soundplayed = false;
time = 0;
_root.attachMovie('plane', 'plane', _root.planedepth);
_root.plane._x = _root.cannon._x - 1200 - 900;
_root.plane._y = _root.cannon._y + 1200 + 600;
_root.attachMovie('plane', 'plane2', _root.plane2depth);
_root.plane2._x = _root.cannon._x - 1200 - 300;
_root.plane2._y = _root.cannon._y + 1200 + 300;
_root.attachMovie('plane', 'plane3', _root.plane3depth);
_root.plane3._x = _root.cannon._x - 1200 + 300;
_root.plane3._y = _root.cannon._y + 1200;
}
break;
case 2:
_root.pwned = false;
createparticle();
break;
case 4:
if (!lasercrossed) {
lasercrossed = true;
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('lasercross', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = 400;
_root['enemy_piece' + _root.enemypieceI]._y = 250;
_root['enemy_piece' + _root.enemypieceI].target = this;
wtflaser = _root['enemy_piece' + _root.enemypieceI];
}
if (time >= 100) {
time = 0;
firebullet();
}
}
if (_root.bosshealth <= 5) {
destroyed();
}
if (onFire) {
if (!_root.slowmotion) {
_root.bosshealth -= 2;
} else {
_root.bosshealth -= 0.4;
}
onFire = false;
}
if (!warped) {
i = 0;
while (i < _root.BulletSize) {
if (this.hitTest(_root.Bullet[i]._x, _root.Bullet[i]._y, true)) {
switch (_root.Bullet[i].weaponType) {
case 1:
binaryshatter();
_root.bosshealth -= 2;
_root.playertime += 10;
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('boss_hit_1', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _root.Bullet[i]._x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.Bullet[i]._y;
_root.Bullet[i].deletion = true;
break;
case 2:
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.playertime += 20;
_root.attachMovie('boss_hit_2', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _root.Bullet[i]._x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.Bullet[i]._y;
_root.bosshealth -= 5;
_root.Bullet[i].deletion = true;
binaryshatter();
binaryshatter();
binaryshatter();
break;
case 4:
_root.playertime += 10;
_root.bosshealth -= 10;
_root.Bullet[i].detonation = true;
break;
case 6:
_root.playertime += 10;
_root.bosshealth -= 2;
_root.Bullet[i].deletion = true;
binaryshatter();
break;
case 7:
_root.playertime += 15;
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('boss_hit_1', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _root.Bullet[i]._x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.Bullet[i]._y;
_root.bosshealth -= 8;
_root.Bullet[i].detonation = true;
binaryshatter();
binaryshatter();
binaryshatter();
break;
case 8:
}
}
++i;
}
}
if (this.hitTest(_root.cannon._x, _root.cannon._y, true) || _root.deleteALL == true) {
_root.playerhealth = 0;
}
if (_root.bullet_bomb) {
if (_root.bullet_bomb.hitTest(_x, _y, true)) {
_root.bullet_bomb.detonation = true;
}
}
if (_root.wave.hitTest(this._x, this._y, true)) {
destroyed();
}
if (_root.laser) {
if (_root.laser.hitTest(this._x, this._y, true)) {
destroyed();
}
}
}
};
}
}
movieClip 117 boss_final {
frame 1 {
function fireemp() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('boss_bullet3', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
_root['enemy_piece' + _root.enemypieceI]._rotation = firerotation + 180;
}
function firelaser() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('enemylaser3', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
_root['enemy_piece' + _root.enemypieceI]._rotation = firerotation - 180;
}
function firebullet() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('boss_circlebullet', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
_root['enemy_piece' + _root.enemypieceI]._rotation = firerotation + 180;
}
function binaryshatter() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('binaryshatter', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
}
function showscore() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('enemyscore', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
_root['enemy_piece' + _root.enemypieceI].score = pointworth * _root.combocount;
myColoredObject = new Color('_root.enemy_piece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
}
function destroyed() {
if (_root.soundeffects) {
_root.soundnumber += 1;
_root['sound' + _root.soundnumber] = new Sound();
_root['sound' + _root.soundnumber].attachSound('playerexplode');
_root['sound' + _root.soundnumber].start(0, 0);
}
_root.bossbar = false;
_root.script.textnumber += 1;
_root.script.gotoAndPlay(_root.script._totalframes - 1);
i = 0;
while (i < 100) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('binaryshatter2', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
++i;
}
deletethis();
}
function deletethis() {
i = 0;
while (i < _root.EnemySize) {
if (_root.Enemy[i] == this) {
_root.Enemy.splice(i, 1);
_root.EnemySize -= 1;
}
++i;
}
_root.score += pointworth * _root.combocount;
_root.playertime += 30;
showscore();
_root.combocount += 1;
removeMovieClip(this);
delete this.onEnterFrame;
}
function createparticle() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('gravityparticle', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI].target = this;
}
_x = 300;
_y = 250;
pointworth = 10000;
_root.bosshealth = 1000;
_root.bossbar = true;
lasertube = -1;
if (random(2) == 0) {
this._x = random(Stage.width);
if (random(2) == 0) {
this._y = -150;
} else {
this._y = Stage.height + 150;
}
} else {
this._y = random(Stage.height);
if (random(2) == 0) {
this._x = -150;
} else {
this._x = Stage.width + 150;
}
}
speed = Math.random() + 1;
piecenumber = _root.piecenumber;
time = 0;
time2 = 0;
safezone = 150;
rotationspeed = 16;
isBoss = true;
firerotation = 0;
safezone = 200;
firemode = 1;
this.onEnterFrame = function () {
if (!_root.gamePaused && !freeze) {
radians = Math.atan2(this._y - _root.cannon._y, this._x - _root.cannon._x);
angle = Math.round(radians * 180 / Math.PI);
dirx = Math.cos(angle * Math.PI / 180) * speed;
diry = Math.sin(angle * Math.PI / 180) * speed;
difference = firerotation - angle;
if (difference > 180) {
angle += 360;
}
if (difference < -180) {
angle -= 360;
}
if (_root.slowmotion == true) {
if (firemode == 2) {
firerotation += rotationspeed / 5;
} else {
firerotation += (angle - firerotation) / 5;
}
_x = _x + (_root.cannon._x + dirx * safezone - _x) / 50;
_y = _y + (_root.cannon._y + diry * safezone - _y) / 50;
_x = _x + (400 - _x) / 150;
_y = _y + (250 - _y) / 150;
time += 1;
time2 += 1;
} else {
if (firemode == 2) {
firerotation += rotationspeed;
} else {
firerotation += angle - firerotation;
}
_x = _x + (_root.cannon._x + dirx * safezone - _x) / 10;
_y = _y + (_root.cannon._y + diry * safezone - _y) / 10;
_x = _x + (400 - _x) / 50;
_y = _y + (250 - _y) / 50;
time += 5;
time2 += 5;
}
if (time2 > 500) {
time2 = 0;
firemode += 1;
if (firemode >= 4) {
firemode = 1;
}
}
switch (firemode) {
case 1:
if (time >= 20) {
time = 0;
fireemp();
}
break;
case 3:
if (time >= 50) {
time = 0;
firelaser();
}
break;
case 2:
if (time >= 5) {
time = 0;
firebullet();
}
}
if (_root.bosshealth <= 1) {
destroyed();
}
if (onFire) {
if (!_root.slowmotion) {
_root.bosshealth -= 2;
} else {
_root.bosshealth -= 0.4;
}
onFire = false;
}
i = 0;
while (i < _root.BulletSize) {
if (this.hitTest(_root.Bullet[i]._x, _root.Bullet[i]._y, true)) {
switch (_root.Bullet[i].weaponType) {
case 1:
binaryshatter();
_root.bosshealth -= 2;
_root.playertime += 10;
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('boss_hit_1', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _root.Bullet[i]._x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.Bullet[i]._y;
_root.Bullet[i].deletion = true;
break;
case 2:
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.playertime += 20;
_root.attachMovie('boss_hit_2', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _root.Bullet[i]._x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.Bullet[i]._y;
_root.bosshealth -= 5;
_root.Bullet[i].deletion = true;
binaryshatter();
binaryshatter();
binaryshatter();
break;
case 4:
_root.playertime += 10;
_root.bosshealth -= 10;
_root.Bullet[i].detonation = true;
break;
case 6:
_root.playertime += 10;
_root.bosshealth -= 2;
_root.Bullet[i].deletion = true;
binaryshatter();
break;
case 7:
_root.playertime += 15;
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('boss_hit_1', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _root.Bullet[i]._x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.Bullet[i]._y;
_root.bosshealth -= 8;
_root.Bullet[i].detonation = true;
binaryshatter();
binaryshatter();
binaryshatter();
break;
case 8:
}
}
++i;
}
if (this.hitTest(_root.cannon._x, _root.cannon._y, true) || _root.deleteALL == true) {
_root.playerhealth = 0;
}
if (_root.bullet_bomb) {
if (_root.bullet_bomb.hitTest(_x, _y, true)) {
_root.bullet_bomb.detonation = true;
}
}
if (_root.wave.hitTest(this._x, this._y, true)) {
destroyed();
}
if (_root.laser) {
if (_root.laser.hitTest(this._x, this._y, true)) {
destroyed();
}
}
}
};
}
}
movieClip 119 boss_3 {
frame 1 {
function firelaser(lasernumber) {
laserfiring = true;
dirx = Math.cos((_rotation + 90) * Math.PI / 180);
diry = Math.sin((_rotation + 90) * Math.PI / 180);
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('enemylaser3', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _x + 40 * lasernumber * dirx;
_root['enemy_piece' + _root.enemypieceI]._y = _y + 40 * lasernumber * diry;
_root['enemy_piece' + _root.enemypieceI]._rotation = _rotation - 180;
}
function firebullet(lasernumber) {
dirx = Math.cos((_rotation + 90) * Math.PI / 180);
diry = Math.sin((_rotation + 90) * Math.PI / 180);
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('boss_bullet3', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _x + 40 * lasernumber * dirx;
_root['enemy_piece' + _root.enemypieceI]._y = _y + 40 * lasernumber * diry;
_root['enemy_piece' + _root.enemypieceI]._rotation = _rotation - 180;
}
function showscore() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('enemyscore', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
_root['enemy_piece' + _root.enemypieceI].score = pointworth * _root.combocount;
myColoredObject = new Color('_root.enemy_piece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
}
function destroyed() {
if (_root.soundeffects) {
_root.soundnumber += 1;
_root['sound' + _root.soundnumber] = new Sound();
_root['sound' + _root.soundnumber].attachSound('playerexplode');
_root['sound' + _root.soundnumber].start(0, 0);
}
_root.script.textnumber += 1;
_root.script.gotoAndPlay(_root.script._totalframes - 1);
_root.bossbar = false;
if (_quality != 'HIGH') {
piecenumber = 2;
}
i = 0;
while (i < piecenumber) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('boss_shatter1', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
myColoredObject = new Color('_root.enemy_piece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
++i;
}
deletethis();
}
function deletethis() {
_root.bg.bg_i += 1;
_root.bg.bg_depth += 1;
_root.bg.attachMovie('bg_square', 'bg_object' + _root.bg.bg_i, _root.bg.bg_depth);
_root.bg['bg_object' + _root.bg.bg_i]._x = this._x;
_root.bg['bg_object' + _root.bg.bg_i]._y = this._y;
_root.bg['bg_object' + _root.bg.bg_i]._rotation = this._rotation;
_root.bg['bg_object' + _root.bg.bg_i].colorcode = myColor;
myColoredObject = new Color('_root.bg.bg_object' + _root.bg.bg_i);
myColoredObject.setRGB(myColor);
i = 0;
while (i < _root.EnemySize) {
if (_root.Enemy[i] == this) {
_root.Enemy.splice(i, 1);
_root.EnemySize -= 1;
}
++i;
}
_root.score += pointworth * _root.combocount;
_root.playertime += 30;
showscore();
_root.combocount += 1;
removeMovieClip(this);
delete this.onEnterFrame;
}
_x = 300;
_y = 250;
pointworth = 10000;
_root.bosshealth = 1000;
_root.bossbar = true;
lasertube = -1;
if (random(2) == 0) {
this._x = random(Stage.width);
if (random(2) == 0) {
this._y = -150;
} else {
this._y = Stage.height + 150;
}
} else {
this._y = random(Stage.height);
if (random(2) == 0) {
this._x = -150;
} else {
this._x = Stage.width + 150;
}
}
myColor = 65280;
myColoredObject = new Color(this);
myColoredObject.setRGB(myColor);
speed = Math.random() + 1;
piecenumber = _root.piecenumber;
time = 0;
time2 = 0;
time3 = -200;
time4 = 0;
time5 = 0;
safezone = 150;
rotationspeed = -8;
isBoss = true;
firemode = 2;
safezone = 240;
firemode = 2;
this.onEnterFrame = function () {
if (!_root.gamePaused && !freeze) {
radians = Math.atan2(this._y - _root.cannon._y, this._x - _root.cannon._x);
angle = Math.round(radians * 180 / Math.PI);
dirx = Math.cos(angle * Math.PI / 180) * speed;
diry = Math.sin(angle * Math.PI / 180) * speed;
difference = _rotation - angle;
if (difference > 180) {
angle += 360;
}
if (difference < -180) {
angle -= 360;
}
if (_root.slowmotion == true) {
if (!laserfiring) {
this._rotation += (angle - this._rotation) / 50;
_x = _x + (_root.cannon._x + dirx * safezone - _x) / 50;
_y = _y + (_root.cannon._y + diry * safezone - _y) / 50;
_x = _x + (400 - _x) / 150;
_y = _y + (250 - _y) / 150;
}
if (laserfiring) {
time2 += 1;
}
time3 += 1;
time4 += 1;
time5 += 1;
} else {
if (!laserfiring) {
this._rotation += (angle - this._rotation) / 10;
_x = _x + (_root.cannon._x + dirx * safezone - _x) / 10;
_y = _y + (_root.cannon._y + diry * safezone - _y) / 10;
_x = _x + (400 - _x) / 50;
_y = _y + (250 - _y) / 50;
}
if (laserfiring) {
time2 += 5;
}
time3 += 5;
time4 += 5;
time5 += 5;
}
if (time5 > 800) {
if (firemode == 1) {
firemode = 2;
} else {
firemode = 1;
}
time5 = 0;
}
if (_root.bosshealth <= 1) {
destroyed();
}
if (firemode == 1) {
if (time4 > 150) {
if (time3 > 10) {
firelaser(lasertube);
lasertube += 1;
if (lasertube == 2) {
lasertube = -1;
time4 = 0;
}
time3 = 0;
}
}
if (time2 > 50) {
time2 = 0;
laserfiring = false;
}
} else {
if (time3 > 5) {
firebullet(lasertube);
lasertube += 1;
if (lasertube == 2) {
lasertube = -1;
time4 = 0;
}
time3 = 0;
}
}
if (onFire) {
if (!_root.slowmotion) {
_root.bosshealth -= 2;
} else {
_root.bosshealth -= 0.4;
}
onFire = false;
}
i = 0;
while (i < _root.BulletSize) {
if (this.hitTest(_root.Bullet[i]._x, _root.Bullet[i]._y, true)) {
switch (_root.Bullet[i].weaponType) {
case 1:
_root.bosshealth -= 2;
_root.playertime += 10;
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('boss_hit_1', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _root.Bullet[i]._x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.Bullet[i]._y;
_root.Bullet[i].deletion = true;
break;
case 2:
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.playertime += 20;
_root.attachMovie('boss_hit_2', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _root.Bullet[i]._x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.Bullet[i]._y;
_root.bosshealth -= 5;
_root.Bullet[i].deletion = true;
break;
case 4:
_root.playertime += 10;
_root.bosshealth -= 10;
_root.Bullet[i].detonation = true;
break;
case 6:
_root.playertime += 10;
_root.bosshealth -= 2;
_root.Bullet[i].deletion = true;
break;
case 7:
_root.playertime += 15;
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('boss_hit_1', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _root.Bullet[i]._x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.Bullet[i]._y;
_root.bosshealth -= 8;
_root.Bullet[i].detonation = true;
break;
case 8:
}
}
++i;
}
if (this.hitTest(_root.cannon._x, _root.cannon._y, true) || _root.deleteALL == true) {
_root.playerhealth = 0;
}
if (_root.bullet_bomb) {
if (_root.bullet_bomb.hitTest(_x, _y, true)) {
_root.bullet_bomb.detonation = true;
}
}
if (_root.wave.hitTest(this._x, this._y, true)) {
destroyed();
}
if (_root.laser) {
if (_root.laser.hitTest(this._x, this._y, true)) {
destroyed();
}
}
}
};
}
}
movieClip 121 boss_circle {
frame 1 {
function firerocket() {
_root.enemyI += 1;
_root.enemydepth += 1;
_root.attachMovie('trianglemissile2', 'enemy' + _root.enemyI, _root.enemydepth);
_root.Enemy[_root.EnemySize] = _root['enemy' + _root.enemyI];
_root['enemy' + _root.enemyI]._x = _x - dirx * 10;
_root['enemy' + _root.enemyI]._y = _y - diry * 10;
_root.EnemySize += 1;
}
function firebullet() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('boss_circlebullet', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
_root['enemy_piece' + _root.enemypieceI]._rotation = _rotation + 15 + 180;
}
function showscore() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('enemyscore', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
_root['enemy_piece' + _root.enemypieceI].score = pointworth * _root.combocount;
myColoredObject = new Color('_root.enemy_piece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
}
function destroyed() {
if (_root.soundeffects) {
_root.soundnumber += 1;
_root['sound' + _root.soundnumber] = new Sound();
_root['sound' + _root.soundnumber].attachSound('playerexplode');
_root['sound' + _root.soundnumber].start(0, 0);
}
_root.script.textnumber += 1;
_root.script.gotoAndPlay(_root.script._totalframes - 1);
_root.bossbar = false;
if (_quality != 'HIGH') {
piecenumber = 2;
}
i = 0;
while (i < piecenumber) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('boss_shatter1', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
myColoredObject = new Color('_root.enemy_piece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
++i;
}
deletethis();
}
function deletethis() {
_root.bg.bg_i += 1;
_root.bg.bg_depth += 1;
_root.bg.attachMovie('bg_square', 'bg_object' + _root.bg.bg_i, _root.bg.bg_depth);
_root.bg['bg_object' + _root.bg.bg_i]._x = this._x;
_root.bg['bg_object' + _root.bg.bg_i]._y = this._y;
_root.bg['bg_object' + _root.bg.bg_i]._rotation = this._rotation;
_root.bg['bg_object' + _root.bg.bg_i].colorcode = myColor;
myColoredObject = new Color('_root.bg.bg_object' + _root.bg.bg_i);
myColoredObject.setRGB(myColor);
i = 0;
while (i < _root.EnemySize) {
if (_root.Enemy[i] == this) {
_root.Enemy.splice(i, 1);
_root.EnemySize -= 1;
}
++i;
}
_root.score += pointworth * _root.combocount;
_root.playertime += 30;
showscore();
_root.combocount += 1;
removeMovieClip(this);
delete this.onEnterFrame;
}
_x = 300;
_y = 250;
pointworth = 10000;
_root.bosshealth = 1000;
_root.bossbar = true;
if (random(2) == 0) {
this._x = random(Stage.width);
if (random(2) == 0) {
this._y = -150;
} else {
this._y = Stage.height + 150;
}
} else {
this._y = random(Stage.height);
if (random(2) == 0) {
this._x = -150;
} else {
this._x = Stage.width + 150;
}
}
myColor = 26367;
myColoredObject = new Color(this);
myColoredObject.setRGB(myColor);
speed = Math.random() + 1;
piecenumber = _root.piecenumber;
time = 0;
time2 = random(500);
time3 = -200;
safezone = 150;
rotationspeed = 8;
isBoss = true;
firemode = 2;
safezone = 220;
this.onEnterFrame = function () {
if (!_root.gamePaused && !freeze) {
radians = Math.atan2(this._y - _root.cannon._y, this._x - _root.cannon._x);
angle = Math.round(radians * 180 / Math.PI);
dirx = Math.cos(angle * Math.PI / 180) * speed;
diry = Math.sin(angle * Math.PI / 180) * speed;
difference = _rotation - angle;
if (difference > 180) {
angle += 360;
}
if (difference < -180) {
angle -= 360;
}
if (_root.slowmotion == true) {
if (firemode == 1) {
this._rotation += rotationspeed / 5;
} else {
this._rotation += (angle - this._rotation) / 50;
}
_x = _x + (_root.cannon._x + dirx * safezone - _x) / 50;
_y = _y + (_root.cannon._y + diry * safezone - _y) / 50;
_x = _x + (400 - _x) / 150;
_y = _y + (250 - _y) / 150;
time2 += 1;
time3 += 1;
} else {
if (firemode == 1) {
this._rotation += rotationspeed;
} else {
this._rotation += (angle - this._rotation) / 10;
}
_x = _x + (_root.cannon._x + dirx * safezone - _x) / 10;
_y = _y + (_root.cannon._y + diry * safezone - _y) / 10;
_x = _x + (400 - _x) / 50;
l;
_y = _y + (250 - _y) / 50;
time2 += 5;
time3 += 5;
}
if (_root.bosshealth <= 1) {
destroyed();
}
if (time3 < 800 && time3 >= 0) {
if (time2 >= 10) {
time2 = 0;
firebullet();
firemode = 1;
}
}
if (time3 > 800 && time3 < 1200) {
if (time2 >= 50) {
time2 = 0;
firerocket();
firemode = 2;
}
}
if (time3 > 1400) {
time3 = 0;
}
if (onFire) {
if (!_root.slowmotion) {
_root.bosshealth -= 2;
} else {
_root.bosshealth -= 0.4;
}
onFire = false;
}
i = 0;
while (i < _root.BulletSize) {
if (this.hitTest(_root.Bullet[i]._x, _root.Bullet[i]._y, true)) {
switch (_root.Bullet[i].weaponType) {
case 1:
_root.bosshealth -= 2;
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('boss_hit_1', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _root.Bullet[i]._x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.Bullet[i]._y;
_root.Bullet[i].deletion = true;
break;
case 2:
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('boss_hit_2', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _root.Bullet[i]._x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.Bullet[i]._y;
_root.bosshealth -= 5;
_root.Bullet[i].deletion = true;
break;
case 4:
_root.bosshealth -= 10;
_root.Bullet[i].detonation = true;
break;
case 6:
_root.bosshealth -= 2;
_root.Bullet[i].deletion = true;
break;
case 7:
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('boss_hit_1', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _root.Bullet[i]._x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.Bullet[i]._y;
_root.bosshealth -= 8;
_root.Bullet[i].detonation = true;
break;
case 8:
}
}
++i;
}
if (this.hitTest(_root.cannon._x, _root.cannon._y, true) || _root.deleteALL == true) {
_root.playerhealth = 0;
}
if (_root.bullet_bomb) {
if (_root.bullet_bomb.hitTest(_x, _y, true)) {
_root.bullet_bomb.detonation = true;
}
}
if (_root.wave.hitTest(this._x, this._y, true)) {
destroyed();
}
if (_root.laser) {
if (_root.laser.hitTest(this._x, this._y, true)) {
destroyed();
}
}
}
};
}
}
movieClip 124 {
}
movieClip 125 {
frame 1 {
stop();
}
frame 3 {
if (_root.soundeffects) {
_root.soundnumber += 1;
_root['sound' + _root.soundnumber] = new Sound();
_root['sound' + _root.soundnumber].attachSound('wacky');
_root['sound' + _root.soundnumber].start(0, 0);
}
}
frame 11 {
gotoAndStop(1);
}
frame 17 {
this.swapDepths(_parent.getNextHighestDepth());
removeMovieClip(this);
delete this.onEnterFrame;
}
}
movieClip 126 blocker_inf {
frame 1 {
function createFire() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('fire', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
}
function showscore() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('enemyscore', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
_root['enemy_piece' + _root.enemypieceI].score = pointworth * _root.combocount;
myColoredObject = new Color('_root.enemy_piece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
}
function destroyed() {
_root.explode();
if (_quality != 'HIGH') {
piecenumber = 2;
}
i = 0;
while (i < piecenumber) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('shatter', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI].gotoAndStop('shooter');
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
myColoredObject = new Color('_root.enemy_piece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
++i;
}
deletethis();
}
function deletethis() {
if (random(_root.powerupchance) == 0 && !_root.infinityactivated) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('powerup', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
}
_root.bg.bg_i += 1;
_root.bg.bg_depth += 1;
_root.bg.attachMovie('bg_square', 'bg_object' + _root.bg.bg_i, _root.bg.bg_depth);
_root.bg['bg_object' + _root.bg.bg_i]._x = this._x;
_root.bg['bg_object' + _root.bg.bg_i]._y = this._y;
_root.bg['bg_object' + _root.bg.bg_i]._rotation = this._rotation;
_root.bg['bg_object' + _root.bg.bg_i].colorcode = myColor;
myColoredObject = new Color('_root.bg.bg_object' + _root.bg.bg_i);
myColoredObject.setRGB(myColor);
i = 0;
while (i < _root.EnemySize) {
if (_root.Enemy[i] == this) {
_root.Enemy.splice(i, 1);
_root.EnemySize -= 1;
}
++i;
}
_root.kills += 1;
_root.score += pointworth * _root.combocount;
_root.playertime += 30;
showscore();
_root.combocount += 1;
removeMovieClip(this);
delete this.onEnterFrame;
}
if (random(2) == 0) {
this._x = random(Stage.width);
if (random(2) == 0) {
this._y = -50;
} else {
this._y = Stage.height + 50;
}
} else {
this._y = random(Stage.height);
if (random(2) == 0) {
this._x = -50;
} else {
this._x = Stage.width + 50;
}
}
pointworth = 20;
R = random(200) + 55;
G = random(200) + 55;
B = random(200) + 55;
myColor = '0x' + R.toString(16) + G.toString(16) + B.toString(16);
myColoredObject = new Color(this);
myColoredObject.setRGB(myColor);
hp = 100;
speed = Math.random() + 1;
piecenumber = _root.piecenumber;
time = 0;
time2 = random(500);
firetime = 0;
burntime = random(200) + 100;
safezone = 100 + Math.random() * 40;
bumperhealth = 5;
this.onEnterFrame = function () {
if (!_root.gamePaused && !freeze) {
radians = Math.atan2(this._y - _root.cannon._y, this._x - _root.cannon._x);
angle = Math.round(radians * 180 / Math.PI);
dirx = Math.cos(angle * Math.PI / 180) * speed;
diry = Math.sin(angle * Math.PI / 180) * speed;
difference = _rotation - angle;
if (difference > 180) {
angle += 360;
}
if (difference < -180) {
angle -= 360;
}
if (_root.slowmotion == true) {
this._rotation += (angle - this._rotation) / 100;
_x = _x + (_root.cannon._x + dirx * safezone - _x) / 150;
_y = _y + (_root.cannon._y + diry * safezone - _y) / 150;
} else {
this._rotation += (angle - this._rotation) / 20;
_x = _x + (_root.cannon._x + dirx * safezone - _x) / 50;
_y = _y + (_root.cannon._y + diry * safezone - _y) / 50;
}
if (hp <= 1) {
destroyed();
}
if (_root.slowmotion == true) {
_x = _x - dirx / 5;
_y = _y - diry / 5;
_rotation = _rotation + randomrotation / 5;
if (onFire) {
time += 1;
firetime += 1;
}
time2 += 1;
} else {
time2 += 5;
_x = _x - dirx;
_y = _y - diry;
_rotation = _rotation + randomrotation;
if (onFire) {
time += 5;
firetime += 5;
}
}
if (time2 >= 300) {
time2 = 0;
_root.enemyI += 1;
_root.enemydepth += 1;
_root.attachMovie('trianglemissile', 'enemy' + _root.enemyI, _root.enemydepth);
_root.Enemy[_root.EnemySize] = _root['enemy' + _root.enemyI];
_root['enemy' + _root.enemyI]._x = _x - dirx * 10;
_root['enemy' + _root.enemyI]._y = _y - diry * 10;
_root.EnemySize += 1;
}
if (onFire) {
if (firetime >= burntime) {
destroyed();
}
if (time >= 15) {
time = 0;
createFire();
}
}
i = 0;
while (i < _root.BulletSize) {
if (this.hitTest(_root.Bullet[i]._x, _root.Bullet[i]._y, true)) {
if (this.shield.hitTest(_root.Bullet[i]._x, _root.Bullet[i]._y, true)) {
switch (_root.Bullet[i].weaponType) {
case 1:
_root.Bullet[i].dirx *= -1;
_root.Bullet[i].diry *= -1;
_root.Bullet[i]._rotation += 180;
bumperhealth -= 1;
if (bumperhealth <= 0) {
bumper.gotoAndPlay('destroyed');
shield.destroyed();
} else {
bumper.gotoAndPlay(2);
}
break;
case 2:
_root.Bullet[i].deletion = true;
bumper.gotoAndPlay('destroyed');
shield.destroyed();
break;
case 4:
_root.Bullet[i].detonation = true;
destroyed();
break;
case 6:
_root.Bullet[i].deletion = true;
break;
case 7:
_root.Bullet[i].detonation = true;
destroyed();
break;
case 8:
destroyed();
}
} else {
switch (_root.Bullet[i].weaponType) {
case 1:
_root.Bullet[i].deletion = true;
destroyed();
break;
case 2:
_root.Bullet[i].deletion = true;
Z = 0;
while (Z < 3) {
_root.bulleti += 1;
_root.bulletdepth += 1;
_root.attachMovie('bullet2_2', 'bullet' + _root.bulleti, _root.bulletdepth);
_root.Bullet[_root.BulletSize] = _root['bullet' + _root.bulleti];
_root.BulletSize += 1;
_root['bullet' + _root.bulleti]._x = this._x;
_root['bullet' + _root.bulleti]._y = this._y;
++Z;
}
destroyed();
break;
case 4:
_root.Bullet[i].detonation = true;
destroyed();
break;
case 6:
_root.Bullet[i].deletion = true;
destroyed();
break;
case 7:
_root.Bullet[i].detonation = true;
destroyed();
break;
case 8:
destroyed();
}
}
}
++i;
}
if (this.hitTest(_root.cannon._x, _root.cannon._y, true) || _root.deleteALL == true) {
_root.playerhealth -= 10;
_root.combocount -= 2;
destroyed();
}
if (_root.bullet_bomb) {
if (_root.bullet_bomb.hitTest(_x, _y, true)) {
_root.bullet_bomb.detonation = true;
}
}
if (_root.wave.hitTest(this._x, this._y, true)) {
destroyed();
}
if (_root.laser) {
if (_root.laser.hitTest(this._x, this._y, true)) {
destroyed();
}
}
}
};
}
}
movieClip 127 blocker {
frame 1 {
function createFire() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('fire', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
}
function showscore() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('enemyscore', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
_root['enemy_piece' + _root.enemypieceI].score = pointworth * _root.combocount;
myColoredObject = new Color('_root.enemy_piece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
}
function destroyed() {
_root.explode();
if (_quality != 'HIGH') {
piecenumber = 2;
}
i = 0;
while (i < piecenumber) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('shatter', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI].gotoAndStop('shooter');
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
myColoredObject = new Color('_root.enemy_piece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
++i;
}
deletethis();
}
function deletethis() {
_root.bg.bg_i += 1;
_root.bg.bg_depth += 1;
_root.bg.attachMovie('bg_square', 'bg_object' + _root.bg.bg_i, _root.bg.bg_depth);
_root.bg['bg_object' + _root.bg.bg_i]._x = this._x;
_root.bg['bg_object' + _root.bg.bg_i]._y = this._y;
_root.bg['bg_object' + _root.bg.bg_i]._rotation = this._rotation;
_root.bg['bg_object' + _root.bg.bg_i].colorcode = myColor;
myColoredObject = new Color('_root.bg.bg_object' + _root.bg.bg_i);
myColoredObject.setRGB(myColor);
i = 0;
while (i < _root.EnemySize) {
if (_root.Enemy[i] == this) {
_root.Enemy.splice(i, 1);
_root.EnemySize -= 1;
}
++i;
}
_root.score += pointworth * _root.combocount;
_root.playertime += 30;
showscore();
_root.combocount += 1;
removeMovieClip(this);
delete this.onEnterFrame;
}
if (random(2) == 0) {
this._x = random(Stage.width);
if (random(2) == 0) {
this._y = -50;
} else {
this._y = Stage.height + 50;
}
} else {
this._y = random(Stage.height);
if (random(2) == 0) {
this._x = -50;
} else {
this._x = Stage.width + 50;
}
}
pointworth = 20;
R = random(200) + 55;
G = random(200) + 55;
B = random(200) + 55;
myColor = '0x' + R.toString(16) + G.toString(16) + B.toString(16);
myColoredObject = new Color(this);
myColoredObject.setRGB(myColor);
hp = 100;
speed = Math.random() + 1;
piecenumber = _root.piecenumber;
time = 0;
time2 = random(500);
firetime = 0;
burntime = random(200) + 100;
safezone = 100 + Math.random() * 40;
bumperhealth = 5;
this.onEnterFrame = function () {
if (!_root.gamePaused && !freeze) {
radians = Math.atan2(this._y - _root.cannon._y, this._x - _root.cannon._x);
angle = Math.round(radians * 180 / Math.PI);
dirx = Math.cos(angle * Math.PI / 180) * speed;
diry = Math.sin(angle * Math.PI / 180) * speed;
difference = _rotation - angle;
if (difference > 180) {
angle += 360;
}
if (difference < -180) {
angle -= 360;
}
if (_root.slowmotion == true) {
this._rotation += (angle - this._rotation) / 100;
_x = _x + (_root.cannon._x + dirx * safezone - _x) / 150;
_y = _y + (_root.cannon._y + diry * safezone - _y) / 150;
} else {
this._rotation += (angle - this._rotation) / 20;
_x = _x + (_root.cannon._x + dirx * safezone - _x) / 50;
_y = _y + (_root.cannon._y + diry * safezone - _y) / 50;
}
if (hp <= 1) {
destroyed();
}
if (_root.slowmotion == true) {
_x = _x - dirx / 5;
_y = _y - diry / 5;
_rotation = _rotation + randomrotation / 5;
if (onFire) {
time += 1;
firetime += 1;
}
time2 += 1;
} else {
time2 += 5;
_x = _x - dirx;
_y = _y - diry;
_rotation = _rotation + randomrotation;
if (onFire) {
time += 5;
firetime += 5;
}
}
if (time2 >= 300) {
time2 = 0;
_root.enemyI += 1;
_root.enemydepth += 1;
_root.attachMovie('trianglemissile', 'enemy' + _root.enemyI, _root.enemydepth);
_root.Enemy[_root.EnemySize] = _root['enemy' + _root.enemyI];
_root['enemy' + _root.enemyI]._x = _x - dirx * 10;
_root['enemy' + _root.enemyI]._y = _y - diry * 10;
_root.EnemySize += 1;
}
if (onFire) {
if (firetime >= burntime) {
destroyed();
}
if (time >= 15) {
time = 0;
createFire();
}
}
i = 0;
while (i < _root.BulletSize) {
if (this.hitTest(_root.Bullet[i]._x, _root.Bullet[i]._y, true)) {
if (this.shield.hitTest(_root.Bullet[i]._x, _root.Bullet[i]._y, true)) {
switch (_root.Bullet[i].weaponType) {
case 1:
_root.Bullet[i].dirx *= -1;
_root.Bullet[i].diry *= -1;
_root.Bullet[i]._rotation += 180;
bumperhealth -= 1;
if (bumperhealth <= 0) {
bumper.gotoAndPlay('destroyed');
shield.destroyed();
} else {
bumper.gotoAndPlay(2);
}
break;
case 2:
_root.Bullet[i].deletion = true;
bumper.gotoAndPlay('destroyed');
shield.destroyed();
break;
case 4:
_root.Bullet[i].detonation = true;
destroyed();
break;
case 6:
_root.Bullet[i].deletion = true;
break;
case 7:
_root.Bullet[i].detonation = true;
destroyed();
break;
case 8:
destroyed();
}
} else {
switch (_root.Bullet[i].weaponType) {
case 1:
_root.Bullet[i].deletion = true;
destroyed();
break;
case 2:
_root.Bullet[i].deletion = true;
Z = 0;
while (Z < 3) {
_root.bulleti += 1;
_root.bulletdepth += 1;
_root.attachMovie('bullet2_2', 'bullet' + _root.bulleti, _root.bulletdepth);
_root.Bullet[_root.BulletSize] = _root['bullet' + _root.bulleti];
_root.BulletSize += 1;
_root['bullet' + _root.bulleti]._x = this._x;
_root['bullet' + _root.bulleti]._y = this._y;
++Z;
}
destroyed();
break;
case 4:
_root.Bullet[i].detonation = true;
destroyed();
break;
case 6:
_root.Bullet[i].deletion = true;
destroyed();
break;
case 7:
_root.Bullet[i].detonation = true;
destroyed();
break;
case 8:
destroyed();
}
}
}
++i;
}
if (this.hitTest(_root.cannon._x, _root.cannon._y, true) || _root.deleteALL == true) {
_root.playerhealth -= 20;
_root.combocount -= 2;
destroyed();
}
if (_root.bullet_bomb) {
if (_root.bullet_bomb.hitTest(_x, _y, true)) {
_root.bullet_bomb.detonation = true;
}
}
if (_root.wave.hitTest(this._x, this._y, true)) {
destroyed();
}
if (_root.laser) {
if (_root.laser.hitTest(this._x, this._y, true)) {
destroyed();
}
}
}
};
}
}
movieClip 128 shooter {
frame 1 {
function createFire() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('fire', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
}
function showscore() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('enemyscore', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
_root['enemy_piece' + _root.enemypieceI].score = pointworth * _root.combocount;
myColoredObject = new Color('_root.enemy_piece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
}
function destroyed() {
_root.explode();
if (_quality != 'HIGH') {
piecenumber = 2;
}
i = 0;
while (i < piecenumber) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('shatter', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI].gotoAndStop('shooter');
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
myColoredObject = new Color('_root.enemy_piece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
++i;
}
deletethis();
}
function deletethis() {
_root.bg.bg_i += 1;
_root.bg.bg_depth += 1;
_root.bg.attachMovie('bg_square', 'bg_object' + _root.bg.bg_i, _root.bg.bg_depth);
_root.bg['bg_object' + _root.bg.bg_i]._x = this._x;
_root.bg['bg_object' + _root.bg.bg_i]._y = this._y;
_root.bg['bg_object' + _root.bg.bg_i]._rotation = this._rotation;
_root.bg['bg_object' + _root.bg.bg_i].colorcode = myColor;
myColoredObject = new Color('_root.bg.bg_object' + _root.bg.bg_i);
myColoredObject.setRGB(myColor);
i = 0;
while (i < _root.EnemySize) {
if (_root.Enemy[i] == this) {
_root.Enemy.splice(i, 1);
_root.EnemySize -= 1;
}
++i;
}
_root.score += pointworth * _root.combocount;
_root.playertime += 30;
showscore();
_root.combocount += 1;
removeMovieClip(this);
delete this.onEnterFrame;
}
if (random(2) == 0) {
this._x = random(Stage.width);
if (random(2) == 0) {
this._y = -50;
} else {
this._y = Stage.height + 50;
}
} else {
this._y = random(Stage.height);
if (random(2) == 0) {
this._x = -50;
} else {
this._x = Stage.width + 50;
}
}
pointworth = 20;
R = random(200) + 55;
G = random(200) + 55;
B = random(200) + 55;
myColor = '0x' + R.toString(16) + G.toString(16) + B.toString(16);
myColoredObject = new Color(this);
myColoredObject.setRGB(myColor);
hp = 100;
speed = Math.random() + 1;
piecenumber = _root.piecenumber;
time = 0;
time2 = random(500);
firetime = 0;
burntime = random(200) + 100;
safezone = 180 + Math.random() * 40;
this.onEnterFrame = function () {
if (!_root.gamePaused && !freeze) {
radians = Math.atan2(this._y - _root.cannon._y, this._x - _root.cannon._x);
angle = Math.round(radians * 180 / Math.PI);
dirx = Math.cos(angle * Math.PI / 180) * speed;
diry = Math.sin(angle * Math.PI / 180) * speed;
difference = _rotation - angle;
if (difference > 180) {
angle += 360;
}
if (difference < -180) {
angle -= 360;
}
if (_root.slowmotion == true) {
this._rotation += (angle - this._rotation) / 50;
_x = _x + (_root.cannon._x + dirx * safezone - _x) / 150;
_y = _y + (_root.cannon._y + diry * safezone - _y) / 150;
} else {
this._rotation += (angle - this._rotation) / 10;
_x = _x + (_root.cannon._x + dirx * 200 - _x) / 50;
_y = _y + (_root.cannon._y + diry * 200 - _y) / 50;
}
if (hp <= 1) {
destroyed();
}
if (_root.slowmotion == true) {
_x = _x - dirx / 5;
_y = _y - diry / 5;
_rotation = _rotation + randomrotation / 5;
if (onFire) {
time += 1;
firetime += 1;
}
time2 += 1;
} else {
time2 += 5;
_x = _x - dirx;
_y = _y - diry;
_rotation = _rotation + randomrotation;
if (onFire) {
time += 5;
firetime += 5;
}
}
if (time2 >= 300) {
time2 = 0;
_root.enemyI += 1;
_root.enemydepth += 1;
_root.attachMovie('trianglemissile', 'enemy' + _root.enemyI, _root.enemydepth);
_root.Enemy[_root.EnemySize] = _root['enemy' + _root.enemyI];
_root['enemy' + _root.enemyI]._x = _x;
_root['enemy' + _root.enemyI]._y = _y;
_root.EnemySize += 1;
}
if (onFire) {
if (firetime >= burntime) {
destroyed();
}
if (time >= 15) {
time = 0;
createFire();
}
}
i = 0;
while (i < _root.BulletSize) {
if (this.hitTest(_root.Bullet[i]._x, _root.Bullet[i]._y, true)) {
switch (_root.Bullet[i].weaponType) {
case 1:
_root.Bullet[i].deletion = true;
destroyed();
break;
case 2:
_root.Bullet[i].deletion = true;
Z = 0;
while (Z < 3) {
_root.bulleti += 1;
_root.bulletdepth += 1;
_root.attachMovie('bullet2_2', 'bullet' + _root.bulleti, _root.bulletdepth);
_root.Bullet[_root.BulletSize] = _root['bullet' + _root.bulleti];
_root.BulletSize += 1;
_root['bullet' + _root.bulleti]._x = this._x;
_root['bullet' + _root.bulleti]._y = this._y;
++Z;
}
destroyed();
break;
case 4:
_root.Bullet[i].detonation = true;
destroyed();
break;
case 6:
_root.Bullet[i].deletion = true;
destroyed();
break;
case 7:
_root.Bullet[i].detonation = true;
destroyed();
break;
case 8:
destroyed();
}
}
++i;
}
if (this.hitTest(_root.cannon._x, _root.cannon._y, true) || _root.deleteALL == true) {
_root.playerhealth -= 20;
_root.combocount -= 2;
destroyed();
}
if (_root.bullet_bomb) {
if (_root.bullet_bomb.hitTest(_x, _y, true)) {
_root.bullet_bomb.detonation = true;
}
}
if (_root.wave.hitTest(this._x, this._y, true)) {
destroyed();
}
if (_root.laser) {
if (_root.laser.hitTest(this._x, this._y, true)) {
destroyed();
}
}
}
};
}
}
movieClip 132 {
}
movieClip 133 {
frame 1 {
stop();
}
frame 10 {
_parent.shootlaser = true;
}
frame 11 {
_parent.shootlaser = false;
}
frame 25 {
gotoAndStop(1);
}
}
movieClip 134 hexagon_inf {
frame 1 {
function firelaser() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('enemylaser', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
_root['enemy_piece' + _root.enemypieceI]._rotation = _rotation - 180;
}
function createFire() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('fire', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
}
function showscore() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('enemyscore', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
_root['enemy_piece' + _root.enemypieceI].score = pointworth * _root.combocount;
myColoredObject = new Color('_root.enemy_piece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
}
function destroyed() {
_root.explode();
if (_quality != 'HIGH') {
piecenumber = 2;
}
i = 0;
while (i < piecenumber) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('shatter', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI].gotoAndStop('hex');
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
myColoredObject = new Color('_root.enemy_piece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
++i;
}
deletethis();
}
function deletethis() {
if (random(_root.powerupchance) == 0 && !_root.infinityactivated) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('powerup', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
}
_root.bg.bg_i += 1;
_root.bg.bg_depth += 1;
_root.bg.attachMovie('bg_square', 'bg_object' + _root.bg.bg_i, _root.bg.bg_depth);
_root.bg['bg_object' + _root.bg.bg_i]._x = this._x;
_root.bg['bg_object' + _root.bg.bg_i]._y = this._y;
_root.bg['bg_object' + _root.bg.bg_i]._rotation = this._rotation;
_root.bg['bg_object' + _root.bg.bg_i].colorcode = myColor;
myColoredObject = new Color('_root.bg.bg_object' + _root.bg.bg_i);
myColoredObject.setRGB(myColor);
i = 0;
while (i < _root.EnemySize) {
if (_root.Enemy[i] == this) {
_root.Enemy.splice(i, 1);
_root.EnemySize -= 1;
}
++i;
}
_root.kills += 1;
_root.score += pointworth * _root.combocount;
_root.playertime += 30;
showscore();
_root.combocount += 1;
removeMovieClip(this);
delete this.onEnterFrame;
}
if (random(2) == 0) {
this._x = random(Stage.width);
if (random(2) == 0) {
this._y = -50;
} else {
this._y = Stage.height + 50;
}
} else {
this._y = random(Stage.height);
if (random(2) == 0) {
this._x = -50;
} else {
this._x = Stage.width + 50;
}
}
pointworth = 20;
R = random(200) + 55;
G = random(200) + 55;
B = random(200) + 55;
myColor = '0x' + R.toString(16) + G.toString(16) + B.toString(16);
myColoredObject = new Color(this);
myColoredObject.setRGB(myColor);
hp = 100;
speed = Math.random() + 1;
piecenumber = _root.piecenumber;
time = 0;
time2 = random(300);
firetime = 0;
burntime = random(200) + 100;
safezone = 180 + Math.random() * 40;
this.onEnterFrame = function () {
if (!_root.gamePaused && !freeze) {
if (shootlaser) {
firelaser();
}
radians = Math.atan2(this._y - _root.cannon._y, this._x - _root.cannon._x);
angle = Math.round(radians * 180 / Math.PI);
dirx = Math.cos(angle * Math.PI / 180) * speed;
diry = Math.sin(angle * Math.PI / 180) * speed;
difference = _rotation - angle;
if (difference > 180) {
angle += 360;
}
if (difference < -180) {
angle -= 360;
}
if (_root.slowmotion == true) {
if (anim._currentframe == 1) {
this._rotation += (angle - this._rotation) / 30;
}
_x = _x + (_root.cannon._x + dirx * safezone - _x) / 250;
_y = _y + (_root.cannon._y + diry * safezone - _y) / 250;
} else {
if (anim._currentframe == 1) {
this._rotation += (angle - this._rotation) / 6;
}
_x = _x + (_root.cannon._x + dirx * safezone - _x) / 50;
_y = _y + (_root.cannon._y + diry * safezone - _y) / 50;
}
if (hp <= 1) {
destroyed();
}
if (_root.slowmotion == true) {
_x = _x - dirx / 5;
_y = _y - diry / 5;
_rotation = _rotation + randomrotation / 5;
if (onFire) {
time += 1;
firetime += 1;
}
time2 += 1;
} else {
time2 += 5;
_x = _x - dirx;
_y = _y - diry;
_rotation = _rotation + randomrotation;
if (onFire) {
time += 5;
firetime += 5;
}
}
if (time2 >= 300) {
time2 = 0;
anim.gotoAndPlay(2);
}
if (onFire) {
if (firetime >= burntime) {
destroyed();
}
if (time >= 15) {
time = 0;
createFire();
}
}
i = 0;
while (i < _root.BulletSize) {
if (this.frame.hitTest(_root.Bullet[i]._x, _root.Bullet[i]._y, true)) {
switch (_root.Bullet[i].weaponType) {
case 1:
_root.Bullet[i].deletion = true;
destroyed();
break;
case 2:
_root.Bullet[i].deletion = true;
Z = 0;
while (Z < 3) {
_root.bulleti += 1;
_root.bulletdepth += 1;
_root.attachMovie('bullet2_2', 'bullet' + _root.bulleti, _root.bulletdepth);
_root.Bullet[_root.BulletSize] = _root['bullet' + _root.bulleti];
_root.BulletSize += 1;
_root['bullet' + _root.bulleti]._x = this._x;
_root['bullet' + _root.bulleti]._y = this._y;
++Z;
}
destroyed();
break;
case 4:
_root.Bullet[i].detonation = true;
destroyed();
break;
case 6:
_root.Bullet[i].deletion = true;
destroyed();
break;
case 7:
_root.Bullet[i].detonation = true;
destroyed();
break;
case 8:
destroyed();
}
}
++i;
}
if (this.frame.hitTest(_root.cannon._x, _root.cannon._y, true) || _root.deleteALL == true) {
_root.playerhealth -= 10;
_root.combocount -= 2;
destroyed();
}
if (_root.bullet_bomb) {
if (_root.bullet_bomb.hitTest(_x, _y, true)) {
_root.bullet_bomb.detonation = true;
}
}
if (_root.wave.hitTest(this._x, this._y, true)) {
destroyed();
}
if (_root.laser) {
if (_root.laser.hitTest(this._x, this._y, true)) {
destroyed();
}
}
}
};
}
}
movieClip 136 hexagon {
frame 1 {
function firelaser() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('enemylaser', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
_root['enemy_piece' + _root.enemypieceI]._rotation = _rotation - 180;
}
function createFire() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('fire', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
}
function showscore() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('enemyscore', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
_root['enemy_piece' + _root.enemypieceI].score = pointworth * _root.combocount;
myColoredObject = new Color('_root.enemy_piece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
}
function destroyed() {
_root.explode();
if (_quality != 'HIGH') {
piecenumber = 2;
}
i = 0;
while (i < piecenumber) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('shatter', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI].gotoAndStop('hex');
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
myColoredObject = new Color('_root.enemy_piece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
++i;
}
deletethis();
}
function deletethis() {
_root.bg.bg_i += 1;
_root.bg.bg_depth += 1;
_root.bg.attachMovie('bg_square', 'bg_object' + _root.bg.bg_i, _root.bg.bg_depth);
_root.bg['bg_object' + _root.bg.bg_i]._x = this._x;
_root.bg['bg_object' + _root.bg.bg_i]._y = this._y;
_root.bg['bg_object' + _root.bg.bg_i]._rotation = this._rotation;
_root.bg['bg_object' + _root.bg.bg_i].colorcode = myColor;
myColoredObject = new Color('_root.bg.bg_object' + _root.bg.bg_i);
myColoredObject.setRGB(myColor);
i = 0;
while (i < _root.EnemySize) {
if (_root.Enemy[i] == this) {
_root.Enemy.splice(i, 1);
_root.EnemySize -= 1;
}
++i;
}
_root.score += pointworth * _root.combocount;
_root.playertime += 30;
showscore();
_root.combocount += 1;
removeMovieClip(this);
delete this.onEnterFrame;
}
if (random(2) == 0) {
this._x = random(Stage.width);
if (random(2) == 0) {
this._y = -50;
} else {
this._y = Stage.height + 50;
}
} else {
this._y = random(Stage.height);
if (random(2) == 0) {
this._x = -50;
} else {
this._x = Stage.width + 50;
}
}
pointworth = 20;
R = random(200) + 55;
G = random(200) + 55;
B = random(200) + 55;
myColor = '0x' + R.toString(16) + G.toString(16) + B.toString(16);
myColoredObject = new Color(this);
myColoredObject.setRGB(myColor);
hp = 100;
speed = Math.random() + 1;
piecenumber = _root.piecenumber;
time = 0;
time2 = random(300);
firetime = 0;
burntime = random(200) + 100;
safezone = 180 + Math.random() * 40;
this.onEnterFrame = function () {
if (!_root.gamePaused && !freeze) {
if (shootlaser) {
firelaser();
}
radians = Math.atan2(this._y - _root.cannon._y, this._x - _root.cannon._x);
angle = Math.round(radians * 180 / Math.PI);
dirx = Math.cos(angle * Math.PI / 180) * speed;
diry = Math.sin(angle * Math.PI / 180) * speed;
difference = _rotation - angle;
if (difference > 180) {
angle += 360;
}
if (difference < -180) {
angle -= 360;
}
if (_root.slowmotion == true) {
if (anim._currentframe == 1) {
this._rotation += (angle - this._rotation) / 30;
}
_x = _x + (_root.cannon._x + dirx * safezone - _x) / 250;
_y = _y + (_root.cannon._y + diry * safezone - _y) / 250;
} else {
if (anim._currentframe == 1) {
this._rotation += (angle - this._rotation) / 6;
}
_x = _x + (_root.cannon._x + dirx * safezone - _x) / 50;
_y = _y + (_root.cannon._y + diry * safezone - _y) / 50;
}
if (hp <= 1) {
destroyed();
}
if (_root.slowmotion == true) {
_x = _x - dirx / 5;
_y = _y - diry / 5;
_rotation = _rotation + randomrotation / 5;
if (onFire) {
time += 1;
firetime += 1;
}
time2 += 1;
} else {
time2 += 5;
_x = _x - dirx;
_y = _y - diry;
_rotation = _rotation + randomrotation;
if (onFire) {
time += 5;
firetime += 5;
}
}
if (time2 >= 300) {
time2 = 0;
anim.gotoAndPlay(2);
}
if (onFire) {
if (firetime >= burntime) {
destroyed();
}
if (time >= 15) {
time = 0;
createFire();
}
}
i = 0;
while (i < _root.BulletSize) {
if (this.frame.hitTest(_root.Bullet[i]._x, _root.Bullet[i]._y, true)) {
switch (_root.Bullet[i].weaponType) {
case 1:
_root.Bullet[i].deletion = true;
destroyed();
break;
case 2:
_root.Bullet[i].deletion = true;
Z = 0;
while (Z < 3) {
_root.bulleti += 1;
_root.bulletdepth += 1;
_root.attachMovie('bullet2_2', 'bullet' + _root.bulleti, _root.bulletdepth);
_root.Bullet[_root.BulletSize] = _root['bullet' + _root.bulleti];
_root.BulletSize += 1;
_root['bullet' + _root.bulleti]._x = this._x;
_root['bullet' + _root.bulleti]._y = this._y;
++Z;
}
destroyed();
break;
case 4:
_root.Bullet[i].detonation = true;
destroyed();
break;
case 6:
_root.Bullet[i].deletion = true;
destroyed();
break;
case 7:
_root.Bullet[i].detonation = true;
destroyed();
break;
case 8:
destroyed();
}
}
++i;
}
if (this.frame.hitTest(_root.cannon._x, _root.cannon._y, true) || _root.deleteALL == true) {
_root.playerhealth -= 20;
_root.combocount -= 2;
destroyed();
}
if (_root.bullet_bomb) {
if (_root.bullet_bomb.hitTest(_x, _y, true)) {
_root.bullet_bomb.detonation = true;
}
}
if (_root.wave.hitTest(this._x, this._y, true)) {
destroyed();
}
if (_root.laser) {
if (_root.laser.hitTest(this._x, this._y, true)) {
destroyed();
}
}
}
};
}
}
movieClip 138 star_inf {
frame 1 {
function createFire() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('fire', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
}
function showscore() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('enemyscore', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
_root['enemy_piece' + _root.enemypieceI].score = pointworth * _root.combocount;
myColoredObject = new Color('_root.enemy_piece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
}
function destroyed() {
_root.explode();
if (_quality != 'HIGH') {
piecenumber = 2;
}
i = 0;
while (i < piecenumber) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('shatter', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI].gotoAndStop('star');
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
myColoredObject = new Color('_root.enemy_piece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
++i;
}
deletethis();
}
function deletethis() {
if (random(_root.powerupchance) == 0 && !_root.infinityactivated) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('powerup', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
}
_root.bg.bg_i += 1;
_root.bg.bg_depth += 1;
_root.bg.attachMovie('bg_square', 'bg_object' + _root.bg.bg_i, _root.bg.bg_depth);
_root.bg['bg_object' + _root.bg.bg_i]._x = this._x;
_root.bg['bg_object' + _root.bg.bg_i]._y = this._y;
_root.bg['bg_object' + _root.bg.bg_i]._rotation = this._rotation;
_root.bg['bg_object' + _root.bg.bg_i].colorcode = myColor;
myColoredObject = new Color('_root.bg.bg_object' + _root.bg.bg_i);
myColoredObject.setRGB(myColor);
i = 0;
while (i < _root.EnemySize) {
if (_root.Enemy[i] == this) {
_root.Enemy.splice(i, 1);
_root.EnemySize -= 1;
}
++i;
}
_root.kills += 1;
_root.score += pointworth * _root.combocount;
_root.playertime += 30;
showscore();
_root.combocount += 1;
removeMovieClip(this);
delete this.onEnterFrame;
}
if (random(2) == 0) {
this._x = random(Stage.width);
if (random(2) == 0) {
this._y = -50;
} else {
this._y = Stage.height + 50;
}
} else {
this._y = random(Stage.height);
if (random(2) == 0) {
this._x = -50;
} else {
this._x = Stage.width + 50;
}
}
pointworth = 10;
R = random(200) + 55;
G = random(200) + 55;
B = random(200) + 55;
myColor = '0x' + R.toString(16) + G.toString(16) + B.toString(16);
myColoredObject = new Color(this);
myColoredObject.setRGB(myColor);
hp = 100;
speed = Math.random() + 6;
randomrotation = Math.random() * 20 - 10;
piecenumber = _root.piecenumber;
time = 0;
time2 = random(100);
firetime = 0;
burntime = random(200) + 100;
bullet_angles = 0;
invisible = false;
this.onEnterFrame = function () {
if (!_root.gamePaused && !freeze) {
if (hp <= 1) {
destroyed();
}
dx = _x - _root.cannon._x;
dy = _y - _root.cannon._y;
radians = Math.atan2(dy, dx);
angle = Math.round(radians * 180 / Math.PI);
dirx = Math.cos(angle * Math.PI / 180) * speed;
diry = Math.sin(angle * Math.PI / 180) * speed;
if (_root.slowmotion == true) {
if (!invisible) {
_x = _x - dirx / 5;
_y = _y - diry / 5;
_rotation = _rotation + randomrotation / 5;
}
time2 += 1;
if (onFire) {
time += 1;
firetime += 1;
}
} else {
if (!invisible) {
_x = _x - dirx;
_y = _y - diry;
_rotation = _rotation + randomrotation;
}
time2 += 5;
if (onFire) {
time += 5;
firetime += 5;
}
}
if (time2 > 200 && time2 < 500) {
if (_root.slowmotion == true) {
if (_alpha > 20) {
_alpha = _alpha - 2;
}
} else {
if (_alpha > 20) {
_alpha = _alpha - 10;
}
}
} else {
if (_root.slowmotion == true) {
if (_alpha < 100) {
_alpha = _alpha + 2;
}
} else {
if (_alpha < 100) {
_alpha = _alpha + 10;
}
}
}
if (time2 > 500) {
time2 = 0;
}
if (_alpha <= 20) {
invisible = true;
} else {
invisible = false;
}
if (onFire) {
if (firetime >= burntime) {
destroyed();
}
if (time >= 15) {
time = 0;
createFire();
}
}
if (!invisible) {
i = 0;
while (i < _root.BulletSize) {
if (this.hitTest(_root.Bullet[i]._x, _root.Bullet[i]._y, true)) {
switch (_root.Bullet[i].weaponType) {
case 1:
_root.Bullet[i].deletion = true;
destroyed();
break;
case 2:
_root.Bullet[i].deletion = true;
Z = 0;
while (Z < 3) {
_root.bulleti += 1;
_root.bulletdepth += 1;
_root.attachMovie('bullet2_2', 'bullet' + _root.bulleti, _root.bulletdepth);
_root.Bullet[_root.BulletSize] = _root['bullet' + _root.bulleti];
_root.BulletSize += 1;
_root['bullet' + _root.bulleti]._x = this._x;
_root['bullet' + _root.bulleti]._y = this._y;
++Z;
}
destroyed();
break;
case 4:
_root.Bullet[i].detonation = true;
destroyed();
break;
case 6:
_root.Bullet[i].deletion = true;
destroyed();
break;
case 7:
_root.Bullet[i].detonation = true;
destroyed();
break;
case 8:
destroyed();
}
}
++i;
}
if (this.hitTest(_root.cannon._x, _root.cannon._y, true) || _root.deleteALL == true) {
_root.playerhealth -= 10;
_root.combocount -= 2;
destroyed();
}
if (_root.bullet_bomb) {
if (_root.bullet_bomb.hitTest(_x, _y, true)) {
_root.bullet_bomb.detonation = true;
}
}
if (_root.wave.hitTest(this._x, this._y, true)) {
destroyed();
}
if (_root.laser) {
if (_root.laser.hitTest(this._x, this._y, true)) {
destroyed();
}
}
}
}
};
}
}
movieClip 139 star {
frame 1 {
function createFire() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('fire', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
}
function showscore() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('enemyscore', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
_root['enemy_piece' + _root.enemypieceI].score = pointworth * _root.combocount;
myColoredObject = new Color('_root.enemy_piece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
}
function destroyed() {
_root.explode();
if (_quality != 'HIGH') {
piecenumber = 2;
}
i = 0;
while (i < piecenumber) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('shatter', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI].gotoAndStop('star');
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
myColoredObject = new Color('_root.enemy_piece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
++i;
}
deletethis();
}
function deletethis() {
_root.bg.bg_i += 1;
_root.bg.bg_depth += 1;
_root.bg.attachMovie('bg_square', 'bg_object' + _root.bg.bg_i, _root.bg.bg_depth);
_root.bg['bg_object' + _root.bg.bg_i]._x = this._x;
_root.bg['bg_object' + _root.bg.bg_i]._y = this._y;
_root.bg['bg_object' + _root.bg.bg_i]._rotation = this._rotation;
_root.bg['bg_object' + _root.bg.bg_i].colorcode = myColor;
myColoredObject = new Color('_root.bg.bg_object' + _root.bg.bg_i);
myColoredObject.setRGB(myColor);
i = 0;
while (i < _root.EnemySize) {
if (_root.Enemy[i] == this) {
_root.Enemy.splice(i, 1);
_root.EnemySize -= 1;
}
++i;
}
_root.score += pointworth * _root.combocount;
_root.playertime += 30;
showscore();
_root.combocount += 1;
removeMovieClip(this);
delete this.onEnterFrame;
}
if (random(2) == 0) {
this._x = random(Stage.width);
if (random(2) == 0) {
this._y = -50;
} else {
this._y = Stage.height + 50;
}
} else {
this._y = random(Stage.height);
if (random(2) == 0) {
this._x = -50;
} else {
this._x = Stage.width + 50;
}
}
pointworth = 10;
R = random(200) + 55;
G = random(200) + 55;
B = random(200) + 55;
myColor = '0x' + R.toString(16) + G.toString(16) + B.toString(16);
myColoredObject = new Color(this);
myColoredObject.setRGB(myColor);
hp = 100;
speed = Math.random() + 6;
randomrotation = Math.random() * 20 - 10;
piecenumber = _root.piecenumber;
time = 0;
time2 = random(100);
firetime = 0;
burntime = random(200) + 100;
bullet_angles = 0;
invisible = false;
this.onEnterFrame = function () {
if (!_root.gamePaused && !freeze) {
if (hp <= 1) {
destroyed();
}
dx = _x - _root.cannon._x;
dy = _y - _root.cannon._y;
radians = Math.atan2(dy, dx);
angle = Math.round(radians * 180 / Math.PI);
dirx = Math.cos(angle * Math.PI / 180) * speed;
diry = Math.sin(angle * Math.PI / 180) * speed;
if (_root.slowmotion == true) {
if (!invisible) {
_x = _x - dirx / 5;
_y = _y - diry / 5;
_rotation = _rotation + randomrotation / 5;
}
time2 += 1;
if (onFire) {
time += 1;
firetime += 1;
}
} else {
if (!invisible) {
_x = _x - dirx;
_y = _y - diry;
_rotation = _rotation + randomrotation;
}
time2 += 5;
if (onFire) {
time += 5;
firetime += 5;
}
}
if (time2 > 200 && time2 < 500) {
if (_root.slowmotion == true) {
if (_alpha > 20) {
_alpha = _alpha - 2;
}
} else {
if (_alpha > 20) {
_alpha = _alpha - 10;
}
}
} else {
if (_root.slowmotion == true) {
if (_alpha < 100) {
_alpha = _alpha + 2;
}
} else {
if (_alpha < 100) {
_alpha = _alpha + 10;
}
}
}
if (time2 > 500) {
time2 = 0;
}
if (_alpha <= 20) {
invisible = true;
} else {
invisible = false;
}
if (onFire) {
if (firetime >= burntime) {
destroyed();
}
if (time >= 15) {
time = 0;
createFire();
}
}
if (!invisible) {
i = 0;
while (i < _root.BulletSize) {
if (this.hitTest(_root.Bullet[i]._x, _root.Bullet[i]._y, true)) {
switch (_root.Bullet[i].weaponType) {
case 1:
_root.Bullet[i].deletion = true;
destroyed();
break;
case 2:
_root.Bullet[i].deletion = true;
Z = 0;
while (Z < 3) {
_root.bulleti += 1;
_root.bulletdepth += 1;
_root.attachMovie('bullet2_2', 'bullet' + _root.bulleti, _root.bulletdepth);
_root.Bullet[_root.BulletSize] = _root['bullet' + _root.bulleti];
_root.BulletSize += 1;
_root['bullet' + _root.bulleti]._x = this._x;
_root['bullet' + _root.bulleti]._y = this._y;
++Z;
}
destroyed();
break;
case 4:
_root.Bullet[i].detonation = true;
destroyed();
break;
case 6:
_root.Bullet[i].deletion = true;
destroyed();
break;
case 7:
_root.Bullet[i].detonation = true;
destroyed();
break;
case 8:
destroyed();
}
}
++i;
}
if (this.hitTest(_root.cannon._x, _root.cannon._y, true) || _root.deleteALL == true) {
_root.playerhealth -= 20;
_root.combocount -= 2;
destroyed();
}
if (_root.bullet_bomb) {
if (_root.bullet_bomb.hitTest(_x, _y, true)) {
_root.bullet_bomb.detonation = true;
}
}
if (_root.wave.hitTest(this._x, this._y, true)) {
destroyed();
}
if (_root.laser) {
if (_root.laser.hitTest(this._x, this._y, true)) {
destroyed();
}
}
}
}
};
}
}
movieClip 141 square_start {
frame 1 {
function hearttrail() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('hearttrail', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
}
function createFire() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('fire', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
}
function destroyed() {
_root.explode();
_root.script.textnumber = 4;
_root.script.gotoAndPlay(_root.script._totalframes - 1);
if (_quality != 'HIGH') {
piecenumber = 2;
}
i = 0;
while (i < piecenumber) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('shatter', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI].gotoAndStop('square');
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
myColoredObject = new Color('_root.enemy_piece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
++i;
}
deletethis();
}
function deletethis() {
_root.bg.bg_i += 1;
_root.bg.bg_depth += 1;
_root.bg.attachMovie('bg_square', 'bg_object' + _root.bg.bg_i, _root.bg.bg_depth);
_root.bg['bg_object' + _root.bg.bg_i]._x = this._x;
_root.bg['bg_object' + _root.bg.bg_i]._y = this._y;
_root.bg['bg_object' + _root.bg.bg_i]._rotation = this._rotation;
_root.bg['bg_object' + _root.bg.bg_i].colorcode = myColor;
myColoredObject = new Color('_root.bg.bg_object' + _root.bg.bg_i);
myColoredObject.setRGB(myColor);
i = 0;
while (i < _root.EnemySize) {
if (_root.Enemy[i] == this) {
_root.Enemy.splice(i, 1);
_root.EnemySize -= 1;
}
++i;
}
_root.playertime += 30;
_root.combocount += 1;
removeMovieClip(this);
delete this.onEnterFrame;
}
if (random(2) == 0) {
this._x = random(Stage.width);
if (random(2) == 0) {
this._y = -50;
} else {
this._y = Stage.height + 50;
}
} else {
this._y = random(Stage.height);
if (random(2) == 0) {
this._x = -50;
} else {
this._x = Stage.width + 50;
}
}
pointworth = 10;
myColor = 16751103;
myColoredObject = new Color(this);
myColoredObject.setRGB(myColor);
hp = 100;
speed = Math.random() + 3.5;
randomrotation = Math.random() * 20 - 10;
piecenumber = _root.piecenumber;
time = 0;
time2 = 0;
firetime = 0;
burntime = random(200) + 100;
this.onEnterFrame = function () {
if (!_root.gamePaused && !freeze) {
if (time2 >= 30) {
time2 = 0;
hearttrail();
}
lockon = false;
closest = 10000;
i = 0;
while (i < _root.PlayerSize) {
distance = Math.sqrt(Math.pow(_x - _root.Player[i]._x, 2) + Math.pow(_y - _root.Player[i]._y, 2));
if (distance < closest) {
lockon = true;
closest = distance;
dx = _x - _root.Player[i]._x;
dy = _y - _root.Player[i]._y;
}
++i;
}
if (hp <= 1) {
destroyed();
}
distance = Math.sqrt(Math.pow(_x - _root.cannon._x, 2) + Math.pow(_y - _root.cannon._y, 2));
if (distance < closest) {
lockon = true;
closest = distance;
dx = _x - _root.cannon._x;
dy = _y - _root.cannon._y;
}
radians = Math.atan2(dy, dx);
angle = Math.round(radians * 180 / Math.PI);
dirx = Math.cos(angle * Math.PI / 180) * speed;
diry = Math.sin(angle * Math.PI / 180) * speed;
if (_root.slowmotion == true) {
time2 += 1;
_x = _x - dirx / 5;
_y = _y - diry / 5;
_rotation = _rotation + randomrotation / 5;
if (onFire) {
time += 1;
firetime += 1;
}
} else {
time2 += 5;
_x = _x - dirx;
_y = _y - diry;
_rotation = _rotation + randomrotation;
if (onFire) {
time += 5;
firetime += 5;
}
}
if (onFire) {
if (firetime >= burntime) {
destroyed();
}
if (time >= 15) {
time = 0;
createFire();
}
}
i = 0;
while (i < _root.BulletSize) {
if (this.hitTest(_root.Bullet[i]._x, _root.Bullet[i]._y, true)) {
switch (_root.Bullet[i].weaponType) {
case 1:
_root.Bullet[i].deletion = true;
destroyed();
break;
case 2:
_root.Bullet[i].deletion = true;
Z = 0;
while (Z < 3) {
_root.bulleti += 1;
_root.bulletdepth += 1;
_root.attachMovie('bullet2_2', 'bullet' + _root.bulleti, _root.bulletdepth);
_root.Bullet[_root.BulletSize] = _root['bullet' + _root.bulleti];
_root.BulletSize += 1;
_root['bullet' + _root.bulleti]._x = this._x;
_root['bullet' + _root.bulleti]._y = this._y;
++Z;
}
destroyed();
break;
case 4:
_root.Bullet[i].detonation = true;
destroyed();
break;
case 6:
_root.Bullet[i].deletion = true;
destroyed();
break;
case 7:
_root.Bullet[i].detonation = true;
destroyed();
break;
case 8:
destroyed();
}
}
++i;
}
if (this.hitTest(_root.cannon._x, _root.cannon._y, true) || _root.deleteALL == true) {
_root.playerhealth -= 20;
_root.combocount = 0;
destroyed();
}
if (_root.bullet_bomb) {
if (_root.bullet_bomb.hitTest(_x, _y, true)) {
_root.bullet_bomb.detonation = true;
}
}
if (_root.wave.hitTest(this._x, this._y, true)) {
destroyed();
}
if (_root.laser) {
if (_root.laser.hitTest(this._x, this._y, true)) {
destroyed();
}
}
}
};
}
}
movieClip 143 square_inf {
frame 1 {
function createFire() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('fire', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
}
function showscore() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('enemyscore', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
_root['enemy_piece' + _root.enemypieceI].score = pointworth * _root.combocount;
myColoredObject = new Color('_root.enemy_piece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
}
function destroyed() {
_root.explode();
if (_quality != 'HIGH') {
piecenumber = 2;
}
i = 0;
while (i < piecenumber) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('shatter', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI].gotoAndStop('square');
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
myColoredObject = new Color('_root.enemy_piece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
++i;
}
deletethis();
}
function deletethis() {
if (random(_root.powerupchance) == 0 && !_root.infinityactivated) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('powerup', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
}
_root.bg.bg_i += 1;
_root.bg.bg_depth += 1;
_root.bg.attachMovie('bg_square', 'bg_object' + _root.bg.bg_i, _root.bg.bg_depth);
_root.bg['bg_object' + _root.bg.bg_i]._x = this._x;
_root.bg['bg_object' + _root.bg.bg_i]._y = this._y;
_root.bg['bg_object' + _root.bg.bg_i]._rotation = this._rotation;
_root.bg['bg_object' + _root.bg.bg_i].colorcode = myColor;
myColoredObject = new Color('_root.bg.bg_object' + _root.bg.bg_i);
myColoredObject.setRGB(myColor);
i = 0;
while (i < _root.EnemySize) {
if (_root.Enemy[i] == this) {
_root.Enemy.splice(i, 1);
_root.EnemySize -= 1;
}
++i;
}
_root.kills += 1;
_root.score += pointworth * _root.combocount;
_root.playertime += 30;
showscore();
_root.combocount += 1;
removeMovieClip(this);
delete this.onEnterFrame;
}
if (random(2) == 0) {
this._x = random(Stage.width);
if (random(2) == 0) {
this._y = -50;
} else {
this._y = Stage.height + 50;
}
} else {
this._y = random(Stage.height);
if (random(2) == 0) {
this._x = -50;
} else {
this._x = Stage.width + 50;
}
}
pointworth = 10;
R = random(200) + 45;
G = random(200) + 45;
B = random(200) + 45;
myColor = '0x' + R.toString(16) + G.toString(16) + B.toString(16);
myColoredObject = new Color(this);
myColoredObject.setRGB(myColor);
hp = 100;
speed = Math.random() + 3.5;
randomrotation = Math.random() * 20 - 10;
piecenumber = _root.piecenumber;
time = 0;
firetime = 0;
burntime = random(200) + 100;
this.onEnterFrame = function () {
if (!_root.gamePaused && !freeze) {
if (hp <= 1) {
destroyed();
}
dx = _x - _root.cannon._x;
dy = _y - _root.cannon._y;
radians = Math.atan2(dy, dx);
angle = Math.round(radians * 180 / Math.PI);
dirx = Math.cos(angle * Math.PI / 180) * speed;
diry = Math.sin(angle * Math.PI / 180) * speed;
if (_root.slowmotion == true) {
_x = _x - dirx / 5;
_y = _y - diry / 5;
_rotation = _rotation + randomrotation / 5;
if (onFire) {
time += 1;
firetime += 1;
}
} else {
_x = _x - dirx;
_y = _y - diry;
_rotation = _rotation + randomrotation;
if (onFire) {
time += 5;
firetime += 5;
}
}
if (onFire) {
if (firetime >= burntime) {
destroyed();
}
if (time >= 15) {
time = 0;
createFire();
}
}
i = 0;
while (i < _root.BulletSize) {
if (this.hitTest(_root.Bullet[i]._x, _root.Bullet[i]._y, true)) {
switch (_root.Bullet[i].weaponType) {
case 1:
_root.Bullet[i].deletion = true;
destroyed();
break;
case 2:
_root.Bullet[i].deletion = true;
Z = 0;
while (Z < 3) {
_root.bulleti += 1;
_root.bulletdepth += 1;
_root.attachMovie('bullet2_2', 'bullet' + _root.bulleti, _root.bulletdepth);
_root.Bullet[_root.BulletSize] = _root['bullet' + _root.bulleti];
_root.BulletSize += 1;
_root['bullet' + _root.bulleti]._x = this._x;
_root['bullet' + _root.bulleti]._y = this._y;
++Z;
}
destroyed();
break;
case 4:
_root.Bullet[i].detonation = true;
destroyed();
break;
case 6:
_root.Bullet[i].deletion = true;
destroyed();
break;
case 7:
_root.Bullet[i].detonation = true;
destroyed();
break;
case 8:
destroyed();
}
}
++i;
}
if (this.hitTest(_root.cannon._x, _root.cannon._y, true) || _root.deleteALL == true) {
_root.playerhealth -= 10;
_root.combocount -= 2;
destroyed();
}
if (_root.bullet_bomb) {
if (_root.bullet_bomb.hitTest(_x, _y, true)) {
_root.bullet_bomb.detonation = true;
}
}
if (_root.wave.hitTest(this._x, this._y, true)) {
destroyed();
}
if (_root.laser) {
if (_root.laser.hitTest(this._x, this._y, true)) {
destroyed();
}
}
}
};
}
}
movieClip 144 square {
frame 1 {
function createFire() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('fire', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
}
function showscore() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('enemyscore', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
_root['enemy_piece' + _root.enemypieceI].score = pointworth * _root.combocount;
myColoredObject = new Color('_root.enemy_piece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
}
function destroyed() {
_root.explode();
if (_quality != 'HIGH') {
piecenumber = 2;
}
i = 0;
while (i < piecenumber) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('shatter', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI].gotoAndStop('square');
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
myColoredObject = new Color('_root.enemy_piece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
++i;
}
deletethis();
}
function deletethis() {
_root.bg.bg_i += 1;
_root.bg.bg_depth += 1;
_root.bg.attachMovie('bg_square', 'bg_object' + _root.bg.bg_i, _root.bg.bg_depth);
_root.bg['bg_object' + _root.bg.bg_i]._x = this._x;
_root.bg['bg_object' + _root.bg.bg_i]._y = this._y;
_root.bg['bg_object' + _root.bg.bg_i]._rotation = this._rotation;
_root.bg['bg_object' + _root.bg.bg_i].colorcode = myColor;
myColoredObject = new Color('_root.bg.bg_object' + _root.bg.bg_i);
myColoredObject.setRGB(myColor);
i = 0;
while (i < _root.EnemySize) {
if (_root.Enemy[i] == this) {
_root.Enemy.splice(i, 1);
_root.EnemySize -= 1;
}
++i;
}
_root.score += pointworth * _root.combocount;
_root.playertime += 30;
showscore();
_root.combocount += 1;
removeMovieClip(this);
delete this.onEnterFrame;
}
if (random(2) == 0) {
this._x = random(Stage.width);
if (random(2) == 0) {
this._y = -50;
} else {
this._y = Stage.height + 50;
}
} else {
this._y = random(Stage.height);
if (random(2) == 0) {
this._x = -50;
} else {
this._x = Stage.width + 50;
}
}
pointworth = 10;
R = random(200) + 45;
G = random(200) + 45;
B = random(200) + 45;
myColor = '0x' + R.toString(16) + G.toString(16) + B.toString(16);
myColoredObject = new Color(this);
myColoredObject.setRGB(myColor);
hp = 100;
speed = Math.random() + 3.5;
randomrotation = Math.random() * 20 - 10;
piecenumber = _root.piecenumber;
time = 0;
firetime = 0;
burntime = random(200) + 100;
this.onEnterFrame = function () {
if (!_root.gamePaused && !freeze) {
if (hp <= 1) {
destroyed();
}
dx = _x - _root.cannon._x;
dy = _y - _root.cannon._y;
radians = Math.atan2(dy, dx);
angle = Math.round(radians * 180 / Math.PI);
dirx = Math.cos(angle * Math.PI / 180) * speed;
diry = Math.sin(angle * Math.PI / 180) * speed;
if (_root.slowmotion == true) {
_x = _x - dirx / 5;
_y = _y - diry / 5;
_rotation = _rotation + randomrotation / 5;
if (onFire) {
time += 1;
firetime += 1;
}
} else {
_x = _x - dirx;
_y = _y - diry;
_rotation = _rotation + randomrotation;
if (onFire) {
time += 5;
firetime += 5;
}
}
if (onFire) {
if (firetime >= burntime) {
destroyed();
}
if (time >= 15) {
time = 0;
createFire();
}
}
i = 0;
while (i < _root.BulletSize) {
if (this.hitTest(_root.Bullet[i]._x, _root.Bullet[i]._y, true)) {
switch (_root.Bullet[i].weaponType) {
case 1:
_root.Bullet[i].deletion = true;
destroyed();
break;
case 2:
_root.Bullet[i].deletion = true;
Z = 0;
while (Z < 3) {
_root.bulleti += 1;
_root.bulletdepth += 1;
_root.attachMovie('bullet2_2', 'bullet' + _root.bulleti, _root.bulletdepth);
_root.Bullet[_root.BulletSize] = _root['bullet' + _root.bulleti];
_root.BulletSize += 1;
_root['bullet' + _root.bulleti]._x = this._x;
_root['bullet' + _root.bulleti]._y = this._y;
++Z;
}
destroyed();
break;
case 4:
_root.Bullet[i].detonation = true;
destroyed();
break;
case 6:
_root.Bullet[i].deletion = true;
destroyed();
break;
case 7:
_root.Bullet[i].detonation = true;
destroyed();
break;
case 8:
destroyed();
}
}
++i;
}
if (this.hitTest(_root.cannon._x, _root.cannon._y, true) || _root.deleteALL == true) {
_root.playerhealth -= 15;
_root.combocount -= 2;
destroyed();
}
if (_root.bullet_bomb) {
if (_root.bullet_bomb.hitTest(_x, _y, true)) {
_root.bullet_bomb.detonation = true;
}
}
if (_root.wave.hitTest(this._x, this._y, true)) {
destroyed();
}
if (_root.laser) {
if (_root.laser.hitTest(this._x, this._y, true)) {
destroyed();
}
}
}
};
}
}
movieClip 145 bullet4_piece_ {
frame 1 {
rotationspeed = random(50) - 25;
alphafade = Math.random() + 0.4;
speed = Math.random() * 12 + 6;
angle = random(360);
vx = Math.cos(angle * Math.PI / 180) * speed;
vy = Math.sin(angle * Math.PI / 180) * speed;
slowdown = 0.92;
slowdown2 = 0.99;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == false) {
vx *= slowdown;
vy *= slowdown;
this._rotation += rotationspeed;
_x = _x + vx;
_y = _y + vy;
this._alpha -= alphafade * 5;
} else {
vx *= slowdown2;
vy *= slowdown2;
this._rotation += rotationspeed / 5;
_x = _x + vx / 5;
_y = _y + vy / 5;
this._alpha -= alphafade;
}
if (this._alpha < alphafade || _root.deleteALL == true) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 147 boss3_bulletspark3 {
frame 1 {
stop();
_alpha = 100;
this._xscale = Math.random() * 50 + 50;
this._yscale = this._xscale;
alphafade = Math.random() + 4;
speed = Math.random() * 4 + 5;
if (dir == 1) {
angle = random(180) - 90;
}
if (dir == 2) {
angle = random(180) + 90;
}
if (dir == 3) {
angle = random(180);
}
if (dir == 4) {
angle = random(180) + 180;
}
_rotation = angle;
vx = Math.cos(angle * Math.PI / 180) * speed;
vy = Math.sin(angle * Math.PI / 180) * speed;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == false) {
_x = _x + vx;
_y = _y + vy;
this._alpha -= alphafade;
} else {
_x = _x + vx / 5;
_y = _y + vy / 5;
this._alpha -= alphafade / 5;
}
if (this._alpha <= 1 || _root.deleteALL == true) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 149 boss_bulletspark2 {
frame 1 {
stop();
_alpha = 100;
this._xscale = Math.random() * 50 + 50;
this._yscale = this._xscale;
alphafade = Math.random() + 4;
speed = Math.random() * 4 + 5;
if (dir == 1) {
angle = random(180) - 90;
}
if (dir == 2) {
angle = random(180) + 90;
}
if (dir == 3) {
angle = random(180);
}
if (dir == 4) {
angle = random(180) + 180;
}
_rotation = angle;
vx = Math.cos(angle * Math.PI / 180) * speed;
vy = Math.sin(angle * Math.PI / 180) * speed;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == false) {
_x = _x + vx;
_y = _y + vy;
this._alpha -= alphafade;
} else {
_x = _x + vx / 5;
_y = _y + vy / 5;
this._alpha -= alphafade / 5;
}
if (this._alpha <= 1 || _root.deleteALL == true) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 151 bullet2_spark {
frame 1 {
stop();
_alpha = 100;
this._xscale = Math.random() * 50 + 50;
this._yscale = this._xscale;
alphafade = Math.random() + 4;
speed = Math.random() * 4 + 1;
if (dir == 1) {
angle = random(180) - 90;
}
if (dir == 2) {
angle = random(180) + 90;
}
if (dir == 3) {
angle = random(180);
}
if (dir == 4) {
angle = random(180) + 180;
}
_rotation = angle;
vx = Math.cos(angle * Math.PI / 180) * speed;
vy = Math.sin(angle * Math.PI / 180) * speed;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == false) {
_x = _x + vx;
_y = _y + vy;
this._alpha -= alphafade;
} else {
_x = _x + vx / 5;
_y = _y + vy / 5;
this._alpha -= alphafade / 5;
}
if (this._alpha <= 1 || _root.deleteALL == true) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 153 bullet4_spark {
frame 1 {
stop();
_alpha = 100;
this._xscale = Math.random() * 50 + 50;
this._yscale = this._xscale;
alphafade = Math.random() + 6;
speed = Math.random() * 10 + 4;
if (dir == 1) {
angle = random(180) - 90;
}
if (dir == 2) {
angle = random(180) + 90;
}
if (dir == 3) {
angle = random(180);
}
if (dir == 4) {
angle = random(180) + 180;
}
_rotation = angle;
vx = Math.cos(angle * Math.PI / 180) * speed;
vy = Math.sin(angle * Math.PI / 180) * speed;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == false) {
_x = _x + vx;
_y = _y + vy;
this._alpha -= alphafade;
} else {
_x = _x + vx / 5;
_y = _y + vy / 5;
this._alpha -= alphafade / 5;
}
if (this._alpha <= 1 || _root.deleteALL == true) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 155 trianglemissile_spark2 {
frame 1 {
stop();
_alpha = 100;
this._xscale = Math.random() * 50 + 50;
this._yscale = this._xscale;
alphafade = Math.random() + 1;
speed = Math.random() * 10 + 1;
if (dir == 1) {
angle = random(180) - 90;
}
if (dir == 2) {
angle = random(180) + 90;
}
if (dir == 3) {
angle = random(180);
}
if (dir == 4) {
angle = random(180) + 180;
}
_rotation = angle;
rotationspeed = Math.random() * 5 + 2;
if (random(2) == 0) {
rotationspeed *= -1;
}
vx = Math.cos(angle * Math.PI / 180) * speed;
vy = Math.sin(angle * Math.PI / 180) * speed;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == false) {
_x = _x + vx;
_y = _y + vy;
this._alpha -= alphafade;
_rotation = _rotation + rotationspeed;
} else {
_x = _x + vx / 5;
_y = _y + vy / 5;
this._alpha -= alphafade / 5;
_rotation = _rotation + rotationspeed / 5;
}
if (this._alpha <= 1 || _root.deleteALL == true) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 157 trianglemissile_spark {
frame 1 {
stop();
_alpha = 100;
this._xscale = Math.random() * 50 + 50;
this._yscale = this._xscale;
alphafade = Math.random() + 1;
speed = Math.random() * 10 + 1;
if (dir == 1) {
angle = random(180) - 90;
}
if (dir == 2) {
angle = random(180) + 90;
}
if (dir == 3) {
angle = random(180);
}
if (dir == 4) {
angle = random(180) + 180;
}
_rotation = angle;
rotationspeed = Math.random() * 5 + 2;
if (random(2) == 0) {
rotationspeed *= -1;
}
vx = Math.cos(angle * Math.PI / 180) * speed;
vy = Math.sin(angle * Math.PI / 180) * speed;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == false) {
_x = _x + vx;
_y = _y + vy;
this._alpha -= alphafade;
_rotation = _rotation + rotationspeed;
} else {
_x = _x + vx / 5;
_y = _y + vy / 5;
this._alpha -= alphafade / 5;
_rotation = _rotation + rotationspeed / 5;
}
if (this._alpha <= 1 || _root.deleteALL == true) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 160 bullet7_spark {
frame 1 {
stop();
_alpha = 100;
this._xscale = Math.random() * 50 + 50;
this._yscale = this._xscale;
alphafade = Math.random() + 1;
speed = Math.random() * 10 + 1;
if (dir == 1) {
angle = random(180) - 90;
}
if (dir == 2) {
angle = random(180) + 90;
}
if (dir == 3) {
angle = random(180);
}
if (dir == 4) {
angle = random(180) + 180;
}
_rotation = angle;
rotationspeed = Math.random() * 5 + 2;
if (random(2) == 0) {
rotationspeed *= -1;
}
vx = Math.cos(angle * Math.PI / 180) * speed;
vy = Math.sin(angle * Math.PI / 180) * speed;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == false) {
_x = _x + vx;
_y = _y + vy;
this._alpha -= alphafade;
_rotation = _rotation + rotationspeed;
} else {
_x = _x + vx / 5;
_y = _y + vy / 5;
this._alpha -= alphafade / 5;
_rotation = _rotation + rotationspeed / 5;
}
if (this._alpha <= 1 || _root.deleteALL == true) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 163 bullet9_spark {
frame 1 {
gotoAndStop(random(_totalframes) + 1);
_alpha = 100;
this._xscale = Math.random() * 50 + 50;
this._yscale = this._xscale;
alphafade = Math.random() + 6;
if (_currentframe == 1) {
speed = random(20) + 4;
} else {
speed = random(10) + 1;
}
if (dir == 1) {
angle = random(180) - 90;
}
if (dir == 2) {
angle = random(180) + 90;
}
if (dir == 3) {
angle = random(180);
}
if (dir == 4) {
angle = random(180) + 180;
}
_rotation = angle;
vx = Math.cos(angle * Math.PI / 180) * speed;
vy = Math.sin(angle * Math.PI / 180) * speed;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == false) {
_x = _x + vx;
_y = _y + vy;
this._alpha -= alphafade;
} else {
_x = _x + vx / 5;
_y = _y + vy / 5;
this._alpha -= alphafade / 5;
}
if (this._alpha <= 1 || _root.deleteALL == true) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 165 laser_spark {
frame 1 {
gotoAndStop(random(_totalframes) + 1);
this._xscale = Math.random() * 50 + 50;
this._yscale = this._xscale;
alphafade = Math.random() + 1;
speed = Math.random() * 10 + 2;
if (dir == 1) {
angle = random(180) - 90;
}
if (dir == 2) {
angle = random(180) + 90;
}
if (dir == 3) {
angle = random(180);
}
if (dir == 4) {
angle = random(180) + 180;
}
_rotation = angle;
vx = Math.cos(angle * Math.PI / 180) * speed;
vy = Math.sin(angle * Math.PI / 180) * speed;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == false) {
_x = _x + vx;
_y = _y + vy;
this._alpha -= alphafade;
} else {
_x = _x + vx / 5;
_y = _y + vy / 5;
this._alpha -= alphafade / 5;
}
if (this._alpha <= 1 || _root.deleteALL == true) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 168 bullet1_spark {
frame 1 {
stop();
_alpha = 100;
this._xscale = Math.random() * 50 + 50;
this._yscale = this._xscale;
alphafade = Math.random() + 6;
speed = random(20) + 4;
if (dir == 1) {
angle = random(180) - 90;
}
if (dir == 2) {
angle = random(180) + 90;
}
if (dir == 3) {
angle = random(180);
}
if (dir == 4) {
angle = random(180) + 180;
}
_rotation = angle;
vx = Math.cos(angle * Math.PI / 180) * speed;
vy = Math.sin(angle * Math.PI / 180) * speed;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == false) {
_x = _x + vx;
_y = _y + vy;
this._alpha -= alphafade;
} else {
_x = _x + vx / 5;
_y = _y + vy / 5;
this._alpha -= alphafade / 5;
}
if (this._alpha <= 1 || _root.deleteALL == true) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 169 triangle_shatter2 {
frame 1 {
stop();
_alpha = 80;
this._xscale = random(100) + 50;
this._yscale = this._xscale;
rotationspeed = random(30) - 15;
alphafade = Math.random() + 1;
speed = Math.random() * 5 + 2;
angle = random(360);
vx = Math.cos(angle * Math.PI / 180) * speed;
vy = Math.sin(angle * Math.PI / 180) * speed;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == false) {
this._rotation += rotationspeed;
_x = _x + vx;
_y = _y + vy;
this._alpha -= alphafade;
} else {
this._rotation += rotationspeed / 5;
_x = _x + vx / 5;
_y = _y + vy / 5;
this._alpha -= alphafade / 5;
}
if (this._alpha < alphafade || _root.deleteALL == true) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 170 triangle_shatter {
frame 1 {
stop();
_alpha = 80;
this._xscale = random(100) + 50;
this._yscale = this._xscale;
rotationspeed = random(30) - 15;
alphafade = Math.random() + 1;
speed = Math.random() * 5 + 2;
angle = random(360);
vx = Math.cos(angle * Math.PI / 180) * speed;
vy = Math.sin(angle * Math.PI / 180) * speed;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == false) {
this._rotation += rotationspeed;
_x = _x + vx;
_y = _y + vy;
this._alpha -= alphafade;
} else {
this._rotation += rotationspeed / 5;
_x = _x + vx / 5;
_y = _y + vy / 5;
this._alpha -= alphafade / 5;
}
if (this._alpha < alphafade || _root.deleteALL == true) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 174 boss_shatter1 {
frame 1 {
function createFire() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('fire', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
}
gotoAndStop(random(_totalframes) + 1);
stop();
_alpha = 100;
this._xscale = Math.random() * 300 + 100;
this._yscale = this._xscale;
rotationspeed = Math.random() * 20 - 10;
alphafade = Math.random() + 1;
speed = Math.random() * 10 + 8;
angle = random(360);
vx = Math.cos(angle * Math.PI / 180) * speed;
vy = Math.sin(angle * Math.PI / 180) * speed;
time = 0;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == false) {
this._rotation += rotationspeed;
_x = _x + vx;
_y = _y + vy;
this._alpha -= alphafade;
time += 5;
} else {
this._rotation += rotationspeed / 5;
_x = _x + vx / 5;
_y = _y + vy / 5;
this._alpha -= alphafade / 5;
time += 1;
}
if (time >= 10) {
time = 0;
createFire();
}
if (this._alpha < alphafade || _root.deleteALL == true) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 179 cannonshatter {
frame 1 {
function createFire() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('fire', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
}
stop();
_alpha = 100;
this._xscale = Math.random() * 200 + 50;
this._yscale = this._xscale;
rotationspeed = Math.random() * 20 - 10;
alphafade = Math.random() + 1;
speed = Math.random() * 10 + 6;
angle = random(360);
vx = Math.cos(angle * Math.PI / 180) * speed;
vy = Math.sin(angle * Math.PI / 180) * speed;
time = 0;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == false) {
this._rotation += rotationspeed;
_x = _x + vx;
_y = _y + vy;
this._alpha -= alphafade;
time += 5;
} else {
this._rotation += rotationspeed / 5;
_x = _x + vx / 5;
_y = _y + vy / 5;
this._alpha -= alphafade / 5;
time += 1;
}
if (time >= 10) {
time = 0;
createFire();
}
if (this._alpha < alphafade || _root.deleteALL == true) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 182 cannonspark2 {
frame 1 {
gotoAndStop(random(2) + 4);
_alpha = 80;
this._xscale = Math.random() * 100 + 50;
this._yscale = this._xscale;
rotationspeed = random(30) - 15;
alphafade = Math.random() + 1;
speed = Math.random() * 20 + 10;
angle = random(360);
_rotation = angle;
vx = Math.cos(angle * Math.PI / 180) * speed;
vy = Math.sin(angle * Math.PI / 180) * speed;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == false) {
_x = _x + vx;
_y = _y + vy;
this._alpha -= alphafade;
} else {
_x = _x + vx / 5;
_y = _y + vy / 5;
this._alpha -= alphafade / 5;
}
if (this._alpha < alphafade || _root.deleteALL == true) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 184 cannonspark {
frame 1 {
_alpha = 80;
this._xscale = Math.random() * 100 + 50;
this._yscale = this._xscale;
rotationspeed = random(30) - 15;
alphafade = Math.random() + 1;
speed = Math.random() * 20 + 10;
angle = random(360);
_rotation = angle;
vx = Math.cos(angle * Math.PI / 180) * speed;
vy = Math.sin(angle * Math.PI / 180) * speed;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == false) {
_x = _x + vx;
_y = _y + vy;
this._alpha -= alphafade;
} else {
_x = _x + vx / 5;
_y = _y + vy / 5;
this._alpha -= alphafade / 5;
}
if (this._alpha < alphafade || _root.deleteALL == true) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 185 boss3_bullethit3 {
frame 1 {
stop();
_alpha = 70;
this._xscale = Math.random() * 100 + 50;
this._yscale = this._xscale;
rotationspeed = random(30) - 15;
alphafade = Math.random() + 1;
speed = Math.random() * 2 + 7;
angle = random(360);
vx = Math.cos(angle * Math.PI / 180) * speed;
vy = Math.sin(angle * Math.PI / 180) * speed;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == false) {
this._rotation += rotationspeed;
_x = _x + vx;
_y = _y + vy;
this._alpha -= alphafade;
} else {
this._rotation += rotationspeed / 5;
_x = _x + vx / 5;
_y = _y + vy / 5;
this._alpha -= alphafade / 5;
}
if (this._alpha < alphafade || _root.deleteALL == true) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 186 boss_bullethit2 {
frame 1 {
stop();
_alpha = 70;
this._xscale = Math.random() * 100 + 50;
this._yscale = this._xscale;
rotationspeed = random(30) - 15;
alphafade = Math.random() + 1;
speed = Math.random() * 2 + 7;
angle = random(360);
vx = Math.cos(angle * Math.PI / 180) * speed;
vy = Math.sin(angle * Math.PI / 180) * speed;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == false) {
this._rotation += rotationspeed;
_x = _x + vx;
_y = _y + vy;
this._alpha -= alphafade;
} else {
this._rotation += rotationspeed / 5;
_x = _x + vx / 5;
_y = _y + vy / 5;
this._alpha -= alphafade / 5;
}
if (this._alpha < alphafade || _root.deleteALL == true) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 188 powerupburst {
frame 1 {
stop();
_alpha = 30;
this._xscale = Math.random() * 200 + 50;
this._yscale = this._xscale;
rotationspeed = random(30) - 15;
alphafade = Math.random() + 1;
speed = Math.random() * 4 + 3;
angle = random(360);
vx = Math.cos(angle * Math.PI / 180) * speed;
vy = Math.sin(angle * Math.PI / 180) * speed;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == false) {
this._rotation += rotationspeed;
_x = _x + vx;
_y = _y + vy;
this._alpha -= alphafade;
} else {
this._rotation += rotationspeed / 5;
_x = _x + vx / 5;
_y = _y + vy / 5;
this._alpha -= alphafade / 5;
}
if (this._alpha < alphafade || _root.deleteALL == true) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 189 boss_circlebullethit {
frame 1 {
stop();
_alpha = 70;
this._xscale = Math.random() * 200 + 50;
this._yscale = this._xscale;
rotationspeed = random(30) - 15;
alphafade = Math.random() + 1;
speed = Math.random() + 4;
angle = random(360);
vx = Math.cos(angle * Math.PI / 180) * speed;
vy = Math.sin(angle * Math.PI / 180) * speed;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == false) {
this._rotation += rotationspeed;
_x = _x + vx;
_y = _y + vy;
this._alpha -= alphafade;
} else {
this._rotation += rotationspeed / 5;
_x = _x + vx / 5;
_y = _y + vy / 5;
this._alpha -= alphafade / 5;
}
if (this._alpha < alphafade || _root.deleteALL == true) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 197 menushatter {
frame 1 {
stop();
myColor = Math.round(Math.random() * 16777215);
myColoredObject = new Color(this);
myColoredObject.setRGB(myColor);
_alpha = 70;
this._xscale = Math.random() * 200 + 50;
this._yscale = this._xscale;
rotationspeed = random(30) - 15;
alphafade = Math.random() + 1;
speed = Math.random() * 20 + 4;
angle = random(360);
vx = Math.cos(angle * Math.PI / 180) * speed;
vy = Math.sin(angle * Math.PI / 180) * speed;
this.onEnterFrame = function () {
this._rotation += rotationspeed;
_x = _x + vx;
_y = _y + vy;
this._alpha -= alphafade;
if (this._alpha <= 1) {
removeMovieClip(this);
delete this.onEnterFrame;
}
};
}
}
movieClip 198 binaryshatter2 {
frame 1 {
stop();
gotoAndStop(random(_totalframes) + 1);
myColor = Math.round(Math.random() * 16777215);
myColoredObject = new Color(this);
myColoredObject.setRGB(myColor);
_alpha = 70;
rotationspeed = random(30) - 15;
alphafade = Math.random() + 1;
speed = Math.random() * 40 + 1;
angle = random(360);
vx = Math.cos(angle * Math.PI / 180) * speed;
vy = Math.sin(angle * Math.PI / 180) * speed;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == false) {
this._rotation += rotationspeed;
_x = _x + vx;
_y = _y + vy;
this._alpha -= alphafade;
} else {
this._rotation += rotationspeed / 5;
_x = _x + vx / 5;
_y = _y + vy / 5;
this._alpha -= alphafade / 5;
}
if (this._alpha < alphafade || _root.deleteALL == true) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 199 binaryshatter {
frame 1 {
stop();
gotoAndStop(random(_totalframes) + 1);
myColor = Math.round(Math.random() * 16777215);
myColoredObject = new Color(this);
myColoredObject.setRGB(myColor);
_alpha = 70;
rotationspeed = random(30) - 15;
alphafade = Math.random() + 1;
speed = Math.random() * 20 + 4;
angle = random(360);
vx = Math.cos(angle * Math.PI / 180) * speed;
vy = Math.sin(angle * Math.PI / 180) * speed;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == false) {
this._rotation += rotationspeed;
_x = _x + vx;
_y = _y + vy;
this._alpha -= alphafade;
} else {
this._rotation += rotationspeed / 5;
_x = _x + vx / 5;
_y = _y + vy / 5;
this._alpha -= alphafade / 5;
}
if (this._alpha < alphafade || _root.deleteALL == true) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 200 shatter {
frame 1 {
stop();
_alpha = 70;
this._xscale = Math.random() * 200 + 50;
this._yscale = this._xscale;
rotationspeed = random(30) - 15;
alphafade = Math.random() + 1;
speed = Math.random() * 20 + 4;
angle = random(360);
vx = Math.cos(angle * Math.PI / 180) * speed;
vy = Math.sin(angle * Math.PI / 180) * speed;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == false) {
this._rotation += rotationspeed;
_x = _x + vx;
_y = _y + vy;
this._alpha -= alphafade;
} else {
this._rotation += rotationspeed / 5;
_x = _x + vx / 5;
_y = _y + vy / 5;
this._alpha -= alphafade / 5;
}
if (this._alpha < alphafade || _root.deleteALL == true) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 202 {
}
movieClip 203 rocket_detonate {
frame 1 {
time = 0;
}
frame 10 {
_root.wave2J += 1;
removeMovieClip(this);
delete this.onEnterFrame;
}
}
movieClip 205 wave_reverse2 {
frame 1 {
_alpha = 0;
_x = _root.cannon._x;
_y = _root.cannon._y;
_xscale = 1000;
_yscale = 1000;
asdf = new Color(this);
this.onEnterFrame = function () {
if (_root.gamePaused == false) {
asdf.setRGB(Math.round(Math.random() * 16777215));
_x = _x + (_root.cannon._x - _x) / 2;
_y = _y + (_root.cannon._y - _y) / 2;
if (_root.slowmotion == false) {
_xscale = _xscale - 25;
_yscale = _yscale - 25;
this._alpha += 1.7;
} else {
_xscale = _xscale - 5;
_yscale = _yscale - 5;
this._alpha += 0.2;
}
if (this._width < 20) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 206 wave_reversepower {
frame 1 {
_alpha = 0;
_x = _root.cannon._x;
_y = _root.cannon._y;
_xscale = 1000;
_yscale = 1000;
this.onEnterFrame = function () {
if (_root.gamePaused == false) {
_x = _x + (_root.cannon._x - _x) / 2;
_y = _y + (_root.cannon._y - _y) / 2;
if (_root.slowmotion == false) {
_xscale = _xscale - 25;
_yscale = _yscale - 25;
this._alpha += 1.7;
} else {
_xscale = _xscale - 5;
_yscale = _yscale - 5;
this._alpha += 0.2;
}
if (this._width < 20) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 207 wave_reverse {
frame 1 {
_alpha = 0;
_x = _root.cannon._x;
_y = _root.cannon._y;
_xscale = 1000;
_yscale = 1000;
this.onEnterFrame = function () {
if (_root.gamePaused == false) {
_x = _x + (_root.cannon._x - _x) / 2;
_y = _y + (_root.cannon._y - _y) / 2;
if (_root.slowmotion == false) {
_xscale = _xscale - 25;
_yscale = _yscale - 25;
this._alpha += 1.7;
} else {
_xscale = _xscale - 5;
_yscale = _yscale - 5;
this._alpha += 0.2;
}
if (this._width < 20) {
_root.wavecreated = true;
_root.attachMovie('wave', 'wave', _root.wavedepth);
newcolor = new Color(_root.wave);
newcolor.setRGB(thiscolor);
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 209 plane_bombwave {
frame 1 {
_xscale = 10;
_yscale = 10;
expand = Math.random() * 4 + 12;
alphafade = Math.random() * 2 + 4;
hurt = false;
this.onEnterFrame = function () {
if (_root.gamePaused == false) {
if (this.hitTest(_root.cannon._x, _root.cannon._y, true)) {
hurt = true;
}
if (_root.slowmotion == false) {
_xscale = _xscale + expand;
_yscale = _yscale + expand;
this._alpha -= alphafade;
if (hurt) {
_root.playerhealth -= 5;
}
} else {
_xscale = _xscale + expand / 5;
_yscale = _yscale + expand / 5;
this._alpha -= alphafade / 5;
if (hurt) {
_root.playerhealth -= 1;
}
}
if (this._alpha <= 1) {
removeMovieClip(this);
delete this.onEnterFrame;
}
hurt = false;
}
};
}
}
movieClip 210 wave {
frame 1 {
_x = _root.cannon._x;
_y = _root.cannon._y;
_xscale = 10;
_yscale = 10;
this.onEnterFrame = function () {
if (_root.gamePaused == false) {
if (_root.slowmotion == false) {
_xscale = _xscale + 25;
_yscale = _yscale + 25;
this._alpha -= 1.7;
} else {
_xscale = _xscale + 5;
_yscale = _yscale + 5;
this._alpha -= 0.2;
}
if (this._alpha <= 1) {
_root.wavecreated = false;
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 212 {
frame 1 {
stop();
}
}
movieClip 214 {
frame 1 {
this.onEnterFrame = function () {
if (_root.slowmotion) {
_rotation = _rotation + 1;
} else {
_rotation = _rotation + 5;
}
};
}
}
movieClip 216 {
frame 1 {
this.onEnterFrame = function () {
radians = Math.atan2(_root.cannon._y - _root.cursor._y, _root.cannon._x - _root.cursor._x);
degrees = radians * 180 / Math.PI;
_rotation = degrees;
};
}
}
movieClip 219 {
frame 1 {
stop();
this.onEnterFrame = function () {
if (_root.slowmotion) {
_rotation = _rotation + 1;
} else {
_rotation = _rotation + 5;
}
};
}
}
movieClip 221 {
frame 1 {
stop();
}
}
movieClip 224 {
frame 1 {
stop();
this.onEnterFrame = function () {
if (_root.slowmotion) {
_rotation = _rotation + 1;
} else {
_rotation = _rotation + 5;
}
};
}
}
movieClip 226 {
frame 1 {
this.onEnterFrame = function () {
radians = Math.atan2(_root.cannon._y - _root.cursor._y, _root.cannon._x - _root.cursor._x);
degrees = radians * 180 / Math.PI;
_rotation = degrees;
};
}
}
movieClip 227 {
}
// unknown tag 88 length 78
movieClip 230 cursor {
frame 1 {
this.onEnterFrame = function () {
gotoAndStop(_root.weaponNumber);
};
}
}
movieClip 231 {
}
// unknown tag 88 length 63
movieClip 242 {
}
movieClip 262 {
frame 1 {
stop();
}
frame 2 {
stop();
}
}
movieClip 267 {
frame 1 {
btn_resume.tabEnabled = false;
btn_low.tabEnabled = false;
btn_medium.tabEnabled = false;
btn_high.tabEnabled = false;
btn_auto.tabEnabled = false;
checkbox.tabEnabled = false;
if (_root.soundeffects) {
checkbox.gotoAndStop(2);
} else {
checkbox.gotoAndStop(1);
}
if (_root.musiceffects) {
checkbox2.gotoAndStop(2);
} else {
checkbox2.gotoAndStop(1);
}
checkbox.onRelease = function () {
if (_root.soundeffects) {
_root.soundeffects = false;
checkbox.gotoAndStop(1);
} else {
_root.soundeffects = true;
checkbox.gotoAndStop(2);
}
};
checkbox2.onRelease = function () {
if (_root.musiceffects) {
_root.musiceffects = false;
_root.music_boss.setVolume(0);
_root.music_normal.setVolume(0);
_root.music_infinity.setVolume(0);
checkbox2.gotoAndStop(1);
} else {
_root.music_boss.setVolume(100);
_root.music_normal.setVolume(100);
_root.music_infinity.setVolume(100);
_root.musiceffects = true;
checkbox2.gotoAndStop(2);
}
};
if (_quality == 'LOW') {
quality._y = btn_low._y;
}
if (_quality == 'MEDIUM') {
quality._y = btn_medium._y;
}
if (_quality == 'HIGH') {
quality._y = btn_high._y;
}
if (_root.fpsOptimize) {
quality._y = btn_auto._y;
}
this.onEnterFrame = function () {
if (Key.isDown(80)) {
_parent.play();
}
quality._y += (dest - quality._y) / 4;
};
btn_high.onRelease = function () {
_quality = 'HIGH';
_root.fpsOptimize = false;
dest = btn_high._y;
};
btn_medium.onRelease = function () {
_quality = 'MEDIUM';
_root.fpsOptimize = false;
dest = btn_medium._y;
};
btn_low.onRelease = function () {
_quality = 'LOW';
_root.fpsOptimize = false;
dest = btn_low._y;
};
btn_auto.onRelease = function () {
_root.fpsOptimize = true;
dest = btn_auto._y;
};
btn_exit.onRelease = function () {
_root.attachMovie('finalscreen2', 'finalscreen2', _root.finalscreendepth);
};
btn_resume.onRelease = function () {
if (!_root.finalscreen2) {
_parent.play();
}
};
}
}
movieClip 268 pauseMenu {
frame 1 {
_root.cannon.stop();
}
frame 30 {
stop();
}
frame 60 {
_root.cannon.play();
_root.gamePaused = false;
if (_root.script._currentframe != _root.script._totalframes) {
_root.script.play();
}
Mouse.hide();
_root.cursor._alpha = 100;
removeMovieClip(this);
}
}
movieClip 270 pentagon_hit {
frame 1 {
if (_root.soundeffects) {
_root.soundnumber += 1;
_root['sound' + _root.soundnumber] = new Sound();
_root['sound' + _root.soundnumber].attachSound('wacky');
_root['sound' + _root.soundnumber].start(0, 0);
}
this.onEnterFrame = function () {
if (!_root.slowmotion) {
_xscale = _xscale + 12;
_yscale = _yscale + 12;
_alpha = _alpha - 4;
} else {
_xscale = _xscale + 4;
_yscale = _yscale + 4;
_alpha = _alpha - 1;
}
if (_alpha <= 5) {
removeMovieClip(this);
}
};
}
}
movieClip 272 pentagon_inf {
frame 1 {
function createFire() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('fire', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
}
function destroyed() {
_root.explode();
if (_quality != 'HIGH') {
piecenumber = 2;
}
i = 0;
while (i < piecenumber) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('shatter', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI].gotoAndStop('pentagon');
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
myColoredObject = new Color('_root.enemy_piece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
++i;
}
deletethis();
}
function showscore() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('enemyscore', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
_root['enemy_piece' + _root.enemypieceI].score = pointworth * _root.combocount;
myColoredObject = new Color('_root.enemy_piece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
}
function deletethis() {
if (random(_root.powerupchance) == 0 && !_root.infinityactivated) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('powerup', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
}
_root.bg.bg_i += 1;
_root.bg.bg_depth += 1;
_root.bg.attachMovie('bg_square', 'bg_object' + _root.bg.bg_i, _root.bg.bg_depth);
_root.bg['bg_object' + _root.bg.bg_i]._x = this._x;
_root.bg['bg_object' + _root.bg.bg_i]._y = this._y;
_root.bg['bg_object' + _root.bg.bg_i]._rotation = this._rotation;
myColoredObject = new Color('_root.bg.bg_object' + _root.bg.bg_i);
myColoredObject.setRGB(myColor);
i = 0;
while (i < _root.EnemySize) {
if (_root.Enemy[i] == this) {
_root.Enemy.splice(i, 1);
_root.EnemySize -= 1;
}
++i;
}
_root.score += pointworth * _root.combocount;
_root.playertime += 30;
showscore();
_root.combocount += 1;
removeMovieClip(this);
delete this.onEnterFrame;
}
function createPent() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('pentagon_hit', 'pentagon_hit' + _root.enemypieceI, _root.enemypiecedepth);
_root['pentagon_hit' + _root.enemypieceI]._x = this._x;
_root['pentagon_hit' + _root.enemypieceI]._y = this._y;
_root['pentagon_hit' + _root.enemypieceI]._rotation = this._rotation;
myColoredObject = new Color('_root.pentagon_hit' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
}
function createBarrier() {
distance = Math.sqrt(Math.pow(_x - friend._x, 2) + Math.pow(_y - friend._y, 2));
dx = friend._x - _x;
dy = friend._y - _y;
lightningrotation = Math.atan2(dy, dx) * 180 / Math.PI;
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('enemylightning', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
_root['enemy_piece' + _root.enemypieceI]._width = distance;
_root['enemy_piece' + _root.enemypieceI]._rotation = lightningrotation;
}
if (random(2) == 0) {
this._x = random(Stage.width);
if (random(2) == 0) {
this._y = -100;
} else {
this._y = Stage.height + 100;
}
} else {
this._y = random(Stage.height);
if (random(2) == 0) {
this._x = -100;
} else {
this._x = Stage.width + 100;
}
}
pointworth = 20;
enemytype = 3;
R = random(200) + 55;
G = random(200) + 55;
B = random(200) + 55;
myColor = '0x' + R.toString(16) + G.toString(16) + B.toString(16);
myColoredObject = new Color(this);
myColoredObject.setRGB(myColor);
randomrotation = Math.random() * 10 - 5;
piecenumber = _root.piecenumber;
health = 2;
vx = Math.random() * 2 + 1;
vy = Math.random() * 2 + 1;
time = 0;
firetime = 0;
burntime = random(400) + 200;
hp = 200;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (friend._alpha > 0) {
createBarrier();
}
if (_root.slowmotion == true) {
_x = _x + vx / 5;
_y = _y + vy / 5;
_rotation = _rotation + randomrotation / 5;
if (onFire) {
time += 1;
firetime += 1;
}
} else {
_x = _x + vx;
_y = _y + vy;
_rotation = _rotation + randomrotation;
if (onFire) {
time += 5;
firetime += 5;
}
}
if (hp <= 1) {
destroyed();
}
if (onFire) {
if (firetime >= burntime) {
destroyed();
}
if (time >= 15) {
time = 0;
createFire();
}
}
if (_x < _root.bounds.left - 5 && vx < 0) {
vx *= -1;
}
if (_x > _root.bounds.right + 5 && vx > 0) {
vx *= -1;
}
if (_y < _root.bounds.up - 5 && vy < 0) {
vy *= -1;
}
if (_y > _root.bounds.down + 5 && vy > 0) {
vy *= -1;
}
i = 0;
while (i < _root.BulletSize) {
if (this.hitTest(_root.Bullet[i]._x, _root.Bullet[i]._y, true)) {
switch (_root.Bullet[i].weaponType) {
case 1:
_root.Bullet[i].deletion = true;
health -= 1;
if (health == 0) {
destroyed();
} else {
createPent();
}
break;
case 2:
_root.Bullet[i].deletion = true;
health -= 1;
if (health == 0) {
Z = 0;
while (Z < 3) {
_root.bulleti += 1;
_root.bulletdepth += 1;
_root.attachMovie('bullet2_2', 'bullet' + _root.bulleti, _root.bulletdepth);
_root.Bullet[_root.BulletSize] = _root['bullet' + _root.bulleti];
_root.BulletSize += 1;
_root['bullet' + _root.bulleti]._x = this._x;
_root['bullet' + _root.bulleti]._y = this._y;
++Z;
}
destroyed();
} else {
createPent();
}
break;
case 4:
_root.Bullet[i].detonation = true;
destroyed();
break;
case 6:
_root.Bullet[i].deletion = true;
health -= 1;
if (health == 0) {
destroyed();
} else {
createPent();
}
break;
case 7:
_root.Bullet[i].detonation = true;
createPent();
destroyed();
break;
case 8:
createPent();
destroyed();
}
}
++i;
}
if (this.hitTest(_root.cannon._x, _root.cannon._y, true) || _root.deleteALL == true) {
_root.playerhealth -= 10;
_root.combocount -= 2;
destroyed();
}
if (_root.bullet_bomb) {
if (_root.bullet_bomb.hitTest(_x, _y, true)) {
_root.bullet_bomb.detonation = true;
}
}
if (_root.wave.hitTest(this._x, this._y, true)) {
destroyed();
}
if (_root.laser) {
if (_root.laser.hitTest(this._x, this._y, true)) {
destroyed();
}
}
}
};
}
}
movieClip 273 pentagon {
frame 1 {
function createFire() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('fire', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
}
function destroyed() {
_root.explode();
if (_quality != 'HIGH') {
piecenumber = 2;
}
i = 0;
while (i < piecenumber) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('shatter', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI].gotoAndStop('pentagon');
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
myColoredObject = new Color('_root.enemy_piece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
++i;
}
deletethis();
}
function showscore() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('enemyscore', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
_root['enemy_piece' + _root.enemypieceI].score = pointworth * _root.combocount;
myColoredObject = new Color('_root.enemy_piece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
}
function deletethis() {
_root.bg.bg_i += 1;
_root.bg.bg_depth += 1;
_root.bg.attachMovie('bg_square', 'bg_object' + _root.bg.bg_i, _root.bg.bg_depth);
_root.bg['bg_object' + _root.bg.bg_i]._x = this._x;
_root.bg['bg_object' + _root.bg.bg_i]._y = this._y;
_root.bg['bg_object' + _root.bg.bg_i]._rotation = this._rotation;
myColoredObject = new Color('_root.bg.bg_object' + _root.bg.bg_i);
myColoredObject.setRGB(myColor);
i = 0;
while (i < _root.EnemySize) {
if (_root.Enemy[i] == this) {
_root.Enemy.splice(i, 1);
_root.EnemySize -= 1;
}
++i;
}
_root.kills += 1;
_root.score += pointworth * _root.combocount;
_root.playertime += 30;
showscore();
_root.combocount += 1;
removeMovieClip(this);
delete this.onEnterFrame;
}
function createPent() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('pentagon_hit', 'pentagon_hit' + _root.enemypieceI, _root.enemypiecedepth);
_root['pentagon_hit' + _root.enemypieceI]._x = this._x;
_root['pentagon_hit' + _root.enemypieceI]._y = this._y;
_root['pentagon_hit' + _root.enemypieceI]._rotation = this._rotation;
myColoredObject = new Color('_root.pentagon_hit' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
}
function createBarrier() {
distance = Math.sqrt(Math.pow(_x - friend._x, 2) + Math.pow(_y - friend._y, 2));
dx = friend._x - _x;
dy = friend._y - _y;
lightningrotation = Math.atan2(dy, dx) * 180 / Math.PI;
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('enemylightning', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
_root['enemy_piece' + _root.enemypieceI]._width = distance;
_root['enemy_piece' + _root.enemypieceI]._rotation = lightningrotation;
}
if (random(2) == 0) {
this._x = random(Stage.width);
if (random(2) == 0) {
this._y = -100;
} else {
this._y = Stage.height + 100;
}
} else {
this._y = random(Stage.height);
if (random(2) == 0) {
this._x = -100;
} else {
this._x = Stage.width + 100;
}
}
pointworth = 20;
enemytype = 3;
R = random(200) + 55;
G = random(200) + 55;
B = random(200) + 55;
myColor = '0x' + R.toString(16) + G.toString(16) + B.toString(16);
myColoredObject = new Color(this);
myColoredObject.setRGB(myColor);
randomrotation = Math.random() * 10 - 5;
piecenumber = _root.piecenumber;
health = 2;
vx = Math.random() * 2 + 1;
vy = Math.random() * 2 + 1;
time = 0;
firetime = 0;
burntime = random(400) + 200;
hp = 200;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (friend._alpha > 0) {
createBarrier();
}
if (_root.slowmotion == true) {
_x = _x + vx / 5;
_y = _y + vy / 5;
_rotation = _rotation + randomrotation / 5;
if (onFire) {
time += 1;
firetime += 1;
}
} else {
_x = _x + vx;
_y = _y + vy;
_rotation = _rotation + randomrotation;
if (onFire) {
time += 5;
firetime += 5;
}
}
if (hp <= 1) {
destroyed();
}
if (onFire) {
if (firetime >= burntime) {
destroyed();
}
if (time >= 15) {
time = 0;
createFire();
}
}
if (_x < _root.bounds.left - 5 && vx < 0) {
vx *= -1;
}
if (_x > _root.bounds.right + 5 && vx > 0) {
vx *= -1;
}
if (_y < _root.bounds.up - 5 && vy < 0) {
vy *= -1;
}
if (_y > _root.bounds.down + 5 && vy > 0) {
vy *= -1;
}
i = 0;
while (i < _root.BulletSize) {
if (this.hitTest(_root.Bullet[i]._x, _root.Bullet[i]._y, true)) {
switch (_root.Bullet[i].weaponType) {
case 1:
_root.Bullet[i].deletion = true;
health -= 1;
if (health == 0) {
destroyed();
} else {
createPent();
}
break;
case 2:
_root.Bullet[i].deletion = true;
health -= 1;
if (health == 0) {
Z = 0;
while (Z < 3) {
_root.bulleti += 1;
_root.bulletdepth += 1;
_root.attachMovie('bullet2_2', 'bullet' + _root.bulleti, _root.bulletdepth);
_root.Bullet[_root.BulletSize] = _root['bullet' + _root.bulleti];
_root.BulletSize += 1;
_root['bullet' + _root.bulleti]._x = this._x;
_root['bullet' + _root.bulleti]._y = this._y;
++Z;
}
destroyed();
} else {
createPent();
}
break;
case 4:
_root.Bullet[i].detonation = true;
destroyed();
break;
case 6:
_root.Bullet[i].deletion = true;
health -= 1;
if (health == 0) {
destroyed();
} else {
createPent();
}
break;
case 7:
_root.Bullet[i].detonation = true;
createPent();
destroyed();
break;
case 8:
createPent();
destroyed();
}
}
++i;
}
if (this.hitTest(_root.cannon._x, _root.cannon._y, true) || _root.deleteALL == true) {
_root.playerhealth -= 20;
_root.combocount -= 2;
destroyed();
}
if (_root.bullet_bomb) {
if (_root.bullet_bomb.hitTest(_x, _y, true)) {
_root.bullet_bomb.detonation = true;
}
}
if (_root.wave.hitTest(this._x, this._y, true)) {
destroyed();
}
if (_root.laser) {
if (_root.laser.hitTest(this._x, this._y, true)) {
destroyed();
}
}
}
};
}
}
movieClip 275 {
}
movieClip 276 {
}
movieClip 277 laser {
frame 1 {
function createSpark(direction) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('laser_spark', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._alpha = _alpha;
if (direction == 'right') {
radians = _root.cannon._rotation * Math.PI / 180;
_root['enemy_piece' + _root.enemypieceI].dir = 2;
_root['enemy_piece' + _root.enemypieceI]._x = _root.bounds.right + 20;
_root['enemy_piece' + _root.enemypieceI]._y = _root.cannon._y + (_root.bounds.right + 20 - _root.cannon._x) * Math.tan(radians);
}
if (direction == 'left') {
radians = _root.cannon._rotation * Math.PI / 180;
_root['enemy_piece' + _root.enemypieceI].dir = 1;
_root['enemy_piece' + _root.enemypieceI]._x = _root.bounds.left - 20;
_root['enemy_piece' + _root.enemypieceI]._y = _root.cannon._y + (_root.bounds.left - 20 - _root.cannon._x) * Math.tan(radians);
}
if (direction == 'down') {
radians = (_root.cannon._rotation + 90) * Math.PI / 180;
_root['enemy_piece' + _root.enemypieceI].dir = 4;
_root['enemy_piece' + _root.enemypieceI]._y = _root.bounds.down + 20;
_root['enemy_piece' + _root.enemypieceI]._x = _root.cannon._x + (_root.cannon._y - (_root.bounds.down + 20)) * Math.tan(radians);
}
if (direction == 'top') {
radians = (_root.cannon._rotation - 90) * Math.PI / 180;
_root['enemy_piece' + _root.enemypieceI].dir = 3;
_root['enemy_piece' + _root.enemypieceI]._y = _root.bounds.up - 20;
_root['enemy_piece' + _root.enemypieceI]._x = _root.cannon._x + (_root.cannon._y - (_root.bounds.up - 20)) * Math.tan(radians);
}
}
function createSurplus() {
surplusI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('laser_surplus', 'laser_surplus' + surplusI, _root.enemypiecedepth);
}
stop();
lasertype = 1;
laserframe._alpha = 0;
_x = _root.cannon._x;
_y = _root.cannon._y;
surplusI = 0;
surplustime = 0;
lasertime = 50;
laserduration = 0;
time = 0;
time2 = 0;
time5 = 0;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_currentframe == 1) {
if (_root.slowmotion == false) {
time += 1;
} else {
time += 0.2;
}
if (time >= 20) {
gotoAndPlay(2);
}
}
this._yscale = 75 + Math.random() * 100;
_x = _root.cannon._x;
_y = _root.cannon._y;
radians = Math.atan2(_root.cursor._y - this._y, _root.cursor._x - this._x);
degrees = Math.round(radians * 180 / Math.PI);
this._rotation = degrees;
if (_root.slowmotion == false) {
surplustime = 0;
createSurplus();
laserduration += 1;
} else {
surplustime += 1;
if (surplustime == 5) {
surplustime = 0;
createSurplus();
}
laserduration += 0.2;
}
if (laserduration > lasertime) {
if (_root.slowmotion == false) {
_alpha = _alpha - 5;
} else {
_alpha = _alpha - 1;
}
if (_alpha <= 5) {
removeMovieClip(this);
delete this.onEnterFrame;
}
} else {
_alpha = 50 + Math.random() * 50;
}
if (detonation) {
removeMovieClip(this);
delete this.onEnterFrame;
v;
}
if (_currentframe == _totalframes) {
if (_root.slowmotion == false) {
time2 += 5;
} else {
time2 += 1;
}
if (time2 >= 5) {
time2 = 0;
cornerangle1 = Math.atan2(-_root.cannon._y, _root.bounds.right + 20 - _root.cannon._x);
cornerangle1 = cornerangle1 * 180 / Math.PI;
cornerangle2 = Math.atan2(_root.bounds.down + 20 - _root.cannon._y, _root.bounds.right + 20 - _root.cannon._x);
cornerangle2 = cornerangle2 * 180 / Math.PI;
cornerangle3 = Math.atan2(_root.bounds.down + 20 - _root.cannon._y, -_root.cannon._x);
cornerangle3 = cornerangle3 * 180 / Math.PI;
cornerangle4 = Math.atan2(-_root.cannon._y, -_root.cannon._x);
cornerangle4 = cornerangle4 * 180 / Math.PI;
if (_root.cannon._rotation > cornerangle1 && _root.cannon._rotation < cornerangle2) {
createSpark('right');
}
if (_root.cannon._rotation > cornerangle2 && _root.cannon._rotation < cornerangle3) {
createSpark('down');
}
if (_root.cannon._rotation > cornerangle3 || _root.cannon._rotation < cornerangle4) {
createSpark('left');
}
if (_root.cannon._rotation > cornerangle4 && _root.cannon._rotation < cornerangle1) {
createSpark('top');
}
}
}
}
};
}
frame 2 {
_root.cannon.gotoAndPlay(2);
_root.playsound('laserfire.wav');
}
frame 10 {
stop();
}
}
movieClip 278 laser_trail {
frame 1 {
alphafade = 10;
_alpha = 30;
this.onEnterFrame = function () {
if (_root.slowmotion == false) {
_alpha = _alpha - alphafade;
} else {
_alpha = _alpha - alphafade / 5;
}
if (_alpha <= 2) {
removeMovieClip(this);
delete this.onEnterFrame;
}
};
}
}
movieClip 279 laser_surplus {
frame 1 {
alphafade = Math.random() * 4 + 3;
_x = _root.cannon._x;
_y = _root.cannon._y;
angle = _root.cannon._rotation;
firepower = 8;
dirx = Math.cos(angle * Math.PI / 180) * firepower;
diry = Math.sin(angle * Math.PI / 180) * firepower;
this._x += dirx * 4;
this._y += diry * 4;
angle2 = _root.cannon._rotation + Math.random() * 180 - 90;
firepower = Math.random() * 8 + 2;
vx = Math.cos(angle2 * Math.PI / 180) * firepower;
vy = Math.sin(angle2 * Math.PI / 180) * firepower;
_xscale = Math.random() * 150 + 1;
_yscale = _xscale;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == false) {
_x = _x + vx;
_y = _y + vy;
_alpha = _alpha - alphafade;
} else {
_x = _x + vx / 5;
_y = _y + vy / 5;
_alpha = _alpha - alphafade / 5;
}
if (_alpha <= 1) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 282 shakescreen {
frame 1 {
_x = Stage.width / 2;
_y = Stage.height / 2;
_alpha = 0;
direction = 1;
this.onEnterFrame = function () {
if (_root.slowmotion == false) {
friction = 0.8;
} else {
friction = 0.92;
}
_root._x = Stage.width / 2 - this._x;
_root._y = Stage.height / 2 - this._y;
if (shake <= 1 && direction == -1) {
shake = 0;
_x = Stage.width / 2;
_y = Stage.height / 2;
_root._x = 0;
_root._y = 0;
removeMovieClip(this);
delete this.onEnterFrame;
} else {
_x = _x + shake * direction;
_y = _y + shake * direction;
direction *= -1;
if (direction == 1) {
shake *= friction;
}
}
};
}
}
movieClip 284 triangle_inf {
frame 1 {
function createFire() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('fire', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
}
function destroyed() {
_root.explode();
if (_quality != 'HIGH') {
piecenumber = 2;
}
i = 0;
while (i < piecenumber) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('shatter', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI].gotoAndStop('triangle');
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
myColoredObject = new Color('_root.enemy_piece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
++i;
}
deletethis();
}
function showscore() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('enemyscore', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
_root['enemy_piece' + _root.enemypieceI].score = pointworth * _root.combocount;
myColoredObject = new Color('_root.enemy_piece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
}
function deletethis() {
if (random(_root.powerupchance) == 0 && !_root.infinityactivated) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('powerup', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
}
_root.bg.bg_i += 1;
_root.bg.bg_depth += 1;
_root.bg.attachMovie('bg_square', 'bg_object' + _root.bg.bg_i, _root.bg.bg_depth);
_root.bg['bg_object' + _root.bg.bg_i]._x = this._x;
_root.bg['bg_object' + _root.bg.bg_i]._y = this._y;
_root.bg['bg_object' + _root.bg.bg_i]._rotation = this._rotation;
myColoredObject = new Color('_root.bg.bg_object' + _root.bg.bg_i);
myColoredObject.setRGB(myColor);
i = 0;
while (i < _root.EnemySize) {
if (_root.Enemy[i] == this) {
_root.Enemy.splice(i, 1);
_root.EnemySize -= 1;
}
++i;
}
_root.kills += 1;
_root.score += pointworth * _root.combocount;
_root.playertime += 30;
showscore();
_root.combocount += 1;
removeMovieClip(this);
delete this.onEnterFrame;
}
function getAngles() {
closest = 10000;
distance = Math.sqrt(Math.pow(_x - _root.cannon._x, 2) + Math.pow(_y - _root.cannon._y, 2));
if (distance < closest) {
closest = distance;
radians = Math.atan2(this._y - _root.cannon._y, this._x - _root.cannon._x);
angle = Math.round(radians * 180 / Math.PI);
dirx = Math.cos(angle * Math.PI / 180) * speed;
diry = Math.sin(angle * Math.PI / 180) * speed;
}
i = 0;
while (i < _root.PlayerSize) {
distance = Math.sqrt(Math.pow(_x - _root.Player[i]._x, 2) + Math.pow(_y - _root.Player[i]._y, 2));
if (distance < closest) {
closest = distance;
radians = Math.atan2(this._y - _root.Player[i]._y, this._x - _root.Player[i]._x);
angle = Math.round(radians * 180 / Math.PI);
dirx = Math.cos(angle * Math.PI / 180) * speed;
diry = Math.sin(angle * Math.PI / 180) * speed;
}
++i;
}
}
function createTrail(xdir, ydir) {
_root.enemypiecedepth += 1;
_root.enemypieceI += 1;
_root.attachMovie('triangle_line', 'enemypiece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemypiece' + _root.enemypieceI]._x = this._x;
_root['enemypiece' + _root.enemypieceI]._y = this._y;
_root['enemypiece' + _root.enemypieceI]._x += xdir;
_root['enemypiece' + _root.enemypieceI]._y += ydir;
myColoredObject = new Color('_root.enemypiece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
}
if (random(2) == 0) {
this._x = random(Stage.width);
if (random(2) == 0) {
this._y = -50;
} else {
this._y = Stage.height + 50;
}
} else {
this._y = random(Stage.height);
if (random(2) == 0) {
this._x = -50;
} else {
this._x = Stage.width + 50;
}
}
pointworth = 10;
R = random(200) + 55;
G = random(200) + 55;
B = random(200) + 55;
myColor = '0x' + R.toString(16) + G.toString(16) + B.toString(16);
myColoredObject = new Color(this);
myColoredObject.setRGB(myColor);
speed = 15;
piecenumber = _root.piecenumber;
aiming = true;
time2 = 0;
firetime = 0;
burntime = random(200) + 100;
hp = 80;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == false) {
time += 1;
if (onFire) {
time2 += 5;
firetime += 5;
}
} else {
time += 0.2;
if (onFire) {
time2 += 1;
firetime += 1;
}
}
if (hp <= 1) {
destroyed();
}
if (time >= 10 && aiming == true) {
time = 0;
aiming = false;
}
if (time >= 70 && aiming == false) {
removeMovieClip('_root.line' + this._name);
time = 0;
aiming = true;
}
if (onFire) {
if (firetime >= burntime) {
destroyed();
}
if (time2 >= 15) {
time2 = 0;
createFire();
}
}
if (aiming == true) {
getAngles();
difference = _rotation - angle;
if (difference > 180) {
angle += 360;
}
if (difference < -180) {
angle -= 360;
}
if (_root.slowmotion == true) {
this._rotation += (angle - this._rotation) / 30;
_x = _x - dirx / 25;
_y = _y - diry / 25;
} else {
this._rotation += (angle - this._rotation) / 5;
_x = _x - dirx / 10;
_y = _y - diry / 10;
}
} else {
if (time == 0) {
getAngles();
speedfade = 1;
}
if (_root.slowmotion == true) {
if (Math.round(time % 3) == 0) {
createTrail(dirx, diry);
}
speedfade -= 0.001;
this._rotation += (angle - this._rotation) / 30;
_x = _x - dirx * speedfade / 5;
_y = _y - diry * speedfade / 5;
} else {
createTrail(dirx, diry);
speedfade -= 0.005;
this._rotation += (angle - this._rotation) / 5;
_x = _x - dirx * speedfade;
_y = _y - diry * speedfade;
}
}
i = 0;
while (i < _root.BulletSize) {
if (this.hitTest(_root.Bullet[i]._x, _root.Bullet[i]._y, true)) {
switch (_root.Bullet[i].weaponType) {
case 1:
_root.Bullet[i].deletion = true;
destroyed();
break;
case 2:
_root.Bullet[i].deletion = true;
Z = 0;
while (Z < 3) {
_root.bulleti += 1;
_root.bulletdepth += 1;
_root.attachMovie('bullet2_2', 'bullet' + _root.bulleti, _root.bulletdepth);
_root.Bullet[_root.BulletSize] = _root['bullet' + _root.bulleti];
_root.BulletSize += 1;
_root['bullet' + _root.bulleti]._x = this._x;
_root['bullet' + _root.bulleti]._y = this._y;
++Z;
}
destroyed();
break;
case 4:
_root.Bullet[i].detonation = true;
destroyed();
break;
case 6:
_root.Bullet[i].deletion = true;
destroyed();
break;
case 7:
_root.Bullet[i].detonation = true;
destroyed();
break;
case 8:
destroyed();
}
}
++i;
}
if (this.hitTest(_root.cannon._x, _root.cannon._y, true) || _root.deleteALL == true) {
_root.playerhealth -= 10;
_root.combocount -= 2;
destroyed();
}
if (_root.bullet_bomb) {
if (_root.bullet_bomb.hitTest(_x, _y, true)) {
_root.bullet_bomb.detonation = true;
}
}
if (_root.wave.hitTest(this._x, this._y, true)) {
destroyed();
}
if (_root.laser) {
if (_root.laser.hitTest(this._x, this._y, true)) {
destroyed();
}
}
}
};
}
}
movieClip 285 triangle {
frame 1 {
function createFire() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('fire', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
}
function destroyed() {
_root.explode();
if (_quality != 'HIGH') {
piecenumber = 2;
}
i = 0;
while (i < piecenumber) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('shatter', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI].gotoAndStop('triangle');
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
myColoredObject = new Color('_root.enemy_piece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
++i;
}
deletethis();
}
function showscore() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('enemyscore', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
_root['enemy_piece' + _root.enemypieceI].score = pointworth * _root.combocount;
myColoredObject = new Color('_root.enemy_piece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
}
function deletethis() {
_root.bg.bg_i += 1;
_root.bg.bg_depth += 1;
_root.bg.attachMovie('bg_square', 'bg_object' + _root.bg.bg_i, _root.bg.bg_depth);
_root.bg['bg_object' + _root.bg.bg_i]._x = this._x;
_root.bg['bg_object' + _root.bg.bg_i]._y = this._y;
_root.bg['bg_object' + _root.bg.bg_i]._rotation = this._rotation;
myColoredObject = new Color('_root.bg.bg_object' + _root.bg.bg_i);
myColoredObject.setRGB(myColor);
i = 0;
while (i < _root.EnemySize) {
if (_root.Enemy[i] == this) {
_root.Enemy.splice(i, 1);
_root.EnemySize -= 1;
}
++i;
}
_root.score += pointworth * _root.combocount;
_root.playertime += 30;
showscore();
_root.combocount += 1;
removeMovieClip(this);
delete this.onEnterFrame;
}
function getAngles() {
closest = 10000;
distance = Math.sqrt(Math.pow(_x - _root.cannon._x, 2) + Math.pow(_y - _root.cannon._y, 2));
if (distance < closest) {
closest = distance;
radians = Math.atan2(this._y - _root.cannon._y, this._x - _root.cannon._x);
angle = Math.round(radians * 180 / Math.PI);
dirx = Math.cos(angle * Math.PI / 180) * speed;
diry = Math.sin(angle * Math.PI / 180) * speed;
}
i = 0;
while (i < _root.PlayerSize) {
distance = Math.sqrt(Math.pow(_x - _root.Player[i]._x, 2) + Math.pow(_y - _root.Player[i]._y, 2));
if (distance < closest) {
closest = distance;
radians = Math.atan2(this._y - _root.Player[i]._y, this._x - _root.Player[i]._x);
angle = Math.round(radians * 180 / Math.PI);
dirx = Math.cos(angle * Math.PI / 180) * speed;
diry = Math.sin(angle * Math.PI / 180) * speed;
}
++i;
}
}
function createTrail(xdir, ydir) {
_root.enemypiecedepth += 1;
_root.enemypieceI += 1;
_root.attachMovie('triangle_line', 'enemypiece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemypiece' + _root.enemypieceI]._x = this._x;
_root['enemypiece' + _root.enemypieceI]._y = this._y;
_root['enemypiece' + _root.enemypieceI]._x += xdir;
_root['enemypiece' + _root.enemypieceI]._y += ydir;
myColoredObject = new Color('_root.enemypiece' + _root.enemypieceI);
myColoredObject.setRGB(myColor);
}
if (random(2) == 0) {
this._x = random(Stage.width);
if (random(2) == 0) {
this._y = -50;
} else {
this._y = Stage.height + 50;
}
} else {
this._y = random(Stage.height);
if (random(2) == 0) {
this._x = -50;
} else {
this._x = Stage.width + 50;
}
}
pointworth = 10;
R = random(200) + 55;
G = random(200) + 55;
B = random(200) + 55;
myColor = '0x' + R.toString(16) + G.toString(16) + B.toString(16);
myColoredObject = new Color(this);
myColoredObject.setRGB(myColor);
speed = 15;
piecenumber = _root.piecenumber;
aiming = true;
time2 = 0;
firetime = 0;
burntime = random(200) + 100;
hp = 80;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == false) {
time += 1;
if (onFire) {
time2 += 5;
firetime += 5;
}
} else {
time += 0.2;
if (onFire) {
time2 += 1;
firetime += 1;
}
}
if (hp <= 1) {
destroyed();
}
if (time >= 10 && aiming == true) {
time = 0;
aiming = false;
}
if (time >= 70 && aiming == false) {
removeMovieClip('_root.line' + this._name);
time = 0;
aiming = true;
}
if (onFire) {
if (firetime >= burntime) {
destroyed();
}
if (time2 >= 15) {
time2 = 0;
createFire();
}
}
if (aiming == true) {
getAngles();
difference = _rotation - angle;
if (difference > 180) {
angle += 360;
}
if (difference < -180) {
angle -= 360;
}
if (_root.slowmotion == true) {
this._rotation += (angle - this._rotation) / 30;
_x = _x - dirx / 25;
_y = _y - diry / 25;
} else {
this._rotation += (angle - this._rotation) / 5;
_x = _x - dirx / 10;
_y = _y - diry / 10;
}
} else {
if (time == 0) {
getAngles();
speedfade = 1;
}
if (_root.slowmotion == true) {
if (Math.round(time % 3) == 0) {
createTrail(dirx, diry);
}
speedfade -= 0.001;
this._rotation += (angle - this._rotation) / 30;
_x = _x - dirx * speedfade / 5;
_y = _y - diry * speedfade / 5;
} else {
createTrail(dirx, diry);
speedfade -= 0.005;
this._rotation += (angle - this._rotation) / 5;
_x = _x - dirx * speedfade;
_y = _y - diry * speedfade;
}
}
i = 0;
while (i < _root.BulletSize) {
if (this.hitTest(_root.Bullet[i]._x, _root.Bullet[i]._y, true)) {
switch (_root.Bullet[i].weaponType) {
case 1:
_root.Bullet[i].deletion = true;
destroyed();
break;
case 2:
_root.Bullet[i].deletion = true;
Z = 0;
while (Z < 3) {
_root.bulleti += 1;
_root.bulletdepth += 1;
_root.attachMovie('bullet2_2', 'bullet' + _root.bulleti, _root.bulletdepth);
_root.Bullet[_root.BulletSize] = _root['bullet' + _root.bulleti];
_root.BulletSize += 1;
_root['bullet' + _root.bulleti]._x = this._x;
_root['bullet' + _root.bulleti]._y = this._y;
++Z;
}
destroyed();
break;
case 4:
_root.Bullet[i].detonation = true;
destroyed();
break;
case 6:
_root.Bullet[i].deletion = true;
destroyed();
break;
case 7:
_root.Bullet[i].detonation = true;
destroyed();
break;
case 8:
destroyed();
}
}
++i;
}
if (this.hitTest(_root.cannon._x, _root.cannon._y, true) || _root.deleteALL == true) {
_root.playerhealth -= 20;
_root.combocount -= 2;
destroyed();
}
if (_root.bullet_bomb) {
if (_root.bullet_bomb.hitTest(_x, _y, true)) {
_root.bullet_bomb.detonation = true;
}
}
if (_root.wave.hitTest(this._x, this._y, true)) {
destroyed();
}
if (_root.laser) {
if (_root.laser.hitTest(this._x, this._y, true)) {
destroyed();
}
}
}
};
}
}
movieClip 287 b4_trail2 {
frame 1 {
alphafade = 20;
angle = _root.cannon._rotation;
firepower = 8;
dirx = Math.cos(angle * Math.PI / 180) * firepower;
diry = Math.sin(angle * Math.PI / 180) * firepower;
vx = Math.random() * 4 - 2;
vy = Math.random() * 4 - 2;
_rotation = random(360) + 1;
this.onEnterFrame = function () {
if (_root.slowmotion == false) {
_x = _x + vx;
_y = _y + vy;
_alpha = _alpha - alphafade;
} else {
_x = _x + vx / 5;
_y = _y + vy / 5;
_alpha = _alpha - alphafade / 5;
}
if (_alpha <= 2) {
removeMovieClip(this);
delete this.onEnterFrame;
}
};
}
}
movieClip 288 bullet1_trail {
frame 1 {
alphafade = 8;
angle = _root.cannon._rotation;
firepower = 8;
dirx = Math.cos(angle * Math.PI / 180) * firepower;
diry = Math.sin(angle * Math.PI / 180) * firepower;
vx = 0;
vy = 0;
_rotation = random(360) + 1;
this.onEnterFrame = function () {
if (_root.slowmotion == false) {
_x = _x + vx;
_y = _y + vy;
_alpha = _alpha - alphafade;
} else {
_x = _x + vx / 5;
_y = _y + vy / 5;
_alpha = _alpha - alphafade / 5;
}
if (_alpha <= 2) {
removeMovieClip(this);
delete this.onEnterFrame;
}
};
}
}
movieClip 289 {
}
movieClip 290 plane_trail {
frame 1 {
alphafade = 4;
angle = _root.cannon._rotation;
firepower = 8;
dirx = Math.cos(angle * Math.PI / 180) * firepower;
diry = Math.sin(angle * Math.PI / 180) * firepower;
vx = Math.random() * 4 - 2;
vy = Math.random() * 4 - 2;
_rotation = random(360) + 1;
_xscale = Math.random() * 50 + 50;
_yscale = _xscale;
this.onEnterFrame = function () {
if (_root.slowmotion == false) {
_xscale = _xscale - 5;
_yscale = _yscale - 5;
_x = _x + vx;
_y = _y + vy;
_alpha = _alpha - alphafade;
} else {
_xscale = _xscale - 1;
_yscale = _yscale - 1;
_x = _x + vx / 5;
_y = _y + vy / 5;
_alpha = _alpha - alphafade / 5;
}
if (_alpha <= 2 || _xscale <= 1) {
removeMovieClip(this);
delete this.onEnterFrame;
}
};
}
frame 25 {
stop();
}
}
movieClip 291 b4_trail {
frame 1 {
alphafade = 6;
angle = _root.cannon._rotation;
firepower = 8;
dirx = Math.cos(angle * Math.PI / 180) * firepower;
diry = Math.sin(angle * Math.PI / 180) * firepower;
vx = Math.random() * 4 - 2;
vy = Math.random() * 4 - 2;
_rotation = random(360) + 1;
this.onEnterFrame = function () {
if (_root.slowmotion == false) {
_x = _x + vx;
_y = _y + vy;
_alpha = _alpha - alphafade;
} else {
_x = _x + vx / 5;
_y = _y + vy / 5;
_alpha = _alpha - alphafade / 5;
}
if (_alpha <= 2) {
removeMovieClip(this);
delete this.onEnterFrame;
}
};
}
}
movieClip 293 hearttrail {
frame 1 {
_alpha = 50;
alphafade = 1;
angle = _root.cannon._rotation;
firepower = 8;
dirx = Math.cos(angle * Math.PI / 180) * firepower;
diry = Math.sin(angle * Math.PI / 180) * firepower;
vx = Math.random() * 6 - 3;
vy = Math.random() * 6 - 3;
_rotation = random(360) + 1;
_xscale = 10;
_yscale = _xscale;
xshrink = 5;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == false) {
_xscale = _xscale + xshrink;
_yscale = _yscale + xshrink;
_x = _x + vx;
_y = _y + vy;
_alpha = _alpha - alphafade;
} else {
_xscale = _xscale + xshrink / 5;
_yscale = _yscale + xshrink / 5;
_x = _x + vx / 5;
_y = _y + vy / 5;
_alpha = _alpha - alphafade / 5;
}
if (_alpha <= 2) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 294 b2_trail {
frame 1 {
alphafade = 10;
angle = _root.cannon._rotation;
firepower = 8;
dirx = Math.cos(angle * Math.PI / 180) * firepower;
diry = Math.sin(angle * Math.PI / 180) * firepower;
vx = Math.random() * 6 - 3;
vy = Math.random() * 6 - 3;
_rotation = random(360) + 1;
xshrink = 5;
this.onEnterFrame = function () {
if (_root.slowmotion == false) {
_xscale = _xscale - xshrink;
_yscale = _yscale - xshrink;
_x = _x + vx;
_y = _y + vy;
_alpha = _alpha - alphafade;
} else {
_xscale = _xscale - xshrink / 5;
_yscale = _yscale - xshrink / 5;
_x = _x + vx / 5;
_y = _y + vy / 5;
_alpha = _alpha - alphafade / 5;
}
if (_alpha <= 2) {
removeMovieClip(this);
delete this.onEnterFrame;
}
};
}
}
movieClip 296 {
}
movieClip 297 rocket_fire3 {
frame 1 {
alphafade = 15;
vx = Math.random();
vy = Math.random();
_rotation = random(360) + 1;
xshrink = 10;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == false) {
colorchange._alpha += 10;
_xscale = _xscale - xshrink;
_yscale = _yscale - xshrink;
_x = _x + vx;
_y = _y + vy;
_alpha = _alpha - alphafade;
} else {
colorchange._alpha += 2;
_xscale = _xscale - xshrink / 5;
_yscale = _yscale - xshrink / 5;
_x = _x + vx / 5;
_y = _y + vy / 5;
_alpha = _alpha - alphafade / 5;
}
if (_alpha <= 2) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 300 {
}
movieClip 301 rocket_fire2 {
frame 1 {
alphafade = 5;
vx = Math.random();
vy = Math.random();
_rotation = random(360) + 1;
xshrink = 5;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == false) {
colorchange._alpha += 10;
_xscale = _xscale - xshrink;
_yscale = _yscale - xshrink;
_x = _x + vx;
_y = _y + vy;
_alpha = _alpha - alphafade;
} else {
colorchange._alpha += 2;
_xscale = _xscale - xshrink / 5;
_yscale = _yscale - xshrink / 5;
_x = _x + vx / 5;
_y = _y + vy / 5;
_alpha = _alpha - alphafade / 5;
}
if (_alpha <= 2) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 303 {
}
movieClip 304 rocket_fire {
frame 1 {
alphafade = 10;
vx = Math.random();
vy = Math.random();
_rotation = random(360) + 1;
xshrink = 5;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == false) {
colorchange._alpha += 10;
_xscale = _xscale - xshrink;
_yscale = _yscale - xshrink;
_x = _x + vx;
_y = _y + vy;
_alpha = _alpha - alphafade;
} else {
colorchange._alpha += 2;
_xscale = _xscale - xshrink / 5;
_yscale = _yscale - xshrink / 5;
_x = _x + vx / 5;
_y = _y + vy / 5;
_alpha = _alpha - alphafade / 5;
}
if (_alpha <= 2) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 306 triangle_line {
frame 1 {
alphafade = 10;
angle = _root.cannon._rotation;
firepower = 8;
dirx = Math.cos(angle * Math.PI / 180) * firepower;
diry = Math.sin(angle * Math.PI / 180) * firepower;
vx = Math.random() * 2 - 1;
vy = Math.random() * 2 - 1;
_rotation = random(360) + 1;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == false) {
_x = _x + vx;
_y = _y + vy;
_alpha = _alpha - alphafade;
} else {
_x = _x + vx / 5;
_y = _y + vy / 5;
_alpha = _alpha - alphafade / 5;
}
if (_alpha <= 2) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 307 emptyMovie {
frame 1 {
destroyed = false;
this.onEnterFrame = function () {
if (!_root.slowmotion) {
if (!destroyed) {
_alpha = _alpha - 1;
} else {
_alpha = _alpha - 5;
}
} else {
if (!destroyed) {
_alpha = _alpha - 0.2;
} else {
_alpha = _alpha - 1;
}
}
if (_alpha < 2) {
removeMovieClip(this);
delete this.onEnterFrame;
}
};
}
}
movieClip 308 {
}
movieClip 309 bg {
frame 1 {
bg_i = 0;
bg_j = 0;
bg_depth = 0;
objectalpha = 100;
finalWidth = 5000;
alphafade = 1;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_quality == 'HIGH') {
objectalpha = 70;
finalWidth = 5000;
alphafade = 1;
} else {
objectalpha = 70;
finalWidth = 6000;
alphafade = 5;
}
i = bg_j;
while (i <= bg_i) {
if ('bg_object' + i) {
if (!_root.slowmotion) {
this['bg_object' + i]._alpha -= alphafade;
this['bg_object' + i]._xscale += (this['bg_object' + i].finalWidth - this['bg_object' + i]._xscale) / 15;
this['bg_object' + i]._yscale += (this['bg_object' + i].finalWidth - this['bg_object' + i]._yscale) / 15;
} else {
this['bg_object' + i]._alpha -= alphafade / 5;
this['bg_object' + i]._xscale += (this['bg_object' + i].finalWidth - this['bg_object' + i]._xscale) / 75;
this['bg_object' + i]._yscale += (this['bg_object' + i].finalWidth - this['bg_object' + i]._yscale) / 75;
}
if (this['bg_object' + i]._alpha <= 1) {
removeMovieClip('bg_object' + i);
bg_j += 1;
}
}
++i;
}
}
};
}
}
movieClip 311 bg_pentagon {
frame 1 {
_alpha = _parent.objectalpha;
finalWidth = _parent.finalWidth;
}
}
movieClip 313 bg_triangle {
frame 1 {
_alpha = _parent.objectalpha;
finalWidth = _parent.finalWidth;
}
}
movieClip 315 bg_square {
frame 2 {
stop();
_alpha = _parent.objectalpha;
finalWidth = _parent.finalWidth;
}
}
movieClip 327 {
frame 1 {
gotoAndStop(random(_totalframes) + 1);
}
}
movieClip 328 boom_text {
frame 30 {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
movieClip 330 {
}
movieClip 331 boom {
frame 37 {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
movieClip 334 {
}
movieClip 336 {
}
movieClip 338 bullet6 {
frame 1 {
function createSpark(dir) {
_root.ricochet();
i = 0;
while (i < 5) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('bullet7_spark', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
if (dir == 1) {
_root['enemy_piece' + _root.enemypieceI].dir = 1;
_root['enemy_piece' + _root.enemypieceI]._x = _root.bounds.left - 17;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
}
if (dir == 2) {
_root['enemy_piece' + _root.enemypieceI].dir = 2;
_root['enemy_piece' + _root.enemypieceI]._x = _root.bounds.right + 17;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
}
if (dir == 3) {
_root['enemy_piece' + _root.enemypieceI].dir = 3;
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.bounds.up - 17;
}
if (dir == 4) {
_root['enemy_piece' + _root.enemypieceI].dir = 4;
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.bounds.down + 17;
}
++i;
}
i = 0;
while (i < _root.BulletSize) {
if (_root.Bullet[i] == this) {
_root.Bullet.splice(i, 1);
_root.BulletSize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
function createTrail() {
_root.enemypiecedepth += 1;
_root.enemypieceI += 1;
_root.attachMovie('rocket_fire', 'enemypiece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemypiece' + _root.enemypieceI]._x = this._x;
_root['enemypiece' + _root.enemypieceI]._y = this._y;
dirx2 = Math.cos(_rotation * Math.PI / 180);
diry2 = Math.sin(_rotation * Math.PI / 180);
_root['enemypiece' + _root.enemypieceI]._x -= dirx2 * 12;
_root['enemypiece' + _root.enemypieceI]._y -= diry2 * 12;
}
this._x = _root.cannon._x;
this._y = _root.cannon._y;
alphafade = 2;
weaponType = 7;
angle = _root.cannon._rotation + Math.random() * 60 - 30;
firepower = 12 + Math.random() * 4;
dirx = Math.cos(angle * Math.PI / 180) * firepower;
diry = Math.sin(angle * Math.PI / 180) * firepower;
_rotation = angle;
this._x += dirx * 2;
this._y += diry * 2;
time = 0;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.slowmotion == true) {
time += 1;
_x = _x + dirx / 5;
_y = _y + diry / 5;
} else {
time += 5;
_x = _x + dirx;
_y = _y + diry;
}
if (time >= 10) {
time = 0;
createTrail();
}
if (this._alpha < 2 || detonation) {
i = 0;
while (i < _root.BulletSize) {
if (_root.Bullet[i] == this) {
_root.Bullet.splice(i, 1);
_root.BulletSize -= 1;
removeMovieClip(this);
delete this.onEnterFrame;
}
++i;
}
}
if (_x < _root.bounds.left - 15) {
createSpark(1);
}
if (_x > _root.bounds.right + 15) {
createSpark(2);
}
if (_y < _root.bounds.up - 15) {
createSpark(3);
}
if (_y > _root.bounds.down + 15) {
createSpark(4);
}
}
};
}
}
movieClip 340 rocket_2 {
frame 1 {
function createSpark(dir) {
i = 0;
while (i < 5) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('bullet7_spark', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI].gotoAndStop(2);
if (dir == 1) {
_root['enemy_piece' + _root.enemypieceI].dir = 1;
_root['enemy_piece' + _root.enemypieceI]._x = _root.bounds.left - 20;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
}
if (dir == 2) {
_root['enemy_piece' + _root.enemypieceI].dir = 2;
_root['enemy_piece' + _root.enemypieceI]._x = _root.bounds.right + 20;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
}
if (dir == 3) {
_root['enemy_piece' + _root.enemypieceI].dir = 3;
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.bounds.up - 20;
}
if (dir == 4) {
_root['enemy_piece' + _root.enemypieceI].dir = 4;
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.bounds.down + 20;
}
++i;
}
i = 0;
while (i < _root.BulletSize) {
if (_root.Bullet[i] == this) {
_root.Bullet.splice(i, 1);
_root.BulletSize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
function createTrail() {
_root.enemypiecedepth += 1;
_root.enemypieceI += 1;
_root.attachMovie('rocket_fire2', 'enemypiece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemypiece' + _root.enemypieceI]._x = this._x;
_root['enemypiece' + _root.enemypieceI]._y = this._y;
dirx2 = Math.cos(_rotation * Math.PI / 180);
diry2 = Math.sin(_rotation * Math.PI / 180);
_root['enemypiece' + _root.enemypieceI]._x -= dirx2 * 12;
_root['enemypiece' + _root.enemypieceI]._y -= diry2 * 12;
}
this._x = _root.cannon._x;
this._y = _root.cannon._y;
this._rotation = _root.cannon._rotation;
angle = _root.cannon._rotation;
firepower = 12;
dirx = Math.cos(angle * Math.PI / 180) * firepower;
diry = Math.sin(angle * Math.PI / 180) * firepower;
this._x += dirx * 2;
this._y += diry * 2;
Missile_speed = 10 + Math.random() * 4;
Missile_turning = 0.5 + Math.random() / 2;
missilevx = 0;
missilevy = 0;
time = 0;
time2 = 0;
time3 = 0;
weaponType = 7;
lockon = false;
deployed = false;
_root.shotdelay = 1;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (!_root.slowmotion) {
this._rotation += (angle2 - this._rotation) / 5;
time += 5;
time2 += 5;
time3 += 5;
if (time3 <= 50) {
_x = _x + dirx;
_y = _y + diry;
} else {
lockit = true;
_x = _x + missilevx;
_y = _y + missilevy;
}
Missile_turning = 1;
} else {
this._rotation += (angle2 - this._rotation) / 30;
time += 1;
time2 += 1;
time3 += 1;
if (time3 <= 50) {
_x = _x + dirx / 5;
_y = _y + diry / 5;
} else {
lockit = true;
_x = _x + missilevx / 5;
_y = _y + missilevy / 5;
}
Missile_turning = 0.5;
}
if (lockit) {
dx = _root._xmouse - _x;
dy = _root._ymouse - _y;
lockon = true;
}
if (!lockon) {
if (!deployed) {
deployed = true;
}
dx = dirx;
dy = diry;
}
if (lockon) {
lockon = false;
}
radians2 = Math.atan2(dy, dx);
angle2 = Math.round(radians2 * 180 / Math.PI);
difference = _rotation - angle2;
if (difference > 180) {
angle2 += 360;
}
if (difference < -180) {
angle2 -= 360;
}
distance = Math.sqrt(dx * dx + dy * dy);
dx /= distance;
dy /= distance;
missilevx += dx * Missile_turning;
missilevy += dy * Missile_turning;
velocity = Math.sqrt(missilevx * missilevx + missilevy * missilevy);
if (velocity > Missile_speed) {
missilevx = missilevx * Missile_speed / velocity;
missilevy = missilevy * Missile_speed / velocity;
}
if (time2 >= 5) {
time2 = 0;
createTrail();
}
if (time >= 1000) {
detonation = true;
}
if (this.detonation == true) {
i = 0;
while (i < _root.BulletSize) {
if (_root.Bullet[i] == this) {
_root.Bullet.splice(i, 1);
_root.BulletSize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
if (_x < _root.bounds.left - 15) {
createSpark(1);
}
if (_x > _root.bounds.right + 15) {
createSpark(2);
}
if (_y < _root.bounds.up - 15) {
createSpark(3);
}
if (_y > _root.bounds.down + 15) {
createSpark(4);
}
}
};
}
}
movieClip 342 trianglemissile2 {
frame 1 {
function createSpark(dir) {
i = 0;
while (i < 5) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('trianglemissile_spark2', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI].gotoAndStop(2);
if (dir == 1) {
_root['enemy_piece' + _root.enemypieceI].dir = 1;
_root['enemy_piece' + _root.enemypieceI]._x = _root.bounds.left - 20;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
}
if (dir == 2) {
_root['enemy_piece' + _root.enemypieceI].dir = 2;
_root['enemy_piece' + _root.enemypieceI]._x = _root.bounds.right + 20;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
}
if (dir == 3) {
_root['enemy_piece' + _root.enemypieceI].dir = 3;
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.bounds.up - 20;
}
if (dir == 4) {
_root['enemy_piece' + _root.enemypieceI].dir = 4;
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.bounds.down + 20;
}
++i;
}
i = 0;
while (i < _root.EnemySize) {
if (_root.Enemy[i] == this) {
_root.Enemy.splice(i, 1);
_root.EnemySize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
function createTrail() {
_root.enemypiecedepth += 1;
_root.enemypieceI += 1;
_root.attachMovie('rocket_fire3', 'enemypiece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemypiece' + _root.enemypieceI]._x = this._x;
_root['enemypiece' + _root.enemypieceI]._y = this._y;
dirx2 = Math.cos(_rotation * Math.PI / 180);
diry2 = Math.sin(_rotation * Math.PI / 180);
_root['enemypiece' + _root.enemypieceI]._x -= dirx2 * 12;
_root['enemypiece' + _root.enemypieceI]._y -= diry2 * 12;
}
function createFire() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('fire', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
}
function destroyed() {
_root.explode();
if (_quality != 'HIGH') {
piecenumber = 2;
}
i = 0;
while (i < piecenumber) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('triangle_shatter2', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
++i;
}
deletethis();
}
function deletethis() {
i = 0;
while (i < _root.EnemySize) {
if (_root.Enemy[i] == this) {
_root.Enemy.splice(i, 1);
_root.EnemySize -= 1;
}
++i;
}
_root.playertime += 15;
removeMovieClip(this);
delete this.onEnterFrame;
}
if (_root.soundeffects) {
_root.soundnumber += 1;
_root['sound' + _root.soundnumber] = new Sound();
randomsound = random(2);
if (randomsound == 0) {
_root['sound' + _root.soundnumber].attachSound('swish');
}
if (randomsound == 1) {
_root['sound' + _root.soundnumber].attachSound('swish2');
}
_root['sound' + _root.soundnumber].start(0, 0);
}
Missile_speed = 5 + Math.random() * 4;
missilevx = 0;
missilevy = 0;
time = 0;
time2 = 0;
time3 = 0;
time4 = 0;
time5 = 0;
weaponType = 7;
lockon = false;
deployed = false;
primed = false;
firetime = 0;
burntime = random(200) + 100;
hp = 50;
piecenumber = 5;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (onFire) {
if (firetime >= burntime) {
destroyed();
}
if (time4 >= 15) {
time4 = 0;
createFire();
}
}
if (this.hitTest(_root.cannon._x, _root.cannon._y, true) || _root.deleteALL == true) {
_root.combocount = 0;
_root.playerhealth -= 20;
destroyed();
}
if (!_root.slowmotion) {
this._rotation += (angle2 - this._rotation) / 5;
time += 5;
time2 += 5;
time3 += 5;
time5 += 5;
if (time3 <= 50) {
_x = _x + dirx;
_y = _y + diry;
} else {
_x = _x + missilevx;
_y = _y + missilevy;
}
if (onFire) {
time4 += 5;
firetime += 5;
}
Missile_turning = 1;
} else {
this._rotation += (angle2 - this._rotation) / 30;
time += 1;
time2 += 1;
time3 += 1;
time5 += 1;
if (time3 <= 50) {
_x = _x + dirx / 5;
_y = _y + diry / 5;
} else {
_x = _x + missilevx / 5;
_y = _y + missilevy / 5;
}
if (onFire) {
time4 += 1;
firetime += 1;
}
Missile_turning = 0.5;
}
if (time5 > 500) {
destroyed();
}
if (hp <= 1) {
destroyed();
}
dx = _root.cannon._x - _x;
dy = _root.cannon._y - _y;
radians2 = Math.atan2(dy, dx);
angle2 = Math.round(radians2 * 180 / Math.PI);
difference = _rotation - angle2;
if (difference > 180) {
angle2 += 360;
}
if (difference < -180) {
angle2 -= 360;
}
distance = Math.sqrt(dx * dx + dy * dy);
dx /= distance;
dy /= distance;
missilevx += dx * Missile_turning;
missilevy += dy * Missile_turning;
velocity = Math.sqrt(missilevx * missilevx + missilevy * missilevy);
if (velocity > Missile_speed) {
missilevx = missilevx * Missile_speed / velocity;
missilevy = missilevy * Missile_speed / velocity;
}
if (time2 >= 5) {
time2 = 0;
createTrail();
}
if (time >= 100) {
primed = true;
}
if (time >= 1000) {
detonation = true;
}
if (this.detonation == true) {
i = 0;
while (i < _root.BulletSize) {
if (_root.Bullet[i] == this) {
_root.Bullet.splice(i, 1);
_root.BulletSize -= 1;
}
++i;
}
destroyed();
}
if (_root.wave.hitTest(this._x, this._y, true)) {
destroyed();
}
if (_root.laser) {
if (_root.laser.hitTest(this._x, this._y, true)) {
destroyed();
}
}
if (primed) {
if (_x < _root.bounds.left - 15) {
createSpark(1);
}
if (_x > _root.bounds.right + 15) {
createSpark(2);
}
if (_y < _root.bounds.up - 15) {
createSpark(3);
}
if (_y > _root.bounds.down + 15) {
createSpark(4);
}
}
}
};
}
}
movieClip 344 trianglemissile {
frame 1 {
function createSpark(dir) {
if (_root.soundeffects) {
_root.soundnumber += 1;
_root['sound' + _root.soundnumber] = new Sound();
_root['sound' + _root.soundnumber].attachSound('blast');
_root['sound' + _root.soundnumber].start(0, 0);
}
i = 0;
while (i < 5) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('trianglemissile_spark', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI].gotoAndStop(2);
if (dir == 1) {
_root['enemy_piece' + _root.enemypieceI].dir = 1;
_root['enemy_piece' + _root.enemypieceI]._x = _root.bounds.left - 20;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
}
if (dir == 2) {
_root['enemy_piece' + _root.enemypieceI].dir = 2;
_root['enemy_piece' + _root.enemypieceI]._x = _root.bounds.right + 20;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
}
if (dir == 3) {
_root['enemy_piece' + _root.enemypieceI].dir = 3;
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.bounds.up - 20;
}
if (dir == 4) {
_root['enemy_piece' + _root.enemypieceI].dir = 4;
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.bounds.down + 20;
}
++i;
}
i = 0;
while (i < _root.EnemySize) {
if (_root.Enemy[i] == this) {
_root.Enemy.splice(i, 1);
_root.EnemySize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
function createTrail() {
_root.enemypiecedepth += 1;
_root.enemypieceI += 1;
_root.attachMovie('rocket_fire3', 'enemypiece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemypiece' + _root.enemypieceI]._x = this._x;
_root['enemypiece' + _root.enemypieceI]._y = this._y;
dirx2 = Math.cos(_rotation * Math.PI / 180);
diry2 = Math.sin(_rotation * Math.PI / 180);
_root['enemypiece' + _root.enemypieceI]._x -= dirx2 * 12;
_root['enemypiece' + _root.enemypieceI]._y -= diry2 * 12;
}
function createFire() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('fire', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
}
function destroyed() {
if (_root.soundeffects) {
_root.soundnumber += 1;
_root['sound' + _root.soundnumber] = new Sound();
_root['sound' + _root.soundnumber].attachSound('blast');
_root['sound' + _root.soundnumber].start(0, 0);
}
if (_quality != 'HIGH') {
piecenumber = 2;
}
i = 0;
while (i < piecenumber) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('triangle_shatter', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
++i;
}
deletethis();
}
function deletethis() {
i = 0;
while (i < _root.EnemySize) {
if (_root.Enemy[i] == this) {
_root.Enemy.splice(i, 1);
_root.EnemySize -= 1;
}
++i;
}
_root.playertime += 15;
removeMovieClip(this);
delete this.onEnterFrame;
}
randomsound = random(2);
if (randomsound == 0) {
_root.playsound('swish');
}
if (randomsound == 1) {
_root.playsound('swish2');
}
Missile_speed = 5 + Math.random() * 4;
missilevx = 0;
missilevy = 0;
time = 0;
time2 = 0;
time3 = 0;
time4 = 0;
time5 = 0;
weaponType = 7;
lockon = false;
deployed = false;
primed = false;
firetime = 0;
burntime = random(200) + 100;
hp = 50;
piecenumber = 5;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (onFire) {
if (firetime >= burntime) {
destroyed();
}
if (time4 >= 15) {
time4 = 0;
createFire();
}
}
i = 0;
while (i < _root.BulletSize) {
if (this.hitTest(_root.Bullet[i]._x, _root.Bullet[i]._y, true)) {
switch (_root.Bullet[i].weaponType) {
case 1:
_root.Bullet[i].deletion = true;
destroyed();
break;
case 2:
_root.Bullet[i].deletion = true;
Z = 0;
while (Z < 3) {
_root.bulleti += 1;
_root.bulletdepth += 1;
_root.attachMovie('bullet2_2', 'bullet' + _root.bulleti, _root.bulletdepth);
_root.Bullet[_root.BulletSize] = _root['bullet' + _root.bulleti];
_root.BulletSize += 1;
_root['bullet' + _root.bulleti]._x = this._x;
_root['bullet' + _root.bulleti]._y = this._y;
++Z;
}
destroyed();
break;
case 4:
_root.Bullet[i].detonation = true;
destroyed();
break;
case 6:
_root.Bullet[i].deletion = true;
destroyed();
break;
case 7:
_root.Bullet[i].detonation = true;
destroyed();
break;
case 8:
destroyed();
}
}
++i;
}
if (this.hitTest(_root.cannon._x, _root.cannon._y, true) || _root.deleteALL == true) {
_root.combocount -= 2;
_root.playerhealth -= 15;
destroyed();
}
if (!_root.slowmotion) {
this._rotation += (angle2 - this._rotation) / 5;
time += 5;
time2 += 5;
time3 += 5;
time5 += 5;
if (time3 <= 50) {
_x = _x + dirx;
_y = _y + diry;
} else {
_x = _x + missilevx;
_y = _y + missilevy;
}
if (onFire) {
time4 += 5;
firetime += 5;
}
Missile_turning = 1;
} else {
this._rotation += (angle2 - this._rotation) / 30;
time += 1;
time2 += 1;
time3 += 1;
time5 += 1;
if (time3 <= 50) {
_x = _x + dirx / 5;
_y = _y + diry / 5;
} else {
_x = _x + missilevx / 5;
_y = _y + missilevy / 5;
}
if (onFire) {
time4 += 1;
firetime += 1;
}
Missile_turning = 0.5;
}
if (time5 > 500) {
destroyed();
}
if (hp <= 1) {
destroyed();
}
dx = _root.cannon._x - _x;
dy = _root.cannon._y - _y;
radians2 = Math.atan2(dy, dx);
angle2 = Math.round(radians2 * 180 / Math.PI);
difference = _rotation - angle2;
if (difference > 180) {
angle2 += 360;
}
if (difference < -180) {
angle2 -= 360;
}
distance = Math.sqrt(dx * dx + dy * dy);
dx /= distance;
dy /= distance;
missilevx += dx * Missile_turning;
missilevy += dy * Missile_turning;
velocity = Math.sqrt(missilevx * missilevx + missilevy * missilevy);
if (velocity > Missile_speed) {
missilevx = missilevx * Missile_speed / velocity;
missilevy = missilevy * Missile_speed / velocity;
}
if (time2 >= 5) {
time2 = 0;
createTrail();
}
if (time >= 100) {
primed = true;
}
if (time >= 1000) {
detonation = true;
}
if (this.detonation == true) {
i = 0;
while (i < _root.BulletSize) {
if (_root.Bullet[i] == this) {
_root.Bullet.splice(i, 1);
_root.BulletSize -= 1;
}
++i;
}
destroyed();
}
if (_root.wave.hitTest(this._x, this._y, true)) {
destroyed();
}
if (_root.laser) {
if (_root.laser.hitTest(this._x, this._y, true)) {
destroyed();
}
}
if (primed) {
if (_x < _root.bounds.left - 15) {
createSpark(1);
}
if (_x > _root.bounds.right + 15) {
createSpark(2);
}
if (_y < _root.bounds.up - 15) {
createSpark(3);
}
if (_y > _root.bounds.down + 15) {
createSpark(4);
}
}
}
};
}
}
movieClip 346 rocket {
frame 1 {
function createSpark(dir) {
if (_root.soundeffects) {
_root.soundnumber += 1;
_root['sound' + _root.soundnumber] = new Sound();
_root['sound' + _root.soundnumber].attachSound('blast');
_root['sound' + _root.soundnumber].start(0, 0);
}
i = 0;
while (i < 5) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('bullet7_spark', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI].gotoAndStop(2);
if (dir == 1) {
_root['enemy_piece' + _root.enemypieceI].dir = 1;
_root['enemy_piece' + _root.enemypieceI]._x = _root.bounds.left - 20;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
}
if (dir == 2) {
_root['enemy_piece' + _root.enemypieceI].dir = 2;
_root['enemy_piece' + _root.enemypieceI]._x = _root.bounds.right + 20;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
}
if (dir == 3) {
_root['enemy_piece' + _root.enemypieceI].dir = 3;
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.bounds.up - 20;
}
if (dir == 4) {
_root['enemy_piece' + _root.enemypieceI].dir = 4;
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.bounds.down + 20;
}
++i;
}
i = 0;
while (i < _root.BulletSize) {
if (_root.Bullet[i] == this) {
_root.Bullet.splice(i, 1);
_root.BulletSize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
function createTrail() {
_root.enemypiecedepth += 1;
_root.enemypieceI += 1;
_root.attachMovie('rocket_fire2', 'enemypiece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemypiece' + _root.enemypieceI]._x = this._x;
_root['enemypiece' + _root.enemypieceI]._y = this._y;
dirx2 = Math.cos(_rotation * Math.PI / 180);
diry2 = Math.sin(_rotation * Math.PI / 180);
_root['enemypiece' + _root.enemypieceI]._x -= dirx2 * 12;
_root['enemypiece' + _root.enemypieceI]._y -= diry2 * 12;
}
randomsound = random(2);
if (randomsound == 0) {
_root.playsound('swish');
}
if (randomsound == 1) {
_root.playsound('swish2');
}
this._x = _root.cannon._x;
this._y = _root.cannon._y;
this._rotation = _root.cannon._rotation;
angle = _root.cannon._rotation;
firepower = 12;
dirx = Math.cos(angle * Math.PI / 180) * firepower;
diry = Math.sin(angle * Math.PI / 180) * firepower;
this._x += dirx * 2;
this._y += diry * 2;
Missile_speed = 10 + Math.random() * 4;
Missile_turning_1 = 0.75 + Math.random() / 4;
missilevx = 0;
missilevy = 0;
time = 0;
time2 = 0;
time3 = 0;
weaponType = 7;
lockon = false;
deployed = false;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (!_root.slowmotion) {
this._rotation += (angle2 - this._rotation) / 5;
time += 5;
time2 += 5;
time3 += 5;
if (time3 <= 50) {
_x = _x + dirx;
_y = _y + diry;
} else {
lockit = true;
_x = _x + missilevx;
_y = _y + missilevy;
}
Missile_turning = 1;
} else {
this._rotation += (angle2 - this._rotation) / 30;
time += 1;
time2 += 1;
time3 += 1;
if (time3 <= 50) {
_x = _x + dirx / 5;
_y = _y + diry / 5;
} else {
lockit = true;
_x = _x + missilevx / 5;
_y = _y + missilevy / 5;
}
Missile_turning = 0.5;
}
closest = 10000;
if (lockit) {
i = 0;
while (i < _root.EnemySize) {
distance = Math.sqrt(Math.pow(_x - _root.Enemy[i]._x, 2) + Math.pow(_y - _root.Enemy[i]._y, 2));
if (distance < closest) {
closest = distance;
dx = _root.Enemy[i]._x - _x;
dy = _root.Enemy[i]._y - _y;
lockon = true;
}
++i;
}
}
if (!lockon) {
if (!deployed) {
deployed = true;
}
dx = dirx;
dy = diry;
}
if (lockon) {
lockon = false;
}
radians2 = Math.atan2(dy, dx);
angle2 = Math.round(radians2 * 180 / Math.PI);
difference = _rotation - angle2;
if (difference > 180) {
angle2 += 360;
}
if (difference < -180) {
angle2 -= 360;
}
distance = Math.sqrt(dx * dx + dy * dy);
dx /= distance;
dy /= distance;
missilevx += dx * Missile_turning;
missilevy += dy * Missile_turning;
velocity = Math.sqrt(missilevx * missilevx + missilevy * missilevy);
if (velocity > Missile_speed) {
missilevx = missilevx * Missile_speed / velocity;
missilevy = missilevy * Missile_speed / velocity;
}
if (time2 >= 5) {
time2 = 0;
createTrail();
}
if (time >= 1000) {
detonation = true;
}
if (this.detonation == true) {
i = 0;
while (i < _root.BulletSize) {
if (_root.Bullet[i] == this) {
_root.Bullet.splice(i, 1);
_root.BulletSize -= 1;
}
++i;
}
removeMovieClip(this);
delete this.onEnterFrame;
}
if (_x < _root.bounds.left - 15) {
createSpark(1);
}
if (_x > _root.bounds.right + 15) {
createSpark(2);
}
if (_y < _root.bounds.up - 15) {
createSpark(3);
}
if (_y > _root.bounds.down + 15) {
createSpark(4);
}
}
};
}
}
movieClip 348 {
}
movieClip 349 {
}
movieClip 350 plane {
frame 1 {
function dropbomb() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('plane_bomb', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
}
function createTrail() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('plane_trail', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
_root['enemy_piece' + _root.enemypieceI]._x += 210;
_root['enemy_piece' + _root.enemypieceI]._y += 250;
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('plane_trail', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
_root['enemy_piece' + _root.enemypieceI]._x += 160;
_root['enemy_piece' + _root.enemypieceI]._y += 110;
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('plane_trail', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
_root['enemy_piece' + _root.enemypieceI]._x -= 250;
_root['enemy_piece' + _root.enemypieceI]._y -= 210;
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('plane_trail', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
_root['enemy_piece' + _root.enemypieceI]._x -= 110;
_root['enemy_piece' + _root.enemypieceI]._y -= 160;
}
dropped = false;
time = 0;
time2 = 0;
time5 = 0;
soundplayed = false;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (!_root.slowmotion) {
_x = _x + 30;
_y = _y - 30;
time += 5;
time2 += 5;
time5 += 5;
} else {
_x = _x + 6;
_y = _y - 6;
time += 1;
time2 += 1;
time5 += 1;
}
if (time >= 5) {
time = 0;
createTrail();
}
if (time2 >= 10) {
time2 = 0;
dropbomb();
}
if (_x >= 1200) {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
};
}
}
movieClip 352 {
}
movieClip 353 plane_bomb {
frame 1 {
function blowup() {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('plane_bombwave', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
removeMovieClip(this);
delete this.onEnterFrame;
}
stop();
_rotation = random(360) + 1;
rotationspeed = Math.random() * 5 + 5;
if (random(2) == 0) {
rotationspeed *= -1;
}
_xscale = 500;
_yscale = 500;
dropspeed = 2;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (!_root.slowmotion) {
_rotation = _rotation + rotationspeed;
dropspeed *= 1.05;
_xscale = _xscale - dropspeed * 5;
_yscale = _yscale - dropspeed * 5;
} else {
_rotation = _rotation + rotationspeed / 5;
dropspeed *= 1.01;
_xscale = _xscale - dropspeed;
_yscale = _yscale - dropspeed;
}
if (_xscale <= 50) {
_xscale = 50;
_yscale = 50;
blowup();
}
}
};
}
}
movieClip 354 crate {
frame 1 {
stop();
_rotation = random(360) + 1;
rotationspeed = Math.random() * 5 + 5;
if (random(2) == 0) {
rotationspeed *= -1;
}
_xscale = 500;
_yscale = 500;
dropspeed = 2;
this.onEnterFrame = function () {
if (!_root.slowmotion) {
_rotation = _rotation + rotationspeed;
dropspeed *= 1.05;
_xscale = _xscale - dropspeed * 5;
_yscale = _yscale - dropspeed * 5;
} else {
_rotation = _rotation + rotationspeed / 5;
dropspeed *= 1.01;
_xscale = _xscale - dropspeed;
_yscale = _yscale - dropspeed;
}
if (_xscale <= 100) {
_xscale = 100;
_yscale = 100;
gotoAndPlay(2);
delete this.onEnterFrame;
}
};
}
frame 2 {
stop();
_name = 'crate';
i = 0;
while (i < 10) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('smoke', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
++i;
}
frame._xscale = 50;
frame._yscale = 50;
this.onEnterFrame = function () {
if (!_root.slowmotion) {
frame._xscale += 2.5;
frame._yscale += 2.5;
} else {
frame._xscale += 0.5;
frame._yscale += 0.5;
}
if (frame._xscale >= 100) {
frame._xscale = 100;
frame._yscale = 100;
gotoAndStop(3);
}
};
}
frame 3 {
stop();
turret._xscale = 50;
turret._x = 0;
this.onEnterFrame = function () {
if (!_root.slowmotion) {
turret._xscale += 2.5;
turret._x += (15 - turret._x) / 6;
} else {
turret._xscale += 0.5;
turret._x += (15 - turret._x) / 30;
}
if (turret._xscale >= 100) {
_root.PlayerI += 1;
_root.playerdepth += 1;
_root.attachMovie('turret', 'cannon' + _root.PlayerI, _root.playerdepth);
_root.Player[_root.PlayerSize] = _root['cannon' + _root.PlayerI];
_root.PlayerSize += 1;
_root['cannon' + _root.PlayerI]._x = _x;
_root['cannon' + _root.PlayerI]._y = _y;
_root['cannon' + _root.PlayerI]._rotation = _rotation;
_root['cannon' + _root.PlayerI].landrotation = _rotation * -1;
turret._xscale = 100;
removeMovieClip(this);
delete this.onEnterFrame;
}
};
}
}
movieClip 356 {
}
movieClip 357 border2 {
}
movieClip 359 border {
frame 1 {
this.onEnterFrame = function () {
destX = (_root.cannon._x - Stage.width / 2) / -2;
destY = (_root.cannon._y - Stage.height / 2) / -2;
_root._x -= (_root._x - destX) / 3;
_root._y -= (_root._y - destY) / 3;
};
}
}
movieClip 367 lightningcharge {
frame 1 {
gotoAndStop(random(_totalframes) + 1);
_alpha = random(75) + 25;
alphafade = 2;
originalheight = _height;
this.onEnterFrame = function () {
_height = originalheight;
if (!_root.slowmotion) {
_alpha = _alpha - alphafade;
} else {
_alpha = _alpha - alphafade / 5;
}
if (_alpha <= 1) {
removeMovieClip(this);
delete this.onEnterFrame;
}
};
}
}
movieClip 369 {
}
movieClip 370 {
}
movieClip 371 {
frame 1 {
if (_root.soundeffects) {
_root.soundnumber += 1;
_root['sound' + _root.soundnumber] = new Sound();
_root['sound' + _root.soundnumber].attachSound('badlaser');
_root['sound' + _root.soundnumber].start(0, 0);
}
}
frame 14 {
stop();
}
}
movieClip 373 enemylaser3 {
frame 1 {
gotoAndStop(random(_totalframes) + 1);
_alpha = 80;
alphafade = 2;
lightning._yscale = Math.random() * 250 + 50;
time5 = 0;
this.onEnterFrame = function () {
_alpha = _alpha - alphafade;
if (_alpha <= 1) {
removeMovieClip(this);
delete this.onEnterFrame;
}
if (this.hitTest(_root.cannon._x, _root.cannon._y, true)) {
time5 += 1;
if (time5 > 5) {
time5 = 0;
_root.playsound('shock2.wav');
}
_root.playerhealth -= 4;
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('cannonspark2', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _root.cannon._x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.cannon._y;
newcolor = new Color(_root['enemy_piece' + _root.enemypieceI]);
newcolor.setRGB(16711680);
}
};
}
}
movieClip 374 {
}
movieClip 375 {
frame 1 {
if (_root.soundeffects) {
_root.soundnumber += 1;
_root['sound' + _root.soundnumber] = new Sound();
_root['sound' + _root.soundnumber].attachSound('badlaser');
_root['sound' + _root.soundnumber].start(0, 0);
}
}
frame 14 {
stop();
}
}
movieClip 377 enemylaser {
frame 1 {
gotoAndStop(random(_totalframes) + 1);
_alpha = 60;
alphafade = 2;
lightning._yscale = Math.random() * 250 + 50;
time5 = 0;
this.onEnterFrame = function () {
_alpha = _alpha - alphafade;
if (_alpha <= 1) {
removeMovieClip(this);
delete this.onEnterFrame;
}
if (this.hitTest(_root.cannon._x, _root.cannon._y, true)) {
_root.playerhealth -= 2;
time5 += 1;
if (time5 > 5) {
time5 = 0;
_root.playsound('shock2.wav');
}
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('cannonspark2', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _root.cannon._x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.cannon._y;
}
};
}
}
movieClip 378 enemylightning {
frame 1 {
gotoAndStop(random(_totalframes) + 1);
_alpha = Math.random() * 80 + 20;
alphafade = 100;
lightning._yscale = Math.random() * 250 + 50;
time5 = 0;
this.onEnterFrame = function () {
if (this.hitTest(_root.cannon._x, _root.cannon._y, true)) {
_root.playerhealth -= 4;
time5 += 1;
if (time5 > 5) {
time5 = 0;
_root.playsound('shock2.wav');
}
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('cannonspark', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _root.cannon._x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.cannon._y;
}
_alpha = _alpha - alphafade;
if (_alpha <= 1) {
removeMovieClip(this);
delete this.onEnterFrame;
}
};
}
}
movieClip 385 lightning {
frame 1 {
gotoAndStop(random(_totalframes) + 1);
_alpha = random(75) + 25;
alphafade = 25;
originalheight = _height;
this.onEnterFrame = function () {
_height = originalheight;
if (!_root.slowmotion) {
_alpha = _alpha - alphafade;
} else {
_alpha = _alpha - alphafade / 5;
}
if (_alpha <= 1) {
removeMovieClip(this);
delete this.onEnterFrame;
}
};
}
}
movieClip 387 bullet9_splosion {
frame 1 {
alphafade = 5;
this.onEnterFrame = function () {
if (!_root.slowmotion) {
_alpha = _alpha - alphafade;
} else {
_alpha = _alpha - alphafade / 5;
}
if (_alpha <= 5) {
removeMovieClip(this);
delete this.onEnterFrame;
}
};
}
}
movieClip 388 gravityparticle {
frame 1 {
if (random(2) == 0) {
this._x = random(Stage.width);
if (random(2) == 0) {
this._y = -50;
} else {
this._y = Stage.height + 50;
}
} else {
this._y = random(Stage.height);
if (random(2) == 0) {
this._x = -50;
} else {
this._x = Stage.width + 50;
}
}
originalalpha = Math.random() * 50 + 10;
this.onEnterFrame = function () {
_alpha = 20 - distance;
degrees = Math.atan2(_y - target._y, _x - target._x);
angle = degrees * 180 / Math.PI;
distance = Math.sqrt(Math.pow(_x - target._x, 2) + Math.pow(_y - target._y, 2));
distance /= 100;
if (distance < 0) {
distance = 0;
}
dirx = Math.cos(angle * Math.PI / 180) * (20 - distance);
diry = Math.sin(angle * Math.PI / 180) * (20 - distance);
_alpha = originalalpha - distance * 10;
_xscale = 100 + _alpha * 8;
_yscale = _xscale;
if (!_root.slowmotion) {
_x = _x - dirx;
_y = _y - diry;
} else {
_x = _x - dirx / 5;
_y = _y - diry / 5;
}
if (this.hitTest(target.core)) {
removeMovieClip(this);
delete this.onEnterFrame;
}
if (_root.pwned) {
removeMovieClip(this);
delete this.onEnterFrame;
}
};
}
}
movieClip 390 {
}
movieClip 391 {
frame 31 {
gotoAndPlay(2);
}
}
movieClip 393 {
}
movieClip 394 {
frame 1 {
stop();
time = 0;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (!_root.slowmotion) {
time += 5;
} else {
time += 1;
}
if (time >= 5) {
time = 0;
gotoAndStop(_currentframe + 1);
}
}
};
}
frame 50 {
stop();
if (_root.combocount >= 2) {
_root.combocount -= 1;
}
}
}
movieClip 396 {
frame 1 {
this.onEnterFrame = function () {
score = _parent.score;
};
}
}
movieClip 398 {
}
movieClip 399 {
}
movieClip 400 {
frame 1 {
stop();
}
}
movieClip 402 {
}
movieClip 403 {
frame 1 {
stop();
}
}
movieClip 405 {
frame 1 {
this._alpha = 0;
}
}
movieClip 407 {
}
movieClip 409 {
}
movieClip 411 {
frame 1 {
this.onEnterFrame = function () {
combocount = _parent.combocount;
};
}
}
movieClip 413 {
}
movieClip 416 {
}
movieClip 418 {
frame 1 {
this.onEnterFrame = function () {
combocount = _parent.combocount;
};
}
}
movieClip 419 {
frame 20 {
gotoAndStop(1);
}
}
movieClip 422 {
}
movieClip 423 {
frame 1 {
this.onEnterFrame = function () {
bossbar._xscale = (_root.bosshealth / 1000) * 100;
};
}
}
movieClip 424 {
}
movieClip 425 {
}
movieClip 426 {
}
movieClip 427 hud {
frame 1 {
fadeaway = false;
combocountdown.gotoAndStop(combocountdown._totalframes);
healthbar._alpha = 0;
heart._alpha = 0;
timebar._alpha = 0;
hud_timer._alpha = 0;
combobounce._alpha = 0;
combocountdown._alpha = 0;
combodisplay._alpha = 0;
scoredisplay._alpha = 0;
infinitybar._alpha = 0;
combotxt._alpha = 0;
emp._alpha = 0;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
score = _root.score;
originalcombo = combocount;
combocount = _root.combocount;
if (_root.frozen) {
emp._alpha = 100;
} else {
emp._alpha = 0;
}
if (combocount != originalcombo) {
if (_root.combocount != 1) {
combocountdown.gotoAndPlay(1);
combobounce.gotoAndPlay(2);
}
combobounce.combocount = _root.combocount;
}
if (_root.playerhealth <= 10) {
danger._alpha = 100;
} else {
danger._alpha = 0;
}
_x = -_root._x;
_y = -_root._y;
if (!_root.playerdead) {
healthbar.gotoAndStop(healthbar._currentframe + 1 + Math.ceil((_root.playerhealth - healthbar._currentframe) / 5));
timebar.gotoAndStop(timebar._currentframe + 1 + Math.round((_root.playertime / 2 - timebar._currentframe) / 5));
}
if (_root.infinityactivated) {
infinitybar._alpha = 100;
} else {
infinitybar._alpha = 0;
}
if (_root.slowmotion == false) {
if (_root.infinityactivated) {
infinitybar._width -= 2.5;
}
if (slomofilter._alpha > 0) {
slomofilter._alpha -= 5;
}
} else {
if (_root.infinityactivated) {
infinitybar._width -= 0.5;
}
if (slomofilter._alpha < 100) {
slomofilter._alpha += 5;
}
}
if (_root.infinityactivated && infinitybar._width <= 5) {
_root.weapon2unlocked = false;
_root.weapon3unlocked = false;
_root.weapon4unlocked = false;
_root.weapon5unlocked = false;
_root.weapon6unlocked = false;
_root.weapon7unlocked = false;
_root.weapon8unlocked = false;
_root.weaponNumber = 1;
_root.infinityactivated = false;
infinitybar._width = 700;
infinitybar._alpha = 0;
}
if (fadeaway) {
fadefilter._alpha += 1;
if (fadefilter._alpha >= 100) {
fadeaway = false;
_root.gamePaused = true;
if (_root.extremelevel != 100) {
_root.attachMovie('finalscreen3', 'finalscreen3', _root.finalscreendepth);
} else {
_root.attachMovie('finalscreen4', 'finalscreen4', _root.finalscreendepth);
}
}
}
if (_root.bossbar) {
bossbar._alpha = 100;
} else {
bossbar._alpha = 0;
}
if (_root.displayhealth && healthbar._alpha < 100) {
healthbar._alpha += 1;
heart._alpha += 1;
combobounce._alpha += 1;
combocountdown._alpha += 1;
combodisplay._alpha += 1;
scoredisplay._alpha += 1;
combotxt._alpha += 1;
}
if (_root.displaytime && timebar._alpha < 100) {
timebar._alpha += 1;
hud_timer._alpha += 1;
}
if (_root.weapon2unlocked || _root.extremelevel == 100) {
switch (_root.weaponNumber) {
case 1:
weaponname = 'Weapon: MINIGUN';
break;
case 2:
weaponname = 'Weapon: ACID GUN';
break;
case 3:
weaponname = 'Weapon: SHOTGUN ROCKETS';
break;
case 4:
weaponname = 'Weapon: GRENADE LAUNCHER';
break;
case 5:
weaponname = 'Weapon: HOMING MISSILES';
break;
case 6:
weaponname = 'Weapon: FLAMETHROWER';
break;
case 7:
weaponname = 'Weapon: LIGHTNING GUN';
break;
case 8:
weaponname = 'Weapon: LAZER';
}
} else {
weaponname = '';
}
}
};
}
}
movieClip 429 {
frame 1 {
score = _parent.score;
}
}
movieClip 430 enemyscore {
frame 1 {
alphafade = 1;
time = 0;
this.onEnterFrame = function () {
if (score <= 0) {
_alpha = 0;
}
if (!_root.slowmotion) {
time += 5;
if (time >= 100) {
_alpha = _alpha - alphafade * 5;
}
} else {
time += 1;
if (time >= 100) {
_alpha = _alpha - alphafade;
}
}
if (_alpha <= 1) {
removeMovieClip(this);
delete this.onEnterFrame;
}
};
}
frame 20 {
stop();
}
}
// unknown tag 88 length 68
movieClip 444 {
frame 1 {
stop();
}
}
movieClip 447 {
frame 1 {
stop();
}
}
movieClip 450 {
frame 1 {
stop();
}
}
movieClip 455 {
frame 1 {
stop();
}
}
movieClip 462 {
frame 1 {
stop();
}
}
movieClip 468 {
frame 1 {
number = this._name.slice(1, 3);
this.tabEnabled = false;
stop();
if (unlocked) {
this.onRollOver = function () {
_parent.vanish = false;
switch (int(number)) {
case 0:
_parent.descript = 'THE BEGINNING';
break;
case 1:
_parent.descript = 'WAVE 1';
break;
case 2:
_parent.descript = 'WAVE 2';
break;
case 3:
_parent.descript = 'WAVE 3';
break;
case 4:
_parent.descript = 'WAVE 4';
break;
case 5:
_parent.descript = 'WAVE 5';
break;
case 6:
_parent.descript = 'BOSS 1';
break;
case 7:
_parent.descript = 'WAVE 7';
break;
case 8:
_parent.descript = 'WAVE 8';
break;
case 9:
_parent.descript = 'WAVE 9';
break;
case 10:
_parent.descript = 'BOSS 2';
break;
case 11:
_parent.descript = 'WAVE 11';
break;
case 12:
_parent.descript = 'WAVE 12';
break;
case 13:
_parent.descript = 'WAVE 13';
break;
case 14:
_parent.descript = 'BOSS 3';
break;
case 15:
_parent.descript = 'WAVE 15';
break;
case 16:
_parent.descript = 'WAVE 16';
break;
case 17:
_parent.descript = 'WAVE 17';
break;
case 18:
_parent.descript = 'WAVE 18';
break;
case 19:
_parent.descript = 'WAVE 19';
break;
case 20:
_parent.descript = 'WAVE 20';
break;
case 21:
_parent.descript = 'WAVE 21';
break;
case 22:
_parent.descript = 'THE CREATOR';
break;
case 23:
_parent.descript = 'THE CREATOR REDUX';
}
gotoAndStop(2);
};
this.onRollOut = function () {
_parent.vanish = true;
gotoAndStop(1);
};
this.onRelease = function () {
if (_root.menu.fadeaway._currentframe == 1) {
_root.extremelevel = number;
_root.menu.fadeaway._x = 1200;
_root.menu.fadeaway.gotoAndPlay(2);
_root.menu.fadeaway._alpha = 100;
}
};
} else {
gotoAndStop(3);
}
}
}
movieClip 470 {
frame 1 {
this.onEnterFrame = function () {
descript = _parent.descript;
};
}
}
movieClip 471 {
frame 1 {
descript = '';
vanish = true;
a0.unlocked = true;
if (_root.savedata.data.wave1) {
a1.unlocked = true;
}
if (_root.savedata.data.wave2) {
a2.unlocked = true;
}
if (_root.savedata.data.wave3) {
a3.unlocked = true;
}
if (_root.savedata.data.wave4) {
a4.unlocked = true;
}
if (_root.savedata.data.wave5) {
a5.unlocked = true;
}
if (_root.savedata.data.wave6) {
a6.unlocked = true;
}
if (_root.savedata.data.wave7) {
a7.unlocked = true;
}
if (_root.savedata.data.wave8) {
a8.unlocked = true;
}
if (_root.savedata.data.wave9) {
a9.unlocked = true;
}
if (_root.savedata.data.wave10) {
a10.unlocked = true;
}
if (_root.savedata.data.wave11) {
a11.unlocked = true;
}
if (_root.savedata.data.wave12) {
a12.unlocked = true;
}
if (_root.savedata.data.wave13) {
a13.unlocked = true;
}
if (_root.savedata.data.wave14) {
a14.unlocked = true;
}
if (_root.savedata.data.wave15) {
a15.unlocked = true;
}
if (_root.savedata.data.wave16) {
a16.unlocked = true;
}
if (_root.savedata.data.wave17) {
a17.unlocked = true;
}
if (_root.savedata.data.wave18) {
a18.unlocked = true;
}
if (_root.savedata.data.wave19) {
a19.unlocked = true;
}
if (_root.savedata.data.wave20) {
a20.unlocked = true;
}
if (_root.savedata.data.wave21) {
a21.unlocked = true;
}
if (_root.savedata.data.wave22) {
a22.unlocked = true;
}
if (_root.savedata.data.wave23) {
a23.unlocked = true;
}
this.onEnterFrame = function () {
if (!vanish && descriptbox._alpha < 100) {
descriptbox._alpha += 10;
}
if (vanish && descriptbox._alpha > 0) {
descriptbox._alpha -= 10;
}
};
}
}
movieClip 475 {
}
movieClip 476 {
frame 1 {
stop();
}
frame 20 {
stop();
}
}
movieClip 478 {
}
movieClip 479 {
frame 1 {
stop();
}
frame 20 {
removeMovieClip(_parent);
delete _parent.onEnterFrame;
}
}
movieClip 480 {
}
movieClip 481 {
frame 1 {
vert = 0;
this.onEnterFrame = function () {
if (vert == 0) {
box._xscale += 1;
} else {
box._xscale -= 1;
}
box._rotation += 2.5;
ring._rotation -= 2.5;
time += 5;
box._yscale = box._xscale;
glow._xscale = box._xscale;
glow._yscale = box._yscale;
if (box._xscale <= 90) {
vert = 0;
}
if (box._xscale >= 130) {
vert = 1;
}
};
}
}
movieClip 493 {
frame 1 {
stop();
}
}
movieClip 496 {
frame 1 {
stop();
}
}
movieClip 498 {
}
movieClip 513 {
}
movieClip 514 {
frame 1 {
stop();
}
frame 2 {
this.onEnterFrame = function () {
if (_root.music_menu.getVolume() > 5) {
_root.music_menu.setVolume(_root.music_menu.getVolume() - 3);
}
};
}
frame 30 {
_root.music_menu.stop();
_root.gotoAndStop(11);
removeMovieClip(_root.menu);
delete _root.menu.onEnterFrame;
}
}
movieClip 515 menu {
frame 1 {
this.onEnterFrame = function () {
_x = _x + (target - _x) / 5;
_y = _y + (targety - _y) / 5;
};
btn_infinity.onRelease = function () {
target = 800;
};
btn_credits.onRelease = function () {
targety = -500;
};
link.onRelease = function () {
getURL('http://thekevingu.com', _blank);
};
btn_more.onRelease = function () {
getURL('http://www.ugotgames.com/shootinggames', _blank);
};
btn_play.onRelease = function () {
target = -800;
};
btn_playinfinity.onRelease = function () {
if (fadeaway._currentframe == 1) {
fadeaway._x = -400;
_root.extremelevel = 100;
fadeaway.gotoAndPlay(2);
fadeaway._alpha = 100;
}
};
btn_back.onRelease = function () {
if (fadeaway._currentframe == 1) {
target = 0;
}
};
btn_back2.onRelease = function () {
if (fadeaway._currentframe == 1) {
target = 0;
}
};
btn_back3.onRelease = function () {
if (fadeaway._currentframe == 1) {
targety = 0;
}
};
musiclink.onRelease = function () {
getURL('http://incompetech.com', _blank);
};
btn_play.onRollOver = function () {
btn_play.gotoAndStop(2);
};
btn_play.onRollOut = function () {
btn_play.gotoAndStop(1);
};
btn_playinfinity.onRollOver = function () {
btn_playinfinity.gotoAndStop(2);
};
btn_playinfinity.onRollOut = function () {
btn_playinfinity.gotoAndStop(1);
};
btn_infinity.onRollOver = function () {
btn_infinity.gotoAndStop(2);
};
btn_infinity.onRollOut = function () {
btn_infinity.gotoAndStop(1);
};
btn_select.onRollOver = function () {
btn_select.gotoAndStop(2);
};
btn_select.onRollOut = function () {
btn_select.gotoAndStop(1);
};
btn_more.onRollOver = function () {
btn_more.gotoAndStop(2);
};
btn_more.onRollOut = function () {
btn_more.gotoAndStop(1);
};
btn_credits.onRollOver = function () {
btn_credits.gotoAndStop(2);
};
btn_credits.onRollOut = function () {
btn_credits.gotoAndStop(1);
};
link.onRollOver = function () {
link.gotoAndStop(2);
};
link.onRollOut = function () {
link.gotoAndStop(1);
};
btn_back.onRollOver = function () {
btn_back.gotoAndStop(2);
};
btn_back.onRollOut = function () {
btn_back.gotoAndStop(1);
};
btn_back2.onRollOver = function () {
btn_back2.gotoAndStop(2);
};
btn_back2.onRollOut = function () {
btn_back2.gotoAndStop(1);
};
btn_play.tabEnabled = false;
btn_play_infinity.tabEnabled = false;
btn_infinity.tabEnabled = false;
btn_select.tabEnabled = false;
btn_credits.tabEnabled = false;
btn_back.tabEnabled = false;
btn_back2.tabEnabled = false;
btn_back3.tabEnabled = false;
musiclink.tabEnabled = false;
link.tabEnabled = false;
if (_root.savedata.data.laserpwn) {
laserlock._alpha = 0;
}
}
}
movieClip 516 {
}
movieClip 517 {
}
movieClip 518 fadein2 {
frame 50 {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
movieClip 520 {
}
movieClip 521 boss_hit_3 {
frame 20 {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
movieClip 523 {
}
movieClip 524 boss_hit_2 {
frame 20 {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
movieClip 526 {
}
movieClip 527 boss_hit_1 {
frame 20 {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
movieClip 528 {
}
movieClip 529 fadein {
frame 50 {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
movieClip 531 {
frame 1 {
this.onEnterFrame = function () {
text = _parent.text;
};
}
}
movieClip 532 script {
frame 1 {
text = 'Welcome to the game';
}
frame 159 {
stoppit = false;
red = 16711680;
blue = 52223;
grey = 6710886;
yellow = 16776960;
orange = 16750848;
newcolor = new Color(this);
if (textnumber == -1) {
text = 'I am the creator';
}
if (textnumber == 0) {
text = 'Use arrow keys/WASD to move mouse to aim and shoot';
}
if (textnumber == 1) {
text = 'Look! its a square!';
_root.createEnemy('square_start');
}
if (textnumber == 2) {
text = 'It wants to play with you!';
}
if (textnumber == 3) {
stop();
stoppit = true;
}
if (textnumber == 4) {
text = 'What have you done!';
}
if (textnumber == 5) {
text = 'You\'ve killed a square!';
}
if (textnumber == 6) {
text = 'The other squares won\'t be happy about this';
}
if (textnumber == 7) {
text = 'They want revenge';
}
if (textnumber == 8) {
text = 'Here they come!';
_root.savedata.data.wave1 = true;
_root.savedata.flush();
_root.displayhealth = true;
_root.levelnumber = 1;
}
if (textnumber == 9) {
stop();
stoppit = true;
}
if (textnumber == 10) {
text = 'That looks like the last ones of this wave';
}
if (textnumber == 11) {
_alpha = 0;
this.onEnterFrame = function () {
text = 'Great Job. You survived';
stop();
stoppit = true;
if (_root.Enemy.length <= 0) {
_alpha = 100;
play();
delete this.onEnterFrame;
}
};
}
if (textnumber == 12) {
text = 'But you didn\'t think that was the end did you?';
}
if (textnumber == 13) {
text = 'You\'ve enraged the polygons';
}
if (textnumber == 14) {
text = 'They want you dead';
}
if (textnumber == 15) {
text = 'To help you survive, I shall grant you the power to slow time';
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('cannon_timer', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = 400;
_root['enemy_piece' + _root.enemypieceI]._y = 250;
_root.displaytime = true;
_root.displayhealth = true;
_root.slomoenabled = true;
}
if (textnumber == 16) {
text = 'Activate this ability by holding down SHIFT or SPACE';
}
if (textnumber == 17) {
text = 'Here comes the second wave. Good luck';
}
if (textnumber == 18) {
newcolor.setRGB(red);
text = 'WAVE 2';
_root.savedata.data.wave2 = true;
_root.savedata.flush();
_root.levelnumber = 2;
}
if (textnumber == 19) {
newcolor.setRGB(grey);
stop();
stoppit = true;
}
if (textnumber == 20) {
text = 'Very nice';
}
if (textnumber == 21) {
_alpha = 0;
this.onEnterFrame = function () {
text = 'You have earned a new weapon: the ACID GUN';
stop();
stoppit = true;
if (_root.Enemy.length <= 0) {
_alpha = 100;
play();
delete this.onEnterFrame;
_root.attachMovie('wave_reverse', 'wave_reverse', _root.wavereversedepth);
green = 65280;
newcolor = new Color(_root.wave_reverse);
newcolor.setRGB(green);
_root.wave_reverse.thiscolor = green;
_root.weapon2unlocked = true;
}
};
}
if (textnumber == 22) {
text = 'Switch weapons using the number keys';
}
if (textnumber == 23) {
text = 'Get ready for the next wave';
}
if (textnumber == 24) {
newcolor.setRGB(red);
text = 'WAVE 3';
_root.savedata.data.wave3 = true;
_root.savedata.flush();
_root.levelnumber = 3;
}
if (textnumber == 25) {
stop();
stoppit = true;
}
if (textnumber == 26) {
newcolor.setRGB(grey);
_alpha = 0;
this.onEnterFrame = function () {
text = 'You\'ve still got a long way to go';
stop();
stoppit = true;
if (_root.Enemy.length <= 0) {
_alpha = 100;
play();
delete this.onEnterFrame;
}
};
}
if (textnumber == 27) {
text = 'Wave 4 is incoming';
}
if (textnumber == 28) {
newcolor.setRGB(red);
text = 'WAVE 4';
_root.savedata.data.wave4 = true;
_root.savedata.flush();
_root.levelnumber = 4;
}
if (textnumber == 29) {
stop();
stoppit = true;
}
if (textnumber == 30) {
_alpha = 0;
this.onEnterFrame = function () {
text = 'You have earned a new weapon: SHOTGUN ROCKETS';
stop();
stoppit = true;
if (_root.Enemy.length <= 0) {
_alpha = 100;
play();
delete this.onEnterFrame;
_root.attachMovie('wave_reverse', 'wave_reverse', _root.wavereversedepth);
newcolor = new Color(_root.wave_reverse);
newcolor.setRGB(grey);
_root.wave_reverse.thiscolor = grey;
_root.weapon3unlocked = true;
}
};
}
if (textnumber == 31) {
newcolor.setRGB(red);
text = 'WAVE 5';
_root.savedata.data.wave5 = true;
_root.savedata.flush();
_root.levelnumber = 5;
}
if (textnumber == 32) {
stop();
stoppit = true;
}
if (textnumber == 33) {
_root.attachMovie('music_change', 'music_change', _root.musicdepth);
_alpha = 0;
this.onEnterFrame = function () {
text = 'MASSIVE ENTITY DETECTED';
stop();
stoppit = true;
if (_root.Enemy.length <= 0) {
_alpha = 100;
play();
delete this.onEnterFrame;
}
};
}
if (textnumber == 34) {
newcolor.setRGB(grey);
text = 'The polygons are sending a BOSS, or a Big Overpowered Super Solid';
}
if (textnumber == 35) {
text = 'Be prepared';
}
if (textnumber == 36) {
newcolor.setRGB(red);
text = 'BOSS 1';
_root.savedata.data.wave6 = true;
_root.savedata.flush();
_root.levelnumber = 6;
}
if (textnumber == 37) {
stop();
stoppit = true;
}
if (textnumber == 38) {
newcolor.setRGB(grey);
text = 'Impressive, but the game\'s not over yet!';
}
if (textnumber == 39) {
newcolor.setRGB(red);
text = 'WAVE 7';
_root.savedata.data.wave7 = true;
_root.savedata.flush();
_root.levelnumber = 7;
}
if (textnumber == 40) {
stop();
stoppit = true;
}
if (textnumber == 41) {
_root.attachMovie('music_change2', 'music_change2', _root.musicdepth);
_alpha = 0;
this.onEnterFrame = function () {
newcolor.setRGB(grey);
stop();
stoppit = true;
if (_root.Enemy.length <= 0) {
_alpha = 100;
text = 'Still alive?';
play();
delete this.onEnterFrame;
}
};
}
if (textnumber == 42) {
newcolor.setRGB(red);
text = 'WAVE 8';
_root.savedata.data.wave8 = true;
_root.savedata.flush();
_root.levelnumber = 8;
}
if (textnumber == 43) {
stop();
stoppit = true;
}
if (textnumber == 44) {
_alpha = 0;
this.onEnterFrame = function () {
newcolor.setRGB(grey);
stop();
stoppit = true;
if (_root.Enemy.length <= 0) {
_alpha = 100;
text = 'You seem to be determined to continue this massacre';
play();
delete this.onEnterFrame;
}
};
}
if (textnumber == 45) {
newcolor.setRGB(red);
text = 'WAVE 9';
_root.savedata.data.wave9 = true;
_root.savedata.flush();
_root.levelnumber = 9;
}
if (textnumber == 46) {
stop();
stoppit = true;
}
if (textnumber == 47) {
_alpha = 0;
this.onEnterFrame = function () {
newcolor.setRGB(grey);
text = 'New weapon unlocked: GRENADE LAUNCHER';
stop();
stoppit = true;
if (_root.Enemy.length <= 0) {
_alpha = 100;
play();
delete this.onEnterFrame;
_root.attachMovie('wave_reverse', 'wave_reverse', _root.wavereversedepth);
newcolor = new Color(_root.wave_reverse);
newcolor.setRGB(yellow);
_root.wave_reverse.thiscolor = yellow;
_root.weapon4unlocked = true;
}
};
}
if (textnumber == 48) {
_root.attachMovie('music_change', 'music_change', _root.musicdepth);
newcolor.setRGB(red);
text = 'MASSIVE ENTITY DETECTED';
}
if (textnumber == 49) {
text = 'BOSS 2';
_root.savedata.data.wave10 = true;
_root.savedata.flush();
_root.levelnumber = 10;
}
if (textnumber == 50) {
stop();
stoppit = true;
}
if (textnumber == 51) {
_root.attachMovie('music_change2', 'music_change2', _root.musicdepth);
newcolor.setRGB(grey);
text = 'Impossible!';
}
if (textnumber == 52) {
text = 'You should not be alive';
}
if (textnumber == 53) {
newcolor.setRGB(red);
text = 'WAVE 11';
_root.savedata.data.wave11 = true;
_root.savedata.flush();
_root.levelnumber = 11;
}
if (textnumber == 54) {
stop();
stoppit = true;
}
if (textnumber == 55) {
_alpha = 0;
this.onEnterFrame = function () {
newcolor.setRGB(grey);
stop();
stoppit = true;
if (_root.Enemy.length <= 0) {
_alpha = 100;
text = 'You will not survive for long';
play();
delete this.onEnterFrame;
}
};
}
if (textnumber == 56) {
newcolor.setRGB(red);
text = 'WAVE 12';
_root.savedata.data.wave12 = true;
_root.savedata.flush();
_root.levelnumber = 12;
}
if (textnumber == 57) {
stop();
stoppit = true;
}
if (textnumber == 58) {
_alpha = 0;
this.onEnterFrame = function () {
newcolor.setRGB(grey);
text = 'New weapon unlocked: HOMING MISSILE';
stop();
stoppit = true;
if (_root.Enemy.length <= 0) {
_alpha = 100;
play();
delete this.onEnterFrame;
_root.attachMovie('wave_reverse', 'wave_reverse', _root.wavereversedepth);
newcolor = new Color(_root.wave_reverse);
newcolor.setRGB(blue);
_root.wave_reverse.thiscolor = blue;
_root.weapon5unlocked = true;
}
};
}
if (textnumber == 59) {
newcolor.setRGB(red);
text = 'WAVE 13';
_root.savedata.data.wave13 = true;
_root.savedata.flush();
_root.levelnumber = 13;
}
if (textnumber == 60) {
stop();
stoppit = true;
}
if (textnumber == 61) {
_alpha = 0;
this.onEnterFrame = function () {
newcolor.setRGB(grey);
stop();
stoppit = true;
if (_root.Enemy.length <= 0) {
_alpha = 100;
text = 'Your progress has gone too far';
play();
delete this.onEnterFrame;
}
};
}
if (textnumber == 62) {
_root.attachMovie('music_change', 'music_change', _root.musicdepth);
newcolor.setRGB(red);
text = 'MASSIVE ENTITY DETECTED';
}
if (textnumber == 63) {
text = 'BOSS 3';
_root.savedata.data.wave14 = true;
_root.savedata.flush();
_root.levelnumber = 14;
}
if (textnumber == 64) {
stop();
stoppit = true;
}
if (textnumber == 65) {
_root.attachMovie('music_change2', 'music_change2', _root.musicdepth);
newcolor.setRGB(grey);
text = 'You won\'t live long';
}
if (textnumber == 66) {
newcolor.setRGB(red);
text = 'WAVE 15';
_root.savedata.data.wave15 = true;
_root.savedata.flush();
_root.levelnumber = 15;
}
if (textnumber == 67) {
stop();
stoppit = true;
}
if (textnumber == 68) {
_alpha = 0;
this.onEnterFrame = function () {
newcolor.setRGB(grey);
stop();
stoppit = true;
if (_root.Enemy.length <= 0) {
_alpha = 100;
text = 'Give up now before I unleash my wrath';
play();
delete this.onEnterFrame;
}
};
}
if (textnumber == 69) {
newcolor.setRGB(red);
text = 'WAVE 16';
_root.savedata.data.wave16 = true;
_root.savedata.flush();
_root.levelnumber = 16;
}
if (textnumber == 70) {
stop();
stoppit = true;
}
if (textnumber == 71) {
_alpha = 0;
this.onEnterFrame = function () {
newcolor.setRGB(grey);
stop();
stoppit = true;
if (_root.Enemy.length <= 0) {
_alpha = 100;
text = 'Your persistence will not lead to any glory';
play();
delete this.onEnterFrame;
}
};
}
if (textnumber == 72) {
text = 'New weapon unlocked: FLAME THROWER';
_root.attachMovie('wave_reverse', 'wave_reverse', _root.wavereversedepth);
newcolor = new Color(_root.wave_reverse);
newcolor.setRGB(orange);
_root.wave_reverse.thiscolor = orange;
_root.weapon6unlocked = true;
}
if (textnumber == 73) {
newcolor.setRGB(red);
text = 'WAVE 17';
_root.savedata.data.wave17 = true;
_root.savedata.flush();
_root.levelnumber = 17;
}
if (textnumber == 74) {
stop();
stoppit = true;
}
if (textnumber == 75) {
_alpha = 0;
this.onEnterFrame = function () {
newcolor.setRGB(grey);
stop();
stoppit = true;
if (_root.Enemy.length <= 0) {
_alpha = 100;
text = 'I realize you pay no attention to my warnings';
play();
delete this.onEnterFrame;
}
};
}
if (textnumber == 76) {
newcolor.setRGB(red);
text = 'WAVE 18';
_root.savedata.data.wave18 = true;
_root.savedata.flush();
_root.levelnumber = 18;
}
if (textnumber == 77) {
stop();
stoppit = true;
}
if (textnumber == 78) {
_alpha = 0;
this.onEnterFrame = function () {
newcolor.setRGB(grey);
stop();
stoppit = true;
if (_root.Enemy.length <= 0) {
_alpha = 100;
text = 'I am running out of sinister threats to throw at you';
play();
delete this.onEnterFrame;
}
};
}
if (textnumber == 79) {
newcolor.setRGB(red);
text = 'WAVE 19';
_root.savedata.data.wave19 = true;
_root.savedata.flush();
_root.levelnumber = 19;
}
if (textnumber == 80) {
stop();
stoppit = true;
}
if (textnumber == 81) {
_alpha = 0;
this.onEnterFrame = function () {
newcolor.setRGB(grey);
stop();
stoppit = true;
if (_root.Enemy.length <= 0) {
_alpha = 100;
text = 'New weapon unlocked: LIGHTNING GUN';
_root.attachMovie('wave_reverse', 'wave_reverse', _root.wavereversedepth);
newcolor = new Color(_root.wave_reverse);
newcolor.setRGB(blue);
_root.wave_reverse.thiscolor = blue;
_root.weapon7unlocked = true;
play();
delete this.onEnterFrame;
}
};
}
if (textnumber == 82) {
newcolor.setRGB(red);
text = 'WAVE 20';
_root.savedata.data.wave20 = true;
_root.savedata.flush();
_root.levelnumber = 20;
}
if (textnumber == 83) {
stop();
stoppit = true;
}
if (textnumber == 84) {
_alpha = 0;
this.onEnterFrame = function () {
newcolor.setRGB(grey);
stop();
stoppit = true;
if (_root.Enemy.length <= 0) {
_alpha = 100;
text = 'You can still give up any time';
play();
delete this.onEnterFrame;
}
};
}
if (textnumber == 85) {
newcolor.setRGB(red);
text = 'WAVE 21';
_root.savedata.data.wave21 = true;
_root.savedata.flush();
_root.levelnumber = 21;
}
if (textnumber == 86) {
stop();
stoppit = true;
}
if (textnumber == 87) {
_alpha = 0;
this.onEnterFrame = function () {
newcolor.setRGB(grey);
stop();
stoppit = true;
if (_root.Enemy.length <= 0) {
_alpha = 100;
text = 'If you want something done right, you have to do it yourself';
play();
delete this.onEnterFrame;
}
};
}
if (textnumber == 88) {
_root.attachMovie('music_change', 'music_change', _root.musicdepth);
newcolor.setRGB(red);
text = 'IT IS TIME FOR ME TO END THIS';
}
if (textnumber == 89) {
text = 'FINAL BOSS: THE CREATOR';
_root.savedata.data.wave22 = true;
_root.savedata.flush();
_root.levelnumber = 22;
}
if (textnumber == 90) {
stop();
stoppit = true;
}
if (textnumber == 91) {
text = 'YOU THINK YOU\'VE WON?';
}
if (textnumber == 92) {
text = 'HOW DO YOU FIGHT WITHOUT WEAPONS?';
}
if (textnumber == 93) {
newcolor.setRGB(red);
text = 'Weapons Deleted';
_root.attachMovie('wave_reverse2', 'wave_reverse', _root.wavereversedepth);
_root.weaponNumber = 1;
_root.weapon2unlocked = false;
_root.weapon3unlocked = false;
_root.weapon4unlocked = false;
_root.weapon5unlocked = false;
_root.weapon6unlocked = false;
_root.weapon7unlocked = false;
_root.weapon8unlocked = false;
}
if (textnumber == 94) {
text = 'FINAL BOSS: THE CREATOR REDUX';
_root.savedata.data.wave23 = true;
_root.savedata.flush();
_root.levelnumber = 23;
}
if (textnumber == 95) {
stop();
stoppit = true;
}
if (!stoppit) {
textnumber += 1;
gotoAndPlay(2);
}
}
}
movieClip 533 menu_explosion {
frame 1 {
_xscale = 0;
_yscale = _xscale;
_alpha = 60;
R = random(200) + 55;
G = random(200) + 55;
B = random(200) + 55;
myColor = '0x' + R.toString(16) + G.toString(16) + B.toString(16);
myColoredObject = new Color(this);
myColoredObject.setRGB(myColor);
this.onEnterFrame = function () {
_xscale = _xscale + 5;
_yscale = _xscale;
_alpha = _alpha - 1;
if (_alpha <= 1) {
removeMovieClip(this);
delete this.onEnterFrame;
}
};
}
}
movieClip 535 {
}
movieClip 536 cannon_timer {
frame 1 {
this.onEnterFrame = function () {
_x = _x + (_root.cannon._x - _x) / 2;
_y = _y + (_root.cannon._y - _y) / 2;
};
}
frame 60 {
_root.wavecreated = true;
_root.attachMovie('wave', 'wave', _root.wavedepth);
removeMovieClip(this);
delete this.onEnterFrame;
}
}
movieClip 538 {
}
movieClip 539 teleport_effect2 {
frame 20 {
target.teleporting = false;
target.warped = false;
removeMovieClip(this);
delete this.onEnterFrame;
}
}
movieClip 540 boss_teleportfinal2 {
frame 1 {
_root.playsound('whoosh2');
}
frame 20 {
removeMovieClip(this);
delete this.onEnterFrame;
}
}
movieClip 541 boss_teleportfinal {
frame 1 {
_root.playsound('whoosh2');
}
frame 20 {
stop();
target._x = -500;
target._y = -500;
_x = -500;
_y = -500;
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('wall_attack', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('wall_attack2', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
this.onEnterFrame = function () {
if (_root.cleared >= 2) {
_root.cleared = 0;
gotoAndStop(21);
}
};
}
frame 21 {
function createparticle() {
_root.pwned = false;
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('gravityparticle', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI].target = this;
}
stop();
time = 0;
time2 = 0;
_x = 400;
_y = 250;
this.onEnterFrame = function () {
if (!_root.slowmotion) {
time += 5;
time2 += 5;
} else {
time += 1;
time += 5;
}
if (time >= 5) {
time = 0;
createparticle();
}
if (time2 > 500) {
target._x = _x;
target._y = _y;
target.warped = false;
target.firemode = 4;
target.time2 = 0;
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('boss_teleportfinal2', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _x;
_root['enemy_piece' + _root.enemypieceI]._y = _y;
_x = -500;
_y = -500;
_root.pwned = true;
removeMovieClip(this);
delete this.onEnterFrame;
}
};
}
}
movieClip 542 teleport_effect {
frame 4 {
if (_root.soundeffects) {
_root.soundnumber += 1;
_root['sound' + _root.soundnumber] = new Sound();
_root['sound' + _root.soundnumber].attachSound('whoosh');
_root['sound' + _root.soundnumber].start(0, 0);
}
}
frame 20 {
do {
jumpx = random(600) + 100;
jumpy = random(300) + 100;
distance = Math.sqrt(Math.pow(jumpx - _root.cannon._x, 2) + Math.pow(jumpy - _root.cannon._y, 2));
} while (distance < 250);
target._x = jumpx;
target._y = jumpy;
_root.enemypiecedepth += 1;
_root.attachMovie('teleport_effect2', 'teleport_effect2', _root.enemypiecedepth);
_root.teleport_effect2._x = jumpx;
_root.teleport_effect2._y = jumpy;
_root.teleport_effect2.target = target;
removeMovieClip(this);
delete this.onEnterFrame;
}
}
movieClip 544 {
}
movieClip 545 wall_attack2 {
frame 1 {
_x = 860;
_y = 250;
xspeed = -1;
this.onEnterFrame = function () {
if (!_root.gamePaused && _root.cannon._alpha == 100) {
if (_x > 860) {
_root.cleared += 1;
removeMovieClip(this);
delete this.onEnterFrame;
}
if (!_root.slowmotion) {
_x = _x + xspeed;
if (!spiked) {
xspeed -= 0.05;
}
} else {
_x = _x + xspeed / 5;
if (!spiked) {
xspeed -= 0.01;
}
}
if (_x < 460) {
xspeed = 3;
spiked = true;
}
if (this.frame.hitTest(_root.cannon._x, _root.cannon._y, true)) {
_root.playerhealth = 0;
}
i = 0;
while (i < _root.BulletSize) {
if (this.frame.hitTest(_root.Bullet[i]._x, _root.Bullet[i]._y, true)) {
switch (_root.Bullet[i].weaponType) {
case 1:
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('boss_hit_1', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _root.Bullet[i]._x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.Bullet[i]._y;
_root.Bullet[i].deletion = true;
break;
case 2:
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('boss_hit_2', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _root.Bullet[i]._x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.Bullet[i]._y;
_root.Bullet[i].deletion = true;
break;
case 4:
_root.Bullet[i].detonation = true;
break;
case 6:
_root.Bullet[i].deletion = true;
break;
case 7:
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('boss_hit_1', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _root.Bullet[i]._x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.Bullet[i]._y;
_root.Bullet[i].detonation = true;
}
}
++i;
}
}
};
}
}
movieClip 546 wall_attack {
frame 1 {
_x = -60;
_y = 250;
xspeed = 1;
time5 = 0;
this.onEnterFrame = function () {
if (!_root.gamePaused && _root.cannon._alpha == 100) {
time5 += 1;
if (time5 > 5) {
time5 = 0;
_root.playsound('rumble.wav');
}
if (_x < -60) {
_root.cleared += 1;
removeMovieClip(this);
delete this.onEnterFrame;
}
if (!_root.slowmotion) {
_x = _x + xspeed;
if (!spiked) {
xspeed += 0.05;
}
} else {
_x = _x + xspeed / 5;
if (!spiked) {
xspeed += 0.01;
}
}
if (_x > 340) {
xspeed = -3;
spiked = true;
}
if (this.frame.hitTest(_root.cannon._x, _root.cannon._y, true)) {
_root.playerhealth = 0;
}
i = 0;
while (i < _root.BulletSize) {
if (this.frame.hitTest(_root.Bullet[i]._x, _root.Bullet[i]._y, true)) {
switch (_root.Bullet[i].weaponType) {
case 1:
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('boss_hit_1', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _root.Bullet[i]._x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.Bullet[i]._y;
_root.Bullet[i].deletion = true;
break;
case 2:
_root.enemypiecedepth += 1;
_root.attachMovie('boss_hit_2', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _root.Bullet[i]._x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.Bullet[i]._y;
_root.bosshealth -= 5;
_root.Bullet[i].deletion = true;
break;
case 4:
_root.Bullet[i].detonation = true;
break;
case 6:
_root.Bullet[i].deletion = true;
break;
case 7:
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('boss_hit_1', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _root.Bullet[i]._x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.Bullet[i]._y;
_root.Bullet[i].detonation = true;
}
}
++i;
}
}
};
}
}
movieClip 547 {
frame 1 {
if (_root.soundeffects && _name == 'asdf') {
_root.soundnumber += 1;
_root['sound' + _root.soundnumber] = new Sound();
_root['sound' + _root.soundnumber].attachSound('badlaser');
_root['sound' + _root.soundnumber].start(0, 0);
}
}
frame 14 {
_parent.gotoAndStop(2);
}
}
movieClip 549 lasercross {
frame 1 {
stop();
}
frame 2 {
stop();
time5 = 0;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (deletion) {
removeMovieClip(this);
delete this.onEnterFrame;
}
if (target.lasercrossed == false) {
removeMovieClip(this);
delete this.onEnterFrame;
}
if (target.lasercrossed == true) {
_alpha = random(50) + 50;
}
lase1._yscale = random(80) + 80;
lase3._yscale = random(80) + 80;
lase2._yscale = random(80) + 80;
lase4._yscale = random(80) + 80;
if (!_root.slowmotion) {
_rotation = _rotation + 1;
} else {
_rotation = _rotation + 0.2;
}
if (this.hitTest(_root.cannon._x, _root.cannon._y, true)) {
time5 += 1;
if (time5 > 5) {
time5 = 0;
_root.playsound('shock2.wav');
}
_root.playerhealth -= 2;
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('cannonspark2', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _root.cannon._x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.cannon._y;
}
}
};
}
}
movieClip 562 {
}
movieClip 563 finaltext {
frame 1 {
_x = 400;
_y = 250;
}
frame 97 {
_root.script.text = 'Just kidding';
_root.script.textnumber = 101;
_root.script.gotoAndPlay(2);
removeMovieClip(this);
delete this.onEnterFrame;
}
}
movieClip 564 {
}
movieClip 565 finalscreeninfinity {
frame 1 {
_x = -_root._x;
_y = -_root._y;
_root.cursor._alpha = 0;
Mouse.show();
}
frame 15 {
stop();
asdf._alpha = 100;
_alpha = 100;
_root.cursor._alpha = 0;
removeMovieClip(_root.hud);
removeMovieClip(_root.finalscreen);
removeMovieClip(_root.cannon);
removeMovieClip(_root.pauseMenu);
removeMovieClip(_root.wave);
removeMovieClip(this);
i = 0;
while (i <= _root.EnemySize) {
removeMovieClip(_root.Enemy[i]);
delete _root.Enemy[i].onEnterFrame;
++i;
}
i = 0;
while (i < _root.BulletSize) {
removeMovieClip(_root.Bullet[i]);
delete _root.Bullet[i].onEnterFrame;
++i;
}
_root.gotoAndStop(10);
}
}
movieClip 572 {
}
movieClip 575 {
}
movieClip 577 {
frame 1 {
this.onEnterFrame = function () {
stop();
if (_currentframe != _parent.destination) {
play();
}
};
}
frame 8 {
_parent.rank += 1;
}
frame 16 {
_parent.rank += 1;
}
frame 24 {
_parent.rank += 1;
}
frame 32 {
_parent.rank += 1;
}
frame 39 {
_parent.rank += 1;
}
frame 47 {
_parent.rank += 1;
}
frame 55 {
_parent.rank += 1;
}
frame 63 {
_parent.rank += 1;
}
frame 71 {
_parent.rank += 1;
}
frame 78 {
_parent.rank += 1;
}
frame 86 {
_parent.rank += 1;
}
frame 94 {
_parent.rank += 1;
}
frame 100 {
_parent.rank += 1;
}
}
movieClip 579 finalscreen4 {
frame 1 {
_x = -_root._x;
_y = -_root._y;
_root.cursor._alpha = 0;
Mouse.show();
}
frame 15 {
stop();
exited = false;
asdf._alpha = 100;
_alpha = 100;
rank = 0;
if (_root.score < 100) {
destination = 2;
}
if (_root.score >= 100) {
destination = 8;
}
if (_root.score > 300) {
destination = 16;
}
if (_root.score > 1000) {
destination = 24;
}
if (_root.score > 3000) {
destination = 32;
}
if (_root.score > 10000) {
destination = 39;
}
if (_root.score > 30000) {
destination = 47;
}
if (_root.score > 60000) {
destination = 55;
}
if (_root.score > 100000) {
destination = 63;
}
if (_root.score > 300000) {
destination = 71;
}
if (_root.score > 600000) {
destination = 78;
}
if (_root.score > 1000000) {
destination = 86;
}
if (_root.score > 2000000) {
destination = 94;
}
if (_root.score > 3000000) {
destination = 100;
}
_root.cursor._alpha = 0;
btn_exit.onRelease = function () {
exited = true;
_root.attachMovie('finalscreen2', 'finalscreen2', _root.finalscreendepth3);
};
btn_spawn.onRelease = function () {
_root.score = Math.round(_root.score / 2);
if (!exited) {
play();
}
};
this.onEnterFrame = function () {
switch (rank) {
case 0:
meterrating = 'Please Try Again';
break;
case 1:
meterrating = 'NOOB';
break;
case 2:
meterrating = 'BEGINNER';
break;
case 3:
meterrating = 'ADEPT';
break;
case 4:
meterrating = 'BELOW AVERAGE';
break;
case 5:
meterrating = 'AVERAGE';
break;
case 6:
meterrating = 'ABOVE AVERAGE';
break;
case 7:
meterrating = 'EXPERIENCED';
break;
case 8:
meterrating = 'SKILLFUL';
break;
case 9:
meterrating = 'PROFESSIONAL';
break;
case 10:
meterrating = 'MASTER';
break;
case 11:
meterrating = 'BETTER THAN PROGRAMMER';
break;
case 12:
meterrating = 'IMPOSSIBLE';
break;
case 13:
meterrating = 'YOUR AWESOMENESS CANNOT BE MEASURED';
}
};
}
frame 16 {
_root.hud.fadefilter._alpha = 0;
}
frame 29 {
_root.playerdead = false;
_root.playerhealth = 100;
_root.dead = false;
_root.gamePaused = false;
_root.hud.fadeaway = false;
_root.cannon._alpha = 100;
_root.cursor._alpha = 100;
Mouse.hide();
removeMovieClip(this);
delete this.onEnterFrame;
}
}
movieClip 582 {
}
movieClip 588 finalscreen3 {
frame 1 {
_x = -_root._x;
_y = -_root._y;
_root.cursor._alpha = 0;
Mouse.show();
}
frame 15 {
stop();
exited = false;
asdf._alpha = 100;
_alpha = 100;
_root.cursor._alpha = 0;
btn_exit.onRelease = function () {
exited = true;
_root.attachMovie('finalscreen2', 'finalscreen2', _root.finalscreendepth3);
};
btn_spawn.onRelease = function () {
_root.score = Math.round(_root.score / 2);
if (!exited) {
play();
}
};
}
frame 16 {
_root.hud.fadefilter._alpha = 0;
}
frame 29 {
_root.playerdead = false;
_root.playerhealth = 100;
_root.dead = false;
_root.gamePaused = false;
_root.hud.fadeaway = false;
_root.cannon._alpha = 100;
_root.cursor._alpha = 100;
Mouse.hide();
removeMovieClip(this);
delete this.onEnterFrame;
}
}
movieClip 590 {
}
movieClip 591 finalscreen2 {
frame 1 {
_x = -_root._x;
_y = -_root._y;
_root.cursor._alpha = 0;
Mouse.show();
}
frame 2 {
this.onEnterFrame = function () {
if (_root.music_infinity.getVolume() > 5) {
_root.music_infinity.setVolume(_root.music_infinity.getVolume() - 4);
}
if (_root.music_normal.getVolume() > 5) {
_root.music_normal.setVolume(_root.music_normal.getVolume() - 4);
}
if (_root.music_boss.getVolume() > 5) {
_root.music_boss.setVolume(_root.music_boss.getVolume() - 4);
}
};
}
frame 15 {
stop();
_root.music_normal.stop();
_root.music_infinity.stop();
_root.music_boss.stop();
asdf._alpha = 100;
_alpha = 100;
_root.cursor._alpha = 0;
removeMovieClip(_root.finalscreen);
removeMovieClip(_root.finalscreen3);
removeMovieClip(_root.finalscreen4);
removeMovieClip(_root.hud);
removeMovieClip(_root.cannon);
removeMovieClip(_root.pauseMenu);
removeMovieClip(_root.wave);
removeMovieClip(this);
i = 0;
while (i <= _root.EnemySize) {
removeMovieClip(_root.Enemy[i]);
delete _root.Enemy[i].onEnterFrame;
++i;
}
i = 0;
while (i < _root.BulletSize) {
removeMovieClip(_root.Bullet[i]);
delete _root.Bullet[i].onEnterFrame;
++i;
}
_root.gotoAndStop(10);
}
}
movieClip 598 {
frame 1 {
menu_return.onRelease = function () {
_root.music_boss.stop();
removeMovieClip(_root.finalscreen);
removeMovieClip(_root.cannon);
_root.gotoAndStop(10);
};
}
}
movieClip 599 finalscreen {
frame 1 {
stop();
_root.savedata.data.laserpwn = true;
_root.savedata.flush();
time = 0;
this.onEnterFrame = function () {
time += 1;
if (time > 100) {
time = 0;
delete this.onEnterFrame;
play();
}
};
}
frame 2 {
_root.gamewin = true;
_root.cursor._alpha = 0;
removeMovieClip(_root.hud);
Mouse.show();
_x = -_root._x;
_y = -_root._y;
}
frame 41 {
stop();
asdf._alpha = 100;
_alpha = 100;
}
}
movieClip 601 infinity {
frame 1 {
_alpha = 10;
}
}
movieClip 602 powerup {
frame 1 {
vert = 0;
orange = 16750848;
green = 65280;
grey = 6710886;
yellow = 16776960;
cyan = 65535;
red = 16711680;
blue = 255;
black = 0;
pink = 16751052;
time = 0;
if (_root.savedata.data.laserpwn) {
goodie = random(7) + 1;
} else {
goodie = random(6) + 1;
}
if (_root.playerhealth <= 20) {
goodie = 0;
}
switch (goodie) {
case 0:
color = pink;
break;
case 1:
color = green;
break;
case 2:
color = grey;
break;
case 3:
color = orange;
break;
case 4:
color = cyan;
break;
case 5:
color = yellow;
break;
case 6:
color = blue;
break;
case 7:
color = red;
}
asdf = new Color(this);
asdf.setRGB(color);
pickedup = false;
this.onEnterFrame = function () {
if (!_root.gamePaused) {
if (_root.extremelevel != 100) {
removeMovieClip(this);
delete this.onEnterFrame;
}
if (box.hitTest(_root.cannon) && !pickedup) {
pickedup = true;
i = 0;
while (i < 10) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('powerupburst', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
qwer = new Color(_root['enemy_piece' + _root.enemypieceI]);
qwer.setRGB(color);
++i;
}
_root.attachMovie('wave_reversepower', 'wave_reverse', _root.wavereversedepth);
newcolor = new Color(_root.wave_reverse);
newcolor.setRGB(color);
switch (goodie) {
case 0:
_root.playerhealth = 100;
break;
case 1:
_root.weapon2unlocked = true;
_root.weaponNumber = 2;
_root.shotinterval = _root.shotinterval_2;
_root.infinityactivated = true;
_root.hud.infinitybar._width = 700;
break;
case 2:
_root.weapon3unlocked = true;
_root.weaponNumber = 3;
_root.shotinterval = _root.shotinterval_3;
_root.infinityactivated = true;
_root.hud.infinitybar._width = 700;
break;
case 3:
_root.weapon4unlocked = true;
_root.weaponNumber = 4;
_root.shotinterval = _root.shotinterval_4;
_root.infinityactivated = true;
_root.hud.infinitybar._width = 700;
break;
case 4:
_root.weapon5unlocked = true;
_root.weaponNumber = 5;
_root.shotinterval = _root.shotinterval_5;
_root.infinityactivated = true;
_root.hud.infinitybar._width = 700;
break;
case 5:
_root.weapon6unlocked = true;
_root.weaponNumber = 6;
_root.shotinterval = _root.shotinterval_6;
_root.infinityactivated = true;
_root.hud.infinitybar._width = 700;
break;
case 6:
_root.weapon7unlocked = true;
_root.weaponNumber = 7;
_root.shotinterval = _root.shotinterval_7;
_root.infinityactivated = true;
_root.hud.infinitybar._width = 700;
break;
case 7:
_root.weapon8unlocked = true;
_root.weaponNumber = 8;
_root.shotinterval = _root.shotinterval_8;
_root.infinityactivated = true;
_root.hud.infinitybar._width = 700;
}
ring.gotoAndPlay(2);
glow.gotoAndPlay(2);
box._alpha = 0;
}
if (time > 800) {
i = 0;
while (i < 10) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('powerupburst', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = this._x;
_root['enemy_piece' + _root.enemypieceI]._y = this._y;
qwer = new Color(_root['enemy_piece' + _root.enemypieceI]);
qwer.setRGB(color);
++i;
}
time = 0;
box._alpha = 0;
ring.gotoAndPlay(2);
glow.gotoAndPlay(2);
}
if (!_root.slowmotion) {
if (vert == 0) {
box._xscale += 1;
} else {
box._xscale -= 1;
}
box._rotation += 2.5;
ring._rotation -= 2.5;
time += 5;
} else {
if (vert == 0) {
box._xscale += 0.2;
} else {
box._xscale -= 0.2;
}
box._rotation += 0.5;
ring._rotation -= 0.5;
time += 1;
}
box._yscale = box._xscale;
glow._xscale = box._xscale;
glow._yscale = box._yscale;
if (box._xscale <= 90) {
vert = 0;
}
if (box._xscale >= 130) {
vert = 1;
}
}
};
}
}
movieClip 603 script_infinity {
frame 1 {
function crankitup() {
infinityspawntime -= 1;
infinitynumber += 1;
if (infinitynumber >= 7) {
infinitynumber = 1;
}
}
infinityspawntime = 50;
time = 0;
infinitynumber = 1;
this.onEnterFrame = function () {
if (!_root.slowmotion) {
time += 5;
} else {
time += 1;
}
if (time >= 2000) {
time = 0;
crankitup();
}
if (_root.spawnenemy >= infinityspawntime) {
_root.spawnenemy = 0;
spawntype = infinitynumber;
if (spawntype == 1) {
_root.createEnemy('square_inf');
}
if (spawntype == 2) {
_root.createEnemy('triangle_inf');
}
if (spawntype == 3) {
_root.createEnemy('pentagon_inf');
_root.createEnemy('pentagon_inf');
_root['enemy' + _root.enemyI].friend = _root['enemy' + (_root.enemyI - 1)];
}
if (spawntype == 4) {
_root.createEnemy('blocker_inf');
}
if (spawntype == 5) {
_root.createEnemy('hexagon_inf');
}
if (spawntype == 6) {
_root.createEnemy('star_inf');
}
}
};
}
}
movieClip 605 boss_shield {
frame 1 {
this.onEnterFrame = function () {
if (this.hitTest(_root.Bullet[i]._x, _root.Bullet[i]._y, true)) {
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('boss_hit_1', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI]._x = _root.Bullet[i]._x;
_root['enemy_piece' + _root.enemypieceI]._y = _root.Bullet[i]._y;
_root.Bullet[i].deletion = true;
}
};
}
}
movieClip 606 music_change2 {
frame 1 {
this.onEnterFrame = function () {
if (_root.music_boss.getVolume() > 5) {
_root.music_boss.setVolume(_root.music_boss.getVolume() - 3);
}
};
}
frame 30 {
_root.music_boss.stop();
_root.music_normal.start(0, 100);
if (!_root.musiceffects) {
_root.music_normal.setVolume(0);
} else {
_root.music_normal.setVolume(100);
}
removeMovieClip(this);
delete this.onEnterFrame;
}
}
movieClip 607 music_change {
frame 1 {
this.onEnterFrame = function () {
if (_root.music_normal.getVolume() > 5) {
_root.music_normal.setVolume(_root.music_normal.getVolume() - 3);
}
};
}
frame 30 {
_root.music_normal.stop();
_root.music_boss.start(0, 100);
if (!_root.musiceffects) {
_root.music_boss.setVolume(0);
} else {
_root.music_boss.setVolume(100);
}
removeMovieClip(this);
delete this.onEnterFrame;
}
}
frame 1 {
stop();
total = 0;
total = _root.getBytesTotal();
loaded = 100;
this.onEnterFrame = function () {
loaded = _root.getBytesLoaded();
percent = int((loaded / total) * 100);
loader.p = percent + '%';
if (loaded == total) {
total = 0;
gotoAndPlay(6);
delete this.onEnterFrame;
}
};
}
// unknown tag 88 length 62
movieClip 612 {
}
movieClip 652 {
}
frame 6 {
stopAllSounds();
Stage.showMenu = false;
savedata = SharedObject.getLocal('pmd_data');
soundeffects = true;
musiceffects = true;
music_menu = new Sound();
music_menu.attachSound('music_menu');
music_infinity = new Sound();
music_infinity.attachSound('music_infinity');
music_normal = new Sound();
music_normal.attachSound('music_normal');
music_boss = new Sound();
music_boss.attachSound('music_boss');
soundnumber = 0;
}
frame 7 {
stop();
logo.onRelease = function () {
getURL('http://www.ugotgames.com', _blank);
};
}
movieClip 656 {
}
movieClip 657 {
}
movieClip 664 {
}
movieClip 665 {
frame 60 {
stop();
stoptime = 0;
this.onEnterFrame = function () {
stoptime += 1;
if (stoptime > 120) {
play();
}
};
}
frame 85 {
delete this.onEnterFrame;
_root.gotoAndStop(10);
}
}
frame 10 {
stop();
attachMovie('menu', 'menu', 40000);
music_menu.start(0, 100);
if (!musiceffects) {
music_menu.setVolume(0);
} else {
music_menu.setVolume(100);
}
_x = 0;
_y = 0;
}
frame 11 {
function getFPS() {
fps_t = getTimer();
framerate = Math.round(1000 / (fps_t - fps_o));
if (framerate > 35) {
_quality = 'HIGH';
}
if (framerate <= 35) {
_quality = 'MEDIUM';
}
if (framerate <= 30) {
_quality = 'LOW';
}
fps_o = fps_t;
}
function createShot() {
switch (weaponNumber) {
case 1:
bulleti += 1;
bulletdepth += 1;
if (Key.isDown(17) || (ASnative(800, 2))(4)) {
attachMovie('bullet_2', 'bullet' + bulleti, bulletdepth);
} else {
attachMovie('bullet', 'bullet' + bulleti, bulletdepth);
}
Bullet[BulletSize] = _root['bullet' + bulleti];
BulletSize += 1;
cannon.gotoAndPlay(2);
break;
case 2:
bulleti += 1;
bulletdepth += 1;
attachMovie('bullet2', 'bullet' + bulleti, bulletdepth);
Bullet[BulletSize] = _root['bullet' + bulleti];
BulletSize += 1;
cannon.gotoAndPlay(2);
break;
case 3:
if (_root.soundeffects) {
_root.soundnumber += 1;
_root['sound' + _root.soundnumber] = new Sound();
randomsound = random(2);
if (randomsound == 0) {
_root['sound' + _root.soundnumber].attachSound('swish');
}
if (randomsound == 1) {
_root['sound' + _root.soundnumber].attachSound('swish2');
}
_root['sound' + _root.soundnumber].start(0, 0);
}
temprotation = cannon._rotation;
Z = 0;
while (Z < 5) {
bulleti += 1;
bulletdepth += 1;
attachMovie('bullet6', 'bullet' + _root.bulleti, _root.bulletdepth);
Bullet[BulletSize] = _root['bullet' + bulleti];
BulletSize += 1;
++Z;
}
cannon.gotoAndPlay(2);
break;
case 4:
bulleti += 1;
bulletdepth += 1;
attachMovie('bullet4', 'bullet' + bulleti, bulletdepth);
Bullet[BulletSize] = _root['bullet' + bulleti];
BulletSize += 1;
cannon.gotoAndPlay(2);
break;
case 5:
bulleti += 1;
bulletdepth += 1;
attachMovie('rocket', 'bullet' + bulleti, bulletdepth);
Bullet[BulletSize] = _root['bullet' + bulleti];
BulletSize += 1;
cannon.gotoAndPlay(2);
break;
case 6:
bulleti += 1;
bulletdepth += 1;
attachMovie('bullet5', 'fire' + bulleti, bulletdepth);
randomsound = random(2);
if (randomsound == 0) {
playsound('flame.wav');
}
if (randomsound == 1) {
playsound('flame5.wav');
}
break;
case 7:
bulleti += 1;
bulletdepth += 1;
attachMovie('bullet9', 'bullet' + bulleti, bulletdepth);
cannon.gotoAndPlay(2);
break;
case 8:
if (!laser) {
attachMovie('laser', 'laser', laserdepth);
}
}
}
function createEnemy(ob) {
enemyI += 1;
enemydepth += 1;
attachMovie(ob, 'enemy' + enemyI, enemydepth);
Enemy[EnemySize] = _root['enemy' + enemyI];
EnemySize += 1;
}
function resetI() {
if (bulletdepth >= 999) {
bulletdepth = 0;
}
if (enemydepth > 1999) {
enemydepth = 1000;
}
if (enemypiecedepth >= 29000) {
enemypiecedepth = 2000;
}
}
function explode() {
if (_root.soundeffects) {
_root.soundnumber += 1;
_root['sound' + _root.soundnumber] = new Sound();
randomsound = random(8);
if (randomsound == 0) {
_root['sound' + _root.soundnumber].attachSound('weapon4explosion');
}
if (randomsound == 1) {
_root['sound' + _root.soundnumber].attachSound('weapon4explosion2');
}
if (randomsound == 2) {
_root['sound' + _root.soundnumber].attachSound('explosion3');
}
if (randomsound == 3) {
_root['sound' + _root.soundnumber].attachSound('explosion4');
}
if (randomsound == 4) {
_root['sound' + _root.soundnumber].attachSound('explosion5');
}
if (randomsound == 5) {
_root['sound' + _root.soundnumber].attachSound('explosion6');
}
if (randomsound == 6) {
_root['sound' + _root.soundnumber].attachSound('explosion7');
}
if (randomsound == 7) {
_root['sound' + _root.soundnumber].attachSound('explosion8');
}
_root['sound' + _root.soundnumber].setVolume(50);
_root['sound' + _root.soundnumber].start(0, 0);
}
}
function ricochet() {
if (_root.soundeffects) {
_root.soundnumber += 1;
_root['sound' + _root.soundnumber] = new Sound();
randomsound = random(4);
if (randomsound == 0) {
_root['sound' + _root.soundnumber].attachSound('ricochet');
}
if (randomsound == 1) {
_root['sound' + _root.soundnumber].attachSound('ricochet2');
}
if (randomsound == 2) {
_root['sound' + _root.soundnumber].attachSound('ricochet3');
}
if (randomsound == 3) {
_root['sound' + _root.soundnumber].attachSound('ricochet4');
}
_root['sound' + _root.soundnumber].setVolume(50);
_root['sound' + _root.soundnumber].start(0, 0);
}
}
function bulletsound() {
if (_root.soundeffects) {
_root.soundnumber += 1;
_root['sound' + _root.soundnumber] = new Sound();
_root['sound' + _root.soundnumber].attachSound('gun3');
_root['sound' + _root.soundnumber].setVolume(50);
_root['sound' + _root.soundnumber].start(0, 0);
}
}
function playsound(ob) {
if (_root.soundeffects) {
_root.soundnumber += 1;
_root['sound' + _root.soundnumber] = new Sound();
_root['sound' + _root.soundnumber].setVolume(50);
_root['sound' + _root.soundnumber].attachSound(ob);
_root['sound' + _root.soundnumber].start(0, 0);
}
}
function startnormalmusic() {
music_normal.start(0, 100);
if (!musiceffects) {
music_normal.setVolume(0);
} else {
music_normal.setVolume(100);
}
}
function startbossmusic() {
music_boss.start(0, 100);
if (!musiceffects) {
music_boss.setVolume(0);
} else {
music_boss.setVolume(100);
}
}
stop();
scriptdepth = -2;
infinitydepth = -3;
bgdepth = -4;
borderdepth = -1;
bulletdepth = 0;
enemydepth = 1000;
enemypiecedepth = 2000;
bossbar = false;
laserdepth = 29996;
playerdepth = 29997;
wavedepth = 29998;
wavereversedepth = 29999;
border2depth = 30000;
planedepth = 30001;
plane2depth = 30002;
plane3depth = 30003;
pausedepth = 30004;
huddepth = 30005;
finalscreendepth = 30006;
finalscreendepth2 = 30007;
finalscreendepth3 = 30008;
cursordepth = 30009;
fadeindepth = 300010;
musicdepth = 300011;
PlayerI = 0;
Player = new Array();
PlayerSize = 0;
bulleti = 0;
Bullet = new Array();
BulletSize = 0;
enemyI = 0;
Enemy = new Array();
EnemySize = 0;
enemypieceI = 0;
spawnenemy = 0;
wavecreated = false;
slomotrig = false;
infinityactivated = false;
kills = 0;
highcombo = 0;
deleteALL = false;
gamePaused = false;
playerhealth = 100;
playertime = 1000;
weapon2unlocked = false;
weapon3unlocked = false;
weapon4unlocked = false;
weapon5unlocked = false;
weapon6unlocked = false;
weapon7unlocked = false;
weapon8unlocked = false;
_root.displaytime = true;
_root.displayhealth = true;
_root.slomoenabled = true;
attachMovie('cannon', 'cannon', playerdepth);
attachMovie('fadein', 'fadein', fadeindepth);
fadein._x = Stage.width / 2;
fadein._y = Stage.height / 2;
if (extremelevel != 100) {
attachMovie('script', 'script', scriptdepth);
} else {
music_infinity.start(0, 100);
if (!musiceffects) {
music_infinity.setVolume(0);
} else {
music_infinity.setVolume(100);
}
attachMovie('script_infinity', 'script_infinity', scriptdepth);
}
switch (int(_root.extremelevel)) {
case 0:
startnormalmusic();
script.textnumber = -1;
_root.displayhealth = false;
_root.displaytime = false;
_root.slomoenabled = false;
break;
case 1:
startnormalmusic();
script.textnumber = 8;
script.gotoAndPlay(script._totalframes - 1);
_root.displayhealth = false;
_root.displaytime = false;
_root.slomoenabled = false;
break;
case 2:
startnormalmusic();
script.textnumber = 18;
script.gotoAndPlay(script._totalframes - 1);
break;
case 3:
startnormalmusic();
script.textnumber = 24;
script.gotoAndPlay(script._totalframes - 1);
weapon2unlocked = true;
break;
case 4:
startnormalmusic();
script.textnumber = 28;
script.gotoAndPlay(script._totalframes - 1);
weapon2unlocked = true;
weapon3unlocked = true;
break;
case 5:
startnormalmusic();
script.textnumber = 31;
script.gotoAndPlay(script._totalframes - 1);
weapon2unlocked = true;
weapon3unlocked = true;
break;
case 6:
startbossmusic();
script.textnumber = 36;
script.gotoAndPlay(script._totalframes - 1);
weapon2unlocked = true;
weapon3unlocked = true;
break;
case 7:
startnormalmusic();
script.textnumber = 39;
script.gotoAndPlay(script._totalframes - 1);
weapon2unlocked = true;
weapon3unlocked = true;
break;
case 8:
startnormalmusic();
script.textnumber = 42;
script.gotoAndPlay(script._totalframes - 1);
weapon2unlocked = true;
weapon3unlocked = true;
break;
case 9:
startnormalmusic();
script.textnumber = 45;
script.gotoAndPlay(script._totalframes - 1);
weapon2unlocked = true;
weapon3unlocked = true;
break;
case 10:
startbossmusic();
script.textnumber = 49;
script.gotoAndPlay(script._totalframes - 1);
weapon2unlocked = true;
weapon3unlocked = true;
weapon4unlocked = true;
break;
case 11:
startnormalmusic();
script.textnumber = 53;
script.gotoAndPlay(script._totalframes - 1);
weapon2unlocked = true;
weapon3unlocked = true;
weapon4unlocked = true;
break;
case 12:
startnormalmusic();
script.textnumber = 56;
script.gotoAndPlay(script._totalframes - 1);
weapon2unlocked = true;
weapon3unlocked = true;
weapon4unlocked = true;
break;
case 13:
startnormalmusic();
script.textnumber = 59;
script.gotoAndPlay(script._totalframes - 1);
weapon2unlocked = true;
weapon3unlocked = true;
weapon4unlocked = true;
weapon5unlocked = true;
break;
case 14:
startbossmusic();
script.textnumber = 63;
script.gotoAndPlay(script._totalframes - 1);
weapon2unlocked = true;
weapon3unlocked = true;
weapon4unlocked = true;
weapon5unlocked = true;
break;
case 15:
startnormalmusic();
script.textnumber = 66;
script.gotoAndPlay(script._totalframes - 1);
weapon2unlocked = true;
weapon3unlocked = true;
weapon4unlocked = true;
weapon5unlocked = true;
break;
case 16:
startnormalmusic();
script.textnumber = 69;
script.gotoAndPlay(script._totalframes - 1);
weapon2unlocked = true;
weapon3unlocked = true;
weapon4unlocked = true;
weapon5unlocked = true;
break;
case 17:
startnormalmusic();
script.textnumber = 73;
script.gotoAndPlay(script._totalframes - 1);
weapon2unlocked = true;
weapon3unlocked = true;
weapon4unlocked = true;
weapon5unlocked = true;
weapon6unlocked = true;
break;
case 18:
startnormalmusic();
script.textnumber = 76;
script.gotoAndPlay(script._totalframes - 1);
weapon2unlocked = true;
weapon3unlocked = true;
weapon4unlocked = true;
weapon5unlocked = true;
weapon6unlocked = true;
break;
case 19:
startnormalmusic();
script.textnumber = 79;
script.gotoAndPlay(script._totalframes - 1);
weapon2unlocked = true;
weapon3unlocked = true;
weapon4unlocked = true;
weapon5unlocked = true;
weapon6unlocked = true;
break;
case 20:
startnormalmusic();
script.textnumber = 82;
script.gotoAndPlay(script._totalframes - 1);
weapon2unlocked = true;
weapon3unlocked = true;
weapon4unlocked = true;
weapon5unlocked = true;
weapon6unlocked = true;
weapon7unlocked = true;
break;
case 21:
startnormalmusic();
script.textnumber = 85;
script.gotoAndPlay(script._totalframes - 1);
weapon2unlocked = true;
weapon3unlocked = true;
weapon4unlocked = true;
weapon5unlocked = true;
weapon6unlocked = true;
weapon7unlocked = true;
break;
case 22:
startbossmusic();
script.textnumber = 89;
script.gotoAndPlay(script._totalframes - 1);
weapon2unlocked = true;
weapon3unlocked = true;
weapon4unlocked = true;
weapon5unlocked = true;
weapon6unlocked = true;
weapon7unlocked = true;
break;
case 23:
startbossmusic();
script.textnumber = 94;
script.gotoAndPlay(script._totalframes - 1);
}
script._x = Stage.width / 2;
script._y = Stage.height / 2;
attachMovie('hud', 'hud', huddepth);
cannon._x = Stage.width / 2;
cannon._y = Stage.height / 2;
attachMovie('cursor', 'cursor', cursordepth);
attachMovie('bg', 'bg', bgdepth);
attachMovie('border', 'border', borderdepth);
border._x = Stage.width / 2;
border._y = Stage.height / 2;
attachMovie('border2', 'border2', border2depth);
border2._x = Stage.width / 2;
border2._y = Stage.height / 2;
if (extremelevel == 100) {
attachMovie('infinity', 'infinity', infinitydepth);
}
infinity._x = 400;
infinity._y = 250;
cursorcolor = new Color(cursor);
cursorcolor.setRGB(4473924);
vx = 0;
vy = 0;
power = 2;
friction = 0.8;
bounds = {'left': Stage.width / 2 - border._width / 2 + 25, 'right': Stage.width / 2 + border._width / 2 - 25, 'up': Stage.height / 2 - border._height / 2 + 25, 'down': Stage.height / 2 + border._height / 2 - 25};
Mouse.hide();
piecenumber = 15;
fpsOptimize = false;
if (extremelevel != 100) {
shotinterval_1 = 5;
shotinterval_2 = 15;
shotinterval_3 = 30;
shotinterval_4 = 30;
shotinterval_5 = 15;
shotinterval_6 = 2;
shotinterval_7 = 15;
shotinterval_8 = 15;
} else {
shotinterval_1 = 5;
shotinterval_2 = 10;
shotinterval_3 = 15;
shotinterval_4 = 15;
shotinterval_5 = 10;
shotinterval_6 = 2;
shotinterval_7 = 10;
shotinterval_8 = 15;
}
spawnenemytime = 20;
regentime = 0;
slomodown = false;
playerdead = false;
combocount = 1;
score = 0;
weaponNumber = 1;
shotinterval = shotinterval_1;
leveltimer = 0;
levelnumber = 0;
level1spawntime = 20;
level2spawntime = 30;
level3spawntime = 30;
level4spawntime = 50;
level5spawntime = 30;
level7spawntime = 30;
level8spawntime = 30;
level9spawntime = 30;
level11spawntime = 30;
level12spawntime = 30;
level13spawntime = 30;
level15spawntime = 40;
level16spawntime = 30;
level17spawntime = 20;
level18spawntime = 30;
level19spawntime = 30;
level20spawntime = 20;
level21spawntime = 20;
cleared = 0;
gamewin = false;
gamePaused = false;
dead = false;
powerupchance = 10;
this.onEnterFrame = function () {
if (!gamePaused) {
cursor._x += (_xmouse - cursor._x) / 2;
cursor._y += (_ymouse - cursor._y) / 2;
if (Key.isDown(16) && !slomodown && slomoenabled || Key.isDown(32) && !slomodown && slomoenabled) {
slowmotion = true;
} else {
slowmotion = false;
}
if (slowmotion == false && slomotrig == false) {
slomotrig = true;
} else {
if (slowmotion == true && slomotrig == true) {
slomotrig = false;
}
}
if (slowmotion == false) {
if (playertime < 1000) {
if (playerhealth > 10) {
playertime += 1;
} else {
playertime += 10;
}
}
spawnenemy += 1;
if (frozen) {
frozentime -= 5;
}
} else {
playertime -= 5;
spawnenemy += 0.2;
if (frozen) {
frozentime -= 1;
}
}
if (frozentime <= 0) {
frozen = false;
}
if (playertime < 10) {
slomodown = true;
} else {
if (playertime > 50) {
slomodown = false;
}
}
if (playertime > 1000) {
playertime = 1000;
}
regentime += 1;
if (regentime >= 5 && playerhealth < 100 && !playerdead && extremelevel != 100) {
regentime = 0;
playerhealth += 1;
}
switch (levelnumber) {
case 1:
if (spawnenemy >= level1spawntime) {
spawnenemy = 0;
createEnemy('square');
}
leveltimer += 1;
if (leveltimer > 1200) {
levelnumber = 0;
leveltimer = 0;
script.textnumber += 1;
script.gotoAndPlay(script._totalframes - 1);
}
break;
case 2:
if (spawnenemy >= level2spawntime) {
spawnenemy = 0;
createEnemy('triangle');
}
leveltimer += 1;
if (leveltimer > 1200) {
levelnumber = 0;
leveltimer = 0;
script.textnumber += 1;
script.gotoAndPlay(script._totalframes - 1);
}
break;
case 3:
if (spawnenemy >= level3spawntime) {
spawnenemy = 0;
spawntype = random(2);
if (spawntype == 0) {
createEnemy('square');
}
if (spawntype == 1) {
createEnemy('triangle');
}
}
leveltimer += 1;
if (leveltimer > 1200) {
levelnumber = 0;
leveltimer = 0;
script.textnumber += 1;
script.gotoAndPlay(script._totalframes - 1);
}
break;
case 4:
if (spawnenemy >= level4spawntime) {
spawnenemy = 0;
createEnemy('pentagon');
createEnemy('pentagon');
_root['enemy' + enemyI].friend = _root['enemy' + (enemyI - 1)];
}
leveltimer += 1;
if (leveltimer > 1200) {
levelnumber = 0;
leveltimer = 0;
script.textnumber += 1;
script.gotoAndPlay(script._totalframes - 1);
}
break;
case 5:
if (spawnenemy >= level5spawntime) {
spawnenemy = 0;
spawntype = random(2);
if (spawntype == 0) {
createEnemy('square');
}
if (spawntype == 1) {
createEnemy('pentagon');
createEnemy('pentagon');
_root['enemy' + enemyI].friend = _root['enemy' + (enemyI - 1)];
}
}
leveltimer += 1;
if (leveltimer > 1800) {
levelnumber = 0;
leveltimer = 0;
script.textnumber += 1;
script.gotoAndPlay(script._totalframes - 1);
}
break;
case 6:
createEnemy('boss_circle');
levelnumber = 0;
break;
case 7:
if (spawnenemy >= level7spawntime) {
spawnenemy = 0;
spawntype = random(3);
if (spawntype == 0) {
createEnemy('square');
}
if (spawntype == 1) {
createEnemy('pentagon');
createEnemy('pentagon');
_root['enemy' + enemyI].friend = _root['enemy' + (enemyI - 1)];
}
if (spawntype == 2) {
createEnemy('triangle');
}
}
leveltimer += 1;
if (leveltimer > 1800) {
levelnumber = 0;
leveltimer = 0;
script.textnumber += 1;
script.gotoAndPlay(script._totalframes - 1);
}
break;
case 8:
if (spawnenemy >= level8spawntime) {
spawnenemy = 0;
createEnemy('shooter');
}
leveltimer += 1;
if (leveltimer > 1200) {
levelnumber = 0;
leveltimer = 0;
script.textnumber += 1;
script.gotoAndPlay(script._totalframes - 1);
}
break;
case 9:
if (spawnenemy >= level9spawntime) {
spawnenemy = 0;
spawntype = random(3);
if (spawntype == 0) {
createEnemy('shooter');
}
if (spawntype == 1) {
createEnemy('pentagon');
createEnemy('pentagon');
_root['enemy' + enemyI].friend = _root['enemy' + (enemyI - 1)];
}
if (spawntype == 2) {
createEnemy('triangle');
}
}
leveltimer += 1;
if (leveltimer > 2400) {
levelnumber = 0;
leveltimer = 0;
script.textnumber += 1;
script.gotoAndPlay(script._totalframes - 1);
}
break;
case 10:
createEnemy('boss_teleport');
levelnumber = 0;
break;
case 11:
if (spawnenemy >= level11spawntime) {
spawnenemy = 0;
createEnemy('star');
}
leveltimer += 1;
if (leveltimer > 1200) {
levelnumber = 0;
leveltimer = 0;
script.textnumber += 1;
script.gotoAndPlay(script._totalframes - 1);
}
break;
case 12:
if (spawnenemy >= level12spawntime) {
spawnenemy = 0;
spawntype = random(3);
if (spawntype == 0) {
createEnemy('square');
}
if (spawntype == 1) {
createEnemy('pentagon');
createEnemy('pentagon');
_root['enemy' + enemyI].friend = _root['enemy' + (enemyI - 1)];
}
if (spawntype == 2) {
createEnemy('star');
}
}
leveltimer += 1;
if (leveltimer > 1800) {
levelnumber = 0;
leveltimer = 0;
script.textnumber += 1;
script.gotoAndPlay(script._totalframes - 1);
}
break;
case 13:
if (spawnenemy >= level13spawntime) {
spawnenemy = 0;
spawntype = random(3);
if (spawntype == 0) {
createEnemy('triangle');
}
if (spawntype == 1) {
createEnemy('shooter');
}
if (spawntype == 2) {
createEnemy('star');
}
}
leveltimer += 1;
if (leveltimer > 1800) {
levelnumber = 0;
leveltimer = 0;
script.textnumber += 1;
script.gotoAndPlay(script._totalframes - 1);
}
break;
case 14:
createEnemy('boss_3');
levelnumber = 0;
break;
case 15:
if (spawnenemy >= level15spawntime) {
spawnenemy = 0;
createEnemy('blocker');
}
leveltimer += 1;
if (leveltimer > 1800) {
levelnumber = 0;
leveltimer = 0;
script.textnumber += 1;
script.gotoAndPlay(script._totalframes - 1);
}
break;
case 16:
if (spawnenemy >= level16spawntime) {
spawnenemy = 0;
spawntype = random(3);
if (spawntype == 0) {
createEnemy('blocker');
}
if (spawntype == 1) {
createEnemy('star');
}
if (spawntype == 2) {
createEnemy('triangle');
}
}
leveltimer += 1;
if (leveltimer > 2400) {
levelnumber = 0;
leveltimer = 0;
script.textnumber += 1;
script.gotoAndPlay(script._totalframes - 1);
}
break;
case 17:
if (spawnenemy >= level17spawntime) {
spawnenemy = 0;
createEnemy('square');
}
leveltimer += 1;
if (leveltimer > 2400) {
levelnumber = 0;
leveltimer = 0;
script.textnumber += 1;
script.gotoAndPlay(script._totalframes - 1);
}
break;
case 18:
if (spawnenemy >= level18spawntime) {
spawnenemy = 0;
createEnemy('hexagon');
}
leveltimer += 1;
if (leveltimer > 1200) {
levelnumber = 0;
leveltimer = 0;
script.textnumber += 1;
script.gotoAndPlay(script._totalframes - 1);
}
break;
case 19:
if (spawnenemy >= level19spawntime) {
spawnenemy = 0;
spawntype = random(3);
if (spawntype == 0) {
createEnemy('hexagon');
}
if (spawntype == 1) {
createEnemy('square');
}
if (spawntype == 2) {
createEnemy('triangle');
}
}
leveltimer += 1;
if (leveltimer > 2400) {
levelnumber = 0;
leveltimer = 0;
script.textnumber += 1;
script.gotoAndPlay(script._totalframes - 1);
}
break;
case 20:
if (spawnenemy >= level20spawntime) {
spawnenemy = 0;
spawntype = random(3);
if (spawntype == 0) {
createEnemy('hexagon');
}
if (spawntype == 1) {
createEnemy('pentagon');
createEnemy('pentagon');
_root['enemy' + enemyI].friend = _root['enemy' + (enemyI - 1)];
}
if (spawntype == 2) {
createEnemy('square');
}
}
leveltimer += 1;
if (leveltimer > 2400) {
levelnumber = 0;
leveltimer = 0;
script.textnumber += 1;
script.gotoAndPlay(script._totalframes - 1);
}
break;
case 21:
if (spawnenemy >= level21spawntime) {
spawnenemy = 0;
spawntype = random(5);
if (spawntype == 0) {
createEnemy('hexagon');
}
if (spawntype == 1) {
createEnemy('pentagon');
createEnemy('pentagon');
_root['enemy' + enemyI].friend = _root['enemy' + (enemyI - 1)];
}
if (spawntype == 2) {
createEnemy('triangle');
}
if (spawntype == 3) {
createEnemy('square');
}
if (spawntype == 4) {
createEnemy('star');
}
}
leveltimer += 1;
if (leveltimer > 2400) {
levelnumber = 0;
leveltimer = 0;
script.textnumber += 1;
script.gotoAndPlay(script._totalframes - 1);
}
break;
case 22:
createEnemy('boss_final');
levelnumber = 0;
break;
case 23:
createEnemy('boss_final2');
_root.enemypieceI += 1;
_root.enemypiecedepth += 1;
_root.attachMovie('boss_teleportfinal', 'enemy_piece' + _root.enemypieceI, _root.enemypiecedepth);
_root['enemy_piece' + _root.enemypieceI].target = _root['enemy' + enemyI];
_root['enemy_piece' + _root.enemypieceI]._x = -500;
_root['enemy_piece' + _root.enemypieceI]._y = -500;
_root['enemy_piece' + _root.enemypieceI].gotoAndStop(21);
levelnumber = 0;
}
shotdelay += 1;
if (mousePressed == true && !gamewin) {
if (shotdelay >= shotinterval) {
shotdelay = 0;
if (!frozen) {
createShot();
}
}
MousedUp = false;
} else {
MousedUp = true;
}
if (mousePressed2 == true) {
if (shotdelay >= shotinterval) {
shotdelay = 0;
createShot();
}
}
if (combocount < 1) {
combocount = 1;
}
if (combocount > highcombo) {
highcombo = combocount;
}
if (score < 0) {
score = 0;
}
if (!playerdead && !frozen && !gamewin) {
if (Key.isDown(68) || Key.isDown(39)) {
vx += power;
}
if (Key.isDown(65) || Key.isDown(37)) {
vx -= power;
}
if (Key.isDown(83) || Key.isDown(40)) {
vy += power;
}
if (Key.isDown(87) || Key.isDown(38)) {
vy -= power;
}
if (cannon._x <= bounds.left) {
vx = power;
}
if (cannon._x >= bounds.right) {
vx = -power;
}
if (cannon._y <= bounds.up) {
vy = power;
}
if (cannon._y >= bounds.down) {
vy = -power;
}
vx *= friction;
vy *= friction;
cannon._x += vx;
cannon._y += vy;
}
if (laser.lasertype == 1) {
laser._x += vx;
laser._y += vy;
}
if (Key.isDown(80) && !gamewin) {
script.stop();
attachMovie('pauseMenu', 'pauseMenu', pausedepth);
pauseMenu._x = Stage.width / 2 - _root._x;
pauseMenu._y = Stage.height / 2 - _root._y;
cursor._alpha = 0;
gamePaused = true;
Mouse.show();
vx = 0;
vy = 0;
}
if (!laser && !gamewin) {
if (Key.isDown(49)) {
weaponNumber = 1;
shotinterval = shotinterval_1;
}
if (Key.isDown(50) && weapon2unlocked) {
weaponNumber = 2;
shotinterval = shotinterval_2;
}
if (Key.isDown(51) && weapon3unlocked) {
weaponNumber = 3;
shotinterval = shotinterval_3;
}
if (Key.isDown(52) && weapon4unlocked) {
weaponNumber = 4;
shotinterval = shotinterval_4;
}
if (Key.isDown(53) && weapon5unlocked) {
weaponNumber = 5;
shotinterval = shotinterval_5;
}
if (Key.isDown(54) && weapon6unlocked) {
weaponNumber = 6;
shotinterval = shotinterval_6;
}
if (Key.isDown(55) && weapon7unlocked) {
weaponNumber = 7;
shotinterval = shotinterval_7;
}
if (Key.isDown(56) && weapon8unlocked) {
weaponNumber = 8;
shotinterval = shotinterval_8;
}
}
if (Key.isDown(36)) {
shotdelay = shotinterval;
}
resetI();
if (fpsOptimize) {
getFPS();
}
if (soundnumber > 10000) {
soundnumber = 0;
}
}
};
onMouseDown = function () {
if (!playerdead) {
mousePressed = true;
}
};
onMouseUp = function () {
mousePressed = false;
};
onMouseMove = function () {
if (!deleteALL && !gamePaused && !gamewin) {
Mouse.hide();
}
};
}