Combined Code
movieClip 19 specialBG {
frame 7 {
stop();
this.onEnterFrame = function () {
if (_root.player.specialOn == false) {
this.play();
}
};
}
frame 14 {
this.removeMovieClip();
}
}
movieClip 21 flashGun {
frame 2 {
this.removeMovieClip();
}
}
movieClip 23 letterbox {
frame 1 {
this._alpha = 0;
stop();
this.onEnterFrame = function () {
if (_root.letter == true) {
if (this._alpha < 100) {
this._alpha += 10;
}
}
if (_root.paus == false) {
_root.letter = false;
if (this._alpha > 0) {
this._alpha -= 10;
}
}
};
}
}
movieClip 24 flashBlackout {
frame 1 {
this.onEnterFrame = function () {
if (_root.paus == false) {
play();
} else {
stop();
}
};
}
frame 1 {
s = new Sound(this);
s.attachSound('spark');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 15 {
s = new Sound(this);
s.attachSound('spark');
s.setVolume(_root.vol);
s.start(0, 0);
this.removeMovieClip();
}
}
movieClip 25 tranL1 {
frame 1 {
stop();
this._alpha = 0;
remove = false;
timer = 20;
sec = 1;
xspeed = 0;
yspeed = 0;
this.onEnterFrame = function () {
if (this._x + this._width / 2 < -50) {
this.removeMovieClip();
}
this._x += xspeed;
this._y += yspeed;
if (remove == false && this._alpha < 100) {
if (_root.music.getVolume() > 0) {
_root.music.setVolume(_root.music.getVolume() - 25);
} else {
_root.music.stop();
}
this._alpha += 20;
}
if (remove == true && this._alpha >= 0) {
this._alpha -= 10;
}
if (remove == true && this._alpha <= 0) {
this.removeMovieClip();
}
if (this._alpha >= 100) {
--timer;
if (timer <= 0) {
if (sec == 1) {
++sec;
timer = 90;
this.attachMovie('level1Hello', 'text', 2);
} else {
if (sec == 2) {
remove = true;
_root.nextFrame();
++sec;
}
}
}
}
};
}
}
movieClip 26 tranSec1 {
frame 1 {
stop();
this._alpha = 0;
remove = false;
timer = 20;
sec = 1;
xspeed = 0;
yspeed = 0;
_root.paus = true;
_root.letter = true;
this.onEnterFrame = function () {
if (remove == false && this._alpha < 100) {
if (_root.music.getVolume() > 0) {
_root.music.setVolume(_root.music.getVolume() - 25);
} else {
_root.music.stop();
}
this._alpha += 20;
}
if (remove == true && this._alpha > 0) {
this._alpha -= 10;
}
if (remove == true && this._alpha <= 0) {
this.removeMovieClip();
}
if (this._alpha >= 100) {
--timer;
if (timer <= 0) {
if (sec == 1) {
++sec;
timer = 10;
_root.bg.saveX();
_root.bg.gotoAndStop(11);
_root.bg.secretS();
_root.cleanSec();
_root.phase.sec = 8;
_root.music.stop();
_root.music.attachSound('mSecret');
_root.music.setVolume(_root.vol);
_root.music.start(0, 199);
} else {
if (sec == 2) {
_root.player.freeze = true;
remove = true;
++sec;
}
}
}
}
};
}
}
movieClip 27 tranSec2 {
frame 1 {
stop();
this._alpha = 0;
remove = false;
timer = 20;
sec = 1;
xspeed = 0;
yspeed = 0;
_root.paus = true;
_root.letter = true;
this.onEnterFrame = function () {
if (remove == false && this._alpha < 100) {
if (_root.music.getVolume() > 0) {
_root.music.setVolume(_root.music.getVolume() - 25);
} else {
_root.music.stop();
}
this._alpha += 20;
}
if (remove == true && this._alpha > 0) {
this._alpha -= 10;
}
if (remove == true && this._alpha <= 0) {
_root.paus = false;
this.removeMovieClip();
}
if (this._alpha >= 100) {
--timer;
if (timer <= 0) {
if (sec == 1) {
++sec;
timer = 10;
_root.player.afterSec();
_root.bg.gotoAndStop(2);
_root.bg.afterSec();
_root.phase.sec = 8;
_root.music.stop();
_root.music.attachSound('mLevel1');
_root.music.setVolume(_root.vol);
_root.music.start(0, 199);
} else {
if (sec == 2) {
remove = true;
++sec;
}
}
}
}
};
}
}
movieClip 28 tranSec3 {
frame 1 {
stop();
this._alpha = 0;
remove = false;
timer = 20;
sec = 1;
xspeed = 0;
yspeed = 0;
_root.paus = true;
_root.letter = true;
this.onEnterFrame = function () {
if (remove == false && this._alpha < 100) {
if (_root.music.getVolume() > 0) {
_root.music.setVolume(_root.music.getVolume() - 25);
} else {
_root.music.stop();
}
this._alpha += 20;
}
if (remove == true && this._alpha > 0) {
this._alpha -= 10;
}
if (remove == true && this._alpha <= 0) {
this.removeMovieClip();
}
if (this._alpha >= 100) {
--timer;
if (timer <= 0) {
if (sec == 1) {
++sec;
timer = 10;
_root.bg.saveX();
_root.phase.sec = 27;
_root.phase.n = 0;
_root.bg.gotoAndStop(12);
_root.bg.secretS();
_root.cleanSec();
_root.music.stop();
_root.music.attachSound('mSecret');
_root.music.setVolume(_root.vol);
_root.music.start(0, 199);
} else {
if (sec == 2) {
_root.player.freeze = true;
remove = true;
++sec;
}
}
}
}
};
}
}
movieClip 29 tranSec4 {
frame 1 {
stop();
this._alpha = 0;
remove = false;
timer = 20;
sec = 1;
xspeed = 0;
yspeed = 0;
_root.paus = true;
_root.letter = true;
this.onEnterFrame = function () {
if (remove == false && this._alpha < 100) {
if (_root.music.getVolume() > 0) {
_root.music.setVolume(_root.music.getVolume() - 25);
} else {
_root.music.stop();
}
this._alpha += 20;
}
if (remove == true && this._alpha > 0) {
this._alpha -= 10;
}
if (remove == true && this._alpha <= 0) {
_root.paus = false;
this.removeMovieClip();
}
if (this._alpha >= 100) {
--timer;
if (timer <= 0) {
if (sec == 1) {
++sec;
timer = 10;
_root.phase.sec = 27;
_root.player.afterSec();
_root.bg.gotoAndStop(2);
_root.bg.afterSec();
_root.cleanSec();
_root.music.stop();
_root.music.attachSound('mLevel1');
_root.music.setVolume(_root.vol);
_root.music.start(0, 199);
} else {
if (sec == 2) {
remove = true;
++sec;
}
}
}
}
};
}
}
movieClip 30 tranB1 {
frame 1 {
stop();
this._alpha = 0;
remove = false;
timer = 20;
sec = 1;
xspeed = 0;
yspeed = 0;
_root.paus = true;
_root.letter = true;
this.onEnterFrame = function () {
if (remove == false && this._alpha < 100) {
if (_root.music.getVolume() > 0) {
_root.music.setVolume(_root.music.getVolume() - 11);
} else {
_root.music.stop();
}
this._alpha += 8;
}
if (remove == true && this._alpha > 0) {
this._alpha -= 10;
}
if (remove == true && this._alpha <= 0) {
this.removeMovieClip();
}
if (this._alpha >= 100) {
--timer;
if (timer <= 0) {
if (sec == 1) {
++sec;
timer = 5;
_root.player.freeze = true;
_root.cleanSec();
++_root.phase.p;
_root.phase.sec = 0;
_root.music.stop();
_root.music.attachSound('mCreepy');
_root.music.setVolume(_root.vol);
_root.music.start(0, 0);
} else {
if (sec == 2) {
_root.bg.gotoAndStop(3);
_root.bg.bossS();
remove = true;
++sec;
}
}
}
}
};
}
}
movieClip 33 flashPower {
frame 6 {
this.removeMovieClip();
}
}
movieClip 34 tranBon1 {
frame 1 {
stop();
this._alpha = 0;
remove = false;
timer = 20;
sec = 1;
xspeed = 0;
yspeed = 0;
_root.paus = true;
_root.letter = true;
this.onEnterFrame = function () {
if (remove == false && this._alpha < 100) {
if (_root.music.getVolume() > 0) {
_root.music.setVolume(_root.music.getVolume() - 25);
} else {
_root.music.stop();
}
this._alpha += 20;
}
if (remove == true && this._alpha > 0) {
this._alpha -= 10;
}
if (remove == true && this._alpha <= 0) {
_root.paus = false;
this.removeMovieClip();
}
if (this._alpha >= 100) {
--timer;
if (timer <= 0) {
if (sec == 1) {
++sec;
timer = 10;
_root.player.afterSec();
_root.bg.gotoAndStop(17);
_root.bg.afterSec();
_root.bg.resetX();
} else {
if (sec == 2) {
remove = true;
++sec;
}
}
}
}
};
}
}
movieClip 35 tranRetry {
frame 1 {
stop();
this._alpha = 0;
remove = false;
timer = 20;
sec = 1;
xspeed = 0;
yspeed = 0;
_root.paus = true;
_root.letter = true;
this.onEnterFrame = function () {
if (remove == false && this._alpha < 100) {
if (_root.music.getVolume() > 0) {
_root.music.setVolume(_root.music.getVolume() - 25);
} else {
_root.music.stop();
}
if (_root.musicB.getVolume() > 0) {
_root.musicB.setVolume(_root.music.getVolume() - 25);
} else {
_root.musicB.stop();
}
this._alpha += 20;
}
if (remove == true && this._alpha > 0) {
this._alpha -= 10;
}
if (remove == true && this._alpha <= 0) {
this.removeMovieClip();
}
if (this._alpha >= 100) {
--timer;
if (timer <= 0) {
if (sec == 1) {
++sec;
timer = 10;
_root.retry();
_root.music.stop();
_root.music.setVolume(_root.vol);
_root.music.start(0, 199);
} else {
if (sec == 2) {
_root.player.freeze = true;
remove = true;
++sec;
}
}
}
}
};
}
}
movieClip 36 tranMenu {
frame 1 {
stop();
this._alpha = 0;
remove = false;
timer = 20;
sec = 1;
xspeed = 0;
yspeed = 0;
_root.paus = true;
_root.letter = true;
this.onEnterFrame = function () {
if (remove == false && this._alpha < 100) {
if (_root.music.getVolume() > 0) {
_root.music.setVolume(_root.music.getVolume() - 25);
} else {
_root.music.stop();
}
if (_root.musicB.getVolume() > 0) {
_root.musicB.setVolume(_root.music.getVolume() - 25);
} else {
_root.musicB.stop();
}
this._alpha += 20;
}
if (remove == true && this._alpha > 0) {
this._alpha -= 10;
}
if (remove == true && this._alpha <= 0) {
this.removeMovieClip();
}
if (this._alpha >= 100) {
--timer;
if (timer <= 0) {
if (sec == 1) {
++sec;
timer = 10;
_root.gameReset();
} else {
if (sec == 2) {
_root.gotoAndStop(3);
remove = true;
++sec;
}
}
}
}
};
}
}
movieClip 37 tranL2 {
frame 1 {
stop();
this._alpha = 0;
remove = false;
timer = 20;
sec = 1;
xspeed = 0;
yspeed = 0;
this.onEnterFrame = function () {
if (this._x + this._width / 2 < -50) {
this.removeMovieClip();
}
this._x += xspeed;
this._y += yspeed;
if (remove == false && this._alpha < 100) {
if (_root.music.getVolume() > 0) {
_root.music.setVolume(_root.music.getVolume() - 25);
} else {
_root.music.stop();
}
this._alpha += 20;
}
if (remove == true && this._alpha >= 0) {
this._alpha -= 10;
}
if (remove == true && this._alpha <= 0) {
this.removeMovieClip();
}
if (this._alpha >= 100) {
--timer;
if (timer <= 0) {
if (sec == 1) {
_root.music.stop();
_root.music.attachSound('win');
_root.music.setVolume(_root.vol);
_root.music.start(0, 0);
this.attachMovie('lvl1Complete', 'yay', 3);
this.yay._alpha = 0;
++sec;
} else {
if (sec == 2) {
if (yay._alpha < 100) {
yay._alpha += 5;
} else {
++sec;
timer = 220;
}
} else {
if (sec == 3) {
if (yay._alpha > 0) {
yay._alpha -= 5;
} else {
++sec;
yay.removeMovieClip();
}
} else {
if (sec == 4) {
_root.music.stop();
_root.music.attachSound('mLevel2');
_root.music.setVolume(_root.vol);
_root.music.start(0, 199);
++sec;
timer = 150;
this.attachMovie('level2Hello', 'text', 2);
_root.player.freeze = true;
} else {
if (sec == 5) {
_root.phase.p = 2;
_root.phase.sec = 0;
_root.bg.gotoAndStop(4);
_root.bg.boss = false;
_root.bg.resetX();
_root.cleanSec();
remove = true;
++sec;
}
}
}
}
}
}
}
};
}
}
movieClip 38 tranSec5 {
frame 1 {
stop();
this._alpha = 0;
remove = false;
timer = 20;
sec = 1;
xspeed = 0;
yspeed = 0;
_root.paus = true;
_root.letter = true;
this.onEnterFrame = function () {
if (remove == false && this._alpha < 100) {
if (_root.music.getVolume() > 0) {
_root.music.setVolume(_root.music.getVolume() - 25);
} else {
_root.music.stop();
}
this._alpha += 20;
}
if (remove == true && this._alpha > 0) {
this._alpha -= 10;
}
if (remove == true && this._alpha <= 0) {
this.removeMovieClip();
}
if (this._alpha >= 100) {
--timer;
if (timer <= 0) {
if (sec == 1) {
++sec;
timer = 10;
_root.bg.saveX();
_root.phase.sec = 1;
_root.bg.gotoAndStop(13);
_root.bg.secretS();
_root.cleanSec();
_root.music.stop();
_root.music.attachSound('mSecret');
_root.music.setVolume(_root.vol);
_root.music.start(0, 199);
} else {
if (sec == 2) {
_root.player.freeze = true;
remove = true;
++sec;
}
}
}
}
};
}
}
movieClip 39 tranSec6 {
frame 1 {
stop();
this._alpha = 0;
remove = false;
timer = 20;
sec = 1;
xspeed = 0;
yspeed = 0;
_root.paus = true;
_root.letter = true;
this.onEnterFrame = function () {
if (remove == false && this._alpha < 100) {
if (_root.music.getVolume() > 0) {
_root.music.setVolume(_root.music.getVolume() - 25);
} else {
_root.music.stop();
}
this._alpha += 20;
}
if (remove == true && this._alpha > 0) {
this._alpha -= 10;
}
if (remove == true && this._alpha <= 0) {
_root.paus = false;
this.removeMovieClip();
}
if (this._alpha >= 100) {
--timer;
if (timer <= 0) {
if (sec == 1) {
++sec;
timer = 10;
_root.player.afterSec();
_root.bg.gotoAndStop(4);
_root.bg.afterSec();
_root.phase.sec = 1;
_root.music.stop();
_root.music.attachSound('mLevel2');
_root.music.setVolume(_root.vol);
_root.music.start(0, 199);
} else {
if (sec == 2) {
remove = true;
++sec;
}
}
}
}
};
}
}
movieClip 40 tranSec7 {
frame 1 {
stop();
this._alpha = 0;
remove = false;
timer = 20;
sec = 1;
xspeed = 0;
yspeed = 0;
_root.paus = true;
_root.letter = true;
this.onEnterFrame = function () {
if (remove == false && this._alpha < 100) {
if (_root.music.getVolume() > 0) {
_root.music.setVolume(_root.music.getVolume() - 25);
} else {
_root.music.stop();
}
this._alpha += 20;
}
if (remove == true && this._alpha > 0) {
this._alpha -= 10;
}
if (remove == true && this._alpha <= 0) {
this.removeMovieClip();
}
if (this._alpha >= 100) {
--timer;
if (timer <= 0) {
if (sec == 1) {
++sec;
timer = 10;
_root.bg.saveX();
_root.bg.gotoAndStop(14);
_root.bg.secretS();
_root.phase.sec = 30;
_root.cleanSec();
_root.music.stop();
_root.music.attachSound('mSecret');
_root.music.setVolume(_root.vol);
_root.music.start(0, 199);
} else {
if (sec == 2) {
_root.player.freeze = true;
remove = true;
++sec;
}
}
}
}
};
}
}
movieClip 41 tranSec8 {
frame 1 {
stop();
this._alpha = 0;
remove = false;
timer = 20;
sec = 1;
xspeed = 0;
yspeed = 0;
_root.paus = true;
_root.letter = true;
this.onEnterFrame = function () {
if (remove == false && this._alpha < 100) {
if (_root.music.getVolume() > 0) {
_root.music.setVolume(_root.music.getVolume() - 25);
} else {
_root.music.stop();
}
this._alpha += 20;
}
if (remove == true && this._alpha > 0) {
this._alpha -= 10;
}
if (remove == true && this._alpha <= 0) {
_root.paus = false;
this.removeMovieClip();
}
if (this._alpha >= 100) {
--timer;
if (timer <= 0) {
if (sec == 1) {
++sec;
timer = 10;
_root.player.afterSec();
_root.bg.gotoAndStop(4);
_root.bg.afterSec();
_root.phase.sec = 30;
_root.music.stop();
_root.music.attachSound('mLevel2');
_root.music.setVolume(_root.vol);
_root.music.start(0, 199);
} else {
if (sec == 2) {
remove = true;
++sec;
}
}
}
}
};
}
}
movieClip 42 tranB2 {
frame 1 {
stop();
this._alpha = 0;
remove = false;
timer = 20;
sec = 1;
xspeed = 0;
yspeed = 0;
_root.paus = true;
_root.letter = true;
this.onEnterFrame = function () {
if (remove == false && this._alpha < 100) {
if (_root.music.getVolume() > 0) {
_root.music.setVolume(_root.music.getVolume() - 11);
} else {
_root.music.stop();
}
this._alpha += 8;
}
if (remove == true && this._alpha > 0) {
this._alpha -= 10;
}
if (remove == true && this._alpha <= 0) {
this.removeMovieClip();
}
if (this._alpha >= 100) {
--timer;
if (timer <= 0) {
if (sec == 1) {
++sec;
timer = 5;
_root.player.freeze = true;
_root.cleanSec();
++_root.phase.p;
_root.phase.sec = 0;
_root.music.stop();
_root.music.attachSound('mRoar');
_root.music.setVolume(_root.vol);
_root.music.start(0, 0);
} else {
if (sec == 2) {
_root.bg.gotoAndStop(5);
_root.bg.bossS();
remove = true;
++sec;
}
}
}
}
};
}
}
movieClip 43 tranSec9 {
frame 1 {
stop();
this._alpha = 0;
remove = false;
timer = 20;
sec = 1;
xspeed = 0;
yspeed = 0;
_root.paus = true;
_root.letter = true;
this.onEnterFrame = function () {
if (remove == false && this._alpha < 100) {
if (_root.music.getVolume() > 0) {
_root.music.setVolume(_root.music.getVolume() - 25);
} else {
_root.music.stop();
}
this._alpha += 20;
}
if (remove == true && this._alpha > 0) {
this._alpha -= 10;
}
if (remove == true && this._alpha <= 0) {
this.removeMovieClip();
}
if (this._alpha >= 100) {
--timer;
if (timer <= 0) {
if (sec == 1) {
++sec;
timer = 10;
_root.bg.saveX();
_root.bg.gotoAndStop(15);
_root.bg.secretS();
_root.cleanSec();
_root.phase.sec = 19;
_root.phase.n = 0;
_root.music.stop();
_root.music.attachSound('mSecret');
_root.music.setVolume(_root.vol);
_root.music.start(0, 199);
} else {
if (sec == 2) {
_root.player.freeze = true;
remove = true;
++sec;
}
}
}
}
};
}
}
movieClip 44 tranSec11 {
frame 1 {
stop();
this._alpha = 0;
remove = false;
timer = 20;
sec = 1;
xspeed = 0;
yspeed = 0;
_root.paus = true;
_root.letter = true;
this.onEnterFrame = function () {
if (remove == false && this._alpha < 100) {
if (_root.music.getVolume() > 0) {
_root.music.setVolume(_root.music.getVolume() - 25);
} else {
_root.music.stop();
}
this._alpha += 20;
}
if (remove == true && this._alpha > 0) {
this._alpha -= 10;
}
if (remove == true && this._alpha <= 0) {
this.removeMovieClip();
}
if (this._alpha >= 100) {
--timer;
if (timer <= 0) {
if (sec == 1) {
++sec;
timer = 10;
_root.bg.saveX();
_root.bg.gotoAndStop(16);
_root.bg.secretS();
_root.phase.sec = 28;
_root.cleanSec();
_root.music.stop();
_root.music.attachSound('mSecret');
_root.music.setVolume(_root.vol);
_root.music.start(0, 199);
} else {
if (sec == 2) {
_root.player.freeze = true;
remove = true;
++sec;
}
}
}
}
};
}
}
movieClip 45 tranBon2 {
frame 1 {
stop();
this._alpha = 0;
remove = false;
timer = 20;
sec = 1;
xspeed = 0;
yspeed = 0;
_root.paus = true;
_root.letter = true;
this.onEnterFrame = function () {
if (remove == false && this._alpha < 100) {
if (_root.music.getVolume() > 0) {
_root.music.setVolume(_root.music.getVolume() - 25);
} else {
_root.music.stop();
}
this._alpha += 20;
}
if (remove == true && this._alpha > 0) {
this._alpha -= 10;
}
if (remove == true && this._alpha <= 0) {
_root.paus = false;
this.removeMovieClip();
}
if (this._alpha >= 100) {
--timer;
if (timer <= 0) {
if (sec == 1) {
++sec;
timer = 10;
_root.player.afterSec();
_root.bg.gotoAndStop(18);
_root.bg.afterSec();
_root.bg.resetX();
} else {
if (sec == 2) {
remove = true;
++sec;
}
}
}
}
};
}
}
movieClip 46 tranSec10 {
frame 1 {
stop();
this._alpha = 0;
remove = false;
timer = 20;
sec = 1;
xspeed = 0;
yspeed = 0;
_root.paus = true;
_root.letter = true;
this.onEnterFrame = function () {
if (remove == false && this._alpha < 100) {
if (_root.music.getVolume() > 0) {
_root.music.setVolume(_root.music.getVolume() - 25);
} else {
_root.music.stop();
}
this._alpha += 20;
}
if (remove == true && this._alpha > 0) {
this._alpha -= 10;
}
if (remove == true && this._alpha <= 0) {
_root.paus = false;
this.removeMovieClip();
}
if (this._alpha >= 100) {
--timer;
if (timer <= 0) {
if (sec == 1) {
++sec;
timer = 10;
_root.cleanSec();
_root.bg.gotoAndStop(6);
_root.bg.afterSec();
_root.player.afterSec();
_root.phase.n = 0;
_root.phase.sec = 19;
_root.music.stop();
_root.music.attachSound('mLevel3');
_root.music.setVolume(_root.vol);
_root.music.start(0, 199);
} else {
if (sec == 2) {
remove = true;
++sec;
}
}
}
}
};
}
}
movieClip 47 tranSec12 {
frame 1 {
stop();
this._alpha = 0;
remove = false;
timer = 20;
sec = 1;
xspeed = 0;
yspeed = 0;
_root.paus = true;
_root.letter = true;
this.onEnterFrame = function () {
if (remove == false && this._alpha < 100) {
if (_root.music.getVolume() > 0) {
_root.music.setVolume(_root.music.getVolume() - 25);
} else {
_root.music.stop();
}
this._alpha += 20;
}
if (remove == true && this._alpha > 0) {
this._alpha -= 10;
}
if (remove == true && this._alpha <= 0) {
_root.paus = false;
this.removeMovieClip();
}
if (this._alpha >= 100) {
--timer;
if (timer <= 0) {
if (sec == 1) {
++sec;
timer = 10;
_root.player.afterSec();
_root.bg.gotoAndStop(6);
_root.bg.afterSec();
_root.phase.sec = 28;
_root.music.stop();
_root.music.attachSound('mLevel3');
_root.music.setVolume(_root.vol);
_root.music.start(0, 199);
} else {
if (sec == 2) {
remove = true;
++sec;
}
}
}
}
};
}
}
movieClip 48 tranL3 {
frame 1 {
stop();
this._alpha = 0;
remove = false;
timer = 20;
sec = 1;
xspeed = 0;
yspeed = 0;
this.onEnterFrame = function () {
if (this._x + this._width / 2 < -50) {
this.removeMovieClip();
}
this._x += xspeed;
this._y += yspeed;
if (remove == false && this._alpha < 100) {
if (_root.music.getVolume() > 0) {
_root.music.setVolume(_root.music.getVolume() - 25);
} else {
_root.music.stop();
}
this._alpha += 20;
}
if (remove == true && this._alpha >= 0) {
this._alpha -= 10;
}
if (remove == true && this._alpha <= 0) {
this.removeMovieClip();
}
if (this._alpha >= 100) {
--timer;
if (timer <= 0) {
if (sec == 1) {
_root.boss.removeMovieClip();
_root.music.stop();
_root.music.attachSound('win');
_root.music.setVolume(_root.vol);
_root.music.start(0, 0);
this.attachMovie('lvl2Complete', 'yay', 3);
this.yay._alpha = 0;
++sec;
} else {
if (sec == 2) {
if (yay._alpha < 100) {
yay._alpha += 5;
} else {
++sec;
timer = 220;
}
} else {
if (sec == 3) {
if (yay._alpha > 0) {
yay._alpha -= 5;
} else {
++sec;
yay.removeMovieClip();
}
} else {
if (sec == 4) {
_root.music.stop();
_root.music.attachSound('mLevel3');
_root.music.setVolume(_root.vol);
_root.music.start(0, 199);
++sec;
timer = 150;
this.attachMovie('level3Hello', 'text', 2);
_root.player.freeze = true;
} else {
if (sec == 5) {
_root.phase.p = 4;
_root.phase.sec = 0;
_root.bg.gotoAndStop(6);
_root.bg.boss = false;
_root.bg.resetX();
_root.cleanSec();
remove = true;
++sec;
}
}
}
}
}
}
}
};
}
}
movieClip 49 tranBefore {
frame 1 {
stop();
this._alpha = 0;
remove = false;
timer = 20;
sec = 1;
xspeed = 0;
yspeed = 0;
_root.paus = true;
_root.letter = true;
this.onEnterFrame = function () {
if (remove == false && this._alpha < 100) {
if (_root.music.getVolume() > 0) {
_root.music.setVolume(_root.music.getVolume() - 11);
} else {
_root.music.stop();
}
this._alpha += 8;
}
if (remove == true && this._alpha > 0) {
this._alpha -= 10;
}
if (remove == true && this._alpha <= 0) {
this.removeMovieClip();
}
if (this._alpha >= 100) {
--timer;
if (timer <= 0) {
if (sec == 1) {
++sec;
timer = 3;
_root.player.freeze = true;
_root.cleanSec();
_root.music.stop();
_root.music.attachSound('mCreepy');
_root.music.setVolume(_root.vol);
_root.music.start(0, 199);
} else {
if (sec == 2) {
_root.bg.gotoAndStop(8);
_root.bg.resetX();
remove = true;
++sec;
}
}
}
}
};
}
}
movieClip 50 tranB3 {
frame 1 {
stop();
this._alpha = 0;
remove = false;
timer = 20;
sec = 1;
xspeed = 0;
yspeed = 0;
_root.paus = true;
_root.letter = true;
this.onEnterFrame = function () {
if (remove == false && this._alpha < 100) {
if (_root.music.getVolume() > 0) {
_root.music.setVolume(_root.music.getVolume() - 11);
} else {
_root.music.stop();
}
this._alpha += 8;
}
if (remove == true && this._alpha > 0) {
this._alpha -= 10;
}
if (remove == true && this._alpha <= 0) {
_root.paus = false;
this.removeMovieClip();
}
if (this._alpha >= 100) {
--timer;
if (timer <= 0) {
if (sec == 1) {
++sec;
timer = 5;
_root.floor = 345;
_root.player.floor = 345;
_root.player.afterSec();
_root.cleanSec();
_root.music.stop();
_root.music.attachSound('mRoar');
_root.music.setVolume(_root.vol);
_root.music.start(0, 0);
} else {
if (sec == 2) {
_root.bg.gotoAndStop(7);
_root.bg.bossS();
remove = true;
++sec;
}
}
}
}
};
}
}
movieClip 51 tranCredit {
frame 1 {
stop();
this._alpha = 0;
remove = false;
timer = 20;
sec = -1;
xspeed = 0;
yspeed = 0;
_root.paus = true;
_root.letter = true;
_root.checkM('Yes We Can!');
this.onEnterFrame = function () {
if (remove == false && this._alpha < 100) {
if (_root.music.getVolume() > 0) {
_root.music.setVolume(_root.music.getVolume() - 25);
} else {
_root.music.stop();
}
if (_root.musicB.getVolume() > 0) {
_root.musicB.setVolume(_root.music.getVolume() - 25);
} else {
_root.musicB.stop();
}
this._alpha += 5;
}
if (remove == true && this._alpha > 0) {
this._alpha -= 10;
}
if (remove == true && this._alpha <= 0) {
this.removeMovieClip();
}
if (this._alpha >= 100) {
--timer;
if (timer <= 0) {
if (sec == -1) {
_root.boss.removeMovieClip();
_root.music.attachSound('linksMusic');
_root.music.setVolume(_root.vol);
_root.music.start(0, 199);
this.attachMovie('creditScreen', 'yay', 3);
this.yay._alpha = 0;
++sec;
} else {
if (sec == 0) {
} else {
if (sec == 1) {
++sec;
timer = 10;
_root.gameReset();
} else {
if (sec == 2) {
if (_root.music.getVolume() > 0) {
_root.music.setVolume(_root.music.getVolume() - 7);
} else {
++sec;
_root.music.stop();
}
} else {
if (sec == 3) {
_root.gotoAndStop(3);
remove = true;
++sec;
}
}
}
}
}
}
}
};
}
}
movieClip 53 menuLight {
}
movieClip 59 {
}
movieClip 61 {
}
movieClip 63 {
}
movieClip 69 {
frame 1 {
this.onEnterFrame = function () {
if (_root.paus == false) {
play();
} else {
stop();
}
};
}
}
movieClip 70 {
frame 1 {
stop();
}
}
movieClip 87 {
}
movieClip 102 {
}
movieClip 129 {
}
movieClip 153 {
}
movieClip 155 {
}
movieClip 157 {
}
movieClip 159 {
}
movieClip 161 {
}
movieClip 163 {
}
movieClip 164 {
}
movieClip 167 {
}
movieClip 169 {
}
movieClip 171 {
}
movieClip 173 {
}
button 174 {
on (rollOver) {
_parent.sel = 1;
m = new Sound(this);
m.attachSound('menuMove');
m.setVolume(_root.vol);
m.start(0, 0);
}
on (press) {
_parent.clicked = true;
}
}
movieClip 175 {
}
movieClip 177 {
}
movieClip 179 {
}
movieClip 181 {
}
movieClip 183 {
}
button 184 {
on (rollOver) {
_parent.sel = 2;
m = new Sound(this);
m.attachSound('menuMove');
m.setVolume(_root.vol);
m.start(0, 0);
}
on (press) {
_parent.clicked = true;
}
}
movieClip 185 {
}
movieClip 188 {
}
movieClip 190 {
}
movieClip 211 {
}
movieClip 230 {
}
movieClip 243 {
}
movieClip 252 {
}
movieClip 261 {
}
movieClip 291 {
}
movieClip 315 {
frame 1 {
this.onEnterFrame == function () {
if (_root.paus == false) {
play();
} else {
stop();
}
};
}
}
movieClip 326 {
}
movieClip 328 {
}
movieClip 330 {
}
movieClip 331 {
}
movieClip 333 {
}
movieClip 335 {
}
movieClip 337 {
}
movieClip 340 {
}
movieClip 342 {
}
movieClip 344 {
}
movieClip 346 {
}
movieClip 348 {
}
movieClip 350 {
}
movieClip 352 {
}
movieClip 354 {
}
movieClip 378 {
}
movieClip 379 comboList {
frame 1 {
this._alpha = 1;
sel = 1;
obj;
leftU = false;
rightU = false;
aU = false;
remove = false;
_root.checkM('DownForwardPunch');
}
frame 2 {
stop();
clicked = false;
this.onEnterFrame = function () {
if (this._alpha <= 0) {
_parent.clic = false;
_parent.selectd = false;
this.removeMovieClip();
}
if (this._alpha < 100 && remove == false) {
this._alpha += 20;
}
if (this._alpha > 0 && remove == true) {
this._alpha -= 20;
}
if (remove == false) {
if (Key.isDown(39) == false) {
rightU = true;
}
if (Key.isDown(37) == false) {
leftU = true;
}
if (Key.isDown(65) == false) {
aU = true;
}
if ((Key.isDown(65) && aU == true || clicked == true) && remove == false) {
aU = false;
clicked = false;
m = new Sound(this);
m.attachSound('menuSelect');
m.setVolume(_root.vol);
m.start(0, 0);
if (sel == 1) {
if (this._currentframe < 4) {
this.nextFrame();
}
} else {
if (this._currentframe == 2) {
remove = true;
} else {
this.prevFrame();
}
}
}
if (Key.isDown(39) && rightU == true && remove == false) {
m = new Sound(this);
m.attachSound('menuMove');
m.setVolume(100);
m.start(0, 0);
rightU = false;
sel = 1;
}
if (Key.isDown(37) && leftU == true && remove == false) {
m = new Sound(this);
m.attachSound('menuMove');
m.setVolume(100);
m.start(0, 0);
leftU = false;
sel = 2;
}
if (this._currentframe == 4) {
sel = 2;
}
if (sel == 1) {
obj = o;
}
if (sel == 2) {
obj = o2;
}
lights._y = obj._y;
lights._x = obj._x;
lights._height = obj._height;
lights._width = obj._width + 2;
if (obj == o) {
o._xscale = 110;
o._yscale = 110;
} else {
o._xscale = 100;
o._yscale = 100;
}
if (obj == o2) {
o2._xscale = 110;
o2._yscale = 110;
} else {
o2._xscale = 100;
o2._yscale = 100;
}
}
};
}
}
movieClip 392 explosion {
frame 13 {
this.removeMovieClip();
}
}
movieClip 394 sounds {
}
frame 1 {
function checkM(med) {
var v6 = com.Newgrounds.NewgroundsAPI.getMedals();
var v2 = 0;
while (v2 < v6.length) {
var v4 = v6[v2];
var v3 = v4.medal_name;
var v5 = v4.medal_unlocked;
if (med == v3 && v5 == false) {
_root.medal_popup.unlockMedal(v3);
ac = new Sound(_root.achieve);
ac.attachSound('ach');
ac.setVolume(100);
ac.start(0, 0);
}
++v2;
}
}
Stage.showMenu = false;
}
frame 1 {
stop();
}
frame 1 {
NewgroundsAPI.connectMovie(6748);
_root.API_Settings = {'movie_id': 6748, 'enc_key': 'r94x13TPWWLXJs2msFifIKIED0mgoxfc', 'debug_mode': false, 'movie_version': ''};
}
button 401 {
on (release) {
getURL('http://www.newgrounds.com/collection/picoday2006', '_blank');
}
}
button 404 {
on (release) {
getURL('http://www.newgrounds.com/collection/picoday2007', '_blank');
}
}
button 407 {
on (release) {
getURL('http://www.newgrounds.com/collection/picoday2008', '_blank');
}
}
button 410 {
on (release) {
getURL('http://www.newgrounds.com/collection/picoday2009', '_blank');
}
}
movieClip 411 {
}
movieClip 415 {
}
movieClip 416 {
}
button 417 {
on (release) {
_root.play();
}
}
movieClip 419 {
instance of movieClip 416 {
onClipEvent (load) {
_root.stop();
PercentLoaded = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (PercentLoaded != 100) {
_parent.gotoAndStop(PercentLoaded);
} else {
_parent.gotoAndStop('loaded');
}
}
onClipEvent (enterFrame) {
PercentLoaded = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (PercentLoaded != 100) {
_parent.gotoAndStop(PercentLoaded);
} else {
_parent.gotoAndStop('loaded');
}
}
}
frame 100 {
stop();
}
}
movieClip 422 {
}
// unknown tag 88 length 143
// unknown tag 88 length 79
movieClip 427 {
}
movieClip 428 {
frame 1 {
com.Newgrounds.NewgroundsAPI.attachFlashAd(_parent[_name]);
var attachAd = function () {
com.Newgrounds.NewgroundsAPI.attachFlashAd(_parent[_name]);
};
com.Newgrounds.NewgroundsAPI.addEventListener(com.Newgrounds.NewgroundsAPI.events.ADS_APPROVED, attachAd);
background._visible = false;
}
}
// unknown tag 88 length 84
// unknown tag 88 length 79
movieClip 434 {
}
// unknown tag 88 length 84
movieClip 439 {
}
movieClip 440 {
frame 1 {
function unlockMedal(m_name) {
clearInterval(pop_delay);
var v1 = com.Newgrounds.NewgroundsAPI.getMedals();
var v2 = null;
for (i in v1) {
if (v1[i].medal_name == m_name) {
v2 = v1[i];
medal_name = v2.medal_name;
medal_value = v2.medal_value + 'pts';
com.Newgrounds.NewgroundsAPI.unlockMedal(medal_name);
pop_delay = setInterval(endDelay, 3000);
_visible = true;
gotoAndPlay(2);
break;
}
}
}
function endDelay(params) {
gotoAndPlay(10);
clearInterval(pop_delay);
}
var pop_delay;
var medal_name = '?????';
var medal_value = '???';
this.swapDepths(15000);
_visible = false;
}
frame 10 {
var myBitmapData = flash.display.BitmapData.loadBitmap(medal_name + '.jpg');
medal_icon.attachBitmap(myBitmapData, 111);
stop();
}
}
button 443 {
on (release) {
this._visible = false;
}
}
movieClip 450 {
frame 1 {
_visible = false;
var checkConnection = function (event) {
if (!event.success) {
_visible = true;
gotoAndStop(3);
}
};
if (com.Newgrounds.NewgroundsAPI.isNewgrounds() || _root.API_Settings.debug_mode) {
com.Newgrounds.NewgroundsAPI.addEventListener(com.Newgrounds.NewgroundsAPI.events.MOVIE_CONNECTED, checkConnection);
if (!com.Newgrounds.NewgroundsAPI.hasUserSession() && !_root.API_Settings.debug_mode) {
_visible = true;
gotoAndStop(2);
}
}
com.Newgrounds.NewgroundsAPI.setMovieVersion(_root.API_Settings.movie_version);
com.Newgrounds.NewgroundsAPI.connectMovie(_root.API_Settings.movie_id, _root.API_Settings.enc_key, _root.API_Settings.debug_mode);
com.Newgrounds.NewgroundsAPI.loadMedals();
stop();
}
}
movieClip 3033 __Packages.com.Newgrounds.BaseN {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.Newgrounds) {
_global.com.Newgrounds = new Object();
}
if (!_global.com.Newgrounds.BaseN) {
var v1 = function (hash) {
this.ceiling = 100000000000000.0;
if (hash) {
this.hashIndex = hash;
} else {
this.hashIndex = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`~@#$%^&*()+|;/';
}
this.bitSize = this.hashIndex.length;
this.hashVal = new Object();
this.i = 0;
while (this.i < this.bitSize) {
this.hashVal[this.hashIndex.charAt(this.i)] = this.i;
++this.i;
}
};
com.Newgrounds.BaseN = v1;
var v2 = v1.prototype;
v2.verify = function (s) {
if (this.hashVal[s] != undefined) {
return true;
} else {
return false;
}
};
v2.encode = function (n, minchars) {
this.debug.lastencode = '';
if (typeof this.i != 'string') {
n = n.toString();
}
if (n.charAt(0) == '-') {
var v3 = '-';
n = n.substring(1);
} else {
var v3 = '';
}
if ((String(n)).indexOf('.') > -1) {
var v4 = (String(n)).split('.', 2);
return v3 + this.baseNEncoder(v4[0], minchars) + '.' + this.baseNEncoder(v4[1]);
} else {
this.debug.lastencode += '\tNo decimal\r';
return v3 + this.baseNEncoder(n, minchars);
}
};
v2.decode = function (s) {
var v4 = 1;
if (s.charAt(0) == '-') {
v4 = -1;
s = s.substring(1, s.length);
}
var v3 = s.indexOf('.');
if (v3 > -1) {
var v5 = Math.pow(10, this.baseNDecoder(s.substring(v3 + 1, s.length)));
return (this.baseNDecoder(s.substring(0, v3)) / v5) * v4;
} else {
return this.baseNDecoder(s) * v4;
}
};
v2.baseNEncoder = function (n, minchars) {
if (!minchars) {
minchars = 1;
}
var v4 = '';
while (n != 0) {
n = Math.round(n);
var v3 = n % this.bitSize;
if (Math.round(v3) != v3) {
}
v4 = this.hashIndex.charAt(v3) + v4;
this.debug.lastencode += '\t-> n:' + n + ' % bitSize:' + this.bitSize + ' = ' + v3 + ', final char=' + v4 + '\n';
n -= v3;
n /= this.bitSize;
}
if (minchars) {
while (v4.length < minchars) {
v4 = this.hashIndex.charAt(0) + v4;
}
}
return v4;
};
v2.baseNDecoder = function (s) {
var v2 = 0;
var v6 = 0;
this.i = 0;
while (this.i < s.length) {
var v3 = s.charAt(s.length - this.i - 1);
if (v3 == this.hashIndex.charAt(0)) {
var v5 = 0;
} else {
var v5 = this.hashVal[v3] * Math.pow(this.bitSize, this.i);
}
v2 += v5;
if (v2 >= this.ceiling) {
v6 += (v2 - v2 % this.ceiling) / this.ceiling;
v2 %= this.ceiling;
}
++this.i;
}
if (v6 > 0) {
v2 = '' + v2;
while (v2.length < (this.ceiling.toString()).length - 1) {
v2 = '0' + v2;
}
v2 = '' + v6 + v2;
}
return v2;
};
v2.debug = new Object();
ASSetPropFlags(com.Newgrounds.BaseN.prototype, null, 1);
}
#endinitclip
}
movieClip 3034 __Packages.com.Newgrounds.NewgroundsAPIError {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.Newgrounds) {
_global.com.Newgrounds = new Object();
}
if (!_global.com.Newgrounds.NewgroundsAPIError) {
var v1 = function (error, msg) {
if ((Number(error)).toString() == String(error)) {
error = Number(error);
} else {
if (com.Newgrounds.NewgroundsAPIError.error_codes[String(error)]) {
error = com.Newgrounds.NewgroundsAPIError.error_codes[String(error)];
} else {
error = 0;
}
}
this.code = error;
this.message = msg;
this.name = com.Newgrounds.NewgroundsAPIError.error_names[error];
this.alias = com.Newgrounds.NewgroundsAPIError.aliases[error];
};
com.Newgrounds.NewgroundsAPIError = v1;
var v2 = v1.prototype;
v1.init_codes = function () {
var v2 = new Object();
var v1 = 0;
while (v1 < com.Newgrounds.NewgroundsAPIError.aliases.length) {
v2[com.Newgrounds.NewgroundsAPIError.aliases[v1]] = v1;
++v1;
}
return v2;
};
v1.init_names = function () {
var v5 = new Array();
var v3 = 0;
while (v3 < com.Newgrounds.NewgroundsAPIError.aliases.length) {
var v2 = (com.Newgrounds.NewgroundsAPIError.aliases[v3].toLowerCase()).split('_');
var v1 = 0;
while (v1 < v2.length) {
v2[v1] = (v2[v1].substr(0, 1)).toUpperCase() + v2[v1].substr(1, v2[v1].length);
for (var v4 in com.Newgrounds.NewgroundsAPIError.always_caps) {
if (v2[v1].toUpperCase() == com.Newgrounds.NewgroundsAPIError.always_caps[v4]) {
v2[v1] = v2[v1].toUpperCase();
}
}
++v1;
}
v5[v3] = v2.join(' ');
++v3;
}
return v5;
};
v2.isError = function () {
return true;
};
v1.aliases = new Array('UNKNOWN_ERROR', 'INVALID_API_ID', 'MISSING_PARAM', 'INVALID_STAT_ID', 'INVALID_COMMAND_ID', 'FLASH_ADS_NOT_APPROVED', 'PERMISSION_DENIED', 'IDENTIFICATION_REQUIRED', 'INVALID_EMAIL_ADDRESS', 'BANNED_USER', 'SESSION_EXPIRED', 'INVALID_SCORE', 'INVALID_MEDAL', 'INVALID_FOLDER', 'FILE_NOT_FOUND', 'SITE_ID_REQUIRED', 'UPLOAD_IN_PROGRESS', 'USER_CANCELLED', 'CONFIRM_REQUEST', 'CONNECTION_FAILED');
v1.always_caps = new Array('API', 'URL', 'ID');
v1.error_codes = com.Newgrounds.NewgroundsAPIError.init_codes();
v1.error_names = com.Newgrounds.NewgroundsAPIError.init_names();
v2.code = 0;
ASSetPropFlags(com.Newgrounds.NewgroundsAPIError.prototype, null, 1);
}
#endinitclip
}
movieClip 3035 __Packages.com.Newgrounds.NewgroundsAPI {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.Newgrounds) {
_global.com.Newgrounds = new Object();
}
if (!_global.com.Newgrounds.NewgroundsAPI) {
var v1 = function () {};
com.Newgrounds.NewgroundsAPI = v1;
var v2 = v1.prototype;
v1.setMovieVersion = function (v) {
if (v) {
com.Newgrounds.NewgroundsAPI.version = String(v);
}
};
v1.setUserEmail = function (e) {
com.Newgrounds.NewgroundsAPI.user_email = e;
};
v1.getOfficialVersionURL = function () {
var v1 = com.Newgrounds.NewgroundsAPI.GATEWAY_URL + '?tracker_id=' + com.Newgrounds.NewgroundsAPI.movie_id + '&command_id=' + com.Newgrounds.NewgroundsAPI.getCommandID('loadOfficalVersion') + '&seed=' + Math.random();
if (com.Newgrounds.NewgroundsAPI.debug) {
v1 += '&debug=1';
}
return v1;
};
v1.hasUserSession = function () {
if (com.Newgrounds.NewgroundsAPI.session_id && com.Newgrounds.NewgroundsAPI.publisher_id) {
return true;
return false;
}
if (_root.NewgroundsAPI_PublisherID && _root.NewgroundsAPI_SessionID) {
return true;
}
return false;
};
v1.isNewgrounds = function () {
return com.Newgrounds.NewgroundsAPI.publisher_id == 1 || _root.NewgroundsAPI_PublisherID == 1 || ((com.Newgrounds.NewgroundsAPI.getHost()).toLowerCase()).indexOf('ungrounded.net') > -1;
};
v1.hasPublisher = function () {
return com.Newgrounds.NewgroundsAPI.publisher_id || _root.NewgroundsAPI_PublisherID;
};
v1.hasUserEmail = function () {
if (com.Newgrounds.NewgroundsAPI.user_email) {
return true;
}
return false;
};
v1.connectionTimeOut = function () {
clearInterval(com.Newgrounds.NewgroundsAPI.timeout);
com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.MOVIE_CONNECTED, false, new com.Newgrounds.NewgroundsAPIError('CONNECTION_FAILED', 'Connection to NewgroundsAPI gateway timed out.'));
};
v1.connectMovie = function (m_id, encrypt_key, debug_mode) {
if (com.Newgrounds.NewgroundsAPI.connected) {
return undefined;
}
var v2 = function () {
com.Newgrounds.NewgroundsAPI.connectionTimeOut();
};
com.Newgrounds.NewgroundsAPI.timeout = setInterval(v2, 8000, null);
if (!m_id) {
com.Newgrounds.NewgroundsAPI.fatalError('NewgroundsAPI.connectMovie() - missing required movie_id parameter', 'connectMovie');
}
com.Newgrounds.NewgroundsAPI.movie_id = String(m_id);
com.Newgrounds.NewgroundsAPI.tracker_id = Number(com.Newgrounds.NewgroundsAPI.movie_id.substring(0, com.Newgrounds.NewgroundsAPI.movie_id.indexOf(':')));
com.Newgrounds.NewgroundsAPI.encryption_key = encrypt_key;
com.Newgrounds.NewgroundsAPI.debug = debug_mode;
if (_root.NewgroundsAPI_PublisherID) {
com.Newgrounds.NewgroundsAPI.publisher_id = _root.NewgroundsAPI_PublisherID;
if (_root.NewgroundsAPI_SessionID) {
com.Newgrounds.NewgroundsAPI.session_id = _root.NewgroundsAPI_SessionID;
}
} else {
com.Newgrounds.NewgroundsAPI.publisher_id = 1;
com.Newgrounds.NewgroundsAPI.session_id = null;
com.Newgrounds.NewgroundsAPI.user_id = 0;
com.Newgrounds.NewgroundsAPI.user_name = 'Guest';
}
if (_root.NewgroundsAPI_UserName) {
com.Newgrounds.NewgroundsAPI.user_name = _root.NewgroundsAPI_UserName;
}
if (_root.NewgroundsAPI_UserID) {
com.Newgrounds.NewgroundsAPI.user_id = _root.NewgroundsAPI_UserID;
}
com.Newgrounds.NewgroundsAPI.connected = true;
com.Newgrounds.NewgroundsAPI.sendCommand('connectMovie', {'host': com.Newgrounds.NewgroundsAPI.getHost(), 'movie_version': com.Newgrounds.NewgroundsAPI.version});
};
v1.getHost = function () {
if (!com.Newgrounds.NewgroundsAPI.host) {
var v1 = _url;
if (v1.indexOf('http://') > -1 or v1.indexOf('https://') > -1) {
com.Newgrounds.NewgroundsAPI.host = (v1.split('/'))[2].toLowerCase();
return com.Newgrounds.NewgroundsAPI.host;
}
com.Newgrounds.NewgroundsAPI.host = 'localhost';
}
return com.Newgrounds.NewgroundsAPI.host;
};
v1.loadNewgrounds = function () {
com.Newgrounds.NewgroundsAPI.sendCommand('loadNewgrounds', {'host': com.Newgrounds.NewgroundsAPI.getHost()}, true);
};
v1.loadMySite = function () {
com.Newgrounds.NewgroundsAPI.sendCommand('loadMySite', {'host': com.Newgrounds.NewgroundsAPI.getHost()});
};
v1.loadCustomLink = function (link) {
com.Newgrounds.NewgroundsAPI.sendCommand('loadCustomLink', {'host': com.Newgrounds.NewgroundsAPI.getHost(), 'link': link}, true);
};
v1.logCustomEvent = function (event) {
com.Newgrounds.NewgroundsAPI.sendCommand('logCustomEvent', {'host': com.Newgrounds.NewgroundsAPI.getHost(), 'event': event});
};
v1.postScore = function (score, value, get_best) {
if (!score or value == undefined) {
com.Newgrounds.NewgroundsAPI.sendError({'command_id': com.Newgrounds.NewgroundsAPI.getCommandID('postScore')}, new com.Newgrounds.NewgroundsAPIError('MISSING_PARAM', 'missing required parameter(s)'));
return undefined;
}
com.Newgrounds.NewgroundsAPI.sendSecureCommand('postScore', {'score': score, 'value': value, 'get_best': get_best});
};
v1.getTodaysScores = function (score, params) {
com.Newgrounds.NewgroundsAPI.getScores(score, 't', params, 'getTodaysScores');
};
v1.getYesterdaysScores = function (score, params) {
com.Newgrounds.NewgroundsAPI.getScores(score, 'y', params, 'getYesterdaysScores');
};
v1.getThisWeeksScores = function (score, params) {
com.Newgrounds.NewgroundsAPI.getScores(score, 'w', params, 'getThisWeeksScores');
};
v1.getThisMonthsScores = function (score, params) {
com.Newgrounds.NewgroundsAPI.getScores(score, 'm', params, 'getThisMonthsScores');
};
v1.getThisYearsScores = function (score, params) {
com.Newgrounds.NewgroundsAPI.getScores(score, 'y', params, 'getThisYearsScores');
};
v1.getAlltimeScores = function (score, params) {
com.Newgrounds.NewgroundsAPI.getScores(score, 'a', params, 'getAlltimeScores');
};
v1.getScores = function (score, period, params, command_name) {
if (!score) {
com.Newgrounds.NewgroundsAPI.sendError({'command_id': com.Newgrounds.NewgroundsAPI.getCommandID(command_name)}, new com.Newgrounds.NewgroundsAPIError('MISSING_PARAM', 'missing required score name'));
return undefined;
}
if (!params) {
params = new Object();
}
if (!com.Newgrounds.NewgroundsAPI.hasUserSession()) {
com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.SCORES_LOADED, false, new com.Newgrounds.NewgroundsAPIError('SITE_ID_REQUIRED', 'Host \'' + com.Newgrounds.NewgroundsAPI.getHost() + '\' does not have high scores enabled'));
return undefined;
}
params.publisher_id = com.Newgrounds.NewgroundsAPI.publisher_id;
params.period = period;
params.score = score;
if (params.user_id) {
var v3 = period;
} else {
var v3 = period + '-u';
}
if (com.Newgrounds.NewgroundsAPI.score_page_counts[v3] == undefined) {
params.request_page_count = true;
}
com.Newgrounds.NewgroundsAPI.sendCommand('getScores', params);
};
v1.unlockMedal = function (medal, get_score) {
if (!medal) {
com.Newgrounds.NewgroundsAPI.sendError({'command_id': com.Newgrounds.NewgroundsAPI.getCommandID('unlockMedal')}, new com.Newgrounds.NewgroundsAPIError('MISSING_PARAM', 'missing required medal name'));
return undefined;
}
var v1 = new Object();
v1.medal = medal;
if (get_score) {
v1.get_score = get_score;
}
com.Newgrounds.NewgroundsAPI.sendSecureCommand('unlockMedal', v1);
};
v1.loadMedals = function () {
if (com.Newgrounds.NewgroundsAPI.medals) {
com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.MEDALS_LOADED, true, {'medals': com.Newgrounds.NewgroundsAPI.medals});
return undefined;
}
var v1 = new Object();
if (com.Newgrounds.NewgroundsAPI.hasUserSession()) {
v1.publisher_id = com.Newgrounds.NewgroundsAPI.publisher_id;
v1.user_id = com.Newgrounds.NewgroundsAPI.user_id;
}
com.Newgrounds.NewgroundsAPI.sendCommand('getMedals', v1);
};
v1.getMedals = function () {
return com.Newgrounds.NewgroundsAPI.medals;
};
v1.saveLocal = function (save_id, save_data, size_allocation) {
if (!com.Newgrounds.NewgroundsAPI.sharedObjects[save_id]) {
com.Newgrounds.NewgroundsAPI.sharedObjects[save_id] = SharedObject.getLocal('ng_ap_secure_' + com.Newgrounds.NewgroundsAPI.movie_id + '_' + save_id);
}
com.Newgrounds.NewgroundsAPI.sharedObjects[save_id].data[save_id] = com.Newgrounds.NewgroundsAPI.encodeData(save_data);
com.Newgrounds.NewgroundsAPI.sharedObjects[save_id].flush();
};
v1.loadLocal = function (save_id) {
if (!com.Newgrounds.NewgroundsAPI.sharedObjects[save_id]) {
com.Newgrounds.NewgroundsAPI.sharedObjects[save_id] = SharedObject.getLocal('ng_ap_secure_' + com.Newgrounds.NewgroundsAPI.movie_id + '_' + save_id);
}
com.Newgrounds.NewgroundsAPI.sharedObjects[save_id].flush();
if (com.Newgrounds.NewgroundsAPI.sharedObjects[save_id].data[save_id]) {
return com.Newgrounds.NewgroundsAPI.decodeData(com.Newgrounds.NewgroundsAPI.sharedObjects[save_id].data[save_id]);
} else {
return null;
}
};
v1.encodeData = function (data) {
return com.Newgrounds.NewgroundsAPI.compressHex(com.Newgrounds.RC4.encrypt(com.Newgrounds.JSON.encode(data), com.Newgrounds.NewgroundsAPI.encryption_key));
};
v1.decodeData = function (base) {
return com.Newgrounds.JSON.decode(com.Newgrounds.RC4.decrypt(com.Newgrounds.NewgroundsAPI.uncompressHex(base), com.Newgrounds.NewgroundsAPI.encryption_key));
};
v1.compressHex = function (hex_value) {
var v5 = hex_value.length % 6;
var v4 = '';
var v1 = 0;
while (v1 < hex_value.length) {
var v2 = Number('0x' + hex_value.substr(v1, 6));
v4 += com.Newgrounds.NewgroundsAPI.compressor.encode(v2, 4);
v1 += 6;
}
return v5 + v4;
};
v1.uncompressHex = function (base_value) {
var v8 = Number(base_value.charAt(0));
var v7 = '';
var v3;
var v2 = 1;
while (v2 < base_value.length) {
var v6 = base_value.substr(v2, 4);
var v5 = com.Newgrounds.NewgroundsAPI.compressor.decode(v6);
var v1 = com.Newgrounds.NewgroundsAPI.dec2hex(v5);
if (v2 + 4 < base_value.length) {
v3 = 6;
} else {
v3 = v8;
}
while (v1.length < v3) {
v1 = '0' + v1;
}
v7 += v1;
v2 += 4;
}
return v7;
};
v1.dec2hex = function (dec) {
var v4 = '0123456789ABCDEF';
var v3 = '';
while (dec > 0) {
var v2 = dec % 16;
v3 = v4.charAt(v2) + v3;
dec = (dec - v2) / 16;
}
return v3;
};
v1.saveFile = function (folder, filename, contents, thumbnail_source) {
if (!com.Newgrounds.NewgroundsAPI.save_file) {
com.Newgrounds.NewgroundsAPI.save_file = new com.Newgrounds.NewgroundsAPISaveFile(com.Newgrounds.NewgroundsAPI.movie_id, folder, filename);
com.Newgrounds.NewgroundsAPI.save_file.setContents(contents);
if (thumbnail_source) {
com.Newgrounds.NewgroundsAPI.save_file.setThumbnail(thumbnail_source);
}
com.Newgrounds.NewgroundsAPI.save_file.onError = function (msg) {
var v1 = new com.Newgrounds.NewgroundsAPIError('PERMISSION_DENIED', msg);
com.Newgrounds.NewgroundsAPI.sendError({'command_id': com.Newgrounds.NewgroundsAPI.getCommandID('saveFile')}, v1);
com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.FILE_SAVED, false, v1);
};
com.Newgrounds.NewgroundsAPI.save_file.onCancel = function (msg) {
var v1 = new com.Newgrounds.NewgroundsAPIError('USER_CANCELLED', msg);
com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.FILE_SAVED, false, v1);
};
com.Newgrounds.NewgroundsAPI.save_file.submit();
} else {
var v1 = new com.Newgrounds.NewgroundsAPIError('UPLOAD_IN_PROGRESS', 'Please wait for the previous file to finish uploading');
com.Newgrounds.NewgroundsAPI.sendError({'command_id': com.Newgrounds.NewgroundsAPI.getCommandID('saveFile')}, v1);
com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.FILE_SAVED, false, v1);
}
};
v1.checkFilePrivs = function (folder, filename) {
if (com.Newgrounds.NewgroundsAPI.user_id) {
var v1 = com.Newgrounds.NewgroundsAPI.user_id;
} else {
var v1 = 0;
}
var v2 = {'folder': folder, 'filename': filename, 'user_id': v1, 'publisher_id': com.Newgrounds.NewgroundsAPI.publisher_id};
com.Newgrounds.NewgroundsAPI.sendCommand('checkFilePrivs', v2);
};
v1.finishFileSave = function (folder, filename, description, share, file, thumbnail) {
var v2;
v2 = {'folder': folder, 'filename': filename, 'description': description, 'share': share};
var v1;
v1 = {'file': file, 'thumbnail': thumbnail};
com.Newgrounds.NewgroundsAPI.sendSecureCommand('saveFile', v2, null, v1);
};
v1.getFiles = function (folder, options) {
var v7 = {'name': 1, 'date': 2, 'score': 3};
var v2 = {'user_only': false, 'sort_on': 'date', 'page': 1, 'results_per_page': 20, 'sort_descending': true};
var v6 = new Array();
for (var v10 in v7) {
v6.push('\'' + v10 + '\'');
}
var v4 = new Array();
for (var v9 in v2) {
v4.push('\'' + v9 + '\'');
}
if (options.sort_descending && !v7[options.sort_descending]) {
var v3 = new com.Newgrounds.NewgroundsAPIError('MISSING_PARAM', '\'' + options.sort_descending + '\' is not a valid sort_on value. Valid values are: ' + v6.join(', '));
com.Newgrounds.NewgroundsAPI.sendError({'command_id': com.Newgrounds.NewgroundsAPI.getCommandID('getFiles')}, v3);
delete options.sort_descending;
}
var v8;
if (options) {
for (v10 in options) {
if (v2[v10] == undefined) {
v3 = new com.Newgrounds.NewgroundsAPIError('MISSING_PARAM', '\'' + v10 + '\' is not a valid option. Valid options are: ' + v4.join(', '));
com.Newgrounds.NewgroundsAPI.sendError({'command_id': com.Newgrounds.NewgroundsAPI.getCommandID('getFiles')}, v3);
delete options[v10];
} else {
if (typeof options[v10] != typeof v2[v10]) {
v3 = new com.Newgrounds.NewgroundsAPIError('MISSING_PARAM', 'option \'' + v10 + '\' should be the following type: ' + typeof v2[v10]);
com.Newgrounds.NewgroundsAPI.sendError({'command_id': com.Newgrounds.NewgroundsAPI.getCommandID('getFiles')}, v3);
delete options[v10];
}
}
}
v8 = options;
} else {
v8 = new Object();
}
if (com.Newgrounds.NewgroundsAPI.hasUserSession()) {
v8.publisher_id = com.Newgrounds.NewgroundsAPI.publisher_id;
v8.user_id = com.Newgrounds.NewgroundsAPI.user_id;
}
v8.folder = folder;
com.Newgrounds.NewgroundsAPI.sendCommand('getFiles', v8);
};
v1.getConfirmation = function (command_name, event, msg, target, confirm, cancel) {
var v1 = new com.Newgrounds.NewgroundsAPIError('CONFIRM_REQUEST', msg);
v1.confirm = function () {
target[confirm]();
};
v1.cancel = function () {
target[cancel]();
};
v1.command = com.Newgrounds.NewgroundsAPI.getCommandID(command_name);
com.Newgrounds.NewgroundsAPI.callListener(event, false, v1);
};
v1.doBlockHost = function (event) {
_root.stop();
com.Newgrounds.NewgroundsAPI.initTextFormats();
_root.createEmptyMovieClip('NGAPI_deny_host_overlay', _root.getNextHighestDepth());
_root.NGAPI_deny_host_overlay.lineStyle(20, 0, 100);
_root.NGAPI_deny_host_overlay.beginFill(6684672);
_root.NGAPI_deny_host_overlay.moveTo(0, 0);
_root.NGAPI_deny_host_overlay.lineTo(Stage.width, 0);
_root.NGAPI_deny_host_overlay.lineTo(Stage.width, Stage.height);
_root.NGAPI_deny_host_overlay.lineTo(0, Stage.height);
_root.NGAPI_deny_host_overlay.lineTo(0, 0);
_root.NGAPI_deny_host_overlay.endFill();
var v2 = 'This movie has not been approved for use on ' + com.Newgrounds.NewgroundsAPI.getHost() + '.';
v2 += '\r\rFor an aproved copy, please visit:\r';
var v4 = v2.length;
v2 += event.data.movie_url;
var v3 = v2.length;
_root.NGAPI_deny_host_overlay.createTextField('mousekill', 100, 0, 0, Stage.width, Stage.height);
_root.NGAPI_deny_host_overlay.createTextField('error', 101, (Stage.width - 400) / 2, Stage.height / 2 - 100, 400, 200);
_root.NGAPI_deny_host_overlay.error.text = 'ERROR!';
_root.NGAPI_deny_host_overlay.error.setTextFormat(com.Newgrounds.NewgroundsAPI.error_format);
_root.NGAPI_deny_host_overlay.createTextField('message', 102, (Stage.width - 400) / 2, Stage.height / 2, 400, 200);
_root.NGAPI_deny_host_overlay.message.text = v2;
_root.NGAPI_deny_host_overlay.message.multiline = true;
_root.NGAPI_deny_host_overlay.message.wordWrap = true;
_root.NGAPI_deny_host_overlay.message.html = true;
_root.NGAPI_deny_host_overlay.message.setTextFormat(com.Newgrounds.NewgroundsAPI.normal_format);
com.Newgrounds.NewgroundsAPI.link_format.url = event.data.redirect_url;
_root.NGAPI_deny_host_overlay.message.setTextFormat(v4, v3, com.Newgrounds.NewgroundsAPI.link_format);
};
v1.onNewVersionAvailable = function (event) {
_root.stop();
com.Newgrounds.NewgroundsAPI.initTextFormats();
var v2 = new Object();
v2.x = Stage.width / 2;
v2.y = Stage.height / 2;
_root.createEmptyMovieClip('NGAPI_new_version_overlay', _root.getNextHighestDepth());
_root.NGAPI_new_version_overlay.lineStyle(1, 0, 100);
_root.NGAPI_new_version_overlay.beginFill(0, 70);
_root.NGAPI_new_version_overlay.moveTo(-10, -10);
_root.NGAPI_new_version_overlay.lineTo(-10, 1000);
_root.NGAPI_new_version_overlay.lineTo(1000, 1000);
_root.NGAPI_new_version_overlay.lineTo(1000, -10);
_root.NGAPI_new_version_overlay.lineTo(-10, -10);
_root.NGAPI_new_version_overlay.endFill();
_root.NGAPI_new_version_overlay.lineStyle(10, 0, 100);
_root.NGAPI_new_version_overlay.beginFill(51);
_root.NGAPI_new_version_overlay.moveTo(v2.x - 240, v2.y - 120);
_root.NGAPI_new_version_overlay.lineTo(v2.x + 240, v2.y - 120);
_root.NGAPI_new_version_overlay.lineTo(v2.x + 240, v2.y + 80);
_root.NGAPI_new_version_overlay.lineTo(v2.x - 240, v2.y + 80);
_root.NGAPI_new_version_overlay.lineTo(v2.x - 240, v2.y - 120);
_root.NGAPI_new_version_overlay.endFill();
_root.NGAPI_new_version_overlay.createEmptyMovieClip('exit', 1000);
_root.NGAPI_new_version_overlay.exit.lineStyle(2, 39423, 100);
_root.NGAPI_new_version_overlay.exit.beginFill(0, 50);
_root.NGAPI_new_version_overlay.exit.moveTo(v2.x + 210, v2.y - 110);
_root.NGAPI_new_version_overlay.exit.lineTo(v2.x + 230, v2.y - 110);
_root.NGAPI_new_version_overlay.exit.lineTo(v2.x + 230, v2.y - 90);
_root.NGAPI_new_version_overlay.exit.lineTo(v2.x + 210, v2.y - 90);
_root.NGAPI_new_version_overlay.exit.lineTo(v2.x + 210, v2.y - 110);
_root.NGAPI_new_version_overlay.exit.endFill();
_root.NGAPI_new_version_overlay.exit.moveTo(v2.x + 214, v2.y - 106);
_root.NGAPI_new_version_overlay.exit.lineTo(v2.x + 226, v2.y - 94);
_root.NGAPI_new_version_overlay.exit.moveTo(v2.x + 226, v2.y - 106);
_root.NGAPI_new_version_overlay.exit.lineTo(v2.x + 214, v2.y - 94);
_root.NGAPI_new_version_overlay.exit.onMouseUp = function () {
if (_root.NGAPI_new_version_overlay.exit.hitTest(_root._xmouse, _root._ymouse)) {
_root.NGAPI_new_version_overlay.removeMovieClip();
}
};
var v3 = 'Version ' + event.data.movie_version + ' is now available at:' + '\n';
var v6 = v3.length;
v3 += event.data.movie_url;
var v4 = v3.length;
_root.NGAPI_new_version_overlay.createTextField('mouseblocker', 99, -10, -10, 1000, 1000);
_root.NGAPI_new_version_overlay.createTextField('newversion', 100, v2.x - 210, v2.y - 90, 400, 80);
_root.NGAPI_new_version_overlay.newversion.text = 'New Version Available!';
_root.NGAPI_new_version_overlay.newversion.setTextFormat(com.Newgrounds.NewgroundsAPI.header_format);
_root.NGAPI_new_version_overlay.createTextField('message', 101, (Stage.width - 400) / 2, Stage.height / 2, 400, 40);
_root.NGAPI_new_version_overlay.message.text = v3;
_root.NGAPI_new_version_overlay.message.multiline = true;
_root.NGAPI_new_version_overlay.message.wordWrap = true;
_root.NGAPI_new_version_overlay.message.html = true;
_root.NGAPI_new_version_overlay.message.setTextFormat(com.Newgrounds.NewgroundsAPI.normal_format);
com.Newgrounds.NewgroundsAPI.link_format.url = event.data.redirect_url;
_root.NGAPI_new_version_overlay.message.setTextFormat(v6, v4, com.Newgrounds.NewgroundsAPI.link_format);
};
v1.initTextFormats = function () {
if (!com.Newgrounds.NewgroundsAPI.error_format) {
com.Newgrounds.NewgroundsAPI.error_format = new TextFormat();
com.Newgrounds.NewgroundsAPI.error_format.font = 'Arial Black';
com.Newgrounds.NewgroundsAPI.error_format.size = 48;
com.Newgrounds.NewgroundsAPI.error_format.color = 16711680;
}
if (!com.Newgrounds.NewgroundsAPI.header_format) {
com.Newgrounds.NewgroundsAPI.header_format = new TextFormat();
com.Newgrounds.NewgroundsAPI.header_format.font = 'Arial Black';
com.Newgrounds.NewgroundsAPI.header_format.size = 24;
com.Newgrounds.NewgroundsAPI.header_format.color = 16777215;
}
if (!com.Newgrounds.NewgroundsAPI.normal_format) {
com.Newgrounds.NewgroundsAPI.normal_format = new TextFormat();
com.Newgrounds.NewgroundsAPI.normal_format.font = 'Arial';
com.Newgrounds.NewgroundsAPI.normal_format.bold = true;
com.Newgrounds.NewgroundsAPI.normal_format.size = 12;
com.Newgrounds.NewgroundsAPI.normal_format.color = 16777215;
}
if (!com.Newgrounds.NewgroundsAPI.link_format) {
com.Newgrounds.NewgroundsAPI.link_format = new TextFormat();
com.Newgrounds.NewgroundsAPI.link_format.color = 16776960;
com.Newgrounds.NewgroundsAPI.link_format.underline = true;
}
};
v1.doEvent = function (e) {
switch (com.Newgrounds.NewgroundsAPI.getCommandName(e.command_id)) {
case 'connectMovie':
clearInterval(com.Newgrounds.NewgroundsAPI.timeout);
com.Newgrounds.NewgroundsAPI.sendMessage('You have successfully connected to the Newgrounds API Gateway');
com.Newgrounds.NewgroundsAPI.sendMessage('Movie identified as "' + e.movie_name + '"');
com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.MOVIE_CONNECTED, e.success, {'movie_name': e.movie_name});
var v4 = false;
if (e.ad_status === -1) {
var v6 = 'This movie was not approved to run Flash Ads.';
com.Newgrounds.NewgroundsAPI.sendWarning(v6);
com.Newgrounds.NewgroundsAPI.sendWarning('visit ' + com.Newgrounds.NewgroundsAPI.AD_TERMS_URL + ' to view our approval guidelines');
if (!e.ad_url) {
com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.ADS_APPROVED, false, new com.Newgrounds.NewgroundsAPIError('FLASH_ADS_NOT_APPROVED', v6));
} else {
v4 = true;
}
} else {
if (e.ad_status === 0) {
var v6 = 'Flash Ads are currently awaiting approval.';
com.Newgrounds.NewgroundsAPI.sendNotice(v6);
if (!e.ad_url) {
com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.ADS_APPROVED, false, new com.Newgrounds.NewgroundsAPIError('FLASH_ADS_NOT_APPROVED', v6));
} else {
v4 = true;
}
}
}
if (e.ad_url) {
com.Newgrounds.NewgroundsAPI.ad_url = unescape(e.ad_url);
if (!v4) {
com.Newgrounds.NewgroundsAPI.sendMessage('This movie has been approved to run Flash Ads!');
}
com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.ADS_APPROVED, true);
}
if (e.deny_host) {
v6 = com.Newgrounds.NewgroundsAPI.getHost() + ' does not have permission to run this movie!';
com.Newgrounds.NewgroundsAPI.sendWarning(v6);
com.Newgrounds.NewgroundsAPI.sendWarning('\tUpdate your API configuration to unblock ' + com.Newgrounds.NewgroundsAPI.getHost());
com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.HOST_BLOCKED, true, {'movie_url': unescape(e.movie_url), 'redirect_url': com.Newgrounds.NewgroundsAPI.getOfficialVersionURL()});
}
if (e.movie_version) {
com.Newgrounds.NewgroundsAPI.sendWarning('According to your API Configuration, this version is out of date.');
if (com.Newgrounds.NewgroundsAPI.version) {
com.Newgrounds.NewgroundsAPI.sendWarning('\tThe this movie is version ' + com.Newgrounds.NewgroundsAPI.version);
}
com.Newgrounds.NewgroundsAPI.sendWarning('\tThe most current version is ' + e.movie_version);
com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.NEW_VERSION_AVAILABLE, true, {'movie_version': e.movie_version, 'movie_url': unescape(e.movie_url), 'redirect_url': com.Newgrounds.NewgroundsAPI.getOfficialVersionURL()});
}
if (e.request_portal_url) {
com.Newgrounds.NewgroundsAPI.sendCommand('setPortalID', {'portal_url': _url});
}
break;
case 'logCustomEvent':
if (e.success) {
com.Newgrounds.NewgroundsAPI.sendMessage('Event \'' + e.event + '\' was logged.');
}
com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.EVENT_LOGGED, e.success, {'event': e.event});
break;
case 'postScore':
var v7;
if (e.success) {
var v3 = 'User';
if (com.Newgrounds.NewgroundsAPI.user_email) {
v3 = com.Newgrounds.NewgroundsAPI.user_email;
} else {
if (com.Newgrounds.NewgroundsAPI.user_name) {
v3 = com.Newgrounds.NewgroundsAPI.user_name;
}
}
com.Newgrounds.NewgroundsAPI.sendMessage(v3 + ' posted ' + e.value + ' to \'' + e.score + '\'');
v7 = {'score': e.score, 'value': e.value, 'username': v3};
}
com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.SCORE_POSTED, e.success, v7);
break;
case 'getScores':
var v7 = new Object();
if (e.user_id) {
var v5 = e.period;
} else {
var v5 = e.period + '-u';
}
if (e.total_pages) {
com.Newgrounds.NewgroundsAPI.score_page_counts[v5] = e.total_pages;
}
v7.user_id = e.user_id;
v7.current_page = e.current_page;
v7.total_pages = com.Newgrounds.NewgroundsAPI.score_page_counts[v5];
v7.scores = e.scores;
v7.period = com.Newgrounds.NewgroundsAPI.getPeriodName(e.period);
com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.SCORES_LOADED, e.success, v7);
break;
case 'unlockMedal':
if (com.Newgrounds.NewgroundsAPI.medals) {
var v2 = 0;
while (v2 < com.Newgrounds.NewgroundsAPI.medals.length) {
if (com.Newgrounds.NewgroundsAPI.medals[v2].medal_name === e.medal_name) {
com.Newgrounds.NewgroundsAPI.medals[v2].medal_unlocked = true;
break;
}
++v2;
}
}
var v7 = {'medal_name': e.medal_name, 'medal_value': e.medal_value, 'medal_difficulty': e.medal_difficulty};
com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.MEDAL_UNLOCKED, e.success, v7);
break;
case 'getMedals':
com.Newgrounds.NewgroundsAPI.medals = e.medals;
var v7 = {'medals': e.medals};
com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.MEDALS_LOADED, e.success, v7);
break;
break;
case 'getFiles':
break;
case 'getSystemFiles':
case 'saveFile':
com.Newgrounds.NewgroundsAPI.save_file = null;
var v7 = {'file_id': e.file_id, 'filename': e.filename, 'file_url': e.file_url, 'thumbnail': e.thumbnail, 'icon': e.icon};
com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.FILE_SAVED, e.success, v7);
break;
case 'checkFilePrivs':
if (com.Newgrounds.NewgroundsAPI.save_file) {
com.Newgrounds.NewgroundsAPI.save_file.checkPrivs(e);
} else {
var v7 = {'filename': e.filename, 'folder': e.folder, 'can_read': e.can_read, 'can_write': e.can_write};
com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.FILE_PRIVS_LOADED, e.success, v7);
}
}
};
v1.setDefaultListeners = function () {
var v1 = new Array();
v1[com.Newgrounds.NewgroundsAPI.events.HOST_BLOCKED] = {'listener': com.Newgrounds.NewgroundsAPI.doBlockHost};
v1[com.Newgrounds.NewgroundsAPI.events.NEW_VERSION_AVAILABLE] = {'listener': com.Newgrounds.NewgroundsAPI.onNewVersionAvailable};
return v1;
};
v1.addEventListener = function (event, listener, params) {
com.Newgrounds.NewgroundsAPI.listeners[event] = {'listener': listener, 'params': params};
};
v1.removeEventListener = function (event) {
delete com.Newgrounds.NewgroundsAPI.listeners[event];
};
v1.getEventName = function (event) {
for (var v2 in com.Newgrounds.NewgroundsAPI.events) {
if (com.Newgrounds.NewgroundsAPI.events[v2] == event) {
return v2;
}
}
return undefined;
};
v1.callListener = function (event, success, data, target) {
com.Newgrounds.NewgroundsAPI.echo('Fired Event: ' + com.Newgrounds.NewgroundsAPI.getEventName(event));
if (com.Newgrounds.NewgroundsAPI.listeners[event]) {
if (data.isError()) {
com.Newgrounds.NewgroundsAPI.listeners[event].listener({'event': event, 'success': success, 'error': data, 'target': target}, com.Newgrounds.NewgroundsAPI.listeners[event].params);
} else {
com.Newgrounds.NewgroundsAPI.listeners[event].listener({'event': event, 'success': success, 'data': data, 'target': target}, com.Newgrounds.NewgroundsAPI.listeners[event].params);
}
}
};
v1.getCommandName = function (id) {
return id;
};
v1.getCommandID = function (name) {
return name;
};
v1.getPeriodAliases = function () {
var v1 = new Object();
for (var v2 in com.Newgrounds.NewgroundsAPI.period_aliases) {
v1[com.Newgrounds.NewgroundsAPI.period_aliases[v2].alias] = v2;
}
return v1;
};
v1.getPeriodName = function (p) {
for (var v2 in com.Newgrounds.NewgroundsAPI.period_aliases) {
if (v2 == p) {
return com.Newgrounds.NewgroundsAPI.period_aliases[v2].name;
}
}
return null;
};
v1.getPeriodAlias = function (p) {
for (var v2 in com.Newgrounds.NewgroundsAPI.period_aliases) {
if (v2 == p) {
return com.Newgrounds.NewgroundsAPI.period_aliases[v2].alias;
}
}
return null;
};
v1.sendError = function (c, e) {};
v1.sendWarning = function (m, c) {
if (c) {
m += '\r[NewgroundsAPI WARNING] :: \tSee ' + com.Newgrounds.NewgroundsAPI.COMMANDS_WIKI_URL + c.toLowerCase() + ' for additional information.';
}
};
v1.sendNotice = function (m, c) {
if (c) {
m += '\r[NewgroundsAPI NOTICE] :: \tSee ' + com.Newgrounds.NewgroundsAPI.COMMANDS_WIKI_URL + c.toLowerCase() + ' for additional information.';
}
};
v1.fatalError = function (m, c) {
if (c) {
m += '\r\tSee ' + com.Newgrounds.NewgroundsAPI.COMMANDS_WIKI_URL + c.toLowerCase() + ' for additional information.';
}
throw '***ERROR*** frame=' + _root._currentframe + ', class=NewgroundsAPI' + '\n' + '\n' + m;
};
v1.sendSecureCommand = function (command, secure_params, unsecure_params, files) {
if (!com.Newgrounds.NewgroundsAPI.debug && !com.Newgrounds.NewgroundsAPI.hasUserSession() && !com.Newgrounds.NewgroundsAPI.hasUserEmail()) {
com.Newgrounds.NewgroundsAPI.sendError({'command_id': com.Newgrounds.NewgroundsAPI.getCommandID(command)}, new com.Newgrounds.NewgroundsAPIError('IDENTIFICATION_REQUIRED', 'You must be logged in or provide an e-mail address ( using NewgroundsAPI.setUserEmail("name@domain.com"); ) to use ' + command + '().'));
return undefined;
}
if (!command) {
com.Newgrounds.NewgroundsAPI.fatalError('Missing command', 'sendSecureCommand');
}
if (!secure_params) {
com.Newgrounds.NewgroundsAPI.fatalError('Missing secure_params', 'sendSecureCommand');
}
if (!unsecure_params) {
unsecure_params = new Object();
}
var v2 = '';
var v1 = 0;
while (v1 < 16) {
v2 += com.Newgrounds.NewgroundsAPI.compression_radix.charAt(Math.floor(Math.random() * com.Newgrounds.NewgroundsAPI.compression_radix.length));
++v1;
}
if (com.Newgrounds.NewgroundsAPI.debug) {
secure_params.session_id = '';
} else {
secure_params.session_id = com.Newgrounds.NewgroundsAPI.session_id;
}
secure_params.as_version = 2;
secure_params.user_email = com.Newgrounds.NewgroundsAPI.user_email;
secure_params.publisher_id = com.Newgrounds.NewgroundsAPI.publisher_id;
secure_params.seed = v2;
secure_params.command_id = com.Newgrounds.NewgroundsAPI.getCommandID(command);
var v8 = com.Newgrounds.MD5.calculate(v2);
var v6 = com.Newgrounds.RC4.encrypt(com.Newgrounds.JSON.encode(secure_params), com.Newgrounds.NewgroundsAPI.encryption_key);
var v7 = v8 + v6;
unsecure_params.secure = com.Newgrounds.NewgroundsAPI.compressHex(v7);
com.Newgrounds.NewgroundsAPI.sendCommand('securePacket', unsecure_params, false, files);
};
v1.sendCommand = function (command, params, open_browser, files) {
if (!com.Newgrounds.NewgroundsAPI.connected and command != 'connectMovie') {
var v11 = 'NewgroundsAPI.' + command + '() - NewgroundsAPI.connectMovie() must be called before this command can be called' + '\n';
com.Newgrounds.NewgroundsAPI.fatalError(v11, 'connectMovie');
}
if (open_browser) {
var v1 = new Object();
} else {
var v1 = new LoadVars();
}
v1.command_id = com.Newgrounds.NewgroundsAPI.getCommandID(command);
v1.tracker_id = com.Newgrounds.NewgroundsAPI.movie_id;
if (com.Newgrounds.NewgroundsAPI.debug) {
v1.debug = com.Newgrounds.NewgroundsAPI.debug;
}
if (params) {
for (var v8 in params) {
v1[v8] = params[v8];
}
}
if (files) {
for (v8 in files) {
v1[v8] = files[v8];
}
}
com.Newgrounds.NewgroundsAPI.echo('OUTPUT: \r' + com.Newgrounds.JSON.encode(v1) + '\n');
if (open_browser) {
var v5 = com.Newgrounds.NewgroundsAPI.GATEWAY_URL + '?seed=' + Math.random();
for (v8 in v1) {
v5 += '&' + escape(v8) + '=' + escape(v1[v8]);
}
getURL(v5, '_blank');
v1.removeMovieClip();
} else {
var v9 = new LoadVars();
v9.onData = function (data) {
com.Newgrounds.NewgroundsAPI.echo('INPUT: \r' + data + '\n');
if (data) {
var v1 = com.Newgrounds.JSON.decode(data);
} else {
var v1 = {'success': false};
}
if (!v1.success) {
var v3 = new com.Newgrounds.NewgroundsAPIError(v1.error_code, v1.error_msg);
com.Newgrounds.NewgroundsAPI.sendError(v1, v3);
} else {
com.Newgrounds.NewgroundsAPI.doEvent(v1);
}
};
var v4 = new Array();
for (var v7 in v1) {
v4.push(v7 + '=' + escape(v1[v7]));
}
com.Newgrounds.NewgroundsAPI.echo('POST ' + com.Newgrounds.NewgroundsAPI.GATEWAY_URL + '?' + v4.join('&'));
v1.sendAndLoad(com.Newgrounds.NewgroundsAPI.GATEWAY_URL + '?seed=' + Math.random(), v9, 'POST');
}
};
v1.renderAd = function (target) {
if (com.Newgrounds.NewgroundsAPI.ad_swf_url) {
target.background = target.createEmptyMovieClip('background', 100);
target.background.beginFill(0);
target.background.moveTo(0, 0);
target.background.lineTo(300, 0);
target.background.lineTo(300, 250);
target.background.lineTo(0, 250);
target.background.lineTo(0, 0);
target.background.endFill();
target.mask = target.createEmptyMovieClip('mask', 101);
target.mask.beginFill(0);
target.mask.moveTo(0, 0);
target.mask.lineTo(300, 0);
target.mask.lineTo(300, 250);
target.mask.lineTo(0, 250);
target.mask.lineTo(0, 0);
target.mask.endFill();
target.clip = target.createEmptyMovieClip('clip', 102);
target.clip.ad = target.clip.createEmptyMovieClip('ad', 100);
target.clip.setMask(target.mask);
loadMovie(com.Newgrounds.NewgroundsAPI.ad_swf_url, target.clip.ad);
com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.AD_ATTACHED, true, null, target);
} else {
com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.AD_ATTACHED, false, new com.Newgrounds.NewgroundsAPIError('FLASH_ADS_NOT_APPROVED', 'Unable to render ad'));
}
};
v1.attachFlashAd = function (target) {
System.security.allowDomain('http://server.cpmstar.com');
System.security.allowDomain('http://www.cpmstar.com');
System.security.allowDomain('https://server.cpmstar.com');
System.security.allowDomain('https://www.cpmstar.com');
System.security.allowInsecureDomain('http://server.cpmstar.com');
System.security.allowInsecureDomain('http://www.cpmstar.com');
System.security.allowInsecureDomain('https://server.cpmstar.com');
System.security.allowInsecureDomain('https://www.cpmstar.com');
com.Newgrounds.NewgroundsAPI.sendMessage('You may get a security sandbox violation from this ad. This is nothing to worry about!');
if (com.Newgrounds.NewgroundsAPI.resetAdTimer()) {
if (com.Newgrounds.NewgroundsAPI.ad_url) {
var v1 = new LoadVars();
v1.onData = function (data) {
if (data) {
com.Newgrounds.NewgroundsAPI.ad_swf_url = data;
} else {
com.Newgrounds.NewgroundsAPI.ad_swf_url = null;
}
com.Newgrounds.NewgroundsAPI.renderAd(target);
};
if (com.Newgrounds.NewgroundsAPI.ad_url.indexOf('?') > -1) {
v1.load(com.Newgrounds.NewgroundsAPI.ad_url + '&random=' + Math.random());
} else {
v1.load(com.Newgrounds.NewgroundsAPI.ad_url + '?random=' + Math.random());
}
}
} else {
com.Newgrounds.NewgroundsAPI.renderAd(target);
}
};
v1.resetAdTimer = function () {
if (!com.Newgrounds.NewgroundsAPI.ad_url) {
return false;
}
var v1 = new Date();
if (v1.getTime() >= com.Newgrounds.NewgroundsAPI.ad_reset) {
com.Newgrounds.NewgroundsAPI.ad_reset = v1.getTime() + 300000;
return true;
}
return false;
};
v1.sendMessage = function (m, r) {
var v1 = '[NewgroundsAPI] :: ' + m;
if (r) {
return v1;
} else {}
};
v1.echo = function (m) {
if (com.Newgrounds.NewgroundsAPI.do_echo) {
}
};
v1.do_echo = false;
v1.GATEWAY_URL = 'http://www.ngads.com/gateway_v2.php';
v1.AD_TERMS_URL = 'http://www.newgrounds.com/wiki/flashads/terms/';
v1.COMMANDS_WIKI_URL = 'http://www.newgrounds.com/wiki/flashapi/commands/';
v1.ad_reset = 0;
v1.save_file = null;
v1.medals = null;
v1.score_page_counts = new Object();
v1.compression_radix = '/g8236klvBQ#&|;Zb*7CEA59%s`Oue1wziFp$rDVY@TKxUPWytSaGHJ>dmoMR^<0~4qNLhc(I+fjn)X';
v1.compressor = new com.Newgrounds.BaseN(com.Newgrounds.NewgroundsAPI.compression_radix);
v1.errors = com.Newgrounds.NewgroundsAPIError.init_codes();
v1.sharedObjects = new Object();
v1.events = {'MOVIE_CONNECTED': 1, 'ADS_APPROVED': 2, 'AD_ATTACHED': 3, 'HOST_BLOCKED': 4, 'NEW_VERSION_AVAILABLE': 5, 'EVENT_LOGGED': 6, 'SCORE_POSTED': 7, 'SCORES_LOADED': 8, 'MEDAL_UNLOCKED': 9, 'MEDALS_LOADED': 10, 'FILE_PRIVS_LOADED': 11, 'FILE_SAVED': 12};
v1.listeners = com.Newgrounds.NewgroundsAPI.setDefaultListeners();
v1.periods = com.Newgrounds.NewgroundsAPI.getPeriodAliases();
v1.period_aliases = {'t': {'name': 'Today', 'alias': 'TODAY'}, 'p': {'name': 'Yesterday', 'alias': 'YESTERDAY'}, 'w': {'name': 'This Week', 'alias': 'THIS_WEEK'}, 'm': {'name': 'This Month', 'alias': 'THIS_MONTH'}, 'y': {'name': 'This Year', 'alias': 'THIS_YEAR'}, 'a': {'name': 'All-Time', 'alias': 'ALL_TIME'}};
ASSetPropFlags(com.Newgrounds.NewgroundsAPI.prototype, null, 1);
}
#endinitclip
}
movieClip 3036 __Packages.com.Newgrounds.NewgroundsAPISaveFile {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.Newgrounds) {
_global.com.Newgrounds = new Object();
}
if (!_global.com.Newgrounds.NewgroundsAPISaveFile) {
var v1 = function (tracker_id, folder, filename) {
this.tracker_id = tracker_id;
this.folder = folder;
this.filename = filename;
this.contents = null;
this.thumbnail = null;
this.icon_url = null;
this.thumbnail_url = null;
};
com.Newgrounds.NewgroundsAPISaveFile = v1;
var v2 = v1.prototype;
v2.setDescription = function (description) {
this.description = description;
};
v2.setShared = function (share) {
this.share = share;
};
v2.setContents = function (contents) {
this.contents = contents;
};
v2.setThumbnail = function (thumb) {
if (thumb) {
this.thumbnail = thumb;
} else {
this.thumbnail = null;
}
};
v2.onError = function (msg) {};
v2.onCancel = function (msg) {};
v2.submit = function () {
this.scan = null;
com.Newgrounds.NewgroundsAPI.checkFilePrivs(this.folder, this.filename);
};
v2.checkPrivs = function (p) {
if (p.success) {
if (p.can_write) {
this.can_write = p.can_write;
if (p.exists) {
com.Newgrounds.NewgroundsAPI.getConfirmation('saveFile', com.Newgrounds.NewgroundsAPI.events.FILE_SAVED, 'File \'' + this.filename + '\' exists, overwrite?', this, 'startFile', 'cancelFile');
} else {
this.startFile();
}
} else {
this.onError('This filename is owned by another user.');
}
} else {
this.onError('There was a problem looking up your file\'s details');
}
};
v2.cancelFile = function () {
this.onCancel('Overwrite was cancelled');
};
v2.startFile = function () {
if (this.can_write) {
if (this.thumbnail) {
this.scanner = new com.Newgrounds.ImageScanner(this.thumbnail);
this.scanner.setCallback(this, 'writeFile');
this.scanner.startScan(100, 100, true);
} else {
this.writeFile();
}
} else {
this.onError('You cannot write to filename "' + this.filename + '"');
}
};
v2.writeFile = function (img) {
com.Newgrounds.NewgroundsAPI.finishFileSave(this.folder, this.filename, this.description, this.share, com.Newgrounds.JSON.encode(this.contents), img);
};
v2.can_write = false;
v2.share = true;
ASSetPropFlags(com.Newgrounds.NewgroundsAPISaveFile.prototype, null, 1);
}
#endinitclip
}
movieClip 3037 __Packages.com.Newgrounds.ImageScanner {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.Newgrounds) {
_global.com.Newgrounds = new Object();
}
if (!_global.com.Newgrounds.ImageScanner) {
var v1 = function (the_source) {
if (the_source) {
this.image_source = the_source;
} else {
this.image_source = _root;
}
this.reset();
if (typeof this.image_source == 'movieclip') {
if (this.image_source == _root) {
this.source_width = Stage.width;
this.source_height = Stage.height;
} else {
this.source_width = Math.floor(this.image_source._width);
this.source_height = Math.floor(this.image_source._height);
}
this.sourceBitmap = new flash.display.BitmapData(this.source_width, this.source_height, false, 4294967295.0);
this.sourceBitmap.draw(_root);
} else {
if (this.image_source.width) {
this.source_width = this.image_source.width;
this.source_height = this.image_source.height;
this.sourceBitmap = this.image_source;
} else {
this.error('You can only use BitMaptData and MovieClip objects to create images');
}
}
};
com.Newgrounds.ImageScanner = v1;
var v2 = v1.prototype;
v2.setCallback = function (target, funct) {
if (target && funct) {
this.callback_target = target;
this.callback_function = funct;
}
};
v2.reset = function () {
this.callback_target = null;
this.callback_function = null;
this.debug.bad_pixels = 0;
this.hash = '0123456789aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ<>?:;-_=+()!&';
var v3 = Math.pow(this.hash.length, 2);
var v2 = Math.floor(Math.pow(v3, 0.3333333333333333)) - 1;
var v4 = Math.pow(v2, 3);
this.cube = v2;
this.basen = new com.Newgrounds.BaseN(this.hash);
this.xpos = 0;
this.ypos = 0;
this.pixels = 0;
this.busy = false;
};
v2.startScan = function (w, h, s) {
if (w) {
this.image_width = w;
}
if (h) {
this.image_height = h;
}
if (s != undefined) {
this.crop = s;
}
var v7 = _root.getNextHighestDepth();
var v6 = _root.createEmptyMovieClip('API_image_container_' + v7, v7);
var v5 = v6.createEmptyMovieClip('canvas', 100);
v5.attachBitmap(this.sourceBitmap, 100);
if (this.crop) {
if (this.image_width / this.source_width > this.image_height / this.source_height) {
this.canvas_width = this.image_width;
this.canvas_height = Math.ceil(this.source_height * (this.image_width / this.source_width));
} else {
this.canvas_height = this.image_height;
this.canvas_width = Math.ceil(this.source_width * (this.image_height / this.source_height));
}
} else {
this.canvas_width = this.image_width;
this.canvas_height = this.image_height;
}
v5._x = Math.round((this.image_width - this.canvas_width) / 2);
v5._width = this.canvas_width;
v5._height = this.canvas_height;
this.resizedBitmap = new flash.display.BitmapData(this.image_width, this.image_height, false, 4294967295.0);
this.resizedBitmap.draw(v6);
v6.removeMovieClip();
this.copyBitmap = new flash.display.BitmapData(this.image_width, this.image_height, false, 4294967295.0);
var v3 = '' + this.image_width;
while (v3.length < 3) {
v3 = '0' + v3;
}
var v4 = '' + this.image_height;
while (v4.length < 3) {
v4 = '0' + v4;
}
this.output = v3 + v4;
this.draw_interval = setInterval(this, 'drawChunk', 10);
this.busy = false;
return this.resizedBitmap;
};
v2.getBitmapData = function () {
return this.copyBitmap;
};
v2.getBytesTotal = function () {
return this.image_width * this.image_height * 2;
};
v2.getBytesScanned = function () {
return this.pixels * 2;
};
v2.drawChunk = function () {
if (!this.busy) {
this.busy = true;
var v2 = 0;
while (v2 < 250) {
if (!this.nextPixel()) {
clearInterval(this.draw_interval);
this.callback_interval = setInterval(this, 'doCallback', 25);
this.busy = true;
break;
}
++v2;
}
this.busy = false;
}
};
v2.doCallback = function () {
this.busy = false;
clearInterval(this.callback_interval);
if (this.callback_target and this.callback_function) {
this.callback_target[this.callback_function](this.output);
} else {
this.onScanComplete(this.output);
}
};
v2.onScanComplete = function (packet) {
this.sendMessage('packet size: ' + this.output.length + ' bytes', 'onScanComplete');
};
v2.nextPixel = function () {
var v15 = this.xpos;
var v14 = this.ypos;
var v7 = this.resizedBitmap.getPixel(v15, v14);
var v17 = v7 >> 16 & 255;
var v20 = v7 >> 8 & 255;
var v16 = v7 >> 0 & 255;
var v11 = Math.round(((v17 + 1) / 256) * this.cube);
var v10 = Math.round(((v20 + 1) / 256) * this.cube);
var v13 = Math.round(((v16 + 1) / 256) * this.cube);
var v12 = v11 * (this.cube + 1) * (this.cube + 1) + v10 * (this.cube + 1) + v13;
var v6 = this.basen.encode(v12, 2);
this.output += v6;
if (v6.length != 2) {
}
var v5 = this.basen.decode(v6);
var v18 = v5;
var v8 = v5 % (this.cube + 1);
v5 = (v5 - v8) / (this.cube + 1);
var v9 = v5 % (this.cube + 1);
var v19 = (v5 - v9) / (this.cube + 1);
if (v13 != v8 and v10 != v9 and v11 != v10) {
++this.debug.bad_pixels;
}
var v2 = (Math.round((v19 / this.cube) * 255)).toString(16);
var v4 = (Math.round((v9 / this.cube) * 255)).toString(16);
var v3 = (Math.round((v8 / this.cube) * 255)).toString(16);
while (v2.length < 2) {
v2 = '0' + v2;
}
while (v4.length < 2) {
v4 = '0' + v4;
}
while (v3.length < 2) {
v3 = '0' + v3;
}
this.copyBitmap.setPixel(v15, v14, Number('0x' + v2 + v4 + v3));
++this.pixels;
if (this.pixels >= this.image_width * this.image_height) {
return false;
}
++this.xpos;
if (this.xpos >= this.image_width) {
this.xpos = 0;
++this.ypos;
}
return true;
};
v2.error = function (e, f) {
this.sendMessage(e, f, 'ERROR');
};
v2.sendMessage = function (msg, func, type) {
var v1 = 'ImageScanner';
if (func) {
v1 += '.' + func + '()';
}
if (type) {
v1 = type + ' in ' + v1;
}
v1 += ' :: ' + msg;
};
v2.image_width = 100;
v2.image_height = 100;
v2.crop = true;
v2.debug = new Object();
ASSetPropFlags(com.Newgrounds.ImageScanner.prototype, null, 1);
}
#endinitclip
}
movieClip 3038 __Packages.com.Newgrounds.JSON {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.Newgrounds) {
_global.com.Newgrounds = new Object();
}
if (!_global.com.Newgrounds.JSON) {
var v1 = function () {};
com.Newgrounds.JSON = v1;
var v2 = v1.prototype;
v1.encode = function (arg, noquotes) {
var v3;
var v2;
var v6;
var v1 = '';
var v4;
if (arg.isSServerVar()) {
var v8 = 'sservervariable';
} else {
var v8 = typeof arg;
}
switch (v8) {
return 'null';
case 'sservervariable':
return '?' + arg.getEncodedValue();
break;
case 'object':
if (arg) {
if (arg instanceof Array) {
v2 = 0;
while (v2 < arg.length) {
v4 = com.Newgrounds.JSON.encode(arg[v2]);
if (v1) {
v1 += ',';
}
v1 += v4;
++v2;
}
return '[' + v1 + ']';
} else {
if (typeof arg.toString != 'undefined') {
for (v2 in arg) {
v4 = arg[v2];
if (typeof v4 != 'undefined' && typeof v4 != 'function') {
v4 = com.Newgrounds.JSON.encode(v4);
if (v1) {
v1 += ',';
}
v1 += com.Newgrounds.JSON.encode(v2) + ':' + v4;
}
}
return '{' + v1 + '}';
}
}
}
return 'null';
case 'number':
return isFinite(arg) ? String(arg) : 'null';
case 'string':
v6 = arg.length;
if (noquotes) {
var v7 = '';
} else {
var v7 = '"';
}
v1 = v7;
v2 = 0;
while (v2 < v6) {
v3 = arg.charAt(v2);
if (v3 >= ' ') {
if (v3 == '\\' || v3 == '"') {
v1 += '\\';
}
v1 += v3;
} else {
switch (v3) {
case '\b':
v1 += '\\b';
break;
case '\f':
v1 += '\\f';
break;
case '\n':
v1 += '\\n';
break;
case '\r':
v1 += '\\r';
break;
case '\t':
v1 += '\\t';
break;
default:
v3 = v3.charCodeAt();
v1 += '\\u00' + (Math.floor(v3 / 16)).toString(16) + (v3 % 16).toString(16);
}
}
v2 += 1;
}
return v1 + v7;
case 'boolean':
return String(arg);
default:
return 'null';
}
};
v1.decode = function (text) {
var at = 0;
var ch = ' ';
var _value;
var _error = function (m) {
throw {'name': 'JSONError', 'message': m, 'at': at - 1, 'text': text};
};
var _next = function () {
ch = text.charAt(at);
at += 1;
return ch;
};
var _white = function () {
while (ch) {
if (ch <= ' ') {
_next();
} else {
if (ch == '/') {
switch (_next()) {
case '/':
for (;;) {
if (!(_next() && ch != '\n' && ch != '\r')) break;
}
break;
case '*':
_next();
for (;;) {
if (ch) {
if (ch == '*') {
if (_next() == '/') {
_next();
break;
}
} else {
_next();
}
continue;
}
_error('Unterminated comment');
}
break;
default:
_error('Syntax error');
}
} else {
break;
}
}
}
};
var _string = function () {
var v4;
var v1 = '';
var v3;
var v2;
var v5 = false;
if (ch == '"') {
while (_next()) {
if (ch == '"') {
_next();
return v1;
} else {
if (ch == '\\') {
switch (_next()) {
case 'b':
v1 += '\b';
break;
case 'f':
v1 += '\f';
break;
case 'n':
v1 += '\n';
break;
case 'r':
v1 += '\r';
break;
case 't':
v1 += '\t';
break;
case 'u':
v2 = 0;
v4 = 0;
while (v4 < 4) {
v3 = parseInt(_next(), 16);
if (!isFinite(v3)) {
v5 = true;
break;
}
v2 = v2 * 16 + v3;
v4 += 1;
}
if (v5) {
v5 = false;
} else {
v1 += String.fromCharCode(v2);
break;
default:
v1 += ch;
}
}
} else {
v1 += ch;
}
}
}
}
_error('Bad string');
};
var _array = function () {
var v1 = [];
if (ch == '[') {
_next();
_white();
if (ch == ']') {
_next();
return v1;
}
while (ch) {
v1.push(_value());
_white();
if (ch == ']') {
_next();
return v1;
} else {
if (ch != ',') {
break;
}
}
_next();
_white();
}
}
_error('Bad array');
};
var _object = function () {
var v2;
var v1 = {};
if (ch == '{') {
_next();
_white();
if (ch == '}') {
_next();
return v1;
}
while (ch) {
v2 = _string();
_white();
if (ch != ':') {
break;
}
_next();
v1[v2] = _value();
_white();
if (ch == '}') {
_next();
return v1;
} else {
if (ch != ',') {
break;
}
}
_next();
_white();
}
}
_error('Bad object');
};
var _number = function () {
var v1 = '';
var v2;
if (ch == '-') {
v1 = '-';
_next();
}
for (;;) {
if (!(ch >= '0' && ch <= '9')) break;
v1 += ch;
_next();
}
if (ch == '.') {
v1 += '.';
for (;;) {
if (!(_next() && ch >= '0' && ch <= '9')) break;
v1 += ch;
}
}
v2 = 1 * v1;
if (!isFinite(v2)) {
_error('Bad number');
} else {
return v2;
}
};
var _word = function () {
switch (ch) {
case 't':
if (_next() == 'r' && _next() == 'u' && _next() == 'e') {
_next();
return true;
}
break;
case 'f':
if (_next() == 'a' && _next() == 'l' && _next() == 's' && _next() == 'e') {
_next();
return false;
}
break;
case 'n':
if (_next() == 'u' && _next() == 'l' && _next() == 'l') {
_next();
return null;
}
}
_error('Syntax error');
};
_value = function () {
_white();
switch (ch) {
case '{':
return _object();
case '[':
return _array();
case '"':
return _string();
case '-':
return _number();
}
return (ch >= '0' && ch <= '9') ? _number() : _word();
};
return _value();
};
ASSetPropFlags(com.Newgrounds.JSON.prototype, null, 1);
}
#endinitclip
}
movieClip 3039 __Packages.com.Newgrounds.RC4 {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.Newgrounds) {
_global.com.Newgrounds = new Object();
}
if (!_global.com.Newgrounds.RC4) {
var v1 = function () {};
com.Newgrounds.RC4 = v1;
var v2 = v1.prototype;
v1.encrypt = function (src, key) {
var v3 = com.Newgrounds.RC4.strToChars(src);
var v1 = com.Newgrounds.RC4.strToChars(key);
var v2 = com.Newgrounds.RC4.calculate(v3, v1);
return com.Newgrounds.RC4.charsToHex(v2);
};
v1.encryptbin = function (src, key) {
var v3 = com.Newgrounds.RC4.strToChars(src);
var v1 = com.Newgrounds.RC4.strToChars(key);
var v2 = com.Newgrounds.RC4.calculate(v3, v1);
return v2;
};
v1.decrypt = function (src, key) {
var v3 = com.Newgrounds.RC4.hexToChars(src);
var v1 = com.Newgrounds.RC4.strToChars(key);
var v2 = com.Newgrounds.RC4.calculate(v3, v1);
return com.Newgrounds.RC4.charsToStr(v2);
};
v1.initialize = function (pwd) {
var v2 = 0;
var v3;
var v4 = pwd.length;
var v1 = 0;
while (v1 <= 255) {
com.Newgrounds.RC4.mykey[v1] = pwd[v1 % v4];
com.Newgrounds.RC4.sbox[v1] = v1;
++v1;
}
v1 = 0;
while (v1 <= 255) {
v2 = (v2 + com.Newgrounds.RC4.sbox[v1] + com.Newgrounds.RC4.mykey[v1]) % 256;
v3 = com.Newgrounds.RC4.sbox[v1];
com.Newgrounds.RC4.sbox[v1] = com.Newgrounds.RC4.sbox[v2];
com.Newgrounds.RC4.sbox[v2] = v3;
++v1;
}
};
v1.calculate = function (plaintxt, psw) {
com.Newgrounds.RC4.initialize(psw);
var v1 = 0;
var v2 = 0;
var v9 = new Array();
var v7;
var v5;
var v6;
var v3 = 0;
while (v3 < plaintxt.length) {
v1 = (v1 + 1) % 256;
v2 = (v2 + com.Newgrounds.RC4.sbox[v1]) % 256;
v5 = com.Newgrounds.RC4.sbox[v1];
com.Newgrounds.RC4.sbox[v1] = com.Newgrounds.RC4.sbox[v2];
com.Newgrounds.RC4.sbox[v2] = v5;
var v4 = (com.Newgrounds.RC4.sbox[v1] + com.Newgrounds.RC4.sbox[v2]) % 256;
v7 = com.Newgrounds.RC4.sbox[v4];
v6 = plaintxt[v3] ^ v7;
v9.push(v6);
++v3;
}
return v9;
};
v1.charsToHex = function (chars) {
var v4 = new String('');
var v3 = new Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f');
var v1 = 0;
while (v1 < chars.length) {
v4 += v3[chars[v1] >> 4] + v3[chars[v1] & 15];
++v1;
}
return v4;
};
v1.hexToChars = function (hex) {
var v3 = new Array();
var v1 = (hex.substr(0, 2) == '0x') ? 2 : 0;
while (v1 < hex.length) {
v3.push(parseInt(hex.substr(v1, 2), 16));
v1 += 2;
}
return v3;
};
v1.charsToStr = function (chars) {
var v3 = new String('');
var v1 = 0;
while (v1 < chars.length) {
v3 += String.fromCharCode(chars[v1]);
++v1;
}
return v3;
};
v1.strToChars = function (str) {
var v3 = new Array();
var v1 = 0;
while (v1 < str.length) {
v3.push(str.charCodeAt(v1));
++v1;
}
return v3;
};
v1.sbox = new Array(255);
v1.mykey = new Array(255);
ASSetPropFlags(com.Newgrounds.RC4.prototype, null, 1);
}
#endinitclip
}
movieClip 3040 __Packages.com.Newgrounds.MD5 {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.Newgrounds) {
_global.com.Newgrounds = new Object();
}
if (!_global.com.Newgrounds.MD5) {
var v1 = function () {};
com.Newgrounds.MD5 = v1;
var v2 = v1.prototype;
v1.calculate = function (src) {
return com.Newgrounds.MD5.hex_md5(src);
};
v1.hex_md5 = function (src) {
return com.Newgrounds.MD5.binl2hex(com.Newgrounds.MD5.core_md5(com.Newgrounds.MD5.str2binl(src), src.length * 8));
};
v1.core_md5 = function (x, len) {
x[len >> 5] |= 128 << len % 32;
x[(len + 64 >>> 9 << 4) + 14] = len;
var v4 = 1732584193;
var v3 = -271733879;
var v2 = -1732584194;
var v1 = 271733878;
var v5 = 0;
while (v5 < x.length) {
var v10 = v4;
var v9 = v3;
var v8 = v2;
var v7 = v1;
v4 = com.Newgrounds.MD5.md5_ff(v4, v3, v2, v1, x[v5 + 0], 7, -680876936);
v1 = com.Newgrounds.MD5.md5_ff(v1, v4, v3, v2, x[v5 + 1], 12, -389564586);
v2 = com.Newgrounds.MD5.md5_ff(v2, v1, v4, v3, x[v5 + 2], 17, 606105819);
v3 = com.Newgrounds.MD5.md5_ff(v3, v2, v1, v4, x[v5 + 3], 22, -1044525330);
v4 = com.Newgrounds.MD5.md5_ff(v4, v3, v2, v1, x[v5 + 4], 7, -176418897);
v1 = com.Newgrounds.MD5.md5_ff(v1, v4, v3, v2, x[v5 + 5], 12, 1200080426);
v2 = com.Newgrounds.MD5.md5_ff(v2, v1, v4, v3, x[v5 + 6], 17, -1473231341);
v3 = com.Newgrounds.MD5.md5_ff(v3, v2, v1, v4, x[v5 + 7], 22, -45705983);
v4 = com.Newgrounds.MD5.md5_ff(v4, v3, v2, v1, x[v5 + 8], 7, 1770035416);
v1 = com.Newgrounds.MD5.md5_ff(v1, v4, v3, v2, x[v5 + 9], 12, -1958414417);
v2 = com.Newgrounds.MD5.md5_ff(v2, v1, v4, v3, x[v5 + 10], 17, -42063);
v3 = com.Newgrounds.MD5.md5_ff(v3, v2, v1, v4, x[v5 + 11], 22, -1990404162);
v4 = com.Newgrounds.MD5.md5_ff(v4, v3, v2, v1, x[v5 + 12], 7, 1804603682);
v1 = com.Newgrounds.MD5.md5_ff(v1, v4, v3, v2, x[v5 + 13], 12, -40341101);
v2 = com.Newgrounds.MD5.md5_ff(v2, v1, v4, v3, x[v5 + 14], 17, -1502002290);
v3 = com.Newgrounds.MD5.md5_ff(v3, v2, v1, v4, x[v5 + 15], 22, 1236535329);
v4 = com.Newgrounds.MD5.md5_gg(v4, v3, v2, v1, x[v5 + 1], 5, -165796510);
v1 = com.Newgrounds.MD5.md5_gg(v1, v4, v3, v2, x[v5 + 6], 9, -1069501632);
v2 = com.Newgrounds.MD5.md5_gg(v2, v1, v4, v3, x[v5 + 11], 14, 643717713);
v3 = com.Newgrounds.MD5.md5_gg(v3, v2, v1, v4, x[v5 + 0], 20, -373897302);
v4 = com.Newgrounds.MD5.md5_gg(v4, v3, v2, v1, x[v5 + 5], 5, -701558691);
v1 = com.Newgrounds.MD5.md5_gg(v1, v4, v3, v2, x[v5 + 10], 9, 38016083);
v2 = com.Newgrounds.MD5.md5_gg(v2, v1, v4, v3, x[v5 + 15], 14, -660478335);
v3 = com.Newgrounds.MD5.md5_gg(v3, v2, v1, v4, x[v5 + 4], 20, -405537848);
v4 = com.Newgrounds.MD5.md5_gg(v4, v3, v2, v1, x[v5 + 9], 5, 568446438);
v1 = com.Newgrounds.MD5.md5_gg(v1, v4, v3, v2, x[v5 + 14], 9, -1019803690);
v2 = com.Newgrounds.MD5.md5_gg(v2, v1, v4, v3, x[v5 + 3], 14, -187363961);
v3 = com.Newgrounds.MD5.md5_gg(v3, v2, v1, v4, x[v5 + 8], 20, 1163531501);
v4 = com.Newgrounds.MD5.md5_gg(v4, v3, v2, v1, x[v5 + 13], 5, -1444681467);
v1 = com.Newgrounds.MD5.md5_gg(v1, v4, v3, v2, x[v5 + 2], 9, -51403784);
v2 = com.Newgrounds.MD5.md5_gg(v2, v1, v4, v3, x[v5 + 7], 14, 1735328473);
v3 = com.Newgrounds.MD5.md5_gg(v3, v2, v1, v4, x[v5 + 12], 20, -1926607734);
v4 = com.Newgrounds.MD5.md5_hh(v4, v3, v2, v1, x[v5 + 5], 4, -378558);
v1 = com.Newgrounds.MD5.md5_hh(v1, v4, v3, v2, x[v5 + 8], 11, -2022574463);
v2 = com.Newgrounds.MD5.md5_hh(v2, v1, v4, v3, x[v5 + 11], 16, 1839030562);
v3 = com.Newgrounds.MD5.md5_hh(v3, v2, v1, v4, x[v5 + 14], 23, -35309556);
v4 = com.Newgrounds.MD5.md5_hh(v4, v3, v2, v1, x[v5 + 1], 4, -1530992060);
v1 = com.Newgrounds.MD5.md5_hh(v1, v4, v3, v2, x[v5 + 4], 11, 1272893353);
v2 = com.Newgrounds.MD5.md5_hh(v2, v1, v4, v3, x[v5 + 7], 16, -155497632);
v3 = com.Newgrounds.MD5.md5_hh(v3, v2, v1, v4, x[v5 + 10], 23, -1094730640);
v4 = com.Newgrounds.MD5.md5_hh(v4, v3, v2, v1, x[v5 + 13], 4, 681279174);
v1 = com.Newgrounds.MD5.md5_hh(v1, v4, v3, v2, x[v5 + 0], 11, -358537222);
v2 = com.Newgrounds.MD5.md5_hh(v2, v1, v4, v3, x[v5 + 3], 16, -722521979);
v3 = com.Newgrounds.MD5.md5_hh(v3, v2, v1, v4, x[v5 + 6], 23, 76029189);
v4 = com.Newgrounds.MD5.md5_hh(v4, v3, v2, v1, x[v5 + 9], 4, -640364487);
v1 = com.Newgrounds.MD5.md5_hh(v1, v4, v3, v2, x[v5 + 12], 11, -421815835);
v2 = com.Newgrounds.MD5.md5_hh(v2, v1, v4, v3, x[v5 + 15], 16, 530742520);
v3 = com.Newgrounds.MD5.md5_hh(v3, v2, v1, v4, x[v5 + 2], 23, -995338651);
v4 = com.Newgrounds.MD5.md5_ii(v4, v3, v2, v1, x[v5 + 0], 6, -198630844);
v1 = com.Newgrounds.MD5.md5_ii(v1, v4, v3, v2, x[v5 + 7], 10, 1126891415);
v2 = com.Newgrounds.MD5.md5_ii(v2, v1, v4, v3, x[v5 + 14], 15, -1416354905);
v3 = com.Newgrounds.MD5.md5_ii(v3, v2, v1, v4, x[v5 + 5], 21, -57434055);
v4 = com.Newgrounds.MD5.md5_ii(v4, v3, v2, v1, x[v5 + 12], 6, 1700485571);
v1 = com.Newgrounds.MD5.md5_ii(v1, v4, v3, v2, x[v5 + 3], 10, -1894986606);
v2 = com.Newgrounds.MD5.md5_ii(v2, v1, v4, v3, x[v5 + 10], 15, -1051523);
v3 = com.Newgrounds.MD5.md5_ii(v3, v2, v1, v4, x[v5 + 1], 21, -2054922799);
v4 = com.Newgrounds.MD5.md5_ii(v4, v3, v2, v1, x[v5 + 8], 6, 1873313359);
v1 = com.Newgrounds.MD5.md5_ii(v1, v4, v3, v2, x[v5 + 15], 10, -30611744);
v2 = com.Newgrounds.MD5.md5_ii(v2, v1, v4, v3, x[v5 + 6], 15, -1560198380);
v3 = com.Newgrounds.MD5.md5_ii(v3, v2, v1, v4, x[v5 + 13], 21, 1309151649);
v4 = com.Newgrounds.MD5.md5_ii(v4, v3, v2, v1, x[v5 + 4], 6, -145523070);
v1 = com.Newgrounds.MD5.md5_ii(v1, v4, v3, v2, x[v5 + 11], 10, -1120210379);
v2 = com.Newgrounds.MD5.md5_ii(v2, v1, v4, v3, x[v5 + 2], 15, 718787259);
v3 = com.Newgrounds.MD5.md5_ii(v3, v2, v1, v4, x[v5 + 9], 21, -343485551);
v4 = com.Newgrounds.MD5.safe_add(v4, v10);
v3 = com.Newgrounds.MD5.safe_add(v3, v9);
v2 = com.Newgrounds.MD5.safe_add(v2, v8);
v1 = com.Newgrounds.MD5.safe_add(v1, v7);
v5 += 16;
}
return new Array(v4, v3, v2, v1);
};
v1.md5_cmn = function (q, a, b, x, s, t) {
return com.Newgrounds.MD5.safe_add(com.Newgrounds.MD5.bit_rol(com.Newgrounds.MD5.safe_add(com.Newgrounds.MD5.safe_add(a, q), com.Newgrounds.MD5.safe_add(x, t)), s), b);
};
v1.md5_ff = function (a, b, c, d, x, s, t) {
return com.Newgrounds.MD5.md5_cmn(b & c | ~b & d, a, b, x, s, t);
};
v1.md5_gg = function (a, b, c, d, x, s, t) {
return com.Newgrounds.MD5.md5_cmn(b & d | c & ~d, a, b, x, s, t);
};
v1.md5_hh = function (a, b, c, d, x, s, t) {
return com.Newgrounds.MD5.md5_cmn(b ^ c ^ d, a, b, x, s, t);
};
v1.md5_ii = function (a, b, c, d, x, s, t) {
return com.Newgrounds.MD5.md5_cmn(c ^ (b | ~d), a, b, x, s, t);
};
v1.bit_rol = function (num, cnt) {
return num << cnt | num >>> 32 - cnt;
};
v1.safe_add = function (x, y) {
var v1 = (x & 65535) + (y & 65535);
var v2 = (x >> 16) + (y >> 16) + (v1 >> 16);
return v2 << 16 | v1 & 65535;
};
v1.str2binl = function (str) {
var v3 = new Array();
var v4 = 255;
var v1 = 0;
while (v1 < str.length * 8) {
v3[v1 >> 5] |= (str.charCodeAt(v1 / 8) & v4) << v1 % 32;
v1 += 8;
}
return v3;
};
v1.binl2hex = function (binarray) {
var v4 = new String('');
var v3 = new String('0123456789abcdef');
var v1 = 0;
while (v1 < binarray.length * 4) {
v4 += v3.charAt(binarray[v1 >> 2] >> (v1 % 4) * 8 + 4 & 15) + v3.charAt(binarray[v1 >> 2] >> (v1 % 4) * 8 & 15);
++v1;
}
return v4;
};
ASSetPropFlags(com.Newgrounds.MD5.prototype, null, 1);
}
#endinitclip
}
movieClip 3041 __Packages.NewgroundsAPI {
#initclip
if (!_global.NewgroundsAPI) {
var v1 = function () {};
_global.NewgroundsAPI = v1;
var v2 = v1.prototype;
v1.connectMovie = function (id) {
if (!id) {
NewgroundsAPI.SendError('Missing required \'id\' parameter in NewgroundsAPI.connectMovie(id:Number)');
} else {
if (!NewgroundsAPI.tracker_id) {
NewgroundsAPI.SendMessage('Connecting to API gateway...');
NewgroundsAPI.tracker_id = id;
NewgroundsAPI.host = (_url.split('/'))[2].toLowerCase();
if (NewgroundsAPI.host.length < 1) {
NewgroundsAPI.host = 'localhost';
}
var v2 = new Object();
NewgroundsAPI.SendEvent(NewgroundsAPI.MOVIE_VIEWS);
}
}
};
v1.setMovieVersion = function (movie_version) {
if (!movie_version) {
NewgroundsAPI.SendError('Missing required \'version\' in NewgroundsAPI.setMovieVersion(version:String)');
} else {
NewgroundsAPI.version = movie_version;
}
};
v1.debugMode = function () {
NewgroundsAPI.debug = true;
};
v1.addCustomEvent = function (stat_id, stat_name) {
if (!stat_id) {
NewgroundsAPI.SendError('Missing required \'id\' parameter in NewgroundsAPI.AddCustomEvent(id:Number, event_name:String)');
} else {
if (!stat_name) {
NewgroundsAPI.SendError('Missing required \'event_name\' parameter in NewgroundsAPI.AddCustomEvent(id:Number, event_name:String)');
} else {
NewgroundsAPI.custom_events[stat_name] = NewgroundsAPI.CUSTOM_STATS + stat_id;
NewgroundsAPI.SendMessage('Created custom event: ' + stat_name);
}
}
};
v1.addCustomLink = function (stat_id, stat_name) {
if (!stat_id) {
NewgroundsAPI.SendError('Missing required \'id\' parameter in NewgroundsAPI.AddCustomLink(id:Number, link_name:String)');
} else {
if (!stat_name) {
NewgroundsAPI.SendError('Missing required \'link_name\' parameter in NewgroundsAPI.AddCustomLink(id:Number, link_name:String)');
} else {
NewgroundsAPI.custom_links[stat_name] = NewgroundsAPI.CUSTOM_STATS + stat_id;
NewgroundsAPI.SendMessage('Created custom link ' + stat_id + ': ' + stat_name);
}
}
};
v1.loadMySite = function () {
NewgroundsAPI.SendLink(NewgroundsAPI.AUTHOR_SITE);
};
v1.loadNewgrounds = function (special) {
if (special) {
var v1 = {'page': special};
}
NewgroundsAPI.SendLink(NewgroundsAPI.NEWGROUNDS, v1);
};
v1.logCustomEvent = function (event_name) {
if (!event_name) {
NewgroundsAPI.SendError('Missing required \'event_name\' parameter in NewgroundsAPI.logCustomEvent(event_name:String)');
} else {
if (!NewgroundsAPI.custom_events[event_name]) {
NewgroundsAPI.SendError('Attempted to log undefined custom event: ' + event_name);
} else {
NewgroundsAPI.SendEvent(NewgroundsAPI.custom_events[event_name]);
}
}
};
v1.loadCustomLink = function (link_name) {
if (!link_name) {
NewgroundsAPI.SendError('Missing required \'link_name\' parameter in NewgroundsAPI.loadCustomLink(link_name:String)');
} else {
if (!NewgroundsAPI.custom_links[link_name]) {
NewgroundsAPI.SendError('Attempted to open undefined custom link: ' + link_name);
} else {
NewgroundsAPI.SendLink(NewgroundsAPI.custom_links[link_name]);
}
}
};
v1.getAdURL = function () {
return NewgroundsAPI.movie_options.ad_url;
};
v1.getMovieURL = function () {
if (NewgroundsAPI.movie_options.movie_url) {
return NewgroundsAPI.movie_options.movie_url;
} else {
return 'Newgrounds.com';
}
};
v1.getNewVersionURL = function () {
return NewgroundsAPI.GATEWAY_URL + '?&id=' + NewgroundsAPI.tracker_id + '&host=' + escape(NewgroundsAPI.host) + '&stat=' + NewgroundsAPI.NEW_VERSION;
};
v1.SendEvent = function (id) {
NewgroundsAPI.SendStat(id, false);
};
v1.SendLink = function (id, extra) {
NewgroundsAPI.SendStat(id, true, extra);
};
v1.ReadGatewayData = function (params) {
for (var v2 in params) {
params[v2] = unescape(params[v2]);
NewgroundsAPI.movie_options[v2] = params[v2];
}
if (params.settings_loaded) {
NewgroundsAPI.SendMessage('You have successfully connected to the Newgrounds API gateway!');
NewgroundsAPI.SendMessage('Movie Identified as \'' + NewgroundsAPI.movie_options.movie_name + '\'');
if (NewgroundsAPI.movie_options.message) {
NewgroundsAPI.SendMessage(NewgroundsAPI.movie_options.message);
}
if (NewgroundsAPI.movie_options.ad_url) {
NewgroundsAPI.SendMessage('Your movie has been approved to run Flash Ads');
NewgroundsAPI.onAdsApproved(NewgroundsAPI.movie_options.ad_url);
}
if (NewgroundsAPI.movie_options.movie_version and NewgroundsAPI.movie_options.movie_version.toString() != NewgroundsAPI.version.toString()) {
NewgroundsAPI.SendMessage('WARNING: The movie version configured in your API settings does not match this movie\'s version!');
NewgroundsAPI.onNewVersionAvailable(NewgroundsAPI.movie_options.movie_version, NewgroundsAPI.getMovieURL(), NewgroundsAPI.getNewVersionURL());
}
if (NewgroundsAPI.movie_options.deny_host) {
NewgroundsAPI.SendMessage('You have blocked \'localHost\' in your API settings.');
NewgroundsAPI.SendMessage('If you wish to test your movie you will need to remove this block.');
NewgroundsAPI.onDenyHost(NewgroundsAPI.host, NewgroundsAPI.getMovieURL(), NewgroundsAPI.getNewVersionURL());
}
if (NewgroundsAPI.movie_options.request_portal_url == 1) {
var v4 = NewgroundsAPI.GATEWAY_URL + '?&id=' + NewgroundsAPI.tracker_id + '&portal_url=' + escape(_url);
var v3 = new XML();
v3.ignoreWhite = true;
v3.load(v4);
}
} else {
if (!NewgroundsAPI.movie_options.settings_loaded) {
NewgroundsAPI.SendError('Could not establish connection to the API gateway.');
}
}
};
v1.SendStat = function (stat_id, open_in_browser, extra) {
if (!NewgroundsAPI.tracker_id) {
NewgroundsAPI.SendError('API calls cannot be made without a valid movie id.');
NewgroundsAPI.SendError('Did you remember to add the "NewgroundsAPI.connectMovie()" code?');
} else {
var v7 = NewgroundsAPI.GATEWAY_URL + '?&id=' + NewgroundsAPI.tracker_id + '&host=' + escape(NewgroundsAPI.host) + '&stat=' + stat_id;
for (var v9 in extra) {
v7 += '&' + escape(v9) + '=' + escape(extra[v9]);
}
if (NewgroundsAPI.debug) {
v7 += '&debug=1';
}
if (open_in_browser) {
getURL(v7, '_blank');
} else {
var v10 = new XML();
v10.ignoreWhite = true;
v10.onLoad = function (success) {
var v6 = new Object();
var v3 = 0;
while (v3 < this.firstChild.childNodes.length) {
var v4 = this.firstChild.childNodes[v3];
var v5 = v4.nodeName;
var v2 = v4.attributes.value;
if (v2 == Number(v2)) {
v2 = Number(v2);
}
v6[v5] = v2;
++v3;
}
NewgroundsAPI.ReadGatewayData(v6);
};
v10.load(v7);
}
}
};
v1.SendError = function (msg) {};
v1.SendMessage = function (msg) {};
v1.InitTextFormats = function () {
if (!NewgroundsAPI.error_format) {
NewgroundsAPI.error_format = new TextFormat();
NewgroundsAPI.error_format.font = 'Arial Black';
NewgroundsAPI.error_format.size = 48;
NewgroundsAPI.error_format.color = 16711680;
}
if (!NewgroundsAPI.header_format) {
NewgroundsAPI.header_format = new TextFormat();
NewgroundsAPI.header_format.font = 'Arial Black';
NewgroundsAPI.header_format.size = 24;
NewgroundsAPI.header_format.color = 16777215;
}
if (!NewgroundsAPI.normal_format) {
NewgroundsAPI.normal_format = new TextFormat();
NewgroundsAPI.normal_format.font = 'Arial';
NewgroundsAPI.normal_format.bold = true;
NewgroundsAPI.normal_format.size = 12;
NewgroundsAPI.normal_format.color = 16777215;
}
if (!NewgroundsAPI.link_format) {
NewgroundsAPI.link_format = new TextFormat();
NewgroundsAPI.link_format.color = 16776960;
NewgroundsAPI.link_format.underline = true;
}
};
v1.onNewVersionAvailable = function (version, movie_url, redirect_url) {
NewgroundsAPI.InitTextFormats();
var v2 = new Object();
v2.x = Stage.width / 2;
v2.y = Stage.height / 2;
_root.createEmptyMovieClip('NGAPI_new_version_overlay', _root.getNextHighestDepth());
_root.NGAPI_new_version_overlay.lineStyle(1, 0, 100);
_root.NGAPI_new_version_overlay.beginFill(0, 70);
_root.NGAPI_new_version_overlay.moveTo(-10, -10);
_root.NGAPI_new_version_overlay.lineTo(-10, 1000);
_root.NGAPI_new_version_overlay.lineTo(1000, 1000);
_root.NGAPI_new_version_overlay.lineTo(1000, -10);
_root.NGAPI_new_version_overlay.lineTo(-10, -10);
_root.NGAPI_new_version_overlay.endFill();
_root.NGAPI_new_version_overlay.lineStyle(10, 0, 100);
_root.NGAPI_new_version_overlay.beginFill(51);
_root.NGAPI_new_version_overlay.moveTo(v2.x - 240, v2.y - 120);
_root.NGAPI_new_version_overlay.lineTo(v2.x + 240, v2.y - 120);
_root.NGAPI_new_version_overlay.lineTo(v2.x + 240, v2.y + 80);
_root.NGAPI_new_version_overlay.lineTo(v2.x - 240, v2.y + 80);
_root.NGAPI_new_version_overlay.lineTo(v2.x - 240, v2.y - 120);
_root.NGAPI_new_version_overlay.endFill();
_root.NGAPI_new_version_overlay.createEmptyMovieClip('exit', 1000);
_root.NGAPI_new_version_overlay.exit.lineStyle(2, 39423, 100);
_root.NGAPI_new_version_overlay.exit.beginFill(0, 50);
_root.NGAPI_new_version_overlay.exit.moveTo(v2.x + 210, v2.y - 110);
_root.NGAPI_new_version_overlay.exit.lineTo(v2.x + 230, v2.y - 110);
_root.NGAPI_new_version_overlay.exit.lineTo(v2.x + 230, v2.y - 90);
_root.NGAPI_new_version_overlay.exit.lineTo(v2.x + 210, v2.y - 90);
_root.NGAPI_new_version_overlay.exit.lineTo(v2.x + 210, v2.y - 110);
_root.NGAPI_new_version_overlay.exit.endFill();
_root.NGAPI_new_version_overlay.exit.moveTo(v2.x + 214, v2.y - 106);
_root.NGAPI_new_version_overlay.exit.lineTo(v2.x + 226, v2.y - 94);
_root.NGAPI_new_version_overlay.exit.moveTo(v2.x + 226, v2.y - 106);
_root.NGAPI_new_version_overlay.exit.lineTo(v2.x + 214, v2.y - 94);
_root.NGAPI_new_version_overlay.exit.onMouseUp = function () {
if (_root.NGAPI_new_version_overlay.exit.hitTest(_root._xmouse, _root._ymouse)) {
_root.NGAPI_new_version_overlay.removeMovieClip();
}
};
var v3 = 'Version ' + version + ' is now available at:' + '\n';
var v5 = v3.length;
v3 += movie_url;
var v4 = v3.length;
_root.NGAPI_new_version_overlay.createTextField('mouseblocker', 99, -10, -10, 1000, 1000);
_root.NGAPI_new_version_overlay.createTextField('newversion', 100, v2.x - 210, v2.y - 90, 400, 80);
_root.NGAPI_new_version_overlay.newversion.text = 'New Version Available!';
_root.NGAPI_new_version_overlay.newversion.setTextFormat(NewgroundsAPI.header_format);
_root.NGAPI_new_version_overlay.createTextField('message', 101, (Stage.width - 400) / 2, Stage.height / 2, 400, 40);
_root.NGAPI_new_version_overlay.message.text = v3;
_root.NGAPI_new_version_overlay.message.multiline = true;
_root.NGAPI_new_version_overlay.message.wordWrap = true;
_root.NGAPI_new_version_overlay.message.html = true;
_root.NGAPI_new_version_overlay.message.setTextFormat(NewgroundsAPI.normal_format);
NewgroundsAPI.link_format.url = redirect_url;
_root.NGAPI_new_version_overlay.message.setTextFormat(v5, v4, NewgroundsAPI.link_format);
};
v1.onDenyHost = function (hostname, movie_url, redirect_url) {
NewgroundsAPI.InitTextFormats();
_root.createEmptyMovieClip('NGAPI_deny_host_overlay', _root.getNextHighestDepth());
_root.NGAPI_deny_host_overlay.lineStyle(20, 0, 100);
_root.NGAPI_deny_host_overlay.beginFill(6684672);
_root.NGAPI_deny_host_overlay.moveTo(0, 0);
_root.NGAPI_deny_host_overlay.lineTo(Stage.width, 0);
_root.NGAPI_deny_host_overlay.lineTo(Stage.width, Stage.height);
_root.NGAPI_deny_host_overlay.lineTo(0, Stage.height);
_root.NGAPI_deny_host_overlay.lineTo(0, 0);
_root.NGAPI_deny_host_overlay.endFill();
var v2 = 'This movie has not been approved for use on ' + hostname + '.';
v2 += '\r\rFor an aproved copy, please visit:\r';
var v4 = v2.length;
v2 += movie_url;
var v3 = v2.length;
_root.NGAPI_deny_host_overlay.createTextField('mousekill', 100, 0, 0, Stage.width, Stage.height);
_root.NGAPI_deny_host_overlay.createTextField('error', 101, (Stage.width - 400) / 2, Stage.height / 2 - 100, 400, 200);
_root.NGAPI_deny_host_overlay.error.text = 'ERROR!';
_root.NGAPI_deny_host_overlay.error.setTextFormat(NewgroundsAPI.error_format);
_root.NGAPI_deny_host_overlay.createTextField('message', 102, (Stage.width - 400) / 2, Stage.height / 2, 400, 200);
_root.NGAPI_deny_host_overlay.message.text = v2;
_root.NGAPI_deny_host_overlay.message.multiline = true;
_root.NGAPI_deny_host_overlay.message.wordWrap = true;
_root.NGAPI_deny_host_overlay.message.html = true;
_root.NGAPI_deny_host_overlay.message.setTextFormat(NewgroundsAPI.normal_format);
NewgroundsAPI.link_format.url = redirect_url;
_root.NGAPI_deny_host_overlay.message.setTextFormat(v4, v3, NewgroundsAPI.link_format);
};
v1.isInstalled = function () {
return true;
};
v1.onAdsApproved = function (ad_url) {};
v1.movie_options = new Object();
v1.custom_events = new Object();
v1.custom_links = new Object();
v1.MOVIE_VIEWS = 1;
v1.AUTHOR_SITE = 2;
v1.NEWGROUNDS = 3;
v1.NEW_VERSION = 4;
v1.CUSTOM_STATS = 50;
v1.GATEWAY_URL = 'http://www.ngads.com/gateway.php';
ASSetPropFlags(_global.NewgroundsAPI.prototype, null, 1);
}
#endinitclip
}
frame 2 {
stop();
}
movieClip 521 {
frame 1 {
plat = false;
this.onEnterFrame = function () {
var v10 = _root.player._x;
var v8 = _root.player._y;
var v9 = _root.player.heighty;
var v11 = _root.player.widthy;
var v6 = _parent._parent._x + _parent._x + this._x;
var v4 = _parent._parent._y + _parent._y + this._y;
var v7 = this._width / 2;
var v5 = this._height / 3;
if (_root.player.yspeed > 0) {
yspeed = _root.player.yspeed + 5;
} else {
yspeed = 10;
}
if (v10 + v11 > v6 - v7 && v10 - v11 < v6 + v7 && v8 + v9 > v4 - v5 - yspeed && v8 + v9 <= v4 - v5) {
plat = true;
_root.player.plat = this;
_root.player.floor = v4 - v5;
} else {
plat = false;
}
};
}
}
movieClip 523 {
frame 1 {
p = 1;
ac = 0;
grow = true;
scale = this._xscale;
this.onEnterFrame = function () {
if (_root.paus == false) {
if (grow == true) {
ac += 0.2;
p += ac;
} else {
ac += 0.2;
p -= ac;
}
if (p > 15) {
ac = 0;
grow = false;
}
if (p < -5) {
ac = 0;
grow = true;
}
this._xscale = scale + p;
this._yscale = scale + p;
}
};
}
}
movieClip 524 {
frame 1 {
stop();
hit = false;
if (_parent._x + _parent._parent._x + this._x < _root.player._x) {
hit = true;
this.gotoAndStop(2);
}
this.onEnterFrame = function () {
if (_root.phase.sec == 0) {
hit = false;
}
if (_root.paus == false) {
if (hit == false) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
if (this.hitTest(_root.player.body) && hit == false) {
s = new Sound(this);
s.attachSound('teleportS');
s.setVolume(_root.vol);
s.start(0, 0);
hit = true;
++_root.secArea;
_root.transitiony('tranSec1');
}
}
};
}
}
movieClip 525 {
frame 1 {
stop();
hit = false;
if (_parent._x + _parent._parent._x + this._x < _root.player._x) {
hit = true;
this.gotoAndStop(2);
}
this.onEnterFrame = function () {
if (_root.phase.sec == 0) {
hit = false;
}
if (_root.paus == false) {
if (hit == false) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
if (this.hitTest(_root.player.body) && hit == false) {
s = new Sound(this);
s.attachSound('teleportS');
s.setVolume(_root.vol);
s.start(0, 0);
hit = true;
_root.transitiony('tranSec3');
++_root.secArea;
}
}
};
}
}
movieClip 526 {
frame 1 {
stop();
hit = false;
if (_parent._x + _parent._parent._x + this._x < _root.player._x) {
hit = true;
}
this.onEnterFrame = function () {
if (_root.phase.sec == 0) {
hit = false;
}
if (_root.paus == false) {
if (Math.abs(_parent._x + _parent._parent._x + this._x - _root.player._x) < 25 && hit == false) {
hit = true;
++_root.phase.sec;
}
}
};
}
}
movieClip 527 {
}
movieClip 530 {
}
movieClip 534 {
frame 1 {
stop();
hit = false;
if (_parent._x + _parent._parent._x + this._x < _root.player._x) {
hit = true;
this.gotoAndStop(2);
}
this.onEnterFrame = function () {
if (_root.phase.sec == 0) {
hit = false;
}
if (_root.paus == false) {
if (hit == false) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
if (this.hitTest(_root.player.body) && hit == false) {
s = new Sound(this);
s.attachSound('teleportS');
s.setVolume(_root.vol);
s.start(0, 0);
hit = true;
_root.transitiony('tranSec5');
++_root.secArea;
}
}
};
}
}
movieClip 535 {
frame 1 {
stop();
hit = false;
if (_parent._x + _parent._parent._x + this._x < _root.player._x) {
hit = true;
this.gotoAndStop(2);
}
this.onEnterFrame = function () {
if (_root.phase.sec == 0) {
hit = false;
}
if (_root.paus == false) {
if (hit == false) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
if (this.hitTest(_root.player.body) && hit == false) {
s = new Sound(this);
s.attachSound('teleportS');
s.setVolume(_root.vol);
s.start(0, 0);
hit = true;
_root.transitiony('tranSec7');
++_root.secArea;
}
}
};
}
}
movieClip 536 {
}
movieClip 539 {
}
movieClip 545 {
}
movieClip 587 {
}
movieClip 682 {
frame 1 {
stop();
this.onEnterFrame = function () {
if (this.hitTest(_root.player) && _root.player._currentframe == 17 && this._currentframe == 1) {
_root.checkM('Thanks...');
play();
}
};
}
frame 96 {
this.gotoAndPlay(2);
}
}
movieClip 683 {
frame 1 {
stop();
hit = false;
if (_parent._x + _parent._parent._x + this._x < _root.player._x) {
hit = true;
this.gotoAndStop(2);
}
this.onEnterFrame = function () {
if (_root.phase.sec == 0) {
hit = false;
}
if (_root.paus == false) {
if (hit == false) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
if (this.hitTest(_root.player.body) && hit == false) {
s = new Sound(this);
s.attachSound('teleportS');
s.setVolume(_root.vol);
s.start(0, 0);
hit = true;
++_root.secArea;
_root.transitiony('tranSec9');
}
}
};
}
}
movieClip 684 {
frame 1 {
stop();
hit = false;
if (_parent._x + _parent._parent._x + this._x < _root.player._x) {
hit = true;
this.gotoAndStop(2);
}
this.onEnterFrame = function () {
if (_root.phase.sec == 0) {
hit = false;
}
if (_root.paus == false) {
if (hit == false) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
if (this.hitTest(_root.player.body) && hit == false) {
s = new Sound(this);
s.attachSound('teleportS');
s.setVolume(_root.vol);
s.start(0, 0);
hit = true;
++_root.secArea;
_root.transitiony('tranSec11');
}
}
};
}
}
movieClip 685 {
}
movieClip 717 dirtFalling {
frame 1 {
stop();
this.onEnterFrame = function () {
if (this._currentframe < 29) {
if (_root.player.freeze2 == true || _root.bg._currentframe == 7) {
play();
} else {
stop();
}
} else {
stop();
}
};
}
frame 3 {
s = new Sound(this);
s.attachSound('explodeShort');
s.setVolume(_root.vol);
s.start(0, 0);
}
}
movieClip 718 {
}
movieClip 721 {
frame 1 {
stop();
hit = false;
this.onEnterFrame = function () {
if (_root.paus == false) {
if (this.hitTest(_root.player.body) && hit == false) {
hit = true;
++_root.phase.sec;
}
}
};
}
}
movieClip 722 {
}
movieClip 726 {
}
movieClip 728 {
}
movieClip 730 {
frame 1 {
hit = false;
yspeed = 0;
this.onEnterFrame = function () {
if (_root.paus == false) {
if (hit == true) {
if (this._alpha > 0) {
this._alpha -= 3;
this._y -= 1.5;
}
}
if (this.hitTest(_root.player.body) && hit == false) {
s = new Sound(this);
s.attachSound('itemSpeed');
s.setVolume(_root.vol);
s.start(0, 0);
_root.player.getHealth();
hit = true;
}
}
};
}
}
movieClip 732 {
frame 1 {
hit = false;
yspeed = 0;
this.onEnterFrame = function () {
if (_root.paus == false) {
if (hit == true) {
if (this._alpha > 0) {
this._alpha -= 3;
this._y -= 1.5;
}
}
if (this.hitTest(_root.player.body) && hit == false) {
s.stop();
s = new Sound(this);
s.attachSound('itemSlurp');
s.setVolume(_root.vol);
s.start(0, 0);
_root.player.getSpecial();
hit = true;
}
}
};
}
}
movieClip 733 {
frame 1 {
stop();
hit = false;
if (_parent._x + _parent._parent._x + this._x < _root.player._x) {
hit = true;
this.gotoAndStop(2);
}
this.onEnterFrame = function () {
if (_root.paus == false) {
if (hit == false) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
if (this.hitTest(_root.player.body) && hit == false) {
s = new Sound(this);
s.attachSound('teleportS');
s.setVolume(_root.vol);
s.start(0, 0);
hit = true;
_root.transitiony('tranSec2');
}
}
};
}
}
movieClip 734 {
}
movieClip 736 {
frame 1 {
stop();
hit = false;
if (_parent._x + _parent._parent._x + this._x < _root.player._x) {
hit = true;
this.gotoAndStop(2);
}
this.onEnterFrame = function () {
if (_root.paus == false) {
if (hit == false) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
if (this.hitTest(_root.player.body) && hit == false) {
s = new Sound(this);
s.attachSound('teleportS');
s.setVolume(_root.vol);
s.start(0, 0);
hit = true;
_root.transitiony('tranBon1');
}
}
};
}
}
movieClip 737 {
}
movieClip 739 {
frame 1 {
stop();
hit = false;
if (_parent._x + _parent._parent._x + this._x < _root.player._x) {
hit = true;
this.gotoAndStop(2);
}
this.onEnterFrame = function () {
if (_root.paus == false) {
if (hit == false) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
if (this.hitTest(_root.player.body) && hit == false) {
s = new Sound(this);
s.attachSound('teleportS');
s.setVolume(_root.vol);
s.start(0, 0);
hit = true;
_root.transitiony('tranSec6');
}
}
};
}
}
movieClip 740 {
}
movieClip 742 {
frame 1 {
stop();
hit = false;
if (_parent._x + _parent._parent._x + this._x < _root.player._x) {
hit = true;
this.gotoAndStop(2);
}
this.onEnterFrame = function () {
if (_root.paus == false) {
if (hit == false) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
if (this.hitTest(_root.player.body) && hit == false) {
s = new Sound(this);
s.attachSound('teleportS');
s.setVolume(_root.vol);
s.start(0, 0);
hit = true;
_root.transitiony('tranSec8');
}
}
};
}
}
movieClip 743 {
}
movieClip 745 {
frame 1 {
stop();
hit = false;
if (_parent._x + _parent._parent._x + this._x < _root.player._x) {
hit = true;
this.gotoAndStop(2);
}
this.onEnterFrame = function () {
if (_root.paus == false) {
if (hit == false) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
if (this.hitTest(_root.player.body) && hit == false) {
s = new Sound(this);
s.attachSound('teleportS');
s.setVolume(_root.vol);
s.start(0, 0);
hit = true;
_root.transitiony('tranBon2');
}
}
};
}
}
movieClip 746 {
}
movieClip 748 {
frame 1 {
stop();
hit = false;
if (_parent._x + _parent._parent._x + this._x < 0) {
hit = true;
this.gotoAndStop(2);
}
this.onEnterFrame = function () {
if (_root.paus == false) {
if (hit == false) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
if (this.hitTest(_root.player.body) && hit == false) {
s = new Sound(this);
s.attachSound('teleportS');
s.setVolume(_root.vol);
s.start(0, 0);
hit = true;
_root.transitiony('tranSec12');
}
}
};
}
}
movieClip 749 {
}
movieClip 753 {
}
movieClip 754 {
frame 1 {
hit = false;
yspeed = 0;
this.onEnterFrame = function () {
if (_root.paus == false) {
if (hit == true) {
if (this._alpha > 0) {
this._alpha -= 3;
this._y -= 1.5;
}
}
if (this.hitTest(_root.player.body) && hit == false) {
_root.player.giant = true;
s = new Sound(this);
s.attachSound('explodeShort');
s.setVolume(_root.vol);
s.start(0, 0);
_root.frontFlash('flashPower');
_root.attachMovie('timer1', 'timer', 10006);
_root.timer._x = 350;
_root.timer._y = 50;
hit = true;
}
}
};
}
}
movieClip 755 {
}
movieClip 757 {
}
movieClip 758 {
frame 1 {
hit = false;
yspeed = 0;
this.onEnterFrame = function () {
if (_root.paus == false) {
if (hit == true) {
if (this._alpha > 0) {
this._alpha -= 3;
this._y -= 1.5;
}
}
if (this.hitTest(_root.player.body) && hit == false) {
e = new Sound(this);
e.attachSound('fireBlow');
e.setVolume(_root.vol);
e.start(0, 0);
_root.frontFlash('flashPower');
_root.attachMovie('timer2', 'timer', 10006);
_root.timer._x = 350;
_root.timer._y = 50;
_root.attachMovie('explosion', 'exps', 10008);
_root.player.saw = true;
_root.exps._x = _root.player._x;
_root.exps._y = _root.player._y;
_root.exps._xscale = 280;
_root.exps._yscale = 280;
hit = true;
}
}
};
}
}
movieClip 759 {
}
movieClip 760 bg {
frame 1 {
function reset() {
secret = false;
boss = false;
fight = false;
fightOnce = false;
heighty = 650;
this._y = currentH;
_root.player.regScrolly = false;
_root.player.playScrolly = true;
_root.player.floor = _root.floor;
}
function fightReset() {
if (fight == true) {
fight = false;
}
}
function afterSec() {
_root.phase.n = 0;
_root.player.floor = _root.floor;
secret = false;
boss = false;
fight = false;
fightOnce = false;
heighty = 650;
this._y = currentH;
_root.player.regScrolly = false;
_root.player.playScrolly = true;
this._x = xBefore - 400;
}
function secretS() {
_root.phase.n = 0;
resetX();
_root.player.floor = _root.floor;
secret = true;
fight = false;
fightOnce = false;
}
function bossS() {
_root.phase.n = 0;
resetX();
fight = false;
fightOnce = false;
secret = false;
}
function resetX() {
this._x = this._width / 2 - 20;
}
function saveX() {
xBefore = this._x;
}
stop();
size = this._xscale;
this._x = this._width / 2 - 20;
boss = false;
fight = false;
fightOnce = false;
lEdge = 0;
rEdge = 0;
heighty = 650;
currentH = this._y;
xBefore;
secret = false;
frm;
this.onEnterFrame = function () {
if (fight == false) {
fightOnce = false;
lEdge = -this._width / 2 + 740;
rEdge = this._width / 2 - 20;
_root.lEdge = -this._width / 2 + 740;
_root.rEdge = this._width / 2 - 20;
} else {
if (fightOnce == false) {
fightOnce = true;
var v4 = this._x - 50;
var v5 = this._x + 50;
lEdge = v4;
rEdge = v5;
_root.lEdge = v4;
_root.rEdge = v5;
}
}
if (secret == true) {
var v3 = _root.player._y + _root.player.heighty;
if (_root.player.floor == _root.floor) {
if (this._y < heighty && _root.player._y > 100) {
_root.player.regScrolly = false;
_root.player.playScrolly = true;
}
if (this._y < heighty && _root.player._y <= 100) {
_root.player.regScrolly = true;
_root.player.playScrolly = false;
} else {
if (this._y > currentH && v3 < 225) {
_root.player.regScrolly = false;
_root.player.playScrolly = true;
} else {
if (this._y > currentH && v3 >= 225) {
_root.player.regScrolly = true;
_root.player.playScrolly = false;
}
}
}
} else {
_root.player.regScrolly = false;
_root.player.playScrolly = true;
}
}
if (boss == false) {
if (this._x >= lEdge && this._x <= rEdge) {
_root.player.regScroll = true;
_root.player.playScroll = false;
} else {
if (this._x < lEdge) {
if (_root.player._x <= 350) {
_root.player.regScroll = true;
_root.player.playScroll = false;
} else {
_root.player.regScroll = false;
_root.player.playScroll = true;
}
} else {
if (this._x > rEdge) {
if (_root.player._x >= 350) {
_root.player.regScroll = true;
_root.player.playScroll = false;
} else {
_root.player.regScroll = false;
_root.player.playScroll = true;
}
}
}
}
} else {
_root.player.regScroll = false;
_root.player.playScroll = true;
if (this._x < lEdge && _root.boss._x > 350) {
_root.boss.regScroll = false;
}
if (this._x < lEdge && _root.boss._x <= 350) {
_root.boss.regScroll = true;
} else {
if (this._x > rEdge && _root.boss._x < 350) {
_root.boss.regScroll = false;
} else {
if (this._x > rEdge && _root.boss._x >= 350) {
_root.boss.regScroll = true;
}
}
}
}
frm = this._currentframe;
};
}
}
movieClip 762 {
}
movieClip 764 {
frame 1 {
function soundHit() {
t.stop();
t = new Sound(this);
var v3 = random(2);
if (v3 == 0) {
t.attachSound('punch');
} else {
t.attachSound('punch2');
}
t.setVolume(_root.vol);
t.start(0, 0);
}
stop();
hit = false;
hitT;
justHit;
hits = 0;
dam;
xspeed;
yspeed;
specialHit = false;
hitTime = 0;
this.onEnterFrame = function () {
if (_parent.dead == false) {
if (_root.player.specialOn == false && specialHit == true) {
specialHit = false;
_parent.timer -= 30;
_parent.jump = true;
_parent.hit = true;
_parent.newHit = true;
_parent.attack = false;
_parent.walk = false;
_parent.health -= 100;
_parent.xspeed = -5 + random(11);
_parent.yspeed = -5 - random(10);
}
if (_root.player.specialOn == true) {
if (_root.player._x < _parent._x && _root.player._xscale > 0) {
specialHit = true;
}
if (_root.player._x > _parent._x && _root.player._xscale < 0) {
specialHit = true;
}
}
if (_root.paus == false) {
if (_parent.backD == true) {
--timer;
if (timer > 5) {
hits = 0;
_root.shake(_root, 2, 2, 1);
} else {
if (hits == 0) {
hits = -1;
_root.reset();
}
}
if (timer <= 0) {
justHit = 0;
}
if (_root.player.duck == true) {
hitT = _root.player.bod.h;
} else {
hitT = _root.player.body;
}
if (_parent.jump == false && _parent.hit == false && this.hitTest(hitT) && _root.player.attack == false && hit == false && _root.player.recover == false) {
if (_root.player.speedPower == false && _root.player.attackPower == false && _root.player.giant == false) {
_root.player.xspeed = -_root.player.xspeed * 2;
_root.player.hitMedium(-1 + random(3), _parent);
hit = true;
}
} else {
if (this.hitTest(_root.player.body) == false) {
hit = false;
}
}
--hitTime;
if (_root.player.attack == true && _parent.backD == true && _parent.jumpT == false) {
if (_root.bg._currentframe == 5 || _parent.jump == false) {
hitT = _root.player.bod.at;
if (this.hitTest(hitT)) {
if (justHit != _root.player._currentframe) {
justHit = _root.player._currentframe;
if (_root.bg._currentframe != 5) {
timer = 17;
} else {
timer = 12;
}
if (_root.player._xscale > 0) {
neg = 1;
} else {
neg = -1;
}
if (_root.player._currentframe == 7) {
dam = 25;
xspeed = 2 * neg;
yspeed = -5 - random(2);
}
if (_root.player._currentframe == 8 || _root.player._currentframe == 18) {
dam = 25;
xspeed = 2 * neg;
yspeed = -9 - random(3);
}
if (_root.player._currentframe == 9) {
if (_parent._x > _root.player._x) {
neg = 1;
} else {
neg = -1;
}
dam = 25;
xspeed = 5 * neg;
yspeed = -12 - random(4);
}
if (_root.player._currentframe == 10) {
dam = 25;
xspeed = (9 + random(3)) * neg;
yspeed = -6 - random(3);
}
if (_root.player._currentframe == 11) {
dam = 25;
xspeed = 2 * neg;
yspeed = -2 - random(3);
}
if (_root.player._currentframe == 12) {
dam = 25;
xspeed = 2 * neg;
yspeed = -15 - random(4);
}
if (_root.player._currentframe == 13) {
dam = 25;
xspeed = 1 * neg;
yspeed = -3;
}
if (_root.player._currentframe == 14) {
_parent.hammer = true;
dam = 25;
if (_parent._x > _root.player._x) {
neg = 1;
} else {
neg = -1;
}
xspeed = (random(6) + 17) * neg;
yspeed = -6;
}
if (_root.player._currentframe == 15) {
if (_parent._x > _root.player._x) {
neg = 1;
} else {
neg = -1;
}
dam = 20;
xspeed = (random(5) + 2) * neg;
yspeed = -11 - random(7);
}
if (_root.player._currentframe == 17) {
if (_parent._x > _root.player._x) {
neg = 1;
} else {
neg = -1;
}
dam = 50;
xspeed = (random(5) + 2) * neg;
yspeed = -6 - random(7);
}
if (_root.player._currentframe == 19) {
_root.soundHit1();
dam = 30;
xspeed = -10 + random(21);
yspeed = -10 - random(5);
}
if (hitTime <= 0) {
soundHit();
_root.player.special += 1;
_parent.timer -= 30;
_parent.jump = true;
_parent.hit = true;
_parent.newHit = true;
_parent.attack = false;
_parent.walk = false;
_parent.xspeed = xspeed;
_parent.yspeed = yspeed;
_parent.health -= dam;
} else {
_root.player.xspeed = -xspeed;
}
}
}
}
}
}
}
}
};
}
}
movieClip 784 {
frame 1 {
stop();
this.onEnterFrame = function () {
if (_root.paus == false) {
if (_parent.jump == true && this._currentframe < 11) {
this.nextFrame();
}
} else {
gotoAndStop(7 + random(4));
}
};
}
frame 1 {
s = new Sound(this);
s.attachSound('boss2Hit1');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 3 {
s = new Sound(this);
s.attachSound('wiff2');
s.setVolume(_root.vol);
s.start(0, 0);
}
}
movieClip 798 {
frame 1 {
this.onEnterFrame = function () {
if (_root.player.duck == true) {
hitT = _root.player.bod.h;
} else {
hitT = _root.player.body;
}
if (this.hitTest(hitT) && _root.player.recover == false) {
if (_parent._parent._xscale < 0) {
scale = -1;
} else {
scale = 1;
}
_root.player.hitStrong(scale, _parent._parent);
}
};
}
}
movieClip 812 {
frame 1 {
this.onEnterFrame = function () {
if (_root.paus == false) {
play();
} else {
stop();
}
};
}
frame 9 {
s = new Sound(this);
s.attachSound('wiff2');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 13 {
s = new Sound(this);
s.attachSound('wiff');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 26 {
_parent.attack = false;
_parent.gotoAndStop(2);
}
}
movieClip 835 {
frame 1 {
this.onEnterFrame = function () {
if (_root.paus == false) {
play();
} else {
stop();
}
};
}
frame 9 {
s = new Sound(this);
s.attachSound('knife');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 21 {
s = new Sound(this);
s.attachSound('knife');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 41 {
_parent.attack = false;
_parent.gotoAndStop(2);
}
}
movieClip 847 {
frame 1 {
this.onEnterFrame = function () {
if (_root.player.duck == true) {
hitT = _root.player.bod.h;
} else {
hitT = _root.player.body;
}
if (this.hitTest(hitT) && _root.player.recover == false) {
if (_parent._parent._xscale < 0) {
scale = -1;
} else {
scale = 1;
}
_root.player.hitMedium(scale, _parent._parent);
}
};
}
}
movieClip 886 {
frame 1 {
_root.paus = true;
_root.letter = true;
}
frame 18 {
s = new Sound(this);
s.attachSound('picoGun');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 20 {
this.onEnterFrame = function () {
_root.shake(_root, 3, 3, 1);
};
}
frame 28 {
_root.paus = false;
}
frame 28 {
_root.reset();
}
frame 49 {
_parent.attack = false;
_parent.gotoAndStop(2);
}
}
movieClip 959 {
frame 1 {
_root.paus = true;
_root.letter = true;
}
frame 7 {
s = new Sound(this);
s.attachSound('fireBlow');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 27 {
s = new Sound(this);
s.attachSound('picoTank');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 30 {
this.onEnterFrame = function () {
_root.shake(_root, 5, 2, 1);
};
}
frame 32 {
_root.reset();
}
frame 35 {
s = new Sound(this);
s.attachSound('tankDrive');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 37 {
this.onEnterFrame = function () {
_root.shake(_root, 2, 2, 1);
};
}
frame 49 {
_root.paus = false;
_root.reset();
}
frame 51 {
_parent.attack = false;
_parent.gotoAndStop(2);
}
}
movieClip 979 {
frame 1 {
stop();
this.onEnterFrame = function () {
if (_root.paus == false) {
if (this._currentframe == 17) {
if (_parent.jump == false) {
this.nextFrame();
}
} else {
this.nextFrame();
}
} else {
stop();
}
};
}
frame 1 {
s = new Sound(this);
s.attachSound('picoHit2');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 19 {
_parent.hit = false;
_parent.gotoAndStop(2);
}
}
movieClip 989 {
}
movieClip 1020 {
}
movieClip 1021 {
frame 1 {
_root.paus = true;
_root.letter = true;
_root.checkM('Recount');
}
frame 17 {
s = new Sound(this);
s.attachSound('picoHit');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 18 {
this.onEnterFrame = function () {
if (_root.music.getVolume() > 0) {
_root.music.setVolume(_root.music.getVolume() - 15);
} else {
_root.music.stop();
}
if (this._currentframe > 17 && this._currentframe < 31) {
_root.shake(_root, 4, 3, 0);
}
};
}
frame 18 {
s = new Sound(this);
s.attachSound('fireBlow');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 27 {
s = new Sound(this);
s.attachSound('hiss');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 38 {
_root.reset();
}
frame 38 {
s = new Sound(this);
s.attachSound('explodeLong');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 40 {
this.onEnterFrame = function () {
if (this._currentframe >= 40 && this._currentframe < 45) {
_root.shake(_root, 5, 3, 1);
}
};
}
frame 45 {
_root.reset();
}
frame 96 {
_root.transitiony('tranCredit');
stop();
}
}
movieClip 1022 bossPico {
frame 1 {
function facePlayer() {
if (_root.player._x < this._x) {
this._xscale = -scale;
} else {
this._xscale = scale;
}
}
xspeed = 0;
yspeed = 0;
phase = 0;
sec = 0;
timer = 25;
jump = false;
floor = _root.floor;
fall = 5;
scale = 100;
shakeT = 15;
this._xscale = scale;
this._yscale = scale;
heighty = this._height / 2;
widthy = this._width / 2;
if (_root.player._x < this._x) {
this._xscale = -scale;
}
backD = true;
regScroll = true;
attack = false;
hit = false;
sideX = 10;
sideY = -45;
jumpT = false;
health = 600;
dead = false;
stop();
phase = 0;
landT = 0;
sT = 0;
mus = false;
_root.attachMovie('healthBossUber', 'healthBoss', 10001);
_root.healthBoss._x = 450;
_root.healthBoss._y = 50;
this.onEnterFrame = function () {
if (_root.paus == false || _root.paus == true && phase == 0) {
_root.healthBoss.health = Math.round(health / 6);
if (health <= 0) {
dead = true;
if (jump == false) {
this.gotoAndStop(9);
}
}
if (this._currentframe != 3) {
jumpT = false;
}
this._y += yspeed;
if (backD == true) {
floor = _root.floor;
this.swapDepths(4400);
} else {
floor = _root.floor + 100;
this.swapDepths(6600);
}
if (regScroll == true) {
if (this._x < 349) {
if (xspeed < 0) {
_root.bossScroll(xspeed);
} else {
this._x += xspeed;
}
}
if (this._x > 351) {
if (xspeed > 0) {
_root.bossScroll(xspeed);
} else {
this._x += xspeed;
}
}
if (this._x >= 349 && this._x <= 351) {
this._x += xspeed;
}
} else {
this._x += xspeed;
}
if (this._x + widthy > 700) {
this._x = 700 - widthy;
this.xspeed = xspeed / -2;
}
if (this._x - widthy < 0) {
this._x = widthy;
this.xspeed = xspeed / -2;
}
if (this._y + heighty < floor) {
jump = true;
}
if (jump == true) {
yspeed += fall;
}
if (yspeed > 70) {
yspeed = 70;
}
if (this._y + heighty > floor && jump == true) {
this._y = floor - heighty;
if (yspeed > 20) {
s = new Sound(this);
s.attachSound('landBoss');
s.setVolume(_root.vol);
s.start(0, 0);
landT = 6;
}
yspeed = 0;
jump = false;
}
if (landT > 0) {
sT = 0;
--landT;
_root.shake(_root, 5, 2, 1);
} else {
if (sT == 0) {
sT = -1;
_root.reset();
}
}
if (jump == false) {
if (xspeed > 0) {
xspeed -= dec;
}
if (xspeed < 0) {
xspeed += dec;
}
if (Math.abs(xspeed) < 1) {
xspeed = 0;
}
}
if (dead == false) {
if (hit == false) {
if (phase == 0) {
_root.letter = true;
_root.paus = true;
_root.letter = true;
_root.paus = true;
if (_root.music.getVolume() > 0 && mus == false) {
_root.music.setVolume(_root.music.getVolume() - 25);
} else {
if (mus == false) {
mus = true;
_root.music.stop();
_root.music.attachSound('mBoss3');
_root.music.setVolume(_root.vol);
_root.music.start(0, 199);
}
}
if (jump == true) {
_root.shake(_root, 2, 2, 0);
}
if (jump == false) {
if (timer > 24) {
_root.reset();
}
if (timer > 18) {
_root.shake(_root, 4, 2, 1);
} else {
if (_root._x != 0 || _root._y != 0) {
_root.reset();
}
}
--timer;
if (timer < 0) {
timer = 0;
_root.paus = false;
++phase;
}
}
}
if (phase == 1) {
--timer;
if (jump == false && jumpT == false && attack == false && (sec == 0 || sec == 4 || sec == 2)) {
facePlayer();
}
if (this._y < -200) {
xspeed = 0;
if (sec == 2) {
this._x = 350;
}
if (sec == 4) {
this._x = 150;
}
if (sec == 6) {
this._x = 550;
}
if (sec == 8) {
this._x = 150;
}
}
if (timer < 0) {
timer = 5;
if (sec == 0 && jump == false && jumpT == false && attack == false) {
++sec;
attack = true;
this.gotoAndStop(4 + random(2));
}
if (sec == 1 && jump == false && attack == false && jumpT == false) {
++sec;
jump = true;
sideY = -70;
sideX = 0;
xspeed = sideX;
yspeed = sideY;
this.gotoAndStop(3);
}
if (sec == 2 && jump == false && jumpT == false && attack == false) {
++sec;
attack = true;
this.gotoAndStop(4 + random(2));
}
if (sec == 3 && attack == false && jump == false && jumpT == false) {
++sec;
jump = true;
sideX = -3;
xspeed = sideX;
yspeed = sideY;
this.gotoAndStop(3);
}
if (sec == 4 && jump == false && jumpT == false && attack == false) {
++sec;
attack = true;
this.gotoAndStop(4 + random(2));
}
if (sec == 5 && jump == false && attack == false && jumpT == false) {
++sec;
jump = true;
sideY = -70;
sideX = 4;
xspeed = sideX;
yspeed = sideY;
this.gotoAndStop(3);
}
if (sec == 6 && jump == false && jumpT == false && attack == false) {
this._xscale = -scale;
++sec;
attack = true;
this.gotoAndStop(4 + random(2));
}
if (sec == 7 && jump == false && attack == false && jumpT == false) {
++sec;
jump = true;
sideY = -70;
sideX = -6;
xspeed = sideX;
yspeed = sideY;
this.gotoAndStop(3);
timer = 50;
_root.warning();
}
if (sec == 8 && jump == false && jumpT == false && attack == false) {
this._xscale = scale;
++sec;
attack = true;
this.gotoAndStop(7);
}
if (sec == 9 && jump == false && attack == false && jumpT == false) {
sec = 0;
++phase;
timer = 3;
}
}
}
if (phase == 2) {
--timer;
if (this._y < -200) {
if (sec == 11) {
this._x = 550;
}
}
if (timer < 0) {
timer = 1;
if (sec == 0 && jump == false && attack == false && jumpT == false) {
++sec;
sideY = -55;
sideX = 4;
jump = true;
xspeed = sideX;
yspeed = sideY;
this.gotoAndStop(3);
this._xscale = scale;
}
if (sec == 1 && jump == false && jumpT == false && attack == false) {
facePlayer();
++sec;
attack = true;
this.gotoAndStop(4 + random(2));
}
if (sec == 2 && attack == false && jump == false && jumpT == false) {
++sec;
jump = true;
xspeed = sideX;
yspeed = sideY;
this._xscale = scale;
this.gotoAndStop(3);
}
if (sec == 3 && jump == false && jumpT == false && attack == false) {
facePlayer();
++sec;
attack = true;
this.gotoAndStop(4 + random(2));
}
if (sec == 4 && attack == false && jump == false && jumpT == false) {
++sec;
jump = true;
xspeed = sideX;
yspeed = sideY;
this._xscale = scale;
this.gotoAndStop(3);
}
if (sec == 5 && jump == false && jumpT == false && attack == false) {
++sec;
facePlayer();
attack = true;
this.gotoAndStop(4 + random(2));
}
if (sec == 6 && attack == false && jump == false && jumpT == false) {
++sec;
jump = true;
xspeed = sideX;
yspeed = sideY;
this._xscale = scale;
this.gotoAndStop(3);
}
if (sec == 7 && jump == false && jumpT == false && attack == false) {
++sec;
attack = true;
facePlayer();
this.gotoAndStop(4 + random(2));
}
if (sec == 8 && attack == false && jump == false && jumpT == false) {
++sec;
jump = true;
xspeed = sideX;
yspeed = sideY;
this._xscale = scale;
this.gotoAndStop(3);
}
if (sec == 9 && jump == false && jumpT == false && attack == false) {
++sec;
attack = true;
facePlayer();
this.gotoAndStop(4 + random(2));
}
if (sec == 10 && attack == false && jump == false && jumpT == false) {
++sec;
jump = true;
sideY = -75;
xspeed = sideX;
yspeed = sideY;
this.gotoAndStop(3);
_root.warning();
}
if (sec == 11 && jump == false && jumpT == false && attack == false) {
sec = 0;
++phase;
}
}
}
if (phase == 3) {
--timer;
if (this._y < -200) {
if (sec == 3) {
this._x = 100;
}
}
if (timer < 0) {
timer = 15;
if (sec == 0 && jump == false && attack == false && jumpT == false) {
this._xscale = -scale;
++sec;
}
if (sec == 1 && jump == false && jumpT == false && attack == false) {
++sec;
attack = true;
this.gotoAndStop(6);
}
if (sec == 2 && attack == false && jump == false && jumpT == false) {
++sec;
jump = true;
sideY = -80;
sideX = -5;
xspeed = sideX;
yspeed = sideY;
this.gotoAndStop(3);
_root.warning();
}
if (sec == 3 && attack == false && jump == false && jumpT == false) {
this._xscale = scale;
++sec;
attack = true;
this.gotoAndStop(6);
}
if (sec == 4 && jump == false && attack == false && jumpT == false) {
sec = 0;
timer = 5;
phase = 1;
}
}
}
if (phase == 4) {
--timer;
if (timer < 0) {
if (sec == 0 && jump == false && attack == false && jumpT == false) {
this._xscale = -scale;
++sec;
sideX = -5;
jump = true;
xspeed = sideX;
yspeed = sideY;
this.gotoAndStop(3);
}
if (sec == 1 && jumpT == false) {
++sec;
}
if (sec == 2 && jump == false && attack == false && jumpT == false) {
facePlayer();
++sec;
attack = true;
this.gotoAndStop(7);
}
if (sec == 3 && jump == false && attack == false && jumpT == false) {
sideX = -5;
this._xscale = -scale;
++sec;
sideX = -10;
jump = true;
xspeed = sideX;
yspeed = sideY;
this.gotoAndStop(3);
}
if (sec == 4 && jump == false && attack == false && jumpT == false) {
facePlayer();
++sec;
attack = true;
this.gotoAndStop(7);
}
if (sec == 5 && jump == false && attack == false && jumpT == false) {
facePlayer();
++sec;
sideY = -60;
sideX = 30;
jump = true;
xspeed = sideX;
yspeed = sideY;
this.gotoAndStop(3);
timer = 12;
}
if (sec == 6 && jumpT == false) {
++sec;
}
if (sec == 7 && jump == false && attack == false && jumpT == false) {
this._xscale = -scale;
timer = 5;
phase = 1;
sec = 0;
}
}
}
} else {
this.gotoAndStop(8);
}
if (hit == false && jump == false && attack == false && jumpT == false) {
this.gotoAndStop(2);
}
}
}
};
}
}
movieClip 1026 {
}
movieClip 1028 {
}
movieClip 1049 {
frame 1 {
stop();
this.onEnterFrame = function () {
if (_root.paus == false) {
play();
} else {
stop();
}
};
}
}
movieClip 1064 {
frame 1 {
this.onEnterFrame = function () {
if (_root.paus == false) {
play();
} else {
stop();
}
};
}
frame 14 {
s = new Sound(this);
s.attachSound('wiff2');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 28 {
_parent.attack = false;
_parent.gotoAndStop(2);
}
}
movieClip 1108 {
frame 1 {
this.onEnterFrame = function () {
if (_root.paus == false) {
play();
} else {
stop();
}
};
}
frame 7 {
s = new Sound(this);
s.attachSound('snort');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 26 {
s = new Sound(this);
s.attachSound('hiss');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 35 {
s = new Sound(this);
s.attachSound('hiss');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 56 {
_parent.attack = false;
_parent.gotoAndStop(2);
}
}
movieClip 1126 {
frame 1 {
stop();
this.onEnterFrame = function () {
if (_root.paus == false) {
this.nextFrame();
} else {
stop();
}
};
}
frame 1 {
s = new Sound(this);
s.attachSound('boss2Hit');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 12 {
_parent.hit = false;
_parent.gotoAndStop(2);
}
}
movieClip 1158 {
frame 1 {
_root.letter = true;
_root.paus = true;
h = 1;
stop();
this.onEnterFrame = function () {
this.nextFrame();
if (this._currentframe > 13 && this._currentframe < 30) {
h += 0.1;
_root.shake(_root, h, 3, 0);
} else {
_root.reset();
}
};
}
frame 9 {
s = new Sound(this);
s.attachSound('boss2Hit');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 14 {
s = new Sound(this);
s.attachSound('fireBlow');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 19 {
s = new Sound(this);
s.attachSound('hiss');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 27 {
_root.flashFront('flashBlackout');
}
frame 33 {
++_root.phase.sec;
_parent.removeMovieClip();
}
}
movieClip 1159 bossRat1 {
frame 1 {
function facePlayer() {
if (_root.player._x < this._x) {
this._xscale = -scale;
} else {
this._xscale = scale;
}
}
function getSpeed() {
if (_root.player._x < this._x) {
xspeed = -sideX;
} else {
xspeed = sideX;
}
}
xspeed = 0;
yspeed = 0;
phase = 0;
sec = 0;
timer = 25;
jump = false;
floor = _root.floor;
fall = 2.5;
scale = 50;
shakeT = 15;
this._xscale = scale;
this._yscale = scale;
heighty = this._height / 2;
widthy = this._width / 2;
if (_root.player._x < this._x) {
this._xscale = -scale;
}
backD = true;
regScroll = true;
attack = false;
hit = false;
sideX = 5;
sideY = -45;
jumpT = false;
health = 400;
dead = false;
stop();
phase = 0;
landT = 0;
sT = 0;
mus = false;
_root.attachMovie('healthBossUber', 'healthBoss', 10001);
_root.healthBoss._x = 450;
_root.healthBoss._y = 50;
this.onEnterFrame = function () {
if (_root.paus == false || _root.paus == true && phase == 0) {
_root.healthBoss.health = Math.round(health / 4);
if (health <= 10) {
dead = true;
if (jump == false) {
this.gotoAndStop(9);
}
}
jumpT = false;
this._y += yspeed;
if (backD == true) {
floor = _root.floor;
this.swapDepths(4400);
} else {
floor = _root.floor + 100;
this.swapDepths(6600);
}
if (regScroll == true) {
if (this._x < 349) {
if (xspeed < 0) {
_root.bossScroll(xspeed);
} else {
this._x += xspeed;
}
}
if (this._x > 351) {
if (xspeed > 0) {
_root.bossScroll(xspeed);
} else {
this._x += xspeed;
}
}
if (this._x >= 349 && this._x <= 351) {
this._x += xspeed;
}
} else {
this._x += xspeed;
}
if (this._x + widthy > 700) {
this._x = 700 - widthy;
this.xspeed = xspeed / -2;
}
if (this._x - widthy < 0) {
this._x = widthy;
this.xspeed = xspeed / -2;
}
if (this._y + heighty < floor) {
jump = true;
}
if (jump == true) {
yspeed += fall;
}
if (yspeed > 60) {
yspeed = 60;
}
if (this._y + heighty > floor && jump == true) {
this._y = floor - heighty;
if (yspeed > 20) {
s = new Sound(this);
s.attachSound('landBoss');
s.setVolume(_root.vol);
s.start(0, 0);
landT = 6;
}
yspeed = 0;
jump = false;
}
if (landT > 0) {
sT = 0;
--landT;
_root.shake(_root, 5, 2, 1);
} else {
if (sT == 0) {
sT = -1;
_root.reset();
}
}
if (jump == false) {
if (xspeed > 0) {
xspeed -= dec;
}
if (xspeed < 0) {
xspeed += dec;
}
if (Math.abs(xspeed) < 1) {
xspeed = 0;
}
}
if (dead == false) {
if (hit == false) {
if (phase == 0) {
_root.letter = true;
_root.paus = true;
if (_root.music.getVolume() > 0 && mus == false) {
_root.music.setVolume(_root.music.getVolume() - 25);
} else {
if (mus == false) {
mus = true;
_root.music.stop();
_root.music.attachSound('mBoss2');
_root.music.setVolume(_root.vol);
_root.music.start(0, 199);
}
}
if (jump == true) {
_root.shake(_root, 2, 2, 0);
}
if (jump == false) {
if (timer > 24) {
_root.reset();
}
if (timer > 18) {
_root.shake(_root, 4, 2, 1);
} else {
if (_root._x != 0 || _root._y != 0) {
_root.reset();
}
}
--timer;
if (timer < 0) {
timer = 250;
_root.paus = false;
++phase;
}
}
}
if (phase == 1) {
--timer;
if (sec == 0 && jump == false && jumpT == false && attack == false) {
++sec;
attack = true;
this.gotoAndStop(5);
}
if (sec == 1 && jump == false && attack == false) {
if (Math.abs(this._x - _root.player._x) < 150) {
facePlayer();
attack = true;
this.gotoAndStop(4);
} else {
facePlayer();
this.gotoAndStop(3);
getSpeed();
}
}
if (timer <= 0) {
++phase;
sec = 0;
timer = 0;
}
}
if (phase == 2) {
--timer;
if (timer <= 0) {
if (sec == 0) {
facePlayer();
_root.frontFlash('flashBlackout');
++sec;
xspeed = 0;
this._x = 100;
this._y = -700;
jump = true;
timer = 15;
}
if (sec == 1 && jump == false && jumpT == false && attack == false) {
facePlayer();
++sec;
attack = true;
this.gotoAndStop(5);
}
if (sec == 2 && attack == false && jump == false && jumpT == false) {
facePlayer();
++sec;
_root.frontFlash('flashBlackout');
xspeed = 0;
this._x = 600;
this._y = -700;
jump = true;
timer = 15;
}
if (sec == 3 && jump == false && jumpT == false && attack == false) {
facePlayer();
++sec;
attack = true;
this.gotoAndStop(5);
}
if (sec == 4 && jump == false && jumpT == false && attack == false) {
sec = 1;
phase = 1;
timer = 150;
}
}
}
if (phase == 3) {
--timer;
if (jump == false && jumpT == false && attack == false && sec == 2) {
this._xscale = scale;
}
if (timer < 0) {
timer = 15;
if (sec == 0 && jump == false && attack == false && jumpT == false) {
this._xscale = -scale;
++sec;
jumpT = true;
sideX = -15;
this.gotoAndStop(3);
}
if (sec == 1 && jump == false && jumpT == false && attack == false) {
++sec;
attack = true;
this.gotoAndStop(6);
}
if (sec == 2 && attack == false && jump == false && jumpT == false) {
++sec;
attack = true;
this.gotoAndStop(6);
}
if (sec == 3 && jump == false && attack == false && jumpT == false) {
sec = 0;
timer = 0;
++phase;
}
}
}
if (phase == 4) {
--timer;
if (timer < 0) {
if (sec == 0 && jump == false && attack == false && jumpT == false) {
this._xscale = -scale;
++sec;
jumpT = true;
sideX = -5;
this.gotoAndStop(3);
}
if (sec == 1 && jumpT == false) {
backD = false;
++sec;
}
if (sec == 2 && jump == false && attack == false && jumpT == false) {
if (_root.phase.n == 0) {
facePlayer();
++sec;
attack = true;
this.gotoAndStop(7);
}
}
if (sec == 3 && jump == false && attack == false && jumpT == false) {
if (_root.phase.n == 0) {
sideX = -5;
this._xscale = -scale;
++sec;
jumpT = true;
sideX = -10;
this.gotoAndStop(3);
}
}
if (sec == 4 && jump == false && attack == false && jumpT == false) {
facePlayer();
if (_root.phase.n == 0) {
++sec;
attack = true;
this.gotoAndStop(7);
}
}
if (sec == 5 && jump == false && attack == false && jumpT == false) {
facePlayer();
if (_root.phase.n == 0) {
++sec;
jumpT = true;
sideY = -60;
sideX = 30;
this.gotoAndStop(3);
timer = 12;
}
}
if (sec == 6 && jumpT == false) {
backD = true;
++sec;
}
if (sec == 7 && jump == false && attack == false && jumpT == false) {
this._xscale = -scale;
timer = 5;
phase = 1;
sec = 0;
}
}
}
} else {
this.gotoAndStop(6);
}
if (hit == false && jump == false && attack == false && xspeed == 0) {
this.gotoAndStop(2);
}
}
}
};
}
}
movieClip 1162 {
}
movieClip 1176 {
frame 1 {
stop();
this.onEnterFrame = function () {
if (_root.paus == false) {
if (this._currentframe == 6) {
_parent.xspeed = _parent.sideX;
_parent.yspeed = _parent.sideY;
_parent.jumpT = false;
}
if (this._currentframe == 11) {
stop();
} else {
this.nextFrame();
}
}
};
}
frame 3 {
s = new Sound(this);
s.attachSound('e5Hit');
s.setVolume(_root.vol);
s.start(0, 0);
}
}
movieClip 1192 {
frame 1 {
this.onEnterFrame = function () {
if (_root.paus == false) {
play();
} else {
stop();
}
};
}
frame 8 {
s = new Sound(this);
s.attachSound('slash');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 23 {
_parent.attack = false;
_parent.gotoAndStop(2);
}
}
movieClip 1221 {
frame 1 {
this.onEnterFrame = function () {
if (_root.paus == false) {
play();
} else {
stop();
}
};
}
frame 11 {
s = new Sound(this);
s.attachSound('slash');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 20 {
s = new Sound(this);
s.attachSound('knife');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 43 {
_parent.attack = false;
_parent.gotoAndStop(2);
}
}
movieClip 1243 {
frame 1 {
this.onEnterFrame = function () {
if (_root.paus == false) {
play();
} else {
stop();
}
};
}
frame 1 {
s = new Sound(this);
s.attachSound('snort');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 16 {
s = new Sound(this);
s.attachSound('hiss');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 31 {
_parent.attack = false;
_parent.gotoAndStop(2);
}
}
movieClip 1256 {
frame 1 {
stop();
this.onEnterFrame = function () {
if (_root.paus == false) {
if (this._currentframe == 7) {
if (_parent.jump == false) {
this.nextFrame();
}
} else {
this.nextFrame();
}
} else {
stop();
}
};
}
frame 1 {
s = new Sound(this);
s.attachSound('e5Hit');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 12 {
_parent.hit = false;
_parent.gotoAndStop(2);
}
}
movieClip 1275 {
frame 1 {
_root.letter = true;
_root.paus = true;
stop();
_root.checkM('Animal Control');
this.onEnterFrame = function () {
if (this._currentframe < 15) {
if (_root.music.getVolume() > 0) {
_root.music.setVolume(_root.music.getVolume() - 20);
} else {
_root.music.stop();
}
_root.shake(_root, 7, 4, 1);
this.nextFrame();
}
nextFrame();
if (this._currentframe < 40) {
_root.shake(_root, 3, 3, 0);
}
if (this._currentframe == 41) {
_root.reset();
}
if (this._currentframe > 54 && this._currentframe < 58) {
_root.shake(_root, 3, 3, 1);
}
if (this._currentframe == 59) {
_root.reset();
}
};
}
frame 25 {
s = new Sound(this);
s.attachSound('mouse');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 54 {
s = new Sound(this);
s.attachSound('landPlayer');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 60 {
s = new Sound(this);
s.attachSound('cat');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 125 {
_root.transitiony('tranL3');
stop();
}
}
movieClip 1276 bossRat2 {
frame 1 {
function facePlayer() {
if (_root.player._x < this._x) {
this._xscale = -scale;
} else {
this._xscale = scale;
}
}
xspeed = 0;
yspeed = 0;
phase = 0;
sec = 0;
timer = 25;
jump = false;
floor = _root.floor;
fall = 5;
scale = 50;
shakeT = 15;
this._xscale = scale;
this._yscale = scale;
heighty = this._height / 2;
widthy = this._width / 2;
if (_root.player._x < this._x) {
this._xscale = -scale;
}
backD = true;
regScroll = true;
attack = false;
hit = false;
sideX = 10;
sideY = -45;
jumpT = false;
health = 300;
dead = false;
stop();
phase = 0;
landT = 0;
sT = 0;
this.onEnterFrame = function () {
if (_root.paus == false || _root.paus == true && phase == 0) {
_root.healthBoss.health = Math.round(health / 3);
if (health <= 0) {
dead = true;
if (jump == false && _root.player._currentframe == 2) {
this.gotoAndStop(8);
}
}
if (this._currentframe != 3) {
jumpT = false;
}
this._y += yspeed;
if (backD == true) {
floor = _root.floor;
this.swapDepths(4400);
} else {
floor = _root.floor + 100;
this.swapDepths(6600);
}
if (regScroll == true) {
if (this._x < 349) {
if (xspeed < 0) {
_root.bossScroll(xspeed);
} else {
this._x += xspeed;
}
}
if (this._x > 351) {
if (xspeed > 0) {
_root.bossScroll(xspeed);
} else {
this._x += xspeed;
}
}
if (this._x >= 349 && this._x <= 351) {
this._x += xspeed;
}
} else {
this._x += xspeed;
}
if (this._x + widthy > 700) {
this._x = 700 - widthy;
this.xspeed = xspeed / -2;
}
if (this._x - widthy < 0) {
this._x = widthy;
this.xspeed = xspeed / -2;
}
if (this._y + heighty < floor) {
jump = true;
}
if (jump == true) {
yspeed += fall;
}
if (yspeed > 70) {
yspeed = 70;
}
if (this._y + heighty > floor && jump == true) {
this._y = floor - heighty;
if (yspeed > 20) {
s = new Sound(this);
s.attachSound('landBoss');
s.setVolume(_root.vol);
s.start(0, 0);
landT = 6;
}
yspeed = 0;
jump = false;
}
if (landT > 0) {
sT = 0;
--landT;
_root.shake(_root, 5, 2, 1);
} else {
if (sT == 0) {
sT = -1;
_root.reset();
}
}
if (jump == false) {
if (xspeed > 0) {
xspeed -= dec;
}
if (xspeed < 0) {
xspeed += dec;
}
if (Math.abs(xspeed) < 1) {
xspeed = 0;
}
}
if (dead == false) {
if (hit == false) {
if (phase == 0) {
_root.letter = true;
_root.paus = true;
if (jump == true) {
_root.shake(_root, 2, 2, 0);
}
if (jump == false) {
if (timer > 24) {
_root.reset();
}
if (timer > 18) {
_root.shake(_root, 4, 2, 1);
} else {
if (_root._x != 0 || _root._y != 0) {
_root.reset();
}
}
--timer;
if (timer < 0) {
timer = 0;
_root.paus = false;
++phase;
}
}
}
if (phase == 1) {
--timer;
if (jump == false && jumpT == false && attack == false && (sec == 0 || sec == 4 || sec == 2)) {
facePlayer();
}
if (this._y < -200) {
if (sec == 2) {
this._x = 100;
}
if (sec == 4) {
this._x = 600;
}
}
if (timer < 0) {
timer = 3;
if (sec == 0 && jump == false && jumpT == false && attack == false) {
++sec;
attack = true;
this.gotoAndStop(4);
}
if (sec == 1 && jump == false && attack == false && jumpT == false) {
++sec;
this._xscale = -scale;
jumpT = true;
sideY = -70;
sideX = -6;
this.gotoAndStop(3);
}
if (sec == 2 && jump == false && jumpT == false && attack == false) {
++sec;
attack = true;
this.gotoAndStop(5);
}
if (sec == 3 && attack == false && jump == false && jumpT == false) {
++sec;
sideX = 3;
jumpT = true;
this.gotoAndStop(3);
}
if (sec == 4 && jump == false && jumpT == false && attack == false) {
this._xscale = -scale;
++sec;
attack = true;
this.gotoAndStop(5);
}
if (sec == 5 && jump == false && attack == false && jumpT == false) {
sec = 0;
++phase;
timer = 3;
}
}
}
if (phase == 2) {
--timer;
if (this._y < -200) {
if (sec == 9) {
this._x = 350;
}
}
if (timer < 0) {
timer = 0;
if (sec == 0 && jump == false && attack == false && jumpT == false) {
this._xscale = -scale;
++sec;
jumpT = true;
sideY = -35;
sideX = -15;
this.gotoAndStop(3);
}
if (sec == 1 && jump == false && jumpT == false && attack == false) {
++sec;
attack = true;
this.gotoAndStop(4);
}
if (sec == 2 && attack == false && jump == false && jumpT == false) {
this._xscale = -scale;
++sec;
jumpT = true;
sideY = -35;
sideX = -15;
this.gotoAndStop(3);
}
if (sec == 3 && jump == false && jumpT == false && attack == false) {
++sec;
attack = true;
this.gotoAndStop(4);
}
if (sec == 4 && attack == false && jump == false && jumpT == false) {
this._xscale = scale;
++sec;
jumpT = true;
sideY = -35;
sideX = 15;
this.gotoAndStop(3);
}
if (sec == 5 && jump == false && jumpT == false && attack == false) {
++sec;
attack = true;
this.gotoAndStop(4);
}
if (sec == 6 && attack == false && jump == false && jumpT == false) {
this._xscale = scale;
++sec;
jumpT = true;
sideY = -35;
sideX = 15;
this.gotoAndStop(3);
}
if (sec == 7 && jump == false && jumpT == false && attack == false) {
++sec;
attack = true;
this.gotoAndStop(4);
}
if (sec == 8 && attack == false && jump == false && jumpT == false) {
this._xscale = -scale;
++sec;
jumpT = true;
sideY = -80;
sideX = -5;
this.gotoAndStop(3);
}
if (sec == 9 && jump == false && jumpT == false && attack == false) {
++sec;
attack = true;
this.gotoAndStop(6);
}
if (sec == 10 && jump == false && jumpT == false && attack == false) {
this._xscale = scale;
++sec;
attack = true;
this.gotoAndStop(6);
}
if (sec == 11 && attack == false && jump == false && jumpT == false) {
phase = 1;
sec = 1;
}
if (sec == 12 && jump == false && jumpT == false && attack == false) {
++sec;
attack = true;
this.gotoAndStop(4);
}
if (sec == 13 && jump == false && jumpT == false && attack == false) {
sec = 0;
++phase;
}
}
}
if (phase == 3) {
--timer;
if (jump == false && jumpT == false && attack == false && sec == 2) {
this._xscale = scale;
}
if (timer < 0) {
timer = 15;
if (sec == 0 && jump == false && attack == false && jumpT == false) {
this._xscale = -scale;
++sec;
jumpT = true;
sideX = -15;
this.gotoAndStop(3);
}
if (sec == 1 && jump == false && jumpT == false && attack == false) {
++sec;
attack = true;
this.gotoAndStop(6);
}
if (sec == 2 && attack == false && jump == false && jumpT == false) {
++sec;
attack = true;
this.gotoAndStop(6);
}
if (sec == 3 && jump == false && attack == false && jumpT == false) {
sec = 0;
timer = 0;
++phase;
}
}
}
if (phase == 4) {
--timer;
if (timer < 0) {
if (sec == 0 && jump == false && attack == false && jumpT == false) {
this._xscale = -scale;
++sec;
jumpT = true;
sideX = -5;
this.gotoAndStop(3);
}
if (sec == 1 && jumpT == false) {
backD = false;
++sec;
}
if (sec == 2 && jump == false && attack == false && jumpT == false) {
if (_root.phase.n == 0) {
facePlayer();
++sec;
attack = true;
this.gotoAndStop(7);
}
}
if (sec == 3 && jump == false && attack == false && jumpT == false) {
if (_root.phase.n == 0) {
sideX = -5;
this._xscale = -scale;
++sec;
jumpT = true;
sideX = -10;
this.gotoAndStop(3);
}
}
if (sec == 4 && jump == false && attack == false && jumpT == false) {
facePlayer();
if (_root.phase.n == 0) {
++sec;
attack = true;
this.gotoAndStop(7);
}
}
if (sec == 5 && jump == false && attack == false && jumpT == false) {
facePlayer();
if (_root.phase.n == 0) {
++sec;
jumpT = true;
sideY = -60;
sideX = 30;
this.gotoAndStop(3);
timer = 12;
}
}
if (sec == 6 && jumpT == false) {
backD = true;
++sec;
}
if (sec == 7 && jump == false && attack == false && jumpT == false) {
this._xscale = -scale;
timer = 5;
phase = 1;
sec = 0;
}
}
}
} else {
this.gotoAndStop(7);
}
if (hit == false && jump == false && attack == false && jumpT == false) {
this.gotoAndStop(2);
}
}
}
};
}
}
movieClip 1280 {
}
movieClip 1282 {
}
movieClip 1295 {
frame 1 {
stop();
this.onEnterFrame = function () {
if (_root.paus == false) {
if (this._currentframe == 7) {
_parent.xspeed = _parent.sideX;
_parent.yspeed = _parent.sideY;
_parent.jumpT = false;
}
if (this._currentframe == 12) {
stop();
} else {
this.nextFrame();
}
}
};
}
frame 2 {
s = new Sound(this);
s.attachSound('boss1Hit');
s.setVolume(_root.vol);
s.start(0, 0);
}
}
movieClip 1314 {
frame 1 {
this.onEnterFrame = function () {
if (_root.paus == false) {
play();
} else {
stop();
}
};
}
frame 1 {
s = new Sound(this);
s.attachSound('slash');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 7 {
s = new Sound(this);
s.attachSound('wiff2');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 18 {
_parent.attack = false;
_parent.gotoAndStop(2);
}
}
movieClip 1360 {
frame 1 {
this.onEnterFrame = function () {
if (_root.paus == false) {
play();
} else {
stop();
}
};
}
frame 5 {
s = new Sound(this);
s.attachSound('boss1Open');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 26 {
s = new Sound(this);
s.attachSound('boss1Shoot');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 38 {
s = new Sound(this);
s.attachSound('fireBlow');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 46 {
_parent.attack = false;
_parent.gotoAndStop(2);
}
}
movieClip 1365 {
frame 1 {
this.onEnterFrame = function () {
if (_root.player.duck == true) {
hitT = _root.player.bod.h;
} else {
hitT = _root.player.body;
}
if (this.hitTest(hitT) && _root.player.recover == false) {
if (_parent._parent._parent._xscale < 0) {
scale = -1;
} else {
scale = 1;
}
_root.player.hitStrong(scale, _parent._parent._parent);
}
};
}
}
movieClip 1388 {
frame 1 {
this.onEnterFrame = function () {
if (_root.paus == false) {
play();
} else {
stop();
}
};
}
frame 6 {
s = new Sound(this);
s.attachSound('boss1Open');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 19 {
s = new Sound(this);
s.attachSound('explodeShort');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 42 {
_parent.attack = false;
_parent.gotoAndStop(2);
}
}
movieClip 1417 {
frame 1 {
this.onEnterFrame = function () {
if (_root.paus == false) {
if (this._currentframe >= 11 && this._currentframe <= 23) {
_root.shake(_root, 2, 2, 1);
} else {
_root.reset();
}
if (this._currentframe == 11) {
_root.shake(_root, 6, 3, 1);
_root.addEnemy('enemy', 1, _root.player._x - 100, -100);
}
if (this._currentframe == 19) {
_root.shake(_root, 6, 3, 1);
_root.addEnemy('enemy', 1, _root.player._x + 100, -100);
}
play();
} else {
stop();
}
};
}
frame 9 {
s = new Sound(this);
s.attachSound('landBoss');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 18 {
s = new Sound(this);
s.attachSound('landBoss');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 29 {
_parent.attack = false;
_parent.gotoAndStop(2);
}
}
movieClip 1422 {
frame 1 {
stop();
this.onEnterFrame = function () {
if (_root.paus == false) {
if (this._currentframe == 3) {
if (_parent.jump == false) {
this.nextFrame();
}
} else {
this.nextFrame();
}
} else {
stop();
}
};
}
frame 1 {
s = new Sound(this);
s.attachSound('boss1Hit');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 4 {
_parent.hit = false;
_parent.gotoAndStop(2);
}
}
movieClip 1486 {
frame 1 {
stop();
_root.checkM('UberPWNT');
this.onEnterFrame = function () {
if (_root.paus == false && this._currentframe < 15) {
_root.paus = true;
_root.letter = true;
}
if (this._currentframe < 15) {
if (_root.music.getVolume() > 0) {
_root.music.setVolume(_root.music.getVolume() - 20);
} else {
_root.music.stop();
}
_root.shake(_root, 7, 4, 1);
this.nextFrame();
}
if (this._currentframe == 15) {
_root.reset();
this.nextFrame();
}
if (this._currentframe > 15) {
this.nextFrame();
if (this._currentframe > 28 && this._currentframe < 33) {
_root.shake(_root, 4, 4, 1);
}
if (this._currentframe >= 33 && this._currentframe < 40) {
_root.reset();
}
if (this._currentframe > 40 && this._currentframe < 45) {
_root.shake(_root, 2, 4, 0);
}
if (this._currentframe >= 45 && this._currentframe < 56) {
_root.reset();
}
if (this._currentframe > 56 && this._currentframe < 61) {
_root.shake(_root, 2, 4, 0);
}
if (this._currentframe >= 61 && this._currentframe < 78) {
_root.reset();
}
if (this._currentframe > 79 && this._currentframe < 112) {
_root.shake(_root, 5, 4, 0);
}
if (this._currentframe >= 112 && this._currentframe < 114) {
_root.reset();
}
}
};
}
frame 6 {
s = new Sound(this);
s.attachSound('boss1Open');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 29 {
_parent.swapDepths(_root.player.getDepth() + 1);
}
frame 29 {
s = new Sound(this);
s.attachSound('landBoss');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 40 {
s = new Sound(this);
s.attachSound('explodeShort');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 57 {
s = new Sound(this);
s.attachSound('explodeShort');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 79 {
s = new Sound(this);
s.attachSound('explodeLoud');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 116 {
_root.transitiony('tranL2');
_parent.removeMovieClip();
}
}
movieClip 1487 bossUber {
frame 1 {
function facePlayer() {
if (_root.player._x < this._x) {
this._xscale = -scale;
} else {
this._xscale = scale;
}
}
xspeed = 0;
yspeed = 0;
phase = 0;
sec = 0;
timer = 25;
jump = false;
floor = _root.floor;
fall = 5;
scale = 50;
shakeT = 15;
this._xscale = scale;
this._yscale = scale;
heighty = this._height / 2;
widthy = this._width / 2;
if (_root.player._x < this._x) {
this._xscale = -scale;
}
backD = true;
regScroll = true;
attack = false;
hit = false;
sideX = 10;
sideY = -45;
jumpT = false;
health = 600;
dead = false;
stop();
phase = 0;
landT = 0;
sT = 0;
_root.attachMovie('healthBossUber', 'healthBoss', 10001);
_root.healthBoss._x = 450;
_root.healthBoss._y = 50;
mus = false;
this.onEnterFrame = function () {
if (_root.paus == false || _root.paus == true && phase == 0) {
_root.healthBoss.health = Math.round(health / 6);
if (health <= 0) {
dead = true;
if (jump == false) {
this.gotoAndStop(9);
}
}
if (this._currentframe != 3) {
jumpT = false;
}
this._y += yspeed;
if (backD == true) {
floor = _root.floor;
this.swapDepths(4400);
} else {
floor = _root.floor + 100;
this.swapDepths(6600);
}
if (regScroll == true) {
if (this._x < 349) {
if (xspeed < 0) {
_root.bossScroll(xspeed);
} else {
this._x += xspeed;
}
}
if (this._x > 351) {
if (xspeed > 0) {
_root.bossScroll(xspeed);
} else {
this._x += xspeed;
}
}
if (this._x >= 349 && this._x <= 351) {
this._x += xspeed;
}
} else {
this._x += xspeed;
}
if (this._x + widthy > 700) {
this._x = 700 - widthy;
this.xspeed = xspeed / -2;
}
if (this._x - widthy < 0) {
this._x = widthy;
this.xspeed = xspeed / -2;
}
if (this._y + heighty < floor) {
jump = true;
}
if (jump == true) {
yspeed += fall;
}
if (yspeed > 70) {
yspeed = 70;
}
if (this._y + heighty > floor && jump == true) {
this._y = floor - heighty;
if (yspeed > 20) {
s = new Sound(this);
s.attachSound('landBoss');
s.setVolume(_root.vol);
s.start(0, 0);
landT = 6;
}
yspeed = 0;
jump = false;
}
if (landT > 0) {
sT = 0;
--landT;
_root.shake(_root, 5, 2, 1);
} else {
if (sT == 0) {
sT = -1;
_root.reset();
}
}
if (jump == false) {
if (xspeed > 0) {
xspeed -= dec;
}
if (xspeed < 0) {
xspeed += dec;
}
if (Math.abs(xspeed) < 1) {
xspeed = 0;
}
}
if (dead == false) {
if (hit == false) {
if (phase == 0) {
_root.letter = true;
_root.paus = true;
if (_root.music.getVolume() > 0 && mus == false) {
_root.music.setVolume(_root.music.getVolume() - 25);
} else {
if (mus == false) {
mus = true;
_root.music.stop();
_root.music.attachSound('mBoss1');
_root.music.setVolume(_root.vol);
_root.music.start(0, 199);
}
}
if (jump == true) {
_root.shake(_root, 2, 2, 0);
}
if (jump == false) {
if (timer > 24) {
_root.reset();
}
if (timer > 18) {
_root.shake(_root, 4, 2, 1);
} else {
if (_root._x != 0 || _root._y != 0) {
_root.reset();
}
}
--timer;
if (timer < 0) {
timer = 0;
_root.paus = false;
++phase;
}
}
}
if (phase == 1) {
--timer;
if (jump == false && jumpT == false && attack == false && (sec == 0 || sec == 4 || sec == 2)) {
facePlayer();
}
if (this._y < -200) {
if (sec == 2) {
this._x = 350;
}
if (sec == 4) {
this._x = 150;
}
}
if (timer < 0) {
timer = 5;
if (sec == 0 && jump == false && jumpT == false && attack == false) {
++sec;
attack = true;
this.gotoAndStop(5);
}
if (sec == 1 && jump == false && attack == false && jumpT == false) {
++sec;
jumpT = true;
sideY = -70;
sideX = -2;
this.gotoAndStop(3);
}
if (sec == 2 && jump == false && jumpT == false && attack == false) {
++sec;
attack = true;
this.gotoAndStop(5);
}
if (sec == 3 && attack == false && jump == false && jumpT == false) {
++sec;
jumpT = true;
this.gotoAndStop(3);
}
if (sec == 4 && jump == false && jumpT == false && attack == false) {
++sec;
attack = true;
this.gotoAndStop(5);
}
if (sec == 5 && jump == false && attack == false && jumpT == false) {
sec = 0;
++phase;
timer = 3;
}
}
}
if (phase == 2) {
--timer;
this._xscale = scale;
if (timer < 0) {
timer = 1;
if (sec == 0 && jump == false && attack == false && jumpT == false) {
++sec;
jumpT = true;
sideY = -55;
sideX = 4;
this.gotoAndStop(3);
}
if (sec == 1 && jump == false && jumpT == false && attack == false) {
++sec;
attack = true;
this.gotoAndStop(4);
}
if (sec == 2 && attack == false && jump == false && jumpT == false) {
++sec;
jumpT = true;
this.gotoAndStop(3);
}
if (sec == 3 && jump == false && jumpT == false && attack == false) {
++sec;
attack = true;
this.gotoAndStop(4);
}
if (sec == 4 && attack == false && jump == false && jumpT == false) {
++sec;
jumpT = true;
this.gotoAndStop(3);
}
if (sec == 5 && jump == false && jumpT == false && attack == false) {
++sec;
attack = true;
this.gotoAndStop(4);
}
if (sec == 6 && attack == false && jump == false && jumpT == false) {
++sec;
jumpT = true;
this.gotoAndStop(3);
}
if (sec == 7 && jump == false && jumpT == false && attack == false) {
++sec;
attack = true;
this.gotoAndStop(4);
}
if (sec == 8 && attack == false && jump == false && jumpT == false) {
++sec;
jumpT = true;
this.gotoAndStop(3);
}
if (sec == 9 && jump == false && jumpT == false && attack == false) {
++sec;
attack = true;
this.gotoAndStop(4);
}
if (sec == 10 && attack == false && jump == false && jumpT == false) {
++sec;
jumpT = true;
this.gotoAndStop(3);
}
if (sec == 11 && jump == false && jumpT == false && attack == false) {
++sec;
attack = true;
this.gotoAndStop(4);
}
if (sec == 12 && jump == false && jumpT == false && attack == false) {
sec = 0;
++phase;
}
}
}
if (phase == 3) {
--timer;
if (jump == false && jumpT == false && attack == false && sec == 2) {
this._xscale = scale;
}
if (timer < 0) {
timer = 15;
if (sec == 0 && jump == false && attack == false && jumpT == false) {
this._xscale = -scale;
++sec;
jumpT = true;
sideX = -15;
this.gotoAndStop(3);
}
if (sec == 1 && jump == false && jumpT == false && attack == false) {
++sec;
attack = true;
this.gotoAndStop(6);
}
if (sec == 2 && attack == false && jump == false && jumpT == false) {
++sec;
attack = true;
this.gotoAndStop(6);
}
if (sec == 3 && jump == false && attack == false && jumpT == false) {
sec = 0;
timer = 0;
++phase;
}
}
}
if (phase == 4) {
--timer;
if (timer < 0) {
if (sec == 0 && jump == false && attack == false && jumpT == false) {
this._xscale = -scale;
++sec;
jumpT = true;
sideX = -5;
this.gotoAndStop(3);
}
if (sec == 1 && jumpT == false) {
backD = false;
++sec;
}
if (sec == 2 && jump == false && attack == false && jumpT == false) {
if (_root.phase.n == 0) {
facePlayer();
++sec;
attack = true;
this.gotoAndStop(7);
}
}
if (sec == 3 && jump == false && attack == false && jumpT == false) {
if (_root.phase.n == 0) {
sideX = -5;
this._xscale = -scale;
++sec;
jumpT = true;
sideX = -10;
this.gotoAndStop(3);
}
}
if (sec == 4 && jump == false && attack == false && jumpT == false) {
facePlayer();
if (_root.phase.n == 0) {
++sec;
attack = true;
this.gotoAndStop(7);
}
}
if (sec == 5 && jump == false && attack == false && jumpT == false) {
facePlayer();
if (_root.phase.n == 0) {
++sec;
jumpT = true;
sideY = -60;
sideX = 30;
this.gotoAndStop(3);
timer = 12;
}
}
if (sec == 6 && jumpT == false) {
backD = true;
++sec;
}
if (sec == 7 && jump == false && attack == false && jumpT == false) {
this._xscale = -scale;
timer = 5;
phase = 1;
sec = 0;
}
}
}
} else {
this.gotoAndStop(8);
}
if (hit == false && jump == false && attack == false && jumpT == false) {
this.gotoAndStop(2);
}
}
}
};
}
}
movieClip 1489 bossWarning {
frame 1 {
s = new Sound(this);
s.attachSound('alarm');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 17 {
s = new Sound(this);
s.attachSound('alarm');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 33 {
s = new Sound(this);
s.attachSound('alarm');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 48 {
this.removeMovieClip();
}
}
button 1494 {
on (press) {
if (_parent.sec == 0) {
++_parent.sec;
}
}
}
movieClip 1496 {
}
movieClip 1498 {
}
movieClip 1500 {
}
movieClip 1504 {
}
movieClip 1505 {
frame 1 {
this._alpha = 1;
timer = 150;
remove = false;
this.onEnterFrame = function () {
if (remove == false) {
if (this._alpha < 100) {
this._alpha += 1;
}
if (this._alpha >= 100) {
--timer;
if (timer <= 0) {
remove = true;
}
}
} else {
if (this._alpha > 0) {
this._alpha -= 5;
} else {
_parent.nextFrame();
}
}
};
}
}
movieClip 1507 {
}
movieClip 1508 {
frame 1 {
this._alpha = 1;
timer = 150;
remove = false;
this.onEnterFrame = function () {
if (remove == false) {
if (this._alpha < 100) {
this._alpha += 1;
}
if (this._alpha >= 100) {
--timer;
if (timer <= 0) {
remove = true;
}
}
} else {
if (this._alpha > 0) {
this._alpha -= 5;
} else {
_parent.nextFrame();
}
}
};
}
}
movieClip 1510 {
}
movieClip 1512 {
}
movieClip 1513 {
frame 1 {
this._alpha = 1;
timer = 150;
remove = false;
this.onEnterFrame = function () {
if (remove == false) {
if (this._alpha < 100) {
this._alpha += 1;
}
if (this._alpha >= 100) {
--timer;
if (timer <= 0) {
remove = true;
}
}
} else {
if (this._alpha > 0) {
this._alpha -= 5;
} else {
_parent.nextFrame();
}
}
};
}
}
movieClip 1515 {
}
movieClip 1516 {
frame 1 {
this._alpha = 1;
timer = 150;
remove = false;
this.onEnterFrame = function () {
if (remove == false) {
if (this._alpha < 100) {
this._alpha += 1;
}
if (this._alpha >= 100) {
}
}
};
}
}
movieClip 1517 textCredits {
frame 1 {
stop();
timer = 45;
this.onEnterFrame = function () {
--timer;
if (timer <= 0 && this._currentframe == 1) {
this.nextFrame();
}
};
}
}
movieClip 1518 creditScreen {
frame 1 {
if (_root.deaths < 1) {
_root.checkM('Must be the Afro.');
}
this.onEnterFrame = function () {
if (this._alpha < 100) {
this._alpha += 3;
}
};
}
}
movieClip 1522 darkness {
frame 1 {
stop();
this._alpha = 60;
this.onEnterFrame = function () {
if (_root.bg._currentframe == 5) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
};
}
}
movieClip 1523 DarnellSpecial1 {
}
movieClip 1526 death {
frame 7 {
stop();
this.onEnterFrame = function () {
if (_root.paus == false) {
this.play();
}
};
}
frame 14 {
this.removeMovieClip();
}
}
movieClip 1528 {
}
movieClip 1539 {
frame 1 {
this.onEnterFrame = function () {
if (_root.paus == false) {
play();
} else {
stop();
}
};
}
}
movieClip 1550 {
frame 1 {
this.onEnterFrame = function () {
if (_root.player.duck == true) {
hitT = _root.player.bod.h;
} else {
hitT = _root.player.body;
}
if (this.hitTest(hitT) && _root.player.recover == false) {
if (_parent._parent._parent._xscale < 0) {
scale = -1;
} else {
scale = 1;
}
_root.player.hitMedium(scale, _parent._parent._parent);
}
};
}
}
movieClip 1557 {
frame 1 {
this.onEnterFrame = function () {
if (_root.paus == false) {
play();
} else {
stop();
}
};
}
frame 10 {
m = new Sound(this);
m.attachSound('wiff');
m.setVolume(_root.vol);
m.start(0, 0);
}
frame 25 {
_parent._parent.attack = false;
_parent.gotoAndStop(1);
}
}
movieClip 1569 {
frame 1 {
this.onEnterFrame = function () {
if (_root.paus == false) {
play();
} else {
stop();
}
};
}
frame 1 {
s = new Sound(this);
s.attachSound('e1Death');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 18 {
--_root.phase.n;
_parent._parent.removeMovieClip();
}
}
movieClip 1581 {
frame 1 {
stop;
this.onEnterFrame = function () {
if (_root.paus == false) {
if (_parent._parent.newHit == true) {
this.gotoAndPlay(1);
_parent._parent.jump = true;
_parent._parent.newHit = false;
}
if (this._currentframe == 6) {
stop();
if (_parent._parent.jump == false) {
this.nextFrame();
}
} else {
this.nextFrame();
}
}
};
}
frame 10 {
_parent._parent.attackT = 35;
_parent._parent.hit = false;
stop();
}
}
movieClip 1582 {
frame 1 {
stop();
_parent.dist = 100;
_parent.heighty = 77;
_parent.max = 3 + random(3);
this.onEnterFrame = function () {
if (_parent.dead == true) {
if (_parent.jump == false) {
this.gotoAndStop(4);
} else {
this.gotoAndStop(5);
}
} else {
if (_parent.hit == true) {
this.gotoAndStop(5);
} else {
if (_parent.jump == false && _parent.xspeed != 0 && _parent.attack == false) {
this.gotoAndStop(2);
}
if (_parent.attack == true) {
if (this._currentframe != 3) {
_parent.attackT = 20 + random(10);
if (_parent._x > _root.player._x) {
if (_parent._xscale > 0) {
_parent._xscale = -_parent._xscale;
}
}
if (_parent._x < _root.player._x) {
if (_parent._xscale < 0) {
_parent._xscale = -_parent._xscale;
}
}
}
this.gotoAndStop(3);
}
if (_parent.walk == false && _parent.attack == false) {
this.gotoAndStop(1);
}
}
}
};
}
}
movieClip 1583 {
frame 1 {
function soundHit() {
t.stop();
t = new Sound(this);
var v3 = random(2);
if (v3 == 0) {
t.attachSound('punch');
} else {
t.attachSound('punch2');
}
t.setVolume(_root.vol);
t.start(0, 0);
}
stop();
hit = false;
hitT;
justHit;
hits = 0;
dam;
xspeed;
yspeed;
specialHit = false;
this.onEnterFrame = function () {
if (_parent.dead == false) {
if (_root.player.specialOn == false && specialHit == true) {
_parent.gotoAndStop(7);
}
if (_root.player.specialOn == true) {
if (_root.player._x < _parent._x && _root.player._xscale > 0) {
specialHit = true;
}
if (_root.player._x > _parent._x && _root.player._xscale < 0) {
specialHit = true;
}
}
if (_root.paus == false) {
if (_root.player.giant == true && _parent.dead == false) {
if (_root.player._x + _root.player.heighty > _root.floor - 20) {
if (Math.abs(_root.player._x - _parent._x) < 200 && _parent._y > 220) {
soundHit();
_parent.jump = true;
_parent.hit = true;
_parent.newHit = true;
_parent.attack = false;
_parent.walk = false;
_parent.yspeed = -15 - random(15);
_parent.xspeed = -10 + random(21);
_parent.health -= 50;
}
}
}
--timer;
if (_parent.hammer == true) {
--timer;
j = 0;
while (j < 20) {
enemy = _root['enemy' + j];
if (timer < 0) {
enemyHit = 0;
}
if (enemy != enemyHit && this.hitTest(enemy) && enemy.hammer == false) {
if (Math.abs(enemy.xspeed - _parent.xspeed) > 8) {
soundHit();
timer = 10;
_parent.hit = true;
_parent.newHit = true;
enemy.hit = true;
enemy.newHit = true;
_root.player.special += 1;
enemyHit = _root['enemy' + j];
enemy.xspeed = _parent.xspeed;
enemy.yspeed = -5;
enemy.hammer = true;
enemy.health -= 50;
_parent.xspeed = -_parent.xspeed / 2;
_parent._x += _parent.xspeed;
_parent.yspeed = -3;
}
}
++j;
}
}
if (timer > 5) {
hits = 0;
_root.shake(_root, 2, 2, 1);
} else {
if (hits == 0) {
hits = -1;
_root.reset();
}
}
if (timer <= 0) {
justHit = 0;
}
if (_root.player.duck == true) {
hitT = _root.player.bod.h;
} else {
hitT = _root.player.body;
}
if (_parent.jump == false && _parent.hit == false && this.hitTest(hitT) && _root.player.jump == false && _root.player.attack == false && hit == false && _root.player.recover == false) {
if (_root.player.speedPower == false && _root.player.attackPower == false && _root.player.giant == false) {
_parent.xspeed = -_parent.xspeed;
_parent.xspeed += _root.player.xspeed / 3;
_root.player.xspeed = -_root.player.xspeed / 2;
_root.player.smallHit();
hit = true;
}
} else {
if (this.hitTest(_root.player.body) == false) {
hit = false;
}
}
if (_root.player.attack == true || _root.player.saw == true) {
hitT = _root.player.bod.at;
if (this.hitTest(hitT)) {
if (justHit != _root.player._currentframe) {
justHit = _root.player._currentframe;
timer = 10;
if (_root.player._xscale > 0) {
neg = 1;
} else {
neg = -1;
}
if (_root.player._currentframe == 7) {
dam = 25;
xspeed = 2 * neg;
yspeed = -5 - random(2);
}
if (_root.player._currentframe == 8 || _root.player._currentframe == 18) {
dam = 25;
xspeed = 2 * neg;
yspeed = -9 - random(3);
}
if (_root.player._currentframe == 9) {
if (_parent._x > _root.player._x) {
neg = 1;
} else {
neg = -1;
}
dam = 25;
xspeed = 5 * neg;
yspeed = -12 - random(4);
}
if (_root.player._currentframe == 10) {
dam = 25;
xspeed = (9 + random(3)) * neg;
yspeed = -6 - random(3);
}
if (_root.player._currentframe == 11) {
dam = 25;
xspeed = 2 * neg;
yspeed = -2 - random(3);
}
if (_root.player._currentframe == 12) {
dam = 25;
xspeed = 2 * neg;
yspeed = -15 - random(4);
}
if (_root.player._currentframe == 13) {
dam = 25;
xspeed = 1 * neg;
yspeed = -3;
}
if (_root.player._currentframe == 14) {
_parent.hammer = true;
dam = 25;
if (_parent._x > _root.player._x) {
neg = 1;
} else {
neg = -1;
}
xspeed = (random(6) + 17) * neg;
yspeed = -6;
}
if (_root.player._currentframe == 15) {
if (_parent._x > _root.player._x) {
neg = 1;
} else {
neg = -1;
}
dam = 20;
xspeed = (random(5) + 2) * neg;
yspeed = -11 - random(7);
}
if (_root.player._currentframe == 17 || _root.player._currentframe == 22) {
if (_root.player._currentframe == 17) {
++_root.toast;
if (_root.toast >= 10) {
_root.toast = -100;
_root.checkM('Toasty');
}
}
_parent.gotoAndStop(7);
}
if (_root.player._currentframe == 19) {
dam = 30;
xspeed = -10 + random(21);
yspeed = -10 - random(5);
}
if (_root.player._currentframe != 17 && _root.player._currentframe != 22) {
soundHit();
}
_root.player.special += 1;
_parent.jump = true;
_parent.hit = true;
_parent.newHit = true;
_parent.attack = false;
_parent.walk = false;
if (_root.player.attackPower == false) {
_parent.xspeed = xspeed;
_parent.yspeed = yspeed;
_parent.health -= dam;
} else {
_parent.xspeed = xspeed * 1.5;
_parent.yspeed = yspeed * 1.5;
_parent.health -= dam * 1.5;
}
if (_root.player.giant == true && _root.player.attackPower == false) {
_parent.xspeed = xspeed * 1.5;
_parent.yspeed = yspeed * 1.5;
_parent.health -= dam * 1.5;
}
_parent.attackT -= 2;
}
}
}
}
}
};
}
}
movieClip 1586 {
}
movieClip 1597 {
frame 1 {
this.onEnterFrame = function () {
if (_root.paus == false) {
play();
} else {
stop();
}
};
}
}
movieClip 1643 {
frame 1 {
this.onEnterFrame = function () {
if (_root.paus == false) {
play();
} else {
stop();
}
};
}
frame 11 {
s = new Sound(this);
s.attachSound('lava');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 39 {
_parent._parent.attack = false;
_parent.gotoAndStop(1);
}
}
movieClip 1673 {
frame 1 {
this.onEnterFrame = function () {
if (_root.paus == false) {
play();
} else {
stop();
}
};
}
frame 1 {
s = new Sound(this);
s.attachSound('e2Death');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 29 {
--_root.phase.n;
_parent._parent.removeMovieClip();
}
}
movieClip 1682 {
frame 1 {
stop;
this.onEnterFrame = function () {
if (_root.paus == false) {
if (_parent._parent.newHit == true) {
this.gotoAndPlay(1);
_parent._parent.jump = true;
_parent._parent.newHit = false;
}
if (this._currentframe == 5) {
stop();
if (_parent._parent.jump == false) {
this.nextFrame();
}
} else {
this.nextFrame();
}
}
};
}
frame 8 {
_parent._parent.attackT = 35;
_parent._parent.hit = false;
stop();
}
}
movieClip 1683 {
frame 1 {
stop();
_parent.dist = 200;
_parent.heighty = 76;
_parent.max = 5;
this.onEnterFrame = function () {
if (_parent.dead == true) {
if (_parent.jump == false) {
this.gotoAndStop(4);
} else {
this.gotoAndStop(5);
}
} else {
if (_parent.hit == true) {
this.gotoAndStop(5);
} else {
if (_parent.jump == false && _parent.xspeed != 0 && _parent.attack == false) {
this.gotoAndStop(2);
}
if (_parent.attack == true) {
if (this._currentframe != 3) {
_parent.attackT = 40 + random(15);
if (_parent._x > _root.player._x) {
if (_parent._xscale > 0) {
_parent._xscale = -_parent._xscale;
}
}
if (_parent._x < _root.player._x) {
if (_parent._xscale < 0) {
_parent._xscale = -_parent._xscale;
}
}
}
this.gotoAndStop(3);
}
if (_parent.walk == false && _parent.attack == false) {
this.gotoAndStop(1);
}
}
}
};
}
}
movieClip 1685 {
}
movieClip 1696 {
frame 1 {
this.onEnterFrame = function () {
if (_root.paus == false) {
play();
} else {
stop();
}
};
}
}
movieClip 1710 {
frame 1 {
this.onEnterFrame = function () {
if (_root.paus == false) {
play();
} else {
stop();
}
};
}
frame 8 {
m = new Sound(this);
m.attachSound('wiff2');
m.setVolume(100);
m.start(0, 0);
}
frame 20 {
_parent._parent.attack = false;
_parent.gotoAndStop(1);
}
}
movieClip 1740 {
frame 1 {
this.onEnterFrame = function () {
if (_root.paus == false) {
play();
} else {
stop();
}
};
}
frame 1 {
s = new Sound(this);
s.attachSound('e3Death');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 28 {
--_root.phase.n;
_parent._parent.removeMovieClip();
}
}
movieClip 1755 {
frame 1 {
stop;
this.onEnterFrame = function () {
if (_root.paus == false) {
if (_parent._parent.newHit == true) {
this.gotoAndPlay(3);
_parent._parent.jump = true;
_parent._parent.newHit = false;
}
if (this._currentframe == 13) {
stop();
if (_parent._parent.jump == false) {
this.nextFrame();
}
} else {
this.nextFrame();
}
}
};
}
frame 21 {
_parent._parent.attackT = 35;
_parent._parent.hit = false;
stop();
}
}
movieClip 1756 {
frame 1 {
stop();
_parent.dist = 80;
_parent.heighty = 70;
_parent.max = 3 + random(3);
this.onEnterFrame = function () {
_parent.dist = 80;
_parent.heighty = 70;
if (_parent.dead == true) {
if (_parent.jump == false) {
this.gotoAndStop(4);
} else {
this.gotoAndStop(5);
}
} else {
if (_parent.hit == true) {
this.gotoAndStop(5);
}
if (_parent.hit == false && _parent.jump == false && _parent.xspeed != 0 && _parent.attack == false) {
this.gotoAndStop(2);
}
if (_parent.hit == false && _parent.attack == true) {
if (this._currentframe != 3) {
_parent.attackT = 10 + random(25);
if (_parent._x > _root.player._x) {
if (_parent._xscale > 0) {
_parent._xscale = -_parent._xscale;
}
}
if (_parent._x < _root.player._x) {
if (_parent._xscale < 0) {
_parent._xscale = -_parent._xscale;
}
}
}
this.gotoAndStop(3);
}
if (_parent.hit == false && _parent.walk == false && _parent.attack == false) {
this.gotoAndStop(1);
}
}
};
}
}
movieClip 1759 {
}
movieClip 1774 {
frame 1 {
stop();
this.onEnterFrame = function () {
if (_root.paus == false) {
if (_parent._parent.hit == true) {
_parent.gotoAndStop(5);
}
if (this._currentframe == 9) {
if (_parent._parent._xscale < 0) {
_parent._parent.xspeed = -2;
} else {
_parent._parent.xspeed = 2;
}
_parent._parent.yspeed = -14;
}
if (this._currentframe == 14 && _parent._parent.jump == true) {
stop();
}
if (this._currentframe == 14 && _parent._parent.jump == false) {
nextFrame();
}
if (this._currentframe != 14) {
this.nextFrame();
}
if (this._currentframe < 19) {
_parent.walk = true;
_parent._parent.walk = true;
}
if (this._currentframe == 19) {
_parent._parent.xspeed = 0;
_parent.walk = false;
_parent._parent.walk = false;
_parent.gotoAndStop(1);
}
}
};
}
}
movieClip 1804 {
frame 1 {
this.onEnterFrame = function () {
if (_root.paus == false) {
play();
} else {
stop();
}
};
}
frame 4 {
s = new Sound(this);
s.attachSound('arg');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 28 {
_parent._parent.attack = false;
_parent.gotoAndStop(1);
}
}
movieClip 1821 {
}
movieClip 1823 {
}
movieClip 1825 {
}
movieClip 1826 {
frame 1 {
this.onEnterFrame = function () {
if (_root.paus == false) {
play();
} else {
stop();
}
};
}
frame 13 {
s = new Sound(this);
s.attachSound('landPlayer');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 41 {
--_root.phase.n;
_parent._parent.removeMovieClip();
}
}
movieClip 1838 {
frame 1 {
stop();
this.onEnterFrame = function () {
if (_root.paus == false) {
if (_parent._parent.newHit == true) {
this.gotoAndStop(3);
_parent._parent.jump = true;
_parent._parent.newHit = false;
}
if (this._currentframe == 11) {
stop();
if (_parent._parent.jump == false) {
this.nextFrame();
}
} else {
this.nextFrame();
}
}
};
}
frame 17 {
_parent._parent.attackT = 60;
_parent._parent.hit = false;
_parent._parent.jump = true;
_parent.gotoAndStop(1);
}
}
movieClip 1839 {
frame 1 {
stop();
_parent.dist = 350;
_parent.heighty = 68;
walk = false;
_parent.max = 5;
this.onEnterFrame = function () {
_parent.dist = 300;
_parent.heighty = 68;
_parent.max = 5;
if (_parent.dead == true) {
if (_parent.jump == false) {
this.gotoAndStop(4);
} else {
this.gotoAndStop(5);
}
} else {
if (_parent.hit == true) {
walk = false;
this.gotoAndStop(5);
}
if (_parent.hit == false && _parent.jump == false && _parent.walk == true && _parent.attack == false) {
this.gotoAndStop(2);
}
if (_parent.hit == false && _parent.attack == true && _parent.walk == false) {
if (this._currentframe != 3) {
_parent.attackT = 45 + random(15);
if (_parent._x > _root.player._x) {
if (_parent._xscale > 0) {
_parent._xscale = -_parent._xscale;
}
}
if (_parent._x < _root.player._x) {
if (_parent._xscale < 0) {
_parent._xscale = -_parent._xscale;
}
}
}
this.gotoAndStop(3);
}
if (_parent.hit == false && _parent.walk == false && _parent.attack == false) {
this.gotoAndStop(1);
}
}
};
}
}
movieClip 1842 {
}
movieClip 1854 {
frame 1 {
this.onEnterFrame = function () {
if (_root.paus == false) {
play();
} else {
stop();
}
};
}
}
movieClip 1884 {
frame 1 {
this.onEnterFrame = function () {
if (_root.paus == false) {
play();
} else {
stop();
}
};
}
frame 5 {
m = new Sound(this);
m.attachSound('wiff');
m.setVolume(100);
m.start(0, 0);
}
frame 19 {
m = new Sound(this);
m.attachSound('wiff2');
m.setVolume(100);
m.start(0, 0);
}
frame 31 {
_parent._parent.attack = false;
_parent.gotoAndStop(1);
}
}
movieClip 1920 {
}
movieClip 1922 {
}
movieClip 1923 {
}
movieClip 1924 {
frame 1 {
this.onEnterFrame = function () {
if (_root.paus == false) {
play();
} else {
stop();
}
};
}
frame 53 {
--_root.phase.n;
_parent._parent.removeMovieClip();
}
}
movieClip 1938 {
frame 1 {
stop;
this.onEnterFrame = function () {
if (_root.paus == false) {
if (_parent._parent.newHit == true) {
this.gotoAndPlay(1);
_parent._parent.jump = true;
_parent._parent.newHit = false;
}
if (this._currentframe == 11) {
stop();
if (_parent._parent.jump == false) {
this.nextFrame();
}
} else {
this.nextFrame();
}
}
};
}
frame 3 {
s = new Sound(this);
s.attachSound('e5Hit');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 18 {
_parent._parent.attackT = 35;
_parent._parent.hit = false;
stop();
}
}
movieClip 1939 {
frame 1 {
stop();
_parent.dist = 120;
_parent.heighty = 80;
_parent.max = 3 + random(3);
this.onEnterFrame = function () {
if (_parent.dead == true) {
if (_parent.jump == false) {
this.gotoAndStop(4);
} else {
this.gotoAndStop(5);
}
} else {
if (_parent.hit == true) {
this.gotoAndStop(5);
}
if (_parent.hit == false && _parent.jump == false && _parent.xspeed != 0 && _parent.attack == false) {
this.gotoAndStop(2);
}
if (_parent.hit == false && _parent.attack == true) {
if (this._currentframe != 3) {
_parent.attackT = 10 + random(5);
if (_parent._x > _root.player._x) {
if (_parent._xscale > 0) {
_parent._xscale = -_parent._xscale;
}
}
if (_parent._x < _root.player._x) {
if (_parent._xscale < 0) {
_parent._xscale = -_parent._xscale;
}
}
}
this.gotoAndStop(3);
}
if (_parent.hit == false && _parent.walk == false && _parent.attack == false) {
this.gotoAndStop(1);
}
}
};
}
}
movieClip 1942 {
}
movieClip 1963 {
frame 1 {
stop();
this.onEnterFrame = function () {
if (_root.paus == false) {
if (_parent._parent.hit == true) {
_parent.gotoAndStop(5);
}
if (this._currentframe == 8) {
if (_parent._parent._xscale < 0) {
_parent._parent.xspeed = -4;
} else {
_parent._parent.xspeed = 4;
}
_parent._parent.yspeed = -8;
}
if (this._currentframe == 16 && _parent._parent.jump == true) {
stop();
}
if (this._currentframe == 16 && _parent._parent.jump == false) {
nextFrame();
}
if (this._currentframe != 16) {
this.nextFrame();
}
if (this._currentframe < 19) {
_parent.walk = true;
_parent._parent.walk = true;
}
if (this._currentframe == 19) {
_parent._parent.xspeed = 0;
_parent.walk = false;
_parent._parent.walk = false;
_parent.gotoAndStop(1);
}
}
};
}
}
movieClip 1994 {
frame 1 {
this.onEnterFrame = function () {
if (_root.paus == false) {
play();
} else {
stop();
}
};
}
frame 9 {
s = new Sound(this);
s.attachSound('spring');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 29 {
_parent._parent.attack = false;
_parent.gotoAndStop(1);
}
}
movieClip 2008 {
}
movieClip 2009 {
frame 1 {
this.onEnterFrame = function () {
if (_root.paus == false) {
play();
} else {
stop();
}
};
}
frame 9 {
s = new Sound(this);
s.attachSound('landPlayer');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 36 {
--_root.phase.n;
_parent._parent.removeMovieClip();
}
}
movieClip 2017 {
frame 1 {
stop();
this.onEnterFrame = function () {
if (_root.paus == false) {
if (_parent._parent.newHit == true) {
this.gotoAndStop(3);
_parent._parent.jump = true;
_parent._parent.newHit = false;
}
if (this._currentframe == 8) {
stop();
if (_parent._parent.jump == false) {
this.nextFrame();
}
} else {
this.nextFrame();
}
}
};
}
frame 1 {
s = new Sound(this);
s.attachSound('e6Hit');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 13 {
_parent._parent.attackT = 60;
_parent._parent.hit = false;
_parent._parent.jump = true;
_parent.gotoAndStop(1);
}
}
movieClip 2018 {
frame 1 {
stop();
_parent.dist = 300;
_parent.heighty = 65;
walk = false;
_parent.max = 5;
this.onEnterFrame = function () {
if (_parent.dead == true) {
if (_parent.jump == false) {
this.gotoAndStop(4);
} else {
this.gotoAndStop(5);
}
} else {
if (_parent.hit == true) {
walk = false;
this.gotoAndStop(5);
}
if (_parent.hit == false && _parent.jump == false && _parent.walk == true && _parent.attack == false) {
this.gotoAndStop(2);
}
if (_parent.hit == false && _parent.attack == true && _parent.walk == false) {
if (this._currentframe != 3) {
_parent.attackT = 10 + random(15);
if (_parent._x > _root.player._x) {
if (_parent._xscale > 0) {
_parent._xscale = -_parent._xscale;
}
}
if (_parent._x < _root.player._x) {
if (_parent._xscale < 0) {
_parent._xscale = -_parent._xscale;
}
}
}
this.gotoAndStop(3);
}
if (_parent.hit == false && _parent.walk == false && _parent.attack == false) {
this.gotoAndStop(1);
}
}
};
}
}
movieClip 2033 {
frame 1 {
this.onEnterFrame = function () {
if (_root.paus == false) {
play();
} else {
stop();
}
};
}
frame 1 {
if (_root.player.saw == true) {
s = new Sound(this);
s.attachSound('sawing');
s.setVolume(_root.vol);
s.start(0, 0);
}
}
frame 4 {
_root.dropItem(_parent._x, _parent._y, _parent.xspeed, _parent.yspeed);
}
frame 17 {
--_root.phase.n;
_parent.removeMovieClip();
}
}
movieClip 2034 enemy {
frame 1 {
stop();
xspeed = 0;
yspeed = 0;
attackT = 60 + random(35);
jump = false;
attack = false;
walk = false;
max;
acc = 1;
dec = 0.5;
dist;
floor = _root.floor;
heighty;
widthy;
hit = false;
hitT = 4;
duckT = 0;
hammer = false;
dead = false;
fall = 1;
health = 100;
size = this._xscale;
xB;
xA;
if (_root.player._x < this._x) {
this._xscale = -size;
} else {
this._xscale = size;
}
this.onEnterFrame = function () {
if (_root.paus == false) {
if (health <= 0 && dead == false) {
_root.dropItem(this._x, this._y, xspeed, yspeed);
dead = true;
}
xB = this._x;
this._x += xspeed;
this._y += yspeed;
xA = this._x;
if (xB > 0 && xA <= 0) {
if (hit == true) {
this._x = 0;
this.xspeed = -xspeed / 2;
}
}
if (xB < 700 && xA >= 700) {
if (hit == true) {
this._x = 700;
this.xspeed = -xspeed / 2;
}
}
if (this._currentframe == 5) {
fall = 2;
dec = 0.75;
}
if (this._currentframe == 4 || this._currentframe == 1) {
fall = 2;
dec = 0.5;
}
if (Math.abs(xspeed) < 7) {
hammer = false;
}
if (this._y + heighty != floor) {
jump = true;
}
if (jump == true) {
yspeed += fall;
}
if (this._y + heighty > floor && jump == true) {
this._y = floor - heighty;
yspeed = 0;
jump = false;
}
if (this._currentframe != 7 && dead == false) {
if (attack == false && jump == false && hit == false) {
walk = true;
}
if (attack == false && hit == false) {
--attackT;
}
if (attack == false && jump == false && hit == false) {
if (Math.abs(this._x - _root.player._x) < dist && this._x - this._width / 3 > 0 && this._x + this._width / 3 < 700) {
if (_root.player.duck == true) {
++duckT;
} else {
duckT = 0;
}
if (this._currentframe == 4 || this._currentframe == 6) {
if (_root.player._y < this._y - 160 && attackT <= 0 && attack == false) {
jump = true;
attack = true;
walk = false;
yspeed = -16;
}
}
if (attackT <= 0) {
attack = true;
}
walk = false;
}
}
if (jump == false && attack == false && hit == false) {
if (this._x > _root.player._x) {
if (this._xscale > 0) {
this._xscale *= -1;
}
}
if (this._x < _root.player._x) {
if (this._xscale < 0) {
this._xscale *= -1;
}
}
}
if (this._currentframe != 4 && this._currentframe != 6) {
if (walk == true && attack == false && jump == false && hit == false) {
if (this._x > _root.player._x) {
if (xspeed > -max) {
xspeed -= acc;
}
if (xspeed < -max) {
xspeed = -max;
}
}
if (this._x < _root.player._x) {
if (xspeed < max) {
xspeed += acc;
}
if (xspeed > max) {
xspeed = max;
}
}
}
}
}
if (jump == false && walk == false) {
if (xspeed > 0) {
xspeed -= dec;
}
if (xspeed < 0) {
xspeed += dec;
}
if (Math.abs(xspeed) < 1) {
xspeed = 0;
}
}
if (this._currentframe == 1 || this._currentframe == 5) {
if (duckT > 60 && hit == false) {
walk = true;
attack = false;
if (this._x > _root.player._x) {
if (xspeed > -max) {
xspeed -= acc;
}
}
if (this._x < _root.player._x) {
if (xspeed < max) {
xspeed += acc;
}
}
}
}
}
};
}
}
movieClip 2036 {
}
movieClip 2038 {
frame 1 {
stop();
timer = 10;
this.onEnterFrame = function () {
--timer;
if (timer < 0) {
if (this._visible == true) {
this._visible = false;
} else {
this._visible = true;
}
timer = 10;
}
};
}
}
button 2042 {
on (rollOver) {
_parent.sel = 1;
m = new Sound(this);
m.attachSound('menuMove');
m.setVolume(_root.vol);
m.start(0, 0);
}
on (press) {
if (_parent.selectd == false) {
_parent.clicked = true;
}
}
}
movieClip 2043 {
}
button 2047 {
on (rollOver) {
_parent.sel = 2;
m = new Sound(this);
m.attachSound('menuMove');
m.setVolume(_root.vol);
m.start(0, 0);
}
on (press) {
if (_parent.selectd == false) {
_parent.clicked = true;
}
}
}
movieClip 2048 {
}
movieClip 2049 gameOver {
frame 1 {
sel = 1;
obj;
rightU = false;
leftU = false;
aU = false;
selectd = false;
clicked = false;
musOnce = false;
stop();
this.onEnterFrame = function () {
if (selectd == false) {
if (_root.music.getVolume() > 0) {
_root.music.setVolume(_root.music.getVolume() - 11);
} else {
if (musOnce == false) {
musOnce = true;
_root.music.stop();
_root.musicB.attachSound('mGameOver');
_root.musicB.setVolume(_root.vol);
_root.musicB.start(0, 199);
}
}
if (Key.isDown(39) == false) {
rightU = true;
}
if (Key.isDown(37) == false) {
leftU = true;
}
if (Key.isDown(65) == false) {
aU = true;
}
if (Key.isDown(65) && aU == true || clicked == true) {
m = new Sound(this);
m.attachSound('menuSelect');
m.setVolume(_root.vol);
m.start(0, 0);
clicked = false;
aU = false;
if (sel == 1) {
selectd = true;
_root.attachMovie('tranRetry', 'transition', 12003);
_root.transition._x = 350;
_root.transition._y = 225;
}
if (sel == 2) {
selectd = true;
_root.attachMovie('tranMenu', 'transition', 12003);
_root.transition._x = 350;
_root.transition._y = 225;
}
}
if (Key.isDown(39) && rightU == true) {
m = new Sound(this);
m.attachSound('menuMove');
m.setVolume(_root.vol);
m.start(0, 0);
s._visible = true;
rightU = false;
--sel;
if (sel == 0) {
sel = 2;
}
}
if (Key.isDown(37) && leftU == true) {
m = new Sound(this);
m.attachSound('menuMove');
m.setVolume(_root.vol);
m.start(0, 0);
s._visible = true;
leftU = false;
++sel;
if (sel == 3) {
sel = 1;
}
}
if (sel == 1) {
obj = o;
}
if (sel == 2) {
obj = t;
}
s._y = obj._y;
s._x = obj._x - obj._width / 2 - 28;
lights._y = obj._y;
lights._x = obj._x;
lights._height = obj._height;
lights._width = obj._width + 5;
if (obj == o) {
o._xscale = 105;
o._yscale = 105;
} else {
o._xscale = 100;
o._yscale = 100;
}
if (obj == t) {
t._xscale = 105;
t._yscale = 105;
} else {
t._xscale = 100;
t._yscale = 100;
}
if (obj == th) {
th._xscale = 105;
th._yscale = 105;
} else {
th._xscale = 100;
th._yscale = 100;
}
if (obj == f) {
f._xscale = 105;
f._yscale = 105;
} else {
f._xscale = 100;
f._yscale = 100;
}
}
};
}
}
movieClip 2050 gameOverSymb {
frame 1 {
stop();
yspeed = 0;
acc = 1;
timer = 0;
no = false;
this.onEnterFrame = function () {
if (s._y == 0) {
++timer;
} else {
timer = 0;
}
if (timer > 5) {
no = true;
}
if (no == false) {
yspeed += 3;
acc += 0.2;
s._y += yspeed;
if (s._y > 0) {
s._y = 0;
yspeed = -yspeed / 2;
}
}
};
}
}
movieClip 2152 {
frame 1 {
stop();
this.onEnterFrame = function () {
g = 100 - _parent.health;
if (100 - _parent.health <= 0) {
g = 1;
}
if (100 - _parent.health >= 100) {
g = 99;
}
this.gotoAndStop(g);
};
}
}
movieClip 2154 {
}
movieClip 2156 {
}
movieClip 2158 {
}
movieClip 2159 healthBossUber {
frame 1 {
stop();
health;
this._alpha = 0;
this.onEnterFrame = function () {
frm = _root.bg._currentframe;
if (frm == 3) {
this.gotoAndStop(1);
}
if (frm == 5) {
this.gotoAndStop(2);
}
if (frm == 7) {
this.gotoAndStop(3);
}
if (frm != 3 && frm != 5 && frm != 7) {
this._alpha = 0;
} else {
if (_root.letter == true && this._alpha < 100) {
this._alpha += 10;
}
}
};
}
}
movieClip 2255 {
frame 1 {
stop();
this.onEnterFrame = function () {
g = 100 - _parent.health;
if (100 - _parent.health <= 0) {
g = 1;
}
if (100 - _parent.health >= 100) {
g = 99;
}
this.gotoAndStop(g);
};
}
}
movieClip 2257 {
frame 1 {
scale = this._xscale;
this._alpha = 0;
timer = 0;
ac = 0;
p = 0;
grow = false;
this.onEnterFrame = function () {
if (_parent._parent.special < 50) {
if (this._alpha > 0) {
this._alpha -= 10;
}
}
if (_parent._parent.special >= 50) {
if (this._alpha < _root.player.special - 30) {
this._alpha += 10;
}
}
if (grow == true) {
ac += 0.1;
p += ac;
} else {
ac += 0.1;
p -= ac;
}
if (p > 3) {
ac = 0;
grow = false;
}
if (p < -4) {
ac = 0;
grow = true;
}
this._xscale = scale + p;
this._yscale = scale + p;
};
}
}
movieClip 2262 {
frame 1 {
stop();
this.onEnterFrame = function () {
g = 100 - _parent.special;
if (100 - _parent.special <= 0) {
g = 1;
}
this.gotoAndStop(g);
};
}
}
movieClip 2264 {
frame 1 {
p = 1;
ac = 0;
grow = true;
scale = this._xscale;
this._alpha = 0;
timer = 0;
this.onEnterFrame = function () {
if (_parent.special < 100) {
timer = 70;
if (this._alpha > 0) {
this._alpha -= 10;
}
}
if (_parent.special == 100) {
--timer;
if (timer > 0) {
if (this._alpha < 100) {
this._alpha += 20;
}
} else {
if (this._alpha > 20) {
this._alpha -= 1;
}
}
}
if (_root.paus == false) {
if (grow == true) {
ac += 0.4;
p += ac;
} else {
ac += 0.4;
p -= ac;
}
if (p > 5) {
ac = 0;
grow = false;
}
if (p < -2) {
ac = 0;
grow = true;
}
this._xscale = scale + p;
this._yscale = scale + p;
}
};
}
}
movieClip 2266 {
}
movieClip 2267 healthPlayer {
frame 1 {
health;
special;
stop();
}
}
movieClip 2269 hudDying {
frame 1 {
stop();
this._alpha = 0;
this.onEnterFrame = function () {
if (_root.player.health <= 30) {
this._alpha = 100 - _root.player.health / 0.3;
} else {
if (this._alpha > 0) {
this._alpha -= 3;
}
}
if (_root.paus == true) {
this._alpha = 0;
}
};
}
}
movieClip 2270 {
frame 1 {
k = 0;
ac = 2;
grow = true;
scale = 100;
this.onEnterFrame = function () {
if (scale > 110) {
grow = false;
}
if (scale < 99) {
grow = true;
}
if (grow == true) {
k += ac;
} else {
k -= ac;
}
scale = 100 + k;
this._xscale = scale;
this._yscale = scale;
};
}
}
movieClip 2273 {
}
movieClip 2281 {
}
movieClip 2284 {
}
movieClip 2285 {
}
movieClip 2287 {
}
movieClip 2289 {
}
movieClip 2291 {
}
movieClip 2293 {
}
button 2297 {
on (press) {
if (_parent.remove == false) {
m = new Sound(_parent);
m.attachSound('menuSelect');
m.setVolume(_root.vol);
m.start(0, 0);
_parent.remove = true;
}
}
}
movieClip 2298 {
}
movieClip 2299 instructions {
frame 1 {
this._alpha = 1;
sel = 1;
obj;
upU = false;
downU = false;
aU = false;
stop();
this._alpha = 1;
remove = false;
this.onEnterFrame = function () {
this.lights._y = this.o._y;
this.lights._x = this.o._x;
if (Key.isDown(65) == false) {
aU = true;
}
if (Key.isDown(65) && aU == true && remove == false) {
m = new Sound(this);
m.attachSound('menuSelect');
m.setVolume(100);
m.start(0, 0);
aU = false;
o._xscale = 110;
o._yscale = 110;
remove = true;
}
if (this._alpha <= 0) {
_parent.selectd = false;
_parent.clic = false;
this.removeMovieClip();
}
if (this._alpha < 100 && remove == false) {
this._alpha += 20;
}
if (this._alpha > 0 && remove == true) {
this._alpha -= 20;
}
};
}
}
movieClip 2300 item {
frame 1 {
stop();
if (_parent != _root) {
grab = true;
station = true;
timer = -2;
} else {
timer = 300;
if (this._x > 800 || this._x < -100) {
this.removeMovieClip();
}
grab = false;
station = false;
}
time = 12;
flashT = time;
heighty = this._height / 2;
jump = false;
floor = _root.floor;
xspeed;
yspeed;
remove = false;
frm;
roll = true;
n = 1;
var ch = 4;
if (_root.player.health < 35) {
roll = false;
this.gotoAndStop(1);
} else {
if (_root.player.special < 10) {
roll = false;
this.gotoAndStop(2);
} else {
if (_root.player.special == 100 || _root.player.health == 100) {
if (_root.player.attackPower == false && _root.player.speedPower == false) {
ch = 2;
n = 3;
}
}
}
}
if (_root.player.giant == true || _root.bg.boss == true || _root.player.saw == true) {
if (_root.player.health <= 100) {
n = 1;
ch = 2;
if (_root.special > 95 || _root.player.health < 40) {
ch = 1;
}
}
}
if (roll == true) {
this.gotoAndStop(n + random(ch));
}
this.onEnterFrame = function () {
frm = this._currentframe;
if (_root.paus == false) {
if (remove == true) {
if (this._alpha <= 0) {
this.removeMovieClip();
}
this._y -= 1.5;
this._alpha -= 3;
}
if (this.hitTest(_root.player.body) && remove == false && grab == true) {
if (frm == 1) {
s = new Sound(this);
s.attachSound('itemSpeed');
s.setVolume(_root.vol);
s.start(0, 0);
_root.player.getHealth();
}
if (frm == 2) {
s = new Sound(this);
s.attachSound('itemSlurp');
s.setVolume(_root.vol);
s.start(0, 0);
_root.player.getSpecial();
}
if (frm == 3) {
s = new Sound(this);
s.attachSound('formula');
s.setVolume(_root.vol);
s.start(0, 0);
_root.frontFlash('flashPower');
if (_root.player.speedPower == false) {
_root.player.speedPower = true;
} else {
_root.player.speedTimer += 150;
}
}
if (frm == 4) {
s = new Sound(this);
s.attachSound('itemGrowing');
s.setVolume(_root.vol);
s.start(0, 0);
_root.frontFlash('flashPower');
if (_root.player.attackPower == false) {
e = new Sound(_parent);
e.attachSound('explodeLong');
e.setVolume(_root.vol);
e.start(0, 0);
_root.player.attackPower = true;
} else {
_root.player.attackPowerT += 120;
}
}
remove = true;
}
if (station == false && _root.paus == false && remove == false) {
if (timer > 0) {
--timer;
}
if (timer < 120 && timer > 0) {
--flashT;
if (flashT < 0) {
if (this._visible == false) {
this._visible = true;
} else {
this._visible = false;
}
flashT = time;
--time;
}
}
if (timer == 0) {
this.removeMovieClip();
}
if (xspeed > 15) {
xspeed = 15;
}
if (xspeed < -15) {
xspeed = -15;
}
this._x += xspeed;
this._y += yspeed;
if (Math.abs(xspeed) != 0) {
if (this._x > 700) {
this._x = 700;
xspeed = -xspeed;
}
if (this._x < 0) {
this._x = 0;
xspeed = -xspeed;
}
}
if (xspeed > 0) {
xspeed -= 0.25;
}
if (xspeed < 0) {
xspeed += 0.25;
}
if (Math.abs(xspeed) < 0.6) {
xspeed = 0;
}
if (this._y + heighty < floor) {
jump = true;
}
if (jump == true) {
yspeed += 2;
}
if (this._y + heighty > floor && jump == true) {
this._y = floor - heighty;
yspeed = -yspeed / 2;
grab = true;
jump = false;
if (Math.abs(yspeed) < 4) {
yspeed = 0;
}
}
if (_root.player.attackPower == true || _root.player.giant == true) {
if (grab == true && Math.abs(this._x - _root.player._x) < 75 && Math.abs(this._y - (_root.player._y + _root.player.heighty)) < 40) {
if (frm == 1) {
s = new Sound(this);
s.attachSound('itemSpeed');
s.setVolume(_root.vol);
s.start(0, 0);
_root.player.getHealth();
}
if (frm == 2) {
s = new Sound(this);
s.attachSound('itemSlurp');
s.setVolume(_root.vol);
s.start(0, 0);
_root.player.getSpecial();
}
if (frm == 3) {
s = new Sound(this);
s.attachSound('formula');
s.setVolume(_root.vol);
s.start(0, 0);
_root.frontFlash('flashPower');
if (_root.player.speedPower == false) {
_root.player.speedPower = true;
} else {
_root.player.speedTimer += 150;
}
}
if (frm == 4) {
s = new Sound(this);
s.attachSound('itemGrowing');
s.setVolume(_root.vol);
s.start(0, 0);
_root.frontFlash('flashPower');
if (_root.player.attackPower == false) {
_root.player.attackPower = true;
} else {
_root.player.attackPowerT += 120;
}
}
remove = true;
}
}
}
}
};
}
}
movieClip 2302 {
}
movieClip 2304 {
}
movieClip 2306 {
}
movieClip 2307 level1Hello {
frame 1 {
this._alpha = 0;
this.onEnterFrame = function () {
if (this._alpha < 100) {
this._alpha += 5;
}
};
}
}
movieClip 2308 level2Hello {
frame 1 {
this._alpha = 0;
this.onEnterFrame = function () {
if (this._alpha < 100) {
this._alpha += 5;
}
};
}
}
movieClip 2310 {
}
movieClip 2312 {
}
movieClip 2313 level3Hello {
frame 1 {
this._alpha = 0;
this.onEnterFrame = function () {
if (this._alpha < 100) {
this._alpha += 5;
}
};
}
}
movieClip 2315 {
}
button 2321 {
on (release) {
getURL('http://underarock.newgrounds.com/', '_blank');
}
}
button 2326 {
on (release) {
getURL('http://onlyqualitygames.com/', '_blank');
}
}
button 2331 {
on (release) {
getURL('http://sugarpolyp.deviantart.com/', '_blank');
}
}
button 2335 {
on (press) {
_parent.remove = true;
}
}
movieClip 2336 linkPage {
}
movieClip 2337 linkPageHolder {
frame 1 {
this._alpha = 1;
sel = 1;
obj;
upU = false;
downU = false;
aU = false;
stop();
this._alpha = 1;
remove = false;
mus = false;
_root.checkM('Teh Intran3tz');
this.onEnterFrame = function () {
if (this._alpha >= 100 && mus == false) {
_root.music.attachSound('linksMusic');
_root.music.setVolume(100);
_root.music.start(0, 199);
mus = true;
}
if (Key.isDown(65) && aU == true && remove == false) {
m = new Sound(this);
m.attachSound('menuSelect');
m.setVolume(100);
m.start(0, 0);
aU = false;
o._xscale = 110;
o._yscale = 110;
remove = true;
}
if (this._alpha <= 0) {
_parent.selectd = false;
_parent.clic = false;
_root.music.attachSound('disco');
_root.music.setVolume(100);
_root.music.start(0, 199);
this.removeMovieClip();
}
if (this._alpha < 100 && remove == false) {
if (_root.music.getVolume() > 0) {
_root.music.setVolume(_root.music.getVolume() - 25);
} else {
_root.music.stop();
}
this._alpha += 20;
}
if (this._alpha > 0 && remove == true) {
if (_root.music.getVolume() > 0) {
_root.music.setVolume(_root.music.getVolume() - 25);
} else {
_root.music.stop();
}
this._alpha -= 20;
}
};
}
}
movieClip 2340 lvl1Complete {
}
movieClip 2343 lvl2Complete {
}
movieClip 2346 pause {
frame 1 {
pUp = false;
this._alpha = 0;
_root.attachMovie('pauseMenu', 'pas', 12001);
_root.pas._x = 350;
_root.pas._y = 225;
this.onEnterFrame = function () {
if (this._currentframe < 10) {
this._alpha += 6;
}
if (this._alpha > 0 && (this._currentframe > 10 || _root.paus == false)) {
this._alpha -= 10;
}
if (Key.isDown(80) == false) {
pUp = true;
}
if (this._currentframe == 10 && Key.isDown(80) && pUp == true) {
_root.paus = false;
this.nextFrame();
}
if (this._currentframe == 15) {
this.removeMovieClip();
}
if (this._currentframe != 10) {
this.nextFrame();
}
};
}
}
movieClip 2349 {
}
button 2350 {
on (rollOver) {
_parent.sel = 1;
if (_parent.selectd == false && _parent.clic == false) {
m = new Sound(this);
m.attachSound('menuMove');
m.setVolume(100);
m.start(0, 0);
}
}
on (press) {
if (_parent.clic == false) {
_parent.clicked = true;
}
}
}
button 2352 {
on (rollOver) {
_parent.sel = 2;
if (_parent.selectd == false && _parent.clic == false) {
m = new Sound(this);
m.attachSound('menuMove');
m.setVolume(100);
m.start(0, 0);
}
}
on (press) {
if (_parent.clic == false) {
_parent.clicked = true;
}
}
}
button 2353 {
on (rollOver) {
_root.pauseM.sel = 2;
}
on (press) {
_root.pauseM.clicked = true;
}
}
button 2354 {
on (rollOver) {
_parent.sel = 3;
if (_parent.selectd == false && _parent.clic == false) {
m = new Sound(this);
m.attachSound('menuMove');
m.setVolume(100);
m.start(0, 0);
}
}
on (press) {
if (_parent.clic == false) {
_parent.clicked = true;
}
}
}
button 2355 {
on (rollOver) {
_root.pauseM.sel = 3;
}
on (press) {
_root.pauseM.clicked = true;
}
}
movieClip 2357 {
}
button 2358 {
on (rollOver) {
_parent.sel = 4;
if (_parent.selectd == false && _parent.clic == false) {
m = new Sound(this);
m.attachSound('menuMove');
m.setVolume(100);
m.start(0, 0);
}
}
on (press) {
if (_parent.clic == false) {
_parent.clicked = true;
}
}
}
button 2359 {
on (rollOver) {
_root.pauseM.sel = 4;
}
on (press) {
_root.pauseM.clicked = true;
}
}
movieClip 2360 pauseMenu {
frame 1 {
this._alpha = 1;
sel = 1;
obj;
upU = false;
downU = false;
aU = false;
selectd = false;
remove = false;
clicked = false;
clic = false;
stop();
this.onEnterFrame = function () {
if (remove == true) {
this._alpha -= 20;
}
if (this._alpha <= 0) {
this.removeMovieClip();
}
if (remove == false) {
if (this._alpha < 100 && _root.paus == true && remove == false) {
this._alpha += 20;
}
if (this._alpha > 0 && _root.paus == false && remove == false) {
this._alpha -= 10;
}
if (selectd == false) {
if (Key.isDown(38) == false) {
upU = true;
}
if (Key.isDown(40) == false) {
downU = true;
}
if (Key.isDown(65) == false) {
aU = true;
}
if ((Key.isDown(65) && aU == true || clicked == true && clic == false) && _root.paus == true) {
clicked = false;
clic = true;
aU = false;
m = new Sound(this);
m.attachSound('menuSelect');
m.setVolume(_root.vol);
m.start(0, 0);
if (sel == 1) {
selectd = true;
this.attachMovie('comboList', 'ints', 12002);
this.ints._x = 0;
this.ints._y = 0;
}
if (sel == 2) {
selectd = true;
this.attachMovie('instructions', 'ints', 12002);
this.ints._x = 0;
this.ints._y = 0;
}
if (sel == 3) {
selectd = true;
_root.transitiony('tranMenu');
remove = true;
}
if (sel == 4) {
_root.paus = false;
}
}
if (Key.isDown(38) && upU == true && _root.paus == true) {
m = new Sound(this);
m.attachSound('menuMove');
m.setVolume(_root.vol);
m.start(0, 0);
s._visible = true;
upU = false;
--sel;
if (sel == 0) {
sel = 4;
}
if (sel == 0) {
sel = 4;
}
}
if (Key.isDown(40) && downU == true && _root.paus == true) {
m = new Sound(this);
m.attachSound('menuMove');
m.setVolume(_root.vol);
m.start(0, 0);
s._visible = true;
downU = false;
++sel;
if (sel == 5) {
sel = 1;
}
}
if (sel == 1) {
obj = o;
}
if (sel == 2) {
obj = t;
}
if (sel == 3) {
obj = th;
}
if (sel == 4) {
obj = f;
}
s._y = obj._y;
s._x = obj._x - obj._width / 2 - 33;
lights._y = obj._y;
lights._x = 0;
lights._height = obj._height;
lights._width = obj._width + 5;
if (obj == o) {
o._xscale = 105;
o._yscale = 105;
} else {
o._xscale = 100;
o._yscale = 100;
}
if (obj == t) {
t._xscale = 105;
t._yscale = 105;
} else {
t._xscale = 100;
t._yscale = 100;
}
if (obj == th) {
th._xscale = 105;
th._yscale = 105;
} else {
th._xscale = 100;
th._yscale = 100;
}
if (obj == f) {
f._xscale = 105;
f._yscale = 105;
} else {
f._xscale = 100;
f._yscale = 100;
}
}
}
};
}
}
movieClip 2361 phase {
frame 1 {
stop();
p = 0;
sec = 0;
n = 0;
mUp = false;
qUp = false;
timer = 0;
this.onEnterFrame = function () {
if (_root.secArea >= 6) {
_root.secArea = -10;
_root.checkM('SupaSpy');
}
if (Key.isDown(77) == false) {
mUp = true;
}
if (Key.isDown(81) == false) {
qUp = true;
}
if (Key.isDown(77) && mUp == true) {
mUp = false;
if (_root.mute == false) {
_root.mute = true;
} else {
_root.mute = false;
_root.music.setVolume(100);
_root.musicB.setVolume(100);
}
}
if (Key.isDown(81) && qUp == true) {
qUp = false;
if (_quality == 'HIGH') {
_quality = 'MEDIUM';
} else {
if (_quality == 'MEDIUM') {
_quality = 'LOW';
} else {
if (_quality == 'LOW') {
_quality = 'HIGH';
}
}
}
}
if (_root.mute == true) {
_root.vol = 0;
_root.music.setVolume(0);
_root.musicB.setVolume(0);
} else {
_root.vol = 100;
}
if (n <= 0) {
_root.bg.fightReset();
}
if (_root.paus == false) {
--timer;
}
if (timer <= 0) {
if (p == 0) {
if (sec == 0) {
} else {
if (sec == 1) {
timer = 100;
_root.addEnemy('enemy', 1, 800, 450);
_root.bg.fight = true;
++sec;
} else {
if (sec == 2) {
_root.bg.fight = true;
_root.addEnemy('enemy', 1, -400, 450);
++sec;
} else {
if (sec == 3) {
} else {
if (sec == 4) {
timer = 40;
_root.addEnemy('enemy', 1, -200, 450);
_root.bg.fight = true;
++sec;
} else {
if (sec == 5) {
timer = 70;
_root.bg.fight = true;
_root.addEnemy('enemy', 1, 800, 450);
++sec;
} else {
if (sec == 6) {
timer = 80;
_root.addEnemy('enemy', 1, 800, 450);
++sec;
} else {
if (sec == 7) {
_root.bg.fight = true;
_root.addEnemy('enemy', 1, 800, 450);
++sec;
} else {
if (sec == 8) {
} else {
if (sec == 9) {
timer = 50;
_root.addEnemy('enemy', 1, -200, 450);
_root.bg.fight = true;
++sec;
} else {
if (sec == 10) {
timer = 60;
_root.addEnemy('enemy', 1, -200, 450);
++sec;
} else {
if (sec == 11) {
timer = 50;
_root.addEnemy('enemy', 1, 800, 450);
++sec;
} else {
if (sec == 12) {
if (n < 3) {
timer = 35;
_root.addEnemy('enemy', 1, 800, 450);
++sec;
}
} else {
if (sec == 13) {
timer = 80;
_root.addEnemy('enemy', 1, -200, 450);
++sec;
} else {
if (sec == 14) {
if (n < 3) {
timer = 40;
_root.addEnemy('enemy', 1, -200, 450);
_root.bg.fight = true;
++sec;
}
} else {
if (sec == 15) {
if (n < 3) {
timer = 5;
_root.addEnemy('enemy', 2, 800, 450);
++sec;
}
} else {
if (sec == 16) {
} else {
if (sec == 17) {
_root.bg.fight = true;
timer = 5;
_root.addEnemy('enemy', 2, 800, 450);
++sec;
} else {
if (sec == 18) {
timer = 30;
_root.addEnemy('enemy', 2, -200, 450);
++sec;
} else {
if (sec == 19) {
_root.bg.fight = true;
if (n < 2) {
timer = 40;
_root.addEnemy('enemy', 2, 800, 450);
++sec;
}
} else {
if (sec == 20) {
if (n < 2) {
timer = 30;
_root.addEnemy('enemy', 1, 800, 450);
++sec;
}
} else {
if (sec == 21) {
if (n < 2) {
_root.bg.fight = true;
timer = 5;
_root.addEnemy('enemy', 2, -200, 450);
++sec;
}
} else {
if (sec == 22) {
} else {
if (sec == 23) {
_root.bg.fight = true;
timer = 5;
_root.addEnemy('enemy', 2, 800, 450);
++sec;
} else {
if (sec == 24) {
timer = 5;
_root.addEnemy('enemy', 1, 800, 450);
++sec;
} else {
if (sec == 25) {
_root.bg.fight = true;
if (n < 2) {
timer = 2;
_root.addEnemy('enemy', 1, -200, 450);
_root.addEnemy('enemy', 2, 900, 450);
++sec;
}
} else {
if (sec == 26) {
if (n < 2) {
++sec;
}
} else {
if (sec == 27) {
} else {
if (sec == 28) {
++sec;
_root.transitiony('tranB1');
} else {
if (sec == 29) {
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
if (p == 1) {
if (sec == 0) {
} else {
if (sec == 1) {
++sec;
_root.bg.boss = true;
_root.addBoss('bossUber', 600, -2500);
} else {
if (sec == 2) {
}
}
}
}
if (p == 2) {
if (sec == 0) {
} else {
if (sec == 1) {
} else {
if (sec == 2) {
timer = 120;
_root.addEnemy('enemy', 4, 800, 450);
_root.addEnemy('enemy', 3, -300, 450);
_root.bg.fight = true;
++sec;
} else {
if (sec == 3) {
if (n < 2) {
timer = 60;
_root.addEnemy('enemy', 4, 800, 450);
_root.addEnemy('enemy', 3, -300, 450);
_root.bg.fight = true;
++sec;
}
} else {
if (sec == 4) {
++sec;
} else {
if (sec == 5) {
if (n < 2) {
++sec;
}
} else {
if (sec == 6) {
if (n < 2) {
++sec;
}
} else {
if (sec == 7) {
} else {
if (sec == 8) {
timer = 30;
_root.addEnemy('enemy', 3, 800, 450);
_root.bg.fight = true;
++sec;
} else {
if (sec == 9) {
timer = 30;
_root.addEnemy('enemy', 3, -200, 450);
_root.bg.fight = true;
++sec;
} else {
if (sec == 10) {
timer = 20;
_root.addEnemy('enemy', 4, 800, 450);
_root.bg.fight = true;
++sec;
} else {
if (sec == 11) {
++sec;
} else {
if (sec == 12) {
++sec;
} else {
if (sec == 13) {
} else {
if (sec == 14) {
_root.bg.fight = true;
timer = 80;
_root.addEnemy('enemy', 4, 800, 450);
++sec;
} else {
if (sec == 15) {
timer = 120;
_root.addEnemy('enemy', 4, -100, 450);
_root.bg.fight = true;
++sec;
} else {
if (sec == 16) {
timer = 80;
_root.addEnemy('enemy', 4, 800, 450);
_root.bg.fight = true;
++sec;
} else {
if (sec == 17) {
timer = 80;
_root.addEnemy('enemy', 4, -100, 450);
_root.bg.fight = true;
++sec;
} else {
if (sec == 18) {
++sec;
} else {
if (sec == 19) {
} else {
if (sec == 20) {
timer = 30;
_root.addEnemy('enemy', 3, 800, 450);
_root.bg.fight = true;
++sec;
} else {
if (sec == 21) {
timer = 80;
_root.addEnemy('enemy', 3, -200, 450);
_root.bg.fight = true;
++sec;
} else {
if (sec == 22) {
timer = 30;
_root.addEnemy('enemy', 4, 800, 450);
_root.bg.fight = true;
++sec;
} else {
if (sec == 23) {
timer = 30;
_root.addEnemy('enemy', 4, -100, 450);
_root.bg.fight = true;
++sec;
} else {
if (sec == 24) {
++sec;
} else {
if (sec == 25) {
} else {
if (sec == 26) {
timer = 90;
_root.addEnemy('enemy', 3, 800, 450);
_root.bg.fight = true;
++sec;
} else {
if (sec == 27) {
timer = 80;
_root.addEnemy('enemy', 3, -200, 450);
_root.bg.fight = true;
++sec;
} else {
if (sec == 28) {
timer = 90;
_root.addEnemy('enemy', 4, 800, 450);
_root.bg.fight = true;
++sec;
} else {
if (sec == 29) {
timer = 30;
_root.addEnemy('enemy', 4, -100, 450);
_root.bg.fight = true;
++sec;
} else {
if (sec == 30) {
} else {
if (sec == 31) {
_root.transitiony('tranB2');
++sec;
} else {
if (sec == 32) {
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
if (p == 3) {
if (sec == 0) {
} else {
if (sec == 1) {
++sec;
_root.bg.boss = true;
_root.addBoss('bossRat1', 600, -2500);
} else {
if (sec == 2) {
} else {
if (sec == 3) {
++sec;
_root.addBoss('bossRat2', 350, -400);
} else {
if (sec == 4) {
}
}
}
}
}
}
if (p == 4) {
if (sec == 0) {
} else {
if (sec == 1) {
timer = 30;
_root.addEnemy('enemy', 6, 800, 450);
_root.bg.fight = true;
++sec;
} else {
if (sec == 2) {
timer = 120;
_root.addEnemy('enemy', 6, -200, 450);
_root.bg.fight = true;
++sec;
} else {
if (sec == 3) {
++sec;
} else {
if (sec == 4) {
++sec;
} else {
if (sec == 5) {
} else {
if (sec == 6) {
timer = 60;
_root.addEnemy('enemy', 6, 800, 450);
_root.addEnemy('enemy', 6, -200, 450);
_root.bg.fight = true;
++sec;
} else {
if (sec == 7) {
timer = 30;
_root.addEnemy('enemy', 5, 800, 450);
_root.bg.fight = true;
++sec;
} else {
if (sec == 8) {
timer = 10;
_root.addEnemy('enemy', 5, -200, 450);
_root.bg.fight = true;
++sec;
} else {
if (sec == 9) {
++sec;
} else {
if (sec == 10) {
} else {
if (sec == 11) {
timer = 50;
_root.addEnemy('enemy', 6, 800, 450);
_root.addEnemy('enemy', 5, 950, 450);
_root.bg.fight = true;
++sec;
} else {
if (sec == 12) {
timer = 30;
_root.addEnemy('enemy', 5, -300, 450);
_root.addEnemy('enemy', 6, -200, 450);
_root.bg.fight = true;
++sec;
} else {
if (sec == 13) {
if (n < 2) {
timer = 5;
_root.addEnemy('enemy', 6, 800, 450);
_root.addEnemy('enemy', 5, 950, 450);
_root.bg.fight = true;
++sec;
}
} else {
if (sec == 14) {
} else {
if (sec == 15) {
timer = 30;
_root.addEnemy('enemy', 5, 800, 450);
_root.bg.fight = true;
++sec;
} else {
if (sec == 16) {
timer = 30;
_root.addEnemy('enemy', 5, -200, 450);
_root.bg.fight = true;
++sec;
} else {
if (sec == 17) {
if (n < 2) {
timer = 30;
_root.addEnemy('enemy', 5, 800, 450);
_root.bg.fight = true;
++sec;
}
} else {
if (sec == 18) {
timer = 2;
_root.addEnemy('enemy', 5, -200, 450);
_root.bg.fight = true;
++sec;
} else {
if (sec == 19) {
} else {
if (sec == 20) {
timer = 90;
_root.addEnemy('enemy', 6, 800, 450);
_root.addEnemy('enemy', 5, 950, 450);
_root.bg.fight = true;
++sec;
} else {
if (sec == 21) {
timer = 30;
_root.addEnemy('enemy', 5, -300, 450);
_root.addEnemy('enemy', 6, -200, 450);
_root.bg.fight = true;
++sec;
} else {
if (sec == 22) {
if (n < 3) {
timer = 2;
_root.addEnemy('enemy', 5, 800, 450);
_root.bg.fight = true;
++sec;
}
} else {
if (sec == 23) {
timer = 5;
_root.addEnemy('enemy', 5, -200, 450);
_root.bg.fight = true;
++sec;
} else {
if (sec == 24) {
} else {
if (sec == 25) {
timer = 30;
_root.addEnemy('enemy', 6, 800, 450);
_root.bg.fight = true;
++sec;
} else {
if (sec == 26) {
if (n < 2) {
timer = 30;
_root.addEnemy('enemy', 6, -200, 450);
_root.bg.fight = true;
++sec;
}
} else {
if (sec == 27) {
timer = 5;
_root.addEnemy('enemy', 6, 800, 450);
_root.bg.fight = true;
++sec;
} else {
if (sec == 28) {
} else {
if (sec == 29) {
timer = 30;
_root.addEnemy('enemy', 5, 800, 450);
_root.bg.fight = true;
++sec;
} else {
if (sec == 30) {
timer = 5;
_root.addEnemy('enemy', 5, -200, 450);
_root.bg.fight = true;
++sec;
} else {
if (sec == 31) {
++sec;
} else {
if (sec == 32) {
if (n < 3) {
timer = 5;
_root.addEnemy('enemy', 6, -200, 450);
_root.bg.fight = true;
++sec;
}
} else {
if (sec == 33) {
timer = 5;
_root.addEnemy('enemy', 5, 800, 450);
_root.bg.fight = true;
++sec;
} else {
if (sec == 34) {
} else {
if (sec == 35) {
_root.transitiony('tranBefore');
++sec;
} else {
if (sec == 36) {
} else {
if (sec == 37) {
_root.player.freeze2 = true;
_root.player.freeze = true;
++sec;
} else {
if (sec == 38) {
} else {
if (sec == 39) {
_root.transitiony('tranB3');
sec = 0;
++p;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
if (p == 5) {
if (sec == 0) {
} else {
if (sec == 1) {
_root.bg.boss = true;
_root.addBoss('bossPico', 600, -3500);
++sec;
} else {
if (sec == 2) {
}
}
}
}
if (p == -1) {
++p;
_root.bg.gotoAndStop(3);
_root.bg.reset();
_root.bg.secret = false;
_root.bg.setX();
_root.bg.boss = true;
_root.addBoss('bossUber', 600, -1500);
}
if (p == 8) {
++p;
_root.addBoss('bossRat2', 350, -400);
}
}
};
}
}
movieClip 2363 {
}
movieClip 2364 {
}
movieClip 2371 {
frame 1 {
this.onEnterFrame = function () {
if (_root.paus == false || _parent.freeze == true) {
play();
} else {
if (_root.paus == true) {
stop();
}
}
};
}
frame 3 {
if (_parent.giant == true) {
e = new Sound(this);
e.attachSound('landPlayer');
e.setVolume(_root.vol);
e.start(0, 0);
_root.shake(_root, 6, 5, 1);
}
}
frame 4 {
if (_parent.giant == true) {
_root.shake(_root, 6, 5, 1);
}
}
frame 5 {
if (_parent.giant == true) {
_root.shake(_root, 6, 5, 1);
}
}
frame 6 {
if (_parent.giant == true) {
_root.reset();
}
}
frame 7 {
if (_parent.giant == true) {
_root.shake(_root, 6, 5, 1);
}
}
frame 8 {
if (_parent.giant == true) {
_root.shake(_root, 6, 5, 1);
}
}
frame 9 {
if (_parent.giant == true) {
_root.shake(_root, 6, 5, 1);
}
}
frame 10 {
if (_parent.giant == true) {
_root.reset();
}
}
}
movieClip 2387 {
frame 1 {
stop();
this.onEnterFrame = function () {
if (_root.paus == false) {
if (this._parent.newJump == true) {
this.gotoAndStop(6);
}
if (_parent.attack == true) {
this.gotoAndStop(11);
_parent.attack = false;
}
if (this._parent.jump == true) {
if (this._currentframe < 13) {
this.nextFrame();
}
if (this._currentframe > 7 && Key.isDown(65)) {
_root.checkM('Floatin');
_parent.attack = true;
this._parent.gotoAndStop(15);
}
if (this._currentframe > 7 && Key.isDown(83)) {
if (_parent._y + _parent.heighty < _parent.floor - 100) {
_parent.attack = true;
this._parent.gotoAndStop(19);
}
}
} else {
this.gotoAndStop(6);
}
}
};
}
}
movieClip 2401 {
frame 1 {
this.onEnterFrame = function () {
if (_root.paus == false) {
play();
} else {
stop();
}
};
}
frame 1 {
s = new Sound(this);
s.attachSound('slash');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 9 {
_parent.hit = false;
_parent.gotoAndStop(2);
}
}
movieClip 2414 {
frame 1 {
stop();
this.gotoAndStop(4);
duckUp = false;
this.onEnterFrame = function () {
if (_root.paus == false) {
if (this._currentframe == 13) {
this.gotoAndStop(1);
this._parent.duck = false;
}
if (this._parent.duckD == true) {
if (this._currentframe < 9) {
this.nextFrame();
}
} else {
if (duckUp == true) {
this.nextFrame();
}
if (duckUp == false) {
if (this._currentframe == 9) {
this.gotoAndStop(10);
duckUp = true;
} else {
if (this._currentframe > 4) {
this.prevFrame();
} else {
if (this._currentframe == 4) {
this._parent.duck = false;
}
}
}
}
}
}
};
}
}
movieClip 2429 {
frame 1 {
this.gotoAndStop(1);
dub = false;
up = false;
strong = false;
sup = false;
stop();
this.onEnterFrame = function () {
if (_root.paus == false) {
if (Key.isDown(37) && Key.isDown(39) == false) {
if (this._currentframe == 1) {
_parent._xscale = -_parent.size;
}
if (_parent.xspeed <= 0 && _parent._xscale == -_parent.size) {
this.legs.gotoAndStop(2);
this._parent.xspeed = -6;
}
}
if (Key.isDown(39) && Key.isDown(37) == false) {
if (this._currentframe == 1) {
_parent._xscale = _parent.size;
}
if (_parent.xspeed >= 0 && _parent._xscale == _parent.size) {
this.legs.gotoAndStop(2);
this._parent.xspeed = 6;
}
}
if (Key.isDown(37) == false && Key.isDown(39) == false) {
this.legs.gotoAndStop(1);
}
if (Key.isDown(83) && sup == true && strong == false && dub == false) {
strong = true;
}
if (Key.isDown(65) && up == true && strong == false && dub == false) {
dub = true;
}
if (Key.isDown(65) == false && up == false) {
up = true;
}
if (Key.isDown(83) == false && sup == false) {
sup = true;
}
if (this._currentframe == 15) {
if (dub == false && strong == false) {
this._parent.attack = false;
this.gotoAndStop(5);
this._parent.gotoAndStop(2);
} else {
if (dub == true) {
this._parent.gotoAndStop(8);
} else {
if (strong == true) {
this._parent.gotoAndStop(9);
}
}
}
} else {
this.nextFrame();
}
}
};
}
frame 7 {
s = new Sound(this);
s.attachSound('wiff');
s.setVolume(_root.vol);
s.start(0, 0);
}
}
movieClip 2442 {
frame 1 {
this.gotoAndStop(2);
up = false;
strong = false;
this.onEnterFrame = function () {
if (_root.paus == false) {
if (Key.isDown(37)) {
if (this._currentframe == 2 && Key.isDown(39) == false) {
_parent._xscale = -_parent.size;
}
if (_parent.xspeed <= 0 && _parent._xscale == -_parent.size) {
_parent.xspeed = -5;
this.legs.gotoAndStop(2);
}
}
if (Key.isDown(39) && Key.isDown(37) == false) {
if (this._currentframe == 2 && Key.isDown(37) == false) {
_parent._xscale = _parent.size;
}
if (_parent.xspeed >= 0 && _parent._xscale == _parent.size) {
_parent.xspeed = 5;
this.legs.gotoAndStop(2);
}
}
if (Key.isDown(37) == false && Key.isDown(39) == false) {
this.legs.gotoAndStop(1);
}
if (Key.isDown(83) && strong == false) {
strong = true;
}
if (this._currentframe == 14) {
if (strong == false) {
this._parent.attack = false;
this._parent.gotoAndStop(2);
} else {
this._parent.gotoAndStop(10);
}
} else {
this.nextFrame();
}
}
};
}
frame 7 {
s = new Sound(this);
s.attachSound('wiff2');
s.setVolume(_root.vol);
s.start(0, 0);
}
}
movieClip 2469 {
frame 1 {
this.gotoAndPlay(6);
this.onEnterFrame = function () {
if (_root.paus == false) {
play();
} else {
stop();
}
};
}
frame 12 {
s = new Sound(this);
s.attachSound('wiff');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 18 {
s = new Sound(this);
s.attachSound('wiff2');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 25 {
this._parent.attack = false;
this._parent.gotoAndStop(2);
}
}
movieClip 2492 {
frame 1 {
this.gotoAndStop(4);
if (Key.isDown(37) && Key.isDown(39) == false) {
_parent._xscale = -_parent.size;
}
if (Key.isDown(37) == false && Key.isDown(39)) {
_parent._xscale = _parent.size;
}
this.onEnterFrame = function () {
if (_root.paus == false) {
if (this._currentframe == 19) {
this._parent.attack = false;
this._parent.gotoAndStop(2);
} else {
this.nextFrame();
}
}
};
}
frame 5 {
s = new Sound(this);
s.attachSound('knife');
s.setVolume(_root.vol);
s.start(0, 0);
}
}
movieClip 2513 {
frame 1 {
dub = false;
up = false;
strong = false;
sup = false;
stop();
if (Key.isDown(37) && Key.isDown(39) == false) {
_parent._xscale = -_parent.size;
}
if (Key.isDown(37) == false && Key.isDown(39)) {
_parent._xscale = _parent.size;
}
this.onEnterFrame = function () {
if (_root.paus == false) {
if (Key.isDown(83) && sup == true && strong == false && dub == false) {
strong = true;
}
if (Key.isDown(65) && up == true && strong == false && dub == false) {
dub = true;
}
if (Key.isDown(65) == false && up == false) {
up = true;
}
if (Key.isDown(83) == false && sup == false) {
sup = true;
}
if (this._currentframe == 16) {
if (dub == false && strong == false) {
this._parent.attack = false;
this.gotoAndStop(1);
this._parent.gotoAndStop(2);
} else {
if (dub == true) {
this._parent.gotoAndStop(12);
} else {
if (strong == true) {
this._parent.gotoAndStop(13);
}
}
}
} else {
this.nextFrame();
}
}
};
}
frame 6 {
s = new Sound(this);
s.attachSound('wiff');
s.setVolume(_root.vol);
s.start(0, 0);
}
}
movieClip 2532 {
frame 1 {
this.gotoAndStop(3);
stop();
this.onEnterFrame = function () {
if (_root.paus == false) {
if (this._currentframe == 20) {
this._parent.attack = false;
this.gotoAndStop(1);
this._parent.gotoAndStop(2);
} else {
this.nextFrame();
}
}
};
}
frame 5 {
s = new Sound(this);
s.attachSound('wiff');
s.setVolume(_root.vol);
s.start(0, 0);
}
}
movieClip 2549 {
frame 1 {
this.gotoAndStop(5);
strong = false;
sup = false;
stop();
if (Key.isDown(37) && Key.isDown(39) == false) {
_parent._xscale = -_parent.size;
}
if (Key.isDown(37) == false && Key.isDown(39)) {
_parent._xscale = _parent.size;
}
this.onEnterFrame = function () {
if (_root.paus == false) {
if (Key.isDown(83) && sup == true && strong == false) {
strong = true;
}
if (Key.isDown(83) == false && sup == false) {
sup = true;
}
if (this._currentframe == 18) {
if (strong == false) {
this._parent.attack = false;
this.gotoAndStop(1);
this._parent.gotoAndStop(2);
} else {
if (strong == true) {
this._parent.gotoAndStop(14);
}
}
} else {
this.nextFrame();
}
}
};
}
frame 8 {
s = new Sound(this);
s.attachSound('wiff2');
s.setVolume(_root.vol);
s.start(0, 0);
}
}
movieClip 2579 {
frame 1 {
this.gotoAndStop(6);
stop();
if (Key.isDown(37) && Key.isDown(39) == false) {
_parent._xscale = -_parent.size;
}
if (Key.isDown(37) == false && Key.isDown(39)) {
_parent._xscale = _parent.size;
}
this.onEnterFrame = function () {
if (_root.paus == false) {
if (this._currentframe == 31) {
this._parent.attack = false;
this._parent.gotoAndStop(2);
} else {
this.nextFrame();
}
}
};
}
frame 14 {
s = new Sound(this);
s.attachSound('wiff');
s.setVolume(_root.vol);
s.start(0, 0);
}
}
movieClip 2602 {
frame 1 {
if (_parent.jump == false) {
this.gotoAndStop(6);
if (Key.isDown(39)) {
_parent.xspeed = 12;
_parent._xscale = _parent.size;
}
if (Key.isDown(37)) {
_parent.xspeed = -12;
_parent._xscale = -_parent.size;
}
} else {
_parent.yspeed -= 3;
_parent.attack = true;
this.gotoAndStop(10);
}
stop();
this.onEnterFrame = function () {
if (_root.paus == false) {
if (_parent.jump == true) {
if (Key.isDown(39)) {
if (_parent.xspeed < _parent.max) {
_parent.xspeed += 0.25;
}
}
if (Key.isDown(37)) {
if (_parent.xspeed > -_parent.max) {
_parent.xspeed -= 0.25;
}
}
if (this._currentframe == 20) {
if (Key.isDown(65)) {
if (_parent._y + _parent.heighty < _parent.floor - 50) {
_parent.yspeed -= 3;
this.gotoAndStop(10);
} else {
this.nextFrame();
}
} else {
_parent.gotoAndStop(4);
}
}
}
if (this._currentframe == 21) {
this._parent.attack = false;
this._parent.gotoAndStop(2);
} else {
this.nextFrame();
}
}
};
}
frame 14 {
s = new Sound(this);
s.attachSound('wiff2');
s.setVolume(_root.vol);
s.start(0, 0);
}
}
movieClip 2611 {
frame 1 {
this.gotoAndStop(1);
dub = false;
up = false;
strong = false;
sup = false;
d = true;
stop();
this.onEnterFrame = function () {
if (_root.paus == false) {
if (Key.isDown(37) && Key.isDown(39) == false && _parent._xscale == _parent.size) {
_parent._xscale = -_parent.size;
this.gotoAndStop(4);
}
if (Key.isDown(37) == false && Key.isDown(39) && _parent._xscale == -_parent.size) {
_parent._xscale = _parent.size;
this.gotoAndStop(4);
}
if (Key.isDown(83) && strong == false && dub == false && d == true) {
strong = true;
}
if (Key.isDown(65) && strong == false && dub == false && d == true) {
dub = true;
}
if (Key.isDown(68) && this._currentframe < 7) {
d = true;
this.nextFrame();
} else {
if (Key.isDown(68) == false) {
d = false;
this.gotoAndStop(this._currentframe - 1);
}
}
if (Key.isDown(68) == false && this._currentframe <= 2) {
this._parent.attack = false;
this._parent.gotoAndStop(2);
}
if (dub == true) {
this._parent.gotoAndStop(15);
} else {
if (strong == true) {
if (_parent.special >= 50) {
this._parent.gotoAndStop(17);
}
}
}
}
};
}
}
movieClip 2629 {
frame 1 {
this.gotoAndStop(1);
stop();
this.onEnterFrame = function () {
if (_root.paus == false) {
if (this._currentframe == 20) {
this._parent.attack = false;
this._parent.gotoAndStop(2);
} else {
this.nextFrame();
}
}
};
}
frame 5 {
s = new Sound(this);
s.attachSound('fireBlow');
s.setVolume(_root.vol);
s.start(0, 0);
}
frame 7 {
_parent.special -= 50;
}
}
movieClip 2641 {
frame 1 {
stop();
this.onEnterFrame = function () {
if (_root.paus == false) {
if (_parent.jump == false) {
_parent.attack = false;
}
if (this._currentframe == 11) {
if (Key.isDown(83)) {
this._parent.gotoAndStop(19);
}
if (Key.isDown(65) && Key.isDown(68)) {
_parent.gotoAndStop(16);
}
if (Key.isDown(65)) {
this.gotoAndStop(1);
}
if (Key.isDown(83) == false && Key.isDown(65) == false) {
_parent.attack = false;
}
stop();
} else {
this.nextFrame();
}
}
};
}
}
movieClip 2664 {
frame 1 {
_parent.attack = true;
stop();
soundOnce = true;
this.onEnterFrame = function () {
if (_root.paus == false) {
if (this._currentframe == 17) {
_parent.attack = false;
_parent.gotoAndStop(2);
}
if (_parent.yspeed < 30 && _parent.jump == true) {
_parent.yspeed += 2;
}
if (_parent.jump == true && this._currentframe < 8) {
this.nextFrame();
}
if (soundOnce == true && _parent.jump == false) {
}
if (_parent.jump == false && _parent.xspeed == 0) {
if (this._currentframe < 8) {
this.gotoAndStop(8);
} else {
this.nextFrame();
}
}
}
};
}
}
movieClip 2670 {
}
movieClip 2678 {
}
movieClip 2696 {
}
movieClip 2700 {
frame 35 {
m = new Sound(this);
m.attachSound('specialS');
m.setVolume(_root.vol);
m.start(0, 0);
}
frame 37 {
_root.frontFlash('flashGun');
}
frame 37 {
this.onEnterFrame = function () {
_parent.special -= 4;
_parent.hit = false;
_parent.recover = false;
_root.shake(_root, 9, 4, 1);
};
}
frame 41 {
_root.frontFlash('flashGun');
}
frame 45 {
_root.frontFlash('flashGun');
}
frame 49 {
_root.frontFlash('flashGun');
}
frame 53 {
_root.frontFlash('flashGun');
}
frame 56 {
_root.frontFlash('flashGun');
}
frame 60 {
_root.frontFlash('flashGun');
}
frame 70 {
_root.paus = false;
_root.reset();
_parent.specialOn = false;
_parent.attack = false;
_parent.gotoAndStop(2);
}
}
movieClip 2735 {
}
movieClip 2737 {
frame 1 {
_root.backFlash('death', 10090);
++_root.deaths;
}
frame 63 {
stop();
_root.attachMovie('gameOverSymb', 'gameOvers', 13090);
_root.gameOvers._x = 350;
_root.gameOvers._y = 225;
}
}
movieClip 2746 {
}
movieClip 2780 {
frame 1 {
this.onEnterFrame = function () {
if (_root.paus == false) {
play();
} else {
stop();
}
};
}
frame 1 {
e = new Sound(this);
e.attachSound('sawSound');
e.setVolume(_root.vol);
e.start(0, 0);
}
}
movieClip 2781 player {
frame 1 {
function sawReset() {
hit = false;
attack = false;
jump = false;
recover = false;
walk = false;
saw = false;
xspeed = 0;
yspeed = 0;
this.gotoAndStop(2);
}
function hitPlayer() {
this._visible = true;
recover = true;
recT = 33;
flashT = 2;
attack = false;
duck = false;
hit = true;
}
function hitMedium(scl, en) {
if (_root.bg.boss == false) {
var v3 = 10;
} else {
var v3 = 10;
}
if (speedPower == true) {
if (xspeed == 0) {
if (this._currentframe != 16) {
hitPlayer();
health -= v3;
yspeed += -5;
jump = true;
this.gotoAndStop(5);
}
xspeed = scl * 8;
}
} else {
if (this._currentframe != 16 || this._currentframe == 16 && (en._x > this._x && this._xscale < 0 || en._x < this._x && this._xscale > 0)) {
hitPlayer();
health -= v3;
yspeed += -5;
jump = true;
this.gotoAndStop(5);
xspeed = scl * 8;
} else {
if (justBlock == false) {
justBlock = true;
health -= v3 / 2;
xspeed = scl * 12;
}
}
}
}
function hitStrong(scl, en) {
if (_root.bg.boss == false) {
var v3 = 10;
} else {
var v3 = 15;
}
if (speedPower == true) {
if (xspeed == 0) {
if (this._currentframe != 16) {
hitPlayer();
health -= v3;
yspeed += -5;
jump = true;
this.gotoAndStop(5);
}
xspeed = scl * max;
}
} else {
if (this._currentframe != 16 || this._currentframe == 16 && (en._x > this._x && this._xscale < 0 || en._x < this._x && this._xscale > 0)) {
hitPlayer();
health -= v3;
yspeed += -5;
jump = true;
xspeed = scl * max;
this.gotoAndStop(5);
} else {
if (justBlock == false) {
justBlock = true;
health -= v3 / 2;
xspeed = scl * 17;
}
}
}
}
function smallHit() {
var v2 = 10;
hitPlayer();
health -= v2;
xspeed = -6 + random(13);
if (jump == false) {
yspeed = -5;
jump = true;
}
this.gotoAndStop(5);
}
function getHealth() {
health += 15;
}
function getSpecial() {
special += 20;
}
function afterSec() {
this._xscale = size;
walk = false;
attack = false;
hit = false;
recover = false;
jump = true;
this._x = 250;
this._y = -100;
xspeed = 0;
yspeed = 5;
regScroll = true;
playScroll = false;
}
function retry() {
yspeed = 0;
xspeed = 0;
floor = _root.floor;
plat = false;
jump = false;
attack = false;
hit = false;
recover = false;
max = 12;
acc = 4;
dec = 1;
fall = 1;
sizeMult = 1;
yJump = 15;
speedPower = false;
speedTimer = 200;
attackPower = false;
attackPowerT = 150;
giant = false;
newJump = false;
duck = false;
duckD = false;
weakDown = false;
blockDown = false;
justBlock = false;
specialOn = false;
blockT = 16;
strongDown = false;
size = 70;
this._xscale = size;
this._yscale = size;
heighty = this._height / 2;
this._y = floor - heighty;
flasher = false;
health = 99;
special = 80;
paus = false;
regScroll = true;
playScroll = false;
regScrolly = false;
playScrolly = true;
pauseUp = false;
sec = 0;
saw = false;
}
stop();
yspeed = 0;
xspeed = 0;
floor = _root.floor;
plat = false;
jump = false;
attack = false;
hit = false;
recover = false;
max = 12;
acc = 4;
dec = 1;
fall = 1;
sizeMult = 1;
yJump = 15;
speedPower = false;
speedTimer = 200;
attackPower = false;
attackPowerT = 150;
giant = false;
newJump = false;
duck = false;
duckD = false;
weakDown = false;
blockDown = false;
justBlock = false;
specialOn = false;
blockT = 16;
strongDown = false;
heighty = this._height / 2;
originH = heighty;
widthy = this._width / 2;
this._y = floor - heighty;
size = this._xscale;
flasher = false;
health = 99;
special = 80;
paus = false;
freeze;
regScroll = true;
playScroll = false;
regScrolly = false;
playScrolly = true;
pauseUp = false;
bFrame;
sec = 0;
saw = false;
landT = 0;
sT = 0;
freeze2 = false;
this.onEnterFrame = function () {
if (freeze == true) {
if (freeze2 == false) {
walk = true;
if (sec == 0) {
this._xscale = size;
_root.paus = true;
_root.letter = true;
this.gotoAndStop(2);
attack = false;
hit = false;
recover = false;
++sec;
this._x = -100;
this._y = _root.floor - heighty;
xspeed = 0;
yspeed = 0;
} else {
if (sec == 1) {
xspeed = 4;
if (this._x > 100) {
sec = 0;
_root.paus = false;
freeze = false;
}
}
}
} else {
if (freeze2 == true) {
if (sec == 0) {
xspeed = 0;
_root.paus = true;
_root.letter = true;
this.gotoAndStop(3);
attack = false;
hit = false;
recover = false;
++sec;
_root.floor = 600;
floor = 600;
} else {
if (sec == 1) {
if (this._y > 500) {
freeze2 = false;
freeze = false;
sec = 0;
++_root.phase.sec;
}
}
}
}
}
}
if (health > 100) {
health = 100;
}
if (health <= 0) {
health = 0;
this.swapDepths(10100);
this.gotoAndStop(21);
_root.paus = true;
}
if (special > 100) {
special = 100;
}
if (special < 0) {
special = 0;
}
if (recover == false) {
this._visible = true;
}
if (recover == true && _root.paus == true) {
_root.reset();
this._visible = true;
}
_root.healthPlayer.health = health;
_root.healthPlayer.special = special;
paus = _root.paus;
if (specialOn == true) {
if (this._currentframe != 20) {
_root.reset();
}
this.swapDepths(6600);
this.gotoAndStop(20);
_root.paus = true;
paus = true;
} else {
if (dead == false) {
this.swapDepths(_root.playerDepth);
}
}
if (Key.isDown(80) == false && _root.paus == false) {
pauseUp = true;
}
if (_root.paus == false && Key.isDown(80) && pauseUp == true) {
pauseUp = false;
_root.paus = true;
_root.addPMenu();
paus = true;
}
if (paus == false || freeze == true) {
if (justBlock == true) {
--blockT;
if (blockT < 0) {
blockT = 16;
justBlock = false;
}
}
if (giant == true) {
if (size < 400) {
_root.shake(_root, 5, 4, 0);
heighty = originH * (size / 70);
size += sizeMult;
} else {
if (ispeed == 0) {
_root.reset();
}
}
this._yscale = size;
if (this._xscale > 0) {
this._xscale = size;
} else {
this._xscale = -size;
}
sizeMult += 0.1;
attackPower = false;
attackPowerT = 150;
}
if (attackPower == true) {
--attackPowerT;
if (attackPowerT > 120) {
if (size < 130) {
_root.shake(_root, 5, 4, 0);
jump = true;
heighty = originH * (size / 70);
size += sizeMult;
} else {
if (_root._x != 0) {
_root.reset();
}
}
this._yscale = size;
if (this._xscale > 0) {
this._xscale = size;
} else {
this._xscale = -size;
}
sizeMult += 0.1;
}
if (attackPowerT < 0) {
sizeMult = 1;
size = 70;
if (this._xscale > 0) {
this._xscale = size;
} else {
this._xscale = -size;
}
this._yscale = size;
heighty = originH * (size / 70);
jump = true;
attackPowerT = 150;
attackPower = false;
_root.frontFlash('flashPower');
}
}
if (giant == false && attackPower == false) {
sizeMult = 1;
size = 70;
if (this._xscale > 0) {
this._xscale = size;
} else {
this._xscale = -size;
}
this._yscale = size;
heighty = originH;
attackPowerT = 150;
attackPower = false;
}
if (speedPower == true) {
if (giant == false) {
_root.addPlayerShade(this._x, this._y, this._currentframe, bFrame, this._xscale, this._yscale);
}
--speedTimer;
max = 20;
if (speedTimer < 0) {
max = 12;
speedTimer = 200;
speedPower = false;
}
}
if (recover == true) {
--recT;
if (recT >= 28) {
_root.shake(_root, 8, 5, 0);
} else {
_root.reset();
}
if (recT < 25) {
_root.reset();
--flashT;
if (flashT < 1) {
this._visible = false;
flashT = 2;
} else {
this._visible = true;
}
}
if (recT <= 0) {
this._visible = true;
recover = false;
}
}
newJump = false;
size = Math.abs(size);
if (playScroll == true) {
this._x += xspeed;
}
if (playScrolly == true) {
this._y += yspeed;
}
if (regScrolly == true) {
if (this._y < 100) {
if (yspeed < 0) {
_root.regScrolly(yspeed);
} else {
this._y += yspeed;
}
}
if (this._y + heighty > 225) {
if (yspeed > 0) {
_root.regScrolly(yspeed);
} else {
this._y += yspeed;
}
}
if (this._y >= 100 && this._y + heighty <= 225) {
this._y += yspeed;
}
}
if (regScroll == true) {
if (this._x < 250) {
if (xspeed < 0) {
_root.regScroll(xspeed);
} else {
this._x += xspeed;
}
}
if (this._x > 450) {
if (xspeed > 0) {
_root.regScroll(xspeed);
} else {
this._x += xspeed;
}
}
if (this._x >= 250 && this._x <= 450) {
this._x += xspeed;
}
}
if (plat.plat == false) {
floor = _root.floor;
}
if (this._y + heighty < floor - 1) {
jump = true;
}
if (floor != _root.floor && specialOn == false) {
this.swapDepths(4000);
} else {
if (specialOn == false) {
this.swapDepths(_root.playerDepth);
}
}
if (this._y + heighty >= floor) {
this._y = floor - heighty;
if (jump == true) {
if (yspeed >= 20) {
u.stop();
u = new Sound(this);
u.attachSound('landPlayer');
u.setVolume(_root.vol);
u.start(0, 0);
landT = 4;
}
yspeed = 0;
jump = false;
}
}
if (jump == true) {
yspeed += fall;
}
if (landT > 0) {
sT = 0;
--landT;
_root.shake(_root, 2, -2, 1);
} else {
if (sT == 0) {
sT = -1;
_root.reset();
}
}
if (_root.paus == false) {
if (this._x + widthy > 700) {
this._x = 700 - widthy;
this.xspeed = xspeed / -2;
}
if (this._x - widthy < 0) {
this._x = widthy;
this.xspeed = xspeed / -2;
}
if (saw == false) {
if (Key.isDown(32) && special == 100) {
_root.backFlash('specialBG', 100);
specialOn = true;
attack = true;
}
if (Key.isDown(68) == false) {
blockDown = false;
}
if (Key.isDown(68) && jump == false && duck == false && attack == false && hit == false) {
attack = true;
blockDown = true;
this.gotoAndStop(16);
}
if (Key.isDown(65) == false) {
weakDown = false;
}
if (Key.isDown(65) && jump == false && duck == false && attack == false && hit == false && weakDown == false && Key.isDown(38) == false) {
attack = true;
weakDown = true;
this.gotoAndStop(7);
}
if (Key.isDown(83) == false) {
strongDown = false;
}
if (Key.isDown(83) && hit == false && jump == false && duck == false && attack == false && strongDown == false && weakDown == false) {
attack = true;
strongDown = true;
this.gotoAndStop(11);
}
if (Key.isDown(40) && hit == false && jump == false && duck == false && attack == false) {
duck = true;
duckD = true;
this.gotoAndStop(6);
}
if (Key.isDown(40) == false) {
duckD = false;
}
if (Key.isDown(38) && hit == false && jump == false && duck == false && attack == false) {
this.gotoAndStop(4);
yspeed = -yJump;
jump = true;
newJump = true;
}
if (Key.isDown(37) && Key.isDown(39) == false && hit == false && duck == false && attack == false) {
if (jump == false && xspeed > -max) {
xspeed -= acc;
if (xspeed < -max) {
xspeed = -max;
}
} else {
if (xspeed > -max) {
--xspeed;
}
}
this._xscale = -size;
this._yscale = size;
} else {
if (jump == false && Key.isDown(39) == false) {
if (xspeed > 0) {
xspeed -= dec;
}
if (xspeed < 0) {
xspeed += dec;
}
if (Math.abs(xspeed) < 1) {
xspeed = 0;
}
}
}
if (Key.isDown(39) && Key.isDown(37) == false && hit == false && duck == false && attack == false) {
if (jump == false && xspeed < max) {
xspeed += acc;
if (xspeed > max) {
xspeed = max;
}
} else {
if (xspeed < max) {
++xspeed;
}
}
this._xscale = size;
this._yscale = size;
} else {
if (jump == false && Key.isDown(37) == false) {
if (xspeed > 0) {
xspeed -= dec;
}
if (xspeed < 0) {
xspeed += dec;
}
if (Math.abs(xspeed) < 1) {
xspeed = 0;
}
}
}
if (Key.isDown(39) && Key.isDown(37)) {
if (xspeed > 0) {
xspeed -= dec;
}
if (xspeed < 0) {
xspeed += dec;
}
if (Math.abs(xspeed) < 1) {
xspeed = 0;
}
}
} else {
this.gotoAndStop(22);
if (Key.isDown(39)) {
this._xscale = size;
xspeed = 12;
}
if (Key.isDown(37)) {
this._xscale = -size;
xspeed = -12;
}
}
}
if (xspeed == 0 && jump == false && hit == false && duck == false && attack == false && saw == false) {
this.gotoAndStop(2);
}
if (xspeed != 0 && jump == false && hit == false && duck == false && attack == false && saw == false) {
this.gotoAndStop(3);
}
}
};
}
}
movieClip 2795 {
frame 1 {
this.onEnterFrame = function () {
if (_root.paus == false) {
play();
} else {
stop();
}
};
}
}
movieClip 2807 {
}
movieClip 2828 {
}
movieClip 2829 playerEffect {
frame 1 {
stop();
this._alpha = 80;
this.onEnterFrame = function () {
if (this._alpha <= 0) {
this.removeMovieClip();
}
this._alpha -= 10;
};
}
}
movieClip 2830 tel16 {
frame 1 {
stop();
hit = false;
this._alpha = 0;
remove = false;
this.onEnterFrame = function () {
if (remove == false) {
if (this._alpha < 100) {
this._alpha += 20;
}
}
if (remove == true) {
if (this._alpha <= 0) {
this.removeMovieClip();
}
this._alpha -= 10;
}
if (_root.paus == false) {
if (this.hitTest(_root.player.body) && hit == false) {
s = new Sound(this);
s.attachSound('teleportS');
s.setVolume(_root.vol);
s.start(0, 0);
hit = true;
remove = true;
_root.transitiony('tranSec4');
}
}
};
}
}
movieClip 2831 tel17 {
frame 1 {
stop();
hit = false;
this._alpha = 0;
remove = false;
this.onEnterFrame = function () {
if (remove == false) {
if (this._alpha < 100) {
this._alpha += 20;
}
}
if (remove == true) {
if (this._alpha <= 0) {
this.removeMovieClip();
}
this._alpha -= 10;
}
if (_root.paus == false) {
if (this.hitTest(_root.player.body) && hit == false) {
s = new Sound(this);
s.attachSound('teleportS');
s.setVolume(_root.vol);
s.start(0, 0);
hit = true;
remove = true;
_root.transitiony('tranSec10');
}
}
};
}
}
movieClip 2834 {
}
movieClip 2836 {
}
movieClip 2838 {
}
movieClip 2840 {
}
movieClip 2842 {
}
movieClip 2844 {
}
movieClip 2846 {
}
movieClip 2848 {
}
movieClip 2850 {
}
movieClip 2852 {
}
movieClip 2853 {
frame 1 {
n;
stop();
this.onEnterFrame = function () {
this.gotoAndStop(n + 1);
};
}
}
movieClip 2854 timer1 {
frame 1 {
n = 3;
n1 = 0;
time = 20;
tim = 5;
t = 0;
this._alpha = 0;
_root.music.stop();
_root.music.attachSound('mBonus');
_root.music.setVolume(_root.vol);
_root.music.start(0, 199);
remove = false;
this.onEnterFrame = function () {
if (_root.paus == false) {
if (remove == true) {
--t;
if (_root.music.getVolume() > 0) {
_root.music.setVolume(_root.music.getVolume() - 11);
} else {
_root.music.stop();
}
if (_root.phase.n <= 0 || t < 0) {
_root.checkM('Medication');
_root.player.giant = false;
_root.frontFlash('flashPower');
e = new Sound(this.secs);
e.attachSound('spark');
e.setVolume(_root.vol);
e.start(0, 0);
_root.bg.attachMovie('tel16', 'telPortal', 10005);
_root.bg.telPortal._x = 400;
_root.bg.telPortal._y = 0;
if (this._alpha <= 0 && _root.player.giant == false) {
this.removeMovieClip();
}
}
if (this._alpha > 0) {
this._alpha -= 10;
}
}
if (remove == false) {
this.tens.n = n;
this.secs.n = n1;
if (this._alpha < 100) {
this._alpha += 20;
}
if (_root.paus == false) {
--tim;
if (tim > 0) {
_root.shake(_root, 3, 3, 0);
}
if (_root.phase.n < 3) {
tim = 30;
var v3 = 0;
while (v3 < 8) {
_root.addEnemy('enemy', 1 + random(2), -200 + random(900), -100 - random(50));
++v3;
}
}
}
--time;
if (time <= 0) {
time = 20;
--n1;
s = new Sound(this);
s.attachSound('timerClick');
s.setVolume(_root.vol);
s.start(0, 0);
if (n1 < 0) {
--n;
if (n > -1) {
n1 = 9;
} else {
_root.reset();
remove = true;
t = 200;
}
}
}
}
}
};
}
}
movieClip 2855 timer2 {
frame 1 {
n = 3;
n1 = 0;
time = 35;
tim = 5;
t = 0;
this._alpha = 0;
_root.music.stop();
_root.music.attachSound('mBonus');
_root.music.setVolume(_root.vol);
_root.music.start(0, 199);
remove = false;
this.onEnterFrame = function () {
if (_root.paus == false) {
if (remove == true) {
--t;
if (_root.music.getVolume() > 0) {
_root.music.setVolume(_root.music.getVolume() - 11);
} else {
_root.music.stop();
}
if (_root.phase.n <= 0 || t < 0) {
_root.checkM('Evil Dead');
_root.player.sawReset();
_root.frontFlash('flashPower');
e = new Sound(this.secs);
e.attachSound('spark');
e.setVolume(_root.vol);
e.start(0, 0);
_root.bg.attachMovie('tel17', 'telPortal', 10005);
_root.bg.telPortal._x = 400;
_root.bg.telPortal._y = 0;
if (this._alpha <= 0 && _root.player.saw == false) {
this.removeMovieClip();
}
}
if (this._alpha > 0) {
this._alpha -= 10;
}
}
if (remove == false) {
this.tens.n = n;
this.secs.n = n1;
if (this._alpha < 100) {
this._alpha += 20;
}
if (_root.paus == false) {
--tim;
if (tim > 0) {
_root.shake(_root, 3, 3, 0);
}
if (_root.phase.n < 3) {
tim = 30;
var v3 = 0;
while (v3 < 8) {
_root.addEnemy('enemy', 5 + random(2), -200 + random(900), -100 - random(50));
++v3;
}
}
}
--time;
if (time <= 0) {
time = 20;
--n1;
s = new Sound(this);
s.attachSound('timerClick');
s.setVolume(_root.vol);
s.start(0, 0);
if (n1 < 0) {
--n;
if (n > -1) {
n1 = 9;
} else {
_root.reset();
remove = true;
t = 200;
}
}
}
}
}
};
}
}
movieClip 2857 {
}
movieClip 2858 {
frame 1 {
this._alpha = 0;
this.onEnterFrame = function () {
if (this._alpha < 100) {
this._alpha += 10;
}
};
}
instance of movieClip 340 {
}
}
movieClip 2859 {
frame 1 {
this._alpha = 75;
}
}
movieClip 2860 {
frame 1 {
this._alpha = 0;
this.onEnterFrame = function () {
if (this._alpha < 100) {
this._alpha += 10;
}
};
}
}
movieClip 2861 {
frame 1 {
this._alpha = 0;
this.onEnterFrame = function () {
if (this._alpha < 100) {
this._alpha += 10;
}
};
}
}
movieClip 2863 {
}
movieClip 2864 {
frame 1 {
this._alpha = 0;
this.onEnterFrame = function () {
if (this._alpha < 100) {
this._alpha += 10;
}
};
}
}
movieClip 2865 {
frame 1 {
this._alpha = 0;
this.onEnterFrame = function () {
if (this._alpha < 100) {
this._alpha += 10;
}
};
}
}
movieClip 2866 {
frame 1 {
this._alpha = 0;
this.onEnterFrame = function () {
if (this._alpha < 100) {
this._alpha += 10;
}
};
}
}
movieClip 2869 {
}
movieClip 2870 {
frame 1 {
this._alpha = 0;
this.onEnterFrame = function () {
if (this._alpha < 100) {
this._alpha += 10;
}
};
}
}
movieClip 2871 {
frame 1 {
this._alpha = 0;
this.onEnterFrame = function () {
if (this._alpha < 100) {
this._alpha += 10;
}
};
}
}
movieClip 2873 {
}
movieClip 2874 {
}
movieClip 2876 {
}
movieClip 2877 {
frame 1 {
this._alpha = 0;
this.onEnterFrame = function () {
if (this._alpha < 100) {
this._alpha += 10;
}
};
}
}
movieClip 2878 tutorial {
frame 1 {
_root.bg.boss = true;
spaceUp = false;
stop();
this.onEnterFrame = function () {
if (Key.isDown(32) == false) {
spaceUp = true;
}
if (Key.isDown(32) && spaceUp == true) {
m = new Sound(this);
m.attachSound('menuSelect');
m.setVolume(100);
m.start(0, 0);
spaceUp = false;
nextFrame();
}
};
}
frame 10 {
_root.bg.boss = false;
this.removeMovieClip();
}
}
movieClip 2879 {
frame 1 {
stop();
}
}
movieClip 2881 {
}
movieClip 2883 {
frame 1 {
var copyrightNotice = 'Copyright (c) 2006-2007 Sockpuppet Pty Ltd. All Rights Reserved. http://www.reanimator.net';
var reanimator = new flash.geom.Transform(this);
var camera = new flash.geom.Transform(this._parent);
var w = Stage.width;
var h = Stage.height;
this._visible = false;
this.onEnterFrame = function () {
this._parent.filters = this.filters;
var v2 = reanimator.matrix;
camera.colorTransform = reanimator.colorTransform;
v2.invert();
v2.translate(w * 0.5, h * 0.5);
camera.matrix = v2;
};
}
}
movieClip 2984 {
}
movieClip 2994 {
}
movieClip 3001 fullIntroMovie {
frame 1 {
aUp = false;
mUp = false;
this.onEnterFrame = function () {
this.onMouseUp = function () {
mUp = true;
};
this.onMouseDown = function () {
if (_root._currentframe == 2) {
if (mUp == true) {
_root.nextFrame();
}
}
};
if (Key.isDown(65) == false) {
aUp = true;
}
if (Key.isDown(65) && aUp == true) {
_root.nextFrame();
}
};
}
frame 352 {
_root.checkM('The Election');
_root.nextFrame();
}
}
frame 3 {
stop();
music = new Sound(_root.music1);
music.attachSound('disco');
music.setVolume(100);
music.start(0, 111);
}
movieClip 3006 {
}
movieClip 3012 {
}
button 3016 {
on (rollOver) {
_parent.sel = 1;
if (_parent.selectd == false && _parent.clic == false) {
m = new Sound(this);
m.attachSound('menuMove');
m.setVolume(100);
m.start(0, 0);
}
}
on (press) {
if (_parent.clic == false) {
_parent.clicked = true;
}
}
}
movieClip 3017 {
}
button 3021 {
on (rollOver) {
_parent.sel = 2;
if (_parent.selectd == false && _parent.clic == false) {
m = new Sound(this);
m.attachSound('menuMove');
m.setVolume(100);
m.start(0, 0);
}
}
on (press) {
if (_parent.selectd == false && _parent.clic == false) {
_parent.clicked = true;
}
}
}
movieClip 3022 {
}
button 3026 {
on (rollOver) {
_parent.sel = 3;
if (_parent.selectd == false && _parent.clic == false) {
m = new Sound(this);
m.attachSound('menuMove');
m.setVolume(100);
m.start(0, 0);
}
}
on (press) {
if (_parent.selectd == false && _parent.clic == false) {
_parent.clicked = true;
}
}
}
movieClip 3027 {
}
movieClip 3029 {
frame 1 {
sel = 1;
obj;
upU = false;
downU = false;
aU = false;
selectd = false;
clicked = false;
clic = false;
stop();
this.onEnterFrame = function () {
if (selectd == false) {
if (Key.isDown(38) == false) {
upU = true;
}
if (Key.isDown(40) == false) {
downU = true;
}
if (Key.isDown(65) == false) {
aU = true;
}
if (Key.isDown(65) && aU == true || clicked == true && clic == false) {
m = new Sound(this);
m.attachSound('menuSelect');
m.setVolume(100);
m.start(0, 0);
clicked = false;
clic = true;
aU = false;
if (sel == 1) {
selectd = true;
_root.attachMovie('tranL1', 'transition', 12003);
_root.transition._x = 350;
_root.transition._y = 225;
}
if (sel == 2) {
selectd = true;
this.attachMovie('instructions', 'ints', 12002);
this.ints._x = 0;
this.ints._y = 0;
}
if (sel == 3) {
selectd = true;
this.attachMovie('linkPageHolder', 'linky', 12002);
this.linky._x = 0;
this.linky._y = 0;
}
}
if (Key.isDown(38) && upU == true) {
m = new Sound(this);
m.attachSound('menuMove');
m.setVolume(100);
m.start(0, 0);
s._visible = true;
upU = false;
--sel;
if (sel == 0) {
sel = 3;
}
}
if (Key.isDown(40) && downU == true) {
m = new Sound(this);
m.attachSound('menuMove');
m.setVolume(100);
m.start(0, 0);
s._visible = true;
downU = false;
++sel;
if (sel == 4) {
sel = 1;
}
}
if (sel == 1) {
obj = o;
}
if (sel == 2) {
obj = t;
}
if (sel == 3) {
obj = th;
}
s._y = obj._y;
s._x = obj._x - obj._width / 2 - 28;
lights._y = obj._y;
lights._x = obj._x;
lights._height = obj._height;
lights._width = obj._width + 5;
if (obj == o) {
o._xscale = 105;
o._yscale = 105;
} else {
o._xscale = 100;
o._yscale = 100;
}
if (obj == t) {
t._xscale = 105;
t._yscale = 105;
} else {
t._xscale = 100;
t._yscale = 100;
}
if (obj == th) {
th._xscale = 105;
th._yscale = 105;
} else {
th._xscale = 100;
th._yscale = 100;
}
if (obj == f) {
f._xscale = 105;
f._yscale = 105;
} else {
f._xscale = 100;
f._yscale = 100;
}
}
};
}
}
movieClip 3032 {
frame 21 {
stop();
}
}
frame 4 {
function addPlayer(x, y, scale, entre) {
_root.attachMovie('player', 'player', 5000);
_root.player._x = x;
_root.player._y = y;
_root.player._xscale = scale;
_root.player._yscale = scale;
_root.player.freeze = true;
}
function addEnemy(enemy, frame, x, y, entre) {
++_root.phase.n;
if (e == 20) {
e = 0;
}
++e;
if (frame == 2 || frame == 4 || frame == 6) {
eD = 4500;
} else {
eD = 6500;
}
_root.attachMovie(enemy, enemy + e, eD + e);
_root[enemy + e].gotoAndStop(frame);
_root[enemy + e]._x = x;
_root[enemy + e]._y = y;
}
function addBoss(enemy, x, y) {
eD = 6500;
_root.attachMovie(enemy, 'boss', eD);
_root.boss._x = x;
_root.boss._y = y;
}
function dropItem(xP, yP, sX, sY) {
var v2 = random(5);
if (_root.bg.boss == true) {
v2 = 1;
}
if (v2 == 1 || v2 == 2) {
if (i == 10) {
i = 0;
}
++i;
_root.attachMovie('item', 'item' + i, 4450 + i);
_root['item' + i]._x = xP;
_root['item' + i]._y = yP;
_root['item' + i].xspeed = sX - 4 + random(9);
_root['item' + i].yspeed = sY - 4 - random(6);
}
}
function addPlayerShade(xP, yP, frame, frameP, scalex, scaley) {
if (frame != 6 && frame != 17 && frame != 16 && _root.player.attackPower == false) {
if (shad == 10) {
shad = 0;
}
YP = yP;
if (frame == 4) {
YP = yP - 25;
frameP = 6;
}
++shad;
_root.attachMovie('playerEffect', 'playerEffect' + shad, 4550 + shad);
_root['playerEffect' + shad]._x = xP;
_root['playerEffect' + shad]._y = YP;
_root['playerEffect' + shad]._xscale = scalex;
_root['playerEffect' + shad]._yscale = scaley;
_root['playerEffect' + shad].gotoAndStop(frame);
_root['playerEffect' + shad].bod.gotoAndStop(frameP);
}
}
function regScroll(speed) {
_root.bg._x -= speed;
_root.boss._x -= speed;
if (_root.player.speedPower == true) {
o = 0;
while (o <= 10) {
_root['playerEffect' + o]._x -= speed;
++o;
}
}
r = 0;
while (r <= 20) {
if (r < 11) {
_root['item' + r]._x -= speed;
}
_root['enemy' + r]._x -= speed;
++r;
}
}
function regScrolly(speed) {
_root.bg._y -= speed;
_root.boss._y -= speed;
if (_root.player.speedPower == true) {
o = 0;
while (o <= 10) {
_root['playerEffect' + o]._x -= speed;
++o;
}
}
r = 0;
while (r <= 20) {
if (r < 11) {
_root['item' + r]._x -= speed;
}
_root['enemy' + r]._y -= speed;
++r;
}
}
function bossScroll(speed) {
_root.bg._x -= speed;
_root.player._x -= speed;
if (_root.player.speedPower == true) {
o = 0;
while (o <= 10) {
_root['playerEffect' + o]._x -= speed;
++o;
}
}
r = 0;
while (r <= 20) {
if (r < 11) {
_root['item' + r]._x -= speed;
}
_root['enemy' + r]._x -= speed;
++r;
}
}
function shake(thing, intense, speedY, xy) {
thing.count += 10;
var v2 = intense * Math.cos(thing.count / speedY);
if (xy == 0) {
thing._x += v2;
}
if (xy == 1) {
thing._y += v2;
}
}
function reset() {
xspeed = 0;
yspeed = 0;
this._x = 0;
this._y = 0;
count = 0;
}
function gameReset() {
var v2 = 0;
while (v2 < 35) {
_root['enemy' + v2].removeMovieClip();
_root['item' + v2].removeMovieClip();
_root['playerEffect' + v2].removeMovieClip();
++v2;
}
_root.player.removeMovieClip();
_root.boss.removeMovieClip();
_root.bg.removeMovieClip();
_root.darkness.removeMovieClip();
_root.healthPlayer.removeMovieClip();
_root.phase.removeMovieClip();
_root.letterbox.removeMovieClip();
if (_root.healthBoss.health >= 0) {
music.stop();
}
_root.healthBoss.removeMovieClip();
_root.light.removeMovieClip();
_root.light2.removeMovieClip();
_root.light3.removeMovieClip();
_root.pauseM.removeMovieClip();
_root.gameOvers.removeMovieClip();
_root.pauseM.removeMovieClip();
musicB.stop();
_root.tutorial.removeMovieClip();
}
function retry() {
_root.phase.sec = 0;
_root.healthBoss.removeMovieClip();
_root.boss.removeMovieClip();
_root.light.removeMovieClip();
_root.light2.removeMovieClip();
_root.pauseM.removeMovieClip();
_root.gameOvers.removeMovieClip();
_root.bg.reset();
_root.bg.resetX();
if (_root.bg._currentframe == 2) {
if (secArea > 0) {
secArea = 0;
}
}
if (_root.bg._currentframe == 4) {
if (secArea > 2) {
secArea = 2;
}
}
if (_root.bg._currentframe == 6) {
if (secArea > 4) {
secArea = 4;
}
}
var v2 = 0;
while (v2 < 35) {
_root['enemy' + v2].removeMovieClip();
_root['item' + v2].removeMovieClip();
_root['playerEffect' + v2].removeMovieClip();
++v2;
}
_root.phase.n = 0;
_root.player.retry();
}
function cleanSec() {
_root.healthBoss.removeMovieClip();
var v2 = 0;
while (v2 < 35) {
_root['enemy' + v2].removeMovieClip();
_root['item' + v2].removeMovieClip();
++v2;
}
_root.phase.n = 0;
}
function backFlash(light, depth) {
_root.attachMovie(light, 'light', depth);
_root.light._x = 350;
_root.light._y = 225;
}
function transitiony(f) {
_root.attachMovie(f, 'transition', 12003);
_root.transition._x = 350;
_root.transition._y = 225;
}
function addTutorial() {
_root.attachMovie('tutorial', 'tutorial', 10019);
_root.tutorial._x = 350;
_root.tutorial._y = 415;
}
function frontFlash(light) {
_root.attachMovie(light, light, 10201);
_root[light]._x = 350;
_root[light]._y = 225;
}
function hudEffect(light) {
_root.attachMovie(light, 'light3', 10199);
_root.light3._x = 350;
_root.light3._y = 225;
}
function warning() {
_root.attachMovie('bossWarning', 'warn', 10196);
_root.warn._x = 350;
_root.warn._y = 350;
}
function addPMenu() {
_root.attachMovie('pause', 'pauseM', 12000);
_root.pauseM._x = 350;
_root.pauseM._y = 225;
}
function soundGroundPound() {
groundPs = new Sound(groundP);
groundPs.attachSound('soundGroundP');
groundPs.setPan(0);
groundPs.setVolume(100);
groundPs.start(0, 0);
}
function soundHit1() {
hits1.stop();
hits1 = new Sound(enemyH1);
hits1.attachSound('soundEnemyHit1');
hits1.setPan(0);
hits1.setVolume(100);
hits1.start(0, 0);
}
floor = 345;
e = 0;
eD;
i = 0;
shad = 0;
paus = false;
freeze = false;
lEdge = 0;
rEdge = 0;
count = 0;
xspeed = 0;
yspeed = 0;
vol = 100;
toast = 0;
secArea = 0;
deaths = 0;
mute = false;
_root.attachMovie('phase', 'phase', -1000);
playerDepth = 5000;
addPlayer(100, 200, 70);
_root.attachMovie('bg', 'bg', 0);
_root.bg._x = 0;
_root.bg._y = 225;
_root.bg.gotoAndStop(2);
_root.attachMovie('healthPlayer', 'healthPlayer', 10000);
_root.healthPlayer._x = 150;
_root.healthPlayer._y = 40;
music.stop();
music.attachSound('mLevel1');
music.setVolume(100);
music.start(0, 199);
musicB = new Sound(music2);
_root.attachMovie('letterbox', 'letterbox', 10202);
_root.letterbox._x = 350;
_root.letterbox._y = 225;
_root.attachMovie('darkness', 'darkness', 9991);
_root.darkness._x = 350;
_root.darkness._y = 225;
addTutorial();
hudEffect('hudDying');
}