Frame 1
function attachAd(event) {
com.Newgrounds.NewgroundsAPI.attachFlashAd(_root.cpmstar_ad);
}
function medalListLoaded(event) {
var _local7 = 0;
if (event.success) {
var _local3 = event.data.medals;
trace("Available medals:");
var _local2 = 0;
while (_local2 < _local3.length) {
var _local4 = _local3[_local2].medal_name;
var _local5 = _local3[_local2].medal_value;
var _local6 = _local3[_local2].medal_unlocked;
trace((((" * " + _local4) + " - ") + _local5) + " pts");
if (_local6) {
_root.medallist[_local4] = true;
_local7 = _local7 + _local5;
}
_local2++;
}
trace("Your medal score is " + _local7);
} else {
trace("Couldn't load the medal list");
}
}
function medalUnlocked(event) {
if (event.success) {
var _local2 = event.data;
var _local3 = _local2.medal_name;
var _local6 = _local2.medal_value;
var _local5 = _local2.medal_unlocked;
_root.medallist[_local3] = true;
trace(("You unlocked \"" + _local3) + "\"!");
} else {
trace("Couldn't unlock the medal");
}
}
onConnected = function (event) {
if ((!event.success) && (com.Newgrounds.NewgroundsAPI.hasUserSession())) {
_root.c_error._visible = true;
}
};
if (!_root.medallist) {
_root.medallist = new Array();
}
com.Newgrounds.NewgroundsAPI.setMovieVersion("2.0.1");
com.Newgrounds.NewgroundsAPI.addEventListener(com.Newgrounds.NewgroundsAPI.events.MOVIE_CONNECTED, onConnected);
com.Newgrounds.NewgroundsAPI.addEventListener(com.Newgrounds.NewgroundsAPI.events.MEDALS_LOADED, medalListLoaded);
com.Newgrounds.NewgroundsAPI.addEventListener(com.Newgrounds.NewgroundsAPI.events.MEDAL_UNLOCKED, medalUnlocked);
com.Newgrounds.NewgroundsAPI.addEventListener(com.Newgrounds.NewgroundsAPI.events.ADS_APPROVED, attachAd);
com.Newgrounds.NewgroundsAPI.connectMovie(2, "cbe84be77c90211fbffb41ffc9948341");
com.Newgrounds.NewgroundsAPI.getMedals();
function qualitog() {
my_cm.customItems.pop();
toggleHighQuality();
if (qual == 1) {
qual = 0;
my_cm.customItems.push(new ContextMenuItem("High Quality (for fast PCs)", qualitog));
} else {
qual = 1;
my_cm.customItems.push(new ContextMenuItem("Low Quality (for slow PCs)", qualitog));
}
}
function getSponsor() {
com.Newgrounds.NewgroundsAPI.loadNewgrounds();
}
function getPG() {
com.Newgrounds.NewgroundsAPI.loadMySite();
}
scoreURL = "http://www.psychogoldfish.com/scores/game/Alkie_Kong_2/guestScores/show";
sponsorURL = "http://www.newgrounds.com/?referrer=PsychoGoldfish";
sponsorName = "Newgrounds";
var my_cm = new ContextMenu();
for (eachProp in my_cm.builtInItems) {
var propName = eachProp;
my_cm.builtInItems[propName] = false;
}
my_cm.customItems.push(new ContextMenuItem("More Games @ " + sponsorName, getSponsor));
my_cm.customItems.push(new ContextMenuItem("More Games @ PsychoGoldfish.com", getPG));
my_cm.customItems.push(new ContextMenuItem("Low Quality (for slow PCs)", qualitog));
qual = 1;
this.menu = my_cm;
_global.stopMySound = function (taget) {
stopAllSounds();
};
_global.codes = new Array();
codes[1] = "LEYS";
codes[2] = "PWTR";
codes[3] = "QWXT";
codes[4] = "MPEM";
codes[5] = "OENC";
codes[6] = "NSSW";
codes[7] = "ZEPO";
codes[8] = "JUGL";
codes[9] = "YUPQ";
codes[10] = "ITFD";
codes[11] = "DOGN";
codes[12] = "AMPL";
codes[13] = "MLSN";
codes[14] = "PNIS";
codes[15] = "BRBT";
_global.prefix = new Array();
prefix[1] = Array("M", "R", "F");
prefix[2] = Array("Z", "A", "H");
prefix[3] = Array("X", "I", "K");
prefix[4] = Array("P", "M", "Y");
prefix[5] = Array("U", "F", "C");
prefix[6] = Array("O", "K", "N");
prefix[7] = Array("I", "L", "P");
prefix[8] = Array("E", "W", "O");
prefix[9] = Array("T", "E", "W");
prefix[10] = Array("M", "L", "Q");
prefix[11] = Array("Q", "K", "G");
prefix[12] = Array("R", "X", "H");
prefix[13] = Array("G", "C", "S");
prefix[14] = Array("J", "Y", "D");
prefix[15] = Array("B", "Z", "Y");
_global.codes2 = new Object();
for (i in codes) {
x = 0;
while (x < 3) {
codes2[prefix[i][x] + codes[i]] = new Object();
codes2[prefix[i][x] + codes[i]].level = i;
codes2[prefix[i][x] + codes[i]].setting = x;
trace(((((("codes2[" + prefix[i][x]) + codes[i]) + "] level:") + i) + " ,difficulty:") + x);
x++;
}
}
_global.lvlcode = "";
_global.hat = 1;
_global.makeBullet = function (type, host) {
trace("FIRE");
if (!_global.game.playerShots) {
_global.game.playerShots = 0;
}
depth = game.getNextHighestDepth();
game.attachMovie(type, "bullet" + depth, depth);
bullet = game["bullet" + depth];
if (host) {
hurts = "p";
} else {
hurts = "e";
host = player;
}
if (host.xoff) {
xoff = host.xoff;
} else {
xoff = 32;
}
if (host.yoff) {
yoff = host.yoff;
} else {
yoff = -27;
}
bullet._x = host._x + (xoff * host.dir);
bullet._y = host._y + yoff;
bullet._xscale = 100 * host.dir;
bullet.dir = host.dir;
};
_global.keys = new Object();
keys.left = 37;
keys.right = 39;
keys.up = 38;
keys.down = 40;
keys.grab = 65;
keys.jump = 83;
keys.pause = 80;
keys.quality = 81;
keys.alias = new Object();
keys.alias.k13 = "ENTR";
keys.alias.k16 = "SHFT";
keys.alias.k8 = "BKSP";
keys.alias.k17 = "CTRL";
keys.alias.k38 = "UP";
keys.alias.k37 = "LF";
keys.alias.k39 = "RT";
keys.alias.k40 = "DN";
keys.alias.k32 = "SPCE";
keys.alias.k33 = "PGUP";
keys.alias.k34 = "PGDN";
keys.alias.k36 = "HOME";
keys.alias.k35 = "END";
keys.alias.k45 = "INST";
keys.alias.k46 = "DEL";
_global.baselives = 1;
_global.baselife = 1;
_global.level = 1;
_global.framerate = 30;
stop();
Frame 2
function doMedal(name) {
if (!_root.medallist[name]) {
medal = {points:69, name:"BROKEN-" + name, description:("The medal that was called: " + name) + ", fucked up!"};
for (m in medals) {
if (name == medals[m].name) {
medal = medals[m];
}
}
medal_pop.medal = medal;
medal_pop.gotoAndPlay(2);
_root.medallist[name] = true;
com.Newgrounds.NewgroundsAPI.unlockMedal(name);
}
}
medals = new Array();
medals.push({points:5, name:"Worship the Mighty", description:"View the high scores."});
medals.push({points:5, name:"Six Pack", description:"Find 6 bottles."});
medals.push({points:5, name:"Rick Rolled", description:"View the entire end-game movie."});
medals.push({points:10, name:"Code Breaker", description:"Enter the super secret level code."});
medals.push({points:10, name:"Great Listener", description:"Do not skip any of Max's speeches."});
medals.push({points:25, name:"Half Case", description:"Find 12 Bottles."});
medals.push({points:25, name:"Great Defender", description:"Beat Alkie Kong without taking damage on Stage 3."});
medals.push({points:25, name:"Vertigo", description:"Beat Alkie Kong without taking damage on Stage 6."});
medals.push({points:25, name:"Switch Off", description:"Beat Alkie Kong without taking damage on Stage 9."});
medals.push({points:25, name:"Boxed Up", description:"Beat Alkie Kong without taking damage on Stage 12."});
medals.push({points:25, name:"Beerbot Smash", description:"Beat Alkie Kong without taking damage on Stage 15."});
medals.push({points:50, name:"Full Case", description:"Find 24 bottles."});
medals.push({points:50, name:"Survivalist", description:"Beat the game without taking damage on easy mode."});
medals.push({points:50, name:"Olympian", description:"Beat the game without taking damage on normal mode."});
medals.push({points:50, name:"Bat Crazy", description:"Beat the game on any mode without hurting any bats."});
medals.push({points:100, name:"Drunken Deity", description:"Beat the game without taking damage on brutal mode."});
function startMyGame() {
_global.lives = _global.baselives + (_global.setting * 2);
_global.life = _global.baselife + (_global.setting * 2);
if (level == 1) {
_global.perfect = true;
_global.batlover = true;
_global.listener = true;
}
_global.my_bottles = new Array();
_root.gotoAndStop("game");
}
_global.totalBottles = 0;
input = _global.lvlcode;
_global.score = 0;
_global.cache = new Object();
stop();
Instance of Symbol 320 MovieClip "music" in Frame 2
onClipEvent (keyDown) {
trace(Key.getCode());
if (Key.getCode() == keys.quality) {
_parent.qualitog();
}
}
Frame 3
_root.kongregateServices.connect();
_global.myLife = _global.life;
thecode = "";
if (_global.level > 1) {
thecode = ("Level Code: " + _global.prefix[_global.level][_global.setting]) + _global.codes[_global.level];
} else {
thecode = "";
}
goMsg = "Game Over";
Frame 4
_root.kongregateStats.submit("Bottles Collected", _global.totalBottles);
_root.kongregateScores.submit(_global.score);
final = "Final Score: " + _global.score;
music.fadeSong();
Frame 5
goMsg = "Congratulations";
thecode = "";
Symbol 13 MovieClip [explosion1] Frame 18
this.removeMovieClip();
stop();
Symbol 25 MovieClip [girder2] Frame 1
#initclip 44
Object.registerClass("girder2", gameObject);
#endinitclip
function landed() {
if (((this.sound > 0) and (falltime > 3)) and (!_global.mutesound)) {
snd = "girderbounce.mp3";
ply = new Sound(this);
ply.attachSound(snd);
ply.setVolume(this.sound);
ply.start();
}
}
isHeavy = true;
canGrab = true;
myWidth = 98;
stop();
Symbol 25 MovieClip [girder2] Frame 2
if (ymove > -2) {
ymove = ymove * -0.75;
} else {
ymove = -3;
}
trace("BOING");
_y = (_y - ymove);
mode = "fall";
Symbol 27 MovieClip [slope_box_clipable] Frame 1
#initclip 25
Object.registerClass("slope_box_clipable", Game.Platformer.slope_box);
#endinitclip
clipping = true;
Symbol 42 MovieClip Frame 1
stop();
Symbol 42 MovieClip Frame 8
_parent.makeBarrel();
Symbol 42 MovieClip Frame 9
_parent.moveBarrel();
Symbol 51 MovieClip [AlBoss2] Frame 1
function moveBarrel() {
if (!_global.paused) {
_parent["bar" + _parent.dp].xmove = 10 * ready;
_parent["bar" + _parent.dp].ymove = -3;
_parent["bar" + _parent.dp].mode = "fall";
}
}
function makeBarrel() {
if (!_global.paused) {
_parent.dp++;
_parent.attachMovie("barrels", "bar" + _parent.dp, _parent.dp);
_parent["bar" + _parent.dp]._x = _x + (80 * ready);
_parent["bar" + _parent.dp]._y = _y - 40;
_parent["bar" + _parent.dp].xmove = 5 * ready;
_parent["bar" + _parent.dp].ymove = -3;
_parent["bar" + _parent.dp].mode = "fall";
if (ready < 1) {
_parent["bar" + _parent.dp].baseFrame = 2;
}
}
}
function checkPlayer() {
if (Math.abs(_parent.player._x - _x) < ((myWidth + _parent.player.myWidth) / 2)) {
if ((_parent.player._y > (_y - myHeight)) and ((_parent.player._y - _parent.player.baseHeight) < _y)) {
_parent.player.killMe();
}
}
}
function checkObjects() {
if (!skip) {
objects = new Object();
for (var _local3 in _global.control.myChars) {
if (_parent[_local3].isObject) {
objects[_local3] = true;
}
}
skip = 3;
} else {
skip--;
}
for (var _local3 in objects) {
if (_parent[_local3].mode == "fall") {
if ((_parent[_local3]._y > (_y - myHeight)) and ((_parent[_local3]._y - _parent[_local3].myHeight) < _y)) {
if (Math.abs(_x - _parent[_local3]._x) < ((myWidth + _parent[_local3].myWidth) / 2)) {
_parent[_local3].play();
gotoAndPlay ("hurt");
}
}
}
}
}
myWidth = 120;
myHeight = 120;
onPlat = "AlPlatform";
wait = 30;
if (!initd) {
active = false;
_parent.dp = 1000;
initd = 1;
hp = 3;
timer = 60;
}
onEnterFrame = function () {
if (hp > 0) {
_x = (_parent.AlPlatformPlat._x + 64.1);
}
if (!active) {
if ((_parent.player._y < (_y + 200)) and (_parent.player.mode == "walk")) {
active = true;
if (!_global.mutesound) {
mysound = new Sound(this);
mysound.attachSound("al-scream.mp3");
mysound.start();
}
gotoAndPlay (13);
}
} else if (_currentframe < 8) {
checkPlayer();
checkObjects();
if (ready != 0) {
timer--;
if (timer < 1) {
if ((random(100) < 30) and (timer == 0)) {
play();
} else {
spr.play();
timer = wait;
}
}
}
}
};
ready = 1;
Symbol 51 MovieClip [AlBoss2] Frame 2
ready = 0;
Symbol 51 MovieClip [AlBoss2] Frame 4
ready = -1;
stop();
Symbol 51 MovieClip [AlBoss2] Frame 5
ready = 0;
Symbol 51 MovieClip [AlBoss2] Frame 7
gotoAndStop (1);
Symbol 51 MovieClip [AlBoss2] Frame 8
hp--;
if (hp < 1) {
gotoAndPlay ("dead");
} else if (!_global.mutesound) {
mysound = new Sound(this);
mysound.attachSound("al-hurt.mp3");
mysound.start();
}
ready = 0;
Symbol 51 MovieClip [AlBoss2] Frame 41
if (random(100) < 50) {
gotoAndStop (1);
} else {
gotoAndStop (4);
}
Symbol 51 MovieClip [AlBoss2] Frame 42
_parent.player.forcedUp = true;
if (!_global.mutesound) {
mysound = new Sound(this);
mysound.attachSound("al-scream.mp3");
mysound.start();
}
Symbol 51 MovieClip [AlBoss2] Frame 76
if (_parent.player.mode == "walk") {
_parent.player.Iwon();
stop();
}
Symbol 51 MovieClip [AlBoss2] Frame 77
gotoAndPlay (76);
Symbol 54 MovieClip [floor_button] Frame 1
#initclip 26
Object.registerClass("floor_button", gameObject);
#endinitclip
function onContact(s) {
if ((_parent[s].mode == "walk") and _parent[s].isHeavy) {
pressed = true;
}
}
dontFall = true;
myHeight = 4;
mode = "closed";
pressed = false;
onEnterFrame = function () {
if (pressed) {
if (_parent[item]._x != _parent[item + "_2"]._x) {
_parent[item].pause = false;
} else {
_parent[item].pase = true;
}
gotoAndStop (2);
} else {
if (_parent[item]._x != _parent[item + "_1"]._x) {
_parent[item].pause = false;
} else {
_parent[item].pase = true;
}
gotoAndStop (1);
}
pressed = false;
};
stop();
Symbol 56 MovieClip [keg] Frame 1
#initclip 27
Object.registerClass("keg", gameObject);
#endinitclip
function landed() {
if (((this.sound > 0) and (falltime > 3)) and (!_global.mutesound)) {
snd = "bullet.wav";
ply = new Sound(this);
ply.attachSound(snd);
ply.setVolume(this.sound + 20);
ply.start();
}
}
canGrab = true;
xbounce = 0.5;
ybounce = 0.33;
isHeavy = true;
stop();
Symbol 59 MovieClip [skew_box_solid] Frame 1
#initclip 28
Object.registerClass("skew_box_solid", Game.Platformer.skew_box);
#endinitclip
Symbol 64 MovieClip [switch copy] Frame 1
#initclip 29
Object.registerClass("switch copy", Switch);
#endinitclip
stop();
Symbol 64 MovieClip [switch copy] Frame 2
stop();
Symbol 77 MovieClip Frame 1
stop();
Symbol 85 MovieClip Frame 1
stop();
Symbol 88 MovieClip Frame 3
if (_parent._parent.sound > 0) {
snd = "moltyfire.mp3";
ply = new Sound(_parent._parent);
ply.attachSound(snd);
ply.setVolume(_parent._parent.sound);
ply.start();
}
Symbol 88 MovieClip Frame 21
_parent._parent.flameOn();
Symbol 88 MovieClip Frame 65
_parent._parent.flameOff();
Symbol 88 MovieClip Frame 67
_parent._parent.resume();
Symbol 89 MovieClip Frame 1
stop();
Instance of Symbol 88 MovieClip in Symbol 89 MovieClip Frame 16
onClipEvent (enterFrame) {
if (_global.paused) {
stop();
} else {
play();
}
}
Symbol 90 MovieClip [molty] Frame 1
#initclip 30
Object.registerClass("molty", Enemy1);
#endinitclip
function landed() {
if ((this.sound > 0) and (falltime > 3)) {
snd = "molty-land.mp3";
ply = new Sound(this);
ply.attachSound(snd);
ply.setVolume(this.sound);
ply.start();
}
}
dir = 1;
stop();
Symbol 90 MovieClip [molty] Frame 2
dir = -1;
stop();
Symbol 95 MovieClip [Al_Boss1] Frame 1
#initclip 31
Object.registerClass("Al_Boss1", Game.Platformer.character);
#endinitclip
function checkPlayer() {
if (Math.abs(_parent.player._x - _x) < ((myWidth + _parent.player.myWidth) / 2)) {
if ((_parent.player._y > (_y - myHeight)) and ((_parent.player._y - _parent.player.baseHeight) < _y)) {
_parent.player.killMe();
}
}
}
function checkObjects() {
if (!skip) {
objects = new Object();
for (var _local3 in _global.control.myChars) {
if (_parent[_local3].isObject) {
objects[_local3] = true;
}
}
skip = 3;
} else {
skip--;
}
for (var _local3 in objects) {
if (_parent[_local3].mode == "fall") {
if ((_parent[_local3]._y > (_y - myHeight)) and ((_parent[_local3]._y - _parent[_local3].myHeight) < _y)) {
if (Math.abs(_x - _parent[_local3]._x) < ((myWidth + _parent[_local3].myWidth) / 2)) {
_parent[_local3].play();
play();
}
}
}
}
}
myWidth = 130;
myHeight = 130;
if (!initd) {
initd = 1;
hp = 3;
ax = _parent.player._x;
ay = _parent.player._y;
}
stop();
onEnterFrame = function () {
if (_currentframe == 1) {
checkPlayer();
checkObjects();
}
};
Symbol 95 MovieClip [Al_Boss1] Frame 2
if (!_global.mutesound) {
mysound = new Sound(this);
mysound.attachSound("al-hurt.mp3");
mysound.start();
}
Symbol 95 MovieClip [Al_Boss1] Frame 33
hp--;
trace("HP");
if (hp > 0) {
gotoAndStop (1);
}
Symbol 95 MovieClip [Al_Boss1] Frame 34
_parent.molty.respawn = undefined;
_parent.molty._y = _parent.molty._y + 99999;
if (_parent.player.holding) {
_parent[_parent.player.holding].mode = false;
_parent.player.holding = false;
}
if (_parent.player._x < ax) {
_parent.player._x = ax;
}
if (_parent.player._y > ay) {
_parent.player._y = ay;
}
if ((_parent.player._y + _parent.player.ymove) < ay) {
_parent.player.mode = "dead";
_parent.player.gotoAndStop(2);
_parent.player.sprite.gotoAndStop("fall");
_parent.player.ymove++;
_parent.player._y = _parent.player._y + _parent.player.ymove;
} else if ((_parent.player._x - _parent.player.speed) > ax) {
_parent.player._y = ay;
_parent.player._x = _parent.player._x - _parent.player.speed;
_parent.player.sprite.gotoAndStop("run");
} else {
gotoAndPlay (36);
_parent.player.sprite.gotoAndStop("stand");
}
Symbol 95 MovieClip [Al_Boss1] Frame 35
gotoAndPlay (34);
Symbol 95 MovieClip [Al_Boss1] Frame 58
_parent.book._visible = false;
if (!_global.mutesound) {
mysound = new Sound(this);
mysound.attachSound("al-grunt.mp3");
mysound.start();
}
Symbol 95 MovieClip [Al_Boss1] Frame 102
_parent.player.Iwon();
stop();
Symbol 98 MovieClip [switch] Frame 1
#initclip 32
Object.registerClass("switch", Switch);
#endinitclip
stop();
Symbol 98 MovieClip [switch] Frame 2
stop();
Symbol 100 MovieClip Frame 27
gotoAndPlay (1);
Symbol 101 MovieClip [barrels] Frame 1
#initclip 33
Object.registerClass("barrels", Enemy1);
#endinitclip
function landed() {
if (((this.sound > 0) and (falltime > 3)) and (!_global.mutesound)) {
snd = "bullet.wav";
ply.stop();
ply = new Sound(_root.main.hearts);
ply.attachSound(snd);
ply.setVolume(this.sound / 2);
ply.start();
}
}
dir = 1;
spmod = 0;
if (!inited) {
isMolty = false;
isBarrel = true;
inited = true;
speed = 9;
dontFall = false;
canWalk = true;
canFlame = false;
slopeDir = true;
bounces = true;
xbounce = 0.5;
ybounce = 0.25;
myHeight = 30;
myWidth = 20;
initMe();
}
stop();
Symbol 101 MovieClip [barrels] Frame 2
dir = -1;
Symbol 103 MovieClip [girder] Frame 1
#initclip 34
Object.registerClass("girder", gameObject);
#endinitclip
function landed() {
if (((this.sound > 0) and (falltime > 3)) and (!_global.mutesound)) {
snd = "girderbounce.mp3";
ply = new Sound(this);
ply.attachSound(snd);
ply.setVolume(this.sound);
ply.start();
}
}
canGrab = true;
myWidth = 160;
isHeavy = true;
Symbol 106 MovieClip [skew_box_clipable] Frame 1
#initclip 35
Object.registerClass("skew_box_clipable", Game.Platformer.skew_box);
#endinitclip
clipping = true;
Symbol 108 MovieClip [registration] Frame 1
#initclip 36
Object.registerClass("registration", Game.Platformer.register);
#endinitclip
_visible = false;
Symbol 133 MovieClip Frame 1
stop();
Symbol 133 MovieClip Frame 4
stop();
Symbol 145 MovieClip Frame 1
stop();
Symbol 145 MovieClip Frame 10
play();
Symbol 145 MovieClip Frame 11
if (!_global.mutesound) {
snd = "altrio_grunt.mp3";
ply = new Sound(this);
ply.attachSound(snd);
ply.start();
}
Symbol 150 MovieClip Frame 1
stop();
Symbol 153 MovieClip Frame 27
_global.ImDead();
stop();
Symbol 161 MovieClip Frame 17
_parent._parent._parent._parent.camMask._x = _parent._parent._parent._x + _parent._parent._x;
_parent._parent._parent._parent.camMask._y = (_parent._parent._parent._y + _parent._parent._y) - (myHeight / 2);
_parent._parent._parent._parent.camMask.play();
Symbol 161 MovieClip Frame 42
_global.nextLevel();
stop();
Symbol 162 MovieClip Frame 1
stop();
Symbol 162 MovieClip Frame 41
_global.level_perfect = false;
trace("OW");
if (_global.myLife < 0) {
_global.perfect = false;
gotoAndStop ("kill");
} else {
gotoAndStop ("hit");
}
Symbol 162 MovieClip Frame 42
if (!_global.mutesound) {
snd = "altrio_hurt.mp3";
ply = new Sound(this);
ply.attachSound(snd);
ply.start();
}
Symbol 162 MovieClip Frame 43
if (!_global.mutesound) {
snd = "altrio_dead.mp3";
ply = new Sound(this);
ply.attachSound(snd);
ply.start();
}
_global.perfect = false;
Symbol 162 MovieClip Frame 46
if (!_global.mutesound) {
snd = "altrio-cmon.mp3";
ply = new Sound(this);
ply.attachSound(snd);
ply.start();
}
Symbol 163 MovieClip [hero] Frame 1
#initclip 37
Object.registerClass("hero", player_sprite);
#endinitclip
dir = 1;
identity = "player";
stop();
Symbol 163 MovieClip [hero] Frame 2
dir = -1;
Symbol 165 MovieClip [key] Frame 1
#initclip 38
Object.registerClass("key", gameObject);
#endinitclip
function landed() {
if (((this.sound > 0) and (falltime > 3)) and (!_global.mutesound)) {
snd = "CB.wav";
ply = new Sound(this);
ply.attachSound(snd);
ply.setVolume(this.sound / 2);
ply.start();
}
}
canGrab = true;
isKey = true;
myWidth = 20;
Symbol 172 MovieClip [box] Frame 1
#initclip 39
Object.registerClass("box", gameObject);
#endinitclip
function iDied() {
_parent.boxes--;
trace("drop th boxes damnit");
}
function landed() {
if (((this.sound > 0) and (falltime > 3)) and (!_global.mutesound)) {
snd = "boxhit.mp3";
ply = new Sound(this);
ply.attachSound(snd);
ply.setVolume(this.sound + 20);
ply.start();
}
}
canGrab = true;
xbounce = 0.5;
ybounce = 0.25;
_parent.boxes++;
stop();
Symbol 172 MovieClip [box] Frame 8
if (temporary) {
iDied();
this.removeMovieClip();
} else {
_x = bxp;
_y = byp;
xmove = 0;
ymove = 0;
mode = "fall";
}
Symbol 173 MovieClip [platform_box_solid] Frame 1
#initclip 40
Object.registerClass("platform_box_solid", Game.Platformer.platform_box);
#endinitclip
Symbol 175 MovieClip [slope_box_solid] Frame 1
#initclip 41
Object.registerClass("slope_box_solid", Game.Platformer.slope_box);
#endinitclip
Symbol 176 MovieClip [platform_box_clipable] Frame 1
#initclip 42
Object.registerClass("platform_box_clipable", Game.Platformer.platform_box);
#endinitclip
clipping = true;
Symbol 178 MovieClip [ladder] Frame 1
#initclip 43
Object.registerClass("ladder", Game.Platformer.ladder);
#endinitclip
Symbol 205 MovieClip Frame 40
stop();
Symbol 219 Button
on (press) {
tellTarget (_root) {
nextFrame();
};
}
Symbol 220 Button
on (press) {
gotoAndStop ("end");
_root.play();
}
Instance of Symbol 195 MovieClip in Symbol 221 MovieClip Frame 1
onClipEvent (load) {
PercentLoaded = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (PercentLoaded != 100) {
_parent.gotoAndStop(PercentLoaded);
} else {
_parent.gotoAndStop("lastframe");
}
}
onClipEvent (enterFrame) {
PercentLoaded = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (PercentLoaded != 100) {
_parent.gotoAndStop(PercentLoaded);
} else {
_parent.gotoAndPlay("loaded");
}
}
Symbol 221 MovieClip Frame 101
play();
Symbol 221 MovieClip Frame 165
stop();
Symbol 231 Button
on (release) {
_visible = false;
}
Symbol 232 MovieClip Frame 1
_visible = false;
Symbol 842 MovieClip [__Packages.com.Newgrounds.BaseN] Frame 0
class com.Newgrounds.BaseN
{
var ceiling, hashIndex, bitSize, hashVal, i;
function BaseN (hash) {
ceiling = 100000000000000;
if (hash) {
hashIndex = hash;
} else {
hashIndex = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`~@#$%^&*()+|;/";
}
bitSize = hashIndex.length;
hashVal = new Object();
i = 0;
while (i < bitSize) {
hashVal[hashIndex.charAt(i)] = i;
i++;
}
}
function verify(s) {
if (hashVal[s] != undefined) {
return(true);
}
return(false);
}
function encode(n, minchars) {
debug.lastencode = "";
if (typeof(i) != "string") {
n = n.toString();
}
if (n.charAt(0) == "-") {
var _local3 = "-";
n = n.substring(1);
} else {
var _local3 = "";
}
if (String(n).indexOf(".") > -1) {
var _local4 = String(n).split(".", 2);
return(((_local3 + baseNEncoder(_local4[0], minchars)) + ".") + baseNEncoder(_local4[1]));
}
debug.lastencode = debug.lastencode + "\tNo decimal\r";
return(_local3 + baseNEncoder(n, minchars));
}
function decode(s) {
var _local4 = 1;
if (s.charAt(0) == "-") {
_local4 = -1;
s = s.substring(1, s.length);
}
var _local3 = s.indexOf(".");
if (_local3 > -1) {
var _local5 = Math.pow(10, baseNDecoder(s.substring(_local3 + 1, s.length)));
return((baseNDecoder(s.substring(0, _local3)) / _local5) * _local4);
}
return(baseNDecoder(s) * _local4);
}
function baseNEncoder(n, minchars) {
if (!minchars) {
minchars = 1;
}
var _local4 = "";
while (n != 0) {
n = Math.round(n);
var _local3 = n % bitSize;
if (Math.round(_local3) != _local3) {
trace((((((((("BaseN failed on " + n) + "%") + bitSize) + " = ") + _local3) + " ") + int(n)) + " ") + int(bitSize));
}
_local4 = hashIndex.charAt(_local3) + _local4;
debug.lastencode = debug.lastencode + (((((((("\t-> n:" + n) + " % bitSize:") + bitSize) + " = ") + _local3) + ", final char=") + _local4) + newline);
n = n - _local3;
n = n / bitSize;
}
if (minchars) {
while (_local4.length < minchars) {
_local4 = hashIndex.charAt(0) + _local4;
}
}
return(_local4);
}
function baseNDecoder(s) {
var _local2 = 0;
var _local6 = 0;
i = 0;
while (i < s.length) {
var _local3 = s.charAt((s.length - i) - 1);
if (_local3 == hashIndex.charAt(0)) {
var _local5 = 0;
} else {
var _local5 = hashVal[_local3] * Math.pow(bitSize, i);
}
_local2 = _local2 + _local5;
if (_local2 >= ceiling) {
_local6 = _local6 + ((_local2 - (_local2 % ceiling)) / ceiling);
_local2 = _local2 % ceiling;
}
i++;
}
if (_local6 > 0) {
_local2 = "" + _local2;
while (_local2.length < (ceiling.toString().length - 1)) {
_local2 = "0" + _local2;
}
_local2 = ("" + _local6) + _local2;
}
return(_local2);
}
var debug = new Object();
}
Symbol 843 MovieClip [__Packages.com.Newgrounds.NewgroundsAPIError] Frame 0
class com.Newgrounds.NewgroundsAPIError
{
var message, name, alias;
function NewgroundsAPIError (error, msg) {
if (Number(error).toString() == String(error)) {
error = Number(error);
} else if (error_codes[String(error)]) {
error = error_codes[String(error)];
} else {
error = 0;
}
code = error;
message = msg;
name = error_names[error];
alias = aliases[error];
}
static function init_codes() {
var _local2 = new Object();
var _local1 = 0;
while (_local1 < aliases.length) {
_local2[aliases[_local1]] = _local1;
_local1++;
}
return(_local2);
}
static function init_names() {
var _local5 = new Array();
var _local3 = 0;
while (_local3 < aliases.length) {
var _local2 = aliases[_local3].toLowerCase().split("_");
var _local1 = 0;
while (_local1 < _local2.length) {
_local2[_local1] = _local2[_local1].substr(0, 1).toUpperCase() + _local2[_local1].substr(1, _local2[_local1].length);
for (var _local4 in always_caps) {
if (_local2[_local1].toUpperCase() == always_caps[_local4]) {
_local2[_local1] = _local2[_local1].toUpperCase();
}
}
_local1++;
}
_local5[_local3] = _local2.join(" ");
_local3++;
}
return(_local5);
}
function isError() {
return(true);
}
static var 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");
static var always_caps = new Array("API", "URL", "ID");
static var error_codes = init_codes();
static var error_names = init_names();
var code = 0;
}
Symbol 844 MovieClip [__Packages.com.Newgrounds.NewgroundsAPI] Frame 0
class com.Newgrounds.NewgroundsAPI
{
static var version, user_email, movie_id, debug, session_id, publisher_id, timeout, connected, tracker_id, encryption_key, user_id, user_name, host, error_format, normal_format, link_format, header_format, ad_url, ad_swf_url;
function NewgroundsAPI () {
}
static function setMovieVersion(v) {
if (v) {
version = String(v);
}
}
static function setUserEmail(e) {
user_email = e;
}
static function getOfficialVersionURL() {
var _local1 = (((((GATEWAY_URL + "?tracker_id=") + movie_id) + "&command_id=") + getCommandID("loadOfficalVersion")) + "&seed=") + Math.random();
if (debug) {
_local1 = _local1 + "&debug=1";
}
return(_local1);
}
static function hasUserSession() {
if (session_id && (publisher_id)) {
return(true);
}
if (_root.NewgroundsAPI_PublisherID && (_root.NewgroundsAPI_SessionID)) {
return(true);
}
return(false);
}
static function isNewgrounds() {
return((publisher_id == 1) || (_root.NewgroundsAPI_PublisherID == 1));
}
static function hasUserEmail() {
if (user_email) {
return(true);
}
return(false);
}
static function connectionTimeOut() {
clearInterval(timeout);
callListener(events.MOVIE_CONNECTED, false, new com.Newgrounds.NewgroundsAPIError("CONNECTION_FAILED", "Connection to NewgroundsAPI gateway timed out."));
}
static function connectMovie(m_id, encrypt_key, debug_mode) {
if (connected) {
return(undefined);
}
var _local3 = function () {
com.Newgrounds.NewgroundsAPI.connectionTimeOut();
};
timeout = setInterval(_local3, 8000, null);
if (!m_id) {
fatalError("NewgroundsAPI.connectMovie() - missing required movie_id parameter", "connectMovie");
}
movie_id = String(m_id);
tracker_id = Number(movie_id.substring(0, movie_id.indexOf(":")));
encryption_key = encrypt_key;
debug = debug_mode;
if (_root.NewgroundsAPI_PublisherID) {
publisher_id = _root.NewgroundsAPI_PublisherID;
if (_root.NewgroundsAPI_SessionID) {
session_id = _root.NewgroundsAPI_SessionID;
}
} else {
publisher_id = 1;
session_id = null;
user_id = 0;
user_name = "Guest";
}
if (_root.NewgroundsAPI_UserName) {
user_name = _root.NewgroundsAPI_UserName;
}
if (_root.NewgroundsAPI_UserID) {
user_id = _root.NewgroundsAPI_UserID;
}
connected = true;
var _local2 = _url;
if ((_local2.indexOf("http://") > -1) or (_local2.indexOf("https://") > -1)) {
host = _local2.split("/")[2].toLowerCase();
} else {
host = "localhost";
}
sendCommand("connectMovie", {host:host, movie_version:version});
}
static function loadNewgrounds() {
sendCommand("loadNewgrounds", {host:host}, true);
}
static function loadMySite() {
sendCommand("loadMySite", {host:host});
}
static function loadCustomLink(link) {
sendCommand("loadCustomLink", {host:host, link:link}, true);
}
static function logCustomEvent(event) {
sendCommand("logCustomEvent", {host:host, event:event});
}
static function postScore(score, value, get_best) {
if ((!score) or (value == undefined)) {
sendError({command_id:getCommandID("postScore")}, new com.Newgrounds.NewgroundsAPIError("MISSING_PARAM", "missing required parameter(s)"));
return(undefined);
}
sendSecureCommand("postScore", {score:score, value:value, get_best:get_best});
}
static function getTodaysScores(score, params) {
getScores(score, "t", params, "getTodaysScores");
}
static function getYesterdaysScores(score, params) {
getScores(score, "y", params, "getYesterdaysScores");
}
static function getThisWeeksScores(score, params) {
getScores(score, "w", params, "getThisWeeksScores");
}
static function getThisMonthsScores(score, params) {
getScores(score, "m", params, "getThisMonthsScores");
}
static function getThisYearsScores(score, params) {
getScores(score, "y", params, "getThisYearsScores");
}
static function getAlltimeScores(score, params) {
getScores(score, "a", params, "getAlltimeScores");
}
static function getScores(score, period, params, command_name) {
if (!score) {
sendError({command_id:getCommandID(command_name)}, new com.Newgrounds.NewgroundsAPIError("MISSING_PARAM", "missing required score name"));
return(undefined);
}
if (!params) {
params = new Object();
}
if (!hasUserSession()) {
callListener(events.SCORES_LOADED, false, new com.Newgrounds.NewgroundsAPIError("SITE_ID_REQUIRED", ("Host '" + host) + "' does not have high scores enabled"));
return(undefined);
}
params.publisher_id = publisher_id;
params.period = period;
params.score = score;
if (params.user_id) {
var _local3 = period;
} else {
var _local3 = period + "-u";
}
if (score_page_counts[_local3] == undefined) {
params.request_page_count = true;
}
sendCommand("getScores", params);
}
static function unlockMedal(medal, get_score) {
if (!medal) {
sendError({command_id:getCommandID("unlockMedal")}, new com.Newgrounds.NewgroundsAPIError("MISSING_PARAM", "missing required medal name"));
return(undefined);
}
var _local1 = new Object();
_local1.medal = medal;
if (get_score) {
_local1.get_score = get_score;
}
sendSecureCommand("unlockMedal", _local1);
}
static function getMedals() {
if (medals) {
callListener(events.MEDALS_LOADED, true, {medals:medals});
return(undefined);
}
var _local1 = new Object();
if (hasUserSession()) {
_local1.publisher_id = publisher_id;
_local1.user_id = user_id;
}
sendCommand("getMedals", _local1);
}
static function saveFile(folder, filename, contents, thumbnail_source) {
if (!save_file) {
save_file = new com.Newgrounds.NewgroundsAPISaveFile(movie_id, folder, filename);
save_file.setContents(contents);
if (thumbnail_source) {
save_file.setThumbnail(thumbnail_source);
}
save_file.onError = function (msg) {
var _local1 = new com.Newgrounds.NewgroundsAPIError("PERMISSION_DENIED", msg);
com.Newgrounds.NewgroundsAPI.sendError({command_id:com.Newgrounds.NewgroundsAPI.getCommandID("saveFile")}, _local1);
com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.FILE_SAVED, false, _local1);
};
save_file.onCancel = function (msg) {
var _local1 = new com.Newgrounds.NewgroundsAPIError("USER_CANCELLED", msg);
com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.FILE_SAVED, false, _local1);
};
save_file.submit();
} else {
var _local1 = new com.Newgrounds.NewgroundsAPIError("UPLOAD_IN_PROGRESS", "Please wait for the previous file to finish uploading");
sendError({command_id:getCommandID("saveFile")}, _local1);
callListener(events.FILE_SAVED, false, _local1);
}
}
static function checkFilePrivs(folder, filename) {
if (user_id) {
var _local1 = user_id;
} else {
var _local1 = 0;
}
var _local2 = {folder:folder, filename:filename, user_id:_local1, publisher_id:publisher_id};
sendCommand("checkFilePrivs", _local2);
}
static function finishFileSave(folder, filename, description, share, file, thumbnail) {
var _local2;
_local2 = {folder:folder, filename:filename, description:description, share:share};
var _local1;
_local1 = {file:file, thumbnail:thumbnail};
sendSecureCommand("saveFile", _local2, null, _local1);
}
static function getFiles(folder, options) {
var _local7 = {name:1, date:2, score:3};
var _local2 = {user_only:false, sort_on:"date", page:1, results_per_page:20, sort_descending:true};
var _local6 = new Array();
for (var _local10 in _local7) {
_local6.push(("'" + _local10) + "'");
}
var _local4 = new Array();
for (var _local9 in _local2) {
_local4.push(("'" + _local9) + "'");
}
if (options.sort_descending && (!_local7[options.sort_descending])) {
var _local3 = new com.Newgrounds.NewgroundsAPIError("MISSING_PARAM", (("'" + options.sort_descending) + "' is not a valid sort_on value. Valid values are: ") + _local6.join(", "));
sendError({command_id:getCommandID("getFiles")}, _local3);
delete options.sort_descending;
}
var _local8;
if (options) {
for (var _local10 in options) {
if (_local2[_local10] == undefined) {
var _local3 = new com.Newgrounds.NewgroundsAPIError("MISSING_PARAM", (("'" + _local10) + "' is not a valid option. Valid options are: ") + _local4.join(", "));
sendError({command_id:getCommandID("getFiles")}, _local3);
delete options[_local10];
} else if (typeof(options[_local10]) != typeof(_local2[_local10])) {
var _local3 = new com.Newgrounds.NewgroundsAPIError("MISSING_PARAM", (("option '" + _local10) + "' should be the following type: ") + typeof(_local2[_local10]));
sendError({command_id:getCommandID("getFiles")}, _local3);
delete options[_local10];
}
}
_local8 = options;
} else {
_local8 = new Object();
}
if (hasUserSession()) {
_local8.publisher_id = publisher_id;
_local8.user_id = user_id;
}
_local8.folder = folder;
sendCommand("getFiles", _local8);
}
static function getConfirmation(command_name, event, msg, target, confirm, cancel) {
var _local1 = new com.Newgrounds.NewgroundsAPIError("CONFIRM_REQUEST", msg);
_local1.confirm = function () {
target[confirm]();
};
_local1.cancel = function () {
target[cancel]();
};
_local1.command = getCommandID(command_name);
callListener(event, false, _local1);
}
static function doBlockHost(event) {
_root.stop();
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 _local2 = ("This movie has not been approved for use on " + host) + ".";
_local2 = _local2 + "\r\rFor an aproved copy, please visit:\r";
var _local4 = _local2.length;
_local2 = _local2 + event.data.movie_url;
var _local3 = _local2.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(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 = _local2;
_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(normal_format);
link_format.url = event.data.redirect_url;
_root.NGAPI_deny_host_overlay.message.setTextFormat(_local4, _local3, link_format);
}
static function onNewVersionAvailable(event) {
_root.stop();
initTextFormats();
var _local2 = new Object();
_local2.x = Stage.width / 2;
_local2.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(_local2.x - 240, _local2.y - 120);
_root.NGAPI_new_version_overlay.lineTo(_local2.x + 240, _local2.y - 120);
_root.NGAPI_new_version_overlay.lineTo(_local2.x + 240, _local2.y + 80);
_root.NGAPI_new_version_overlay.lineTo(_local2.x - 240, _local2.y + 80);
_root.NGAPI_new_version_overlay.lineTo(_local2.x - 240, _local2.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(_local2.x + 210, _local2.y - 110);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 230, _local2.y - 110);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 230, _local2.y - 90);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 210, _local2.y - 90);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 210, _local2.y - 110);
_root.NGAPI_new_version_overlay.exit.endFill();
_root.NGAPI_new_version_overlay.exit.moveTo(_local2.x + 214, _local2.y - 106);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 226, _local2.y - 94);
_root.NGAPI_new_version_overlay.exit.moveTo(_local2.x + 226, _local2.y - 106);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 214, _local2.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 _local3 = (("Version " + event.data.movie_version) + " is now available at:") + newline;
var _local6 = _local3.length;
_local3 = _local3 + event.data.movie_url;
var _local4 = _local3.length;
_root.NGAPI_new_version_overlay.createTextField("mouseblocker", 99, -10, -10, 1000, 1000);
_root.NGAPI_new_version_overlay.createTextField("newversion", 100, _local2.x - 210, _local2.y - 90, 400, 80);
_root.NGAPI_new_version_overlay.newversion.text = "New Version Available!";
_root.NGAPI_new_version_overlay.newversion.setTextFormat(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 = _local3;
_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(normal_format);
link_format.url = event.data.redirect_url;
_root.NGAPI_new_version_overlay.message.setTextFormat(_local6, _local4, link_format);
}
static function initTextFormats() {
if (!error_format) {
error_format = new TextFormat();
error_format.font = "Arial Black";
error_format.size = 48;
error_format.color = 16711680 /* 0xFF0000 */;
}
if (!header_format) {
header_format = new TextFormat();
header_format.font = "Arial Black";
header_format.size = 24;
header_format.color = 16777215 /* 0xFFFFFF */;
}
if (!normal_format) {
normal_format = new TextFormat();
normal_format.font = "Arial";
normal_format.bold = true;
normal_format.size = 12;
normal_format.color = 16777215 /* 0xFFFFFF */;
}
if (!link_format) {
link_format = new TextFormat();
link_format.color = 16776960 /* 0xFFFF00 */;
link_format.underline = true;
}
}
static function doEvent(e) {
switch (getCommandName(e.command_id)) {
case "connectMovie" :
clearInterval(timeout);
sendMessage("You have successfully connected to the Newgrounds API Gateway");
sendMessage(("Movie identified as \"" + e.movie_name) + "\"");
callListener(events.MOVIE_CONNECTED, e.success, {movie_name:e.movie_name});
var _local4 = false;
if (e.ad_status === -1) {
var _local6 = "This movie was not approved to run Flash Ads.";
sendWarning(_local6);
sendWarning(("visit " + AD_TERMS_URL) + " to view our approval guidelines");
if (!e.ad_url) {
callListener(events.ADS_APPROVED, false, new com.Newgrounds.NewgroundsAPIError("FLASH_ADS_NOT_APPROVED", _local6));
} else {
_local4 = true;
}
} else if (e.ad_status === 0) {
var _local6 = "Flash Ads are currently awaiting approval.";
sendNotice(_local6);
if (!e.ad_url) {
callListener(events.ADS_APPROVED, false, new com.Newgrounds.NewgroundsAPIError("FLASH_ADS_NOT_APPROVED", _local6));
} else {
_local4 = true;
}
}
if (e.ad_url) {
ad_url = unescape(e.ad_url);
if (!_local4) {
sendMessage("This movie has been approved to run Flash Ads!");
}
callListener(events.ADS_APPROVED, true);
}
if (e.deny_host) {
var _local6 = host + " does not have permission to run this movie!";
sendWarning(_local6);
sendWarning("\tUpdate your API configuration to unblock " + host);
callListener(events.HOST_BLOCKED, true, {movie_url:unescape(e.movie_url), redirect_url:getOfficialVersionURL()});
}
if (e.movie_version) {
sendWarning("According to your API Configuration, this version is out of date.");
if (version) {
sendWarning("\tThe this movie is version " + version);
}
sendWarning("\tThe most current version is " + e.movie_version);
callListener(events.NEW_VERSION_AVAILABLE, true, {movie_version:e.movie_version, movie_url:unescape(e.movie_url), redirect_url:getOfficialVersionURL()});
}
break;
case "logCustomEvent" :
if (e.success) {
sendMessage(("Event '" + e.event) + "' was logged.");
}
callListener(events.EVENT_LOGGED, e.success, {event:e.event});
break;
case "postScore" :
var _local7;
if (e.success) {
var _local3 = "User";
if (user_email) {
_local3 = user_email;
} else if (user_name) {
_local3 = user_name;
}
sendMessage(((((_local3 + " posted ") + e.value) + " to '") + e.score) + "'");
_local7 = {score:e.score, value:e.value, username:_local3};
}
callListener(events.SCORE_POSTED, e.success, _local7);
break;
case "getScores" :
_local7 = new Object();
if (e.user_id) {
var _local5 = e.period;
} else {
var _local5 = e.period + "-u";
}
if (e.total_pages) {
score_page_counts[_local5] = e.total_pages;
}
_local7.user_id = e.user_id;
_local7.current_page = e.current_page;
_local7.total_pages = score_page_counts[_local5];
_local7.scores = e.scores;
_local7.period = getPeriodName(e.period);
callListener(events.SCORES_LOADED, e.success, _local7);
break;
case "unlockMedal" :
if (medals) {
var _local2 = 0;
while (_local2 < medals.length) {
if (medals[_local2].medal_name === e.medal_name) {
medals[_local2].medal_unlocked = true;
break;
}
_local2++;
}
}
_local7 = {medal_name:e.medal_name, medal_value:e.medal_value, medal_difficulty:e.medal_difficulty};
callListener(events.MEDAL_UNLOCKED, e.success, _local7);
break;
case "getMedals" :
medals = e.medals;
_local7 = {medals:e.medals};
callListener(events.MEDALS_LOADED, e.success, _local7);
break;
case "getFiles" :
break;
case "getSystemFiles" :
break;
case "saveFile" :
save_file = null;
_local7 = {file_id:e.file_id, filename:e.filename, file_url:e.file_url, thumbnail:e.thumbnail, icon:e.icon};
callListener(events.FILE_SAVED, e.success, _local7);
break;
case "checkFilePrivs" :
if (save_file) {
save_file.checkPrivs(e);
} else {
_local7 = {filename:e.filename, folder:e.folder, can_read:e.can_read, can_write:e.can_write};
callListener(events.FILE_PRIVS_LOADED, e.success, _local7);
}
}
}
static function setDefaultListeners() {
var _local1 = new Array();
_local1[events.HOST_BLOCKED] = {listener:doBlockHost};
_local1[events.NEW_VERSION_AVAILABLE] = {listener:onNewVersionAvailable};
return(_local1);
}
static function addEventListener(event, listener, params) {
listeners[event] = {listener:listener, params:params};
}
static function removeEventListener(event) {
delete listeners[event];
}
static function getEventName(event) {
for (var _local2 in events) {
if (events[_local2] == event) {
return(_local2);
}
}
return(undefined);
}
static function callListener(event, success, data, target) {
echo("Fired Event: " + getEventName(event));
if (listeners[event]) {
if (data.isError()) {
listeners[event].listener({event:event, success:success, error:data, target:target}, listeners[event].params);
} else {
listeners[event].listener({event:event, success:success, data:data, target:target}, listeners[event].params);
}
}
}
static function getCommandName(id) {
return(id);
}
static function getCommandID(name) {
return(name);
}
static function getPeriodAliases() {
var _local1 = new Object();
for (var _local2 in period_aliases) {
_local1[period_aliases[_local2].alias] = _local2;
}
return(_local1);
}
static function getPeriodName(p) {
for (var _local2 in period_aliases) {
if (_local2 == p) {
return(period_aliases[_local2].name);
}
}
return(null);
}
static function getPeriodAlias(p) {
for (var _local2 in period_aliases) {
if (_local2 == p) {
return(period_aliases[_local2].alias);
}
}
return(null);
}
static function sendError(c, e) {
trace((((((("[NewgroundsAPI ERROR] :: " + getCommandName(c.command_id)) + "() - ") + e.name) + ":") + newline) + "\t\t\t\t") + e.message);
}
static function sendWarning(m, c) {
if (c) {
m = m + ((("\r[NewgroundsAPI WARNING] :: \tSee " + COMMANDS_WIKI_URL) + c.toLowerCase()) + " for additional information.");
}
trace("[NewgroundsAPI WARNING] :: " + m);
}
static function sendNotice(m, c) {
if (c) {
m = m + ((("\r[NewgroundsAPI NOTICE] :: \tSee " + COMMANDS_WIKI_URL) + c.toLowerCase()) + " for additional information.");
}
trace("[NewgroundsAPI NOTICE] :: " + m);
}
static function fatalError(m, c) {
if (c) {
m = m + ((("\r\tSee " + COMMANDS_WIKI_URL) + c.toLowerCase()) + " for additional information.");
}
throw (((("***ERROR*** frame=" + _root._currentframe) + ", class=NewgroundsAPI") + newline) + newline) + m;
}
static function sendSecureCommand(command, secure_params, unsecure_params, files) {
if (((!debug) && (!hasUserSession())) && (!hasUserEmail())) {
sendError({command_id: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) {
fatalError("Missing command", "sendSecureCommand");
}
if (!secure_params) {
fatalError("Missing secure_params", "sendSecureCommand");
}
if (!unsecure_params) {
unsecure_params = new Object();
}
var _local4 = "";
var _local1 = 0;
while (_local1 < 16) {
_local4 = _local4 + compression_radix.charAt(Math.floor(Math.random() * compression_radix.length));
_local1++;
}
secure_params.session_id = session_id;
secure_params.as_version = 2;
secure_params.user_email = user_email;
secure_params.publisher_id = publisher_id;
secure_params.seed = _local4;
secure_params.command_id = getCommandID(command);
var _local10 = com.Newgrounds.MD5.calculate(_local4);
var _local3 = _local10 + com.Newgrounds.RC4.encrypt(com.Newgrounds.JSON.encode(secure_params), encryption_key);
var _local9 = _local3.length % 6;
var _local5 = "";
_local1 = 0;
while (_local1 < _local3.length) {
var _local2 = Number("0x" + _local3.substr(_local1, 6));
_local5 = _local5 + compressor.encode(_local2, 4);
_local1 = _local1 + 6;
}
unsecure_params.secure = _local9 + _local5;
sendCommand("securePacket", unsecure_params, false, files);
}
static function sendCommand(command, params, open_browser, files) {
if ((!connected) and (command != "connectMovie")) {
var _local11 = (("NewgroundsAPI." + command) + "() - NewgroundsAPI.connectMovie() must be called before this command can be called") + newline;
fatalError(_local11, "connectMovie");
}
if (open_browser) {
var _local1 = new Object();
} else {
var _local1 = new LoadVars();
}
_local1.command_id = getCommandID(command);
_local1.tracker_id = movie_id;
if (debug) {
_local1.debug = debug;
}
if (params) {
for (var _local8 in params) {
_local1[_local8] = params[_local8];
}
}
if (files) {
for (var _local8 in files) {
_local1[_local8] = files[_local8];
}
}
echo(("OUTPUT: \r" + com.Newgrounds.JSON.encode(_local1)) + newline);
if (open_browser) {
var _local5 = (GATEWAY_URL + "?seed=") + Math.random();
for (var _local8 in _local1) {
_local5 = _local5 + ((("&" + escape(_local8)) + "=") + escape(_local1[_local8]));
}
getURL (_local5, "_blank");
_local1.removeMovieClip();
} else {
var _local9 = new LoadVars();
_local9.onData = function (data) {
com.Newgrounds.NewgroundsAPI.echo(("INPUT: \r" + data) + newline);
if (data) {
var _local1 = com.Newgrounds.JSON.decode(data);
} else {
var _local1 = {success:false};
}
if (!_local1.success) {
var _local3 = new com.Newgrounds.NewgroundsAPIError(_local1.error_code, _local1.error_msg);
com.Newgrounds.NewgroundsAPI.sendError(_local1, _local3);
} else {
com.Newgrounds.NewgroundsAPI.doEvent(_local1);
}
};
var _local4 = new Array();
for (var _local7 in _local1) {
_local4.push((_local7 + "=") + escape(_local1[_local7]));
}
echo((("POST " + GATEWAY_URL) + "?") + _local4.join("&"));
_local1.sendAndLoad((GATEWAY_URL + "?seed=") + Math.random(), _local9, "POST");
}
}
static function renderAd(target) {
if (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 (ad_swf_url, target.clip.ad);
callListener(events.AD_ATTACHED, true, null, target);
} else {
callListener(events.AD_ATTACHED, false, new com.Newgrounds.NewgroundsAPIError("FLASH_ADS_NOT_APPROVED", "Unable to render ad"));
}
}
static function attachFlashAd(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");
sendMessage("You may get a security sandbox violation from this ad. This is nothing to worry about!");
if (resetAdTimer()) {
if (ad_url) {
var _local1 = new LoadVars();
_local1.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 (ad_url.indexOf("?") > -1) {
_local1.load((ad_url + "&random=") + Math.random());
} else {
_local1.load((ad_url + "?random=") + Math.random());
}
}
} else {
renderAd(target);
}
}
static function resetAdTimer() {
if (!ad_url) {
return(false);
}
var _local1 = new Date();
if (_local1.getTime() >= ad_reset) {
ad_reset = _local1.getTime() + 300000;
return(true);
}
return(false);
}
static function sendMessage(m, r) {
var _local1 = "[NewgroundsAPI] :: " + m;
if (r) {
return(_local1);
}
trace(_local1);
}
static function echo(m) {
if (do_echo) {
trace(m);
}
}
static var do_echo = false;
static var GATEWAY_URL = "http://www.ngads.com/gateway_v2.php";
static var AD_TERMS_URL = "http://www.newgrounds.com/wiki/flashads/terms/";
static var COMMANDS_WIKI_URL = "http://www.newgrounds.com/wiki/flashapi/commands/";
static var ad_reset = 0;
static var save_file = null;
static var medals = null;
static var score_page_counts = new Object();
static var compression_radix = "/g8236klvBQ#&|;Zb*7CEA59%s`Oue1wziFp$rDVY@TKxUPWytSaGHJ>dmoMR^<0~4qNLhc(I+fjn)X";
static var compressor = new com.Newgrounds.BaseN(compression_radix);
static var errors = com.Newgrounds.NewgroundsAPIError.init_codes();
static var 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};
static var listeners = setDefaultListeners();
static var periods = getPeriodAliases();
static var 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"}};
}
Symbol 845 MovieClip [__Packages.com.Newgrounds.NewgroundsAPISaveFile] Frame 0
class com.Newgrounds.NewgroundsAPISaveFile
{
var tracker_id, folder, filename, contents, thumbnail, icon_url, thumbnail_url, description, scan, scanner;
function NewgroundsAPISaveFile (tracker_id, folder, filename) {
this.tracker_id = tracker_id;
this.folder = folder;
this.filename = filename;
contents = null;
thumbnail = null;
icon_url = null;
thumbnail_url = null;
}
function setDescription(description) {
this.description = description;
}
function setShared(share) {
this.share = share;
}
function setContents(contents) {
this.contents = contents;
}
function setThumbnail(thumb) {
if (thumb) {
thumbnail = thumb;
} else {
thumbnail = null;
}
}
function onError(msg) {
trace("[NewgroundsAPISaveFile ERROR] :: " + msg);
}
function onCancel(msg) {
trace("[NewgroundsAPISaveFile] :: " + msg);
}
function submit() {
scan = null;
com.Newgrounds.NewgroundsAPI.checkFilePrivs(folder, filename);
}
function checkPrivs(p) {
if (p.success) {
if (p.can_write) {
can_write = p.can_write;
if (p.exists) {
com.Newgrounds.NewgroundsAPI.getConfirmation("saveFile", com.Newgrounds.NewgroundsAPI.events.FILE_SAVED, ("File '" + filename) + "' exists, overwrite?", this, "startFile", "cancelFile");
} else {
startFile();
}
} else {
onError("This filename is owned by another user.");
}
} else {
onError("There was a problem looking up your file's details");
}
}
function cancelFile() {
onCancel("Overwrite was cancelled");
}
function startFile() {
if (can_write) {
if (thumbnail) {
scanner = new com.Newgrounds.ImageScanner(thumbnail);
scanner.setCallback(this, "writeFile");
scanner.startScan(100, 100, true);
} else {
writeFile();
}
} else {
onError(("You cannot write to filename \"" + filename) + "\"");
}
}
function writeFile(img) {
trace("FINISHED");
com.Newgrounds.NewgroundsAPI.finishFileSave(folder, filename, description, share, com.Newgrounds.JSON.encode(contents), img);
}
var can_write = false;
var share = true;
}
Symbol 846 MovieClip [__Packages.com.Newgrounds.ImageScanner] Frame 0
class com.Newgrounds.ImageScanner
{
var image_source, source_width, source_height, sourceBitmap, callback_target, callback_function, hash, cube, basen, xpos, ypos, pixels, busy, canvas_width, canvas_height, resizedBitmap, copyBitmap, output, draw_interval, callback_interval;
function ImageScanner (the_source) {
if (the_source) {
image_source = the_source;
} else {
image_source = _root;
}
reset();
if (typeof(image_source) == "movieclip") {
if (image_source == _root) {
source_width = Stage.width;
source_height = Stage.height;
} else {
source_width = Math.floor(image_source._width);
source_height = Math.floor(image_source._height);
}
sourceBitmap = new flash.display.BitmapData(source_width, source_height, false, 4294967295);
sourceBitmap.draw(_root);
} else if (image_source.width) {
source_width = image_source.width;
source_height = image_source.height;
sourceBitmap = image_source;
} else {
error("You can only use BitMaptData and MovieClip objects to create images");
}
}
function setCallback(target, funct) {
if (target && (funct)) {
callback_target = target;
callback_function = funct;
}
}
function reset() {
callback_target = null;
callback_function = null;
debug.bad_pixels = 0;
hash = "0123456789aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ<>?:;-_=+()!&";
var _local3 = Math.pow(hash.length, 2);
trace("MAX COLORS: " + _local3);
var _local2 = Math.floor(Math.pow(_local3, 0.333333333333333)) - 1;
var _local4 = Math.pow(_local2, 3);
cube = _local2;
basen = new com.Newgrounds.BaseN(hash);
xpos = 0;
ypos = 0;
pixels = 0;
busy = false;
}
function startScan(w, h, s) {
if (w) {
image_width = w;
}
if (h) {
image_height = h;
}
if (s != undefined) {
crop = s;
}
var _local7 = _root.getNextHighestDepth();
var _local6 = _root.createEmptyMovieClip("API_image_container_" + _local7, _local7);
var _local5 = _local6.createEmptyMovieClip("canvas", 100);
_local5.attachBitmap(sourceBitmap, 100);
if (crop) {
if ((image_width / source_width) > (image_height / source_height)) {
canvas_width = image_width;
canvas_height = Math.ceil(source_height * (image_width / source_width));
} else {
canvas_height = image_height;
canvas_width = Math.ceil(source_width * (image_height / source_height));
}
} else {
canvas_width = image_width;
canvas_height = image_height;
}
_local5._x = Math.round((image_width - canvas_width) / 2);
_local5._width = canvas_width;
_local5._height = canvas_height;
resizedBitmap = new flash.display.BitmapData(image_width, image_height, false, 4294967295);
resizedBitmap.draw(_local6);
_local6.removeMovieClip();
copyBitmap = new flash.display.BitmapData(image_width, image_height, false, 4294967295);
var _local3 = "" + image_width;
while (_local3.length < 3) {
_local3 = "0" + _local3;
}
var _local4 = "" + image_height;
while (_local4.length < 3) {
_local4 = "0" + _local4;
}
output = _local3 + _local4;
draw_interval = setInterval(this, "drawChunk", 10);
busy = false;
return(resizedBitmap);
}
function getBitmapData() {
return(copyBitmap);
}
function getBytesTotal() {
return((image_width * image_height) * 2);
}
function getBytesScanned() {
return(pixels * 2);
}
function drawChunk() {
if (!busy) {
busy = true;
var _local2 = 0;
while (_local2 < 250) {
if (!nextPixel()) {
clearInterval(draw_interval);
callback_interval = setInterval(this, "doCallback", 25);
busy = true;
break;
}
_local2++;
}
busy = false;
}
}
function doCallback() {
busy = false;
clearInterval(callback_interval);
if (callback_target and callback_function) {
callback_target[callback_function](output);
} else {
onScanComplete(output);
}
}
function onScanComplete(packet) {
sendMessage(("packet size: " + output.length) + " bytes", "onScanComplete");
}
function nextPixel() {
var _local15 = xpos;
var _local14 = ypos;
var _local7 = resizedBitmap.getPixel(_local15, _local14);
var _local17 = (_local7 >> 16) & 255;
var _local20 = (_local7 >> 8) & 255;
var _local16 = (_local7 >> 0) & 255;
var _local11 = Math.round(((_local17 + 1) / 256) * cube);
var _local10 = Math.round(((_local20 + 1) / 256) * cube);
var _local13 = Math.round(((_local16 + 1) / 256) * cube);
var _local12 = (((_local11 * (cube + 1)) * (cube + 1)) + (_local10 * (cube + 1))) + _local13;
var _local6 = basen.encode(_local12, 2);
output = output + _local6;
if (_local6.length != 2) {
trace("bad pixel " + _local6);
}
var _local5 = basen.decode(_local6);
var _local18 = _local5;
var _local8 = _local5 % (cube + 1);
_local5 = (_local5 - _local8) / (cube + 1);
var _local9 = _local5 % (cube + 1);
var _local19 = (_local5 - _local9) / (cube + 1);
if (((_local13 != _local8) and (_local10 != _local9)) and (_local11 != _local10)) {
debug.bad_pixels++;
trace((((((("BAD PIXEL " + debug.bad_pixels) + ") ") + _local12) + " != ") + _local18) + " ") + _local6);
trace(basen.debug.lastencode);
}
var _local2 = Math.round((_local19 / cube) * 255).toString(16);
var _local4 = Math.round((_local9 / cube) * 255).toString(16);
var _local3 = Math.round((_local8 / cube) * 255).toString(16);
while (_local2.length < 2) {
_local2 = "0" + _local2;
}
while (_local4.length < 2) {
_local4 = "0" + _local4;
}
while (_local3.length < 2) {
_local3 = "0" + _local3;
}
copyBitmap.setPixel(_local15, _local14, Number((("0x" + _local2) + _local4) + _local3));
pixels++;
if (pixels >= (image_width * image_height)) {
return(false);
}
xpos++;
if (xpos >= image_width) {
xpos = 0;
ypos++;
}
return(true);
}
function error(e, f) {
sendMessage(e, f, "ERROR");
}
function sendMessage(msg, func, type) {
var _local1 = "ImageScanner";
if (func) {
_local1 = _local1 + (("." + func) + "()");
}
if (type) {
_local1 = (type + " in ") + _local1;
}
_local1 = _local1 + (" :: " + msg);
trace(_local1);
}
var image_width = 100;
var image_height = 100;
var crop = true;
var debug = new Object();
}
Symbol 847 MovieClip [__Packages.com.Newgrounds.JSON] Frame 0
class com.Newgrounds.JSON
{
function JSON () {
}
static function encode(arg, noquotes) {
var _local3;
var _local2;
var _local6;
var _local1 = "";
var _local4;
if (arg.isSServerVar()) {
var _local8 = "sservervariable";
} else {
var _local8 = typeof(arg);
}
switch (_local8) {
case "sservervariable" :
return("?" + arg.getEncodedValue());
case "object" :
if (arg) {
if (arg instanceof Array) {
_local2 = 0;
while (_local2 < arg.length) {
_local4 = encode(arg[_local2]);
if (_local1) {
_local1 = _local1 + ",";
}
_local1 = _local1 + _local4;
_local2++;
}
return(("[" + _local1) + "]");
}
if (typeof(arg.toString) != "undefined") {
for (_local2 in arg) {
_local4 = arg[_local2];
if ((typeof(_local4) != "undefined") && (typeof(_local4) != "function")) {
_local4 = encode(_local4);
if (_local1) {
_local1 = _local1 + ",";
}
_local1 = _local1 + ((encode(_local2) + ":") + _local4);
}
}
return(("{" + _local1) + "}");
}
}
return("null");
case "number" :
return((isFinite(arg) ? (String(arg)) : "null"));
case "string" :
_local6 = arg.length;
if (noquotes) {
var _local7 = "";
} else {
var _local7 = "\"";
}
_local1 = _local7;
_local2 = 0;
while (_local2 < _local6) {
_local3 = arg.charAt(_local2);
if (_local3 >= " ") {
if ((_local3 == "\\") || (_local3 == "\"")) {
_local1 = _local1 + "\\";
}
_local1 = _local1 + _local3;
} else {
switch (_local3) {
case "\b" :
_local1 = _local1 + "\\b";
break;
case "\f" :
_local1 = _local1 + "\\f";
break;
case newline :
_local1 = _local1 + "\\n";
break;
case "\r" :
_local1 = _local1 + "\\r";
break;
case "\t" :
_local1 = _local1 + "\\t";
break;
default :
_local3 = _local3.charCodeAt();
_local1 = _local1 + (("\\u00" + Math.floor(_local3 / 16).toString(16)) + (_local3 % 16).toString(16));
}
}
_local2 = _local2 + 1;
}
return(_local1 + _local7);
case "boolean" :
return(String(arg));
}
return("null");
}
static function decode(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 = at + 1;
return(ch);
};
var _white = function () {
while (ch) {
if (ch <= " ") {
_next();
} else if (ch == "/") {
switch (_next()) {
case "/" :
while ((_next() && (ch != newline)) && (ch != "\r")) {
}
break;
case "*" :
_next();
for(;;){
if (ch) {
if (ch == "*") {
if (_next() == "/") {
_next();
// unexpected jump
}
} else {
_next();
}
} else {
_error("Unterminated comment");
}
};
break;
default :
_error("Syntax error");
}
} else {
return;
}
}
};
var _string = function () {
var _local4;
var _local1 = "";
var _local3;
var _local2;
var _local5 = false;
if (ch == "\"") {
while (_next()) {
if (ch == "\"") {
_next();
return(_local1);
}
if (ch == "\\") {
switch (_next()) {
case "b" :
_local1 = _local1 + "\b";
break;
case "f" :
_local1 = _local1 + "\f";
break;
case "n" :
_local1 = _local1 + newline;
break;
case "r" :
_local1 = _local1 + "\r";
break;
case "t" :
_local1 = _local1 + "\t";
break;
case "u" :
_local2 = 0;
_local4 = 0;
while (_local4 < 4) {
_local3 = parseInt(_next(), 16);
if (!isFinite(_local3)) {
_local5 = true;
break;
}
_local2 = (_local2 * 16) + _local3;
_local4 = _local4 + 1;
}
if (_local5) {
_local5 = false;
break;
}
_local1 = _local1 + String.fromCharCode(_local2);
break;
default :
_local1 = _local1 + ch;
}
} else {
_local1 = _local1 + ch;
}
}
}
_error("Bad string");
};
var _array = function () {
var _local1 = [];
if (ch == "[") {
_next();
_white();
if (ch == "]") {
_next();
return(_local1);
}
while (ch) {
_local1.push(_value());
_white();
if (ch == "]") {
_next();
return(_local1);
}
if (ch != ",") {
break;
}
_next();
_white();
}
}
_error("Bad array");
};
var _object = function () {
var _local2;
var _local1 = {};
if (ch == "{") {
_next();
_white();
if (ch == "}") {
_next();
return(_local1);
}
while (ch) {
_local2 = _string();
_white();
if (ch != ":") {
break;
}
_next();
_local1[_local2] = _value();
_white();
if (ch == "}") {
_next();
return(_local1);
}
if (ch != ",") {
break;
}
_next();
_white();
}
}
_error("Bad object");
};
var _number = function () {
var _local1 = "";
var _local2;
if (ch == "-") {
_local1 = "-";
_next();
}
while ((ch >= "0") && (ch <= "9")) {
_local1 = _local1 + ch;
_next();
}
if (ch == ".") {
_local1 = _local1 + ".";
while ((_next() && (ch >= "0")) && (ch <= "9")) {
_local1 = _local1 + ch;
}
}
_local2 = 1 * _local1;
if (!isFinite(_local2)) {
_error("Bad number");
} else {
return(_local2);
}
};
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"))) {
break;
}
_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());
}
}
Symbol 848 MovieClip [__Packages.com.Newgrounds.MD5] Frame 0
class com.Newgrounds.MD5
{
function MD5 () {
}
static function calculate(src) {
return(hex_md5(src));
}
static function hex_md5(src) {
return(binl2hex(core_md5(str2binl(src), src.length * 8)));
}
static function core_md5(x, len) {
x[len >> 5] = x[len >> 5] | (128 << (len % 32));
x[(((len + 64) >>> 9) << 4) + 14] = len;
var _local4 = 1732584193 /* 0x67452301 */;
var _local3 = -271733879;
var _local2 = -1732584194;
var _local1 = 271733878 /* 0x10325476 */;
var _local5 = 0;
while (_local5 < x.length) {
var _local10 = _local4;
var _local9 = _local3;
var _local8 = _local2;
var _local7 = _local1;
_local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 0], 7, -680876936);
_local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 1], 12, -389564586);
_local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 2], 17, 606105819);
_local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 3], 22, -1044525330);
_local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 4], 7, -176418897);
_local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 5], 12, 1200080426);
_local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 6], 17, -1473231341);
_local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 7], 22, -45705983);
_local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 8], 7, 1770035416);
_local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 9], 12, -1958414417);
_local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 10], 17, -42063);
_local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 11], 22, -1990404162);
_local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 12], 7, 1804603682);
_local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 13], 12, -40341101);
_local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 14], 17, -1502002290);
_local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 15], 22, 1236535329);
_local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 1], 5, -165796510);
_local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 6], 9, -1069501632);
_local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 11], 14, 643717713);
_local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 0], 20, -373897302);
_local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 5], 5, -701558691);
_local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 10], 9, 38016083);
_local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 15], 14, -660478335);
_local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 4], 20, -405537848);
_local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 9], 5, 568446438);
_local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 14], 9, -1019803690);
_local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 3], 14, -187363961);
_local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 8], 20, 1163531501);
_local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 13], 5, -1444681467);
_local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 2], 9, -51403784);
_local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 7], 14, 1735328473);
_local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 12], 20, -1926607734);
_local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 5], 4, -378558);
_local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 8], 11, -2022574463);
_local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 11], 16, 1839030562);
_local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 14], 23, -35309556);
_local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 1], 4, -1530992060);
_local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 4], 11, 1272893353);
_local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 7], 16, -155497632);
_local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 10], 23, -1094730640);
_local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 13], 4, 681279174);
_local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 0], 11, -358537222);
_local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 3], 16, -722521979);
_local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 6], 23, 76029189);
_local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 9], 4, -640364487);
_local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 12], 11, -421815835);
_local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 15], 16, 530742520);
_local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 2], 23, -995338651);
_local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 0], 6, -198630844);
_local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 7], 10, 1126891415);
_local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 14], 15, -1416354905);
_local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 5], 21, -57434055);
_local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 12], 6, 1700485571);
_local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 3], 10, -1894986606);
_local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 10], 15, -1051523);
_local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 1], 21, -2054922799);
_local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 8], 6, 1873313359);
_local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 15], 10, -30611744);
_local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 6], 15, -1560198380);
_local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 13], 21, 1309151649);
_local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 4], 6, -145523070);
_local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 11], 10, -1120210379);
_local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 2], 15, 718787259);
_local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 9], 21, -343485551);
_local4 = safe_add(_local4, _local10);
_local3 = safe_add(_local3, _local9);
_local2 = safe_add(_local2, _local8);
_local1 = safe_add(_local1, _local7);
_local5 = _local5 + 16;
}
return(new Array(_local4, _local3, _local2, _local1));
}
static function md5_cmn(q, a, b, x, s, t) {
return(safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b));
}
static function md5_ff(a, b, c, d, x, s, t) {
return(md5_cmn((b & c) | ((~b) & d), a, b, x, s, t));
}
static function md5_gg(a, b, c, d, x, s, t) {
return(md5_cmn((b & d) | (c & (~d)), a, b, x, s, t));
}
static function md5_hh(a, b, c, d, x, s, t) {
return(md5_cmn((b ^ c) ^ d, a, b, x, s, t));
}
static function md5_ii(a, b, c, d, x, s, t) {
return(md5_cmn(c ^ (b | (~d)), a, b, x, s, t));
}
static function bit_rol(num, cnt) {
return((num << cnt) | (num >>> (32 - cnt)));
}
static function safe_add(x, y) {
var _local1 = (x & 65535) + (y & 65535);
var _local2 = ((x >> 16) + (y >> 16)) + (_local1 >> 16);
return((_local2 << 16) | (_local1 & 65535));
}
static function str2binl(str) {
var _local3 = new Array();
var _local4 = 255;
var _local1 = 0;
while (_local1 < (str.length * 8)) {
_local3[_local1 >> 5] = _local3[_local1 >> 5] | ((str.charCodeAt(_local1 / 8) & _local4) << (_local1 % 32));
_local1 = _local1 + 8;
}
return(_local3);
}
static function binl2hex(binarray) {
var _local4 = new String("");
var _local3 = new String("0123456789abcdef");
var _local1 = 0;
while (_local1 < (binarray.length * 4)) {
_local4 = _local4 + (_local3.charAt((binarray[_local1 >> 2] >> (((_local1 % 4) * 8) + 4)) & 15) + _local3.charAt((binarray[_local1 >> 2] >> ((_local1 % 4) * 8)) & 15));
_local1++;
}
return(_local4);
}
}
Symbol 849 MovieClip [__Packages.com.Newgrounds.RC4] Frame 0
class com.Newgrounds.RC4
{
function RC4 () {
}
static function encrypt(src, key) {
var _local3 = strToChars(src);
var _local1 = strToChars(key);
var _local2 = calculate(_local3, _local1);
return(charsToHex(_local2));
}
static function encryptbin(src, key) {
var _local3 = strToChars(src);
var _local1 = strToChars(key);
var _local2 = calculate(_local3, _local1);
return(_local2);
}
static function decrypt(src, key) {
var _local3 = hexToChars(src);
var _local1 = strToChars(key);
var _local2 = calculate(_local3, _local1);
return(charsToStr(_local2));
}
static function initialize(pwd) {
var _local2 = 0;
var _local3;
var _local4 = pwd.length;
var _local1 = 0;
while (_local1 <= 255) {
mykey[_local1] = pwd[_local1 % _local4];
sbox[_local1] = _local1;
_local1++;
}
_local1 = 0;
while (_local1 <= 255) {
_local2 = ((_local2 + sbox[_local1]) + mykey[_local1]) % 256;
_local3 = sbox[_local1];
sbox[_local1] = sbox[_local2];
sbox[_local2] = _local3;
_local1++;
}
}
static function calculate(plaintxt, psw) {
initialize(psw);
var _local1 = 0;
var _local2 = 0;
var _local9 = new Array();
var _local7;
var _local5;
var _local6;
var _local3 = 0;
while (_local3 < plaintxt.length) {
_local1 = (_local1 + 1) % 256;
_local2 = (_local2 + sbox[_local1]) % 256;
_local5 = sbox[_local1];
sbox[_local1] = sbox[_local2];
sbox[_local2] = _local5;
var _local4 = (sbox[_local1] + sbox[_local2]) % 256;
_local7 = sbox[_local4];
_local6 = plaintxt[_local3] ^ _local7;
_local9.push(_local6);
_local3++;
}
return(_local9);
}
static function charsToHex(chars) {
var _local4 = new String("");
var _local3 = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f");
var _local1 = 0;
while (_local1 < chars.length) {
_local4 = _local4 + (_local3[chars[_local1] >> 4] + _local3[chars[_local1] & 15]);
_local1++;
}
return(_local4);
}
static function hexToChars(hex) {
var _local3 = new Array();
var _local1 = ((hex.substr(0, 2) == "0x") ? 2 : 0);
while (_local1 < hex.length) {
_local3.push(parseInt(hex.substr(_local1, 2), 16));
_local1 = _local1 + 2;
}
return(_local3);
}
static function charsToStr(chars) {
var _local3 = new String("");
var _local1 = 0;
while (_local1 < chars.length) {
_local3 = _local3 + String.fromCharCode(chars[_local1]);
_local1++;
}
return(_local3);
}
static function strToChars(str) {
var _local3 = new Array();
var _local1 = 0;
while (_local1 < str.length) {
_local3.push(str.charCodeAt(_local1));
_local1++;
}
return(_local3);
}
static var sbox = new Array(255);
static var mykey = new Array(255);
}
Symbol 850 MovieClip [__Packages.Game.Platformer.platform] Frame 0
class Game.Platformer.platform extends MovieClip
{
var bounds, getBounds, _parent, isPlatform, posMod, clipping, solid, gravity, damageMode, damageValue, damageRate, ignore, hidden, mySpeed, trackDir, track, trackBounds, trackIndex, _visible, __get__speed, _name, _y, _x, polyMatrix, onEnterFrame, loop, ymove, xmove;
function platform () {
super();
bounds = getBounds(_parent);
isPlatform = true;
posMod = new Object();
clipping = false;
solid = false;
gravity = _parent.gravity;
damageMode = "none";
damageValue = 0;
damageRate = 0;
ignore = false;
hidden = false;
mySpeed = 8;
trackDir = 1;
track = new Array();
trackBounds = getBounds(_parent);
trackIndex = new Object();
_visible = false;
}
function get follow() {
if (track.length > 1) {
return(true);
}
return(false);
}
function set speed(val) {
mySpeed = val;
setNewNode(trackIndex.start);
//return(__get__speed());
}
function set follow(trk) {
track = new Array();
var _local3 = new Object();
for (var _local9 in _parent) {
var _local6 = _local9.split("_");
if ((_local6[0] == trk) and (_local9 != _name)) {
track.push({name:_local9, order:Number(_local6[1])});
var _local5 = Math.sqrt(Math.pow(_x - _parent[_local9]._x, 2) + Math.pow(_y - _parent[_local9]._y, 2));
if (!_local3.node) {
_local3.node = _local9;
_local3.dst = _local5;
} else if (_local5 < _local3.dst) {
_local3.node = _local9;
_local3.dst = _local5;
}
if ((_parent[_local9]._x + polyMatrix[0][0]) < trackBounds.xMin) {
trackBounds.xMin = _parent[_local9]._x + polyMatrix[0][0];
} else if ((_parent[_local9]._x + polyMatrix[1][0]) > trackBounds.xMax) {
trackBounds.xMax = _parent[_local9]._x + polyMatrix[1][0];
}
if ((_parent[_local9]._y + polyMatrix[0][1]) < trackBounds.yMin) {
trackBounds.yMin = _parent[_local9]._y + polyMatrix[0][1];
} else if ((_parent[_local9]._y + polyMatrix[1][1]) > trackBounds.yMax) {
trackBounds.yMax = _parent[_local9]._y + polyMatrix[1][1];
}
}
}
_x = _parent[_local3.node]._x;
_y = _parent[_local3.node]._y;
track.sortOn("order", Array.NUMERIC);
var _local4 = 0;
while (_local4 < track.length) {
if (track[_local4].name == _local3.node) {
setNewNode(_local4);
break;
}
_local4++;
}
bounds = trackBounds;
onEnterFrame = function () {
if (!_global.paused) {
if (this.clip) {
this._parent[this.clip]._x = this._x;
this._parent[this.clip]._y = this._y;
}
if (!this.pause) {
this.xMove = this.xmove;
this.yMove = this.ymove;
if ((Math.abs(this._parent[this.track[this.trackIndex.stop].name]._y - this._y) <= this.mySpeed) and (Math.abs(this._parent[this.track[this.trackIndex.stop].name]._x - this._x) <= this.mySpeed)) {
this._y = this._parent[this.track[this.trackIndex.stop].name]._y;
this._x = this._parent[this.track[this.trackIndex.stop].name]._x;
this.yMove = this._parent[this.track[this.trackIndex.stop].name]._y - this._y;
this.xMove = this._parent[this.track[this.trackIndex.stop].name]._x - this._x;
this.setNewNode();
if (this.pauser) {
this.pause = true;
}
} else {
this._x = this._x + this.xMove;
this._y = this._y + this.yMove;
}
} else {
this.xMove = 0;
this.yMove = 0;
}
}
};
//return(follow);
}
function setNewNode(i) {
if (i == undefined) {
i = trackIndex.stop;
}
trackIndex.start = i;
trackIndex.stop = i + trackDir;
if (trackDir > 0) {
if (trackIndex.stop >= track.length) {
if (!loop) {
trackDir = trackDir * -1;
trackIndex.stop = i + trackDir;
} else {
trackIndex.stop = 0;
}
}
} else if (trackIndex.stop < 0) {
if (!loop) {
trackDir = trackDir * -1;
trackIndex.stop = i + trackDir;
} else {
trackIndex.stop = track.length - 1;
}
}
var _local4 = Math.sqrt(Math.pow(_parent[track[trackIndex.stop].name]._y - _parent[track[trackIndex.start].name]._y, 2) + Math.pow(_parent[track[trackIndex.stop].name]._x - _parent[track[trackIndex.start].name]._x, 2));
var _local3 = mySpeed / _local4;
ymove = (_parent[track[trackIndex.stop].name]._y - _parent[track[trackIndex.start].name]._y) * _local3;
xmove = (_parent[track[trackIndex.stop].name]._x - _parent[track[trackIndex.start].name]._x) * _local3;
}
function save() {
var _local2 = 0;
while (_local2 < 4) {
polyMatrix[_local2][0] = polyMatrix[_local2][0] - _x;
polyMatrix[_local2][1] = polyMatrix[_local2][1] - _y;
_local2++;
}
if (_parent[_name + "_1"]) {
follow = (_name);
}
}
}
Symbol 851 MovieClip [__Packages.Game.Platformer.slope_box] Frame 0
class Game.Platformer.slope_box extends Game.Platformer.platform
{
var trackBounds, _y, _x, polyMatrix, save;
function slope_box () {
super();
var _local3 = new Object();
_local3 = trackBounds;
if (Math.round(_y) == Math.round(_local3.yMin)) {
if (Math.round(_x) == Math.round(_local3.xMin)) {
var _local7 = [_x, _y];
var _local4 = [_x, _local3.yMax];
var _local5 = [_local3.xMax, _local3.yMax];
var _local6 = [_local3.xMax, _local3.yMax];
} else {
var _local7 = [_local3.xMin, _local3.yMin];
var _local4 = [_local3.xMin, _local3.yMax];
var _local5 = [_x, _local3.yMin];
var _local6 = [_x, _local3.yMin];
}
} else if (Math.round(_x) == Math.round(_local3.xMin)) {
var _local4 = [_x, _y];
var _local7 = [_x, _y];
var _local5 = [_local3.xMax, _local3.yMin];
var _local6 = [_local3.xMax, _local3.yMax];
} else {
var _local4 = [_local3.xMin, _local3.yMin];
var _local7 = [_local3.xMin, _local3.yMin];
var _local5 = [_x, _local3.yMin];
var _local6 = [_x, _y];
}
polyMatrix = [_local7, _local5, _local4, _local6];
save();
}
}
Symbol 852 MovieClip [__Packages.Game.Platformer.character] Frame 0
class Game.Platformer.character extends MovieClip
{
var falltime, bounces, cache, xmove, ymove, isCharacter, myWidth, myHeight, myStep, platMove, isSolid, onPlat, _x, _parent, walls, _y, mode, inGrid, platforms, xbounce, overRidePlaySpeed, onObject, slopeDir, ybounce, _name, jumpOff, dontFall, speed, holding;
function character () {
super();
falltime = 0;
bounces = false;
cache = new Object();
xmove = 0;
ymove = 0;
isCharacter = true;
myWidth = 30;
myHeight = 55;
myStep = 15;
platMove = 0;
isSolid = true;
}
function init() {
}
function climbLadder(ladder) {
onPlat = undefined;
_x = _parent[ladder]._x + (_parent[ladder].myWidth / 2);
xmove = 0;
if (ymove != 0) {
walls = getWalls();
var _local3 = _y + ymove;
if (((_local3 - myHeight) - ymove) <= walls.top) {
_local3 = (walls.top + myHeight) + ymove;
} else if (((_local3 + myStep) >= walls.bottom) and (ymove > 0)) {
_local3 = walls.bottom - 1;
mode = "walk";
ymove = 0;
onPlat = walls.floorplat;
}
if ((_local3 - myHeight) > (_parent[ladder]._y + _parent[ladder].myHeight)) {
mode = "fall";
}
_y = _local3;
if (((((inGrid.x * _global.control.gridSize) > _x) or (((inGrid.x + 1) * _global.control.gridSize) < _x)) or ((inGrid.y * _global.control.gridSize) > _y)) or (((inGrid.y + 1) * _global.control.gridSize) < _y)) {
inGrid = _global.control.getGrid(this);
platforms = _global.control.getPlatforms(this);
}
}
}
function baseGrid() {
inGrid = _global.control.getGrid(this);
platforms = _global.control.getPlatforms(this);
}
function onEdge() {
}
function jump() {
}
function hitWall() {
if (bounces) {
xmove = xmove * (-xbounce);
}
}
function slopeHit() {
}
function moveMe() {
var _local9 = mode;
if (onPlat and (!overRidePlaySpeed)) {
if (_parent[onPlat].xMove) {
xmove = xmove + _parent[onPlat].xMove;
}
}
var _local10 = onObject;
walls = getWalls();
if ((xmove >= 0) and (walls.rspace < myHeight)) {
xp = _x;
hitWall();
} else if ((xmove <= 0) and (walls.lspace < myHeight)) {
xp = _x;
hitWall();
} else {
var xp = (_x + xmove);
}
var _local3 = _y + ymove;
if (mode == "fall") {
_local3 = _y + ymove;
if (((_local3 - myHeight) < walls.top) and (ymove < 0)) {
ymove = 0;
_local3 = _y;
}
falltime++;
} else {
falltime = 0;
}
if ((_local3 >= walls.bottom) and (ymove >= 0)) {
if ((!onObject) and slopeDir) {
var _local4 = _parent[walls.floorPlat];
var _local7 = _local4._x + _local4.polyMatrix[0][1];
var _local6 = _local4._x + _local4.polyMatrix[1][1];
if (_local7 < _local6) {
slopeHit(1);
} else if (_local6 < _local7) {
slopeHit(-1);
}
}
_local3 = walls.bottom - 1;
if ((bounces and (ymove >= 10)) and ((_parent[walls.floorPlat].yMove < 0) or (!_parent[walls.floorPlat].yMove))) {
ymove = (ymove * (ybounce * -1)) + ybounce;
xmove = xmove * ybounce;
landed();
falltime = 0;
} else {
xmove = 0;
mode = "walk";
onPlat = walls.floorPlat;
_parent[walls.floorPlat].onContact(_name);
}
} else if (mode != "nofall") {
if (onPlat and jumpOff) {
onObject = undefined;
onPlat = undefined;
mode = "fall";
jump();
} else if (onPlat and dontFall) {
if (_local10 or onObject) {
xp = _x - xmove;
onEdge();
xmove = 0;
onObject = undefined;
} else {
var _local4 = _parent[onPlat];
var _local8 = _local4._x + _local4.polyMatrix[0][0];
var _local5 = _local4._x + _local4.polyMatrix[1][0];
if ((xp + (myWidth / 2)) >= _local5) {
xp = (_local5 - speed) - 2;
} else {
xp = (_local8 + speed) + 2;
}
_local3 = _y;
xmove = 0;
onEdge();
mode = "dead";
}
} else {
platMove = 0;
if (ymove < 40) {
ymove = ymove + 2;
}
}
mode = "fall";
onPlat = undefined;
}
var _local12 = 0;
var _local11 = 0;
if ((xp + (myWidth / 2)) >= walls.right) {
hitWall();
xp = _x;
} else if ((xp - (myWidth / 2)) <= walls.left) {
hitWall();
xp = _x;
}
if ((_local3 >= walls.bottom) and (ymove >= 0)) {
_local3 = walls.bottom - 1;
}
_x = xp;
_y = _local3;
if (((_y - myHeight) > _global.control.levelBounds.bottom) and (!_global.control.floor)) {
hitBottom();
}
if (((((inGrid.x * _global.control.gridSize) > _x) or (((inGrid.x + 1) * _global.control.gridSize) < _x)) or ((inGrid.y * _global.control.gridSize) > _y)) or (((inGrid.y + 1) * _global.control.gridSize) < _y)) {
inGrid = _global.control.getGrid(this);
platforms = _global.control.getPlatforms(this);
}
if ((_local9 == "fall") and (mode == "walk")) {
landed();
}
}
function landed() {
}
function getLadder() {
var _local4 = new Object();
for (var _local3 in platforms) {
if (_parent[_local3].isLadder) {
var _local2 = _parent[_local3];
if ((_x > _local2._x) and (_x < (_local2._x + _local2.myWidth))) {
if (((_y + myStep) > _local2._y) and (((_y - myHeight) - myStep) < (_local2._y + _local2.myHeight))) {
return(_local3);
}
}
}
}
return(false);
}
function getWalls() {
var _local5 = new Object();
_local5.left = _x - (_global.control.gridSize * 2);
_local5.right = _x + (_global.control.gridSize * 2);
_local5.top = _y - (_global.control.gridSize * 2);
_local5.bottom = _y + (_global.control.gridSize * 2);
_local5.lspace = myHeight * 2;
_local5.rspace = myHeight * 2;
var _local31 = _local5.bottom;
var _local30 = _local5.top;
var _local29 = _local5.bottom;
var _local28 = _local5.top;
for (var _local33 in platforms) {
var _local4 = _parent[_local33];
var _local6 = _local4._x + _local4.polyMatrix[0][0];
var _local7 = _local4._x + _local4.polyMatrix[1][0];
if (((_x + (myWidth / 2)) >= _local6) and ((_x - (myWidth / 2)) <= _local7)) {
var _local16 = _x - _local6;
var _local15 = _local7 - _local6;
var _local18 = _local16 / _local15;
var _local13 = (_local16 - (myWidth / 2)) / _local15;
var _local14 = (_local16 + (myWidth / 2)) / _local15;
var _local8 = _local4._y + _local4.polyMatrix[0][1];
var _local10 = _local4._y + _local4.polyMatrix[1][1];
var _local12 = _local10 - _local8;
var _local32 = false;
if (_x <= _local6) {
var _local22 = _local8;
var _local20 = _local22;
var _local26 = _local8 + (_local12 * _local14);
var _local25 = true;
} else if (_x >= _local7) {
var _local22 = _local10;
var _local20 = _local8 + (_local12 * _local13);
var _local26 = _local22;
var _local25 = true;
} else if (_local8 == _local10) {
var _local22 = _local8;
var _local20 = _local22;
var _local26 = _local22;
} else {
var _local22 = _local8 + (_local12 * _local18);
var _local20 = _local8 + (_local12 * _local13);
var _local26 = _local8 + (_local12 * _local14);
}
var _local9 = _local4._y + _local4.polyMatrix[2][1];
var _local17 = _local4._y + _local4.polyMatrix[3][1];
var _local11 = _local17 - _local9;
if (_x <= _local6) {
var _local21 = _local9;
var _local27 = _local21;
var _local23 = _local9 + (_local11 * _local14);
} else if (_x >= _local7) {
var _local21 = _local17;
var _local27 = _local9 + (_local11 * _local13);
var _local23 = _local21;
} else if (_local9 == _local17) {
var _local21 = _local9;
var _local27 = _local21;
var _local23 = _local21;
} else {
var _local21 = _local9 + (_local11 * _local18);
var _local27 = _local9 + (_local11 * _local13);
var _local23 = _local9 + (_local11 * _local14);
}
if (_local25 and (!_local4.clipping)) {
if (((_x - (myWidth / 2)) < _local7) and ((_x + (myWidth / 2)) > _local6)) {
if (((_y - myStep) > _local22) and ((_y - myHeight) < _local21)) {
var _local19 = Math.abs(_x - _local6);
var _local24 = Math.abs(_x - _local7);
if (_y > _local21) {
ymove = 0;
} else if (_local19 < _local24) {
_x = (_local6 - (myWidth / 2)) - 3;
_local5.right = _local6;
} else {
_x = (_local7 + (myWidth / 2)) + 3;
_local5.left = _local7;
}
}
}
}
if ((_local22 < _local5.bottom) and ((_y - myStep) < _local22)) {
_local5.floorPlat = _local33;
_local5.bottom = _local22;
_local31 = _local20;
_local29 = _local26;
} else if (((_y > _local8) and (_y < _local10)) or ((_y < _local8) and (_y > _local10))) {
_local5.bottom = _local22;
}
if (((_local21 > _local5.top) and (!_local4.clipping)) and (_y > _local21)) {
_local5.top = _local21;
_local30 = _local27;
_local28 = _local23;
}
} else if ((_x >= _local7) and (!_local4.clipping)) {
var _local21 = _local4._y + _local4.polyMatrix[1][1];
var _local22 = _local4._y + _local4.polyMatrix[3][1];
if (((_y - myStep) >= _local21) and ((_y - myHeight) <= _local22)) {
if (_local7 > _local5.left) {
_local5.left = _local7;
}
}
} else if ((_x <= _local6) and (!_local4.clipping)) {
var _local21 = _local4._y + _local4.polyMatrix[0][1];
var _local22 = _local4._y + _local4.polyMatrix[2][1];
if (((_y - myStep) >= _local21) and ((_y - myHeight) <= _local22)) {
if (_local6 < _local5.right) {
_local5.right = _local6;
}
}
}
}
onObject = undefined;
for (var _local33 in _global.control.myChars) {
if ((_local33 != _name) and (_local33 != holding)) {
var _local3 = _parent[_local33];
if (_local3.isObject) {
var _local6 = _local3._x - (_local3.myWidth / 2);
var _local7 = _local3._x + (_local3.myWidth / 2);
if (((_x + (myWidth / 2)) > _local6) and ((_x - (myWidth / 2)) < _local7)) {
if ((_y - myStep) <= (_local3._y - _local3.myHeight)) {
if ((_local3._y - _local3.myHeight) < _local5.bottom) {
_local5.bottom = _local3._y - _local3.myHeight;
onObject = _local33;
_parent[_local33].onContact(_name);
if ((_y >= _local5.bottom) and _local3.onPlat) {
onPlat = _local3.onPlat;
}
} else if (((_local3._y > _local5.top) and _local3.isSolid) and ((_y - myHeight) > _local3._y)) {
_local5.top = _local3._y;
}
}
} else if (_local3.isSolid) {
if (((_y - myStep) > (_local3._y - _local3.myHeight)) and ((_y - myHeight) < _local3._y)) {
if ((_x < _local3._x) and ((_local3._x - (_local3.myWidth / 2)) < _local5.right)) {
_local5.right = _local3._x - (_local3.myWidth / 2);
} else if ((_x > _local3._x) and ((_local3._x + (_local3.myWidth / 2)) > _local5.left)) {
_local5.left = _local3._x + (_local3.myWidth / 2);
}
}
}
}
}
}
_local5.lspace = _local31 - _local30;
_local5.rspace = _local29 - _local28;
if ((_local5.top < _global.control.levelBounds.top) and _global.control.ceiling) {
_local5.top = _global.control.levelBounds.top;
}
if (_local5.left < _global.control.levelBounds.left) {
_local5.left = _global.control.levelBounds.left;
}
if ((_local5.bottom > _global.control.levelBounds.bottom) and _global.control.floor) {
_local5.bottom = _global.control.levelBounds.bottom;
}
if (_local5.right > _global.control.levelBounds.right) {
_local5.right = _global.control.levelBounds.right;
}
return(_local5);
}
function hitBottom() {
}
}
Symbol 853 MovieClip [__Packages.gameObject] Frame 0
class gameObject extends Game.Platformer.character
{
var isObject, isSolid, myWidth, _width, myHeight, _height, myStep, xmove, bounces, xbounce, ybounce, bxp, _x, byp, _y, respawn, inGrid, platforms, mode, _parent, sound, ymove, moveMe, delayed, temporary, removeMovieClip, onPlat, onObject;
function gameObject () {
super();
initMe();
}
function initMe() {
isObject = true;
isSolid = false;
myWidth = _width - 8;
myHeight = _height - 3;
myStep = 5;
xmove = 0;
bounces = true;
xbounce = 0.75;
ybounce = 0.5;
bxp = _x;
byp = _y;
respawn = 30;
inGrid = _global.control.getGrid(this);
platforms = _global.control.getPlatforms(this);
}
function onEnterFrame() {
if (!_global.paused) {
if (mode != "nofall") {
if (((((_x + _parent._x) > -100) and ((_x + _parent._x) < 740)) and ((_y + _parent._y) > -100)) and ((_y + _parent._y) < 500)) {
sound = Math.abs((_x + _parent._x) - 320) + 100;
sound = 100 - Math.round((sound / 520) * 100);
if (sound > 100) {
sound = 100;
}
var _local3 = _y + _parent._y;
if (_local3 < 100) {
var _local4 = (_local3 + 100) / 2;
} else if (_local3 > 540) {
var _local4 = 100 - ((_local3 - 540) / 2);
} else {
var _local4 = 100;
}
sound = sound * (_local4 / 100);
} else {
sound = 0;
}
if (mode == "walk") {
xmove = 0;
}
if (ymove < 1) {
mode = "fall";
}
moveMe();
} else if (delayed > 0) {
delayed--;
if (delayed < 1) {
mode = "fall";
}
}
}
}
function iDied() {
}
function hitBottom() {
iDied();
if (temporary) {
removeMovieClip();
} else {
respawn--;
if (respawn < 1) {
respawn = 30;
_x = bxp;
_y = byp;
xmove = 0;
ymove = 0;
mode = "fall";
onPlat = undefined;
onObject = undefined;
}
}
}
}
Symbol 854 MovieClip [__Packages.Game.Platformer.skew_box] Frame 0
class Game.Platformer.skew_box extends Game.Platformer.platform
{
var trackBounds, _yscale, base, _height, _y, polyMatrix, _x, save;
function skew_box () {
super();
var _local3 = new Object();
_local3 = trackBounds;
if (Math.round(_height) == Math.round(base._height * (_yscale / 100))) {
var _local5 = _y;
var _local4 = _y + _height;
} else if (_local3.yMin < _y) {
var _local5 = _local3.yMin;
var _local4 = _local3.yMin + (base._height * (_yscale / 100));
} else {
var _local5 = _local3.yMax - (base._height * (_yscale / 100));
var _local4 = _local3.yMax;
}
polyMatrix = [[_x, _y], [_local3.xMax, _local5], [_x, _y + (base._height * (_yscale / 100))], [_local3.xMax, _local4]];
save();
}
}
Symbol 855 MovieClip [__Packages.Switch] Frame 0
class Switch extends MovieClip
{
var isSwitch, myWidth;
function Switch () {
super();
isSwitch = true;
myWidth = 25;
}
function switchMe() {
}
}
Symbol 856 MovieClip [__Packages.Enemy1] Frame 0
class Enemy1 extends Game.Platformer.character
{
var skip, isMolty, flameHeight, dontFall, isSolid, speed, cool, myWidth, jumpPower, jumpPower2, baseHeight, respawnDelay, respawn, canFlame, flameDelay, flameTimer, respawnTime, bounceInt, bounceTimer, bx, _x, by, _y, bf, ymove, xmove, spmod, inGrid, platforms, objects, _parent, myHeight, gotoAndStop, dir, mode, onPlat, onObject, myStep, __get__baseFrame, sound, isBarrel, stop, _visible, canWalk, jumping, sprite, bouncer, moveMe, removeMovieClip;
function Enemy1 () {
super();
if (random(100) < 50) {
skip = false;
}
isMolty = true;
flameHeight = 168;
dontFall = true;
isSolid = false;
speed = 3;
cool = 0;
myWidth = 24;
jumpPower = 16;
jumpPower2 = 18;
baseHeight = 55;
respawnDelay = 30;
respawn = false;
canFlame = true;
flameDelay = 45;
flameTimer = flameDelay;
respawnTime = 30;
bounceInt = 20;
bounceTimer = bounceInt;
bx = _x;
by = _y;
bf = 1;
ymove = 0;
xmove = 0;
if (_global.setting == 0) {
spmod = 2;
} else {
spmod = 0;
}
}
function initMe() {
bx = _x;
by = _y;
ymove = 0;
xmove = 0;
inGrid = _global.control.getGrid(this);
platforms = _global.control.getPlatforms(this);
}
function checkObjects() {
if (skip) {
skip = false;
} else {
skip = true;
objects = new Object();
for (var _local3 in _global.control.myChars) {
if (_parent[_local3].isObject and (_local3 != "key")) {
if (_parent[_local3].mode == "fall") {
if ((_parent[_local3]._y > (_y - myHeight)) and ((_parent[_local3]._y - _parent[_local3].myHeight) < _y)) {
if (Math.abs(_x - _parent[_local3]._x) < ((myWidth + _parent[_local3].myWidth) / 2)) {
if (_parent[_local3].isWater) {
} else if (_parent[_local3].isHeavy) {
} else {
_parent[_local3].mode = "nofall";
_parent[_local3].play();
}
}
}
}
}
}
}
}
function beenHit() {
}
function slopeHit(d) {
if (d > 0) {
(gotoAndStop(1));// not popped
} else {
(gotoAndStop(2));// not popped
}
dir = d;
xmove = speed * dir;
}
function flameOn() {
myHeight = flameHeight;
}
function flameOff() {
myHeight = baseHeight;
}
function resume() {
mode = "walk";
}
function hitWall() {
flipMe();
}
function onEdge() {
flipMe();
}
function jump() {
xmove = speed * dir;
mode = "fall";
onPlat = undefined;
onObject = undefined;
_y = _y - myStep;
ymove = -jumpPower;
}
function flipMe() {
if (dir < 0) {
(gotoAndStop(1));// not popped
} else {
(gotoAndStop(2));// not popped
}
}
function set baseFrame(val) {
bf = val;
(gotoAndStop(val));// not popped
//return(__get__baseFrame());
}
function onEnterFrame() {
if (!_global.paused) {
if (mode != "dead") {
if (((((_x + _parent._x) > -100) and ((_x + _parent._x) < 740)) and ((_y + _parent._y) > -100)) and ((_y + _parent._y) < 500)) {
var _local4 = true;
sound = Math.abs((_x + _parent._x) - 320) + 100;
sound = 100 - Math.round((sound / 520) * 100);
if (sound > 100) {
sound = 100;
}
var _local3 = _y + _parent._y;
if (_local3 < 100) {
var _local5 = (_local3 + 100) / 2;
} else if (_local3 > 540) {
var _local5 = 100 - ((_local3 - 540) / 2);
} else {
var _local5 = 100;
}
sound = sound * (_local5 / 100);
} else {
sound = 0;
var _local4 = false;
}
if (_local4 or isBarrel) {
if (!mode) {
mode == "fall";
(stop());// not popped
}
if (_local4) {
_visible = true;
} else {
_visible = false;
}
if (mode == "walk") {
if (canFlame) {
flameTimer--;
if (flameTimer < 1) {
flameTimer = flameDelay;
mode = "fire";
}
}
}
if ((mode == "walk") and canWalk) {
if (onPlat or onObject) {
xmove = (speed + spmod) * dir;
jumping = false;
sprite.gotoAndStop("walk");
if (bouncer) {
bounceTimer--;
if (bounceTimer < 1) {
bounceTimer = bounceInt;
jump();
}
}
}
moveMe();
} else if (mode == "walk") {
xmove = 0;
if (_parent.player._x > _x) {
(gotoAndStop(1));// not popped
} else {
(gotoAndStop(2));// not popped
}
sprite.gotoAndStop("stand");
moveMe();
} else if (mode == "fire") {
sprite.gotoAndStop("fire");
} else {
moveMe();
}
if (mode == "fall") {
sprite.gotoAndStop("fall");
}
if (_local4) {
checkPlayer();
if ((!isBarrel) or isMolty) {
checkObjects();
}
}
} else {
_visible = false;
}
}
}
}
function checkPlayer() {
if (Math.abs(_parent.player._x - _x) < ((myWidth + _parent.player.myWidth) / 2)) {
if ((_parent.player._y > (_y - myHeight)) and ((_parent.player._y - _parent.player.baseHeight) < _y)) {
_parent.player.killMe();
}
}
}
function iDied() {
}
function hitBottom() {
iDied();
if (respawn) {
respawnDelay--;
if (respawnDelay < 1) {
respawnDelay = respawnTime;
_x = bx;
_y = by;
(gotoAndStop(bf));// not popped
xmove = 0;
ymove = 0;
mode = "fall";
}
} else {
_visible = false;
mode = "dead";
removeMovieClip();
}
}
}
Symbol 857 MovieClip [__Packages.Game.Platformer.register] Frame 0
class Game.Platformer.register extends MovieClip
{
var isRegister;
function register () {
super();
isRegister = true;
}
}
Symbol 858 MovieClip [__Packages.player_sprite] Frame 0
class player_sprite extends Game.Platformer.character
{
var speed, cool, myWidth, jumpPower, jumpPower2, baseHeight, _parent, _x, _y, hurtDelay, hurtTime, myTime, mode, _visible, ymove, xmove, gotoAndStop, dir, holding, getLadder, myStep, myHeight, climbing, sprite, forcedUp, climbLadder, jumping, onPlat, walls, grabbing, _name, moveMe;
function player_sprite () {
super();
_global.player = this;
speed = 6;
cool = 0;
myWidth = 30;
jumpPower = 20;
jumpPower2 = 18;
baseHeight = 55;
var _local5 = _parent._x;
var _local4 = _parent._y;
_parent._x = 320 - _x;
_parent._y = 200 - _y;
fixCamPos();
syncBGS(_local5, _local4, _parent._x, _parent._y);
Key.addListener(this);
hurtDelay = 0;
hurtTime = 30;
myTime = _global.timeLimit * 30;
}
function onKeyDown() {
var _local2 = Key.getCode();
if (_local2 == _global.keys.pause) {
if (!_global.paused) {
_global.paused = true;
} else if (!_global.cutscene) {
_global.paused = false;
}
}
}
function onEnterFrame() {
if (!_global.paused) {
if (_global.timeLimit and (mode != "dead")) {
myTime--;
var _local4 = Math.ceil(myTime / 30);
_global.timeLeft = _local4;
if (_local4 < 10) {
_local4 = "00" + _local4;
} else if (_local4 < 100) {
_local4 = "0" + _local4;
}
_parent._parent.timeDisp = _local4;
if (myTime < 0) {
killMe(true);
}
}
if (hurtDelay > 0) {
if ((hurtDelay % 2) == 0) {
if (_visible) {
_visible = false;
} else {
_visible = true;
}
}
hurtDelay--;
} else {
_visible = true;
}
if (mode != "dead") {
if (cool > 0) {
cool--;
}
if (((ymove < 1) and (mode != "walk")) and (mode != "climb")) {
mode = "fall";
}
var _local6 = false;
if ((mode != "fall") and (mode != "climb")) {
xmove = 0;
var _local9 = "run";
var _local11 = "stand";
if (Key.isDown(_global.keys.left)) {
gotoAndStop(2);
dir = -1;
_local6 = true;
} else if (Key.isDown(_global.keys.right)) {
gotoAndStop(1);
dir = 1;
_local6 = true;
}
if (Key.isDown(_global.keys.down) and (!holding)) {
var _local7 = getLadder();
if (_parent[_local7]) {
if ((_y - myStep) < _parent[_local7]._y) {
_y = _y + (myHeight / 2);
climbing = _local7;
mode = "climb";
holding = false;
_local6 = false;
_local9 = "ladder";
_local11 = "ladder";
}
}
}
} else if (Key.isDown(_global.keys.left) and (xmove > (-speed))) {
xmove--;
} else if (Key.isDown(_global.keys.right) and (xmove < speed)) {
xmove++;
}
if (holding) {
var _local10 = "_hold";
myHeight = 70 + _parent[holding].myHeight;
} else {
var _local10 = "";
myHeight = baseHeight;
if (Key.isDown(_global.keys.up)) {
var _local7 = getLadder();
if (_parent[_local7]) {
if (((_y - (myHeight / 2)) > _parent[_local7]._y) and ((_y - 100) < (_parent[_local7]._y + _parent[_local7].myHeight))) {
climbing = _local7;
mode = "climb";
holding = false;
_local6 = false;
var _local9 = "ladder";
var _local11 = "ladder";
}
}
}
}
if ((mode == "climb") and climbing) {
sprite.gotoAndStop("ladder");
if (Key.isDown(_global.keys.down)) {
ymove = speed;
sprite.ani.play();
} else if (Key.isDown(_global.keys.up) or forcedUp) {
ymove = -speed;
sprite.ani.play();
} else {
ymove = 0;
}
climbLadder(climbing);
if ((_y - myStep) < _parent[climbing]._y) {
ymove = 0;
_y = _parent[climbing]._y - 1;
mode = "fall";
sprite.gotoAndStop(1);
}
if (Key.isDown(_global.keys.jump) and (!jumping)) {
jumping = true;
mode = "fall";
if (Key.isDown(_global.keys.left)) {
(gotoAndStop(2));// not popped
ymove = -(jumpPower / 2);
} else if (Key.isDown(_global.keys.right)) {
(gotoAndStop(1));// not popped
ymove = -(jumpPower / 2);
} else {
ymove = 1;
}
sprite.gotoAndStop("fall");
} else if (!Key.isDown(_global.keys.jump)) {
jumping = false;
}
} else {
if ((Key.isDown(_global.keys.jump) and (mode != "fall")) and (!jumping)) {
mode = "fall";
jumping = true;
var _local9 = "fall";
var _local11 = "fall";
sprite.gotoAndStop(_local9 + _local10);
if (_local6 and (!holding)) {
sprite.ani.gotoAndPlay("flip");
ymove = -jumpPower;
} else {
ymove = -jumpPower2;
}
onPlat = undefined;
} else if (!Key.isDown(_global.keys.jump)) {
jumping = false;
}
if (_local6) {
sprite.gotoAndStop(_local9 + _local10);
xmove = dir * speed;
if (((_x + xmove) > walls.right) and (dir > 0)) {
xmove = 0;
}
} else {
sprite.gotoAndStop(_local11 + _local10);
}
if (((Key.isDown(_global.keys.grab) and (!grabbing)) and (!holding)) and (mode == "walk")) {
grabbing = true;
var _local5 = true;
for (var _local8 in _global.control.switches) {
var _local3 = _parent[_local8];
if (Math.abs(_x - _local3._x) < (_local3.myWidth + (myWidth / 2))) {
if ((_y > _local3._y) and ((_y - myHeight) < _local3._y)) {
_local3.play();
_local3.switchMe();
_local5 = false;
break;
}
}
}
if (_local5) {
for (var _local8 in _global.control.myChars) {
if (_local8 != _name) {
var _local3 = _parent[_local8];
if (_local3.isObject and _local3.canGrab) {
if ((Math.abs(_x - _local3._x) - (myWidth / 2)) < ((myWidth + _local3.myWidth) / 2)) {
if (((_x < _local3._x) and (dir > 0)) or ((_x > _local3._x) and (dir < 0))) {
if (((_y - myHeight) < _local3._y) and (_y > (_local3._y - _local3.myHeight))) {
holding = _local8;
_local3.mode = "nofall";
_local3._x = _x;
_local3._y = _y - (myHeight / 2);
_local3.ymove = 0;
break;
}
}
}
}
}
}
}
} else if ((Key.isDown(_global.keys.grab) and holding) and (!grabbing)) {
if (holding) {
_parent[holding].xmove = (4 * dir) + (xmove * 2);
if (mode == "fall") {
_parent[holding].ymove = ymove;
} else {
_parent[holding].ymove = 0;
}
if (xmove != 0) {
_parent[holding].ymove = _parent[holding].ymove - 4;
if (!_global.mutesound) {
var _local12 = new Sound(this);
_local12.attachSound("altrio-throw.mp3");
_local12.start();
}
}
_parent[holding].mode = "fall";
}
holding = false;
grabbing = true;
} else if (!Key.isDown(_global.keys.grab)) {
grabbing = false;
}
moveMe();
if (holding) {
_parent[holding]._x = _x;
_parent[holding]._y = _y - 80;
if (holding == "key") {
if (((_y - myStep) < _parent.door._y) and ((_y + myStep) > _parent.door._y)) {
if (Math.abs(_x - _parent.door._x) < (myWidth / 2)) {
_parent.key._visible = false;
holding = false;
_parent.door.gotoAndStop(2);
Iwon();
}
}
}
}
}
}
}
var _local18 = ((320 - _x) - _parent._x) - (80 * dir);
var _local17 = (240 - _y) - _parent._y;
var _local13 = _local18 * 0.1;
var _local14 = _local17 * 0.1;
var _local16 = _parent._x;
var _local15 = _parent._y;
if (Math.abs(_local13) >= 0.5) {
_parent._x = _parent._x + _local13;
}
if (Math.abs(_local14) >= 0.5) {
_parent._y = _parent._y + _local14;
}
fixCamPos();
syncBGS(_local16, _local15, _parent._x, _parent._y);
}
function fixCamPos() {
if ((_parent._x + _global.control.levelBounds.left) > 0) {
_parent._x = -_global.control.levelBounds.left;
} else if ((_parent._x + _global.control.levelBounds.right) < 640) {
_parent._x = 640 - _global.control.levelBounds.right;
}
if ((_parent._y + _global.control.levelBounds.top) > 0) {
_parent._y = -_global.control.levelBounds.top;
} else if ((_parent._y + _global.control.levelBounds.bottom) < 400) {
_parent._y = 400 - _global.control.levelBounds.bottom;
}
}
function syncBGS(ox, oy, nx, ny) {
if (ox != nx) {
var _local2 = nx - ox;
_parent._parent.midground._x = _parent._parent.midground._x + (_local2 * 0.75);
_parent._parent.background._x = _parent._parent.background._x + (_local2 * 0.5);
}
if (oy != ny) {
var _local2 = ny - oy;
_parent._parent.midground._y = _parent._parent.midground._y + (_local2 * 0.75);
_parent._parent.background._y = _parent._parent.background._y + (_local2 * 0.5);
}
}
function hitBottom() {
killMe(true);
}
function killMe(absolute) {
if ((hurtDelay < 1) and (mode != "dead")) {
if ((_global.myLife < 1) or absolute) {
_global.myLife = -1;
_parent._parent.camMask._x = _parent._x + _x;
_parent._parent.camMask._y = (_parent._y + _y) - (myHeight / 2);
_parent._parent.camMask.play();
sprite.gotoAndStop("dead");
sprite.ani.play();
mode = "dead";
} else {
sprite.gotoAndStop("dead");
sprite.ani.stop();
_y = _y - (jumpPower / 2);
mode = "fall";
ymove = jumpPower * -0.75;
xmove = (speed * dir) * -1.5;
_global.myLife--;
hurtDelay = hurtTime;
_parent._parent.hearts.gotoAndStop(_global.myLife + 1);
}
if (holding) {
_parent[holding].mode = "fall";
holding = undefined;
}
}
}
function Iwon() {
_y = _parent.door._y;
sprite.gotoAndStop("win");
mode = "dead";
}
}
Symbol 859 MovieClip [__Packages.Game.Platformer.platform_box] Frame 0
class Game.Platformer.platform_box extends Game.Platformer.platform
{
var polyMatrix, _x, _y, _width, _height, save;
function platform_box () {
super();
polyMatrix = [[_x, _y], [_x + _width, _y], [_x, _y + _height], [_x + _width, _y + _height]];
save();
}
}
Symbol 860 MovieClip [__Packages.Game.Platformer.ladder] Frame 0
class Game.Platformer.ladder extends Game.Platformer.platform_box
{
var isLadder, myWidth, _width, myHeight, _height, clipping;
function ladder () {
super();
isLadder = true;
myWidth = _width;
myHeight = _height;
clipping = true;
}
}
Symbol 861 MovieClip [__Packages.Game.Platformer.levelController] Frame 0
class Game.Platformer.levelController
{
var levelBounds, grid, ceiling, gravity, density, gridSize, level, myChars, myObjects, switches;
function levelController (target) {
target.playerShots = 0;
levelBounds = new Object();
grid = new Object();
ceiling = false;
gravity = 1;
density = 2;
gridSize = 128;
var _local12;
var _local16;
var _local11;
var _local15;
var _local14;
var _local10;
var _local13;
var _local17;
var _local18 = 0;
level = target;
_global.game = target;
var _local5 = new Array();
myChars = new Object();
myObjects = new Object();
switches = new Object();
for (var _local19 in level) {
if (level[_local19].isRegister) {
echo("Found Register Point: " + _local19);
_local18++;
if ((_local14 == undefined) or (_local14 > level[_local19]._x)) {
_local14 = Math.round(level[_local19]._x);
}
if ((_local10 == undefined) or (_local10 < level[_local19]._x)) {
_local10 = Math.round(level[_local19]._x);
}
if ((_local13 == undefined) or (_local13 > level[_local19]._y)) {
_local13 = Math.round(level[_local19]._y);
}
if ((_local17 == undefined) or (_local17 < level[_local19]._y)) {
_local17 = Math.round(level[_local19]._y);
}
} else if (level[_local19].isPlatform) {
_local5.push(level[_local19]);
level[_local19].controller = this;
echo("Found Platform: " + _local19);
if ((_local12 == undefined) or (_local12 > level[_local19].polyMatrix[0][0])) {
_local12 = Math.round(level[_local19]._x);
}
if ((_local16 == undefined) or (_local16 < level[_local19].polyMatrix[3][0])) {
_local16 = Math.round(level[_local19]._x);
}
if ((_local11 == undefined) or (_local11 > level[_local19].polyMatrix[0][1])) {
_local11 = Math.round(level[_local19]._y);
}
if ((_local15 == undefined) or (_local15 < level[_local19].polyMatrix[3][1])) {
_local15 = Math.round(level[_local19]._y);
}
} else if (level[_local19].isCharacter) {
echo("Found character: " + _local19);
myChars[_local19] = true;
} else if (level[_local19].isSwitch) {
switches[_local19] = true;
}
}
if (_local18 > 1) {
echo("using register points for bounds");
levelBounds.left = _local14;
levelBounds.right = _local10;
levelBounds.top = _local13;
levelBounds.bottom = _local17;
} else {
echo("using platforms for bounds");
levelBounds.left = _local12;
levelBounds.right = _local16;
levelBounds.top = _local11;
levelBounds.bottom = _local15;
}
var _local9 = Math.floor(levelBounds.left / gridSize);
var _local8 = Math.ceil(levelBounds.right / gridSize);
var _local7 = Math.floor(levelBounds.top / gridSize);
var _local6 = Math.ceil(levelBounds.bottom / gridSize);
var _local4 = _local9;
while (_local4 <= _local8) {
var _local3 = _local7;
while (_local3 <= _local6) {
grid[(("x" + _local4) + "y") + _local3] = new Array();
_local3++;
}
_local4++;
}
var _local19 = 0;
while (_local19 < _local5.length) {
_local9 = Math.floor(_local5[_local19].bounds.xMin / gridSize);
_local8 = Math.ceil(_local5[_local19].bounds.xMax / gridSize);
_local7 = Math.floor(_local5[_local19].bounds.yMin / gridSize);
_local6 = Math.ceil(_local5[_local19].bounds.yMax / gridSize);
_local4 = _local9;
while (_local4 < _local8) {
var _local3 = _local7;
while (_local3 < _local6) {
grid[(("x" + _local4) + "y") + _local3].push(_local5[_local19]._name);
_local3++;
}
_local4++;
}
_local19++;
}
for (_local19 in myChars) {
level[_local19].inGrid = getGrid(level[_local19]);
level[_local19].platforms = getPlatforms(level[_local19]);
level[_local19].init();
}
}
function getGrid(character) {
var _local2 = new Object();
_local2.x = Math.floor(character._x / gridSize);
_local2.y = Math.floor((character._y - 46) / gridSize);
level.box._x = _local2.x * gridSize;
level.box._y = _local2.y * gridSize;
return(_local2);
}
function getPlatforms(character) {
var _local3 = getGrid(character);
var _local8 = _local3.x;
var _local6 = _local3.y;
var _local7 = new Object();
var _local5 = _local8 - 1;
while (_local5 <= (_local8 + 1)) {
var _local4 = _local6 - 1;
while (_local4 <= (_local6 + 1)) {
_local3 = grid[(("x" + _local5) + "y") + _local4];
var _local2 = 0;
while (_local2 < _local3.length) {
_local7[_local3[_local2]] = true;
_local2++;
}
_local4++;
}
_local5++;
}
return(_local7);
}
function echo(msg) {
trace("[PlatformEngine] " + msg);
}
}
Symbol 862 MovieClip [__Packages.saveScore] Frame 0
class saveScore
{
var gameId, eKey, sponsor;
function saveScore (g, k, s) {
gameId = g;
eKey = k;
sponsor = s;
}
function submit(u, n, o, p) {
var _local2 = new Object();
_local2.seed = 99999999 * Math.random();
_local2.user = u;
if (p) {
_local2.password = com.meychi.ascrypt.MD5.calculate(p);
}
_local2.score = n;
if (o) {
_local2.other = JSON.stringify(o);
}
var _local3 = com.meychi.ascrypt.RC4.encrypt(JSON.stringify(_local2), eKey);
sendit(_local3);
}
function sendit(secure) {
_root.createEmptyMovieClip("scoreSubmissionWrapper", _root.getNextHighestDepth());
_root.scoreSubmissionWrapper.dataString = secure;
_root.scoreSubmissionWrapper.sponsor = sponsor;
_root.scoreSubmissionWrapper.gameId = gameId;
_root.scoreSubmissionWrapper.getURL("http://www.psychogoldfish.com/submitScore.php", "_blank", "POST");
_root.scoreSubmissionWrapper.removeMovieClip();
}
function show() {
getURL ((("http://www.psychogoldfish.com/scoreBoards.php?gameId=" + gameId) + "&sponsor=") + sponsor, "_blank");
}
}
Symbol 863 MovieClip [__Packages.com.meychi.ascrypt.MD5] Frame 0
class com.meychi.ascrypt.MD5
{
function MD5 () {
}
static function calculate(src) {
return(hex_md5(src));
}
static function hex_md5(src) {
return(binl2hex(core_md5(str2binl(src), src.length * 8)));
}
static function core_md5(x, len) {
x[len >> 5] = x[len >> 5] | (128 << (len % 32));
x[(((len + 64) >>> 9) << 4) + 14] = len;
var _local4 = 1732584193 /* 0x67452301 */;
var _local3 = -271733879;
var _local2 = -1732584194;
var _local1 = 271733878 /* 0x10325476 */;
var _local5 = 0;
while (_local5 < x.length) {
var _local10 = _local4;
var _local9 = _local3;
var _local8 = _local2;
var _local7 = _local1;
_local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 0], 7, -680876936);
_local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 1], 12, -389564586);
_local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 2], 17, 606105819);
_local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 3], 22, -1044525330);
_local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 4], 7, -176418897);
_local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 5], 12, 1200080426);
_local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 6], 17, -1473231341);
_local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 7], 22, -45705983);
_local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 8], 7, 1770035416);
_local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 9], 12, -1958414417);
_local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 10], 17, -42063);
_local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 11], 22, -1990404162);
_local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 12], 7, 1804603682);
_local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 13], 12, -40341101);
_local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 14], 17, -1502002290);
_local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 15], 22, 1236535329);
_local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 1], 5, -165796510);
_local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 6], 9, -1069501632);
_local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 11], 14, 643717713);
_local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 0], 20, -373897302);
_local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 5], 5, -701558691);
_local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 10], 9, 38016083);
_local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 15], 14, -660478335);
_local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 4], 20, -405537848);
_local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 9], 5, 568446438);
_local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 14], 9, -1019803690);
_local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 3], 14, -187363961);
_local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 8], 20, 1163531501);
_local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 13], 5, -1444681467);
_local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 2], 9, -51403784);
_local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 7], 14, 1735328473);
_local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 12], 20, -1926607734);
_local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 5], 4, -378558);
_local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 8], 11, -2022574463);
_local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 11], 16, 1839030562);
_local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 14], 23, -35309556);
_local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 1], 4, -1530992060);
_local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 4], 11, 1272893353);
_local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 7], 16, -155497632);
_local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 10], 23, -1094730640);
_local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 13], 4, 681279174);
_local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 0], 11, -358537222);
_local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 3], 16, -722521979);
_local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 6], 23, 76029189);
_local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 9], 4, -640364487);
_local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 12], 11, -421815835);
_local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 15], 16, 530742520);
_local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 2], 23, -995338651);
_local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 0], 6, -198630844);
_local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 7], 10, 1126891415);
_local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 14], 15, -1416354905);
_local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 5], 21, -57434055);
_local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 12], 6, 1700485571);
_local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 3], 10, -1894986606);
_local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 10], 15, -1051523);
_local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 1], 21, -2054922799);
_local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 8], 6, 1873313359);
_local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 15], 10, -30611744);
_local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 6], 15, -1560198380);
_local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 13], 21, 1309151649);
_local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 4], 6, -145523070);
_local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 11], 10, -1120210379);
_local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 2], 15, 718787259);
_local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 9], 21, -343485551);
_local4 = safe_add(_local4, _local10);
_local3 = safe_add(_local3, _local9);
_local2 = safe_add(_local2, _local8);
_local1 = safe_add(_local1, _local7);
_local5 = _local5 + 16;
}
return(new Array(_local4, _local3, _local2, _local1));
}
static function md5_cmn(q, a, b, x, s, t) {
return(safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b));
}
static function md5_ff(a, b, c, d, x, s, t) {
return(md5_cmn((b & c) | ((~b) & d), a, b, x, s, t));
}
static function md5_gg(a, b, c, d, x, s, t) {
return(md5_cmn((b & d) | (c & (~d)), a, b, x, s, t));
}
static function md5_hh(a, b, c, d, x, s, t) {
return(md5_cmn((b ^ c) ^ d, a, b, x, s, t));
}
static function md5_ii(a, b, c, d, x, s, t) {
return(md5_cmn(c ^ (b | (~d)), a, b, x, s, t));
}
static function bit_rol(num, cnt) {
return((num << cnt) | (num >>> (32 - cnt)));
}
static function safe_add(x, y) {
var _local1 = (x & 65535) + (y & 65535);
var _local2 = ((x >> 16) + (y >> 16)) + (_local1 >> 16);
return((_local2 << 16) | (_local1 & 65535));
}
static function str2binl(str) {
var _local3 = new Array();
var _local4 = 255;
var _local1 = 0;
while (_local1 < (str.length * 8)) {
_local3[_local1 >> 5] = _local3[_local1 >> 5] | ((str.charCodeAt(_local1 / 8) & _local4) << (_local1 % 32));
_local1 = _local1 + 8;
}
return(_local3);
}
static function binl2hex(binarray) {
var _local4 = new String("");
var _local3 = new String("0123456789abcdef");
var _local1 = 0;
while (_local1 < (binarray.length * 4)) {
_local4 = _local4 + (_local3.charAt((binarray[_local1 >> 2] >> (((_local1 % 4) * 8) + 4)) & 15) + _local3.charAt((binarray[_local1 >> 2] >> ((_local1 % 4) * 8)) & 15));
_local1++;
}
return(_local4);
}
}
Symbol 864 MovieClip [__Packages.JSON] Frame 0
class JSON
{
function JSON () {
}
static function stringify(arg, noquotes) {
var _local3;
var _local2;
var _local6;
var _local1 = "";
var _local4;
if (arg.isSServerVar()) {
var _local8 = "sservervariable";
} else {
var _local8 = typeof(arg);
}
switch (_local8) {
case "sservervariable" :
return("?" + arg.getEncodedValue());
case "object" :
if (arg) {
if (arg instanceof Array) {
_local2 = 0;
while (_local2 < arg.length) {
_local4 = stringify(arg[_local2]);
if (_local1) {
_local1 = _local1 + ",";
}
_local1 = _local1 + _local4;
_local2++;
}
return(("[" + _local1) + "]");
}
if (typeof(arg.toString) != "undefined") {
for (_local2 in arg) {
_local4 = arg[_local2];
if ((typeof(_local4) != "undefined") && (typeof(_local4) != "function")) {
_local4 = stringify(_local4);
if (_local1) {
_local1 = _local1 + ",";
}
_local1 = _local1 + ((stringify(_local2) + ":") + _local4);
}
}
return(("{" + _local1) + "}");
}
}
return("null");
case "number" :
return((isFinite(arg) ? (String(arg)) : "null"));
case "string" :
_local6 = arg.length;
if (noquotes) {
var _local7 = "";
} else {
var _local7 = "\"";
}
_local1 = _local7;
_local2 = 0;
while (_local2 < _local6) {
_local3 = arg.charAt(_local2);
if (_local3 >= " ") {
if ((_local3 == "\\") || (_local3 == "\"")) {
_local1 = _local1 + "\\";
}
_local1 = _local1 + _local3;
} else {
switch (_local3) {
case "\b" :
_local1 = _local1 + "\\b";
break;
case "\f" :
_local1 = _local1 + "\\f";
break;
case newline :
_local1 = _local1 + "\\n";
break;
case "\r" :
_local1 = _local1 + "\\r";
break;
case "\t" :
_local1 = _local1 + "\\t";
break;
default :
_local3 = _local3.charCodeAt();
_local1 = _local1 + (("\\u00" + Math.floor(_local3 / 16).toString(16)) + (_local3 % 16).toString(16));
}
}
_local2 = _local2 + 1;
}
return(_local1 + _local7);
case "boolean" :
return(String(arg));
}
return("null");
}
static function parse(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 = at + 1;
return(ch);
};
var _white = function () {
while (ch) {
if (ch <= " ") {
_next();
} else if (ch == "/") {
switch (_next()) {
case "/" :
while ((_next() && (ch != newline)) && (ch != "\r")) {
}
break;
case "*" :
_next();
for(;;){
if (ch) {
if (ch == "*") {
if (_next() == "/") {
_next();
// unexpected jump
}
} else {
_next();
}
} else {
_error("Unterminated comment");
}
};
break;
default :
_error("Syntax error");
}
} else {
return;
}
}
};
var _string = function () {
var _local4;
var _local1 = "";
var _local3;
var _local2;
var _local5 = false;
if (ch == "\"") {
while (_next()) {
if (ch == "\"") {
_next();
return(_local1);
}
if (ch == "\\") {
switch (_next()) {
case "b" :
_local1 = _local1 + "\b";
break;
case "f" :
_local1 = _local1 + "\f";
break;
case "n" :
_local1 = _local1 + newline;
break;
case "r" :
_local1 = _local1 + "\r";
break;
case "t" :
_local1 = _local1 + "\t";
break;
case "u" :
_local2 = 0;
_local4 = 0;
while (_local4 < 4) {
_local3 = parseInt(_next(), 16);
if (!isFinite(_local3)) {
_local5 = true;
break;
}
_local2 = (_local2 * 16) + _local3;
_local4 = _local4 + 1;
}
if (_local5) {
_local5 = false;
break;
}
_local1 = _local1 + String.fromCharCode(_local2);
break;
default :
_local1 = _local1 + ch;
}
} else {
_local1 = _local1 + ch;
}
}
}
_error("Bad string");
};
var _array = function () {
var _local1 = [];
if (ch == "[") {
_next();
_white();
if (ch == "]") {
_next();
return(_local1);
}
while (ch) {
_local1.push(_value());
_white();
if (ch == "]") {
_next();
return(_local1);
}
if (ch != ",") {
break;
}
_next();
_white();
}
}
_error("Bad array");
};
var _object = function () {
var _local2;
var _local1 = {};
if (ch == "{") {
_next();
_white();
if (ch == "}") {
_next();
return(_local1);
}
while (ch) {
_local2 = _string();
_white();
if (ch != ":") {
break;
}
_next();
_local1[_local2] = _value();
_white();
if (ch == "}") {
_next();
return(_local1);
}
if (ch != ",") {
break;
}
_next();
_white();
}
}
_error("Bad object");
};
var _number = function () {
var _local1 = "";
var _local2;
if (ch == "-") {
_local1 = "-";
_next();
}
while ((ch >= "0") && (ch <= "9")) {
_local1 = _local1 + ch;
_next();
}
if (ch == ".") {
_local1 = _local1 + ".";
while ((_next() && (ch >= "0")) && (ch <= "9")) {
_local1 = _local1 + ch;
}
}
_local2 = 1 * _local1;
if (!isFinite(_local2)) {
_error("Bad number");
} else {
return(_local2);
}
};
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"))) {
break;
}
_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());
}
}
Symbol 865 MovieClip [__Packages.com.meychi.ascrypt.RC4] Frame 0
class com.meychi.ascrypt.RC4
{
function RC4 () {
}
static function encrypt(src, key) {
var _local3 = strToChars(src);
var _local1 = strToChars(key);
var _local2 = calculate(_local3, _local1);
return(charsToHex(_local2));
}
static function decrypt(src, key) {
var _local3 = hexToChars(src);
var _local1 = strToChars(key);
var _local2 = calculate(_local3, _local1);
return(charsToStr(_local2));
}
static function initialize(pwd) {
var _local2 = 0;
var _local3;
var _local4 = pwd.length;
var _local1 = 0;
while (_local1 <= 255) {
mykey[_local1] = pwd[_local1 % _local4];
sbox[_local1] = _local1;
_local1++;
}
_local1 = 0;
while (_local1 <= 255) {
_local2 = ((_local2 + sbox[_local1]) + mykey[_local1]) % 256;
_local3 = sbox[_local1];
sbox[_local1] = sbox[_local2];
sbox[_local2] = _local3;
_local1++;
}
}
static function calculate(plaintxt, psw) {
initialize(psw);
var _local1 = 0;
var _local2 = 0;
var _local9 = new Array();
var _local7;
var _local5;
var _local6;
var _local3 = 0;
while (_local3 < plaintxt.length) {
_local1 = (_local1 + 1) % 256;
_local2 = (_local2 + sbox[_local1]) % 256;
_local5 = sbox[_local1];
sbox[_local1] = sbox[_local2];
sbox[_local2] = _local5;
var _local4 = (sbox[_local1] + sbox[_local2]) % 256;
_local7 = sbox[_local4];
_local6 = plaintxt[_local3] ^ _local7;
_local9.push(_local6);
_local3++;
}
return(_local9);
}
static function charsToHex(chars) {
var _local4 = new String("");
var _local3 = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f");
var _local1 = 0;
while (_local1 < chars.length) {
_local4 = _local4 + (_local3[chars[_local1] >> 4] + _local3[chars[_local1] & 15]);
_local1++;
}
return(_local4);
}
static function hexToChars(hex) {
var _local3 = new Array();
var _local1 = ((hex.substr(0, 2) == "0x") ? 2 : 0);
while (_local1 < hex.length) {
_local3.push(parseInt(hex.substr(_local1, 2), 16));
_local1 = _local1 + 2;
}
return(_local3);
}
static function charsToStr(chars) {
var _local3 = new String("");
var _local1 = 0;
while (_local1 < chars.length) {
_local3 = _local3 + String.fromCharCode(chars[_local1]);
_local1++;
}
return(_local3);
}
static function strToChars(str) {
var _local3 = new Array();
var _local1 = 0;
while (_local1 < str.length) {
_local3.push(str.charCodeAt(_local1));
_local1++;
}
return(_local3);
}
static var sbox = new Array(255);
static var mykey = new Array(255);
}
Symbol 238 Button
on (release) {
com.Newgrounds.NewgroundsAPI.loadNewgrounds();
}
Symbol 243 Button
on (release) {
_global.level = 1;
_global.setting = 1;
startMyGame();
}
Symbol 256 Button
on (release) {
_global.level = 1;
_global.setting = 2;
startMyGame();
}
Symbol 257 Button
on (release) {
_global.level = 1;
_global.setting = 0;
startMyGame();
}
Symbol 283 Button
on (release) {
if (input.toUpperCase() == "DR0KN") {
_root.doMedal("Code Breaker");
gotoAndStop ("youwin");
} else if (_global.codes2[input.toUpperCase()]) {
_global.level = Number(_global.codes2[input.toUpperCase()].level);
_global.setting = Number(_global.codes2[input.toUpperCase()].setting);
startMyGame();
}
}
Symbol 299 Button
on (release) {
play();
}
Symbol 301 MovieClip Frame 1
_global.mutesound = false;
stop();
Symbol 301 MovieClip Frame 2
_global.mutesound = true;
stop();
Symbol 302 MovieClip Frame 1
_global.mutemusic = false;
stop();
Symbol 302 MovieClip Frame 2
_global.mutemusic = true;
stop();
Symbol 305 Button
on (release) {
com.Newgrounds.NewgroundsAPI.loadNewgrounds();
}
Symbol 306 Button
on (release) {
getURL (scoreURL, "_blank");
_root.doMedal("Worship the Mighty");
}
Symbol 320 MovieClip Frame 1
function startSong(song) {
clearInterval(fader);
if (!_global.mutemusic) {
if (song != thesong) {
thesong = song;
music.stop();
if (song != false) {
music = new Sound(this);
music.setVolume(0);
vol = 10;
music.attachSound(thesong);
music.start(0, 999);
fadeup = setInterval(this, "raiseMe", 33);
}
}
}
}
function stopSong() {
startSong(false);
}
function fadeSong() {
clearInterval(fader);
clearInterval(fadeup);
fader = setInterval(this, "fadeMe", 33);
}
function raiseMe() {
vol = vol + 1;
music.setVolume(vol);
if (vol > 50) {
vol = 50;
clearInterval(fadeup);
}
}
function fadeMe() {
vol = vol - 5;
music.setVolume(vol);
if (vol < 1) {
vol = 100;
music.stop();
clearInterval(fader);
}
}
thesong = false;
vol = 100;
stop();
Symbol 360 MovieClip Frame 1
stop();
Symbol 360 MovieClip Frame 2
medal_pop.medal_name = medal.name;
medal_pop.icon.gotoAndStop(medal.name);
Symbol 363 Button
on (release) {
closeMe();
}
Symbol 364 MovieClip Frame 1
function closeMe() {
_x = -9999;
_visible = false;
}
if (com.Newgrounds.NewgroundsAPI.hasUserSession()) {
closeMe();
}
Symbol 370 Button
on (release) {
startMe();
}
Symbol 374 MovieClip Frame 19
stop();
Symbol 374 MovieClip Frame 20
Symbol 374 MovieClip Frame 38
stop();
Symbol 386 MovieClip Frame 1
stop();
Symbol 396 MovieClip Frame 25
if (_global.cutscene) {
gotoAndPlay (1);
}
Symbol 396 MovieClip Frame 81
gotoAndPlay ("breath");
Symbol 401 Button
on (release) {
_global.listener = false;
_parent.mysound.stop();
_parent.gotoAndStop("end");
}
Symbol 409 MovieClip Frame 1
_root.music.startSong("maxSong");
if (_global.lvl1Help) {
gotoAndStop ("end");
_global.cutscene = false;
} else {
_global.lvl1Help = true;
_global.paused = true;
_global.cutscene = true;
}
Symbol 409 MovieClip Frame 25
if (!_global.mutesound) {
trace("gogo");
mysound = new Sound(this);
mysound.attachSound("max1-1.mp3");
mysound.start();
}
stop();
Symbol 409 MovieClip Frame 26
mysound.stop();
Symbol 409 MovieClip Frame 37
if (!_global.mutesound) {
mysound = new Sound(this);
mysound.attachSound("max1-2.mp3");
mysound.start();
}
stop();
Symbol 409 MovieClip Frame 38
mysound.stop();
Symbol 409 MovieClip Frame 49
if (!_global.mutesound) {
mysound = new Sound(this);
mysound.attachSound("max1-3.mp3");
mysound.start();
}
stop();
Symbol 409 MovieClip Frame 50
mysound.stop();
Symbol 409 MovieClip Frame 61
if (!_global.mutesound) {
mysound = new Sound(this);
mysound.attachSound("max1-4.mp3");
mysound.start();
}
stop();
Symbol 409 MovieClip Frame 62
mysound.stop();
Symbol 409 MovieClip Frame 73
if (!_global.mutesound) {
mysound = new Sound(this);
mysound.attachSound("max1-5.mp3");
mysound.start();
}
stop();
Symbol 409 MovieClip Frame 74
mysound.stop();
Symbol 409 MovieClip Frame 85
if (!_global.mutesound) {
mysound = new Sound(this);
mysound.attachSound("max1-6.mp3");
mysound.start();
}
stop();
Symbol 409 MovieClip Frame 86
_root.music.startSong("levelSong");
mysound.stop();
_global.paused = false;
_global.cutscene = false;
stop();
Symbol 411 MovieClip Frame 1
if (_global.my_bottles[_name]) {
_global.levBottles++;
_visible = false;
}
onEnterFrame = function () {
if (_visible) {
if (Math.abs(_parent.player._x - _x) < 20) {
if (Math.abs((_parent.player._y - 20) - _y) < 40) {
_global.my_bottles[_name] = true;
var _local5 = 0;
for (n in _global.my_bottles) {
_local5++;
}
if (_local5 == 6) {
_root.doMedal("Six Pack");
} else if (_local5 == 12) {
_root.doMedal("Half Case");
} else if (_local5 == 24) {
_root.doMedal("Full Case");
}
_global.levBottles++;
_visible = false;
if (!_global.mutesound) {
snd = new Sound(this);
snd.attachSound("heal3.wav");
snd.start();
}
delete onEnterFrame;
}
}
}
};
Symbol 420 MovieClip Frame 1
function checkPlayer() {
if (Math.abs(_parent.player._x - _x) < ((myWidth + _parent.player.myWidth) / 2)) {
if ((_parent.player._y > (_y - myHeight)) and ((_parent.player._y - _parent.player.baseHeight) < _y)) {
_parent.player.killMe();
speed = 0;
}
}
}
function respawn() {
bnds = mybounds;
if (Math.abs(_parent.player._x - bnds.left) > Math.abs(_parent.player._x - bnds.right)) {
_x = (bnds.left - myWidth);
} else {
_x = (bnds.right + myWidth);
}
_y = by;
mode = "fly";
gotoAndPlay (1);
}
function checkObjects() {
if (!skip) {
objects = new Object();
for (var _local4 in _global.control.myChars) {
if (_parent[_local4].isObject) {
objects[_local4] = true;
}
}
skip = 3;
} else {
skip--;
}
for (var _local4 in objects) {
if (_parent[_local4].mode == "fall") {
if ((_parent[_local4]._y > (_y - myHeight)) and ((_parent[_local4]._y - _parent[_local4].myHeight) < _y)) {
if (Math.abs(_x - _parent[_local4]._x) < ((myWidth + _parent[_local4].myWidth) / 2)) {
mode = "stunned";
gotoAndStop (30);
stun = 300;
if (_parent[_local4].xmove > 0) {
xmove = 3;
} else {
xmove = -3;
}
ymove = -10;
if (!_global.mutesound) {
snd = "bat_dies.mp3";
ply = new Sound(this);
ply.attachSound(snd);
ply.start();
}
break;
}
}
}
}
}
if (!mybounds) {
by = _y;
mybounds = _global.control.levelBounds;
}
if (!speed) {
bx = _x;
by = _y;
myWidth = 18;
myHeight = 20;
speed = 5;
if (_global.setting == 0) {
speed = 9;
}
hover = 0;
maxhov = 7;
minhov = -7;
inc = 0.5;
mode = "fly";
xmove = speed;
}
onEnterFrame = function () {
if (hardmode and (_global.setting > 0)) {
delete onEnterFrame;
_x = -99999;
_visible = false;
} else if (!_global.paused) {
if (mode != "stunned") {
if (((_x + xmove) + 80) > mybounds.right) {
xmove = -speed;
} else if (((_x + xmove) - 80) < mybounds.left) {
xmove = speed;
}
hover = hover + inc;
if ((hover >= maxhov) or (hover <= minhov)) {
inc = inc * -1;
}
_y = (_y + hover);
_x = (_x + xmove);
checkPlayer();
checkObjects();
} else if (stun < 1) {
respawn();
} else {
stun--;
_x = (_x + xmove);
_y = (_y + ymove);
ymove++;
}
}
};
Symbol 420 MovieClip Frame 3
if ((!_global.mutesound) and (random(100) < 50)) {
playdst = Math.abs(_x - _parent.player._x);
if ((playdst < 300) and (Math.abs(_y - _parent.player._y) < 180)) {
mysound = new Sound(this);
mysound.attachSound("bat-flying.mp3");
mysound.setVolume((300 - playdst) / 3);
mysound.start();
trace("bat-flying.mp3");
}
}
Symbol 420 MovieClip Frame 25
gotoAndPlay (1);
Symbol 420 MovieClip Frame 26
_global.batlover = false;
Instance of Symbol 409 MovieClip in Symbol 425 MovieClip Frame 1
onClipEvent (keyDown) {
if ((Key.getCode() == _global.keys.jump) or (Key.getCode() == _global.keys.grab)) {
if (_global.cutscene) {
play();
}
}
}
Instance of Symbol 420 MovieClip "bat1" in Symbol 425 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3000);
mybounds = new Object();
mybounds.left = _x - 20;
mybounds.right = _parent.door._x + 80;
mybounds.top = _global.control.levelBounds.top;
mybounds.bottom = _global.control.levelBounds.bottom;
}
Instance of Symbol 420 MovieClip "bat2" in Symbol 425 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3000);
mybounds = new Object();
mybounds.left = _x - 20;
mybounds.right = _parent.door._x + 80;
mybounds.top = _global.control.levelBounds.top;
mybounds.bottom = _global.control.levelBounds.bottom;
_x = mybounds.right;
hardmode = true;
}
Instance of Symbol 424 MovieClip in Symbol 425 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((_parent.player._x > (_x - 220)) and (_parent.player._y > (_y - 90))) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Symbol 432 MovieClip Frame 1
stop();
Symbol 439 MovieClip Frame 1
scoreDisp = "" + _global.score;
while (scoreDisp.length < 7) {
scoreDisp = "0" + scoreDisp;
}
Symbol 443 MovieClip Frame 1
_visible = false;
onEnterFrame = function () {
if (_global.paused and (!_global.cutscene)) {
_visible = true;
} else {
_visible = false;
}
};
Symbol 454 MovieClip Frame 1
_root.music.startSong("maxSong");
if (_global.lvl2Help) {
gotoAndStop ("end");
_global.cutscene = false;
} else {
_global.lvl2Help = true;
_global.paused = true;
_global.cutscene = true;
}
Symbol 454 MovieClip Frame 25
if (!_global.mutesound) {
trace("gogo");
mysound = new Sound(this);
mysound.attachSound("max2-1.mp3");
mysound.start();
}
stop();
Symbol 454 MovieClip Frame 26
mysound.stop();
Symbol 454 MovieClip Frame 37
if (!_global.mutesound) {
trace("gogo");
mysound = new Sound(this);
mysound.attachSound("max2-2.mp3");
mysound.start();
}
stop();
Symbol 454 MovieClip Frame 38
mysound.stop();
_root.music.startSong("levelSong");
_global.paused = false;
_global.cutscene = false;
stop();
Instance of Symbol 451 MovieClip in Symbol 455 MovieClip Frame 1
onClipEvent (load) {
timer = 10;
delay = 0;
bars = 3;
dp = 1000;
_visible = false;
}
onClipEvent (enterFrame) {
if (!_global.paused) {
if (_parent.switch1.val == "on") {
if (delay > 0) {
delay--;
} else if (timer > 0) {
timer--;
} else {
timer = 10;
dp++;
_parent.attachMovie("barrels", "bar" + dp, dp);
_parent["bar" + dp]._x = _x;
_parent["bar" + dp]._y = _y;
}
}
}
}
Instance of Symbol 454 MovieClip in Symbol 455 MovieClip Frame 1
onClipEvent (keyDown) {
if ((Key.getCode() == _global.keys.jump) or (Key.getCode() == _global.keys.grab)) {
if (_global.cutscene) {
play();
}
}
}
Instance of Symbol 420 MovieClip "bat2" in Symbol 455 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3000);
mybounds = new Object();
mybounds.left = _global.control.levelBounds.left;
mybounds.right = _parent.ladder2._x + 180;
mybounds.top = _global.control.levelBounds.top;
mybounds.bottom = _global.control.levelBounds.bottom;
hardmode = true;
}
Instance of Symbol 98 MovieClip [switch] "switch1" in Symbol 455 MovieClip Frame 1
onClipEvent (load) {
val = "on";
switchMe = function () {
if (val == "on") {
val = "off";
} else {
val = "on";
}
};
}
Symbol 525 MovieClip Frame 1
_root.music.startSong("maxSong");
if (_global.lvl3Help) {
_global.cutscene = false;
gotoAndStop ("end");
} else {
_parent.Al._visible = false;
_parent.molty._visible = false;
_global.lvl3Help = true;
_global.paused = true;
_global.cutscene = true;
}
Symbol 525 MovieClip Frame 25
if (!_global.mutesound) {
mysound = new Sound(this);
mysound.attachSound("max3-1.mp3");
mysound.start();
}
stop();
Symbol 525 MovieClip Frame 26
mysound.stop();
_parent.player.gotoAndStop(2);
Symbol 525 MovieClip Frame 37
if (!_global.mutesound) {
mysound = new Sound(this);
mysound.attachSound("max3-2.mp3");
mysound.start();
}
stop();
Symbol 525 MovieClip Frame 38
mysound.stop();
_parent.player.gotoAndStop(2);
Symbol 525 MovieClip Frame 49
if (!_global.mutesound) {
mysound = new Sound(this);
mysound.attachSound("max3-3.mp3");
mysound.start();
}
stop();
Symbol 525 MovieClip Frame 50
mysound.stop();
Symbol 525 MovieClip Frame 56
if (!_global.mutesound) {
mysound = new Sound(this);
mysound.attachSound("smash.wav");
mysound.start();
}
Symbol 525 MovieClip Frame 73
_root.music.startSong("bossSong");
if (!_global.mutesound) {
mysound = new Sound(this);
mysound.attachSound("thud.wav");
mysound.start();
}
Symbol 525 MovieClip Frame 95
if (!_global.mutesound) {
mysound = new Sound(this);
mysound.attachSound("al-scream.mp3");
mysound.start();
}
Symbol 525 MovieClip Frame 126
_root.music.maxvol = 20;
Symbol 525 MovieClip Frame 135
if (!_global.mutesound) {
mysound = new Sound(this);
mysound.attachSound("max3-4.mp3");
mysound.start();
}
stop();
Symbol 525 MovieClip Frame 136
mysound.stop();
Symbol 525 MovieClip Frame 147
if (!_global.mutesound) {
mysound = new Sound(this);
mysound.attachSound("max3-5.mp3");
mysound.start();
}
stop();
Symbol 525 MovieClip Frame 148
mysound.stop();
Symbol 525 MovieClip Frame 149
if (!_global.mutesound) {
mysound = new Sound(this);
mysound.attachSound("max-scream.mp3");
mysound.start();
}
Symbol 525 MovieClip Frame 159
if (!_global.mutesound) {
mysound = new Sound(this);
mysound.attachSound("al-grunt.mp3");
mysound.start();
}
Symbol 525 MovieClip Frame 164
_global.paused = false;
_global.cutscene = false;
_parent.Al._visible = true;
_parent.molty._visible = true;
Symbol 525 MovieClip Frame 183
_root.music.startSong("bossSong");
_global.paused = false;
_global.cutscene = false;
_parent.Al._visible = true;
_parent.molty._visible = true;
stop();
Symbol 527 MovieClip Frame 1
stop();
Symbol 527 MovieClip Frame 2
stop();
Symbol 528 MovieClip Frame 1
boxes = 0;
Instance of Symbol 173 MovieClip [platform_box_solid] in Symbol 528 MovieClip Frame 1
onClipEvent (load) {
xMove = -3;
}
Instance of Symbol 90 MovieClip [molty] "molty" in Symbol 528 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
bouncer = true;
dontFall = false;
respawn = 30;
canFlame = false;
xmove = 6;
ymove = -40;
bx = 240;
by = -700;
isBarrel = true;
}
Instance of Symbol 451 MovieClip in Symbol 528 MovieClip Frame 1
onClipEvent (load) {
timer = 30;
delay = 0;
bars = 3;
dp = 1000;
_visible = false;
}
onClipEvent (enterFrame) {
if (!_global.paused) {
if (delay > 0) {
delay--;
} else if (timer > 0) {
timer--;
} else {
bars--;
if (bars < 1) {
bars = 3;
delay = 80;
}
timer = 30;
if (_parent.boxes < 6) {
dp++;
_parent.attachMovie("box", "bar" + dp, dp);
_parent["bar" + dp]._x = _x;
_parent["bar" + dp]._y = _y;
_parent["bar" + dp].initMe();
_parent["bar" + dp].temporary = true;
_global.control.myChars["bar" + dp] = true;
}
}
}
}
Instance of Symbol 525 MovieClip in Symbol 528 MovieClip Frame 1
onClipEvent (keyDown) {
if ((Key.getCode() == _global.keys.jump) or (Key.getCode() == _global.keys.grab)) {
if (_global.cutscene) {
play();
}
}
}
Instance of Symbol 420 MovieClip "bat2" in Symbol 528 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3000);
hardmode = true;
mybounds = new Object();
for (i in _global.control.levelBounds) {
mybounds[i] = _global.control.levelBounds[i];
}
mybounds.right = mybounds.right - 200;
}
Symbol 540 MovieClip Frame 1
_root.music.startSong("maxSong");
if (_global.lvl4Help) {
_visible = false;
gotoAndStop ("end");
_global.cutscene = false;
} else {
_global.lvl4Help = true;
_global.paused = true;
_global.cutscene = true;
}
Symbol 540 MovieClip Frame 25
if (!_global.mutesound) {
mysound = new Sound(this);
mysound.attachSound("max4-1.mp3");
mysound.start();
}
stop();
Symbol 540 MovieClip Frame 26
mysound.stop();
Symbol 540 MovieClip Frame 37
if (!_global.mutesound) {
mysound = new Sound(this);
mysound.attachSound("max4-2.mp3");
mysound.start();
}
stop();
Symbol 540 MovieClip Frame 38
mysound.stop();
_root.music.startSong("levelSong");
_global.paused = false;
_global.cutscene = false;
gotoAndPlay (39);
Symbol 540 MovieClip Frame 44
if (_global.listener) {
_root.doMedal("Great Listener");
}
Symbol 540 MovieClip Frame 87
stop();
Instance of Symbol 540 MovieClip in Symbol 542 MovieClip Frame 1
onClipEvent (keyDown) {
if ((Key.getCode() == _global.keys.jump) or (Key.getCode() == _global.keys.grab)) {
if (_global.cutscene) {
play();
}
}
}
Instance of Symbol 90 MovieClip [molty] in Symbol 542 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
}
Instance of Symbol 420 MovieClip in Symbol 542 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3000);
}
Instance of Symbol 420 MovieClip in Symbol 542 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3000);
}
Instance of Symbol 420 MovieClip "bat2" in Symbol 542 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3000);
hardmode = true;
}
Instance of Symbol 420 MovieClip "bat2" in Symbol 542 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3000);
hardmode = true;
}
Instance of Symbol 420 MovieClip "bat2" in Symbol 547 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3000);
hardmode = true;
}
Instance of Symbol 420 MovieClip "bat2" in Symbol 547 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3000);
hardmode = true;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 547 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 547 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
baseFrame = 2;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 547 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 547 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 547 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
baseFrame = 2;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 547 MovieClip Frame 1
onClipEvent (load) {
canWalk = false;
canFlame = true;
flameDelay = 20;
baseFrame = 2;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 547 MovieClip Frame 1
onClipEvent (load) {
canWalk = false;
canFlame = true;
flameDelay = 20;
flameTimer = 80;
}
Symbol 553 MovieClip Frame 1
_visible = false;
Symbol 554 MovieClip Frame 23
gotoAndPlay (7);
Symbol 555 MovieClip Frame 9
_parent.makeBarrel();
if (!_global.mutesound) {
mysound = new Sound(this);
mysound.attachSound("al-grunt.mp3");
mysound.start();
}
Symbol 555 MovieClip Frame 10
_parent.moveBarrel();
Symbol 555 MovieClip Frame 15
gotoAndStop (1);
Symbol 555 MovieClip Frame 16
if (!_global.mutesound) {
mysound = new Sound(this);
mysound.attachSound("al-hurt.mp3");
mysound.start();
}
Symbol 555 MovieClip Frame 17
_parent.hp--;
if (_parent.hp < 1) {
gotoAndPlay ("fall");
}
Symbol 555 MovieClip Frame 47
_parent.moveing = true;
Symbol 555 MovieClip Frame 50
stop();
Symbol 555 MovieClip Frame 63
_parent._y = _parent._parent["plat" + _parent.hp]._y - _parent.myHeight;
trace((((_parent._parent["plat" + _parent.hp]._y + " ") + _parent.hp) + " ") + _parent.myHeight);
if (!_global.mutesound) {
mysound = new Sound(this);
mysound.attachSound("thud.wav");
mysound.start();
}
Symbol 555 MovieClip Frame 78
gotoAndStop (1);
Symbol 555 MovieClip Frame 79
if (!_global.mutesound) {
mysound = new Sound(this);
mysound.attachSound("al-scream.mp3");
mysound.start();
}
Symbol 555 MovieClip Frame 101
if (_parent._parent.player.mode != "walk") {
gotoAndPlay (100);
}
Symbol 555 MovieClip Frame 102
_parent._parent.player.Iwon();
if (_parent._parent.player._y < (_parent.plat1._y - 1)) {
_parent._parent.player._y = _parent.plat1._y - 1;
}
stop();
Symbol 556 MovieClip Frame 1
dir = 1;
stop();
Symbol 556 MovieClip Frame 2
dir = -1;
stop();
Instance of Symbol 176 MovieClip [platform_box_clipable] "lift4" in Symbol 557 MovieClip Frame 1
onClipEvent (load) {
speed = 2;
clip = "lift4clip";
}
Instance of Symbol 176 MovieClip [platform_box_clipable] "lift2" in Symbol 557 MovieClip Frame 1
onClipEvent (load) {
speed = 2;
clip = "lift2clip";
}
Instance of Symbol 176 MovieClip [platform_box_clipable] "lift3" in Symbol 557 MovieClip Frame 1
onClipEvent (load) {
speed = 2;
clip = "lift3clip";
}
Instance of Symbol 176 MovieClip [platform_box_clipable] "lift1" in Symbol 557 MovieClip Frame 1
onClipEvent (load) {
speed = 2;
clip = "lift1clip";
}
Instance of Symbol 176 MovieClip [platform_box_clipable] "lift6" in Symbol 557 MovieClip Frame 1
onClipEvent (load) {
speed = 2;
clip = "lift6clip";
}
Instance of Symbol 176 MovieClip [platform_box_clipable] "lift5" in Symbol 557 MovieClip Frame 1
onClipEvent (load) {
speed = 2;
clip = "lift5clip";
}
Instance of Symbol 556 MovieClip in Symbol 557 MovieClip Frame 1
onClipEvent (load) {
hp = 3;
myHeight = 72;
myWidth = 60;
speed = 16;
timer = 0;
delay = 0;
bars = 3;
dp = 1000;
checkItem = function (item, yoff) {
if (!yoff) {
yoff = 0;
}
if ((_parent[item]._x > (_x - myWidth)) and (_parent[item]._x < (_x + myWidth))) {
if ((_parent[item]._y > ((_y - yoff) - myHeight)) and ((_parent[item]._y - _parent[item].myHeight) < ((_y - yoff) + myHeight))) {
return(true);
}
}
return(false);
};
makeBarrel = function () {
dp++;
_parent.attachMovie("barrels", "bar" + dp, dp);
_parent["bar" + dp]._x = _x + (28 * dir);
_parent["bar" + dp]._y = _y + 36;
if (dir < 0) {
_parent["bar" + dp].baseFrame = 2;
}
};
moveBarrel = function () {
_parent["bar" + dp].xmove = 10 * dir;
_parent["bar" + dp].ymove = -4;
_parent["bar" + dp].mode = "fall";
};
}
onClipEvent (enterFrame) {
if (!_global.paused) {
if (moveing) {
_x = (_x + (speed * dir));
if (checkItem("player", 30)) {
_parent.player.killMe();
}
if ((dir > 0) and (_x > ((_global.control.levelBounds.right - myWidth) - speed))) {
_x = ((_global.control.levelBounds.right - myWidth) - speed);
moveing = false;
gotoAndStop (2);
sp.play();
} else if ((dir < 0) and (_x < ((_global.control.levelBounds.left + myWidth) + speed))) {
_x = ((_global.control.levelBounds.left + myWidth) + speed);
moveing = false;
gotoAndStop (1);
sp.play();
}
} else if (sp._currentframe <= 15) {
if (delay > 0) {
delay--;
} else if (timer > 0) {
timer--;
} else {
bars--;
if (bars < 1) {
bars = 3;
delay = 80;
}
timer = 40;
sp.play();
}
if (_parent.keg.mode == "fall") {
if (checkItem("keg")) {
sp.gotoAndPlay("hurt");
}
} else if (checkItem("player")) {
_parent.player.killMe();
}
}
}
}
Instance of Symbol 90 MovieClip [molty] in Symbol 557 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
jumpOff = true;
respawn = 30;
isBarrel = true;
by = -720;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 557 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
baseFrame = 2;
jumpOff = true;
respawn = 30;
isBarrel = true;
by = -720;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 557 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
jumpOff = true;
respawn = 30;
isBarrel = true;
by = -720;
}
Instance of Symbol 420 MovieClip "bat2" in Symbol 557 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3000);
hardmode = true;
}
Instance of Symbol 420 MovieClip "bat2" in Symbol 557 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3000);
hardmode = true;
}
Instance of Symbol 420 MovieClip "bat2" in Symbol 557 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3000);
hardmode = true;
}
Instance of Symbol 64 MovieClip [switch copy] "switch1" in Symbol 577 MovieClip Frame 1
onClipEvent (load) {
pf = "d";
gotoAndStop (2);
switchMe = function () {
if (_parent.fork.pause) {
_parent.fork.pause = false;
if (pf == "d") {
pf = "u";
} else {
pf = "d";
}
}
if (pf == "u") {
gotoAndStop (1);
} else {
gotoAndStop (2);
}
};
}
Instance of Symbol 59 MovieClip [skew_box_solid] "fork" in Symbol 577 MovieClip Frame 1
onClipEvent (load) {
speed = 2;
loop = true;
clip = "palette";
pause = true;
pauser = true;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 577 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = true;
}
Instance of Symbol 451 MovieClip in Symbol 577 MovieClip Frame 1
onClipEvent (load) {
timer = 20;
delay = 90;
bars = 3;
dp = 1000;
_visible = false;
}
onClipEvent (enterFrame) {
if (!_global.paused) {
if (delay > 0) {
delay--;
} else if (timer > 0) {
timer--;
} else {
bars--;
if (bars < 1) {
bars = 3;
delay = 90;
}
timer = 20;
dp++;
_parent.attachMovie("barrels", "bar" + dp, dp);
_parent["bar" + dp]._x = _x;
_parent["bar" + dp]._y = _y;
}
}
}
Instance of Symbol 90 MovieClip [molty] in Symbol 577 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = true;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 577 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
}
Instance of Symbol 420 MovieClip "bat2" in Symbol 577 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3000);
hardmode = true;
}
Instance of Symbol 420 MovieClip "bat2" in Symbol 577 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3000);
hardmode = true;
}
Symbol 585 MovieClip Frame 1
stop();
Symbol 590 MovieClip Frame 1
stop();
Instance of Symbol 98 MovieClip [switch] in Symbol 591 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (2);
switchMe = function () {
if (!_parent.lift.pause) {
_parent.lift.pause = true;
gotoAndStop (2);
} else {
_parent.lift.pause = false;
gotoAndStop (1);
}
};
}
Instance of Symbol 98 MovieClip [switch] in Symbol 591 MovieClip Frame 1
onClipEvent (load) {
switchMe = function () {
_parent.rounder.trackDir = _parent.rounder.trackDir * -1;
_parent.rounder.setNewNode();
_parent.rounder2.trackDir = _parent.rounder2.trackDir * -1;
_parent.rounder2.setNewNode();
};
}
Instance of Symbol 98 MovieClip [switch] in Symbol 591 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (2);
switchMe = function () {
trace("clack");
if (_parent.lid._x < 900) {
_parent.lid._x = _parent.lid_2._x;
_parent.tube2.gotoAndStop(2);
gotoAndStop (1);
trace("open?");
} else {
_parent.lid._x = _parent.lid_1._x;
_parent.tube2.gotoAndStop(1);
gotoAndStop (2);
trace(_parent.lid._x);
}
};
}
Instance of Symbol 420 MovieClip "bat2" in Symbol 591 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3000);
hardmode = true;
}
Instance of Symbol 420 MovieClip "bat2" in Symbol 591 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3000);
hardmode = true;
}
Instance of Symbol 588 MovieClip in Symbol 591 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((_parent.player._y > _y) and (_parent.player._y < (_y + 60))) {
if (((_parent.player._x + 20) > _x) and ((_parent.player._x - 20) < (_x + _width))) {
_parent.player.hitBottom();
}
}
}
Instance of Symbol 176 MovieClip [platform_box_clipable] "rounder" in Symbol 591 MovieClip Frame 1
onClipEvent (load) {
speed = 4;
loop = true;
clip = "rounderClip";
trackDir = 1;
}
Instance of Symbol 173 MovieClip [platform_box_solid] "lid" in Symbol 591 MovieClip Frame 1
onClipEvent (load) {
pause = true;
}
Instance of Symbol 176 MovieClip [platform_box_clipable] "lift" in Symbol 591 MovieClip Frame 1
onClipEvent (load) {
speed = 4;
loop = true;
clip = "liftClip";
trackDir = 1;
pause = true;
}
Instance of Symbol 176 MovieClip [platform_box_clipable] "rounder2" in Symbol 591 MovieClip Frame 1
onClipEvent (load) {
speed = 4;
loop = true;
clip = "rounderClip2";
trackDir = 1;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 591 MovieClip Frame 1
onClipEvent (load) {
canWalk = false;
canFlame = false;
canFlame = true;
flameDelay = 60;
flameTimer = 20;
isBarrel = true;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 591 MovieClip Frame 1
onClipEvent (load) {
canWalk = false;
canFlame = false;
canFlame = true;
flameDelay = 60;
flameTimer = 100;
isBarrel = true;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 591 MovieClip Frame 1
onClipEvent (load) {
canWalk = false;
canFlame = false;
canFlame = true;
flameDelay = 60;
flameTimer = 180;
isBarrel = true;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 591 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 591 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 591 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
bouncer = true;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 591 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
bouncer = true;
baseFrame = 2;
}
Symbol 598 MovieClip Frame 1
stop();
Symbol 599 MovieClip Frame 1
stop();
Symbol 599 MovieClip Frame 12
_parent.dropper.delay = 0;
_parent.dropper.timer = 0;
Symbol 599 MovieClip Frame 16
_parent.as2.gotoAndStop(2);
Symbol 599 MovieClip Frame 23
_parent.as2.gotoAndStop(1);
Symbol 599 MovieClip Frame 24
gotoAndStop (1);
Symbol 599 MovieClip Frame 25
hp--;
if (hp < 1) {
gotoAndPlay ("fall");
}
if (!_global.mutesound) {
mysound = new Sound(this);
mysound.attachSound("al-hurt.mp3");
mysound.start();
}
Symbol 599 MovieClip Frame 52
if (_parent.s1.val == "up") {
_parent.s1.switchMe();
}
if (_parent.s3.val == "up") {
_parent.s3.switchMe();
}
if (_parent.s2.val == "up") {
_parent.s2.switchMe();
}
_parent.as1.gotoAndStop(2);
Symbol 599 MovieClip Frame 60
_parent.as1.gotoAndStop(2);
gotoAndStop (1);
Symbol 599 MovieClip Frame 61
_parent.player.forcedUp = true;
if (!_global.mutesound) {
mysound = new Sound(this);
mysound.attachSound("al-scream.mp3");
mysound.start();
}
Symbol 599 MovieClip Frame 83
if (_parent.player.mode != "walk") {
gotoAndPlay (83);
}
Symbol 599 MovieClip Frame 84
_parent.player.Iwon();
stop();
Instance of Symbol 98 MovieClip [switch] "s1" in Symbol 602 MovieClip Frame 1
onClipEvent (load) {
item = "lift1";
gotoAndStop (2);
val = "down";
switchMe = function () {
if (_parent[item].pause) {
_parent[item].pause = false;
} else {
_parent[item].trackDir = _parent[item].trackDir * -1;
_parent[item].setNewNode();
}
if (val == "up") {
val = "down";
gotoAndStop (2);
} else {
val = "up";
gotoAndStop (1);
}
};
}
Instance of Symbol 98 MovieClip [switch] "s2" in Symbol 602 MovieClip Frame 1
onClipEvent (load) {
item = "big";
gotoAndStop (2);
val = "down";
switchMe = function () {
if (_parent[item].pause) {
_parent[item].pause = false;
} else {
_parent[item].trackDir = _parent[item].trackDir * -1;
_parent[item].setNewNode();
}
if (val == "up") {
val = "down";
gotoAndStop (2);
} else {
val = "up";
gotoAndStop (1);
}
};
}
Instance of Symbol 98 MovieClip [switch] "s3" in Symbol 602 MovieClip Frame 1
onClipEvent (load) {
item = "lift2";
gotoAndStop (2);
val = "down";
switchMe = function () {
if (_parent[item].pause) {
_parent[item].pause = false;
} else {
_parent[item].trackDir = _parent[item].trackDir * -1;
_parent[item].setNewNode();
}
if (val == "up") {
val = "down";
gotoAndStop (2);
} else {
val = "up";
gotoAndStop (1);
}
};
}
Instance of Symbol 599 MovieClip in Symbol 602 MovieClip Frame 1
onClipEvent (load) {
hp = 3;
wait = 180;
delay = wait;
myWidth = 60;
myHeight = 72;
checkItem = function (item, yoff) {
if (!yoff) {
yoff = 0;
}
if ((_parent[item]._x > (_x - myWidth)) and (_parent[item]._x < (_x + myWidth))) {
if ((_parent[item]._y > ((_y - yoff) - myHeight)) and ((_parent[item]._y - _parent[item].myHeight) < ((_y - yoff) + myHeight))) {
return(true);
}
}
return(false);
};
}
onClipEvent (enterFrame) {
if (!_global.paused) {
if (_currentframe < 25) {
delay--;
if (delay < 1) {
delay = wait;
play();
}
if (_parent.abox.mode == "fall") {
if (checkItem("abox")) {
gotoAndPlay ("hurt");
_parent.abox.mode = "nofall";
_parent.abox.play();
}
}
if (checkItem("player")) {
_parent.player.killMe();
}
}
}
}
Instance of Symbol 420 MovieClip "bat2" in Symbol 602 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3000);
hardmode = true;
}
Instance of Symbol 420 MovieClip "bat2" in Symbol 602 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3000);
hardmode = true;
}
Instance of Symbol 173 MovieClip [platform_box_solid] "big" in Symbol 602 MovieClip Frame 1
onClipEvent (load) {
speed = 4;
clip = "bigDoor";
pauser = true;
pause = true;
}
Instance of Symbol 176 MovieClip [platform_box_clipable] "lift1" in Symbol 602 MovieClip Frame 1
onClipEvent (load) {
speed = 5;
clip = "piston1";
pauser = true;
pause = true;
}
Instance of Symbol 176 MovieClip [platform_box_clipable] "lift2" in Symbol 602 MovieClip Frame 1
onClipEvent (load) {
speed = 5;
clip = "piston2";
pauser = true;
pause = true;
}
Instance of Symbol 451 MovieClip "dropper" in Symbol 602 MovieClip Frame 1
onClipEvent (load) {
timer = 0;
delay = 90;
bars = 3;
dp = 1000;
_visible = false;
}
onClipEvent (enterFrame) {
if (delay > 0) {
} else if (timer > 0) {
timer--;
} else {
bars--;
if (bars < 1) {
bars = 3;
delay = 90;
}
timer = 30;
dp++;
_parent.attachMovie("barrels", "bar" + dp, dp);
_parent["bar" + dp]._x = _x;
_parent["bar" + dp]._y = _y;
_parent["bar" + dp].baseFrame = 2;
}
}
Instance of Symbol 90 MovieClip [molty] in Symbol 602 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 602 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
baseFrame = 2;
}
Instance of Symbol 420 MovieClip "bat2" in Symbol 609 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3000);
hardmode = true;
}
Instance of Symbol 420 MovieClip "bat2" in Symbol 609 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3000);
hardmode = true;
}
Instance of Symbol 176 MovieClip [platform_box_clipable] "doore" in Symbol 609 MovieClip Frame 1
onClipEvent (load) {
speed = 4;
loop = true;
clip = "de";
trackDir = 1;
pause = true;
pauser = true;
}
Instance of Symbol 176 MovieClip [platform_box_clipable] "doorb" in Symbol 609 MovieClip Frame 1
onClipEvent (load) {
speed = 4;
loop = true;
clip = "db";
trackDir = 1;
pause = true;
pauser = true;
}
Instance of Symbol 176 MovieClip [platform_box_clipable] "lift" in Symbol 609 MovieClip Frame 1
onClipEvent (load) {
speed = 4;
loop = true;
clip = "liftClip";
trackDir = 1;
}
Instance of Symbol 176 MovieClip [platform_box_clipable] "doorc" in Symbol 609 MovieClip Frame 1
onClipEvent (load) {
speed = 4;
loop = true;
clip = "dc";
trackDir = 1;
pause = true;
pauser = true;
}
Instance of Symbol 176 MovieClip [platform_box_clipable] "doora" in Symbol 609 MovieClip Frame 1
onClipEvent (load) {
speed = 4;
loop = true;
clip = "da";
trackDir = 1;
pause = true;
pauser = true;
}
Instance of Symbol 176 MovieClip [platform_box_clipable] "doord" in Symbol 609 MovieClip Frame 1
onClipEvent (load) {
speed = 4;
loop = true;
clip = "dd";
trackDir = 1;
pause = true;
pauser = true;
}
Instance of Symbol 176 MovieClip [platform_box_clipable] "lifta" in Symbol 609 MovieClip Frame 1
onClipEvent (load) {
speed = 4;
loop = true;
clip = "liftClipa";
trackDir = 1;
}
Instance of Symbol 54 MovieClip [floor_button] in Symbol 609 MovieClip Frame 1
onClipEvent (load) {
item = "doora";
}
Instance of Symbol 54 MovieClip [floor_button] in Symbol 609 MovieClip Frame 1
onClipEvent (load) {
item = "doorb";
}
Instance of Symbol 54 MovieClip [floor_button] in Symbol 609 MovieClip Frame 1
onClipEvent (load) {
item = "doorc";
}
Instance of Symbol 54 MovieClip [floor_button] in Symbol 609 MovieClip Frame 1
onClipEvent (load) {
item = "doord";
}
Instance of Symbol 54 MovieClip [floor_button] in Symbol 609 MovieClip Frame 1
onClipEvent (load) {
item = "doore";
}
Instance of Symbol 90 MovieClip [molty] in Symbol 609 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
jumpOff = true;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 609 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
jumpOff = true;
baseFrame = 2;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 609 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
jumpOff = true;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 609 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
jumpOff = true;
baseFrame = 2;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 609 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
jumpOff = false;
isBarrel = true;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 609 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = true;
jumpOff = false;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 609 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = true;
jumpOff = false;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 609 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
jumpOff = true;
bouncer = true;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 609 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
jumpOff = false;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 609 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 609 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
jumpOff = false;
isBarrel = true;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 609 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
jumpOff = false;
isBarrel = true;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 609 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
jumpOff = false;
isBarrel = true;
}
Symbol 622 MovieClip Frame 1
onEnterFrame = function () {
if (_currentframe == 1) {
if ((_parent.player._y > (_y - 200)) and ((_parent.player._y - _parent.player.myHeight) < _y)) {
if (Math.abs(_parent.player._x - _x) <= _parent.player.myWidth) {
_parent.player.killMe();
}
}
}
};
stop();
Symbol 657 MovieClip Frame 1
stop();
Symbol 657 MovieClip Frame 15
stop();
Instance of Symbol 98 MovieClip [switch] in Symbol 659 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (2);
switchMe = function () {
_parent.rounder.pause = false;
gotoAndStop (1);
};
}
Instance of Symbol 90 MovieClip [molty] in Symbol 659 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
baseFrame = 2;
respawn = 30;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 659 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
jumpOff = true;
bouncer = true;
respawn = 50;
isBarrel = true;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 659 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
jumpOff = true;
bouncer = true;
respawn = 50;
isBarrel = true;
}
Instance of Symbol 420 MovieClip "bat2" in Symbol 659 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3000);
hardmode = true;
}
Instance of Symbol 420 MovieClip "bat2" in Symbol 659 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3000);
hardmode = true;
}
Instance of Symbol 420 MovieClip "bat2" in Symbol 659 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3000);
hardmode = true;
}
Instance of Symbol 176 MovieClip [platform_box_clipable] "rounder" in Symbol 659 MovieClip Frame 1
onClipEvent (load) {
speed = 4;
loop = false;
clip = "rounderClip";
pause = true;
}
Instance of Symbol 173 MovieClip [platform_box_solid] in Symbol 659 MovieClip Frame 1
onClipEvent (load) {
xMove = -1.75;
}
Instance of Symbol 173 MovieClip [platform_box_solid] in Symbol 659 MovieClip Frame 1
onClipEvent (load) {
xMove = -1.75;
}
Instance of Symbol 59 MovieClip [skew_box_solid] in Symbol 659 MovieClip Frame 1
onClipEvent (load) {
xMove = -1.5;
}
Instance of Symbol 451 MovieClip in Symbol 659 MovieClip Frame 1
onClipEvent (load) {
timer = 0;
delay = 0;
bars = 3;
dp = 1000;
_visible = false;
_parent.boxes = 0;
}
onClipEvent (enterFrame) {
if (!_global.paused) {
if (delay > 0) {
delay--;
} else if (timer > 0) {
timer--;
} else {
bars--;
if (bars < 1) {
bars = 4;
}
timer = 90;
if (bars == 4) {
if (!_parent.key) {
dp++;
_parent.attachMovie("key", "key", dp);
_parent.key._x = _x;
_parent.key._y = _y;
_parent.key.initMe();
_parent.key.temporary = true;
_global.control.myChars.key = true;
}
} else if (_parent.boxes < 6) {
dp++;
_parent.attachMovie("box", "bar" + dp, dp);
_parent["bar" + dp]._x = _x;
_parent["bar" + dp]._y = _y;
_parent["bar" + dp].initMe();
_parent["bar" + dp].temporary = true;
_global.control.myChars["bar" + dp] = true;
}
}
}
}
Instance of Symbol 657 MovieClip in Symbol 659 MovieClip Frame 1
onClipEvent (load) {
mode = "on";
}
onClipEvent (enterFrame) {
if (mode == "on") {
for (i in _global.control.myChars) {
if (_parent[i].isObject) {
if (_parent[i].mode == "fall") {
if (_parent[i].xmove < 0) {
if (((_parent[i]._x - (_parent[i].myWidth / 2)) < (_x + 24)) and ((_parent[i]._x + (_parent[i].myWidth / 2)) > _x)) {
if ((_parent[i]._y > (_y - 18)) and ((_parent[i]._y - _parent[i].myHeight) < (_y + 38))) {
play();
_parent.st1.gotoAndStop(2);
mode = "off";
}
}
}
}
}
}
}
}
Instance of Symbol 657 MovieClip in Symbol 659 MovieClip Frame 1
onClipEvent (load) {
mode = "on";
}
onClipEvent (enterFrame) {
if (mode == "on") {
for (i in _global.control.myChars) {
if (_parent[i].isObject) {
if (_parent[i].mode == "fall") {
if (_parent[i].xmove > 0) {
if (((_parent[i]._x - (_parent[i].myWidth / 2)) < _x) and ((_parent[i]._x + (_parent[i].myWidth / 2)) > (_x - 24))) {
if ((_parent[i]._y > (_y - 18)) and ((_parent[i]._y - _parent[i].myHeight) < (_y + 38))) {
mode = "off";
_parent.st2.gotoAndStop(2);
play();
}
}
}
}
}
}
}
}
Instance of Symbol 173 MovieClip [platform_box_solid] "AlPlatform" in Symbol 666 MovieClip Frame 1
onClipEvent (load) {
speed = 4;
loop = true;
clip = "AlPlatformPlat";
}
Instance of Symbol 98 MovieClip [switch] "s1" in Symbol 666 MovieClip Frame 1
onClipEvent (load) {
stat = 1;
_parent.boxes = 0;
val = "off";
switchMe = function () {
if ((val == "off") and (_parent.boxes < 6)) {
val = "on";
_parent.s2.val = "off";
_parent.s2.gotoAndStop(1);
dropBox();
}
gotoAndStop (2);
};
dropBox = function () {
if (_parent.boxes < 6) {
dp++;
_parent.attachMovie("box", "bar" + dp, dp);
_parent["bar" + dp]._x = _x + 100;
_parent["bar" + dp]._y = _y - 200;
_parent["bar" + dp].initMe();
_parent["bar" + dp].temporary = true;
_global.control.myChars["bar" + dp] = true;
}
};
}
Instance of Symbol 98 MovieClip [switch] "s2" in Symbol 666 MovieClip Frame 1
onClipEvent (load) {
stat = 1;
_parent.boxes = 0;
val = "off";
switchMe = function () {
if ((val == "off") and (_parent.boxes < 6)) {
val = "on";
_parent.s1.val = "off";
_parent.s1.gotoAndStop(1);
dropBox();
}
gotoAndStop (2);
};
dropBox = function () {
if (_parent.boxes < 6) {
dp++;
_parent.attachMovie("box", "bar" + dp, dp);
_parent["bar" + dp]._x = _x - 100;
_parent["bar" + dp]._y = _y - 200;
_parent["bar" + dp].initMe();
_parent["bar" + dp].temporary = true;
_global.control.myChars["bar" + dp] = true;
}
};
}
Instance of Symbol 420 MovieClip "bat2" in Symbol 666 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3000);
hardmode = true;
}
Instance of Symbol 420 MovieClip "bat2" in Symbol 666 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3000);
hardmode = true;
}
Instance of Symbol 420 MovieClip "bat2" in Symbol 666 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3000);
hardmode = true;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 666 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 666 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 666 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
jumpOff = true;
canFlame = false;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 666 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
jumpOff = true;
baseFrame = 2;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 666 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 666 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 666 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
jumpOff = true;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 666 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
jumpOff = true;
baseFrame = 2;
}
Symbol 673 MovieClip Frame 1
stop();
Symbol 673 MovieClip Frame 6
stop();
Instance of Symbol 98 MovieClip [switch] in Symbol 687 MovieClip Frame 1
onClipEvent (load) {
used = false;
switchMe = function () {
if (!used) {
_parent.liftb.pause = false;
_parent.lifta.pause = false;
used = true;
}
gotoAndStop (2);
};
}
Instance of Symbol 173 MovieClip [platform_box_solid] "lid1b" in Symbol 687 MovieClip Frame 1
onClipEvent (load) {
pause = true;
pauser = true;
speed = 200;
onContact = function (sp) {
if (((sp == "player") and (_parent.player.mode == "walk")) and (!_parent.vat1.closed)) {
_parent.vat1.closeMe();
}
};
}
Instance of Symbol 173 MovieClip [platform_box_solid] "lid1a" in Symbol 687 MovieClip Frame 1
onClipEvent (load) {
pause = true;
pauser = true;
speed = 200;
onContact = function (sp) {
if (((sp == "player") and (_parent.player.mode == "walk")) and (!_parent.vat1.closed)) {
_parent.vat1.closeMe();
}
};
}
Instance of Symbol 173 MovieClip [platform_box_solid] "lid2b" in Symbol 687 MovieClip Frame 1
onClipEvent (load) {
pause = true;
pauser = true;
speed = 200;
onContact = function (sp) {
if (((sp == "player") and (_parent.player.mode == "walk")) and (!_parent.vat2.closed)) {
_parent.vat2.closeMe();
}
};
}
Instance of Symbol 173 MovieClip [platform_box_solid] "lid2a" in Symbol 687 MovieClip Frame 1
onClipEvent (load) {
pause = true;
pauser = true;
speed = 200;
onContact = function (sp) {
if (((sp == "player") and (_parent.player.mode == "walk")) and (!_parent.vat2.closed)) {
_parent.vat2.closeMe();
}
};
}
Instance of Symbol 176 MovieClip [platform_box_clipable] "lifta" in Symbol 687 MovieClip Frame 1
onClipEvent (load) {
speed = 8;
loop = false;
clip = "liftaC";
pause = true;
pauser = true;
}
Instance of Symbol 176 MovieClip [platform_box_clipable] "liftb" in Symbol 687 MovieClip Frame 1
onClipEvent (load) {
speed = 8;
loop = false;
clip = "liftbC";
pause = true;
pauser = true;
}
Instance of Symbol 684 MovieClip "acid" in Symbol 687 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((_parent.player._y > _y) and (_parent.player._y < (_y + 60))) {
if (((_parent.player._x + 20) > _x) and ((_parent.player._x - 20) < (_x + _width))) {
_parent.player.hitBottom();
}
}
}
Instance of Symbol 90 MovieClip [molty] in Symbol 687 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
}
Instance of Symbol 686 MovieClip "vat1" in Symbol 687 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(2000);
closeMe = function () {
_parent.lid1.play();
_parent.lid1a.pause = false;
_parent.lid1b.pause = false;
closed = true;
_parent.acid._visible = false;
_parent.attachMovie("molty", "molt1", 1001);
_parent.molt1._x = -69;
_parent.molt1._y = -1223;
_parent.molt1.ymove = 0;
_parent.molt1.xmove = 0;
_parent.molt1.mode = "fall";
_parent.molt1.canWalk = true;
_parent.molt1.canFlame = false;
_parent.molt1.jumpOff = true;
_parent.molt1.isBarrel = true;
_global.control.myCars.molt1 = true;
_parent.molt1.baseGrid();
};
}
onClipEvent (enterFrame) {
hideme = false;
if (!closed) {
if (_parent.player._y > (_y - 440)) {
if (Math.abs(_parent.player._x - _x) < 180) {
hideme = true;
}
}
}
if (hideme) {
if (_alpha > 20) {
_alpha = (_alpha - 5);
}
} else if (_alpha < 100) {
_alpha = (_alpha + 5);
}
}
Instance of Symbol 686 MovieClip "vat2" in Symbol 687 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(2001);
closeMe = function () {
_parent.lid2.play();
_parent.lid2a.pause = false;
_parent.lid2b.pause = false;
closed = true;
_parent.attachMovie("molty", "molt2", 1002);
_parent.molt2._x = 455;
_parent.molt2._y = -1223;
_parent.molt2.ymove = 0;
_parent.molt2.xmove = 0;
_parent.molt2.mode = "fall";
_parent.molt2.canWalk = true;
_parent.molt2.canFlame = false;
_parent.molt2.jumpOff = true;
_parent.molt2.isBarrel = true;
_global.control.myCars.molt2 = true;
_parent.molt2.baseGrid();
_parent.attachMovie("molty", "molt3", 1003);
_parent.molt3._x = 691;
_parent.molt3._y = -1223;
_parent.molt3.baseFrame = 2;
_parent.molt3.ymove = 0;
_parent.molt3.xmove = 0;
_parent.molt3.mode = "fall";
_parent.molt3.canWalk = true;
_parent.molt3.canFlame = false;
_parent.molt3.jumpOff = true;
_parent.molt3.isBarrel = true;
_global.control.myCars.molt3 = true;
_parent.molt3.baseGrid();
};
}
onClipEvent (enterFrame) {
hideme = false;
if (!closed) {
if (_parent.player._y > (_y - 440)) {
if (Math.abs(_parent.player._x - _x) < 180) {
hideme = true;
}
}
}
if (hideme) {
if (_alpha > 20) {
_alpha = (_alpha - 5);
}
} else if (_alpha < 100) {
_alpha = (_alpha + 5);
}
}
Instance of Symbol 420 MovieClip in Symbol 687 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3000);
}
Instance of Symbol 420 MovieClip in Symbol 687 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3001);
}
Instance of Symbol 420 MovieClip "bat2" in Symbol 687 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3000);
hardmode = true;
}
Instance of Symbol 420 MovieClip "bat2" in Symbol 687 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3000);
hardmode = true;
}
Instance of Symbol 420 MovieClip "bat2" in Symbol 687 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3000);
hardmode = true;
}
Instance of Symbol 98 MovieClip [switch] in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
used = false;
switchMe = function () {
if (!used) {
_parent.ext1.pause = false;
used = true;
}
gotoAndStop (2);
};
}
Instance of Symbol 98 MovieClip [switch] in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
used = false;
switchMe = function () {
if (!used) {
_parent.ext2.pause = false;
used = true;
}
gotoAndStop (2);
};
}
Instance of Symbol 98 MovieClip [switch] in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
used = false;
switchMe = function () {
if (!used) {
_parent.ext3.pause = false;
used = true;
}
gotoAndStop (2);
};
}
Instance of Symbol 98 MovieClip [switch] in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
used = false;
switchMe = function () {
if (!used) {
_parent.ext4.pause = false;
used = true;
}
gotoAndStop (2);
};
}
Instance of Symbol 106 MovieClip [skew_box_clipable] "ext1" in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
speed = 8;
loop = false;
clip = "lip1";
pause = true;
pauser = true;
}
Instance of Symbol 176 MovieClip [platform_box_clipable] in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
speed = 8;
loop = false;
clip = "liftaC";
pause = true;
pauser = true;
}
Instance of Symbol 176 MovieClip [platform_box_clipable] in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
speed = 8;
loop = false;
clip = "liftaC";
pause = true;
pauser = true;
}
Instance of Symbol 106 MovieClip [skew_box_clipable] "ext2" in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
speed = 8;
loop = false;
clip = "lip2";
pause = true;
pauser = true;
}
Instance of Symbol 106 MovieClip [skew_box_clipable] "ext3" in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
speed = 8;
loop = false;
clip = "lip3";
pause = true;
pauser = true;
}
Instance of Symbol 176 MovieClip [platform_box_clipable] in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
speed = 8;
loop = false;
clip = "liftaC";
pause = true;
pauser = true;
}
Instance of Symbol 176 MovieClip [platform_box_clipable] in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
speed = 8;
loop = false;
clip = "liftaC";
pause = true;
pauser = true;
}
Instance of Symbol 106 MovieClip [skew_box_clipable] "ext4" in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
speed = 8;
loop = false;
clip = "lip4";
pause = true;
pauser = true;
}
Instance of Symbol 176 MovieClip [platform_box_clipable] in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
speed = 8;
loop = false;
clip = "liftaC";
pause = true;
pauser = true;
}
Instance of Symbol 176 MovieClip [platform_box_clipable] in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
speed = 8;
loop = false;
clip = "liftaC";
pause = true;
pauser = true;
}
Instance of Symbol 176 MovieClip [platform_box_clipable] in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
speed = 8;
loop = false;
clip = "liftaC";
pause = true;
pauser = true;
}
Instance of Symbol 27 MovieClip [slope_box_clipable] in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
speed = 8;
loop = false;
clip = "liftaC";
pause = true;
pauser = true;
}
Instance of Symbol 27 MovieClip [slope_box_clipable] in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
speed = 8;
loop = false;
clip = "liftaC";
pause = true;
pauser = true;
}
Instance of Symbol 27 MovieClip [slope_box_clipable] in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
speed = 8;
loop = false;
clip = "liftaC";
pause = true;
pauser = true;
}
Instance of Symbol 27 MovieClip [slope_box_clipable] in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
speed = 8;
loop = false;
clip = "liftaC";
pause = true;
pauser = true;
}
Instance of Symbol 27 MovieClip [slope_box_clipable] in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
speed = 8;
loop = false;
clip = "liftaC";
pause = true;
pauser = true;
}
Instance of Symbol 27 MovieClip [slope_box_clipable] in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
speed = 8;
loop = false;
clip = "liftaC";
pause = true;
pauser = true;
}
Instance of Symbol 420 MovieClip in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3001);
}
Instance of Symbol 420 MovieClip in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3001);
}
Instance of Symbol 420 MovieClip in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3001);
}
Instance of Symbol 420 MovieClip in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3001);
}
Instance of Symbol 451 MovieClip "ic" in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
timer = 20;
delay = 90;
bars = 3;
dp = 1000;
_visible = false;
}
onClipEvent (enterFrame) {
if (!_global.paused) {
if (delay > 0) {
delay--;
} else if (timer > 0) {
timer--;
} else {
bars--;
if (bars < 1) {
bars = 3;
delay = 90;
}
timer = 20;
dp++;
_parent.attachMovie("barrels", "bar" + dp, dp);
_parent["bar" + dp]._x = _x;
_parent["bar" + dp]._y = _y;
}
}
}
Instance of Symbol 90 MovieClip [molty] in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
baseFrame = 2;
jumpOff = true;
respawn = 3;
isBarrel = true;
by = _parent.ic._y;
bx = _parent.ic._x;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
baseFrame = 2;
jumpOff = true;
respawn = 3;
isBarrel = true;
by = _parent.ic._y;
bx = _parent.ic._x;
}
Instance of Symbol 420 MovieClip "bat2" in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3000);
hardmode = true;
}
Instance of Symbol 420 MovieClip "bat2" in Symbol 697 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3000);
hardmode = true;
}
Symbol 709 MovieClip Frame 1
stop();
Symbol 710 MovieClip Frame 1
hurt = false;
stop();
Symbol 710 MovieClip Frame 2
hp--;
if (hp < 1) {
gotoAndPlay (20);
} else if (!_global.mutesound) {
mysound = new Sound(this);
mysound.attachSound("bbhit.wav");
mysound.start();
}
Symbol 710 MovieClip Frame 19
gotoAndStop (1);
Symbol 710 MovieClip Frame 20
hp = 3;
if (!_global.mutesound) {
mysound = new Sound(this);
mysound.attachSound("BOOM.wav");
mysound.start();
}
Symbol 710 MovieClip Frame 24
if (!_global.mutesound) {
mysound = new Sound(this);
mysound.attachSound("riff");
mysound.start();
}
Symbol 710 MovieClip Frame 45
hurt = false;
stop();
Instance of Symbol 708 MovieClip in Symbol 710 MovieClip Frame 45
onClipEvent (enterFrame) {
l._rotation = (4 * _parent._parent.larm1.xmove) + 180;
l._xscale = 100 + (2 * _parent._parent.larm1.ymove);
l._yscale = l._xscale;
r._rotation = 4 * _parent._parent.rarm1.xmove;
r._xscale = 100 + (2 * _parent._parent.rarm1.ymove);
r._yscale = r._xscale;
}
Symbol 710 MovieClip Frame 46
if (!_global.mutesound) {
mysound = new Sound(this);
mysound.attachSound("al-hurt.mp3");
mysound.start();
}
Symbol 710 MovieClip Frame 70
hp--;
if (hp < 1) {
} else {
gotoAndStop (45);
}
Symbol 710 MovieClip Frame 71
if (!_global.mutesound) {
mysound = new Sound(this);
mysound.attachSound("al-scream.mp3");
mysound.start();
}
Symbol 710 MovieClip Frame 100
_global.nextLevel();
stop();
Symbol 745 MovieClip Frame 1
function setme(clip) {
clip.slam = 0;
this.getdir(clip);
clip.basex = clip._x;
clip.basey = clip._y;
this[clip.clip + "f"].basex = this[clip.clip + "f"]._x;
this[clip.clip + "f"].basey = this[clip.clip + "f"]._y;
this[clip.clip + "w"].basex = this[clip.clip + "w"]._x;
this[clip.clip + "w"].basey = this[clip.clip + "w"]._y;
this[clip.clip + "m"].basex = this[clip.clip + "m"]._x;
this[clip.clip + "m"].basey = this[clip.clip + "m"]._y;
}
function getdir(clip) {
clip.delay = random(30) + 15;
clip.xmove = random(7) - 3;
clip.ymove = random(7) - 3;
}
function moveme(clip) {
wd = 154;
if (clip.slam == 1) {
clip.delay--;
if (clip.delay < 1) {
clip.slam = 2;
}
} else if (clip.slam == 2) {
clip.ymove = 20;
cslip.xmove = 0;
clip._y = clip._y + clip.ymove;
moveclip(clip);
if ((clip._y + 26) >= handfloor._y) {
clip.ymove = -4;
clip.delay = 30 + random(20);
clip.slam = 0;
}
} else {
moveclip(clip);
clip._x = clip._x + clip.xmove;
if ((clip._x > this[clip.clip + "_2"]._x) and (clip.xmove > 0)) {
clip.xmove = clip.xmove * -1;
} else if ((clip._x < this[clip.clip + "_1"]._x) and (clip.xmove < 0)) {
clip.xmove = clip.xmove * -1;
}
clip._y = clip._y + clip.ymove;
if ((clip._y > (this[clip.clip + "_1"]._y + 90)) and (clip.ymove > 0)) {
clip.ymove = clip.ymove * -1;
} else if ((clip._y < this[clip.clip + "_1"]._y) and (clip.ymove < 0)) {
clip.ymove = clip.ymove * -1;
}
clip.delay--;
if (clip.delay < 1) {
this.getdir(clip);
if ((player._y <= handfloor._y) and ((player._y + 20) > lhand_2._y)) {
if ((player._x > clip._x) and (player._x < (clip._x + lhand_2._width))) {
clip.delay = 30;
clip.slam = 1;
}
}
}
}
}
function moveclip(clip) {
xmv = clip._x - clip.basex;
ymv = clip._y - clip.basey;
this[clip.clip + "w"]._x = this[clip.clip + "w"].basex + (xmv * 0.9);
this[clip.clip + "w"]._y = this[clip.clip + "w"].basey + (ymv * 0.9);
this[clip.clip + "f"]._x = this[clip.clip + "f"].basex + (xmv * 0.75);
this[clip.clip + "f"]._y = this[clip.clip + "f"].basey + (ymv * 0.75);
this[clip.clip + "m"]._x = this[clip.clip + "m"].basex + (xmv * 0.5);
this[clip.clip + "m"]._y = this[clip.clip + "m"].basey + (ymv * 0.5);
if (player.onPlat == clip.clip) {
player._x = player._x + clip.xmove;
player._y = player._y + clip.ymove;
} else if (((player._y - player.baseHeight) < (clip._y + 38)) and (player._y > clip._y)) {
if (((player._x + (player.myWidth / 2)) > (clip._x + clip.off)) and ((player._x - (player.myWidth / 2)) < ((clip._x + clip.off) + 154))) {
player.killMe();
}
}
this[clip.clip]._x = clip._x;
this[clip.clip]._y = clip._y - 27;
checkObjects(clip);
}
function checkObjects(clip) {
if (clip.skip) {
clip.skip = false;
} else {
clip.skip = true;
for (var _local4 in _global.control.myChars) {
if (this[_local4].isObject and (_local4 != "key")) {
if (this[_local4]._y <= handfloor._y) {
if (((this[_local4]._y - this[_local4].myHeight) < (clip._y + 42)) and (this[_local4]._y > (clip._y - 30))) {
if (((this[_local4]._x + (this[_local4].myWidth / 2)) > (clip._x + clip.off)) and ((this[_local4]._x - (this[_local4].myWidth / 2)) < ((clip._x + clip.off) + 154))) {
this[_local4].mode = "nofall";
this[_local4].play();
if (_local4 == player.holding) {
player.holding = undefined;
}
}
}
}
}
}
}
}
boxes = 0;
Instance of Symbol 710 MovieClip in Symbol 745 MovieClip Frame 1
onClipEvent (load) {
hp = 3;
}
onClipEvent (enterFrame) {
trace(_parent.boxes);
if (!hurt) {
for (var i in _global.control.myChars) {
if (_parent[i].isObject and (i != "key")) {
if (_parent[i].mode == "fall") {
if (Math.abs(_parent[i]._x - _x) < 100) {
if (Math.abs(_parent[i]._y - _y) < 100) {
_parent[i].mode = "nofall";
_parent[i].play();
hurt = true;
play();
}
}
}
}
}
}
}
Instance of Symbol 98 MovieClip [switch] "s1" in Symbol 745 MovieClip Frame 1
onClipEvent (load) {
item = "lift1";
gotoAndStop (2);
_parent[item].val = "down";
switchMe = function () {
if (_parent[item].pause) {
_parent[item].pause = false;
} else {
_parent[item].trackDir = _parent[item].trackDir * -1;
_parent[item].setNewNode();
}
if (_parent[item].val == "up") {
_parent[item].val = "down";
gotoAndStop (2);
} else {
_parent[item].val = "up";
gotoAndStop (1);
}
};
}
Instance of Symbol 98 MovieClip [switch] "s2" in Symbol 745 MovieClip Frame 1
onClipEvent (load) {
item = "lift2";
gotoAndStop (2);
_parent[item].val = "down";
switchMe = function () {
if (_parent[item].pause) {
_parent[item].pause = false;
} else {
_parent[item].trackDir = _parent[item].trackDir * -1;
_parent[item].setNewNode();
}
if (_parent[item].val == "up") {
_parent[item].val = "down";
gotoAndStop (2);
} else {
_parent[item].val = "up";
gotoAndStop (1);
}
};
}
Instance of Symbol 173 MovieClip [platform_box_solid] in Symbol 745 MovieClip Frame 1
onClipEvent (load) {
xMove = 1.75;
}
Instance of Symbol 173 MovieClip [platform_box_solid] in Symbol 745 MovieClip Frame 1
onClipEvent (load) {
xMove = -1.75;
}
Instance of Symbol 451 MovieClip in Symbol 745 MovieClip Frame 1
onClipEvent (load) {
timer = 0;
delay = 0;
bars = 3;
_parent.dp = 1000;
_visible = false;
_parent.boxes = 0;
}
onClipEvent (enterFrame) {
if (!_global.paused) {
if (delay > 0) {
delay--;
} else if (timer > 0) {
timer--;
} else {
bars--;
if (bars < 1) {
bars = 4;
}
timer = 90;
if (_parent.boxes < 9) {
_parent.dp++;
_parent.attachMovie("box", "bar" + _parent.dp, _parent.dp);
_parent["bar" + _parent.dp]._x = _x;
_parent["bar" + _parent.dp]._y = _y;
_parent["bar" + _parent.dp].initMe();
_parent["bar" + _parent.dp].temporary = true;
_global.control.myChars["bar" + _parent.dp] = true;
}
}
}
}
Instance of Symbol 451 MovieClip in Symbol 745 MovieClip Frame 1
onClipEvent (load) {
timer = 0;
delay = 0;
bars = 3;
_parent.dp = 1000;
_visible = false;
_parent.boxes = 0;
}
onClipEvent (enterFrame) {
if (!_global.paused) {
if (delay > 0) {
delay--;
} else if (timer > 0) {
timer--;
} else {
bars--;
if (bars < 1) {
bars = 4;
}
timer = 90;
if (_parent.boxes < 9) {
_parent.dp++;
_parent.attachMovie("box", "bar" + _parent.dp, _parent.dp);
_parent["bar" + _parent.dp]._x = _x;
_parent["bar" + _parent.dp]._y = _y;
_parent["bar" + _parent.dp].initMe();
_parent["bar" + _parent.dp].temporary = true;
_global.control.myChars["bar" + _parent.dp] = true;
}
}
}
}
Instance of Symbol 176 MovieClip [platform_box_clipable] "lift1" in Symbol 745 MovieClip Frame 1
onClipEvent (load) {
speed = 5;
clip = "piston1";
pauser = true;
pause = true;
}
Instance of Symbol 176 MovieClip [platform_box_clipable] "lhand" in Symbol 745 MovieClip Frame 1
onClipEvent (load) {
pause = true;
speed = 10;
}
Instance of Symbol 176 MovieClip [platform_box_clipable] "rhand" in Symbol 745 MovieClip Frame 1
onClipEvent (load) {
pause = true;
}
Instance of Symbol 176 MovieClip [platform_box_clipable] "lift2" in Symbol 745 MovieClip Frame 1
onClipEvent (load) {
speed = 5;
clip = "piston2";
pauser = true;
pause = true;
}
Instance of Symbol 742 MovieClip "larm1" in Symbol 745 MovieClip Frame 1
onClipEvent (load) {
clip = "lhand";
off = 0;
_parent.setme(this);
}
onClipEvent (enterFrame) {
_parent.moveme(this);
}
Instance of Symbol 744 MovieClip "rarm1" in Symbol 745 MovieClip Frame 1
onClipEvent (load) {
clip = "rhand";
off = -50;
_parent.setme(this);
skip = true;
}
onClipEvent (enterFrame) {
_parent.moveme(this);
}
Instance of Symbol 420 MovieClip "bat2" in Symbol 745 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3000);
hardmode = true;
}
Instance of Symbol 420 MovieClip "bat2" in Symbol 745 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3000);
hardmode = true;
}
Instance of Symbol 420 MovieClip "bat2" in Symbol 745 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(3000);
hardmode = true;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 745 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
jumpOff = true;
bouncer = false;
respawn = 50;
isBarrel = true;
onEdge = function () {
};
}
Instance of Symbol 90 MovieClip [molty] in Symbol 745 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
canFlame = false;
bouncer = false;
respawn = 50;
isBarrel = true;
baseBrame = 2;
jumpOff = true;
onEdge = function () {
};
}
Symbol 752 MovieClip Frame 1
function checkPlayer() {
if (Math.abs(_parent.player._x - _x) < ((myWidth + _parent.player.myWidth) / 2)) {
if ((_parent.player._y > (_y - myHeight)) and ((_parent.player._y - _parent.player.baseHeight) < _y)) {
_parent.player.killMe();
speed = 0;
}
}
}
function respawn() {
bnds = _global.control.levelBounds;
if (Math.abs(_parent.player._x - bnds.left) > Math.abs(_parent.player._x - bnds.right)) {
_x = (bnds.left - myWidth);
trace("LEFT");
} else {
_x = (bnds.right + myWidth);
trace("RIGHT");
}
if (Math.abs(_parent.player._y - bnds.top) > Math.abs(_parent.player._y - bnds.bottom)) {
_y = (bnds.top - myHeight);
trace("TOP");
} else {
_y = (bnds.bottom + myHeight);
trace("BOTTOM");
}
mode = "fly";
gotoAndPlay (1);
}
function checkObjects() {
if (!skip) {
objects = new Object();
for (var _local3 in _global.control.myChars) {
if (_parent[_local3].isObject) {
objects[_local3] = true;
trace("found " + _local3);
}
}
skip = 3;
} else {
skip--;
}
for (var _local3 in objects) {
if (_parent[_local3].mode == "fall") {
if ((_parent[_local3]._y > (_y - myHeight)) and ((_parent[_local3]._y - _parent[_local3].myHeight) < _y)) {
if (Math.abs(_x - _parent[_local3]._x) < ((myWidth + _parent[_local3].myWidth) / 2)) {
mode = "stunned";
gotoAndStop (30);
stun = 300;
if (_parent[_local3].xmove > 0) {
xmove = 3;
} else {
xmove = -3;
}
ymove = -10;
}
}
}
}
}
if (!speed) {
bx = _x;
by = _y;
myWidth = 18;
myHeight = 20;
speed = 2;
mode = "fly";
}
onEnterFrame = function () {
if (!_global.paused) {
if (mode != "stunned") {
xdist = _x - _parent.player._x;
ydist = _y - _parent.player._y;
dst = Math.sqrt(Math.pow(ydist, 2) + Math.pow(xdist, 2));
mod = speed / dst;
_x = (_x - (xdist * mod));
_y = (_y - (ydist * mod));
checkPlayer();
checkObjects();
} else if (stun < 1) {
respawn();
} else {
stun--;
_x = (_x + xmove);
_y = (_y + ymove);
ymove++;
}
}
};
Symbol 752 MovieClip Frame 25
gotoAndPlay (1);
Instance of Symbol 451 MovieClip in Symbol 753 MovieClip Frame 1
onClipEvent (load) {
timer = 10;
delay = 0;
bars = 3;
dp = 1000;
_visible = false;
}
onClipEvent (enterFrame) {
if (delay > 0) {
delay--;
} else if (timer > 0) {
timer--;
} else {
bars--;
if (bars < 1) {
bars = 3;
delay = 60;
}
timer = 20;
dp++;
trace(_parent);
_parent.attachMovie("barrels", "bar" + dp, dp);
_parent["bar" + dp]._x = _x;
_parent["bar" + dp]._y = _y;
trace("BARREL " + dp);
}
}
Instance of Symbol 176 MovieClip [platform_box_clipable] "penis" in Symbol 753 MovieClip Frame 1
onClipEvent (load) {
speed = 2;
loop = true;
clip = "penisPlat";
}
Instance of Symbol 176 MovieClip [platform_box_clipable] "lift" in Symbol 753 MovieClip Frame 1
onClipEvent (load) {
speed = 4;
loop = true;
clip = "liftPlat";
}
Instance of Symbol 90 MovieClip [molty] in Symbol 753 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
}
Instance of Symbol 90 MovieClip [molty] in Symbol 753 MovieClip Frame 1
onClipEvent (load) {
canWalk = true;
}
Symbol 803 MovieClip Frame 11
stop();
Symbol 804 MovieClip Frame 1
_root.music.stopSong();
function startMe() {
clearInterval(starting);
gotoAndStop(_global.level + 1);
}
_global.timeLimit = 300;
info = "Level " + _global.level;
if (_global.level > 1) {
info = info + (("\rCode: " + _global.prefix[_global.level][_global.setting]) + _global.codes[_global.level]);
}
_global.levBottles = 0;
stop();
_global.nextLevel = function () {
_global.level++;
gotoAndStop ("summary");
};
_global.ImDead = function () {
_global.myLife = _global.life;
_global.lives--;
if (_global.lives < 1) {
_root.gotoAndStop("gameover");
} else {
gotoAndStop (1);
}
};
_global.level_perfect = true;
Instance of Symbol 145 MovieClip "ani" in Symbol 804 MovieClip Frame 1
onClipEvent (keyDown) {
kc = Key.getCode();
if ((kc == _global.keys.jump) or (kc == _global.keys.grab)) {
_parent.startMe();
}
}
Symbol 804 MovieClip Frame 2
_global.control = new Game.Platformer.levelController(levelMask);
stop();
Instance of Symbol 432 MovieClip "hearts" in Symbol 804 MovieClip Frame 2
onClipEvent (load) {
if (_global.myLife < 0) {
_global.myLife = 0;
}
gotoAndStop(_global.myLife + 1);
}
Symbol 804 MovieClip Frame 3
_global.control = new Game.Platformer.levelController(levelMask);
stop();
Symbol 804 MovieClip Frame 4
_global.control = new Game.Platformer.levelController(levelMask);
stop();
Symbol 804 MovieClip Frame 5
_global.control = new Game.Platformer.levelController(levelMask);
stop();
Symbol 804 MovieClip Frame 6
_global.control = new Game.Platformer.levelController(levelMask);
_root.music.startSong("levelSong");
stop();
Symbol 804 MovieClip Frame 7
_global.control = new Game.Platformer.levelController(levelMask);
_root.music.startSong("bossSong");
stop();
Symbol 804 MovieClip Frame 8
_global.control = new Game.Platformer.levelController(levelMask);
_root.music.startSong("levelSong");
stop();
Symbol 804 MovieClip Frame 9
_global.control = new Game.Platformer.levelController(levelMask);
_root.music.startSong("levelSong");
stop();
Symbol 804 MovieClip Frame 10
_global.control = new Game.Platformer.levelController(levelMask);
_root.music.startSong("bossSong");
stop();
Symbol 804 MovieClip Frame 11
_global.control = new Game.Platformer.levelController(levelMask);
_root.music.startSong("levelSong");
stop();
Symbol 804 MovieClip Frame 12
_global.control = new Game.Platformer.levelController(levelMask);
_root.music.startSong("levelSong");
stop();
Symbol 804 MovieClip Frame 13
_global.control = new Game.Platformer.levelController(levelMask);
_root.music.startSong("bossSong");
stop();
Symbol 804 MovieClip Frame 14
_global.control = new Game.Platformer.levelController(levelMask);
_root.music.startSong("levelSong");
stop();
Symbol 804 MovieClip Frame 15
_global.control = new Game.Platformer.levelController(levelMask);
_root.music.startSong("levelSong");
stop();
Symbol 804 MovieClip Frame 16
_global.control = new Game.Platformer.levelController(levelMask);
_root.music.startSong("bossSong");
stop();
Symbol 804 MovieClip Frame 17
_global.control = new Game.Platformer.levelController(levelMask);
stop();
Symbol 804 MovieClip Frame 18
_root.gotoAndStop("youwin");
Symbol 804 MovieClip Frame 25
function loop() {
if (Key.isDown(keys.jump) or Key.isDown(keys.grab)) {
if (!kdown) {
kdown = true;
delay = 0;
base = bonus;
if (phase < 4) {
snd.stop();
if (!_global.mutesound) {
snd = new Sound(this);
snd.attachSound("dloop");
snd.start();
}
}
}
} else {
kdown = false;
}
if (delay > 0) {
delay--;
} else if (base < bonus) {
base = base + 15;
if (!_global.mutesound) {
snd.stop();
snd = new Sound(this);
snd.attachSound("bling");
snd.start();
}
if (base > bonus) {
base = bonus;
}
if (base >= bonus) {
delay = 10;
}
} else {
trace((("base == " + bonus) + " phase== ") + phase);
if (phase == 0) {
trace("health");
labels = "Health Bonus:";
results = (_global.myLife + " x ") + thebon;
bonus = bonus + (_global.myLife * thebon);
phase++;
} else if (phase == 1) {
trace("time");
labels = labels + "\rTime Bonus:";
results = results + ((newline + _global.timeLeft) + " x 5");
bonus = bonus + (_global.timeLeft * 5);
phase++;
} else if (phase == 2) {
trace("bottles");
labels = labels + "\rBottle Bonus:";
results = results + ((newline + _global.levBottles) + " x 200");
bonus = bonus + (Number(_global.levBottles) * 200);
phase++;
} else if (phase == 3) {
delay = 60;
phase++;
} else if (phase == 4) {
clearInterval(runme);
if (level_perfect) {
switch (level - 1) {
case 3 :
_root.doMedal("Great Defender");
break;
case 6 :
_root.doMedal("Vertigo");
break;
case 9 :
_root.doMedal("Switch Off");
break;
case 12 :
_root.doMedal("Boxed Up");
break;
case 15 :
_root.doMedal("Beerbot Smash");
}
}
if (level < 16) {
gotoAndStop (1);
} else {
_root.gotoAndStop("youwin");
}
}
trace(bonus);
}
}
_root.music.stopSong();
_root.music.music = new Sound();
_root.music.music.attachSound("riff");
_root.music.music.start();
phase = 0;
delay = 15;
bonus = 0;
base = 0;
labels = "";
results = "";
kdown = false;
if (_global.setting == 2) {
thebon = 100;
} else if (_global.setting == 1) {
thebon = 200;
} else {
thebon = 800;
}
_global.score = _global.score + (_global.myLife * thebon);
_global.score = _global.score + (Number(_global.levBottles) * 200);
_global.score = _global.score + (_global.timeLeft * 5);
_global.totalBottles = _global.totalBottles + Number(_global.levBottles);
_root.kongregateStats.submit("Bottles Collected", _global.totalBottles);
_root.kongregateScores.submit(_global.score);
runme = setInterval(this, "loop", 33);
Symbol 815 Button
on (release) {
if (username.text.length > 0) {
o = new Object();
o.bottles = _global.totalBottles;
myScore.submit(username.text, _global.score, o);
nextFrame();
}
}
Symbol 823 MovieClip Frame 1
_global.myScore = new saveScore("Alkie_Kong_2", "rg5534gebvc5tyvc45tc4gc45t", "");
stop();
Symbol 824 Button
on (release) {
_root.gotoAndStop(2);
}
Symbol 825 Button
on (release) {
_root.doMedal("Worship the Mighty");
getURL (scoreURL, "_blank");
}
Symbol 833 Button
on (release) {
_root.gotoAndStop("gameover");
}
Symbol 840 MovieClip Frame 172
_parent.updateCredit();
Symbol 841 MovieClip Frame 2
if (_global.batlover) {
_root.doMedal("Bat Crazy");
}
Symbol 841 MovieClip Frame 17
if (_global.perfect) {
switch (_global.setting) {
case 0 :
_root.doMedal("Drunken Deity");
break;
case 1 :
_root.doMedal("Olympian");
break;
case 2 :
_root.doMedal("Survivalist");
}
}
Symbol 841 MovieClip Frame 137
if (!_global.mutesound) {
snd = new Sound(this);
snd.attachSound("zelda");
snd.start();
}
Instance of Symbol 396 MovieClip "max" in Symbol 841 MovieClip Frame 185
onClipEvent (keyDown) {
if ((Key.getCode() == keys.jump) or (Key.getCode() == keys.grab)) {
_parent.play();
}
}
Symbol 841 MovieClip Frame 212
if (!_global.mutesound) {
snd = new Sound(this);
snd.attachSound("win-1.mp3");
snd.start();
}
stop();
Symbol 841 MovieClip Frame 213
snd.stop();
Symbol 841 MovieClip Frame 224
if (!_global.mutesound) {
snd = new Sound(this);
snd.attachSound("win-2.mp3");
snd.start();
}
stop();
Symbol 841 MovieClip Frame 225
snd.stop();
Symbol 841 MovieClip Frame 226
if (!_global.mutemusic) {
song = new Sound();
song.attachSound("rickrolled");
song.start();
}
Instance of Symbol 837 MovieClip in Symbol 841 MovieClip Frame 226
onClipEvent (load) {
gotoAndPlay (5);
}
Symbol 841 MovieClip Frame 289
function updateCredit() {
if (credits.length > 0) {
txt = credits.shift();
} else {
txt = "";
play();
}
fader.text.val = txt;
}
credits = new Array();
credits.push("Story: Josh Tuttle");
credits.push("Concept: The Dr0kn Crew");
credits.push("Gameplay Design: Josh Tuttle");
credits.push("Level Design: Josh Tuttle");
credits.push("Art/Animation: Josh Tuttle");
credits.push("Play Testing: The Dr0kn Crew");
credits.push("-Musical Credits-");
credits.push("Elevator Music: Khuskan");
credits.push("Escalated Rage: MaestroSorrow");
credits.push("This Way: Southwest-Statistic");
credits.push("-hahahaha-");
credits.push("You played this long");
credits.push("JUST TO GET RICK ROLLED");
credits.push("But we still love you");
credits.push("Thanks for playing! <3 <3 <3");
updateCredit();
stop();
Symbol 841 MovieClip Frame 348
_root.music.fadeSong();
Symbol 841 MovieClip Frame 388
_root.doMedal("Rick Rolled");
_root.gotoAndStop("gameover");