Frame 1
function itemHandler1(obj, item) {
getURL ("http://pezzo.newgrounds.com", "_blank");
}
function itemHandler2(obj, item) {
getURL ("http://coaly.newgrounds.com", "_blank");
}
stop();
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
myMenu.customItems.push(new ContextMenuItem("Zach Mcgowan - art", itemHandler1));
myMenu.customItems.push(new ContextMenuItem("Stephen Colie - art and code", itemHandler2));
_root.menu = myMenu;
onEnterFrame = function () {
if (loadBar._currentframe < 100) {
loadBar.gotoAndStop(Math.round((getBytesLoaded() / getBytesTotal()) * 100));
} else if (loadBar._currentframe == 100) {
loadBar.play();
} else if (loadBar._currentframe == 255) {
_root.gotoAndStop(2);
}
};
Frame 2
stop();
x = 50;
transition.swapDepths(2000);
lemonMusic = new Sound(transition);
lemonMusic.attachSound("music");
lemonMusic.setVolume(x);
stopAllSounds();
lemonMusic.start(0, 99);
playSound = new Sound(playB);
playSound.attachSound("play");
onEnterFrame = function () {
lemonMusic.setVolume(x);
if (x < 100) {
x = x * 1.2;
} else {
x = 100;
}
};
Instance of Symbol 65 MovieClip "transition" in Frame 2
onClipEvent (enterFrame) {
if (this._currentframe == 20) {
if (_root._currentframe == 4) {
_root.gotoAndStop(2);
_root.loadBar.swapDepths(1);
_root.loadBar.removeMovieClip();
} else {
_root.nextFrame();
}
_root._x = 0;
this._x = 325;
}
}
Frame 3
stop();
transition.swapDepths(2001);
spaceUp = true;
qkeyup = true;
i = 1;
grav = 2;
timer = 0;
score = 0;
gameTimer = 1600;
gameTime = 60;
hit = new Sound();
hit.attachSound("hit");
smash = new Sound();
smash.attachSound("smash");
whistle = new Sound();
whistle.attachSound("whistle");
onEnterFrame = function () {
if (gameTimer > 1500) {
countDown = Math.ceil((gameTimer - 1500) / 25);
gameTimer--;
} else if (gameTimer == 1500) {
countDown = "";
whistle.start();
gameTimer--;
} else if (gameTimer > 0) {
gameTimer--;
gameTime = Math.ceil(gameTimer / 25);
timer--;
} else if (gameTimer == 0) {
gameTimer--;
whistle.start();
transition._x = (-_x) + 325;
transition.play();
}
if (gameTime > 60) {
gameTime = 60;
}
if (timer < 0) {
timer = 30 - ((60 - gameTime) / 2);
LemonCreate();
}
Quality();
};
Quality = function () {
if (Key.isDown(81) && (qkeyup == true)) {
if (_root._quality == "HIGH") {
_root._quality = "MEDIUM";
} else if (_root._quality == "MEDIUM") {
_root._quality = "LOW";
} else {
_root._quality = "HIGH";
}
qkeyup = false;
}
if (!Key.isDown(81)) {
qkeyup = true;
}
};
dude.onEnterFrame = function () {
if ((gameTimer < 1500) && (gameTimer > 0)) {
if (this._currentframe != 3) {
Move(12, this);
}
Hit(this);
} else {
this.gotoAndStop(1);
}
};
LemonCreate = function () {
cur = this.attachMovie("lemon", "lemon" + i, i++);
cur._x = (-_x) + random(650);
cur._y = -50;
cur.yspd = 0;
cur.xspd = (Math.random() * 30) - 15;
cur._xscale = (cur._yscale = 15 + (Math.random() * 10));
cur.onEnterFrame = lemonMove;
};
lemonMove = function () {
if (this._y > 450) {
this.removeMovieClip();
}
if (dude._currentframe == 3) {
if ((this._currentframe == 1) && (this.hitTest(dude.attack.hitBox))) {
this._rotation = 0;
smash.start();
score++;
this.gotoAndStop(2);
this.yspd = 0;
this.xspd = 0;
while (!backGround.ground.hitTest(this._x, this._y + 10, true)) {
this._y++;
}
}
}
this._x = this._x + this.xspd;
this._y = this._y + this.yspd;
this._rotation = this._rotation + this.xspd;
if (!backGround.ground.hitTest(this._x, this._y + 11, true)) {
this.yspd = this.yspd + grav;
}
if (backGround.ground.hitTest(this._x, this._y + 10, true)) {
this.yspd = (-this.yspd) * 0.4;
this.xspd = this.xspd * 0.4;
}
while (backGround.ground.hitTest(this._x, this._y + 10, true)) {
if (Math.abs(this.yspd) < 1) {
this.yspd = 0;
}
this._y--;
}
};
Hit = function (obj) {
if (Key.isDown(32) && (spaceUp == true)) {
spaceUp = false;
obj.gotoAndStop(3);
}
if (!Key.isDown(32)) {
spaceUp = true;
}
};
Move = function (spd, obj) {
while (backGround.ground.hitTest(obj._x, obj._y, true)) {
obj._y--;
}
while (!backGround.ground.hitTest(obj._x, obj._y + 1, true)) {
obj._y++;
}
if (Key.isDown(37)) {
obj.gotoAndStop(2);
if ((_x + obj._x) < 200) {
scoreText._x = scoreText._x - spd;
gameText._x = gameText._x - spd;
_x = (_x + spd);
}
obj._x = obj._x - spd;
obj._xscale = Math.abs(obj._xscale);
} else if (Key.isDown(39)) {
obj.gotoAndStop(2);
if ((_x + obj._x) > 450) {
scoreText._x = scoreText._x + spd;
gameText._x = gameText._x + spd;
_x = (_x - spd);
}
obj._x = obj._x + spd;
obj._xscale = -Math.abs(obj._xscale);
} else {
obj.gotoAndStop(1);
}
if (backGround._x > (-_x)) {
backGround._x = backGround._x - 1300;
}
if (backGround._x < ((-_x) - 1300)) {
backGround._x = backGround._x + 1300;
}
};
Frame 4
submitButton._x = 325;
submitted._x = 325;
transition.swapDepths(2002);
nameVar = "insert name";
Symbol 19 MovieClip Frame 9
_parent.removeMovieClip();
Symbol 20 MovieClip [lemon] Frame 1
stop();
Symbol 35 Button
on (release) {
getURL ("http://www.legitgames.com", "_blank");
}
Symbol 43 MovieClip Frame 276
_root.loadBar.swapDepths(1);
_root.loadBar.removeMovieClip();
Symbol 51 Button
on (release) {
getURL ("http://www.legitgames.com/", "_blank");
}
Symbol 54 Button
on (release) {
getURL ("http://armorbot.com/mytable/?id=1630", "_blank");
}
Symbol 59 MovieClip Frame 9
stop();
Symbol 62 Button
on (release) {
_root.transition.play();
}
Symbol 65 MovieClip Frame 1
stop();
Symbol 92 MovieClip Frame 1
_root.hit.start();
Symbol 92 MovieClip Frame 7
_parent.gotoAndStop(1);
Symbol 93 MovieClip Frame 1
stop();
Symbol 106 MovieClip Frame 116
stop();
Symbol 110 Button
on (release) {
_root.transition.play();
}
Symbol 112 MovieClip Frame 1
stop();
Symbol 119 MovieClip Frame 1
stop();
Symbol 119 MovieClip Frame 9
stop();
Symbol 123 Button
on (release) {
if (_root.nameVar != "insert name") {
_root.submitButton._x = -100;
_root.submitted.play();
ab20_09 = new LoadVars();
ab20_09.z = _root.nameVar;
ab20_09.x = _root.score;
ab20_09.c = 1630;
ab20_09.v = "XCSIXW";
ab20_09.sendAndLoad("http://armorbot.com/s_b", ab20_09, "POST");
} else {
_root.nameBlink.play();
}
}