Frame 1
stop();
Instance of Symbol 66 MovieClip in Frame 1
on (press) {
getURL ("http://games.cublo.com", "_blank");
}
Frame 2
function compshoot(remoteplayer) {
player = eval (remoteplayer);
n = 1;
while (n <= muchballs) {
ball = Balls["ball" + n];
bshadow = Balls["shadow" + n];
if (!ball._visible) {
bshadow._visible = (ball._visible = true);
bshadow._x = (ball._x = player._x + 20);
ball._y = player._y - (player._height / 5);
bshadow._y = player._y + (player._height / 10);
gravity[n] = 0;
power[n] = -((10 + random(10)) + (player.hardness * 5));
ball.power = power[n];
ball.angle = ((power[n] / 2) + random(3)) - 1.5;
ball.player = "c";
return;
}
n++;
}
}
function shoot(remoteplayer) {
player = eval (remoteplayer);
n = 1;
while (n <= muchballs) {
ball = Balls["ball" + n];
bshadow = Balls["shadow" + n];
if (!ball._visible) {
ball.player = "h";
bshadow._visible = (ball._visible = true);
bshadow._x = (ball._x = player._x - 20);
ball._y = player._y - 50;
bshadow._y = player._y - 10;
gravity[n] = 0;
power[n] = player.picker._currentframe;
ball.power = power[n];
ball.angle = power[n] / 1.5;
player.gotoAndPlay("throw");
return;
}
n++;
}
}
function startlevel() {
level++;
compskilled = 0;
comeback = 1;
if (muchcomps < 15) {
muchcomps++;
}
n = 1;
while (n <= 3) {
human = eval ("human" + n);
human.lifes = human.lifes + 1;
n++;
}
created = 0;
n = 1;
while (n <= muchcomps) {
trace(n);
eval ("comp" + n).Reset();
n++;
}
timer = 0;
this.onEnterFrame = function () {
n = 1;
while (n <= 15) {
eval ("human" + n).swapDepths(eval ("human" + n)._y);
eval ("comp" + n).swapDepths(eval ("comp" + n)._y);
n++;
}
if ((compskilled >= muchcomps) or (humanskilled >= 3)) {
levelsnd.start();
if (compskilled >= muchcomps) {
blocker.Intermediate();
this.onEnterFrame = null;
}
if (humanskilled >= 3) {
Top100.New();
Kill();
}
}
n = 1;
while (n <= muchballs) {
ball = Balls["ball" + n];
bshadow = Balls["shadow" + n];
if (ball._visible) {
power[n] = power[n] * 0.96;
ball.angle = ball.angle * 0.96;
bshadow._x = (ball._x = ball._x - power[n]);
ball._y = ball._y - ball.angle;
bshadow._y = bshadow._y - ball.angle;
gravity[n] = gravity[n] + 0.1;
ball._y = ball._y + gravity[n];
bshadow._alpha = (bshadow._y - ball._y) + 10;
if (ball._y >= bshadow._y) {
ball._visible = false;
}
if (power[n] > 0) {
c = 1;
while (c <= muchcomps) {
comp = eval ("comp" + c);
if ((comp.Mode != "hurt") and comp._visible) {
if (ball.hitTest(comp) and bshadow.hitTest(comp.shadow)) {
bshadow._visible = (ball._visible = false);
Score = Score + Math.round(100 + (random(10) * ball.power));
comp.Hurt();
}
}
c++;
}
} else {
c = 1;
while (c <= 3) {
human = eval ("human" + c);
if (human.hurt == false) {
if (ball.hitTest(human) and bshadow.hitTest(human.shadow)) {
bshadow._visible = (ball._visible = false);
human.gotoAndPlay("ouch");
}
}
c++;
}
}
}
n++;
}
};
}
function restart() {
level = 0;
Score = 0;
Kill();
startlevel();
}
function Kill() {
this.onEnterFrame = null;
muchcomps = 2;
humanskilled = 0;
if (MaxScore < Score) {
MaxScore = Score;
}
n = 1;
while (n <= 3) {
human = eval ("human" + n);
human._x = human.x;
human._y = human.y;
human.lifes = 2;
human.gotoAndStop("stand");
n++;
}
n = 1;
while (n <= 15) {
eval ("comp" + n).Kill();
n++;
}
}
stop();
n = 1;
while (n <= 3) {
eval ("human" + n).x = eval ("human" + n)._x;
eval ("human" + n).y = eval ("human" + n)._y;
n++;
}
levelsnd = new Sound();
levelsnd.attachSound("level");
MaxScore = 0;
level = 0;
timer = 0;
maxlevel = 0;
muchballs = 30;
n = 1;
while (n <= muchballs) {
Balls.attachMovie("ball", "ball" + n, n);
Balls["ball" + n]._visible = false;
Balls["ball" + n]._x = 10;
Balls.attachMovie("shadow", "shadow" + n, muchballs + n);
Balls["shadow" + n]._x = -10;
Balls["shadow" + n]._visible = false;
n++;
}
gravity = new Array();
power = new Array();
Symbol 18 MovieClip Frame 30
_parent._parent.compshoot(_parent._name);
Symbol 18 MovieClip Frame 42
_parent.firing = false;
_parent.x = (_parent._x + random(80)) - 10;
_parent.y = (_parent._y + random(40)) - 10;
Symbol 22 MovieClip Frame 15
stop();
Symbol 25 MovieClip Frame 37
stop();
Symbol 28 MovieClip Frame 1
gotoAndStop(random(2) + 1);
Symbol 29 MovieClip Frame 70
stop();
Symbol 31 MovieClip [comp] Frame 1
function Think() {
Mode = "think";
_xscale = Math.abs(_xscale);
this.onEnterFrame = function () {
r = random(100);
if (r <= 30) {
Stand();
} else if (r <= 60) {
Walk();
} else {
Pick();
}
};
}
function Stand() {
Mode = "stand";
gotoAndStop(Mode);
c = (random(20) + (hardness * 5)) + 10;
this.onEnterFrame = function () {
if ((c--) < 0) {
r = random(3);
if (r == 0) {
Walk();
} else {
Pick();
}
}
};
}
function Walk() {
Mode = "walk";
gotoAndStop(Mode);
if (ToWalk != null) {
ToWalk = random(5) + 20;
x = (_x + random(30)) - 5;
y = (_y + random(20)) - 5;
n = 1;
while (n <= 5) {
human = _parent["human" + (random(3) + 1)];
if ((!human.killed) and (!human.hurt)) {
x = human._x - 130;
y = human._y - 60;
ToWalk = random(5) + 20;
if (random(3) == 0) {
ToWalk = null;
}
break;
}
n++;
}
}
_xscale = Math.abs(_xscale);
if (x < _x) {
_xscale = (_xscale * -1);
}
angx = x - _x;
angy = y - _y;
h = Math.sqrt((angx * angx) + (angy * angy));
cos = angx / h;
sen = angy / h;
c = 60;
this.onEnterFrame = function () {
_x = (_x + ((5 - hardness) * cos));
_y = (_y + ((5 - hardness) * sen));
if (ToWalk == null) {
if (Math.abs(_x - x) < 30) {
ToWalk = 0;
Think();
}
} else if ((ToWalk--) < 0) {
Think();
}
if ((--c) < 0) {
Think();
}
};
}
function Hurt() {
_xscale = Math.abs(_xscale);
Mode = "hurt";
if ((--lifes) <= 0) {
gotoAndStop ("dead");
_root.Score = _root.Score + (1000 + (random(500) * hardness));
c = 60;
this.onEnterFrame = function () {
if ((c--) < 0) {
_parent.compskilled++;
trace((_parent.compskilled + " / ") + _parent.muchcomps);
Kill();
}
};
} else {
gotoAndStop ("hurt");
c = 35;
this.onEnterFrame = function () {
if ((c--) < 0) {
Think();
}
};
}
}
function Kill() {
_visible = false;
_y = -1000;
_x = -1000;
this.onEnterFrame = null;
}
function Pick() {
_xscale = Math.abs(_xscale);
Mode = "pick";
gotoAndStop(Mode);
c = 42;
this.onEnterFrame = function () {
if ((c--) < 0) {
Walk();
}
};
}
function Reset() {
_visible = true;
hardness = random(5);
lifes = 3 + hardness;
_yscale = (40 + (hardness * 10));
_xscale = (40 + (hardness * 10));
_x = (random(_parent.muchcomps * 30) + 10);
_y = (random(_parent.muchcomps * 30) + 10);
x = _x;
y = _y;
_x = -10;
_y = ((50 + random(100)) - 50);
ToWalk = null;
Walk();
}
stop();
if (_parent.AUTO == null) {
_parent.AUTO = 0;
}
_visible = false;
_name = ("comp" + String(++_parent.AUTO));
Kill();
Symbol 31 MovieClip [comp] Frame 10
stop();
Symbol 31 MovieClip [comp] Frame 20
stop();
Symbol 31 MovieClip [comp] Frame 30
stop();
Symbol 31 MovieClip [comp] Frame 55
stop();
Symbol 61 MovieClip Frame 1
stop();
Symbol 66 MovieClip Frame 1
_root.stop();
Instance of Symbol 64 MovieClip "bar" in Symbol 66 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 66 MovieClip Frame 167
stop();
Symbol 66 MovieClip Frame 181
_root.play();
stop();
Symbol 150 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1};
}
Symbol 71 Button
on (press) {
_parent.Hide();
}
Symbol 74 MovieClip Frame 9
stop();
Symbol 75 MovieClip Frame 1
function Init() {
gotoAndStop (3);
mod = "in";
_visible = true;
txt = "LEVEL 1";
}
function Intermediate() {
gotoAndStop (3);
mod = "int";
_visible = true;
txt = "LEVEL " + Number(_root.level + 1);
}
function Hide() {
gotoAndStop (4);
if (mod == "int") {
_root.startlevel();
} else {
_root.restart();
}
}
this.swapDepths(600);
Symbol 75 MovieClip Frame 2
stop();
Symbol 75 MovieClip Frame 3
stop();
stopAllSounds();
Symbol 77 MovieClip Frame 1
gotoAndPlay(random(_totalframes));
Symbol 77 MovieClip Frame 254
gotoAndPlay (2);
Symbol 78 MovieClip Frame 1
_x = (random(700) - 100);
gotoAndPlay(random(_totalframes));
Symbol 78 MovieClip Frame 208
gotoAndPlay (2);
Symbol 79 MovieClip Frame 1
this.swapDepths(9900);
Symbol 90 MovieClip Frame 20
stop();
Symbol 92 Button
on (press) {
if (!hurt) {
gotoAndStop ("pick");
drag = true;
Mouse.hide();
shadow.onEnterFrame = function () {
trace("asd");
_x = (_x + ((_parent._xmouse - _x) / 2));
_y = (_y + ((_parent._ymouse - _y) / 2));
if (_x < 20) {
_x = 20;
}
if (_x > 560) {
_x = 560;
}
if (_y < 100) {
_y = 100;
}
if (_y > 290) {
_y = 290;
}
};
}
}
on (release, releaseOutside) {
shadow.onEnterFrame = null;
drag = false;
Mouse.show();
_parent.shoot(_name);
}
Symbol 98 MovieClip Frame 20
stop();
Symbol 106 MovieClip Frame 1
gotoAndStop(random(2) + 1);
Symbol 107 MovieClip Frame 52
stop();
Symbol 108 MovieClip Frame 1
stop();
this.swapDepths(_y);
hurt = false;
killed = false;
this.onEnterFrame = null;
Symbol 108 MovieClip Frame 10
stop();
mc = this;
hurt = false;
this.onEnterFrame = null;
Symbol 108 MovieClip Frame 20
hurt = false;
shadow.onEnterFrame = null;
this.onEnterFrame = function () {
play();
};
Symbol 108 MovieClip Frame 35
gotoAndStop ("stand");
this.onEnterFrame = null;
Symbol 108 MovieClip Frame 36
if (drag) {
drag = false;
stopDrag();
this.swapDepths(_y);
Mouse.show();
}
lifes--;
if (lifes <= 0) {
gotoAndStop ("dead");
}
hurt = true;
this.onEnterFrame = function () {
play();
};
shadow.onEnterFrame = null;
Symbol 108 MovieClip Frame 174
gotoAndStop ("stand");
this.onEnterFrame = null;
Symbol 108 MovieClip Frame 175
stop();
hurt = true;
killed = true;
c = 0;
this.onEnterFrame = function () {
if ((c++) > 60) {
_parent.humanskilled++;
this.onEnterFrame = null;
}
};
Symbol 109 Button
on (press) {
_root.blocker.Init();
Hide();
}
Symbol 119 Button
on (press) {
getURL ("http://games.cublo.com/snowball", "_blank");
}
Symbol 121 MovieClip Frame 11
stop();
Symbol 125 MovieClip Frame 1
if (_parent.i == null) {
_parent.i = 0;
}
_name = String(_parent.i++);
_visible = false;
Symbol 127 MovieClip Frame 1
_visible = false;
Symbol 128 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 137 Button
on (press) {
Save();
}
Symbol 142 MovieClip Frame 1
_parent.Boxes.push(_name);
Symbol 142 MovieClip Frame 3
stop();
Symbol 142 MovieClip Frame 4
box.html = html;
Symbol 142 MovieClip Frame 45
gotoAndStop (3);
Instance of Symbol 142 MovieClip "NameBox" in Symbol 143 MovieClip Frame 1
onClipEvent (load) {
DefaultMsgEn = (DefaultMsgSp = "YOUR NAME HERE");
html = false;
Required = true;
}
Symbol 148 Button
on (press) {
getURL ("http://games.cublo.com/snowball", "_blank");
}
Symbol 149 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 = "MEDIUM";
b.onEnterFrame = null;
_visible = false;
}
function Load() {
Show();
gotoAndStop ("Load");
Widget.GetHighscores(Game);
}
function Show() {
_visible = true;
_quality = "HIGH";
}
function GetHighscores_Result(result) {
data = result.Table.items;
gotoAndStop ("Display");
}
function New() {
trace("new!");
Show();
gotoAndStop ("Display");
if (_root.Score > 0) {
if ((data.length == null) or (data.length < 100)) {
gotoAndStop ("New");
} else {
for (n in data) {
if (_root.Score > data[n].Score) {
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;
this.swapDepths(9000);
GetHighscores_Status = Report;
SetHighscores_Result = GetHighscores_Result;
SetHighscores_Status = Report;
Load();
Symbol 149 MovieClip Frame 40
c = 0;
this.onEnterFrame = function () {
if ((c++) > 1) {
ListBox.Reset();
this.onEnterFrame = null;
}
};
Instance of Symbol 128 MovieClip "ListBox" in Symbol 149 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 149 MovieClip Frame 60
c = 0;
this.onEnterFrame = function () {
if ((c++) > 1) {
FormBox.Reset();
this.onEnterFrame = null;
}
};
Instance of Symbol 143 MovieClip "FormBox" in Symbol 149 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++;
}
};
}