Frame 1
preloader = {cbyLoaded:0, pctLoaded:0, tbyLoad:0, proceed:false};
preloader.tbyLoad = getBytesTotal();
dtStatusLoad.text = "Please wait...";
onEnterFrame = function () {
Mouse.hide();
cCur._x = _xmouse;
cCur._y = _ymouse;
preloader.cbyLoaded = getBytesLoaded();
preloader.pctLoaded = Math.round((100 / preloader.tbyLoad) * preloader.cbyLoaded);
flag.dtStatus.text = preloader.pctLoaded + "%";
if ((preloader.pctLoaded == 100) && (!preloader.proceed)) {
dtStatusLoad.text = "Loading completed!";
flag.dtStatus._y = -45 + (-preloader.pctLoaded);
flag.banner._y = -10 + (-preloader.pctLoaded);
preloader.proceed = true;
gotoAndPlay (2);
}
if ((preloader.pctLoaded < 100) && (!preloader.proceed)) {
flag.dtStatus._y = -45 + (-preloader.pctLoaded);
flag.banner._y = -10 + (-preloader.pctLoaded);
byteInfo.text = (("Bytes loaded: " + preloader.cbyLoaded) + "\nBytes total: ") + preloader.tbyLoad;
}
};
stop();
Frame 2
function setInfo(num) {
if (wi) {
clearInterval(wi);
_root.dtInfo.text = "";
tc = 0;
_root.bgFlash.gotoAndPlay(2);
}
wi = setInterval(writeInfo, 20, num);
}
function writeInfo(idNum) {
_root.dtInfo.text = _root.dtInfo.text + menuStr[idNum].substr(tc, 1);
tc++;
}
function switchScene(sArg) {
var _local1 = _root;
switch (sArg) {
case 0 :
gotoAndPlay (3);
return;
case 1 :
return;
case 2 :
_local1.attachMovie("OptionsDisplay", "OptionsDisplay", 1000);
_local1.OptionsDisplay._x = 46;
_local1.OptionsDisplay._y = 50;
_local1.cClip.swapDepths(_local1.OptionsDisplay);
return;
case 3 :
_local1.attachMovie("InfoScreen", "InfoScreen", 1000);
_local1.InfoScreen._x = 46;
_local1.InfoScreen._y = 50;
_local1.cClip.swapDepths(_local1.InfoScreen);
}
}
Settings = (Settings ? (Settings) : ({goreLevel:100, tunnelLevel:80, tVar:0}));
Settings.cheatList = new Array("megamachinegun", "antigravity", "gore&lag", "megatunnel", "randomlevel", "godflag");
_root.attachMovie("cClip", "cClip", 500);
bgC = {cx:100, cy:100, xDist:0, yDist:0, clip:_root.bgClip, onMenu:true};
Set("_global:tc", 0);
menuStr = new Array(4);
menuStr[0] = "Click to start a new game.\rYou can submit your score at the end of a game.";
menuStr[1] = "An overview of all the highscores.\rThis is where all the top players are listed.";
menuStr[2] = "Custom settings.\rThis allows you to try out some custom settings.\rWarning: Dont use if you want to submit a hightscore!";
menuStr[3] = "Some information about the game.\rCredits, Game info, etc..";
menuStr[4] = "Please note that this game is still in beta version!";
_root.onEnterFrame = function (_xmouse, _ymouse) {
bgC.xDist = _xmouse - bgC.cx;
bgC.yDist = _ymouse - bgC.cy;
bgC.cx = bgC.cx + (bgC.xDist / 10);
bgC.cy = bgC.cy + (bgC.yDist / 10);
bgC.clip._rotation = bgC.clip._rotation + ((bgC.xDist + bgC.yDist) / 20);
bgC.clip._x = bgC.cx;
bgC.clip._y = bgC.cy;
cClip._x = _xmouse;
cClip._y = _ymouse;
};
setInfo(4);
Mouse.hide();
stop();
Frame 3
function setup() {
var _local1 = _root;
if (Game.cLink.length > 0) {
xx = 0;
while (xx < Game.cLink.length) {
switch (Game.cLink[xx]) {
case "megamachinegun" :
player.sFreq = 2;
player.aClips = 999;
break;
case "antigravity" :
Game.world.yGrav = -0.1;
break;
case "gore&lag" :
Settings.goreLevel = 500;
break;
case "megatunnel" :
Settings.tunnelLevel = 100;
Settings.tVar = 2 + (Math.random() * 3);
break;
case "randomlevel" :
Game.level = Math.round(Math.random() * 100);
Game.cInt = Game.level * 25;
Game.cDif = (Game.level / 10) + 0.1;
break;
case "godflag" :
Settings.godflag = true;
}
xx++;
}
Game.displayCheats = false;
} else {
Game.displayCheats = true;
}
_local1.attachMovie("player_full", "p_c", 10);
_local1.p_c._x = player.cx;
_local1.p_c._y = 230;
_local1.infoLayer.InfoBanner.gotoAndPlay(2);
player.clip = _local1.p_c;
Game.tInt = setInterval(checkFPS, 1000, null);
_local1.tkBar.dtKills.text = "Kills: " + player.kills;
_local1.tkBar.dtTime.text = "Time: " + Game.cInt;
_local1.tkBar.dtFPS.text = ("(FPS:" + Game.cFPS) + ")";
flag_.flagStatus.text = parseInt(player.flag.status_) + "%";
_local1.levelBar.lText.dtLevel.text = "Level: " + Game.level;
_local1.levelBar.gotoAndPlay(2);
_local1.InfoBanner.gotoAndPlay(2);
setAmmo();
}
function setAmmo() {
var _local2 = _root;
if (player.ammo == 0) {
if (player.aClips > 0) {
player.aClips--;
player.ammo = 10;
}
}
var _local1 = 0;
while (_local1 < player.ammo) {
_local2.iBar.attachMovie("ad", ["ad_" + _local1], _local1);
_local2.iBar["ad_" + _local1]._x = 12 + (25 * _local1);
_local2.iBar["ad_" + _local1]._y = 25;
_local2.iBar.aCText.text = "X" + player.aClips;
_local1++;
}
}
function newFrame() {
var _local1 = _root;
Game.fCount++;
if ((!player.ur) && (!Key.isDown(38))) {
player.ur = true;
}
if ((!Game.defeat) && (player.active)) {
rnd = Math.round(Math.random() * (100 + Game.cDif));
makeEnemies(rnd);
moveObjects();
}
if (!Key.isDown(37)) {
ctrl.ml = false;
}
if (!Key.isDown(39)) {
ctrl.mr = false;
}
if (Key.isDown(37) && (player.rDown)) {
if (ctrl.ml == false) {
_local1.p_c.body.legs.gotoAndPlay(2);
player.facing = 1;
player.clip._xscale = 100 * player.facing;
player.cAnim = "walk";
ctrl.ml = true;
}
}
if ((Key.isDown(38) && (player.allowFire)) && (player.ur)) {
gunBash();
player.ur = false;
player.allowFire = false;
}
if (Key.isDown(40) && (player.rDown)) {
player.clip.gotoAndPlay(((player.down == true) ? 4 : 2));
player.gunMode = (player.down ? 1 : 2);
player.down = ((player.down == true) ? false : true);
player.rDown = false;
}
if (!Key.isDown(40)) {
player.rDown = true;
}
if (Key.isDown(39) && (player.rDown)) {
if (ctrl.mr == false) {
_local1.p_c.body.legs.gotoAndPlay(2);
player.facing = -1;
player.clip._xscale = 100 * player.facing;
player.cAnim = "walk";
ctrl.mr = true;
}
}
if (!(ctrl.mr || (ctrl.ml))) {
_local1.p_c.body.legs.gotoAndPlay(1);
}
if ((!(((player.cx + (-(player.speed * player.facing))) > Game.world.maxX) || ((player.cx + (-(player.speed * player.facing))) < Game.world.minX))) && (!player.down)) {
player.cx = player.cx + ((ctrl.mr || (ctrl.ml)) ? (-(player.speed * player.facing)) : 0);
player.clip._x = player.cx;
}
}
function playerAnim(act) {
var _local1 = _root;
switch (act) {
case "fire" :
if (player.ammo <= 0) {
setAmmo();
}
if (player.ammo == 0) {
break;
}
player.cAnim = "fire";
_local1.p_c.w_aim.weapon_.gotoAndPlay(2);
_local1.p_c.w_aim.l_arm.gotoAndPlay(2);
_local1.p_c.w_aim.r_arm.gotoAndPlay(2);
id = "b_" + Game.bcCount;
bCase[id] = new Game.bCases(Game.bCount, ((player.facing == 1) ? 1 : -1), -2 + (Math.random() * -3));
bullets.push(bCase[id]);
_local1.bCasesClip.attachMovie("bcClip", id, Game.bcCount);
bCase[id].clip = _local1.bCasesClip[id];
bCase[id].cx = player.cx - ((player.facing == 1) ? 25 : -25);
bCase[id].cy = 210 + (player.down ? 15 : 5);
bCase[id].rotation = (Math.random() * 30) * ((player.facing == 1) ? 1 : -1);
bCase[id].clip._x = bCase[id].cx;
bCase[id].clip._y = bCase[id].cy;
Game.bcCount++;
Game.bcNum++;
ii = 0;
while (ii < player.gunMode) {
if (player.ammo == 0) {
if (player.aClips == 0) {
break;
}
setAmmo();
}
player.ammo = player.ammo - 1;
id = "pc_" + player.pcCount;
_local1.p_c.w_aim.attachMovie("particle", id, player.pcCount);
_local1.p_c.w_aim[id]._x = -30;
_local1.p_c.w_aim[id]._y = 0;
if (enemies.length > 0) {
hitUnit(htTst(player.facing, player.cx - ((player.facing == 1) ? 25 : -25)), ii);
}
Game.pcCount++;
ii++;
}
for (a in _local1.iBar) {
_local1.iBar[a].removeMovieClip();
}
setAmmo();
break;
default :
return(player.cAnim);
}
return(player.cAnim);
}
function moveObjects() {
var _local1 = 0;
while (_local1 < enemies.length) {
if (((!enemies[_local1].hit) && (!enemies[_local1].jumping)) && (enemies[_local1].active)) {
enemies[_local1].flagDist = (((enemies[_local1].cx - 20) > flag_._x) ? (enemies[_local1].cx - flag_._x) : (flag_._x - enemies[_local1].cx));
if (((enemies[_local1].flagDist < 10) && (player.flag.status_ > 0)) && (!enemies[_local1].gu)) {
player.flag.rDown = Math.round(((player.flag.status_ < 100) ? -1 : 0) + (Math.random() * 2));
player.flag.status_ = player.flag.status_ - (settings.godflag ? (player.flag.rDown) : 0.5);
flag_.flaggy_._y = flag_.flaggy_._y + (settings.godflag ? (player.flag.rDown) : 0.5);
flag_.flagStatus._y = flag_.flagStatus._y + (settings.godflag ? (player.flag.rDown) : 0.5);
flag_.flagStatus.text = parseInt(player.flag.status_) + "%";
if (enemies[_local1].clip._currentframe == 1) {
enemies[_local1].clip.gotoAndPlay(2);
}
} else {
if ((enemies[_local1].gu == true) && (enemies[_local1].clip._currentframe == 1)) {
enemies[_local1].gu = false;
enemies[_local1].standing = true;
}
if (((enemies[_local1].clip._currentframe != 1) && (enemies[_local1].jsy == 0)) && (enemies[_local1].standing)) {
enemies[_local1].clip.gotoAndPlay(1);
enemies[_local1].jsx = 0;
}
if ((((enemies[_local1].clip._currentframe != 1) && (enemies[_local1].jsy == 0)) && (!enemies[_local1].standing)) && (!enemies[_local1].gu)) {
enemies[_local1].clip.gotoAndPlay(22);
enemies[_local1].gu = true;
}
if (!enemies[_local1].gu) {
enemies[_local1].cx = enemies[_local1].cx + (enemies[_local1].speed * ((enemies[_local1].dir == 1) ? 1 : -1));
}
if ((((enemies[_local1].cx < 250) && (enemies[_local1].dir == 0)) || ((enemies[_local1].cx > 250) && (enemies[_local1].dir == 1))) && (!enemies[_local1].gu)) {
enemies[_local1].dir = ((enemies[_local1].dir == 0) ? 1 : 0);
enemies[_local1].clip._xscale = ((enemies[_local1].dir == 1) ? -150 : 150);
}
}
}
if ((!enemies[_local1].jumping) && (enemies[_local1].cy < Game.world.maxY)) {
enemies[_local1].jumping = true;
}
if (enemies[_local1].active) {
enemies[_local1].cx = enemies[_local1].cx - enemies[_local1].jsx;
enemies[_local1].cy = enemies[_local1].cy - enemies[_local1].jsy;
if ((enemies[_local1].cx <= Game.world.minX) || (enemies[_local1].cx >= Game.world.maxX)) {
enemies[_local1].jsx = 0;
}
if (enemies[_local1].jumping) {
enemies[_local1].jsy = enemies[_local1].jsy - Game.world.yGrav;
}
if (enemies[_local1].cy > Game.world.maxY) {
enemies[_local1].jumping = false;
enemies[_local1].cy = Game.world.maxY;
enemies[_local1].jsx = 0;
enemies[_local1].jsy = 0;
}
}
enemies[_local1].clip._x = enemies[_local1].cx;
enemies[_local1].clip._y = enemies[_local1].cy;
_local1++;
}
var _local2 = 0;
while (_local2 < gore.length) {
if (gore[_local2].active) {
gore[_local2].cx = gore[_local2].cx - gore[_local2].xs;
gore[_local2].cy = gore[_local2].cy - gore[_local2].ys;
gore[_local2].ys = gore[_local2].ys - Game.world.yGrav;
gore[_local2].clip._x = gore[_local2].cx;
gore[_local2].clip._y = gore[_local2].cy;
}
if (gore[_local2].bType) {
gore[_local2].clip._rotation = gore[_local2].clip._rotation + (gore[_local2].xs * -5);
if ((gore[_local2].cy - gore[_local2].ys) >= (Game.world.maxY - 5)) {
gore[_local2].ys = -(gore[_local2].ys / 2);
gore[_local2].xs = gore[_local2].xs / 1.5;
if (gore[_local2].clip._currentframe != 2) {
gore[_local2].clip.gotoAndPlay(2);
}
}
}
if ((gore[_local2].cy >= Game.world.maxY) && (gore[_local2].active)) {
if (!gore[_local2].bType) {
gore[_local2].active = false;
gore[_local2].xs = (gore[_local2].ys = 0);
gore[_local2].cy = Game.world.maxY;
gore[_local2].clip.gotoAndPlay(2);
gore[_local2].clip._rotation = 0;
}
}
gore[_local2].clip._alpha = gore[_local2].gc;
if (gore[_local2].gc <= 0) {
gore[_local2].clip.removeMovieClip();
gore.splice(_local2, 1);
} else {
gore[_local2].gc = gore[_local2].gc - 1;
}
_local2++;
}
var _local3 = 0;
while (_local3 < ammo.length) {
player.aDist = ((player.cx > ammo[_local3].cx) ? (player.cx - ammo[_local3].cx) : (ammo[_local3].cx - player.cx));
if (player.aDist < 20) {
ammo[_local3].ac = 0;
player.aClips++;
setAmmo();
reloadSound = new Sound();
reloadSound.attachSound("reload");
reloadSound.start(0, 1);
}
if (ammo[_local3].ac <= 0) {
ammo[_local3].clip.gotoAndPlay(61);
ammo.splice(_local3, 1);
} else {
ammo[_local3].ac = ammo[_local3].ac - 1;
}
_local3++;
}
if ((player.flag.status_ == 0) && (player.active)) {
defeat();
}
d = 0;
while (d < bullets.length) {
bullets[d].ys = bullets[d].ys + (Game.world.yGrav * 2);
bullets[d].cx = bullets[d].cx + bullets[d].xs;
bullets[d].cy = bullets[d].cy + bullets[d].ys;
bullets[d].alpha = bullets[d].alpha - 1;
bullets[d].clip._x = bullets[d].cx;
bullets[d].clip._y = bullets[d].cy;
bullets[d].clip._alpha = bullets[d].alpha;
bullets[d].clip._rotation = bullets[d].clip._rotation + bullets[d].rotation;
if ((bullets[d].cy + bullets[d].ys) >= (Game.world.maxY + 8)) {
bullets[d].ys = -parseInt(bullets[d].ys / 2);
}
if (bullets[d].ys == 0) {
bullets[d].cy = Game.world.maxY + 8;
}
if (bullets[d].alpha <= 0) {
bullets[d].clip.removeMovieClip();
bullets.splice(d, 1);
Game.bcNum--;
}
d++;
}
}
function htTst(dir, sRoot) {
var _local2 = sRoot;
var _local3 = dir;
player.cDist = 1000;
player.cHit = "unset";
var _local1 = 0;
while (_local1 < enemies.length) {
if (((_local3 == 1) && (enemies[_local1].cx < _local2)) && (enemies[_local1].active)) {
player.nDist = _local2 - enemies[_local1].cx;
if (player.nDist < player.cDist) {
player.cDist = player.nDist;
player.cHit = _local1;
}
}
if (((_local3 == -1) && (enemies[_local1].cx > _local2)) && (enemies[_local1].active)) {
player.nDist = enemies[_local1].cx - _local2;
if (player.nDist < player.cDist) {
player.cDist = player.nDist;
player.cHit = _local1;
}
}
_local1++;
}
enemies[player.cHit].hitDir = ((player.cx > enemies[player.cHit].cx) ? -1 : 1);
return(player.cHit);
}
function markTarget(dir, sRoot) {
var _local2 = sRoot;
var _local3 = _root;
player.cmDist = 1000;
player.mHit = "unset";
var _local1 = 0;
while (_local1 < enemies.length) {
if (((dir == 1) && (enemies[_local1].cx < _local2)) && (enemies[_local1].active)) {
player.mDist = _local2 - enemies[_local1].cx;
if (player.mDist < player.cmDist) {
player.cmDist = player.mDist;
player.mHit = _local1;
}
}
if (((dir == -1) && (enemies[_local1].cx > _local2)) && (enemies[_local1].active)) {
player.mDist = enemies[_local1].cx - _local2;
if (player.mDist < player.cmDist) {
player.cmDist = player.mDist;
player.mHit = _local1;
}
}
if (player.mHit != "unset") {
enemies[player.mHit].hitDirX = ((player.cx > enemies[player.mHit].cx) ? -1 : 1);
player.gunAngle = getAngle(player.cx - enemies[player.mHit].cx, player.cy - ((enemies[player.mHit].cy + -25) + (player.down ? -15 : 0)));
_local3.p_c.w_aim._rotation = player.gunAngle;
}
_local1++;
}
if (player.mHit != "unset") {
if (!player.marked) {
_local3.attachMovie("mClip", "marker", 1);
_local3.marker._x = enemies[player.mHit].cx;
_local3.marker._y = enemies[player.mHit].cy - 70;
player.marked = true;
}
_local3.marker._x = enemies[player.mHit].cx;
_local3.marker._y = enemies[player.mHit].cy - 70;
}
if ((player.mHit == "unset") && (player.marked == true)) {
_local3.marker.removeMovieClip();
player.marked = false;
}
}
function getAngle(xDist, yDist) {
return((Math.atan2(((player.facing == 1) ? (yDist) : (-yDist)), xDist) * 57.2957795130823) + ((player.facing == -1) ? 180 : 0));
}
function hitUnit(ci, iParam) {
var _local1 = ci;
var _local2 = _root;
if (_local1 == "unset") {
return(0);
}
player.kills++;
_local2.tkBar.dtKills.text = "Kills: " + player.kills;
enemies[_local1].jsx = 5 * (-enemies[_local1].hitDir);
enemies[_local1].jsy = 2;
enemies[_local1].clip.gotoAndPlay(2);
enemies[_local1].active = false;
enemies[_local1].clip.removeMovieClip();
if ((enemies[_local1].itemD > 94) || ((player.ammo == 0) && (player.aClips == 0))) {
id = "a_" + Game.aCount;
ammo[id] = new Game.ammoSpawn(Game.aCount, enemies[_local1].cx);
ammo.push(ammo[id]);
_local2.itemLayer.attachMovie("a_c", id, Game.aCount);
ammo[id].clip = _local2.itemLayer[id];
ammo[id].clip._x = enemies[_local1].cx;
ammo[id].clip._y = 260;
Game.aCount++;
}
addGore(_local1, (player.down ? (5 + (Math.random() * 5)) : 3), parseInt((15 * Settings.goreLevel) / 40), parseInt((20 * Settings.goreLevel) / 40), 3, 100);
id = "ip_" + enemies[_local1].num;
trace(id);
impacts.attachMovie("impact", id, 100 + enemies[id].num);
impacts[id]._x = (enemies[_local1].cx - enemies[_local1].hitDir) - ((enemies[_local1].dir == 1) ? 15 : 0);
impacts[id]._y = enemies[_local1].cy - 40;
enemies.splice(_local1, 1);
return(undefined);
}
function rndm(low, high, mr) {
rand = low + (Math.random() * (high - low));
if (mr) {
rand = Math.round(rand);
}
return(rand);
}
function makeEnemies(rArg) {
if (rArg > 99) {
id = "e_" + Game.eNum;
Game.ri = rndm(0, 100, true);
Game.rd = rndm(0, 1, true);
enemy[id] = new Game.getEnemy(Game.eNum, 1 + (Game.cDif * 3), Game.ri, Game.rd);
enemies.push(enemy[id]);
_root.objLayer.attachMovie("eClip", id, Game.eCount);
enemy[id].clip = _root.objLayer[id];
enemy[id].cx = ((enemy[id].dir == 1) ? 0 : 500);
enemy[id].cy = ((rndm(0, 100, true) > 90) ? (270 - (1 + (Math.random() * 150))) : 270);
enemy[id].jsx = (3 + (Math.random() * 3)) * (-((enemy[id].dir == 0) ? -1 : 1));
enemy[id].jsy = ((rndm(0, 100, true) > 90) ? (1 + (Math.random() * 3)) : 0);
if (!((enemy[id].jsx < 1) && (enemy[id].jsx > -1))) {
enemy[id].clip.gotoAndPlay(21);
}
enemy[id].clip._x = enemy[id].cx;
enemy[id].clip._xscale = ((enemy[id].dir == 1) ? -150 : 150);
enemy[id].clip._y = enemy[id].cy;
enemy[id].clip._yscale = 150;
Game.eCount++;
Game.eNum++;
}
}
function gunBash() {
var _local2 = _root;
_local2.p_c.w_aim.weapon_.gotoAndPlay(26);
_local2.p_c.w_aim.l_arm.gotoAndPlay(26);
_local2.p_c.w_aim.r_arm.gotoAndPlay(26);
var _local1 = 0;
while (_local1 < enemies.length) {
player.cDist = ((player.cx > enemies[_local1].cx) ? (player.cx - enemies[_local1].cx) : (enemies[_local1].cx - player.cx));
player.cyDist = (((player.cy - 30) > enemies[_local1].cy) ? ((player.cy - 30) - (enemies[_local1].cy - 30)) : ((enemies[_local1].cy - 30) - (player.cy - 30)));
if ((player.cDist < 40) && (player.cyDist < 40)) {
if (((enemies[_local1].cx < (player.cx + 10)) && (player.facing == 1)) || ((enemies[_local1].cx > (player.cx - 10)) && (player.facing == -1))) {
enemies[_local1].hitDir = ((player.cx > enemies[_local1].cx) ? -1 : 1);
enemies[_local1].jsx = -((3 + (Math.random() * 2)) * enemies[_local1].hitDir);
enemies[_local1].jsy = 1 + (player.down ? (1 + (Math.random() * 1)) : (Math.random() * 1));
enemies[_local1].clip.gotoAndPlay(22);
enemies[_local1].standing = false;
enemies[_local1].gu = false;
addGore(_local1, 3, parseInt((2 * Settings.goreLevel) / 40) + (player.down ? (parseInt((2 * Settings.goreLevel) / 40)) : 0), parseInt((5 * Settings.goreLevel) / 40) + (player.down ? (parseInt((3 * Settings.goreLevel) / 40)) : 0), 2, 30);
}
}
_local1++;
}
}
function addGore(num, force, min, max, type, scale) {
var _local2 = type;
var _local3 = num;
var _local1 = 0;
while (_local1 < rndm(min, max, true)) {
id = (("g_" + enemies[_local3].num) + "_") + Game.gCount;
gore[id] = new Game.goreSpawn(enemies[_local3].num, -(enemies[_local3].hitDir * rndm((500 - player.cDist) / 200, ((500 - player.cDist) / 200) + force, false)), rndm(-2, force, false));
gore.push(gore[id]);
_root.goreLayer.attachMovie(["bld_" + (((_local1 == 0) && (_local2 == 3)) ? 4 : (rndm(1, _local2, true)))], id, Game.gCount);
gore[id].clip = _root.goreLayer[id];
gore[id].cx = enemies[_local3].cx;
gore[id].cy = enemies[_local3].cy + (((_local1 == 0) && (_local2 == 3)) ? -60 : ((Math.random() * -50) - 10));
gore[id].bType = (((_local1 == 0) && (_local2 == 3)) ? 1 : 0);
gore[id].clip._x = gore[id].cx;
gore[id].clip._y = gore[id].cy;
gore[id].clip._rotation = (((_local1 == 0) && (_local2 == 3)) ? 0 : (Math.random() * 360));
gore[id].clip._xscale = (((_local1 == 0) && (_local2 == 3)) ? 140 : (50 + (Math.random() * scale)));
gore[id].clip._yscale = (((_local1 == 0) && (_local2 == 3)) ? 140 : (50 + (Math.random() * scale)));
Game.gCount++;
_local1++;
}
}
function defeat() {
clearInterval(game.tInt);
player.active = false;
_root.marker.removeMovieClip();
Game.defeat = true;
player.clip._alpha = 30;
player.clip.gotoAndPlay(7);
}
function getScore() {
gotoAndPlay (4);
Mouse.show();
}
function gotoMain() {
gotoAndPlay (3);
}
function checkFPS() {
var _local1 = _root;
Game.cFPS = Game.fCount - Game.cSec;
Game.cSec = Game.fCount;
Game.cInt++;
if ((Game.cInt % 25) == 0) {
Game.level++;
Game.cDif = Game.cDif + 0.1;
player.sFreq = player.sFreq - 1;
_local1.levelBar.gotoAndPlay(2);
_local1.levelBar.lText.dtLevel.text = "Level: " + Game.level;
if (((Game.level == 20) || ((Game.level > 20) && ((Game.level % 5) == 0))) && (Game.displayCheats)) {
_local1.cheatTxt.text = ("Cheat revealed: '" + Settings.cheatList[rndm(0, Settings.cheatList.length - 2, true)]) + "'";
}
}
_local1.tkBar.dtFPS.text = ("(FPS:" + Game.cFPS) + ")";
_local1.tkBar.dtTime.text = "Time: " + Game.cInt;
}
Game = {cDif:0.5, defeat:false, paused:true, eNum:0, aCount:0, eCount:0, gCount:0, gNum:0, cDif:0.01, level:1, fCount:0, cFPS:0, cSec:0, cInt:0, bcCount:0, cLink:_root.Settings.cheats};
Game.world = {minX:0, maxX:500, minY:0, maxY:270, xGrav:0.1, yGrav:0.1};
tunnel = {frequency:500, num:0, current:0, count:0, speed:1.5, xVar:250, yVar:150, xT:250, yT:250};
ctrl = {ml:false, mr:false};
enemy = {};
tunnelE = {};
bCase = {};
player = {active:true, allowFire:true, cx:200, speed:2, ammo:10, aClips:0, kills:0, cAnim:"stand", ur:true, facing:1, sFreq:25, down:false, rDown:true, gunMode:1, gunAngle:0, cx:270, cy:240, pcCount:0};
player.flag = {status_:100, bStatus:100};
player.clip._xscale = 100;
player.clip._yscale = 100;
player.clip._y = 230;
var enemies = new Array();
var gore = new Array();
var ammo = new Array();
var tElements = new Array();
var bullets = new Array();
Game.getEnemy = function (newNum, newSpeed, newItemD, newDir) {
var _local1 = this;
_local1.num = newNum;
_local1.speed = newSpeed;
_local1.itemD = newItemD;
_local1.dir = newDir;
};
Game.getEnemy.prototype.active = true;
Game.getEnemy.prototype.standing = true;
Game.getEnemy.prototype.jsx = 0;
Game.getEnemy.prototype.jsy = 0;
Game.getEnemy.prototype.hit = false;
Game.goreSpawn = function (newNum, newXs, newYs) {
var _local1 = this;
_local1.num = newNum;
_local1.xs = newXs;
_local1.ys = newYs;
};
Game.goreSpawn.prototype.gc = 100;
Game.goreSpawn.prototype.active = true;
Game.ammoSpawn = function (newNum, newCx) {
this.cx = newCx;
};
Game.ammoSpawn.prototype.active = true;
Game.ammoSpawn.prototype.bullets = 10;
Game.ammoSpawn.prototype.ac = 200;
Game.getTunnel = function (newNum, newSpeed) {
this.num = newNum;
this.speed = newSpeed;
};
Game.getTunnel.prototype.alpha = 20;
Game.getTunnel.prototype.scale = 100;
Game.bCases = function (newNum, newXs, newYs) {
var _local1 = this;
_local1.num = newNum;
_local1.xs = newXs;
_local1.ys = newYs;
};
Game.bCases.prototype.active = true;
Game.bCases.prototype.alpha = 100;
_root.onMouseDown = function () {
if (game.paused) {
game.paused = false;
setup();
}
};
_root.onEnterFrame = function () {
if (Game.defeat) {
Settings.tVar = Settings.tVar + 1;
}
tunnel.xDist = ((tunnel.xVar > tunnel.xT) ? (tunnel.xVar - tunnel.xT) : (tunnel.xT - tunnel.xVar));
tunnel.yDist = ((tunnel.yVar > tunnel.yT) ? (tunnel.yVar - tunnel.yT) : (tunnel.yT - tunnel.yVar));
if ((tunnel.xDist < 5) || (tunnel.yDist < 3)) {
tunnel.xT = -150 + (Math.random() * 350);
tunnel.yT = -100 + (Math.random() * 200);
}
tunnel.xVar = tunnel.xVar + ((tunnel.xT - tunnel.xVar) / 30);
tunnel.yVar = tunnel.yVar + ((tunnel.yT - tunnel.yVar) / 30);
if (tunnel.current == Math.round(tunnel.frequency / Settings.tunnelLevel)) {
id = "t_" + tunnel.count;
tunnelE[id] = new Game.getTunnel(tunnel.num, tunnel.speed);
tElements.push(tunnelE[id]);
_root.tLayer.attachMovie("ts", id, tunnel.count);
tunnelE[id].clip = _root.tLayer[id];
tunnelE[id].cx = 250 + tunnel.xVar;
tunnelE[id].cy = 150 + tunnel.yVar;
tunnelE[id].clip._x = tunnelE[id].cx;
tunnelE[id].clip._y = tunnelE[id].cy;
tunnelE[id].clip._rotation = (250 - player.cx) / -5;
tunnel.current = 0;
tunnel.count++;
tunnel.num++;
} else {
tunnel.current++;
}
var _local1 = 0;
while (_local1 < tElements.length) {
tElements[_local1].scale = tElements[_local1].scale + (tElements[_local1].speed * 15);
tElements[_local1].speed = tElements[_local1].speed - (tElements[_local1].speed / -50);
tElements[_local1].alpha = tElements[_local1].alpha + 0.9;
tElements[_local1].clip._x = tElements[_local1].cx;
tElements[_local1].clip._y = tElements[_local1].cy;
tElements[_local1].clip._xscale = tElements[_local1].scale;
tElements[_local1].clip._yscale = tElements[_local1].scale;
tElements[_local1].clip._alpha = tElements[_local1].alpha;
tElements[_local1].clip._rotation = tElements[_local1].clip._rotation + Settings.tVar;
if (tElements[_local1].alpha >= 100) {
tElements[_local1].clip.removeMovieClip();
tElements.splice(_local1, 1);
tunnel.num--;
}
_local1++;
}
markTarget(player.facing, player.cx - ((player.facing == 1) ? 25 : -25));
};
_root.infoLayer.attachMovie("InfoBanner", "InfoBanner", 10);
_root.infoLayer.InfoBanner._x = 25;
_root.infoLayer.InfoBanner._y = 50;
Settings.tVar = 0;
stop();
Instance of Symbol 333 MovieClip "Frames" in Frame 3
onClipEvent (enterFrame) {
if ((!_root.Game.paused) && (!_root.Game.defeat)) {
_root.newFrame();
}
}
onClipEvent (keyDown) {
if (((Key.isDown(32) && (_root.player.allowFire)) && (!_root.Game.paused)) && (!_root.Game.defeat)) {
_root.playerAnim("fire");
_root.test.gotoAndPlay(2);
}
}
Frame 4
function gotoMain() {
gotoAndPlay (4);
}
function gotoGame() {
gotoAndPlay (3);
}
function setScoreBoard() {
Game.fScore = (Game.level * player.kills) + (Game.cInt % 25);
scoreBoard.level_score.htmlText = Game.level + "<font size=\"8\"> (time%25)</font>";
scoreBoard.time_score.htmlText = Game.cInt + "<font size=\"8\"> (sec)</font>";
scoreBoard.kills_score.htmlText = player.kills + "<font size=\"8\"> (units)</font>";
scoreBoard.final_score.htmlText = Game.fScore + "<font size=\"8\"> (points)</font>";
}
stop();
setScoreBoard();
Symbol 11 MovieClip [legs] Frame 1
stop();
Symbol 11 MovieClip [legs] Frame 20
gotoAndPlay (2);
Symbol 31 MovieClip [right_arm] Frame 1
stop();
Symbol 31 MovieClip [right_arm] Frame 10
gotoAndPlay (1);
Symbol 31 MovieClip [right_arm] Frame 45
gotoAndPlay (1);
Symbol 43 MovieClip [shotgun_] Frame 1
_root.player.allowFire = true;
stop();
Symbol 43 MovieClip [shotgun_] Frame 3
if (_root.player.sFreq <= (_currentframe + 1)) {
_root.player.allowFire = true;
} else {
_root.player.allowFire = false;
}
Symbol 43 MovieClip [shotgun_] Frame 4
if (_root.player.sFreq <= (_currentframe + 1)) {
_root.player.allowFire = true;
} else {
_root.player.allowFire = false;
}
Symbol 43 MovieClip [shotgun_] Frame 5
if (_root.player.sFreq <= (_currentframe + 1)) {
_root.player.allowFire = true;
} else {
_root.player.allowFire = false;
}
Symbol 43 MovieClip [shotgun_] Frame 6
if (_root.player.sFreq <= (_currentframe + 1)) {
_root.player.allowFire = true;
} else {
_root.player.allowFire = false;
}
Symbol 43 MovieClip [shotgun_] Frame 7
if (_root.player.sFreq <= (_currentframe + 1)) {
_root.player.allowFire = true;
} else {
_root.player.allowFire = false;
}
Symbol 43 MovieClip [shotgun_] Frame 8
if (_root.player.sFreq <= (_currentframe + 1)) {
_root.player.allowFire = true;
} else {
_root.player.allowFire = false;
}
Symbol 43 MovieClip [shotgun_] Frame 9
if (_root.player.sFreq <= (_currentframe + 1)) {
_root.player.allowFire = true;
} else {
_root.player.allowFire = false;
}
Symbol 43 MovieClip [shotgun_] Frame 10
if (_root.player.sFreq <= (_currentframe + 1)) {
_root.player.allowFire = true;
} else {
_root.player.allowFire = false;
}
Symbol 43 MovieClip [shotgun_] Frame 11
if (_root.player.sFreq <= (_currentframe + 1)) {
_root.player.allowFire = true;
} else {
_root.player.allowFire = false;
}
Symbol 43 MovieClip [shotgun_] Frame 12
if (_root.player.sFreq <= (_currentframe + 1)) {
_root.player.allowFire = true;
} else {
_root.player.allowFire = false;
}
Symbol 43 MovieClip [shotgun_] Frame 13
if (_root.player.sFreq <= (_currentframe + 1)) {
_root.player.allowFire = true;
} else {
_root.player.allowFire = false;
}
Symbol 43 MovieClip [shotgun_] Frame 14
if (_root.player.sFreq <= (_currentframe + 1)) {
_root.player.allowFire = true;
} else {
_root.player.allowFire = false;
}
Symbol 43 MovieClip [shotgun_] Frame 15
if (_root.player.sFreq <= (_currentframe + 1)) {
_root.player.allowFire = true;
} else {
_root.player.allowFire = false;
}
Symbol 43 MovieClip [shotgun_] Frame 16
if (_root.player.sFreq <= (_currentframe + 1)) {
_root.player.allowFire = true;
} else {
_root.player.allowFire = false;
}
Symbol 43 MovieClip [shotgun_] Frame 17
if (_root.player.sFreq <= (_currentframe + 1)) {
_root.player.allowFire = true;
} else {
_root.player.allowFire = false;
}
Symbol 43 MovieClip [shotgun_] Frame 18
if (_root.player.sFreq <= (_currentframe + 1)) {
_root.player.allowFire = true;
} else {
_root.player.allowFire = false;
}
Symbol 43 MovieClip [shotgun_] Frame 19
if (_root.player.sFreq <= (_currentframe + 1)) {
_root.player.allowFire = true;
} else {
_root.player.allowFire = false;
}
Symbol 43 MovieClip [shotgun_] Frame 20
if (_root.player.sFreq <= (_currentframe + 1)) {
_root.player.allowFire = true;
} else {
_root.player.allowFire = false;
}
Symbol 43 MovieClip [shotgun_] Frame 21
if (_root.player.sFreq <= (_currentframe + 1)) {
_root.player.allowFire = true;
} else {
_root.player.allowFire = false;
}
Symbol 43 MovieClip [shotgun_] Frame 22
if (_root.player.sFreq <= (_currentframe + 1)) {
_root.player.allowFire = true;
} else {
_root.player.allowFire = false;
}
Symbol 43 MovieClip [shotgun_] Frame 23
if (_root.player.sFreq <= (_currentframe + 1)) {
_root.player.allowFire = true;
} else {
_root.player.allowFire = false;
}
Symbol 43 MovieClip [shotgun_] Frame 24
if (_root.player.sFreq <= (_currentframe + 1)) {
_root.player.allowFire = true;
} else {
_root.player.allowFire = false;
}
Symbol 43 MovieClip [shotgun_] Frame 25
if (_root.player.sFreq <= (_currentframe + 1)) {
_root.player.allowFire = true;
}
stop();
Symbol 43 MovieClip [shotgun_] Frame 45
gotoAndPlay (1);
Symbol 66 MovieClip [left_arm] Frame 1
stop();
Symbol 66 MovieClip [left_arm] Frame 25
gotoAndStop (1);
Symbol 66 MovieClip [left_arm] Frame 45
_root.player.allowFire = true;
gotoAndPlay (1);
Symbol 67 MovieClip [weapon_aim] Frame 1
stop();
Symbol 75 MovieClip [player_full] Frame 1
stop();
Symbol 75 MovieClip [player_full] Frame 4
stop();
Symbol 75 MovieClip [player_full] Frame 6
_root.ctrl.ml = false;
_root.ctrl.mr = false;
gotoAndPlay (1);
Symbol 75 MovieClip [player_full] Frame 37
stop();
_root.getScore();
Symbol 91 MovieClip Frame 23
gotoAndPlay (2);
Symbol 114 MovieClip [eClip] Frame 1
stop();
stop();
Symbol 114 MovieClip [eClip] Frame 20
gotoAndPlay (2);
Symbol 114 MovieClip [eClip] Frame 21
stop();
Symbol 114 MovieClip [eClip] Frame 22
stop();
Symbol 114 MovieClip [eClip] Frame 41
gotoAndPlay (1);
Symbol 122 MovieClip [a_c] Frame 60
gotoAndPlay (1);
Symbol 122 MovieClip [a_c] Frame 80
stop();
removeMovieClip(this);
Symbol 125 MovieClip [bld_3] Frame 1
stop();
Symbol 125 MovieClip [bld_3] Frame 2
stop();
Symbol 128 MovieClip [bld_2] Frame 1
stop();
Symbol 128 MovieClip [bld_2] Frame 2
stop();
Symbol 131 MovieClip [bld_1] Frame 1
stop();
Symbol 131 MovieClip [bld_1] Frame 2
stop();
Symbol 170 MovieClip [InfoBanner] Frame 1
stop();
Symbol 170 MovieClip [InfoBanner] Frame 20
removeMovieClip(this);
Symbol 172 MovieClip [ts] Frame 1
stop();
Symbol 180 MovieClip [bld_4] Frame 1
stop();
Symbol 180 MovieClip [bld_4] Frame 2
stop();
Symbol 184 MovieClip [impact] Frame 7
removeMovieClip(this);
Symbol 187 MovieClip [particle] Frame 8
removeMovieClip(this);
Symbol 192 Button [clearCheats]
on (press) {
aCheats = [];
}
Symbol 193 Button [clearCheats]
on (press) {
cheatSet.text = "";
}
Symbol 200 Button
on (release) {
_root.bgC.onMenu = true;
_root.cClip.swapDepths(500);
removeMovieClip(this);
}
Symbol 205 Button
on (release) {
_quality = "LOW";
qPointer._x = 42 + (qCoords.getIndex(_quality) * 40);
}
Symbol 206 Button
on (release) {
_quality = "MEDIUM";
qPointer._x = 42 + (qCoords.getIndex(_quality) * 40);
}
Symbol 207 Button
on (release) {
_quality = "HIGH";
qPointer._x = 42 + (qCoords.getIndex(_quality) * 40);
}
Symbol 208 Button
on (release) {
_quality = "BEST";
qPointer._x = 42 + (qCoords.getIndex(_quality) * 40);
}
Instance of Symbol 221 MovieClip "dragObj" in Symbol 222 MovieClip Frame 1
on (press) {
startDrag (this, false, -75, 0, 75, 0);
}
on (release, releaseOutside) {
stopDrag();
}
Symbol 227 Button
on (release) {
setPerformance(0);
}
Symbol 229 Button
on (release) {
setPerformance(2);
}
Symbol 231 Button
on (release) {
setPerformance(1);
}
Symbol 244 MovieClip [OptionsDisplay] Frame 1
function setPerformance(lvl) {
switch (lvl) {
case 0 :
goreSet.dragObj._x = -45;
bgSet.dragObj._x = -25;
_quality = "MEDIUM";
qPointer._x = 42 + (qCoords.getIndex(_quality) * 40);
return;
case 1 :
goreSet.dragObj._x = 0;
bgSet.dragObj._x = 20;
_quality = "HIGH";
qPointer._x = 42 + (qCoords.getIndex(_quality) * 40);
return;
case 2 :
goreSet.dragObj._x = 75;
bgSet.dragObj._x = 75;
_quality = "BEST";
qPointer._x = 42 + (qCoords.getIndex(_quality) * 40);
}
}
var nLG = ((nLT = 0));
goreSet.dragObj._x = Math.round(-75 + ((_root.Settings.goreLevel / 100) * 150));
bgSet.dragObj._x = Math.round(-75 + ((_root.Settings.tunnelLevel / 100) * 150));
Array.prototype.getIndex = function (iTarget) {
var _local1 = this;
var _local2 = iTarget;
f = 0;
while (f < _local1.length) {
if (_local1[f] == _local2) {
return(f);
}
f++;
}
return("x");
};
qCoords = new Array("LOW", "MEDIUM", "HIGH", "BEST");
cheats = new Array("megamachinegun", "antigravity", "gore&lag", "megatunnel", "randomlevel", "godflag");
aCheats = new Array();
qPointer._x = 42 + (qCoords.getIndex(_quality) * 40);
onEnterFrame = function () {
var _local1 = _root;
nLG = Math.round(((75 + goreSet.dragObj._x) / 150) * 100);
nLT = Math.round(((75 + bgSet.dragObj._x) / 150) * 100);
_local1.Settings.goreLevel = nLG;
_local1.Settings.tunnelLevel = nLT;
cLG = ((nLG == 0) ? "None" : (nLG + "%"));
cLT = ((nLT == 0) ? "None" : (nLT + "%"));
dtGore.text = cLG;
dtTunnel.text = cLT;
if (Key.isDown(13) && (cheatSet.text != "")) {
if (cheats.getIndex(cheatSet.text) != "x") {
aCheats.push(cheatSet.text);
_local1.Settings.cheats = aCheats;
cheatSet.text = "##cheat activated##";
}
}
};
Symbol 251 Button [mbArea]
on (release) {
_parent.gotoMain();
}
Symbol 252 Button [mbArea]
on (release) {
Mouse.hide();
_parent.gotoGame();
}
Symbol 278 MovieClip [levelBar] Frame 1
stop();
Symbol 278 MovieClip [levelBar] Frame 30
gotoAndPlay (1);
Symbol 295 MovieClip [Flag] Frame 1
stop();
Symbol 295 MovieClip [Flag] Frame 60
stop();
Symbol 296 Button [mbArea]
on (rollOver) {
if (_root.bgC.onMenu) {
_root.setInfo(3);
}
}
on (release) {
if (_root.bgC.onMenu) {
_root.switchScene(3);
_root.bgC.onMenu = false;
}
}
Symbol 297 Button [mbArea]
on (rollOver) {
if (_root.bgC.onMenu) {
_root.setInfo(2);
}
}
on (release) {
if (_root.bgC.onMenu) {
_root.switchScene(2);
_root.bgC.onMenu = false;
}
}
Symbol 298 Button [mbArea]
on (rollOver) {
if (_root.bgC.onMenu) {
_root.setInfo(1);
}
}
on (release) {
if (_root.bgC.onMenu) {
_root.switchScene(1);
}
}
Symbol 299 Button [mbArea]
on (rollOver) {
if (_root.bgC.onMenu) {
_root.setInfo(0);
}
}
on (release) {
if (_root.bgC.onMenu) {
_root.bgC.onMenu = false;
removeMovieClip(_root.cClip);
_root.switchScene(0);
}
}
Symbol 309 MovieClip Frame 1
stop();
Symbol 309 MovieClip Frame 60
stop();
Symbol 320 MovieClip Frame 1
stop();
Symbol 320 MovieClip Frame 20
gotoAndStop (1);