Frame 1
function __com_mochibot__(swfid, mc, lv) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = ((((((((((("http://" + mbc) + "/my/core.swf?mv=5&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
g[n] = res;
return(res);
}
__com_mochibot__("7ed3242b", this, 10301);
MovieClip.prototype.drawCircle = function (x, y, r) {
var _local6 = r * 0.414213562373095;
var _local5 = (r * Math.SQRT2) / 2;
this.moveTo(x + r, y);
this.curveTo(x + r, y + _local6, x + _local5, y + _local5);
this.curveTo(x + _local6, y + r, x, y + r);
this.curveTo(x - _local6, y + r, x - _local5, y + _local5);
this.curveTo(x - r, y + _local6, x - r, y);
this.curveTo(x - r, y - _local6, x - _local5, y - _local5);
this.curveTo(x - _local6, y - r, x, y - r);
this.curveTo(x + _local6, y - r, x + _local5, y - _local5);
this.curveTo(x + r, y - _local6, x + r, y);
};
stop();
Frame 2
stop();
Frame 3
sound = new Sound();
sound.attachSound("beat");
sound.start(0, 9999);
song = true;
sfx = new Sound();
thanks.useHandCursor = false;
createEmptyMovieClip("blkFlash", 10000);
blkFlash.beginFill(0, 100);
blkFlash.moveTo(0, 0);
blkFlash.lineTo(512, 0);
blkFlash.lineTo(512, 320);
blkFlash.lineTo(0, 320);
blkFlash.lineTo(0, 0);
blkFlash.onEnterFrame = function () {
this._alpha = this._alpha * 0.9;
if (this._alpha <= 5) {
this.removeMovieClip();
}
};
function makeSnowflake(X, Y) {
_root.createEmptyMovieClip("flake" + flakeDepth, flakeDepth);
flake = this["flake" + flakeDepth];
flake.beginFill(16777215, 100);
flake.cacheAsBitmap.cacheAsBitmap = true;
flake.drawCircle(0, 0, 5);
flake._alpha = random(25) + 25;
flake._xscale = 1 + flake._alpha;
flake._yscale = flake._xscale;
flake._alpha = flake._alpha + 15;
flake._x = X;
flake._y = Y;
flake.xSpeed = ((random(100) - 50) * 0.001) * flake._xscale;
flake.ySpeed = ((random(50) + 10) * 0.001) * flake._xscale;
flake.filters = [new flash.filters.BlurFilter(Math.abs(flake.xSpeed * 2), Math.abs(flake.ySpeed * 2))];
this["flake" + flakeDepth].onEnterFrame = function () {
this._y = this._y + this.ySpeed;
this._x = this._x + this.xSpeed;
if (((game || (this._y > 320)) || (this._x < -10)) || (this._x > 522)) {
this.removeMovieClip();
}
};
flakeDepth++;
}
clearAll();
stop();
flakeDepth = 8000;
game = false;
i = 0;
while (i <= 100) {
makeSnowflake(random(512), random(320));
i++;
}
onEnterFrame = function () {
makeSnowflake(random(512), 0);
};
Frame 4
function snowSound() {
sfx.attachSound("snow" + random(5));
sfx.start();
}
function manSound() {
sfx.attachSound("man" + random(9));
sfx.start();
}
function screamSound() {
sfx.attachSound("scream" + random(4));
sfx.start();
}
function otherSound(soundID) {
sfx.attachSound(soundID);
sfx.start();
}
function makeSnowflake(X, Y) {
_root.createEmptyMovieClip("flake" + flakeDepth, flakeDepth);
flake = this["flake" + flakeDepth];
flake.beginFill(16777215, 100);
flake.cacheAsBitmap.cacheAsBitmap = true;
flake.drawCircle(0, 0, 5);
flake._alpha = random(25) + 25;
flake._xscale = 1 + flake._alpha;
flake._yscale = flake._xscale;
flake._alpha = flake._alpha + 15;
flake._x = X;
flake._y = Y;
flake.xSpeed = ((random(120) - 60) * 0.001) * flake._xscale;
flake.ySpeed = ((random(60) + 20) * 0.001) * flake._xscale;
flake.filters = [new flash.filters.BlurFilter(Math.abs(flake.xSpeed * 2), Math.abs(flake.ySpeed * 2))];
this["flake" + flakeDepth].onEnterFrame = function () {
if (!game) {
this.removeMovieClip();
}
this._y = this._y + this.ySpeed;
this._x = this._x + this.xSpeed;
if (this._y > ground.points[int(this._x / 4)]) {
ground.build(this._x, -2);
this.removeMovieClip();
}
if (((this._y > 320) || (this._x < -10)) || (this._x > 522)) {
this.removeMovieClip();
}
};
flakeDepth++;
}
function makeFireflake(X, Y) {
_root.createEmptyMovieClip("flake" + flakeDepth, flakeDepth);
flake = this["flake" + flakeDepth];
flake.beginFill(11012875, 100);
flake.cacheAsBitmap.cacheAsBitmap = true;
flake.drawCircle(0, 0, 5);
flake._alpha = random(25) + 25;
flake._xscale = 1 + flake._alpha;
flake._yscale = flake._xscale;
flake._alpha = flake._alpha + 15;
flake._x = X;
flake._y = Y;
flake.xSpeed = ((random(100) - 50) * 0.001) * flake._xscale;
flake.ySpeed = ((random(50) + 10) * 0.01) * flake._xscale;
flake.filters = [new flash.filters.BlurFilter(Math.abs(flake.xSpeed * 2), Math.abs(flake.ySpeed * 2))];
this["flake" + flakeDepth].onEnterFrame = function () {
if (!game) {
this.removeMovieClip();
}
this._y = this._y + this.ySpeed;
this._x = this._x + this.xSpeed;
if (this._y > ground.points[int(this._x / 4)]) {
ground.build(this._x, level * 0.35);
this.removeMovieClip();
}
if (((this._y > 320) || (this._x < -10)) || (this._x > 522)) {
this.removeMovieClip();
}
};
flakeDepth++;
}
function makeSnowChunk(X, Y, xSP, ySP) {
_root.createEmptyMovieClip("flake" + flakeDepth, flakeDepth);
chunk = this["flake" + flakeDepth];
chunk.beginFill(16777215, 100);
chunk.cacheAsBitmap.cacheAsBitmap = true;
chunk.drawCircle(0, 0, 3);
chunk._xscale = 50 + random(50);
chunk._yscale = chunk._xscale;
chunk._x = X;
chunk._y = Y;
chunk._alpha = chunk._xscale;
chunk.xSpeed = (xSP + (random(70) * 0.1)) - 3;
chunk.ySpeed = ySP - (random(3) + 2);
chunk.filters = [new flash.filters.BlurFilter(Math.abs(chunk.xSpeed), Math.abs(chunk.ySpeed))];
chunk.onEnterFrame = function () {
if (!game) {
this.removeMovieClip();
}
this._x = this._x + this.xSpeed;
this._y = this._y + this.ySpeed;
this.ySpeed++;
this.filters = [new flash.filters.BlurFilter(Math.abs(this.xSpeed), Math.abs(this.ySpeed))];
if ((this.ySpeed > 0) && (this._y > ground.points[int(this._x / 4)])) {
ground.build(this._x, (-this._xscale) * 0.025);
this.removeMovieClip();
} else if ((this._x < -10) || (this._x > 522)) {
this.removeMovieClip();
}
};
flakeDepth++;
}
function makeGround() {
this.createEmptyMovieClip("ground", groundDepth);
ground.points = new Array();
i = 0;
while (i <= 128) {
ground.points[ground.points.length] = 248 + random(4);
i++;
}
ground.filters = [new flash.filters.GlowFilter(16777215, 50, 8, 8)];
ground.reload = function () {
ground.filters = [new flash.filters.GlowFilter((16777215 - powerHands) - (powerHands * 256), 50, 8, 8)];
this.clear();
this.beginFill((16777215 - powerHands) - (powerHands * 256), 100);
this.moveTo(0, 350);
i = 0;
while (i < this.points.length) {
this.lineTo(i * 4, this.points[i]);
i++;
}
this.lineTo(512, 350);
this.lineTo(0, 350);
};
ground.reload();
ground.build = function (X, magnitude) {
if (X > 512) {
return(undefined);
}
X = int(X / 4);
pointIndex = X;
this.points[X] = this.points[X] + magnitude;
if (this.points[X] > 320) {
this.points[X] = 320;
}
smooth = 0.75;
while (Math.abs(this.points[X] - this.points[X + 1]) > smooth) {
if (this.points[X + 1] > this.points[X]) {
this.points[X + 1] = this.points[X] + smooth;
} else {
this.points[X + 1] = this.points[X] - smooth;
}
smooth = smooth + 0.5;
X++;
}
smooth = 0.75;
X = pointIndex;
while (Math.abs(this.points[X] - this.points[X - 1]) > smooth) {
if (this.points[X - 1] > this.points[X]) {
this.points[X - 1] = this.points[X] + smooth;
} else {
this.points[X - 1] = this.points[X] - smooth;
}
smooth = smooth + 0.5;
X--;
}
this.reload();
};
ground.useHandCursor = false;
ground.onPress = function () {
if (hand == "empty") {
if (powerFire <= 0) {
ground.build(_xmouse, 9);
grabSnowball();
} else {
ground.build(_xmouse, 1);
}
}
};
}
powerHands = 0;
grabSnowball = function () {
hand = "snowball";
createEmptyMovieClip("snowball", ballDepth);
snowball.beginFill(16777215, 100);
if (powerHands > 0) {
snowball.flame = true;
}
if (snowball.flame) {
if (powerHands < 0) {
powerHands = 0;
}
snowball.beginFill(14680064, 100);
}
snowball.drawCircle(0, 0, 15);
snowball.xSpeed = 0;
snowball.ySpeed = 0;
snowball._x = _xmouse;
snowball._y = _ymouse;
snowball.lastX = snowball._x;
if ((snowball._y + 15) > ground.points[int(_xmouse / 4)]) {
snowball._y = ground.points[int(_xmouse / 4)] - 15;
}
snowball.lastY = snowball._y;
snowball.myNumber = ballDepth;
snowball.hold = function () {
if (this.flame && (powerHands > 0)) {
powerHands--;
}
this._x = _xmouse;
this._y = _ymouse;
if (this.flame && (random(5) == 0)) {
makeFireflake(this._x, this._y);
}
if ((this._y + 15) > ground.points[int(this._x / 4)]) {
this._y = ground.points[int(this._x / 4)] - 15;
}
this.xSpeed = (((this.xSpeed + this.xSpeed) + this._x) - this.lastX) / 3;
this.ySpeed = (((this.ySpeed + this.ySpeed) + this._y) - this.lastY) / 3;
if (this.flame) {
this.filters = [new flash.filters.GlowFilter(14680064, 50, 8, 8), new flash.filters.BlurFilter(Math.abs(this.xSpeed) + (Math.abs(this.ySpeed) / 2), (Math.abs(this.xSpeed) / 2) + Math.abs(this.ySpeed, 1))];
} else {
this.filters = [new flash.filters.GlowFilter(16777215, 50, 8, 8), new flash.filters.BlurFilter(Math.abs(this.xSpeed) + (Math.abs(this.ySpeed) / 2), (Math.abs(this.xSpeed) / 2) + Math.abs(this.ySpeed, 1))];
}
this.lastX = this._x;
this.lastY = this._y;
};
snowball.onEnterFrame = snowball.hold;
onMouseUp = function () {
hand = "empty";
snowball.onEnterFrame = function () {
this.ySpeed++;
this.xSpeed = this.xSpeed * 0.98;
this._x = this._x + this.xSpeed;
this._y = this._y + this.ySpeed;
if (this.flame && (random(2) == 0)) {
makeFireflake(this._x, this._y);
}
if (this.flame) {
this.filters = [new flash.filters.GlowFilter(14680064, 50, 8, 8), new flash.filters.BlurFilter(Math.abs(this.xSpeed) + (Math.abs(this.ySpeed) / 2), (Math.abs(this.xSpeed) / 2) + Math.abs(this.ySpeed, 1))];
} else {
this.filters = [new flash.filters.GlowFilter(16777215, 50, 8, 8), new flash.filters.BlurFilter(Math.abs(this.xSpeed) + (Math.abs(this.ySpeed) / 2), (Math.abs(this.xSpeed) / 2) + Math.abs(this.ySpeed, 1))];
}
if (this._y > ground.points[int(this._x / 4)]) {
snowSound();
if (this.flame) {
ground.build(this._x, this.ySpeed * 0.2);
} else {
ground.build(this._x, -10);
}
makeSnowChunk(this._x, this._y - 3, this.xSpeed * 0.5, (-this.ySpeed) * 0.2);
makeSnowChunk(this._x, this._y - 3, this.xSpeed * 0.5, (-this.ySpeed) * 0.2);
makeSnowChunk(this._x, this._y - 3, this.xSpeed * 0.5, (-this.ySpeed) * 0.2);
this.removeMovieClip();
}
if (this._y > 350) {
this.removeMovieClip();
}
};
snowball.useHandCursor = false;
snowball.onPress = function () {
this.removeMovieClip();
grabSnowball();
};
snowball._name = "snowball" + snowball.myNumber;
onMouseUp = null;
};
ballDepth++;
if (ballDepth > highestBall) {
ballDepth = lowestBall;
}
};
function grabMan(id) {
hand = "man";
handMan = this["man" + id];
handMan.frame1();
handMan.xSpeed = 0;
handMan.ySpeed = 0;
handMan.lastX = handMan._x;
if (handMan._y > ground.points[int(_xmouse / 4)]) {
handMan._y = ground.points[int(_xmouse / 4)];
}
handMan.lastY = handMan._y;
handMan.onEnterFrame = function () {
this._x = _xmouse;
this._y = _ymouse;
if (this._y > ground.points[int(this._x / 4)]) {
this._y = ground.points[int(this._x / 4)];
}
this.xSpeed = ((this.xSpeed + this._x) - this.lastX) / 2;
this.ySpeed = ((this.ySpeed + this._y) - this.lastY) / 2;
this.filters = [new flash.filters.BlurFilter(Math.abs(this.xSpeed) + (Math.abs(this.ySpeed) / 2), (Math.abs(this.xSpeed) / 2) + Math.abs(this.ySpeed, 1))];
this.lastX = this._x;
this.lastY = this._y;
};
onMouseUp = function () {
hand = "empty";
handMan.onEnterFrame = function () {
this.ySpeed++;
this.xSpeed = this.xSpeed * 0.98;
this._x = this._x + this.xSpeed;
this._y = this._y + this.ySpeed;
this._rotation = 90 + ((Math.atan2(this.ySpeed, this.xSpeed) * 180) / Math.PI);
if ((this._y < 0) && (!this._parent["arrow" + this.myNumber])) {
screamSound();
this._parent.attachMovie("arrow", "arrow" + this.myNumber, this.myNumber + 1000);
this._parent["arrow" + this.myNumber].myNumber = this.myNumber;
this._parent["arrow" + this.myNumber]._x = this._x;
this._parent["arrow" + this.myNumber]._yscale = 0;
this._parent["arrow" + this.myNumber].onEnterFrame = function () {
this._x = this._parent["man" + this.myNumber]._x;
this._yscale = -int(this._parent["man" + this.myNumber]._y / 10);
if (this._yscale > 200) {
this._yscale = 200;
}
this._rotation = this._parent["man" + this.myNumber].xSpeed * 3;
};
} else if ((this._y > 0) && (this._parent["arrow" + this.myNumber])) {
this._parent["arrow" + this.myNumber].removeMovieClip();
}
this.yScale = 125 + Math.abs(this.ySpeed);
this.xScale = 125 + Math.abs(this.ySpeed);
this.filters = [new flash.filters.BlurFilter(Math.abs(this.xSpeed) + (Math.abs(this.ySpeed) / 5), Math.abs(this.ySpeed) / 5)];
if (this._y > ground.points[int(this._x / 4)]) {
if ((this.ySpeed > 13) || (Math.abs(this.xSpeed) > 10)) {
this._y = this._y - this.ySpeed;
snowSound();
ground.build(this._x, this.ySpeed * 0.4);
i = 0;
while (i < 5) {
makeSnowChunk(this._x, this._y, this.xSpeed * 0.2, (-this.ySpeed) * 0.2);
i++;
}
score = score + int(this.ySpeed + (Math.abs(this.xSpeed) / 3));
attachMovie("score", "score" + this.myNumber, this.myNumber + 1000);
sco = this._parent["score" + this.myNumber];
sco.score = int(this.ySpeed + (Math.abs(this.xSpeed) / 3));
if (int(this.ySpeed + (Math.abs(this.xSpeed) / 3)) >= _root.hardest) {
_root.hardest = int(this.ySpeed + (Math.abs(this.xSpeed) / 3));
}
sco._x = this._x;
sco._y = ground.points[int(this._x / 4)];
sco._alpha = 75;
sco.onEnterFrame = function () {
this._alpha = this._alpha - 1.5;
if (this._alpha < 10) {
this.removeMovieClip();
}
};
this.removeMovieClip();
} else {
this.filters = [new flash.filters.BlurFilter(0, 0, 0)];
this.onEnterFrame = this.walk;
}
}
if (this._y > 350) {
this.removeMovieClip();
}
};
onMouseUp = null;
};
}
makeFish = function () {
baddiesAlive++;
attachMovie("fish", "man", manDepth);
man._x = -50;
man._y = ground.points[0] - 20;
man.health = 9;
man.onUnload = function () {
baddiesAlive--;
};
man.xSpeed = 6;
man.ySpeed = -8;
man.useHandCursor = false;
man.hurt._alpha = 0;
man.hurt.onEnterFrame = function () {
if (this._alpha > 0) {
this._alpha = this._alpha * 0.5;
}
};
man.onEnterFrame = function () {
makeSnowflake((this._x + random(20)) - 10, this._y + random(20));
if (random(2) == 0) {
makeSnowflake((this._x + random(20)) - 10, this._y + random(20));
}
this.filters = [new flash.filters.BlurFilter(2, Math.abs(this.ySpeed) / 4, 1)];
this._y = this._y + this.ySpeed;
this._x = this._x + this.xSpeed;
this.ySpeed = this.ySpeed + 0.2;
this._rotation = (Math.atan2(this.ySpeed, this.xSpeed) * 90) / Math.PI;
i = lowestBall;
while (i <= highestBall) {
snowballer = this._parent["snowball" + i];
if (((snowballer.ySpeed > 6) || (Math.abs(snowballer.xSpeed) > 6)) && (this.hitTest(snowballer))) {
j = 0;
while (j <= 15) {
makeSnowChunk(snowballer._x, snowballer._y, random(10) - 5, -random(5));
j++;
}
score = score + 50;
this.health = this.health - 2;
if (snowballer.flame) {
this.health = this.health - 2;
}
this.hurt._alpha = 100;
this._parent["snowball" + i].removeMovieClip();
}
i++;
}
if ((this._x > 300) && (castle.hitTest(this._x + 25, this._y, true))) {
otherSound("moo");
castle.gotoAndPlay("hurt");
i = 0;
while (i <= 50) {
makeSnowChunk((this._x + random(20)) - 10, (this._y + random(20)) - 10, (random(60) * 0.1) - 1, ((-random(40)) * 0.1) - 5);
i++;
}
this.removeMovieClip();
}
if (this.health <= 0) {
otherSound("moo");
score = score + 250;
attachMovie("score", "score" + this.myNumber, this.myNumber + 1000);
sco = this._parent["score" + this.myNumber];
sco.score = 250;
sco._x = this._x;
sco._y = ground.points[int(this._x / 4)];
sco._alpha = 75;
sco.onEnterFrame = function () {
this._y--;
this._alpha = this._alpha - 1.5;
if (this._alpha < 10) {
this.removeMovieClip();
}
};
i = 0;
while (i <= 10) {
makeFireflake((this._x + random(50)) - 25, (this._y - 10) - random(10));
i++;
}
this.removeMovieClip();
}
};
man.onPress = function () {
snowSound();
this.health--;
i = 0;
while (i <= 3) {
makeSnowChunk(this._x, this._y - 20, random(7) - 4, (-random(3)) - 4);
i++;
}
this.hurt._alpha = 100;
score = score + ((15 - this.health) * 5);
};
man._name = "man" + manDepth;
manDepth++;
if (manDepth > highestMan) {
manDepth = lowestMan;
}
};
makeTrebuchet = function () {
baddiesAlive++;
attachMovie("trebuchet", "man", manDepth);
man._x = -30;
man._y = ground.points[0];
man.gotoAndStop(52);
man.health = 15;
man.onUnload = function () {
baddiesAlive--;
};
man.filters = [new flash.filters.BlurFilter(1, 0, 1)];
man.useHandCursor = false;
man.hurt.onEnterFrame = function () {
if (this._alpha > 0) {
this._alpha = this._alpha * 0.5;
}
};
man.onEnterFrame = function () {
this._y = this._y + ((ground.points[int(this._x / 4)] - this._y) * 0.5);
this._rotation = this._rotation + ((((Math.atan2(ground.points[int((this._x + 13) / 4)] - ground.points[int((this._x - 13) / 4)], 26) * 90) / Math.PI) - this._rotation) * 0.5);
this._x = this._x + 2;
if (((this._currentframe == 52) && (this._x > 150)) && (random(10) == 0)) {
this.play();
}
if (this._currentframe == (this._totalframes - 5)) {
i = 0;
while (i <= 50) {
makeSnowChunk(this._x, this._y - 90, (random(40) * 0.1) + 8, ((-random(40)) * 0.1) - 3);
i++;
}
}
i = lowestBall;
while (i <= highestBall) {
snowballer = this._parent["snowball" + i];
if (((snowballer.ySpeed > 6) || (Math.abs(snowballer.xSpeed) > 6)) && (this.hitTest(snowballer))) {
j = 0;
while (j <= 15) {
makeSnowChunk(snowballer._x, snowballer._y, random(10) - 5, -random(5));
j++;
}
score = score + 50;
this.health = this.health - 3;
if (snowballer.flame) {
this.health = this.health - 2;
}
this.hurt._alpha = 100;
this._parent["snowball" + i].removeMovieClip();
}
i++;
}
if ((this._x > 300) && (castle.hitTest(this._x + 15, this._y, true))) {
castle.gotoAndPlay("hurt");
i = 0;
while (i <= 50) {
makeSnowChunk((this._x + random(20)) - 10, (this._y + random(20)) - 10, (random(60) * 0.1) - 1, ((-random(40)) * 0.1) - 5);
i++;
}
this.removeMovieClip();
}
if (this.health <= 0) {
ground.build(this._x - 15, 25);
ground.build(this._x + 15, 25);
score = score + 100;
attachMovie("score", "score" + this.myNumber, this.myNumber + 1000);
sco = this._parent["score" + this.myNumber];
sco.score = 100;
sco._x = this._x;
sco._y = ground.points[int(this._x / 4)];
sco._alpha = 75;
sco.onEnterFrame = function () {
this._y--;
this._alpha = this._alpha - 1.5;
if (this._alpha < 10) {
this.removeMovieClip();
}
};
i = 0;
while (i <= 10) {
makeSnowChunk(this._x, (this._y - 10) - random(10), random(7) - 4, (-random(3)) - 4);
i++;
}
i = 0;
while (i <= 10) {
makeFireflake((this._x + random(50)) - 25, (this._y - 10) - random(10));
i++;
}
this.removeMovieClip();
}
};
man.onPress = function () {
snowSound();
this.health--;
i = 0;
while (i <= 3) {
makeSnowChunk(this._x, this._y - 20, random(7) - 4, (-random(3)) - 4);
i++;
}
this.hurt._alpha = 100;
score = score + ((10 - this.health) * 5);
};
man._name = "man" + manDepth;
manDepth++;
if (manDepth > highestMan) {
manDepth = lowestMan;
}
};
makeJetski = function () {
baddiesAlive++;
otherSound("snowmobile");
attachMovie("jetski", "man", manDepth);
man._x = 0;
man._y = ground.points[0];
man._yscale = 120;
man._xscale = 120;
man.onUnload = function () {
baddiesAlive--;
};
man.ySpeed = 0;
man.useHandCursor = false;
man.onEnterFrame = function () {
this._x = this._x + 7;
if (this._y > ground.points[int(this._x / 4)]) {
this.ySpeed = (this.ySpeed + (ground.points[int(this._x / 4)] - this._y)) / 1.9;
this._y = this._y + ((ground.points[int(this._x / 4)] - this._y) * 0.5);
makeSnowChunk(this._x, this._y, -3, (-random(2)) - 1);
makeSnowChunk(this._x, this._y, -3, (-random(2)) - 1);
this._rotation = this._rotation + (((-Math.abs((Math.atan2(this.ySpeed, 4) * 180) / Math.PI)) - this._rotation) * 0.5);
} else {
this._y = this._y + this.ySpeed;
this.ySpeed++;
this._rotation = this._rotation + ((((Math.atan2(this.ySpeed, 4) * 100) / Math.PI) - this._rotation) * 0.3);
}
i = lowestBall;
while (i <= highestBall) {
if (((this._parent["snowball" + i].ySpeed > 6) || (Math.abs(this._parent["snowball" + i].xSpeed) > 6)) && (this.hitTest(this._parent["snowball" + i]))) {
i = 0;
while (i <= 15) {
makeSnowChunk(this._x, this._y - random(10), random(7) - 3, (-random(5)) - 2);
i++;
}
score = score + 10;
this.removeMovieClip();
}
i++;
}
this.filters = [new flash.filters.BlurFilter(2, this.Math.abs(ySpeed), 1)];
if ((this._x > 300) && (castle.hitTest(this._x, this._y, true))) {
castle.gotoAndPlay("hurt");
i = 0;
while (i <= 50) {
makeSnowChunk(this._x, this._y, (random(25) * 0.1) + 2, ((-random(40)) * 0.1) - 5);
i++;
}
this.removeMovieClip();
}
};
man.onPress = function () {
snowSound();
manSound();
i = 0;
while (i <= 10) {
makeSnowChunk(this._x, this._y, random(4) + 4, (-random(3)) - 1);
i++;
}
ground.build(this._x, 20);
score = score + (400 - this._x);
attachMovie("score", "score" + this.myNumber, this.myNumber + 1000);
sco = this._parent["score" + this.myNumber];
sco.score = 400 - this._x;
sco._x = this._x;
sco._y = ground.points[int(this._x / 4)];
sco._alpha = 75;
sco.onEnterFrame = function () {
this._alpha = this._alpha - 1.5;
this._y = this._y - 0.5;
if (this._alpha < 10) {
this.removeMovieClip();
}
};
this.removeMovieClip();
};
man._name = "man" + manDepth;
manDepth++;
if (manDepth > highestMan) {
manDepth = lowestMan;
}
};
makePerson = function () {
baddiesAlive++;
createEmptyMovieClip("man", manDepth);
man._xscale = 160;
man._yscale = 160;
man.myNumber = manDepth;
man.speed = (random(10) * 0.1) + 1;
man.shirtColor = random(16777215);
man.pantsColor = 255 + (random(65535) * 16);
man.skinColor = (((random(16) * 65536) + (random(16) * 256)) + random(16)) + 14716992;
man.onUnload = function () {
baddiesAlive--;
};
man.frame1 = function () {
this.clear();
this.beginFill(0, 0);
this.moveTo(-5, 0);
this.lineTo(5, 0);
this.lineTo(5, -15);
this.lineTo(-5, -15);
this.lineTo(-5, 0);
this.beginFill(this.shirtColor, 100);
this.moveTo(2, -6);
this.lineTo(-1, -6);
this.lineTo(-2, -11);
this.lineTo(2, -11);
this.lineTo(2, -6);
this.beginFill(this.pantsColor, 100);
this.moveTo(-2, 0);
this.lineTo(2, 0);
this.lineTo(2, -6);
this.lineTo(-1, -6);
this.lineTo(1, 0);
this.lineTo(0, -4);
this.lineTo(-1, 0);
this.lineTo(-2, 0);
this.beginFill(this.skinColor, 100);
this.drawCircle(0, -11, 2);
};
man.frame2 = function () {
this.clear();
this.beginFill(0, 0);
this.moveTo(-5, 0);
this.lineTo(5, 0);
this.lineTo(5, -15);
this.lineTo(-5, -15);
this.lineTo(-5, 0);
this.beginFill(this.shirtColor, 100);
this.moveTo(2, -6);
this.lineTo(-1, -6);
this.lineTo(-2, -11);
this.lineTo(2, -11);
this.lineTo(2, -6);
this.beginFill(this.pantsColor, 100);
this.moveTo(-1, -6);
this.lineTo(2, -6);
this.lineTo(4, -5);
this.lineTo(4, -3);
this.lineTo(2, -4);
this.lineTo(0, -4);
this.lineTo(-2, 0);
this.lineTo(-3, 0);
this.lineTo(-1, -6);
this.beginFill(this.skinColor, 100);
this.drawCircle(0, -11, 2);
};
man.frame3 = function () {
this.clear();
this.beginFill(0, 0);
this.moveTo(-5, 0);
this.lineTo(5, 0);
this.lineTo(5, -15);
this.lineTo(-5, -15);
this.lineTo(-5, 0);
this.beginFill(this.shirtColor, 100);
this.moveTo(2, -6);
this.lineTo(-1, -6);
this.lineTo(-2, -11);
this.lineTo(2, -11);
this.lineTo(2, -6);
this.beginFill(this.pantsColor, 100);
this.moveTo(2, -6);
this.lineTo(-1, -6);
this.lineTo(-4, -2);
this.lineTo(-3, -2);
this.lineTo(-1, -4);
this.lineTo(1, -4);
this.lineTo(2, 0);
this.lineTo(3, 0);
this.lineTo(2, -6);
this.beginFill(this.skinColor, 100);
this.drawCircle(0, -11, 2);
};
man._x = 0;
man._y = ground.points[0];
man.timer = 10;
man.frame2();
man.walk = function () {
this.timer--;
if (this.timer == 15) {
this.frame2();
} else if (this.timer == 10) {
this.frame1();
} else if (this.timer == 5) {
this.frame3();
} else if (this.timer == 0) {
this.frame1();
this.timer = 20;
}
this._x = this._x + this.speed;
this._y = ground.points[int(this._x / 4)];
this._rotation = this._rotation + (((-90 + ((Math.atan2(4, ground.points[int(this._x / 4)] - ground.points[int((this._x + 4) / 4)]) * 180) / Math.PI)) - this._rotation) * 0.3);
i = lowestBall;
while (i <= highestBall) {
if (((this._parent["snowball" + i].ySpeed > 6) || (Math.abs(this._parent["snowball" + i].xSpeed) > 6)) && (this.hitTest(this._parent["snowball" + i]))) {
manSound();
makeSnowChunk(this._x, this._y - random(10), random(7) - 3, (-random(5)) - 2);
makeSnowChunk(this._x, this._y - random(10), random(7) - 3, (-random(5)) - 2);
makeSnowChunk(this._x, this._y - random(10), random(7) - 3, (-random(5)) - 2);
makeSnowChunk(this._x, this._y - random(10), random(7) - 3, (-random(5)) - 2);
score = score + 18;
this.removeMovieClip();
}
i++;
}
if ((this._x > 300) && (castle.hitTest(this._x, this._y, true))) {
i = 0;
while (i <= 20) {
makeSnowChunk(this._x, this._y - random(10), random(7), (-random(5)) - 3);
i++;
}
castle.gotoAndPlay("hurt");
this.removeMovieClip();
}
if (this._x > 520) {
this.removeMovieClip();
}
};
man.onEnterFrame = man.walk;
man.useHandCursor = false;
man.onPress = function () {
manSound();
grabMan(this.myNumber);
};
man._name = "man" + manDepth;
manDepth++;
if (manDepth > highestMan) {
manDepth = lowestMan;
}
};
_root.createEmptyMovieClip("hand", 200);
hand.beginFill(16716049, 100);
hand.drawCircle(0, 0, 3);
hand._alpha = 0;
hand.onEnterFrame = function () {
if (powerFire > 0) {
if (this._alpha < 100) {
this._alpha = this._alpha + ((100 - this._alpha) * 0.5);
}
this.filters = [new flash.filters.GlowFilter(16716049, powerFire, 10, 10), new flash.filters.BlurFilter(Math.abs(_xmouse - this._x), Math.abs(_ymouse - this._y), 1)];
this._x = _xmouse;
this._y = _ymouse;
powerFire--;
makeFireflake(_xmouse, _ymouse);
if (random(2) == 0) {
makeFireflake(_xmouse, _ymouse);
}
Mouse.hide();
}
if (powerFire <= 0) {
Mouse.show();
this._alpha = this._alpha * 0.5;
}
};
attachMovie("hud", "hud", 199);
meltPrice = 1200;
firePrice = 1400;
handsPrice = 1600;
hud.melt.onPress = function () {
if (score >= meltPrice) {
score = score - meltPrice;
powerMelt = powerMelt + 100;
}
};
hud.melt.onEnterFrame = function () {
if (this.hitTest(_xmouse, _ymouse)) {
if (score >= meltPrice) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(3);
}
} else {
this.gotoAndStop(1);
}
};
hud.fire.onEnterFrame = function () {
if (this.hitTest(_xmouse, _ymouse)) {
if (score >= firePrice) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(3);
}
} else {
this.gotoAndStop(1);
}
};
hud.fire.onPress = function () {
if (score >= firePrice) {
score = score - firePrice;
powerFire = powerFire + 100;
}
};
hud.hands.onEnterFrame = function () {
if (this.hitTest(_xmouse, _ymouse)) {
if (score >= handsPrice) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(3);
}
} else {
this.gotoAndStop(1);
}
};
hud.hands.onPress = function () {
if (score >= handsPrice) {
score = score - handsPrice;
powerHands = powerHands + 75;
}
};
stop();
game = true;
groundDepth = 2;
lowestBall = 2000;
highestBall = 2010;
ballDepth = lowestBall;
lowestFlake = 8000;
flakeDepth = lowestFlake;
lowestMan = 5000;
highestMan = 5100;
manDepth = lowestMan;
sound = new Sound();
makeGround();
powerMelt = 0;
powerFire = 0;
powerHands = 0;
hardest = 0;
score = 0;
level = 0;
mans = 0;
attachMovie("dying", "dying", 10);
dying.remaining = 1000;
dying._visible = false;
i = 0;
while (i <= 50) {
makeSnowflake(random(500), random(ground.points[0]));
i++;
}
snowTimer = 1;
mobileTimer = 0;
mobileCount = 0;
manTimer = 0;
manCount = 0;
fishTimer = 0;
fishCount = 0;
trebTimer = 0;
trebCount = 0;
hand = "empty";
baddiesAlive = 0;
onEnterFrame = function () {
if (powerMelt > 0) {
tempPos = random(212) + 300;
ground.build(tempPos, 2);
_root.createEmptyMovieClip("flake" + flakeDepth, flakeDepth);
flake = this["flake" + flakeDepth];
flake.beginFill(16716049, 100);
flake.drawCircle(0, 0, 5);
flake._alpha = random(25) + 25;
flake._xscale = flake._alpha;
flake._yscale = flake._xscale;
flake._x = tempPos;
flake._y = ground.points[int(tempPos / 4)];
flake.filters = [new flash.filters.BlurFilter(0, 4, 1)];
flake.onEnterFrame = function () {
this._y--;
this._alpha = this._alpha - 2;
if (this._alpha <= 5) {
this.removeMovieClip;
}
};
powerMelt--;
flakeDepth++;
}
if (manCount > 0) {
if (manTimer <= 0) {
makePerson();
manCount--;
manTimer = 75 - (level * (random(5) + 3));
if (manTimer < 10) {
manTimer = 10;
}
} else {
manTimer--;
}
}
if (mobileCount > 0) {
if (mobileTimer <= 0) {
makeJetski();
mobileCount--;
mobileTimer = 120 - (level * (random(3) + 1));
if (mobileTimer < 10) {
mobileTimer = 10;
}
} else {
mobileTimer--;
}
}
if (trebCount > 0) {
if (trebTimer <= 0) {
makeTrebuchet();
trebCount--;
trebTimer = 220 - (level * (random(4) + 1));
if (trebTimer < 10) {
trebTimer = 10;
}
} else {
trebTimer--;
}
}
if (fishCount > 0) {
if (fishTimer <= 0) {
makeFish();
fishCount--;
fishTimer = 250 - (level * (random(4) + 1.5));
if (fishTimer < 10) {
fishTimer = 10;
}
} else {
fishTimer--;
}
}
if ((((((manCount + mobileCount) + trebCount) + fishCount) + baddiesAlive) == 0) && (!lvl)) {
nextLevel();
}
if (snowTimer <= 0) {
switch (level) {
case 1 :
makeSnowflake(random(500), 0);
snowTimer = 3;
break;
case 2 :
makeSnowflake(random(500), 0);
snowTimer = 2;
break;
case 3 :
case 4 :
makeSnowflake(random(500), 0);
snowTimer = 1;
break;
default :
makeSnowflake(random(500), 0);
snowTimer = 0;
}
} else {
snowTimer--;
}
};
dying.onEnterFrame = function () {
this.avg = 0;
this.amnt = 0;
i = 75;
while (i < ground.points.length) {
this.avg = this.avg + ground.points[i];
this.amnt++;
i = i + 5;
}
this.avg = this.avg / this.amnt;
if (this.avg < 140) {
if (avg < 100) {
this.remaining--;
}
if (avg < 50) {
this.remaining--;
}
this._visible = true;
this.remaining = this.remaining - 2;
if (this.remaining <= 0) {
gameOver();
}
} else {
this._visible = false;
if (this.remaining < 1099) {
this.remaining++;
}
}
this.timer = int(this.remaining * 0.01);
};
nextLevel = function () {
_root.attachMovie("nextLevel", "lvl", 3);
lvl._x = 256;
lvl._y = 160;
level++;
i = 0;
while (i < (levl * 10)) {
makeSnowflake(random(500), 0);
i++;
}
lvl.onEnterFrame = function () {
if ((level > 1) && (random(3) == 0)) {
makeFireflake(random(500), 0);
}
if (this._currentframe == this._totalframes) {
stop();
manCount = level * 4;
manTimer = 0;
if (level > 1) {
mobileCount = int(level * 2);
mobileTimer = random(50) + 30;
}
if (level > 2) {
trebCount = level - 1;
trebTimer = random(80) + 100;
}
if (level > 3) {
fishCount = int(level * 0.75) - 2;
fishTimer = random(100) + 150;
}
this.removeMovieClip();
}
};
};
nextLevel();
gameOver = function () {
clearAll();
gotoAndStop ("gameOver");
};
clearAll = function () {
ground.removeMovieClip();
i = lowestMan;
while (i <= highestMan) {
this["man" + i].removeMovieClip();
i++;
}
i = lowestBall;
while (i <= highestBall) {
this["snowball" + i].removeMovieClip();
i++;
}
snowball.removeMovieClip();
lvl.removeMovieClip();
dying.removeMovieClip();
hand.removeMovieClip();
hud.removeMovieClip();
Mouse.show();
delete onEnterFrame;
delete onMouseDown;
delete onMouseUp;
game = false;
};
Frame 5
sound.attachSound("beat");
sound.stop();
sound.attachSound("end");
sound.start();
function makeSnowflake(X, Y) {
_root.createEmptyMovieClip("flake" + flakeDepth, flakeDepth);
flake = this["flake" + flakeDepth];
flake.beginFill(16777215, 100);
flake.cacheAsBitmap.cacheAsBitmap = true;
flake.drawCircle(0, 0, 5);
flake._alpha = random(25) + 25;
flake._xscale = 1 + flake._alpha;
flake._yscale = flake._xscale;
flake._alpha = flake._alpha + 15;
flake._x = X;
flake._y = Y;
flake.xSpeed = ((random(100) - 50) * 0.001) * flake._xscale;
flake.ySpeed = ((random(50) + 10) * 0.001) * flake._xscale;
flake.filters = [new flash.filters.BlurFilter(Math.abs(flake.xSpeed * 2), Math.abs(flake.ySpeed * 2))];
this["flake" + flakeDepth].onEnterFrame = function () {
this._y = this._y + this.ySpeed;
this._x = this._x + this.xSpeed;
if (((game || (this._y > 320)) || (this._x < -10)) || (this._x > 522)) {
this.removeMovieClip();
}
};
flakeDepth++;
}
stop();
clearAll();
i = 0;
while (i <= 100) {
makeSnowflake(random(512), random(320));
i++;
}
onEnterFrame = function () {
makeSnowflake(random(512), 0);
};
createEmptyMovieClip("blkFlash", 10000);
blkFlash.beginFill(0, 100);
blkFlash.moveTo(0, 0);
blkFlash.lineTo(512, 0);
blkFlash.lineTo(512, 320);
blkFlash.lineTo(0, 320);
blkFlash.lineTo(0, 0);
blkFlash.onEnterFrame = function () {
this._alpha = this._alpha * 0.9;
if (this._alpha <= 5) {
this.removeMovieClip();
}
};
Symbol 65 MovieClip [trebuchet] Frame 1
Symbol 65 MovieClip [trebuchet] Frame 22
stop();
Symbol 103 MovieClip [pickup] Frame 1
stop();
Symbol 109 MovieClip Frame 1
stop();
Symbol 112 MovieClip Frame 1
stop();
Symbol 123 Button
on (release) {
if (_quality == "LOW") {
_quality = "HIGH";
} else if (_quality == "HIGH") {
_quality = "MEDIUM";
} else {
_quality = "LOW";
}
}
Symbol 125 Button
on (release) {
if (_parent.song) {
_parent.sound.attachSound("beat");
_parent.sound.stop();
_parent.song = false;
} else {
_parent.sound.attachSound("beat");
_parent.sound.start(0, 9999);
_parent.song = true;
}
}
Symbol 140 Button
on (press) {
getURL ("http://www.monkeyinthepants.com", "_blank");
}
Symbol 144 Button
on (release) {
play();
}
Symbol 148 Button
on (press) {
getURL ("http://www.monkeyinthepants.com", "_blank");
}
Symbol 152 MovieClip Frame 177
stop();
_parent.play();
Symbol 157 MovieClip Frame 1
stop();
Symbol 157 MovieClip Frame 2
play();
_parent.snowSound();
_parent.otherSound("hurt");
Symbol 159 Button
on (release) {
gotoAndStop ("main");
}
Symbol 176 Button
on (release) {
gotoAndStop ("title");
}