Frame 4
if (_root.Music.getBytesTotal() != undefined) {
loaded = _root.getBytesLoaded() + _root.Music.getBytesLoaded();
total = _root.getBytesTotal() + _root.Music.getBytesTotal();
} else {
loaded = _root.getBytesLoaded();
total = _root.getBytesTotal();
}
if (loaded < total) {
_root.txloaded.text = Math.round((100 * loaded) / total) + "%";
gotoAndPlay ("Loading");
} else {
gotoAndPlay ("Settings");
}
Frame 6
_global.screen = new Object();
_global.screen._width = 600;
_global.screen._height = 400;
_global.quality = "HIGH";
_global.objects = new Object();
_global.objects.types = 9;
_global.objects.frequency = 50;
_global.objects.mindist = 100;
_global.enemies = new Object();
_global.enemies.mindist = 100;
_global.enemies.frequency = 10;
_global.enemies.types = 7;
_global.scape = new Object();
_global.scape.frequence = 100;
_global.scape.height = 280;
_global.scape.elements = 1;
_global.guns = new Object();
_global.guns.maxlevel = 99;
_global.settings = new Object();
_global.settings.sound = true;
_global.settings.jump = -13;
_global.settings.movefront = 3;
_global.settings.moveback = 5;
_global.settings.maxlife = 5;
_global.settings.levelcount = 8;
_global.settings.sound = true;
_global.settings.music = true;
_global.settings.quality = "HIGH";
_global.settings.cooldown = 6.2;
_global.settings.bosspos = 100;
_root.createEmptyMovieClip("music", 0);
_root.music.createEmptyMovieClip("normal", 0);
_root.music.createEmptyMovieClip("rage", 1);
_root.Rage = new Sound(_root.music.rage);
_root.Rage.attachSound("Rage");
_root.Rage.stop("Rage");
_root.Music = new Sound(_root.music.normal);
_root.Music.attachSound("Music");
_root.Music.start(0, 999);
_root.checkName = function (n) {
var _local2 = String(n);
if (_local2.length < 3) {
return(false);
}
var _local3 = true;
i = 0;
while (i < _local2.length) {
var _local1 = _local2.charCodeAt(i);
if (((_local1 < 32) || (_local1 > 126)) || (((((_local1 == 63) || (_local1 == 96)) || (_local1 == 38)) || (_local1 == 44)) || (_local1 == 39))) {
return(false);
}
if (_local1 != 32) {
_local3 = false;
}
i++;
}
return(!_local3);
};
_root.chkQ = function (a) {
var _local2 = 0;
while (a > 0) {
_local2 = _local2 + (a % 10);
a = Math.floor(a / 10);
}
return(_local2);
};
_root.chkW = function (a, b) {
var _local2 = 0;
while (a > 0) {
_local2 = _local2 + ((a % 10) * b);
a = Math.floor(a / 10);
b--;
}
_local2 = ((_local2 < 0) ? (-_local2) : (_local2));
return(_local2);
};
_root.chkName = function (name) {
a = 0;
s = new String(name);
i = 0;
while (i < s.length) {
a = a + ((s.charCodeAt(i) % (i + 1)) + 7);
i++;
}
return(a);
};
Instance of Symbol 132 MovieClip in Frame 7
onClipEvent (load) {
if (!settings.music) {
this.gotoAndStop(2);
}
}
Instance of Symbol 140 MovieClip in Frame 7
onClipEvent (load) {
if (settings.quality == "LOW") {
this.gotoAndStop(3);
} else if (settings.quality == "MEDIUM") {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 145 MovieClip in Frame 7
onClipEvent (load) {
if (!settings.sound) {
this.gotoAndStop(2);
}
}
Frame 8
stop();
Frame 11
_root._quality = settings.quality;
_root.createEmptyMovieClip("script", 1);
_root.createEmptyMovieClip("data", 2);
_root.createEmptyMovieClip("graphic", 3);
_root.createEmptyMovieClip("mask", 4);
_root.createEmptyMovieClip("sound", 5);
_root.graphic._visible = false;
_root.sound.collect = new Sound();
_root.sound.collect.attachSound("sndCollect");
_root.sound.powerup = new Sound();
_root.sound.powerup.attachSound("sndPowerup");
_root.sound.explode = new Sound();
_root.sound.explode.attachSound("sndExplode");
_root.sound.powerup = new Sound();
_root.sound.powerup.attachSound("sndPowerup");
_root.sound.levelup = new Sound();
_root.sound.levelup.attachSound("sndLevelup");
_root.sound.gun = new Sound();
_root.sound.gun.attachSound("sndGun");
_root.sound.burst = new Sound();
_root.sound.burst.attachSound("sndBurst");
_root.sound.clank1 = new Sound();
_root.sound.clank1.attachSound("sndClank1");
_root.sound.clank2 = new Sound();
_root.sound.clank2.attachSound("sndClank2");
_root.sound.clank3 = new Sound();
_root.sound.clank3.attachSound("sndClank3");
_root.sound.play = function (name) {
if (!settings.sound) {
return(undefined);
}
_root.sound[name].start();
};
_root.mask.beginFill(0, 100);
_root.mask.lineStyle(0, 0, 100);
_root.mask.moveTo(0, 0);
_root.mask.lineTo(screen._width, 0);
_root.mask.lineTo(screen._width, screen._height);
_root.mask.lineTo(0, screen._height);
_root.mask.lineTo(0, 0);
_root.mask.endFill();
_root.graphic.setMask(_root.mask);
_root.data.game = new Object();
_root.data.game.score = 0;
_root.data.game.total = 0;
_root.data.game.stop = true;
_root.data.game.pause = false;
_root.data.game.frequency = 15;
_root.data.game.objcount = 1;
_root.data.game.enemies = [];
_root.data.game.stats = new Object();
_root.data.game.stats.killed = 0;
_root.data.game.stats.bullets = 0;
_root.data.game.stats.distance = 0;
_root.data.game.stats.hits = 0;
_root.data.game.stats.enemies = 0;
_root.data.game.level = 1;
_root.data.game.levelfactor = 1;
_root.data.game.distance = 0;
if ((_root.data.game.level % 9) == 0) {
_root.data.game.togo = 3000;
} else {
_root.data.game.togo = 3000 + (_root.data.game.level * 350);
}
_global.debug = false;
if (_global.debug) {
_root.data.game.level = 19;
_root.data.game.togo = 100;
}
_root.data.game.powerups = new Object();
_root.data.game.powerups.gun = new Object();
_root.data.game.powerups.gun.level = 1;
_root.data.game.powerups.gun.points = 0;
_root.data.game.powerups.life = new Object();
_root.data.game.powerups.life.level = 1;
_root.data.game.powerups.life.points = 0;
_root.data.game.powerups.life.max = 3;
_root.data.player = new Object();
_root.data.player.xspeed = 4;
_root.data.player.yspeed = 0;
_root.data.player._x = 140;
_root.data.player._y = 140;
_root.data.player.jump = 0;
_root.data.player.force = (_root.data.game.powerups.gun.level * 0.25) + 0.75;
_root.data.player.impact = new Object();
_root.data.player.impact._x = 0;
_root.data.player.impact._y = 0;
_root.data.player.life = 3;
_root.data.player.maxlife = 3;
_root.data.player.invincible = 0;
_root.data.player.rage = 0;
_root.data.player.fire = false;
_root.data.player.delay = 0;
_root.data.player.cooldown = settings.cooldown;
_root.data.player.secondshot = 0;
_root.data.player.hit = function () {
if (_root.data.player.invincible == 0) {
_root.data.player.life--;
_root.data.player.invincible = 48;
_root.script.addStaticEffect("ShortFlash", 0, 0);
}
};
_root.data.player.getSpeed = function () {
var _local2 = 4 + Math.floor(_root.data.game.level / 8);
_local2 = ((_local2 > 10) ? 10 : (_local2));
return(_local2);
};
_root.data.enemies = [];
_root.data.enedist = 0;
_root.data.objects = [];
_root.data.objdist = 0;
_root.data.eledist = 0;
_root.data.level = [];
_root.data.level[0] = new Object();
_root.data.level[0]._x = 0;
_root.data.level[0]._y = scape.height + ((Math.random() * 100) - 50);
i = 1;
while (i < 26) {
_root.data.level[i] = new Object();
_root.data.level[i]._x = (i * scape.frequence) + (Math.random() * 50);
_root.data.level[i]._y = scape.height + ((Math.random() * 100) - 50);
i++;
}
_root.data.background = [];
_root.data.background[0] = new Object();
_root.data.background[0]._x = 0;
_root.data.background[0]._y = (scape.height / 2) + ((Math.random() * 60) - 30);
i = 1;
while (i < 20) {
_root.data.background[i] = new Object();
_root.data.background[i]._x = (i * scape.frequence) + (Math.random() * 50);
_root.data.background[i]._y = (scape.height / 2) + ((Math.random() * 60) - 30);
i++;
}
_root.graphic._x = (_root.graphic._y = 0);
_root.graphic.createEmptyMovieClip("backscape", 0);
_root.graphic.attachMovie("background", "background", 1);
_root.graphic.createEmptyMovieClip("scape", 2);
_root.graphic.attachMovie("Player", "player", 3);
_root.graphic.createEmptyMovieClip("enemies", 4);
_root.graphic.createEmptyMovieClip("objects", 5);
_root.graphic.createEmptyMovieClip("particles", 6);
_root.graphic.createEmptyMovieClip("effects", 7);
_root.graphic.createEmptyMovieClip("staticfx", 8);
_root.graphic.attachMovie("Gui", "gui", 9);
_root.graphic.player._xscale = (_root.graphic.player._yscale = 50);
_root.graphic.player._x = _root.data.player._x;
_root.graphic.player._y = _root.data.player._y;
_root.graphic.enemies.count = 0;
_root.graphic.objects.count = 0;
_root.graphic.particles.count = 0;
_root.graphic.effects.count = 0;
_root.graphic.staticfx.count = 0;
_root.graphic.count = 10;
Frame 12
_root.script.clearScreen = function () {
var _local9 = _root.data.enemies.length;
i = 0;
while (i < _local9) {
var _local7 = _root.data.player._x - _root.graphic.enemies[_root.data.enemies[i]]._x;
var _local6 = (_root.data.player._y - 28) - _root.graphic.enemies[_root.data.enemies[i]]._y;
var _local3 = "B" + _root.graphic.effects.count;
_root.graphic.effects.attachMovie("Spitfire", _local3, _root.graphic.effects.count);
var _local5 = Math.atan2(_local6, _local7) + Math.PI;
_root.graphic.effects[_local3]._x = _root.data.player._x + (Math.sin(_local5) * 35);
_root.graphic.effects[_local3]._y = (_root.data.player._y - 28) + (Math.cos(_local5) * 35);
_root.graphic.effects.count++;
_local3 = "B" + _root.graphic.effects.count;
_root.graphic.effects.attachMovie("Bullet", _local3, _root.graphic.effects.count);
_root.graphic.effects.count++;
var _local8 = _local5 * 57.2957795130823;
_root.graphic.effects[_local3]._x = _root.data.player._x;
_root.graphic.effects[_local3]._y = _root.data.player._y - 28;
_root.graphic.effects[_local3]._rotation = _local8;
_root.graphic.effects[_local3].TTL = 20;
_root.graphic.effects[_local3].onEnterFrame = function () {
this.TTL--;
this._alpha = this._alpha / 1.025;
if (this.TTL <= 0) {
this.removeMovieClip();
}
};
var _local4 = Math.floor(Math.sqrt((_local7 * _local7) + (_local6 * _local6)) / 4);
_local4 = ((_local4 > 100) ? 100 : (_local4));
_root.graphic.effects[_local3].gotoAndStop(_local4);
_root.script.addParticle("Bullet", x, y);
_root.script.addEffect("Hit", _root.graphic.enemies[_root.data.enemies[i]]._x, _root.graphic.enemies[_root.data.enemies[i]]._y - (_root.graphic.enemies[_root.data.enemies[i]]._height / 2));
if ((!_root.graphic.enemies[_root.data.enemies[i]].dead) && (_root.graphic.enemies[_root.data.enemies[i]].type != 9)) {
_root.graphic.enemies[_root.data.enemies[i]].animation.hp = 0;
_root.graphic.enemies[_root.data.enemies[i]].animation.hit();
}
i++;
}
};
_root.script.EnemySort = function (a, b) {
if (_root.graphic.enemies[a]._x <= _root.graphic.enemies[b]._x) {
return(-1);
}
return(1);
};
_root.script.ScapeHit = function (name, angle) {
var _local14 = false;
angle = ((angle < 0) ? (360 + angle) : (angle));
angle = (angle / 180) * Math.PI;
var _local12 = _root.script.findNode(_root.data.player._x);
var _local11 = _root.script.findNode(_root.data.player._x + 500);
var _local4 = Math.tan(angle);
var _local8 = _root.graphic.effects[name]._x;
var _local7 = _root.graphic.effects[name]._y;
i = _local12;
while (i < _local11) {
var _local2 = (_root.data.level[i]._y - _root.data.level[i + 1]._y) / (_root.data.level[i]._x - _root.data.level[i + 1]._x);
var _local6 = _root.data.level[i]._x;
var _local5 = _root.data.level[i]._y;
x = (((((-_local2) * _local6) + _local5) + (_local4 * _local8)) - _local7) / (_local4 - _local2);
y = (_local4 * (x - _local8)) + _local7;
if ((((x > _root.data.level[i]._x) && (x < _root.data.level[i + 1]._x)) && (((y > _root.data.level[i]._y) && (y < _root.data.level[i + 1]._y)) || ((y < _root.data.level[i]._y) && (y > _root.data.level[i + 1]._y)))) && (x > _root.graphic.effects[name]._x)) {
var _local10 = _root.graphic.effects[name]._x - x;
var _local9 = _root.graphic.effects[name]._y - y;
_root.data.player.impact._x = x;
_root.data.player.impact._y = y;
break;
}
i++;
}
_root.graphic.effects.count++;
};
_root.script.EnemyHit = function (name, angle) {
angle = ((angle / 180) * Math.PI) + Math.PI;
if (_root.data.player.impact._x != 0) {
var _local3 = _root.data.player.impact._x - _root.graphic.effects[name]._x;
var _local2 = _root.data.player.impact._y - _root.graphic.effects[name]._y;
var _local7 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
} else {
var _local7 = -1;
}
var _local9 = _root.data.enemies.length;
i = 0;
while (i < _local9) {
if (root.graphic.enemies[_root.data.enemies[i]].type != 32) {
var _local3 = _root.graphic.enemies[_root.data.enemies[i]]._x - _root.graphic.effects[name]._x;
var _local2 = (_root.graphic.enemies[_root.data.enemies[i]]._y - ((_root.graphic.enemies[_root.data.enemies[i]]._height * 8) / 10)) - _root.graphic.effects[name]._y;
var _local6 = Math.atan2(_local2, _local3) * 57.2957795130823;
_local6 = ((_local6 / 180) * Math.PI) + Math.PI;
_local2 = _root.graphic.enemies[_root.data.enemies[i]]._y - _root.graphic.effects[name]._y;
var _local4 = Math.atan2(_local2, _local3) * 57.2957795130823;
_local4 = ((_local4 / 180) * Math.PI) + Math.PI;
if (_root.graphic.enemies[_root.data.enemies[i]].type == 9) {
_local4 = _local4 + 0.174532925199433;
}
if ((((angle >= _local6) && (angle <= _local4)) && ((((_local3 * _local3) + (_local2 * _local2)) <= (_local7 * _local7)) || (_local7 == -1))) && (_root.graphic.enemies[_root.data.enemies[i]]._x >= _root.data.player._x)) {
temp = _root.graphic.player.Guns._rotation;
temp = ((temp < 0) ? (360 + temp) : (temp));
temp = (temp / 180) * Math.PI;
var _local7 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
x = _root.graphic.effects[name]._x + (_local7 * Math.cos(temp));
y = _root.graphic.effects[name]._y + (_local7 * Math.sin(temp));
_root.data.player.impact._x = x;
_root.data.player.impact._y = y;
_root.graphic.enemies[_root.data.enemies[i]].animation.hit();
if (_root.data.player.rage == 0) {
_root.data.game.stats.hits++;
}
return(true);
}
}
i++;
}
return(false);
};
_root.script.drawLevel = function () {
_root.graphic.scape.clear();
_root.graphic.backscape.clear();
var _local2 = _root.data.background.length;
if (_root.data.player.rage > 0) {
var _local10 = [16711680, 160432128];
var _local8 = [100, 100];
var _local11 = [0, 255];
var _local9 = {matrixType:"box", x:100, y:100, w:200, h:200, r:(Math.PI/2)};
_root.graphic.backscape.beginGradientFill("linear", _local10, _local8, _local11, _local9);
_root.graphic.backscape.lineStyle(1, 0, 0);
_root.graphic.backscape.moveTo(0, 0);
_root.graphic.backscape.lineTo(screen._width, 0);
_root.graphic.backscape.lineTo(screen._width, screen._height);
_root.graphic.backscape.lineTo(0, screen._height);
_root.graphic.backscape.lineTo(0, 0);
_root.graphic.backscape.endFill();
var _local7 = new Color(_root.graphic.enemies);
_local7.setRGB(16777215);
_local7 = new Color(_root.graphic.player);
_local7.setRGB(16777215);
_local7 = new Color(_root.graphic.scape);
_local7.setRGB(16777215);
_local7 = new Color(_root.graphic.particles);
_local7.setRGB(16777215);
_local7 = new Color(_root.graphic.objects);
_local7.setRGB(16777215);
if (_root.data.player.rage == 1) {
_root.Music.setVolume(100);
_root.Rage.stop();
_root.graphic.background._visible = true;
_root.graphic.gui._visible = true;
_root.script.addStaticEffect("Flash", 0, 0);
_local7 = new Color(_root.graphic.enemies);
_local7.setRGB(0);
_local7 = new Color(_root.graphic.player);
_local7.setRGB(0);
_local7 = new Color(_root.graphic.scape);
_local7.setRGB(0);
_local7 = new Color(_root.graphic.particles);
_local7.setRGB(0);
_local7 = new Color(_root.graphic.objects);
_local7.setRGB(0);
}
} else {
var _local10 = [15109888, 268431360];
var _local8 = [100, 100];
var _local11 = [0, 255];
var _local9 = {matrixType:"box", x:100, y:100, w:200, h:200, r:(Math.PI/2)};
_root.graphic.backscape.beginGradientFill("linear", _local10, _local8, _local11, _local9);
_root.graphic.backscape.lineStyle(1, 0, 0);
_root.graphic.backscape.moveTo(_root.data.background[0]._x, _root.data.background[0]._y);
i = 1;
while (i < _local2) {
var _local4 = _root.data.background[i]._x;
var _local3 = _root.data.background[i]._y;
_root.graphic.backscape.lineTo(_local4, _local3);
if (_local4 > screen._width) {
_local2 = i + 1;
break;
}
i++;
}
_root.graphic.backscape.lineTo(_root.data.background[_local2 - 1]._x, _root.data.background[_local2 - 1]._y);
_root.graphic.backscape.lineTo(screen._width, screen._height);
_root.graphic.backscape.lineTo(0, screen._height);
_root.graphic.backscape.endFill();
}
_local2 = _root.data.level.length - 1;
var _local5 = _root.script.findNode(0);
var _local6 = _root.script.findNode(screen._width) + 2;
_local5 = ((_local5 < 0) ? 0 : (_local5));
_local6 = ((_local6 > _local2) ? (_local2) : (_local6));
_root.graphic.scape.beginFill(0, 100);
_root.graphic.scape.lineStyle(1, 0, 100);
_root.graphic.scape.moveTo(_root.data.level[_local5]._x, _root.data.level[_local5]._y);
i = _local5 + 1;
while (i < (_local6 - 1)) {
var _local4 = _root.data.level[i]._x;
var _local3 = _root.data.level[i]._y;
_root.graphic.scape.lineTo(_local4, _local3);
i++;
}
_root.graphic.scape.lineTo(screen._width, _root.script.getY(screen._width));
_root.graphic.scape.lineTo(screen._width, screen._height);
_root.graphic.scape.lineTo(0, screen._height);
_root.graphic.scape.endFill();
};
_root.script.scroll = function (amount) {
var _local5 = _root.data.level.length;
i = 0;
while (i < _local5) {
_root.data.level[i]._x = _root.data.level[i]._x + amount;
if ((_root.data.level[i]._x < 0) && (_root.data.level[i + 1]._x < 0)) {
_root.data.level.shift();
_local5--;
_root.data.level[_local5] = new Object();
_root.data.level[_local5]._x = (_root.data.level[_local5 - 1]._x + scape.frequence) + (Math.random() * 50);
_root.data.level[_local5]._y = scape.height + ((Math.random() * 100) - 50);
}
i++;
}
_local5 = _root.data.background.length;
i = 0;
while (i < _local5) {
_root.data.background[i]._x = _root.data.background[i]._x + (amount / 2);
if ((_root.data.background[i]._x < 0) && (_root.data.background[i + 1]._x < 0)) {
_root.data.background.shift();
_local5--;
_root.data.background[_local5] = new Object();
_root.data.background[_local5]._x = (_root.data.background[_local5 - 1]._x + scape.frequence) + (Math.random() * 50);
_root.data.background[_local5]._y = (scape.height / 2) + ((Math.random() * 100) - 50);
}
i++;
}
_local5 = _root.data.objects.length;
i = 0;
while (i < _local5) {
if (_root.graphic.objects[_root.data.objects[i]]._x < -50) {
_root.graphic.objects[_root.data.objects[i]].removeMovieClip();
_root.data.objects.splice(i, 1);
i--;
_local5--;
} else {
_root.graphic.objects[_root.data.objects[i]]._x = _root.graphic.objects[_root.data.objects[i]]._x + amount;
var _local4 = _root.data.player._x - _root.graphic.objects[_root.data.objects[i]]._x;
var _local3 = _root.data.player._y - _root.graphic.objects[_root.data.objects[i]]._y;
if (((_local4 * _local4) + (_local3 * _local3)) < (_root.graphic.objects[_root.data.objects[i]]._height * _root.graphic.objects[_root.data.objects[i]]._width)) {
_root.graphic.objects[_root.data.objects[i]].animation.hit();
}
}
i++;
}
for (i in _root.graphic.particles) {
_root.graphic.particles[i]._x = _root.graphic.particles[i]._x + (_root.graphic.particles[i].xspeed + amount);
_root.graphic.particles[i]._y = _root.graphic.particles[i]._y + _root.graphic.particles[i].yspeed;
if (_root.graphic.particles[i]._y > 400) {
_root.graphic.particles[i].removeMovieClip();
} else {
_root.graphic.particles[i].yspeed++;
_root.graphic.particles[i]._rotation = _root.graphic.particles[i]._rotation + _root.graphic.particles[i].rotate;
}
}
for (i in _root.graphic.effects) {
_root.graphic.effects[i]._x = _root.graphic.effects[i]._x + amount;
if (_root.graphic.effects[i]._x < (-_root.graphic.effects[i]._width)) {
_root.graphic.effects[i].removeMovieClip();
}
}
_local5 = _root.data.enemies.length;
i = 0;
while (i < _local5) {
if (((_root.graphic.enemies[_root.data.enemies[i]]._x < -50) || (_root.graphic.enemies[_root.data.enemies[i]]._y > (screen._height + 100))) || (_root.graphic.enemies[_root.data.enemies[i]].dead)) {
_root.graphic.enemies[_root.data.enemies[i]].removeMovieClip();
_root.data.enemies.splice(i, 1);
i--;
_local5--;
} else {
_root.script.moveEnemy(i, amount);
}
i++;
}
_root.data.enedist = _root.data.enedist - amount;
if ((_root.data.enedist >= enemies.mindist) && ((Math.random() * 100) <= enemies.frequency)) {
_root.script.addEnemy();
}
_root.data.objdist = _root.data.objdist - amount;
if ((_root.data.objdist >= objects.mindist) && ((Math.random() * 1000) <= objects.frequency)) {
_root.script.addObjects();
}
};
_root.script.findNode = function (x) {
return(_root.script.findNodeRec(0, _root.data.level.length, x));
};
_root.script.findNodeRec = function (a, b, x) {
var _local2 = Math.floor((a + b) / 2);
if ((_root.data.level[_local2]._x <= x) && (_root.data.level[_local2 + 1]._x >= x)) {
return(_local2);
}
if (a == (b - 1)) {
return(_local2);
}
if (_root.data.level[_local2]._x <= x) {
return(_root.script.findNodeRec(_local2, b, x));
}
return(_root.script.findNodeRec(a, _local2, x));
};
_root.script.getY = function (x) {
var _local2 = _root.script.findNode(x);
var _local3 = _root.data.level[_local2]._y - _root.data.level[_local2 + 1]._y;
var _local4 = _root.data.level[_local2]._x - _root.data.level[_local2 + 1]._x;
return(_root.data.level[_local2]._y + ((_local3 / _local4) * (x - _root.data.level[_local2]._x)));
};
_root.script.getM = function (x) {
var _local2 = _root.script.findNode(x);
var _local3 = _root.data.level[_local2]._y - _root.data.level[_local2 + 1]._y;
var _local4 = _root.data.level[_local2]._x - _root.data.level[_local2 + 1]._x;
return(_local3 / _local4);
};
Frame 13
_root.script.addMessage = function (text, x, y) {
var _local2 = "E" + _root.graphic.particles.count;
_root.graphic.particles.attachMovie("Message", _local2, _root.graphic.particles.count);
_root.graphic.particles[_local2]._x = x;
_root.graphic.particles[_local2]._y = y;
_root.graphic.particles[_local2].animation.Out.text = text;
_root.graphic.particles.count++;
};
_root.script.addObjects = function (type, x, y) {
if (x == undefined) {
x = screen._width + 50;
var _local5 = _root.script.getY(x);
var _local4 = _local5 - 140;
} else {
var _local4 = y;
var _local5 = _local4;
}
if (type == undefined) {
if ((Math.random() * 10) <= 8.5) {
type = Math.ceil(Math.random() * 4);
type = (((_root.data.game.level < 6) && (type > 2)) ? 2 : (type));
type = (((_root.data.game.level < 3) && (type > 1)) ? 1 : (type));
} else if (((_root.data.game.powerups.gun.level < guns.maxlevel) && (_root.data.game.powerups.gun.level < (_root.data.game.level - 2))) && ((Math.random() * 10) < 4)) {
type = 5;
} else {
type = Math.ceil(Math.random() * (objects.types - 4)) + 4;
}
}
switch (type) {
case 8 :
if ((Math.random() * 10) <= 3) {
_root.script.createObject(8, x, _local4);
_root.data.objdist = -100;
break;
}
case 7 :
if ((Math.random() * 10) <= 4) {
_root.script.createObject(7, x, _local4);
_root.data.objdist = -100;
} else if ((Math.random() * 10) <= 5) {
_root.script.createObject(9, x, _local4);
_root.data.objdist = -100;
} else {
type = Math.floor(Math.random() * 5);
if (_root.data.game.powerups.gun.level < guns.maxlevel) {
_root.script.createObject(5, x, _local4);
_root.data.objdist = -100;
} else {
_root.script.createObject(6, x, _local4);
_root.data.objdist = -100;
break;
if (type > 4) {
type = Math.ceil(Math.random() * 4);
type = ((_root.data.game.level < 3) ? 1 : (type));
type = ((_root.data.game.level < 5) ? 2 : (type));
}
_root.script.addScoreObjects(type, x);
}
}
case 9 :
if ((Math.random() * 10) <= 5) {
_root.script.createObject(9, x, _local4);
_root.data.objdist = -100;
} else {
type = Math.floor(Math.random() * 5);
if (_root.data.game.powerups.gun.level < guns.maxlevel) {
_root.script.createObject(5, x, _local4);
_root.data.objdist = -100;
} else {
_root.script.createObject(6, x, _local4);
_root.data.objdist = -100;
break;
if (type > 4) {
type = Math.ceil(Math.random() * 4);
type = ((_root.data.game.level < 3) ? 1 : (type));
type = ((_root.data.game.level < 5) ? 2 : (type));
}
_root.script.addScoreObjects(type, x);
}
}
case 5 :
if (_root.data.game.powerups.gun.level < guns.maxlevel) {
_root.script.createObject(5, x, _local4);
_root.data.objdist = -100;
} else {
_root.script.createObject(6, x, _local4);
_root.data.objdist = -100;
break;
if (type > 4) {
type = Math.ceil(Math.random() * 4);
type = ((_root.data.game.level < 3) ? 1 : (type));
type = ((_root.data.game.level < 5) ? 2 : (type));
}
_root.script.addScoreObjects(type, x);
}
case 6 :
_root.script.createObject(6, x, _local4);
_root.data.objdist = -100;
break;
case 1 :
case 2 :
case 3 :
case 4 :
if (type > 4) {
type = Math.ceil(Math.random() * 4);
type = ((_root.data.game.level < 3) ? 1 : (type));
type = ((_root.data.game.level < 5) ? 2 : (type));
}
_root.script.addScoreObjects(type, x);
}
};
_root.script.addScoreObjects = function (type, x) {
var _local3 = 65;
var _local9 = Math.ceil(Math.random() * 4);
if (_local9 == 1) {
_root.script.createObject(type, x, _root.script.getY(x) - 120);
_root.script.createObject(type, x + 25, _root.script.getY(x) - 120);
_root.data.objdist = -_local3;
} else if (_local9 == 2) {
var _local6 = Math.ceil(Math.random() * 5) * 2;
i = 0;
while (i < _local6) {
_root.script.createObject(type, x + (i * _local3), _root.script.getY(x + (i * _local3)));
i++;
}
_root.data.objdist = (-_local6) * _local3;
} else if (_local9 == 3) {
var _local8 = _root.script.getY(x) - 100;
var _local7 = Array(0, 6, 9, 9, 6, 0);
i = 0;
while (i < 6) {
_root.script.createObject(type, x + (i * (_local3 / 2)), _local8 - _local7[i]);
i++;
}
_root.data.objdist = -6 * _local3;
} else if (_local9 == 4) {
var _local8 = _root.script.getY(x) - 100;
var _local5 = 0;
i = 0;
while (i < 8) {
_root.script.createObject(type, x + (50 * Math.sin((_local5 / 180) * Math.PI)), _local8 + (50 * Math.cos((_local5 / 180) * Math.PI)));
_local5 = _local5 + 45;
i++;
}
_root.data.objdist = -200;
}
if (_root.data.game.level % 9) {
_root.data.objdist = _root.data.objdist - ((Math.random() * 100) + 100);
}
};
_root.script.createObject = function (type, x, y) {
var _local2 = "O" + _root.graphic.objects.count;
_root.graphic.objects.attachMovie("Obj", _local2, _root.graphic.objects.count);
_root.graphic.objects[_local2]._x = x;
_root.graphic.objects[_local2]._y = y;
_root.graphic.objects[_local2].type = type;
_root.graphic.objects[_local2].gotoAndStop(type);
_root.data.objects.push(_local2);
_root.graphic.objects.count++;
};
_root.script.addEffect = function (name, x, y) {
var _local2 = "E" + _root.graphic.effects.count;
_root.graphic.effects.attachMovie(name, _local2, _root.graphic.effects.count);
_root.graphic.effects[_local2]._x = x;
_root.graphic.effects[_local2]._y = y;
_root.graphic.effects.count++;
};
_root.script.addStaticEffect = function (name, x, y) {
var _local2 = "E" + _root.graphic.staticfx.count;
_root.graphic.staticfx.attachMovie(name, _local2, _root.graphic.staticfx.count);
_root.graphic.staticfx[_local2]._x = x;
_root.graphic.staticfx[_local2]._y = y;
_root.graphic.staticfx.count++;
};
_root.script.addParticle = function (name, x, y, xspeed, yspeed) {
var _local2 = "P" + _root.graphic.particles.count;
_root.graphic.particles.attachMovie("Particles", _local2, _root.graphic.particles.count);
_root.graphic.particles[_local2]._x = x;
_root.graphic.particles[_local2]._y = y;
var _local3 = 1;
switch (name) {
case "Trash" :
_local3 = Math.ceil(Math.random() * 6);
if (xspeed == undefined) {
_root.graphic.particles[_local2].xspeed = Math.round((Math.random() * 8) - 4);
_root.graphic.particles[_local2].yspeed = -Math.round((Math.random() * 10) + 1);
} else {
_root.graphic.particles[_local2].xspeed = xspeed;
_root.graphic.particles[_local2].yspeed = yspeed;
}
_root.graphic.particles[_local2].rotate = Math.round((Math.random() * 8) - 4);
_root.graphic.particles[_local2]._rotation = Math.random() * 180;
break;
case "Bullet" :
_local3 = 10;
_root.graphic.particles[_local2].xspeed = -Math.random();
_root.graphic.particles[_local2].yspeed = -4 - (Math.random() * 4);
_root.graphic.particles[_local2].rotate = Math.ceil(Math.random() * 4);
}
_root.graphic.particles[_local2].gotoAndStop(_local3);
_root.graphic.particles.count++;
};
_root.script.moveEnemy = function (i, amount) {
_root.graphic.enemies[_root.data.enemies[i]]._x = _root.graphic.enemies[_root.data.enemies[i]]._x + amount;
var _local9 = _root.data.player._x - graphic.enemies[_root.data.enemies[i]]._x;
var _local3 = _root.data.player._y - graphic.enemies[_root.data.enemies[i]]._y;
if (((_local9 * _local9) + (_local3 * _local3)) < ((_root.graphic.enemies[_root.data.enemies[i]]._height * _root.graphic.enemies[_root.data.enemies[i]]._width) / 4)) {
_root.data.player.hit();
_root.graphic.enemies[_root.data.enemies[i]].animation.gotcha();
}
_root.graphic.enemies[_root.data.enemies[i]]._x = _root.graphic.enemies[_root.data.enemies[i]]._x + _root.graphic.enemies[_root.data.enemies[i]].xspeed;
if (_root.graphic.enemies[_root.data.enemies[i]].dead || (_root.graphic.enemies[_root.data.enemies[i]].animation.dead)) {
} else if (_root.graphic.enemies[_root.data.enemies[i]].type == 9) {
var _local8 = ((_root.data.player._x < 380) ? 380 : (_root.data.player._x));
_local9 = _local8 - (_root.graphic.enemies[_root.data.enemies[i]]._x - 50);
_root.graphic.enemies[_root.data.enemies[i]]._x = _root.graphic.enemies[_root.data.enemies[i]]._x + (_local9 / 10);
_root.graphic.enemies[_root.data.enemies[i]]._y = _root.graphic.enemies[_root.data.enemies[i]]._y + _root.graphic.enemies[_root.data.enemies[i]].yspeed;
if ((_root.graphic.enemies[_root.data.enemies[i]]._y >= (settings.bosspos + 40)) || (_root.graphic.enemies[_root.data.enemies[i]]._y <= (settings.bosspos - 40))) {
_root.graphic.enemies[_root.data.enemies[i]].yspeed = -_root.graphic.enemies[_root.data.enemies[i]].yspeed;
}
if (_root.graphic.enemies[_root.data.enemies[i]].animation.bombs > 0) {
if (_root.graphic.enemies[_root.data.enemies[i]].animation.timer == 0) {
var _local5 = _root.graphic.enemies[_root.data.enemies[i]]._x - 21;
var _local4 = _root.graphic.enemies[_root.data.enemies[i]]._y - 53;
_local5 = _local5 + ((_root.graphic.enemies[_root.data.enemies[i]].animation.bombs % 3) * 12);
_local4 = _local4 - ((_root.graphic.enemies[_root.data.enemies[i]].animation.bombs % 3) * 20);
_root.script.addProjectile(31, _local5, _local4, (-((Math.random() * 8) + 1)) + (_root.data.player.xspeed / 2), -5);
_root.graphic.enemies[_root.data.enemies[i]].animation.bombs--;
_root.graphic.enemies[_root.data.enemies[i]].animation.timer = 10;
} else {
_root.graphic.enemies[_root.data.enemies[i]].animation.timer--;
}
} else if ((Math.random() * 100) < 5) {
_root.graphic.enemies[_root.data.enemies[i]].animation.bombs = 5 + Math.floor(Math.random() * 2);
}
if (_root.graphic.enemies[_root.data.enemies[i]].animation.timer2 == 0) {
var _local5 = 20 + _root.graphic.enemies[_root.data.enemies[i]]._x;
if ((Math.random() * 10) < 5) {
_local5 = _local5 - 20;
}
_root.script.addProjectile(31, _local5, _root.graphic.enemies[_root.data.enemies[i]]._y + 30, ((Math.random() * 1) - 0.6) + (_root.data.player.xspeed / 2), 0);
_root.graphic.enemies[_root.data.enemies[i]].animation.timer2 = 5;
} else {
_root.graphic.enemies[_root.data.enemies[i]].animation.timer2--;
}
} else if (_root.graphic.enemies[_root.data.enemies[i]].type >= 30) {
_root.graphic.enemies[_root.data.enemies[i]]._y = _root.graphic.enemies[_root.data.enemies[i]]._y + _root.graphic.enemies[_root.data.enemies[i]].yspeed;
_root.graphic.enemies[_root.data.enemies[i]]._x = _root.graphic.enemies[_root.data.enemies[i]]._x + _root.graphic.enemies[_root.data.enemies[i]].xspeed;
if (_root.graphic.enemies[_root.data.enemies[i]].type == 31) {
var _local7 = _root.script.getY(_root.graphic.enemies[_root.data.enemies[i]]._x);
if (_root.graphic.enemies[_root.data.enemies[i]]._y >= _local7) {
_root.graphic.enemies[_root.data.enemies[i]].animation.gotcha();
}
}
_root.graphic.enemies[_root.data.enemies[i]].yspeed++;
} else if (((_root.graphic.enemies[_root.data.enemies[i]].type == 2) || (_root.graphic.enemies[_root.data.enemies[i]].type == 5)) || (_root.graphic.enemies[_root.data.enemies[i]].type == 7)) {
if (_root.graphic.enemies[_root.data.enemies[i]].type == 7) {
if (_root.graphic.enemies[_root.data.enemies[i]].animation.bombs > 0) {
if (_root.graphic.enemies[_root.data.enemies[i]].animation.timer == 0) {
_root.script.addProjectile(31, 20 + _root.graphic.enemies[_root.data.enemies[i]]._x, 14 + _root.graphic.enemies[_root.data.enemies[i]]._y);
_root.graphic.enemies[_root.data.enemies[i]].animation.bombs--;
_root.graphic.enemies[_root.data.enemies[i]].animation.timer = 4;
} else {
_root.graphic.enemies[_root.data.enemies[i]].animation.timer--;
}
} else if ((Math.random() * 100) < 5) {
_root.graphic.enemies[_root.data.enemies[i]].animation.bombs = 3;
}
}
} else if (_root.graphic.enemies[_root.data.enemies[i]].type == 3) {
if (_root.graphic.enemies[_root.data.enemies[i]].animation.ready) {
_root.graphic.enemies[_root.data.enemies[i]].yspeed = -10;
_root.graphic.enemies[_root.data.enemies[i]].animation.gotoAndPlay("Jump");
_root.graphic.enemies[_root.data.enemies[i]].animation.ready = false;
} else {
var _local7 = _root.script.getY(_root.graphic.enemies[_root.data.enemies[i]]._x + _root.graphic.enemies[_root.data.enemies[i]].xspeed);
if ((_root.graphic.enemies[_root.data.enemies[i]]._y + _root.graphic.enemies[_root.data.enemies[i]].yspeed) < _local7) {
if (_root.graphic.enemies[_root.data.enemies[i]].yspeed == 0) {
_root.graphic.enemies[_root.data.enemies[i]].animation.gotoAndPlay("Land");
}
_root.graphic.enemies[_root.data.enemies[i]]._y = _root.graphic.enemies[_root.data.enemies[i]]._y + _root.graphic.enemies[_root.data.enemies[i]].yspeed;
} else {
_root.graphic.enemies[_root.data.enemies[i]]._y = _local7;
_root.graphic.enemies[_root.data.enemies[i]].animation.gotoAndStop(1);
_root.graphic.enemies[_root.data.enemies[i]].animation.ready = true;
}
_root.graphic.enemies[_root.data.enemies[i]]._x = _root.graphic.enemies[_root.data.enemies[i]]._x + _root.graphic.enemies[_root.data.enemies[i]].xspeed;
_root.graphic.enemies[_root.data.enemies[i]].yspeed++;
}
} else {
_root.graphic.enemies[_root.data.enemies[i]]._y = _root.script.getY(_root.graphic.enemies[_root.data.enemies[i]]._x);
var _local10 = Math.round((_root.script.getM(_root.graphic.enemies[_root.data.enemies[i]]._x) * 180) / Math.PI);
_root.graphic.enemies[_root.data.enemies[i]]._rotation = _root.graphic.enemies[_root.data.enemies[i]]._rotation + ((_local10 - _root.graphic.enemies[_root.data.enemies[i]]._rotation) / 4);
if (_root.graphic.enemies[_root.data.enemies[i]].type == 8) {
_root.graphic.enemies[_root.data.enemies[i]].animation.Turret._rotation = -_root.graphic.enemies[_root.data.enemies[i]]._rotation;
if (_root.graphic.enemies[_root.data.enemies[i]].animation.bombs > 0) {
if (_root.graphic.enemies[_root.data.enemies[i]].animation.timer == 0) {
var _local6 = (_root.graphic.enemies[_root.data.enemies[i]].animation.Turret._rotation / 180) * Math.PI;
var _local12 = ((_root.graphic.enemies[_root.data.enemies[i]]._x - 3.5) - (Math.sin(_local6) * 20)) + 8;
var _local11 = (_root.graphic.enemies[_root.data.enemies[i]]._y - 35.5) - (Math.cos(_local6) * 20);
_root.script.addProjectile(31, _local12, _local11, -2, -20);
_root.graphic.enemies[_root.data.enemies[i]].animation.bombs--;
_root.graphic.enemies[_root.data.enemies[i]].animation.timer = 16;
} else {
_root.graphic.enemies[_root.data.enemies[i]].animation.timer--;
}
} else if ((Math.random() * 100) < 5) {
_root.graphic.enemies[_root.data.enemies[i]].animation.bombs = 1;
}
}
}
};
_root.script.setEnemies = function () {
if (((_root.data.game.level % 9) == 0) || ((_root.data.game.level % 20) == 0)) {
_root.data.game.enemies = [];
} else if (_root.data.game.level > 16) {
_root.data.game.enemies = [];
_root.data.game.enemies[0] = 8;
if ((_root.data.game.level % 3) == 0) {
_root.data.game.enemies.push(3);
}
if ((_root.data.game.level - 1) % 3) {
_root.data.game.enemies.push(2);
}
if ((_root.data.game.level - 2) % 3) {
_root.data.game.enemies.push(1);
}
if (((_root.data.game.level % 4) == 0) || (_root.data.game.level % 7)) {
_root.data.game.enemies.push(4);
}
if (((_root.data.game.level % 5) == 0) || (_root.data.game.level % 7)) {
_root.data.game.enemies.push(5);
}
if ((((_root.data.game.level + 1) % 5) == 0) || ((_root.data.game.level % 13) == 0)) {
_root.data.game.enemies.push(6);
}
if ((((_root.data.game.level - 1) % 5) == 0) || ((_root.data.game.level % 13) == 0)) {
_root.data.game.enemies.push(7);
}
if (_root.data.game.enemies.length <= 2) {
_root.data.game.enemies.push(1);
_root.data.game.enemies.push(2);
}
} else {
switch (_root.data.game.level) {
case 1 :
case 10 :
_root.data.game.enemies = [];
_root.data.game.enemies[0] = 1;
break;
case 2 :
case 11 :
_root.data.game.enemies = Array(1, 2);
break;
case 3 :
case 12 :
_root.data.game.enemies = Array(1, 2, 3);
break;
case 4 :
case 13 :
_root.data.game.enemies = Array(3, 4, 5);
break;
case 5 :
case 14 :
_root.data.game.enemies = Array(4, 5);
break;
case 6 :
case 15 :
_root.data.game.enemies = Array(4, 5, 6);
break;
case 7 :
case 16 :
_root.data.game.enemies = Array(6, 7);
break;
case 8 :
case 17 :
_root.data.game.enemies = Array(1, 7, 7, 6);
}
if (_root.data.game.level > 8) {
_root.data.game.enemies.push(8);
}
}
};
_root.script.addEnemy = function (type) {
if ((_root.data.game.enemies.length == 0) && (type != 9)) {
return(undefined);
}
_root.data.game.stats.enemies++;
var _local2 = "E" + _root.graphic.enemies.count;
_root.graphic.enemies.attachMovie("Enemies", _local2, _root.graphic.enemies.count);
_root.graphic.enemies[_local2]._x = screen._width + 40;
if (type == undefined) {
type = _root.data.game.enemies[Math.floor(Math.random() * _root.data.game.enemies.length)];
}
switch (type) {
case 1 :
_root.graphic.enemies[_local2].xspeed = -1;
_root.graphic.enemies[_local2]._y = _root.script.getY(screen._width + 40);
break;
case 2 :
_root.graphic.enemies[_local2].xspeed = -1.6;
_root.graphic.enemies[_local2]._y = 120 + (Math.random() * 50);
break;
case 3 :
_root.graphic.enemies[_local2].xspeed = -2;
_root.graphic.enemies[_local2].yspeed = 0;
_root.graphic.enemies[_local2]._y = _root.script.getY(screen._width + 40);
break;
case 4 :
_root.graphic.enemies[_local2].xspeed = -8;
_root.graphic.enemies[_local2]._y = _root.script.getY(screen._width + 40);
break;
case 5 :
_root.graphic.enemies[_local2].xspeed = -3;
_root.graphic.enemies[_local2]._y = 100 + (Math.random() * 80);
break;
case 6 :
_root.graphic.enemies[_local2].xspeed = -3.5;
_root.graphic.enemies[_local2]._y = _root.script.getY(screen._width + 40);
break;
case 7 :
_root.graphic.enemies[_local2].xspeed = -4;
_root.graphic.enemies[_local2]._y = 80 + (Math.random() * 80);
break;
case 8 :
_root.graphic.enemies[_local2].xspeed = -1;
_root.graphic.enemies[_local2]._y = _root.script.getY(screen._width + 40);
break;
case 9 :
_root.graphic.enemies[_local2].yspeed = 1;
_root.graphic.enemies[_local2]._y = settings.bosspos;
}
_root.graphic.enemies[_local2].type = type;
_root.graphic.enemies[_local2].gotoAndStop(type);
_root.data.enemies.push(_local2);
_root.graphic.enemies.count++;
_root.data.enedist = 0;
};
_root.script.addProjectile = function (type, x, y, xspeed, yspeed) {
var _local2 = "E" + _root.graphic.enemies.count;
_root.graphic.enemies.attachMovie("Enemies", _local2, _root.graphic.enemies.count);
_root.graphic.enemies[_local2]._x = x;
_root.graphic.enemies[_local2]._y = y;
_root.graphic.enemies[_local2].gotoAndStop(type);
_root.graphic.enemies[_local2].type = type;
switch (type) {
case 30 :
if (xspeed == undefined) {
_root.graphic.enemies[_local2].xspeed = -4;
_root.graphic.enemies[_local2].yspeed = 2;
} else {
_root.graphic.enemies[_local2].xspeed = xspeed;
_root.graphic.enemies[_local2].yspeed = yspeed;
}
break;
case 31 :
case 32 :
if (xspeed == undefined) {
_root.graphic.enemies[_local2].xspeed = 0;
_root.graphic.enemies[_local2].yspeed = 0;
} else {
_root.graphic.enemies[_local2].xspeed = xspeed;
_root.graphic.enemies[_local2].yspeed = yspeed;
}
}
_root.data.enemies.push(_local2);
_root.graphic.enemies.count++;
};
Frame 14
_root.script.setEnemies();
_root.script.onMouseUp = function () {
_root.data.player.fire = false;
};
_root.script.onMouseDown = function () {
if (_root.data.game.pause || (_root.data.game.stop)) {
return(undefined);
}
_root.data.player.fire = true;
_root.data.player.delay = _root.data.player.cooldown;
_root.script.fire();
};
_root.script.onEnterFrame = function () {
if (_root.data.game.stop) {
return(undefined);
}
if (_root.data.player.life <= 0) {
_root.data.game.stop = true;
_root.gotoAndPlay("GameOver");
}
if (_root.data.game.pause) {
_root.graphic.gui.pause._visible = true;
_root.graphic.gui._visible = true;
_root.graphic.gui.pause.Update();
return(undefined);
}
if (Key.isDown(80)) {
_root.graphic.background.stop();
_root.data.game.pause = true;
}
if (_root.data.player.fire && (_root.data.player.delay <= 0)) {
_root.script.fire();
_root.data.player.delay = _root.data.player.cooldown;
} else if (_root.data.player.delay > 0) {
_root.data.player.delay--;
}
if (_root.data.player.rage > 0) {
_root.script.onMouseDown();
_root.data.player.rage--;
_root.data.player.xspeed = _root.data.player.getSpeed() * 2.5;
_root.data.player.xspeed = ((_root.data.player.xspeed > 13) ? 13 : (_root.data.player.xspeed));
_root.data.player.invincible = 70;
} else {
_root.data.player.xspeed = _root.data.player.getSpeed();
}
if (Key.isDown(65) && (_root.data.player._x > 50)) {
_root.data.player._x = _root.data.player._x - settings.moveback;
} else if (Key.isDown(68) && (_root.data.player._x < (screen._width - 50))) {
_root.data.player._x = _root.data.player._x + settings.movefront;
}
if (Key.isDown(32) || (Key.isDown(87))) {
if (_root.data.player.jump == 2) {
_root.data.player.yspeed = settings.jump;
_root.data.player.jump--;
_root.graphic.player.animation = "Jump";
} else if ((_root.data.player.jump == 1) && (_root.data.player.yspeed > 0)) {
_root.data.player.yspeed = _root.data.player.yspeed + settings.jump;
_root.data.player.jump = 0;
}
}
var _local3 = _root.script.getY(_root.data.player._x);
if ((_root.data.player._y <= _local3) || (_root.data.player.yspeed < 0)) {
if ((_root.data.player.yspeed < 0) && (_root.graphic.player.animation != "Jump")) {
_root.graphic.player.animation = "Jump";
} else if ((_root.data.player.yspeed > 0) && ((_root.graphic.player.animation != "Fall1") && (_root.graphic.player.animation != "Fall2"))) {
_root.graphic.player.animation = "Fall1";
}
if ((_root.data.player._y + _root.data.player.yspeed) < _local3) {
_root.data.player._y = _root.data.player._y + _root.data.player.yspeed;
_root.data.player.yspeed++;
} else {
_root.data.player._y = _local3;
_root.data.player.jump = 2;
_root.graphic.player.animation = "Run";
}
} else {
_root.data.player._y = _local3;
_root.graphic.player.animation = "Run";
}
var _local5;
var _local4;
var _local2;
_local4 = (_root.data.player._y - 30) - _root._ymouse;
_local5 = (_root.data.player._x + _root.graphic.player.Guns._x) - _root._xmouse;
_local2 = Math.atan2(_local4, _local5) * 57.2957795130823;
_local2 = ((_local2 < 0) ? (((_local2 > -130) ? -130 : (_local2))) : (((_local2 < 130) ? 130 : (_local2))));
if (_root.data.player.rage == 0) {
_root.graphic.player.Guns._rotation = _local2 + 180;
} else {
_root.graphic.player.Guns._rotation = (_local2 + 180) + ((Math.random() * 20) - 10);
}
_root.graphic.player._x = _root.data.player._x;
_root.graphic.player._y = _root.data.player._y;
if (_root.data.player.invincible > 0) {
_root.graphic.player._visible = !_root.graphic.player._visible;
_root.data.player.invincible--;
} else {
_root.graphic.player._visible = true;
}
_root.script.scroll(-_root.data.player.xspeed);
if ((_root.data.game.level % 20) != 0) {
_root.data.game.distance = _root.data.game.distance + _root.data.player.xspeed;
_root.data.game.stats.distance = _root.data.game.stats.distance + _root.data.player.xspeed;
}
_root.script.drawLevel();
_root.graphic.gui.Lifebar.setLife(_root.data.player.life);
_root.graphic.gui.BarLvl.setLength(_root.data.game.distance, _root.data.game.togo);
_root.graphic.gui.Score.text = _root.data.game.score;
if (_root.data.game.powerups.gun.level < 10) {
_root.graphic.gui.Gunlevel.level.text = "0" + _root.data.game.powerups.gun.level;
} else {
_root.graphic.gui.Gunlevel.level.text = _root.data.game.powerups.gun.level;
}
if (_root.data.game.distance >= _root.data.game.togo) {
_root.data.game.distance = _root.data.game.distance - _root.data.game.togo;
_root.data.game.level++;
if ((_root.data.game.level >= settings.levelcount) && ((((_root.data.game.level - 1) % settings.levelcount) == 0) || (((_root.data.game.level - 1) % 20) == 0))) {
_root.data.game.levelfactor++;
}
if ((_root.data.game.level % 20) == 0) {
_root.data.game.togo = 100;
_root.data.game.distance = 0;
_root.script.addEnemy(9);
_root.script.addMessage("reached Boss level", _root.data.player._x, _root.data.player._y - 55);
} else if ((_root.data.game.level % 9) == 0) {
_root.data.game.togo = 3000;
_root.script.addMessage("reached Bonus level!", _root.data.player._x, _root.data.player._y - 55);
} else {
_root.data.game.togo = 3000 + (_root.data.game.level * 350);
_root.script.addMessage("reached level " + _root.data.game.level, _root.data.player._x, _root.data.player._y - 55);
}
_root.sound.play("levelup");
_root.script.setEnemies();
}
if (_root.data.game.powerups.life.points >= 3) {
_root.data.game.powerups.life.points = _root.data.game.powerups.life.points - 3;
_root.data.game.powerups.life.level++;
_root.data.player.maxlife = 2 + _root.data.game.powerups.life.level;
_root.data.player.life = _root.data.player.maxlife;
_root.script.addMessage("extra life", _root.data.player._x, _root.data.player._y - 55);
}
if (_root.data.game.powerups.gun.points >= 5) {
_root.data.game.powerups.gun.points = _root.data.game.powerups.gun.points - 5;
_root.data.game.powerups.gun.level++;
_root.data.player.force = (_root.data.game.powerups.gun.level * 0.25) + 0.75;
_root.data.player.cooldown = ((_root.data.player.cooldown > 4) ? (_root.data.player.cooldown - 0.2) : 4);
_root.script.addMessage("gun level " + _root.data.game.powerups.gun.level, _root.data.player._x, _root.data.player._y - 55);
}
};
_root.script.fire = function () {
if (_root.data.player.rage > 0) {
var _local5 = _root.graphic.player.Guns._rotation;
} else {
var _local5 = _root.graphic.player.Guns._rotation;
_root.sound.play("gun");
_root.data.game.stats.bullets++;
}
var _local4 = -(((_local5 - 90) / 180) * Math.PI);
var _local3 = "B" + _root.graphic.effects.count;
_root.graphic.effects.attachMovie("Spitfire", _local3, _root.graphic.effects.count);
_root.graphic.effects[_local3]._x = _root.data.player._x + (Math.sin(_local4) * 50);
_root.graphic.effects[_local3]._y = (_root.data.player._y - 28) + (Math.cos(_local4) * 50);
_root.graphic.effects.count++;
var _local10 = _root.data.player._x + (Math.sin(_local4) * 30);
var _local9 = (_root.data.player._y - 28) + (Math.cos(_local4) * 30);
_root.script.addParticle("Bullet", _local10, _local9);
_local3 = "B" + _root.graphic.effects.count;
_root.graphic.effects.attachMovie("Bullet", _local3, _root.graphic.effects.count);
_root.graphic.effects.count++;
_root.graphic.effects[_local3]._x = _root.data.player._x;
_root.graphic.effects[_local3]._y = _root.data.player._y - 30;
_root.graphic.effects[_local3]._rotation = _local5;
_root.graphic.effects[_local3].TTL = 8;
_root.graphic.effects[_local3].onEnterFrame = function () {
this.TTL--;
this._alpha = this._alpha / 1.2;
if (this.TTL <= 0) {
this.removeMovieClip();
}
};
_root.data.player.impact._x = 0;
_root.data.player.impact._y = 0;
_root.data.enemies.sort(_root.script.EnemySort);
_root.script.ScapeHit(_local3, _local5);
_root.script.EnemyHit(_local3, _local5);
if (_root.data.player.impact._x != 0) {
_root.script.addEffect("Hit", _root.data.player.impact._x, _root.data.player.impact._y);
var _local7 = _root.data.player.impact._x - _root.graphic.effects[_local3]._x;
var _local6 = _root.data.player.impact._y - _root.graphic.effects[_local3]._y;
var _local8 = Math.floor(Math.sqrt((_local7 * _local7) + (_local6 * _local6)) / 4);
_local8 = ((_local8 > 100) ? 100 : (_local8));
} else {
var _local8 = 100;
}
_root.graphic.effects[_local3].gotoAndStop(_local8);
};
Frame 15
_root.data.game.stop = false;
_root.graphic._visible = true;
Frame 16
stop();
Frame 17
_root.script.removeMovieClip();
_root.graphic.removeMovieClip();
_root.mask.removeMovieClip();
_root._quality = "HIGH";
Instance of Symbol 334 MovieClip "counter" in Frame 43
onClipEvent (load) {
fac1 = 50;
fac2 = 60;
delay = 0;
_root.data.submit = new Object();
done = false;
total = 0;
score = _root.data.game.score;
distance = Math.round(_root.data.game.stats.distance / 10);
killed = _root.data.game.stats.killed;
enemies = _root.data.game.stats.enemies;
bullets = _root.data.game.stats.bullets;
hits = _root.data.game.stats.hits;
acc1 = Math.round((100 * hits) / bullets);
acc1 = (isNaN(acc1) ? 0 : (acc1));
acc2 = Math.round((100 * killed) / enemies);
acc2 = (isNaN(acc2) ? 0 : (acc1));
this.countDown = function (count, amount) {
if (count >= amount) {
return(amount);
}
return(count);
};
txtotal.text = total;
txscore.text = score;
txdistance.text = distance;
txacc1.text = acc1;
txacc2.text = acc2;
}
onClipEvent (enterFrame) {
var amount = 0;
if (delay > 0) {
delay--;
return(undefined);
}
if (score > 0) {
amount = Math.round(score / 15);
amount = ((amount < 5) ? 5 : (amount));
total = total + countDown(score, amount);
score = score - countDown(score, amount);
} else if (distance > 0) {
amount = Math.round(distance / 20);
amount = ((amount < 5) ? 5 : (amount));
total = total + countDown(distance, amount);
distance = distance - countDown(distance, amount);
if (distance == 0) {
delay = 18;
}
} else if (acc1 > 0) {
total = total + Math.round((total * acc1) / 200);
_root.sound.play("collect");
acc1 = 0;
delay = 18;
} else if (acc2 > 0) {
total = total + Math.round((total * acc2) / 200);
_root.sound.play("collect");
acc2 = 0;
} else {
_root.data.game.total = total;
_root.data.submit.total = total;
done = true;
}
txtotal.text = total;
txscore.text = score;
txdistance.text = distance;
txacc1.text = acc1;
txacc2.text = acc2;
}
Frame 45
stop();
Frame 47
_root.sound.removeMovieClip();
_root.txscore.text = _root.data.game.total;
Instance of Symbol 363 MovieClip "comHighscores" in Frame 47
//component parameters
onClipEvent (construct) {
scoreLocation = "_root.submit.total";
gamename = "gunrun";
saveScore = true;
scoreIsTime = false;
scoreReversed = false;
negativeScoreAllowed = false;
}
Frame 48
stop();
Frame 56
stop();
Frame 58
stop();
Frame 60
_root.Url1._alpha = 0;
_root.Url2._alpha = 0;
Frame 61
stop();
Symbol 9 MovieClip Frame 1
this._visible = false;
Symbol 15 Button
on (release) {
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 20 MovieClip Frame 2
if (_url.indexOf("http") > -1) {
if (_parent._parent._parent.loadAdNow) {
cacheBuster = getTimer() + random(999999);
showAd = "http://www.miniclip.com/swfcontent/push/didyouknow.swf?cacheBuster" + cacheBuster;
trace("Loading ad: " + showAd);
mcAd.loadMovie(showAd);
} else {
gotoAndPlay(_currentframe - 1);
}
}
Symbol 20 MovieClip Frame 4
if ((mcAd.getBytesTotal() != 0) && (mcAd.getBytesLoaded() == mcAd.getBytesTotal())) {
gotoAndStop ("showAd");
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 20 MovieClip Frame 12
stop();
Symbol 30 MovieClip Frame 1
stop();
Symbol 30 MovieClip Frame 100
stop();
Symbol 32 MovieClip Frame 1
stop();
Symbol 32 MovieClip Frame 12
_root.play();
_root.isFinished = true;
_parent.stop();
stop();
Symbol 36 Button
on (release) {
getURL ("http://www.miniclip.com/", "_blank");
}
Symbol 37 MovieClip Frame 2
_parent.mcAnimation.play();
stop();
Symbol 37 MovieClip Frame 13
_parent.gotoAndPlay("preload");
stop();
Symbol 52 MovieClip Frame 1
stop();
Symbol 52 MovieClip Frame 60
Symbol 52 MovieClip Frame 121
_parent.mcBackground.play();
stop();
Symbol 53 MovieClip Frame 1
loadAdNow = false;
_root.stop();
play();
Instance of Symbol 9 MovieClip "mcIntro" in Symbol 53 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 53 MovieClip Frame 2
xPos = _x;
yPos = _y;
mcBackground._x = mcBackground._x - xPos;
mcBackground._y = mcBackground._y - yPos;
mcAnimation._x = mcAnimation._x - xPos;
mcAnimation._y = mcAnimation._y - yPos;
var stageWidth = 600;
var stageHeight = 400;
var centerStageX = (stageWidth / 2);
var centerStageY = (stageHeight / 2);
mcBackground._width = stageWidth;
mcBackground._height = stageHeight;
mcAnimation._x = mcAnimation._x + centerStageX;
mcAnimation._y = mcAnimation._y + (centerStageY - (stageHeight / 10));
stop();
Instance of Symbol 32 MovieClip "mcLoadingAnimated" in Symbol 53 MovieClip Frame 2
onClipEvent (load) {
_visible = false;
}
Symbol 53 MovieClip Frame 3
var loadedPercent = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (loadedPercent == 100) {
_root.play();
stop();
} else {
loadAdNow = true;
mcLoadingAnimated._visible = true;
}
Symbol 53 MovieClip Frame 5
var loadedPercent = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (loadedPercent < 100) {
mcLoadingAnimated.mcLoading.gotoAndStop(loadedPercent);
mcLoadingAnimated.mcLoading.txtPercentLoaded1 = ("The game is loading (" + loadedPercent) + "%)";
mcLoadingAnimated.mcLoading.txtPercentLoaded2 = ("The game is loading (" + loadedPercent) + "%)";
gotoAndPlay(_currentframe - 1);
} else {
mcLoadingAnimated.play();
stop();
}
Symbol 58 Button
on (release) {
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 87 MovieClip [Player] Frame 5
gotoAndPlay(this.animation);
Symbol 87 MovieClip [Player] Frame 10
gotoAndPlay(this.animation);
Symbol 87 MovieClip [Player] Frame 13
gotoAndPlay(this.animation);
Symbol 87 MovieClip [Player] Frame 18
this.animation = "Fall2";
Symbol 87 MovieClip [Player] Frame 20
gotoAndPlay(this.animation);
Symbol 91 MovieClip Frame 1
stop();
Symbol 91 MovieClip Frame 11
stop();
_visible = false;
Symbol 95 MovieClip Frame 1
stop();
Symbol 95 MovieClip Frame 11
stop();
_visible = false;
Symbol 99 MovieClip Frame 1
stop();
Symbol 99 MovieClip Frame 11
stop();
_visible = false;
Symbol 103 MovieClip Frame 1
stop();
Symbol 103 MovieClip Frame 11
stop();
_visible = false;
Symbol 107 MovieClip Frame 1
stop();
Symbol 107 MovieClip Frame 8
stop();
_visible = false;
Symbol 109 MovieClip Frame 1
stop();
Symbol 109 MovieClip Frame 8
stop();
_visible = false;
Symbol 111 MovieClip Frame 1
stop();
Symbol 111 MovieClip Frame 8
stop();
_visible = false;
Symbol 113 MovieClip Frame 1
stop();
Symbol 113 MovieClip Frame 8
stop();
_visible = false;
Symbol 115 MovieClip Frame 1
stop();
Symbol 115 MovieClip Frame 8
stop();
_visible = false;
Instance of Symbol 91 MovieClip "animation" in Symbol 116 MovieClip [Obj] Frame 1
onClipEvent (load) {
score = 5;
collected = false;
hit = function () {
if (!collected) {
_root.data.game.score = _root.data.game.score + score;
collected = true;
_root.sound.play("collect");
gotoAndPlay ("collected");
}
};
}
Instance of Symbol 95 MovieClip "animation" in Symbol 116 MovieClip [Obj] Frame 2
onClipEvent (load) {
score = 10;
collected = false;
hit = function () {
if (!collected) {
_root.data.game.score = _root.data.game.score + score;
collected = true;
_root.sound.play("collect");
gotoAndPlay ("collected");
}
};
}
Instance of Symbol 99 MovieClip "animation" in Symbol 116 MovieClip [Obj] Frame 3
onClipEvent (load) {
score = 25;
collected = false;
hit = function () {
if (!collected) {
_root.data.game.score = _root.data.game.score + score;
collected = true;
_root.sound.play("collect");
gotoAndPlay ("collected");
}
};
}
Instance of Symbol 103 MovieClip "animation" in Symbol 116 MovieClip [Obj] Frame 4
onClipEvent (load) {
score = 50;
collected = false;
hit = function () {
if (!collected) {
_root.data.game.score = _root.data.game.score + score;
collected = true;
_root.sound.play("collect");
gotoAndPlay ("collected");
}
};
}
Instance of Symbol 107 MovieClip "animation" in Symbol 116 MovieClip [Obj] Frame 5
onClipEvent (load) {
collected = false;
hit = function () {
if (!collected) {
_root.data.game.powerups.gun.points++;
collected = true;
_root.sound.play("powerup");
gotoAndPlay ("collected");
}
};
}
Instance of Symbol 109 MovieClip "animation" in Symbol 116 MovieClip [Obj] Frame 6
onClipEvent (load) {
collected = false;
hit = function () {
if (!collected) {
if (_root.data.player.life < _root.data.player.maxlife) {
_root.data.player.life++;
} else if (_root.data.player.maxlife < settings.maxlife) {
_root.data.game.powerups.life.points++;
} else {
var _local2 = 5 * _root.data.game.level;
_root.script.addMessage(_local2 + " Health-Bonus", _root.data.player._x, _root.data.player._y - 55);
_root.data.game.score = _root.data.game.score + _local2;
}
collected = true;
_root.sound.play("powerup");
gotoAndPlay ("collected");
}
};
}
Instance of Symbol 111 MovieClip "animation" in Symbol 116 MovieClip [Obj] Frame 7
onClipEvent (load) {
collected = false;
hit = function () {
if (!collected) {
_root.data.player.invincible = 400;
collected = true;
_root.sound.play("powerup");
gotoAndPlay ("collected");
}
};
}
Instance of Symbol 113 MovieClip "animation" in Symbol 116 MovieClip [Obj] Frame 8
onClipEvent (load) {
collected = false;
hit = function () {
if (!collected) {
_root.data.player.rage = 320;
_root.script.addStaticEffect("Flash", 0, 0);
_root.graphic.background._visible = false;
_root.graphic.gui._visible = false;
collected = true;
if (settings.music) {
_root.sound.play("rage");
_root.Music.setVolume(25);
_root.Rage.stop();
_root.Rage.start(0, 999);
_root.Rage.setVolume(100);
}
gotoAndPlay ("collected");
}
};
}
Instance of Symbol 115 MovieClip "animation" in Symbol 116 MovieClip [Obj] Frame 9
onClipEvent (load) {
collected = false;
hit = function () {
if (!collected) {
_root.script.clearScreen();
collected = true;
_root.sound.play("powerup");
gotoAndPlay ("collected");
}
};
}
Symbol 129 Button
on (press) {
_root.Music.stop();
settings.music = false;
gotoAndStop (2);
}
Symbol 131 Button
on (press) {
_root.Music.start(0, 999);
settings.music = false;
gotoAndStop (1);
}
Symbol 132 MovieClip Frame 1
stop();
Symbol 132 MovieClip Frame 2
stop();
Symbol 134 Button
on (press) {
settings.quality = "medium";
gotoAndStop (2);
}
Symbol 136 Button
on (press) {
settings.quality = "low";
gotoAndStop (3);
}
Symbol 138 Button
on (press) {
settings.quality = "high";
gotoAndStop (1);
}
Symbol 140 MovieClip Frame 1
stop();
Symbol 140 MovieClip Frame 2
stop();
Symbol 140 MovieClip Frame 3
stop();
Symbol 142 Button
on (press) {
settings.sound = false;
gotoAndStop (2);
}
Symbol 144 Button
on (press) {
settings.sound = true;
gotoAndStop (1);
}
Symbol 145 MovieClip Frame 1
stop();
Symbol 145 MovieClip Frame 2
stop();
Symbol 149 Button
on (press) {
_root.data.game.pause = false;
_root.graphic.background.play();
if (_root.data.player.rage > 0) {
_root.graphic.gui._visible = false;
}
_root._quality = settings.quality;
_visible = false;
}
Instance of Symbol 132 MovieClip in Symbol 164 MovieClip Frame 1
onClipEvent (load) {
if (!settings.music) {
this.gotoAndStop(2);
}
}
Instance of Symbol 140 MovieClip in Symbol 164 MovieClip Frame 1
onClipEvent (load) {
if (settings.quality == "LOW") {
this.gotoAndStop(3);
} else if (settings.quality == "MEDIUM") {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 145 MovieClip in Symbol 164 MovieClip Frame 1
onClipEvent (load) {
if (!settings.sound) {
this.gotoAndStop(2);
}
}
Instance of Symbol 118 MovieClip "Lifebar" in Symbol 165 MovieClip [Gui] Frame 1
onClipEvent (load) {
this.setLife = function (value) {
i = 1;
while (i <= 5) {
if (i <= value) {
this["H" + i]._visible = true;
} else {
this["H" + i]._visible = false;
}
i++;
}
};
}
Instance of Symbol 120 MovieClip "BarLvl" in Symbol 165 MovieClip [Gui] Frame 1
onClipEvent (load) {
setLength = function (value, max) {
_width = Math.ceil((value / max) * 580);
};
}
Instance of Symbol 125 MovieClip "Gunlevel" in Symbol 165 MovieClip [Gui] Frame 1
onClipEvent (load) {
this.level.text = "01";
}
Instance of Symbol 164 MovieClip "pause" in Symbol 165 MovieClip [Gui] Frame 1
onClipEvent (load) {
_visible = false;
Update = function () {
GunCollect.text = _root.data.game.powerups.gun.points;
LifeCollect.text = _root.data.game.powerups.life.points;
Bullets.text = _root.data.game.stats.bullets;
Hits.text = _root.data.game.stats.hits;
Kills.text = _root.data.game.stats.killed;
Enemies.text = _root.data.game.stats.enemies;
Level.text = _root.data.game.level;
};
}
Symbol 169 MovieClip [Explosion] Frame 7
this.removeMovieClip();
Symbol 172 MovieClip [Flash] Frame 11
this.removeMovieClip();
Symbol 179 MovieClip [Hit] Frame 9
this.removeMovieClip();
Symbol 182 MovieClip [Message] Frame 37
stop();
this.removeMovieClip();
Symbol 190 MovieClip [Spitfire] Frame 7
this.removeMovieClip();
Symbol 205 MovieClip Frame 1
stop();
Symbol 205 MovieClip Frame 9
_parent.dead = true;
stop();
Symbol 219 MovieClip Frame 1
stop();
Symbol 219 MovieClip Frame 9
_parent.dead = true;
stop();
Symbol 235 MovieClip Frame 6
stop();
Symbol 235 MovieClip Frame 21
stop();
Symbol 235 MovieClip Frame 30
_parent.dead = true;
stop();
Symbol 240 MovieClip Frame 5
gotoAndPlay (1);
Symbol 240 MovieClip Frame 13
_parent.dead = true;
stop();
Symbol 250 MovieClip Frame 7
gotoAndPlay (1);
Symbol 250 MovieClip Frame 15
_parent.dead = true;
stop();
Symbol 262 MovieClip Frame 1
stop();
Instance of Symbol 260 MovieClip in Symbol 262 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay (3);
}
Symbol 262 MovieClip Frame 9
_parent.dead = true;
stop();
Symbol 267 MovieClip Frame 1
stop();
Instance of Symbol 260 MovieClip in Symbol 267 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay (3);
}
Instance of Symbol 260 MovieClip in Symbol 267 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay (4);
}
Instance of Symbol 247 MovieClip in Symbol 267 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay (2);
}
Symbol 267 MovieClip Frame 9
_parent.dead = true;
stop();
Symbol 270 MovieClip Frame 1
stop();
Symbol 270 MovieClip Frame 9
_parent.dead = true;
stop();
Symbol 279 MovieClip Frame 1
stop();
Instance of Symbol 247 MovieClip in Symbol 279 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay (2);
}
Instance of Symbol 247 MovieClip in Symbol 279 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay (2);
}
Symbol 279 MovieClip Frame 14
_parent.dead = true;
stop();
Symbol 282 MovieClip Frame 1
stop();
Symbol 282 MovieClip Frame 9
_parent.dead = true;
stop();
Instance of Symbol 205 MovieClip "animation" in Symbol 285 MovieClip [Enemies] Frame 1
onClipEvent (load) {
dead = false;
hp = 3 * _root.data.game.levelfactor;
score = 5 + (2 * (_root.data.game.levelfactor - 1));
hit = function () {
if ((hp - _root.data.player.force) > 0) {
_root.script.addParticle("Trash", _root.data.player.impact._x, _root.data.player.impact._y);
_root.sound.play("clank" + Math.ceil(Math.random() * 4));
hp = hp - _root.data.player.force;
} else if (!dead) {
this.gotoAndPlay("Die");
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
_root.sound.play("burst");
_root.data.game.score = _root.data.game.score + score;
_root.data.game.stats.killed++;
dead = true;
}
};
gotcha = function () {
};
}
Instance of Symbol 219 MovieClip "animation" in Symbol 285 MovieClip [Enemies] Frame 2
onClipEvent (load) {
dead = false;
hp = 2 * _root.data.game.levelfactor;
score = 5 + (3 * (_root.data.game.levelfactor - 1));
hit = function () {
if ((hp - _root.data.player.force) > 0) {
_root.script.addParticle("Trash", _root.data.player.impact._x, _root.data.player.impact._y);
_root.script.addParticle("Trash", _root.data.player.impact._x, _root.data.player.impact._y);
_root.sound.play("clank" + Math.ceil(Math.random() * 4));
hp = hp - _root.data.player.force;
} else if (!dead) {
this.gotoAndPlay("Die");
if ((Math.random() * 100) < 20) {
_root.script.addObjects(Math.ceil(Math.random() * (objects.types - 4)) + 4, _parent._x, _parent._y);
}
_root.sound.play("burst");
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
_root.data.game.score = _root.data.game.score + score;
_root.data.game.stats.killed++;
dead = true;
}
};
gotcha = function () {
};
}
Instance of Symbol 235 MovieClip "animation" in Symbol 285 MovieClip [Enemies] Frame 3
onClipEvent (load) {
dead = false;
this.ready = true;
hp = 2 * _root.data.game.levelfactor;
score = 10 + (3 * (_root.data.game.levelfactor - 1));
this.stop();
hit = function () {
if ((hp - _root.data.player.force) > 0) {
_root.script.addParticle("Trash", _root.data.player.impact._x, _root.data.player.impact._y);
_root.sound.play("clank" + Math.ceil(Math.random() * 4));
hp = hp - _root.data.player.force;
} else if (!dead) {
this.gotoAndPlay("Die");
_root.sound.play("burst");
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
_root.data.game.score = _root.data.game.score + score;
_root.data.game.stats.killed++;
dead = true;
}
};
gotcha = function () {
};
}
Instance of Symbol 240 MovieClip "animation" in Symbol 285 MovieClip [Enemies] Frame 4
onClipEvent (load) {
dead = false;
hp = 4 * _root.data.game.levelfactor;
score = 25 + (4 * (_root.data.game.levelfactor - 1));
hit = function () {
if ((hp - _root.data.player.force) > 0) {
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
_root.sound.play("clank" + Math.ceil(Math.random() * 4));
hp = hp - _root.data.player.force;
} else if (!dead) {
this.gotoAndPlay("Die");
_root.sound.play("burst");
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
_root.data.game.score = _root.data.game.score + score;
_root.data.game.stats.killed++;
dead = true;
}
};
gotcha = function () {
};
}
Instance of Symbol 250 MovieClip "animation" in Symbol 285 MovieClip [Enemies] Frame 5
onClipEvent (load) {
dead = false;
hp = 3 * _root.data.game.levelfactor;
score = 30 + (4 * (_root.data.game.levelfactor - 1));
hit = function () {
if ((hp - _root.data.player.force) > 0) {
if (this.Saw._visible && ((Math.random() * 10) < 8)) {
_root.script.addProjectile(30, _parent._x, _parent._y);
this.Saw._visible = false;
}
_root.sound.play("clank" + Math.ceil(Math.random() * 4));
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
hp = hp - _root.data.player.force;
} else if (!dead) {
this.gotoAndPlay("Die");
if ((Math.random() * 100) < 25) {
_root.script.addObjects(Math.ceil(Math.random() * (objects.types - 4)) + 4, _parent._x, _parent._y);
}
_root.sound.play("burst");
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
_root.data.game.score = _root.data.game.score + score;
_root.data.game.stats.killed++;
dead = true;
}
};
gotcha = function () {
};
}
Instance of Symbol 262 MovieClip "animation" in Symbol 285 MovieClip [Enemies] Frame 6
onClipEvent (load) {
dead = false;
hp = 7 * _root.data.game.levelfactor;
score = 50 + (5 * (_root.data.game.levelfactor - 1));
hit = function () {
if ((hp - _root.data.player.force) > 0) {
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
hp = hp - _root.data.player.force;
_root.sound.play("clank" + Math.ceil(Math.random() * 4));
} else if (!dead) {
this.gotoAndPlay("Die");
_root.sound.play("burst");
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
_root.data.game.score = _root.data.game.score + score;
_root.data.game.stats.killed++;
dead = true;
}
};
gotcha = function () {
};
}
Instance of Symbol 267 MovieClip "animation" in Symbol 285 MovieClip [Enemies] Frame 7
onClipEvent (load) {
dead = false;
hp = 6 * _root.data.game.levelfactor;
score = 60 + (5 * (_root.data.game.levelfactor - 1));
bombs = 0;
timer = 0;
hit = function () {
if ((hp - _root.data.player.force) > 0) {
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
hp = hp - _root.data.player.force;
_root.sound.play("clank" + Math.ceil(Math.random() * 4));
} else if (!dead) {
this.gotoAndPlay("Die");
if ((Math.random() * 100) < 28) {
_root.script.addObjects(Math.ceil(Math.random() * (objects.types - 4)) + 4, _parent._x, _parent._y);
}
_root.sound.play("burst");
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
_root.data.game.score = _root.data.game.score + score;
_root.data.game.stats.killed++;
dead = true;
}
};
gotcha = function () {
};
}
Instance of Symbol 270 MovieClip "animation" in Symbol 285 MovieClip [Enemies] Frame 8
onClipEvent (load) {
dead = false;
hp = 3 * _root.data.game.levelfactor;
score = 50 + (5 * (_root.data.game.levelfactor - 1));
bombs = 0;
timer = 0;
hit = function () {
if ((hp - _root.data.player.force) > 0) {
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
hp = hp - _root.data.player.force;
_root.sound.play("clank" + Math.ceil(Math.random() * 4));
} else if (!dead) {
this.gotoAndPlay("Die");
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 2));
_root.sound.play("burst");
_root.data.game.score = _root.data.game.score + score;
_root.data.game.stats.killed++;
dead = true;
}
};
gotcha = function () {
};
}
Instance of Symbol 279 MovieClip "animation" in Symbol 285 MovieClip [Enemies] Frame 9
onClipEvent (load) {
dead = false;
maxhp = (hp = 550 + (50 * (_root.data.game.levelfactor * _root.data.game.levelfactor)));
score = 300 + (100 * (_root.data.game.levelfactor - 1));
bombs = 0;
timer = 0;
timer2 = 0;
hit = function () {
if ((hp - _root.data.player.force) > 0) {
if ((Math.random() * 15) <= 1.5) {
_root.script.addProjectile(32, _parent._x - 20, _parent._y + 13, ((_root.data.player.xspeed / 2) - 1.8) + ((Math.random() * 0.5) - 0.25), 2);
}
_root.script.addParticle("Trash", _parent._x + ((Math.random() * 50) - 25), (_parent._y - (this._height / 3)) + (Math.random() * 6), _root.data.player.xspeed + ((Math.random() * 5) - 1), Math.random() * -4);
hp = hp - _root.data.player.force;
_root.data.game.distance = ((maxhp - hp) / maxhp) * _root.data.game.togo;
_root.sound.play("clank" + Math.ceil(Math.random() * 4));
} else if (!dead) {
_root.data.game.distance = _root.data.game.togo;
this.gotoAndPlay("Die");
_root.script.addParticle("Trash", _parent._x + 10, _parent._y - (this._height / 4));
_root.script.addParticle("Trash", _parent._x + 20, _parent._y - (this._height / 4));
_root.script.addParticle("Trash", _parent._x - 10, _parent._y - (this._height / 3));
_root.script.addParticle("Trash", _parent._x, _parent._y - (this._height / 5));
_root.script.addParticle("Trash", _parent._x - 5, _parent._y - (this._height / 3));
_root.script.addParticle("Trash", _parent._x + 4, _parent._y - (this._height / 6));
_root.sound.play("burst");
_root.data.game.score = _root.data.game.score + score;
_root.data.game.stats.killed++;
dead = true;
}
};
gotcha = function () {
};
}
Instance of Symbol 282 MovieClip "animation" in Symbol 285 MovieClip [Enemies] Frame 30
onClipEvent (load) {
dead = false;
hp = 2 + (5 * (_root.data.game.levelfactor - 1));
score = 40 + (5 * (_root.data.game.levelfactor - 1));
hit = function () {
if ((hp - _root.data.player.force) > 0) {
hp = hp - _root.data.player.force;
} else if (!dead) {
this.gotoAndPlay("Die");
_root.data.game.score = _root.data.game.score + score;
dead = true;
_root.sound.play("burst");
}
};
gotcha = function () {
};
}
Instance of Symbol 284 MovieClip "animation" in Symbol 285 MovieClip [Enemies] Frame 31
onClipEvent (load) {
dead = false;
score = 30 + (5 * (_root.data.game.levelfactor - 1));
hit = function () {
_visible = false;
_parent.dead = true;
dead = true;
_root.script.addEffect("Explosion", _parent._x, _parent._y);
_root.sound.play("explode");
_root.data.game.score = _root.data.game.score + score;
};
gotcha = function () {
_visible = false;
_parent.dead = true;
dead = true;
_root.sound.play("explode");
_root.script.addEffect("Explosion", _parent._x, _parent._y);
};
}
Instance of Symbol 282 MovieClip "animation" in Symbol 285 MovieClip [Enemies] Frame 32
onClipEvent (load) {
dead = false;
hp = 10 * _root.data.game.levelfactor;
score = 60 + (6 * (_root.data.game.levelfactor - 1));
hit = function () {
if ((hp - _root.data.player.force) > 0) {
hp = hp - _root.data.player.force;
} else if (!dead) {
this.gotoAndPlay("Die");
_root.data.game.score = _root.data.game.score + score;
dead = true;
_root.sound.play("burst");
}
};
gotcha = function () {
};
}
Symbol 287 MovieClip [ShortFlash] Frame 5
this.removeMovieClip();
Symbol 304 Button
on (press) {
gotoAndPlay ("Init");
}
Symbol 307 Button
on (press) {
gotoAndPlay ("Help");
}
Symbol 310 Button
on (press) {
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 313 Button
on (press) {
gotoAndPlay ("About");
}
Symbol 337 Button
on (press) {
if (_root.counter.done) {
gotoAndPlay ("Submit");
}
}
Symbol 343 MovieClip Frame 1
this._visible = false;
Symbol 361 Button
on (release) {
gameURL = ("http://www.miniclip.com/" + gamename) + ".htm";
getURL (gameURL, "_blank");
}
Instance of Symbol 343 MovieClip "mcHighscores" in Symbol 363 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 363 MovieClip Frame 2
if (_url.indexOf("miniclip.com") == -1) {
gotoAndStop(_currentframe + 1);
} else {
var noCache = (getTimer() + random(100000));
mcTarget.loadMovie("http://www.miniclip.com/swfcontent/highscore.swf?noCache=" + noCache);
stop();
}
Symbol 363 MovieClip Frame 3
stop();
Symbol 364 Button
on (press) {
gotoAndPlay ("Menu");
}
Symbol 365 Button
on (press) {
gotoAndPlay ("HelpA");
}
Symbol 383 Button
on (press) {
gotoAndPlay ("Menu");
}
Symbol 402 Button
on (press) {
_root.getURL("http://www.we-are-freex.com", "_blank");
}