Frame 1
_focusrect = false;
Stage.showMenu = false;
frame_mc.swapDepths(10000000000000);
ifFrameLoaded (3) {
gotoAndStop (3);
}
Frame 2
gotoAndPlay (1);
Frame 3
function deleteLoader() {
loader.gotoAndStop(3);
loader.onEnterFrame = function () {
if (loader._alpha > 0) {
loader._alpha = loader._alpha - 5;
} else {
delete loader.onEnterFrame;
loader.swapDepths(99);
loader.removeMovieClip();
_root.gotoAndPlay(4);
}
};
}
function Lprogress() {
loader.progressbar.loaderBarN(1, 7, loader.progressbar.percent, "_xscale", 0, "Stop:4");
temploaded = Math.round(getBytesLoaded() / 1024) / Math.round(getBytesTotal() / 1024);
loaded = Math.floor(temploaded);
counter2 = ("" + Math.floor(loader.progressbar.percent)) + " %";
updateAfterEvent();
}
MovieClip.prototype.Init_loaderBar = function (clipP, clipCH, clipPROP) {
return((loader.progressbar._xscale = 0));
};
MovieClip.prototype.loaderBarN = function (ratio, friction, scale, PROP, Level, Event) {
var _local1 = this;
var _local2 = PROP;
var _local3 = _root;
_local1.ratio = "." + ratio;
_local1.friction = "." + friction;
_local1.scale = scale;
_local1.percent = (_local3.getBytesLoaded() / _local3.getBytesTotal()) * 100;
_local1.sPROP = ((_local1.scale - _local1[_local2]) * _local1.ratio) + (_local1.sPROP * _local1.friction);
_local1[_local2] = _local1[_local2] + _local1.sPROP;
if ((_local1.percent >= 100) && (_local1[_local2] >= _local1.percent)) {
clearInterval(MyloadInterval);
Temp = Event.split(":", 2);
EventTemp = Temp[0];
frame = Temp[1];
_local1[_local2] = 120;
switch (EventTemp) {
case "Play" :
_local3[Level].gotoAndPlay("intro");
return;
case "Stop" :
deleteLoader();
}
}
};
loader.onEnterFrame = function () {
if (loader._alpha < 100) {
loader._alpha = loader._alpha + 5;
} else {
delete loader.onEnterFrame;
loader.gotoAndStop(2);
MyloadInterval = setInterval(Lprogress, 31);
}
};
Init_loaderBar();
Frame 6
stop();
Frame 13
movie_mc.gotoAndPlay("van");
Instance of Symbol 37 MovieClip in Frame 13
onClipEvent (load) {
}
Frame 51
String.prototype.remplacer = function (a, b) {
var _local1 = a;
var _local2 = this;
if (_local2.split(_local1).length > 1) {
_local2.split(_local1).join(b).remplacer(_local1, b);
} else {
return(_local2);
}
return(undefined);
};
String.prototype.indexesOf = function (str) {
var _local3 = str;
var _local1 = 0;
var _local2 = [];
do {
_local1 = this.indexOf(_local3, _local1);
if (_local1 != -1) {
_local2[_local2.length] = _local1;
} else {
break;
}
_local1 = _local1 + _local3.length;
} while (_local1);
return(_local2);
};
function nameFail() {
theMessage.htmlText = ("<b>" + username) + "</b> is a really , really bad name...";
username = "";
Selection.setFocus("username_field");
submitted = false;
}
function nameOK(thename) {
trace("nameOK");
var tempName = thename.toLowerCase();
var _local3 = 1;
var pwL = prof_word.length;
var _local1 = 0;
while (_local1 <= pwL) {
var _local2 = prof_word[_local1].toLowerCase();
a = tempName.remplacer(_local2, "*");
if (a == undefined) {
_local3 = 0;
}
_local1++;
}
if (!_local3) {
return(false);
}
return(true);
}
function checkForName(thename) {
trace("checkforname");
if (!prof_word.in_array(thename)) {
return(false);
}
return(true);
}
function checkNameL(thename) {
trace("checknameL");
if (thename.length < 1) {
return(false);
}
return(true);
}
function initChecking() {
trace("initcheck");
username_field.restrict = "a-zA-Z";
Selection.setFocus("username_field");
keyListener.onKeyDown = function () {
if (!(Key.getCode() === 13)) {
} else {
checkNameL();
}
};
Key.addListener(keyListener);
}
function checkName(thename) {
var _local1 = thename;
if ((checkNameL(_local1) & checkForName(_local1)) & nameOK(_local1)) {
return(true);
}
return(false);
}
function loadProfWords() {
trace("loadprofwords");
var myP = new LoadVars();
myP.onLoad = function () {
var _local2 = myP.prof_data.split(",");
var _local1 = _local2.length;
while (_local1-- , _local1 > -1) {
prof_word.push(_local2[_local1]);
}
initChecking();
};
myP.load("profanity2_.txt");
}
stop();
var keyListener = new Object();
var prof_word = new Array();
loadProfWords();
trace("hi!");
Array.prototype.toStringAll = function () {
var _local1 = this;
for (var _local2 in _local1) {
if (_local2 != "toStringAll") {
stringFromArray = (_local1[_local2] + " ") + stringFromArray;
}
}
return(stringFromArray);
};
Array.prototype.in_array = function (value) {
var _local3;
var a = null;
_local3 = this.length;
while (_local3--) {
var _local2 = this[_local3].toLowerCase();
var _local1 = value.toLowerCase();
if (_local2 == _local1) {
a = 1;
}
}
if (a == 1) {
return(false);
}
return(true);
};
submitted = false;
function submitScore() {
var _local1 = _global;
var _local3 = _root;
var _local2 = new LoadVars();
_local2.onLoad = function () {
var _local1 = _root;
if (((_local1._currentframe == 100) || (_local1._currentframe == 101)) || (_local1._currentframe == 102)) {
scoreSubmitted();
}
};
trace((("submitScore var_score=" + _local1.var_score) + " name=") + _local1.var_userName);
_local2.load((((("/competition/scoreSubmitterPage.jhtml?score=" + _local1.var_score) + "&name=") + _local1.var_userName) + "&competitionId=") + _local1.var_compId, "");
}
function closeComp() {
var _local1 = _global;
loadVariables ((("/competition/gameClosePage.jhtml?eligibility=" + _local1.var_eligibility) + "&competitionId=") + _local1.var_compId, "");
getURL ("javascript:closeCompetition()");
}
function getHighScores() {
trace("get high scores");
myS_arr = new Array({pPosition:"", pName:"", pScore:""});
highscoreXML = new XML();
highscoreXML.ignoreWhite = true;
highscoreXML.onLoad = function (success) {
if (success) {
highScoreTable = this.firstChild.childNodes;
var _local2 = 0;
while (_local2 < highScoreTable.length) {
entrants = highScoreTable[_local2].childNodes;
var _local1 = 0;
while (_local1 < entrants.length) {
var_nameArray[_local1] = entrants[_local1].firstChild.firstChild.nodeValue;
var_rawScore[_local1] = entrants[_local1].firstChild.nextSibling.firstChild.nodeValue;
var_formattedScore[_local1] = entrants[_local1].firstChild.nextSibling.nextSibling.firstChild.nodeValue;
var_thisUser[_local1] = entrants[_local1].firstChild.nextSibling.nextSibling.nextSibling.firstChild.nodeValue;
myS_arr.push({pPosition:_local1 + 1, pName:var_nameArray[_local1], pScore:var_rawScore[_local1]});
_local1++;
}
_local2++;
}
}
displayHscore();
};
highscoreXML.load((("/competition/highScoresXMLGen.jhtml?competitionId=" + _global.var_compId) + "&randnum=") + random(9999999));
}
function displayHscore() {
trace("display high scores");
highscores_mc.scoreDisplay.scorefield.text = "";
highscores_mc.scoreDisplay.rankfield.text = "";
highscores_mc.scoreDisplay.namefield.text = "";
highscores_mc.scoreDisplay2.scorefield.text = "";
highscores_mc.scoreDisplay2.rankfield.text = "";
highscores_mc.scoreDisplay2.namefield.text = "";
var _local1 = myS_arr.length - 1;
myS_arr.reverse();
while (_local1 > -1) {
highscores_mc.scoreDisplay.rankfield.htmlText = highscores_mc.scoreDisplay.rankfield.htmlText + (myS_arr[_local1].pPosition + " <br>");
highscores_mc.scoreDisplay.namefield.htmlText = highscores_mc.scoreDisplay.namefield.htmlText + (myS_arr[_local1].pName + " <br>");
highscores_mc.scoreDisplay.scorefield.htmlText = highscores_mc.scoreDisplay.scorefield.htmlText + (myS_arr[_local1].pScore + " <br>");
highscores_mc.scoreDisplay2.rankfield.htmlText = highscores_mc.scoreDisplay2.rankfield.htmlText + (myS_arr[_local1].pPosition + " <br>");
highscores_mc.scoreDisplay2.namefield.htmlText = highscores_mc.scoreDisplay2.namefield.htmlText + (myS_arr[_local1].pName + " <br>");
highscores_mc.scoreDisplay2.scorefield.htmlText = highscores_mc.scoreDisplay2.scorefield.htmlText + (myS_arr[_local1].pScore + " <br>");
trace(myS_arr[_local1].pPosition);
trace(myS_arr[_local1].pName);
trace(myS_arr[_local1].pScore);
}
_local1 = _local1--;
}
function submitMyScore() {
var _local1 = _global;
numServs = 0;
if (played1 & played2) {
targServs = 2;
if (numSubs > 1) {
_local1.var_userName = name1;
_local1.var_score = player1_mc.score;
submitScore();
_local1.var_userName = name2;
_local1.var_score = player2_mc.score;
submitScore();
}
} else if (played1) {
targServs = 1;
_local1.var_userName = name1;
_local1.var_score = player1_mc.score;
submitScore();
} else if (played2) {
targServs = 1;
_local1.var_userName = name2;
_local1.var_score = player2_mc.score;
submitScore();
}
}
function scoreSubmitted() {
numServs++;
if (numServs >= targServs) {
_root.gotoAndStop("highscores");
}
}
stop();
_global.var_localeCode = _root.localeCode;
_global.var_compStatus = _root.compStatus;
_global.var_compId = 88;
_global.var_flashUrlPrefix = _root.flashUrlPrefix;
_global.var_nameArray = new Array();
_global.var_rawScore = new Array();
_global.var_formattedScore = new Array();
_global.var_thisUser = new Array();
_global.var_eligibility = false;
_global.var_score;
stop();
function stopSounds() {
allSounds.setVolume(0);
}
function restoreSounds() {
allSounds.setVolume(normalVolume);
}
function fadeInSound(channel, maxV, inc) {
var _local2 = this;
var myS = _local2["sound_" + channel];
_local2["s_" + channel].onEnterFrame = function () {
enters++;
var _local1 = myS.getVolume();
if (_local1 < maxV) {
myS.setVolume(_local1 + inc);
} else {
delete this["s_" + channel].onEnterFrame;
}
};
}
function fadeOutSound(channel, inc, sname) {
var _local2 = this;
var myS = _local2["sound_" + channel];
_local2["s_" + channel].onEnterFrame = function () {
enters++;
var _local1 = myS.getVolume();
if (_local1 > 0) {
myS.setVolume(_local1 - inc);
} else {
delete this.onEnterFrame;
StopSound(channel, sname);
}
};
}
function StopSound(channel, sname) {
this["sound_" + channel].stop([sname]);
this["s_" + channel].removeMovieClip();
}
function startSound(channel, sname, vol, loop, myLoc) {
var _local1 = channel;
var _local2 = this;
StopSound(_local1, sname);
theStageW = 680;
var tempPan = ((myLoc / theStageW) * 200);
var _local3 = tempPan - 100;
_local2.createEmptyMovieClip("s_" + _local1, 4030400 + _local1);
_local2["sound_" + _local1] = new Sound("s_" + _local1);
_local2["sound_" + _local1].attachSound(sname);
_local2["sound_" + _local1].setVolume(vol);
_local2["sound_" + _local1].stop([sname]);
if (myLoc != Void) {
_local2["sound_" + _local1].setPan(_local3);
} else {
_local2["sound_" + _local1].setPan(0);
}
_local2["sound_" + _local1].start(0, loop);
}
function startBadSound(channel, sname, vol, loop, myLoc) {
var _local1 = channel;
var _local2 = this;
theStageW = 680;
var tempPan = ((myLoc / theStageW) * 200);
var _local3 = tempPan - 100;
_local2.createEmptyMovieClip("s_" + _local1, 4030400 + _local1);
_local2["sound_" + _local1] = new Sound("s_" + _local1);
_local2["sound_" + _local1].attachSound(sname);
_local2["sound_" + _local1].setVolume(vol);
_local2["sound_" + _local1].stop([sname]);
if (myLoc != Void) {
_local2["sound_" + _local1].setPan(_local3);
} else {
_local2["sound_" + _local1].setPan(0);
}
_local2["sound_" + _local1].start(0, loop);
}
function changeVolume(channel, vol) {
return(this["sound_" + channel].setVolume(vol));
}
function mixTo(music, vol) {
fadeOutSound(activeSound + 1, 3, oldname);
activeSound = !activeSound;
startSound(activeSound + 1, music, 0, 99999999);
fadeInSound(activeSound + 1, 70, 2);
oldname = music;
}
_global.allSounds = new Sound(this);
_global.normalVolume = 100;
if (!menustarted) {
activeSound = 1;
mixTo("menu");
menustarted = true;
}
_quality = "HIGH";
Frame 60
stop();
keyjoined = false;
mousejoined = false;
if (numplayaz == 1) {
keyListener = new Object();
keyListener.onKeyUp = function () {
theCode = Key.getCode();
if (theCode == 32) {
Key.removeListener(keyListener);
Mouse.removeListener(mouseListener);
input = "keys";
_root.startSound(6, "powerup", 100, 1);
gotoAndStop ("game");
}
};
Key.addListener(keyListener);
mouseListener = new Object();
mouseListener.onMouseDown = function () {
if (_root._ymouse < 317) {
Key.removeListener(keyListener);
Mouse.removeListener(mouseListener);
input = "mouse";
_root.startSound(6, "powerup", 100, 1);
gotoAndStop ("game");
}
};
Mouse.addListener(mouseListener);
} else if (numplayaz == 2) {
keyListener = new Object();
keyListener.onKeyUp = function () {
theCode = Key.getCode();
if (theCode == 32) {
keyJoined = true;
Key.removeListener(keyListener);
instructions.start2.gotoAndStop("thanks");
_root.startSound(6, "powerup", 100, 1);
if (mousejoined) {
input = "both";
gotoAndStop ("game");
}
}
};
Key.addListener(keyListener);
mouseListener = new Object();
mouseListener.onMouseDown = function () {
if (_root._ymouse < 317) {
mousejoined = true;
Mouse.removeListener(mouseListener);
instructions.start1.gotoAndStop("thanks");
_root.startSound(6, "powerup", 100, 1);
if (keyJoined) {
input = "both";
gotoAndStop ("game");
}
}
};
Mouse.addListener(mouseListener);
}
Frame 70
stop();
trace("reached frame");
getHighScores();
_quality = "HIGH";
Frame 80
stop();
Frame 90
stop();
function initGame() {
trace("init game");
if (input == "both") {
initPlayer1();
initPlayer2();
}
if (input == "mouse") {
initPlayer1();
keyListener = new Object();
keyListener.onKeyUp = function () {
theCode = Key.getCode();
if (theCode == 32) {
Key.removeListener(keyListener);
initPlayer2();
}
};
Key.addListener(keyListener);
}
if (input == "keys") {
initPlayer2();
mouseListener = new Object();
mouseListener.onMouseDown = function () {
Mouse.removeListener(mouseListener);
initPlayer1();
};
Mouse.addListener(mouseListener);
}
}
function initPlayer1() {
var _local1 = this;
played1 = true;
_root.attachMovie("ship1", "player1_mc", 99999999, {_x:200, _y:600});
player1_mc.createEmptyMovieClip("life_mc", 2);
player1_mc.weaponList = [0, 0, 0, 0, 0, 0];
player1_mc.chargeList = [0, 0, 0, 0, 0, 0];
player1_mc.score = 0;
player1_mc.beam = "nothing";
levelUp(player1_mc, 1);
activePlayers.push(player1_mc);
player1_mc.lives = 5;
if (cheatMode) {
player1_mc.lives = 999;
}
updateLives();
player1_mc.alive = false;
player1_mc.createEmptyMovieClip("vun_timer", 27);
player1_mc.vun_timer.onEnterFrame = function () {
var _local1 = this;
_local1.timer++;
if (_local1.timer > 50) {
_local1._parent.alive = true;
_local1.removeMovieClip();
}
};
player1_mc.hit_mc._visible = false;
player1_mc.channel = 8;
gui.p1join.gotoAndStop(2);
player1_mc.onEnterFrame = function () {
var _local1 = this;
if (_local1.firing) {
fireGun(player1_mc);
}
i = 1;
while (i < _local1.chargeList.length) {
_local1.chargeList[i] = _local1.chargeList[i] + 1;
i++;
}
_local1.tx = _xmouse;
_local1.ty = _ymouse;
if (_local1.tx > (RIGHT - 30)) {
_local1.tx = RIGHT - 30;
} else if (_local1.tx < 30) {
_local1.tx = 30;
}
if (_local1.ty > (BOTTOM - 40)) {
_local1.ty = BOTTOM - 40;
} else if (_local1.ty < (BOTTOM - 310)) {
_local1.ty = BOTTOM - 310;
}
var _local2 = (_local1.tx - _local1._x) / 5;
_local1._x = _local1._x + _local2;
_local1.beam._x = _local1._x;
var dy = ((_local1.ty - _local1._y) / 5);
_local1._y = _local1._y + dy;
_local1.beam._y = _local1._y + 20;
var _local3 = Math.sqrt((_local2 * _local2) + (dy * dy));
if (_local3 > 20) {
_local3 = 20;
}
_local1.boost1_mc._xscale = _local3 * 5;
_local1.boost1_mc._yscale = _local3 * 5;
_local1.boost2_mc._xscale = _local3 * 5;
_local1.boost2_mc._yscale = _local3 * 5;
if (_local2 > 2) {
_local1.fighter_mc.gotoAndStop(2);
if (_local2 > 4) {
_local1.fighter_mc.gotoAndStop(3);
}
} else if (_local2 < -2) {
_local1.fighter_mc.gotoAndStop(6);
if (_local2 < -4) {
_local1.fighter_mc.gotoAndStop(5);
}
} else {
_local1.fighter_mc.gotoAndStop(1);
}
};
mouseListener = new Object();
mouseListener.onMouseDown = function () {
player1_mc.firing = true;
};
mouseListener.onMouseUp = function () {
player1_mc.firing = false;
killBeam(player1_mc);
};
Mouse.addListener(mouseListener);
}
function initPlayer2() {
var _local1 = this;
played2 = true;
_root.attachMovie("ship2", "player2_mc", 99999998, {_x:200, _y:600});
player2_mc.createEmptyMovieClip("life_mc", 2);
player2_mc.weaponList = [0, 0, 0, 0, 0, 0];
player2_mc.chargeList = [0, 0, 0, 0, 0, 0];
player2_mc.score = 0;
player2_mc.beam = "nothing";
levelUp(player2_mc, 1);
activePlayers.push(player2_mc);
player2_mc.lives = 5;
if (cheatMode) {
player2_mc.lives = 999;
}
updateLives();
player2_mc.alive = false;
player2_mc.createEmptyMovieClip("vun_timer", 27);
player2_mc.vun_timer.onEnterFrame = function () {
var _local1 = this;
_local1.timer++;
if (_local1.timer > 50) {
_local1._parent.alive = true;
_local1.removeMovieClip();
}
};
player2_mc.hit_mc._visible = false;
player2_mc.tx = player2_mc._x;
player2_mc.ty = player2_mc._y;
player2_mc.channel = 12;
gui.p2join.gotoAndStop(2);
player2_mc.onEnterFrame = function () {
var _local1 = this;
if (_local1.firing) {
fireGun(player2_mc);
}
i = 1;
while (i < _local1.chargeList.length) {
_local1.chargeList[i] = _local1.chargeList[i] + 1;
i++;
}
if (Key.isDown(32)) {
_local1.firing = true;
} else {
_local1.firing = false;
}
if (_local1.firing) {
if (_local1.fireTime >= _local1.fireRate) {
fireGun(player2_mc);
_local1.fireTime = 1;
}
_local1.fireTime++;
}
if (Key.isDown(39)) {
player2_mc.moveX = 25;
} else if (Key.isDown(37)) {
player2_mc.moveX = -25;
} else {
player2_mc.moveX = 0;
}
if (Key.isDown(38)) {
player2_mc.moveY = -25;
} else if (Key.isDown(40)) {
player2_mc.moveY = 25;
} else {
player2_mc.moveY = 0;
}
_local1.tx = _local1.tx + _local1.moveX;
_local1.ty = _local1.ty + _local1.moveY;
if (_local1.tx > (RIGHT - 30)) {
_local1.tx = RIGHT - 30;
} else if (_local1.tx < 30) {
_local1.tx = 30;
}
if (_local1.ty > (BOTTOM - 40)) {
_local1.ty = BOTTOM - 40;
} else if (_local1.ty < (BOTTOM - 310)) {
_local1.ty = BOTTOM - 310;
}
var _local2 = (_local1.tx - _local1._x) / 5;
_local1._x = _local1._x + _local2;
var _local3 = (_local1.ty - _local1._y) / 5;
_local1._y = _local1._y + _local3;
var boostHyp = Math.sqrt((_local2 * _local2) + (_local3 * _local3));
if (boostHyp > 20) {
boostHyp = 20;
}
_local1.flame1_mc._xscale = boostHyp * 5;
_local1.flame1_mc._yscale = boostHyp * 5;
_local1.flame2_mc._xscale = boostHyp * 5;
_local1.flame2_mc._yscale = boostHyp * 5;
_local1.beam._x = _local1._x;
_local1.beam._y = _local1._y + 20;
var boostHyp = Math.sqrt((_local2 * _local2) + (_local3 * _local3));
_local1.boost1_mc._xscale = (_local1.boost1_mc._yscale = boostHyp / 3);
if (_local2 > 2) {
_local1.fighter_mc.gotoAndStop(2);
if (_local2 > 4) {
_local1.fighter_mc.gotoAndStop(3);
}
} else if (_local2 < -2) {
_local1.fighter_mc.gotoAndStop(6);
if (_local2 < -4) {
_local1.fighter_mc.gotoAndStop(5);
}
} else {
_local1.fighter_mc.gotoAndStop(1);
}
};
keyListener = new Object();
keyListener.onKeyDown = function () {
};
keyListener.onKeyUp = function () {
theCode = Key.getCode();
if (theCode == 32) {
killBeam(player2_mc);
player2_mc.firing = false;
}
};
Key.addListener(keyListener);
}
function nextEvent() {
trace("next event");
theEvent++;
if (theEvent == 1) {
mixTo("techno");
startDrips();
} else if (theEvent == 2) {
mixTo("tetsuo");
createWorm();
} else if (theEvent == 3) {
mixTo("techno");
startMaker("wave", 10, 10);
} else if (theEvent == 4) {
startSpiders();
} else if (theEvent == 5) {
mixTo("tetsuo");
addWasp();
} else if (theEvent == 6) {
mixTo("techno");
startMaker("wave", 10, 10);
} else if (theEvent == 7) {
startMaker("hunter", 5, 100);
} else if (theEvent == 8) {
mixTo("liquidsky");
createBoss(false);
} else if (theEvent == 9) {
addFatman();
} else if (theEvent == 10) {
mixTo("techno");
startMaker("wave", 10, 10);
} else if (theEvent == 11) {
startMaker("hunter", 5, 100);
} else if (theEvent == 12) {
addAces();
} else if (theEvent == 13) {
mixTo("tetsuo");
addGiant();
} else {
theEvent = 0;
nextEvent();
}
}
function getTheDepth() {
theDepth++;
return(theDepth);
}
function hit(player) {
var _local1 = this;
var _local2 = player;
if (_local2.alive) {
startsound(8, "powerdown", 100, 1);
startsound(9, "bomb", 100, 1);
var _local3 = getTheDepth();
var newexp = _root.attachMovie("explosion", "exp" + (1000000 + _local3), 1000000 + _local3, {_x:_local2._x, _y:_local2._y + 30, _xscale:200, _yscale:200});
_local2.alive = false;
_local2.lives--;
updateLives();
if (_local2.lives < 1) {
killPlayer(_local2);
}
removePower(_local2);
hitman(_local2);
_local2.life_mc.onEnterFrame = function () {
var _local1 = this;
_local1.timer++;
_local1.colTime++;
if (_local1.colTime > 3) {
_local1.col = !_local1.col;
_local1.colTime = 0;
if (_local1.col) {
makeTrans(_local1._parent);
} else {
recolor(_local1._parent);
}
}
if (_local1.timer > 60) {
recolor(_local1._parent);
_local1.timer = 0;
_local1._parent.alive = true;
delete _local1.onEnterFrame;
}
};
}
}
function hitman(player) {
var _local1 = player;
_local1.my_color = new Color(_local1);
_local1.my_color.setRGB(16777215);
}
function recolor(player) {
player.my_color.setTransform({ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0});
x = delete player.my_color;
}
function makeTrans(player) {
var _local1 = player;
_local1.my_color = new Color(_local1);
_local1.my_color.setTransform({ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:30, ab:0});
}
function killBeam(player) {
var _local1 = player;
delete _local1.beam.onEnterFrame;
removeMovieClip(_local1.beam);
_local1.beam = "nothing";
}
function fireGun(player) {
var _local1 = player;
if (_local1.weaponList[1]) {
if (_local1.chargeList[1] > 15) {
shoot(0, _local1, "fireball", "fireball", 1, 15, -15);
shoot(0, _local1, "fireball", "fireball", 1, 15, 15);
_local1.chargeList[1] = 0;
startSound(_local1.channel + 1, "shoot1", 40, 1);
}
}
if (_local1.weaponList[2]) {
if (_local1.chargeList[2] > 20) {
shoot(0, _local1, "fireball", "flame", 0.5, 10);
shoot(2, _local1, "fireball", "flame", 0.5, 10);
shoot(-2, _local1, "fireball", "flame", 0.5, 10);
shoot(4, _local1, "fireball", "flame", 0.5, 10);
shoot(-4, _local1, "fireball", "flame", 0.5, 10);
_local1.chargeList[2] = 0;
startSound(_local1.channel + 2, "shoot2", 80, 1);
}
}
if (_local1.weaponList[3]) {
if (_local1.chargeList[3] > 4) {
shoot(0, _local1, "fireball", "laser", 0.2, 20);
_local1.chargeList[3] = 0;
startSound(_local1.channel + 3, "shoot3", 40, 1);
}
}
if (_local1.weaponList[4]) {
if (_local1.chargeList[4] > 17) {
shoot(0, _local1, "heat", "rocket", 2, 15);
_local1.chargeList[4] = 0;
startSound(_local1.channel + 4, "shoot4", 30, 1);
}
}
}
function shoot(theAngle, player, ammo, skin, strength, speed, offset) {
var _local1 = this;
numBalls++;
if (typeof(skin) != "string") {
skin = "fireball";
}
var newBul = _root.attachMovie(skin, "ball" + numBalls, 10000 + numBalls, {_x:player._x + offset, _y:player._y, _xscale:100, _yscale:100, angle:theAngle, owner:player, ammo:ammo, speed:speed, strength:strength});
bulList.push(newBul);
if (ammo == "heat") {
newBul.onEnterFrame = function () {
var _local1 = this;
if (!_local1.found) {
_local1._y = _local1._y - _local1.speed;
_local1._x = _local1._x + _local1.angle;
_local1._rotation = 0;
} else if (typeof(_local1.heatTarget._x) != "undefined") {
var myAngle = (90 - lineAngle2Standard(_local1._x, _local1._y, _local1.heatTarget._x, _local1.heatTarget._y));
_local1._rotation = myAngle;
theta = convertDeg(_local1._rotation, "rad");
_local1.dx = Math.sin(theta) * _local1.speed;
_local1.dy = Math.cos(theta) * _local1.speed;
_local1._x = _local1._x + _local1.dx;
_local1._y = _local1._y - _local1.dy;
} else {
_local1.found = false;
}
if (!_local1.found) {
shortest = 999999999999;
totalBads = badList.length;
i = 0;
while (i < totalBads) {
var _local2 = badList[i];
if (typeof(_local2._x) != "undefined") {
var _local3 = _local1._x - _local2._x;
var adj = (_local1._y - _local2._y);
var hyp = Math.sqrt((_local3 * _local3) + (adj * adj));
if (hyp < shortest) {
_local1.heatTarget = _local2;
shortest = hyp;
_local1.found = true;
}
}
i++;
}
}
totalBads = badList.length;
i = 0;
while (i < totalBads) {
var _local2 = badList[i];
if (_local2.hitTest(_local1._x, _local1._y, true)) {
if (typeof(_local2.hitArea) == "movieclip") {
if (_local2.hitArea.hitTest(_local1._x, _local1._y, true)) {
hitEnemy(_local2, _local1.owner);
delete _local1.onEnterFrame;
removeMovieClip(_local1);
}
} else {
hitEnemy(_local2, _local1.owner);
delete _local1.onEnterFrame;
removeMovieClip(_local1);
}
}
i++;
}
testBulletEdges(_local1);
};
} else if (ammo == "beam") {
player.beam = newBul;
newBul._xscale = 0;
newBul._alpha = 0;
newBul.dir = 1;
newBul.pulse = 1;
newBul.onEnterFrame = function () {
var _local2 = this;
_local2._xscale = _local2._xscale + (3 * _local2.dir);
_local2._alpha = _local2._alpha + 8;
if (_local2._xscale > 80) {
_local2._xscale = 80;
_local2.dir = -1;
} else if (_local2._xscale < 40) {
_local2.dir = 1;
}
if (_local2._alpha > 100) {
_local2._alpha = 100;
}
totalBads = badList.length;
i = 0;
while (i < totalBads) {
var _local1 = badList[i];
if (_local1._y > -10) {
if ((((_local1._x - (_local1._width / 2)) < _local2._x) && ((_local1._x + (_local1._width / 2)) > _local2._x)) && (_local1._y < _local2._y)) {
hitEnemy(_local1, _local2.owner, _local2.strength);
}
}
i++;
}
};
} else {
newBul.onEnterFrame = function () {
var _local1 = this;
testBulletEdges(_local1);
_local1._y = _local1._y - _local1.speed;
_local1._x = _local1._x + _local1.angle;
totalBads = badList.length;
i = 0;
while (i < totalBads) {
var _local2 = badList[i];
if (_local2.hitTest(_local1._x, _local1._y, true)) {
if (typeof(_local2.hitArea) == "movieclip") {
if (_local2.hitArea.hitTest(_local1._x, _local1._y, true)) {
hitEnemy(_local2, _local1.owner);
delete _local1.onEnterFrame;
removeMovieClip(_local1);
}
} else {
hitEnemy(_local2, _local1.owner);
delete _local1.onEnterFrame;
removeMovieClip(_local1);
}
}
i++;
}
};
}
}
function testBulletEdges(my_mc) {
var _local1 = my_mc;
if (_local1._y < -10) {
delete _local1.onEnterFrame;
_local1.removeMovieClip();
} else if (_local1._x < -10) {
delete _local1.onEnterFrame;
_local1.removeMovieClip();
} else if (_local1._x > (RIGHT + 10)) {
delete _local1.onEnterFrame;
_local1.removeMovieClip();
} else if (_local1._y > (BOTTOM + 10)) {
delete _local1.onEnterFrame;
_local1.removeMovieClip();
}
}
function addPickup(x, y, powerType) {
var _local1 = this;
numPicks++;
if (typeof(powerType) == "undefined") {
powerType = random(4) + 2;
}
newPick = _local1.attachMovie("pickup_mc", "pickup" + numPicks, 6000 + numPicks, {_x:x, _y:y, xspeed:1, yspeed:1, powerType:powerType});
newPick.gotoAndStop(newPick.powerType);
newPick.onEnterFrame = function () {
var _local1 = this;
_local1.timer++;
if (_local1.timer > 600) {
_local1._alpha = _local1._alpha - 2;
if (_local1._alpha < 0) {
_local1.removeMovieClip();
}
}
_local1._x = _local1._x + _local1.xspeed;
_local1._y = _local1._y + _local1.yspeed;
if (_local1._y < 0) {
_local1._y = 0;
_local1.yspeed = -_local1.yspeed;
} else if (_local1._y > BOTTOM) {
_local1._y = BOTTOM;
_local1.yspeed = -_local1.yspeed;
}
if (_local1._x < 0) {
_local1._x = 0;
_local1.xspeed = -_local1.xspeed;
} else if (_local1._x > RIGHT) {
_local1._x = RIGHT;
_local1.xspeed = -_local1.xspeed;
}
if (player1_mc.hit_mc.hitTest(_local1._x, _local1._y, true)) {
levelUp(player1_mc, _local1.powerType);
startSound(6, "powerup", 100, 1);
_local1.removeMovieClip();
} else if (player2_mc.hit_mc.hitTest(_local1._x, _local1._y, true)) {
levelUp(player2_mc, _local1.powerType);
startSound(6, "powerup", 100, 1);
_local1.removeMovieClip();
}
};
picksList.push(newPick);
}
function levelUp(player, level) {
var _local1 = level;
var _local2 = player;
if (_local1 != 5) {
_local2.weaponList = [1, 1, 0, 0, 0, 0];
}
_local2.weaponList[_local1] = 1;
if (_local1 == 5) {
_local2.lives++;
updateLives();
}
}
function removePower(player) {
var _local2 = player;
i = 2;
while (i <= 4) {
if (_local2.weaponList[i] != 0) {
var _local1 = i;
}
i++;
}
_local2.weaponList[_local1] = 0;
}
function badFire(theSource, theType, offsetY) {
var _local1 = this;
numBadBalls++;
if (theType == 1) {
pic = "badrocket";
startBadSound(5, "enemy_gun", 60, 1);
size = 1;
} else if (theType == 2) {
pic = "dollar";
size = 0.5;
} else if (theType == 3) {
startBadSound(5, "enemy_gun", 60, 1);
pic = "fireball";
size = 1;
} else if (theType == 4) {
pic = "bee";
size = 1;
} else if (theType == 5) {
startBadSound(5, "enemy_gun", 60, 1);
pic = "badrocket";
size = 1;
} else if (theType == 6) {
pic = "beam";
size = 1;
} else if (theType == 7) {
pic = "flame";
size = 1;
}
var _local3 = _root.attachMovie(pic, "badball" + numBadBalls, 11000 + numBadBalls, {_x:theSource._x, _y:theSource._y + offsetY, _xscale:100 * size, _yscale:-100 * size, myType:theType, owner:theSource});
bulList.push(_local3);
if (theType == 4) {
_local3.speed = 6 + (Math.random() * 3);
_local3.prone = true;
_local3.hits = 1;
badList.push(_local3);
_local3.onEnterFrame = function () {
var _local1 = this;
_local1.timer++;
if (_local1.timer > 100) {
hitEnemy(_local1, "noone", 2);
}
testBulletEdges(_local1);
if (!_local1.found) {
_local1._y = _local1._y - _local1.speed;
_local1._x = _local1._x + _local1.angle;
} else {
if (typeof(_local1.heatTarget._x) != "undefined") {
var _local2 = 90 - lineAngle2Standard(_local1._x, _local1._y, _local1.heatTarget._x, _local1.heatTarget._y);
_local1._rotation = _local2;
theta = convertDeg(_local1._rotation, "rad");
_local1.dx = Math.sin(theta) * _local1.speed;
_local1.dy = Math.cos(theta) * _local1.speed;
}
_local1._x = _local1._x + _local1.dx;
_local1._y = _local1._y - _local1.dy;
}
if (!_local1.found) {
_local1.heatTarget = activePlayers[random(activePlayers.length)];
_local1.found = true;
}
if (player1_mc.hit_mc.hitTest(_local1._x, _local1._y, true)) {
hit(player1_mc);
delete _local1.onEnterFrame;
removeMovieClip(_local1);
}
if (player2_mc.hit_mc.hitTest(_local1._x, _local1._y, true)) {
hit(player2_mc);
delete _local1.onEnterFrame;
removeMovieClip(_local1);
}
};
} else if (theType == 5) {
_local3.speed = 3 + (Math.random() * 3);
_local3.onEnterFrame = function () {
var _local1 = this;
if (!_local1.found) {
_local1._y = _local1._y - _local1.speed;
_local1._x = _local1._x + _local1.angle;
} else {
if (typeof(_local1.heatTarget._x) != "undefined") {
theta = convertDeg(_local1._rotation, "rad");
_local1.dx = Math.sin(theta) * _local1.speed;
_local1.dy = Math.cos(theta) * _local1.speed;
}
_local1._x = _local1._x - _local1.dx;
_local1._y = _local1._y + _local1.dy;
}
if (!_local1.found) {
_local1.heatTarget = activePlayers[random(activePlayers.length)];
_local1.found = true;
var _local2 = 180 + (90 - lineAngle2Standard(_local1._x, _local1._y, _local1.heatTarget._x, _local1.heatTarget._y));
_local1._rotation = _local2;
}
if (player1_mc.hit_mc.hitTest(_local1._x, _local1._y, true)) {
hit(player1_mc);
delete _local1.onEnterFrame;
removeMovieClip(_local1);
}
if (player2_mc.hit_mc.hitTest(_local1._x, _local1._y, true)) {
hit(player2_mc);
delete _local1.onEnterFrame;
removeMovieClip(_local1);
}
if (_local1._y > (BOTTOM + 5)) {
_local1.removeMovieClip();
} else if (_local1._y < -5) {
_local1.removeMovieClip();
}
if (_local1._x > (RIGHT + 5)) {
_local1.removeMovieClip();
} else if (_local1._x < -5) {
_local1.removeMovieClip();
}
};
} else if (theType == 6) {
numBads++;
_local3.swapDepths(110000 + numBads);
_local3.owner.beam = _local3;
_local3._xscale = 0;
_local3._alpha = 0;
_local3.dir = 1;
_local3.pulse = 1;
_local3.onEnterFrame = function () {
var _local2 = this;
_local2._xscale = _local2._xscale + (3 * _local2.dir);
_local2._alpha = _local2._alpha + 8;
if (_local2._xscale > 80) {
_local2._xscale = 80;
_local2.dir = -1;
} else if (_local2._xscale < 0) {
delete _local2.onEnterFrame;
_local2.removeMovieClip();
}
if (_local2._alpha > 100) {
_local2._alpha = 100;
}
totalGoods = activePlayers.length;
i = 0;
while (i < totalGoods) {
var _local1 = activePlayers[i];
if (_local2._alpha > 20) {
if ((((_local1._x - (_local1._width / 2)) < _local2._x) && ((_local1._x + (_local1._width / 2)) > _local2._x)) && (_local1._y > _local2._y)) {
hit(_local1);
}
}
i++;
}
};
} else if (theType == 7) {
_local3.onEnterFrame = function () {
var _local1 = this;
_local1._y = _local1._y + 35;
_local1._xscale = 100;
_local1._yscale = 150;
if (_local1._y > (BOTTOM + 50)) {
_local1.removeMovieClip();
}
if (player1_mc.hit_mc.hitTest(_local1._x, _local1._y, true)) {
hit(player1_mc);
delete _local1.onEnterFrame;
removeMovieClip(_local1);
}
if (player2_mc.hit_mc.hitTest(_local1._x, _local1._y, true)) {
hit(player2_mc);
delete _local1.onEnterFrame;
removeMovieClip(_local1);
}
};
} else {
_local3.onEnterFrame = function () {
var _local1 = this;
_local1._y = _local1._y + 10;
if (_local1._y > (BOTTOM + 50)) {
_local1.removeMovieClip();
}
if (player1_mc.hit_mc.hitTest(_local1._x, _local1._y, true)) {
hit(player1_mc);
delete _local1.onEnterFrame;
removeMovieClip(_local1);
}
if (player2_mc.hit_mc.hitTest(_local1._x, _local1._y, true)) {
hit(player2_mc);
delete _local1.onEnterFrame;
removeMovieClip(_local1);
}
};
}
}
function hitEnemy(anEnemy, shooter, strength) {
var _local1 = anEnemy;
var _local2 = this;
if (strength <= 0) {
strength = 1;
}
startSound(7, "thud", 70, 1);
_local1.my_color = new Color(_local1);
_local1.my_color.setRGB(16777215);
var aFlasher = _local1.createEmptyMovieClip("flasher", 100);
aFlasher.onEnterFrame = function () {
var _local1 = this;
_local1.timer++;
if (_local1.timer > 3) {
_local1._parent.my_color.setTransform({ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0});
x = delete _local1._parent.my_color;
_local1.removeMovieClip();
}
};
if (_local1.prone) {
_local1.hits = _local1.hits - strength;
}
if (_local1.hits <= 0) {
shooter.score = shooter.score + _local1.points;
updateScores();
if (_local1.killAnim.length < 1) {
var tmpEx = "explosion";
var _local3 = 1.5;
} else {
var tmpEx = _local1.killAnim;
var _local3 = 2;
}
startSound(7, "hit", 120, 1);
_root.attachMovie(tmpEx, "exp" + (1000 + numBalls), 1000 + numBalls, {_x:_local1._x, _y:_local1._y, _xscale:100 * _local3, _yscale:100 * _local3});
removeFromList(_local1);
removeFromArray(badList, _local1);
if (_local1.killEvent) {
addPickup(_local1._x, _local1._y);
nextEvent();
}
_local1.removeMovieClip();
}
}
function createDrip() {
var _local1 = this;
trace("create drip");
var depth = _local1.getTheDepth();
size = random(60) + 50;
pos = random(RIGHT);
numBads++;
var newDrip = _local1.attachMovie("drip", "enemy" + depth, 110000 + numBads, {_x:pos, _xscale:size, _yscale:size, _alpha:85, xspeed:Math.random(), yspeed:1, num:depth, hits:1, prone:1, points:50});
badList.push(newDrip);
var newTarg1 = newDrip.attachMovie("target_mc", "targ", 587, {_xscale:350, _yscale:350, _visible:false});
newDrip.onEnterFrame = function () {
var _local1 = this;
_local1._alpha = 80 - (60 * (_local1._y / BOTTOM));
_local1.friction = _local1.friction + ((0.5 - Math.random()) / 10);
if (_local1._y > 100) {
if (!_local1.played) {
_local1.played = true;
_local1.play();
}
}
if (_local1.friction < 0) {
_local1.friction = 0;
}
_local1.yspeed = _local1.yspeed + 0.07;
_local1.yspeed = _local1.yspeed + _local1.friction;
if (_local1.yspeed < 0) {
_local1.yspeed = 0;
}
_local1._y = _local1._y + _local1.yspeed;
var xchange = (_local1.yspeed * ((0.5 - Math.random()) * 1));
_local1._x = _local1._x + xchange;
_local1._rotation = (xchange / _local1.yspeed) * 20;
if (_local1._y > (BOTTOM + _local1._height)) {
_local1.removeMovieClip();
removeFromArray(badList, _local1);
}
if (player1_mc.hit_mc.hitTest(_local1._x, _local1._y, true)) {
hit(player1_mc);
}
if (player2_mc.hit_mc.hitTest(_local1._x, _local1._y, true)) {
hit(player2_mc);
}
var showme = true;
var totalGoods = activePlayers.length;
i = 0;
while (i < totalGoods) {
var _local2 = activePlayers[i];
var xdist = (_local2._x - _local1._x);
var _local3 = _local2._y - _local1._y;
var hyp = Math.sqrt((xdist * xdist) + (_local3 * _local3));
if (hyp > 100) {
showme = false;
}
i++;
}
if (showme) {
_local1.targ._visible = true;
} else {
_local1.targ._visible = false;
}
};
}
function startDrips() {
var _local1 = this;
trace("start drips");
_local1.createEmptyMovieClip("gameControl", 1);
gameControl.onEnterFrame = function () {
var _local1 = this;
if (random(skill) == 0) {
createDrip();
_local1.numDrips++;
if (_local1.numDrips > 100) {
nextEvent();
delete _local1.onEnterFrame;
_local1.removeMovieClip();
}
}
time++;
};
}
function addEnemy(initProps) {
var _local1 = this;
var _local3 = initProps;
numBads++;
var _local2 = _root.attachMovie("enemy", "enemy" + numBads, 110000 + numBads, {_x:_local3._x, _y:_local3._y, _xscale:100, _yscale:100, myMode:_local3.myMode, hits:_local3.hits, prone:1, dir:1, myList:_local3.theList, points:100});
badList.push(_local2);
_local2.myList.unShift(_local2);
_local2.onEnterFrame = function () {
var _local1 = this;
_local1.timer = _local1.timer + 0.1;
var _local2 = Math.sin(_local1.timer) * 10;
_local1._x = _local1._x + _local2;
_local1._y = _local1._y + (5 * _local1.dir);
if ((_local1._y > 0) & (_local1._y < BOTTOM)) {
if (!_local1.fired) {
if (random(30) == 0) {
badFire(_local1, 5);
_local1.fired = true;
}
}
}
if (_local1._y > (BOTTOM + 300)) {
_local1.dir = -1;
_local1._yscale = -100;
_local1.fired = false;
} else if (_local1._y < -300) {
_local1._yscale = 100;
_local1.dir = 1;
_local1.fired = false;
}
if (player1_mc.hit_mc.hitTest(_local1._x, _local1._y, true)) {
hit(player1_mc);
}
if (player2_mc.hit_mc.hitTest(_local1._x, _local1._y, true)) {
hit(player2_mc);
}
};
}
function addHunter(initProps) {
var _local1 = this;
numBads++;
var _local2 = _root.attachMovie("enemy", "enemy" + numBads, 110000 + numBads, {_x:initProps._x, _y:initProps._y, _xscale:100, _yscale:100, myMode:initProps.myMode, hits:initProps.hits, prone:1, points:200});
_local2.heatTarget = activePlayers[random(activePlayers.length)];
badList.push(_local2);
_local2.onEnterFrame = function () {
var _local1 = this;
var _local3 = (_local1.heatTarget._x - _local1._x) / 50;
var _local2 = (_local1.heatTarget._y - _local1._y) / 50;
if (_local2 < 4) {
_local2 = 2;
}
_local1._x = _local1._x + _local3;
_local1._y = _local1._y + _local2;
_local1.timer++;
if (_local1.timer > 40) {
badFire(_local1, 1);
_local1.timer = 0;
}
if (_local1._y > (BOTTOM + 50)) {
if (_local1.killEvent) {
nextEvent();
}
_local1.removeMovieClip();
removeFromArray(badList, _local1);
}
if (player1_mc.hit_mc.hitTest(_local1._x, _local1._y, true)) {
hit(player1_mc);
}
if (player2_mc.hit_mc.hitTest(_local1._x, _local1._y, true)) {
hit(player2_mc);
}
};
return(_local2);
}
function startMaker(theType, thetotal, delay) {
var _local1 = this;
var _local2 = _root;
clearInterval(startInt);
if (theType == "wave") {
numLists++;
_local2["waveList" + numLists] = [];
newBadMaker = _local2.createEmptyMovieClip("badMaker", 99999);
newBadMaker.total = theTotal;
newBadMaker.delay = delay;
newBadMaker.mylist = _local2["waveList" + numLists];
newBadMaker.onEnterFrame = function () {
var _local1 = this;
_local1.timer++;
if (_local1.timer > _local1.delay) {
addEnemy({_x:100, _y:-500, mymode:0, hits:3, theList:_local1.myList});
_local1.timer = 0;
_local1.num++;
if (_local1.num >= _local1.total) {
delete _local1.onEnterFrame;
_local1.removeMovieClip();
}
}
};
}
if (theType == "hunter") {
newBadMaker = _local2.createEmptyMovieClip("badMaker", 99999);
newBadMaker.total = theTotal;
newBadMaker.delay = delay;
newBadMaker.onEnterFrame = function () {
var _local1 = this;
_local1.timer++;
if (_local1.timer > _local1.delay) {
var _local2 = addHunter({_x:random(RIGHT), _y:-100, mymode:0, hits:7});
if (_local1.num == _local1.total) {
_local2.killEvent = true;
}
_local1.timer = 0;
_local1.num++;
if (_local1.num > _local1.total) {
delete _local1.onEnterFrame;
_local1.removeMovieClip();
}
}
};
}
}
function addSpider() {
var _local2 = this;
numBads++;
var newEn = _root.attachMovie("spider", "spider" + numBads, 110000 + numBads, {_x:random(RIGHT - 50) + 25, _y:-100, _xscale:100, _yscale:100, myMode:random(5), hits:80, prone:1, killAnim:"mega", points:300});
badList.push(newEn);
newEn.onEnterFrame = function () {
var _local2 = this;
_local2.timer++;
var _local3 = activePlayers.length;
i = 0;
while (i < _local3) {
var _local1 = activePlayers[i];
if (_local2.hitTest(_local1._x, _local1._y, true)) {
hit(_local1);
}
i++;
}
if (_local2.timer < 30) {
_local2._y = _local2._y + 5;
}
if (_local2.timer == 30) {
var aPlaya = activePlayers[random(activePlayers.length)];
_local2.tx = aPlaya._x;
}
if (_local2.timer > 30) {
_local2._x = _local2._x + ((_local2.tx - _local2._x) / 10);
_local2._y = _local2._y + ((_local2.ty - _local2._y) / 10);
}
if (_local2.timer > 60) {
_local2.gotoAndPlay(1);
_local2._y = _local2._y + 100;
_local2.ty = _local2._y - 100;
_local2.timer = 0;
}
if (_local2._y > BOTTOM) {
_local2.ty = 0;
}
};
return(newEn);
}
function startSpiders() {
var _local1 = this;
createEmptyMovieClip("spidermaker", 5678);
spiderMaker.timer = 220;
spiderMaker.onEnterFrame = function () {
var _local1 = this;
_local1.timer++;
if (_local1.timer > 234) {
_local1.timer = 0;
_local1.num++;
var _local2 = addSpider();
if (_local1.num > 0) {
_local2.killEvent = true;
delete _local1.onEnterFrame;
_local1.removeMovieClip();
}
}
};
}
function addSun() {
var _local1 = this;
numBads++;
var _local2 = _root.attachMovie("sun", "sun" + numBads, 110000 + numBads, {_x:130, _y:-100, _xscale:100, _yscale:100, myMode:1, hits:100, prone:1});
numBads++;
badList.push(_local2);
_local2.attachMovie("sun_hit", "sun_hit", 110000 + numBads, {_visible:false});
_local2.hitArea = _local2.sun_hit;
_local2.onEnterFrame = function () {
var _local1 = this;
if (_local1.myMode) {
_local1._y = _local1._y + 3;
if (_local1._y >= 70) {
_local1.myMode = 0;
}
} else {
var _local2 = _local1.hits;
if (_local2 < 3) {
_local2 = 3;
}
var _local3 = 0.01 / (_local2 / 100);
_local1.timer = _local1.timer + _local3;
var dx = ((Math.sin(_local1.timer) * 120) / _local2);
_local1._x = _local1._x + dx;
_local1._y = _local1._y + ((Math.cos(_local1.timer) * 1.2) / 4);
}
_local1.targ._x = _local1._x;
_local1.targ._y = _local1._y;
if (_local1.timer > 100) {
}
if (_local1._y > (BOTTOM + 50)) {
_local1.removeMovieClip();
removeFromArray(badList, _local1);
}
};
}
function addWasp() {
var _local1 = this;
numBads++;
var _local2 = _root.attachMovie("wasp", "wasp" + numBads, 110000 + numBads, {_x:130, _y:-100, _xscale:100, _yscale:100, myMode:1, hits:50, prone:1, killAnim:"mega", killEvent:true, points:1000});
badList.push(_local2);
_local2.hitArea = _local2.wasp_hit;
_local2.onEnterFrame = function () {
var _local1 = this;
if (_local1.myMode) {
_local1._y = _local1._y + 3;
if (_local1._y >= 70) {
_local1.myMode = 0;
}
} else {
var _local2 = _local1.hits;
if (_local2 < 10) {
_local2 = 10;
}
var _local3 = 0.01 / (_local2 / 100);
_local1.timer = _local1.timer + _local3;
var dx = ((Math.sin(_local1.timer) * 120) / _local2);
_local1._x = _local1._x + dx;
_local1._y = _local1._y + ((Math.cos(_local1.timer) * 1.2) / 4);
}
_local1.targ._x = _local1._x;
_local1.targ._y = _local1._y;
if (_local1.timer > 100) {
}
if (random(15) == 0) {
badFire(_local1, 4);
}
if (_local1._y > (BOTTOM + 50)) {
_local1.removeMovieClip();
removeFromArray(badList, _local1);
}
};
}
function addGiant() {
var _local1 = this;
numBads++;
var _local2 = _root.attachMovie("giant", "giant" + numBads, 5420 + numBads, {_x:130, _y:-200, ty:50, _xscale:100, _yscale:100, myMode:1, hits:150, prone:1, killAnim:"mega", dir:1, points:1000});
badList.push(_local2);
_local2.hitArea = _local2.giant_hit;
numBads++;
createEmptyMovieClip("robothand1", 110000 + numBads);
_local2.hand1 = robothand1;
numBads++;
createEmptyMovieClip("robothand2", 110000 + numBads);
_local2.hand2 = robothand2;
_local2.onEnterFrame = function () {
var _local1 = this;
_local1.timer++;
if (_local1.hits < 10) {
_local1.prone = false;
delete _local1.onEnterFrame;
addHeadShip();
startBadSound(17, "robotlaugh", 200, 1);
_local1.onEnterFrame = function () {
var _local1 = this;
_local1._y = _local1._y + _local1.grav;
_local1._rotation = _local1._rotation + 1;
_local1.grav = _local1.grav + 0.3;
_local1.gotoAndStop(1);
if (_local1._y > 500) {
delete _local1.onEnterFrame;
_local1.removeMovieClip();
}
};
}
if (_local1.timer == 1) {
_local1.ty = 50 + random(20);
if (random(2)) {
_local1.dir = 1;
_local1.tx = RIGHT - 100;
} else {
_local1.dir = -1;
_local1.tx = 100;
}
if (_local1.tx > _local1._x) {
_local1.swingdir = 1;
} else {
_local1.swingdir = -1;
}
if (_local1.swingdir == -1) {
_local1.gotoAndPlay("go left");
} else if (_local1.swingdir == 1) {
_local1.gotoAndPlay("go right");
}
} else if (_local1.timer < 30) {
_local1._x = _local1._x + ((_local1.tx - _local1._x) / 5);
_local1._y = _local1._y + ((_local1.ty - _local1._y) / 5);
}
if (_local1.timer == 30) {
thisFire();
_local1.gotoAndPlay("rapid");
}
if (_local1.timer > 30) {
_local1.speed = 3.33333333333333 * _local1.dir;
if (_local1.speed > 5) {
_local1.speed = 15;
} else if (_local1.speed < -5) {
_local1.speed = -15;
}
_local1._x = _local1._x - _local1.speed;
if (!_local1.reloaded) {
if ((_local1._x > (RIGHT - 50)) || (_local1._x < 50)) {
_local1.gotoAndPlay("attack");
stopSound(6, "machinegun");
_local1.reloaded = true;
}
_local1.paws++;
if (_local1.paws > 9) {
startBadSound(6, "machinegun", 100, 1);
badFire(_local1.hand1, 5);
badFire(_local1.hand2, 5);
_local1.paws = 0;
}
}
}
if (_local1.timer > 150) {
_local1.timer = 0;
_local1.reloaded = false;
}
var _local3 = {x:_local1.fire1._x, y:_local1.fire1._y};
_local1.localToGlobal(_local3);
_local1.hand1._x = _local3.x;
_local1.hand1._y = _local3.y;
var _local2 = {x:_local1.fire2._x, y:_local1.fire2._y};
_local1.localToGlobal(_local2);
_local1.hand2._x = _local2.x;
_local1.hand2._y = _local2.y;
};
}
function addHeadShip() {
var _local2 = this;
numBads++;
var newEn = _root.attachMovie("headShip", "headShip" + numBads, 110000 + numBads, {_x:-500, _y:0, ty:50, _xscale:100, _yscale:100, myMode:1, hits:80, prone:1, killAnim:"mega", dir:1, speed:6, killEvent:true, points:1000});
numBads++;
badList.push(newEn);
newEn.hitArea = newEn.headHit;
newEn.createEmptyMovieClip("rotter", 1000);
newEn.onEnterFrame = function () {
var _local2 = this;
if (typeof(_local2.heatTarget._x) != "undefined") {
theta = convertDeg(_local2._rotation, "rad");
_local2.dx = Math.sin(theta) * _local2.speed;
_local2.dy = Math.cos(theta) * _local2.speed;
_local2._rotation = _local2._rotation - ((_local2._rotation - _local2.rotter._rotation) / 5);
_local2._x = _local2._x + _local2.dx;
_local2._y = _local2._y - _local2.dy;
}
_local2.timer++;
if (_local2.timer > 40) {
if (random(20) == 0) {
_local2.timer = 0;
_local2.heatTarget = activePlayers[random(activePlayers.length)];
_local2.found = true;
var myAngle = (90 - lineAngle2Standard(_local2._x, _local2._y, _local2.heatTarget._x, _local2.heatTarget._y));
_local2.rotter._rotation = Math.round(myAngle);
}
}
var _local3 = activePlayers.length;
i = 0;
while (i < _local3) {
var _local1 = activePlayers[i];
if (_local2.hitArea.hitTest(_local1._x, _local1._y, true)) {
hit(_local1);
}
i++;
}
};
}
function addAce() {
var _local1 = this;
numBads++;
var _local2 = _root.attachMovie("enemy", "ace" + numBads, 110000 + numBads, {_x:1000 - random(2000), _y:-300, ty:50, _xscale:100, _yscale:100, myMode:1, hits:5, prone:1, fired:false, killAnim:"mega", dir:1, speed:10, points:300});
numBads++;
badList.push(_local2);
_local2.createEmptyMovieClip("rotter", 1000);
_local2.onEnterFrame = function () {
var _local1 = this;
if (player1_mc.hit_mc.hitTest(_local1._x, _local1._y, true)) {
hit(player1_mc);
}
if (player2_mc.hit_mc.hitTest(_local1._x, _local1._y, true)) {
hit(player2_mc);
}
if (typeof(_local1.heatTarget._x) != "undefined") {
theta = convertDeg(_local1._rotation, "rad");
_local1.dx = Math.sin(theta) * _local1.speed;
_local1.dy = Math.cos(theta) * _local1.speed;
_local1._rotation = _local1._rotation - ((_local1._rotation - _local1.rotter._rotation) / 2);
_local1._x = _local1._x - _local1.dx;
_local1._y = _local1._y + _local1.dy;
}
_local1.timer++;
if (_local1.timer == 100) {
startBadSound(17, "jet", 50, 1);
_local1.fired = false;
_local1.timer = 0;
_local1.fired = false;
_local1.heatTarget = activePlayers[random(activePlayers.length)];
_local1.found = true;
var _local2 = 180 + (90 - lineAngle2Standard(_local1._x, _local1._y, _local1.heatTarget._x, _local1.heatTarget._y));
_local1.rotter._rotation = Math.round(_local2);
}
if ((((_local1._y > 0) & (_local1._y < BOTTOM)) & (_local1._x > 0)) & (_local1._x < RIGHT)) {
if (!_local1.fired) {
if (random(30) == 0) {
badFire(_local1, 5);
_local1.fired = true;
}
}
}
};
return(_local2);
}
function addAces() {
var _local2 = _root;
numLists++;
_local2["aceList" + numLists] = [];
i = 0;
while (i < 3) {
var _local1 = addAce();
_local2["aceList" + numLists].push(_local1);
_local1.mylist = _local2["aceList" + numLists];
i++;
}
}
function addFatman() {
var _local1 = this;
numBads++;
var _local2 = _root.attachMovie("fatty", "fatman" + numBads, 110000 + numBads, {_x:130, _y:-100, _xscale:100, _yscale:100, myMode:1, hits:150, prone:1, killAnim:"mega", killEvent:true, points:1000});
numBads++;
badList.push(_local2);
_local2.hitArea = _local2.fat_hit;
_local2.fat_hit._visible = false;
_local2.createEmptyMovieClip("rotter", 1);
_local2.head.gotoAndStop("max");
_local2.onEnterFrame = function () {
var _local1 = this;
if (_local1.myMode) {
_local1._y = _local1._y + 3;
if (_local1._y >= 130) {
_local1.myMode = 0;
}
} else {
if (_local1.clock < 200) {
var _local2 = _local1.hits / 3;
if (_local2 < 10) {
_local2 = 10;
}
var speed = (0.01 / (_local2 / 100));
_local1.timer = _local1.timer + speed;
var dx = ((Math.sin(_local1.timer) * 120) / _local2);
_local1._x = _local1._x + dx;
_local1._y = _local1._y + ((Math.cos(_local1.timer) * 1.2) / 4);
}
if (_local1.clock == 200) {
_local1.head.gotoAndPlay("down");
_local1.heatTarget = activePlayers[random(activePlayers.length)];
}
if (_local1.clock > 200) {
}
if (_local1.clock > 200) {
}
if (_local1.clock == 210) {
badFire(_local1, 6);
}
if (_local1.clock == 250) {
_local1.clock = 0;
_local1.head.gotoAndPlay("up");
}
}
_local1.clock++;
var _local3 = {x:_local1.tracker._x, y:_local1.tracker._y};
_local1.localToGlobal(_local3);
_local1.beam._x = _local3.x;
_local1.beam._y = _local3.y;
if (random(30) == 0) {
badFire(_local1, 5);
badFire(_local1, 5);
}
};
}
function createWorm() {
var _local1 = this;
numLists++;
_root["wormList" + numLists] = [];
i = 0;
while (i < 10) {
numBads++;
var _local3 = _root.attachMovie("worm", "enemy" + numBads, 110000 + numBads, {_x:random(RIGHT), _y:random(50), _xscale:100, _yscale:100, myMode:random(5), xspeed:4, yspeed:0.5, worm:true, hits:10, myList:_root["wormList" + numLists], prone:true, fireRate:12, points:100});
badList.push(_local3);
_root["wormList" + numLists].unShift(_local3);
_local3.onEnterFrame = function () {
var _local1 = this;
apos = 0;
while (aPos < _local1.myList.length) {
if (_local1.myList[aPos] == _local1) {
_local1.mePos = aPos;
}
apos++;
}
var _local2 = _local1.myList[_local1.mePos - 1];
hyp = Math.sqrt(((_local1._x - _local2._x) * (_local1._x - _local2._x)) + ((_local1._y - _local2._y) * (_local1._y - _local2._y)));
if (hyp > 10) {
var dx = ((_local2._x - _local1._x) / 10);
var dy = ((_local2._y - _local1._y) / 10);
}
if (_local1.mePos == 0) {
_local1.killAnim = "mega";
_local1.killEvent = true;
if (_local1.myList.length > 1) {
_local1.prone = false;
} else {
_local1.prone = true;
}
_local1.shoot++;
var _local3 = _local1.myList.length * 3;
if (_local3 < 10) {
_local3 = 10;
}
if (_local1.shoot > _local3) {
badFire(_local1, 1, 30);
_local1.shoot = 0;
}
_local1.gotoAndStop(2);
if (_local1._y < 0) {
_local1._y = 0;
_local1.yspeed = -_local1.yspeed;
} else if (_local1._y > (BOTTOM - 200)) {
_local1._y = BOTTOM - 200;
_local1.yspeed = -_local1.yspeed;
}
if (_local1._x < 0) {
_local1._x = 0;
_local1.xspeed = -_local1.xspeed;
} else if (_local1._x > RIGHT) {
_local1._x = RIGHT;
_local1.xspeed = -_local1.xspeed;
}
var dx = _local1.xspeed;
var dy = _local1.yspeed;
}
_local1._x = _local1._x + dx;
_local1._y = _local1._y + dy;
if (player1_mc.hit_mc.hitTest(_local1._x, _local1._y, true)) {
hit(player1_mc);
}
if (player2_mc.hit_mc.hitTest(_local1._x, _local1._y, true)) {
hit(player2_mc);
}
};
i++;
}
}
function removeFromWorm(seg) {
var _local1 = seg;
apos = 0;
while (aPos < _local1.myList.length) {
if (_local1.myList[aPos] == _local1) {
mePos = aPos;
}
apos++;
}
_local1.myList.splice(mePos, 1);
}
function createBoss(noevent) {
trace("noevent" + noevent);
numLists++;
_root["bossList" + numLists] = [];
var head = addBossPart(1, null, 10, noevent);
var _local1 = addBossPart(2, head, 7, noevent);
var _local3 = addBossPart(3, _local1.arm1, 8);
_local3.flip = true;
var arm2 = addBossPart(3, _local1.arm2, 9);
var hand1 = addBossPart(4, _local3.hand, 11);
hand1.flip = true;
var hand2 = addBossPart(4, arm2.hand, 12);
hand2._xscale = -100;
var _local2 = addBossPart(5, _local1.leg1, 4);
_local2.flip = true;
var leg2 = addBossPart(5, _local1.leg2, 5);
var foot1 = addBossPart(6, _local2.foot, 1);
var foot2 = addBossPart(6, leg2.foot, 2);
foot2._xscale = -100;
}
function removeFromList(seg) {
var _local2 = seg;
var _local1 = _local2.myList;
apos = 0;
while (aPos < _local1.length) {
if (_local1[aPos] == _local2) {
mePos = aPos;
}
apos++;
}
_local1.splice(mePos, 1);
apos = 0;
while (aPos < _local1.length) {
_local1[aPos].mePos = aPos;
apos++;
}
if (_local1.length == 1) {
trace("seg" + _local2);
trace("seg.noevent" + _local2.noevent);
if (!_local2.noevent) {
_local1[0].killEvent = true;
}
}
}
function removeFromArray(list, val) {
var _local2 = val;
var _local1 = list;
apos = 0;
while (aPos < _local1.length) {
if (_local1[aPos] == _local2) {
mePos = aPos;
}
apos++;
}
_local1.splice(mePos, 1);
}
function addBossPart(thePart, owner, base, noevent) {
var _local1 = this;
numBads++;
trace("noevent" + noevent);
var _local2 = _root.attachMovie("boss", "robot" + numBads, (130000 + (numLists * 20)) + base, {_x:random(RIGHT), _y:random(50), _xscale:100, _yscale:100, xspeed:1, yspeed:0.25, boss:true, hits:5, myOwner:owner, myType:thePart, myList:_root["bossList" + numLists], prone:true, points:50, noevent:noevent});
badList.push(_local2);
_local2.myList.push(_local2);
_local2.gotoAndStop(thePart);
_local2._x = random(RIGHT);
_local2._y = random(BOTTOM);
if ((_local2.myType == 1) || (_local2.myType == 2)) {
_local2.prone = false;
}
_local2.xTarg = random(200) + 100;
_local2.yTarg = 50 + random(100);
_local2.character = random(5);
_local2.backup = _local2.myOwner._parent.myOwner;
_local2.onEnterFrame = function () {
var _local1 = this;
if ((_local1.myType == 1) || (_local1.myType == 2)) {
if (_local1.myList.length <= 2) {
_local1.prone = true;
}
}
apos = 0;
while (aPos < _local1.myList.length) {
if (_local1.myList[aPos] == _local1) {
_local1.mePos = aPos;
}
apos++;
}
if (_local1.mePos != 0) {
if (typeof(_local1.myOwner._x) == "undefined") {
_local1.myOwner = _local1.backup;
}
}
var _local2 = _local1.myOwner;
var _local3 = {x:_local2._x, y:_local2._y};
_local2._parent.localToGlobal(_local3);
_local1.op = _local1._x - _local3.x;
_local1.adj = _local1._y - _local3.y;
_local1.hyp = Math.sqrt((_local1.op * _local1.op) + (_local1.adj * _local1.adj));
_local1.dx = (-_local1.op) / 2;
_local1.dy = (-_local1.adj) / 2;
if (_local1.mePos == 0) {
_local1.shoot++;
_local1.paws++;
if (_local1.paws > 40) {
if (_local1.shoot > 10) {
badFire(_local1, 5);
_local1.shoot = 0;
}
}
if (_local1.paws > 60) {
_local1.paws = 0;
}
_local1.mover++;
if (_local1.mover > 100) {
_local1.mover = 0;
_local1.xTarg = random(RIGHT);
_local1.yTarg = random(BOTTOM / 2);
}
_local1.dx = (_local1.xTarg - _local1._x) / 3;
_local1.dy = (_local1.yTarg - _local1._y) / 3;
}
_local1._x = _local1._x + _local1.dx;
_local1._y = _local1._y + _local1.dy;
if (((_local1.myType == 3) || (_local1.myType == 5)) || (_local1.myType == 4)) {
if (_local1.character == 0) {
if (random(100) == 0) {
_local1.rotate = 5 - random(10);
}
} else if (_local1.character == 1) {
if (random(10) == 0) {
_local1.rotate = 10 - random(20);
}
} else if (_local1.character == 2) {
if (_local1.flip) {
if (_local1._rotation >= 90) {
_local1.rotate = -3;
}
if (_local1._rotation <= 0) {
_local1.rotate = 3;
}
} else {
if (_local1._rotation <= -90) {
_local1.rotate = 3;
}
if (_local1._rotation >= 0) {
_local1.rotate = -3;
}
}
} else if (_local1.character == 3) {
if (_local1.flip) {
if (_local1._rotation >= 180) {
_local1.rotate = -5;
}
if (_local1._rotation <= 0) {
_local1.rotate = 5;
}
} else {
if (_local1._rotation <= -180) {
_local1.rotate = 5;
}
if (_local1._rotation >= 0) {
_local1.rotate = -5;
}
}
} else if (random(10) == 0) {
_local1.rotate = 10 - random(20);
}
_local1._rotation = _local1._rotation + _local1.rotate;
if (_local1.flip) {
if (_local1._rotation > 100) {
if (_local1.rotate > 0) {
_local1._rotation = 100;
}
}
if (_local1._rotation < 0) {
if (_local1.rotate < 0) {
_local1._rotation = 0;
}
}
} else {
if (_local1._rotation < -100) {
if (_local1.rotate < 0) {
_local1._rotation = -100;
}
}
if (_local1._rotation > 0) {
if (_local1.rotate > 0) {
_local1._rotation = 0;
}
}
}
}
if (_local1._y > (BOTTOM + 50)) {
_local1.removeMovieClip();
removeFromArray(badList, _local1);
}
};
return(_local2);
}
function convertDeg(deg, out_str) {
var _local1 = out_str;
if (_local1 == "dms") {
} else {
if (_local1 == "rad") {
return((deg * Math.PI) / 180);
}
if (_local1 == "multPI") {
return(deg / 180);
}
}
return(undefined);
}
function updateScores() {
var _local3 = player1_mc.score + "";
var _local1 = _local3.split("");
_local1.reverse();
i = 0;
while (i < 8) {
gui.p1scores_mc["num" + i].gotoAndStop("f" + _local1[i]);
i++;
}
var p2string = (player2_mc.score + "");
var _local2 = p2string.split("");
_local2.reverse();
i = 0;
while (i < 8) {
gui.p2scores_mc["num" + i].gotoAndStop("f" + _local2[i]);
i++;
}
}
function updateLives() {
gui.p1Lives.gotoAndStop("f" + player1_mc.lives);
gui.p2Lives.gotoAndStop("f" + player2_mc.lives);
}
function killPlayer(player) {
var _local1 = player;
delete _local1.onEnterFrame;
_local1._x = -999;
_local1._y = -999;
numPlayaz--;
removeFromArray(activePlayers, _local1);
if (_local1 == player1_mc) {
Mouse.removeListener(mouseListener);
} else if (_local1 == player2_mc) {
Key.removeListener(keyListener);
}
if (activePlayers.length < 1) {
Mouse.removeListener(mouselistener);
Key.removeListener(keylistener);
clearGame();
info_mc.play();
}
}
function clearGame() {
var _local2 = badList.length;
i = 0;
while (i < _local2) {
badList[i].removeMovieClip();
i++;
}
var _local3 = picksList.length;
i = 0;
while (i < _local3) {
picksList[i].removeMovieClip();
i++;
}
var _local1 = bulList.length;
i = 0;
while (i < _local1) {
bulList[i].removeMovieClip();
i++;
}
gamecontrol.removeMovieClip();
badmaker.removeMovieClip();
spidermaker.removeMovieClip();
}
function goEnter() {
var _local1 = _root;
if (played1 & played2) {
trace("go enter 1 and 2");
_local1.gotoAndStop("enternames");
} else if (played1) {
_local1.gotoAndStop("entername1");
trace("go enter 1");
} else if (played2) {
_local1.gotoAndStop("entername2");
trace("go enter 2");
}
}
stop();
Mouse.hide();
_root.attachMovie("gui", "gui", 777777, {_x:0, _y:0});
player1_mc.removeMovieClip();
player2_mc.removeMovieClip();
_quality = "LOW";
BOTTOM = 360;
RIGHT = 480;
HARDEST = 5;
thedepth = 3;
theEvent = 0;
badList = [];
picksList = [];
activePlayers = [];
bulList = [];
skill = 15;
played1 = false;
played2 = false;
theEvent = 0;
numSubs = 0;
player1_mc.score = 0;
player2_mc.score = 0;
nextEvent();
initGame();
addPickup();
lineAngle2Standard = function (x1, y1, x2, y2) {
var _local1 = (Math.atan2(y2 - y1, x2 - x1) * 180) / Math.PI;
_local1 = _local1 % 360;
var _local2 = 360 - ((_local1 < 0) ? (_local1 + 360) : (_local1));
if (_local2 != 360) {
return(_local2);
}
return(0);
};
Frame 100
stop();
Mouse.show();
_quality = "HIGH";
selection.setFocus(p1name_mc.namefield);
Frame 101
stop();
Mouse.show();
_quality = "HIGH";
selection.setFocus(p2name_mc.namefield);
Frame 102
stop();
Mouse.show();
_quality = "HIGH";
selection.setFocus(p1name_mc.namefield);
Symbol 11 MovieClip Frame 1
stop();
Symbol 20 MovieClip Frame 296
stop();
_root.play();
Symbol 26 MovieClip Frame 412
if (random(10) == 0) {
gotoAndPlay ("dragoon");
} else if (random(10) == 0) {
gotoAndPlay ("wasp");
} else if (random(10) == 0) {
gotoAndPlay ("fatty");
} else {
gotoAndPlay (1);
}
Symbol 26 MovieClip Frame 521
gotoAndPlay (1);
Symbol 26 MovieClip Frame 714
gotoAndPlay (1);
Symbol 42 MovieClip [worm] Frame 1
stop();
Symbol 42 MovieClip [worm] Frame 2
stop();
Symbol 44 MovieClip [wasp_hit] Frame 1
stop();
this._visible = false;
Symbol 57 MovieClip [spider] Frame 60
stop();
Symbol 108 MovieClip [mega] Frame 3
Symbol 108 MovieClip [mega] Frame 32
stop();
Symbol 115 MovieClip [headShip] Frame 1
headHit._visible = false;
Symbol 124 MovieClip [explosion] Frame 3
Symbol 124 MovieClip [explosion] Frame 26
stop();
Symbol 132 MovieClip [drip] Frame 1
stop();
Symbol 132 MovieClip [drip] Frame 14
stop();
Symbol 146 MovieClip [boss] Frame 1
stop();
Symbol 146 MovieClip [boss] Frame 2
stop();
Symbol 146 MovieClip [boss] Frame 3
stop();
Symbol 146 MovieClip [boss] Frame 4
stop();
Symbol 146 MovieClip [boss] Frame 5
stop();
Symbol 146 MovieClip [boss] Frame 6
stop();
Symbol 184 MovieClip Frame 4
gotoAndPlay (1);
Symbol 185 MovieClip [wasp] Frame 40
gotoAndPlay ("idle");
Symbol 185 MovieClip [wasp] Frame 100
gotoAndPlay ("idle");
Symbol 185 MovieClip [wasp] Frame 160
gotoAndPlay ("idle");
Symbol 185 MovieClip [wasp] Frame 206
gotoAndPlay ("idle");
Symbol 195 MovieClip [pickup_mc] Frame 1
stop();
Symbol 195 MovieClip [pickup_mc] Frame 2
stop();
Symbol 195 MovieClip [pickup_mc] Frame 3
stop();
Symbol 195 MovieClip [pickup_mc] Frame 4
stop();
Symbol 195 MovieClip [pickup_mc] Frame 5
stop();
Symbol 195 MovieClip [pickup_mc] Frame 6
stop();
Symbol 206 MovieClip Frame 1
stop();
Symbol 206 MovieClip Frame 10
stop();
Instance of Symbol 209 MovieClip "tracker" in Symbol 210 MovieClip [fatty] Frame 1
/* no clip actions */
Symbol 210 MovieClip [fatty] Frame 60
gotoAndPlay (1);
Symbol 210 MovieClip [fatty] Frame 125
gotoAndPlay (1);
Symbol 210 MovieClip [fatty] Frame 190
gotoAndPlay (1);
Symbol 228 MovieClip Frame 5
gotoAndPlay (1);
Symbol 229 MovieClip [giant] Frame 1
giant_hit._visible = false;
Symbol 229 MovieClip [giant] Frame 35
gotoAndPlay ("idle");
Symbol 229 MovieClip [giant] Frame 60
gotoAndPlay ("idle");
Symbol 229 MovieClip [giant] Frame 101
gotoAndPlay ("idle");
Symbol 229 MovieClip [giant] Frame 135
gotoAndPlay (1);
Symbol 229 MovieClip [giant] Frame 140
gotoAndPlay ("rapid");
Symbol 229 MovieClip [giant] Frame 156
gotoAndPlay ("idle");
Symbol 250 MovieClip Frame 1
stop();
Symbol 250 MovieClip Frame 2
stop();
Symbol 250 MovieClip Frame 3
stop();
Symbol 250 MovieClip Frame 4
stop();
Symbol 250 MovieClip Frame 5
stop();
Symbol 250 MovieClip Frame 6
stop();
Symbol 250 MovieClip Frame 7
stop();
Symbol 250 MovieClip Frame 8
stop();
Symbol 250 MovieClip Frame 9
stop();
Symbol 250 MovieClip Frame 10
stop();
Symbol 259 MovieClip Frame 1
stop();
Symbol 259 MovieClip Frame 2
stop();
Symbol 263 MovieClip [gui] Frame 1
stop();
Symbol 285 Button
on (press) {
_root.stopSounds();
_root.isMute = true;
gotoAndStop ("mute");
}
Symbol 288 Button
on (press) {
_root.restoreSounds();
_root.isMute = false;
gotoAndStop ("loud");
}
Symbol 289 MovieClip Frame 1
stop();
if (_root.isMute) {
gotoAndStop (2);
}
Symbol 289 MovieClip Frame 2
stop();
Symbol 292 Button
on (press) {
getURL ("JavaScript:closeCompetition();");
}
Symbol 299 MovieClip Frame 150
gotoAndPlay (1);
Symbol 301 Button
on (release) {
_root.numPlayaz = 1;
_root.gotoAndPlay("instructions");
}
Symbol 302 Button
on (release) {
_root.numPlayaz = 2;
_root.gotoAndPlay("instructions");
}
Symbol 303 Button
on (release) {
_root.gotoAndPlay("highscores");
}
Symbol 304 Button
on (press) {
getURL ("JavaScript:openWindow('http://stof.blocmedia.net/headspace/EN/sendfriend.php');");
}
Symbol 305 MovieClip Frame 1
stop();
Symbol 306 MovieClip Frame 15
stop();
cheatArray = [];
checkArray = [0, 0, 0, 0];
cheatStage = 0;
cheatListener = new Object();
cheatListener.onKeyDown = function () {
if (cheatStage == 0) {
if (Key.getCode() == 75) {
cheatStage = 1;
} else {
cheatStage = 0;
}
} else if (cheatStage == 1) {
if (Key.getCode() == 65) {
cheatStage = 2;
} else {
cheatStage = 0;
}
} else if (cheatStage == 2) {
if (Key.getCode() == 84) {
cheatStage = 3;
} else {
cheatStage = 0;
}
} else if (cheatStage == 3) {
if (Key.getCode() == 89) {
_root.startSound(6, "powerup", 100, 1);
_root.cheatMode = true;
trace("cheat!");
} else {
cheatStage = 0;
}
}
};
Key.addListener(cheatListener);
Symbol 306 MovieClip Frame 33
stop();
Symbol 308 Button
on (release) {
Key.removeListener(_root.keyListener);
Mouse.removeListener(_root.mouseListener);
_root.gotoAndStop("main menu");
}
Symbol 316 MovieClip Frame 1
stop();
Symbol 316 MovieClip Frame 2
stop();
Symbol 331 MovieClip Frame 10
stop();
Symbol 357 Button
on (release) {
_root.gotoAndStop("main menu");
}
Symbol 366 MovieClip Frame 34
stop();
Symbol 366 MovieClip Frame 104
trace("gui is" + _root.gui._x);
removeMovieClip(_root.gui);
_root.mixTo("menu");
_root.goEnter();
Symbol 367 Button
on (release) {
_root.gotoAndStop("main menu");
}
Symbol 380 MovieClip Frame 1
stop();
submitted = false;
Symbol 380 MovieClip Frame 2
stop();
_root.numSubs++;
if (!_root.cheatMode) {
_root.submitMyScore();
}
_root.startSound(6, "powerup", 100, 1);
delete this.onPress;
Symbol 381 MovieClip Frame 1
var p1string = (_root.player1_mc.score + "");
var p1array = p1string.split("");
p1array.reverse();
i = 0;
while (i < 8) {
p1scores_mc["num" + i].gotoAndStop("f" + p1array[i]);
i++;
}
Instance of Symbol 380 MovieClip in Symbol 381 MovieClip Frame 1
on (press) {
trace("pressed");
if (submitted == false) {
submitted = true;
trace("pressed");
if (_root.checkName(_parent.name1)) {
trace("pressed2");
_root.name1 = _parent.name1;
this.enabled = false;
this.gotoAndStop("thanks");
} else {
_root.startSound(6, "powerdown", 100, 1);
_parent.namefield.text = "";
selection.setFocus(_parent.namefield);
submitted = false;
trace("false");
}
}
}
Symbol 385 MovieClip Frame 1
var p1string = (_root.player2_mc.score + "");
var p1array = p1string.split("");
p1array.reverse();
i = 0;
while (i < 8) {
p1scores_mc["num" + i].gotoAndStop("f" + p1array[i]);
i++;
}
Instance of Symbol 380 MovieClip in Symbol 385 MovieClip Frame 1
on (press) {
trace("pressed");
if (submitted == false) {
submitted = true;
trace("pressed");
if (_root.checkName(_parent.name2)) {
trace("pressed2");
_root.name2 = _parent.name2;
this.gotoAndStop("thanks");
this.enabled = false;
} else {
_root.startSound(6, "powerdown", 100, 1);
_parent.namefield.text = "";
selection.setFocus(_parent.namefield);
submitted = false;
trace("false");
}
}
}