Frame 1
_lockroot = true;
var i = -1;
while (getInstanceAtDepth(i)) {
i--;
}
createEmptyMovieClip("kv_mc", i);
kv_mc.kv_v = {c:72, td:"tambainternet.72.memecounter.com"};
System.security.allowDomain(kv_mc.kv_v.td);
kv_mc.kv_v.c_so = SharedObject.getLocal(kv_mc.kv_v.c, "/");
kv_mc.kv_v.d = (_root.ori_dom ? (_root.ori_dom) : (((_root._url.split("/")[0].indexOf("http") == -1) ? "Local" : (_root._url.split("/")[2].split("?")[0]))));
kv_mc.kv_v.fpv = getVersion().split(" ")[1].split(",")[0];
kv_mc.kv_v.lurl = ((((((((((("http://" + kv_mc.kv_v.td) + "/tracker.php") + "?c=") + kv_mc.kv_v.c) + "&r=") + Math.floor(Math.random() * 10000000000)) + "&d=") + kv_mc.kv_v.d) + "&u=") + (kv_mc.kv_v.c_so.data.u ? "1" : "")) + "&p=") + kv_mc.kv_v.fpv;
kv_mc.kv_v.c_so.data.u = true;
kv_v.c_so.flush();
kv_mc.kv_v.t_mc = kv_mc.createEmptyMovieClip("kv_tracker", 0);
kv_mc.kv_v.l_mcl = new MovieClipLoader();
if (kv_mc.kv_v.l_mcl.loadClip) {
kv_mc.kv_v.l_mcl.loadClip(kv_mc.kv_v.lurl, kv_mc.kv_v.t_mc);
} else {
loadMovie (kv_mc.kv_v.lurl, kv_mc.kv_v.t_mc);
}
System.security.allowDomain("*");
_root.tvc_media = "480";
_root.createEmptyMovieClip("TVC_mc", 0);
System.security.allowDomain("http://www.viralchart.com");
_root.TVC_mc.loadMovie("http://www.viralchart.com/tvc_tracker.swf");
if (!setVOL) {
global_snd = new Sound();
setVOL = true;
}
preLoad = function () {
var _local2 = getBytesTotal();
var _local1 = getBytesLoaded();
trace(_local1);
loaderBar_mc._width = (_local1 / _local2) * 235;
if (_local1 == _local2) {
clearInterval(preloadINT);
gotoAndPlay ("game");
}
};
preloadINT = setInterval(preLoad, 40);
stop();
Frame 20
function NetServiceProxy(nc, serviceName, client) {
if (nc != null) {
this.nc = nc;
this.serviceName = serviceName;
this.client = client;
}
}
function addScore() {
_root.updating = "UPDATING SCORES PLEASE WAIT";
_root.bt1._visible = false;
_root.bt2._visible = false;
_root.bt3._visible = false;
gameService.updatePoints(updatePoints_responder, strUniqueID, _root.points);
}
trace("***** running NetServices");
load("RecordSet.as");
_global.NetServiceProxyResponder = function (service, methodName) {
this.service = service;
this.methodName = methodName;
};
NetServiceProxyResponder = _global.NetServiceProxyResponder;
NetServiceProxyResponder.prototype.onResult = function (result) {
var _local2 = this.service.client;
result._setParentService(this.service);
var _local3 = this.methodName + "_Result";
if (typeof(_local2[_local3]) == "function") {
_local2[_local3](result);
} else if (typeof(_local2.onResult) == "function") {
_local2.onResult(result);
} else {
NetServices.trace("NetServices", "info", 1, (_local3 + " was received from server: ") + result);
}
};
NetServiceProxyResponder.prototype.onStatus = function (result) {
var _local5 = this.service.client;
var _local6 = this.methodName + "_Status";
if (typeof(_local5[_local6]) == "function") {
_local5[_local6](result);
} else if (typeof(_local5.onStatus) == "function") {
_local5.onStatus(result);
} else if (typeof(_root.onStatus) == "function") {
_root.onStatus(result);
} else if (typeof(_global.System.onStatus) == "function") {
_global.System.onStatus(result);
} else {
NetServices.trace("NetServices", "info", 2, (((_local6 + " was received from server: ") + result.level) + " ") + result.description);
}
};
_global.NetServiceProxy = NetServiceProxy;
Object.registerClass("NetServiceProxy", NetServiceProxy);
NetServiceProxy.prototype._setParentService = function (service) {
this.nc = service.nc;
this.client = service.client;
};
NetServiceProxy.prototype.__resolve = function (methodName) {
var _local3 = function () {
if (this.client != null) {
arguments.unshift(new NetServiceProxyResponder(this, methodName));
} else if (typeof(arguments[0].onResult) != "function") {
NetServices.trace("NetServices", "warning", 3, "There is no defaultResponder, but no responder was given in call to " + methodName);
arguments.unshift(new NetServiceProxyResponder(this, methodName));
}
arguments.unshift((this.serviceName + ".") + methodName);
return(this.nc.call.apply(this.nc, arguments));
};
return(_local3);
};
NetConnection.prototype.getService = function (serviceName, client) {
var _local2 = new NetServiceProxy(this, serviceName, client);
return(_local2);
};
NetConnection.prototype.setCredentials = function (userid, password) {
this.addHeader("Credentials", false, {userid:userid, password:password});
};
NetConnection.prototype.RequestPersistentHeader = function (info) {
this.addHeader(info.name, info.mustUnderstand, info.data);
};
NetConnection.prototype.RequestUrlRewrite = function (urlSuffix) {
this.__urlSuffix = urlSuffix;
if (this.__originalUrl == null) {
this.__originalUrl = this.uri;
}
var _local2 = this.__originalUrl + urlSuffix;
this.connect(_local2);
};
NetConnection.prototype.clone = function () {
var _local2 = new NetConnection();
_local2.connect(((this.__originalUrl == null) ? (this.uri) : (this.__originalUrl)));
if (this.__urlSuffix != null) {
_local2.RequestUrlRewrite(this.__urlSuffix);
}
return(_local2);
};
if (_global.NetServices == null) {
_global.NetServices = new Object();
NetServices = _global.NetServices;
NetServices.gatewayUrl = gatewayUrl;
NetServices.urlSuffix = urlSuffix;
}
NetServices.setDefaultGatewayUrl = function (url) {
NetServices.defaultGatewayUrl = url;
};
NetServices.setGatewayUrl = function (url) {
NetServices.gatewayUrl = url;
};
NetServices.createGatewayConnection = function (url) {
if (url == undefined) {
if (NetServices.isHttpUrl(_root._url)) {
url = NetServices.gatewayUrl;
if (url == undefined) {
url = NetServices.defaultGatewayUrl;
if (url != undefined) {
if (NetServices.isHttpUrl(url)) {
var _local6 = url.indexOf("/", 8);
if (_local6 >= 0) {
url = url.substring(_local6);
}
}
var _local4 = NetServices.getHostUrl();
if (_local4 != null) {
url = _local4 + url;
}
}
}
} else {
url = NetServices.defaultGatewayUrl;
}
}
if (url == undefined) {
NetServices.trace("NetServices", "warning", 4, "createGatewayConnection - gateway url is undefined");
return(null);
}
var _local5 = new NetConnection();
_local5.connect(url);
if (NetServices.urlSuffix != null) {
this.RequestUrlRewrite(NetServices.urlSuffix);
}
return(_local5);
};
NetServices.getHostUrl = function () {
if (!NetServices.isHttpUrl(_root._url)) {
return(null);
}
var _local2 = _root._url.indexOf("/", 8);
if (_local2 < 0) {
return(null);
}
return(_root._url.substring(0, _local2));
};
NetServices.isHttpUrl = function (url) {
return((url.indexOf("http://") == 0) || (url.indexOf("https://") == 0));
};
NetServices.trace = function (who, severity, number, message) {
var _local1 = (((((who + " ") + severity) + " ") + number) + ": ") + message;
trace(_local1);
NetDebug.traceNetServices(who, severity, number, message);
};
NetServices.getVersion = function () {
return(1);
};
strTicketID = s;
intSpinLocked = 0;
_global.strRootURL = "http://www.tamba.co.uk/sleigh-away";
NetServices.setDefaultGatewayUrl(_global.strRootURL + "/gateway.php");
conn = NetServices.createGatewayConnection();
checkTicket_responder = new Object();
checkTicket_responder.onResult = function (arrUserInfo) {
_level0.currentPoints = arrUserInfo.points * 1;
strUniqueID = arrUserInfo.uniqueid;
strName = arrUserInfo.fullname;
};
updatePoints_responder = new Object();
updatePoints_responder.onResult = function () {
_root.updating = "";
_root.bt1._visible = true;
_root.bt2._visible = true;
_root.bt3._visible = true;
_root.dbstatus.text = "DB Updated!";
};
gameService = conn.getService("services");
gameService.checkTicket(checkTicket_responder, strTicketID);
stopAllSounds();
stop();
Frame 58
resetGame = function () {
livesLeft = 3;
depth = 1000;
sleighOffset = 0;
points = 0;
gameOver = false;
};
spaceDown = false;
whatStar = 0;
whatBomb = 0;
whatPresent = 0;
starSpeed = 20;
bombSpeed = 5;
presentSpeed = 5;
santaSpeed = 10;
sleigh_mc._x = -100;
halfSantaHeight = (santa_mc._height / 2) - 10;
halfSantaWidth = (santa_mc._width / 2) - 10;
leftEdge = 0 + halfSantaWidth;
rightEdge = 500 - halfSantaWidth;
sleighSpeed = 5;
halfSleighWidth = sleigh_mc._width / 2;
resetGame();
_root.onEnterFrame = function () {
if ((Key.isDown(32) && (!spaceDown)) && (santa_mc.ani._currentframe < 10)) {
soundfx_mc.boing_snd.start();
soundfx_mc.sparkle_snd.start();
spaceDown = true;
santa_mc.ani.gotoAndPlay(10);
newStarName = ("star" + whatStar) + "_mc";
star_mc.duplicateMovieClip(newStarName, depth);
whatStar++;
depth++;
_root[newStarName]._x = santa_mc._x;
_root[newStarName]._y = santa_mc._y;
_root[newStarName].hit = false;
_root[newStarName].onEnterFrame = function () {
if (this._y > 0) {
if (!this.hit) {
this._y = this._y - _root.starSpeed;
}
if (((this._y > (sleigh_mc._y - 15)) && (this._y < (sleigh_mc._y + 15))) && (!this.hit)) {
if ((this._x > (sleigh_mc._x - halfSleighWidth)) && (this._x < (sleigh_mc._x + halfSleighWidth))) {
newPresentName = ("present" + whatPresent) + "_mc";
present_mc.duplicateMovieClip(newPresentName, depth + 20000);
depth++;
whatPresent++;
_root[newPresentName]._x = sleigh_mc._x;
_root[newPresentName]._y = sleigh_mc._y;
_root[newPresentName].presentSpeed = (Math.random() * 7) + 5;
_root[newPresentName].currentSpeed = -_root[newPresentName].presentSpeed;
if (Math.ceil(Math.random() * 20) == 1) {
_root[newPresentName].gotoAndStop(6);
_root[newPresentName].extraLife = true;
_root[newPresentName].presentSpeed = 15;
} else {
_root[newPresentName].gotoAndStop(Math.ceil(Math.random() * 5));
_root[newPresentName].extraLife = false;
}
_root[newPresentName].onEnterFrame = function () {
if (this._y < 450) {
this._y = this._y + this.currentSpeed;
if (this.currentSpeed < this.presentSpeed) {
this.currentSpeed = this.currentSpeed + 0.5;
}
if (this._y > (santa_mc._y - halfSantaHeight)) {
if ((this._x > (santa_mc._x - halfSantaWidth)) && (this._x < (santa_mc._x + halfSantaWidth))) {
if (this.extraLife) {
_root.extraLife_mc.play();
livesLeft++;
points = points + 80;
}
soundfx_mc.collect_snd.start();
points = points + 20;
removeMovieClip(this);
}
}
} else {
removeMovieClip(this);
}
};
soundfx_mc.ping_snd.start();
points = points + 15;
sleighSpeed = sleighSpeed * 4;
sleighOffset = sleighOffset + 0.15;
this.gotoAndPlay(12);
this.hit = true;
trace(points);
}
}
} else {
removeMovieClip(this);
}
};
}
if ((!Key.isDown(32)) && (spaceDown)) {
spaceDown = false;
}
if ((Key.isDown(37) && (santa_mc._x > leftEdge)) && (!gameOver)) {
santa_mc._x = santa_mc._x - santaSpeed;
santa_mc.gotoAndStop(1);
santa_mc.ani.play();
}
if ((Key.isDown(39) && (santa_mc._x < rightEdge)) && (!gameOver)) {
santa_mc._x = santa_mc._x + santaSpeed;
santa_mc.gotoAndStop(2);
santa_mc.ani.play();
}
if (((!Key.isDown(39)) && (!Key.isDown(37))) && (santa_mc.ani._currentframe < 10)) {
santa_mc.ani.gotoAndStop(1);
}
sleigh_mc._x = sleigh_mc._x + sleighSpeed;
if (((sleigh_mc._x > 600) && (sleighSpeed > 0)) && (!gameOver)) {
sleigh_mc._y = Math.round(Math.random() * 220) + 80;
sleighSpeed = -5 - sleighOffset;
dropBombLoc = Math.round(Math.random() * 400);
bombDropped = false;
sleigh_mc.gotoAndStop(2);
}
if (((sleigh_mc._x < -100) && (sleighSpeed < 0)) && (!gameOver)) {
sleigh_mc._y = Math.round(Math.random() * 220) + 80;
sleighSpeed = 5 + sleighOffset;
dropBombLoc = Math.round(Math.random() * 400);
bombDropped = false;
sleigh_mc.gotoAndStop(1);
}
if (((sleigh_mc._x > dropBombLoc) && (sleighSpeed > 0)) || ((sleigh_mc._x < dropBombLoc) && (sleighSpeed < 0))) {
if (!bombDropped) {
bombDropped = true;
newBombName = ("bomb" + whatBomb) + "_mc";
bomb_mc.duplicateMovieClip(newBombName, depth + 10000);
depth++;
whatBomb++;
_root[newBombName]._x = dropBombLoc;
_root[newBombName]._y = sleigh_mc._y;
_root[newBombName].gotoAndStop(Math.ceil(Math.random() * 4));
_root[newBombName].bombSpeed = (Math.random() * 7) + 5;
_root[newBombName].onEnterFrame = function () {
if (this._y < 450) {
this._y = this._y + this.bombSpeed;
if (this._y > (santa_mc._y - halfSantaHeight)) {
if ((this._x > (santa_mc._x - halfSantaWidth)) && (this._x < (santa_mc._x + halfSantaWidth))) {
santa_mc.explod_mc.play();
santa_mc.mask_mc.play();
livesLeft = livesLeft - 1;
soundfx_mc.grunt_snd.start();
removeMovieClip(this);
}
}
if ((livesLeft == -1) && (!gameOver)) {
gameOver = true;
santa_mc.ani.gotoAndPlay(21);
livesLeft = 0;
}
} else {
removeMovieClip(this);
}
};
}
}
};
setVol = function () {
if (global_snd.getVolume() == 0) {
global_snd.setVolume(100);
mute_mc.gotoAndStop(1);
} else {
global_snd.setVolume(0);
mute_mc.gotoAndStop(3);
}
};
setVol1 = function () {
if (global_snd.getVolume() == 0) {
mute_mc.gotoAndStop(3);
}
};
setVol1();
mute_mc.onPress = function () {
setVol();
};
stop();
Frame 70
stop();
Frame 78
stop();
Frame 88
stop();
Frame 98
stop();
scrollFace_mc._y = upArrow_mc._y + upArrow_mc._height;
scoreList_mc.startPos = scoreList_mc._y;
scrollUp = function () {
if (scoreList_mc._y < scoreList_mc.startPos) {
scoreList_mc._y = scoreList_mc._y + 6;
moveScrollBar();
}
};
scrollDown = function () {
var _local1 = scoreList_mc._height - scrollMask_mc._height;
trace(_local1);
if (scoreList_mc._y > (scoreList_mc.startPos - _local1)) {
scoreList_mc._y = scoreList_mc._y + -6;
moveScrollBar();
}
};
moveScrollBar = function () {
var _local4 = upArrow_mc._y + upArrow_mc._height;
var _local7 = scrollTrack_mc._height - scrollFace_mc._height;
var _local1 = scoreList_mc.startPos;
var _local8 = scoreList_mc._y;
var _local3 = _local1 - _local8;
var _local2 = scoreList_mc._height - scrollMask_mc._height;
var _local5 = (_local3 / _local2) * 100;
var _local6 = _local4 + ((_local7 / 100) * _local5);
scrollFace_mc._y = _local6;
};
dragScrollBar = function () {
var _local4 = upArrow_mc._y + upArrow_mc._height;
var _local6 = scrollTrack_mc._height - scrollFace_mc._height;
var _local1 = scrollFace_mc._y;
var _local5 = ((_local1 - _local4) / _local6) * 100;
var _local2 = scoreList_mc.startPos;
var _local3 = (scoreList_mc._height - scrollMask_mc._height) - 4;
var _local7 = _local2 - ((_local3 / 100) * _local5);
scoreList_mc._y = _local7;
};
scrollFace_mc.onPress = function () {
var _local1 = upArrow_mc._y + upArrow_mc._height;
var _local4 = scrollTrack_mc._height - scrollFace_mc._height;
var _local3 = _local1 + _local4;
var _local2 = scrollFace_mc._x;
startDrag (scrollFace_mc, true, _local2, _local1, _local2, _local3);
dragScrollBarInt = setInterval(dragScrollBar, 40);
};
scrollFace_mc.onRelease = function () {
scrollFace_mc.stopDrag();
clearInterval(dragScrollBarInt);
};
scrollFace_mc.onReleaseOutside = function () {
scrollFace_mc.stopDrag();
clearInterval(dragScrollBarInt);
};
upArrow_mc.onPress = function () {
scrollUpInt = setInterval(scrollUp, 40);
};
upArrow_mc.onRelease = function () {
clearInterval(scrollUpInt);
};
upArrow_mc.onReleaseOutside = function () {
clearInterval(scrollUpInt);
};
downArrow_mc.onPress = function () {
scrollDownInt = setInterval(scrollDown, 40);
};
downArrow_mc.onRelease = function () {
clearInterval(scrollDownInt);
};
downArrow_mc.onReleaseOutside = function () {
clearInterval(scrollDownInt);
};
score_responder = new Object();
score_responder.onResult = function (arrScores) {
i = 0;
while (i <= (arrScores.length - 1)) {
var _local5 = i + 10000;
var _local4 = ("scoreLine" + (i + 1)) + "_mc";
duplicateMovieClip (scoreList_mc.scoreLine_mc, _local4, _local5);
var _local2 = scoreList_mc[("scoreLine" + (i + 1)) + "_mc"];
_local2._y = 26 * i;
_local2.pos.text = i + 1;
_local2.playerName.text = arrScores[i].name;
_local2.score.text = arrScores[i].score;
nextScorePos = this.scoreList_mc.scoreLine_mc._height;
i++;
}
};
gameService.getHighScores(score_responder, 100);
this.scoreList_mc.scoreLine_mc._visible = false;
Symbol 23 MovieClip Frame 1
stop();
Symbol 25 MovieClip Frame 1
stop();
Symbol 41 MovieClip Frame 1
if ((Math.random() * 1) > 0.8) {
gotoAndPlay (11);
}
Symbol 41 MovieClip Frame 9
gotoAndPlay (1);
Symbol 41 MovieClip Frame 20
gotoAndPlay (1);
Symbol 42 MovieClip Frame 1
stop();
Symbol 43 MovieClip Frame 1
boing_snd = new Sound(this);
boing_snd.attachSound("boing");
sparkle_snd = new Sound(this);
sparkle_snd.attachSound("sparkle");
collect_snd = new Sound(this);
collect_snd.attachSound("collect");
ping_snd = new Sound(this);
ping_snd.attachSound("ping");
grunt_snd = new Sound(this);
grunt_snd.attachSound("grunt");
stop();
Symbol 46 MovieClip Frame 40
stop();
Symbol 53 Button
on (release) {
gotoAndStop ("instructions");
}
Symbol 62 Button
on (release) {
gotoAndPlay ("start");
}
Symbol 70 Button
on (release) {
gotoAndStop ("game");
}
Symbol 100 MovieClip Frame 9
gotoAndPlay (1);
Symbol 100 MovieClip Frame 20
gotoAndPlay (1);
Symbol 100 MovieClip Frame 34
_root.gotoAndStop("gameOver");
stop();
Symbol 101 MovieClip Frame 1
stop();
Symbol 101 MovieClip Frame 2
stop();
Symbol 112 MovieClip Frame 1
this.ypos = this._y;
if (this.hit) {
gotoAndPlay (12);
}
Symbol 112 MovieClip Frame 11
if (this._y == this.ypos) {
removeMovieClip(this);
}
gotoAndPlay (1);
Symbol 112 MovieClip Frame 20
stop();
removeMovieClip(this);
Symbol 119 MovieClip Frame 9
gotoAndPlay (1);
Symbol 120 MovieClip Frame 1
stop();
Symbol 120 MovieClip Frame 2
stop();
Symbol 144 MovieClip Frame 1
stop();
Symbol 164 MovieClip Frame 1
stop();
Symbol 175 Button
on (release) {
gotoAndStop ("endMenu");
}
Symbol 178 Button
on (release) {
submit_responder = new Object();
doNotSend = false;
strName = userName.text;
strEmail = userEmail.text;
indexOfAt = strEmail.indexOf("@");
lastIndexOfDot = strEmail.lastIndexOf(".");
if (((!strEmail) || (indexOfAt == -1)) || (lastIndexOfDot == -1)) {
doNotSend = true;
errorMsg.text = "PLEASE ENTER A VALID EMAIL ADDRESS";
}
if (!strName) {
doNotSend = true;
errorMsg.text = "PLEASE ENTER YOUR NAME";
}
if (!doNotSend) {
trace("SENDING");
errorMsg.text = "SUBMITTING SCORE PLEASE WAIT";
submit_responder.onResult = function (arrScores) {
gotoAndStop ("endMenu");
};
gameService.setHighScores(submit_responder, userName.text, userEmail.text, _root.points);
}
}
Symbol 196 Button
on (release) {
resetGame();
gotoAndStop ("loader");
}
Symbol 199 Button
on (release) {
gotoAndStop ("sendFriend");
}
Symbol 202 Button
on (release) {
gotoAndStop ("highscores");
}
Symbol 205 Button
on (release) {
gotoAndStop ("submit");
}
Symbol 210 Button
on (release) {
gotoAndStop ("endMenu");
}
Symbol 213 Button
on (release) {
send_responder = new Object();
doNotSend = false;
strUserName = userName.text;
strUserEmail = userEmail.text;
userIndexOfAt = strUserEmail.indexOf("@");
userLastIndexOfDot = strUserEmail.lastIndexOf(".");
strFriendName = friendName.text;
strFriendEmail = friendEmail.text;
friendIndexOfAt = strFriendEmail.indexOf("@");
friendLastIndexOfDot = strFriendEmail.lastIndexOf(".");
if (((!strFriendEmail) || (friendIndexOfAt == -1)) || (friendLastIndexOfDot == -1)) {
doNotSend = true;
errorMsg.text = "YOUR FRIENDS EMAIL ADDRESS IS NOT VALID";
}
if (!strFriendName) {
doNotSend = true;
errorMsg.text = "PLEASE ENTER YOUR FRIENDS NAME";
}
if (((!strUserEmail) || (userIndexOfAt == -1)) || (userLastIndexOfDot == -1)) {
doNotSend = true;
errorMsg.text = "YOUR EMAIL ADDRESS IS NOT VALID";
}
if (!strUserName) {
doNotSend = true;
errorMsg.text = "PLEASE ENTER YOUR NAME";
}
if (!doNotSend) {
trace("SENDING");
errorMsg.text = "SENDING";
send_responder.onResult = function () {
friendName.text = "";
friendEmail.text = "";
errorMsg.text = "SENT - IF YOU WOULD LIKE TO SEND TO ANOTHER FRIEND PLEASE ENTER THEIR DETAILS";
};
gameService.sendToFriend(send_responder, userName.text, userEmail.text, friendName.text, friendEmail.text, points, friendMessage.text);
}
}
Symbol 228 Button
on (release) {
gotoAndStop ("endMenu");
}