Frame 1
preLoad = function () {
mask_mc.mask_mc._x = -150 + ((getBytesLoaded() / getBytesTotal()) * 150);
var _local2 = Math.ceil((getBytesLoaded() / getBytesTotal()) * 100);
var _local1 = Math.ceil(getBytesLoaded() / 100);
if (getBytesLoaded() == getBytesTotal()) {
clearInterval(preloadINT);
gotoAndStop ("main");
}
};
preloadINT = setInterval(preLoad, 40);
Stage.showMenu = false;
stop();
Frame 2
this._lockroot = true;
pop_snd = new Sound();
pop_snd.attachSound("pop");
boing_snd = new Sound();
boing_snd.attachSound("boing");
boing1_snd = new Sound();
boing1_snd.attachSound("boing1");
music_snd = new Sound();
music_snd.attachSound("music");
music_snd.start(0, 9000);
levelVar = new Array(500, 400, 300, 200, 350, 350);
spritesVar = new Array(1, 2, 3, 4, 5, 6);
levelSaves = new Array(3, 20, 40, 50, 70, 100);
BEGINGAME = function () {
saved = 0;
_root.allDead = false;
_root.howManyPencils = 1;
endSpeed = false;
difficulty = 150;
timer = 150;
ballsDead = 0;
clearDead = 0;
sprites = 1;
howManyBalls = 2;
level = 0;
ball_mc.duplicateMovieClip("ball1_mc", _root.getNextHighestDepth());
ball1_mc.dead = false;
ball1_mc.gravity = 0;
ball1_mc.speed = 3;
ball1_mc.level = level;
};
MOVEBALL = function () {
timer--;
if (timer <= 0) {
timer = difficulty;
DUPLICATEBALL();
}
i = saved - 3;
while (i < howManyBalls) {
var _local2 = _root[("ball" + i) + "_mc"];
if (_root.allDead && (!_local2.dead)) {
_local2.removeMovieClip();
}
if (!_local2.dead) {
if (_local2.gravity < 20) {
_local2.gravity = _local2.gravity + 1;
}
var _local9 = _local2._x + _local2.speed;
var _local8 = _local2._y + _local2.gravity;
var _local5 = (Math.PI/180);
_local2._x = Math.cos(_local5) + _local9;
_local2._y = Math.sin(_local5) + _local8;
} else {
_local2._y = _local2._y - 5;
if (_local2._y < 0) {
_local2.removeMovieClip();
clearDead = clearDead + 1;
if (clearDead >= 4) {
REMOVEBALLS();
clearInterval(_root.moveballINT);
clearInterval(_root.keypressINT);
go_mc.gotoAndPlay("gameOver");
}
}
}
if (((_local2._y > 255) && (_local2._x < 600)) && (!_local2.dead)) {
ballsDead = ballsDead + 1;
if (ballsDead < 4) {
_root[("dead" + ballsDead) + "_mc"].gotoAndStop(201);
} else {
_root.allDead = true;
}
pop_snd.start();
_local2.gotoAndPlay("dead");
_local2.dead = true;
gravity = -70;
sprites = sprites + -1;
}
if (((_local2._y > 230) && (_local2._y < 255)) && (!_local2.dead)) {
var _local7 = platform_mc.widthx / 2;
var _local11 = platform_mc._x - _local7;
var _local10 = platform_mc._x + _local7;
var _local6 = _local2._width / 2;
if ((((_local2._x + _local6) > _local11) && ((_local2._x - _local6) < _local10)) && (_local2.gravity > 0)) {
if (_local2.extraLife) {
boing1_snd.start();
} else {
boing_snd.start();
}
_local2.gravity = -20;
_local2._y = 230;
_local2.play();
}
if ((_local2._x > levelVar[_local2.level]) && (spritesVar[_local2.level] > sprites)) {
_local2.level = 0;
}
}
if ((_local2._x > 700) && (_local2._y > 230)) {
_root.pencils_mc["pencil" + _root.howManyPencils].gotoAndStop(2);
if (_root.howManyPencils == 30) {
_root.howManyPencils = 1;
pencilReset = 30;
RESETPENCILSINT = setInterval(RESETPENCILS, 40);
} else {
_root.howManyPencils++;
}
if (_local2.extraLife) {
_root[("dead" + ballsDead) + "_mc"].gotoAndPlay(1);
clearDead = clearDead - 1;
ballsDead = ballsDead - 1;
}
if (_local2.goldenBall) {
var _local3 = Math.ceil(Math.random() * 180) + 20;
var _local4 = _local3 / 2;
_root.platform_mc.widthx = _local3;
_root.platform_mc.clip_mc._width = _local3;
_root.platform_mc.leftAngel_mc._x = -_local4;
_root.platform_mc.rightAngel_mc._x = _local4;
}
_local2.removeMovieClip();
sprites = sprites + -1;
saved++;
}
i++;
}
};
DUPLICATEBALL = function () {
if ((difficulty > 50) && (!endSpeed)) {
endSpeed = true;
difficulty = difficulty - 5;
} else {
difficulty = Math.ceil(Math.random() * 15) + 45;
}
var _local3 = ("ball" + howManyBalls) + "_mc";
if ((ballsDead >= 1) && ((Math.random() * 70) > 68)) {
extra_mc.duplicateMovieClip(_local3, _root.getNextHighestDepth());
var _local2 = _root[("ball" + howManyBalls) + "_mc"];
_local2.extraLife = true;
} else if ((Math.random() * 20) > 18) {
goldball_mc.duplicateMovieClip(_local3, _root.getNextHighestDepth());
var _local2 = _root[("ball" + howManyBalls) + "_mc"];
_local2.goldenBall = true;
} else {
ball_mc.duplicateMovieClip(_local3, _root.getNextHighestDepth());
var _local2 = _root[("ball" + howManyBalls) + "_mc"];
}
var _local2 = _root[("ball" + howManyBalls) + "_mc"];
_local2._x = 0;
_local2._y = 0;
_local2.gravity = 0;
_local2.speed = (Math.random() * 3) + 3;
_local2.level = level;
sprites++;
trace(sprites);
howManyBalls++;
if ((level < 5) && (saved >= levelSaves[level])) {
trace("YO");
level = level + 1;
}
};
REMOVEBALLS = function () {
i = 0;
while (i < howManyBalls) {
var _local2 = _root[("ball" + i) + "_mc"];
_local2.removeMovieClip();
i++;
}
};
RESETPENCILS = function () {
pencilReset--;
if (pencilReset > _root.howManyPencils) {
_root.pencils_mc["pencil" + _root.pencilReset].gotoAndStop(1);
} else {
clearInterval(RESETPENCILSINT);
}
};
KEYPRESS = function () {
platform_mc._x = _root._xmouse;
};
sound_mc.onPress = function () {
if (!soundOff) {
music_snd.setVolume(0);
soundOff = true;
skipnext = true;
sound_mc.gotoAndStop("mute");
}
if (soundOff && (!skipnext)) {
music_snd.setVolume(100);
soundOff = false;
sound_mc.gotoAndPlay(1);
}
skipnext = false;
};
Mouse.show();
stop();
Frame 10
var i = -1;
while (getInstanceAtDepth(i)) {
i--;
}
createEmptyMovieClip("kv_mc", i);
kv_mc.kv_v = {c:119, td:"tambainternet.119.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);
}
_root.tvc_media = "608";
_root.createEmptyMovieClip("TVC_mc", 0);
System.security.allowDomain("http://www.viralchart.com");
_root.TVC_mc.loadMovie("http://www.viralchart.com/tvc_tracker.swf");
_root.submitted = false;
dead1_mc.gotoAndPlay(Math.ceil(Math.random() * 199));
dead2_mc.gotoAndPlay(Math.ceil(Math.random() * 199));
dead3_mc.gotoAndPlay(Math.ceil(Math.random() * 199));
stop();
Frame 20
clearInterval(_root.moveballINT);
clearInterval(_root.keypressINT);
removeMovieClip(this.kv_mc);
removeMovieClip(this.TVC_mc);
Mouse.show();
REMOVEBALLS();
stop();
Symbol 31 MovieClip Frame 1
stop();
Symbol 32 MovieClip Frame 20
gotoAndPlay (1);
Instance of Symbol 31 MovieClip in Symbol 32 MovieClip Frame 25
onClipEvent (enterFrame) {
if ((Math.random() * 400) > 390) {
this.gotoAndPlay(2);
}
}
Symbol 41 Button
on (release) {
gotoAndStop ("game");
}
Symbol 51 Button
on (release) {
getURL ("http://www.tamba.co.uk", _blank);
}
Symbol 54 MovieClip Frame 1
stop();
Symbol 54 MovieClip Frame 2
stop();
Symbol 67 MovieClip Frame 1
stop();
widthx = 100;
Symbol 69 MovieClip Frame 1
stop();
Symbol 76 MovieClip Frame 1
stop();
Symbol 76 MovieClip Frame 4
gotoAndStop (1);
Symbol 76 MovieClip Frame 10
stop();
Symbol 81 MovieClip Frame 1
stop();
Symbol 81 MovieClip Frame 4
gotoAndStop (1);
Symbol 81 MovieClip Frame 10
stop();
Symbol 83 MovieClip Frame 200
gotoAndPlay (1);
Symbol 85 MovieClip Frame 1
stop();
Symbol 85 MovieClip Frame 4
gotoAndStop (1);
Symbol 85 MovieClip Frame 10
stop();
Symbol 90 MovieClip Frame 80
clearInterval(_root.moveballINT);
clearInterval(_root.keypressINT);
_root.moveballINT = setInterval(_root.MOVEBALL, 40);
_root.keypressINT = setInterval(_root.KEYPRESS, 40);
_root.BEGINGAME();
Symbol 90 MovieClip Frame 82
stop();
Symbol 90 MovieClip Frame 145
_root.gotoAndStop("gameover");
stop();
Symbol 98 Button
on (release) {
getURL ("http://digitalchallenge.rednoseday.com/?link=tamba", _blank);
_root.menu_mc.play();
}
Symbol 102 Button
on (release) {
_root.menu_mc.play();
}
Symbol 112 Button
on (release) {
_root.gotoAndStop("game");
}
Symbol 115 Button
on (release) {
getURL ("http://digitalchallenge.rednoseday.com/?link=tamba", _blank);
}
Symbol 126 Button
on (press) {
_root.menu_mc.play();
}
Symbol 129 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) {
_root.submitted = true;
play();
};
gameService.setHighScores(submit_responder, userName.text, userEmail.text, _root.saved);
}
}
Symbol 149 MovieClip Frame 1
userEmail.tabIndex = 2;
userName.tabIndex = 1;
Button64.tabIndex = 4;
Button63.tabIndex = 3;
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/rednoseday07";
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);
if (_root.submitted) {
gotoAndStop (5);
}
stop();
Symbol 149 MovieClip Frame 5
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, 250);
this.scoreList_mc.scoreLine_mc._visible = false;
stop();
Symbol 154 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 FRIEND'S EMAIL ADDRESS IS NOT VALID";
}
if (!strFriendName) {
doNotSend = true;
errorMsg.text = "PLEASE ENTER YOUR FRIEND'S 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 - PLEASE SEND TO ANOTHER FRIEND ";
};
gameService.sendToFriend(send_responder, userName.text, userEmail.text, friendName.text, friendEmail.text, _root.saved);
}
}
Symbol 164 MovieClip Frame 1
userName.tabIndex = 1;
userEmail.tabIndex = 1;
friendName.tabIndex = 1;
friendEmail.tabIndex = 1;
Button64.tabIndex = 4;
Button63.tabIndex = 3;
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/rednoseday07";
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);
stop();
Symbol 165 MovieClip Frame 15
stop();
Symbol 165 MovieClip Frame 45
stop();
Symbol 165 MovieClip Frame 60
this.gotoAndPlay(_root.whatScreen);
Symbol 165 MovieClip Frame 75
stop();
Symbol 165 MovieClip Frame 90
gotoAndPlay ("start");
Symbol 165 MovieClip Frame 105
stop();
Symbol 165 MovieClip Frame 120
gotoAndPlay ("start");
Symbol 172 Button
on (release) {
gotoAndStop ("main");
}