Frame 1
MochiAd.showPreGameAd({id:"0cc1b96e268c7bf1", res:"600x420"});
stop();
Frame 4
function hideMenu() {
var _local2 = new ContextMenu();
_local2.hideBuiltInItems();
if (alien) {
var _local3 = new ContextMenuItem("Gaming Hungama", gotoURL);
_local2.customItems.push(_local3);
}
this.menu = _local2;
}
function gotoURL() {
getURL (myLink, "_blank");
}
function allowClick(mc) {
if (alien) {
mc.onRelease = function () {
gotoURL();
};
} else {
mc.useHandCursor = false;
mc.enabled = false;
}
}
function initSound(mc) {
mc.snBut.onRelease = function () {
var gsndvol = mySound.getVolume();
if (sndstate eq "on") {
sndstatenum = -1;
sndstate = "off";
} else {
sndstatenum = 1;
sndstate = "on";
}
mc.gotoAndStop(sndstate);
mc.onEnterFrame = function () {
gsndvol = gsndvol + (sndDelay * sndstatenum);
mySound.setVolume(gsndvol);
if (gsndvol >= 100) {
mySound.setVolume(100);
mc.onEnterFrame = null;
} else if (gsndvol <= 0) {
mySound.setVolume(0);
mc.onEnterFrame = null;
}
};
};
}
function showTeaser(mc) {
if (!alien) {
if (obj_game.showTeaser) {
mc.gotoAndStop(2);
} else {
_root.play();
}
} else {
mc.gotoAndStop(2);
}
}
function showPreroll(mc) {
if (!alien) {
_root.play();
} else {
_root.play();
}
}
function alienManager() {
trace("alienManager ========================");
var _local2 = new LoadVars();
_local2.onLoad = function (s) {
trace("loaded");
mytxt.text = h;
};
h = this._url;
var _local3 = (("http://www.gaminghungama.com/ahm/?gid=" + obj_game.game_id) + "&r=banner300X250&h=") + h;
_local2.sendAndLoad(_local3, _local2, "POST");
trace(" Call Url " + _local3);
}
function playagainManager() {
trace("playagainManager ========================");
var _local2 = new LoadVars();
_local2.onLoad = function (s) {
trace("loaded");
mytxt.text = h;
};
h = this._url;
var _local3 = (("http://www.gaminghungama.com/ahm/?gid=" + obj_game.game_id) + "&r=playagain&h=") + h;
_local2.sendAndLoad(_local3, _local2, "POST");
trace(" Call Url " + _local3);
}
function trackGame(type) {
var _local2 = (((("http://www.gaminghungama.com/?g=" + _root.obj_game.game_name) + "&source=") + type) + "&h=") + myName;
getURL (_local2, "_blank");
}
function ghinit() {
lccheck();
lctimer = setInterval(lccheck, 5000);
}
function lccheck() {
LCrec.connect("gamingsession" + gmid);
LCsend = new LocalConnection();
LCsend.send("gamingsession" + gmid, "kill", my_key);
countlc = countlc + 1;
if (countlc > 5) {
clearInterval(lctimer);
}
}
function pluginMessageReceived(plugin, action, ob) {
if (action eq "sendAndLoad_callback") {
if (ob.done == 1) {
if (ob.gmsess) {
gmsess = ob.gmsess;
trace(gmsess);
_root.gotoAndStop("teaser");
} else {
mcPath.gotoAndStop("score_top10");
gmsess = ob.newgmsess;
trace("newgmsess----->" + gmsess);
}
clearInterval(intervalId);
}
}
}
function get_gmsess() {
trace("CALLED");
var _local1 = new Object();
mydata = "getgmsess";
_local1.mydata = mydata;
_local1.username = unm;
_local1.gmid = gmid;
es.pluginRequest("db_single", "blank", _local1);
}
function doit6() {
function joinRoom() {
var _local1 = new Object();
_local1.roomName = roomselected;
_local1.zone = zoneselected;
_local1.plugins = new Array();
_local1.plugins.push({name:"db_single"});
es.createRoom(_local1);
}
loader.connecting.statusmsg = "Connecting to server...";
roomselected = ("lobby" + gmid) + unm;
zoneselected = "gaminghungama" + gmid;
es.roomJoined = function (success, error) {
if (success) {
trace("Connected and joined the room");
connecting.statusmsg = "Loading data...";
if (!dc) {
get_gmsess();
intervalId = setInterval(get_gmsess, 15000);
}
} else {
loader.connecting.statusmsg = error;
loader.connecting.gotoAndStop(2);
}
};
joinRoom();
}
function doit5() {
es.loggedIn = function (success, error) {
loader.connecting.statusmsg = "Connecting to server...";
if (success) {
doit6();
} else {
error_log = error;
doit3();
}
};
loader.band.gotoAndStop(101);
}
function doit4() {
function loginClicked() {
var _local1 = unm + gmid;
nigol = _local1;
var _local2 = " ";
if ((_local1.length > 0) && (_local1.length < 35)) {
es.login(_local1);
doit5();
}
}
if (error_log) {
var _local2 = new Object();
_local2.login = nigol;
es.pluginRequest("KickPlugin", "Kickout", _local2);
_local2 = new Object();
_local2.login = nigol;
_local2.error = (error_log + "\r") + newline;
es.pluginRequest("ErrorPlugin", "Save", _local2);
delete error_log;
}
clearInterval(intervalId0);
loginClicked();
}
function doit3() {
function connect() {
es.connect();
}
loader.connecting.statusmsg = "Connecting to server...";
es.onConnection = function (success, error) {
if (success) {
clearInterval(intervalId0);
doit4();
} else {
loader.connecting.statusmsg = error;
loader.connecting.gotoAndStop(2);
}
};
es.setIP(ip);
es.setPort(port);
System.security.loadPolicyFile((("xmlsocket://" + ip) + ":") + port);
clearInterval(intervalId0);
intervalId0 = setInterval(connect, 15000);
connect();
loader.band.gotoAndStop(101);
}
function initPlugin() {
es.pluginMessageReceived = pluginMessageReceived;
loader.connecting.statusmsg = "Connecting to server...";
serverSettings = new XML();
serverSettings.ignoreWhite = true;
serverSettings.load(pth2 + "Config.xml");
serverSettings.onLoad = function () {
for (all in this.firstChild.childNodes) {
for (all in this.firstChild.childNodes) {
_root[this.firstChild.childNodes[all].nodeName] = this.firstChild.childNodes[all].firstChild.toString();
}
}
doit3();
};
}
function submitScore() {
var _local1 = new Object();
mydata = "submitpoints";
_local1.mydata = mydata;
_local1.username = unm;
_local1.gmsess = gmsess;
_local1.gmid = gmid;
_local1.score = obj_game.score;
_local1.tim = obj_game.scoreshow;
_local1.pnt = obj_game.point;
trace("--------------------");
trace(_local1.gmsess);
trace(_local1.gmid);
trace(_local1.score);
trace(_local1.pnt);
trace("--------------------");
es.pluginRequest("db_single", "blank", _local1);
}
function checkSubmit(mc) {
mcPath = mc;
trace(mcPath + "==================");
intervalId = setInterval(submitScore, 15000);
submitScore();
}
function serverClosed() {
dc = true;
doit3();
trace("Disconnected");
}
function getTop10(mc) {
dataload = new LoadVars();
dataload.gmid = _root.gmid;
dataload.tim = 0;
dataload.sendAndLoad("http://www.gaminghungama.com/getSingleToppers.php3", dataload, "POST");
dataload.onLoad = function (success) {
if (success) {
if (dataload.done == 1) {
toppers = dataload.toppers;
topscore = dataload.topscore;
mc.gotoAndStop("top_ten");
}
} else {
dataload.sendAndLoad("http://www.gaminghungama.com/getSingleToppers.php3", dataload, "POST");
}
};
stop();
}
function funPlayagain() {
gotoAndStop ("game");
}
trace("Game Config");
var obj_game = new Object();
obj_game.game_name = "goal_baby_goal";
obj_game.game_title = "Goal Baby Goal";
obj_game.game_id = "52";
obj_game.game_clickurl = "http://www.gaminghungama.com/?" + obj_game.game_name;
obj_game.scoreshow = 0;
obj_game.showTeaser = true;
obj_game.showPreroll = false;
obj_game.score = 0;
obj_game.point = 0;
System.security.allowDomain("*");
System.security.allowInsecureDomain("*");
var alien;
var myURL = this._url;
var myLink = obj_game.game_clickurl;
var mySound = new Sound();
var sndDelay = 5;
var sndstate = "on";
var sndstatenum = 1;
var myName = "";
trace("function");
var tArr1 = myURL.split("http://");
if (tArr1.length == 2) {
var tArr2 = myURL.split("gaminghungama.com/");
if (tArr2.length == 2) {
myName = "gh";
alien = false;
} else {
myName = "alien";
trace("Aliean");
alienManager();
alien = true;
}
} else {
myName = "alien";
alienManager();
alien = true;
}
hideMenu();
LCrec = new LocalConnection();
my_key = random(999999);
LCrec.kill = function (got_key) {
if (got_key != my_key) {
_visible = false;
getURL ("javascript:window.close();");
}
};
if (!alien) {
ghinit();
}
var mcPath;
var es = ElectroServer.getInstance();
dc = false;
pth = _url;
pth1 = pth.lastIndexOf("/");
pth2 = pth.slice(0, pth1 + 1);
es.connectionClosed = serverClosed;
Frame 10
function preLoad() {
total = _root.getBytesTotal();
this.onEnterFrame = function () {
byteloaded = _root.getBytesLoaded();
var _local3 = Math.round((byteloaded / total) * 100);
_root.perval = _local3 + "% Loaded";
if (_local3 >= 100) {
if (!alien) {
loader.gotoAndStop("server_connect");
_root.initPlugin();
} else {
gotoAndStop ("teaser");
}
this.onEnterFrame = null;
}
};
}
preLoad();
stop();
Frame 17
stop();
Frame 23
stop();
Frame 29
loady = 1;
_quality = "high";
qual = 3;
gametime = 2;
globalscale = 4;
stop();
sound.gotoAndStop("intro");
Frame 36
loady = 1;
goal = 0;
scorep = 0;
scoreo = 0;
timekeeper = 0;
timedisplay = "0:00";
pasttime = 0;
thistime = 0;
ready = 0;
sound.gotoAndStop("game");
stop();
Frame 42
stop();
Symbol 322 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.6");
}
static function showPreGameAd(options) {
var _local26 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}, ad_progress:function (percent) {
}};
options = _parseOptions(options, _local26);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def") {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local22 = 11000;
var _local25 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local6 = chk.createEmptyMovieClip("_mochiad_bar", 4);
if (options.no_progress_bar) {
_local6._visible = false;
delete options.no_progress_bar;
} else {
_local6._x = 10;
_local6._y = _local13 - 20;
}
var _local21 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local23 = options.outline;
delete options.outline;
var _local5 = _local6.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local6.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local21);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local7 = _local6.createEmptyMovieClip("_outline", 3);
_local7.lineStyle(0, _local23, 100);
_local7.moveTo(0, 0);
_local7.lineTo(_local4 - 20, 0);
_local7.lineTo(_local4 - 20, 10);
_local7.lineTo(0, 10);
_local7.lineTo(0, 0);
chk.ad_msec = _local22;
chk.ad_timeout = _local25;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
var sendHostProgress = false;
mc.lc.sendHostLoadProgress = function (lc_name) {
sendHostProgress = true;
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local11 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local2 = (100 * _local8) / _local4;
var _local10 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local13 = Math.min(100, Math.min(_local2 || 0, _local10));
_local13 = Math.max(this.last_pcnt, _local13);
this.last_pcnt = _local13;
_local9._xscale = _local13;
options.ad_progress(_local13);
if (sendHostProgress) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local2});
if (_local2 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var _local7 = _local11.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if ((_local5 > chk.ad_timeout) && (_local2 == 100)) {
options.ad_failed();
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showClickAwayAd(options) {
var _local9 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function () {
}, ad_finished:function () {
}, ad_loaded:function (width, height) {
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local9);
var clip = options.clip;
var _local8 = options.ad_timeout;
delete options.ad_timeout;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local4 = _getRes(options);
var _local10 = _local4[0];
var _local7 = _local4[1];
mc._x = _local10 * 0.5;
mc._y = _local7 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_timeout = _local8;
chk.started = getTimer();
chk.showing = false;
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
var _local20 = false;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
_local2 = true;
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local2) {
delete this.onEnterFrame;
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showPreloaderAd(options) {
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
showPreGameAd(options);
}
static function showTimedAd(options) {
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
showInterLevelAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
if (clip._mochiad._containerLCName != undefined) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"unload"});
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
if (_local4.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(_local4);
}
static function rpc(clip, callbackID, arg) {
switch (arg.id) {
case "setValue" :
setValue(clip, arg.objectName, arg.value);
break;
case "getValue" :
var _local4 = getValue(clip, arg.objectName);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local4);
break;
case "runMethod" :
var _local3 = runMethod(clip, arg.method, arg.args);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local3);
break;
default :
trace("[mochiads rpc] unknown rpc id: " + arg.id);
}
}
static function setValue(base, objectName, value) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
base[_local2[_local1]] = value;
}
static function getValue(base, objectName) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
return(base[_local2[_local1]]);
}
static function runMethod(base, methodName, argsArray) {
var _local2 = methodName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
if (typeof(base[_local2[_local1]]) == "function") {
return(base[_local2[_local1]].apply(base, argsArray));
}
return(undefined);
}
}
Symbol 323 MovieClip [__Packages.ElectroServer] Frame 0
class ElectroServer extends XMLSocket
{
static var _instance;
var buddyList, connectionClosed, moderatorLabel, ip, port, zone, inGame, myUser, username, password, configurationLoaded, pendingRoom, auto_join, joiningRoom, pendingZone, ConnectedToServer, onConnection, rawMessageReceived, onConnect, onXML, loggedIn, allZonesLoaded, userLocationLoaded, usersInRoomLoaded, buddyLoggedOut, buddyLoggedIn, configXML, userVariableUpdated, roomVariablesUpdated, roomJoined, userListUpdated, isGameMaster, usersRenumbered, moveReceived, messageReceived, onRoomsInZoneLoaded, zoneChanged, roomListUpdated, pluginMessageReceived, loggedInUserCountUpdated, onGetServerTime, zoneUpdated;
function ElectroServer () {
super();
buddyList = new Array();
}
function ValidateVersion(Major, Minor, Sub) {
var _local2 = true;
if ((MajorVersion > Major) || (isNaN(Major))) {
_local2 = false;
} else if ((MinorVersion > Minor) && (MajorVersion == Major)) {
_local2 = false;
} else if ((SubVersion > Sub) && (MinorVersion == Minor)) {
_local2 = false;
}
return(_local2);
}
function onClose() {
isConnected = false;
connectionClosed(true);
}
function removeBuddy(name) {
var _local2 = 0;
while (_local2 < buddyList.length) {
if (buddyList[_local2].username == name) {
buddyList.splice(_local2, 1);
break;
}
_local2++;
}
var _local5 = "DeleteFriend";
var _local4 = ("<FriendName>" + name) + "</FriendName>";
send(_local5, _local4);
}
function getUsersInRoom(zone, room) {
var _local3 = "GetUsersInRoom";
var _local2 = ((("<Zone>" + zone) + "</Zone><Room>") + room) + "</Room>";
send(_local3, _local2);
}
function getUserLocation(name) {
var _local3 = "GetUserLocation";
var _local2 = ("<UserName>" + name) + "</UserName>";
send(_local3, _local2);
}
function getBuddyList() {
return(buddyList);
}
function addBuddy(name) {
var _local3 = false;
var _local2 = 0;
while (_local2 < buddyList.length) {
if (buddyList[_local2].username == name) {
_local3 = true;
break;
}
_local2++;
}
if (!_local3) {
var _local4 = new Object();
_local4.isOnline = false;
_local4.username = name;
_local4.status = "offline";
_local4.label = (_local4.username + " ") + _local4.status;
buddyList.push(_local4);
var _local7 = "AddFriend";
var _local6 = ("<FriendName>" + name) + "</FriendName>";
send(_local7, _local6);
}
}
function close() {
super.close();
connectionClosed(false);
}
function getServerTime() {
var _local3 = "GetServerTime";
var _local2 = "";
send(_local3, _local2);
}
function getLoggedInUserCount() {
var _local3 = "GetLoggedInUserCount";
var _local2 = "";
send(_local3, _local2);
}
function setModeratorLabel(val, str) {
showModeratorLabel = val;
moderatorLabel = str;
if (str == undefined) {
moderatorLabel = " [Moderator]";
}
}
static function getInstance() {
if (_instance == null) {
_instance = new ElectroServer();
}
return(_instance);
}
function setDebug(val) {
debug = val;
}
function getDebug() {
return(debug);
}
function getIP() {
return(ip);
}
function getPort() {
return(port);
}
function setIP(tempIP) {
ip = tempIP;
}
function setPort(tempPort) {
port = tempPort;
}
function deleteRoomVariable(name) {
var _local3 = "DeleteRoomVariable";
var _local2 = ("<RoomVariable ><Name>" + name) + "</Name></RoomVariable>";
send(_local3, _local2);
}
function getRoomsInZone(tmp_zone) {
var _local3 = "GetRoomsInZone";
var _local2 = ("<Zone>" + tmp_zone) + "</Zone>";
send(_local3, _local2);
}
function changeRoomDetail(detail, value) {
var _local11 = "ChangeRoomDetails";
var _local4;
var _local3;
detail = detail.toLowerCase();
var _local6 = "";
if (detail == "description") {
_local4 = "ChangeDescription";
_local3 = "Description";
value.attributes.isGameRoom = true;
var _local9 = new Wddx();
var _local10 = ("<![CDATA[" + _local9.serialize(value)) + "]]>";
} else if (detail == "updatable") {
_local4 = "ChangeUpdatable";
_local3 = "Updatable";
var _local10 = value;
} else if (detail == "hidden") {
_local4 = "ChangeVisibility";
_local3 = "Hidden";
var _local10 = value;
} else if (detail == "capacity") {
_local4 = "ChangeCapacity";
_local3 = "Capacity";
if ((value == undefined) || (value == 0)) {
value = -1;
}
var _local10 = value;
} else if (detail == "password") {
_local4 = "ChangePasswordProtected";
_local3 = "Password";
var _local10 = value;
var _local7;
if (value == undefined) {
value = "";
}
if (value.length >= 1) {
_local7 = true;
} else {
_local7 = false;
}
_local6 = ("<IsProtected>" + _local7) + "</IsProtected>";
}
var _local8 = ((((((((("<MinorAction>" + _local4) + "</MinorAction>") + _local6) + "<") + _local3) + ">") + _local10) + "</") + _local3) + ">";
send(_local11, _local8);
}
function kick(name, reason) {
if (reason == undefined) {
reason = "";
}
var _local4 = "ModeratorCommand";
var _local2 = ((("<MinorAction>Kick</MinorAction><UserName>" + name) + "</UserName><Reason>") + reason) + "</Reason>";
send(_local4, _local2);
}
function ban(name, reason, expires) {
if (reason == undefined) {
reason = "";
}
if (expires == undefined) {
expires = "-1";
}
var _local5 = "ModeratorCommand";
var _local2 = ((((("<MinorAction>Ban</MinorAction><UserName>" + name) + "</UserName><Reason>") + reason) + "</Reason><Expires>") + expires) + "</Expires>";
send(_local5, _local2);
}
function createUserVariable(name, value) {
var _local3 = "UpdateUserVariable";
var _local2 = ((("<MinorAction>Create</MinorAction><Name>" + name) + "</Name><Data>") + value) + "</Data>";
send(_local3, _local2);
}
function getAllZones() {
send("GetAllZones", "");
}
function updateUserVariable(name, value) {
var _local3 = "UpdateUserVariable";
var _local2 = ((("<MinorAction>Update</MinorAction><Name>" + name) + "</Name><Data>") + value) + "</Data>";
send(_local3, _local2);
}
function deleteUserVariable(name, value) {
var _local3 = "UpdateUserVariable";
var _local2 = ("<MinorAction>Delete</MinorAction><Name>" + name) + "</Name>";
send(_local3, _local2);
}
function createRoomVariable(ob) {
var _local3 = ob.name;
var _local6 = ob.data;
var _local4 = ob.persistent;
var _local2 = ob.locked;
if (_local4 == undefined) {
_local4 = false;
}
if (_local2 == undefined) {
_local2 = false;
}
if (zone.myRoom.roomVariables[_local3] == undefined) {
var _local8 = "CreateRoomVariable";
var _local7 = ((((((("<RoomVariable Persistent=\"" + _local4) + "\" Locked=\"") + _local2) + "\" ><Name>") + _local3) + "</Name><Data><![CDATA[") + _local6) + "]]></Data></RoomVariable>";
} else {
var _local8 = "UpdateRoomVariable";
var _local7 = ((((("<RoomVariable Locked=\"" + _local2) + "\" ><Name>") + _local3) + "</Name><Data><![CDATA[") + _local6) + "]]></Data></RoomVariable>";
}
send(_local8, _local7);
}
function getZone() {
return(zone);
}
function sendMove(who, ob) {
var _local8 = new Wddx();
var _local6 = _local8.serialize(ob);
if (who.toLowerCase() == "all") {
var _local9 = "SendPublicMessage";
var _local7 = ("<Message><![CDATA[" + _local6) + "]]></Message><Variables><Variable><Name>Action</Name><Data>Move</Data></Variable><Variable><Name>MoveType</Name><Data>Public</Data></Variable></Variables>";
} else {
var _local9 = "SendPrivateMessage";
var _local4 = who;
var _local5 = "<Users>";
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5 = _local5 + (("<User>" + _local3) + "</User>");
_local2++;
}
_local5 = _local5 + "</Users>";
var _local7 = ((_local5 + "<Message><![CDATA[") + _local6) + "]]></Message><Variables><Variable><Name>Action</Name><Data>Move</Data></Variable><Variable><Name>MoveType</Name><Data>Public</Data></Variable></Variables>";
}
send(_local9, _local7);
}
function pluginRequest(plugin, method, parameters) {
var _local5 = "ExecutePlugin";
var _local3 = "<Variables />";
if (parameters != undefined) {
_local3 = "<Variables>";
for (var _local4 in parameters) {
_local3 = _local3 + (((("<Variable><Name>" + _local4) + "</Name><Value>") + parameters[_local4]) + "</Value></Variable>");
}
_local3 = _local3 + "</Variables>";
}
var _local6 = (((("<Plugin>" + plugin) + "</Plugin><Method>") + method) + "</Method>") + _local3;
send(_local5, _local6);
}
function getRoomVariables() {
return(zone.myRoom.roomVariables);
}
function getRoomList() {
return(zone.rooms);
}
function getRoom() {
return(zone.myRoom);
}
function getUserList() {
return(zone.users);
}
function createGameRoom(roomOb) {
if (roomOb.attributes == undefined) {
roomOb.attributes = new Object();
}
roomOb.attributes.isGameRoom = true;
if (roomOb.updatable != true) {
roomOb.updatable = false;
}
roomOb.numbered = true;
createRoom(roomOb);
inGame = true;
}
function joinGame(room, password, type, zone) {
type = type.toLowerCase();
if ((type == "player") || (type == undefined)) {
var _local3 = true;
} else if (type == "spectator") {
var _local3 = false;
}
joinRoom(room, password, zone, _local3);
inGame = true;
}
function adminLogin(tempUsername, tempPassword) {
myUser.username = tempUsername;
if (tempPassword == undefined) {
tempPassword = "";
}
myUser.password = tempPassword;
username = myUser.username;
password = myUser.password;
var _local3 = "AdminLogin";
var _local2 = ((("<Name>" + myUser.username) + "</Name><Password>") + myUser.password) + "</Password>";
send(_local3, _local2);
}
function loadConfiguration() {
var _local3 = "LoadConfiguration";
var _local2 = "";
send(_local3, _local2);
}
function parseConfig(config) {
XML.prototype.ignoreWhite = true;
var _local3 = new XML(config);
var _local2 = new Object();
parseParameters(_local3.firstChild.childNodes, _local2);
configurationLoaded(_local2);
}
function sendMessage(type, message, users, variables) {
type = type.toLowerCase();
if ((type == "public") || (type == "all")) {
sendPublicMessage(message, users);
} else if (type == "private") {
sendPrivateMessage(message, users, variables);
}
}
function joinRoom(room, password, zoneName, numbered) {
var _local6 = "JoinRoom";
if (numbered == undefined) {
numbered = true;
}
if (password == undefined) {
password = "";
}
if (zoneName == undefined) {
zoneName = getZone().name;
if (zoneName == undefined) {
zoneName = "Chat Area";
}
}
pendingRoom = room;
inGame = false;
var _local3 = ((((((("<Zone><Name>" + zoneName) + "</Name><Room><Name>") + room) + "</Name><Password>") + password) + "</Password><Numbered>") + numbered) + "</Numbered></Room></Zone>";
send(_local6, _local3);
}
function createRoom(roomOb, auto) {
if ((auto == undefined) || (auto == "true")) {
auto = true;
} else {
auto = false;
}
auto_join = auto;
var _local34 = "CreateRoom";
var _local24 = roomOb.password;
var _local22 = roomOb.userVariablesEnabled;
var _local27 = roomOb.hidden;
var _local19 = roomOb.zone;
var _local30 = roomOb.roomName;
var _local26 = roomOb.numbered;
var _local25 = roomOb.capacity;
var _local20 = roomOb.description;
var _local14 = roomOb.roomVariables;
var _local29 = roomOb.updatable;
var _local13 = roomOb.plugins;
var _local23 = roomOb.FloodingFilterEnabled;
var _local28 = new Object();
if (_local20 == undefined) {
_local20 = roomOb.Description;
if (_local20 == undefined) {
_local20 = "";
}
}
if (_local23 == undefined) {
_local23 = false;
}
_local28.description = _local20;
if (roomOb.attributes != undefined) {
_local28.attributes = roomOb.attributes;
}
var _local32 = new Wddx();
var _local33 = _local32.serialize(_local28);
if (_local19 == undefined) {
_local19 = getZone().name;
if (_local19 == undefined) {
_local19 = "Chat Area";
}
}
if (_local29 == undefined) {
_local29 = true;
}
if (_local27 == undefined) {
_local27 = false;
}
if (_local25 == undefined) {
_local25 = -1;
}
if (_local26 == undefined) {
_local26 = false;
}
if (_local24 == undefined) {
_local24 = "";
}
if (_local22 == undefined) {
_local22 = false;
}
if (_local14 == undefined) {
var _local18 = "<RoomVariables/>";
} else {
var _local18 = "<RoomVariables>";
var _local8 = 0;
while (_local8 < _local14.length) {
var _local3 = _local14[_local8];
var _local9 = _local3.persistent;
var _local7 = _local3.locked;
var _local11 = _local3.name;
var _local12 = _local3.data;
if (_local9 == undefined) {
_local9 = false;
}
if (_local7 == undefined) {
_local7 = false;
}
var _local4 = ((("<RoomVariable Persistent=\"" + _local9) + "\" Locked=\"") + _local7) + "\">";
_local4 = _local4 + (("<Name>" + _local11) + "</Name>");
_local4 = _local4 + (("<Data><![CDATA[" + _local12) + "]]></Data>");
_local4 = _local4 + "</RoomVariable>";
_local18 = _local18 + _local4;
_local8++;
}
_local18 = _local18 + "</RoomVariables>";
}
if (_local13 == undefined) {
var _local17 = "<Plugins />";
} else {
var _local17 = "<Plugins>";
var _local8 = 0;
while (_local8 < _local13.length) {
var _local10 = _local13[_local8];
var _local11 = _local10.name;
var _local2 = _local10.variables;
if (_local2 == undefined) {
var _local5 = "<Variables />";
} else {
var _local5 = "<Variables>";
for (var _local16 in _local2) {
var _local6 = _local2[_local16];
_local5 = _local5 + (((("<Variable><Name>" + _local16) + "</Name><Value>") + _local6) + "</Value></Variable>");
}
_local5 = _local5 + "</Variables>";
}
_local17 = _local17 + (((("<Plugin><Name>" + _local11) + "</Name>") + _local5) + "</Plugin>");
_local8++;
}
_local17 = _local17 + "</Plugins>";
}
var _local31 = (((((((((((((((((((((("<Zone><Name>" + _local19) + "</Name><Room Updatable=\"") + _local29) + "\" Hidden=\"") + _local27) + "\" FloodingFilterEnabled=\"") + _local23) + "\" Numbered=\"") + _local26) + "\" UserVariablesEnabled=\"") + _local22) + "\"><Name>") + _local30) + "</Name><Password>") + _local24) + "</Password><Description><![CDATA[") + _local33) + "]]></Description><Capacity>") + _local25) + "</Capacity>") + _local18) + _local17) + "</Room></Zone>";
joiningRoom = true;
pendingRoom = _local30;
pendingZone = _local19;
inGame = false;
send(_local34, _local31);
}
function sendPublicMessage(message, variables) {
var _local7 = "SendPublicMessage";
var _local3 = "";
for (var _local5 in variables) {
var _local2 = variables[_local5].toString();
_local3 = _local3 + (((("<Variable><Name>" + _local5) + "</Name><Data><![CDATA[") + _local2) + "]]></Data></Variable>");
}
if (_local3 != "") {
_local3 = ("<Variables>" + _local3) + "</Variables>";
} else {
_local3 = "<Variables />";
}
var _local6 = (("<Message><![CDATA[" + message) + "]]></Message>") + _local3;
send(_local7, _local6);
}
function sendPrivateMessage(message, users, variables) {
var _local10 = "SendPrivateMessage";
var _local7 = "<Users>";
var _local8 = 0;
while (_local8 < users.length) {
var _local3 = users[_local8];
_local7 = _local7 + (("<User>" + _local3) + "</User>");
_local8++;
}
_local7 = _local7 + "</Users>";
var _local4 = "";
for (_local8 in variables) {
var _local2 = variables[_local8];
_local4 = _local4 + (((("<Variable><Name>" + _local8) + "</Name><Data><![CDATA[") + _local2) + "]]></Data></Variable>");
}
if (_local4 != "") {
_local4 = ("<Variables>" + _local4) + "</Variables>";
} else {
_local4 = "<Variables />";
}
var _local9 = (((_local7 + "<Message>") + message) + "</Message>") + _local4;
send(_local10, _local9);
}
function connectionResponse(success) {
ConnectedToServer = true;
if (!ConnectedToServer) {
connectionEstablished(false, "Could not establish a server connection");
}
}
function connectionEstablished(success, reason) {
if (success && (ConnectedToServer)) {
isConnected = true;
onConnection(true);
} else {
onConnection(false, reason);
}
}
function XMLReceived(info) {
var _local3 = info.toString().substr(0, 1) == "<";
if (_local3) {
parseXML(info);
} else {
rawMessageReceived(info.toString());
}
}
function parseXML(data) {
if (getDebug()) {
trace("-----incomming----");
trace(data);
}
var _local2 = data.firstChild.childNodes;
var _local5 = _local2[0].firstChild.nodeValue;
var _local4 = _local2[1].childNodes;
var _local3 = new Object();
parseParameters(_local4, _local3);
applyAction(_local5, _local3);
}
function isArrayNodeName(nodeName) {
if (nodeNameList[nodeName]) {
return(true);
}
return(false);
}
function terminateHere(xmls) {
return((xmls.childNodes[0].hasChildNodes() ? false : true));
}
function send(action, parameters) {
var _local3 = ((("<XmlDoc><Action>" + action) + "</Action><Parameters>") + parameters) + "</Parameters></XmlDoc>";
if (getDebug()) {
trace("---out going----");
trace(_local3);
}
super.send(_local3);
}
function parseParameters(info, parentOb) {
var _local5 = 0;
while (_local5 < info.length) {
var _local2 = info[_local5];
var _local8 = terminateHere(_local2);
var _local11 = _local2.nodeName;
if (parentOb instanceof Array) {
var _local6 = new Object();
parentOb.push(_local6);
_local6 = parentOb[parentOb.length - 1];
} else {
parentOb[_local11] = new Object();
var _local6 = parentOb[_local11];
}
for (var _local12 in _local2.attributes) {
if (_local6.attributes == undefined) {
_local6.attributes = new Object();
}
var _local3 = _local2.attributes[_local12];
if (!isNaN(Number(_local3))) {
_local3 = Number(_local3);
}
if (_local3.toLowerCase() == "true") {
_local3 = true;
} else if (_local3.toLowerCase() == "false") {
_local3 = false;
}
_local6.attributes[_local12] = _local3;
}
if (isArrayNodeName(_local11)) {
_local6[_local11] = new Array();
var _local6 = _local6[_local11];
}
if (_local8) {
var _local9 = _local2.firstChild.nodeValue;
if (((!isNaN(Number(_local9))) && (_local9 != undefined)) && (_local2.nodeName != "Message")) {
_local9 = Number(_local9);
}
_local6.value = _local9;
} else {
_local11 = _local2.nodeName;
var _local7 = _local2.childNodes;
parseParameters(_local7, _local6);
}
_local5++;
}
}
function login(tempUsername, tempPassword) {
username = tempUsername;
if (tempPassword == undefined) {
password = "";
} else {
password = tempPassword;
}
var _local3 = "Login";
var _local2 = ((("<Name>" + username) + "</Name><Password>") + password) + "</Password>";
send(_local3, _local2);
}
function connect() {
onConnect = connectionResponse;
onXML = XMLReceived;
super.connect(getIP(), getPort());
}
function getUser() {
return(myUser);
}
function applyAction(action, params) {
if (action == "ConnectionResponse") {
var _local37 = Number(params.Version.attributes.Major);
var _local36 = Number(params.Version.attributes.Minor);
var _local34 = Number(params.Version.attributes.Sub);
if ((params.Result.value == "Accepted") && (ValidateVersion(_local37, _local36, _local34))) {
connectionEstablished(true);
} else {
if ((params.Result.value == "Accepted") && (!ValidateVersion(_local37, _local36, _local34))) {
var _local56 = "ElectroServer 3 version is too old. Please install latest.";
trace("=====================================================");
trace("===============Error Error Error=====================");
trace("This class file is newer than the version of ElectroServer 3 that you are using.");
trace((((("AS 2.0 Class version: " + MajorVersion) + ".") + MinorVersion) + ".") + SubVersion);
trace((((("ElectroServer version: " + _local37) + ".") + _local36) + ".") + _local34);
trace("If it says NaN above, then you definately need to update.");
trace("Visit http://www.electrotank.com/ElectroServer/");
trace("=====================================================");
trace("=====================================================");
} else {
var _local56 = params.Reason.value;
}
connectionEstablished(false, _local56);
}
} else if (action == "LoginResponse") {
if (params.Result.value.toLowerCase() == "accepted") {
var _local46 = params.Variables.Variables;
loggedIn(true, undefined, _local46);
} else {
var _local56 = params.Reason.value;
loggedIn(false, _local56);
}
} else if (action == "GetAllZones") {
var _local23 = params.Zones.Zones;
var _local27 = new Array();
var _local26 = 0;
while (_local26 < _local23.length) {
var _local42 = _local23[_local26];
_local27.push(_local42.value);
_local26++;
}
allZonesLoaded(_local27);
} else if (action == "GetUserLocation") {
var _local17 = params.User.value;
var _local50 = params.Zone.value;
var _local6 = params.Room.value;
userLocationLoaded(_local17, _local50, _local6);
} else if (action == "GetUsersInRoom") {
var _local23 = params.Users.Users;
var _local28 = new Array();
var _local26 = 0;
while (_local26 < _local23.length) {
var _local42 = new Object();
_local42.username = _local23[_local26].value;
_local28.push(_local42);
_local26++;
}
usersInRoomLoaded(_local28, params.Room.value, params.Zone.value);
} else if (action == "FriendLoggedOut") {
var _local17 = params.FriendName.value;
var _local26 = 0;
while (_local26 < buddyList.length) {
var _local42 = buddyList[_local26];
if (_local42.username == _local17) {
_local42.online = false;
_local42.status = "offline";
_local42.label = (_local42.username + " ") + _local42.status;
break;
}
_local26++;
}
buddyLoggedOut(_local17);
} else if (action == "FriendLoggedIn") {
var _local17 = params.FriendName.value;
var _local26 = 0;
while (_local26 < buddyList.length) {
var _local42 = buddyList[_local26];
if (_local42.username == _local17) {
_local42.online = true;
_local42.status = "online";
_local42.label = (_local42.username + " ") + _local42.status;
break;
}
_local26++;
}
buddyLoggedIn(_local17);
} else if (action == "CreateRoom") {
if (params.Result.value == "Failure") {
var _local56 = params.Reason.value;
if ((_local56.indexOf("already exists") > -1) && auto_join) {
joinRoom(pendingRoom, "", pendingZone);
}
}
} else if (action == "LoadConfiguration") {
var _local49 = params.NumberOfPackets.value;
var _local45 = params.PacketNumber.value;
var _local41 = params.PacketData.value;
if (_local45 == "1") {
configXML = _local41;
} else {
configXML = configXML + _local41;
}
if (_local45 == _local49) {
parseConfig(configXML);
}
} else if (action == "UpdateUserVariable") {
var _local16 = zone.users;
var _local42 = params.UserVariable;
var _local33 = _local42.User.value;
var _local43 = _local42.Data.value;
var _local17 = _local42.Name.value;
var _local26 = 0;
while (_local26 < _local16.length) {
var _local20 = _local16[_local26].Name.value;
if (_local33 == _local20) {
var _local40 = _local16[_local26];
var _local22 = typeof(_local40.userVariables[_local17]);
if (_local22.toString() == "undefined") {
if (typeof(_local40.userVariables.toString()) == "undefined") {
_local40.userVariables = new Object();
}
_local40.userVariables[_local17] = _local43;
userVariableUpdated(_local40, "created", _local17);
} else {
_local40.userVariables[_local17] = _local43;
userVariableUpdated(_local40, "updated", _local17);
}
break;
}
_local26++;
}
} else if (action == "JoinRoom") {
if (params.Result.value == "Success") {
var _local30 = pendingRoom;
var _local25 = zone.rooms;
var _local26 = 0;
while (_local26 < _local25.length) {
var _local18 = _local25[_local26];
if (_local18.Name.value == _local30) {
zone.myRoom = _local18;
var _local4 = params.RoomVariables.RoomVariables;
zone.myRoom.roomVariables = new Object();
var _local7 = 0;
while (_local7 < _local4.length) {
var _local17 = _local4[_local7].Name.value;
var _local43 = _local4[_local7].Data.value;
zone.myRoom.roomVariables[_local17] = _local43;
_local7++;
}
roomVariablesUpdated("all", zone.myRoom.roomVariables);
break;
}
_local26++;
}
roomJoined({success:true}, zone.myRoom);
delete pendingRoom;
joiningRoom = false;
zone.users = params.Users.Users;
_local26 = 0;
while (_local26 < zone.users.length) {
var _local40 = zone.users[_local26];
_local40.label = _local40.Name.value;
if (showModeratorLabel && _local40.attributes.Moderator) {
_local40.label = _local40.label + moderatorLabel;
}
_local40.data = _local40;
var _local24 = _local40.UserVariables.UserVariables;
_local40.userVariables = new Object();
var _local9 = 0;
while (_local9 < _local24.length) {
var _local10 = _local24[_local9];
var _local21 = _local10.Name.value;
var _local19 = _local10.Data.value;
_local40.userVariables[_local21] = _local19;
_local9++;
}
if (_local40.Name.value == username) {
myUser = _local40;
if (_local40.AssignedNumber.value == 0) {
_local40.isGameMaster = true;
}
}
_local26++;
}
userListUpdated(zone.users, "all");
} else {
var _local56 = params.Reason.value;
roomJoined({success:false, error:_local56});
}
} else if (action == "RenumberUsers") {
var _local16 = zone.users;
var _local26 = 0;
while (_local26 < params.Users.Users.length) {
var _local31 = params.Users.Users[_local26].Name.value;
var _local7 = 0;
while (_local7 < _local16.length) {
if (_local31 == _local16[_local7].Name.value) {
_local16[_local7].AssignedNumber.value = params.Users.Users[_local26].AssignedNumber.value;
_local16[_local7].isGameMaster = false;
}
_local7++;
}
if (getUser().AssignedNumber.value == 0) {
getUser().isGameMaster = true;
}
_local26++;
}
if (getUser().AssignedNumber.value == 0) {
isGameMaster = true;
} else {
isGameMaster = false;
}
usersRenumbered(_local16);
} else if (action == "SendPrivateMessage") {
var _local38 = params.Message.value;
var _local39 = params.User.value;
var _local15 = new Object();
var _local26 = 0;
while (_local26 < params.Variables.Variables.length) {
var _local17 = params.Variables.Variables[_local26].Name.value;
var _local43 = params.Variables.Variables[_local26].Data.value;
_local15[_local17] = _local43;
_local26++;
}
if (_local15.Action.toLowerCase() == "move") {
var _local51 = _local38;
var _local52 = new Wddx();
var _local42 = _local52.deserialize(_local51);
moveReceived("private", _local42, _local39);
} else {
messageReceived("private", _local38, _local39, _local15);
}
} else if (action == "SendPublicMessage") {
var _local38 = params.Message.value;
var _local39 = params.User.value;
var _local15 = new Object();
var _local26 = 0;
while (_local26 < params.Variables.Variables.length) {
var _local17 = params.Variables.Variables[_local26].Name.value;
var _local43 = params.Variables.Variables[_local26].Data.value;
_local15[_local17] = _local43;
_local26++;
}
if (_local15.Action.toLowerCase() == "move") {
var _local51 = _local38;
var _local52 = new Wddx();
var _local42 = _local52.deserialize(_local51);
moveReceived("public", _local42, _local39);
} else {
messageReceived("public", _local38, _local39, _local15);
}
} else if (action == "GetRoomsInZone") {
var _local5 = params.Zone.Rooms.Rooms;
var _local32 = true;
var _local54 = new Array();
var _local26 = 0;
while (_local26 < _local5.length) {
var _local12 = _local5[_local26].Name.value;
var _local8 = "";
if (_local32) {
_local8 = ((_local12 + " (") + _local5[_local26].attributes.Users) + ")";
} else {
_local8 = _local12;
}
_local5[_local26].label = _local8;
_local5[_local26].iconAlignment = "right";
var _local44 = _local5[_local26].Description.value;
if (_local44.length > 2) {
var _local52 = new Wddx();
var _local42 = _local52.deserialize(_local44);
} else {
var _local42 = new Object();
}
_local5[_local26].Description = _local42;
_local26++;
}
onRoomsInZoneLoaded(_local5, params.Zone.Name.value);
} else if (action == "RoomList") {
var _local14 = getRoom();
var _local29 = getUserList();
zone = new Object();
zone.numUsers = Number(params.Zone.attributes.Users);
zone.name = params.Zone.Name.value;
zone.rooms = params.Zone.Rooms.Rooms;
var _local26 = 0;
while (_local26 < zone.rooms.length) {
var _local44 = zone.rooms[_local26].Description.value;
if (_local44.length > 2) {
var _local52 = new Wddx();
var _local42 = _local52.deserialize(_local44);
} else {
var _local42 = new Object();
}
zone.rooms[_local26].Description = _local42;
var _local6 = zone.rooms[_local26];
_local6.label = _local6.Name.value;
_local6.data = _local6;
if (_local14.Name.value == _local6.Name.value) {
zone.rooms[_local26] = _local14;
zone.myRoom = _local14;
zone.users = _local29;
}
_local26++;
}
zoneChanged(zone.name);
roomListUpdated(zone.rooms, "all");
} else if (action == "UpdateUserList") {
var _local35 = params.MinorAction.value;
if (_local35 == "UserJoined") {
var _local16 = zone.users;
var _local40 = params.User;
var _local55 = _local40.Name.value;
var _local24 = _local40.UserVariables.UserVariables;
_local40.userVariables = new Object();
var _local9 = 0;
while (_local9 < _local24.length) {
var _local10 = _local24[_local9];
var _local21 = _local10.Name.value;
var _local19 = _local10.Data.value;
_local40.userVariables[_local21] = _local19;
_local9++;
}
_local40.label = _local40.Name.value;
if (showModeratorLabel && _local40.attributes.Moderator) {
_local40.label = _local40.label + moderatorLabel;
}
_local40.data = _local40;
_local16.push(_local40);
userListUpdated(zone.users, "userjoined", _local40.Name.value);
} else if (_local35 == "UserLeft") {
var _local16 = zone.users;
var _local40 = params.User;
var _local31 = _local40.Name.value;
var _local26 = 0;
while (_local26 < _local16.length) {
var _local17 = _local16[_local26].Name.value;
if (_local31 == _local17) {
_local16.splice(_local26, 1);
break;
}
_local26++;
}
userListUpdated(zone.users, "userleft", _local40.Name.value);
}
} else if (action == "SendPluginMessage") {
var _local47 = params.User.value;
var _local48 = params.Message.value;
var _local15 = params.Variables.Variables;
var _local42 = new Object();
var _local26 = 0;
while (_local26 < _local15.length) {
var _local17 = _local15[_local26].Name.value;
var _local43 = _local15[_local26].Value.value;
_local42[_local17] = _local43;
_local26++;
}
pluginMessageReceived(_local47, _local48, _local42);
} else if (action == "UpdateRoomVariable") {
var _local35 = params.MinorAction.value;
if (_local35 == "Create") {
var _local17 = params.RoomVariable.Name.value;
var _local43 = params.RoomVariable.Data.value;
zone.myRoom.roomVariables[_local17] = _local43;
roomVariablesUpdated("created", zone.myRoom.roomVariables, _local17);
} else if (_local35 == "Update") {
var _local17 = params.RoomVariable.Name.value;
var _local43 = params.RoomVariable.Data.value;
zone.myRoom.roomVariables[_local17] = _local43;
roomVariablesUpdated("updated", zone.myRoom.roomVariables, _local17);
} else if (_local35 == "Delete") {
var _local17 = params.RoomVariable.Name.value;
delete zone.myRoom.roomVariables[_local17];
roomVariablesUpdated("deleted", zone.myRoom.roomVariables, _local17);
}
} else if (action == "GetLoggedInUserCount") {
var _local45 = Number(params.LoggedInUsers.value);
loggedInUserCountUpdated(_local45);
} else if (action == "GetServerTime") {
var _local45 = Number(params.ServerTime.value);
onGetServerTime(_local45);
} else if (action == "UpdateRoomList") {
var _local35 = params.MinorAction.value;
zone.numUsers = Number(params.Zone.attributes.Users);
zoneUpdated(zone.numUsers);
var _local3 = params.Zone.Rooms.Rooms[0];
if (_local35 == "ChangeRoomDetails") {
var _local7 = 0;
while (_local7 < zone.rooms.length) {
var _local18 = zone.rooms[_local7];
if (_local18.Name.value == _local3.Name.value) {
_local18.label = _local18.Name.value;
_local18.data = _local18;
for (var _local26 in _local3) {
_local18[_local26] = _local3[_local26];
}
var _local44 = _local3.Description.value;
if (_local44.length > 2) {
var _local52 = new Wddx();
var _local42 = _local52.deserialize(_local44);
} else {
var _local42 = new Object();
}
_local18.Description = _local42;
break;
}
_local7++;
}
roomListUpdated(zone.rooms, "roomupdated", _local18);
} else if (_local35 == "CreateRoom") {
var _local18 = _local3;
_local18.label = _local18.Name.value;
_local18.data = _local18;
var _local44 = _local18.Description.value;
var _local52 = new Wddx();
var _local42 = _local52.deserialize(_local44);
_local18.Description = _local42;
zone.rooms.push(_local18);
roomListUpdated(zone.rooms, "roomcreated", _local18);
} else if (_local35 == "DeleteRoom") {
var _local7 = 0;
while (_local7 < zone.rooms.length) {
var _local18 = zone.rooms[_local7];
if (_local18.Name.value == _local3.Name.value) {
var _local11 = true;
var _local17 = _local3.Name.value;
if ((_local17 == getRoom().Name.value) && (!joiningRoom)) {
_local11 = false;
}
if (_local11) {
zone.rooms.splice(_local7, 1);
}
break;
}
_local7++;
}
roomListUpdated(zone.rooms, "RoomDeleted", _local17);
}
}
}
var MajorVersion = 3;
var MinorVersion = 2;
var SubVersion = 0;
var debug = false;
var showModeratorLabel = false;
var nodeNameList = {Users:true, Zones:true, UserVariables:true, RoomVariables:true, Rooms:true, Variables:true, BannedUsers:true, Plugins:true, Moderators:true, Words:true, RootWords:true, Templates:true};
var isConnected = false;
}
Symbol 324 MovieClip [__Packages.Wddx] Frame 0
class Wddx
{
var tzOffset, timezoneString, wddxPacket, packet, useTimeZoneInfo;
function Wddx () {
var _local2 = 0;
while (_local2 < 256) {
if ((((_local2 < 32) && (_local2 != 9)) && (_local2 != 10)) && (_local2 != 13)) {
var _local3 = _local2.toString(16);
if (_local3.length == 1) {
_local3 = "0" + _local3;
}
et[_local2] = ("<char code='" + _local3) + "'/>";
at[_local2] = "";
} else if (_local2 < 128) {
et[_local2] = chr(_local2);
at[_local2] = chr(_local2);
} else {
et[_local2] = ("&#x" + _local2.toString(16)) + ";";
etRev[("&#x" + _local2.toString(16)) + ";"] = chr(_local2);
at[_local2] = ("&#x" + _local2.toString(16)) + ";";
atRev[("&#x" + _local2.toString(16)) + ";"] = chr(_local2);
}
_local2++;
}
et[60] = "<";
et[62] = ">";
et[38] = "&";
etRev["<"] = "<";
etRev[">"] = ">";
etRev["&"] = "&";
at[60] = "<";
at[62] = ">";
at[38] = "&";
at[39] = "'";
at[34] = """;
atRev["<"] = "<";
atRev[">"] = ">";
atRev["&"] = "&";
atRev["'"] = "'";
atRev["""] = "\"";
tzOffset = new Date().getTimezoneOffset();
if (tzOffset >= 0) {
timezoneString = "-";
} else {
timezoneString = "+";
}
timezoneString = timezoneString + ((Math.floor(Math.abs(tzOffset) / 60) + ":") + (Math.abs(tzOffset) % 60));
}
function serialize(rootObj) {
delete wddxPacket;
var _local2 = new XML();
packet = new XML();
packet.appendChild(_local2.createElement("wddxPacket"));
wddxPacket = packet.firstChild;
wddxPacket.attributes.version = "1.0";
wddxPacket.appendChild(_local2.createElement("header"));
wddxPacket.appendChild(_local2.createElement("data"));
if (serializeValue(rootObj, wddxPacket.childNodes[1])) {
return(packet);
}
return(null);
}
function serializeValue(obj, node) {
var _local4 = true;
var _local6 = obj.valueOf();
var _local9 = null;
var _local7 = new XML();
if (obj == null) {
node.appendChild(_local7.createElement("null"));
} else if (typeof(_local6) == "string") {
serializeString(_local6, node);
} else if (typeof(_local6) == "number") {
if (typeof(obj.getTimezoneOffset) == "function") {
if (useTimeZoneInfo) {
_local9 = timezoneString;
}
node.appendChild(_local7.createElement("dateTime"));
node.lastChild.appendChild(_local7.createTextNode(((((((((((obj.getFullYear() + "-") + (obj.getMonth() + 1)) + "-") + obj.getDate()) + "T") + obj.getHours()) + ":") + obj.getMinutes()) + ":") + obj.getSeconds()) + _local9));
} else {
node.appendChild(new XML().createElement("number"));
node.lastChild.appendChild(new XML().createTextNode(_local6));
}
} else if (typeof(_local6) == "boolean") {
node.appendChild(_local7.createElement("boolean"));
node.lastChild.attributes.value = _local6;
} else if (typeof(obj) == "object") {
if (typeof(obj.wddxSerialize) == "function") {
_local4 = obj.wddxSerialize(this, node);
} else if ((typeof(obj.join) == "function") && (typeof(obj.reverse) == "function")) {
node.appendChild(_local7.createElement("array"));
node.lastChild.attributes.length = obj.length;
var _local3 = 0;
while (_local4 && (_local3 < obj.length)) {
_local4 = serializeValue(obj[_local3], node.lastChild);
_local3++;
}
} else {
node.appendChild(_local7.createElement("struct"));
if (typeof(obj.wddxSerializationType) == "string") {
node.lastChild.attributes.type = obj.wddxSerializationType;
}
for (var _local8 in obj) {
if (_local8 != "wddxSerializationType") {
_local4 = serializeVariable(_local8, obj[_local8], node.lastChild);
if (!_local4) {
break;
}
}
}
}
} else {
_local4 = false;
}
return(_local4);
}
function serializeVariable(name, obj, node) {
var _local2 = true;
var _local3 = new XML();
if (typeof(obj) != "function") {
node.appendChild(_local3.createElement("var"));
node.lastChild.attributes.name = (preserveVarCase ? (serializeAttr(name)) : (serializeAttr(name.toLowerCase())));
_local2 = serializeValue(obj, node.lastChild);
}
return(_local2);
}
function serializeString(s, node) {
var _local5 = "";
var _local7 = new XML();
var _local6 = s.length;
node.appendChild(_local7.createElement("string"));
var _local2 = 0;
while (_local2 < _local6) {
var _local4 = substring(s, _local2 + 1, 1);
_local5 = _local5 + et[ord(substring(s, _local2 + 1, 1))];
_local2++;
}
node.lastChild.appendChild(_local7.createTextNode(_local5));
}
function serializeAttr(s) {
var _local3 = "";
var _local4 = s.length;
var _local2 = 0;
while (_local2 < _local4) {
_local3 = _local3 + at[ord(substring(s, _local2 + 1, 1))];
_local2++;
}
return(_local3);
}
function deserialize(wddxPacket) {
if (typeof(wddxPacket) != "object") {
wddxPacket = new XML(wddxPacket);
}
var _local5 = new XML();
var _local4 = new Array();
var _local2;
var _local6 = new Object();
while (wddxPacket.nodeName == null) {
wddxPacket = wddxPacket.firstChild;
}
_local5 = wddxPacket;
if (_local5.nodeName.toLowerCase() == "wddxpacket") {
_local4 = _local5.childNodes;
_local2 = 0;
while ((_local4[_local2].nodeName.toLowerCase() != "data") && (_local2 < _local4.length)) {
_local2++;
}
if (_local2 < _local4.length) {
_local6 = deserializeNode(_local4[_local2].firstChild);
return(_local6);
}
return(null);
}
return(null);
}
function deserializeNode(node) {
var _local9 = node.nodeName.toLowerCase();
if (_local9 == "number") {
var _local7 = node.firstChild.nodeValue;
return(Number(_local7));
}
if (_local9 == "boolean") {
var _local7 = String(node.attributes.value).toLowerCase() == "true";
return(_local7);
}
if (_local9 == "string") {
if (node.childNodes.length > 1) {
var _local7 = "";
var _local4 = 0;
_local4 = 0;
while (_local4 < node.childNodes.length) {
if (node.childNodes[_local4].nodeType == 3) {
_local7 = _local7 + deserializeString(node.childNodes[_local4].nodeValue);
} else if (node.childNodes[_local4].nodeName == "char") {
_local7 = _local7 + chr(parseInt(node.childNodes[_local4].attributes.code, 16));
}
_local4++;
}
} else {
var _local7 = deserializeString(node.firstChild.nodeValue);
}
return(_local7);
}
if (_local9 == "array") {
var _local7 = new Array();
var _local15 = 0;
var _local4 = 0;
while (_local4 < node.attributes.length) {
_local7[_local4] = deserializeNode(node.childNodes[_local4].cloneNode(true));
_local4++;
}
return(_local7);
}
if (_local9 == "datetime") {
var _local10 = node.firstChild.nodeValue;
var _local13 = _local10.indexOf("T");
var _local8 = _local10.indexOf("+");
var _local11 = new Array();
var _local12 = new Array();
var _local14 = new Array();
var _local7 = new Date();
if (_local8 == -1) {
_local8 = _local10.lastIndexOf("-");
if (_local8 < _local13) {
_local8 = -1;
}
}
_local11 = _local10.slice(0, _local13).split("-");
_local12 = _local10.slice(_local13 + 1, _local8).split(":");
_local14 = _local10.slice(_local8).split(":");
_local7.setFullYear(parseInt(_local11[0]), parseInt(_local11[1]) - 1, parseInt(_local11[2]));
_local7.setHours(parseInt(_local12[0]), parseInt(_local12[1]));
if (_local8 != -1) {
tzOffset = (parseInt(_local14[0]) * 60) + parseInt(_local14[1]);
_local7.setMinutes(_local7.getMinutes() - (_local7.getTimezoneOffset() + tzOffset));
}
return(_local7);
}
if (_local9 == "struct") {
var _local7 = new Object();
var _local4 = 0;
while (_local4 < node.childNodes.length) {
if (node.childNodes[_local4].nodeName.toLowerCase() == "var") {
_local7[deserializeAttr(node.childNodes[_local4].attributes.name)] = deserializeNode(node.childNodes[_local4].firstChild);
}
_local4++;
}
return(_local7);
}
if (_local9 == "recordset") {
var _local7 = new WddxRecordset(node.attributes.fieldNames.split(",").reverse(), parseInt(node.attributes.rowCount));
var _local4 = node.childNodes.length - 1;
while (_local4 >= 0) {
if (node.childNodes[_local4].nodeName.toLowerCase() == "field") {
var _local5 = deserializeAttr(node.childNodes[_local4].attributes.name);
_local7[_local5].wddxSerializationType = "field";
var _local3 = node.childNodes[_local4].childNodes.length - 1;
while (_local3 >= 0) {
_local7[_local5][_local3] = new Object();
var _local6 = deserializeNode(node.childNodes[_local4].childNodes[_local3]);
_local7.setField(_local3, _local5, _local6);
_local3--;
}
}
_local4--;
}
return(_local7);
}
}
function deserializeAttr(attr) {
var _local7 = attr.length;
var _local3 = 0;
var _local2;
var _local6 = "";
while (_local3 < _local7) {
_local2 = substring(attr, _local3 + 1, 1);
if (_local2 == "&") {
var _local4 = _local2;
do {
_local2 = substring(attr, _local3 + 1, 1);
_local4 = _local4 + _local2;
_local3++;
} while (_local2 != ";");
_local6 = _local6 + atRev[_local4];
} else {
_local6 = _local6 + _local2;
}
_local3++;
}
return(_local6);
}
function deserializeString(str) {
var _local7 = str.length;
var _local3 = 0;
var _local2;
var _local6 = "";
while (_local3 < _local7) {
_local2 = substring(str, _local3 + 1, 1);
if (_local2 == "&") {
var _local4 = _local2;
do {
_local3++;
_local2 = substring(str, _local3 + 1, 1);
_local4 = _local4 + _local2;
} while (_local2 != ";");
_local6 = _local6 + etRev[_local4];
} else {
_local6 = _local6 + _local2;
}
_local3++;
}
return(_local6);
}
var et = new Object();
var etRev = new Object();
var at = new Object();
var atRev = new Object();
var preserveVarCase = true;
var useTimezoneInfo = true;
}
Symbol 325 MovieClip [__Packages.WddxRecordset] Frame 0
class WddxRecordset
{
function WddxRecordset (arguments) {
if (arguments.length > 0) {
var _local8;
_local8 = arguments[0].valueOf();
if (typeof(_local8) == "boolean") {
preserveFieldCase = arguments[0];
} else {
var _local7 = arguments[0];
var _local6 = 0;
if (arguments.length > 1) {
_local8 = arguments[1].valueOf();
if (typeof(_local8) == "boolean") {
preserveFieldCase = arguments[1];
} else {
_local6 = arguments[1];
if (arguments.length > 2) {
preserveFieldCase = arguments[2];
}
}
}
var _local4 = 0;
while (_local4 < _local7.length) {
var _local5 = new Array(_local6);
var _local3 = 0;
while (_local3 < _local6) {
_local5[_local3] = null;
_local3++;
}
this[(preserveFieldCase ? (_local7[_local4]) : (_local7[_local4].toLowerCase()))] = _local5;
_local4++;
}
}
}
}
function duplicate() {
var _local2 = new WddxRecordset();
for (var _local4 in this) {
if (_local4.toUpperCase() == "PRESERVEFIELDCASE") {
_local2[_local4] = this[_local4];
} else if (this[_local4].isColumn()) {
_local2.addColumn(_local4);
for (var _local3 in this[_local4]) {
_local2.setField(_local3, _local4, getField(_local3, _local4));
}
}
}
return(_local2);
}
function isColumn(name) {
return((typeof(this[name]) == "object") && (name.indexOf("_private_") == -1));
}
function getRowCount() {
var _local2 = 0;
for (var _local3 in this) {
if (isColumn(_local3)) {
_local2 = this[_local3].length;
break;
}
}
return(_local2);
}
function addColumn(name) {
var _local4 = getRowCount();
var _local3 = new Array(_local4);
var _local2 = 0;
while (_local2 < _local4) {
_local3[_local2] = null;
_local2++;
}
this[(preserveFieldCase ? (name) : (name.toLowerCase()))] = _local3;
}
function addRows(n) {
for (var _local5 in this) {
if (isColumn(_local5)) {
var _local3 = this[_local5].length;
var _local2 = _local3;
while (_local2 < (_local3 + n)) {
this[_local5][_local2] = "";
_local2++;
}
}
}
}
function getField(row, col) {
return(this[(preserveFieldCase ? (col) : (col.toLowerCase()))][row]);
}
function setField(row, col, value) {
this[(preserveFieldCase ? (col) : (col.toLowerCase()))][row] = value;
}
function wddxSerialize(serializer, node) {
var _local7 = "";
var _local8 = new Array();
var _local4 = 0;
for (var _local11 in this) {
if (isColumn(_local11)) {
_local8[_local4++] = _local11;
if (_local7.length > 0) {
_local7 = _local7 + ",";
}
_local7 = _local7 + _local11;
}
}
var _local9 = getRowCount();
node.appendChild(new XML().createElement("recordset"));
node.lastChild.attributes.rowCount = _local9;
node.lastChild.attributes.fieldNames = _local7;
var _local3 = true;
_local4 = 0;
while (_local3 && (_local4 < _local8.length)) {
var _local5 = _local8[_local4];
node.lastChild.appendChild(new XML().createElement("field"));
node.lastChild.lastChild.attributes.name = _local5;
var _local2 = 0;
while (_local3 && (_local2 < _local9)) {
_local3 = serializer.serializeValue(this[_local5][_local2], node.lastChild.lastChild);
_local2++;
}
_local4++;
}
return(_local3);
}
var preserveFieldCase = true;
}
Symbol 7 MovieClip Frame 1
_root.allowClick(this.linkBut);
Symbol 20 MovieClip Frame 15
gotoAndPlay (1);
Symbol 20 MovieClip Frame 16
stop();
trace("Hello");
Symbol 28 MovieClip Frame 1
_root.allowClick(this.linkBut);
Symbol 50 MovieClip Frame 107
_root.play();
stop();
Symbol 51 MovieClip Frame 1
_root.showTeaser(this);
stop();
Symbol 51 MovieClip Frame 2
_root.allowClick(this.linkBut);
Symbol 56 MovieClip Frame 239
_root.play();
stop();
Symbol 57 MovieClip Frame 1
_root.showPreroll(this);
stop();
Symbol 68 MovieClip Frame 1
_root.initSound(this);
stop();
Symbol 72 MovieClip Frame 1
stop();
Symbol 80 MovieClip Frame 1
stop();
Symbol 80 MovieClip Frame 2
gotoAndStop (1);
Symbol 80 MovieClip Frame 3
gotoAndStop (1);
Symbol 80 MovieClip Frame 4
gotoAndStop (1);
Symbol 80 MovieClip Frame 5
gotoAndStop (1);
Symbol 80 MovieClip Frame 6
gotoAndStop (1);
Symbol 80 MovieClip Frame 7
gotoAndStop (1);
Symbol 80 MovieClip Frame 8
gotoAndStop (1);
Symbol 80 MovieClip Frame 9
gotoAndStop (1);
Symbol 80 MovieClip Frame 10
gotoAndStop (1);
Symbol 80 MovieClip Frame 11
gotoAndStop (1);
Symbol 83 MovieClip Frame 1
_root.allowClick(this.linkBut);
Symbol 91 Button
on (release) {
navigator = 2;
play();
}
Symbol 95 Button
on (release) {
navigator = 1;
play();
}
Symbol 135 Button
on (release) {
_root.sounder.gotoAndStop("whi");
play();
}
Symbol 136 MovieClip Frame 1
stop();
Symbol 136 MovieClip Frame 19
if (navigator == 1) {
gotoAndPlay ("help");
} else {
_parent.gotoAndStop("game");
}
Symbol 136 MovieClip Frame 39
_root.sounder.gotoAndStop("tig");
_quality = "high";
qual = 3;
stop();
Symbol 136 MovieClip Frame 58
_parent.gotoAndPlay("game");
Symbol 140 Button
on (keyPress "<Space>") {
if (_root.ready == 1) {
wait = 0;
_root.sounder.gotoAndStop("whi");
_parent.nextFrame();
play();
}
}
Symbol 157 Button
on (keyPress "d") {
trace(_root.qual + "");
if (_root.qual == 3) {
_quality = "medium";
_root.qual = 2;
} else if (_root.qual == 2) {
_quality = "low";
_root.qual = 1;
} else if (_root.qual == 1) {
_quality = "high";
_root.qual = 3;
}
}
on (keyPress "p") {
trace(wait + " p ");
if (wait == 0) {
wait = 1;
} else {
wait = 0;
prevFrame();
}
}
on (keyPress "s") {
if (_root.loady == 1) {
unloadMovie ("_root.dunno");
_root.loady = 0;
} else {
loadMovie ("s3dwav.dll", "_root.dunno");
_root.loady = 1;
}
}
Symbol 169 MovieClip Frame 1
gotoAndPlay(random(12) + 2);
Symbol 169 MovieClip Frame 14
if (_parent._parent.wait == 0) {
gotoAndPlay (2);
} else {
stop();
this.onEnterFrame = function () {
if (_parent._parent.wait == 0) {
this.onEnterFrame = null;
gotoAndPlay (2);
}
};
}
Symbol 176 MovieClip Frame 1
gotoAndPlay(random(12) + 2);
Symbol 176 MovieClip Frame 14
if (_parent._parent.wait == 0) {
gotoAndPlay (2);
} else {
stop();
this.onEnterFrame = function () {
if (_parent._parent.wait == 0) {
this.onEnterFrame = null;
gotoAndPlay (2);
}
};
}
Symbol 184 MovieClip Frame 1
gotoAndPlay(random(12) + 2);
Symbol 184 MovieClip Frame 14
if (_parent._parent.wait == 0) {
gotoAndPlay (2);
} else {
stop();
this.onEnterFrame = function () {
if (_parent._parent.wait == 0) {
this.onEnterFrame = null;
gotoAndPlay (2);
}
};
}
Symbol 192 MovieClip Frame 1
gotoAndPlay(random(12) + 2);
Symbol 192 MovieClip Frame 14
if (_parent._parent.wait == 0) {
gotoAndPlay (2);
} else {
stop();
this.onEnterFrame = function () {
if (_parent._parent.wait == 0) {
this.onEnterFrame = null;
gotoAndPlay (2);
}
};
}
Symbol 194 MovieClip Frame 1
function f(g) {
if (g == "p") {
bufoptp = bufoptp + 1;
if (bufoptp > 1) {
bufoptp = 0;
bufd = Math.sqrt(Math.pow(Math.abs((pf._x - b._x) + 0.01), 2) + Math.pow(Math.abs((pf._y - b._y) + 0.01), 2));
bufg = bufp;
q = 0;
while (q < 11) {
c = "p" + q;
d = Math.sqrt(Math.pow(Math.abs(this[c]._x - b._x), 2) + Math.pow(Math.abs(this[c]._y - b._y), 2));
if (d < (bufd - 1)) {
bufd = d;
bufg = q;
bufoptp = 0;
}
q = q + 1;
}
pf._name = "p" + bufp;
bufp = bufg;
this["p" + bufp]._name = "pf";
}
} else {
bufopto = bufopto + 1;
if (bufopto > 11) {
bufopto = 0;
bufd = Math.sqrt(Math.pow(Math.abs((of._x - b._x) + 0.01), 2) + Math.pow(Math.abs((of._y - b._y) + 0.01), 2));
bufg = bufo;
q = 0;
while (q < 11) {
c = "o" + q;
d = Math.sqrt(Math.pow(Math.abs(this[c]._x - b._x), 2) + Math.pow(Math.abs(this[c]._y - b._y), 2));
if (d < (bufd - 1)) {
bufd = d;
bufg = q;
bufopto = 0;
}
q = q + 1;
}
of._name = "o" + bufo;
bufo = bufg;
this["o" + bufo]._name = "of";
}
}
q = 0;
while (q < 11) {
c = g + q;
a = (Math.atan2(b._y - this[c]._y, b._x - this[c]._x) * 180) / Math.PI;
d = Math.sqrt(Math.pow(Math.abs(this[c]._x - b._x), 2) + Math.pow(Math.abs(this[c]._y - b._y), 2));
if (d > Math.pow(this[c + "v"], 5)) {
this[c]._y = this[c]._y + (Math.sin((a * Math.PI) / 180) * this[c + "v"]);
this[c]._x = this[c]._x + (Math.cos((a * Math.PI) / 180) * this[c + "v"]);
}
if (this[c + "v"] == v3) {
zl = this[c + "l"];
zr = this[c + "r"];
} else {
zl = ((this[c + "l"] * 4) - b._x) / 3;
zr = ((this[c + "r"] * 4) - b._x) / 3;
}
d = this[c]._x;
if (d < zl) {
this[c]._x = (zl + (10 * d)) / 11;
} else if (d > zr) {
this[c]._x = (zr + (10 * d)) / 11;
}
if (g eq "p") {
zt = ((this[c + "t"] * (3 - (b._y / fh))) / 4) + (b._y / 2);
zb = ((this[c + "b"] * (3 - (b._y / fh))) / 4) + (b._y / 2);
} else {
zt = ((this[c + "t"] * (2 + (b._y / fh))) / 4) + (b._y / 4);
zb = ((this[c + "b"] * (2 + (b._y / fh))) / 4) + (b._y / 4);
}
d = this[c]._y;
if (d < zt) {
this[c]._y = (zt + (10 * d)) / 11;
} else if (d > zb) {
this[c]._y = (zb + (10 * d)) / 11;
}
this[c]._rotation = a + 90;
q = q + 1;
}
}
function z() {
if (goalo.hitTest(b)) {
_root.sounder.gotoAndStop("best");
goaldone = 1;
goalo._name = temp;
b._visible = 0;
_root.goal = 1;
_root.scorep = _root.scorep + 1;
_parent.play();
} else if (goalp.hitTest(b)) {
_root.sounder.gotoAndStop("boo");
goaldone = 1;
goalp._name = temp;
b._visible = 0;
_root.goal = 2;
_root.scoreo = _root.scoreo + 1;
_parent.play();
}
if (b._x < 0) {
ba = 180 - ba;
bv = bv * 0.9;
b._x = 0;
} else if (b._x > fw) {
ba = 180 - ba;
bv = bv * 0.9;
b._x = fw;
}
if (b._y < 0) {
ba = 360 - ba;
bv = bv * 0.9;
b._y = 0;
} else if (b._y > fh) {
ba = 360 - ba;
bv = bv * 0.9;
b._y = fh;
}
bv = bv * 0.95;
b._rotation = ba;
if (Key.isDown(88) and (ms > 1.5)) {
ms = ms - 0.1;
} else if (Key.isDown(90) and (ms < 8)) {
ms = ms + 0.1;
}
this._xscale = ((5 * this._xscale) + (ms * 100)) / 6;
this._yscale = ((5 * this._yscale) + (ms * 100)) / 6;
this._x = ((((mw / 2) - (b._x * ms)) + (((((b._x * 2) / fw) - 1) * mw) / 6)) + (this._x * 5)) / 6;
this._y = ((((mh / 2) - (b._y * ms)) + (((((b._y * 2) / fh) - 1) * mh) / 8)) + (this._y * 5)) / 6;
arrow._xscale = 300 / ms;
arrow._yscale = 300 / ms;
if ((goaldone == 0) and (wait == 0)) {
_root.thistime = _parent.tim + _root.pasttime;
minutes = int(_root.thistime / 60);
seconds = _root.thistime - (minutes * 60);
if (seconds < 10) {
seconds = "0" + seconds;
}
_root.timedisplay = (minutes + ":") + seconds;
_parent.updateTime();
if ((_root.timekeeper == 0) and (minutes > ((_root.gametime / 2) - 1))) {
_root.sounder.gotoAndStop("whi");
goaldone = 1;
_root.timekeeper = 1;
_root.goal = 3;
_parent.play();
} else if ((_root.timekeeper == 1) and (minutes > (_root.gametime - 1))) {
_root.sounder.gotoAndStop("whi");
goaldone = 1;
_root.timekeeper = 2;
_root.goal = 4;
_parent.play();
}
} else {
_root.pasttime = _root.thistime;
}
}
function k() {
if (Key.isDown(37) and (ka > -30)) {
acceleration = acceleration - 1;
ka = ka + acceleration;
} else if (Key.isDown(39) and (ka < 30)) {
acceleration = acceleration + 1;
ka = ka + acceleration;
} else if ((!Key.isDown(37)) and (!Key.isDown(39))) {
acceleration = 0;
ka = ka * 0.8;
}
if (Key.isDown(38) and (kv < 2)) {
kv = kv + 0.05;
} else if (Key.isDown(40) and (kv > 0)) {
kv = kv - 0.05;
} else if ((!Key.isDown(38)) and (!Key.isDown(40))) {
kv = Math.pow(kv + 0.05, 0.9);
}
}
function arr() {
if (Key.isDown(81) and Key.isDown(87)) {
arrow._rotation = 0;
} else if (Key.isDown(81)) {
arrow._rotation = arrow._rotation - 15;
} else if (Key.isDown(87)) {
arrow._rotation = arrow._rotation + 15;
} else {
arrow._rotation = ((4 * arrow._rotation) + pf._rotation) / 5;
}
arrow._x = pf._x;
arrow._y = pf._y;
if (pf.hitTest(b)) {
arrow.tip._alpha = 100;
if (Key.isDown(32) and (!of.hitTest(b))) {
trace("hhhhhh");
_root.sounder.gotoAndStop("kic");
ba = arrow._rotation - 90;
waste = Math.abs(ba - pf._rotation);
if (waste > 180) {
waste = Math.abs(180 - waste);
}
bv = (random(2) - (waste / 90)) + 4;
b._y = pf._y + ((Math.sin((ba * Math.PI) / 180) * bv) * 6);
b._x = pf._x + ((Math.cos((ba * Math.PI) / 180) * bv) * 6);
}
} else {
arrow.tip._alpha = 20;
}
}
function fc(g) {
c = g + "f";
a = (Math.atan2(b._y - this[c]._y, b._x - this[c]._x) * 180) / Math.PI;
if (g == "p") {
opp = "of";
k();
if (this[c].hitTest(b)) {
a = a + (ka / 2);
} else {
a = a + (ka * 2);
}
this[c]._y = this[c]._y + ((Math.sin((a * Math.PI) / 180) * 1.5) * kv);
this[c]._x = this[c]._x + ((Math.cos((a * Math.PI) / 180) * 1.5) * kv);
} else {
opp = "pf";
if (this[c].hitTest(b)) {
if (of._y < 360) {
pas = "o" + random(10);
ba = (Math.atan2(this._y - this[pas]._y, this._x - this[pas]._x) * 180) / Math.PI;
if (((random(6) == 0) and (ba > 0)) or (random(30) == 0)) {
bv = random(2) + 3;
b._y = this[c]._y + ((Math.sin((ba * Math.PI) / 180) * bv) * 6);
b._x = this[c]._x + ((Math.cos((ba * Math.PI) / 180) * bv) * 6);
_root.sounder.gotoAndStop("kic");
} else {
tar = (Math.atan2(((2 * fh) - (2 * this[c]._y)) + 30, fw - (2 * this[c]._x)) * 180) / Math.PI;
a = ((30 * a) + tar) / 31;
if (random(10) == 0) {
ba = (tar + random(20)) - 10;
bv = random(2) + 3;
b._y = this[c]._y + ((Math.sin((ba * Math.PI) / 180) * bv) * 6);
b._x = this[c]._x + ((Math.cos((ba * Math.PI) / 180) * bv) * 6);
_root.sounder.gotoAndStop("kic");
}
}
} else {
pas = "o" + random(10);
ba = (Math.atan2(this._y - this[pas]._y, this._x - this[pas]._x) * 180) / Math.PI;
if (((random(9) == 0) and (ba > 0)) or (random(90) == 0)) {
bv = random(2) + 3;
b._y = this[c]._y + ((Math.sin((ba * Math.PI) / 180) * bv) * 6);
b._x = this[c]._x + ((Math.cos((ba * Math.PI) / 180) * bv) * 6);
_root.sounder.gotoAndStop("kic");
} else {
tar = (Math.atan2(((2 * fh) - (2 * this[c]._y)) + 30, fw - (2 * this[c]._x)) * 180) / Math.PI;
a = ((30 * a) + tar) / 31;
if (random(6) == 0) {
ba = (tar + random(20)) - 10;
bv = random(2) + 3;
b._y = this[c]._y + ((Math.sin((ba * Math.PI) / 180) * bv) * 6);
b._x = this[c]._x + ((Math.cos((ba * Math.PI) / 180) * bv) * 6);
_root.sounder.gotoAndStop("kic");
}
}
}
}
this[c]._y = this[c]._y + (Math.sin((a * Math.PI) / 180) * 2.5);
this[c]._x = this[c]._x + (Math.cos((a * Math.PI) / 180) * 2.5);
}
if (this[c].hitTest(b)) {
if (this[opp].hitTest(b)) {
ba = a;
bv = random(2) + 2;
b._y = this[c]._y + ((Math.sin((ba * Math.PI) / 180) * bv) * 3);
b._x = this[c]._x + ((Math.cos((ba * Math.PI) / 180) * bv) * 3);
} else {
ba = a;
bv = random(2) + 3;
b._y = this[c]._y + (Math.sin((ba * Math.PI) / 180) * bv);
b._x = this[c]._x + (Math.cos((ba * Math.PI) / 180) * bv);
}
} else {
b._y = b._y + (Math.sin((ba * Math.PI) / 180) * bv);
b._x = b._x + (Math.cos((ba * Math.PI) / 180) * bv);
}
this[c]._rotation = a + 90;
}
function s(g) {
q = 0;
while (q < 11) {
c = g + q;
d = "z" + q;
this[c + "l"] = this[d]._x;
this[c + "r"] = this[d]._x + this[d]._width;
if (g eq "p") {
this[c + "t"] = this[d]._y;
this[c + "b"] = this[d]._y + this[d]._height;
} else {
this[c + "t"] = (480 - this[d]._y) - this[d]._height;
this[c + "b"] = 480 - this[d]._y;
}
if (q < 3) {
this[c + "v"] = v1;
} else if (q < 7) {
this[c + "v"] = v2;
} else {
this[c + "v"] = v3;
}
q = q + 1;
}
if (g == "p") {
bufoptp = 0;
bufp = 1;
this["p" + bufp]._name = "pf";
} else {
bufopto = 0;
bufo = 1;
this["o" + bufo]._name = "of";
}
}
function i() {
v1 = 2.5;
v2 = 2.25;
v3 = 2;
zc1 = 1;
ka = 0;
kv = 1;
ba = random(360);
bv = random(4) + 4;
zv = 1;
zct = 0;
fw = 300;
fh = 480;
mw = 600;
mh = 400;
ms = 2;
wait = 1;
this._xscale = ms * 100;
this._yscale = ms * 100;
this._x = (mw / 2) - fw;
this._y = (mh / 2) - fh;
goaldone = 0;
}
i();
stop();
Symbol 194 MovieClip Frame 2
reset = int(getTimer() / 1000);
s("p");
s("o");
ms = _root.globalscale;
play();
Instance of Symbol 162 MovieClip "b" in Symbol 194 MovieClip Frame 2
/* no clip actions */
Symbol 194 MovieClip Frame 3
f("p");
f("o");
fc("p");
fc("o");
z();
arr();
play();
Symbol 194 MovieClip Frame 4
if (wait == 0) {
prevFrame();
} else {
stop();
}
Symbol 221 MovieClip Frame 1
stop();
Symbol 221 MovieClip Frame 2
_root.sounder.gotoAndStop("tig");
stop();
Symbol 221 MovieClip Frame 3
stop();
Symbol 221 MovieClip Frame 4
_root.sounder.gotoAndStop("cro");
stop();
Symbol 221 MovieClip Frame 5
_root.sounder.gotoAndStop("cro");
stop();
Symbol 223 MovieClip Frame 1
fw = 300;
fh = 480;
mw = 600;
mh = 400;
ms = 2;
this._xscale = ms * 100;
this._yscale = ms * 100;
this._x = (mw / 2) - fw;
this._y = (mh / 2) - fh;
stop();
Symbol 230 MovieClip Frame 1
txt.text = (_root.scorep + " - ") + _root.scoreo;
Symbol 236 Button
on (release) {
if (_root.ready == 1) {
_root.sounder.gotoAndStop("whi");
_parent._parent._parent.play();
_root.ready = 0;
}
}
Symbol 238 MovieClip Frame 10
stop();
_root.obj_game.score = _root.scorep;
tscore = _root.scorep;
if ((tscore >= 1) and (tscore <= 3)) {
_root.obj_game.point = 10;
} else if ((tscore >= 4) and (tscore <= 7)) {
_root.obj_game.point = 15;
} else if ((tscore >= 8) and (tscore <= 10)) {
_root.obj_game.point = 20;
} else if (tscore > 11) {
_root.obj_game.point = 25;
}
stop();
Symbol 244 MovieClip Frame 10
stop();
Symbol 250 MovieClip Frame 10
stop();
Symbol 251 MovieClip Frame 1
stop();
Symbol 251 MovieClip Frame 2
_root.sounder.gotoAndStop("par2");
stop();
Symbol 251 MovieClip Frame 3
_root.sounder.gotoAndStop("los");
stop();
Symbol 251 MovieClip Frame 4
_root.sounder.gotoAndStop("cla");
stop();
Symbol 252 MovieClip Frame 29
timescale123._width = 0;
Symbol 252 MovieClip Frame 30
function updateTime() {
timescale123._width = (180 * _root.thistime) / (_root.gametime * 60);
}
function timer() {
if (field.wait == 0) {
tim++;
}
}
tim = 0;
int1 = setInterval(timer, 1000);
updateTime();
_root.ready = 1;
submit = false;
stop();
Symbol 252 MovieClip Frame 31
stop();
Symbol 252 MovieClip Frame 32
_root.ready = 0;
clearInterval(int1);
_root.globalscale = field.ms;
goaler.gotoAndStop(_root.goal + 1);
Symbol 252 MovieClip Frame 50
_root.sounder.gotoAndStop("who");
Symbol 252 MovieClip Frame 70
if (_root.goal == 4) {
if (_root.scorep > _root.scoreo) {
declare.gotoAndStop(2);
} else if (_root.scorep < _root.scoreo) {
declare.gotoAndStop(3);
} else {
declare.gotoAndStop(4);
}
_root.ready = 1;
stop();
} else {
gotoAndStop (30);
}
Symbol 252 MovieClip Frame 89
_root.sounder.gotoAndStop("who");
if (submit) {
submit = false;
_parent.gotoAndStop("score_screen");
} else {
_parent.gotoAndPlay("title_screen");
}
Symbol 271 MovieClip Frame 1
_root.allowClick(this.linkBut);
_root.minScoreCheck(playagain_btn, subMC_btn);
playagain_btn.onRelease = function () {
_root.funPlayagain();
};
subMC_btn.onRelease = function () {
_parent.gotoAndStop("score_submit");
};
topMC_btn.onRelease = function () {
_parent.gotoAndStop("load_top_ten");
};
Symbol 278 MovieClip Frame 1
_root.allowClick(this.linkBut);
Symbol 279 MovieClip Frame 1
if (_root.alien) {
gotoAndStop ("nGH");
} else {
gotoAndStop ("GH");
}
Symbol 279 MovieClip Frame 2
_root.checkSubmit(_parent);
stop();
Symbol 279 MovieClip Frame 3
playagain_btn.onRelease = function () {
_root.funPlayagain();
};
Symbol 321 MovieClip Frame 2
gh_hide_but.useHandCursor = false;
scorePanel.topMC_btn._visible = false;
stop();
Symbol 321 MovieClip Frame 20
scorePanel.subMC_btn._visible = false;
Symbol 321 MovieClip Frame 30
_root.getTop10(this);
stop();
Symbol 321 MovieClip Frame 40
p = _root.toppers.split("|");
q = _root.topscore.split("|");
i = 0;
while (i <= 10) {
if (p[i]) {
this["t" + (i + 1)] = p[i];
if (q[i] == 1) {
this["s" + (i + 1)] = q[i];
} else {
this["s" + (i + 1)] = q[i];
}
this["n" + (i + 1)] = i + 1;
} else {
this["t" + (i + 1)] = "";
this["s" + (i + 1)] = "";
this["n" + (i + 1)] = "";
}
i++;
}
playagain_btn.onRelease = function () {
_root.funPlayagain();
};
close_btn.onRelease = function () {
gotoAndStop ("score_top10");
};
stop();