Frame 129
stop();
loadervars = new LoadVars();
loadervars.load("../../loadsize.txt");
loadervars.onLoad = function () {
play();
};
Frame 130
stop();
var loadmcwidth = loadervars.loadmcwidth;
var loadmcheight = loadervars.loadmcheight;
if (_root.getBytesLoaded() >= _root.getBytesTotal()) {
play();
} else {
_root.createEmptyMovieClip("loadmc", 1);
_root.loadmc.loadMovie("../../preloader.swf");
_root.loadmc._x = (Stage.width / 2) - (loadmcwidth / 2);
_root.loadmc._y = (Stage.height / 2) - (loadmcheight / 2);
}
Frame 155
stop();
showtime = 60;
points = 0;
exit = "yes";
showcoins = "no";
moveLayer.hero.gotoAndStop(1);
levelcomplete._visible = false;
var onground = false;
jumpsetup = false;
countdown = function () {
currtime = getTimer() / 1000;
minustime = Math.floor(currtime - starttime);
timeleft = Math.floor(limittime - minustime);
showtime = timeleft;
if (_root.timeleft <= 0) {
_root.gotoAndStop("lose");
}
};
moveme = function () {
var _local1 = this;
if (_local1.x == undefined) {
_local1.startx = (_local1.x = _local1._x);
_local1.starty = (_local1.y = _local1._y);
}
_local1.dy = _local1.dy + 0.5;
var nexty = Math.ceil(_local1.y + _local1.dy);
var nextx = (_local1.x + _local1.dx);
onground = false;
if (_local1.dy >= 0) {
if (moveLayer.platforms.hitTest(_local1.x + moveLayer._x, nexty + moveLayer._y, true) && (!jumpsetup)) {
onground = true;
jumping = false;
var _local3 = 0;
var _local2 = Math.floor(nexty);
while (moveLayer.platforms.hitTest(_local1.x + moveLayer._x, _local2 + moveLayer._y, true)) {
_local3++;
_local2 = _local2 - 2;
}
if (_local3 < 10) {
_local1.y = _local2;
_local1.dy = 0;
} else {
_local1.x = _local1.x - _local1.dx;
_local1.dx = 0;
}
} else if ((_local1.dy > 5) && (!shooting)) {
_local1.gotoAndStop(3);
_local1.mc.gotoAndStop(11);
}
} else if (_local1.dy < 0) {
if (moveLayer.platforms.hitTest(_local1.x + moveLayer._x, (nexty + moveLayer._y) - 40, true)) {
_local1.dy = 1;
}
}
if (moveLayer.exit.hitTest(_local1.x + moveLayer._x, (_local1.y + moveLayer._y) - 40, true)) {
_root.gotoAndStop("win");
}
if (_local1.dy > 9) {
_local1.dy = 9;
}
if (!jumpsetup) {
_local1.x = _local1.x + _local1.dx;
_local1.y = _local1.y + _local1.dy;
}
if (Key.isDown(39) && (!shooting)) {
if (jumping) {
_local1.dx = _local1.dx + 0.4;
} else {
_local1.dx = _local1.dx + 1;
}
_local1._xscale = 80;
} else if (Key.isDown(37) && (!shooting)) {
if (jumping) {
_local1.dx = _local1.dx - 0.4;
} else {
_local1.dx = _local1.dx - 1;
}
_local1._xscale = -80;
} else {
_local1.dx = _local1.dx * 0.7;
}
if (_local1.dx > 7) {
_local1.dx = 7;
}
if (_local1.dx < -7) {
_local1.dx = -7;
}
if ((((!jumpsetup) && (!jumping)) && (!shooting)) && (onground)) {
if (Math.abs(_local1.dx) < 0.5) {
_local1.dx = 0;
_local1.gotoAndStop(1);
} else {
_local1.gotoAndStop(2);
}
}
if (((Key.isDown(38) && (_local1.dy >= 0)) && (_local1.dy < 1)) && (!jumping)) {
onground = false;
shooting = false;
jumping = true;
jumpsetup = true;
_local1.gotoAndStop(3);
}
lasty = _local1._y;
moveLayer._x = Math.round(160 - _local1.x);
moveLayer._y = Math.round(150 - _local1.y);
if (moveLayer._y < -1268) {
moveLayer._y = -1268;
}
bg._x = (moveLayer._x / 2) - 160;
bg._y = (moveLayer._y / 2) - 120;
if (Key.isDown(32) && (!shooting)) {
shooting = true;
jumping = false;
jumpsetup = false;
_local1.gotoAndStop(4);
}
if (_local1.y > 1580) {
_local1.x = _local1.startx;
_local1.y = _local1.starty;
_root.gotoAndStop("lose");
}
_local1._x = Math.floor(_local1.x);
_local1._y = Math.floor(_local1.y);
};
moveBullet = function () {
var _local1 = this;
_local1._x = _local1._x + _local1.dx;
if ((_local1._x < (moveLayer.hero._x - 170)) || (_local1._x > (moveLayer.hero._x + 170))) {
_local1.removeMovieClip();
}
};
createBullet = function () {
var _local1 = moveLayer.hero._xscale / 80;
nm = "bul0";
moveLayer.attachMovie("bullet", nm, 100);
moveLayer[nm]._x = moveLayer.hero._x + (35 * _local1);
moveLayer[nm]._y = moveLayer.hero._y - 25;
moveLayer[nm]._xscale = _local1 * 100;
moveLayer[nm].dx = 20 * _local1;
moveLayer[nm].onEnterFrame = moveBullet;
};
moveSplat = function () {
var _local1 = this;
_local1._x = _local1._x + _local1.dx;
if ((_local1._x < (moveLayer.hero._x - 300)) || (_local1._x > (moveLayer.hero._x + 300))) {
_local1.removeMovieClip();
}
if (_local1.hitTest(moveLayer.hero)) {
moveLayer.hero.dx = _local1.dx * 5;
moveLayer.hero.dy = -2;
_local1.removeMovieClip();
}
};
numsplats = 0;
createSplat = function () {
var _local2 = this;
var _local1 = _local2._xscale / 80;
nm = "splat" add numsplats;
moveLayer.attachMovie("splatBullet", nm, numsplats + 200);
moveLayer[nm]._x = _local2._x + (35 * _local1);
moveLayer[nm]._y = _local2._y - 25;
moveLayer[nm]._xscale = _local1 * 100;
moveLayer[nm].dx = 10 * _local1;
moveLayer[nm].onEnterFrame = moveSplat;
numsplats++;
numsplats = numsplats % 20;
};
simpleMove = function () {
var _local1 = this;
if (_local1.x == undefined) {
_local1.x = _local1._x;
_local1.y = _local1._y;
}
_local1.x = _local1.x + _local1.dx;
_local1.y = _local1.y + _local1.dy;
if (_local1.x < _local1.x1) {
_local1.x = _local1.x1;
_local1.dx = _local1.dx * -1;
} else if (_local1.x > _local1.x2) {
_local1.x = _local1.x2;
_local1.dx = _local1.dx * -1;
}
if (_local1.dx > 0) {
_local1._xscale = 80;
} else if (_local1.dx < 0) {
_local1._xscale = -80;
}
_local1._x = Math.floor(_local1.x);
_local1._y = Math.floor(_local1.y);
if (_local1.hitTest(moveLayer.hero)) {
moveLayer.hero.dx = _local1.dx * 5;
moveLayer.hero.dy = -2;
}
if (_local1.hitTest(moveLayer.bul0)) {
_local1.gotoAndStop(2);
_root.points++;
_local1.onEnterFrame = null;
}
if (random(100) == 0) {
_local1.gotoAndStop(3);
}
};
coinfunc = function () {
var _local1 = this;
if (_root.showcoins == "yes") {
_local1.gotoAndStop(1);
}
if (_local1.hitTest(moveLayer.hero)) {
_local1.gotoAndStop(2);
_root.points++;
}
};
intro.playButton.onRelease = function () {
var _local1 = _root;
intro._visible = false;
trace(_local1.showcoins);
_local1.showcoins = "no";
starttime = getTimer() / 1000;
limittime = 60;
points = 0;
_local1.exit = "yes";
moveLayer.onEnterFrame = countdown;
moveLayer.hero.onEnterFrame = moveme;
};
intro.instructButton.onRelease = function () {
_root.gotoAndStop("instructions");
};
intro.playButton.onRollOver = function () {
this.gotoAndPlay("open");
};
intro.playButton.onRollOut = function () {
this.gotoAndPlay("close");
};
intro.instructButton.onRollOver = function () {
this.gotoAndPlay("open");
};
intro.instructButton.onRollOut = function () {
this.gotoAndPlay("close");
};
Frame 156
stop();
Frame 157
stop();
Frame 158
stop();
Symbol 43 MovieClip Frame 9
stop();
Symbol 60 MovieClip Frame 1
stop();
Symbol 60 MovieClip Frame 5
stop();
Symbol 62 MovieClip Frame 1
stop();
Symbol 62 MovieClip Frame 5
stop();
Symbol 73 MovieClip Frame 1
stop();
trace("oops");
Symbol 73 MovieClip Frame 10
stop();
_root.exit = "no";
_root.levelcomplete._visible = true;
_root.moveLayer.hero._visible = false;
delete _root.moveLayer.onEnterFrame;
this._visible = false;
Symbol 90 MovieClip Frame 28
stop();
Symbol 92 MovieClip Frame 8
_parent.createSplat();
Symbol 92 MovieClip Frame 15
_parent.gotoAndStop(1);
Symbol 93 MovieClip Frame 1
this.onEnterFrame = _root.simpleMove;
this.createSplat = _root.createSplat;
stop();
Symbol 104 MovieClip Frame 1
this.onEnterFrame = _root.coinfunc;
stop();
Symbol 124 MovieClip Frame 9
stop();
Symbol 143 MovieClip Frame 8
_root.jumpsetup = false;
_parent.dy = -9;
Symbol 143 MovieClip Frame 10
stop();
Symbol 152 MovieClip Frame 7
_root.createBullet();
Symbol 152 MovieClip Frame 15
_root.shooting = false;
_parent.gotoAndStop(1);
Instance of Symbol 93 MovieClip "m1" in Symbol 154 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
x1 = -240;
x2 = 60;
dx = 2;
}
Instance of Symbol 93 MovieClip in Symbol 154 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
x1 = -640;
x2 = -514;
dx = -2;
}
Instance of Symbol 93 MovieClip in Symbol 154 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
x1 = -155;
x2 = -56;
dx = -2;
}
Instance of Symbol 93 MovieClip in Symbol 154 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
x1 = -84;
x2 = 120;
dx = -2;
}
Instance of Symbol 93 MovieClip in Symbol 154 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
x1 = 85;
x2 = 176;
dx = -2;
}
Instance of Symbol 93 MovieClip in Symbol 154 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
x1 = 85;
x2 = 176;
dx = -2;
}
Instance of Symbol 93 MovieClip in Symbol 154 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
x1 = -595;
x2 = -480;
dx = -2;
}
Instance of Symbol 93 MovieClip in Symbol 154 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
x1 = -85;
x2 = -5;
dx = -2;
}
Instance of Symbol 93 MovieClip in Symbol 154 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
x1 = 430;
x2 = 650;
dx = 3;
}
Instance of Symbol 93 MovieClip in Symbol 154 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
x1 = 430;
x2 = 650;
dx = 3;
}
Instance of Symbol 93 MovieClip in Symbol 154 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
x1 = 85;
x2 = 170;
dx = -2;
}
Instance of Symbol 93 MovieClip in Symbol 154 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
x1 = 360;
x2 = 610;
dx = -2;
}
Instance of Symbol 93 MovieClip in Symbol 154 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
x1 = 550;
x2 = 750;
dx = -2;
}
Symbol 158 Button
on (release) {
_root.gotoAndStop("main");
levelcomplete._visible = false;
moveLayer.hero.x = moveLayer.hero.startx;
moveLayer.hero.y = moveLayer.hero.starty;
moveLayer.hero._visible = true;
_root.showcoins = "yes";
}
Symbol 166 Button
on (release, keyPress "<Enter>") {
if (playname != "") {
entryname = playname;
theScore = _root.points * _root.showtime;
gameid = "14";
loadVariables ("/games/savescores.php", this, "POST");
this.submitspit = ((("Thank you " + playname) + " your submitted score was ") + theScore) + " points";
trace(theScore);
trace(entryname);
}
}
Symbol 171 Button
on (release) {
getURL ("/games/viewscores.php?gameid=14", "_blank");
}
Symbol 172 MovieClip Frame 1
playname = "";
submitspit = "";
Symbol 173 Button
on (release) {
_root.gotoAndStop("main");
levelcomplete._visible = false;
moveLayer.hero.x = moveLayer.hero.startx;
moveLayer.hero.y = moveLayer.hero.starty;
moveLayer.hero._visible = true;
_root.showcoins = "yes";
}
Instance of Symbol 60 MovieClip in Symbol 181 MovieClip Frame 1
on (release) {
_root.gotoAndStop("main");
levelcomplete._visible = false;
moveLayer.hero.x = moveLayer.hero.startx;
moveLayer.hero.y = moveLayer.hero.starty;
moveLayer.hero._visible = true;
_root.showcoins = "yes";
}
on (rollOver) {
this.gotoAndPlay("open");
}
on (rollOut) {
this.gotoAndPlay("close");
}