Frame 1
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
_root.loadbar._xscale = PercentLoaded;
} else {
gotoAndPlay (3);
}
Frame 2
gotoAndPlay (1);
Frame 28
gotoAndPlay ("intro");
Frame 29
stop();
Frame 30
stop();
Frame 137
var introSwoosh = new Sound();
introSwoosh.attachSound("intro_swoosh");
introSwoosh.start();
introSwoosh.onSoundComplete = function () {
delete introSwoosh;
};
Frame 145
_quality = "MEDIUM";
var musicCutscene = new Sound();
musicCutscene.attachSound("music_cutscene");
var musicMenu = new Sound();
musicMenu.attachSound("music_menu");
musicMenu.start();
musicMenu.onSoundComplete = function () {
musicMenu.start();
};
Frame 151
stop();
Frame 164
gotoAndPlay(goto +144);
Frame 171
stop();
Frame 177
gotoAndPlay (146);
Instance of Symbol 592 MovieClip in Frame 184
onClipEvent (keyDown) {
tellTarget (_root) {
gotoAndPlay ("done");
};
}
Frame 185
function gotoNextFrame() {
nextFrame();
}
var frameTimer = setInterval(gotoNextFrame, 4000);
_root.ninja.gotoAndStop(2);
stop();
Frame 186
_root.ninja.gotoAndStop(3);
Frame 187
_root.ninja.gotoAndStop(4);
Frame 188
_root.ninja.gotoAndStop(1);
Frame 189
_root.ninja.gotoAndStop(5);
Frame 190
clearInterval(frameTimer);
play();
Frame 191
musicMenu.setVolume(90);
Frame 192
musicMenu.setVolume(82);
Frame 193
musicMenu.setVolume(74);
Frame 194
musicMenu.setVolume(66);
Frame 195
musicMenu.setVolume(58);
Frame 196
musicMenu.setVolume(50);
Frame 197
musicMenu.setVolume(42);
Frame 198
musicMenu.setVolume(34);
Frame 199
musicMenu.setVolume(26);
Frame 200
musicMenu.setVolume(18);
Frame 201
musicMenu.setVolume(10);
Frame 202
musicMenu.setVolume(2);
Frame 203
musicMenu.stop("music_menu");
delete _root.musicMenu;
gotoAndPlay (207);
Frame 204
function buildGround() {
_root.ground.createEmptyMovieClip("curvy0", 0);
with (_root.ground.curvy0) {
moveTo(0, $rootHeight);
beginFill(thecolor);
lineTo(0, $rootHeight - 100);
curveTo($curveWidth / 2, $rootHeight - 120, $curveWidth, $rootHeight - 100);
lineTo($curveWidth, $rootHeight);
endFill();
}
_root.ground.curvy0._x = -500;
_root.ground.createEmptyMovieClip("curvy1", 1);
with (_root.ground.curvy1) {
moveTo(0, $rootHeight);
beginFill(thecolor);
lineTo(0, $rootHeight - 100);
curveTo($curveWidth / 2, $rootHeight - 80, $curveWidth, $rootHeight - 100);
lineTo($curveWidth, $rootHeight);
endFill();
}
_root.ground.curvy1._x = 495;
}
function createFire() {
$fireIndex++;
_root.attachMovie("fire", "fire" + $fireIndex, _root.getNextHighestDepth());
_root.attachMovie("needle", "fireNeedle" + $fireIndex, _root.getNextHighestDepth());
_root["fireNeedle" + $fireIndex]._x = $rootWidth;
_root["fireNeedle" + $fireIndex]._y = $rootHeight;
_root["fireNeedle" + $fireIndex]._visible = false;
_root["fire" + $fireIndex]._x = $rootWidth;
_root["fire" + $fireIndex]._y = $rootHeight;
do {
_root["fireNeedle" + $fireIndex]._y = _root["fireNeedle" + $fireIndex]._y - 1;
_root["fire" + $fireIndex]._y = _root["fireNeedle" + $fireIndex]._y;
} while (_root.ground.hitTest(_root["fireNeedle" + $fireIndex]._x, _root["fireNeedle" + $fireIndex]._y, true));
$fireList.push($fireIndex);
}
function createZombie() {
if ($spriteList.length < 4) {
$spriteIndex++;
_root.attachMovie("zombie", "zombie" + $spriteIndex, _root.getNextHighestDepth());
_root.attachMovie("needle", "zomNeedle" + $spriteIndex, _root.getNextHighestDepth());
_root["zomNeedle" + $spriteIndex]._x = $rootWidth;
_root["zomNeedle" + $spriteIndex]._visible = false;
_root["zombie" + $spriteIndex]._x = $rootWidth;
_root["zombie" + $spriteIndex].$jump = 0;
_root["zombie" + $spriteIndex].$yspeed = 0;
_root["zombie" + $spriteIndex].$xspeed = -8;
_root["zombie" + $spriteIndex].$health = 5;
$spriteList.push($spriteIndex);
}
}
function getAngle(width1, tempy1, tempy2) {
Adj = width1;
Opp = tempy2 - tempy1;
angle = Math.atan2(Opp, Adj);
angle = (angle / Math.PI) * 180;
return(angle);
}
function isAttacked() {
var _local2 = new Array();
i = 0;
while (i < $spriteList.length) {
if (_root["zombie" + $spriteList[i]]._currentframe == 1) {
if (_root.ninja.hitTest(_root["zombie" + $spriteList[i]])) {
if (($killCount + 1) == $maxlvl[$level - 1]) {
clearInterval(fireTimer);
clearInterval(zomTimer);
clearInterval(washTimer);
}
if (($attack == 1) && ((_root.ninja._currentframe > 3) || (_root.ninja._currentframe == 2))) {
_root["zombie" + $spriteList[i]].$jump = 1;
_root["zombie" + $spriteList[i]].$yspeed = 10;
_root["zombie" + $spriteList[i]].$xspeed = 7;
_root["zombie" + $spriteList[i]].$health = _root["zombie" + $spriteList[i]].$health - 1;
_root["zombie" + $spriteList[i]].gotoAndStop(2);
} else if (_root.ninjaNeedle1.hitTest(_root["zombie" + $spriteList[i]])) {
isHurt();
}
}
}
i++;
}
i = 0;
while (i < _local2.length) {
$spriteList.splice(_local2[i], 1);
i++;
}
}
function isGameOver() {
if ($damage == 5) {
musicLevel.stop();
musicHunter.stop();
musicEar.stop();
musicTV.stop();
_root.ninja.removeMovieClip();
_root.ground["curvy" + $curveIndex].removeMovieClip();
_root.ground["curvy" + ($curveIndex - 1)].removeMovieClip();
$curveIndex = 1;
_root.tvfront.removeMovieClip();
_root.tvback.removeMovieClip();
_root.trex.removeMovieClip();
_root.stomach.removeMovieClip();
_root.scroll.removeMovieClip();
_root.granny.removeMovieClip();
_root.huntertrex.removeMovieClip();
_root.smokering.removeMovieClip();
_root.ear.removeMovieClip();
clearInterval(zomTimer);
clearInterval(fireTimer);
clearInterval(washTimer);
clearInterval(tvprojector);
i = 0;
while (i < (shootfire.length + 1)) {
_root[shootfire[i]].removeMovieClip();
i++;
}
i = 0;
while (i < ($spriteList.length + 1)) {
_root["zombie" + $spriteList[i]].removeMovieClip();
i++;
}
i = 0;
while (i < ($fireList.length + 1)) {
_root["fire" + $fireList[i]].removeMovieClip();
i++;
}
i = 0;
while (i < ($washList.length + 1)) {
_root[$washList[i]].removeMovieClip();
i++;
}
i = 0;
while (i < (tvList.length + 1)) {
_root[tvList[i]].removeMovieClip();
i++;
}
i = 0;
while (i < (earCrud.length + 1)) {
_root[earCrud[i]].removeMovieClip();
i++;
}
musicHunter.stop();
_root.hunter.removeMovieClip();
_root.huntershield.removeMovieClip();
clearInterval(hActs);
_root.attachMovie("gameover", "gameover", _root.getNextHighestDepth());
_root.gameover._x = 0;
_root.gameover._y = 0;
gameoverTimer = setInterval(gotoMenu, 4500);
$damage = 0;
stop();
}
}
function isHurt() {
if ($notstunned) {
soundNinjaHurt.start();
$notstunned = false;
_root.scroll.play();
$damage++;
$stuntimer = setInterval(isUnstunned, 6000);
}
}
function isStunned() {
if (!$notstunned) {
if ($red == 0) {
$red = 255;
$alpha = 50;
} else {
$red = 0;
$alpha = 100;
}
var _local2 = new Color(_root.ninja);
var _local3 = {ra:100, rb:$red, ga:100, gb:$red, ba:100, bb:$red, aa:$alpha, ab:0};
_local2.setTransform(_local3);
}
}
function isUnstunned() {
if ($red != 0) {
$red = 0;
$alpha = 100;
var _local2 = new Color(_root.ninja);
var _local3 = {ra:100, rb:$red, ga:100, gb:$red, ba:100, bb:$red, aa:$alpha, ab:0};
_local2.setTransform(_local3);
}
$notstunned = true;
clearInterval($stuntimer);
}
function moveFire() {
var _local2 = new Array();
i = 0;
while (i < $fireList.length) {
_root["fire" + $fireList[i]]._x = _root["fire" + $fireList[i]]._x - $groundmove;
if (_root.ninjaNeedle1.hitTest(_root["fire" + $fireList[i]])) {
isHurt();
}
if (_root["fire" + $fireList[i]]._x < -20.5) {
_local2.push(i);
removeMovieClip(_root["fire" + $fireList[i]]);
}
i++;
}
i = 0;
while (i < _local2.length) {
$fireList.splice(_local2[i], 1);
i++;
}
}
function moveGround() {
$i = $curveIndex;
_root.ground["curvy" + ($i - 1)]._x = _root.ground["curvy" + ($i - 1)]._x - $groundmove;
_root.ground["curvy" + $i]._x = _root.ground["curvy" + $i]._x - $groundmove;
if (_root.ground["curvy" + $i]._x < 0) {
refreshGround();
}
_root.trexNeedle1._y = $rootHeight - 10;
while (_root.ground.hitTest(_root.trexNeedle1._x, _root.trexNeedle1._y, true)) {
_root.trexNeedle1._y = _root.trexNeedle1._y - 0.5;
}
_root.trex._y = _root.trexNeedle1._y + 1;
if (!$ninjaJump) {
_root.ninjaNeedle1._y = $rootHeight - 10;
while (_root.ground.hitTest(_root.ninjaNeedle1._x, _root.ninjaNeedle1._y, true)) {
_root.ninjaNeedle1._y = _root.ninjaNeedle1._y - 1;
}
_root.ninja._y = _root.ninjaNeedle1._y + 1;
} else {
_root.ninjaNeedle1._y = _root.ninja._y;
}
moveZombies();
moveFire();
moveWash();
}
function moveZombies() {
var _local2 = new Array();
i = 0;
while (i < $spriteList.length) {
if ((_root["zombie" + $spriteList[i]].$health == 0) && (_root["zombie" + $spriteList[i]]._currentframe != 4)) {
soundZombieDie.start();
_root["zombie" + $spriteList[i]].gotoAndStop(4);
}
if (_root["zombie" + $spriteList[i]]._x < 210) {
if (_root["zombie" + $spriteList[i]].$xspeed < 0) {
if ((_root["zombie" + $spriteList[i]]._currentframe == 4) || (_root["zombie" + $spriteList[i]].$health == 1)) {
_root.trex.gotoAndStop(2);
} else {
_root.trex.gotoAndStop(3);
}
}
}
if (_root["zombie" + $spriteList[i]]._x < 170) {
_root["zombie" + $spriteList[i]].$health = _root["zombie" + $spriteList[i]].$health - 1;
if (_root["zombie" + $spriteList[i]].$health > 0) {
_root["zombie" + $spriteList[i]].$xspeed = 20;
_root["zombie" + $spriteList[i]].gotoAndStop(3);
} else {
attachMovie("bloodspray", "bloodspray" + $spriteList[i], _root.getNextHighestDepth());
_root["bloodspray" + $spriteList[i]]._x = _root["zombie" + $spriteList[i]]._x;
_root["bloodspray" + $spriteList[i]]._y = _root["zombie" + $spriteList[i]]._y;
removeMovieClip(_root["zombie" + $spriteList[i]]);
removeMovieClip(_root["zomNeedle" + $spriteList[i]]);
_local2.push(i);
$killCount++;
_root.stomach.shit._rotation = _root.stomach.shit._rotation - (totalgutrot / $maxlvl[$level - 1]);
}
}
_root["zombie" + $spriteList[i]]._x = _root["zombie" + $spriteList[i]]._x + _root["zombie" + $spriteList[i]].$xspeed;
_root["zomNeedle" + $spriteList[i]]._x = _root["zombie" + $spriteList[i]]._x;
if (_root["zombie" + $spriteList[i]].$jump == 0) {
_root["zomNeedle" + $spriteList[i]]._y = $rootHeight - 10;
while (_root.ground.hitTest(_root["zomNeedle" + $spriteList[i]]._x, _root["zomNeedle" + $spriteList[i]]._y, true)) {
_root["zomNeedle" + $spriteList[i]]._y = _root["zomNeedle" + $spriteList[i]]._y - 1;
}
_root["zombie" + $spriteList[i]]._y = _root["zomNeedle" + $spriteList[i]]._y;
if (_root["zombie" + $spriteList[i]]._currentframe == 3) {
_root["zombie" + $spriteList[i]].$xspeed = _root["zombie" + $spriteList[i]].$xspeed - 1;
if (_root["zombie" + $spriteList[i]].$xspeed <= -8) {
_root["zombie" + $spriteList[i]].gotoAndStop(1);
_root["zombie" + $spriteList[i]].$xspeed = -8;
}
}
} else {
_root["zomNeedle" + $spriteList[i]]._y = _root["zomNeedle" + $spriteList[i]]._y - _root["zombie" + $spriteList[i]].$yspeed;
_root["zombie" + $spriteList[i]]._y = _root["zomNeedle" + $spriteList[i]]._y;
if (_root.ground.hitTest(_root["zomNeedle" + $spriteList[i]]._x, _root["zomNeedle" + $spriteList[i]]._y, true)) {
_root["zombie" + $spriteList[i]].$jump = 0;
if (_root["zombie" + $spriteList[i]]._currentframe == 4) {
_root["zombie" + $spriteList[i]].$xspeed = -$groundmove;
} else {
_root["zombie" + $spriteList[i]].$xspeed = -($groundmove + 3);
}
if (_root["zombie" + $spriteList[i]]._currentframe != 4) {
_root["zombie" + $spriteList[i]].gotoAndStop(1);
}
}
_root["zombie" + $spriteList[i]].$yspeed = _root["zombie" + $spriteList[i]].$yspeed - 1;
}
i++;
}
i = 0;
while (i < _local2.length) {
$spriteList.splice(_local2[i], 1);
i++;
}
}
function playStage() {
if (_root.ninja.slash._currentframe == 7) {
if ($ninjaJump) {
_root.ninja.gotoAndStop(3);
} else {
_root.ninja.gotoAndStop(1);
}
}
if (Key.isDown(37)) {
if (($level != 4) && ($level != 8)) {
if ((_root.ninja._x - 5) >= 200) {
_root.ninjaNeedle1._x = _root.ninjaNeedle1._x - 5;
_root.ninja._x = _root.ninja._x - 5;
}
} else {
_root.ninjaNeedle1._x = _root.ninjaNeedle1._x - 5;
_root.ninja._x = _root.ninja._x - 5;
}
}
if (Key.isDown(39)) {
if (_root.ninja._x < 540) {
_root.ninjaNeedle1._x = _root.ninjaNeedle1._x + 5;
_root.ninja._x = _root.ninja._x + 5;
}
}
if (Key.isDown(83) && ($ninjaJump == false)) {
_root.ninja.gotoAndStop(3);
$ninjaJump = true;
$ninjaVSpeed = $ninjaMaxJump;
}
if (Key.isDown(65)) {
if ($attack == 0) {
if ($ninjaJump) {
if (Key.isDown(40) && ($ninjaVSpeed < 4)) {
_root.ninja.gotoAndStop(5);
$ninjaVSpeed = -10;
} else {
_root.ninja.gotoAndStop(4);
soundNinjaSlash.start();
}
} else {
_root.ninja.gotoAndStop(2);
soundNinjaSlash.start();
}
$attack = 1;
}
}
if ((!Key.isDown(65)) && ($attack == 1)) {
$attack = 0;
}
if (_root.ninja._currentframe == 5) {
if (_root.ninja.body._currentframe == 10) {
_root.ninja.gotoAndStop(1);
$attack = 1;
} else if ($ninjaJump) {
_root.ninja._y = _root.ninja._y - $ninjaVSpeed;
$ninjaVSpeed = $ninjaVSpeed - 0.5;
if (_root.ground.hitTest(_root.ninja._x, _root.ninja._y, true)) {
$ninjaJump = false;
_root.ninja.body.gotoAndPlay(7);
_root.ninja.legs.gotoAndPlay(7);
}
}
$attack = 1;
} else if ($ninjaJump) {
_root.ninja._y = _root.ninja._y - $ninjaVSpeed;
$ninjaVSpeed = $ninjaVSpeed - 0.5;
if (_root.ground.hitTest(_root.ninja._x, _root.ninja._y, true)) {
$ninjaJump = false;
_root.ninja.gotoAndStop(1);
}
}
if ($level != 4) {
if (_root.trex._currentframe > 1) {
if (_root.trex.bite._currentframe == 12) {
_root.trex.gotoAndStop(1);
}
}
}
if (levelfin) {
if (_root.ear.earblast._currentframe == 5) {
_root.ear.earblast.removeMovieClip();
}
clearInterval(fireTimer);
clearInterval(zomTimer);
clearInterval(washTimer);
_root.trex._x = _root.trex._x - 10;
_root.trexNeedle1._x = _root.trexNeedle1._x - 10;
_root.tvfront._x = _root.tvfront._x - 10;
if ($spriteList.length > 0) {
if ((_root["zombie" + $spriteList[0]].zombie._currentframe == 5) || (_root["zombie" + $spriteList[0]]._currentframe == 4)) {
while ($spriteList[0] != eval("NULL")) {
_root["zombie" + $spriteList[0]].removeMovieClip();
_root["zomNeedle1" + $spriteList[0]].removeMovieClip();
$spriteList.splice(0, 1);
}
}
}
if ($washList.length > 0) {
if (_root[$washList[0]].wash._currentframe == 10) {
while ($washList[0] != eval("NULL")) {
_root[$washList[0]].removeMovieClip();
$washList.splice(0, 1);
}
}
}
if ((((_root.trex._x < (-(_root.trex._width / 2))) || ($level == 4)) || ($level == 12)) || (_root.tvfront._x < (-1 * _root.tvfront._width))) {
if ((tempgutrot == 110) && (($level % 4) != 0)) {
soundGut.start();
tempgutrot = tempgutrot - 2;
_root.stomach.shit._rotation = _root.stomach.shit._rotation + 2;
} else if ((tempgutrot > 0) && (($level % 4) != 0)) {
tempgutrot = tempgutrot - 2;
_root.stomach.shit._rotation = _root.stomach.shit._rotation + 2;
} else if (($level == 4) && (_root.ear._currentframe != 42)) {
_root.ear.play();
} else {
_root.tvfront.removeMovieClip();
_root.tvback.removeMovieClip();
removeMovieClip(_root.ear);
removeMovieClip(_root.trex);
removeMovieClip(_root.trexNeedle1);
$level++;
$killCount = 0;
if (($level == 4) || ($level == 8)) {
_root.ninja.removeMovieClip();
_root.ground.removeMovieClip();
removeMovieClip(_root.background);
_root.stomach.removeMovieClip();
_root.scroll.removeMovieClip();
musicLevel1.stop();
musicLevel2.stop();
musicLevel3.stop();
$curveIndex = 0;
if ($level == 4) {
thecolor = "0x797928";
gotoAndPlay (212);
} else {
thecolor = "0x1C0F3A";
gotoAndPlay (215);
}
} else {
startGame();
}
}
}
}
moveGround();
if ($level != 4) {
isAttacked();
if (($killCount >= $maxlvl[$level - 1]) && (levelfin != true)) {
levelfin = true;
tempgutrot = totalgutrot;
i = 0;
while (i < $spriteList.length) {
_root["zombie" + $spriteList[i]].gotoAndStop(5);
i++;
}
i = 0;
while (i < $washList.length) {
_root[$washList[i]].gotoAndStop(4);
i++;
}
}
}
}
function refreshGround() {
removeMovieClip(_root.ground["curvy" + ($curveIndex - 1)]);
$curveIndex = $curveIndex + 1;
if (($curveIndex % 2) == 0) {
$curveDip = 120;
} else {
$curveDip = -120;
}
_root.ground.createEmptyMovieClip("curvy" + $curveIndex, $curveIndex);
with (_root.ground["curvy" + $curveIndex]) {
moveTo(0, $rootHeight);
beginFill(thecolor);
lineTo(0, $rootHeight - 100);
curveTo($curveWidth / 2, $rootHeight - (100 + $curveDip), $curveWidth, $rootHeight - 100);
lineTo($curveWidth, $rootHeight);
endFill();
}
_root.ground["curvy" + $curveIndex]._x = _root.ground["curvy" + ($curveIndex - 1)]._x + 995;
}
function drumMove() {
endx = xmindrum + random(Math.abs(xmindrum - xmaxdrum));
endy = ymindrum + random(Math.abs(ymindrum - ymaxdrum));
startx = _root.ear.drum._x;
starty = _root.ear.drum._y;
if (startx > endx) {
W = -1 * (endx - startx);
} else {
W = startx - endx;
}
if (starty > endy) {
H = -1 * (endy - starty);
} else {
H = starty - endy;
}
T = Math.pow(W, 2) + Math.pow(H, 2);
T = Math.sqrt(T);
if (T < earspeed) {
xdistance = W;
ydistance = H;
} else {
ratio = T / earspeed;
xdistance = W / ratio;
ydistance = H / ratio;
}
}
function eardrum() {
if (($attack == 1) && ((_root.ninja._currentframe > 3) || (_root.ninja._currentframe == 2))) {
if (!$earstun) {
if (_root.ninja.hitTest(_root.ear.drum)) {
clearInterval($earunstun);
clearInterval($earTimer);
$earstun = true;
xdistance = -50;
ydistance = 0;
removeMovieClip(_root.earblood);
_root.attachMovie("bloodspray", "earblood", _root.getNextHighestDepth());
_root.earblood._x = _root.ninja._x + 100;
_root.earblood._y = _root.ninja._y - 5;
if (((earhealth - 1) % 4) != 0) {
$earunstun = setInterval(earUnstun, 3000);
}
earhealth--;
}
}
}
if (_root.ear.drum._visible) {
if ($earstun) {
if (earhealth == 0) {
levelfin = true;
_root.ear.attachMovie("zombieblast", "earblast", _root.ear.getNextHighestDepth());
_root.ear.earblast.gotoAndPlay(2);
_root.ear.earblast._x = _root.ear.drum._x;
_root.ear.earblast._y = _root.ear.drum._y;
_root.ear.drum.removeMovieClip();
} else if ((0 == (earhealth % 4)) && (_root.ear.drum._visible)) {
if (_root.ear.drum._x >= -10) {
_root.ear.drum._visible = false;
_root.ear.stem._visible = false;
$earwax = setInterval(earwax, 300);
}
} else if (xdistance < -10) {
xdistance = xdistance + 5;
}
if (_root.ear.drum._x > xmaxdrum) {
xdistance = 0;
}
if (((_root.ear.drum._y <= ymindrum) && (ydistance > 0)) || ((_root.ear.drum._y >= ymaxdrum) && (ydistance < 0))) {
ydistance = 0;
}
} else {
if (((_root.ear.drum._x < xmindrum) && (xdistance > 0)) || ((_root.ear.drum._x > xmaxdrum) && (xdistance < 0))) {
xdistance = 0;
}
if (((_root.ear.drum._y < ymindrum) && (ydistance > 0)) || ((_root.ear.drum._y > ymaxdrum) && (ydistance < 0))) {
ydistance = 0;
}
}
}
_root.ear.drum._x = _root.ear.drum._x - xdistance;
_root.ear.drum._y = _root.ear.drum._y - ydistance;
_root.earNeedle._y = $rootHeight - 10;
while (_root.ground.hitTest(_root.earNeedle._x, _root.earNeedle._y, true)) {
_root.earNeedle._y = _root.earNeedle._y - 1;
}
_root.ear._y = _root.earNeedle._y - 80;
if (earcrudi > 0) {
i = 1;
while (i < (earcrudi + 1)) {
_root["earwax" + i]._y = _root["earwax" + i]._y + _root["earwax" + i].speed;
if (_root["earwax" + i]._y > $rootHeight) {
if (i == earcrudi) {
earcrudi = 0;
earUnstun();
_root.ear.drum._visible = true;
_root.ear.stem._visible = true;
_root.ear.drum._x = -10;
_root.ear.drum._y = -10;
}
removeMovieClip(_root["earwax" + i]);
} else if (_root["earwax" + i]._y < 0) {
_root["earwax" + i]._x = earwaxdrop[i - 1];
_root["earwax" + i].speed = 20;
}
i++;
}
}
eardiffx = Math.abs(_root.ear.ear.ear._x) - Math.abs(pastearx);
eardiffy = Math.abs(_root.ear.ear.ear._y) - Math.abs(pasteary);
pastearx = _root.ear.ear.ear._x;
pasteary = _root.ear.ear.ear._y;
distance();
_root.ear.drum._x = _root.ear.drum._x - eardiffx;
_root.ear.drum._y = _root.ear.drum._y - eardiffy;
if (_root.ear.stem != eval("NULL")) {
_root.ear.stem.clear();
with (_root.ear.stem) {
lineStyle(8, 12886717, 100, true, "none", "round", "miter", 1);
moveTo(_root.ear.drum._x, _root.ear.drum._y);
curveTo(_root.ear.ear.ear._x + 65, _root.ear.ear.ear._y - 30, _root.ear.ear.ear._x + 65, _root.ear.ear.ear._y - 30);
}
}
i = 0;
while (i < earcrudi) {
if (_root.ninjaNeedle1.hitTest(_root["earwax" + i])) {
isHurt();
}
i++;
}
}
function earUnstun() {
$earstun = false;
xdistance = (ydistance = 0);
_root.ear.drum._x = -10;
_root.ear.drum._y = 0;
clearInterval($earunstun);
$earTimer = setInterval(drumMove, earspeed * 100);
}
function distance() {
startx = _root.ear.drum._x;
starty = _root.ear.drum._y;
endx = _root.ear.ear.ear._x + 55;
endy = _root.ear.ear.ear._y - 30;
W = Math.abs(endx - startx);
H = Math.abs(endy - starty);
T = Math.sqrt(Math.pow(W, 2) + Math.pow(H, 2));
}
function earwax() {
if (earcrudi < earwaxdrop.length) {
earcrudi++;
_root.attachMovie("earwax", "earwax" + earcrudi, _root.getNextHighestDepth());
_root["earwax" + earcrudi]._x = _root.ear._x + (_root.ear.ear.ear._x + 62.4);
_root["earwax" + earcrudi]._y = _root.ear._y;
_root["earwax" + earcrudi].speed = -20;
} else {
clearInterval($earwax);
}
}
function startGame() {
_root.attachMovie("needle", "trexNeedle1", _root.getNextHighestDepth());
_root.attachMovie("rex", "trex", _root.getNextHighestDepth());
_root.trexNeedle1._x = -(_root.trex._width / 2);
_root.trexNeedle1._visible = false;
_root.trex._x = _root.trexNeedle1._x;
_root.attachMovie("stage", "stage", _root.getNextHighestDepth());
_root.stage._x = 275;
_root.stage._y = 200;
$stageisup = true;
levelinit = false;
levelfin = false;
}
function createEar() {
_root.scroll.gotoAndStop(($damage * 3) + 1);
musicLevel.stop();
s_musicLevel = false;
musicEar.start();
s_musicEar = true;
_root.background.gotoAndStop(_root.background._currentframe + 1);
_root.attachMovie("needle", "earNeedle", _root.getNextHighestDepth());
_root.earNeedle._x = $rootWidth - 150;
_root.earNeedle._y = ($rootHeight / 3) * 1.75;
_root.earNeedle._visible = false;
_root.attachMovie("ear", "ear", _root.getNextHighestDepth());
_root.ear._x = $rootWidth - 150;
_root.ear._y = ($rootHeight / 3) * 1.75;
_root.ear.createEmptyMovieClip("stem", _root.ear.getNextHighestDepth());
with (_root.ear.stem) {
lineStyle(5, 16711935, 100, true, "none", "round", "miter", 1);
moveTo(_root.ear.drum._x, _root.ear.drum._y);
curveTo(_root.ear.ear.ear._x + 70, _root.ear.ear.ear._y - 25, _root.ear.ear.ear._x + 70, _root.ear.ear.ear._y - 25);
}
_root.ear.drum.swapDepths(_root.ear.stem);
}
function createHunter() {
_root.scroll.gotoAndStop(($damage * 3) + 1);
musicLevel.stop();
s_musicLevel = false;
musicHunter.start();
s_musicHunter = true;
_root.attachMovie("hunter", "hunter", _root.getNextHighestDepth());
_root.hunter._x = $rootWidth - 150;
_root.hunter._y = $rootHeight / 3;
_root.attachMovie("huntershield", "huntershield", _root.getNextHighestDepth());
_root.huntershield._x = $rootWidth - 60;
_root.huntershield._y = $rootHeight / 2;
_root.huntershield._visible = false;
hActs = setInterval(hunterActs, 3000);
}
function playHunter() {
if (!levelfin) {
if (cigchange) {
_root.hunter.hunter.cig.gotoAndStop(tempcig);
cigchange = false;
}
if (_root.ninja.slash._currentframe == 7) {
_root.ninja.gotoAndStop(3);
}
if (Key.isDown(37)) {
if ((_root.ninja._width / 2) <= (_root.ninja._x - 7)) {
_root.ninja._x = _root.ninja._x - 7;
}
}
if (Key.isDown(39)) {
if (300 >= (_root.ninja._x + 7)) {
_root.ninja._x = _root.ninja._x + 7;
}
}
if (Key.isDown(38)) {
if ((_root.ninja._height / 2) <= (_root.ninja._y - 7)) {
_root.ninja._y = _root.ninja._y - 7;
}
}
if (Key.isDown(40)) {
if ($rootHeight >= (_root.ninja._y + 7)) {
_root.ninja._y = _root.ninja._y + 7;
}
}
if (Key.isDown(65) && ($attack == 0)) {
slashname = "slash" + _root.ninja.getDepth();
_root.ninja.gotoAndStop(4);
_root.attachMovie("slash", slashname, _root.getNextHighestDepth());
_root.ninja.swapDepths(_root[slashname]);
_root[slashname]._x = _root.ninja._x;
_root[slashname]._y = _root.ninja._y - (_root.ninja._height / 2);
$attack = 1;
shootfire.push(slashname);
shootU = setInterval(shootUnstun, 500);
}
i = 0;
while (i < shootfire.length) {
_root[shootfire[i]]._x = _root[shootfire[i]]._x + 5;
if (_root[shootfire[i]]._x > $rootWidth) {
_root[shootfire[i]].removeMovieClip();
} else {
if (_root[shootfire[i]].hitTest(_root.huntershield) && (cigstun == true)) {
_root[shootfire[i]].removeMovieClip();
}
if (_root[shootfire[i]].hitTest(_root.hunter.hunter.cig) && (cigstun == false)) {
_root.hunter.hunter.cig.gotoAndStop(_root.hunter.hunter.cig._currentframe + 1);
cigstun = true;
_root.huntershield._visible = true;
cigDelay = setInterval(cigUnstun, 10000);
hactstime = hactstime - 100;
r = 4;
}
}
i++;
}
if (_root.hunter._currentframe != 1) {
if (_root.hunter._currentframe == 2) {
if (_root.hunter.hunter._currentframe == 55) {
rightarmframe = _root.hunter.hunter.rightarm._currentframe;
_root.hunter.gotoAndStop(1);
_root.hunter.hunter.rightarm.gotoAndPlay(rightarmframe);
hunterActs();
}
if (_root.ninja.hitTest(_root.hunter)) {
isHurt();
}
} else if (_root.hunter._currentframe == 3) {
if (_root.hunter.hunter._currentframe == 33) {
_root.attachMovie("smokering", "smokering", _root.getNextHighestDepth());
_root.smokering._height = 100;
_root.smokering._width = 75;
_root.smokering._y = _root.hunter._y + 75;
_root.smokering._x = _root.hunter._x - 70;
smoker = true;
}
}
}
if (smoker) {
_root.smokering._x = _root.smokering._x - 10;
if (_root.smokering._x < 0) {
removeMovieClip(_root.smokering);
}
if (_root.ninja.hitTest(_root.smokering)) {
isHurt();
}
}
if (_root.ninja.hitTest(_root.huntertrex)) {
isHurt();
} else if (_root.ninja.hitTest(_root.granny)) {
isHurt();
}
if (_root.hunter.hunter.cig._currentframe == 10) {
_root.hunter.gotoAndStop(5);
}
if (_root.hunter._currentframe == 5) {
if (_root.hunter.hunter._currentframe == 55) {
_root.ninja.removeMovieClip();
_root.stomach.removeMovieClip();
_root.scroll.removeMovieClip();
_root.granny.removeMovieClip();
_root.huntertrex.removeMovieClip();
_root.smokering.removeMovieClip();
i = 0;
while (i < shootfire.length) {
_root[shootfire[i]].removeMovieClip();
i++;
}
musicHunter.stop();
_root.hunter.removeMovieClip();
_root.huntershield.removeMovieClip();
clearInterval(hActs);
gotoAndPlay (222);
}
}
}
}
function hunterActs() {
if (r == 0) {
rightarmframe = _root.hunter.hunter.rightarm._currentframe;
tempcig = _root.hunter.hunter.cig._currentframe;
_root.hunter.gotoAndStop(2);
_root.hunter.hunter.cig.gotoAndStop(tempcig);
_root.hunter.hunter.rightarm.gotoAndPlay(rightarmframe);
} else if (r == 1) {
rightarmframe = _root.hunter.hunter.rightarm._currentframe;
tempcig = _root.hunter.hunter.cig._currentframe;
_root.hunter.gotoAndStop(3);
_root.hunter.hunter.cig.gotoAndStop(tempcig);
_root.hunter.hunter.rightarm.gotoAndPlay(rightarmframe);
} else if (r == 2) {
_root.attachMovie("granny", "granny", _root.getNextHighestDepth());
_root.granny._xscale = -100;
_root.granny._x = $rootWidth + 100;
_root.granny._y = 325;
} else if (r == 3) {
tempcig = _root.hunter.hunter.cig._currentframe;
_root.hunter.gotoAndStop(4);
_root.hunter.hunter.cig.gotoAndStop(tempcig);
} else if (r == 4) {
_root.attachMovie("granny", "granny", _root.getNextHighestDepth());
_root.granny._rotation = 180;
_root.granny._x = $rootWidth + 100;
_root.granny._y = 75;
}
clearInterval(hActs);
hActs = setInterval(hunterActs, hactstime);
tempr = r;
while (tempr == r) {
tempr = random(4);
if (((tempr == 2) && (r == 4)) || ((tempr == 4) && (r == 2))) {
tempr = 3;
}
}
r = tempr;
}
function createTv() {
_root.scroll.gotoAndStop(($damage * 3) + 1);
_root.background.gotoAndStop(3);
musicLevel.stop();
s_musicLevel = false;
musicTV.start();
s_musicTV = true;
_root.attachMovie("tvfront", "tvfront", _root.getNextHighestDepth());
_root.tvfront._x = $rootWidth - 50;
_root.tvfront._y = ($rootHeight / 3) * 1.75;
_root.attachMovie("needle", "tvneedle", _root.getNextHighestDepth());
_root.tvneedle._x = _root.tvfront._x + _root.tvfront.tv._x;
_root.tvneedle._y = ($rootHeight / 3) * 1.75;
_root.tvneedle._visible = false;
_root.attachMovie("tvback", "tvback", _root.getNextHighestDepth());
_root.tvback._x = $rootWidth - 50;
_root.tvback._y = _root.tvfront._y - 150;
_root.tvback.speed = 0;
tvprojector = setInterval(tvProjector, 2000);
}
function playTv() {
_root.tvneedle._y = $rootHeight - 5;
while (_root.ground.hitTest(_root.tvneedle._x, _root.tvneedle._y, true)) {
_root.tvneedle._y = _root.tvneedle._y - 0.5;
}
_root.tvfront._y = _root.tvneedle._y + 10;
if (($attack == 1) && ((_root.ninja._currentframe > 3) || (_root.ninja._currentframe == 2))) {
if (_root.tvback.hitTest(_root.ninja)) {
tvhealth--;
_root.tvback._x = _root.tvback._x + 40;
_root.tvback.speed = 39;
if (tvhealth <= 0) {
levelfin = true;
_root.tvfront.gotoAndPlay(38);
}
}
}
i = 0;
while (i < tvList.length) {
if (tvhealth <= 0) {
_root[tvList[i]].removeMovieClip();
} else if (_root[tvList[i]]._x != eval("NULL")) {
_root[tvList[i]]._y = _root[tvList[i]]._y - _root[tvList[i]].yspeed;
_root[tvList[i]].yspeed = _root[tvList[i]].yspeed - 1;
_root[tvList[i]]._x = _root[tvList[i]]._x - _root[tvList[i]].xspeed;
while (_root.ground.hitTest(_root[tvList[i]]._x, _root[tvList[i]]._y, true)) {
_root[tvList[i]]._y = _root[tvList[i]]._y - 0.5;
_root[tvList[i]].yspeed = 15;
}
if (_root.ninjaNeedle1.hitTest(_root[tvList[i]])) {
isHurt();
}
if (_root[tvList[i]]._x < (-_root[tvList[i]]._width)) {
_root[tvList[i]].removeMovieClip();
}
}
i++;
}
if (_root.tvback._x <= _root.tvfront._x) {
_root.tvback._x = _root.tvfront._x;
_root.tvback.speed = 0;
} else {
if (_root.tvback.speed > -2) {
_root.tvback.speed = _root.tvback.speed - 1;
}
_root.tvback._x = _root.tvback._x + _root.tvback.speed;
}
_root.tvback._y = _root.tvfront._y - 100;
if (tvhealth <= 0) {
levelfin = true;
clearInterval(tvprojector);
}
}
function cigUnstun() {
cigstun = false;
_root.huntershield._visible = false;
clearInterval(cigDelay);
}
function tvProjector() {
tvp = "projectile" + _root.getNextHighestDepth();
tvList.push(tvp);
tvran = random(3);
if (tvran == 0) {
whathuh = "cleaner";
} else if (tvran == 1) {
whathuh = "football";
} else {
whathuh = "dumbell";
}
_root.attachMovie(whathuh, tvp, _root.getNextHighestDepth());
_root[tvp]._x = _root.tvfront._x + _root.tvfront.tv._x;
_root[tvp]._y = _root.tvfront._y + _root.tvfront.tv._y;
_root[tvp].xspeed = 5;
_root[tvp].yspeed = 0;
}
function createWash() {
if ($washList.length < 2) {
$washIndex++;
_root.attachMovie("washington", "wash" + $washIndex, _root.getNextHighestDepth());
_root["wash" + $washIndex]._x = $rootWidth + 30;
_root.attachMovie("needle", ("wash" + $washIndex) + "needle", _root.getNextHighestDepth());
_root[("wash" + $washIndex) + "needle"]._visible = false;
_root[("wash" + $washIndex) + "needle"]._x = _root["wash" + $washIndex]._x;
_root[("wash" + $washIndex) + "needle"]._y = $rootHeight - 5;
while (_root.ground.hitTest(_root[("wash" + $washIndex) + "needle"]._x, _root[("wash" + $washIndex) + "needle"]._y, true)) {
_root[("wash" + $washIndex) + "needle"]._y = _root[("wash" + $washIndex) + "needle"]._y - 0.5;
}
_root["wash" + $washIndex]._y = _root[("wash" + $washIndex) + "needle"]._y - 100;
_root["wash" + $washIndex].pos = 250 + (random(50) * 5);
_root["wash" + $washIndex].stopt = false;
_root["wash" + $washIndex].shoot = false;
$washList.push("wash" + $washIndex);
}
}
function moveWash() {
var _local2 = new Array();
i = 0;
while (i < $washList.length) {
_root[$washList[i] + "needle"]._y = $rootHeight - 5;
_root[$washList[i] + "needle"]._x = _root[$washList[i]]._x;
while (_root.ground.hitTest(_root[$washList[i] + "needle"]._x, _root[$washList[i] + "needle"]._y, true)) {
_root[$washList[i] + "needle"]._y = _root[$washList[i] + "needle"]._y - 0.5;
}
if (_root[$washList[i]]._currentframe == 3) {
if (_root[$washList[i]]._x < 170) {
attachMovie("bloodspray", $washList[i] + "bloodspray", _root.getNextHighestDepth());
_root[$washList[i] + "bloodspray"]._x = _root[$washList[i]]._x;
_root[$washList[i] + "bloodspray"]._y = _root[$washList[i]]._y;
removeMovieClip(_root[$washList[i]]);
removeMovieClip(_root[$washList[i] + "needle"]);
_local2.push(i);
$killCount++;
_root.stomach.shit._rotation = _root.stomach.shit._rotation - (totalgutrot / $maxlvl[$level - 1]);
} else if (_root[$washList[i]]._x < 210) {
_root.trex.gotoAndStop(2);
}
if (_root.ground.hitTest(_root[$washList[i]]._x, _root[$washList[i]]._y + 50, true)) {
while (_root.ground.hitTest(_root[$washList[i]]._x, _root[$washList[i]]._y + 50, true)) {
_root[$washList[i]]._y = _root[$washList[i]]._y - 0.5;
}
_root[$washList[i]]._y = _root[$washList[i]]._y + 0.5;
_root[$washList[i]]._x = _root[$washList[i]]._x - 5;
} else {
_root[$washList[i]]._y = _root[$washList[i]]._y + 15;
}
} else {
_root[$washList[i]]._y = _root[$washList[i] + "needle"]._y - 150;
if (_root[$washList[i]].shoot) {
if (_root[$washList[i]].wash._currentframe == 1) {
_root[$washList[i]].gotoAndStop(2);
_root[$washList[i]].shoot = false;
}
}
if ((_root[$washList[i]].pos < _root[$washList[i]]._x) && (_root[$washList[i]].stopt == false)) {
_root[$washList[i]]._x = _root[$washList[i]]._x - 5;
} else if ((_root[$washList[i]].pos > _root[$washList[i]]._x) && (_root[$washList[i]].stopt == false)) {
_root[$washList[i]]._x = _root[$washList[i]]._x + 5;
} else if (!_root[$washList[i]].stopt) {
_root[$washList[i]].timer = setInterval(shootWash, 3000, [$washList[i]]);
_root[$washList[i]].stopt = true;
}
if (_root[$washList[i]]._currentframe == 2) {
if (_root[$washList[i]].wash._currentframe == 11) {
createArrow(_root[$washList[i]]._x, _root[$washList[i]]._y);
} else if (_root[$washList[i]].wash._currentframe == 12) {
_root[$washList[i]].gotoAndStop(1);
clearInterval(_root[$washList[i]].timer);
_root[$washList[i]].pos = 250 + (random(50) * 5);
_root[$washList[i]].stopt = false;
}
}
if (($attack == 1) && ((_root.ninja._currentframe > 3) || (_root.ninja._currentframe == 2))) {
if (_root[$washList[i]].wash._currentframe <= 2) {
if (_root[$washList[i]].hitTest(_root.ninja)) {
_root[$washList[i]].gotoAndStop(3);
}
}
}
}
i++;
}
i = 0;
while (i < _local2.length) {
$washList.splice(_local2[i], 1);
i++;
}
i = 0;
while (i < $arrowList.length) {
arrowspeed = 10;
temper = 0;
deleted = false;
while (arrowspeed >= temper) {
if (_root.ninjaNeedle1.hitTest(_root[$arrowList[i]])) {
deleted = true;
isHurt();
temper = 10;
}
_root[$arrowList[i]]._x = _root[$arrowList[i]]._x - 1;
_root[$arrowList[i]]._y = _root[$arrowList[i]]._y + 1;
temper++;
}
temper = 0;
if (_root[$arrowList[i]]._y > ($rootHeight + (_root[$arrowList[i]]._height / 2))) {
deleted = true;
}
if (deleted == true) {
_root[$arrowList[i]].removeMovieClip();
$arrowList.splice(i, 1);
}
i++;
}
}
function shootWash(tempW) {
_root[tempW].shoot = true;
}
function createArrow(ax, ay) {
$arrowIndex++;
_root.attachMovie("washArrow", "arrow" + $arrowIndex, _root.getNextHighestDepth());
_root["arrow" + $arrowIndex]._x = ax - 12;
_root["arrow" + $arrowIndex]._y = ay;
$arrowList.push("arrow" + $arrowIndex);
}
function shootUnstun() {
clearInterval(shootU);
$attack = 0;
}
function gotoMenu() {
clearInterval(gameoverTimer);
_root.gameover.removeMovieClip();
gotoAndPlay (145);
}
function continu() {
if ($level < 5) {
$level = 1;
musicLevel1.start();
} else if ($level < 9) {
$level = 5;
musicLevel1.start();
} else {
$level = 9;
musicLevel1.start();
}
_root.$spriteIndex = 0;
_root.levelinit = false;
_root.$killCount = 0;
_root.$damage = 0;
_root.$health = 5;
_root.earhealth = 16;
_root.tvhealth = 8;
buildGround();
startGame();
_root.gameover.removeMovieClip();
}
function dontcontinu() {
gotoAndPlay (145);
}
var $level = 1;
var $zomlvl = new Array(3000, 2500, 2250, 0, 4000, 2750, 2250, 0, 3000, 2750, 2000, 0);
var $firelvl = new Array(10000, 10000, 8000, 0, 12000, 10000, 6000, 0);
var $washlvl = new Array(12000, 6000, 3000, 0);
var $maxlvl = new Array(4, 8, 10, 1, 10, 14, 18, 1, 14, 20, 24, 1);
var $killCount = 0;
var gameoverTimer;
var $rootWidth = 550;
var $rootHeight = 400;
var $spriteList = new Array();
var $earunstun;
var $spriteIndex = 0;
var $fireList = new Array();
var $fireIndex = 0;
var $washList = new Array();
var $washIndex = 0;
var $arrowList = new Array();
var $arrowIndex = 0;
var $attack = 0;
var $curveIndex = 1;
var $curveWidth = 1000;
var $ninjaJump = false;
var $ninjaVSpeed = 0;
var $ninjaMaxJump = 9;
var $groundmove = 5;
var $damage = 0;
var $health = 5;
var $notstunned = true;
var $red = 0;
var levelinit = false;
var levelfin = false;
var totalgutrot = 110;
var tempgutrot = totalgutrot;
var cigstun = false;
var tempcig;
var cigchange = false;
var cigDelay;
var shootDelay;
var fireTimer;
var zomTimer;
r = 1;
var smoker = false;
var tvList = new Array();
var thecolor = "0x18490C";
var shootU;
var hactstime = 2000;
_root.createEmptyMovieClip("ground", 0);
_root.attachMovie("ninjaneedle", "ninjaNeedle1", _root.getNextHighestDepth());
_root.ninjaNeedle1._x = 200;
_root.ninjaNeedle1._visible = false;
_root.attachMovie("ninja", "ninja", _root.getNextHighestDepth());
_root.ninja._x = 200;
_root.attachMovie("stomach", "stomach", _root.getNextHighestDepth());
_root.stomach._x = 50;
_root.stomach._y = 50;
_root.stomach._width = _root.stomach._width / 2;
_root.stomach._height = _root.stomach._height / 2;
_root.attachMovie("scroll", "scroll", _root.getNextHighestDepth());
_root.scroll._x = 135;
_root.scroll._y = 50;
_root.scroll._width = 75.5;
_root.scroll._height = 76.3;
var $earstun = false;
var $newpoint = false;
var $earpoint = Array();
var endx = _root.ear.drum._x;
var endy = _root.ear.drum._y;
var pastearx = _root.ear.ear.ear._x;
var pasteary = _root.ear.ear.ear._y;
var earspeed = 5;
var xdistance = 0;
var ydistance = 0;
var $earTimer = setInterval(drumMove, earspeed * 100);
var xmindrum = -140;
var xmaxdrum = -30;
var ymindrum = -80;
var ymaxdrum = 20;
var earhealth = 16;
var earcrud = Array();
var earcrudi = 0;
var earwaxdrop = Array(10, 70, 130, 190, 250, 220, 280, 160, 100, 40, 10, 250, 40, 220, 70, 220, 100, 190, 130, 160);
var tvhealth = 8;
var shootfire = Array();
var musicEar = new Sound();
musicEar.attachSound("music_ear");
musicEar.onSoundComplete = function () {
musicEar.start();
};
s_musicEar = false;
var musicHunter = new Sound();
musicHunter.attachSound("music_hunter");
musicHunter.onSoundComplete = function () {
musicHunter.start();
};
s_musicHunter = false;
var musicLevel1 = new Sound();
musicLevel1.attachSound("music_level1");
musicLevel1.onSoundComplete = function () {
musicLevel1.start();
};
s_musicLevel1 = true;
var musicLevel2 = new Sound();
musicLevel2.attachSound("music_level2");
musicLevel2.onSoundComplete = function () {
musicLevel2.start();
};
s_musicLevel2 = false;
var musicLevel3 = new Sound();
musicLevel3.attachSound("music_level3");
musicLevel3.onSoundComplete = function () {
musicLevel3.start();
};
s_musicLevel = false;
var musicTV = new Sound();
musicTV.attachSound("music_tv");
musicTV.onSoundComplete = function () {
musicTV.start();
};
s_musicTV = false;
musicLevel1.start();
musicLevel1.setVolume(100);
var soundGut = new Sound();
soundGut.attachSound("gut_flush");
var soundNinjaHurt = new Sound();
soundNinjaHurt.attachSound("ninja_hurt");
var soundNinjaSlash = new Sound();
soundNinjaSlash.attachSound("ninja_slash");
var soundZombieDie = new Sound();
soundZombieDie.attachSound("zombie_die");
buildGround();
if (($level % 4) != 0) {
startGame();
}
Frame 205
if (!levelinit) {
if ($level == 4) {
createEar();
levelinit = true;
} else if ($level == 8) {
createTv();
levelinit = true;
} else if ($level == 12) {
createHunter();
_root.ninja._x = 200;
_root.ninja._y = 200;
_root.ninja.gotoAndStop(3);
_root.ground._visible = false;
levelinit = true;
} else {
if (((!s_musicLevel1) && (!s_musicLevel2)) && (!s_musicLevel3)) {
if (s_musicEar) {
musicEar.stop();
s_musicEar = false;
} else if (s_musicTV) {
musicTV.stop();
s_musicTV = false;
} else if (s_musicHunter) {
musicHunter.stop();
s_musicHunter = false;
}
if ($level < 4) {
if (!s_musicLevel1) {
s_musicLevel1 = true;
s_musicLevel2 = false;
s_musicLevel3 = false;
}
} else if (($level < 8) && ($level != 4)) {
if (!s_musicLevel2) {
s_musicLevel2 = true;
s_musicLevel1 = false;
s_musicLevel3 = false;
}
} else if ((($level < 12) && ($level != 4)) && ($level != 8)) {
if (!s_musicLevel3) {
s_musicLevel3 = true;
s_musicLevel2 = false;
s_musicLevel1 = false;
}
}
if (s_musicLevel1) {
musicLevel1.play();
musicLevel2.stop();
musicLevel2.stop();
} else if (s_musicLevel2) {
musicLevel1.stop();
musicLevel2.play();
musicLevel3.stop();
} else if (s_musicLevel3) {
musicLevel1.stop();
musicLevel2.stop();
musicLevel3.play();
}
}
_root.trexNeedle1._x = _root.trexNeedle1._x + 5;
_root.trex._x = _root.trex._x + 5;
if (_root.trexNeedle1._x >= 100) {
levelinit = true;
zomTimer = setInterval(createZombie, $zomlvl[$level - 1]);
if ($level > 4) {
fireTimer = setInterval(createFire, $firelvl[$level - 5]);
}
if ($level > 8) {
washTimer = setInterval(createWash, $washlvl[$level - 9]);
}
}
}
}
if (($level == 4) && (!levelfin)) {
eardrum();
} else if ($level == 8) {
playTv();
}
if ($level == 12) {
playHunter();
} else {
playStage();
}
isStunned();
if ($stageisup) {
if (_root.stage._currentframe == 29) {
removeMovieClip(_root.stage);
$stageisup = false;
}
}
isGameOver();
Frame 206
gotoAndPlay (205);
Frame 207
function storyPause() {
spause = setInterval(gotoNextFrame, 7000);
musicCutscene.start();
stop();
}
musicCutscene.setVolume(100);
musicCutscene.onSoundComplete = function () {
musicCutscene.start();
};
var spause;
storyPause();
Instance of Symbol 592 MovieClip in Frame 207
onClipEvent (keyDown) {
tellTarget (_root) {
clearInterval(spause);
musicCutscene.stop();
gotoAndPlay ("level1");
};
}
Frame 211
clearInterval(spause);
musicCutscene.stop();
gotoAndPlay (204);
Frame 212
storyPause();
stop();
Instance of Symbol 592 MovieClip in Frame 212
/* no clip actions */
Frame 214
clearInterval(spause);
musicCutscene.stop();
_root.createEmptyMovieClip("ground", 0);
_root.attachMovie("ninjaneedle", "ninjaNeedle1", _root.getNextHighestDepth());
_root.ninjaNeedle1._x = 200;
_root.ninjaNeedle1._visible = false;
_root.attachMovie("ninja", "ninja", _root.getNextHighestDepth());
_root.ninja._x = 200;
_root.attachMovie("stomach", "stomach", _root.getNextHighestDepth());
_root.stomach._x = 50;
_root.stomach._y = 50;
_root.stomach._width = _root.stomach._width / 2;
_root.stomach._height = _root.stomach._height / 2;
_root.attachMovie("scroll", "scroll", _root.getNextHighestDepth());
_root.scroll._x = 135;
_root.scroll._y = 50;
_root.scroll._width = 75.5;
_root.scroll._height = 76.3;
buildGround();
startGame();
gotoAndPlay (205);
Frame 215
storyPause();
stop();
Frame 218
clearInterval(spause);
musicCutscene.stop();
_root.createEmptyMovieClip("ground", 0);
_root.attachMovie("ninjaneedle", "ninjaNeedle1", _root.getNextHighestDepth());
_root.ninjaNeedle1._x = 200;
_root.ninjaNeedle1._visible = false;
_root.attachMovie("ninja", "ninja", _root.getNextHighestDepth());
_root.ninja._x = 200;
_root.attachMovie("stomach", "stomach", _root.getNextHighestDepth());
_root.stomach._x = 50;
_root.stomach._y = 50;
_root.stomach._width = _root.stomach._width / 2;
_root.stomach._height = _root.stomach._height / 2;
_root.attachMovie("scroll", "scroll", _root.getNextHighestDepth());
_root.scroll._x = 135;
_root.scroll._y = 50;
_root.scroll._width = 75.5;
_root.scroll._height = 76.3;
buildGround();
startGame();
gotoAndPlay (205);
Frame 219
storyPause();
stop();
Frame 221
clearInterval(spause);
musicCutscene.stop();
_root.createEmptyMovieClip("ground", 0);
_root.attachMovie("ninjaneedle", "ninjaNeedle1", _root.getNextHighestDepth());
_root.ninjaNeedle1._x = 200;
_root.ninjaNeedle1._visible = false;
_root.attachMovie("ninja", "ninja", _root.getNextHighestDepth());
_root.ninja._x = 200;
_root.attachMovie("stomach", "stomach", _root.getNextHighestDepth());
_root.stomach._x = 50;
_root.stomach._y = 50;
_root.stomach._width = _root.stomach._width / 2;
_root.stomach._height = _root.stomach._height / 2;
_root.attachMovie("scroll", "scroll", _root.getNextHighestDepth());
_root.scroll._x = 135;
_root.scroll._y = 50;
_root.scroll._width = 75.5;
_root.scroll._height = 76.3;
buildGround();
startGame();
gotoAndPlay (205);
Frame 1006
gotoAndPlay (145);
Symbol 31 MovieClip Frame 10
stop();
Symbol 32 MovieClip Frame 24
gotoAndPlay (16);
Symbol 35 MovieClip Frame 22
stop();
Symbol 41 MovieClip [zombieblast] Frame 5
stop();
Symbol 42 MovieClip [zombie] Frame 1
stop();
Symbol 73 MovieClip Frame 1
stop();
Symbol 106 MovieClip Frame 45
_root.tempcig = this.cig._currentframe;
_root.cigchange = true;
_root.hunter.gotoAndStop(1);
Symbol 123 MovieClip Frame 36
_root.tempcig = this.cig._currentframe;
_root.cigchange = true;
_root.hunter.gotoAndStop(1);
Symbol 126 MovieClip Frame 40
_root.attachMovie("huntertrex", "huntertrex", _root.getNextHighestDepth());
_root.huntertrex._x = 80;
_root.huntertrex._y = 200;
Symbol 126 MovieClip Frame 47
_root.tempcig = this.cig._currentframe;
_root.cigchange = true;
_root.hunter.gotoAndStop(1);
Symbol 184 MovieClip Frame 55
stop();
Symbol 185 MovieClip [hunter] Frame 1
stop();
Symbol 217 MovieClip [rex] Frame 1
stop();
Symbol 226 MovieClip [bloodspray] Frame 6
stop();
Symbol 243 MovieClip [scroll] Frame 1
stop();
Symbol 243 MovieClip [scroll] Frame 4
stop();
Symbol 243 MovieClip [scroll] Frame 7
stop();
Symbol 243 MovieClip [scroll] Frame 10
stop();
Symbol 243 MovieClip [scroll] Frame 13
stop();
Symbol 243 MovieClip [scroll] Frame 16
stop();
Symbol 248 MovieClip [stage] Frame 29
stop();
Symbol 250 Button
on (release) {
getURL ("http://www.digitallydope.com", "_blank");
}
Symbol 251 Button
on (release) {
getURL ("http://www.armorgames.com", "_blank");
}
Symbol 263 Button
on (press) {
_root.dontcontinu();
}
Symbol 265 Button
on (press) {
_root.continu();
}
Symbol 298 MovieClip [ear] Frame 1
stop();
Symbol 303 MovieClip [tvback] Frame 1
stop();
Symbol 308 MovieClip Frame 1
stop();
Symbol 347 MovieClip [tvfront] Frame 37
gotoAndPlay (1);
Symbol 347 MovieClip [tvfront] Frame 45
stop();
Symbol 354 MovieClip [huntertrex] Frame 20
_root.huntertrex.removeMovieClip();
Symbol 397 MovieClip [granny] Frame 56
_root.granny.removeMovieClip();
Symbol 454 MovieClip Frame 12
stop();
Symbol 458 MovieClip [washington] Frame 1
stop();
Symbol 485 MovieClip Frame 6
stop();
Symbol 486 MovieClip Frame 6
stop();
Symbol 487 MovieClip [ninja] Frame 1
stop();
Symbol 487 MovieClip [ninja] Frame 2
stop();
Symbol 487 MovieClip [ninja] Frame 3
stop();
Symbol 487 MovieClip [ninja] Frame 4
stop();
Symbol 487 MovieClip [ninja] Frame 5
stop();
Symbol 502 Button
on (release) {
_root.play();
}
Symbol 503 MovieClip Frame 155
_root.play();
stop();
Symbol 540 MovieClip Frame 143
_root.play();
stop();
Symbol 555 MovieClip Frame 18
stop();
Symbol 569 Button
on (press) {
gotoAndPlay (204);
}
Symbol 578 Button
on (press) {
_root.goto = 21;
play();
}
Symbol 579 Button
on (press) {
_root.goto = 34;
play();
}
Symbol 580 Button
on (press) {
_root.goto = 21;
gotoAndPlay (204);
}
Symbol 582 Button
on (press) {
_quality = "LOW";
}
Symbol 584 Button
on (press) {
_quality = "HIGH";
}
Symbol 586 Button
on (press) {
_quality = "MEDIUM";
}
Symbol 588 Button
on (press) {
play();
}
Symbol 618 MovieClip Frame 1
stop();
Symbol 618 MovieClip Frame 2
stop();