Frame 1
var traillevel = 10000;
powerup = function () {
this.timer = 0;
this._alpha = 0;
this.outtime = 150;
};
powerup.prototype = new MovieClip();
Object.registerClass("powerup", powerup);
powerup.prototype.playerhit = function () {
if (_root.player10.hitTest(this) && (!this.dead)) {
this.bonuss();
_root.soundc();
}
};
powerup.prototype.bonustyp = function () {
if (this.bonus < 8) {
this.removeMovieClip();
}
if (this.bonus > 17) {
this.bonus = random(8) + 9;
}
this.gotoAndStop(this.bonus - 7);
};
powerup.prototype.bonuss = function () {
if ((this.bonus > 6) && (this.bonus < 9)) {
points = points + 100;
trace("500");
}
if (this.bonus == 9) {
points = points + 200;
trace("1000");
}
if (this.bonus == 10) {
points = points + 500;
trace("2000");
}
if (this.bonus == 11) {
points = points + 1000;
trace("10000");
}
if (this.bonus == 12) {
this.shotNumb = shotNumb;
this.shotSpread = shotSpread;
shotNumb = 36;
shotSpread = 190;
shoot();
shotNumb = this.shotNumb;
shotSpread = this.shotSpread;
trace("mega");
points = points + 200;
_root.sounda(100);
}
if (this.bonus == 13) {
shottimer = 100;
shotNumb = 5;
shotSpread = 25;
points = points + 100;
trace("plus");
}
if (this.bonus == 14) {
shottimer = 100;
shotNumb = 1;
shotSpread = 0;
trace("minus");
points = points - 3000;
}
if (this.bonus == 15) {
timetimer = 100;
trace("slow");
_root.laser = new Sound();
_root.laser.attachSound("Ss2");
_root.laser.start([0, 1]);
_root.laser.setVolume(25);
points = points + 1000;
}
if (this.bonus == 16) {
_root.player10.shieldtime = 100;
points = points + 200;
}
if (this.bonus >= 17) {
playerlives++;
points = points + 1000;
}
this.dead = true;
};
powerup.prototype.die = function () {
if (this.dead) {
this.removeMovieClip();
}
};
powerup.prototype.onEnterFrame = function () {
powerupArray.push(this.level);
this.outtime--;
if ((this._alpha < 100) && (this.outtime > 0)) {
this._alpha = this._alpha + 10;
} else {
this._alpha = this._alpha - 10;
if (this._alpha < 10) {
this.dead = true;
}
}
if (this.timer == 0) {
this.bonustyp();
}
this.timer++;
this.playerhit();
this.die();
};
levelup = function () {
this._rotation = 180;
this._xscale = 10;
this._yscale = 10;
this.loopp = 11;
this.timer = 30;
this.gotoAndStop(this.stopp);
};
levelup.prototype = new MovieClip();
Object.registerClass("levelup", levelup);
levelup.prototype.onEnterFrame = function () {
if (!(this.loopp === 0)) {
this._xscale = this._xscale + this.loopp;
this._yscale = this._yscale + this.loopp;
this._rotation = this._rotation + (2.72 * this.loopp);
this.loopp--;
} else if (this.loopp == 0) {
this.timer--;
if (this.timer < 1) {
this.loopp--;
}
}
if (this.loopp == -12) {
this.removeMovieClip();
}
};
shot = function () {
this.timer = 1;
this.xSpeed = Math.sin(this._rotation * (Math.PI/180)) * 10;
this.ySpeed = Math.cos(this._rotation * (Math.PI/180)) * 10;
};
shot.prototype = new MovieClip();
Object.registerClass("shot", shot);
shot.prototype.onEnterFrame = function () {
this.gotoAndStop(this.stopp);
if (this.testplayer) {
if (_root.player10.hitTest(this)) {
this.timer = 0;
_root.player10.dead = true;
}
}
shotArray.push(this.level);
this._x = this._x + this.xSpeed;
this._y = this._y - this.ySpeed;
traillevel++;
_root.attachMovie("shottrail", "shottrail" + traillevel, traillevel, {_x:this._x, _y:this._y, _rotation:this._rotation, stopp:this.stopp});
if (((((this._x > 510) or (this._x < -10)) or (this._y > 510)) or (this._y < -10)) or (this.timer == 0)) {
this.removeMovieClip();
}
};
swdie = function () {
this._xscale = this.scalee;
this._yscale = this.scalee;
this.increase = this._xscale / 2;
this.gotoAndStop(this.stopp);
trace(this.stopp);
};
swdie.prototype = new MovieClip();
Object.registerClass("swdie", swdie);
swdie.prototype.onEnterFrame = function () {
this._xscale = this._xscale + this.increase;
this._yscale = this._yscale + this.increase;
this.timer--;
if (this.timer < 0) {
this._alpha = this._alpha - (random(10) + 5);
}
if (this._alpha < 5) {
this.removeMovieClip();
}
};
player = function () {
this._x = 250;
this._y = 250;
this._rotation = 0;
this._alpha = 100;
this.dead = false;
this.speed = 0;
this.xacc = 0;
this.yacc = 0;
this.shield = 1;
this.shieldtime = 0;
};
player.prototype = new MovieClip();
Object.registerClass("player", player);
player.prototype.die = function () {
this.shieldtime--;
if (this.shieldtime > 0) {
this.shield = 2;
} else {
this.shield = 1;
}
trace(this.shield);
this.gotoAndStop(this.shield);
if (this.shield == 2) {
this.dead = false;
}
if (this.dead) {
if (this._alpha == 100) {
traillevel++;
_root.attachMovie("swdie", "swdie" + traillevel, traillevel, {_x:this._x, _y:this._y, scalee:150, timer:5, stopp:1});
}
this._alpha = this._alpha - 10;
if (this._alpha < 10) {
traillevel++;
_root.attachMovie("swdie", "swdie" + traillevel, traillevel, {_x:this._x, _y:this._y, scalee:100, timer:5, stopp:1});
playerdie();
}
}
};
player.prototype.rotation = function () {
this.Xdistance = _root._xmouse - this._x;
this.Ydistance = _root._ymouse - this._y;
this.distance = Math.sqrt((this.Ydistance * this.Ydistance) + (this.Xdistance * this.Xdistance));
this.radAngle = Math.atan2(this.Ydistance, this.Xdistance);
this._rotation = int(((this.radAngle * 360) / (Math.PI*2)) + 90);
};
player.prototype.moving = function () {
this.xSpeedd = Math.sin(this._rotation * (Math.PI/180));
this.ySpeedd = Math.cos(this._rotation * (Math.PI/180));
this.xSpeed = (this.xSpeedd * this.distance) / 10;
this.ySpeed = (this.ySpeedd * this.distance) / 10;
if ((!this.dead) && (this.distance > 3)) {
this._x = this._x + this.xSpeed;
this._y = this._y - this.ySpeed;
}
traillevel++;
_root.attachMovie("playertrail", "playertrail" + traillevel, traillevel, {_x:this._x, _y:this._y, _rotation:this._rotation, shield:this.shield});
};
player.prototype.onEnterFrame = function () {
this.die();
this.rotation();
this.moving();
};
basicEnemy = function () {
this._x = this.xpost;
this._y = this.ypost;
this._alpha = this.alpha;
this.dead = false;
this.gotoAndStop(1);
this.timer = 1;
};
basicEnemy.prototype = new MovieClip();
basicEnemy.prototype.chekk = function () {
while (this._x > 500) {
this._x--;
}
while (this._y < 0) {
this._y++;
}
while (this._x < 0) {
this._x++;
}
while (this._y > 500) {
this._y--;
}
};
basicEnemy.prototype.shot = function () {
if (!this.dead) {
i = 0;
while (i < shotArray.length) {
if (_root["shot" + shotArray[i]].hitTest(this)) {
this.health--;
_root["shot" + shotArray[i]].removeMovieClip();
}
i++;
}
}
};
basicEnemy.prototype.die = function (bonus) {
if (this.health < 1) {
this.dead = true;
}
if (this.dead) {
this.timer--;
this._alpha = this._alpha - 10;
if (this._alpha < 10) {
enemies--;
traillevel++;
_root.attachMovie("powerup", "powerup" + traillevel, traillevel, {_x:this._x, _y:this._y, bonus:random(12) + bonus, level:traillevel});
this.removeMovieClip();
}
}
};
basicEnemy.prototype.playerHit = function () {
this.Xdistance = _root.player10._x - this._x;
this.Ydistance = _root.player10._y - this._y;
this.distance = Math.sqrt((this.Ydistance * this.Ydistance) + (this.Xdistance * this.Xdistance));
this.radAngle = Math.atan2(this.Ydistance, this.Xdistance);
if (this.distance < (this.dist * _root.player10.shield)) {
_root.player10.dead = true;
this.health = this.health - 10;
}
};
basicEnemy.prototype.beep = function () {
_root.beep = new Sound();
_root.beep.attachSound("beep");
_root.beep.start([0, 1]);
_root.beep.setVolume(50);
};
basicEnemy.prototype.offScreen = function () {
if ((this._x > 500) or (this._x < 0)) {
this.xplus = this.xplus * -1;
this.beep();
this.bong(this._x, this._y, this.scalee);
}
if ((this._y < 0) or (this._y > 500)) {
this.yplus = this.yplus * -1;
this.beep();
this.bong(this._x, this._y, this.scalee);
}
};
basicEnemy.prototype.styledie = function (scalee, stopp, pts) {
if (this.dead && (this.timer == 0)) {
points = points + pts;
traillevel++;
attachMovie("swdie", "swdie" + traillevel, traillevel, {_x:this._x, _y:this._y, scalee:scalee, timer:5, stopp:stopp});
}
};
basicEnemy.prototype.bong = function (xpost, ypost, scalee) {
traillevel++;
attachMovie("swdie", "swdie" + traillevel, traillevel, {_x:xpost, _y:ypost, scalee:scalee, timer:5, stopp:2});
};
shooter = function () {
super();
this.shootnumb = 30;
this.shoot = false;
this.offset = 0;
};
shooter.prototype = new basicEnemy();
Object.registerClass("shooter", shooter);
shooter.prototype.shoott = function () {
if ((this.offset > 40) && (this.shoot)) {
traillevel++;
_root.attachMovie("shot", "shot" + traillevel, traillevel, {_rotation:this._rotation, _x:this._x, _y:this._y, level:traillevel, stopp:2, testplayer:true});
}
};
shooter.prototype.rotation = function () {
this.radAngle = Math.atan2(this.Ydistance, this.Xdistance);
this._rotation = int(((this.radAngle * 360) / (Math.PI*2)) + 90);
};
shooter.prototype.movement = function () {
if (this.distance < 250) {
if (this.offset < 80) {
this.offset = this.offset + 5;
}
this.gotoAndStop(2);
} else {
if (this.distance > 250) {
if (this.offset > 0) {
this.offset = this.offset - 5;
}
}
if (this.offset < 40) {
this.gotoAndStop(1);
}
}
this.xSpeedd = Math.sin((this._rotation + this.offset) * (Math.PI/180));
this.ySpeedd = Math.cos((this._rotation + this.offset) * (Math.PI/180));
this.xSpeed = this.xSpeedd * 5;
this.ySpeed = this.ySpeedd * 5;
if ((!this.dead) && (this.distance > 3)) {
this._x = this._x + this.xSpeed;
this._y = this._y - this.ySpeed;
}
traillevel++;
_root.attachMovie("shootertrail", "shootertrail" + traillevel, traillevel, {_x:this._x, _y:this._y, _rotation:this._rotation, gotoAndStop:this.offset, _alpha:100});
};
shooter.prototype.shot = function () {
if (!this.dead) {
i = 0;
while (i < shotArray.length) {
if (_root["shot" + shotArray[i]].hitTest(this) && (_root["shot" + shotArray[i]].testplayer == false)) {
if (this.offset < 40) {
this.health--;
_root["shot" + shotArray[i]].removeMovieClip();
} else {
_root["shot" + shotArray[i]].xSpeed = _root["shot" + shotArray[i]].xSpeed * -1;
_root["shot" + shotArray[i]]._x = _root["shot" + shotArray[i]]._x + (_root["shot" + shotArray[i]].xSpeed * 2);
_root["shot" + shotArray[i]].ySpeed = _root["shot" + shotArray[i]].ySpeed * -1;
_root["shot" + shotArray[i]]._y = _root["shot" + shotArray[i]]._y - (_root["shot" + shotArray[i]].ySpeed * 2);
_root["shot" + shotArray[i]].testplayer = true;
}
}
i++;
}
}
};
shooter.prototype.onEnterFrame = function () {
trace(this.shoot);
this.delay--;
if (this.shootnumb == 0) {
this.shoot = true;
this.shootnumb = 30;
} else {
this.shoot = false;
}
if (this.delay < 0) {
this.die(10);
this.styledie(70, 5, 5000);
if (this.health > 0) {
this.shot();
this.shoott();
this.playerHit();
this.rotation();
if (timetimer < 0) {
this.chekk();
this.movement();
this.shootnumb--;
}
}
}
};
twisty = function () {
super();
this.offset = 0;
};
twisty.prototype = new basicEnemy();
Object.registerClass("twisty", twisty);
twisty.prototype.rotation = function () {
this.radAngle = Math.atan2(this.Ydistance, this.Xdistance);
this._rotation = int(((this.radAngle * 360) / (Math.PI*2)) + 90);
};
twisty.prototype.movement = function () {
if (this.distance < 250) {
if (this.offset < 80) {
this.offset = this.offset + 5;
}
this.gotoAndStop(2);
} else {
if (this.distance > 250) {
if (this.offset > 0) {
this.offset = this.offset - 5;
}
}
if (this.offset < 40) {
this.gotoAndStop(1);
}
}
this.xSpeedd = Math.sin((this._rotation + this.offset) * (Math.PI/180));
this.ySpeedd = Math.cos((this._rotation + this.offset) * (Math.PI/180));
this.xSpeed = this.xSpeedd * 5;
this.ySpeed = this.ySpeedd * 5;
if ((!this.dead) && (this.distance > 3)) {
this._x = this._x + this.xSpeed;
this._y = this._y - this.ySpeed;
}
traillevel++;
_root.attachMovie("twistytrail", "twistytrail" + traillevel, traillevel, {_x:this._x, _y:this._y, _rotation:this._rotation, gotoAndStop:this.offset + 1, _alpha:70});
};
twisty.prototype.shot = function () {
if (!this.dead) {
i = 0;
while (i < shotArray.length) {
if (_root["shot" + shotArray[i]].hitTest(this)) {
if (this.offset < 40) {
this.health--;
_root["shot" + shotArray[i]].removeMovieClip();
} else {
_root["shot" + shotArray[i]].xSpeed = _root["shot" + shotArray[i]].xSpeed * -1;
_root["shot" + shotArray[i]]._x = _root["shot" + shotArray[i]]._x + (_root["shot" + shotArray[i]].xSpeed * 2);
_root["shot" + shotArray[i]].ySpeed = _root["shot" + shotArray[i]].ySpeed * -1;
_root["shot" + shotArray[i]]._y = _root["shot" + shotArray[i]]._y - (_root["shot" + shotArray[i]].ySpeed * 2);
_root["shot" + shotArray[i]].testplayer = true;
}
}
i++;
}
}
};
twisty.prototype.onEnterFrame = function () {
this.delay--;
if (this.delay < 0) {
this.die(8);
this.styledie(70, 4, 1500);
if (this.health > 0) {
this.shot();
this.playerHit();
this.rotation();
if (timetimer < 0) {
this.chekk();
this.movement();
}
}
}
};
follower = function () {
super();
};
follower.prototype = new basicEnemy();
Object.registerClass("follower", follower);
follower.prototype.movement = function () {
this._x = this._x + (this.Xdistance / 15);
this._y = this._y + (this.Ydistance / 15);
this.radAngle = Math.atan2(this.Ydistance, this.Xdistance);
this._rotation = int(((this.radAngle * 360) / (Math.PI*2)) + 90);
traillevel++;
_root.attachMovie("followertrail", "followertrail" + traillevel, traillevel, {_x:this._x, _y:this._y, _rotation:this._rotation});
};
follower.prototype.onEnterFrame = function () {
this.delay--;
if (this.delay < 0) {
this.die(5);
this.styledie(70, 3, 700);
if (this.health > 0) {
this.shot();
this.playerHit();
if (timetimer < 0) {
this.chekk();
this.movement();
}
}
}
};
wander = function () {
this.scalee = 100;
this.xplus = random(2) - 1;
this.yplus = random(2) - 1;
if (this.xplus == 0) {
this.xplus = 1;
}
if (this.yplus == 0) {
this.yplus = 1;
}
this.xplus = this.xplus * 6;
this.yplus = this.yplus * 6;
super();
};
wander.prototype = new basicEnemy();
Object.registerClass("wander", wander);
wander.prototype.movement = function () {
this._x = this._x + this.xplus;
this._y = this._y + this.yplus;
this._rotation = this._rotation + 5;
traillevel++;
_root.attachMovie("wandertrail", "wandertrail" + traillevel, traillevel, {_x:this._x, _y:this._y, _rotation:this._rotation});
};
wander.prototype.onEnterFrame = function () {
this.delay--;
if (this.delay < 0) {
this.die(4);
this.styledie(60, 2, 200);
if (this.health > 0) {
this.shot();
this.playerHit();
if (timetimer < 0) {
this.chekk();
this.movement();
this.offScreen();
}
}
}
};
splitter = function () {
this.scalee = 200;
super();
this.xplus = this.xplus * 1;
this.yplus = this.yplus * 1;
};
splitter.prototype = new wander();
Object.registerClass("splitter", splitter);
splitter.prototype.split = function () {
this.styledie(60, 2, 0);
i = traillevel;
while (i < (traillevel + 3)) {
enemyarr[0].push(traillevel + i);
_root.attachMovie("wander", "wander" + (traillevel + i), traillevel + i, {xpost:this._x, ypost:this._y, alpha:100, health:1, delay:random(15), scalee:30, dist:25});
i++;
}
};
splitter.prototype.movement = function () {
this._x = this._x + this.xplus;
this._y = this._y + this.yplus;
this._rotation = this._rotation + 5;
traillevel++;
_root.attachMovie("splittertrail", "splittertrail" + traillevel, traillevel, {_x:this._x, _y:this._y, _rotation:this._rotation});
};
splitter.prototype.die = function (bonus) {
if (this.health < 1) {
this.dead = true;
this.timer = 0;
}
if (this.dead) {
if (this._alpha == 100) {
this.styledie(80, 2, 400);
}
this._alpha = this._alpha - 10;
if (this._alpha < 10) {
this.split();
_root.attachMovie("powerup", "powerup" + traillevel, traillevel, {_x:this._x, _y:this._y, bonus:random(12) + bonus, level:traillevel});
this.removeMovieClip();
}
}
};
splitter.prototype.onEnterFrame = function () {
this.delay--;
if (this.delay < 0) {
this.die(7);
if (this.health > 0) {
this.shot();
this.playerHit();
if (timetimer < 0) {
this.chekk();
this.movement();
this.offScreen();
}
}
}
};
var enemies = 0;
var gameLevel = -1;
var points = 0;
var shotNumb = 1;
var shotSpread = 0;
var points = 0;
var shotNumb = 1;
var shotSpread = 0;
var timer = 3;
var timetimer = 0;
var shottimer = 0;
var playerlives = 3;
var menuu = false;
var loadedd = false;
var preloader = true;
var finishedpre = false;
var playgame = false;
var volum = 100;
var sounds = false;
var soundtimer = 5;
var highscore = false;
var credits = false;
var instructions = false;
var highscorenumb = [0, 0, 0, 0, 0];
var timeraa = 120;
var done = false;
var timerf = 200;
var notused;
newPlayer = function () {
_root.attachMovie("player", "player10", 10);
};
startGame2 = function () {
_root.attachMovie("score", "score", 1001000);
};
resetGame = function () {
trace("the game has been reset");
_root.score.removeMovieClip();
trace(_currentframe);
enemies = 0;
gameLevel = -1;
points = 0;
shotNumb = 1;
shotSpread = 0;
points = 0;
shotNumb = 1;
shotSpread = 0;
timer = 3;
timetimer = 0;
shottimer = 0;
playerlives = 3;
if (((!menuu) && (playgame)) && (finishedpre)) {
newPlayer();
startGame2();
}
};
levelStart = function () {
if ((enemies == 0) && (gameLevel < 23)) {
gameLevel++;
gameLevel2 = gameLevel + 1;
newLevel();
traillevel++;
_root.attachMovie("levelup", "levelup" + traillevel, traillevel, {_x:250, _y:250, stopp:1});
} else if ((enemies == 0) && (gameLevel == 23)) {
playerlives = 0;
playerdie();
}
};
var level1 = [3];
var level2 = [1, 1];
var level3 = [3, 0, 1];
var level4 = [0, 3];
var level5 = [3, 1, 1];
var level6 = [0, 2, 0, 1];
var level7 = [3, 2, 1];
var level8 = [3, 2, 0, 0, 1];
var level9 = [0, 2, 1, 1];
var level10 = [3, 0, 2, 2];
var level11 = [6, 1, 0, 0, 1];
var level12 = [3, 2, 3];
var level13 = [3, 2, 2, 0, 1];
var level14 = [3, 0, 0, 3];
var level15 = [3, 1, 1, 1, 1];
var level16 = [3, 2, 2, 1];
var level17 = [0, 3, 1, 3];
var level18 = [3, 0, 1, 2, 1];
var level19 = [0, 2, 2, 2];
var level20 = [3, 2, 2, 2];
var level21 = [3, 0, 0, 2, 2];
var level22 = [3, 2, 1, 2, 1];
var level23 = [3, 2, 1, 1, 2];
var level24 = [3, 3, 3, 3, 3];
var levels = [level1, level2, level3, level4, level5, level6, level7, level8, level9, level10, level11, level12, level13, level14, level15, level16, level17, level18, level19, level20, level21, level22, level23, level24];
newLevel = function () {
delete enemyarr;
enemyarr = new Array();
p = 0;
while (p < 5) {
enemyarr[p] = new Array();
p++;
}
i = 0;
while (i < levels[gameLevel].length) {
if (i == 0) {
ii = 0;
while (ii < levels[gameLevel][i]) {
traillevel++;
_root.attachMovie("wander", "wander" + traillevel, traillevel, {xpost:random(500), ypost:530, alpha:100, health:1, delay:random(100), dist:20});
enemies++;
enemyarr[i].push(traillevel);
ii++;
}
}
if (i == 1) {
ii = 0;
while (ii < levels[gameLevel][i]) {
traillevel++;
_root.attachMovie("splitter", "splitter" + traillevel, traillevel, {xpost:random(500), ypost:530, alpha:100, health:1, delay:random(200) + 50, dist:40});
enemies = enemies + 3;
enemyarr[i].push(traillevel);
ii++;
}
}
if (i == 2) {
ii = 0;
while (ii < levels[gameLevel][i]) {
traillevel++;
_root.attachMovie("follower", "follower" + traillevel, traillevel, {xpost:random(500), ypost:-30, alpha:100, health:1, delay:random(100) + 100, dist:30});
enemies++;
enemyarr[i].push(traillevel);
ii++;
}
}
if (i == 3) {
ii = 0;
while (ii < levels[gameLevel][i]) {
traillevel++;
_root.attachMovie("twisty", "twisty" + traillevel, traillevel, {xpost:-30, ypost:random(500), alpha:100, health:1, delay:random(120) + 100, dist:30});
enemies++;
enemyarr[i].push(traillevel);
ii++;
}
}
if (i == 4) {
ii = 0;
while (ii < levels[gameLevel][i]) {
traillevel++;
_root.attachMovie("shooter", "shooter" + traillevel, traillevel, {xpost:530, ypost:random(500), alpha:100, health:1, delay:random(120) + 100, dist:30});
enemies++;
enemyarr[i].push(traillevel);
ii++;
}
}
i++;
}
};
_root.backb.onPress = function () {
if (shottimer < 0) {
shotNumb = 3;
shotSpread = 15;
}
if (timer < 0) {
shoot();
timer = 3;
}
};
volumeAdj = function () {
soundtimer--;
if ((Key.isDown(32) && (sounds)) && (soundtimer < 0)) {
music.stop();
sounds = false;
soundtimer = 5;
} else if ((Key.isDown(32) && (!sounds)) && (soundtimer < 0)) {
startGame();
sounds = true;
soundtimer = 5;
}
music.setVolume(volum);
trace(volum);
};
shoot = function () {
i = 0;
while (i < shotNumb) {
traillevel++;
_root.attachMovie("shot", "shot" + traillevel, traillevel, {_rotation:(_root.player10._rotation + shotSpread) - (10 * i), _x:_root.player10._x, _y:_root.player10._y, level:traillevel, stopp:1, testplayer:false});
i++;
}
};
sounda = function (volumeb) {
_root.soundaa = new Sound();
_root.soundaa.attachSound("soundc");
_root.soundaa.start([0, 1]);
_root.soundaa.setVolume(volumeb);
};
soundb = function () {
_root.soundbb = new Sound();
_root.soundbb.attachSound("soundb");
_root.soundbb.start([0, 1]);
_root.soundbb.setVolume(100);
};
soundc = function () {
_root.soundaa = new Sound();
_root.soundaa.attachSound("soundd");
_root.soundaa.start([0, 1]);
_root.soundaa.setVolume(100);
};
powerupDie = function () {
i = 0;
while (i < powerupArray.length) {
_root["powerup" + powerupArray[i]].outtime = -5;
i++;
}
};
loaded = function () {
bytesLoaded = _root.getBytesLoaded();
bytesTotal = _root.getBytesTotal();
percentLoaded = 100 * (bytesLoaded / bytesTotal);
_root.bar2._xscale = percentLoaded;
if (!(percentLoaded === 100)) {
_root.preloader = true;
_root.menuu = false;
} else if (_root.bar.timerb > 0) {
_root.bar.timerb--;
}
};
save = function () {
savefile = SharedObject.getLocal("roids3");
};
save();
trace("table");
trace(highscorenumb);
onEnterFrame = function () {
loaded();
trace("frame");
trace(_currentframe);
volumeAdj();
powerupArray = new Array();
shotArray = new Array();
if (((!menuu) && (playgame)) && (finishedpre)) {
levelStart();
timer--;
timetimer--;
shottimer--;
}
if (traillevel > 1000000) {
traillevel = 10000;
}
};
playerdie = function () {
i = 0;
while (i < enemyarr.length) {
ii = 0;
while (ii < enemyarr[i].length) {
if (i == 0) {
trace(enemyarr[i][ii]);
_root["wander" + enemyarr[i][ii]].dead = true;
_root["wander" + enemyarr[i][ii]].timer = 0;
_root["wander" + enemyarr[i][ii]].styledie(60, 2, 0);
_root["wander" + enemyarr[i][ii]].removeMovieClip();
}
if (i == 1) {
trace(enemyarr[i][ii]);
_root["splitter" + enemyarr[i][ii]].dead = true;
_root["splitter" + enemyarr[i][ii]].timer = 0;
_root["splitter" + enemyarr[i][ii]].styledie(80, 2, 0);
_root["splitter" + enemyarr[i][ii]].removeMovieClip();
}
if (i == 2) {
trace(enemyarr[i][ii]);
_root["follower" + enemyarr[i][ii]].dead = true;
_root["follower" + enemyarr[i][ii]].timer = 0;
_root["follower" + enemyarr[i][ii]].styledie(70, 3, 0);
_root["follower" + enemyarr[i][ii]].removeMovieClip();
}
if (i == 3) {
trace(enemyarr[i][ii]);
_root["twisty" + enemyarr[i][ii]].dead = true;
_root["twisty" + enemyarr[i][ii]].timer = 0;
_root["twisty" + enemyarr[i][ii]].styledie(70, 4, 0);
_root["twisty" + enemyarr[i][ii]].removeMovieClip();
}
if (i == 4) {
trace(enemyarr[i][ii]);
_root["shooter" + enemyarr[i][ii]].dead = true;
_root["shooter" + enemyarr[i][ii]].timer = 0;
_root["shooter" + enemyarr[i][ii]].styledie(70, 5, 0);
_root["shooter" + enemyarr[i][ii]].removeMovieClip();
}
ii++;
}
i++;
}
powerupDie();
_root.player10.removeMovieClip();
if (playerlives > 0) {
playerlives--;
enemies = 0;
newLevel();
newPlayer();
traillevel++;
_root.attachMovie("levelup", "levelup" + traillevel, traillevel, {_x:250, _y:250, stopp:random(20) + 2});
} else if (gameLevel < 23) {
if (points > highscorenumb[0]) {
highscore[0] = points;
savefile.data.score0 = points;
}
_root.score.removeMovieClip();
timeraa = 0;
gotoAndStop (3);
} else if (gameLevel == 23) {
if (points > highscorenumb[0]) {
highscore[0] = points;
savefile.data.score0 = points;
}
highscorecal();
_root.score.removeMovieClip();
timeraa = 0;
done = true;
gotoAndStop (6);
}
};
Instance of Symbol 145 MovieClip in Frame 1
onClipEvent (enterFrame) {
if (_root.percentLoaded == 100) {
_root.gotoAndStop(2);
}
}
Instance of Symbol 149 MovieClip "bar2" in Frame 1
onClipEvent (load) {
timer = 10;
}
onClipEvent (enterFrame) {
timer--;
if ((_xscale == 100) && (timer < 0)) {
_root.gotoAndStop(2);
}
}
Frame 2
gotoAndStop (3);
Instance of Symbol 13 MovieClip in Symbol 14 MovieClip [wander] Frame 1
onClipEvent (load) {
_alpha = 100;
}
onClipEvent (enterFrame) {
_alpha = (_alpha + (random(21) - 10));
if (_alpha > 100) {
_alpha = 90;
}
if (_alpha < 50) {
_alpha = 60;
}
}
Instance of Symbol 16 MovieClip in Symbol 19 MovieClip [player] Frame 1
onClipEvent (load) {
_alpha = 75;
}
Symbol 20 MovieClip [playertrail] Frame 1
_alpha = 50;
onEnterFrame = function () {
gotoAndStop(shield);
_alpha = (_alpha - 15);
if (_alpha < 0) {
this.removeMovieClip();
}
};
Instance of Symbol 16 MovieClip in Symbol 20 MovieClip [playertrail] Frame 2
onClipEvent (load) {
_alpha = 75;
}
Symbol 21 MovieClip [wandertrail] Frame 1
_alpha = 75;
onEnterFrame = function () {
_alpha = (_alpha - 15);
if (_alpha < 0) {
this.removeMovieClip();
}
};
Symbol 26 MovieClip [shottrail] Frame 1
_alpha = 50;
gotoAndStop(this.stopp);
onEnterFrame = function () {
_alpha = (_alpha - 20);
if (_alpha < 0) {
this.removeMovieClip();
}
};
Symbol 29 MovieClip [splittertrail] Frame 1
_alpha = 75;
onEnterFrame = function () {
_alpha = (_alpha - 15);
if (_alpha < 0) {
this.removeMovieClip();
}
};
Symbol 41 MovieClip [followertrail] Frame 1
onEnterFrame = function () {
_alpha = (_alpha - 15);
if (_alpha < 0) {
this.removeMovieClip();
}
};
Symbol 44 MovieClip Frame 1
onEnterFrame = function () {
if (_xscale > 0) {
_xscale = (_xscale - 5);
_yscale = (_yscale - 5);
}
};
Symbol 47 MovieClip Frame 1
_xscale = 0;
_yscale = 0;
onEnterFrame = function () {
if (_xscale < 100) {
_xscale = (_xscale + 5);
_yscale = (_yscale + 5);
}
};
Symbol 50 MovieClip [twistytrail] Frame 1
onEnterFrame = function () {
_alpha = (_alpha - 15);
if (_alpha < 0) {
this.removeMovieClip();
}
};
Instance of Symbol 98 MovieClip in Symbol 117 MovieClip [powerup] Frame 1
onClipEvent (load) {
gotoAndStop (1);
}
Instance of Symbol 98 MovieClip in Symbol 117 MovieClip [powerup] Frame 5
onClipEvent (load) {
gotoAndStop (2);
}
Instance of Symbol 98 MovieClip in Symbol 117 MovieClip [powerup] Frame 6
onClipEvent (load) {
gotoAndStop (3);
}
Instance of Symbol 98 MovieClip in Symbol 117 MovieClip [powerup] Frame 8
onClipEvent (load) {
gotoAndStop (4);
}
Instance of Symbol 98 MovieClip in Symbol 117 MovieClip [powerup] Frame 9
onClipEvent (load) {
gotoAndStop (2);
}
Instance of Symbol 98 MovieClip in Symbol 117 MovieClip [powerup] Frame 10
onClipEvent (load) {
gotoAndStop (1);
}
Symbol 128 MovieClip Frame 1
onEnterFrame = function () {
if (_xscale > 0) {
_xscale = (_xscale - 5);
_yscale = (_yscale - 5);
}
};
Symbol 131 MovieClip Frame 1
_xscale = 0;
_yscale = 0;
onEnterFrame = function () {
if (_xscale < 100) {
_xscale = (_xscale + 5);
_yscale = (_yscale + 5);
}
};
Symbol 137 MovieClip [shootertrail] Frame 1
onEnterFrame = function () {
_alpha = (_alpha - 15);
if (_alpha < 0) {
this.removeMovieClip();
}
};
stop();
Symbol 137 MovieClip [shootertrail] Frame 2
stop();
Symbol 139 Button
on (release) {
getURL ("http://www.armorgames.com", "blank");
}
Symbol 154 MovieClip Frame 1
gotoAndStop (2);
Symbol 154 MovieClip Frame 2
sound = true;
timer = 5;
onEnterFrame = function () {
timer--;
if ((Key.isDown(32) && (!sound)) && (timer < 0)) {
gotoAndStop (2);
timer = 5;
sound = true;
}
if ((Key.isDown(32) && (sound)) && (timer < 0)) {
stopAllSounds();
gotoAndStop (3);
timer = 5;
sound = false;
}
};
Symbol 156 Button
on (release) {
getURL ("http://www.armorgames.com", "blank");
}
Symbol 161 MovieClip Frame 81
Instance of Symbol 170 MovieClip in Symbol 171 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
onClipEvent (enterFrame) {
if (_alpha < 100) {
_alpha = (_alpha + 5);
}
}
Symbol 171 MovieClip Frame 31
stop();
Symbol 181 MovieClip Frame 15
stop();
Symbol 181 MovieClip Frame 39
stop();
Symbol 182 MovieClip Frame 15
stop();
Symbol 182 MovieClip Frame 38
stop();
Symbol 183 MovieClip Frame 15
stop();
Symbol 183 MovieClip Frame 39
stop();
Symbol 184 MovieClip Frame 15
stop();
Symbol 184 MovieClip Frame 39
stop();
Instance of Symbol 171 MovieClip in Symbol 185 MovieClip Frame 55
onClipEvent (enterFrame) {
if (_root.hit) {
_alpha = (_alpha - 5);
}
}
Symbol 185 MovieClip Frame 85
stop();
Instance of Symbol 181 MovieClip in Symbol 185 MovieClip Frame 85
onClipEvent (load) {
interval = 1;
hit = false;
}
onClipEvent (enterFrame) {
if (!hit) {
this.gotoAndStop(interval);
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (interval < 5) {
if (this.interval == 4) {
_root.soundb();
}
interval++;
}
} else if (interval > 2) {
interval--;
}
if (_root.hit) {
hit = true;
this.gotoAndPlay(21);
}
onMouseDown = function () {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
hit = true;
_root.hit = true;
this.gotoAndPlay(6);
_root.credits = true;
}
};
}
}
Instance of Symbol 182 MovieClip in Symbol 185 MovieClip Frame 85
onClipEvent (load) {
interval = 1;
hit = false;
}
onClipEvent (enterFrame) {
if (!hit) {
this.gotoAndStop(interval);
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (interval < 5) {
if (this.interval == 4) {
_root.soundb();
}
interval++;
}
} else if (interval > 2) {
interval--;
}
if (_root.hit) {
hit = true;
this.gotoAndPlay(21);
}
onMouseDown = function () {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
hit = true;
_root.hit = true;
this.gotoAndPlay(6);
_root.instructions = true;
}
};
}
}
Instance of Symbol 183 MovieClip in Symbol 185 MovieClip Frame 85
onClipEvent (load) {
interval = 1;
hit = false;
}
onClipEvent (enterFrame) {
if (!hit) {
this.gotoAndStop(interval);
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (interval < 5) {
if (this.interval == 4) {
_root.soundb();
}
interval++;
}
} else if (interval > 2) {
interval--;
}
if (_root.hit) {
hit = true;
this.gotoAndPlay(21);
}
onMouseDown = function () {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
hit = true;
_root.hit = true;
this.gotoAndPlay(6);
_root.highscore = true;
}
};
}
}
Instance of Symbol 184 MovieClip in Symbol 185 MovieClip Frame 85
onClipEvent (load) {
interval = 1;
hit = false;
}
onClipEvent (enterFrame) {
if (!hit) {
this.gotoAndStop(interval);
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (interval < 5) {
if (this.interval == 4) {
_root.soundb();
}
interval++;
}
} else if (interval > 2) {
interval--;
}
if (_root.hit) {
hit = true;
this.gotoAndPlay(21);
}
onMouseDown = function () {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
hit = true;
_root.hit = true;
this.gotoAndPlay(6);
_root.bar.timerdown = true;
}
};
}
}
Symbol 206 MovieClip Frame 40
stop();
Symbol 207 MovieClip Frame 40
stop();
Symbol 207 MovieClip Frame 77
stop();
Symbol 209 MovieClip Frame 19
stop();
Symbol 209 MovieClip Frame 100
stop();
Instance of Symbol 207 MovieClip in Symbol 210 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!hit) {
if (_root.hit) {
this.gotoAndPlay(41);
hit = true;
}
}
}
Instance of Symbol 209 MovieClip in Symbol 210 MovieClip Frame 1
onClipEvent (enterFrame) {
if (!hit) {
if (_root.hit) {
this.gotoAndPlay(20);
hit = true;
}
}
}
Symbol 211 MovieClip Frame 1
timerf = 5;
onEnterFrame = function () {
timerf--;
if (timerf < 0) {
if (_alpha > 0) {
_alpha = (_alpha - 3);
}
}
};
Symbol 221 MovieClip Frame 1
interval = 1;
hit = false;
onEnterFrame = function () {
if (!hit) {
this.gotoAndStop(interval);
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
if (interval < 5) {
if (this.interval == 4) {
_root.soundb();
}
interval++;
}
} else if (interval > 2) {
interval--;
}
if (_root.hit) {
hit = true;
}
onMouseDown = function () {
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
hit = true;
_root.bar.timerc = 70;
_root.bar.timerd = 70;
_root.credits = false;
_root.instructions = false;
_root.highscore = false;
_root.bar.timerdown = false;
_root.hit = false;
_root.done = false;
_root.resetGame();
}
};
}
};
Instance of Symbol 237 MovieClip in Symbol 238 MovieClip Frame 1
onClipEvent (load) {
place = _x;
_x = 1000;
offset = 12;
}
onClipEvent (enterFrame) {
distance = place - _x;
offset--;
if ((distance < -4) && (offset < 0)) {
_x = (_x + (distance / 5));
}
}
Instance of Symbol 98 MovieClip in Symbol 238 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
}
Instance of Symbol 98 MovieClip in Symbol 238 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (2);
}
Instance of Symbol 98 MovieClip in Symbol 238 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (4);
}
Instance of Symbol 98 MovieClip in Symbol 238 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (3);
}
Instance of Symbol 98 MovieClip in Symbol 238 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (3);
}
Instance of Symbol 98 MovieClip in Symbol 238 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (2);
}
Instance of Symbol 98 MovieClip in Symbol 238 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
}
Instance of Symbol 98 MovieClip in Symbol 238 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
}
Instance of Symbol 98 MovieClip in Symbol 238 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
}
Instance of Symbol 98 MovieClip in Symbol 238 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
}
Symbol 243 MovieClip Frame 1
_root.bar.timer = 120;
_root.bar.timerb = 10;
_root.bar.timerc = 70;
_root.bar.timerd = 70;
_root.bar.timerdown = false;
_root.playgame = false;
_root.hit = false;
_root.bar.gotoAndStop(2);
_alpha = 100;
onEnterFrame = function () {
timer--;
if (timer == 0) {
_root.menuu = true;
_root.finishedpre = true;
_root.bar.gotoAndStop(3);
_root.playgame = false;
}
if (timerdown) {
timerd--;
if (timerd < 0) {
_root.playgame = true;
_root.menuu = false;
}
trace(_root.menuu);
}
if ((!_root.menuu) && (_root.playgame)) {
_root.resetGame();
_root.gotoAndStop(4);
}
if (_root.done) {
timerc--;
if (timerc < 0) {
_root.bar.gotoAndStop(7);
}
}
if (((_root.menuu && (!_root.credits)) && (!_root.highscore)) && (!_root.instructions)) {
_root.bar.gotoAndStop(3);
} else if (_root.credits) {
timerc--;
if (timerc < 0) {
_root.bar.gotoAndStop(4);
}
} else if (_root.highscore) {
timerc--;
if (timerc < 0) {
_root.bar.gotoAndStop(5);
}
} else if (_root.instructions) {
timerc--;
if (timerc < 0) {
_root.bar.gotoAndStop(6);
}
}
};
Symbol 243 MovieClip Frame 3
_root.startGame();
Instance of Symbol 214 MovieClip in Symbol 243 MovieClip Frame 4
onClipEvent (load) {
place = _x;
_x = 1000;
offset = 5;
}
onClipEvent (enterFrame) {
distance = place - _x;
offset--;
if ((distance < -4) && (offset < 0)) {
_x = (_x + (distance / 5));
}
}
Instance of Symbol 217 MovieClip in Symbol 243 MovieClip Frame 4
onClipEvent (load) {
place = _x;
_x = 1000;
offset = 8;
}
onClipEvent (enterFrame) {
distance = place - _x;
offset--;
if ((distance < -4) && (offset < 0)) {
_x = (_x + (distance / 5));
}
}
Instance of Symbol 218 MovieClip in Symbol 243 MovieClip Frame 4
onClipEvent (load) {
place = _x;
_x = 1000;
offset = 10;
}
onClipEvent (enterFrame) {
distance = place - _x;
offset--;
if ((distance < -4) && (offset < 0)) {
_x = (_x + (distance / 5));
}
}
Instance of Symbol 221 MovieClip in Symbol 243 MovieClip Frame 4
onClipEvent (load) {
place = _x;
_x = 1000;
offset = 3;
}
onClipEvent (enterFrame) {
distance = place - _x;
offset--;
if ((distance < -4) && (offset < 0)) {
_x = (_x + (distance / 5));
}
}
Instance of Symbol 228 MovieClip in Symbol 243 MovieClip Frame 5
onClipEvent (load) {
place = _x;
_x = 1000;
offset = 8;
}
onClipEvent (enterFrame) {
distance = place - _x;
offset--;
if ((distance < -4) && (offset < 0)) {
_x = (_x + (distance / 5));
}
}
Instance of Symbol 231 MovieClip in Symbol 243 MovieClip Frame 5
onClipEvent (load) {
place = _x;
_x = 1000;
offset = 5;
}
onClipEvent (enterFrame) {
distance = place - _x;
offset--;
if ((distance < -4) && (offset < 0)) {
_x = (_x + (distance / 5));
}
}
Instance of Symbol 234 MovieClip in Symbol 243 MovieClip Frame 6
onClipEvent (load) {
place = _x;
_x = 1000;
offset = 5;
}
onClipEvent (enterFrame) {
distance = place - _x;
offset--;
if ((distance < -4) && (offset < 0)) {
_x = (_x + (distance / 5));
}
}
Instance of Symbol 236 MovieClip in Symbol 243 MovieClip Frame 6
onClipEvent (load) {
place = _x;
_x = 1000;
offset = 8;
}
onClipEvent (enterFrame) {
distance = place - _x;
offset--;
if ((distance < -4) && (offset < 0)) {
_x = (_x + (distance / 5));
}
}
Instance of Symbol 238 MovieClip in Symbol 243 MovieClip Frame 6
onClipEvent (load) {
place = _x;
_x = 1000;
offset = 8;
}
onClipEvent (enterFrame) {
distance = place - _x;
offset--;
if ((distance < -4) && (offset < 0)) {
_x = (_x + (distance / 5));
}
}
Symbol 244 Button
on (press) {
if (_root.shottimer < 0) {
_root.shotNumb = 3;
_root.shotSpread = 15;
}
if (_root.timer < 0) {
_root.shoot();
_root.timer = 3;
}
_root.sounda(50);
}