Instance of Symbol 53 MovieClip in Frame 1
onClipEvent (load) {
snowFlakes = 20;
stageWidth = 550;
stageHeight = 400;
snowSpeed = 0.11;
snowDistance = 10;
}
onClipEvent (load) {
this.swapDepths(200000);
}
Frame 2
if (_totalframes < _framesloaded) {
gotoAndPlay(_currentframe - 1);
} else {
play();
}
Frame 3
function reset() {
trace("remove");
var i = 0;
while (presentCount >= i) {
_root["mcPresent" + i].removeMovieClip();
i++;
}
mcCounter.removeMovieClip();
presentCount = 0;
presentCount2 = 0;
setScore(0);
}
reset();
stop();
Frame 117
function makePresent() {
setScore(presentCount++);
attachMovie("mcPresent", "mcPresent" + presentCount, presentCount);
var size = (50 + random(100));
this["mcPresent" + presentCount]._xscale = size;
this["mcPresent" + presentCount]._yscale = size;
this["mcPresent" + presentCount]._rotation = random(20) - 10;
var my_color = new Color(this["mcPresent" + presentCount]);
var col = random(7);
if (col == 0) {
var r = 150;
var g = 0;
var b = 0;
} else if (col == 1) {
var r = 0;
var g = 150;
var b = 0;
} else if (col == 2) {
var r = 0;
var g = 0;
var b = 150;
} else if (col == 3) {
var r = -20;
var g = 100;
var b = 100;
} else if (col == 4) {
var r = 150;
var g = 0;
var b = 150;
} else if (col == 5) {
var r = 100;
var g = 100;
var b = -10;
} else if (col == 6) {
var r = 50;
var g = 50;
var b = 50;
}
var myColorTransform = {ra:100, rb:r, ga:100, gb:g, ba:100, bb:b, aa:100, ab:0};
my_color.setTransform(myColorTransform);
var flip = random(2);
if (flip == 0) {
this["mcPresent" + presentCount]._xscale = (-size) - (random(20) - 10);
}
movePressie = 0;
do {
this["mcPresent" + presentCount]._x = random(500) + 25;
this["mcPresent" + presentCount]._y = random(350) + 25;
var i = 0;
while (i < presentCount) {
var onAnotherPresent = this["mcPresent" + presentCount].hitTest(this["mcPresent" + i]);
if (onAnotherPresent) {
break;
}
movePressie++;
if (100 < movePressie) {
break;
}
i++;
}
} while (onAnotherPresent);
}
function done() {
clearInterval(ivDone);
gotoAndStop ("hiscore");
}
function timer() {
var goto = int((getTimer() - startTime) / 10);
mcTimer.gotoAndStop(goto);
if (500 < goto) {
clearInterval(ivTimer);
}
}
t = 0;
ivDone = setInterval(done, 5000);
startTime = getTimer();
ivTimer = setInterval(timer, 31);
stop();
Instance of Symbol 33 MovieClip [mcPresent] in Frame 117
onClipEvent (load) {
_visible = false;
}
onClipEvent (mouseDown) {
_parent.makePresent();
}
Frame 126
attachMovie("mcCounter", "mcCounter", 100000);
play();
Frame 156
function countPresents() {
mcCounter.txtCounter = presentCount2;
mcCounter.txtCounter2 = presentCount2;
_root["mcPresent" + presentCount2].gotoAndPlay("count");
presentCount2++;
if (presentCount < presentCount2) {
mcCounter.gotoAndStop("done");
clearInterval(ivCountPresents);
}
}
var presentCount2 = 0;
ivCountPresents = setInterval(countPresents, 150);
stop();
Symbol 15 Button
on (release) {
_parent.gotoAndPlay("start");
}
Symbol 17 MovieClip Frame 1
this._visible = false;
Symbol 27 Button
on (release) {
gameURL = ("http://www.miniclip.com/games/" + gamename) + "/en/";
trace("Going to game: " + gameURL);
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 29 MovieClip Frame 1
System.security.allowDomain("www.miniclip.com");
Instance of Symbol 17 MovieClip "mcHighscores" in Symbol 29 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 29 MovieClip Frame 2
if (scoreLocation == undefined) {
trace(("*** Miniclip Highscore Component: scoreLocation (" + scoreLocation) + ") is undefined.");
}
if ((((_url.indexOf("miniclip.com") == -1) && (_url.indexOf("miniclip.net") == -1)) && (_url.indexOf("miniclip.co.uk") == -1)) && (_url.indexOf("miniclips.com"))) {
gotoAndStop(_currentframe + 1);
} else {
var noCache = (getTimer() + random(100000));
mcTarget.loadMovie("http://www.miniclip.com/swfcontent/highscore.swf?noCache=" + noCache);
stop();
}
Symbol 29 MovieClip Frame 3
stop();
Symbol 30 MovieClip [mcCounter] Frame 1
play();
Symbol 30 MovieClip [mcCounter] Frame 49
stop();
Instance of Symbol 29 MovieClip "comHighscores" in Symbol 30 MovieClip [mcCounter] Frame 50
onClipEvent (load) {
scoreLocation = "_root.presentCount";
gamename = "xmas";
saveScore = true;
scoreIsTime = false;
scoreReversed = false;
negativeScoreAllowed = false;
}
Symbol 33 MovieClip [mcPresent] Frame 9
stop();
Symbol 33 MovieClip [mcPresent] Frame 16
stop();
Symbol 47 Button
on (release) {
gotoAndPlay ("game");
}
Symbol 53 MovieClip Frame 1
function makeFlake(flake) {
flake._y = 0;
flake._x = random(stageWidth);
flake._y = random(stageHeight * 2) - (stageHeight * 2);
flake.size = random(50) + 50;
flake._xscale = flake.size;
flake._yscale = flake.size;
flake.originalPosition = flake._x;
flake.vin = (flake._x + random(10)) - 5;
flake.snowSpeed = snowSpeed * ((random(100) - 50) / 40);
flake.fallSpeed = random(snowSpeed * 30) + 1;
}
this._visible = false;
snowFall = new Array();
stageWidth = int(stageWidth);
stageHeight = int(stageHeight);
landedSnow = snowFlakes;
error = false;
if (((stageWidth == 0) or (stageHeight == 0)) && (mcTarget.getDepth() == undefined)) {
trace("MINICLIP.COM LOADING COMPONENT WARNING");
trace("======================================");
trace("The 'stageWidth' and 'stageHeight' parameters have not been set.");
trace("If you export Flash 5 content, these values MUST be set.");
mcInstructions._visible = true;
mcInstructions._x = 0;
mcInstructions._y = 0;
mcInstructions.gotoAndStop(2);
mcTarget._visible = false;
error = true;
} else if ((stageWidth == 0) or (stageHeight == 0)) {
stageWidth = Stage.width;
stageHeight = Stage.height;
}
if (error == false) {
i = 0;
while (i < snowFlakes) {
attachMovie("mcFlake", "mcFlake" + i, i);
var flakePath = eval (this["mcFlake" + i]._target);
makeFlake(flakePath);
i++;
}
} else {
stop();
}
this._visible = true;
Instance of Symbol 52 MovieClip "mcInfo" in Symbol 53 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 53 MovieClip Frame 3
i = 0;
while (i < snowFlakes) {
this["mcFlake" + i].y = (Math.sin(this["mcFlake" + i].vin) * snowDistance) + this["mcFlake" + i].originalPosition;
this["mcFlake" + i]._x = snowDistance + this["mcFlake" + i].y;
this["mcFlake" + i]._y = this["mcFlake" + i]._y + this["mcFlake" + i].fallSpeed;
this["mcFlake" + i].vin = this["mcFlake" + i].vin + this["mcFlake" + i].snowSpeed;
if ((stageHeight + 10) < this["mcFlake" + i]._y) {
var flakePath = eval (this["mcFlake" + i]._target);
makeFlake(flakePath);
}
i++;
}
gotoAndPlay(_currentframe - 1);
Symbol 63 MovieClip Frame 32
stop();