Frame 1
stop();
Instance of Symbol 55 MovieClip in Frame 1
on (press) {
getURL ("http://games.cublo.com", "_blank");
}
Frame 2
function playsound(which, vol) {
myvol = vol;
if (myvol == null) {
myvol = 100;
}
eventsound.attachSound(which);
eventsound.setVolume(myvol);
eventsound.start();
}
function createtunel() {
tuncounter = 1;
tuninterval = random(5) + 5;
tuninit = tunend;
if (hardness < 180) {
hardness = hardness + 4;
}
tunend = (hardness / 2) - random(hardness);
tuncurveBack = tuncurve;
tuncurve = (tunend - tuninit) / tuninterval;
if (Math.abs(tuncurve) > 20) {
tuncurve = tuncurve * 0.8;
}
}
function startgame() {
Weapon = 1;
Pill.gotoAndPlay(1);
resurging = false;
Lives = 3;
for (L in LivesBox) {
if (L > Lives) {
LivesBox[L]._visible = false;
} else {
LivesBox[L]._visible = true;
}
}
Scounter = 0;
Rcount = 0;
hardness = (tuninit = (tuncurve = (tuncounter = (obstaclecounter = 0))));
Wall = 1;
tunnel._rotation = (tunnel._r = 0);
Wcount = 0;
for (n in tunnel) {
tunnel[n].down.gotoAndStop(Wall);
tunnel[n].up.gotoAndStop(Wall);
}
tunnel._y = -7.4;
playsound("spawn");
sndtrack.stop();
sndtrack.start(0, 9999);
tunend = 0;
tunstored = 0;
tuninterval = 0;
for (n in tunnel) {
tunnel[n]._y = 0;
tunnel[n].gift.gotoAndStop(1);
}
playing = true;
plane.gotoAndStop(1);
Top100.Hide();
maxtimebox.gotoAndStop(1);
plane._y = planey;
plane._x = planex;
plane._rotation = (yvel = 0);
nube1._y = nube1y;
nube2._y = nube2y;
fondo.play();
n = 1;
while (n <= 2) {
nube1.generate(n);
nube2.generate(n);
n++;
}
enemies._y = enemiesy;
enemies._x = enemiesx;
enemies.generate();
msg.txt = "LEFT MOUSE BUTTON TO FLY";
msg.play();
falling = false;
Score = (minutes = (seconds = (milliseconds = 0)));
plane.onEnterFrame = function () {
if ((yvel <= maxspeed) or falling) {
yvel = yvel + gravity;
}
smoke = false;
n = 1;
while (n <= 6) {
if ((eval ("humo" + n)._x < -4) and (!smoke)) {
eval ("humo" + n)._x = plane._x - 20;
eval ("humo" + n)._y = plane._y;
eval ("humo" + n)._xscale = (eval ("humo" + n)._yscale = random(100) + 50);
eval ("humo" + n)._alpha = 60;
smoke = true;
}
eval ("humo" + n)._xscale = (eval ("humo" + n)._yscale = eval ("humo" + n)._yscale + 20);
eval ("humo" + n)._alpha = eval ("humo" + n)._alpha - 5;
eval ("humo" + n)._x = eval ("humo" + n)._x - xvel;
if (eval ("misil" + n)._x < 410) {
misilvel[n]++;
eval ("misil" + n)._x = eval ("misil" + n)._x + misilvel[n];
for (t in tunnel) {
if (eval ("misil" + n).hitTest(tunnel[t].gift)) {
if (tunnel[t].gift.wall == false) {
tunnel[t].gift.gotoAndStop(1);
} else {
tunnel[t].gift.sprite.anim.play();
}
Val = 245 + random(1000);
Score = Score + Val;
Scounter = Scounter + Val;
eval ("misil" + n).play();
}
}
}
n++;
}
if (!falling) {
if ((Key.isDown(38) or (fly == true)) and (yvel >= (-maxspeed))) {
yvel = yvel - (gravity * 2.2);
}
if (plane._y > 280) {
plane._y = 280;
falling = true;
}
if (plane._y < 20) {
plane._y = 20;
falling = true;
}
for (n in tunnel) {
tunnel[n]._x = tunnel[n]._x - xvel;
if (tunnel[n]._x < -3) {
tunnel[n]._x = tunnel[n]._x + 451;
if (Wall == "rand") {
tunnel[n].down.gotoAndStop(random(2) + 2);
tunnel[n].up.gotoAndStop(random(2) + 2);
} else {
tunnel[n].down.gotoAndStop(Wall);
tunnel[n].up.gotoAndStop(Wall);
}
tunnel[n].gift.gotoAndStop(1);
obstaclecounter++;
if (obstaclecounter > obstacleinterval) {
obstaclecounter = 0;
if (random(2) == 0) {
if (Wall == "rand") {
tunnel[n].gift.gotoAndStop(random(2) + 2);
} else {
tunnel[n].gift.gotoAndStop(Wall + 1);
}
tunnel[n].gift._y = random(150) + 80;
}
}
tuncounter++;
if (tuncounter > tuninterval) {
createtunel();
}
tunnel[n]._y = tuninit + (tuncurve * tuncounter);
} else if ((plane.hitTest(tunnel[n].up) or plane.hitTest(tunnel[n].down)) or plane.hitTest(tunnel[n].gift)) {
KILL();
}
}
} else {
fallingcounter++;
if (fallingcounter == 1) {
sndtrack.stop();
plane.gotoAndStop("shield");
playsound("dead", 30);
} else if (fallingcounter > 100) {
msg.gotoAndStop(1);
fallingcounter = 0;
Top100.New();
playing = false;
if (Score > maxScore) {
maxScore = Score;
showmaxtime = showtime;
maxtimebox.gotoAndStop(2);
}
delete plane.onEnterFrame;
}
}
if (plane._y < 30) {
falling = true;
}
if (plane._y > 380) {
falling = true;
}
milliseconds++;
Score = Score + 7;
Scounter = Scounter + 7;
if (Scounter > 40000) {
Scounter = Scounter - 40000;
playsound("addlife");
Lives++;
for (L in LivesBox) {
if (L > Lives) {
LivesBox[L]._visible = false;
} else {
LivesBox[L]._visible = true;
}
}
}
if (milliseconds > 60) {
milliseconds = 0;
seconds++;
if ((++Wcount) == 7) {
Wcount = 0;
if (Wall == "rand") {
Wall = 1;
} else if ((++Wall) > 3) {
Wall = "rand";
}
tunnel._r = random(10) - 5;
}
if (seconds > 60) {
seconds = 0;
minutes++;
if (minutes > 60) {
minutes = 0;
}
}
}
if (milliseconds < 10) {
showmilliseconds = "0" + milliseconds;
} else {
showmilliseconds = milliseconds;
}
if (seconds < 10) {
showseconds = "0" + seconds;
} else {
showseconds = seconds;
}
if (minutes < 10) {
showminutes = "0" + minutes;
} else {
showminutes = minutes;
}
showtime = (((showminutes + ":") + showseconds) + ":") + milliseconds;
if (resurging) {
if ((--Rcounter) > 0) {
if (plane._visible) {
plane._visible = false;
} else {
plane._visible = true;
}
} else {
plane._visible = true;
plane.gotoAndStop(1);
resurging = false;
}
}
yvel = yvel * 0.995;
plane._y = plane._y + yvel;
plane._x = plane._x + (yvel / 4);
tunnel._y = tunnel._y - (yvel / 2);
plane._rotation = yvel;
tunnel._rotation = tunnel._rotation + ((((tunnel._r + 2) - (yvel / 40)) - tunnel._rotation) / 20);
};
}
function KILL() {
if (!resurging) {
Resurge();
}
}
function Resurge() {
Weapon = 1;
if ((--Lives) >= 0) {
for (L in LivesBox) {
if (L > Lives) {
LivesBox[L]._visible = false;
}
}
Rcounter = 60;
playsound("spawn");
plane.gotoAndStop(2);
resurging = true;
} else {
falling = true;
}
}
stop();
_quality = "LOW";
Pill.stop();
planey = plane._y;
planex = plane._x;
nube1y = nube1._y;
nube2y = nube2._y;
plane._y = 1000;
enemiesy = enemies._y;
enemiesx = enemies._x;
maxScore = 0;
gravity = 0.35;
maxspeed = gravity * 12;
xvel = 7;
obstacleinterval = 4;
fallingcounter = 0;
misilvel = new Array();
sndtrack = new Sound(largesound);
sndtrack.attachSound("soundtrack");
eventsound = new Sound(snd2);
Instance of Symbol 198 MovieClip "Top100" in Frame 2
onClipEvent (load) {
Game = "Tunnel";
}
Symbol 50 MovieClip Frame 1
stop();
Symbol 55 MovieClip Frame 1
_root.stop();
Instance of Symbol 53 MovieClip "bar" in Symbol 55 MovieClip Frame 136
onClipEvent (load) {
this.onEnterFrame = function () {
porcentaje = (_root.getBytesLoaded() * 100) / _root.getBytesTotal();
gotoAndStop(Math.ceil(_currentframe + ((porcentaje - _currentframe) / 5)));
c = 0;
if ((_currentframe == 100) and (_root.getBytesLoaded() == _root.getBytesTotal())) {
_parent.play();
}
};
}
Symbol 55 MovieClip Frame 167
stop();
Symbol 55 MovieClip Frame 181
_root.play();
stop();
Symbol 56 Button
on (press) {
if (playing != true) {
startgame();
} else if (!falling) {
n = 1;
while (n <= 6) {
if (eval ("misil" + n)._x > 410) {
misilvel[n] = 0;
eval ("misil" + n)._x = plane._x + 10;
eval ("misil" + n)._y = plane._y;
eval ("misil" + n).anim.gotoAndPlay(2);
playsound("disparo", 50);
break;
}
n++;
}
}
fly = true;
}
on (release, releaseOutside) {
fly = false;
}
on (keyPress "<Enter>") {
if (playing != true) {
startgame();
}
}
Symbol 62 MovieClip Frame 1
gotoAndStop(random(5) + 1);
Symbol 73 MovieClip Frame 1
gotoAndStop(random(5) + 1);
stop();
Symbol 84 MovieClip Frame 1
gotoAndStop(random(5) + 1);
stop();
Symbol 85 MovieClip Frame 1
stop();
Symbol 95 MovieClip Frame 1
stop();
Symbol 95 MovieClip Frame 2
Symbol 95 MovieClip Frame 3
if (damage == null) {
damage = 0;
}
if ((++damage) > 1) {
_parent._parent.gotoAndStop(1);
_root.Score = _root.Score + 3000;
}
Symbol 96 MovieClip Frame 1
stop();
gotoAndStop(random(_totalframes) + 1);
Symbol 96 MovieClip Frame 2
_parent.wall = true;
Instance of Symbol 95 MovieClip "anim" in Symbol 96 MovieClip Frame 2
onClipEvent (load) {
_yscale = (25 + random(200));
_xscale = (25 + random(200));
}
Symbol 103 MovieClip Frame 1
gotoAndPlay(random(100));
Symbol 103 MovieClip Frame 21
gotoAndPlay (2);
Symbol 104 MovieClip Frame 1
stop();
gotoAndStop(random(_totalframes) + 1);
Symbol 111 MovieClip Frame 1
stop();
gotoAndStop(random(_totalframes) + 1);
Symbol 112 MovieClip Frame 1
stop();
wall = false;
Symbol 120 MovieClip Frame 1
gotoAndStop(_root.Bubble);
_root.DoPill = this;
stop();
Symbol 120 MovieClip Frame 2
stop();
Symbol 120 MovieClip Frame 3
stop();
Symbol 120 MovieClip Frame 4
stop();
Symbol 126 MovieClip Frame 1
_root.AnimPill = this;
stop();
Symbol 126 MovieClip Frame 66
_root.Pill._visible = false;
_root.Pill.play();
Instance of Symbol 126 MovieClip in Symbol 127 MovieClip Frame 1
onClipEvent (load) {
chosen = random(8) + 1;
symbol.gotoAndStop(chosen);
_root.game.units.pill._y = random(70) + 40;
if (_root.game.raptor._x > (_root.game.units._x + (_root.game.units._width / 2))) {
_root.game.units.pill._x = ((_root.game.raptor._x - _root.game.units._x) - random(150)) - 100;
} else {
_root.game.units.pill._x = ((_root.game.raptor._x - _root.game.units._x) + random(150)) + 100;
}
}
onClipEvent (enterFrame) {
c++;
if (c > 80) {
play();
}
if (this.hitTest(_root.game.raptor)) {
if (!cheked) {
cheked = true;
gotoAndPlay (59);
}
if (chosen < 6) {
_root.game.ammo.gotoAndStop(chosen);
n = 1;
while (n <= 5) {
_root.game[n].gotoAndStop(1);
n++;
}
_root.game[chosen].gotoAndStop(2);
} else if ((!addlife) and (_root.game.energybar._currentframe == _root.game.energybar._totalframes)) {
addlife = true;
_root.game.lifes++;
_root.game.life.play();
} else {
_root.game.energybar.gotoAndStop(_root.game.energybar._currentframe + 4);
_root.game.energy = "full";
}
}
}
Symbol 131 MovieClip Frame 1
_root.Bubble = random(3) + 2;
this.onEnterFrame = null;
_visible = true;
stop();
Symbol 131 MovieClip Frame 68
this.onEnterFrame = function () {
if (this.hitTest(_root.plane)) {
_root.AnimPill.play();
_root.Weapon = _root.Bubble;
stop();
this.onEnterFrame = null;
}
};
_visible = true;
Symbol 139 MovieClip Frame 1
stop();
Symbol 142 MovieClip Frame 1
stop();
Symbol 142 MovieClip Frame 30
stop();
Symbol 144 MovieClip Frame 1
stop();
Symbol 144 MovieClip Frame 8
_y = 1400;
Symbol 148 MovieClip Frame 1
_visible = false;
Symbol 156 MovieClip Frame 1
stop();
Symbol 158 MovieClip Frame 1
stop();
Symbol 168 Button
on (press) {
getURL ("http://games.cublo.com/tunnel", "_blank");
}
Symbol 170 MovieClip Frame 11
stop();
Symbol 174 MovieClip Frame 1
if (_parent.i == null) {
_parent.i = 0;
}
_name = String(_parent.i++);
_visible = false;
Symbol 176 MovieClip Frame 1
_visible = false;
Symbol 177 MovieClip Frame 1
Margin = 25;
Area.onEnterFrame = function () {
Offset = Slide._height - Area._height;
if (Offset > 0) {
if (Area.hitTest(_root._xmouse, _root._ymouse, true)) {
pos = ((_ymouse - Margin) * 100) / (Area._height - (Margin * 2));
if (pos > 100) {
pos = 100;
}
if (pos < 0) {
pos = 0;
}
}
Slide._y = Slide._y + (((((-Offset) * pos) / 100) - Slide._y) / 4);
} else {
Slide._y = 0;
}
};
Symbol 186 Button
on (press) {
Save();
}
Symbol 191 MovieClip Frame 1
_parent.Boxes.push(_name);
Symbol 191 MovieClip Frame 3
stop();
Symbol 191 MovieClip Frame 4
box.html = html;
Symbol 191 MovieClip Frame 45
gotoAndStop (3);
Instance of Symbol 191 MovieClip "NameBox" in Symbol 192 MovieClip Frame 1
onClipEvent (load) {
DefaultMsgEn = (DefaultMsgSp = "YOUR NAME HERE");
html = false;
Required = true;
}
Symbol 197 Button
on (press) {
getURL ("http://games.cublo.com/tunnel", "_blank");
}
Symbol 198 MovieClip Frame 1
function getNetDebugVersion() {
return(1);
}
function NetDebugConfig() {
}
function attachNetDebugConfigFunctions(ndc) {
ndc.setDebug = function (setval) {
this.m_debug = setval;
};
ndc.getDebug = function () {
return(this.m_debug);
};
for (var _local3 in ndc) {
if (typeof(ndc[_local3]) == "object") {
attachNetDebugConfigFunctions(ndc[_local3]);
}
}
}
function getDefaultNetDebugConfig(iscontroller) {
if (_global.netDebugConfigSO == undefined) {
var _local2 = "TestMovie_Config_Info";
if (iscontroller) {
_local2 = "Controller_Config_Info";
}
_global.netDebugConfigSO = SharedObject.getLocal(_local2);
}
if (_global.netDebugConfigSO.data.config == undefined) {
_global.netDebugConfigSO.data.config = getRealDefaultNetDebugConfig();
}
_global.netDebugConfigSO.flush();
return(_global.netDebugConfigSO.data.config);
}
function getRealDefaultNetDebugConfig() {
var _local1 = new NetDebugConfig();
_local1.m_debug = true;
_local1.client = new NetDebugConfig();
_local1.client.m_debug = true;
_local1.client.trace = true;
_local1.client.recordset = true;
_local1.client.http = true;
_local1.client.rtmp = true;
_local1.realtime_server = new NetDebugConfig();
_local1.realtime_server.m_debug = true;
_local1.realtime_server.trace = true;
_local1.app_server = new NetDebugConfig();
_local1.app_server.m_debug = true;
_local1.app_server.trace = true;
_local1.app_server.error = true;
_local1.app_server.recordset = true;
_local1.app_server.httpheaders = false;
_local1.app_server.amf = false;
_local1.app_server.amfheaders = false;
_local1.app_server.coldfusion = true;
return(_local1);
}
function NetDebugEvent() {
}
function NetDebugErrorEvent(dataobj) {
this.init();
this.EventType = "NetDebugError";
this.Error = dataobj;
}
function NetDebugTraceEvent(traceobj) {
this.init();
this.EventType = "Trace";
this.Trace = traceobj;
}
function NetDebugTraceNetServicesEvent(w, s, n, m) {
this.init();
this.EventType = "NetServicesTrace";
this.Trace = m;
this.Who = w;
this.Severity = s;
this.Number = n;
}
function NetDebugNCEvent() {
}
function NetDebugResultEvent(resultobj) {
this.init();
this.EventType = "Result";
this.Result = resultobj;
}
function NetDebugStatusEvent(statusobj) {
this.init();
this.EventType = "Status";
this.Status = statusobj;
}
function NetDebugConnectEvent(args) {
this.init();
this.EventType = "Connect";
this.ConnectString = args[0];
if (args[1] != null) {
this.UserName = args[1];
}
if (args[2] != null) {
this.Password = args[2];
}
}
function NetDebugCallEvent(args) {
this.init();
this.EventType = "Call";
this.MethodName = args[0];
this.Parameters = new Array();
var _local4 = args.length;
var _local2 = 2;
while (_local2 < _local4) {
this.Parameters[_local2 - 2] = args[_local2];
_local2++;
}
}
function NetDebugCloseEvent() {
this.init();
this.EventType = "Close";
}
function NetDebugAddHeaderEvent(args) {
this.init();
this.EventType = "AddHeader";
this.HeaderName = args[0];
this.MustUnderstand = args[1];
if (args[2] != null) {
this.HeaderObject = args[2];
}
}
function NetDebugRtmpLogEvent(infoobj) {
this.initDate();
this.EventType = "Trace";
this.Source = "Flash Communication Server";
this.Info = infoobj;
this.Trace = infoobj.description;
}
function NetDebugDuplicateNCDErrorEvent() {
this.initDate();
this.EventType = "Error";
this.Source = "NCD";
this.Message = "NCD_ALREADY_RUNNING";
}
function NetDebugFailedSendErrorEvent(ev) {
this.initDate();
this.EventType = "Error";
this.Source = "NCD";
this.OriginalEvent = ev;
this.Message = "NCD_FAILED_TO_SEND_EVENT";
}
function NetDebugInfoErrorEvent(infoobj, mes) {
this.initDate();
this.EventType = "Error";
this.Source = "NCD";
this.Info = infoobj;
if (mes != null) {
this.Message = mes;
}
}
function NetDebugReceiveCallEvent(mName, args) {
this.init();
this.EventType = "ReceivedCall";
this.MethodName = mName;
this.Parameters = args;
}
function netDebugProxyConnect() {
this.attachDebug();
var _local3 = arguments[0].substr(0, 4);
if ((_local3 == "http") || (_local3.substr(0, 4) == "rtmp")) {
if (arguments[0].charAt(4) == ":") {
this.m_Protocol = _local3;
} else {
this.m_Protocol = arguments[0].substr(0, 5);
}
} else {
this.m_Protocol = "http";
}
this.sendClientEvent(new NetDebugConnectEvent(arguments));
if (this.isRealTime()) {
this.m_ConnectString = arguments[0];
getNetDebug().sendCommand(new StartRTMPTraceCommand(arguments[0]));
var _local4 = this.realconnect.apply(this, arguments);
this.realcall("@getClientID", new RTMPClientIDResponse(arguments[0], this));
return(_local4);
}
return(this.realconnect.apply(this, arguments));
}
function netDebugProxyCall() {
this.attachDebug();
this.sendClientEvent(new NetDebugCallEvent(arguments));
this.addNetDebugHeader();
if (this.m_Config.app_server) {
arguments[1] = new NetDebugResponseProxy(this, arguments[1]);
return(this.realcall.apply(this, arguments));
}
return(this.realcall.apply(this, arguments));
}
function netDebugProxyClose() {
this.attachDebug();
this.sendClientEvent(new NetDebugCloseEvent());
if (this.isRealTime()) {
getNetDebug().sendCommand(new StopRTMPTraceCommand(this.m_ConnectString, this.m_ClientId));
}
var _local2 = this.realclose();
getNetDebug().removeNetConnection(this);
return(_local2);
}
function netDebugProxyAddHeader() {
this.attachDebug();
this.sendClientEvent(new NetDebugAddHeaderEvent(arguments));
return(this.realaddHeader.apply(this, arguments));
}
function RTMPClientIDResponse(cs, nc) {
this.m_ConnectString = cs;
this.m_NC = nc;
}
function NetDebugResponseProxy(source, original) {
this.m_SourceNC = source;
this.m_OriginalNR = original;
}
function GlobalLocalConnection(iscontroller, receiver, domainname) {
this.maxConnections = 10;
var _local5 = "_NetDebugLocalToDebugMovie";
var _local7 = "_NetDebugLocalToController";
var _local4 = null;
if (iscontroller) {
_local4 = _local7;
this.sendnames = new Array();
this.sendnames.push(_local5);
var _local3 = 0;
while (_local3 < this.maxConnections) {
this.sendnames.push(_local5 + _local3);
_local3++;
}
this.maxConnections = 0;
} else {
_local4 = _local5;
this.sendnames = new Array();
this.sendnames.push(_local7);
}
this.setDomainName(domainname);
if (_global.g_NetDebugLocalConnection == undefined) {
_global.g_NetDebugLocalConnection = new LocalConnection();
_global.g_NetDebugLocalConnection.allowDomain = function () {
return(true);
};
}
if (receiver != null) {
_global.g_NetDebugLocalConnection.m_Receiver = receiver;
_global.g_NetDebugLocalConnection.onData = function (dataobj) {
_global.g_NetDebugLocalConnection.m_Receiver.onReceive(dataobj);
};
_global.g_NetDebugLocalConnection.onCommand = function (commandobj) {
_global.g_NetDebugLocalConnection.m_Receiver.onReceiveCommand(commandobj);
};
if (!_global.g_NetDebugLocalConnection.connect(_local4)) {
var _local6 = false;
var _local3 = 0;
while (_local3 < this.maxConnections) {
if (_global.g_NetDebugLocalConnection.connect(_local4 + _local3)) {
_local6 = true;
break;
}
_local3++;
}
if (!_local6) {
if (iscontroller) {
receiver.onReceiveError(new NetDebugDuplicateNCDErrorEvent());
}
}
}
}
}
function LocalCommand() {
}
function UpdateNetDebugConfigCommand(dataobj) {
this.init("updateConfig", dataobj);
}
function GetConfigCommand() {
this.init("getConfig", null);
}
function StartRTMPTraceCommand(cs) {
var _local3 = new Object();
_local3.connectstring = cs;
_local3.url = _root._url;
this.init("startRealTimeTrace", _local3);
}
function AddRTMPClientCommand(cs, cid) {
var _local3 = new Object();
_local3.connectstring = cs;
_local3.url = _root._url;
_local3.clientid = cid;
this.init("addRealTimeClient", _local3);
}
function StopRTMPTraceCommand(cs, cid) {
var _local3 = new Object();
_local3.connectstring = cs;
_local3.url = _root._url;
_local3.clientid = cid;
this.init("stopRealTimeTrace", _local3);
}
function NetDebug() {
this.m_ncs = new Array();
this.m_Config = getDefaultNetDebugConfig();
this.m_glc = new GlobalLocalConnection(false, this);
this.m_glc.sendCommand(new GetConfigCommand());
this.m_NextNewId = 0;
}
function getNetDebug() {
return(_global.netDebugInstance);
}
function Hide() {
_quality = "LOW";
b.onEnterFrame = null;
_visible = false;
}
function Load() {
Show();
gotoAndStop ("Load");
Widget.GetHighscores(Game);
}
function Show() {
_visible = true;
_quality = "HIGH";
b.onEnterFrame = function () {
if (!b.hitTest(_root._xmouse, _root._ymouse, true)) {
Hide();
}
};
}
function GetHighscores_Result(result) {
data = result.Table.items;
gotoAndStop ("Display");
}
function New() {
gotoAndStop ("Display");
if ((data.length == null) or (data.length < 100)) {
Show();
gotoAndStop ("New");
} else {
for (n in data) {
if (_root.Score > data[n].Score) {
Show();
gotoAndStop ("New");
break;
}
}
}
}
function Save() {
if (FormBox.ValidateFields()) {
Widget.SetHighscores(Game, FormBox.NameBox.Input, _root.Score);
gotoAndStop ("Load");
}
}
function Report(result) {
trace("ERROR! " + result);
}
stop();
_global.RsDataProviderClass = function () {
this.init();
};
RsDataProviderClass.prototype.init = function () {
this.items = new Array();
this.uniqueID = 0;
this.views = new Array();
mx.events.EventDispatcher.initialize(this);
};
RsDataProviderClass.prototype.addView = function (viewRef) {
this.views.push(viewRef);
var _local2 = {eventName:"updateAll"};
viewRef.modelChanged(_local2);
};
RsDataProviderClass.prototype.addItemAt = function (index, value) {
if (!this.checkLocal()) {
return(undefined);
}
if (index < 0) {
return(undefined);
}
if (index < this.length) {
this.items.splice(index, 0, "tmp");
}
this.items[index] = new Object();
if (typeof(value) == "object") {
this.items[index] = value;
}
this.items[index].__ID__ = this.uniqueID++;
var _local3 = {eventName:"addItems", firstItem:index, lastItem:index};
this.updateViews(_local3);
};
RsDataProviderClass.prototype.addItem = function (value) {
if (!this.checkLocal()) {
return(undefined);
}
this.addItemAt(this.length, value);
};
RsDataProviderClass.prototype.removeItemAt = function (index) {
if (!this.checkLocal()) {
return(undefined);
}
if ((index < 0) || (index >= this.length)) {
return(undefined);
}
var _local4 = this.items[index];
this.items.splice(index, 1);
var _local3 = {eventName:"deleteItems", firstItem:index, lastItem:index};
this.updateViews(_local3);
return(_local4);
};
RsDataProviderClass.prototype.removeAll = function () {
if (!this.checkLocal()) {
return(undefined);
}
this.items = new Array();
this.updateViews({eventName:"removeItems", firstItem:0, lastItem:this.length - 1});
};
RsDataProviderClass.prototype.replaceItemAt = function (index, itemObj) {
if (!this.checkLocal()) {
return(undefined);
}
if ((index < 0) || (index >= this.length)) {
return(undefined);
}
var _local3 = this.getItemID(index);
this.items[index] = itemObj;
this.items[index].__ID__ = _local3;
this.updateViews({eventName:"updateItems", firstItem:index, lastItem:index});
};
RsDataProviderClass.prototype.getLength = function () {
return(this.items.length);
};
RsDataProviderClass.prototype.addProperty("length", RsDataProviderClass.prototype.getLength, null);
RsDataProviderClass.prototype.getItemAt = function (index) {
return(this.items[index]);
};
RsDataProviderClass.prototype.getItemID = function (index) {
return(this.items[index].__ID__);
};
RsDataProviderClass.prototype.sortItems = function (compareFunc, order) {
if (!this.checkLocal()) {
return(undefined);
}
this.items.sort(compareFunc);
if (order == "DESC") {
this.items.reverse();
}
this.updateViews({eventName:"sort"});
};
RsDataProviderClass.prototype.sortItemsBy = function (fieldName, order) {
if (!this.checkLocal()) {
return(undefined);
}
this.items.sortOn(fieldName);
if (order == "DESC") {
this.items.reverse();
}
this.updateViews({eventName:"sort", fieldName:fieldName, order:order});
};
RsDataProviderClass.prototype.updateViews = function (eventObj) {
eventObj.type = "modelChanged";
this.dispatchEvent(eventObj);
var _local4 = this.views.length;
if (_local4 > 0) {
switch (eventObj.eventName) {
case "addItems" :
eventObj.event = "addRows";
break;
case "updateItems" :
eventObj.event = "updateRows";
break;
case "removeItems" :
eventObj.event = "deleteRows";
}
eventObj.firstRow = eventObj.firstItem;
eventObj.lastRow = eventObj.lastItem;
var _local2 = 0;
while (_local2 < _local4) {
this.views[_local2].modelChanged(eventObj);
_local2++;
}
}
};
_global.RecordSet = function (columnNames) {
if (this.mTitles != null) {
this.views = new Array();
return(undefined);
}
this.init();
if (this.serverinfo == null) {
if (this.serverInfo != null) {
this.serverinfo = this.serverInfo;
}
}
if (this.serverinfo == null) {
this.mTitles = columnNames;
return(undefined);
}
if (this.serverinfo.version != 1) {
NetServices.trace("RecordSet", "warning", 100, "Received incompatible RecordSet version from server");
return(undefined);
}
this.mTitles = this.serverinfo.columnNames;
this.mRecordsAvailable = 0;
this.setData(((this.serverinfo.cursor == null) ? 0 : (this.serverinfo.cursor - 1)), this.serverinfo.initialData);
if (this.serverinfo.initialData.length != this.serverinfo.totalCount) {
this.mRecordSetID = this.serverinfo.id;
if (this.mRecordSetID != null) {
this.serviceName = ((this.serverinfo.serviceName == null) ? "RecordSet" : (this.serverinfo.serviceName));
this.mTotalCount = this.serverinfo.totalCount;
this.mDeliveryMode = "ondemand";
this.mAllNotified = false;
this.mOutstandingRecordCount = 0;
} else {
NetServices.trace("RecordSet", "warning", 102, "Missing some records, but there's no RecordSet id");
}
}
this.serverinfo = null;
};
RecordSet.prototype = new RsDataProviderClass();
Object.registerClass("RecordSet", RecordSet);
RecordSet.prototype._setParentService = function (service) {
this.gateway_conn = service.nc;
};
RecordSet.prototype.getRecordSetService = function () {
if (this.mRecordSetService == null) {
if (this.gateway_conn == null) {
this.gateway_conn = NetServices.createGatewayConnection();
} else if (_global.netDebugInstance != undefined) {
this.gateway_conn = this.gateway_conn.clone();
}
if (_global.netDebugInstance != undefined) {
this.gateway_conn.setupRecordset();
this.gateway_conn.setDebugId("RecordSet " + this.mRecordSetID);
}
this.mRecordSetService = this.gateway_conn.getService(this.serviceName, this);
if (this.mRecordSetService == null) {
NetServices.trace("RecordSet", "warning", 101, "Failed to create RecordSet service");
this.mRecordSetService = 0;
}
}
return(this.mRecordSetService);
};
RecordSet.prototype.getColumnNames = function () {
return(this.mTitles);
};
RecordSet.prototype.getLength = function () {
if (this.mRecordSetID != null) {
return(this.mTotalCount);
}
return(this.items.length);
};
RecordSet.prototype.addProperty("length", RecordSet.prototype.getLength, null);
RecordSet.prototype.getItemAt = function (index) {
if ((index < 0) || (index >= this.length)) {
return(null);
}
if (this.mRecordSetID == null) {
return(this.items[index]);
}
this.requestRecord(index);
var _local3 = this.items[index];
if (_local3 == 1) {
return("in progress");
}
return(_local3);
};
RecordSet.prototype.setField = function (index, fieldName, value) {
if (!this.checkLocal()) {
return(undefined);
}
if ((index < 0) || (index >= this.length)) {
return(undefined);
}
this.items[index][fieldName] = value;
this.updateViews({eventName:"updateItems", firstItem:index, lastItem:index});
};
RecordSet.prototype.filter = function (filterFunction, context) {
if (!this.checkLocal()) {
return(undefined);
}
var _local4 = new RecordSet(this.mTitles);
var _local5 = this.length;
var _local3 = 0;
while (_local3 < _local5) {
var _local2 = this.getItemAt(_local3);
if (((_local2 != null) && (_local2 != 1)) && (filterFunction(_local2, context))) {
_local4.addItem(_local2);
}
_local3++;
}
return(_local4);
};
RecordSet.prototype.sort = function (compareFunc) {
if (!this.checkLocal()) {
return(undefined);
}
this.items.sort(compareFunc);
this.updateViews({eventName:"sort"});
};
RecordSet.prototype.isLocal = function () {
return(this.mRecordSetID == null);
};
RecordSet.prototype.isFullyPopulated = function () {
return(this.isLocal());
};
RecordSet.prototype.getNumberAvailable = function () {
if (this.isLocal()) {
return(this.length);
}
return(this.mRecordsAvailable);
};
RecordSet.prototype.setDeliveryMode = function (mode, pagesize, numPrefetchPages) {
this.mDeliveryMode = mode;
this.stopFetchAll();
if (mode == "ondemand") {
return(undefined);
}
if (pagesize == null) {
pagesize = this.views[0].getRowCount();
if (pagesize == null) {
pagesize = 25;
}
}
if (mode == "page") {
if (numPrefetchPages == null) {
numPrefetchPages = 0;
}
this.mPageSize = pagesize;
this.mNumPrefetchPages = numPrefetchPages;
} else if (mode == "fetchall") {
this.stopFetchAll();
this.startFetchAll(pagesize);
} else {
NetServices.trace("RecordSet", "warning", 107, "SetDeliveryMode: unknown mode string");
}
};
RecordSet.prototype.getRecords_Result = function (info) {
this.setData(info.Cursor - 1, info.Page);
this.mOutstandingRecordCount = this.mOutstandingRecordCount - info.Page.length;
this.updateViews({eventName:"updateItems", firstItem:info.Cursor - 1, lastItem:((info.Cursor - 1) + info.Page.length) - 1});
if ((this.mRecordsAvailable == this.mTotalCount) && (!this.mAllNotified)) {
this.updateViews({eventName:"allRows"});
this.mRecordSetService.release();
this.mAllNotified = true;
this.mRecordSetID = null;
this.mRecordSetService = null;
}
};
RecordSet.prototype.release_Result = function () {
};
RecordSet.prototype.arrayToObject = function (anArray) {
if (this.mTitles == null) {
NetServices.trace("RecordSet", "warning", 105, "getItem: titles are not available");
return(null);
}
var _local4 = new Object();
var _local5 = anArray.length;
var _local2 = 0;
while (_local2 < _local5) {
var _local3 = this.mTitles[_local2];
if (_local3 == null) {
_local3 = ("column" + _local2) + 1;
}
_local4[_local3] = anArray[_local2];
_local2++;
}
return(_local4);
};
RecordSet.prototype.setData = function (start, dataArray) {
var _local5 = dataArray.length;
var _local2 = 0;
while (_local2 < _local5) {
var _local3 = _local2 + start;
var _local4 = this.items[_local3];
if ((_local4 != null) && (_local4 != 1)) {
NetServices.trace("RecordSet", "warning", 106, "Already got record # " + recordIndex);
} else {
this.mRecordsAvailable = this.mRecordsAvailable + 1;
}
this.items[_local3] = this.arrayToObject(dataArray[_local2]);
this.items[_local3].__ID__ = this.uniqueID++;
_local2++;
}
};
RecordSet.prototype.requestOneRecord = function (index) {
if (this.items[index] == null) {
this.getRecordSetService().getRecords(this.mRecordSetID, index + 1, 1);
this.mOutstandingRecordCount++;
this.items[index] = 1;
this.updateViews({eventName:"fetchRows", firstItem:index, lastItem:index});
}
};
RecordSet.prototype.requestRecord = function (index) {
if (this.mDeliveryMode != "page") {
this.requestOneRecord(index);
return(undefined);
}
var _local2 = int(index / this.mPageSize) * this.mPageSize;
var _local3 = (_local2 + (this.mPageSize * (this.mNumPrefetchPages + 1))) - 1;
this.requestRecordRange(_local2, _local3);
};
RecordSet.prototype.requestRecordRange = function (index, lastIndex) {
var _local9 = -1;
if (index < 0) {
index = 0;
}
if (lastIndex >= this.length) {
lastIndex = this.length - 1;
}
while (index <= lastIndex) {
while ((index <= lastIndex) && (this.items[index] != null)) {
index++;
}
var _local3 = index;
while ((index <= lastIndex) && (this.items[index] == null)) {
this.mOutstandingRecordCount++;
this.items[index] = 1;
index++;
}
var _local4 = index - 1;
if (_local3 <= _local4) {
this.getRecordSetService().getRecords(this.mRecordSetID, _local3 + 1, (_local4 - _local3) + 1);
_local9 = _local4;
this.updateViews({eventName:"fetchRows", firstItem:_local3, lastItem:_local4});
}
}
return(_local9);
};
RecordSet.prototype.startFetchAll = function (pagesize) {
this.mDataFetcher.disable();
this.mDataFetcher = new RsDataFetcher(this, pagesize);
};
RecordSet.prototype.stopFetchAll = function () {
this.mDataFetcher.disable();
this.mDataFetcher = null;
};
RecordSet.prototype.checkLocal = function () {
if (this.isLocal()) {
return(true);
}
NetServices.trace("RecordSet", "warning", 108, "Operation not allowed on partial recordset");
return(false);
};
_global.RsDataFetcher = function (recordSet, increment) {
this.mRecordSet = recordSet;
this.mRecordSet.addView(this);
this.mIncrement = increment;
this.mNextRecord = 0;
this.mEnabled = true;
this.doNext();
};
RsDataFetcher.prototype.disable = function () {
this.mEnabled = false;
this.mRecordSet.removeView(this);
};
RsDataFetcher.prototype.doNext = function () {
if (!this.mEnabled) {
return(undefined);
}
while (true) {
if (this.mNextRecord >= this.mRecordSet.length) {
return(undefined);
}
this.mHighestRequested = this.mRecordSet.requestRecordRange(this.mNextRecord, (this.mNextRecord + this.mIncrement) - 1);
this.mNextRecord = this.mNextRecord + this.mIncrement;
if (this.mHighestRequested > 0) {
return(undefined);
}
}
};
RsDataFetcher.prototype.modelChanged = function (eventObj) {
if (((eventObj.eventName == "updateItems") && (eventObj.firstItem <= this.mHighestRequested)) && (eventObj.lastItem >= this.mHighestRequested)) {
this.doNext();
}
if (eventObj.eventName == "allRows") {
this.disable();
}
};
_global.NetServiceProxyResponder = function (service, methodName) {
this.service = service;
this.methodName = methodName;
};
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 = function (nc, serviceName, client) {
if (nc != null) {
this.nc = nc;
this.serviceName = serviceName;
this.client = client;
}
};
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);
};
Object.registerClass("NetServiceProxy", NetServiceProxy);
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.AppendToGatewayUrl = function (urlSuffix) {
this.__urlSuffix = urlSuffix;
if (this.__originalUrl == null) {
this.__originalUrl = this.uri;
}
var _local2 = this.__originalUrl + urlSuffix;
this.connect(_local2);
};
NetConnection.prototype.ReplaceGatewayUrl = function (newUrl) {
this.connect(newUrl);
};
NetConnection.prototype.clone = function () {
var _local2 = new NetConnection();
_local2.connect(this.uri);
return(_local2);
};
if (_global.NetServices == null) {
_global.NetServices = new Object();
NetServices.gatewayUrl = gatewayUrl;
}
NetServices.setDefaultGatewayUrl = function (url) {
NetServices.defaultGatewayUrl = url;
};
NetServices.setGatewayUrl = function (url) {
NetServices.gatewayUrl = url;
};
NetServices.createGatewayConnection = function (url) {
if (url == undefined) {
url = NetServices.gatewayUrl;
if (url == undefined) {
url = NetServices.defaultGatewayUrl;
}
}
if (url == undefined) {
NetServices.trace("NetServices", "warning", 4, "createGatewayConnection - gateway url is undefined");
return(null);
}
var _local2 = new NetConnection();
_local2.connect(url);
return(_local2);
};
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);
};
_global.copyProperties = function (to, from) {
for (var _local3 in from) {
if ((_local3 == "__proto__") || (_local3 == "function")) {
continue;
}
if (typeof(from[_local3]) == "object") {
if (to[_local3] == undefined) {
to[_local3] = new from[_local3].__proto__.constructor();
}
copyProperties(to[_local3], from[_local3]);
} else {
to[_local3] = from[_local3];
}
}
};
_global.copyObject = function (obj) {
if (typeof(obj) == "object") {
var _local1 = new obj.__proto__.constructor();
copyProperties(_local1, obj);
return(_local1);
}
return(obj);
};
_global.objectToStringTree = function (obj, openstr, typesepstr, valuesepstr, closestr) {
var _local1 = new StringLineAdder(obj, new TreeLineRenderer(((openstr == null) ? "{" : (openstr)), ((typesepstr == null) ? ":" : (typesepstr)), ((valuesepstr == null) ? ", " : (valuesepstr)), ((closestr == null) ? "}" : (closestr))));
return(_local1.getString());
};
_global.objectToListboxTree = function (listbox, obj, openstr, typesepstr, valuesepstr, closestr) {
new ListLineAdder(listbox, obj, new TreeLineRenderer(((openstr == null) ? "{" : (openstr)), ((typesepstr == null) ? ":" : (typesepstr)), ((valuesepstr == null) ? ", " : (valuesepstr)), ((closestr == null) ? "}" : (closestr))));
};
_global.StringLineAdder = function (obj, renderer) {
this.linerenderer = renderer;
this.output = "";
nestedObjectDump(0, null, obj, this);
};
StringLineAdder.prototype.getString = function () {
return(this.output);
};
StringLineAdder.prototype.addLine = function (level, objname, objtype, objvalue, objnum) {
var _local2 = this.linerenderer.getLine(level, objname, objtype, objvalue, objnum);
if (_local2 != null) {
this.output = this.output + (_local2 + newline);
}
return(true);
};
_global.ListLineAdder = function (listbox, obj, renderer) {
this.linerenderer = renderer;
this.output_lb = listbox;
nestedObjectDump(0, null, obj, this);
};
ListLineAdder.prototype.addLine = function (level, objname, objtype, objvalue, objnum) {
var _local2 = this.linerenderer.getLine(level, objname, objtype, objvalue, objnum);
if (_local2 != null) {
this.output_lb.addItem(_local2);
}
return(true);
};
_global.TreeLineRenderer = function (pre, typedelim, valuedelim, post) {
this.init(pre, typedelim, valuedelim, post);
};
TreeLineRenderer.prototype.init = function (pre, typedelim, valuedelim, post) {
this.prechar = pre;
this.typechar = typedelim;
this.valuechar = valuedelim;
this.postchar = post;
};
TreeLineRenderer.prototype.getLine = function (level, objname, objtype, objvalue, objnum) {
var _local3 = "";
var _local2 = 0;
while (_local2 < level) {
_local3 = _local3 + "\t";
_local2++;
}
var _local6 = this.valuechar;
if ((objname != null) && (objtype != "object")) {
_local3 = _local3 + (((this.prechar + objtype) + this.typechar) + objname);
} else if (objtype == "object") {
if (typeof(objvalue) == "number") {
_local3 = _local3 + (((this.prechar + objtype) + this.typechar) + objname);
_local3 = _local3 + ((_local6 + "object#") + objvalue);
objvalue = null;
} else {
_local3 = _local3 + (((((this.prechar + objtype) + "#") + objnum) + this.typechar) + objname);
}
} else {
_local3 = _local3 + (this.prechar + objtype);
_local6 = this.typechar;
}
if (objvalue != null) {
_local3 = _local3 + (_local6 + objvalue);
}
_local3 = _local3 + this.postchar;
return(_local3);
};
_global.nestedObjectDump = function (level, objname, obj, lineadder) {
if (level == 0) {
nestedObjectDump.callcount++;
nestedObjectDump.objcount = -1;
}
if (obj == null) {
return(lineadder.addLine(level, objname, "undefined"));
}
if (typeof(obj) == "function") {
return(lineadder.addLine(level, objname, "function"));
}
if (typeof(obj) == "object") {
if ((obj.__nestedObjectDump_id != undefined) && (obj.__nestedObjectDump_ref == nestedObjectDump.callcount)) {
return(lineadder.addLine(level, objname, "object", obj.__nestedObjectDump_id));
}
nestedObjectDump.objcount++;
if (lineadder.addLine(level, objname, "object", null, nestedObjectDump.objcount) == nestedObjectDump.skip) {
return(nestedObjectDump.proceed);
}
obj.__nestedObjectDump_id = nestedObjectDump.objcount;
obj.__nestedObjectDump_ref = nestedObjectDump.callcount;
var _local4 = new Array();
var _local3 = new Array();
for (var _local10 in obj) {
if (((_local10 == "__proto__") || (_local10 == "__nestedObjectDump_id")) || (_local10 == "__nestedObjectDump_ref")) {
continue;
}
if (typeof(obj[_local10]) == "object") {
_local3.push(_local10);
} else {
_local4.push(_local10);
}
}
if ((_local3.length == 0) && (_local4.length == 0)) {
if ((typeof(obj.toString) == "function") && (obj.toString() != "")) {
return(lineadder.addLine(level + 1, null, "string", obj.toString()));
}
if (lineadder.noProps != undefined) {
lineadder.noProps(level + 1);
return(nestedObjectDump.proceed);
}
}
_local4.sort();
_local3.sort();
var _local7 = true;
var _local8 = _local4.length;
var _local2 = 0;
while (_local2 < _local8) {
if (nestedObjectDump(level + 1, _local4[_local2], obj[_local4[_local2]], lineadder) == nestedObjectDump.stop) {
_local7 = false;
break;
}
_local2++;
}
if (_local7) {
var _local9 = _local3.length;
_local2 = 0;
while (_local2 < _local9) {
if (!nestedObjectDump(level + 1, _local3[_local2], obj[_local3[_local2]], lineadder)) {
_local7 = false;
}
_local2++;
}
}
return(nestedObjectDump.proceed);
}
return(lineadder.addLine(level, objname, typeof(obj), obj));
};
nestedObjectDump.proceed = 1;
nestedObjectDump.skip = 2;
nestedObjectDump.stop = 3;
nestedObjectDump.callcount = 0;
nestedObjectDump.objcount = 0;
Object.registerClass("NetDebugConfig", NetDebugConfig);
NetDebugEvent.prototype.init = function () {
this.EventType = "DebugEvent";
this.Source = "Client";
this.MovieUrl = unescape(_root._url);
this.initDate();
};
NetDebugEvent.prototype.initDate = function () {
var _local2 = new Date();
this.Date = _local2;
this.Time = _local2.getTime();
};
NetDebugErrorEvent.prototype = new NetDebugEvent();
NetDebugTraceEvent.prototype = new NetDebugEvent();
NetDebugTraceNetServicesEvent.prototype = new NetDebugEvent();
NetDebugNCEvent.prototype = new NetDebugEvent();
NetDebugResultEvent.prototype = new NetDebugNCEvent();
NetDebugStatusEvent.prototype = new NetDebugNCEvent();
NetDebugConnectEvent.prototype = new NetDebugNCEvent();
NetDebugCallEvent.prototype = new NetDebugNCEvent();
NetDebugCloseEvent.prototype = new NetDebugNCEvent();
NetDebugAddHeaderEvent.prototype = new NetDebugNCEvent();
NetDebugRtmpLogEvent.prototype = new NetDebugNCEvent();
NetDebugDuplicateNCDErrorEvent.prototype = new NetDebugNCEvent();
NetDebugFailedSendErrorEvent.prototype = new NetDebugNCEvent();
NetDebugInfoErrorEvent.prototype = new NetDebugNCEvent();
NetDebugResultEvent.prototype = new NetDebugNCEvent();
_global.StripNCDEventToMinmal = function (ev) {
var _local2 = new Object();
if (ev.EventType != null) {
_local2.EventType = ev.EventType;
}
if (ev.Source != null) {
_local2.Source = ev.Source;
}
if (ev.MovieUrl != null) {
_local2.MovieUrl = ev.MovieUrl;
}
if (ev.Date != null) {
_local2.Date = ev.Date;
}
if (ev.Time != null) {
_local2.Time = ev.Time;
}
if (ev.Protocol != null) {
_local2.Protocol = ev.Protocol;
}
if (ev.DebugId != null) {
_local2.DebugId = ev.DebugId;
}
return(_local2);
};
NetConnection.prototype.attachDebug = function () {
if (!this.m_Attached) {
this.m_Attached = true;
this.m_HeaderAdded = false;
this.m_Config = new NetDebugConfig();
copyProperties(this.m_Config, getNetDebug().m_Config);
this.m_Protocol = "none";
this.m_Id = getNetDebug().addNetConnection(this);
}
};
NetConnection.prototype.sendDebugEvent = function (eventobj) {
eventobj.Protocol = this.m_Protocol;
eventobj.DebugId = this.m_Id;
return(getNetDebug().onEvent(eventobj));
};
NetConnection.prototype.sendServerEvent = function (eventobj) {
eventobj.MovieUrl = unescape(_root._url);
if (!this.sendDebugEvent(eventobj)) {
}
};
NetConnection.prototype.sendClientEvent = function (eventobj) {
if (this.m_Config.m_debug && (this.m_Config.client.m_debug)) {
if ((this.m_Config.client.http && (this.m_Protocol == "http")) || (this.m_Config.client.rtmp && (this.m_Protocol.substr(0, 4) == "rtmp"))) {
if (!this.sendDebugEvent(eventobj)) {
}
}
}
};
NetConnection.prototype.addNetDebugHeader = function () {
if (!this.m_HeaderAdded) {
this.m_HeaderAdded = true;
if ((this.m_Config.m_debug && (this.m_Config.app_server.m_debug)) && (this.m_Protocol == "http")) {
this.realaddHeader("amf_server_debug", true, this.m_Config.app_server);
} else {
this.realaddHeader("amf_server_debug", true, undefined);
}
}
};
NetConnection.prototype.updateConfig = function (config) {
this.attachDebug();
copyProperties(this.m_Config, config);
this.m_HeaderAdded = false;
};
NetConnection.prototype.isRealTime = function () {
return(this.m_Protocol.substr(0, 4) == "rtmp");
};
NetConnection.prototype.setupRecordset = function () {
this.attachDebug();
this.m_Config.client.http = this.m_Config.client.recordset;
};
NetConnection.prototype.setDebugId = function (id) {
this.attachDebug();
this.m_Id = id;
};
NetConnection.prototype.getDebugId = function () {
this.attachDebug();
return(this.m_Id);
};
NetConnection.prototype.trace = function (traceobj) {
this.attachDebug();
if ((this.m_Config.m_debug && (this.m_Config.client.m_debug)) && (this.m_Config.client.trace)) {
this.sendDebugEvent(new NetDebugTraceEvent(traceobj));
}
};
NetConnection.prototype.getDebugConfig = function () {
this.attachDebug();
return(this.m_Config);
};
if (!NetConnection.prototype.netDebugProxyFunctions) {
NetConnection.prototype.netDebugProxyFunctions = true;
NetConnection.prototype.realconnect = NetConnection.prototype.connect;
NetConnection.prototype.realcall = NetConnection.prototype.call;
NetConnection.prototype.realclose = NetConnection.prototype.close;
NetConnection.prototype.realaddHeader = NetConnection.prototype.addHeader;
NetConnection.prototype.connect = netDebugProxyConnect;
NetConnection.prototype.call = netDebugProxyCall;
NetConnection.prototype.close = netDebugProxyClose;
NetConnection.prototype.addHeader = netDebugProxyAddHeader;
}
RTMPClientIDResponse.prototype.onResult = function (cid) {
this.m_NC.m_ClientId = cid;
getNetDebug().sendCommand(new AddRTMPClientCommand(this.m_ConnectString, cid));
};
NetDebugResponseProxy.prototype.onDebugEvents = function (debugevents) {
var _local3 = debugevents.length;
var _local2 = 0;
while (_local2 < _local3) {
this.m_SourceNC.sendServerEvent(debugevents[_local2]);
_local2++;
}
};
NetDebugResponseProxy.prototype.onResult = function (resultobj) {
this.m_SourceNC.sendClientEvent(new NetDebugResultEvent(resultobj));
this.m_OriginalNR.onResult(resultobj);
};
NetDebugResponseProxy.prototype.onStatus = function (statusobj) {
this.m_SourceNC.sendClientEvent(new NetDebugStatusEvent(statusobj));
if (this.m_OriginalNR.onStatus != undefined) {
this.m_OriginalNR.onStatus(statusobj);
} else {
_global.System.onStatus(statusobj);
}
};
NetDebugResponseProxy.prototype.__resolve = function (name) {
this.m_SourceNC.sendClientEvent(new NetDebugReceiveCallEvent(name, arguments));
this.m_OriginalNR[name].apply(arguments);
};
GlobalLocalConnection.prototype.setDomainName = function (domainname) {
if ((domainname != null) && (domainname != "")) {
this.sendPrefix = domainname + ":";
} else {
this.sendPrefix = "";
}
};
GlobalLocalConnection.prototype.send = function (dataobj) {
return(this.sendRaw("onData", dataobj));
};
GlobalLocalConnection.prototype.sendCommand = function (commandobj) {
return(this.sendRaw("onCommand", commandobj));
};
GlobalLocalConnection.prototype.sendRaw = function (functionname, obj) {
var _local4 = true;
var _local5 = this.sendnames.length;
var _local3 = 0;
while (_local3 < _local5) {
_local4 = _local4 & _global.g_NetDebugLocalConnection.send(this.sendPrefix + this.sendnames[_local3], functionname, obj);
_local3++;
}
return(_local4);
};
LocalCommand.prototype.init = function (commandname, dataobj) {
this.command = commandname;
this.data = dataobj;
};
UpdateNetDebugConfigCommand.prototype = new LocalCommand();
GetConfigCommand.prototype = new LocalCommand();
StartRTMPTraceCommand.prototype = new LocalCommand();
AddRTMPClientCommand.prototype = new LocalCommand();
StopRTMPTraceCommand.prototype = new LocalCommand();
NetDebug.prototype.addNetConnection = function (nc) {
this.m_ncs.push(nc);
return(this.m_NextNewId++);
};
NetDebug.prototype.removeNetConnection = function (nc) {
var _local3 = this.m_ncs.length;
var _local2 = 0;
while (_local2 < _local3) {
if (nc == this.m_ncs[_local2]) {
this.m_ncs.splice(_local2, 1);
break;
}
_local2++;
}
};
NetDebug.prototype.sendDebugEvent = function (eventobj) {
if (!this.m_glc.send(eventobj)) {
this.m_glc.send(new NetDebugFailedSendErrorEvent(StripNCDEventToMinmal(eventobj)));
return(false);
}
return(true);
};
NetDebug.prototype.sendCommand = function (commandobj) {
return(this.m_glc.sendCommand(commandobj));
};
NetDebug.prototype.requestNewConfig = function () {
return(this.sendCommand(new GetConfigCommand()));
};
NetDebug.prototype.updateConfig = function (config) {
copyProperties(this.m_Config, config);
var _local3 = this.m_ncs.length;
var _local2 = 0;
while (_local2 < _local3) {
if (this.m_ncs[_local2] != null) {
this.m_ncs[_local2].updateConfig(config);
}
_local2++;
}
};
NetDebug.prototype.sendStatus = function (statusobj) {
if (this.m_Config.m_debug && (this.m_Config.client.m_debug)) {
return(this.m_glc.send(new NetDebugStatusEvent(statusobj)));
}
};
NetDebug.prototype.onEvent = function (eventobj) {
return(this.sendDebugEvent(eventobj));
};
NetDebug.prototype.onEventError = function (errorobj) {
return(this.sendDebugEvent(new NetDebugErrorEvent(errorobj)));
};
NetDebug.prototype.onReceiveCommand = function (commandobj) {
this[commandobj.command](commandobj.data);
};
NetDebug.prototype.onReceiveError = function (errorobj) {
this.sendDebugEvent(new NetDebugErrorEvent(errorobj));
};
NetDebug.prototype.traceNetServices = function (who, severity, number, message) {
if ((this.m_Config.m_debug && (this.m_Config.client.m_debug)) && (this.m_Config.client.trace)) {
if (!this.sendDebugEvent(new NetDebugTraceNetServicesEvent(who, severity, number, message))) {
}
}
};
NetDebug.prototype.trace = function (traceobj) {
if ((this.m_Config.m_debug && (this.m_Config.client.m_debug)) && (this.m_Config.client.trace)) {
if (!this.sendDebugEvent(new NetDebugTraceEvent(traceobj))) {
}
}
};
if (_global.netDebugInstance == undefined) {
_global.netDebugInstance = new NetDebug();
}
NetDebug.trace = function (obj) {
getNetDebug().trace(obj);
};
NetDebug.traceNetServices = function (who, severity, number, message) {
getNetDebug().traceNetServices(who, severity, number, message);
};
NetDebug.getVersion = function () {
return(getNetDebugVersion());
};
NetDebug.globalOnStatus = function (statusobj) {
getNetDebug().sendStatus(statusobj);
};
if (_global.System.onStatus == undefined) {
_global.System.onStatus = NetDebug.globalOnStatus;
}
Server = "http://games.cublo.com/";
NetServices.setDefaultGatewayUrl(Server + "/Widgets/gateway.aspx");
myServer = NetServices.createGatewayConnection();
myServer.setDebugID("Gateway Connection");
Widget = myServer.getService("Widgets.Games", this);
b.useHandCursor = false;
GetHighscores_Status = Report;
SetHighscores_Result = GetHighscores_Result;
SetHighscores_Status = Report;
Load();
Symbol 198 MovieClip Frame 40
c = 0;
this.onEnterFrame = function () {
if ((c++) > 1) {
ListBox.Reset();
this.onEnterFrame = null;
}
};
Instance of Symbol 177 MovieClip "ListBox" in Symbol 198 MovieClip Frame 40
onClipEvent (load) {
function Reset() {
n = 1;
while (n <= 100) {
Slide[n]._y = 0;
Slide[n]._visible = false;
n++;
}
Slide[0]._visible = true;
if (_parent.data.length > 0) {
n = 0;
while (n < _parent.data.length) {
Slide[n].Score = _parent.data[n].Score;
Slide[n].Name = _parent.data[n].Name;
Slide[n]._y = n * 10;
Slide[n]._visible = true;
n++;
}
}
}
}
Symbol 198 MovieClip Frame 60
c = 0;
this.onEnterFrame = function () {
if ((c++) > 1) {
FormBox.Reset();
this.onEnterFrame = null;
}
};
Instance of Symbol 192 MovieClip "FormBox" in Symbol 198 MovieClip Frame 60
onClipEvent (load) {
function Reset() {
Lang = _parent.Lang;
n = 0;
while (n <= Boxes.length) {
Bt = eval (Boxes[n]);
Bt.Init();
Bt.ShowTxt = (Bt.Input = "YOUR NAME HERE");
Bt.gotoAndStop(3);
n++;
}
}
function Fill(Which, En, Sp) {
Bt = eval (Which + "Box");
Bt.InputEn = En;
Bt.InputSp = Sp;
if ((Bt.Input == "") or (Bt.Input == "YOUR NAME HERE")) {
Bt.Input = "YOUR NAME HERE";
Bt.gotoAndStop(3);
} else {
Bt.gotoAndStop(4);
Bt.Input = Bt.Input;
}
}
function ValidateFields() {
Validation = true;
n = 0;
while (n <= Boxes.length) {
Bt = eval (Boxes[n]);
if (Bt.Required) {
if (!Validate(Bt)) {
Validation = false;
}
if (Bt.Mail) {
if (!ValidateMail(Bt)) {
Validation = false;
}
}
}
n++;
}
if (Validation) {
return(true);
}
return(false);
}
function Validate(Which) {
if (Which.Input.length < 2) {
Which.Input = "2 chars min";
Which.gotoAndPlay(5);
return(false);
}
if (Which._currentframe != 4) {
Which.gotoAndPlay(5);
Which.Input = "YOUR NAME HERE";
return(false);
}
return(true);
}
Boxes = new Array();
this.onMouseUp = function () {
Typing = false;
n = 0;
while (n <= Boxes.length) {
Bt = eval (Boxes[n]);
if (Selection.getFocus() == (Bt + ".box")) {
if (Bt._currentframe != 4) {
Bt.Input = "";
if (Bt.Prefix != null) {
Bt.Input = "http://";
}
Bt.gotoAndStop(4);
CurrentSelection = eval (Bt + ".box");
}
CurrentSelection = eval (Bt + ".box");
Typing = true;
} else if ((Bt.Input == "") or ((Bt.Input == Bt["DefaultMsg" + Lang]) and (Bt._currentframe < 5))) {
Bt.Input = Bt["DefaultMsg" + Lang];
Bt.gotoAndStop(3);
}
n++;
}
};
}