Frame 1
function blockMe() {
block = attachMovie("urlblock", "urlblock", 999501);
block._x = Stage.width / 2;
block._y = Stage.height / 2;
var _local1 = _url;
if (_local1.indexOf("andkon.com") == -1) {
block.gotoAndStop(2);
}
}
blockMe();
function getSiteName() {
globalNoAds = false;
globalSkipIntro = false;
globalNoMochi = false;
globalNoKong = false;
domain_parts = _url.split("://");
real_domain = domain_parts[1].split("/");
theDomain = real_domain[0];
urls_allowed = ["kongregate.com", "www.kongregate.com", "chat.kongregate.com", "notdoppler.com", "i.notdoppler.com", "andkon.com", "www.andkon.com", ""];
for (x in urls_allowed) {
if (urls_allowed[x] == real_domain[0]) {
globalNoAds = true;
}
}
urls_allowed = ["www.maxgames.com", "maxgames.com"];
for (x in urls_allowed) {
if (urls_allowed[x] == real_domain[0]) {
globalNoMochi = true;
}
}
urls_allowed = [];
for (x in urls_allowed) {
if (urls_allowed[x] == real_domain[0]) {
globalSkipIntro = true;
}
}
urls_allowed = ["www.andkon.com", "andkon.com", "farm.stickpage.com", "stickpage.com", ""];
for (x in urls_allowed) {
if (urls_allowed[x] == real_domain[0]) {
globalNoKong = true;
}
}
}
function frameTransition(frame) {
if (!fading) {
fading = true;
theFader = attachMovie("fader", "fader1", 999193);
theFader._x = Stage.width / 2;
theFader._y = Stage.height / 2;
theFader._alpha = 0;
theFader.onEnterFrame = function () {
this._alpha = this._alpha + 50;
if ((this._alpha > 99) && (fading)) {
_root.gotoAndStop(frame);
this._alpha = 100;
this.onEnterFrame = function () {
this._alpha = this._alpha - 10;
if (this._alpha < 1) {
fading = false;
this.removeMovieClip();
}
};
}
};
}
}
function frameTransitionSlow(frame) {
if (!fading) {
fading = true;
theFader = attachMovie("fader", "fader1", 999193);
theFader._x = Stage.width / 2;
theFader._y = Stage.height / 2;
theFader._alpha = 0;
theFader.onEnterFrame = function () {
this._alpha = this._alpha + 5;
if ((this._alpha > 99) && (fading)) {
_root.gotoAndStop(frame);
fading = false;
this._alpha = 100;
this.onEnterFrame = function () {
this._alpha = this._alpha - 10;
if (this._alpha < 1) {
fading = false;
this.removeMovieClip();
}
};
}
};
}
}
stop();
Stage.showMenu = false;
fscommand ("allowscale", true);
globalNoAds = true;
globalNoKong = true;
if (globalNoKong) {
kongBtn._visible = false;
effingBtn._visible = false;
preloaderBtn._y = preloaderBtn._y + 30;
} else {
maxBtn._visible = false;
}
maxBtn.onRelease = function () {
getURL ("http://www.andkon.com/arcade/ ", "_blank");
};
if (!globalNoAds) {
var CPMStarPoolID = 12941;
var CPMStarSubPoolID = 1;
System.security.allowDomain("server.cpmstar.com");
adBox.loadMovie((("http://server.cpmstar.com/adviewas2.swf?poolid=" + CPMStarPoolID) + "&subpoolid=") + CPMStarSubPoolID);
} else {
adBox._visible = false;
theAdBorder._visible = false;
preloaderBtn._x = Stage.width / 2;
}
Frame 2
stop();
frameTransition("title");
Frame 10
if (wormInGameSound == null) {
this.createEmptyMovieClip("soundContainer1", 99999998);
_root.wormInGameSound = new Sound(soundContainer1);
_root.wormInGameSound.attachSound("Effing Worms Ingame.mp3");
_root.wormInGameSound.stop();
}
if (wormPopoutSound == null) {
this.createEmptyMovieClip("soundContainer2", 99999997);
_root.wormPopoutSound = new Sound(soundContainer2);
_root.wormPopoutSound.attachSound("Worm_popout_ground_01.wav");
_root.wormPopoutSound.stop();
}
if (wormTitleSound == null) {
this.createEmptyMovieClip("soundContainer3", 99999996);
_root.wormTitleSound = new Sound(soundContainer3);
_root.wormTitleSound.attachSound("Effing Worms_Menu.mp3");
_root.wormTitleSound.stop();
}
if (wormUndergroundSound == null) {
this.createEmptyMovieClip("soundContainer4", 99999994);
_root.wormUndergroundSound = new Sound(soundContainer4);
_root.wormUndergroundSound.attachSound("worm_movement_underground_loop_fix.wav");
_root.wormUndergroundSound.stop();
}
if (jetSound == null) {
this.createEmptyMovieClip("soundContainer5", 99999993);
_root.jetSound = new Sound(soundContainer5);
_root.jetSound.attachSound("jet_loop.wav");
_root.jetSound.stop();
}
if (heliSound == null) {
this.createEmptyMovieClip("soundContainer6", 99999992);
_root.heliSound = new Sound(soundContainer6);
_root.heliSound.attachSound("Helicopter_loop_fix.wav");
_root.heliSound.stop();
}
if (bloodMusicSound == null) {
this.createEmptyMovieClip("soundContainer7", 99999992);
_root.bloodMusicSound = new Sound(soundContainer7);
_root.bloodMusicSound.attachSound("79223_newgrounds_punish.mp3");
_root.bloodMusicSound.stop();
}
bloodRoarSound = new Sound();
bloodRoarSound.attachSound("rawr_03.wav");
if (crowdScreamSound == null) {
this.createEmptyMovieClip("soundContainer8", 99999991);
_root.crowdScreamSound = new Sound(soundContainer8);
_root.crowdScreamSound.attachSound("worms_crowdscream2.wav");
_root.crowdScreamSound.stop();
}
_root.crowdScreamSound.setVolume(25);
explode1Sound = new Sound();
explode1Sound.attachSound("Explosion_01.wav");
explode2Sound = new Sound();
explode2Sound.attachSound("Explosion_02.wav");
gun1Sound = new Sound();
gun1Sound.attachSound("gun_01.wav");
gun2Sound = new Sound();
gun2Sound.attachSound("gun_02.wav");
impactCowSound = new Sound();
impactCowSound.attachSound("impact_cow_01.wav");
impactDogSound = new Sound();
impactDogSound.attachSound("impact_dog_01.wav");
impactMan1Sound = new Sound();
impactMan1Sound.attachSound("impact_man_01.wav");
impactMan2Sound = new Sound();
impactMan2Sound.attachSound("impact_man_02.wav");
impactMan3Sound = new Sound();
impactMan3Sound.attachSound("impact_man_03.wav");
impactTankSound = new Sound();
impactTankSound.attachSound("impact_tank_JeeP_01.wav");
impactWomanSound = new Sound();
impactWomanSound.attachSound("impact_woman_01.wav");
btnClickSound = new Sound();
btnClickSound.attachSound("Menu_button_click_03.wav");
btnHover1Sound = new Sound();
btnHover1Sound.attachSound("menu_button_hover_01.wav");
btnHover2Sound = new Sound();
btnHover2Sound.attachSound("menu_button_hover_02.wav");
scoreLoopSound = new Sound();
scoreLoopSound.attachSound("Menue_score_numbers_loop_fix.wav");
missileSound = new Sound();
missileSound.attachSound("missle_launch_01.wav");
wormGrowlSound = new Sound();
wormGrowlSound.attachSound("worm_growls_02.wav");
if (globalNoKong) {
maxBtn._visible = true;
kongBtn._visible = false;
kongBtn.stop();
} else {
maxBtn._visible = false;
kongBtn._visible = true;
maxBtn.stop();
}
maxBtn.onRelease = function () {
getURL ("http://www.andkon.com/arcade/ ", "_blank");
};
Frame 20
if (wormInGameSound == null) {
this.createEmptyMovieClip("soundContainer1", 99999998);
_root.wormInGameSound = new Sound(soundContainer1);
_root.wormInGameSound.attachSound("Effing Worms Ingame.mp3");
_root.wormInGameSound.stop();
}
if (wormPopoutSound == null) {
this.createEmptyMovieClip("soundContainer2", 99999997);
_root.wormPopoutSound = new Sound(soundContainer2);
_root.wormPopoutSound.attachSound("Worm_popout_ground_01.wav");
_root.wormPopoutSound.stop();
}
if (wormTitleSound == null) {
this.createEmptyMovieClip("soundContainer3", 99999996);
_root.wormTitleSound = new Sound(soundContainer3);
_root.wormTitleSound.attachSound("Effing Worms_Menu.mp3");
_root.wormTitleSound.stop();
}
if (wormUndergroundSound == null) {
this.createEmptyMovieClip("soundContainer4", 99999994);
_root.wormUndergroundSound = new Sound(soundContainer4);
_root.wormUndergroundSound.attachSound("worm_movement_underground_loop_fix.wav");
_root.wormUndergroundSound.stop();
}
if (jetSound == null) {
this.createEmptyMovieClip("soundContainer5", 99999993);
_root.jetSound = new Sound(soundContainer5);
_root.jetSound.attachSound("jet_loop.wav");
_root.jetSound.stop();
}
if (heliSound == null) {
this.createEmptyMovieClip("soundContainer6", 99999992);
_root.heliSound = new Sound(soundContainer6);
_root.heliSound.attachSound("Helicopter_loop_fix.wav");
_root.heliSound.stop();
}
if (bloodMusicSound == null) {
this.createEmptyMovieClip("soundContainer7", 99999992);
_root.bloodMusicSound = new Sound(soundContainer7);
_root.bloodMusicSound.attachSound("79223_newgrounds_punish.mp3");
_root.bloodMusicSound.stop();
}
bloodRoarSound = new Sound();
bloodRoarSound.attachSound("rawr_03.wav");
sighSound = new Sound();
sighSound.attachSound("sigh.mp3");
if (crowdScreamSound == null) {
this.createEmptyMovieClip("soundContainer8", 99999991);
_root.crowdScreamSound = new Sound(soundContainer8);
_root.crowdScreamSound.attachSound("worms_crowdscream2.wav");
_root.crowdScreamSound.stop();
}
_root.crowdScreamSound.setVolume(25);
explode1Sound = new Sound();
explode1Sound.attachSound("Explosion_01.wav");
explode2Sound = new Sound();
explode2Sound.attachSound("Explosion_02.wav");
gun1Sound = new Sound();
gun1Sound.attachSound("gun_01.wav");
gun2Sound = new Sound();
gun2Sound.attachSound("gun_02.wav");
cheerSound = new Sound();
cheerSound.attachSound("cheer.mp3");
impactCowSound = new Sound();
impactCowSound.attachSound("impact_cow_01.wav");
impactDogSound = new Sound();
impactDogSound.attachSound("impact_dog_01.wav");
impactMan1Sound = new Sound();
impactMan1Sound.attachSound("impact_man_01.wav");
impactMan2Sound = new Sound();
impactMan2Sound.attachSound("impact_man_02.wav");
impactMan3Sound = new Sound();
impactMan3Sound.attachSound("impact_man_03.wav");
impactTankSound = new Sound();
impactTankSound.attachSound("impact_tank_JeeP_01.wav");
impactWomanSound = new Sound();
impactWomanSound.attachSound("impact_woman_01.wav");
btnClickSound = new Sound();
btnClickSound.attachSound("Menu_button_click_03.wav");
btnHover1Sound = new Sound();
btnHover1Sound.attachSound("menu_button_hover_01.wav");
btnHover2Sound = new Sound();
btnHover2Sound.attachSound("menu_button_hover_02.wav");
scoreLoopSound = new Sound();
scoreLoopSound.attachSound("Menue_score_numbers_loop_fix.wav");
missileSound = new Sound();
missileSound.attachSound("missle_launch_01.wav");
wormGrowlSound = new Sound();
wormGrowlSound.attachSound("worm_growls_02.wav");
play();
if (globalNoKong) {
maxBtn._visible = true;
kongBtn._visible = false;
effingBtn._visible = false;
playBtn._y = playBtn._y + 20;
creditsBtn._y = creditsBtn._y + 20;
moreBtn._y = moreBtn._y + 20;
maxBtn.onRelease = function () {
getURL ("http://www.andkon.com/arcade/ ", "_blank");
};
moreBtn.onRelease = function () {
getURL ("http://www.andkon.com/arcade/ ", "_blank");
};
} else {
maxBtn._visible = false;
kongBtn._visible = true;
}
wormTitleSound.setVolume(50);
wormTitleSound.stop();
wormTitleSound.start(0, 1);
menuRoarSound = new Sound();
menuRoarSound.attachSound("rawr_04.wav");
menuRoarSound.start(0, 1);
Frame 42
stop();
Key.removeListener(keyListener);
delete keyListener;
onEnterFrame = function () {
};
playBtn.onRelease = function () {
_root.frameTransition("howto");
};
creditsBtn.onRelease = function () {
_root.frameTransition("credits");
};
gamesBtn.onRelease = function () {
_root.getURL("http://gamegriffin.com/", "_blank");
};
Frame 43
backBtn.onRelease = function () {
_root.frameTransition("title");
};
Frame 52
goBtn.onRelease = function () {
_root.frameTransition("play");
};
bonusSize = 1;
upgradeSkin = 0;
upgradeRed = 0;
upgradeFat = 0;
upgradeSpike = 0;
upgradeTail = 0;
upgradeHead = 0;
upgradeWing = 0;
upgradeBlood = 0;
savedMaxHp = 60;
savedHpBarSize = 100;
savedScore = 0;
savedWave = 0;
savedCheckpoint = 0;
savedSpeedMulti = 1;
savedBonusSpeed = 0;
superSavedSize = 100;
upgradeAltenator = 1;
Frame 63
function init() {
mochi.as2.MochiEvents.startPlay("normal");
stage.focus = this;
wormUndergroundSound.setVolume(100);
wormUndergroundSound.stop();
wormUndergroundSound.start(0, 99999);
jetSound.setVolume(0);
jetSound.stop();
jetSound.start(0, 99999);
heliSound.setVolume(0);
heliSound.stop();
heliSound.start(0, 99999);
wormTitleSound.stop();
theVolume = 12;
theVolumeVar = theVolume;
wormInGameSound.setVolume(12);
wormInGameSound.stop();
wormInGameSound.start(2, 999999);
if (playedBefore) {
theControls._visible = false;
}
invincible = false;
theHpMax = savedMaxHp;
theHp = theHpMax;
noEffect = false;
theMeat = 0;
enemyArray = [];
enemyNum = 0;
worldSize = 1;
totalEnemyKilled = 0;
totalEnemyKilledSize = 0;
bonusSpeed = savedBonusSpeed;
speedMulti = savedSpeedMulti;
hpBarSize = savedHpBarSize;
hpBar._xscale = hpBarSize;
theScore = savedScore;
wave = savedWave;
checkpointNum = savedCheckpoint;
savedSize = superSavedSize;
body1._x = body1._x - ((((15 * savedSize) / 100) - 15) * 1);
body2._x = body2._x - ((((15 * savedSize) / 100) - 15) * 2);
body3._x = body3._x - ((((15 * savedSize) / 100) - 15) * 3);
body4._x = body4._x - ((((15 * savedSize) / 100) - 15) * 4);
body5._x = body5._x - ((((15 * savedSize) / 100) - 15) * 5);
body6._x = body6._x - ((((15 * savedSize) / 100) - 15) * 6);
body7._x = body7._x - ((((15 * savedSize) / 100) - 15) * 7);
theHead._xscale = (body1._xscale = (body2._xscale = (body3._xscale = (body4._xscale = (body5._xscale = (body6._xscale = (body7._xscale = savedSize * bonusSize)))))));
theHead._yscale = (body1._yscale = (body2._yscale = (body3._yscale = (body4._yscale = (body5._yscale = (body6._yscale = (body7._yscale = savedSize)))))));
targetLength = (15 * (savedSize - 20)) / 100;
waveSetup();
checkpointSetup();
theCombo = attachMovie("combobox2", "combobox1", 199999, {_x:comboPoint._x, _y:comboPoint._y});
asdfSound = new Sound();
asdfSound.attachSound("asdf.wav");
keyListener = new Object();
keyListener.onKeyDown = function () {
keyCode = Key.getCode();
if (keyCode == 32) {
pauseGame();
}
if (keyCode == 77) {
trace("mute");
if (!_root.Mute) {
_root.Mute = true;
_root.gun1Sound.setVolume(0);
} else if (_root.Mute) {
_root.Mute = false;
_root.gun1Sound.setVolume(100);
}
}
};
Key.addListener(keyListener);
}
function soundControl() {
if (theVolumeVar > theVolume) {
theVolumeVar = theVolumeVar - 0.3;
} else if (theVolumeVar < theVolume) {
theVolumeVar = theVolumeVar + 0.2;
}
if (theVolumeVar > 8) {
theVolumeVar = 8;
}
if ((theVolumeVar < 0) || (bloodlust)) {
theVolumeVar = 0;
}
wormInGameSound.setVolume(theVolumeVar);
}
function pauseGame() {
if ((!gamePaused) && (!gameOver)) {
gamePaused = true;
thePauseScreen = attachMovie("pausescreen", "pausescreen1", 893898, {_x:Stage.width / 2, _y:Stage.height / 2});
} else if (gamePaused && (!gameOver)) {
gamePaused = false;
thePauseScreen.removeMovieClip();
}
}
function moveBody(sprite, target) {
sprite.distx = target.theX - sprite._x;
sprite.disty = -(target.theY - sprite._y);
sprite.angleRad = Math.atan2(sprite.distx, sprite.disty);
sprite.angle = ((sprite.angleRad / Math.PI) * 180) + 0;
sprite.dir = sprite.angle;
sprite.hyp = Math.pow((sprite.distx * sprite.distx) + (sprite.disty * sprite.disty), 0.5);
if (sprite.hyp > (targetLength + 1)) {
sprite.speed = target.speed + 0.5;
} else if (sprite.hyp > targetLength) {
sprite.speed = target.speed;
} else if (sprite.hyp > (targetLength - 1)) {
sprite.speed = target.speed - 0.5;
} else if (sprite.hyp > (targetLength - 20)) {
sprite.speed = target.speed - (0.5 * Math.abs(sprite.hyp - targetLength));
} else {
sprite.speed = 0;
}
turn(sprite);
sprite.theX = sprite._x;
sprite.theY = sprite._y;
sprite._x = sprite._x + sprite.dx;
sprite._y = sprite._y + sprite.dy;
Set(sprite + "OrigY", sprite._y - shakeY);
sprite._rotation = sprite.dir;
}
function addCombo() {
if (comboReseted) {
comboReseted = false;
comboNum = 0;
}
comboNum++;
if (comboNum > maxComboNum) {
_root.kongregateStats.submit("HighestCombo", comboNum);
maxComboNum = comboNum;
}
if (comboNum >= 2) {
theCombo.comboMc.gotoAndStop(2);
theCombo.comboMc.mc.gotoAndPlay(1);
comboOutput = comboNum;
} else {
theCombo.comboMc.gotoAndStop(1);
}
clearTimeout(theReset);
}
function resetCombo() {
theCombo.comboMc.gotoAndStop(1);
comboNum = 0;
delete comboOutput;
}
function addCombo2() {
comboNum2++;
if (((comboNum2 >= bloodLimit) && (!comboTrigger)) && ((getTimer() - 5000) > bloodTime)) {
mochi.as2.MochiEvents.trackEvent("rampage", 1);
_root.kongregateStats.submit("RampageTrigger", 1);
theBloodT = "Rampage!";
theBloodText = attachMovie("bloodtext", "bloodtext1", 199968, {_x:textPoint._x, _y:textPoint._y});
comboTrigger = true;
}
clearTimeout(theReset2);
theReset2 = setTimeout(resetCombo2, 500);
}
function resetCombo2() {
comboNum2 = 0;
}
function spawnEnemy(forced, num) {
numVar = Math.random() * 100;
if (((((enemyUnlocked >= 6) && (numVar > ((100 - (wave * 0.06)) - 0.2))) && (bombArray.length < (wave * 0.7))) && (!waveOver)) && (!enemy6aUnlock)) {
setupEnemy(6, true);
} else if ((((enemyUnlocked >= 6) && (numVar > (100.5 - (wave * 0.06)))) && (!waveOver)) && (enemy6aUnlock)) {
setupEnemy(6, true);
}
if (!forced) {
if (((numVar < 20) && (spawnedEnemy < totalEnemy)) && (aliveEnemy < aliveLimit)) {
enemyGen = Math.ceil(Math.random() * enemyUnlocked);
if (enemyGen != 6) {
setupEnemy(enemyGen, true);
}
}
} else {
n = 1;
while (n <= num) {
enemyGen = Math.ceil(Math.random() * enemyUnlocked);
setupEnemy(enemyGen, false);
n++;
}
}
if (totalEnemyKilled >= upgradeLimit) {
totalEnemyKilled = 0;
waveSetup();
}
if (totalEnemyKilledSize >= 20) {
if (upgradeAltenator == 1) {
getUpgradeText("Size");
savedSize = savedSize + 25;
targetLength = (15 * (savedSize - 20)) / 100;
theHead._xscale = (body1._xscale = (body2._xscale = (body3._xscale = (body4._xscale = (body5._xscale = (body6._xscale = (body7._xscale = savedSize * bonusSize)))))));
theHead._yscale = (body1._yscale = (body2._yscale = (body3._yscale = (body4._yscale = (body5._yscale = (body6._yscale = (body7._yscale = savedSize)))))));
upgradeAltenator++;
} else if (upgradeAltenator == 2) {
getUpgradeText("Speed");
bonusSpeed = bonusSpeed + 0.66;
upgradeAltenator = 1;
}
wormGrowlSound.start(0, 1);
totalEnemyKilledSize = 0;
theU.text = "0" + (20 - totalEnemyKilledSize);
}
if (((aliveEnemy == 0) && (spawnedEnemy >= totalEnemy)) && (!waveOver)) {
waveOver = true;
invincible = true;
if (checkpointNum < 6) {
gameOverFadeIn(1);
} else {
gameOverFadeIn(2);
}
}
}
function getUpgradeText(textVar) {
theUpgradeText = attachMovie("upgradeSizeText", "upgradeSizeText1", 358339);
theUpgradeText.body.body.theText.text = textVar;
theUpgradeText._x = upgradePoint._x + (theUpgradeText._width / 2);
theUpgradeText._y = upgradePoint._y;
setTimeout(function () {
theUpgradeText.removeMovieClip();
}, 2500);
}
function checkpointSetup() {
resetCombo();
checkpointNum++;
mochi.as2.MochiEvents.trackEvent("checkpointReached", checkpointNum);
trace("checkpoint: " + checkpointNum);
savedScore = theScore;
savedBonusSpeed = bonusSpeed;
savedWave = wave - 1;
savedCheckpoint = checkpointNum - 1;
superSavedSize = savedSize;
waveOver = false;
maxComboNum = 0;
spawnedEnemy = 0;
aliveEnemy = 0;
aliveLimit = 30;
bloodLimit = 5;
if (checkpointNum == 1) {
totalEnemy = 25;
aliveLimit = 10;
bloodLimit = 5;
spawnEnemy(true, 4);
setTimeout(function () {
theBloodT = "Level";
theBloodN = "1";
theBloodText2 = attachMovie("bloodtext2", "bloodtext2", 199975, {_x:textPoint._x, _y:textPoint._y});
}, 500);
} else if (checkpointNum == 2) {
aliveLimit = 20;
bloodLimit = 5;
totalEnemy = 40;
wave = 4;
waveSetup();
setTimeout(function () {
theBloodT = "Level";
theBloodN = "2";
theBloodText2 = attachMovie("bloodtext2", "bloodtext2", 199975, {_x:textPoint._x, _y:textPoint._y});
}, 500);
} else if (checkpointNum == 3) {
wave = 7;
totalEnemy = 50;
waveSetup();
setTimeout(function () {
theBloodT = "Level";
theBloodN = "3";
theBloodText2 = attachMovie("bloodtext2", "bloodtext2", 199975, {_x:textPoint._x, _y:textPoint._y});
}, 500);
} else if (checkpointNum == 4) {
totalEnemy = 60;
setTimeout(function () {
theBloodT = "Level";
theBloodN = "4";
theBloodText2 = attachMovie("bloodtext2", "bloodtext2", 199975, {_x:textPoint._x, _y:textPoint._y});
}, 500);
} else if (checkpointNum == 5) {
totalEnemy = 70;
setTimeout(function () {
theBloodT = "Level";
theBloodN = "5";
theBloodText2 = attachMovie("bloodtext2", "bloodtext2", 199975, {_x:textPoint._x, _y:textPoint._y});
}, 500);
} else if (checkpointNum == 6) {
totalEnemy = 80;
setTimeout(function () {
theBloodT = "Level";
theBloodN = "6";
theBloodText2 = attachMovie("bloodtext2", "bloodtext2", 199975, {_x:textPoint._x, _y:textPoint._y});
}, 500);
} else if (checkpointNum == 7) {
totalEnemy = 99999 /* 0x01869F */;
wave = 16;
bloodLimit = 6;
waveSetup();
setTimeout(function () {
killBtn._visible = true;
theBloodT = "Sandbox Mode!";
theBloodN = "";
theBloodText2 = attachMovie("bloodtext2", "bloodtext2", 199975, {_x:textPoint._x, _y:textPoint._y});
}, 500);
}
}
function waveSetup() {
wave++;
trace("wave: " + wave);
enemy1aUnlock = false;
enemy2aUnlock = false;
enemy3aUnlock = false;
enemy4aUnlock = false;
enemy5aUnlock = false;
enemy6aUnlockLight = false;
enemy6aUnlock = false;
enemy7aUnlock = false;
enemy8aUnlock = false;
enemy9aUnlock = false;
enemy10aUnlock = false;
if (wave == 1) {
enemyUnlocked = 2;
enemy1aUnlock = true;
enemy2aUnlock = false;
enemy3aUnlock = false;
enemy4aUnlock = false;
enemy5aUnlock = false;
enemy6aUnlockLight = false;
enemy6aUnlock = false;
enemy7aUnlock = false;
enemy8aUnlock = false;
enemy9aUnlock = false;
enemy10aUnlock = false;
upgradeLimit = 10;
} else if (wave == 2) {
enemyUnlocked = 3;
enemy1aUnlock = true;
enemy2aUnlock = false;
enemy3aUnlock = false;
enemy4aUnlock = false;
enemy5aUnlock = false;
enemy6aUnlockLight = false;
enemy6aUnlock = false;
enemy7aUnlock = false;
enemy8aUnlock = false;
enemy9aUnlock = false;
enemy10aUnlock = false;
upgradeLimit = 10;
} else if (wave == 3) {
enemyUnlocked = 4;
enemy1aUnlock = true;
enemy2aUnlock = false;
enemy3aUnlock = false;
enemy4aUnlock = false;
enemy5aUnlock = false;
enemy6aUnlockLight = false;
enemy6aUnlock = false;
enemy7aUnlock = false;
enemy8aUnlock = false;
enemy9aUnlock = false;
enemy10aUnlock = false;
upgradeLimit = 10;
} else if (wave == 4) {
enemyUnlocked = 5;
enemy1aUnlock = true;
enemy2aUnlock = true;
enemy3aUnlock = false;
enemy4aUnlock = false;
enemy5aUnlock = false;
enemy6aUnlockLight = false;
enemy6aUnlock = false;
enemy7aUnlock = false;
enemy8aUnlock = false;
enemy9aUnlock = false;
enemy10aUnlock = false;
upgradeLimit = 10;
} else if (wave == 5) {
enemyUnlocked = 6;
enemy1aUnlock = true;
enemy2aUnlock = true;
enemy3aUnlock = false;
enemy4aUnlock = false;
enemy5aUnlock = false;
enemy6aUnlockLight = false;
enemy6aUnlock = false;
enemy7aUnlock = false;
enemy8aUnlock = false;
enemy9aUnlock = false;
enemy10aUnlock = false;
upgradeLimit = 20;
} else if (wave == 6) {
enemyUnlocked = 7;
enemy1aUnlock = true;
enemy2aUnlock = true;
enemy3aUnlock = false;
enemy4aUnlock = false;
enemy5aUnlock = false;
enemy6aUnlockLight = false;
enemy6aUnlock = false;
enemy7aUnlock = false;
enemy8aUnlock = false;
enemy9aUnlock = false;
enemy10aUnlock = false;
upgradeLimit = 20;
} else if (wave == 7) {
enemyUnlocked = 8;
enemy1aUnlock = true;
enemy2aUnlock = true;
enemy3aUnlock = false;
enemy4aUnlock = false;
enemy5aUnlock = false;
enemy6aUnlockLight = true;
enemy6aUnlock = false;
enemy7aUnlock = false;
enemy8aUnlock = false;
enemy9aUnlock = false;
enemy10aUnlock = false;
upgradeLimit = 20;
} else if (wave == 8) {
enemyUnlocked = 9;
enemy1aUnlock = true;
enemy2aUnlock = true;
enemy3aUnlock = false;
enemy4aUnlock = false;
enemy5aUnlock = false;
enemy6aUnlockLight = true;
enemy6aUnlock = false;
enemy7aUnlock = false;
enemy8aUnlock = false;
enemy9aUnlock = false;
enemy10aUnlock = false;
upgradeLimit = 30;
} else if (wave == 9) {
enemyUnlocked = 10;
enemy1aUnlock = true;
enemy2aUnlock = true;
enemy3aUnlock = false;
enemy4aUnlock = false;
enemy5aUnlock = false;
enemy6aUnlockLight = true;
enemy6aUnlock = false;
enemy7aUnlock = false;
enemy8aUnlock = false;
enemy9aUnlock = false;
enemy10aUnlock = false;
upgradeLimit = 30;
} else if (wave == 10) {
enemyUnlocked = 10;
enemy1aUnlock = true;
enemy2aUnlock = true;
enemy3aUnlock = true;
enemy4aUnlock = false;
enemy5aUnlock = false;
enemy6aUnlockLight = true;
enemy6aUnlock = false;
enemy7aUnlock = false;
enemy8aUnlock = false;
enemy9aUnlock = false;
enemy10aUnlock = false;
upgradeLimit = 30;
} else if (wave == 11) {
enemyUnlocked = 10;
enemy1aUnlock = true;
enemy2aUnlock = true;
enemy3aUnlock = true;
enemy4aUnlock = true;
enemy5aUnlock = true;
enemy6aUnlockLight = true;
enemy6aUnlock = false;
enemy7aUnlock = false;
enemy8aUnlock = false;
enemy9aUnlock = false;
enemy10aUnlock = false;
upgradeLimit = 30;
} else if (wave == 12) {
enemyUnlocked = 10;
enemy1aUnlock = true;
enemy2aUnlock = true;
enemy3aUnlock = true;
enemy4aUnlock = true;
enemy5aUnlock = true;
enemy6aUnlockLight = true;
enemy6aUnlock = false;
enemy7aUnlock = false;
enemy8aUnlock = false;
enemy9aUnlock = false;
enemy10aUnlock = false;
upgradeLimit = 30;
} else if (wave == 13) {
enemyUnlocked = 10;
enemy1aUnlock = true;
enemy2aUnlock = true;
enemy3aUnlock = true;
enemy4aUnlock = true;
enemy5aUnlock = true;
enemy6aUnlockLight = true;
enemy6aUnlock = false;
enemy7aUnlock = true;
enemy8aUnlock = false;
enemy9aUnlock = false;
enemy10aUnlock = false;
upgradeLimit = 30;
} else if (wave == 14) {
enemyUnlocked = 10;
enemyUnlocked = 10;
enemy1aUnlock = true;
enemy2aUnlock = true;
enemy3aUnlock = true;
enemy4aUnlock = true;
enemy5aUnlock = true;
enemy6aUnlockLight = true;
enemy6aUnlock = false;
enemy7aUnlock = true;
enemy8aUnlock = true;
enemy9aUnlock = false;
enemy10aUnlock = false;
upgradeLimit = 30;
} else if (wave == 15) {
enemyUnlocked = 10;
enemy1aUnlock = true;
enemy2aUnlock = true;
enemy3aUnlock = true;
enemy4aUnlock = true;
enemy5aUnlock = true;
enemy6aUnlockLight = true;
enemy6aUnlock = false;
enemy7aUnlock = true;
enemy8aUnlock = true;
enemy9aUnlock = true;
enemy10aUnlock = false;
upgradeLimit = 30;
} else if (wave == 16) {
enemyUnlocked = 10;
enemy1aUnlock = true;
enemy2aUnlock = true;
enemy3aUnlock = true;
enemy4aUnlock = true;
enemy5aUnlock = true;
enemy6aUnlockLight = true;
enemy6aUnlock = false;
enemy7aUnlock = true;
enemy8aUnlock = true;
enemy9aUnlock = true;
enemy10aUnlock = true;
upgradeLimit = 30;
} else if (wave >= 17) {
enemyUnlocked = 10;
enemy1aUnlock = true;
enemy2aUnlock = true;
enemy3aUnlock = true;
enemy4aUnlock = true;
enemy5aUnlock = true;
enemy6aUnlockLight = true;
enemy6aUnlock = true;
enemy7aUnlock = true;
enemy8aUnlock = true;
enemy9aUnlock = true;
enemy10aUnlock = true;
upgradeLimit = 20;
}
}
function setupBomb(theX, theY, theDx) {
enemyNum++;
if (enemyNum >= 999) {
enemyNum = 0;
}
theBomb = enemyMap.attachMovie("bomb", "bomb" + enemyNum, 41000 + enemyNum, {_x:theX, _y:theY});
theBomb.gravity = 0.35;
theBomb.dy = 0;
theBomb.dx = theDx;
theBomb.dir = ((Math.atan2(theBomb.dy, theBomb.dx) / Math.PI) * 180) + 90;
theBomb._rotation = theBomb.dir;
bombArray.push(theBomb);
theBomb.onEnterFrame = function () {
if (!gamePaused) {
if (!this.noMove) {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
this.dy = this.dy + 0.35;
this.dx = this.dx * 0.98;
this.dir = ((Math.atan2(this.dy, this.dx) / Math.PI) * 180) + 90;
this._rotation = this.dir;
}
if ((this._x + this._parent._x) < -200) {
this._x = (1800 - this._parent._x) + ((this._x + this._parent._x) + 200);
}
if ((this._x + this._parent._x) > 1800) {
this._x = (-200 - this._parent._x) + (((this._x + this._parent._x) - 1600) - 200);
}
if ((this.hitbox.hitTest(theHead.bulletHitbox) && (!this.armed)) && (!this.noMove)) {
this.boom = true;
this.armed = true;
} else if (this.hitbox.hitTest(theHead.bulletHitbox) && (this.armed)) {
this.boom = true;
}
if ((this._y > 12) && (!this.noMove)) {
this.noMove = true;
setTimeout(function (target) {
target.shooter.flasher.play();
target.armed = true;
}, 750, this);
this._y = 12;
this._rotation = 180;
}
}
};
}
function setupBomb2(theX, theY, theDx) {
enemyNum++;
if (enemyNum >= 1000) {
enemyNum = 0;
}
theBomb = effectMap.attachMovie("bombnuke", "bomb" + enemyNum, 41000 + enemyNum, {_x:theX, _y:theY});
theBomb.gravity = 0.35;
theBomb.dy = 0;
theBomb.dx = theDx;
theBomb.dir = ((Math.atan2(theBomb.dy, theBomb.dx) / Math.PI) * 180) + 90;
theBomb._rotation = theBomb.dir;
theBomb.explode = function () {
shake2 = 25;
var _local2 = Math.abs(theHead._x - (this._x + enemyMap._x));
var _local4 = -(theHead._y - (this._y + enemyMap._y));
var _local3 = Math.pow((_local2 * _local2) + (_local4 * _local4), 0.5);
if ((_local3 < 250) && (!theHead.grounded)) {
_local2 = Math.cos(((_local2 / 250) * 90) * 0.0174532925);
var _local5 = (_local2 * 25) * 0.66;
if (upgradeHead == 2) {
_local5 = _local5 * 0.7;
}
theHp = theHp - _local5;
} else if ((theHead.grounded && (_local3 < 70)) && (!waveOver)) {
var _local5 = 16.5;
if (upgradeHead == 2) {
_local5 = _local5 * 0.7;
}
theHp = theHp - _local5;
}
particleNum++;
if (particleNum >= 1000) {
particleNum = 0;
}
theExplosion = enemyMap.attachMovie("explosionnuke", "explosion" + particleNum, 50000 + particleNum, {_x:this._x, _y:this._y});
this.removeMovieClip();
};
theBomb.onEnterFrame = function () {
if (!gamePaused) {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
this.dy = this.dy + 0.35;
this.dx = this.dx * 0.98;
this.dir = ((Math.atan2(this.dy, this.dx) / Math.PI) * 180) + 90;
this._rotation = this.dir;
if (this._y > 12) {
explode2Sound.start(0, 1);
explode2Sound.start(0, 1);
this.explode();
}
}
};
}
function superPurge() {
destroyAll(enemyArray);
destroyAll(bombArray);
destroyAll(enemyBulletArray);
}
function healthCheck() {
if (upgradeFat) {
bonusSize = 1.1;
} else {
bonusSize = 1;
}
if (((((theHp > 0) && (!waveOver)) && (!gameOver)) && (!gamePaused)) && (!upgradeFat)) {
theHp = theHp - (0.02 + (0.08 * (theHp / theHpMax)));
}
if (theHp > theHpMax) {
theHp = theHpMax;
}
if (theHp <= 0) {
theHp = 0;
if (!gameOver) {
gameOver = true;
clearTimeout(bloodLustTimer);
bloodLustTimer = setTimeout(stopBloodlust, 3000);
setTimeout(frameTransitionSlow, 3000, "gameover");
theHead.dead = true;
theHead.dx = (Math.random() * 8) - 4;
body1.dx = (Math.random() * 8) - 4;
body2.dx = (Math.random() * 8) - 4;
body3.dx = (Math.random() * 8) - 4;
body4.dx = (Math.random() * 8) - 4;
body5.dx = (Math.random() * 8) - 4;
body6.dx = (Math.random() * 8) - 4;
body7.dx = (Math.random() * 8) - 4;
theHead.dy = -((Math.random() * 4) + 4);
body1.dy = -((Math.random() * 4) + 4);
body2.dy = -((Math.random() * 4) + 4);
body3.dy = -((Math.random() * 4) + 4);
body4.dy = -((Math.random() * 4) + 4);
body5.dy = -((Math.random() * 4) + 4);
body6.dy = -((Math.random() * 4) + 4);
body7.dy = -((Math.random() * 4) + 4);
theHead.dy = theHead.dy * 2;
theHead.dx = theHead.dx * 2;
body1.dy = body1.dy * ((Math.random() * 0.4) + 1.6);
body2.dy = body2.dy * ((Math.random() * 0.4) + 1.6);
body3.dy = body3.dy * ((Math.random() * 0.4) + 1.6);
body4.dy = body4.dy * ((Math.random() * 0.4) + 1.6);
body5.dy = body5.dy * ((Math.random() * 0.4) + 1.6);
body6.dy = body6.dy * ((Math.random() * 0.4) + 1.6);
body7.dy = body7.dy * ((Math.random() * 0.4) + 1.6);
body1.dx = body1.dx * ((Math.random() * 0.4) + 1.6);
body2.dx = body2.dx * ((Math.random() * 0.4) + 1.6);
body3.dx = body3.dx * ((Math.random() * 0.4) + 1.6);
body4.dx = body4.dx * ((Math.random() * 0.4) + 1.6);
body5.dx = body5.dx * ((Math.random() * 0.4) + 1.6);
body6.dx = body6.dx * ((Math.random() * 0.4) + 1.6);
body7.dx = body7.dx * ((Math.random() * 0.4) + 1.6);
explode1Sound.start(0, 1);
explode1Sound.start(0, 1);
explode1Sound.start(0, 1);
explode1Sound.start(0, 1);
greenSplatter(((theHead._x - splatterMap._x) + (Math.random() * 60)) - 30, (theHead._y - splatterMap._y) + theHead.dy, theHead.dx, theHead.dy);
greenSplatter(((body2._x - splatterMap._x) + (Math.random() * 60)) - 30, (body2._y - splatterMap._y) + body2.dy, body2.dx, body2.dy);
greenSplatter(((body4._x - splatterMap._x) + (Math.random() * 60)) - 30, (body4._y - splatterMap._y) + body4.dy, body4.dx, body4.dy);
greenSplatter(((body6._x - splatterMap._x) + (Math.random() * 60)) - 30, (body6._y - splatterMap._y) + body6.dy, body6.dx, body6.dy);
greenSplatter(((theHead._x - splatterMap._x) + (Math.random() * 60)) - 30, (theHead._y - splatterMap._y) + theHead.dy, theHead.dx, theHead.dy);
theHead.dir = ((Math.atan2(theHead.dy, theHead.dx) / Math.PI) * 180) + 90;
theHead._rotation = theHead.dir;
theVolume = 0;
theHead.onEnterFrame = function () {
body1._x = body1._x - (this.dx * 0.7);
body2._x = body2._x - (this.dx * 0.7);
body3._x = body3._x - (this.dx * 0.7);
body4._x = body4._x - (this.dx * 0.7);
body5._x = body5._x - (this.dx * 0.7);
body6._x = body6._x - (this.dx * 0.7);
body7._x = body7._x - (this.dx * 0.7);
sky._x = sky._x - (this.dx * 0.7);
sky2._x = sky2._x - (this.dx * 0.7);
ground._x = ground._x - (this.dx * 0.7);
ground2._x = ground2._x - (this.dx * 0.7);
enemyMap._x = enemyMap._x - (this.dx * 0.7);
dirtMap._x = dirtMap._x - (this.dx * 0.7);
effectMap._x = effectMap._x - (this.dx * 0.7);
splatterMap._x = splatterMap._x - (this.dx * 0.7);
this._x = this._x + (this.dx * 0.3);
if (((ground._x + ground._width) < -200) && (this.dx > 0)) {
groundOnTheLeft = false;
sideVar = true;
}
if (((ground2._x + ground2._width) < -200) && (this.dx > 0)) {
groundOnTheLeft = true;
sideVar = true;
}
if ((ground._x > 840) && (this.dx < 0)) {
groundOnTheLeft = true;
sideVar = false;
}
if ((ground2._x > 840) && (this.dx < 0)) {
groundOnTheLeft = false;
sideVar = false;
}
if (!groundOnTheLeft) {
if (sideVar) {
ground._x = ground2._x + ground2._width;
sky._x = sky2._x + 1250;
} else {
ground2._x = ground._x - ground2._width;
sky2._x = sky._x - 1250;
}
} else if (sideVar) {
ground2._x = ground._x + ground._width;
sky2._x = sky._x + 1250;
} else {
ground._x = ground2._x - ground._width;
sky._x = sky2._x - 1250;
}
this._y = this._y + this.dy;
this.dy = this.dy + 0.5;
theHeadOrigY = theHead._y;
if ((this._y >= (ground._y - 5)) && (this.dy >= 0)) {
this._y = ground._y - 5;
this.dy = 0;
this.dx = 0;
} else {
if (this.dx > 0) {
this.dir = this.dir + 2;
} else {
this.dir = this.dir + -2;
}
this._rotation = this.dir;
}
};
body1.onEnterFrame = (body2.onEnterFrame = (body3.onEnterFrame = (body4.onEnterFrame = (body5.onEnterFrame = (body6.onEnterFrame = (body7.onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
this.dy = this.dy + 0.5;
Set(this + "OrigY", this._y);
if ((this._y >= (ground._y - 5)) && (this.dy >= 0)) {
this._y = ground._y - 5;
this.dy = 0;
this.dx = 0;
} else {
if (this.dx > 0) {
this.dir = this.dir + 1;
} else {
this.dir = this.dir + -1;
}
this._rotation = this.dir;
}
}))))));
}
}
}
function shakeScreen() {
shakeY = (Math.random() * shake2) - (shake2 / 2);
dirtMap._y = dirtMapOrigY + shakeY;
enemyMap._y = enemyMapOrigY + shakeY;
sky._y = skyOrigY + shakeY;
sky2._y = sky2OrigY + shakeY;
ground._y = groundOrigY + shakeY;
ground2._y = groundOrig2Y + shakeY;
groundBack._y = groundBackOrigY + shakeY;
theHead._y = theHeadOrigY + shakeY;
body1._y = body1OrigY + shakeY;
body2._y = body2OrigY + shakeY;
body3._y = body3OrigY + shakeY;
body4._y = body4OrigY + shakeY;
body5._y = body5OrigY + shakeY;
body6._y = body6OrigY + shakeY;
body7._y = body7OrigY + shakeY;
if (shake2 > 0) {
shake2 = shake2 - 1.2;
} else {
shake2 = 0;
}
}
function setupDirt() {
theDirt = dirtMap.attachMovie("dirt", "dirt_" + dirtNum, 34000 + dirtNum);
theDirt._x = body1._x - theDirt._parent._x;
theDirt._y = body1._y - theDirt._parent._y;
theDirt._yscale = (theDirt._xscale = savedSize);
theDirt.dirtLife = 4500;
theDirt.dirtTime = getTimer();
dirtNum++;
if (dirtNum >= 150) {
dirtNum = 0;
}
theDirt.onEnterFrame = function () {
if (getTimer() > (this.dirtTime + this.dirtLife)) {
this.onEnterFrame = function () {
this._alpha = this._alpha - 20;
if (this._alpha < 10) {
this.removeMovieClip();
}
};
}
if ((this._x + this._parent._x) < -200) {
this.removeMovieClip();
}
if ((this._x + this._parent._x) > 840) {
this.removeMovieClip();
}
};
}
function bombCheck() {
for (x in bombArray) {
if (bombArray[x].boom && (!bombArray[x].exploded)) {
bombArray[x].exploded = true;
particleNum++;
if (particleNum >= 1000) {
particleNum = 0;
}
distx = theHead._x - (bombArray[x]._x + enemyMap._x);
disty = -(theHead._y - (bombArray[x]._y + enemyMap._y));
hyp = Math.pow((distx * distx) + (disty * disty), 0.5);
if (((hyp < 130) && (!waveOver)) && (!invincible)) {
theHp = theHp - 10;
}
particleNum++;
if (particleNum >= 1000) {
particleNum = 0;
}
explode2Sound.start(0, 1);
theExplosion = enemyMap.attachMovie("explosion", "explosion" + particleNum, 50000 + particleNum, {_x:bombArray[x]._x, _y:bombArray[x]._y});
for (f in bombArray) {
if ((Math.abs(bombArray[x]._x - bombArray[f]._x) < 90) && (bombArray[f].noMove)) {
setTimeout(function (target) {
target.boom = true;
}, 50, bombArray[f]);
}
}
bombArray[x].removeMovieClip();
bombArray.splice(x, 1);
}
}
}
function arrayChecker(theArray, typeNum) {
for (x in theArray) {
if (((theArray[x].Type == typeNum) && ((theArray[x]._x + enemyMap._x) > -40)) && ((theArray[x]._x + enemyMap._x) < (Stage.width + 40))) {
return(true);
}
}
}
function enemyArrayCheck() {
if (arrayChecker(enemyArray, 6)) {
} else {
jetSound.setVolume(0);
}
if (arrayChecker(enemyArray, 10)) {
heliSound.setVolume(100);
} else {
heliSound.setVolume(0);
}
for (x in enemyArray) {
if ((!theHead.grounded) && (!gameOver)) {
if ((enemyArray[x].hitbox.hitTest(theHead.hitbox) || ((enemyArray[x].hitbox.hitTest(body1.hitbox1) || (enemyArray[x].hitbox.hitTest(body1.hitbox2))) && (upgradeSpike == 2))) && (!enemyArray[x].dead)) {
enemyArray[x].dead = true;
theMeat = theMeat + enemyArray[x].meatVar;
if (upgradeBlood == 1) {
var _local3 = Math.ceil(((enemyArray[x].scoreVar * 1.5) * (1 + (comboNum * 0.1))) / 5) * 5;
} else {
var _local3 = Math.ceil((enemyArray[x].scoreVar * (1 + (comboNum * 0.1))) / 5) * 5;
}
if (((_local3 != null) && (_local3 != undefined)) && (_local3 > 0)) {
theScore = theScore + _local3;
}
if (!this.dead) {
if (!bloodlust) {
_root.startBloodlust();
} else {
clearTimeout(bloodLustTimer);
bloodLustTimer = setTimeout(stopBloodlust, 5000);
}
}
addCombo();
addCombo2();
if (rampage) {
if (getTimer() > ((bloodTime + 5000) - 2500)) {
clearTimeout(rampageTimer);
rampageTimer = setTimeout(stopRampage, 2500);
}
}
if ((enemyArray[x].meatVar > 0) && (enemyArray[x].hitbox.hitTest(theHead.hitbox))) {
theHp = theHp + (enemyArray[x].meatVar * 3.2);
theHead.mouth.play();
}
if (enemyArray[x].Type == 6) {
if (!enemyArray[x].counter2) {
impactTankSound.start(0, 1);
enemyArray[x].counter2 = true;
enemyArray[x].plane.gotoAndStop(2);
enemyArray[x].dx = enemyArray[x].dx + (theHead.dx * 0.3);
if (theHead.dx > 0) {
enemyArray[x].dx = enemyArray[x].dx + 1;
} else if (theHead.dx < 0) {
enemyArray[x].dx = enemyArray[x].dx - 1;
}
enemyArray[x].dy = enemyArray[x].dy + ((theHead.dy * 0.5) - 2);
enemyArray[x].gravity = 0.35;
}
} else if (enemyArray[x].Type == 10) {
if (!enemyArray[x].counter2) {
impactTankSound.start(0, 1);
enemyArray[x].counter2 = true;
enemyArray[x].shooter.copter.gotoAndStop(2);
enemyArray[x].dx = enemyArray[x].dx + (theHead.dx * 0.3);
if (theHead.dx > 0) {
enemyArray[x].dx = enemyArray[x].dx + 1;
} else if (theHead.dx < 0) {
enemyArray[x].dx = enemyArray[x].dx - 1;
}
enemyArray[x].dy = enemyArray[x].dy + ((theHead.dy * 0.5) - 2);
enemyArray[x].gravity = 0.35;
}
} else if (((enemyArray[x].Type == 7) || (enemyArray[x].Type == 9)) || ((enemyArray[x].Type == 5) && (enemyArray[x].modVar == "a"))) {
if (!enemyArray[x].counter2) {
impactTankSound.start(0, 1);
enemyArray[x].counter2 = true;
enemyArray[x].shooter.gotoAndStop(4);
enemyArray[x].dx = enemyArray[x].dx + (theHead.dx * 0.3);
if (theHead.dx > 0) {
enemyArray[x].dx = enemyArray[x].dx + 3;
} else if (theHead.dx < 0) {
enemyArray[x].dx = enemyArray[x].dx - 3;
}
enemyArray[x].dy = enemyArray[x].dy + ((theHead.dy * 0.5) - 3);
enemyArray[x].gravity = 0.35;
}
} else {
if (!noEffect) {
if (enemyArray[x].meatVar >= 4) {
bloodSplatter(enemyArray[x]._x, enemyArray[x]._y, theHead.dx, theHead.dy);
bloodSplatter(enemyArray[x]._x, enemyArray[x]._y, theHead.dx, theHead.dy);
bloodSplatter(enemyArray[x]._x, enemyArray[x]._y, theHead.dx, theHead.dy);
bloodSplatter(enemyArray[x]._x, enemyArray[x]._y, theHead.dx, theHead.dy);
bloodSplatter(enemyArray[x]._x, enemyArray[x]._y, theHead.dx, theHead.dy);
bloodSplatter(enemyArray[x]._x, enemyArray[x]._y, theHead.dx, theHead.dy);
bloodSplatter(enemyArray[x]._x, enemyArray[x]._y, theHead.dx, theHead.dy);
bloodSplatter(enemyArray[x]._x, enemyArray[x]._y, theHead.dx, theHead.dy);
} else {
bloodSplatter(enemyArray[x]._x, enemyArray[x]._y, theHead.dx, theHead.dy);
bloodSplatter(enemyArray[x]._x, enemyArray[x]._y, theHead.dx, theHead.dy);
bloodSplatter(enemyArray[x]._x, enemyArray[x]._y, theHead.dx, theHead.dy);
bloodSplatter(enemyArray[x]._x, enemyArray[x]._y, theHead.dx, theHead.dy);
}
}
if ((enemyArray[x].Type == 1) && (enemyArray[x].modVar != "a")) {
impactDogSound.start(0, 1);
} else if ((enemyArray[x].Type == 1) && (enemyArray[x].modVar == "a")) {
impactCowSound.start(0, 1);
} else {
numberGen = Math.ceil(Math.random() * 4);
if (numberGen == 1) {
impactMan3Sound.start(0, 1);
} else if (numberGen == 2) {
impactMan1Sound.start(0, 1);
} else if (numberGen == 3) {
impactMan1Sound.start(0, 1);
} else if (numberGen == 4) {
impactMan2Sound.start(0, 1);
}
}
enemyArray[x].removeMovieClip();
}
if (enemyArray[x].Type != 6) {
aliveEnemy = aliveEnemy - 1;
totalEnemyKilled++;
totalEnemyKilledSize++;
if ((20 - totalEnemyKilledSize) >= 10) {
theU.text = "0" + (20 - totalEnemyKilledSize);
} else {
theU.text = "00" + (20 - totalEnemyKilledSize);
}
}
enemyArray.splice(x, 1);
}
}
if ((enemyArray[x]._y + enemyArray[x]._parent._y) < -100) {
enemyArray[x].removeMovieClip();
enemyArray.splice(x, 1);
}
}
}
function moveEnemyBullets() {
for (x in enemyBulletArray) {
enemyBulletArray[x]._x = enemyBulletArray[x]._x + enemyBulletArray[x].dx;
enemyBulletArray[x]._y = enemyBulletArray[x]._y + enemyBulletArray[x].dy;
enemyBulletArray[x].dy = enemyBulletArray[x].dy + 0.06;
if (enemyBulletArray[x].Type == "heli") {
enemyBulletArray[x].numVar = enemyBulletArray[x].numVar + 0.5;
enemyBulletArray[x].dir = enemyBulletArray[x].dir + (Math.sin(enemyBulletArray[x].numVar) * 3);
enemyBulletArray[x]._rotation = enemyBulletArray[x].dir;
turn(enemyBulletArray[x]);
} else if (enemyBulletArray[x].Type2 == "enemybullettanklaser") {
enemyBulletArray[x].dir = enemyBulletArray[x].dir + 45;
enemyBulletArray[x]._rotation = enemyBulletArray[x].dir;
} else if (enemyBulletArray[x].Type2 != "enemybullet") {
enemyBulletArray[x].dir = ((Math.atan2(enemyBulletArray[x].dy, enemyBulletArray[x].dx) / Math.PI) * 180) + 90;
enemyBulletArray[x]._rotation = enemyBulletArray[x].dir;
}
if (enemyBulletArray[x].hitbox.hitTest(theHead.bulletHitbox)) {
if (enemyBulletArray[x].Type == "shooter") {
theHp = theHp - enemyBulletArray[x].damage;
enemyBulletArray[x].removeMovieClip();
enemyBulletArray.splice(x, 1);
} else if ((enemyBulletArray[x].Type == "tank") || (enemyBulletArray[x].Type == "heli")) {
theHp = theHp - enemyBulletArray[x].damage;
particleNum++;
if (particleNum >= 1000) {
particleNum = 0;
}
if ((enemyBulletArray[x].Type2 == "enemybullettanklaser") || (enemyBulletArray[x].Type2 == "enemybullethelisuper")) {
explode1Sound.start(0, 1);
theExplosion = enemyMap.attachMovie("explosion3", "explosion" + particleNum, 50000 + particleNum, {_x:enemyBulletArray[x]._x, _y:enemyBulletArray[x]._y});
} else {
explode1Sound.start(0, 1);
theExplosion = enemyMap.attachMovie("explosion2", "explosion" + particleNum, 50000 + particleNum, {_x:enemyBulletArray[x]._x, _y:enemyBulletArray[x]._y});
}
enemyBulletArray[x].removeMovieClip();
enemyBulletArray.splice(x, 1);
}
}
if (enemyBulletArray[x]._y > 0) {
if ((enemyBulletArray[x].Type == "tank") || (enemyBulletArray[x].Type == "heli")) {
particleNum++;
if (particleNum >= 1000) {
particleNum = 0;
}
if ((enemyBulletArray[x].Type2 == "enemybullettanklaser") || (enemyBulletArray[x].Type2 == "enemybullethelisuper")) {
explode1Sound.start(0, 1);
theExplosion = enemyMap.attachMovie("explosion3", "explosion" + particleNum, 50000 + particleNum, {_x:enemyBulletArray[x]._x, _y:enemyBulletArray[x]._y});
} else {
explode1Sound.start(0, 1);
theExplosion = enemyMap.attachMovie("explosion2", "explosion" + particleNum, 50000 + particleNum, {_x:enemyBulletArray[x]._x, _y:enemyBulletArray[x]._y});
}
enemyBulletArray[x].removeMovieClip();
enemyBulletArray.splice(x, 1);
}
}
if (((((enemyBulletArray[x]._x + enemyBulletArray[x]._parent._x) < -200) || ((enemyBulletArray[x]._x + enemyBulletArray[x]._parent._x) > 840)) || ((enemyBulletArray[x]._y + enemyBulletArray[x]._parent._y) < -50)) || (enemyBulletArray[x]._y > 10)) {
enemyBulletArray[x].removeMovieClip();
enemyBulletArray.splice(x, 1);
}
}
}
function startBloodlust() {
stopAllSounds();
shake2 = 25;
bloodlust = true;
crowdScreamSound.start(0, 1);
bloodMusicSound.stop();
bloodMusicSound.start(56, 99999);
bloodMusicSound.setVolume(30);
clearTimeout(bloodLustTimer);
bloodLustTimer = setTimeout(stopBloodlust, 5000);
}
function startRampage() {
stopAllSounds();
bloodTime = getTimer();
bloodRoarSound.start(0, 1);
theHead.speed = theHead.speed + 2;
shake2 = 25;
rampage = true;
bloodMusicSound.stop();
bloodMusicSound.start(26, 99999);
bloodMusicSound.setVolume(30);
clearTimeout(rampageTimer);
rampageTimer = setTimeout(stopRampage, 5000);
}
function stopRampage() {
comboTrigger = false;
rampage = false;
comboNum2 = 0;
bloodTime = getTimer();
clearTimeout(rampageTimer);
theBloodText.onEnterFrame = function () {
this._x = this._x - 60;
if ((this._x + (this._width / 2)) < 0) {
this.removeMovieClip();
comboNum2 = 0;
}
};
}
function stopBloodlust() {
stopRampage();
wormUndergroundSound.setVolume(100);
wormUndergroundSound.stop();
wormUndergroundSound.start(0, 99999);
jetSound.setVolume(0);
jetSound.stop();
jetSound.start(0, 99999);
heliSound.setVolume(0);
heliSound.stop();
heliSound.start(0, 99999);
wormInGameSound.stop();
wormInGameSound.start(1, 999999);
wormInGameSound.setVolume(0);
theVolume = 100;
bloodlust = false;
comboNum2 = 0;
}
function upgradeShopFadeIn() {
theUpgradeShop = attachMovie("upgradeshop", "upgradeshop1", 399595, {_alpha:100, _y:Stage.height / 2});
theUpgradeShop._x = -(theUpgradeShop._width / 2);
theUpgradeShop.gotoAndStop(checkpointNum);
theUpgradeShop.onEnterFrame = function () {
this._x = this._x + 90;
if ((this._x > (Stage.width / 2)) && (!this.noMove)) {
this.noMove = true;
this._x = Stage.width / 2;
this.onEnterFrame = function () {
if (this.dead) {
this._alpha = this._alpha - 20;
if (this._alpha < 10) {
if (checkpointNum != 6) {
nextWave();
} else {
gameOverFadeIn(3);
}
this.removeMovieClip();
}
}
};
}
};
}
function gameOverFadeIn(num) {
gameOver = true;
resetCombo();
theVolume = 100;
clearTimeout(bloodLustTimer);
bloodLustTimer = setTimeout(stopBloodlust, 3000);
comboTrigger = false;
rampage = false;
comboNum2 = 0;
bloodTime = getTimer();
stopRampage();
gameOverOverlay = attachMovie("gameoveroverlay", "gameoveroverlay1", 399294, {_alpha:100, _y:Stage.height / 2});
gameOverOverlay._x = -(gameOverOverlay._width / 2);
gameOverOverlay.gotoAndStop(num);
gameOverOverlay.num = num;
gameOverOverlay.comboNumVar = 0;
gameOverOverlay.comboVar = 0;
gameOverOverlay.hpVar = 0;
gameOverOverlay.scoreVar = 0;
gameOverOverlay.theScore = theScore;
gameOverOverlay.maxComboNum = maxComboNum;
gameOverOverlay.comboBonus = Math.ceil(((Math.pow(maxComboNum, 1.2) * 50000) * Math.pow(checkpointNum / 6, 1.3)) / 100) * 100;
gameOverOverlay.hpBonus = Math.ceil((((Math.pow((theHp / theHpMax) * 100, 1) * 500000) / 100) * Math.pow(checkpointNum / 6, 1.3)) / 100) * 100;
gameOverOverlay.totalScore = (theScore + gameOverOverlay.comboBonus) + gameOverOverlay.hpBonus;
gameOverOverlay.onEnterFrame = function () {
this._x = this._x + 90;
if ((this._x > (Stage.width / 2)) && (!this.noMove)) {
this.noMove = true;
this._x = Stage.width / 2;
if (this.num <= 2) {
cheerSound.start(0, 1);
theCheer = setInterval(function () {
cheerSound.start(0, 1);
}, 4250);
} else {
sighSound.start(0, 1);
}
if (this.num <= 2) {
spriteAlt++;
if (spriteAlt > 4) {
spriteAlt = 1;
}
setupExplodingCow();
theCowInterval = setInterval(setupExplodingCow, 300);
}
this.onEnterFrame = function () {
if (num <= 2) {
if (!this.comboNumComplete) {
scoreLoopSound.start(0, 1);
this.comboNumVar = this.comboNumVar + 1;
if (this.comboNumVar >= this.maxComboNum) {
this.comboNumComplete = true;
this.comboNumVar = this.maxComboNum;
}
} else if (!this.comboComplete) {
scoreLoopSound.start(0, 1);
this.comboVar = this.comboVar + Math.ceil(this.comboBonus / 50);
theScoreVar = theScoreVar + Math.ceil(this.comboBonus / 50);
theScore = theScore + Math.ceil(this.comboBonus / 50);
this.scoreVar = this.scoreVar + Math.ceil(this.comboBonus / 50);
if (this.comboVar >= this.comboBonus) {
this.comboComplete = true;
this.comboVar = this.comboBonus;
}
} else if (!this.hpComplete) {
scoreLoopSound.start(0, 1);
this.hpVar = this.hpVar + Math.ceil(this.hpBonus / 50);
theScoreVar = theScoreVar + Math.ceil(this.hpBonus / 50);
theScore = theScore + Math.ceil(this.hpBonus / 50);
this.scoreVar = this.scoreVar + Math.ceil(this.hpBonus / 50);
if (this.hpVar >= this.hpBonus) {
this.hpComplete = true;
this.hpVar = this.hpBonus;
}
}
}
if (this.dead) {
this._alpha = this._alpha - 20;
if (this._alpha < 10) {
if (this.num == 3) {
nextWave();
} else {
setTimeout(upgradeShopFadeIn, 100);
}
if (this.totalScore > theScore) {
theScore = this.totalScore;
}
clearInterval(theCheer);
clearInterval(theCowInterval);
this.removeMovieClip();
}
}
};
}
};
}
function setupCloud() {
theNum = Math.ceil(Math.random() * 3);
enemyNum++;
if (enemyNum >= 1000) {
enemyNum = 0;
}
theEnemy = enemyMap.attachMovie("cloud" + theNum, "cloud_" + enemyNum, 44000 + enemyNum);
theY = -((20 * Math.random()) + 215);
theEnemy._y = theY;
theX = (Math.random() * 1600) - theEnemy._parent._x;
theEnemy._x = theX;
if (Math.random() > 0.5) {
theEnemy.dx = -((Math.random() * 0.1) + 0.2);
} else {
theEnemy.dx = (Math.random() * 0.1) + 0.2;
}
theEnemy.onEnterFrame = function () {
this._x = this._x + this.dx;
if ((this._x + this._parent._x) < -800) {
this._x = (2400 - this._parent._x) + ((this._x + this._parent._x) + 800);
}
if ((this._x + this._parent._x) > 2400) {
this._x = (-800 - this._parent._x) + (((this._x + this._parent._x) - 1600) - 800);
}
};
}
function setupExplodingCow() {
particleNum2++;
if (particleNum2 >= 1000) {
particleNum2 = 0;
}
if (spriteAlt == 1) {
var _local3 = "enemy1aParticle";
} else if (spriteAlt == 2) {
var _local3 = "enemy2aParticle";
} else if (spriteAlt == 3) {
var _local3 = "enemy1";
} else if (spriteAlt == 4) {
var _local3 = "enemy3aParticle";
}
theParticle = attachMovie(_local3, "particle" + particleNum2, 412000 + particleNum2);
if (numberAlt > 0) {
theParticle._x = -40;
} else {
theParticle._x = Stage.width + 40;
}
theParticle._y = 150;
theParticle._xscale = theParticle._xscale * numberAlt;
theParticle.dx = (2 + (Math.random() * 10)) * numberAlt;
theParticle.dy = 8 + (Math.random() * 4);
numberAlt++;
if (numberAlt > 0) {
numberAlt = -1;
} else {
numberAlt = 1;
}
theParticle.gravity = 0.6;
theParticle.onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y - this.dy;
this.dy = this.dy - this.gravity;
if (this._y > Stage.height) {
if (spriteAlt == 1) {
impactCowSound.start(0, 1);
} else if (spriteAlt == 1) {
impactDogSound.start(0, 1);
} else {
var _local2 = Math.ceil(Math.random() * 4);
if (_local2 == 1) {
impactMan3Sound.start(0, 1);
} else if (_local2 == 2) {
impactMan1Sound.start(0, 1);
} else if (_local2 == 3) {
impactMan1Sound.start(0, 1);
} else if (_local2 == 4) {
impactMan2Sound.start(0, 1);
}
}
bloodSplatter2(this._x, this._y, this.dx, 0);
bloodSplatter2(this._x, this._y, this.dx, 0);
bloodSplatter2(this._x, this._y, this.dx, 0);
this.removeMovieClip();
}
};
}
function nextWave() {
for (x in bombArray) {
if ((bombArray[x].noMove && ((bombArray[x]._x + enemyMap._x) < (Stage.width + 50))) && ((bombArray[x]._x + enemyMap._x) > 50)) {
bombArray[x].boom = true;
} else if (bombArray[x].noMove && (((bombArray[x]._x + enemyMap._x) > (Stage.width + 50)) || ((bombArray[x]._x + enemyMap._x) < 50))) {
bombArray[x].removeMovieClip();
bombArray.splice(x, 1);
}
}
theHeal = this.createEmptyMovieClip("theHealer", 929292);
theHeal.onEnterFrame = function () {
theHp = theHp + 1;
if (theHp > theHpMax) {
theHp = theHpMax;
this.removeMovieClip();
invincible = false;
}
};
gameOver = false;
gamePaused = false;
checkpointSetup();
}
function setupEnemy(enemyGen, notOnScreen) {
if (enemyGen != 6) {
spawnedEnemy++;
aliveEnemy++;
}
modVar = "";
if (enemyGen == 1) {
if ((Math.random() > 0.5) && (enemy1aUnlock)) {
modVar = "a";
}
} else if (enemyGen == 2) {
if ((Math.random() > 0.5) && (enemy2aUnlock)) {
modVar = "a";
}
} else if (enemyGen == 3) {
if (enemy3aUnlock) {
modVar = "a";
}
} else if (enemyGen == 4) {
if (enemy4aUnlock) {
modVar = "a";
}
} else if (enemyGen == 5) {
if (enemy5aUnlock) {
modVar = "a";
}
} else if (enemyGen == 6) {
var numGen = (Math.random() * 100);
if (enemy6aUnlockLight && (numGen <= 50)) {
modVar = "a";
}
if (enemy6aUnlock) {
modVar = "a";
}
} else if (enemyGen == 7) {
if (enemy7aUnlock) {
modVar = "a";
}
} else if (enemyGen == 8) {
if (enemy8aUnlock) {
modVar = "a";
}
} else if (enemyGen == 9) {
if (enemy9aUnlock) {
modVar = "a";
}
} else if (enemyGen == 10) {
if (enemy10aUnlock) {
modVar = "a";
}
}
enemyNum++;
if (enemyNum >= 999) {
enemyNum = 0;
}
theEnemy = enemyMap.attachMovie(("enemy" + enemyGen) + modVar, "enemy_" + enemyNum, 40000 + enemyNum);
enemyArray.push(theEnemy);
theEnemy.modVar = modVar;
theEnemy.panic = false;
if ((((((enemyGen == 1) || (enemyGen == 2)) || (enemyGen == 3)) || (enemyGen == 5)) || (enemyGen == 7)) || (enemyGen == 9)) {
theY = 0;
theEnemy.landType = "ground";
} else {
theEnemy.landType = "sky";
if (enemyGen == 6) {
theY = -240;
} else {
theY = -((20 * Math.random()) + 110);
}
}
theEnemy._y = theY;
numGen = Math.random() * 100;
theEnemy.shootReady = true;
theEnemy.shootTime = getTimer();
theEnemy.Type = enemyGen;
theEnemy.dy = 0;
theEnemy.gravity = 0;
theEnemy.dir = 90;
if (numGen > 50) {
theEnemy.spawnLeft = true;
theEnemy.spawnRight = false;
} else {
theEnemy.spawnLeft = false;
theEnemy.spawnRight = true;
}
theX = (Math.random() * 1600) - theEnemy._parent._x;
theEnemy._x = theX;
if (notOnScreen) {
while (((theEnemy._x + theEnemy._parent._x) > -50) && ((theEnemy._x + theEnemy._parent._x) < 690)) {
theX = (Math.random() * 1600) - theEnemy._parent._x;
theEnemy._x = theX;
}
}
if (theEnemy.spawnLeft) {
theEnemy._xscale = 100;
theEnemy.faceVar = 1;
} else {
theEnemy._xscale = -100;
theEnemy.faceVar = -1;
}
theEnemy.counter = 0;
theEnemy.dropBomb = function () {
this.bombAway = true;
if (this.modVar == "a") {
setupBomb2((this.bombX - enemyMap._x) + this.dx, this.bombY - enemyMap._y, this.dx);
} else {
setupBomb((this.bombX - enemyMap._x) + this.dx, this.bombY - enemyMap._y, this.dx);
}
this.gotoAndStop("inactive");
};
theEnemy.shoot = function (Type, speed, damage, sprite) {
this.shootReady = false;
this.shootTime = getTimer();
particleNum++;
if (particleNum >= 1000) {
particleNum = 0;
}
theBullet = effectMap.attachMovie(sprite, "enemybullet" + particleNum, 45000 + particleNum, {_x:this.gunX - enemyMap._x, _y:this.gunY - enemyMap._y});
if (sprite == "enemybullet") {
gun1Sound.start(0, 1);
} else if ((sprite == "enemybulletblue") || (sprite == "enemybulletlaser ")) {
gun1Sound.start(0, 1);
} else if ((sprite == "enemybullettank") || (sprite == "enemybulletlaser")) {
btnHover1Sound.start(0, 1);
} else {
missileSound.start(0, 1);
}
if (Type == "tank") {
theBullet._x = this.shooter.shaft.gunX - enemyMap._x;
theBullet._y = this.shooter.shaft.gunY - enemyMap._y;
} else {
theBullet._x = this.gunX - enemyMap._x;
theBullet._y = this.gunY - enemyMap._y;
}
theBullet.Type = Type;
theBullet.numVar = 45;
theBullet.Type2 = sprite;
theBullet.speed = speed * 1.5;
theBullet.damage = damage * 1.2;
theBullet.distx = _root.theHead._x - (this._x + this._parent._x);
theBullet.disty = -(_root.theHead._y - (this._y + this._parent._y));
theBullet.angleRad = Math.atan2(theBullet.distx, theBullet.disty);
theBullet.angle = ((theBullet.angleRad / Math.PI) * 180) + 0;
theBullet.dir = theBullet.angle;
turn(theBullet);
theBullet._rotation = theBullet.dir;
enemyBulletArray.push(theBullet);
};
theEnemy.explode = function () {
if (!this.exploded) {
this.exploded = true;
particleNum++;
if (particleNum >= 1000) {
particleNum = 0;
}
explode1Sound.start(0, 1);
theExplosion = effectMap.attachMovie("explosion", "explosion" + particleNum, 50000 + particleNum, {_x:this._x, _y:this._y});
this.removeMovieClip();
}
};
theEnemy.onEnterFrame = function () {
if (!gamePaused) {
this._x = this._x + this.dx;
this._y = this._y + this.dy;
this.dy = this.dy + this.gravity;
if (this.faceVar < 0) {
numVar = 180;
} else {
numVar = 0;
}
if (this.bombAway && (!this.dead)) {
this.dy = this.dy - 0.1;
this.dx = this.dx + (0.3 * this.faceVar);
this.dir = ((Math.atan2(this.dy, this.dx) / 3.141593) * 180) + numVar;
this._rotation = this.dir;
}
if ((this._x + this._parent._x) < -200) {
this._x = (1800 - this._parent._x) + ((this._x + this._parent._x) + 200);
}
if ((this._x + this._parent._x) > 1800) {
this._x = (-200 - this._parent._x) + (((this._x + this._parent._x) - 1600) - 200);
}
if (getTimer() > (this.shootTime + this.shootCooldown)) {
this.shootReady = true;
}
this.distx = _root.theHead._x - (this._x + this._parent._x);
if ((!this.dead) && (theHp > 0)) {
if ((((this.Type == 3) || (this.Type == 5)) || (this.Type == 7)) || (this.Type == 8)) {
if (((Math.abs(this.distx) < this.range) && ((this.faceVar * this.distx) > 10)) && (!theHead.grounded)) {
if (this.dx != 0) {
this.armed = true;
this.gotoAndStop(1);
this.dx = 0;
}
if (this.shootReady) {
if (this.Type == 3) {
if (this.modVar == "a") {
this.shootReady = false;
this.shootTime = getTimer();
setTimeout(function (target, a, b, c, d) {
if (!theHead.grounded) {
target.shoot(a, b, c, d);
target.shooter.play();
}
}, 150, this, "shooter", 10, 2, "enemybulletblue");
setTimeout(function (target, a, b, c, d) {
if (!theHead.grounded) {
target.shoot(a, b, c, d);
target.shooter.play();
}
}, 300, this, "shooter", 10, 2, "enemybulletblue");
setTimeout(function (target, a, b, c, d) {
if (!theHead.grounded) {
target.shoot(a, b, c, d);
target.shooter.play();
}
}, 450, this, "shooter", 10, 2, "enemybulletblue");
} else {
this.shoot("shooter", 8, 2, "enemybullet");
this.shooter.play();
}
} else if (this.Type == 5) {
if (this.modVar == "a") {
this.shoot("shooter", 16, 3, "enemybulletlaser");
this.shooter.play();
} else {
this.shootReady = false;
this.shootTime = getTimer();
setTimeout(function (target, a, b, c, d) {
if (!theHead.grounded) {
target.shoot(a, b, c, d);
target.shooter.play();
}
}, 150, this, "shooter", 8, 1.5, "enemybullet");
setTimeout(function (target, a, b, c, d) {
if (!theHead.grounded) {
target.shoot(a, b, c, d);
target.shooter.play();
}
}, 300, this, "shooter", 8, 1.5, "enemybullet");
setTimeout(function (target, a, b, c, d) {
if (!theHead.grounded) {
target.shoot(a, b, c, d);
target.shooter.play();
}
}, 450, this, "shooter", 8, 1.5, "enemybullet");
}
} else if (this.Type == 7) {
if (this.modVar == "a") {
this.shoot("shooter", 10, 1.7, "enemybulletblue");
this.shooter.play();
} else {
this.shoot("shooter", 8, 1, "enemybullet");
this.shooter.play();
}
} else if (this.Type == 8) {
if (this.modVar == "a") {
this.shootReady = false;
this.shootTime = getTimer();
setTimeout(function (target, a, b, c, d) {
if (!theHead.grounded) {
target.shoot(a, b, c, d);
target.shooter.play();
}
}, 150, this, "shooter", 10, 1.5, "enemybulletblue");
setTimeout(function (target, a, b, c, d) {
if (!theHead.grounded) {
target.shoot(a, b, c, d);
target.shooter.play();
}
}, 300, this, "shooter", 10, 1.5, "enemybulletblue");
setTimeout(function (target, a, b, c, d) {
if (!theHead.grounded) {
target.shoot(a, b, c, d);
target.shooter.play();
}
}, 450, this, "shooter", 10, 1.5, "enemybulletblue");
} else {
this.shootReady = false;
this.shootTime = getTimer();
setTimeout(function (target, a, b, c, d) {
if (!theHead.grounded) {
target.shoot(a, b, c, d);
target.shooter.play();
}
}, 150, this, "shooter", 8, 1, "enemybullet");
setTimeout(function (target, a, b, c, d) {
if (!theHead.grounded) {
target.shoot(a, b, c, d);
target.shooter.play();
}
}, 300, this, "shooter", 8, 1, "enemybullet");
setTimeout(function (target, a, b, c, d) {
if (!theHead.grounded) {
target.shoot(a, b, c, d);
target.shooter.play();
}
}, 450, this, "shooter", 8, 1, "enemybullet");
}
}
}
} else if ((((((this.dx == 0) && ((this.faceVar * this.distx) < 0)) && (!this.counter2)) && (this.Type != 8)) && (this.Type != 7)) && ((this.Type != 5) || (this.modVar != "a"))) {
this.armed = true;
this.faceVar = this.faceVar * -1;
this._xscale = this._xscale * -1;
} else if ((this.dx == 0) && (((this.faceVar * this.distx) < 0) || ((this.faceVar * this.distx) > 10))) {
this.armed = false;
this.gotoAndStop("walk");
this.dx = this.dxOrig * this.faceVar;
if (this.panic) {
this.dx = (2.5 * this.dxOrig) * this.faceVar;
}
}
} else if (this.Type == 9) {
this.distx = theHead._x - (this._x + this._parent._x);
this.disty = -(theHead._y - (this._y + this._parent._y));
this.angleRad = Math.atan2(this.distx, this.disty);
this.angle = ((this.faceVar * this.angleRad) / 3.141593) * 180;
if (this.dir > this.angle) {
angleVar1 = this.dir - this.angle;
angleVar2 = 360 - angleVar1;
} else if (this.dir < this.angle) {
angleVar2 = this.angle - this.dir;
angleVar1 = 360 - angleVar2;
}
this.distx = _root.theHead._x - (this._x + this._parent._x);
if ((!theHead.grounded) && ((this.faceVar * this.distx) > 0)) {
if (Math.abs(this.angle - this.dir) > 4) {
if (angleVar1 > angleVar2) {
this.dir = this.dir + 2;
} else if ((angleVar1 + 5) < angleVar2) {
this.dir = this.dir - 2;
}
if (this.dir > 90) {
this.dir = 90;
} else if (this.dir < 50) {
this.dir = 50;
}
}
} else {
this.dir = this.dir + 4;
if (this.dir > 90) {
this.dir = 90;
}
}
if (this.dir > 180) {
this.dir = this.dir - 360;
} else if (this.dir < -180) {
this.dir = this.dir + 360;
}
this.shooter.shaft._rotation = this.dir;
if (((((Math.abs(this.distx) < this.range) && ((this.faceVar * this.distx) > 20)) && (Math.abs(this.distx) > 30)) && (!theHead.grounded)) && (!this.dead)) {
if (this.dx != 0) {
this.dx = 0;
}
if (this.shootReady && (this.dir < 80)) {
this.shooter.shaft.play();
}
} else if (this.dx == 0) {
this.dx = this.dxOrig * this.faceVar;
}
} else if (this.Type == 10) {
if (((((Math.abs(this.distx) < this.range) && ((this.faceVar * this.distx) > 10)) && (Math.abs(this.distx) > 60)) && (!theHead.grounded)) && (!this.dead)) {
if (this.dx != 0) {
this.dx = 0;
this.gotoAndStop("active");
} else if (this.modVar == "a") {
if (this.shootReady) {
this.shooter.copter.gun.play();
this.shoot("heli", 11, 4, "enemybullethelisuper");
}
} else if (this.shootReady) {
this.shooter.copter.gun.play();
this.shoot("heli", 11, 2.5, "enemybulletheli");
}
} else if (this.dx == 0) {
this.gotoAndStop("inactive");
this.dx = this.dxOrig;
}
} else if (this.Type == 6) {
numGen = Math.random() * 100;
if (this.modVar == "a") {
if (((theHead.dx > 0) && (this.dx > 0)) || ((theHead.dx < 0) && (this.dx < 0))) {
if (((!this.bombAway) && ((this._x + this._parent._x) > (300 + (36 * (theHead.dx - this.dx))))) && ((this._x + this._parent._x) < (340 - ((36 * (theHead.dx - this.dx)) * (-this.faceVar))))) {
this.dropBomb();
}
} else if (((!this.bombAway) && ((this._x + this._parent._x) > (300 + (27 * (theHead.dx - this.dx))))) && ((this._x + this._parent._x) < (340 + (27 * (theHead.dx - this.dx))))) {
this.dropBomb();
}
} else {
if (((theHead.dx > 0) && (this.dx > 0)) || ((theHead.dx < 0) && (this.dx < 0))) {
if ((((numGen < 30) && (!this.bombAway)) && ((this._x + this._parent._x) > (300 - (100 * (-this.faceVar))))) && ((this._x + this._parent._x) < (340 - (100 * (-this.faceVar))))) {
this.dropBomb();
}
} else if ((((numGen < 30) && (!this.bombAway)) && ((this._x + this._parent._x) > (300 + (450 * (-this.faceVar))))) && ((this._x + this._parent._x) < (340 + (450 * (-this.faceVar))))) {
this.dropBomb();
}
for (x in bombArray) {
if ((((numGen < 60) && (!this.bombAway)) && ((this._x + this._parent._x) > (((bombArray[x]._x + bombArray[x]._parent._x) - 30) + (150 * (-this.faceVar))))) && ((this._x + this._parent._x) < (((bombArray[x]._x + bombArray[x]._parent._x) + 30) + (150 * (-this.faceVar))))) {
this.dropBomb();
}
}
}
}
if ((this.landType == "ground") && (this.Type <= 5)) {
if (_root.bloodlust) {
this.globalPanic = true;
} else {
this.globalPanic = false;
}
if (this.globalPanic && (!this.panic)) {
this.panic = true;
this.gotoAndStop("panic");
if ((((((this.distx > 0) && (this.faceVar > 0)) || (this.distx < 0)) && (this.faceVar < 0)) && (this.Type != 3)) && (this.Type != 5)) {
this.faceVar = this.faceVar * -1;
this._xscale = this._xscale * -1;
}
this.dx = (3 * this.dxOrig) * this.faceVar;
if ((this.Type == 3) || (this.Type == 5)) {
this.dx = (3.01 * this.dxOrig) * this.faceVar;
}
}
if (((Math.abs(this.distx) < 250) && (!theHead.grounded)) && (this.panic)) {
if (((((this.distx > 0) && (this.faceVar > 0)) || ((this.distx < 0) && (this.faceVar < 0))) && (this.Type != 3)) && (this.Type != 5)) {
this.faceVar = this.faceVar * -1;
this._xscale = this._xscale * -1;
this.dx = (3 * this.dxOrig) * this.faceVar;
if ((this.Type == 3) || (this.Type == 5)) {
this.dx = (3.01 * this.dxOrig) * this.faceVar;
}
}
} else if (this.panic && (!this.globalPanic)) {
this.panic = false;
this.dx = this.dxOrig * this.faceVar;
if ((this.Type != 3) && (this.Type != 5)) {
this.gotoAndStop(2);
}
}
}
} else if (this.dead && (this._y > 0)) {
this.explode();
}
}
};
}
function scoreDisplay() {
if (theMeat > theMeatVar) {
theMeatVar = theMeatVar + Math.ceil((theMeat - theMeatVar) / 2.4);
if (theMeatVar > theMeat) {
theMeatVar = theMeat;
}
}
if (theScore > theScoreVar) {
theScoreVar = theScoreVar + Math.ceil((theScore - theScoreVar) / 2.1);
if (theScoreVar > theScore) {
theScoreVar = theScore;
}
}
theScoreDisplay = theScoreVar.toString();
lengthVar = 10 - theScoreDisplay.length;
while (lengthVar > 0) {
theScoreDisplay = "0" + theScoreDisplay;
lengthVar = lengthVar - 1;
}
theAliveVar = (_root.totalEnemy + _root.aliveEnemy) - _root.spawnedEnemy;
theMeatDisplay = theAliveVar.toString();
lengthVar = 3 - theMeatDisplay.length;
while (lengthVar > 0) {
theMeatDisplay = "0" + theMeatDisplay;
lengthVar = lengthVar - 1;
}
theS.text = theScoreDisplay;
theA.gotoAndStop(1);
theA.theA.text = theMeatDisplay;
if (theAliveVar > 999) {
theA.gotoAndStop(2);
}
}
function earthExplosion2(targetX, targetY) {
i = 0;
while (i < 8) {
particleNum++;
if (particleNum >= 1000) {
particleNum = 0;
}
theParticle = effectMap.attachMovie("earthparticle2", "particle" + particleNum2, 111000 + particleNum2);
theParticle._xscale = ((Math.random() * 50) + 50) * (Math.abs(theHead.dy) / 9);
theParticle._yscale = ((Math.random() * 50) + 50) * (Math.abs(theHead.dy) / 9);
theParticle._x = targetX;
theParticle._y = targetY;
if (theHead.grounded) {
theParticle.dir = ((Math.random() * 150) - 75) + theHead.dir;
} else {
theParticle.dir = (Math.random() * 150) - 75;
}
theParticle._rotation = theParticle.dir;
theParticle.friction = 1;
theParticle.speed = Math.random() * 1;
turn(theParticle);
theParticle.alphaRate = 4;
theParticle.onEnterFrame = function () {
this._alpha = this._alpha - 4;
this._x = this._x + this.dx;
this._y = this._y + this.dy;
this.dx = this.dx * this.friction;
this.dir = ((Math.atan2(this.dy, this.dx) / Math.PI) * 180) + 90;
if (this._alpha <= 0) {
this.removeMovieClip();
}
this._rotation = this.dir;
};
i++;
}
}
function bloodSplatter(targetX, targetY, theDx, theDy) {
particleNum2++;
if (particleNum2 >= 1000) {
particleNum2 = 0;
}
theParticle = enemyMap.attachMovie("bloodsplatter", "particle" + particleNum2, 114000 + particleNum2, {_x:(targetX + (30 * Math.random())) - 15, _y:(targetY + (30 * Math.random())) - 15});
theParticle.theDx = theDx;
theParticle.theDy = theDy;
}
function bloodSplatter2(targetX, targetY, theDx, theDy) {
particleNum2++;
if (particleNum2 >= 1000) {
particleNum2 = 0;
}
theParticle = attachMovie("bloodsplatter", "particle" + particleNum2, 806000 + particleNum2, {_x:(targetX + (30 * Math.random())) - 15, _y:(targetY + (30 * Math.random())) - 15});
theParticle.theDx = theDx;
theParticle.theDy = theDy;
}
function bloodExplosion(targetX, targetY, theDx, theDy) {
i = 0;
while (i < 7) {
particleNum2++;
if (particleNum2 >= 1000) {
particleNum2 = 0;
}
theParticle = effectMap.attachMovie("bloodparticle", "particle" + particleNum2, 113000 + particleNum2);
theParticle.cacheAsBitmap = true;
theParticle._x = targetX;
theParticle._y = targetY;
theParticle.dx = ((theDx * 0.6) + 3) - (6 * Math.random());
theParticle.dy = (Math.random() * 4) + 3;
if (theHead.dx > 0) {
theParticle.dx = theParticle.dx + ((7 * Math.random()) - 1);
} else {
theParticle.dx = theParticle.dx - ((7 * Math.random()) - 1);
}
theParticle.gravity = 0.6;
theParticle.onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y - this.dy;
this.dy = this.dy - this.gravity;
if (this._y > 0) {
this.removeMovieClip();
}
};
i++;
}
}
function greenSplatter(targetX, targetY, theDx, theDy) {
particleNum2++;
if (particleNum2 >= 1000) {
particleNum2 = 0;
}
theParticle = splatterMap.attachMovie("greensplatter", "particle" + particleNum2, 114000 + particleNum2, {_x:(targetX + (50 * Math.random())) - 25, _y:(targetY + (50 * Math.random())) - 25});
theParticle.theDx = theDx;
theParticle.theDy = theDy;
}
function greenExplosion(targetX, targetY, theDx, theDy) {
i = 0;
while (i < 4) {
particleNum2++;
if (particleNum2 >= 1000) {
particleNum2 = 0;
}
theParticle = effectMap.attachMovie("greenparticle", "particle" + particleNum2, 113000 + particleNum2);
theParticle.cacheAsBitmap = true;
theParticle._x = targetX;
theParticle._y = targetY;
theParticle.dx = ((theDx * 0.6) + 3) - (6 * Math.random());
theParticle.dy = (Math.random() * 6) + 5;
if (theHead.dx > 0) {
theParticle.dx = theParticle.dx + ((7 * Math.random()) - 1);
} else {
theParticle.dx = theParticle.dx - ((7 * Math.random()) - 1);
}
theParticle.gravity = 0.35;
theParticle.onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y - this.dy;
this.dy = this.dy - this.gravity;
if (this._y > 0) {
this.removeMovieClip();
}
};
i++;
}
}
function dirtExplosion2(targetX, targetY) {
i = 0;
while (i < 25) {
particleNum2++;
if (particleNum2 >= 1000) {
particleNum2 = 0;
}
numGen = Math.ceil(Math.random() * 3);
theParticle = effectMap.attachMovie("dirtparticle" + numGen, "particle" + particleNum2, 113000 + particleNum2);
theParticle._x = targetX;
theParticle._y = targetY;
theParticle.dx = 4 - (8 * Math.random());
theParticle.dy = ((Math.abs(theHead.dy) * 1.1) * Math.random()) + (Math.random() * 1);
if (theHead.dy > 0) {
theParticle.dy = theParticle.dy * 0.7;
}
theParticle._rotation = (Math.random() * 60) - 30;
theParticle.cacheAsBitmap = true;
theParticle.gravity = 1.1;
theParticle.onEnterFrame = function () {
this._x = this._x + this.dx;
this._y = this._y - this.dy;
this.dy = this.dy - this.gravity;
if (this._y > 0) {
this.removeMovieClip();
}
};
i++;
}
}
function destroyAll(array) {
for (i in array) {
array[i].removeMovieClip();
array[i].splice(x, 1);
}
}
function turn(sprite) {
degrees = sprite.dir - 90;
radians = (degrees / 180) * Math.PI;
sprite.dx = Math.cos(radians);
sprite.dy = Math.sin(radians);
sprite.dx = sprite.dx * sprite.speed;
sprite.dy = sprite.dy * sprite.speed;
}
function unturn(sprite) {
sprite.dx = sprite.dx / sprite.speed;
sprite.dy = sprite.dy / sprite.speed;
radians = Math.acos(sprite.dx);
radians = Math.asin(sprite.dy);
radians = (degrees / 180) * Math.PI;
degrees = sprite.dir - 90;
}
ZigoEngine.simpleSetup(Shortcuts, PennerEasing);
if (globalNoKong) {
maxBtn._visible = true;
kongBtn._visible = false;
} else {
maxBtn._visible = false;
kongBtn._visible = true;
}
maxBtn.onRelease = function () {
getURL ("http://www.andkon.com/arcade/ ", "_blank");
};
_quality = "MEDIUM";
init();
_root.onEnterFrame = function () {
if (!gamePaused) {
shakeScreen();
spawnEnemy();
moveEnemyBullets();
}
soundControl();
scoreDisplay();
bombCheck();
enemyArrayCheck();
healthCheck();
if (rampage) {
bloodSpeed = 2.3;
if (theBlood._alpha < 96) {
theBlood._alpha = theBlood._alpha + 6;
} else {
theBlood._alpha = 100;
}
} else {
bloodSpeed = 0;
if (theBlood._alpha > 4) {
theBlood._alpha = theBlood._alpha - 4;
} else {
theBlood._alpha = 0;
}
}
if (bloodlust) {
} else {
var _local1 = bloodMusicSound.getVolume();
_local1 = _local1 - 1.5;
if (_local1 > 0) {
bloodMusicSound.setVolume(_local1);
} else {
bloodMusicSound.stop();
}
}
};
_root.onMouseDown = function () {
theMouseDown = true;
};
_root.onMouseUp = function () {
theMouseDown = false;
};
menuBtn.onRelease = function () {
frameTransition("title");
};
pauseBtn.onRelease = function () {
pauseGame();
};
groundOnTheLeft = true;
sideVar = true;
ground2._x = ground._x + ground._width;
sky2._x = sky._x + 1250;
theHead.speed = 1;
theHead.dir = theHead._rotation;
theHead.grounded = true;
_root.turn(theHead);
theHead.onEnterFrame = function () {
theHead.gotoAndStop(upgradeHead + 1);
if (!gamePaused) {
if (!gameOver) {
if (Key.isDown(87) || (Key.isDown(38))) {
if (!theControls.dead) {
playedBefore = true;
theControls.dead = true;
theControls.onEnterFrame = function () {
this._x = this._x - 60;
if (this._x < (-(this._width / 2))) {
delete this.onEnterFrame;
}
};
}
if (this.grounded) {
this.maxSpeed = (11 + bonusSpeed) * speedMulti;
if (rampage) {
if (upgradeRed) {
this.maxSpeed = this.maxSpeed * 1.4;
} else {
this.maxSpeed = this.maxSpeed * 1.2;
}
}
this.speed = this.speed + (this.maxSpeed / 13);
if (this.speed > this.maxSpeed) {
this.speed = this.maxSpeed;
}
}
}
if (Key.isDown(65) || (Key.isDown(37))) {
if (!theControls.dead) {
playedBefore = true;
theControls.dead = true;
theControls.onEnterFrame = function () {
this._x = this._x - 60;
if (this._x < (-(this._width / 2))) {
delete this.onEnterFrame;
}
};
}
if (this.grounded) {
this.dir = this.dir - 7;
}
}
if (Key.isDown(68) || (Key.isDown(39))) {
if (!theControls.dead) {
playedBefore = true;
theControls.dead = true;
theControls.onEnterFrame = function () {
this._x = this._x - 60;
if (this._x < (-(this._width / 2))) {
delete this.onEnterFrame;
}
};
}
if (this.grounded) {
this.dir = this.dir + 7;
}
}
}
if (this.dir > 180) {
this.dir = this.dir - 360;
} else if (this.dir < -180) {
this.dir = this.dir + 360;
}
this.angleRad = this.dir * 0.0174527777777778;
if (this.grounded) {
this.speed = this.speed * 0.94;
_root.turn(this);
} else {
if ((((this.maxSpeed > 0) && (this.maxSpeed != null)) && (this.maxSpeed != undefined)) && (this.maxSpeed != NaN)) {
this.dy = this.dy + (0.12 + (this.maxSpeed / 40));
}
this.speed = Math.sqrt((this.dx * this.dx) + (this.dy * this.dy));
if (upgradeWing == 1) {
this.speed = this.speed - 0.1;
}
this.dir = ((Math.atan2(this.dy, this.dx) / 3.1415) * 180) + 90;
if (Key.isDown(65) || (Key.isDown(37))) {
if ((upgradeWing == 1) && (this.speed > 8)) {
trace(this.speed);
this.dir = this.dir - 4.6;
} else {
this.dir = this.dir - 1.6;
}
}
if (Key.isDown(68) || (Key.isDown(39))) {
if ((upgradeWing == 1) && (this.speed > 8)) {
this.dir = this.dir + 4.6;
} else {
this.dir = this.dir + 1.6;
}
}
_root.turn(this);
}
if ((this.speed < 1) && (!this.dead)) {
this.speed = 1;
}
if (((this.speed == null) || (this.speed == undefined)) || (this.speed == NaN)) {
}
this.theX = this._x;
this.theY = this._y;
moveBody(body1, theHead);
moveBody(body2, body1);
moveBody(body3, body2);
moveBody(body4, body3);
moveBody(body5, body4);
moveBody(body6, body5);
moveBody(body7, body6);
if (this.grounded && (!noEffect)) {
setupDirt();
}
body1._x = body1._x - this.dx;
body2._x = body2._x - this.dx;
body3._x = body3._x - this.dx;
body4._x = body4._x - this.dx;
body5._x = body5._x - this.dx;
body6._x = body6._x - this.dx;
body7._x = body7._x - this.dx;
sky._x = sky._x - this.dx;
sky2._x = sky2._x - this.dx;
ground._x = ground._x - this.dx;
ground2._x = ground2._x - this.dx;
enemyMap._x = enemyMap._x - this.dx;
dirtMap._x = dirtMap._x - this.dx;
effectMap._x = effectMap._x - this.dx;
splatterMap._x = splatterMap._x - this.dx;
if (((ground._x + ground._width) < -200) && (this.dx > 0)) {
groundOnTheLeft = false;
sideVar = true;
}
if (((ground2._x + ground2._width) < -200) && (this.dx > 0)) {
groundOnTheLeft = true;
sideVar = true;
}
if ((ground._x > 840) && (this.dx < 0)) {
groundOnTheLeft = true;
sideVar = false;
}
if ((ground2._x > 840) && (this.dx < 0)) {
groundOnTheLeft = false;
sideVar = false;
}
if (!groundOnTheLeft) {
if (sideVar) {
ground._x = (ground2._x + ground2._width) - 0;
sky._x = (sky2._x + 1250) - 1;
} else {
ground2._x = (ground._x - ground2._width) + 0;
sky2._x = (sky._x - 1250) + 1;
}
} else if (sideVar) {
ground2._x = (ground._x + ground._width) - 0;
sky2._x = (sky._x + 1250) - 1;
} else {
ground._x = (ground2._x - ground._width) + 0;
sky._x = (sky2._x - 1250) + 1;
}
this._y = this._y + this.dy;
this._rotation = this.dir;
if (this._y > (Stage.height - 32)) {
this._y = Stage.height - 32;
}
if (this._x > (Stage.width - 18)) {
this._x = Stage.width - 18;
}
if (this._x < 18) {
this._x = 18;
}
if (this.grounded) {
wormUndergroundSound.setVolume((Math.pow(Math.pow(this.dx, 2) + Math.pow(this.dy, 2), 0.5) * 100) / 15);
} else if (!this.grounded) {
wormUndergroundSound.setVolume(0);
}
if (this._y < (ground._y + 30)) {
theVolume = 100;
} else {
theVolume = 100;
}
if ((this._y < ground._y) && (this.grounded)) {
wormPopoutSound.setVolume((Math.abs(this.dy) * 100) / 15);
wormPopoutSound.start(0, 1);
if (!noEffect) {
dirtExplosion2(this._x - effectMap._x, 0);
dirtExplosion2(this._x - effectMap._x, 0);
}
if (!this.dead) {
if (!bloodlust) {
_root.startBloodlust();
} else {
clearTimeout(bloodLustTimer);
bloodLustTimer = setTimeout(stopBloodlust, 5000);
}
}
this.grounded = false;
if (shake2 < (Math.abs(theHead.dy) * 1.2)) {
shake2 = Math.abs(theHead.dy) * 1.2;
}
}
if ((this._y >= ground._y) && (!this.grounded)) {
comboReseted = true;
theReset = setTimeout(resetCombo, 1000);
wormPopoutSound.setVolume((Math.abs(this.dy) * 100) / 15);
wormPopoutSound.start(0, 1);
this.grounded = true;
if (!noEffect) {
dirtExplosion2(this._x - effectMap._x, 0);
}
if (shake2 < (Math.abs(theHead.dy) * 1)) {
shake2 = Math.abs(theHead.dy) * 1;
}
}
theHeadOrigY = this._y - shakeY;
}
};
comboNum = 0;
maxComboNum = 0;
comboNum2 = 0;
bloodTime = 0;
var theBloodT = "Blood!!";
killBtn.onRelease = function () {
theHp = 0;
};
killBtn._visible = false;
bombArray = [];
gameOver = false;
shake2 = 0;
dirtMapOrigY = dirtMap._y;
enemyMapOrigY = enemyMap._y;
effectMapOrigY = effectMap._y;
splatterMapOrigY = splatterMap._y;
skyOrigY = sky._y;
sky2OrigY = sky2._y;
groundOrigY = ground._y;
groundOrig2Y = ground2._y;
groundBackOrigY = groundBack._y;
theHeadOrigY = theHead._y;
body1OrigY = body1._y;
body2OrigY = body2._y;
body3OrigY = body3._y;
body4OrigY = body4._y;
body5OrigY = body5._y;
body6OrigY = body6._y;
body7OrigY = body7._y;
dirtNum = 0;
var enemyBulletArray = [];
x = 0;
while (x < 20) {
setupCloud();
x++;
}
numberAlt = 1;
spriteAlt = 0;
particleNum = 0;
theMeatVar = 0;
theScoreVar = savedScore;
var theScoreDisplay;
var theMeatDisplay;
Frame 75
superPurge();
resetCombo();
_quality = "HIGH";
theScoreVar = 0;
_root.onEnterFrame = function () {
if (theScoreVar == theScore) {
} else {
scoreLoopSound.start(0, 1);
theScoreVar = theScoreVar + Math.ceil(theScore / 75);
if (theScoreVar >= theScore) {
theScoreVar = theScore;
}
scoreText.text = theScoreVar;
}
};
wormUndergroundSound.stop();
Key.removeListener(keyListener);
alreadySubmit = false;
_root.kongregateStats.submit("HighScore", theScore);
if (globalNoKong) {
maxBtn._visible = true;
kongBtn._visible = false;
maxBtn.onRelease = function () {
getURL ("http://www.andkon.com/arcade/ ", "_blank");
};
maxBtn2.onRelease = function () {
getURL ("http://www.andkon.com/arcade/ ", "_blank");
};
moreBtn.onRelease = function () {
getURL ("http://www.andkon.com/arcade/ ", "_blank");
};
} else {
maxBtn._visible = false;
kongBtn._visible = true;
}
if (!globalNoAds) {
var CPMStarPoolID = 12941;
var CPMStarSubPoolID = 2;
System.security.allowDomain("server.cpmstar.com");
adBox.loadMovie((("http://server.cpmstar.com/adviewas2.swf?poolid=" + CPMStarPoolID) + "&subpoolid=") + CPMStarSubPoolID);
} else {
adBox._visible = false;
theAdBorder._visible = false;
}
if (globalNoMochi) {
theTank._visible = false;
nameTitle._visible = false;
nameText._visible = false;
theNameBox._visible = false;
submitBtn._visible = false;
submitText._visible = false;
scoreText._visible = false;
scoreTitle._visible = false;
gameoverTitle._visible = false;
scoreText._visible = false;
scoreTitle._visible = false;
gameoverTitle._visible = false;
} else {
submitBtn.onRelease = function () {
trace(theName.text);
if (!alreadySubmit) {
if (theName.text != "") {
var _local2 = {n:[1, 1, 14, 7, 9, 5, 11, 11, 5, 4, 10, 2, 5, 4, 8, 14], f:function (i, s) {
if (s.length == 16) {
return(s);
}
return(this.f(i + 1, s + this.n[i].toString(16)));
}};
var _local3 = _local2.f(0, "");
mochi.as2.MochiScores.showLeaderboard({boardID:"11e795bb54a2548e", score:theScore, name:theName.text, onClose:function () {
}});
alreadySubmit = true;
}
} else {
var _local2 = {n:[1, 1, 14, 7, 9, 5, 11, 11, 5, 4, 10, 2, 5, 4, 8, 14], f:function (i, s) {
if (s.length == 16) {
return(s);
}
return(this.f(i + 1, s + this.n[i].toString(16)));
}};
var _local3 = _local2.f(0, "");
mochi.as2.MochiScores.showLeaderboard({boardID:"11e795bb54a2548e", onClose:function () {
}});
}
};
}
againBtn.onRelease = function () {
_root.frameTransition("play");
mochi.as2.MochiScores.closeLeaderboard();
};
backBtn.onRelease = function () {
_root.frameTransition("title");
mochi.as2.MochiScores.closeLeaderboard();
};
Frame 85
stop();
_root.frameTransition("play");
Symbol 8 MovieClip [urlblock] Frame 1
stop();
Symbol 8 MovieClip [urlblock] Frame 2
stop();
Symbol 46 MovieClip [enemy3Particle] Frame 1
stop();
Symbol 62 MovieClip [enemy3aParticle] Frame 1
stop();
Symbol 109 MovieClip [enemy2] Frame 1
stop();
if (this.meatVar == null) {
this.meatVar = 2;
}
if (this.scoreVar == null) {
this.scoreVar = 3000;
this.scoreVar = Math.floor(((this.scoreVar * 0.1) * Math.random()) + this.scoreVar);
}
if (this.dx == null) {
this.dx = (Math.random() * 0.2) + 1.1;
}
if (this.dxOrig == null) {
this.dxOrig = this.dx;
}
if (this.spawnRight) {
this.dx = this.dx * -1;
}
Symbol 120 MovieClip [enemy2a] Frame 1
stop();
if (this.meatVar == null) {
this.meatVar = 2;
}
if (this.scoreVar == null) {
this.scoreVar = 4000;
this.scoreVar = Math.floor(((this.scoreVar * 0.1) * Math.random()) + this.scoreVar);
}
if (this.dx == null) {
this.dx = (Math.random() * 0.2) + 1.1;
}
if (this.dxOrig == null) {
this.dxOrig = this.dx;
}
if (this.spawnRight) {
this.dx = this.dx * -1;
}
Symbol 125 MovieClip [fps] Frame 1
var averageFrames = 30;
var timerArray = new Array(averageFrames);
var startTime = 0;
var currentFrame = 0;
this.onEnterFrame = function () {
if (this.currentFrame == 0) {
this.startTime = getTimer();
}
this.timerArray.unshift(getTimer());
this.timerArray.pop();
if (this.currentFrame > 0) {
(this.currentFrame * 1000) / (this.timerArray[0] - this.startTime);
}
if (this.currentFrame > this.averageFrames) {
fps = (this.averageFrames * 1000) / (this.timerArray[0] - this.timerArray[averageFrames - 1]);
}
this.currentFrame++;
};
Symbol 141 Button
on (release) {
if (_root.globalSkipIntro) {
_root.frameTransition("title");
} else {
_root.frameTransition("sponsor");
}
}
Symbol 142 MovieClip Frame 1
stop();
Symbol 142 MovieClip Frame 19
stop();
Symbol 156 MovieClip Frame 1
alreadyLoaded = _root.getBytesLoaded();
startTime = getTimer();
if (_root.globalNoAds) {
adTime = 1000;
} else {
adTime = 10000;
}
loadTimeVar = getTimer();
this.onEnterFrame = function () {
loadedVar = ((_root.getBytesLoaded() + 1) - alreadyLoaded) / ((_root.getBytesTotal() + 1) - alreadyLoaded);
loadTimeVar = loadTimeVar + ((adTime / ((30 * adTime) / 1000)) * (0.4 + (Math.random() * 1.2)));
loadTime = (loadTimeVar - startTime) / adTime;
if (loadedVar > loadTime) {
loaded = loadTime;
} else {
loaded = loadedVar;
}
hpBar._xscale = Math.ceil(loaded * 100);
if (loaded == NaN) {
loaded = 100;
}
if ((loaded >= 1) && (!gameLoaded)) {
_root.preloaderBtn.gotoAndPlay("active");
gameLoaded = true;
}
};
Symbol 1081 MovieClip [__Packages.mochi.as2.MochiSync] Frame 0
class mochi.as2.MochiSync
{
var _syncContainer;
function MochiSync () {
_syncContainer = {};
}
function getProp(name) {
return(_syncContainer[name]);
}
function setProp(name, value) {
if (_syncContainer[name] == value) {
return(undefined);
}
_syncContainer[name] = value;
mochi.as2.MochiServices.send("sync_propUpdate", {name:name, value:value});
}
function triggerEvent(eventType, args) {
switch (eventType) {
case SYNC_REQUEST :
mochi.as2.MochiServices.send("sync_syncronize", _syncContainer);
break;
case SYNC_PROPERTY :
_syncContainer[args.name] = args.value;
}
}
static var SYNC_REQUEST = "SyncRequest";
static var SYNC_PROPERTY = "UpdateProperty";
}
Symbol 1082 MovieClip [__Packages.mochi.as2.MochiServices] Frame 0
class mochi.as2.MochiServices
{
static var _id, _container, _clip, _sendChannelName, __get__comChannelName, onError, _listenChannel, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function get childClip() {
return(_clip);
}
static function getVersion() {
return("3.8 as2");
}
static function allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
warnID(id, false);
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.as2.MochiServices.onError = onError;
} else if (mochi.as2.MochiServices.onError == undefined) {
mochi.as2.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local6 = "_mochiservices_com_" + id;
var _local5 = new MovieClipLoader();
var _local3 = {};
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
if (urlOptions().servURL) {
_servURL = urlOptions().servURL;
}
var _local4 = _servURL + _services;
if (urlOptions().servicesURL) {
_local4 = urlOptions().servicesURL;
}
allowDomains(_local4);
_clip = clip.createEmptyMovieClip(_local6, 10336, false);
_listenChannelName = _listenChannelName + ((Math.floor(new Date().getTime()) + "_") + Math.floor(Math.random() * 99999));
listen();
if (_local3.waitInterval != null) {
clearInterval(_local3.waitInterval);
}
_local3.onLoadError = loadError;
_local3.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_local3.onLoadComplete = function (target_mc) {
target_mc.MochiServices = mochi.as2.MochiServices;
};
_local3.startTime = getTimer();
_local3.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.as2.MochiServices.disconnect();
mochi.as2.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_local3.waitInterval = setInterval(_local3, "wait", 1000);
_local5.addListener(_local3);
_local5.loadClip((((((_local4 + "?listenLC=") + _listenChannelName) + "&mochiad_options=") + escape(_root.mochiad_options)) + "&api_version=") + getVersion(), _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
return(_clip);
}
static function loadError(target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
disconnect();
onError.apply(null, [errorCode]);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.as2.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel._nextcallbackID = 0;
_listenChannel._callbacks = {};
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, version:getVersion()});
_listenChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
_listenChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_listenChannel.onEvent = function (pkg) {
switch (pkg.target) {
case "events" :
mochi.as2.MochiEvents.triggerEvent(pkg.event, pkg.args);
break;
case "coins" :
mochi.as2.MochiSocial.triggerEvent(pkg.event, pkg.args);
break;
case "sync" :
mochi.as2.MochiServices.servicesSync.triggerEvent(pkg.event, pkg.args);
}
};
_listenChannel.onError = function () {
mochi.as2.MochiServices.onError.apply(null, ["IOError"]);
};
trace("[SERVICES_API] connected!");
_connecting = false;
_connected = true;
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function updateCopy(args) {
send("coins_updateCopy", args, null, null);
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _listenChannel._callbacks[_local1.callbackID];
}
delete _listenChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ["NotConnected"]);
}
if ((args.options != null) && (args.options.onError != null)) {
args.options.onError.apply(null, ["NotConnected"]);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
trace("Error: MochiServices not connected. Please call MochiServices.connect(). Function: " + methodName);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
}
_listenChannel._callbacks[_listenChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_listenChannel._nextcallbackID++;
}
static function urlOptions() {
var _local5 = {};
var _local6;
if (_root._url.indexOf("mochiad_options") != -1) {
var _local2 = (_root._url.indexOf("mochiad_options") + "mochiad_options".length) + 1;
_local6 = _root._url.substr(_local2, _root._url.length);
} else if (_root.mochiad_options) {
_local6 = _root.mochiad_options;
}
if (_local6) {
var _local4 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2].split("=");
_local5[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local5);
}
static function warnID(bid, leaderboard) {
bid = bid.toLowerCase();
if (bid.length != 16) {
trace(("WARNING: " + (leaderboard ? "board" : "game")) + " ID is not the appropriate length");
return(undefined);
}
if (bid == "1e113c7239048b3f") {
if (leaderboard) {
trace("WARNING: Using testing board ID");
} else {
trace("WARNING: Using testing board ID as game ID");
}
return(undefined);
}
if (bid == "84993a1de4031cd8") {
if (leaderboard) {
trace("WARNING: Using testing game ID as board ID");
} else {
trace("WARNING: Using testing game ID");
}
return(undefined);
}
var _local1 = 0;
while (_local1 < bid.length) {
switch (bid.charAt(_local1)) {
case "0" :
case "1" :
case "2" :
case "3" :
case "4" :
case "5" :
case "6" :
case "7" :
case "8" :
case "9" :
case "a" :
case "b" :
case "c" :
case "d" :
case "e" :
case "f" :
break;
default :
trace("WARNING: Board ID contains illegal characters: " + bid);
return(undefined);
}
_local1++;
}
}
static function addLinkEvent(url, burl, btn, onClick) {
var timeout = 1500;
var t0 = getTimer();
var _local2 = new Object();
_local2.mav = getVersion();
_local2.swfv = btn.getSWFVersion() || 6;
_local2.swfurl = btn._url;
_local2.fv = System.capabilities.version;
_local2.os = System.capabilities.os;
_local2.lang = System.capabilities.language;
_local2.scres = (System.capabilities.screenResolutionX + "x") + System.capabilities.screenResolutionY;
var s = "?";
var _local3 = 0;
for (var _local4 in _local2) {
if (_local3 != 0) {
s = s + "&";
}
_local3++;
s = ((s + _local4) + "=") + escape(_local2[_local4]);
}
if (!(netupAttempted || (_connected))) {
var ping = btn.createEmptyMovieClip("ping", 777);
var _local6 = btn.createEmptyMovieClip("nettest", 778);
netupAttempted = true;
ping.loadMovie("http://x.mochiads.com/linkping.swf?t=" + getTimer());
_local6.onEnterFrame = function () {
if ((ping._totalframes > 0) && (ping._totalframes == ping._framesloaded)) {
delete this.onEnterFrame;
} else if ((getTimer() - t0) > timeout) {
delete this.onEnterFrame;
mochi.as2.MochiServices.netup = false;
}
};
}
btn.onRelease = function () {
if (mochi.as2.MochiServices.netup) {
getURL (url + s, "_blank");
} else {
getURL (burl, "_blank");
}
if (onClick != undefined) {
onClick();
}
};
}
static function setContainer(clip) {
}
static function stayOnTop(clip) {
}
static var _servURL = "http://www.mochiads.com/static/lib/services/";
static var _services = "services.swf";
static var _mochiLC = "MochiLC.swf";
static var _listenChannelName = "__ms_";
static var _connecting = false;
static var _connected = false;
static var netup = true;
static var netupAttempted = false;
static var servicesSync = new mochi.as2.MochiSync();
}
Symbol 1083 MovieClip [__Packages.mochi.as2.MochiEventDispatcher] Frame 0
class mochi.as2.MochiEventDispatcher
{
var eventTable;
function MochiEventDispatcher () {
eventTable = {};
}
function buildDelegate(thisObject, thatObject) {
var _local2 = {thisObject:thisObject, thatObject:thatObject};
if (thatObject != undefined) {
var funct = ((typeof(thatObject) == "string") ? (thisObject[thatObject]) : (thatObject));
_local2.delegate = function (args) {
funct.call(thisObject, args);
};
} else {
_local2.delegate = thisObject;
}
return(_local2);
}
function compareDelegate(d_A, d_B) {
if ((d_A.thisObject != d_B.thisObject) || (d_A.thatObject != d_B.thatObject)) {
return(false);
}
return(true);
}
function addEventListener(event, thisObject, thatObject) {
removeEventListener(event, thisObject, thatObject);
eventTable[event].push(buildDelegate(thisObject, thatObject));
}
function removeEventListener(event, thisObject, thatObject) {
var _local3 = buildDelegate(thisObject, thatObject);
if (eventTable[event] == undefined) {
eventTable[event] = [];
return(undefined);
}
for (var _local4 in eventTable[event]) {
if (!compareDelegate(eventTable[event][_local4], _local3)) {
continue;
}
eventTable[event].splice(Number(_local4), 1);
}
}
function triggerEvent(event, args) {
if (eventTable[event] == undefined) {
return(undefined);
}
for (var _local4 in eventTable[event]) {
eventTable[event][_local4].delegate(args);
}
}
}
Symbol 1084 MovieClip [__Packages.mochi.as2.MochiEvents] Frame 0
class mochi.as2.MochiEvents
{
function MochiEvents () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function startSession(achievementID) {
mochi.as2.MochiServices.send("events_beginSession", {achievementID:achievementID}, null, null);
}
static function setNotifications(clip, style) {
var _local2 = {};
for (var _local3 in style) {
_local2[_local3] = style[_local3];
}
_local2.clip = clip;
mochi.as2.MochiServices.send("events_setNotifications", _local2, null, null);
}
static function addEventListener(eventType, thisObject, thatObject) {
_dispatcher.addEventListener(eventType, thisObject, thatObject);
}
static function triggerEvent(eventType, args) {
_dispatcher.triggerEvent(eventType, args);
}
static function removeEventListener(eventType, thisObject, thatObject) {
_dispatcher.removeEventListener(eventType, thisObject, thatObject);
}
static function startPlay(tag) {
if (tag == undefined) {
tag = "gameplay";
}
mochi.as2.MochiServices.send("events_setRoundID", {tag:String(tag)}, null, null);
}
static function endPlay() {
mochi.as2.MochiServices.send("events_clearRoundID", null, null, null);
}
static function trackEvent(tag, value) {
mochi.as2.MochiServices.send("events_trackEvent", {tag:tag, value:value}, null, null);
}
static var ACHIEVEMENT_RECEIVED = "AchievementReceived";
static var ALIGN_TOP_LEFT = "ALIGN_TL";
static var ALIGN_TOP = "ALIGN_T";
static var ALIGN_TOP_RIGHT = "ALIGN_TR";
static var ALIGN_LEFT = "ALIGN_L";
static var ALIGN_CENTER = "ALIGN_C";
static var ALIGN_RIGHT = "ALIGN_R";
static var ALIGN_BOTTOM_LEFT = "ALIGN_BL";
static var ALIGN_BOTTOM = "ALIGN_B";
static var ALIGN_BOTTOM_RIGHT = "ALIGN_BR";
static var FORMAT_SHORT = "ShortForm";
static var FORMAT_LONG = "LongForm";
static var _dispatcher = new mochi.as2.MochiEventDispatcher();
}
Symbol 1085 MovieClip [__Packages.mochi.as2.MochiSocial] Frame 0
class mochi.as2.MochiSocial
{
function MochiSocial () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function showLoginWidget(options) {
mochi.as2.MochiServices.setContainer();
mochi.as2.MochiServices.stayOnTop();
mochi.as2.MochiServices.send("coins_showLoginWidget", {options:options});
}
static function hideLoginWidget() {
mochi.as2.MochiServices.send("coins_hideLoginWidget");
}
static function requestLogin() {
mochi.as2.MochiServices.send("coins_requestLogin");
}
static function getUserInfo() {
mochi.as2.MochiServices.send("coins_getUserInfo");
}
static function saveUserProperties(properties) {
mochi.as2.MochiServices.send("coins_saveUserProperties", properties);
}
static function addEventListener(eventType, delegate) {
_dispatcher.addEventListener(eventType, delegate);
}
static function triggerEvent(eventType, args) {
_dispatcher.triggerEvent(eventType, args);
}
static function removeEventListener(eventType, delegate) {
_dispatcher.removeEventListener(eventType, delegate);
}
static var LOGGED_IN = "LoggedIn";
static var LOGGED_OUT = "LoggedOut";
static var LOGIN_SHOW = "LoginShow";
static var LOGIN_HIDE = "LoginHide";
static var LOGIN_SHOWN = "LoginShown";
static var PROFILE_SHOW = "ProfileShow";
static var PROFILE_HIDE = "ProfileHide";
static var PROPERTIES_SAVED = "PropertySaved";
static var WIDGET_LOADED = "WidgetLoaded";
static var USER_INFO = "UserInfo";
static var ERROR = "Error";
static var IO_ERROR = "IOError";
static var NO_USER = "NoUser";
static var PROPERTIES_SIZE = "PropertiesSize";
static var _dispatcher = new mochi.as2.MochiEventDispatcher();
}
Symbol 1086 MovieClip [__Packages.mochi.as2.MochiScores] Frame 0
class mochi.as2.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.as2.MochiServices.warnID(boardID, true);
mochi.as2.MochiScores.boardID = boardID;
mochi.as2.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function showLeaderboard(options) {
options.clip = mochi.as2.MochiServices.clip;
if ((options.clip != mochi.as2.MochiServices.__get__clip()) || (mochi.as2.MochiServices.__get__childClip()._target == undefined)) {
mochi.as2.MochiServices.disconnect();
trace("WARNING! This application is attempting to connect to MochiServices inside a showLeaderboard call!");
trace("make sure MochiServices.connect is called as early in the application runtime as possible.");
mochi.as2.MochiServices.connect(mochi.as2.MochiServices.__get__id(), options.clip);
}
delete options.clip;
if (options.name != null) {
if (typeof(options.name) == "object") {
if (options.name.text != undefined) {
options.name = options.name.text;
}
}
}
if (options.score != null) {
if (options.score instanceof TextField) {
if (options.score.text != undefined) {
options.score = options.score.text;
}
} else if (options.score instanceof mochi.as2.MochiDigits) {
options.score = options.score.value;
}
var _local1 = Number(options.score);
if (isNaN(_local1)) {
trace(("ERROR: Submitted score '" + options.score) + "' will be rejected, score is 'Not a Number'");
} else if ((_local1 == Number.NEGATIVE_INFINITY) || (_local1 == Number.POSITIVE_INFINITY)) {
trace(("ERROR: Submitted score '" + options.score) + "' will be rejected, score is an infinite");
} else {
if (Math.floor(_local1) != _local1) {
trace(("WARNING: Submitted score '" + options.score) + "' will be truncated");
}
options.score = _local1;
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.as2.MochiServices.__get__clip().stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
mochi.as2.MochiServices.__get__clip().play();
};
}
if (options.onError != null) {
onError = options.onError;
} else {
onError = onClose;
}
if (options.boardID == null) {
if (boardID != null) {
options.boardID = boardID;
}
}
mochi.as2.MochiServices.warnID(options.boardID, true);
trace("[MochiScores] NOTE: Security Sandbox Violation errors below are normal");
mochi.as2.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose);
}
static function closeLeaderboard() {
mochi.as2.MochiServices.send("scores_closeLeaderboard");
}
static function getPlayerInfo(callbackObj, callbackMethod) {
mochi.as2.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
static function submit(score, name, callbackObj, callbackMethod) {
score = Number(score);
if (isNaN(score)) {
trace(("ERROR: Submitted score '" + String(score)) + "' will be rejected, score is 'Not a Number'");
} else if ((score == Number.NEGATIVE_INFINITY) || (score == Number.POSITIVE_INFINITY)) {
trace(("ERROR: Submitted score '" + String(score)) + "' will be rejected, score is an infinite");
} else {
if (Math.floor(score) != score) {
trace(("WARNING: Submitted score '" + String(score)) + "' will be truncated");
}
score = Number(score);
}
mochi.as2.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
mochi.as2.MochiServices.send("scores_requestList", null, callbackObj, callbackMethod);
}
static function scoresArrayToObjects(scores) {
var _local5 = {};
var _local1;
var _local4;
var _local2;
var _local6;
for (var _local8 in scores) {
if (typeof(scores[_local8]) == "object") {
if ((scores[_local8].cols != null) && (scores[_local8].rows != null)) {
_local5[_local8] = [];
_local2 = scores[_local8];
_local4 = 0;
while (_local4 < _local2.rows.length) {
_local6 = {};
_local1 = 0;
while (_local1 < _local2.cols.length) {
_local6[_local2.cols[_local1]] = _local2.rows[_local4][_local1];
_local1++;
}
_local5[_local8].push(_local6);
_local4++;
}
} else {
_local5[_local8] = {};
for (var _local7 in scores[_local8]) {
_local5[_local8][_local7] = scores[_local8][_local7];
}
}
} else {
_local5[_local8] = scores[_local8];
}
}
return(_local5);
}
static function doClose(args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = "IOError";
}
onError.apply(null, [args.errorCode]);
} else {
onClose.apply();
}
}
}
Symbol 1087 MovieClip [__Packages.mochi.as2.MochiDigits] Frame 0
class mochi.as2.MochiDigits
{
var Encoder, Fragment, Sibling;
function MochiDigits (digit, index) {
Encoder = 0;
setValue(digit, index);
}
function get value() {
return(Number(toString()));
}
function set value(v) {
setValue(v);
//return(value);
}
function addValue(v) {
value = value + v;
}
function setValue(digit, index) {
var _local3 = digit.toString();
if ((index == undefined) || (isNaN(index))) {
index = 0;
}
Fragment = _local3.charCodeAt(index++) ^ Encoder;
if (index < _local3.length) {
Sibling = new mochi.as2.MochiDigits(digit, index);
} else {
Sibling = null;
}
reencode();
}
function reencode() {
var _local2 = int(2147483647 * Math.random());
Fragment = Fragment ^ (_local2 ^ Encoder);
Encoder = _local2;
}
function toString() {
var _local2 = String.fromCharCode(Fragment ^ Encoder);
return(((Sibling != null) ? (_local2.concat(Sibling.toString())) : (_local2)));
}
}
Symbol 179 MovieClip [enemy1] Frame 1
stop();
if (this.meatVar == null) {
this.meatVar = 3;
}
if (this.scoreVar == null) {
this.scoreVar = 2500;
this.scoreVar = Math.floor(((this.scoreVar * 0.1) * Math.random()) + this.scoreVar);
}
if (this.dx == null) {
this.dx = (Math.random() * 0.2) + 1.5;
}
if (this.dxOrig == null) {
this.dxOrig = this.dx;
}
if (this.spawnRight) {
this.dx = this.dx * -1;
}
Symbol 182 MovieClip Frame 1
stop();
Symbol 183 MovieClip [enemy3] Frame 1
if (this.meatVar == null) {
this.meatVar = 2;
}
if (this.scoreVar == null) {
this.scoreVar = 5000;
this.scoreVar = Math.floor(((this.scoreVar * 0.1) * Math.random()) + this.scoreVar);
}
if (this.dx == null) {
this.dx = (Math.random() * 0.2) + 1.1;
}
if (this.dxOrig == null) {
this.dxOrig = this.dx;
}
if (this.range == null) {
this.range = 300;
}
if (this.shootCooldown == null) {
this.shootCooldown = 750;
}
if (this.spawnRight) {
this.dx = this.dx * -1;
}
gunpoint.onEnterFrame = function () {
Point = new Object();
Point.x = this._x;
Point.y = this._y;
this._parent.localToGlobal(Point);
this._parent.gunX = Point.x;
this._parent.gunY = Point.y;
};
Symbol 183 MovieClip [enemy3] Frame 2
stop();
Symbol 199 MovieClip Frame 1
stop();
Symbol 208 MovieClip Frame 17
stop();
Symbol 238 MovieClip Frame 1
stop();
Symbol 241 MovieClip [enemy10] Frame 1
gunpoint.onEnterFrame = function () {
Point = new Object();
Point.x = this._x;
Point.y = this._y;
this._parent.localToGlobal(Point);
this._parent.gunX = Point.x;
this._parent.gunY = Point.y;
};
stop();
if (this.meatVar == null) {
this.meatVar = 0;
this.meatVar = Math.floor(((this.meatVar * 0.1) * Math.random()) + this.meatVar);
}
if (this.scoreVar == null) {
this.scoreVar = 30000;
this.scoreVar = Math.floor(((this.scoreVar * 0.1) * Math.random()) + this.scoreVar);
}
if (this.dx == null) {
this.dx = (Math.random() * 0.2) + 2.3;
}
if (this.spawnRight && (this.counterX == undefined)) {
this.counterX = 1;
this.dx = this.dx * -1;
}
if (this.dxOrig == null) {
this.dxOrig = this.dx;
}
if (this.shootCooldown == null) {
this.shootCooldown = 1000;
}
if (this.range == null) {
this.range = 300;
}
Symbol 246 MovieClip [enemy4] Frame 1
stop();
if (this.meatVar == null) {
this.meatVar = 3;
}
if (this.scoreVar == null) {
this.scoreVar = 10000;
this.scoreVar = Math.floor(((this.scoreVar * 0.1) * Math.random()) + this.scoreVar);
}
if (this.dx == null) {
this.dx = (Math.random() * 0.4) + 2.6;
}
if (this.dxOrig == null) {
this.dxOrig = this.dx;
}
if (this.spawnRight) {
this.dx = this.dx * -1;
}
Symbol 282 MovieClip [explosion2] Frame 12
this.removeMovieClip();
Symbol 289 MovieClip Frame 1
gunpoint.onEnterFrame = function () {
Point = new Object();
Point.x = this._x;
Point.y = this._y;
this._parent.localToGlobal(Point);
this._parent.gunX = Point.x;
this._parent.gunY = Point.y;
};
stop();
Symbol 289 MovieClip Frame 6
this._parent._parent.shoot("tank", 12, 4, "enemybullettank");
Symbol 303 MovieClip Frame 1
stop();
Symbol 304 MovieClip [enemy9] Frame 1
stop();
if (this.meatVar == null) {
this.meatVar = 0;
}
if (this.scoreVar == null) {
this.scoreVar = 20000;
this.scoreVar = Math.floor(((this.scoreVar * 0.1) * Math.random()) + this.scoreVar);
}
if (this.dx == null) {
this.dx = (Math.random() * 0.2) + 2;
}
if (this.dxOrig == null) {
this.dxOrig = this.dx;
}
if (this.shootCooldown == null) {
this.shootCooldown = 1500;
}
if (this.range == null) {
this.range = 330;
}
if (this.spawnRight) {
this.dx = this.dx * -1;
}
Symbol 310 MovieClip Frame 1
stop();
Symbol 310 MovieClip Frame 10
gotoAndPlay (2);
Symbol 323 MovieClip Frame 1
stop();
Symbol 324 MovieClip [enemy6] Frame 1
stop();
if (this.meatVar == null) {
this.meatVar = 0;
this.meatVar = Math.floor(((this.meatVar * 0.1) * Math.random()) + this.meatVar);
}
if (this.scoreVar == null) {
this.scoreVar = 20000;
this.scoreVar = Math.floor(((this.scoreVar * 0.1) * Math.random()) + this.scoreVar);
}
if (this.dx == null) {
this.dx = (Math.random() * 0.2) + 5;
}
if (this.dxOrig == null) {
this.dxOrig = this.dx;
}
if (this.spawnRight) {
this.dx = this.dx * -1;
}
bombPoint.onEnterFrame = function () {
Point = new Object();
Point.x = this._x;
Point.y = this._y;
this._parent.localToGlobal(Point);
this._parent.bombX = Point.x;
this._parent.bombY = Point.y;
};
Symbol 365 MovieClip [explosion] Frame 12
this.removeMovieClip();
Symbol 370 MovieClip Frame 1
stop();
Symbol 378 MovieClip [enemy5] Frame 1
if (this.meatVar == null) {
this.meatVar = 4;
}
if (this.scoreVar == null) {
this.scoreVar = 6500;
this.scoreVar = Math.floor(((this.scoreVar * 0.1) * Math.random()) + this.scoreVar);
}
if (this.dx == null) {
this.dx = (Math.random() * 0.2) + 0.8;
}
if (this.dxOrig == null) {
this.dxOrig = this.dx;
}
if (this.range == null) {
this.range = 300;
}
if (this.shootCooldown == null) {
this.shootCooldown = 750;
}
if (this.spawnRight) {
this.dx = this.dx * -1;
}
gunpoint.onEnterFrame = function () {
Point = new Object();
Point.x = this._x;
Point.y = this._y;
this._parent.localToGlobal(Point);
this._parent.gunX = Point.x;
this._parent.gunY = Point.y;
};
Symbol 378 MovieClip [enemy5] Frame 2
stop();
Symbol 383 MovieClip Frame 9
stop();
Symbol 384 MovieClip Frame 1
stop();
Symbol 402 MovieClip Frame 1
stop();
Symbol 402 MovieClip Frame 3
gotoAndStop (1);
Symbol 410 MovieClip Frame 1
stop();
Symbol 411 MovieClip [enemy5a] Frame 1
if (this.meatVar == null) {
this.meatVar = 0;
}
if (this.scoreVar == null) {
this.scoreVar = 20000;
this.scoreVar = Math.floor(((this.scoreVar * 0.1) * Math.random()) + this.scoreVar);
}
if (this.dx == null) {
this.dx = (Math.random() * 0.2) + 1.1;
}
if (this.dxOrig == null) {
this.dxOrig = this.dx;
}
if (this.range == null) {
this.range = 300;
}
if (this.shootCooldown == null) {
this.shootCooldown = 500;
}
if (this.spawnRight && (this.counterX == undefined)) {
this.counterX = 1;
this.dx = this.dx * -1;
}
gunpoint.onEnterFrame = function () {
Point = new Object();
Point.x = this._x;
Point.y = this._y;
this._parent.localToGlobal(Point);
this._parent.gunX = Point.x;
this._parent.gunY = Point.y;
};
Symbol 411 MovieClip [enemy5a] Frame 2
stop();
Symbol 429 MovieClip Frame 1
stop();
Symbol 429 MovieClip Frame 3
gotoAndStop (1);
Symbol 430 MovieClip Frame 1
stop();
Symbol 431 MovieClip [enemy7] Frame 1
if (this.meatVar == null) {
this.meatVar = 0;
}
if (this.scoreVar == null) {
this.scoreVar = 15000;
this.scoreVar = Math.floor(((this.scoreVar * 0.1) * Math.random()) + this.scoreVar);
}
if (this.dx == null) {
this.dx = (Math.random() * 0.2) + 2;
}
if (this.shootCooldown == null) {
this.shootCooldown = 150;
}
if (this.range == null) {
this.range = 300;
}
if (this.dxOrig == null) {
this.dxOrig = this.dx;
}
if (this.spawnRight && (this.counterX == undefined)) {
this.counterX = 1;
this.dx = this.dx * -1;
}
gunpoint.onEnterFrame = function () {
Point = new Object();
Point.x = this._x;
Point.y = this._y;
this._parent.localToGlobal(Point);
this._parent.gunX = Point.x;
this._parent.gunY = Point.y;
};
Symbol 431 MovieClip [enemy7] Frame 2
stop();
Symbol 441 MovieClip Frame 1
stop();
Symbol 443 MovieClip [enemy8] Frame 1
if (this.meatVar == null) {
this.meatVar = 2;
}
if (this.scoreVar == null) {
this.scoreVar = 20000;
this.scoreVar = Math.floor(((this.scoreVar * 0.1) * Math.random()) + this.scoreVar);
}
if (this.dx == null) {
this.dx = (Math.random() * 0.2) + 2.1;
}
if (this.dxOrig == null) {
this.dxOrig = this.dx;
}
if (this.range == null) {
this.range = 300;
}
if (this.shootCooldown == null) {
this.shootCooldown = 750;
}
if (this.spawnRight) {
this.dx = this.dx * -1;
}
gunpoint.onEnterFrame = function () {
Point = new Object();
Point.x = this._x;
Point.y = this._y;
this._parent.localToGlobal(Point);
this._parent.gunX = Point.x;
this._parent.gunY = Point.y;
};
Symbol 443 MovieClip [enemy8] Frame 2
stop();
Symbol 451 MovieClip [enemy1a] Frame 1
stop();
if (this.meatVar == null) {
this.meatVar = 4;
}
if (this.scoreVar == null) {
this.scoreVar = 2500;
this.scoreVar = Math.floor(((this.scoreVar * 0.1) * Math.random()) + this.scoreVar);
}
if (this.dx == null) {
this.dx = (Math.random() * 0.2) + 1.2;
}
if (this.dxOrig == null) {
this.dxOrig = this.dx;
}
if (this.spawnRight) {
this.dx = this.dx * -1;
}
Symbol 459 MovieClip Frame 1
stop();
Symbol 461 MovieClip [enemy8a] Frame 1
if (this.meatVar == null) {
this.meatVar = 2;
}
if (this.scoreVar == null) {
this.scoreVar = 40000;
this.scoreVar = Math.floor(((this.scoreVar * 0.1) * Math.random()) + this.scoreVar);
}
if (this.dx == null) {
this.dx = (Math.random() * 0.2) + 2.1;
}
if (this.dxOrig == null) {
this.dxOrig = this.dx;
}
if (this.range == null) {
this.range = 300;
}
if (this.shootCooldown == null) {
this.shootCooldown = 750;
}
if (this.spawnRight) {
this.dx = this.dx * -1;
}
gunpoint.onEnterFrame = function () {
Point = new Object();
Point.x = this._x;
Point.y = this._y;
this._parent.localToGlobal(Point);
this._parent.gunX = Point.x;
this._parent.gunY = Point.y;
};
Symbol 461 MovieClip [enemy8a] Frame 2
stop();
Symbol 467 MovieClip Frame 1
gunpoint.onEnterFrame = function () {
Point = new Object();
Point.x = this._x;
Point.y = this._y;
this._parent.localToGlobal(Point);
this._parent.gunX = Point.x;
this._parent.gunY = Point.y;
};
stop();
Symbol 467 MovieClip Frame 6
this._parent._parent.shoot("tank", 12, 5, "enemybullettanklaser");
Symbol 473 MovieClip Frame 1
stop();
Symbol 474 MovieClip [enemy9a] Frame 1
stop();
if (this.meatVar == null) {
this.meatVar = 0;
}
if (this.scoreVar == null) {
this.scoreVar = 30000;
this.scoreVar = Math.floor(((this.scoreVar * 0.1) * Math.random()) + this.scoreVar);
}
if (this.dx == null) {
this.dx = (Math.random() * 0.2) + 2;
}
if (this.dxOrig == null) {
this.dxOrig = this.dx;
}
if (this.shootCooldown == null) {
this.shootCooldown = 1500;
}
if (this.range == null) {
this.range = 330;
}
if (this.spawnRight) {
this.dx = this.dx * -1;
}
Symbol 488 MovieClip Frame 1
stop();
Symbol 491 MovieClip [enemy10a] Frame 1
gunpoint.onEnterFrame = function () {
Point = new Object();
Point.x = this._x;
Point.y = this._y;
this._parent.localToGlobal(Point);
this._parent.gunX = Point.x;
this._parent.gunY = Point.y;
};
stop();
if (this.meatVar == null) {
this.meatVar = 0;
this.meatVar = Math.floor(((this.meatVar * 0.1) * Math.random()) + this.meatVar);
}
if (this.scoreVar == null) {
this.scoreVar = 50000;
this.scoreVar = Math.floor(((this.scoreVar * 0.1) * Math.random()) + this.scoreVar);
}
if (this.dx == null) {
this.dx = (Math.random() * 0.2) + 2.3;
}
if (this.spawnRight && (this.counterX == undefined)) {
this.counterX = 1;
this.dx = this.dx * -1;
}
if (this.dxOrig == null) {
this.dxOrig = this.dx;
}
if (this.shootCooldown == null) {
this.shootCooldown = 1000;
}
if (this.range == null) {
this.range = 300;
}
Symbol 493 MovieClip Frame 1
stop();
Symbol 494 MovieClip [enemy3a] Frame 1
if (this.meatVar == null) {
this.meatVar = 2;
}
if (this.scoreVar == null) {
this.scoreVar = 12500;
this.scoreVar = Math.floor(((this.scoreVar * 0.1) * Math.random()) + this.scoreVar);
}
if (this.dx == null) {
this.dx = (Math.random() * 0.2) + 1.1;
}
if (this.dxOrig == null) {
this.dxOrig = this.dx;
}
if (this.range == null) {
this.range = 300;
}
if (this.shootCooldown == null) {
this.shootCooldown = 750;
}
if (this.spawnRight) {
this.dx = this.dx * -1;
}
gunpoint.onEnterFrame = function () {
Point = new Object();
Point.x = this._x;
Point.y = this._y;
this._parent.localToGlobal(Point);
this._parent.gunX = Point.x;
this._parent.gunY = Point.y;
};
Symbol 494 MovieClip [enemy3a] Frame 2
stop();
Symbol 502 MovieClip Frame 1
stop();
Symbol 502 MovieClip Frame 3
gotoAndStop (1);
Symbol 503 MovieClip [enemy7a] Frame 1
if (this.meatVar == null) {
this.meatVar = 0;
}
if (this.scoreVar == null) {
this.scoreVar = 25000;
this.scoreVar = Math.floor(((this.scoreVar * 0.1) * Math.random()) + this.scoreVar);
}
if (this.dx == null) {
this.dx = (Math.random() * 0.2) + 2;
}
if (this.shootCooldown == null) {
this.shootCooldown = 150;
}
if (this.range == null) {
this.range = 300;
}
if (this.dxOrig == null) {
this.dxOrig = this.dx;
}
if (this.spawnRight && (this.counterX == undefined)) {
this.counterX = 1;
this.dx = this.dx * -1;
}
gunpoint.onEnterFrame = function () {
Point = new Object();
Point.x = this._x;
Point.y = this._y;
this._parent.localToGlobal(Point);
this._parent.gunX = Point.x;
this._parent.gunY = Point.y;
};
Symbol 503 MovieClip [enemy7a] Frame 2
stop();
Symbol 510 MovieClip [enemy4a] Frame 1
stop();
if (this.meatVar == null) {
this.meatVar = 3;
}
if (this.scoreVar == null) {
this.scoreVar = 20000;
this.scoreVar = Math.floor(((this.scoreVar * 0.1) * Math.random()) + this.scoreVar);
}
if (this.dx == null) {
this.dx = (Math.random() * 0.4) + 3;
}
if (this.dxOrig == null) {
this.dxOrig = this.dx;
}
if (this.spawnRight) {
this.dx = this.dx * -1;
}
Symbol 517 MovieClip [explosion3] Frame 12
this.removeMovieClip();
Symbol 525 MovieClip Frame 1
stop();
Symbol 526 MovieClip [enemy6a] Frame 1
stop();
if (this.meatVar == null) {
this.meatVar = 0;
this.meatVar = Math.floor(((this.meatVar * 0.1) * Math.random()) + this.meatVar);
}
if (this.scoreVar == null) {
this.scoreVar = 30000;
this.scoreVar = Math.floor(((this.scoreVar * 0.1) * Math.random()) + this.scoreVar);
}
if (this.dx == null) {
this.dx = (Math.random() * 0.2) + 5;
}
if (this.dxOrig == null) {
this.dxOrig = this.dx;
}
if (this.spawnRight) {
this.dx = this.dx * -1;
}
bombPoint.onEnterFrame = function () {
Point = new Object();
Point.x = this._x;
Point.y = this._y;
this._parent.localToGlobal(Point);
this._parent.bombX = Point.x;
this._parent.bombY = Point.y;
};
Symbol 597 MovieClip Frame 36
this._parent.removeMovieClip();
Symbol 628 MovieClip [bloodsplatter] Frame 1
_root.bloodExplosion(this._x, this._y, this.theDx, this.theDy);
Symbol 628 MovieClip [bloodsplatter] Frame 14
stop();
this.removeMovieClip();
Symbol 679 MovieClip [greensplatter] Frame 1
_root.greenExplosion(this._x, this._y, this.theDx, this.theDy);
Symbol 679 MovieClip [greensplatter] Frame 25
stop();
this.removeMovieClip();
Symbol 707 MovieClip [gameoveroverlay] Frame 1
stop();
if (_root.globalNoKong) {
moreBtn.onRelease = function () {
getURL ("http://www.andkon.com/arcade/ ", "_blank");
};
} else {
mochi.as2.MochiServices.addLinkEvent("http://x.mochiads.com/link/cc7ed778e09e25fe", "http://www.kongregate.com/?gamereferral=effingworms", moreBtn);
}
continueBtn.onRelease = function () {
this._parent.dead = true;
};
Symbol 707 MovieClip [gameoveroverlay] Frame 3
if (_root.globalNoKong) {
moreBtn.onRelease = function () {
getURL ("http://www.andkon.com/arcade/ ", "_blank");
};
} else {
mochi.as2.MochiServices.addLinkEvent("http://x.mochiads.com/link/cc7ed778e09e25fe", "http://www.kongregate.com/?gamereferral=effingworms", moreBtn);
}
continueBtn.onRelease = function () {
this._parent.dead = true;
};
Symbol 711 MovieClip Frame 1
Symbol 713 MovieClip [bloodtext] Frame 1
gotoAndPlay (2);
Symbol 713 MovieClip [bloodtext] Frame 7
_root.startRampage();
Symbol 713 MovieClip [bloodtext] Frame 43
stop();
Symbol 716 MovieClip Frame 1
theT.text = _root.theBloodT;
theN.text = _root.theBloodN;
Symbol 718 MovieClip [bloodtext2] Frame 1
gotoAndPlay (2);
Symbol 718 MovieClip [bloodtext2] Frame 13
trace("start:" + getTimer());
Symbol 718 MovieClip [bloodtext2] Frame 56
trace("end:" + getTimer());
Symbol 718 MovieClip [bloodtext2] Frame 64
this.removeMovieClip();
Symbol 721 MovieClip [pausescreen] Frame 1
stop();
Symbol 758 MovieClip Frame 1
stop();
Symbol 794 MovieClip Frame 1
stop();
Symbol 817 MovieClip [upgradeshop] Frame 1
stop();
leftBtn.onRelease = function () {
if (!this.dead) {
_root.upgradeSkin = 1;
this._parent.dead = true;
_root.savedSpeedMulti = _root.savedSpeedMulti + 0.2;
_root.speedMulti = _root.savedSpeedMulti;
this.dead = true;
}
};
rightBtn.onRelease = function () {
if (!this.dead) {
_root.upgradeSkin = 2;
this._parent.dead = true;
_root.savedMaxHp = _root.savedMaxHp + 30;
_root.theHpMax = _root.savedMaxHp;
_root.savedHpBarSize = _root.savedHpBarSize + 50;
_root.hpBarSize = _root.savedHpBarSize;
_root.hpBar._xscale = _root.hpBarSize;
_root.hpBar.hpBar._xscale = (_root.theHp / _root.theHpMax) * 100;
this.dead = true;
}
};
doneBtn.onRelease = function () {
this._parent.dead = true;
};
Symbol 817 MovieClip [upgradeshop] Frame 2
leftBtn.onRelease = function () {
_root.upgradeFat = 1;
_root.bonusSize = 1.1;
_root.theHead._xscale = (_root.body1._xscale = (_root.body2._xscale = (_root.body3._xscale = (_root.body4._xscale = (_root.body5._xscale = (_root.body6._xscale = (_root.body7._xscale = _root.savedSize * _root.bonusSize)))))));
_root.theHead._yscale = (_root.body1._yscale = (_root.body2._yscale = (_root.body3._yscale = (_root.body4._yscale = (_root.body5._yscale = (_root.body6._yscale = (_root.body7._yscale = _root.savedSize)))))));
this._parent.dead = true;
};
rightBtn.onRelease = function () {
_root.upgradeRed = 1;
this._parent.dead = true;
};
Symbol 817 MovieClip [upgradeshop] Frame 3
leftBtn.onRelease = function () {
if (!this.dead) {
_root.upgradeSpike = 1;
this._parent.dead = true;
_root.savedSpeedMulti = _root.savedSpeedMulti + 0.2;
_root.speedMulti = _root.savedSpeedMulti;
this.dead = true;
}
};
rightBtn.onRelease = function () {
_root.upgradeSpike = 2;
this._parent.dead = true;
};
Symbol 817 MovieClip [upgradeshop] Frame 4
leftBtn.onRelease = function () {
if (!this.dead) {
_root.upgradeTail = 2;
this._parent.dead = true;
_root.savedSpeedMulti = _root.savedSpeedMulti + 0.2;
_root.speedMulti = _root.savedSpeedMulti;
this.dead = true;
}
};
rightBtn.onRelease = function () {
if (!this.dead) {
_root.upgradeTail = 1;
this._parent.dead = true;
_root.savedHpBarSize = _root.savedHpBarSize + 50;
_root.hpBarSize = _root.savedHpBarSize;
_root.hpBar._xscale = _root.hpBarSize;
_root.savedMaxHp = _root.savedMaxHp + 30;
_root.theHpMax = _root.savedMaxHp;
_root.hpBar.hpBar._xscale = (_root.theHp / _root.theHpMax) * 100;
this.dead = true;
}
};
Symbol 817 MovieClip [upgradeshop] Frame 5
leftBtn.onRelease = function () {
_root.upgradeHead = 2;
this._parent.dead = true;
};
rightBtn.onRelease = function () {
_root.upgradeHead = 1;
this._parent.dead = true;
};
Symbol 817 MovieClip [upgradeshop] Frame 6
leftBtn.onRelease = function () {
_root.upgradeBlood = 1;
this._parent.dead = true;
};
rightBtn.onRelease = function () {
_root.upgradeWing = 1;
this._parent.dead = true;
};
Symbol 842 MovieClip Frame 1
stop();
Symbol 866 MovieClip Frame 156
stop();
_root.frameTransition("title");
Symbol 869 MovieClip Frame 84
stop();
_root.frameTransition("title");
Symbol 898 MovieClip Frame 1
mochi.as2.MochiServices.addLinkEvent("http://x.mochiads.com/link/f6fe142f546bd19f", "http://flashgamedistribution.com/profile/babaganoosh", distroBtn);
Symbol 945 MovieClip Frame 1
stop();
Symbol 959 Button
on (release) {
getURL ("http://www.indieluft.com/", "_blank");
}
Symbol 967 MovieClip Frame 1
this.onEnterFrame = function () {
if (_root.rampage && (_root.upgradeRed == 1)) {
this._visible = true;
} else {
this._visible = false;
}
};
Symbol 968 MovieClip Frame 1
stop();
this.onEnterFrame = function () {
this.gotoAndStop(_root.upgradeSkin + 1);
};
Symbol 972 MovieClip Frame 1
stop();
Symbol 977 MovieClip Frame 1
stop();
Symbol 1012 MovieClip Frame 1
stop();
this.onEnterFrame = function () {
gotoAndStop(_root.upgradeTail + 1);
};
Symbol 1022 MovieClip Frame 1
this.onEnterFrame = function () {
if (_root.upgradeWing == 1) {
this._visible = true;
} else {
this._visible = false;
}
};
Symbol 1023 MovieClip Frame 1
this.onEnterFrame = function () {
if (_root.upgradeBlood == 1) {
this._visible = true;
} else {
this._visible = false;
}
};
Symbol 1026 MovieClip Frame 1
this.onEnterFrame = function () {
if (_root.upgradeSpike == 2) {
this._visible = true;
} else {
this._visible = false;
}
};
Symbol 1027 MovieClip Frame 1
this.onEnterFrame = function () {
if (_root.upgradeSpike == 1) {
this._visible = true;
} else {
this._visible = false;
}
};
Symbol 1028 MovieClip Frame 1
stop();
this.onEnterFrame = function () {
this.gotoAndStop(_root.upgradeSkin + 1);
};
Symbol 1029 MovieClip Frame 1
this.onEnterFrame = function () {
if (_root.upgradeSpike == 2) {
this._visible = true;
} else {
this._visible = false;
}
};
Symbol 1030 MovieClip Frame 1
this.onEnterFrame = function () {
if (_root.upgradeSpike == 1) {
this._visible = true;
} else {
this._visible = false;
}
};
Symbol 1031 MovieClip Frame 1
stop();
this.onEnterFrame = function () {
this.gotoAndStop(_root.upgradeSkin + 1);
};
Symbol 1033 MovieClip Frame 1
this.onEnterFrame = function () {
if (_root.rampage && (_root.upgradeRed == 1)) {
this._visible = true;
} else {
this._visible = false;
}
};
Symbol 1036 MovieClip Frame 1
stop();
this.onEnterFrame = function () {
this.gotoAndStop(_root.upgradeSkin + 1);
};
Symbol 1037 MovieClip Frame 1
stop();
Symbol 1040 MovieClip Frame 1
hpBar.onEnterFrame = function () {
this._xscale = (_root.theHp / _root.theHpMax) * 100;
};
Symbol 1050 MovieClip Frame 1
stop();