Frame 1
fscommand ("fullscreen", false);
fscommand ("allowscale", false);
fscommand ("trapallkeys", true);
Frame 8
_root.gotoAndPlay("intro");
Frame 10
b_start.onRelease = function () {
_root.play();
};
b_cb.onRelease = function () {
getURL ("http://www.cadinbatrack.com");
};
b_pf.onRelease = function () {
getURL ("http://www.thepencilfarm.com");
};
Frame 42
stop();
Frame 81
var legit = false;
var soundIsOn = true;
protocol = _url.substr(0, _url.indexOf(":"));
if (protocol == "file") {
legit = false;
message = "It seems you are trying out this SWF on your local hard disk. That's ok, but be aware that this SWF will only work if played on the source site";
} else if (protocol == "http") {
doubleSlash = _url.indexOf("//");
server = _url.substr(doubleSlash + 2, (_url.indexOf("/", doubleSlash + 2) - doubleSlash) - 2);
server = server.toUpperCase();
if (server.indexOf("WWW.") != -1) {
server = server.substr(server.indexOf("WWW.") + 4, server.length);
}
if (server.indexOf("THEPENCILFARM.COM") != -1) {
legit = true;
} else {
legit = false;
}
}
Frame 82
piracy_mc._visible = false;
var newMenu = new ContextMenu();
newMenu.hideBuiltInItems();
this.menu = newMenu;
b_startGame.onRelease = function () {
if (legit) {
play();
piracy_mc.removeMovieClip();
} else {
piracy_mc._visible = true;
}
};
piracy_mc.b_piracy.onRelease = function () {
getURL ("http://www.thepencilfarm.com/games/snow_day/?id=1");
};
instFish3.fish.gotoAndStop(6);
instFish2.fish.stop();
Frame 85
stop();
Frame 89
function updateSnowLevel() {
snowLevel = snowLevel - 1;
if (snowLevel < 1) {
clearInterval(intervalId);
gameOver();
}
}
function resetGame() {
var _local3 = 0;
while (_local3 < NUM_CLOUDS) {
cloudArr[_local3] = this.attachMovie("cloud_ID", "cloud_mc" + _local3, _root.getNextHighestDepth());
cloudArr[_local3].hit_mc._visible = false;
_local3++;
}
I = false;
C = false;
E = false;
needsReset = false;
_root.createEmptyMovieClip("topMost", _root.getNextHighestDepth());
bonus_mc.swapDepths(topMost);
snowMeter_mc.swapDepths(cloudArr[NUM_CLOUDS - 1]);
score_mc.swapDepths(cloudArr[NUM_CLOUDS - 2]);
snd_mc.swapDepths(cloudArr[NUM_CLOUDS - 3]);
man_mc.meter_mc.gotoAndStop(1);
score = 0;
scoreDisplay = 0;
}
function countClouds(xpos, ypos) {
if (cloudCount > 1) {
bonus_mc.bonusCtTXT.text = "BONUS X " + cloudCount;
bonus_mc.bonusPtsTXT.text = cloudCount * 100;
score = score + (cloudCount * (cloudCount * 10));
bonus_mc._x = xpos;
bonus_mc._alpha = 100;
bonus_mc._y = ypos;
bonusTimer = 48;
trace("BONUS! " + cloudCount);
}
}
function gameOver() {
removeMovieClip(man_mc);
var _local1 = 0;
while (_local1 < NUM_CLOUDS) {
removeMovieClip(cloudArr[_local1]);
trace(_local1);
_local1++;
}
finalScoreTXT.text = String(score);
Mouse.removeListener(mouseListener);
removeMovieClip(score_mc);
removeMovieClip(snowMeter_mc);
removeMovieClip(bonus_mc);
removeMovieClip(snd_mc);
gotoAndStop ("gameOver");
}
function fire(h) {
var _local3 = this.attachMovie("bullet_id", "bullet" + this.getNextHighestDepth(), _root.getNextHighestDepth());
_local3.fire(h);
isReloading = true;
man_mc.man.man_top.play();
}
function startWalking() {
man_mc.gotoAndPlay("walking");
isWalking = true;
}
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
var isDown = false;
var isReloading = false;
var NUM_CLOUDS = 6;
var cloudArr = new Array();
var needsReset = true;
var score = 0;
var scoreDisplay;
var cloudCount = 0;
var bonusTimer = 0;
var timeBonusCt = 0;
var isReady;
var bulletCharge = 0;
var isWalking = false;
var snowLevel = 100;
var I;
var C;
var E;
var intervalId;
var timer = 60;
var duration = 300;
snowMeter_mc.meter._yscale = 0;
intervalId = setInterval(this, "updateSnowLevel", duration);
this.createEmptyMovieClip("poofSnd_mc", getNextHighestDepth());
var poofSnd = new Sound(poofSnd_mc);
poofSnd.attachSound("s_poof");
this.createEmptyMovieClip("songSnd_mc", getNextHighestDepth());
var songSnd = new Sound(songSnd_mc);
songSnd.attachSound("s_song");
if (soundIsOn) {
songSnd.start(0, 2000);
} else {
snd_mc.gotoAndStop(2);
}
this.createEmptyMovieClip("bellSnd_mc", getNextHighestDepth());
var bellSnd = new Sound(bellSnd_mc);
bellSnd.attachSound("s_bling");
var mouseListener = new Object();
var keyListener = new Object();
mouseListener.onMouseDown = function () {
isDown = true;
};
keyListener.onKeyUp = function () {
if ((Key.getCode() == 73) && (!I)) {
I = true;
C = false;
E = false;
trace("I");
} else if (((Key.getCode() == 67) && (!C)) && (I)) {
C = true;
trace("I");
} else if (((Key.getCode() == 69) && (!E)) && (C)) {
trace("E");
gameOver();
} else {
I = false;
C = false;
}
};
mouseListener.onMouseUp = function () {
isDown = false;
if (!isReloading) {
fire(bulletCharge);
}
};
Mouse.addListener(mouseListener);
Key.addListener(keyListener);
b_snd.onRelease = function () {
if (soundIsOn) {
snd_mc.gotoAndStop(2);
songSnd.stop();
soundIsOn = false;
} else {
snd_mc.gotoAndStop(1);
songSnd.start(0, 2000);
soundIsOn = true;
}
};
onEnterFrame = function () {
if (needsReset) {
resetGame();
}
if (score > scoreDisplay) {
scoreDisplay = scoreDisplay + 5;
score_mc.scoreTXT.text = scoreDisplay;
}
if (snowMeter_mc.meter._yscale > snowLevel) {
snowMeter_mc.meter._yscale = snowMeter_mc.meter._yscale - ((snowMeter_mc.meter._yscale - snowLevel) / 5);
} else if (snowMeter_mc.meter._yscale < snowLevel) {
snowMeter_mc.meter._yscale = snowMeter_mc.meter._yscale + ((snowLevel - snowMeter_mc.meter._yscale) / 5);
}
var _local1 = 0;
while (_local1 < NUM_CLOUDS) {
cloudArr[_local1].updatePos();
_local1++;
}
if (isReloading) {
if (bulletCharge > 0) {
bulletCharge = bulletCharge - 2;
if (bulletCharge < 0) {
bulletCharge = 0;
}
man_mc.meter_mc.gotoAndStop((bulletCharge / 40) * 120);
} else {
isReloading = false;
man_mc.meter_mc.gotoAndStop(1);
}
} else if (isDown) {
if (bulletCharge < 40) {
bulletCharge++;
man_mc.meter_mc.gotoAndStop((bulletCharge / 40) * 120);
}
}
if (_xmouse > (man_mc._x + 5)) {
if (!isWalking) {
startWalking();
}
man_mc._xscale = 100;
man_mc._x = man_mc._x + 8;
} else if (_xmouse < (man_mc._x - 5)) {
if (!isWalking) {
startWalking();
}
man_mc._xscale = -100;
man_mc._x = man_mc._x - 8;
} else {
man_mc.gotoAndStop(1);
isWalking = false;
}
if (bonusTimer > 1) {
if (bonusTimer < 40) {
bonus_mc._y = bonus_mc._y + ((40 - bonusTimer) / 2);
bonus_mc._alpha = bonus_mc._alpha - 3;
}
bonusTimer = bonusTimer - 0.5;
}
};
stop();
function __com_mochibot__(swfid, mc, lv, trk) {
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=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
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);
}
return(res);
}
__com_mochibot__("a7d83cf4", this, 10301, true);
Frame 90
stop();
_root.scoretable.filename = "snow_day";
_root.scoretable.loadVariables("http://www.thepencilfarm.com/games/scores/highscores.php", "POST");
b_playAgain.onRelease = function () {
trace("play again");
gotoAndPlay ("game");
songSnd.stop();
};
buttonBar.finalScoreTXT.text = score;
webButton2.onRelease = function () {
getURL ("http://www.cadinbatrack.com");
};
pfButton2.onRelease = function () {
getURL ("http://www.thepencilfarm.com");
};
b_playMore.onRelease = function () {
getURL ("http://www.thepencilfarm.com/games/");
};
onEnterFrame = function () {
};
Symbol 7 MovieClip Frame 1
bar._xscale = 0;
_parent.stop();
stop();
this.onEnterFrame = function () {
bar._xscale = (_parent.getBytesLoaded() / _parent.getBytesTotal()) * 100;
if (bar._xscale == 100) {
this.gotoAndPlay(2);
this.onEnterFrame = function () {
};
}
};
Symbol 7 MovieClip Frame 2
stop();
trace("LOADED");
_parent.gotoAndPlay(2);
Symbol 181 MovieClip [__Packages.Cloud] Frame 0
class Cloud extends MovieClip
{
var speed, isSnowing, gotoAndStop, _y, _x, pts_mc;
function Cloud () {
super();
setCloud(10, 700);
}
function setCloud(min, max) {
dir = _root.randRange(0, 1);
if (dir == 0) {
dir = -1;
}
speed = _root.randRange(1, 3) * dir;
isSnowing = false;
gotoAndStop(1);
_y = _root.randRange(10, 210);
if (dir == -1) {
_x = _root.randRange(min, max);
} else {
_x = _root.randRange(600 - max, 600 - min);
}
}
function resetCloud() {
}
function updatePos() {
_x = _x + speed;
if (((dir == -1) && (_x < -55)) || ((dir == 1) && (_x > 650))) {
setCloud(650, 700);
}
}
function hit() {
var _local3 = 20 + (int((200 - _y) / 10) * 5);
trace(_local3);
pts_mc.ptsGFX_mc.ptsTXT.text = _local3;
pts_mc.play();
_root.score = _root.score + _local3;
isSnowing = true;
(gotoAndStop(2));// not popped
_root.cloudCount++;
_root.bellSnd.start();
_root.snowLevel = _root.snowLevel + 8;
if (_root.snowLevel > 100) {
_root.snowLevel = 100;
}
}
var dir = 0;
}
Symbol 182 MovieClip [__Packages.Bullet] Frame 0
class Bullet extends MovieClip
{
var _y, _x, isFalling, jumpHeight, xSpeed, onEnterFrame, gotoAndPlay, removeMovieClip, hitTest;
function Bullet () {
super();
_y = _root.man_mc._y;
if (_root.man_mc._xscale == 100) {
_x = _root.man_mc._x + 20;
} else {
_x = _root.man_mc._x - 30;
}
isFalling = false;
}
function fire(h) {
jumpHeight = 300 - (h * 8);
xSpeed = 1;
onEnterFrame = function () {
this.moveIt();
};
}
function moveIt() {
if (isFalling) {
if (_y < (jumpHeight + 25)) {
checkForCollision();
}
} else if (_y > (jumpHeight + 10)) {
_y = _y - ((_y - jumpHeight) / 10);
} else {
isFalling = true;
(gotoAndPlay(2));// not popped
_root.cloudCount = 0;
_root.poofSnd.start();
}
}
function destroy() {
_root.countClouds(_x, _y);
(removeMovieClip());// not popped
}
function checkForCollision() {
var _local4;
var _local3 = 0;
while (_local3 < _root.NUM_CLOUDS) {
_local4 = _root.cloudArr[_local3];
if (!_local4.isSnowing) {
if (hitTest(_local4.hit_mc)) {
_local4.hit();
}
}
_local3++;
}
}
}
Symbol 28 MovieClip Frame 1
stop();
Symbol 38 MovieClip Frame 1
stop();
Instance of Symbol 29 MovieClip "man" in Symbol 38 MovieClip Frame 1
/* no clip actions */
Instance of Symbol 37 MovieClip "man" in Symbol 38 MovieClip Frame 2
/* no clip actions */
Symbol 38 MovieClip Frame 14
gotoAndPlay ("walking");
Symbol 47 MovieClip [bullet_id] Frame 1
#initclip 4
Object.registerClass("bullet_id", Bullet);
#endinitclip
stop();
Symbol 47 MovieClip [bullet_id] Frame 13
this.destroy();
Symbol 59 MovieClip Frame 1
stop();
Symbol 64 MovieClip [cloud_ID] Frame 1
#initclip 3
Object.registerClass("cloud_ID", Cloud);
#endinitclip
stop();
clearInterval(snowInterval);
Symbol 64 MovieClip [cloud_ID] Frame 2
stop();
Symbol 97 MovieClip Frame 1
stop();
Instance of Symbol 29 MovieClip "man" in Symbol 97 MovieClip Frame 1
/* no clip actions */
Symbol 102 MovieClip Frame 1
stop();
Symbol 102 MovieClip Frame 13
stop();
Symbol 104 MovieClip Frame 1
introMan.meter_mc.gotoAndPlay(1);
Symbol 104 MovieClip Frame 61
introMan.man.man_top.play();
introMan.meter_mc.gotoAndStop(1);
Symbol 104 MovieClip Frame 83
ice.play();
Symbol 124 MovieClip Frame 1
stop();
Symbol 124 MovieClip Frame 2
stop();
Symbol 132 MovieClip Frame 9
this.stop();
Symbol 172 Button
on (release) {
if (_root.score > _root.scoretable.SCORE8) {
fMakeMe(_root.randRange(10, 20), _root.score, _root.randRange(1, 5), _root.buttonBar.nameVar);
_root.scoretable.filename = "snow_day";
_root.scoretable.winname = _root.buttonBar.nameVar;
_root.scoretable.winscore = _root.score;
_root.scoretable.c1 = cFore;
_root.scoretable.c2 = cBack;
_root.scoretable.c3 = cLeft;
_root.scoretable.loadVariables("http://www.thepencilfarm.com/games/scores/submitscore.php", "POST");
insertScore(_root.score, _root.buttonBar.nameVar);
}
_root.buttonBar.gotoAndStop(2);
_root.scoreEntered = true;
}
Symbol 177 MovieClip Frame 1
function fMakeMe(g, s, t, u) {
var _local1 = 1;
i = 0;
while (i < g) {
_local1 = _local1 + s;
i++;
}
_local1 = _local1 * u.length;
_local1 = _local1 + t;
cLeft = g;
cFore = t;
cBack = _local1;
}
function insertScore(s, n) {
trace("insertScore()");
var _local3 = false;
var _local2 = 0;
while (!_local3) {
if (s > _root.scoretable["SCORE" + _local2]) {
_root.scoretable["SCORE" + _local2] = s;
_root.scoretable["NAME" + _local2] = n;
_local3 = true;
trace("inserting");
}
_local2++;
if (_local2 > 8) {
_local3 = true;
}
}
}
this.stop();
var cLeft;
var cFore;
var cBack;
Symbol 177 MovieClip Frame 2
this.stop();