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";
float_sonic = false;
double_jump = false;
invinsible = false;
double_coins = false;
transparent = false;
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);
}
if (float_sonic) {
_local1.dy = _local1.dy + 0;
} else if (double_jump) {
_local1.dy = _local1.dy + 0.25;
} else {
_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)) {
if (!transparent) {
_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 (!invinsible) {
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 (!invinsible) {
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;
var _local2 = _root;
if (_local2.showcoins == "yes") {
_local1.gotoAndStop(1);
}
if (_local1.hitTest(moveLayer.hero)) {
_local1.gotoAndStop(2);
if (double_coins) {
_local2.points = _local2.points + 2;
} else {
_local2.points++;
}
}
};
intro.playButton.onRelease = function () {
var _local1 = _root;
intro._visible = false;
cheatMC.gotoAndStop(2);
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 52 MovieClip Frame 1
stop();
trace("oops");
Symbol 52 MovieClip Frame 10
stop();
_root.exit = "no";
_root.levelcomplete._visible = true;
_root.moveLayer.hero._visible = false;
delete _root.moveLayer.onEnterFrame;
this._visible = false;
Symbol 69 MovieClip Frame 28
stop();
Symbol 71 MovieClip Frame 8
_parent.createSplat();
Symbol 71 MovieClip Frame 15
_parent.gotoAndStop(1);
Symbol 72 MovieClip Frame 1
this.onEnterFrame = _root.simpleMove;
this.createSplat = _root.createSplat;
stop();
Symbol 83 MovieClip Frame 1
this.onEnterFrame = _root.coinfunc;
stop();
Symbol 105 MovieClip Frame 8
_root.jumpsetup = false;
_parent.dy = -9;
Symbol 105 MovieClip Frame 10
stop();
Symbol 114 MovieClip Frame 7
_root.createBullet();
Symbol 114 MovieClip Frame 15
_root.shooting = false;
_parent.gotoAndStop(1);
Instance of Symbol 72 MovieClip "m1" in Symbol 116 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
x1 = 653;
x2 = 793;
dx = 2;
}
Instance of Symbol 72 MovieClip in Symbol 116 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
x1 = 409;
x2 = 531;
dx = -2;
}
Instance of Symbol 72 MovieClip in Symbol 116 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
x1 = 332;
x2 = 442;
dx = -2;
}
Instance of Symbol 72 MovieClip in Symbol 116 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
x1 = 126;
x2 = 413;
dx = -2;
}
Instance of Symbol 72 MovieClip in Symbol 116 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
x1 = 126;
x2 = 413;
dx = -2;
}
Instance of Symbol 72 MovieClip in Symbol 116 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
x1 = 523;
x2 = 627;
dx = -2;
}
Instance of Symbol 72 MovieClip in Symbol 116 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
x1 = 80;
x2 = 280;
dx = -2;
}
Instance of Symbol 72 MovieClip in Symbol 116 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
x1 = 347;
x2 = 457;
dx = -2;
}
Instance of Symbol 72 MovieClip in Symbol 116 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
x1 = 607;
x2 = 797;
dx = 3;
}
Instance of Symbol 72 MovieClip in Symbol 116 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
x1 = 607;
x2 = 797;
dx = 3;
}
Instance of Symbol 72 MovieClip in Symbol 116 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
x1 = 70;
x2 = 120;
dx = -2;
}
Instance of Symbol 72 MovieClip in Symbol 116 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
x1 = 700;
x2 = 770;
dx = -2;
}
Instance of Symbol 72 MovieClip in Symbol 116 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
x1 = 690;
x2 = 840;
dx = -2;
}
Symbol 131 MovieClip Frame 1
stop();
Symbol 131 MovieClip Frame 5
stop();
Symbol 133 MovieClip Frame 1
stop();
Symbol 133 MovieClip Frame 5
stop();
Symbol 144 Button
on (release, keyPress "<Enter>") {
trace(inputCheat.text);
if (inputCheat.text == "doublejump") {
_root.double_jump = true;
}
if (inputCheat.text == "float") {
_root.float_sonic = true;
}
if (inputCheat.text == "bulletproof") {
_root.invinsible = true;
}
if (inputCheat.text == "doublecoins") {
_root.double_coins = true;
}
if (inputCheat.text == "noplatforms") {
_root.transparent = true;
}
inputCheat.text = "";
}
Symbol 149 MovieClip Frame 1
stop();
Symbol 149 MovieClip Frame 2
stop();
displaycheats = [];
if (_root.double_jump) {
trace("could be working");
displaycheats.push("Double Jump ");
}
if (_root.float_sonic) {
trace("could be working");
displaycheats.push("Floating ");
}
if (_root.invinsible) {
displaycheats.push("Invinsible");
}
if (_root.double_coins) {
displaycheats.push("Double Coins");
}
if (_root.transparent) {
displaycheats.push("No Platforms");
}
if (displaycheats[0] == undefined) {
activatedCheats = "None";
} else {
activatedCheats = displaycheats;
}
Symbol 153 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 157 Button
on (release, keyPress "<Enter>") {
if (playname != "") {
entryname = playname;
theScore = _root.points * _root.showtime;
gameid = "12";
loadVariables ("/games/savescores.php", this, "POST");
this.submitspit = ((("Thank you " + playname) + " your submitted score was ") + theScore) + " points";
trace(theScore);
trace(entryname);
}
}
Symbol 162 Button
on (release) {
getURL ("/games/viewscores.php?gameid=12", "_blank");
}
Symbol 165 MovieClip Frame 1
playname = "";
submitspit = "";
Symbol 166 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 131 MovieClip in Symbol 174 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");
}