Frame 1
function nextToLoad(mc) {
switch (mc) {
case _level0.ui_mc :
allowLoad.loadClip("http://avatar2.gaiaonline.com/allow_domain.swf", aDomain);
break;
case _level0.aDomain :
playMain();
}
}
function retryLoad(mc) {
switch (mc) {
case _level0.ui_mc :
uiLoad.loadClip(_global.filePath + "ui/ui.swf", ui_mc);
break;
case _level0.aDomain :
allowLoad.loadClip("http://avatar2.gaiaonline.com/allow_domain.swf", aDomain);
}
}
function displayLoadInfo(mc) {
switch (mc) {
case _level0.ui_mc :
_root.loadBar.info = "Loading Towns HUD";
break;
case _level0.aDomain :
_root.loadBar.info = "Checking Avatar Server";
}
}
function retryServer(target_mc, errorCode, httpStatus) {
if (retry <= 3) {
retryLoad(target_mc);
} else {
errorMsg(target_mc, errorCode, httpStatus);
}
retry++;
}
function errorMsg(mc, errCode, errMsg) {
var _local2 = "";
switch (mc) {
case _level0.ui_mc :
_local2 = "Loading Towns HUD Failed";
break;
case _level0.aDomain :
_local2 = "Checking Avatar Server Failed";
}
_root.loadBar._visible = false;
_root.attachMovie("errorPanel", "errorPanel", _root.getNextHighestDepth());
_root.errorPanel._x = Stage.width / 2;
_root.errorPanel._y = 400;
_root.errorPanel.info = ("Method: " + _local2) + newline;
_root.errorPanel.info = _root.errorPanel.info + (("Error Code: " + errCode) + newline);
_root.errorPanel.info = _root.errorPanel.info + (("Error: " + errMsg) + "\n\nAvatar server is unavailable at this time.\n\n");
_root.errorPanel.info = _root.errorPanel.info + "Please copy and paste the above message and send it to games@gaiaonline.com";
}
function playMain() {
delete swfListener;
delete uiLoad;
delete allowLoad;
delete errorMsg;
delete displayLoadInfo;
delete nextToLoad;
delete retry;
gotoAndStop ("Main");
}
stop();
stop();
_global.filePath = String(_root._url);
_global.filePath = _global.filePath.substring(0, _global.filePath.lastIndexOf("/") + 1);
_global.appName = "Towns";
gsiUrl = (((gsiUrl == undefined) || (gsiUrl == 0)) ? "www" : (gsiUrl));
_global.gsiMethod = new GSIGateway(gsiUrl + ".gaiaonline.com", "sushi");
_global.domainURL = gsiUrl + ".gaiaonline.com";
_global.subDomain = gsiUrl;
_root.menu = new ContextMenu();
_root.menu.hideBuiltInItems();
_root.attachMovie("screenMask", "screenMask", 12);
_root.screenMask.onRollOver = function () {
};
_root.screenMask.useHandCursor = false;
_root.attachMovie("lBar", "loadBar", 10);
_root.attachMovie("title", "splash", 9);
_root.splash.onRollOver = function () {
};
_root.splash.useHandCursor = false;
_root.loadBar.bar._xscale = 0;
_root.loadBar._x = 220;
_root.loadBar._y = 515;
_root.createEmptyMovieClip("aDomain", 11);
_root.createEmptyMovieClip("ui_mc", 8);
_root.createEmptyMovieClip("canvas_mc", 5);
_root.createEmptyMovieClip("chat_mc", 1350);
retry = 0;
var swfListener = new Object();
swfListener.onLoadError = function (target_mc, errorCode, httpStatus) {
_root.retryServer(target_mc, errorCode, httpStatus);
};
swfListener.onLoadStart = function (target_mc) {
_root.loadBar.bar._xscale = 0;
_root.displayLoadInfo(target_mc);
};
swfListener.onLoadProgress = function (target_mc, bytesLoaded, bytesTotal) {
_root.loadBar.bar._xscale = (bytesLoaded / bytesTotal) * 100;
};
swfListener.onLoadInit = function (target_mc) {
_root.loadBar.bar._xscale = 0;
_root.loadBar.info = "";
retry = 0;
_root.playMain();
};
var uiLoad = new MovieClipLoader();
uiLoad.addListener(swfListener);
uiLoad.loadClip(_global.filePath + "ui/ui.swf", ui_mc);
var allowLoad = new MovieClipLoader();
allowLoad.addListener(swfListener);
var graphicServer = String(_root._url);
graphicServer = graphicServer.substring(7, graphicServer.lastIndexOf("com") + 3);
var statURL = (("http://" + graphicServer) + "/images/Gaia_Flash/sharedasset/stats/OmnitureActionSource.swf");
Frame 7
function bitOR(a, b) {
var _local1 = (a & 1) | (b & 1);
var _local2 = (a >>> 1) | (b >>> 1);
return((_local2 << 1) | _local1);
}
function bitXOR(a, b) {
var _local1 = (a & 1) ^ (b & 1);
var _local2 = (a >>> 1) ^ (b >>> 1);
return((_local2 << 1) | _local1);
}
function bitAND(a, b) {
var _local1 = (a & 1) & (b & 1);
var _local2 = (a >>> 1) & (b >>> 1);
return((_local2 << 1) | _local1);
}
function addme(x, y) {
var _local1 = (x & 65535) + (y & 65535);
var _local2 = ((x >> 16) + (y >> 16)) + (_local1 >> 16);
return((_local2 << 16) | (_local1 & 65535));
}
function rhex(num) {
var _local2 = "";
j = 0;
while (j <= 3) {
_local2 = _local2 + (hex_chr.charAt((num >> ((j * 8) + 4)) & 15) + hex_chr.charAt((num >> (j * 8)) & 15));
j++;
}
return(_local2);
}
function str2blks_MD5(str) {
var _local3 = ((str.length + 8) >> 6) + 1;
var _local2 = new Array(_local3 * 16);
i = 0;
while (i < (_local3 * 16)) {
_local2[i] = 0;
i++;
}
i = 0;
while (i < str.length) {
_local2[i >> 2] = _local2[i >> 2] | (str.charCodeAt(i) << ((((str.length * 8) + i) % 4) * 8));
i++;
}
_local2[i >> 2] = _local2[i >> 2] | (128 << ((((str.length * 8) + i) % 4) * 8));
var _local4 = str.length * 8;
_local2[(_local3 * 16) - 2] = _local4 & 255;
_local2[(_local3 * 16) - 2] = _local2[(_local3 * 16) - 2] | (((_local4 >>> 8) & 255) << 8);
_local2[(_local3 * 16) - 2] = _local2[(_local3 * 16) - 2] | (((_local4 >>> 16) & 255) << 16);
_local2[(_local3 * 16) - 2] = _local2[(_local3 * 16) - 2] | (((_local4 >>> 24) & 255) << 24);
return(_local2);
}
function rol(num, cnt) {
return((num << cnt) | (num >>> (32 - cnt)));
}
function cmn(q, a, b, x, s, t) {
return(addme(rol(addme(addme(a, q), addme(x, t)), s), b));
}
function ff(a, b, c, d, x, s, t) {
return(cmn(bitOR(bitAND(b, c), bitAND(~b, d)), a, b, x, s, t));
}
function gg(a, b, c, d, x, s, t) {
return(cmn(bitOR(bitAND(b, d), bitAND(c, ~d)), a, b, x, s, t));
}
function hh(a, b, c, d, x, s, t) {
return(cmn(bitXOR(bitXOR(b, c), d), a, b, x, s, t));
}
function ii(a, b, c, d, x, s, t) {
return(cmn(bitXOR(c, bitOR(b, ~d)), a, b, x, s, t));
}
function calcMD5(str) {
x = str2blks_MD5(str);
a = 1732584193 /* 0x67452301 */;
b = -271733879;
c = -1732584194;
d = 271733878 /* 0x10325476 */;
var _local1;
i = 0;
while (i < x.length) {
olda = a;
oldb = b;
oldc = c;
oldd = d;
_local1 = 0;
a = ff(a, b, c, d, x[i + 0], 7, -680876936);
d = ff(d, a, b, c, x[i + 1], 12, -389564586);
c = ff(c, d, a, b, x[i + 2], 17, 606105819);
b = ff(b, c, d, a, x[i + 3], 22, -1044525330);
a = ff(a, b, c, d, x[i + 4], 7, -176418897);
d = ff(d, a, b, c, x[i + 5], 12, 1200080426);
c = ff(c, d, a, b, x[i + 6], 17, -1473231341);
b = ff(b, c, d, a, x[i + 7], 22, -45705983);
a = ff(a, b, c, d, x[i + 8], 7, 1770035416);
d = ff(d, a, b, c, x[i + 9], 12, -1958414417);
c = ff(c, d, a, b, x[i + 10], 17, -42063);
b = ff(b, c, d, a, x[i + 11], 22, -1990404162);
a = ff(a, b, c, d, x[i + 12], 7, 1804603682);
d = ff(d, a, b, c, x[i + 13], 12, -40341101);
c = ff(c, d, a, b, x[i + 14], 17, -1502002290);
b = ff(b, c, d, a, x[i + 15], 22, 1236535329);
a = gg(a, b, c, d, x[i + 1], 5, -165796510);
d = gg(d, a, b, c, x[i + 6], 9, -1069501632);
c = gg(c, d, a, b, x[i + 11], 14, 643717713);
b = gg(b, c, d, a, x[i + 0], 20, -373897302);
a = gg(a, b, c, d, x[i + 5], 5, -701558691);
d = gg(d, a, b, c, x[i + 10], 9, 38016083);
c = gg(c, d, a, b, x[i + 15], 14, -660478335);
b = gg(b, c, d, a, x[i + 4], 20, -405537848);
a = gg(a, b, c, d, x[i + 9], 5, 568446438);
d = gg(d, a, b, c, x[i + 14], 9, -1019803690);
c = gg(c, d, a, b, x[i + 3], 14, -187363961);
b = gg(b, c, d, a, x[i + 8], 20, 1163531501);
a = gg(a, b, c, d, x[i + 13], 5, -1444681467);
d = gg(d, a, b, c, x[i + 2], 9, -51403784);
c = gg(c, d, a, b, x[i + 7], 14, 1735328473);
b = gg(b, c, d, a, x[i + 12], 20, -1926607734);
a = hh(a, b, c, d, x[i + 5], 4, -378558);
d = hh(d, a, b, c, x[i + 8], 11, -2022574463);
c = hh(c, d, a, b, x[i + 11], 16, 1839030562);
b = hh(b, c, d, a, x[i + 14], 23, -35309556);
a = hh(a, b, c, d, x[i + 1], 4, -1530992060);
d = hh(d, a, b, c, x[i + 4], 11, 1272893353);
c = hh(c, d, a, b, x[i + 7], 16, -155497632);
b = hh(b, c, d, a, x[i + 10], 23, -1094730640);
a = hh(a, b, c, d, x[i + 13], 4, 681279174);
d = hh(d, a, b, c, x[i + 0], 11, -358537222);
c = hh(c, d, a, b, x[i + 3], 16, -722521979);
b = hh(b, c, d, a, x[i + 6], 23, 76029189);
a = hh(a, b, c, d, x[i + 9], 4, -640364487);
d = hh(d, a, b, c, x[i + 12], 11, -421815835);
c = hh(c, d, a, b, x[i + 15], 16, 530742520);
b = hh(b, c, d, a, x[i + 2], 23, -995338651);
a = ii(a, b, c, d, x[i + 0], 6, -198630844);
d = ii(d, a, b, c, x[i + 7], 10, 1126891415);
c = ii(c, d, a, b, x[i + 14], 15, -1416354905);
b = ii(b, c, d, a, x[i + 5], 21, -57434055);
a = ii(a, b, c, d, x[i + 12], 6, 1700485571);
d = ii(d, a, b, c, x[i + 3], 10, -1894986606);
c = ii(c, d, a, b, x[i + 10], 15, -1051523);
b = ii(b, c, d, a, x[i + 1], 21, -2054922799);
a = ii(a, b, c, d, x[i + 8], 6, 1873313359);
d = ii(d, a, b, c, x[i + 15], 10, -30611744);
c = ii(c, d, a, b, x[i + 6], 15, -1560198380);
b = ii(b, c, d, a, x[i + 13], 21, 1309151649);
a = ii(a, b, c, d, x[i + 4], 6, -145523070);
d = ii(d, a, b, c, x[i + 11], 10, -1120210379);
c = ii(c, d, a, b, x[i + 2], 15, 718787259);
b = ii(b, c, d, a, x[i + 9], 21, -343485551);
a = addme(a, olda);
b = addme(b, oldb);
c = addme(c, oldc);
d = addme(d, oldd);
i = i + 16;
}
return(((rhex(a) + rhex(b)) + rhex(c)) + rhex(d));
}
function fixNum(num) {
var _local1 = num;
if (num < 10) {
_local1 = "0" + num;
}
return(_local1);
}
function returnFromInsideHouse() {
trace("[Home] Let me leave!");
trace("zip=" + _global.jumpZip);
trace("gHouseId=" + global.gHouseId);
if ((((_global.jumpZip == 0) || (_global.jumpZip == undefined)) || (_global.gHouseId == 0)) || (_global.gHouseId == undefined)) {
_global.uiCtrl.dirState(true);
} else {
stream.destroySequence();
_global.scene = "toMap";
_global.gMapType = "town";
stream.loadSequence(_global.scene);
}
}
function houseBackgroundLoaded() {
}
function reloadAllUserMaps() {
_global.gsc.sendUserMessage(500, 1, parseInt(sushi.me.room), [""]);
_global.gsiMethod.invoke("611", [_global.gHouseOwnerId, _global.gaiaSessionID], callBackNotYetDetermined);
}
function resetSushiListners() {
sushi.event.onUserMessage.removeListener(this);
sushi.event.onUserMessage.addListener(this);
}
function onUserMessage(messageID, senderMemberID, routing, targetID, dataArray) {
trace((((("[SushiBroadcast] packet: onUserMessage(" + messageID) + ") from: ") + senderMemberID) + " data: ") + dataArray.join(","));
switch (messageID) {
case "200" :
_global.gAvMan.getAvatar(senderMemberID).emoteBubble.playCollectEmote(dataArray[0], dataArray[1], dataArray[3]);
if (senderMemberID != _global.gAvMan.getMySID()) {
var _local2 = 0;
while (_local2 < _global.gSprite.length) {
if (_global.gSprite[_local2].spriteSerial == dataArray[2]) {
_global.gSprite[_local2].remove();
}
_local2++;
}
}
break;
case "300" :
_global.gAvMan.getAvatar(senderMemberID).emoteBubble.playEmote(2, "lol");
_global.gHomes[dataArray[0]].showNewHouse(dataArray[1]);
break;
case "500" :
break;
case "610" :
_global.gAvMan.getAvatar(senderMemberID).emoteBubble.playEmote(2, "poed");
break;
case "611" :
if (senderMemberID != _global.gAvMan.getMySID()) {
_global.gAvMan.getAvatar(senderMemberID).emoteBubble.playCollectEmote(dataArray[0], dataArray[1]);
}
break;
case "1000" :
_global.uiCtrl.openInvite(dataArray, senderMemberID);
break;
case "1001" :
break;
case "1002" :
break;
case "3000" :
if (dataArray[5] != "fireBall") {
_global.gAvMan.getMyAvatar().activateAvatarAction(dataArray);
}
break;
case "3001" :
_global.myToyManager.killTheToy(dataArray[0]);
}
}
stop();
var hex_chr = "0123456789abcdef";
_global.appName = "Towns";
_global.EVENT_XMAS = 30;
_global.EVENT_HALLOWEEN = 10;
_global.POOL = false;
_global.EVENT_SUMMER = 55;
_global.EVENT_WINTER = 5;
_global.EVENT_EASTER = 19;
_global.SUPPORT_UFO = false;
_global.SUPPORT_FLY = false;
if (_root.room_name != undefined) {
if (_root.room_name.indexOf("#") != -1) {
var houseData = new Array();
houseData = _root.room_name.split("#");
var houseAndZip = new Array();
houseAndZip = houseData[0].split("S");
house_location = houseAndZip[1];
} else {
town_location = _root.room_name.split("_")[1];
}
}
if (house_location != undefined) {
sceneSetting = "home";
town_location = "00000000";
_global.isTeleport = true;
} else if (town_location != undefined) {
_global.isTeleport = true;
sceneSetting = "town";
} else {
sceneSetting = "train";
}
var mainZipArray = [];
var addressZipArray = [];
var z = 0;
while (z < 100) {
mainZipArray.push("Barton 0010" + fixNum(z));
addressZipArray.push("10010" + fixNum(z));
z++;
}
var roomIDArray = ["4", "3", "2", "1", "1", "2", "1", "2", "2", "2", "3", "4", "2", "2", "1", "1", "2", "2", "4", "2", "3", "1", "3", "2", "2", "1", "2", "2", "1", "3", "1", "3", "2", "1", "1", "2", "2", "1", "4", "1", "2", "1", "1", "2", "4", "4", "1", "1", "2", "3", "4", "1", "3", "3", "1", "1", "1", "2", "2", "1", "4", "1", "1", "1", "3", "3", "1", "2", "1", "3", "2", "2", "3", "2", "1", "2", "3", "1", "1", "3", "1", "4", "1", "1", "1", "4", "2", "2", "2", "4", "2", "4", "3", "1", "1", "3", "1", "3", "2", "2"];
_global.chessRoomArray = [];
_global.chessZipArray = [];
var z = 0;
while (z < 100) {
_global.chessRoomArray.push((roomIDArray[z] + " ") + mainZipArray[z]);
_global.chessZipArray.push(roomIDArray[z] + addressZipArray[z]);
z++;
}
_global.avStringMiddle = "";
_global.scene = sceneSetting;
_global.jumpZip = town_location;
_global.gameID = 10;
_global.gHouseOwnerId = house_location;
_global.gHouseId;
_global.gHouseOwnerName;
_global.enterBeeHive = false;
_global.shouldTryBookmark = true;
delete town_location;
delete house_location;
_global.sushi = new com.rawfishsoftware.sushi.SushiAPI();
sushi.enableLogging(false);
_global.gBroadcaster = new classes.environment.Broadcaster();
gBroadcaster.start();
gsiUrl = (((gsiUrl == undefined) || (gsiUrl == 0)) ? "www" : (gsiUrl));
_global.gsc = new classes.avatar.GameServerConnector();
_global.gsiMethod = new GSItools.GSIGateway(gsiUrl + ".gaiaonline.com", "sushi");
_global.domainURL = gsiUrl + ".gaiaonline.com";
_global.subDomain = gsiUrl;
trace("[Global] sub domain: " + _global.subDomain);
GSItools.GSIGateway.setDebugging(false);
_global.gsiMethod.setTimeout(true);
_global.filePath = String(_root._url);
_global.filePath = _global.filePath.substring(0, _global.filePath.lastIndexOf("/") + 1);
_global.gCanvas = _root.canvas_mc;
_global.serverList;
_global.avatarHost;
_global.avMax;
_global.graphicsHost;
_global.eventID;
_global.eventData;
_global.eventQty;
_global.gaiaSessionID;
_global.myUserData;
_global.myGold;
_global.mapDataOld;
_global.mapData;
_global.mapHomeData;
_global.spriteBank = new Array();
_global.gSprite = new Array();
_global.gBots = new Array();
_global.sponsorBot = new Array();
_global.gHomes = new Array();
new debugTools.agentSmith.WireTap(_root.agent);
stream = new classes.main.Sequencer(_global.scene);
Symbol 67 MovieClip [ActionSource] Frame 1
#initclip 102
Object.registerClass("ActionSource", com.omniture.ActionSource);
#endinitclip
Symbol 72 MovieClip [__Packages.GSItools.GSIGateway] Frame 0
class GSItools.GSIGateway
{
static var SERIALIZERS;
var methodCalls, callbacks, server, encodingLogic, encodingName;
function GSIGateway (url, serialization) {
if (SERIALIZERS == undefined) {
SERIALIZERS = {simple:null, wddx:null, amf:null, phpobject:GSItools.serializers.PHPSerializer, sushi:GSItools.serializers.SushiSerializer, xml_rpc:null};
}
setServer(url);
setEncoding(serialization);
methodCalls = new Array();
callbacks = new Array();
}
function invoke(method, args, callback, scope, tOut) {
if (tOut == undefined) {
tOut = timeout;
}
queue(method, args, callback, scope);
send(tOut);
}
function queue(method, args, cb, scope) {
var _local4;
var _local2;
if (cb instanceof GSItools.CallbackGroup) {
_local2 = cb.getIndex();
_local4 = cb;
methodCalls[_local2].push([method, args]);
callbacks[_local2][2]++;
} else {
if (typeof(cb) != "function") {
cb = function () {
trace("-- empty callback --");
};
}
_local2 = callbacks.length;
_local4 = new GSItools.CallbackGroup(_local2);
methodCalls.push([[method, args]]);
callbacks.push([cb, scope, 1]);
}
return(_local4);
}
function send(tOut) {
if (methodCalls.length < 1) {
return(undefined);
}
var _local7;
var _local3;
var _local2;
var _local4 = new Array();
var _local6;
var _local5;
_local7 = ((!TS) ? (("http://" + server) + PATH) : (("http://" + TEST_SERVER) + PATH));
_local3 = 0;
while (_local3 < methodCalls.length) {
_local2 = 0;
while (_local2 < methodCalls[_local3].length) {
_local4.push(methodCalls[_local3][_local2]);
_local2++;
}
_local3++;
}
_local6 = encodingLogic.serialize(_local4);
if (tOut == undefined) {
tOut = timeout;
}
_local5 = new GSItools.GSIRequest(_local7, encodingName, encodingLogic, _local6, callbacks);
_local5.setTimeout(tOut);
_local5.send();
methodCalls = new Array();
callbacks = new Array();
}
static function getTestServer() {
return(TEST_SERVER);
}
function getServer() {
return(server);
}
function getEncoding() {
return(encodingName);
}
function setTimeout(turnOn) {
timeout = turnOn;
}
static function setTestServer(url) {
if (((url == null) || (url == undefined)) || (url == "")) {
TS = false;
TEST_SERVER = null;
} else {
TS = true;
TEST_SERVER = url;
}
}
static function setDebugging(turnOn) {
GSItools.GSIRequest.setDebugging(turnOn);
}
function setServer(url) {
server = ((url == undefined) ? "www.gaiaonline.com" : (url));
}
function setEncoding(encode) {
encodingName = ((encode == undefined) ? (PHPOBJECT) : (encode));
encodingLogic = SERIALIZERS[encodingName];
}
static var SIMPLE = "simple";
static var WDDX = "wddx";
static var AMF = "amf";
static var PHPOBJECT = "phpobject";
static var SUSHI = "sushi";
static var XML_RPC = "xml_rpc";
static var PATH = "/chat/gsi/gateway.php";
static var TEST_SERVER = null;
static var TS = false;
var timeout = false;
}
Symbol 73 MovieClip [__Packages.GSItools.serializers.PHPSerializer] Frame 0
class GSItools.serializers.PHPSerializer
{
static var enableMultiByte;
function PHPSerializer () {
}
static function serialize(o) {
return($_parseValue(o));
}
static function unserialize(s) {
return($_getValue(GSItools.serializers.CommonTools.unwhitespace(s))[0]);
}
static function $_getNext(s) {
var _local2 = $_getValue(s);
s = _local2[1];
var _local3 = $_getValue(s);
s = _local3[1];
return([_local2[0], _local3[0], s]);
}
static function $_getValue(s) {
trace("check " + s);
var _local3;
var _local4;
var _local7 = s.charAt(0);
switch (_local7) {
case "s" :
_local3 = s.substr(2, s.indexOf(":", 3) - 2) * 1;
_local4 = s.substr(length(_local3) + 4, _local3).toString();
if (enableMultiByte) {
_local4 = unescape(_local4);
}
break;
case "i" :
_local3 = s.substr(2, s.indexOf(";", 3) - 2) * 1;
_local4 = parseInt(_local3);
break;
case "d" :
_local3 = s.substr(2, s.indexOf(";", 3) - 2) * 1;
_local4 = parseFloat(_local3);
break;
case "b" :
_local3 = s.substr(2, s.indexOf(";", 3) - 2) * 1;
_local4 = (((_local3 == "true") || (_local3 == "1")) ? true : false);
break;
case "a" :
case "O" :
_local3 = s.substr(2, s.indexOf(":", 3) - 2) * 1;
if (_local7 == "a") {
_local4 = [];
s = s.substr(s.indexOf(_local3));
} else {
_local4 = {};
s = s.substr((length(s.substr(length(_local3) + 4, _local3)) + s.indexOf(s.substr(length(_local3) + 4, _local3))) + 2);
}
var _local6 = s.substr(0, s.indexOf(":")) * 1;
var _local5 = 0;
s = s.substr(s.indexOf(":") + 2);
while (_local5 < _local6) {
var _local2 = $_getNext(s);
s = _local2[2];
_local4[_local2[0]] = _local2[1];
_local5++;
}
return([_local4, s.substr(s.indexOf("}") + 1)]);
case "N" :
_local4 = null;
_local3 = "";
s = s.substr(1);
}
if (_local7 != "s") {
_local3 = length(_local3);
}
s = s.substr(s.indexOf(";", _local3) + 1);
trace("A=" + _local4);
trace("S=" + s);
return([_local4, s]);
}
static function $_parseValue(v) {
switch (v.__proto__) {
case Array.prototype :
var _local4 = "";
var _local5 = 0;
while (_local5 < v.length) {
var _local2 = $_parseValue(_local5);
_local4 = _local4 + (_local2 + $_parseValue(v[_local5]));
_local5++;
}
return(((("a:" + _local5) + ":{") + _local4) + "}");
case Object.prototype :
case MovieClip.prototype :
_local5 = 0;
_local4 = "";
for (var _local6 in v) {
if (typeof(v[_local6]) != "function") {
var _local2 = $_parseValue(_local6);
var _local3 = $_parseValue(v[_local6]);
_local4 = _local4 + (_local2 + _local3);
_local5++;
}
}
return(((("O:8:\"stdClass\":" + _local5) + ":{") + _local4) + "}");
case String.prototype :
if (enableMultiByte) {
v = escape(v);
}
case undefined :
case Date.prototype :
return(((("s:" + length(v)) + ":\"") + v) + "\";");
case Number.prototype :
if (isNaN(v)) {
return("N;");
}
v = Number(v);
if ((v % 1) == 0) {
return(("i:" + v) + ";");
}
return(("d:" + v) + ";");
case Boolean.prototype :
return(("b:" + ((v == true) ? 1 : 0)) + ";");
}
return(undefined);
}
}
Symbol 74 MovieClip [__Packages.GSItools.serializers.CommonTools] Frame 0
class GSItools.serializers.CommonTools
{
function CommonTools () {
}
static function unwhitespace(raw) {
var _local2;
var _local1;
var _local4;
var _local5;
var _local3 = new String(raw);
_local1 = -1;
_local2 = false;
while (!_local2) {
_local1++;
if (_local3.charCodeAt(_local1) > 32) {
_local2 = true;
}
}
_local4 = _local1;
_local1 = _local3.length;
_local2 = false;
while (!_local2) {
_local1--;
if (_local3.charCodeAt(_local1) > 32) {
_local2 = true;
}
}
_local5 = _local1 + 1;
return(((_local5 > _local4) ? (_local3.substring(_local4, _local5)) : ""));
}
}
Symbol 75 MovieClip [__Packages.GSItools.serializers.SushiSerializer] Frame 0
class GSItools.serializers.SushiSerializer
{
function SushiSerializer () {
}
static function serialize(queue) {
var _local7;
var _local4;
var _local5;
var _local6;
var _local2;
var _local1;
var _local3 = "";
_local7 = queue.length;
_local4 = 0;
while (_local4 < _local7) {
_local5 = queue[_local4];
_local3 = _local3 + _local5[0];
_local2 = _local5[1];
_local6 = _local2.length;
_local1 = 0;
while (_local1 < _local6) {
if (_local2[_local1] instanceof Array) {
_local3 = _local3 + (DELIMITER + _local2[_local1].join(ARRAY_DELIMITER));
} else {
_local3 = _local3 + (DELIMITER + String(_local2[_local1]));
}
_local1++;
}
_local3 = _local3 + END;
_local4++;
}
return(_local3);
}
static function unserialize(s) {
var _local6;
var _local7;
var _local3;
var _local5;
var _local2;
var _local4 = new Array();
s = GSItools.serializers.CommonTools.unwhitespace(s);
_local6 = s.split(END);
_local7 = _local6.length;
var _local1 = 0;
while (_local1 < _local7) {
_local3 = _local6[_local1].split(DELIMITER);
_local5 = _local3.length;
_local4[_local1] = new Array();
_local4[_local1][0] = _local3[0];
_local4[_local1][1] = ((_local3[1] == SUSHI_TRUE) ? true : false);
_local4[_local1][2] = new Array();
_local2 = 2;
while (_local2 < _local5) {
if (_local3[_local2].indexOf(ARRAY_DELIMITER) != -1) {
_local4[_local1][2].push(_local3[_local2].split(ARRAY_DELIMITER));
} else {
_local4[_local1][2].push(_local3[_local2]);
}
_local2++;
}
_local1++;
}
return(_local4);
}
static var DELIMITER = "\x01";
static var ARRAY_DELIMITER = "\x02";
static var END = "\x04";
static var SUSHI_TRUE = "\x05";
static var SUSHI_FALSE = "\x06";
}
Symbol 76 MovieClip [__Packages.GSItools.CallbackGroup] Frame 0
class GSItools.CallbackGroup
{
var cbIndex;
function CallbackGroup (index) {
cbIndex = index;
}
function getIndex() {
return(cbIndex);
}
}
Symbol 77 MovieClip [__Packages.GSItools.GSIRequest] Frame 0
class GSItools.GSIRequest
{
var gateway, encodingName, encodingLogic, callbacks, sender, reciever, trys, dead, timeoutProc;
function GSIRequest (url, eName, eLogic, message, cb, oldTries) {
gateway = url;
encodingName = eName;
encodingLogic = eLogic;
callbacks = cb;
sender = new LoadVars();
sender.m = message;
sender.v = encodingName;
sender.X = null;
reciever = new LoadVars();
reciever.owner = this;
reciever.onLoad = function (s) {
this.owner.onRecieverLoad(s);
};
trys = ((oldTries == undefined) ? 0 : (oldTries));
dead = false;
}
function destroy() {
reciever.owner = null;
}
function send(cacheBuster) {
if (DB) {
trace(((((("\n--- DATA " + ((trys == 0) ? "SENDING --" : "RESENDING ")) + "--------- (") + (trys + 1)) + ") --- <") + encodingName) + ">");
trace(sender.m + newline);
}
if (timeout) {
timeoutProc = setInterval(this, "onTimeout", TIMEOUT_INTERVAL);
}
sender.X = ((cacheBuster == undefined) ? (new Date().getTime()) : (cacheBuster));
sender.sendAndLoad(gateway, reciever, "POST");
trys++;
}
function onTimeout() {
var _local2;
clearInterval(timeoutProc);
dead = true;
if (DB) {
trace(("\n--- DATA TIMEOUT ------------ <" + sender.X) + ">");
}
if (trys < TOTAL_TRYS) {
_local2 = new GSItools.GSIRequest(gateway, encodingName, encodingLogic, sender.m, callbacks, trys);
_local2.setTimeout(true);
_local2.send(sender.X);
} else {
onNoServer();
}
}
function onRecieverLoad(success) {
if (dead) {
if (DB) {
trace(("\n--- CLEANUP ------------ <" + sender.X) + ">");
}
destroy();
} else if (success) {
onSuccess();
destroy();
} else if (trys < TOTAL_TRYS) {
send();
} else {
onNoServer();
destroy();
}
}
function onSuccess() {
var _local11;
var _local12;
var _local3;
var _local5;
var _local4;
var _local2;
var _local10;
var _local6;
var _local8;
var _local7;
_local11 = unescape(reciever.toString());
_local12 = _local11.lastIndexOf("=&onLoad=");
_local11 = _local11.substr(0, _local12);
_local3 = encodingLogic.unserialize(_local11);
if (DB) {
trace(("\n--- DATA RECIEVED ------------ <" + encodingName) + ">");
trace(_local11 + newline);
}
_local2 = 0;
_local5 = 0;
while (_local5 < callbacks.length) {
_local10 = callbacks[_local5][0];
_local6 = callbacks[_local5][1];
_local8 = callbacks[_local5][2];
if (_local8 == 1) {
_local10.call(_local6, _local3[_local2][1], _local3[_local2][2], _local6);
_local2++;
} else {
_local7 = new Array();
_local4 = 0;
while (_local4 < _local8) {
_local7.push({success:_local3[_local2][1], data:_local3[_local2][2]});
_local2++;
_local4++;
}
_local10.call(_local6, true, _local7, _local6);
}
_local5++;
}
}
function onNoServer() {
var _local3;
if (DB) {
trace(("\n--- DATA NOT RETURNED ------------ <" + encodingName) + ">");
trace(((("Cannot connect to " + gateway) + " after ") + trys) + " attempts.\n");
}
var _local2 = 0;
while (_local2 < callbacks.length) {
_local3 = callbacks[_local2][1];
callbacks[_local2][0].call(_local3, false, [-1000, "Cannot connect to server."], _local3);
_local2++;
}
}
function setTimeout(turnOn) {
timeout = turnOn;
}
static function setDebugging(turnOn) {
DB = turnOn;
}
static var TOTAL_TRYS = 10;
static var TIMEOUT_INTERVAL = 10000;
static var DB = false;
var timeout = false;
}
Symbol 78 MovieClip [__Packages.classes.environment.Broadcaster] Frame 0
class classes.environment.Broadcaster
{
static var num;
var olist, mc;
function Broadcaster () {
if (!num) {
num = 0;
}
olist = [];
mc = _root.createEmptyMovieClip("bc" + (num++), _root.getNextHighestDepth());
mc.$r = this;
}
function addListener(o) {
olist.push(o);
}
function removeListener(o) {
var _local2;
_local2 = 0;
while (_local2 < olist.length) {
if (olist[_local2] == o) {
olist.splice(_local2, 1);
}
_local2++;
}
}
function start() {
mc.onEnterFrame = function () {
this.$r.sendMessage("run");
};
}
function stop() {
delete mc.onEnterFrame;
}
function sendMessage() {
var _local3;
var _local5 = arguments[0];
var _local4 = olist.slice();
var _local6 = _local4.length;
arguments.shift();
_local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
}
Symbol 79 MovieClip [__Packages.classes.main.Sequencer] Frame 0
class classes.main.Sequencer
{
var sushi, theScene, seqPointer, path, sequence, townEvent, sushiCon, sushiSubCon, mapControl, spawning, npc, jumpFlag, gTime;
function Sequencer (scene) {
sushi = _global.sushi;
theScene = scene;
loadSequence(scene);
}
function loadSequence(scene) {
trace("[Sequencer] Load Sequence: " + scene);
seqPointer = 0;
switch (scene) {
case "train" :
path = initTrain;
break;
case "town" :
path = initTown;
break;
case "autoConnect" :
path = initAuto;
splash();
break;
case "home" :
path = initHome;
break;
case "guest" :
path = initGuest;
break;
case "toTrain" :
path = toTrain;
splash();
break;
case "toHome" :
path = toHome;
houseTrans();
break;
case "toMap" :
path = toMap;
splash();
}
path[0].call(this);
}
function splash() {
_root.attachMovie("lBar", "loadBar", 10);
_root.attachMovie("title", "splash", 9);
_root.splash.onRollOver = function () {
};
_root.splash.useHandCursor = false;
_root.loadBar.bar._xscale = 0;
_root.loadBar._x = 220;
_root.loadBar._y = 510;
}
function errorMsg(meth, errCode, errMsg) {
_root.loadBar._visible = false;
_root.attachMovie("errorPanel", "errorPanel", 6000);
_root.errorPanel._x = Stage.width / 2;
_root.errorPanel._y = 400;
_root.errorPanel.info = ("Method: " + meth) + newline;
_root.errorPanel.info = _root.errorPanel.info + (("Error Code: " + errCode) + newline);
_root.errorPanel.info = _root.errorPanel.info + (("Error: " + errMsg) + "\n\n");
_root.errorPanel.info = _root.errorPanel.info + "Please copy and paste the above message and send it to games@gaiaonline.com";
}
function houseTrans() {
_root.attachMovie("lBar", "loadBar", 10);
_root.attachMovie("houseTrans", "splash", 9);
_root.splash.onRollOver = function () {
};
_root.splash.useHandCursor = false;
_root.splash._x = Stage.width / 2;
_root.splash._y = Stage.height / 2;
_root.loadBar.bar._xscale = 0;
_root.loadBar._x = 220;
_root.loadBar._y = 510;
}
function nextSequence() {
delete sequence;
seqPointer++;
path[seqPointer].call(this);
}
function init() {
_root.loadBar._visible = true;
if (_root.loadBar.bar._xscale != 100) {
_root.loadBar.bar._xscale = 100;
}
_root.loadBar.info = "Retrieving Town server listing and Gaia Session ID";
sequence = new classes.main.InitData(this);
}
function allowDomain() {
trace("[Sequencer] ##### LOADING ALLOW DOMAIN ##### " + _global.avatarHost);
System.security.allowDomain(_global.avatarHost + ".gaiaonline.com");
var thisClass = this;
_root.loadBar._visible = true;
if (_root.loadBar.bar._xscale != 100) {
_root.loadBar.bar._xscale = 100;
}
_root.loadBar.info = "Validating " + _global.avatarHost;
var _local5 = new Object();
_local5.onLoadInit = function (target_mc) {
_root.loadBar.bar._xscale = 0;
_root.loadBar.info = "";
thisClass.nextSequence();
};
var _local4 = new MovieClipLoader();
_local4.addListener(_local5);
_local4.loadClip(("http://" + _global.avatarHost) + ".gaiaonline.com/allow_domain.swf", _root.aDomain);
}
function player() {
trace("[Sequencer] ##### Player Data #####");
_root.loadBar._visible = true;
if (_root.loadBar.bar._xscale != 100) {
_root.loadBar.bar._xscale = 100;
}
_root.loadBar.info = "Retrieving Event and Avatar Data";
sequence = new classes.main.PlayerData(this);
}
function gameEvent() {
trace("[Sequencer] ##### EVENT #####");
_root.loadBar._visible = true;
if (_root.loadBar.bar._xscale != 100) {
_root.loadBar.bar._xscale = 100;
}
_root.loadBar.info = "Retrieving Site Event";
sequence = new classes.main.EventData(this);
}
function alert(msg) {
var _local1 = ("javascript:alert('" + msg) + "');";
getURL (_local1);
}
function checkJump() {
var _local4 = new classes.controllers.JumpController();
if (_root.dirFlag == 1) {
_root.dirFlag = 0;
_global.uiCtrl.dirState();
return(undefined);
}
var _local5 = SharedObject.getLocal("gloc");
trace("jumpZip=" + _local5.data.jumpZip);
if (_root.jumpTO != undefined) {
trace("JUMP TO");
_local4.setJumpFlag(true);
_local4.setStart(_root.doorX, _root.doorY);
_global.jumpZip = Number(_root.jumpTO);
trace("jumpTo=" + Number(_root.jumpTO));
_global.scene = "toMap";
loadSequence("toMap");
_global.uiCtrl.dirState(false);
_root.jumpTO = undefined;
}
}
function map() {
trace("[Sequencer] ##### Map Data #####");
var _local4 = _global.jumpZip + "";
trace("zipCode=" + _local4);
var _local5 = (_local4.substring(0, 1) + " Barton ") + _local4.substr(2, 8);
_root.loadBar._visible = true;
if (_root.loadBar.bar._xscale != 100) {
_root.loadBar.bar._xscale = 100;
}
_root.loadBar.info = ("Retrieving " + _local5) + ": Data";
if ((_global.jumpZip == 0) || (_global.jumpZip == undefined)) {
errorMsg("Zipcode Look up", "NA", ("The current Zipcode \"" + _global.jumpZip) + "\" cannot be found.");
} else {
sequence = new classes.main.MapData(this);
}
}
function auto() {
sequence = new classes.main.AutoConnect(this);
}
function home() {
sequence = new classes.main.HomeData(this);
}
function buildEvent() {
townEvent = new classes.main.BuildEvent(this);
}
function buildTrain() {
trace("[Sequencer] ##### Build Trainstation #####");
_root.loadBar._visible = true;
_root.loadBar.bar._xscale = 0;
_root.loadBar.info = "Loading Trainstation";
sequence = new classes.main.BuildTrain(this);
}
function buildTown() {
trace("[Sequencer] ##### Build Town #####");
var _local4 = (_global.mapData[0].substring(0, 1) + " Barton ") + _global.mapData[0].substr(2, 8);
_root.loadBar._visible = true;
_root.loadBar.bar._xscale = 0;
_root.loadBar.info = ("Loading " + _local4) + ": Map";
sequence = new classes.main.BuildTown(this);
}
function buildHome() {
trace("save zip=" + _global.jumpZip);
if (_global.jumpZip != "91137210") {
var _local3 = SharedObject.getLocal("gloc");
_local3.data.scene = _global.scene;
_local3.data.jumpZip = _global.jumpZip;
_local3.data.gHouseId = _global.gHouseId;
_local3.data.jumpFlag = 1;
_local3.flush();
}
sequence = new classes.main.BuildHome(this);
}
function buildTownHomes() {
trace("[Sequencer] ##### Build Homes #####");
var _local4 = (_global.mapData[0].substring(0, 1) + " Barton ") + _global.mapData[0].substr(2, 8);
_root.loadBar._visible = true;
_root.loadBar.bar._xscale = 0;
_root.loadBar.info = ("Loading " + _local4) + ": Homes";
sequence = new classes.main.BuildTownHomes(this);
}
function gst() {
if (_global.isAltRoom) {
nextSequence();
return(undefined);
}
_root.loadBar._visible = true;
if (_root.loadBar.bar._xscale != 100) {
_root.loadBar.bar._xscale = 100;
}
_root.loadBar.info = "Retrieving Gaia Standard Time (GST)";
_global.gst = new classes.environment.GST(this);
}
function autoScript() {
sequence = new classes.main.AutoScript(this);
}
function joinSushi() {
trace("[Sequencer] ##### Join Sushi #####");
_root.loadBar._visible = true;
_root.loadBar.bar._xscale = 0;
_root.loadBar.info = "Connecting to Town server";
sushiCon = new classes.chat.SushiConnection(this);
}
function joinSubRoom() {
sushiSubCon = new classes.chat.SubChat(this);
}
function goPlay() {
trace("[Sequencer] ##### goPlay #####");
sequence = new classes.main.PlayGame(this);
checkJump();
}
function mCtrl() {
trace("[Sequencer] ##### Map Controller #####");
_root.loadBar._visible = true;
if (_root.loadBar.bar._xscale != 100) {
_root.loadBar.bar._xscale = 100;
}
_root.loadBar.info = "Loading Map Controller";
mapControl = new classes.environment.MapController(this);
}
function hCtrl() {
_global.gMapController = new classes.environment.MapControllerHome(this);
}
function spawn() {
trace("[Sequencer] ##### spawn #####");
if (!_global.isAltRoom) {
spawning = new classes.collectables.Spawn(this);
}
}
function npcSpawn() {
npc = new classes.npc.NPCGenarator(_global.scene, this);
}
function cleanupTown() {
if (sushi.me.session != -1) {
sushi.me.leaveSession();
}
if (sushi.connectionType != "") {
sushi.disconnectFromServer();
}
for (var _local3 in _global) {
delete _global[_local3];
}
loadMovieNum ("towns.swf", 0);
}
function avatar() {
trace("[Sequencer] ##### avatar #####");
_global.gAvMan = classes.avatar.AvatarManager.getAvatarManager();
_global.gAvMan.resetListeners();
_global.gAvMan.makeAllMembers();
_global.gAvMan.makeMe();
if (jumpFlag == true) {
var _local3 = SharedObject.getLocal("gloc");
}
nextSequence();
}
function destroySequence() {
delete gTime;
_global.gAvMan.removeAll();
spawning.destroy();
npc.destroy();
mapControl.destroy();
delete _global.gMapController;
sushiCon.destroy();
sushiSubCon.destroy();
var _local4 = 0;
while (_local4 < _global.gHomes.length) {
_global.gHomes[_local4].remove();
_local4++;
}
_global.gHomes = [];
delete _global.gAvMan;
delete spawning;
delete npc;
delete mapControl;
delete sushiCon;
delete sushiSubCon;
_global.gCanvas.unloadMovie();
sequence.destroy();
_root.loadBar.bar._xscale = 0;
delete sequence;
}
function updateUI() {
var _local3 = _global.myUserData[0];
var _local8 = _global.gaiaSessionID;
var _local7 = 100251 /* 0x01879B */;
var _local5 = 100426 /* 0x01884A */;
var _local6 = 100425 /* 0x018849 */;
var _local4 = _global.gsiMethod.queue(397, [_global.gaiaSessionID, _global.myUserData[0]], invGameData, this);
_global.gsiMethod.queue(311, [_global.gaiaSessionID, _local3, _local5], _local4);
_global.gsiMethod.queue(311, [_global.gaiaSessionID, _local3, _local7], _local4);
_global.gsiMethod.queue(311, [_global.gaiaSessionID, _local3, _local6], _local4);
_global.gsiMethod.send();
}
function invGameData(noErr, info, thisClass) {
_global.completeListing = new Array();
var _local3 = info[0].data;
var _local6 = _local3[0];
if (_local6 > 0) {
_root.ui_mc.uiArea.toyBag._visible = true;
}
_local3 = info[1].data;
var _local8 = _local3[0];
if (_local8 > 0) {
_root.ui_mc.uiArea.toyBag._visible = true;
}
_local3 = info[2].data;
var _local7 = _local3[0];
if (_local7 > 0) {
_root.ui_mc.uiArea.toyBag._visible = true;
}
_local3 = info[3].data;
var _local5 = _local3[0];
if (_local5 > 0) {
_root.ui_mc.uiArea.toyBag._visible = true;
}
}
function makeAutoConnection() {
_root.stream.destroySequence();
_global.connectionType = "auto";
_global.scene = "autoConnect";
loadSequence(_global.scene);
}
function goToDirectory() {
_global.uiCtrl.dirState();
}
var initTrain = new Array(classes.main.Sequencer.prototype.init, classes.main.Sequencer.prototype.player, classes.main.Sequencer.prototype.allowDomain, classes.main.Sequencer.prototype.gameEvent, classes.main.Sequencer.prototype.buildTrain, classes.main.Sequencer.prototype.gst, classes.main.Sequencer.prototype.mCtrl, classes.main.Sequencer.prototype.goPlay, classes.main.Sequencer.prototype.avatar, classes.main.Sequencer.prototype.npcSpawn, classes.main.Sequencer.prototype.autoScript, classes.main.Sequencer.prototype.updateUI);
var initAuto = new Array(classes.main.Sequencer.prototype.auto, classes.main.Sequencer.prototype.player, classes.main.Sequencer.prototype.map, classes.main.Sequencer.prototype.gameEvent, classes.main.Sequencer.prototype.buildTown, classes.main.Sequencer.prototype.buildTownHomes, classes.main.Sequencer.prototype.gst, classes.main.Sequencer.prototype.joinSushi, classes.main.Sequencer.prototype.mCtrl, classes.main.Sequencer.prototype.goPlay, classes.main.Sequencer.prototype.avatar, classes.main.Sequencer.prototype.spawn, classes.main.Sequencer.prototype.npcSpawn);
var toMap = new Array(classes.main.Sequencer.prototype.player, classes.main.Sequencer.prototype.map, classes.main.Sequencer.prototype.gameEvent, classes.main.Sequencer.prototype.buildTown, classes.main.Sequencer.prototype.buildTownHomes, classes.main.Sequencer.prototype.gst, classes.main.Sequencer.prototype.joinSushi, classes.main.Sequencer.prototype.mCtrl, classes.main.Sequencer.prototype.goPlay, classes.main.Sequencer.prototype.avatar, classes.main.Sequencer.prototype.spawn, classes.main.Sequencer.prototype.npcSpawn);
var initTown = new Array(classes.main.Sequencer.prototype.init, classes.main.Sequencer.prototype.player, classes.main.Sequencer.prototype.allowDomain, classes.main.Sequencer.prototype.gameEvent, classes.main.Sequencer.prototype.map, classes.main.Sequencer.prototype.buildTown, classes.main.Sequencer.prototype.buildTownHomes, classes.main.Sequencer.prototype.gst, classes.main.Sequencer.prototype.joinSushi, classes.main.Sequencer.prototype.mCtrl, classes.main.Sequencer.prototype.goPlay, classes.main.Sequencer.prototype.avatar, classes.main.Sequencer.prototype.spawn, classes.main.Sequencer.prototype.npcSpawn, classes.main.Sequencer.prototype.updateUI);
var initHome = new Array(classes.main.Sequencer.prototype.init, classes.main.Sequencer.prototype.player, classes.main.Sequencer.prototype.allowDomain, classes.main.Sequencer.prototype.gameEvent, classes.main.Sequencer.prototype.home, classes.main.Sequencer.prototype.map, classes.main.Sequencer.prototype.hCtrl, classes.main.Sequencer.prototype.buildHome, classes.main.Sequencer.prototype.gst, classes.main.Sequencer.prototype.joinSushi, classes.main.Sequencer.prototype.joinSubRoom, classes.main.Sequencer.prototype.goPlay, classes.main.Sequencer.prototype.avatar, classes.main.Sequencer.prototype.updateUI);
var toTrain = new Array(classes.main.Sequencer.prototype.cleanupTown);
var toHome = new Array(classes.main.Sequencer.prototype.player, classes.main.Sequencer.prototype.avatar, classes.main.Sequencer.prototype.gameEvent, classes.main.Sequencer.prototype.hCtrl, classes.main.Sequencer.prototype.buildHome, classes.main.Sequencer.prototype.gst, classes.main.Sequencer.prototype.joinSubRoom, classes.main.Sequencer.prototype.goPlay, classes.main.Sequencer.prototype.avatar);
var initGuest = new Array(classes.main.Sequencer.prototype.buildTrain, classes.main.Sequencer.prototype.gst, classes.main.Sequencer.prototype.goPlay, classes.main.Sequencer.prototype.mCtrl, classes.main.Sequencer.prototype.avatar, classes.main.Sequencer.prototype.npcSpawn);
}
Symbol 80 MovieClip [__Packages.classes.main.InitData] Frame 0
class classes.main.InitData
{
var parentClass, retry50, retry109, logging, keepAliveTracker, avatarServers, currentServer, pingTimer;
function InitData (pClass) {
parentClass = pClass;
retry50 = (retry109 = 0);
getInitData();
if (!_global.myToyManager) {
_global.myToyManager = classes.Toys.Toys.getInstance();
var _local3 = new classes.Toys.SoccerBall();
var _local7 = new classes.Toys.BeachBall();
var _local8 = new classes.Toys.WaterBalloon();
var _local11 = new classes.Toys.WaterGun();
var _local13 = new classes.Toys.Pee();
var _local12 = new classes.Toys.CandyBar();
var _local10 = new classes.Toys.Eggs();
var _local9 = new classes.Toys.ToiletPaper();
var _local5 = new classes.Toys.SnowBalls();
var _local6 = new classes.Toys.FireBall();
var _local4 = new classes.Toys.Cones();
_global.myToyManager.registerToyInstance("soccerBall", _local3, false, true);
_global.myToyManager.registerToyInstance("beachBall", _local7, false, true);
_global.myToyManager.registerToyInstance("cones", _local4, false, true);
_global.myToyManager.registerToyInstance("waterBalloon", _local8, false, true);
_global.myToyManager.registerToyInstance("waterGun", _local11, false, true);
_global.myToyManager.registerToyInstance("pee", _local13, false, true);
_global.myToyManager.registerToyInstance("candyBar", _local12, false, true);
_global.myToyManager.registerToyInstance("eggs", _local10, false, true);
_global.myToyManager.registerToyInstance("toiletPaper", _local9, false, true);
_global.myToyManager.registerToyInstance("snowBalls", _local5, false, true);
_global.myToyManager.registerToyInstance("fireBall", _local6, false, true);
} else {
_global.myToyManager.disableCurrentToy();
}
}
function getInitData() {
var _local3 = _global.gsiMethod.queue(50, [], initSeqData, this);
_global.gsiMethod.queue(109, [], _local3);
_global.gsiMethod.queue(10, ["avatar_cdn"], _local3);
_global.gsiMethod.queue(115, [], _local3);
_global.gsiMethod.send();
}
function guestData(user) {
_global.scene = "train";
_global.myUserData = [0, user, 0, 0, 1, -1, -1, -1, -1, 1];
parentClass.loadSequence("guest");
}
function initSeqData(noErr, info, thisClass) {
stop();
_root.loadBar.info = "";
_root.loadBar._visible = false;
if (((info[0].success == true) && (info[1].success == true)) && (info[2].success == true)) {
thisClass.retry50 = (thisClass.retry109 = 0);
var _local7 = info[0].data;
formatLevelColors(info[3].data);
if (_local7[1].length == 0) {
parentClass.errorMsg("50", "NA", "There are no Town servers to connect to.");
} else {
_global.serverList = info[0].data;
_global.gaiaSessionID = info[1].data;
_global.gsiMethod.invoke(2051, [_global.gaiaSessionID], questCallback, this);
_global.ignoreUserManager = new classes.main.IgnoreUserManager();
var _local8 = info[2].data;
thisClass.selectAvatarHost(_local8);
}
} else if (info[0].success == false) {
if (thisClass.retry50 <= 3) {
thisClass.getInitData();
} else {
parentClass.errorMsg("50", "Banned User", "Cannot load Town server listing.");
}
thisClass.retry50++;
} else if (info[1].success == false) {
var _local6 = info[1].data;
switch (_local6[0]) {
case "-3" :
case "-4" :
case "-7" :
logging = new classes.main.LogIn(thisClass);
break;
default :
if (thisClass.retry109 <= 3) {
thisClass.getInitData();
} else {
parentClass.errorMsg("109", _local6[0], _local6[1]);
}
thisClass.retry109++;
}
}
}
function questCallback(noErr, info, thisClass) {
keepAliveTracker = setInterval(this, "sessionUpdate", 120000, thisClass);
if (info[0] == "1") {
_global.isMiniAvatar = true;
} else {
_global.isMiniAvatar = false;
}
}
function sessionUpdate(refObject) {
_global.gsiMethod.invoke("107", [_global.gaiaSessionID], sessionKeepAlive_cb, this);
}
function sessionKeepAlive_cb(noErr, info, thisClass) {
if ((info[0] == -4) || (info[0] == "-4")) {
clearInterval(keepAliveTracker);
_global.sushi.disconnectFromServer();
parentClass.errorMsg("Session Expired", "Session Expired", "It appears as if your session has expired. Please try logging in again.");
}
}
function formatLevelColors(colors) {
var _local5 = colors.length;
var _local4 = new Array();
var _local2 = 0;
while (_local2 < _local5) {
if ((colors[_local2][1] == "#000000") || (colors[_local2][1] == undefined)) {
colors[_local2][1] = "0xFFFFFF";
} else {
colors[_local2][1] = "0x" + colors[_local2][1].slice(1, 7);
}
_local4[colors[_local2][0]] = [];
_local4[colors[_local2][0]].push(colors[_local2][1]);
_local2++;
}
_global.levelColors = _local4;
}
function loggedIn(user) {
delete logging;
((user == undefined) ? (getInitData()) : (guestData(user)));
}
function errorMsg(meth, errCode, errMsg) {
parentClass.errorMsg(meth, errCode, errMsg);
}
function selectAvatarHost(rawServerData) {
var _local8 = rawServerData.length;
var _local4 = new Array();
var _local5;
var _local3;
var _local6;
var _local7;
_local6 = 0;
while (_local6 < _local8) {
_local5 = rawServerData[_local6];
if (_local5[0] == "avatar") {
_local3 = parseInt(_local5[2]);
if (_local4[_local3] == undefined) {
_local4[_local3] = new Array();
}
_local4[_local3].push(new Array(_local5[1], _local5[3]));
}
_local6++;
}
avatarServers = new Array();
_local3 = 4;
while (_local3 > 0) {
while ((_local4[_local3].length != 0) && (_local4[_local3] != undefined)) {
_local7 = Math.floor(Math.random() * _local4[_local3].length);
avatarServers.push(_local4[_local3].splice(_local7, 1)[0]);
}
_local3--;
}
currentServer = -1;
_global.avatarHost = rawServerData[0][1];
parentClass.nextSequence();
}
function checkAvatarServers() {
_root.loadBar._visible = true;
if (_root.loadBar.bar._xscale != 100) {
_root.loadBar.bar._xscale = 100;
}
_root.loadBar.info = "Checking Avatar Servers";
testNextServer();
}
function testNextServer() {
var thisClass = this;
var _local5;
var _local4;
var _local3;
var avQty;
currentServer++;
if (currentServer < (avatarServers.length - 1)) {
_local3 = avatarServers[currentServer][0];
avQty = parseInt(avatarServers[currentServer][1]);
_root.loadBar.info = "Checking Avatar Server: " + _local3;
_local4 = new Object();
_local4.server = _local3;
_local4.avQty = avQty;
_local4.dead = false;
_local4.onLoadInit = function (target_mc) {
if (this.dead == false) {
clearInterval(thisClass.pingTimer);
thisClass.foundServer(this.server, this.avQty);
}
};
_local5 = new MovieClipLoader();
_local5.addListener(_local4);
_root.aDomain.createEmptyMovieClip(_local3, _root.aDomain.getNextHighestDepth());
_local5.loadClip((("http://" + _local3) + ".gaiaonline.com/pingMarker.swf?X=") + new Date().getTime(), _root.aDomain[_local3]);
pingTimer = setInterval(this, "healthCheck", 5000, _local4);
} else {
_local3 = avatarServers[avatarServers.length - 1][0];
avQty = parseInt(avatarServers[avatarServers.length - 1][1]);
foundServer(_local3, avQty);
}
}
function healthCheck(oldListener) {
clearInterval(pingTimer);
oldListener.dead = true;
testNextServer();
}
function foundServer(theServer, avMaxQty) {
_global.avatarHost = theServer;
_global.avMax = avMaxQty;
_root.loadBar.bar._xscale = 0;
_root.loadBar.info = "";
parentClass.nextSequence();
}
}
Symbol 81 MovieClip [__Packages.classes.main.LogIn] Frame 0
class classes.main.LogIn
{
var panel;
function LogIn () {
panelSetUp();
}
function panelSetUp(info) {
_root.loadBar._visible = false;
panel = _root.attachMovie("login", "login", 3333);
panel.btn_login.onRelease = function () {
var _local2 = "http://" + _root.websrv;
var _local3 = ((("javascript:if(opener){ window.close(); opener.location='" + _local2) + "';} else location='") + _local2) + "';";
getURL (_local3, "_parent");
};
}
}
Symbol 82 MovieClip [__Packages.classes.Toys.Toys] Frame 0
class classes.Toys.Toys extends MovieClip
{
static var instance;
var myConeArray, soccerBallIcon, beachBallIcon, coneIcon, GSC_REF, currentActivity, lastActivity, isCursorOverIcon, currentCrossHair, mouseListener;
function Toys () {
super();
}
static function getInstance() {
if (instance == undefined) {
instance = new classes.Toys.Toys();
}
return(instance);
}
function registerToyInstance(toyID, toyInstance, isLimited, hasCrossHairs) {
toyInstances[toyID] = {instance:toyInstance, isLimited:isLimited, hasCrossHairs:hasCrossHairs};
}
function initToyVars() {
myConeArray = [];
soccerBallIcon = _root.ui_mc.uiArea.soccerBall;
beachBallIcon = _root.ui_mc.uiArea.beachBall;
coneIcon = _root.ui_mc.uiArea.cones;
for (var _local3 in toyInstances) {
toyInstances[_local3].instance.initVars();
}
}
function setToyUI(toy, mcPath) {
toyInstances[toy].instance.setUI(mcPath);
}
function hideAllToys() {
disableCurrentToy();
}
function activateToy(gsc, actionInfo, type) {
GSC_REF = gsc;
toyInstances[type].instance.fireToy(gsc, actionInfo);
}
function isAvatarActive() {
return(_global.isAvatarBusy);
}
function setAvatarActive(isThrowing) {
_global.isAvatarBusy = isThrowing;
}
function setConeState(state, id) {
_global["doesHaveCone" + id] = state;
}
function hasCone(id) {
return(_global["doesHaveCone" + id]);
}
function setBallState(type, state, id) {
if (type.length) {
type = type.toLowerCase();
type[0] = type[0].toUpperCase();
}
_global[(("doesHave" + type) + "Ball") + id] = state;
}
function hasBall(type, id) {
if (type.length) {
type = type.toLowerCase();
type[0] = type[0].toUpperCase();
}
return(_global[(("doesHave" + type) + "Ball") + id]);
}
function killTheToy(avServerID) {
var _local2 = Number(avServerID);
toyInstances.waterGun.instance.killToy(avServerID);
}
function cleanUpToy() {
var _local3 = [_global.gAvMan.getMyAvatar().avServerID];
GSC_REF.killTheWaterGun(_local3);
toyInstances[currentActivity].instance.cleanUpToy(_global.gAvMan.getMyAvatar().avServerID);
}
function displayToyEvent(startX, startY, endX, endY, avAttack, type, myAvatar, myAvatarId, memberAvatarId, memberServerId, color, shape) {
var _local3 = _global.gAvMan.getMyAvatar().avServerID;
if (isToysDisabled && (_local3 != memberServerId)) {
return(undefined);
}
toyInstances[type].instance.displayEvent(startX, startY, endX, endY, avAttack, myAvatar, myAvatarId, memberAvatarId, color, shape);
}
function setActivityType(type) {
currentActivity = type;
}
function toyNotify(type) {
if (type == "cones") {
var _local3 = 0;
while (_local3 < myConeArray.length) {
var _local4 = [myConeArray[_local3].x, myConeArray[_local3].y, myConeArray[_local3].x, myConeArray[_local3].y, null, "cones", _global.gAvMan.getMyAvatar().avServerID, _global.gAvMan.getMyAvatar().avServerID];
GSC_REF.broadcastAvatarToy(_local4);
_local3++;
}
} else {
toyInstances[type].instance.initEvent();
}
}
function replaceMyCone(mc, x, y, avId) {
var _local2 = 0;
while (_local2 < myConeArray.length) {
if (myConeArray[_local2].mc == mc) {
myConeArray[_local2].x = x;
myConeArray[_local2].y = y;
}
_local2++;
}
}
function addToMyCones(mc, x, y, avId) {
myConeArray.push({mc:mc, x:x, y:y, id:avId});
}
function initToyEvent(type, var1, var2, var3) {
if (type == currentActivity) {
disableCurrentToy();
return(undefined);
}
setActivityType(type);
if ((type != "soccerBall") && (type != "beachBall")) {
setAvatarActive(true);
}
_global.snackStand.hideMenu();
toyInstances[type].instance.initEvent(var1, var2, var3);
if (toyInstances[currentActivity].isLimited) {
removeFromShopMenu(currentActivity);
}
}
function isAvail(type) {
var _local2 = 0;
while (_local2 < toysOnTray.length) {
if (toysOnTray[_local2] == type) {
var _local3 = toyInstances[type].instance.getRemainingShots();
if (_local3 <= 0) {
return(true);
}
return(false);
}
_local2++;
}
return(true);
}
function unlock(type) {
var _local3 = 0;
while (_local3 < toysOnTray.length) {
if (toysOnTray[_local3] == type) {
var _local5 = toyInstances[type].instance.getRemainingShots();
if (_local5 <= 0) {
reActivateToy(type);
}
return(false);
}
_local3++;
}
_global.uiCtrl.addToy(type);
toysOnTray.push(type);
return(true);
}
function reActivateToy(type) {
toyInstances[type].instance.reActivateThisToy();
}
function sendDisableToServer(type, swap, gsc, memberAvId, memberAvClip, isDisconnect) {
if (memberAvId != undefined) {
var _local4 = memberAvId;
var _local3 = memberAvClip;
} else {
var _local4 = _global.gAvMan.getMyAvatar().avServerID;
var _local3 = _global.gAvMan.getMyAvatar().avClip;
}
var _local6 = [null, null, null, null, _local3, type, null, "disable", _local4];
if ((!swap) && (!isDisconnect)) {
setAvatarActive(false);
}
if (type == "spiderWeb") {
if (GSC_REF == undefined) {
GSC_REF = gsc;
}
GSC_REF.broadcastAvatarToy(_local6);
} else {
toyInstances[type].instance.disableThisToy();
}
}
function disableMyToys(avId, avClip) {
if ((lastActivity == "spiderWeb") || (currentActivity == "spiderWeb")) {
sendDisableToServer(lastActivity, false, GSC_REF, avId, avClip);
}
}
function getActivityType() {
return(currentActivity);
}
function setOverIcon(isOver) {
isCursorOverIcon = isOver;
}
function isOverIcon() {
return(isCursorOverIcon);
}
function pauseToy() {
if (_global.isAvatarBusy && (toyInstances[currentActivity].hasCrossHairs)) {
Mouse.show();
toyInstances[currentActivity].instance.hideCrossHairs();
toyInstances[currentActivity].instance.setIsOutOfBounds(true);
setOverIcon(true);
}
}
function restartToy() {
if (_global.isAvatarBusy && (toyInstances[currentActivity].hasCrossHairs)) {
Mouse.hide();
toyInstances[currentActivity].instance.showCrossHairs();
toyInstances[currentActivity].instance.setIsOutOfBounds(false);
setOverIcon(false);
}
}
function disableToy(actionArray) {
var _local3 = actionArray[4];
var _local4 = actionArray[8];
var _local5 = actionArray[5];
toyInstances[_local5].instance.disableThisToy(_local3, _local4);
}
function disableCurrentToy() {
_global.snackStand.hideMenu();
if (currentActivity != undefined) {
sendDisableToServer(currentActivity, false);
lastActivity = currentActivity;
currentActivity = null;
}
}
function sitAvatarDown(avId) {
_global.gAvMan.getAvatar(avId).sitDown(0);
}
function standAvatarUp(avId) {
_global.gAvMan.getAvatar(avId).standUp(1);
}
function playMemberEmote(bub, emoteType, targetAvatar, isToy) {
_global.gAvMan.getAvatar(targetAvatar).emoteBubble.playEmote(bub, emoteType, isToy);
}
function rollOverMemberAvatar() {
toyInstances[currentActivity].instance.rollOverMemberAvatar();
}
function rollOutMemberAvatar() {
toyInstances[currentActivity].instance.rollOutMemberAvatar();
}
function removeFromShopMenu(type) {
var _local2 = 0;
while (_local2 < _global.snackMenuArray.length) {
if (_global.snackMenuArray[_local2].type == type) {
_global.snackMenuArray.splice(_local2, 1);
break;
}
_local2++;
}
}
function setToysDisabled(setToy) {
isToysDisabled = setToy;
}
function removeBalls(id) {
toyInstances.soccerBall.instance.removeThisBall(id);
toyInstances.beachBall.instance.removeThisBall(id);
}
function removeCones(id) {
toyInstances.cones.instance.removeTheseCones(id);
}
function enableCrossHairs(crossHairClip) {
currentCrossHair = crossHairClip;
mouseListener = new Object();
var _local4 = this;
mouseListener.isOut = false;
mouseListener.onMouseMove = function () {
crossHairClip._x = _global.gCanvas._xmouse;
crossHairClip._y = _global.gCanvas._ymouse;
if (_root._ymouse > 550) {
_global.myToyManager.pauseToy();
this.isOut = true;
} else if (this.isOut) {
_global.myToyManager.restartToy();
this.isOut = false;
}
};
Mouse.addListener(mouseListener);
showCrossHairs();
Mouse.hide();
}
function showCrossHairs() {
currentCrossHair._visible = true;
}
function hideCrossHairs() {
currentCrossHair._visible = false;
}
function removeCrossHairs() {
mouseListener.onMouseMove = null;
Mouse.show();
Mouse.removeListener(mouseListener);
toyInstances[currentActivity].instance.hideCrossHairs();
}
function biggerNum(num1, num2) {
if (num1 > num2) {
return(num1);
}
return(num2);
}
function randRange(minNum, maxNum) {
var _local1 = Math.ceil(Math.random() * ((maxNum - minNum) + 1)) + (minNum - 1);
return(_local1);
}
function outOfPool() {
toyInstances.pee.instance.killToy();
toyInstances.candyBar.instance.killToy();
soccerBallIcon.hotspot.enabled = true;
soccerBallIcon._alpha = 100;
beachBallIcon.hotspot.enabled = true;
beachBallIcon._alpha = 100;
}
function inPool() {
soccerBallIcon.hotspot.enabled = false;
soccerBallIcon._alpha = 50;
beachBallIcon.hotspot.enabled = false;
beachBallIcon._alpha = 50;
}
var toyInstances = {};
var isAvatarFlying = false;
var isToysDisabled = false;
var doesHaveBall = false;
var toysOnTray = new Array();
}
Symbol 83 MovieClip [__Packages.classes.Toys.SoccerBall] Frame 0
class classes.Toys.SoccerBall extends classes.Toys.Toys
{
var WORLD, COLLISION, POOL, collisionObjects, toyClip, GSC_REF, beaconClip, myAv, randRange, delayInitialBallInterval, collisionTestInterval, delayBoundaryBallInterval;
function SoccerBall () {
super();
}
function initVars() {
WORLD = _global.gCanvas;
COLLISION = _global.gCanvas.mask_canvas;
POOL = _global.gCanvas.clipping_canvas.pool;
collisionObjects = [];
toyClip = _global.gCanvas.clipping_canvas.soccerBallHolder;
GSC_REF = new classes.avatar.GameServerConnector();
beaconClip = _global.beaconClip;
}
function getNumbBalls() {
return(totalBalls);
}
function initEvent() {
var _local3 = _global.gAvMan.getMyAvatar().avServerID;
if (((!toyClip["ball" + _local3]) && (_local3 != undefined)) && (_local3 != "undefined")) {
if (totalBalls > MAX_NUM_BALLS) {
return(undefined);
}
var _local4 = toyClip.attachMovie("soccerBall_mc", "ball" + _local3, toyClip.getNextHighestDepth());
totalBalls++;
myAv = _global.gAvMan.getMyAvatar().avClip;
_local4.firstDrop = true;
_local4._x = myAv._x + randRange(30, 60);
_local4._y = myAv._y;
_local4._visible = false;
_local4.ballId = _local3;
startBallEvent(_local3);
_global.myToyManager.setBallState("soccer", true, _global.myUserData[1]);
var _local6 = [_local4._x, _local4._y, _local4._x, _local4._y, null, "soccerBall", _local3, _local4.ballId];
GSC_REF.broadcastAvatarToy(_local6);
} else {
var _local5 = toyClip["ball" + _local3];
_local5.firstDrop = false;
var _local6 = [_local5._x, _local5._y, _local5._x, _local5._y, null, "soccerBall", _local3, _local3];
GSC_REF.broadcastAvatarToy(_local6);
}
}
function highlightBall(id) {
if (toyClip["ball" + id]) {
clearInterval(this["ballIdentifierInterval" + id]);
beaconClip["myBeacon" + id].removeMovieClip();
var _local2 = beaconClip.attachMovie("beacon_mc", "myBeacon" + id, beaconClip.getNextHighestDepth());
_local2.thisClass = this;
_local2.onEnterFrame = function () {
this._x = this.thisClass.toyClip["ball" + id]._x;
this._y = this.thisClass.toyClip["ball" + id]._y;
};
}
}
function deleteBeacon(id) {
clearInterval(this["ballIdentifierInterval" + id]);
beaconClip["myBeacon" + id].removeMovieClip();
}
function startBallEvent(avId) {
avId = Number(avId);
var _local6 = _global.gAvMan.getMyAvatar().avServerID;
if (_local6 == avId) {
clearInterval(this["ballIdentifierInterval" + avId]);
this["ballIdentifierInterval" + avId] = setInterval(this, "highlightBall", BEACON_DELAY, avId);
}
toyClip["ball" + avId].thisClass = this;
toyClip["ball" + avId].onEnterFrame = function () {
if (this.ball.hotspot.hitTest(this.thisClass.myAv.avatarContainer.image.avParts.dropShadow)) {
var _local3 = _global.gAvMan.getMyAvatar();
var _local4 = _global.gAvMan.getMyAvatar().avServerID;
var _local8;
var _local5 = _global.gAvMan.getMyAvatar().gsc;
if (_local3.lastX == undefined) {
_local3.lastX = this.thisClass.myAv._x;
}
if (_local3.lastY == undefined) {
_local3.lastY = this.thisClass.myAv._y;
}
var _local7 = this.thisClass.randRange(-5, 5);
var _local6 = this.thisClass.randRange(-5, 5);
_local8 = [_local3.lastX, _local3.lastY, this.thisClass.toyClip["ball" + this.ballId]._x + _local7, (this.thisClass.toyClip["ball" + this.ballId]._y + 10) + _local6, null, "soccerBall", _local4, this.ballId];
_local5.broadcastAvatarToy(_local8);
this.onEnterFrame = null;
clearInterval(this.thisClass.delayInitialBallInterval);
this.thisClass.delayInitialBallInterval = setInterval(this.thisClass, "delayBallEvent", this.INITIAL_BALL_DELAY, this, _local4);
}
};
}
function displayEvent(startX, startY, xTarget, yTarget, targetClip, memberId, ballId) {
this["tween" + ballId].stop();
if (ballId == memberId) {
deleteBeacon(ballId);
}
toyClip["ball" + ballId]._x = xTarget;
toyClip["ball" + ballId]._y = yTarget;
if (((!toyClip["ball" + ballId]) && (ballId != "undefined")) && (ballId != undefined)) {
totalBalls++;
ballId = Number(ballId);
var _local3 = toyClip.attachMovie("soccerBall_mc", "ball" + ballId, toyClip.getNextHighestDepth());
_local3.firstDrop = true;
myAv = _global.gAvMan.getMyAvatar().avClip;
_local3._x = startX;
_local3._y = startY;
_local3._visible = false;
_local3.ballId = ballId;
clearInterval(delayInitialBallInterval);
delayInitialBallInterval = setInterval(this, "delayBallEvent", 1000, _local3, ballId);
}
bounceBall(startX, startY, xTarget, yTarget, ballId);
}
function bounceBall(firstX, firstY, lastX, lastY, ballId) {
if ((firstX == lastX) && (firstY == lastY)) {
var _local7 = true;
}
var _local8 = lastX - firstX;
var _local9 = lastY - firstY;
var _local4 = _local8 * 6;
var _local3 = _local9 * 5;
var _local10;
if (_local4 > 250) {
_local4 = 300;
} else if (_local4 < -300) {
_local4 = -300;
}
if (_local3 > 250) {
_local3 = 250;
} else if (_local3 < -250) {
_local3 = -250;
}
if (_local8 < 0) {
var _local6 = toyClip["ball" + ballId]._x + _local4;
toyClip["ball" + ballId].xDir = "left";
if (!toyClip["ball" + ballId].firstDrop) {
if (!_local7) {
toyClip["ball" + ballId].ball.innerBall.gotoAndPlay("left");
}
} else {
toyClip["ball" + ballId]._visible = true;
toyClip["ball" + ballId].ball.innerBall.gotoAndPlay("firstDrop");
toyClip["ball" + ballId].firstDrop = false;
}
_local10 = -1;
} else {
var _local6 = toyClip["ball" + ballId]._x + _local4;
toyClip["ball" + ballId].xDir = "right";
if (!toyClip["ball" + ballId].firstDrop) {
if (!_local7) {
toyClip["ball" + ballId].ball.innerBall.gotoAndPlay("right");
}
} else {
toyClip["ball" + ballId]._visible = true;
toyClip["ball" + ballId].ball.innerBall.gotoAndPlay("firstDrop");
toyClip["ball" + ballId].firstDrop = false;
}
_local10 = -1;
}
if (_local9 < 0) {
var _local5 = toyClip["ball" + ballId]._y + _local3;
toyClip["ball" + ballId].yDir = "up";
} else {
var _local5 = toyClip["ball" + ballId]._y + _local3;
toyClip["ball" + ballId].yDir = "down";
}
toyClip["ball" + ballId].lastX = _local6;
toyClip["ball" + ballId].lastY = _local5;
ballId = Number(ballId);
this["tween" + ballId] = new mx.transitions.TweenExtended(toyClip["ball" + ballId], ["_x", "_y"], mx.transitions.easing.Regular.easeOut, [toyClip["ball" + ballId]._x, toyClip["ball" + ballId]._y], [_local6, _local5], 2, true);
var thisClass = this;
this["tween" + ballId].onMotionFinished = function () {
this.obj.onEnterFrame = null;
this.obj.newMgr.onEnterFrame = null;
thisClass.startBallEvent(this.obj.ballId);
};
boundaryManager(ballId);
}
function boundaryManager(ballId) {
var _local2 = this["boundaryManagerClip" + ballId];
_local2 = toyClip["ball" + ballId].createEmptyMovieClip("newMgr", 200);
_local2.thisClass = this;
_local2.hitBoundary = false;
_local2.ballId = ballId;
_local2.ballClip = toyClip["ball" + ballId];
_local2.onEnterFrame = function () {
this.bounceBack = 50;
if (this.ballClip._x < this.thisClass.LEFT_BORDER) {
this.newTween.stop();
this.hitBoundary = true;
this.lastX = this.thisClass.LEFT_BORDER + this.bounceBack;
if (this.ballClip.yDir == "up") {
var _local2 = this.ballClip._y - this.bounceBack;
} else {
var _local2 = this.ballClip._y + this.bounceBack;
}
this.newTween = new mx.transitions.TweenExtended(this.ballClip, ["_x", "_y"], mx.transitions.easing.Regular.easeOut, [this.ballClip._x, this.ballClip._y], [this.lastX, _local2], 2, true);
}
if (this.ballClip._x > this.thisClass.RIGHT_BORDER) {
this.newTween.stop();
this.hitBoundary = true;
this.lastX = this.thisClass.RIGHT_BORDER - this.bounceBack;
if (this.ballClip.yDir == "up") {
var _local2 = this.ballClip._y - this.bounceBack;
} else {
var _local2 = this.ballClip._y + this.bounceBack;
}
this.newTween = new mx.transitions.TweenExtended(this.ballClip, ["_x", "_y"], mx.transitions.easing.Regular.easeOut, [this.ballClip._x, this.ballClip._y], [this.lastX, _local2], 2, true);
}
if (this.ballClip._y < this.thisClass.TOP_BORDER) {
this.newTween.stop();
this.hitBoundary = true;
this.lastY = this.thisClass.TOP_BORDER + this.bounceBack;
if (this.ballClip.xDir == "left") {
var lastX = (this.ballClip._x - this.bounceBack);
} else {
var lastX = (this.ballClip._x + this.bounceBack);
}
this.newTween = new mx.transitions.TweenExtended(this.ballClip, ["_x", "_y"], mx.transitions.easing.Regular.easeOut, [this.ballClip._x, this.ballClip._y], [lastX, this.lastY], 2, true);
}
if (this.ballClip._y > this.thisClass.BOTTOM_BORDER) {
this.newTween.stop();
this.hitBoundary = true;
this.lastY = this.thisClass.BOTTOM_BORDER - this.bounceBack;
if (this.ballClip.xDir == "left") {
var lastX = (this.ballClip._x - this.bounceBack);
} else {
var lastX = (this.ballClip._x + this.bounceBack);
}
this.newTween = new mx.transitions.TweenExtended(this.ballClip, ["_x", "_y"], mx.transitions.easing.Regular.easeOut, [this.ballClip._x, this.ballClip._y], [lastX, this.lastY], 2, true);
}
if (this.thisClass.COLLISION.hitTest(this.ballClip._x + this.thisClass.WORLD._x, this.ballClip._y + this.thisClass.WORLD._y, 1)) {
this.newTween.stop();
this.hitBoundary = true;
if (this.ballClip.xDir == "left") {
var lastX = (this.ballClip._x + 50);
} else {
var lastX = (this.ballClip._x - 50);
}
if (this.ballClip.yDir == "up") {
var _local2 = this.ballClip._y + 50;
} else {
var _local2 = this.ballClip._y - 50;
}
this.newTween = new mx.transitions.TweenExtended(this.ballClip, ["_x", "_y"], mx.transitions.easing.Regular.easeOut, [this.ballClip._x, this.ballClip._y], [lastX, _local2], 2, true);
}
if (this.thisClass.POOL.poolClip.ballHitMarker.hitTest(this.ballClip._x + this.thisClass.WORLD._x, this.ballClip._y + this.thisClass.WORLD._y, 1)) {
this.newTween.stop();
this.hitBoundary = true;
if (this.ballClip.xDir == "left") {
var lastX = (this.ballClip._x + 50);
} else {
var lastX = (this.ballClip._x - 50);
}
if (this.ballClip.yDir == "up") {
var _local2 = this.ballClip._y + 50;
} else {
var _local2 = this.ballClip._y - 50;
}
this.newTween = new mx.transitions.TweenExtended(this.ballClip, ["_x", "_y"], mx.transitions.easing.Regular.easeOut, [this.ballClip._x, this.ballClip._y], [lastX, _local2], 2, true);
}
if (this.hitBoundary) {
clearInterval(this.thisClass.delayInitialBallInterval);
this.hitBoundary = false;
this.thisClass[this["tween" + ballId]].stop();
this.onEnterFrame = null;
clearInterval(this.thisClass.delayBoundaryBallInterval);
this.thisClass.delayBoundaryBallInterval = setInterval(this.thisClass, "collisionTest", this.BOUNDARY_DELAY, this, this.ballId);
clearInterval(this.thisClass.collisionTestInterval);
this.thisClass.collisionTestInterval = setInterval(this.thisClass, "collisionTest", 3000, this.ballClip);
}
};
}
function collisionTest(clip) {
clearInterval(collisionTestInterval);
if (COLLISION.hitTest(clip._x + WORLD._x, clip._y + WORLD._y, 1)) {
clip._y = clip._y + 275;
}
}
function delayBallEvent(mc, ballId) {
clearInterval(delayInitialBallInterval);
clearInterval(delayBoundaryBallInterval);
startBallEvent(ballId);
}
function removeThisBall(id) {
toyClip["ball" + id].removeMovieClip();
}
var BOUNCE = 0.3;
var LEFT_BORDER = 120;
var RIGHT_BORDER = 900;
var TOP_BORDER = 120;
var BOTTOM_BORDER = 900;
var BEACON_DELAY = 5000;
var INITIAL_BALL_DELAY = 0;
var BOUNDARY_DELAY = 0;
var MAX_NUM_BALLS = 5;
var bounceUp = 5;
var bounceDown = 5;
var numBounces = 0;
var totalBalls = 0;
var isBallVisible = false;
}
Symbol 84 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 85 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 86 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 87 MovieClip [__Packages.classes.avatar.GameServerConnector] Frame 0
class classes.avatar.GameServerConnector
{
var sushi;
function GameServerConnector () {
sushi = _global.sushi;
}
function myID() {
return(sushi.me.id);
}
function myRoom() {
return(sushi.me.room);
}
function getMemberIDs(room) {
return(sushi.room.getMemberIDs(room));
}
function getMemberData(id) {
var _local2 = sushi.member.getData(id);
trace((("[GSC] getMemberData(" + id) + "): ") + _local2.join(","));
return(_local2);
}
function getMemberAvUrl(avServerID, index) {
if (avServerID == getMySID()) {
return(_global.myUserData[2]);
}
var _local3 = getMemberData(avServerID);
if (_local3 && (_local3[index] != undefined)) {
return(_local3[index]);
}
return(null);
}
function getName(avServerID) {
if (avServerID == getMySID()) {
return(_global.myUserData[1]);
}
var _local3 = getMemberData(avServerID);
var _local4 = 5;
if (_local3 && (_local3[_local4] != undefined)) {
return(_local3[_local4]);
}
return(null);
}
function resetListeners(avClass) {
sushi.event.onNewMember.removeListener(avClass);
sushi.event.onMemberChangesRoom.removeListener(avClass);
sushi.event.onRemoveMember.removeListener(avClass);
sushi.event.onMemberKicked.removeListener(avClass);
sushi.event.onNewMember.addListener(avClass);
sushi.event.onMemberChangesRoom.addListener(avClass);
sushi.event.onRemoveMember.addListener(avClass);
sushi.event.onMemberKicked.addListener(avClass);
}
function removeListeners(removeFrom) {
sushi.event.onUserMessage.removeListener(removeFrom);
}
function regEvent(id, regTo) {
sushi.member.registerEvents(id, regTo);
}
function deregEvent(id) {
sushi.member.deregisterEvents(id);
}
function update(from, to, avPose) {
var _local4 = _global.myUserData[1];
var _local7 = _global.myUserData[2];
var _local6 = _global.myUserData[3];
var _local5 = _global.myUserData[0];
var _local3 = [from, to, avPose, "", _local7, _local4, _local5, "", _local6, (_global.isMiniAvatar ? "1" : "0"), ""];
trace("[GSC] update: " + _local3.join(","));
sushi.me.update(_local3);
}
function sendUserMessage(messageID, routingID, target, array) {
sushi.sendUserMessage(messageID.toString(), routingID, target, array);
}
function getUserMessage(dataArray) {
trace("[GSC] getUserMessage: " + dataArray.join(","));
return(dataArray);
}
function silentUpdate(xyData) {
}
function broadcastAvatarToy(actionInfo) {
sendUserMessage(3000, 1, parseInt(_global.sushi.me.room), actionInfo);
}
function killTheWaterGun(actionInfo) {
sendUserMessage(3001, 1, parseInt(_global.sushi.me.room), actionInfo);
}
function getMySID() {
return((((myID() == undefined) || (myID() == -1)) ? 0 : (myID())));
}
}
Symbol 88 MovieClip [__Packages.mx.transitions.TweenExtended] Frame 0
class mx.transitions.TweenExtended extends mx.transitions.Tween
{
var aChange, obj, aProps, aBegin, __set__duration, useSeconds, func, point1, point2, _listeners, addListener, start, _time, __get__time, _duration, _aPos, broadcastMessage, looping;
function TweenExtended (target, props, easeFunc, strt, end, dur, useSecs, p1, p2) {
super();
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
aChange = [];
obj = target;
aProps = props;
aBegin = strt;
position = (copyArray(strt));
__set__duration(dur);
useSeconds = useSecs;
if (easeFunc) {
func = easeFunc;
}
finish = (end);
point1 = p1;
point2 = p2;
_listeners = [];
addListener(this);
start();
}
function update() {
position = (getPosition(_time));
}
function continueTo(fin, dur) {
var _local2 = 0;
while (_local2 < aProps.length) {
aBegin[_local2] = position[_local2];
_local2++;
}
finish = (fin);
if (dur != undefined) {
__set__duration(dur);
}
start();
}
function yoyo() {
var _local2 = copyArray(aBegin);
continueTo(_local2, __get__time());
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
var _local5 = [];
var _local2 = 0;
while (_local2 < aProps.length) {
var _local4 = Number(aBegin[_local2]);
var _local3 = Number(aChange[_local2]);
if ((point1 == undefined) && (point2 == undefined)) {
_local5[_local2] = func(t, _local4, _local3, _duration);
} else if ((point1 != undefined) && (point2 == undefined)) {
_local5[_local2] = func(t, _local4, _local3, _duration, point1);
} else if ((point1 != undefined) && (point2 != undefined)) {
_local5[_local2] = func(t, _local4, _local3, _duration, point1, point2);
}
_local2++;
}
return(_local5);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
var _local2 = 0;
while (_local2 < aProps.length) {
obj[aProps[_local2]] = (_aPos[_local2] = p[_local2]);
_local2++;
}
broadcastMessage("onMotionChanged", this, p);
updateAfterEvent();
}
function set finish(f) {
var _local2 = 0;
while (_local2 < aProps.length) {
aChange[_local2] = f[_local2] - aBegin[_local2];
_local2++;
}
//return(finish);
}
function get finish() {
var _local3 = [];
var _local2 = 0;
while (_local2 < aProps.length) {
_local3[_local2] = aBegin[_local2] + aChange[_local2];
_local2++;
}
return(_local3);
}
function set loop(b) {
looping = b;
//return(loop);
}
function get loop() {
return(looping);
}
function copyArray(arr) {
var _local3 = [];
if (arr.length == 0) {
for (var _local1 in arr) {
_local3[_local1] = arr[_local1];
}
}
var _local1 = 0;
while (_local1 < arr.length) {
_local3[_local1] = arr[_local1];
_local1++;
}
return(_local3);
}
function toString() {
return(("[" + className) + "]");
}
var className = "TweenExtended";
static var version = "1.0.6";
}
Symbol 89 MovieClip [__Packages.mx.transitions.easing.Regular] Frame 0
class mx.transitions.easing.Regular
{
function Regular () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * t) * t) + b);
}
t--;
return((((-c) / 2) * ((t * (t - 2)) - 1)) + b);
}
static var version = "1.1.0.52";
}
Symbol 90 MovieClip [__Packages.classes.Toys.BeachBall] Frame 0
class classes.Toys.BeachBall extends classes.Toys.Toys
{
var WORLD, COLLISION, POOL, collisionObjects, toyClip, GSC_REF, beaconClip, myAv, randRange, delayInitialBallInterval, collisionTestInterval, delayBoundaryBallInterval;
function BeachBall () {
super();
}
function initVars() {
WORLD = _global.gCanvas;
COLLISION = _global.gCanvas.mask_canvas;
POOL = _global.gCanvas.clipping_canvas.pool;
collisionObjects = [];
toyClip = _global.gCanvas.clipping_canvas.beachBallHolder;
GSC_REF = new classes.avatar.GameServerConnector();
beaconClip = _global.beaconClip;
}
function getNumbBalls() {
return(totalBalls);
}
function initEvent() {
var _local3 = _global.gAvMan.getMyAvatar().avServerID;
if (((!toyClip["ball" + _local3]) && (_local3 != undefined)) && (_local3 != "undefined")) {
if (totalBalls > MAX_NUM_BALLS) {
return(undefined);
}
var _local4 = toyClip.attachMovie("beachBall_mc", "ball" + _local3, toyClip.getNextHighestDepth());
totalBalls++;
myAv = _global.gAvMan.getMyAvatar().avClip;
_local4.firstDrop = true;
_local4._x = myAv._x + randRange(30, 60);
_local4._y = myAv._y;
_local4._visible = false;
_local4.ballId = _local3;
startBallEvent(_local3);
_global.myToyManager.setBallState("beach", true, _global.myUserData[1]);
var _local6 = [_local4._x, _local4._y, _local4._x, _local4._y, null, "beachBall", _local3, _local4.ballId];
GSC_REF.broadcastAvatarToy(_local6);
} else {
var _local5 = toyClip["ball" + _local3];
_local5.firstDrop = false;
var _local6 = [_local5._x, _local5._y, _local5._x, _local5._y, null, "beachBall", _local3, _local3];
GSC_REF.broadcastAvatarToy(_local6);
}
}
function highlightBall(id) {
if (toyClip["ball" + id]) {
clearInterval(this["ballIdentifierInterval" + id]);
beaconClip["myBeacon" + id].removeMovieClip();
var _local2 = beaconClip.attachMovie("beacon_mc", "myBeacon" + id, beaconClip.getNextHighestDepth());
_local2.thisClass = this;
_local2.onEnterFrame = function () {
this._x = this.thisClass.toyClip["ball" + id]._x;
this._y = this.thisClass.toyClip["ball" + id]._y;
};
}
}
function deleteBeacon(id) {
clearInterval(this["ballIdentifierInterval" + id]);
beaconClip["myBeacon" + id].removeMovieClip();
}
function startBallEvent(avId) {
avId = Number(avId);
var _local6 = _global.gAvMan.getMyAvatar().avServerID;
if (_local6 == avId) {
clearInterval(this["ballIdentifierInterval" + avId]);
this["ballIdentifierInterval" + avId] = setInterval(this, "highlightBall", BEACON_DELAY, avId);
}
toyClip["ball" + avId].thisClass = this;
toyClip["ball" + avId].onEnterFrame = function () {
if (this.ball.hotspot.hitTest(this.thisClass.myAv.avatarContainer.image.avParts.dropShadow)) {
var _local3 = _global.gAvMan.getMyAvatar();
var _local4 = _global.gAvMan.getMyAvatar().avServerID;
var _local8;
var _local5 = _global.gAvMan.getMyAvatar().gsc;
if (_local3.lastX == undefined) {
_local3.lastX = this.thisClass.myAv._x;
}
if (_local3.lastY == undefined) {
_local3.lastY = this.thisClass.myAv._y;
}
var _local7 = this.thisClass.randRange(-5, 5);
var _local6 = this.thisClass.randRange(-5, 5);
_local8 = [_local3.lastX, _local3.lastY, this.thisClass.toyClip["ball" + this.ballId]._x + _local7, (this.thisClass.toyClip["ball" + this.ballId]._y + 10) + _local6, null, "beachBall", _local4, this.ballId];
_local5.broadcastAvatarToy(_local8);
this.onEnterFrame = null;
clearInterval(this.thisClass.delayInitialBallInterval);
this.thisClass.delayInitialBallInterval = setInterval(this.thisClass, "delayBallEvent", this.INITIAL_BALL_DELAY, this, _local4);
}
};
}
function displayEvent(startX, startY, xTarget, yTarget, targetClip, memberId, ballId) {
this["tween" + ballId].stop();
if (ballId == memberId) {
deleteBeacon(ballId);
}
toyClip["ball" + ballId]._x = xTarget;
toyClip["ball" + ballId]._y = yTarget;
if (((!toyClip["ball" + ballId]) && (ballId != "undefined")) && (ballId != undefined)) {
totalBalls++;
ballId = Number(ballId);
var _local3 = toyClip.attachMovie("beachBall_mc", "ball" + ballId, toyClip.getNextHighestDepth());
_local3.firstDrop = true;
myAv = _global.gAvMan.getMyAvatar().avClip;
_local3._x = startX;
_local3._y = startY;
_local3._visible = false;
_local3.ballId = ballId;
clearInterval(delayInitialBallInterval);
delayInitialBallInterval = setInterval(this, "delayBallEvent", 1000, _local3, ballId);
}
bounceBall(startX, startY, xTarget, yTarget, ballId);
}
function bounceBall(firstX, firstY, lastX, lastY, ballId) {
if ((firstX == lastX) && (firstY == lastY)) {
var _local7 = true;
}
var _local8 = lastX - firstX;
var _local9 = lastY - firstY;
var _local4 = _local8 * 6;
var _local3 = _local9 * 5;
var _local10;
if (_local4 > 250) {
_local4 = 300;
} else if (_local4 < -300) {
_local4 = -300;
}
if (_local3 > 250) {
_local3 = 250;
} else if (_local3 < -250) {
_local3 = -250;
}
if (_local8 < 0) {
var _local6 = toyClip["ball" + ballId]._x + _local4;
toyClip["ball" + ballId].xDir = "left";
if (!toyClip["ball" + ballId].firstDrop) {
if (!_local7) {
toyClip["ball" + ballId].ball.innerBall.gotoAndPlay("left");
}
} else {
toyClip["ball" + ballId]._visible = true;
toyClip["ball" + ballId].ball.innerBall.gotoAndPlay("firstDrop");
toyClip["ball" + ballId].firstDrop = false;
}
_local10 = -1;
} else {
var _local6 = toyClip["ball" + ballId]._x + _local4;
toyClip["ball" + ballId].xDir = "right";
if (!toyClip["ball" + ballId].firstDrop) {
if (!_local7) {
toyClip["ball" + ballId].ball.innerBall.gotoAndPlay("right");
}
} else {
toyClip["ball" + ballId]._visible = true;
toyClip["ball" + ballId].ball.innerBall.gotoAndPlay("firstDrop");
toyClip["ball" + ballId].firstDrop = false;
}
_local10 = -1;
}
if (_local9 < 0) {
var _local5 = toyClip["ball" + ballId]._y + _local3;
toyClip["ball" + ballId].yDir = "up";
} else {
var _local5 = toyClip["ball" + ballId]._y + _local3;
toyClip["ball" + ballId].yDir = "down";
}
toyClip["ball" + ballId].lastX = _local6;
toyClip["ball" + ballId].lastY = _local5;
ballId = Number(ballId);
this["tween" + ballId] = new mx.transitions.TweenExtended(toyClip["ball" + ballId], ["_x", "_y"], mx.transitions.easing.Regular.easeOut, [toyClip["ball" + ballId]._x, toyClip["ball" + ballId]._y], [_local6, _local5], 2, true);
var thisClass = this;
this["tween" + ballId].onMotionFinished = function () {
this.obj.onEnterFrame = null;
this.obj.newMgr.onEnterFrame = null;
thisClass.startBallEvent(this.obj.ballId);
};
boundaryManager(ballId);
}
function boundaryManager(ballId) {
var _local2 = this["boundaryManagerClip" + ballId];
_local2 = toyClip["ball" + ballId].createEmptyMovieClip("newMgr", 200);
_local2.thisClass = this;
_local2.hitBoundary = false;
_local2.ballId = ballId;
_local2.ballClip = toyClip["ball" + ballId];
_local2.onEnterFrame = function () {
this.bounceBack = 50;
if (this.ballClip._x < this.thisClass.LEFT_BORDER) {
this.newTween.stop();
this.hitBoundary = true;
this.lastX = this.thisClass.LEFT_BORDER + this.bounceBack;
if (this.ballClip.yDir == "up") {
var _local2 = this.ballClip._y - this.bounceBack;
} else {
var _local2 = this.ballClip._y + this.bounceBack;
}
this.newTween = new mx.transitions.TweenExtended(this.ballClip, ["_x", "_y"], mx.transitions.easing.Regular.easeOut, [this.ballClip._x, this.ballClip._y], [this.lastX, _local2], 2, true);
}
if (this.ballClip._x > this.thisClass.RIGHT_BORDER) {
this.newTween.stop();
this.hitBoundary = true;
this.lastX = this.thisClass.RIGHT_BORDER - this.bounceBack;
if (this.ballClip.yDir == "up") {
var _local2 = this.ballClip._y - this.bounceBack;
} else {
var _local2 = this.ballClip._y + this.bounceBack;
}
this.newTween = new mx.transitions.TweenExtended(this.ballClip, ["_x", "_y"], mx.transitions.easing.Regular.easeOut, [this.ballClip._x, this.ballClip._y], [this.lastX, _local2], 2, true);
}
if (this.ballClip._y < this.thisClass.TOP_BORDER) {
this.newTween.stop();
this.hitBoundary = true;
this.lastY = this.thisClass.TOP_BORDER + this.bounceBack;
if (this.ballClip.xDir == "left") {
var lastX = (this.ballClip._x - this.bounceBack);
} else {
var lastX = (this.ballClip._x + this.bounceBack);
}
this.newTween = new mx.transitions.TweenExtended(this.ballClip, ["_x", "_y"], mx.transitions.easing.Regular.easeOut, [this.ballClip._x, this.ballClip._y], [lastX, this.lastY], 2, true);
}
if (this.ballClip._y > this.thisClass.BOTTOM_BORDER) {
this.newTween.stop();
this.hitBoundary = true;
this.lastY = this.thisClass.BOTTOM_BORDER - this.bounceBack;
if (this.ballClip.xDir == "left") {
var lastX = (this.ballClip._x - this.bounceBack);
} else {
var lastX = (this.ballClip._x + this.bounceBack);
}
this.newTween = new mx.transitions.TweenExtended(this.ballClip, ["_x", "_y"], mx.transitions.easing.Regular.easeOut, [this.ballClip._x, this.ballClip._y], [lastX, this.lastY], 2, true);
}
if (this.thisClass.COLLISION.hitTest(this.ballClip._x + this.thisClass.WORLD._x, this.ballClip._y + this.thisClass.WORLD._y, 1)) {
this.newTween.stop();
this.hitBoundary = true;
if (this.ballClip.xDir == "left") {
var lastX = (this.ballClip._x + 50);
} else {
var lastX = (this.ballClip._x - 50);
}
if (this.ballClip.yDir == "up") {
var _local2 = this.ballClip._y + 50;
} else {
var _local2 = this.ballClip._y - 50;
}
this.newTween = new mx.transitions.TweenExtended(this.ballClip, ["_x", "_y"], mx.transitions.easing.Regular.easeOut, [this.ballClip._x, this.ballClip._y], [lastX, _local2], 2, true);
}
if (this.thisClass.POOL.poolClip.ballHitMarker.hitTest(this.ballClip._x + this.thisClass.WORLD._x, this.ballClip._y + this.thisClass.WORLD._y, 1)) {
this.newTween.stop();
this.hitBoundary = true;
if (this.ballClip.xDir == "left") {
var lastX = (this.ballClip._x + 50);
} else {
var lastX = (this.ballClip._x - 50);
}
if (this.ballClip.yDir == "up") {
var _local2 = this.ballClip._y + 50;
} else {
var _local2 = this.ballClip._y - 50;
}
this.newTween = new mx.transitions.TweenExtended(this.ballClip, ["_x", "_y"], mx.transitions.easing.Regular.easeOut, [this.ballClip._x, this.ballClip._y], [lastX, _local2], 2, true);
}
if (this.hitBoundary) {
clearInterval(this.thisClass.delayInitialBallInterval);
this.hitBoundary = false;
this.thisClass[this["tween" + ballId]].stop();
this.onEnterFrame = null;
clearInterval(this.thisClass.delayBoundaryBallInterval);
this.thisClass.delayBoundaryBallInterval = setInterval(this.thisClass, "collisionTest", this.BOUNDARY_DELAY, this, this.ballId);
clearInterval(this.thisClass.collisionTestInterval);
this.thisClass.collisionTestInterval = setInterval(this.thisClass, "collisionTest", 3000, this.ballClip);
}
};
}
function collisionTest(clip) {
clearInterval(collisionTestInterval);
if (COLLISION.hitTest(clip._x + WORLD._x, clip._y + WORLD._y, 1)) {
clip._y = clip._y + 275;
}
}
function delayBallEvent(mc, ballId) {
clearInterval(delayInitialBallInterval);
clearInterval(delayBoundaryBallInterval);
startBallEvent(ballId);
}
function removeThisBall(id) {
toyClip["ball" + id].removeMovieClip();
}
var BOUNCE = 0.3;
var LEFT_BORDER = 120;
var RIGHT_BORDER = 900;
var TOP_BORDER = 120;
var BOTTOM_BORDER = 900;
var BEACON_DELAY = 5000;
var INITIAL_BALL_DELAY = 0;
var BOUNDARY_DELAY = 0;
var MAX_NUM_BALLS = 5;
var bounceUp = 5;
var bounceDown = 5;
var numBounces = 0;
var totalBalls = 0;
var isBallVisible = false;
}
Symbol 91 MovieClip [__Packages.classes.Toys.WaterBalloon] Frame 0
class classes.Toys.WaterBalloon extends classes.Toys.Toys
{
var WATERGUN_HOLDER, coolMeter, crossHairClip, trayIconMc, randRange, isToyKilled;
function WaterBalloon () {
super();
}
function initVars() {
allowed = _global.POOL;
WATERGUN_HOLDER = _global.waterBalloonClip;
coolMeter = undefined;
}
function initEvent(av, gsc, avId) {
crossHairClip = WATERGUN_HOLDER.crossHairClip;
if (coolMeter == undefined) {
coolMeter = crossHairClip.attachMovie("meter", "meter", crossHairClip.getNextHighestDepth());
coolMeter._width = 50;
coolMeter._x = -23;
coolMeter._y = 25;
}
trayIconMc.gotoAndStop("on");
_global.myToyManager.enableCrossHairs(crossHairClip);
_global.myToyManager.setAvatarActive(true);
}
function setUI(trayMc) {
trayIconMc = trayMc;
trayIconMc.toy_txt.text = throwsRemaining;
}
function fireToy(gsc, actionInfo) {
trace(" TESTING THROW " + this["isThrowOn" + memberId]);
var memberId = actionInfo[7];
if (this["isThrowOn" + memberId] == undefined) {
this["isThrowOn" + memberId] = true;
}
if (!this["isThrowOn" + memberId]) {
return(undefined);
}
actionInfo[8] = randRange(0, 3);
actionInfo[9] = randRange(0, 3);
turnOffMeter(memberId);
isToyKilled = false;
isOn = true;
if (!isOutOfBounds) {
gsc.broadcastAvatarToy(actionInfo);
}
}
function turnOffMeter(memberId) {
this["isThrowOn" + memberId] = false;
crossHairClip.meter.power.gotoAndPlay("on");
this["intervalId" + memberId] = setInterval(this, "resetThrow", 2225, memberId);
}
function resetThrow(id) {
clearInterval(this["intervalId" + id]);
this["isThrowOn" + id] = true;
this["balloonInstances" + id] = undefined;
}
function setIsOutOfBounds(boundsBoolean) {
isOutOfBounds = boundsBoolean;
}
function displayEvent(startX, startY, endX, endY, avAttack, thisAvatar, thisAvatarID, null, color, shape) {
if (allowed) {
if (this["balloonInstances" + thisAvatarID] == undefined) {
this["balloonInstances" + thisAvatarID] = 1;
} else {
this["balloonInstances" + thisAvatarID] = this["balloonInstances" + thisAvatarID] + 1;
}
if (thisAvatarID == _global.gAvMan.getMyAvatar().avServerID) {
trayIconMc.toy_txt.text = (throwsRemaining = throwsRemaining - 1);
}
if (throwsRemaining <= 0) {
disableThisToy();
_global.uiCtrl.disableToy("waterBalloon");
_global.balloonActive = false;
}
if (this["balloonInstances" + thisAvatarID] <= START_THROWS) {
WATERGUN_HOLDER.newBalloon(startX, startY + 15, endX, endY, color, shape);
}
}
}
function disableThisToy() {
trayIconMc.gotoAndStop("off");
_global.myToyManager.removeCrossHairs();
_global.myToyManager.setAvatarActive(false);
_global.myToyManager.setActivityType(null);
}
function reActivateThisToy() {
throwsRemaining = START_THROWS;
trayIconMc.toy_txt.text = throwsRemaining;
_global.uiCtrl.enableToy("waterBalloon");
}
function getRemainingShots() {
return(throwsRemaining);
}
function hideCrossHairs() {
crossHairClip._visible = false;
}
function showCrossHairs() {
crossHairClip._visible = true;
}
var START_THROWS = 10;
var throwsRemaining = classes.Toys.WaterBalloon.prototype.START_THROWS;
var isOn = false;
var isOutOfBounds = false;
var allowed = false;
}
Symbol 92 MovieClip [__Packages.classes.Toys.WaterGun] Frame 0
class classes.Toys.WaterGun extends classes.Toys.Toys
{
var WATERGUN_HOLDER, coolMeter, trayIconMc, crossHairClip, isToyKilled;
function WaterGun () {
super();
}
function initVars() {
allowed = _global.POOL;
WATERGUN_HOLDER = _global.waterGunClip;
coolMeter = undefined;
}
function setUI(trayMc) {
trayIconMc = trayMc;
trayIconMc.toy_txt.text = throwsRemaining;
}
function initEvent(av, gsc, avId) {
crossHairClip = WATERGUN_HOLDER.crossHairClip;
if (coolMeter == undefined) {
coolMeter = crossHairClip.attachMovie("meter", "meter", crossHairClip.getNextHighestDepth());
coolMeter._width = 50;
coolMeter._x = -23;
coolMeter._y = 25;
}
trayIconMc.gotoAndStop("on");
_global.myToyManager.enableCrossHairs(crossHairClip);
_global.myToyManager.setAvatarActive(true);
}
function setIsOutOfBounds(boundsBoolean) {
isOutOfBounds = boundsBoolean;
}
function fireToy(gsc, actionInfo) {
var _local2 = actionInfo[7];
if (this["isThrowOn" + _local2] == undefined) {
this["isThrowOn" + _local2] = true;
}
if (!this["isThrowOn" + _local2]) {
return(undefined);
}
turnOffMeter(_local2);
isToyKilled = false;
isOn = true;
if (!isOutOfBounds) {
gsc.broadcastAvatarToy(actionInfo);
}
}
function turnOffMeter(memberId) {
this["isThrowOn" + memberId] = false;
crossHairClip.meter.power.gotoAndPlay("on");
this["intervalId" + memberId] = setInterval(this, "resetThrow", 2225, memberId);
}
function resetThrow(id) {
clearInterval(this["intervalId" + id]);
this["isThrowOn" + id] = true;
this["gunInstances" + id] = undefined;
}
function disableThisToy() {
trayIconMc.gotoAndStop("off");
_global.myToyManager.removeCrossHairs();
_global.myToyManager.setAvatarActive(false);
_global.myToyManager.setActivityType(null);
}
function displayEvent(startX, startY, endX, endY, avAttack, thisAvatar, thisAvatarID) {
if (allowed) {
if (this["gunInstances" + thisAvatarID] == undefined) {
this["gunInstances" + thisAvatarID] = 1;
} else {
this["gunInstances" + thisAvatarID] = this["gunInstances" + thisAvatarID] + 1;
}
if (this["gunInstances" + thisAvatarID] > START_THROWS) {
return(undefined);
}
if (thisAvatarID == _global.gAvMan.getMyAvatar().avServerID) {
trayIconMc.toy_txt.text = (throwsRemaining = throwsRemaining - 1);
}
if (throwsRemaining <= 0) {
disableThisToy();
_global.uiCtrl.disableToy("waterGun");
}
WATERGUN_HOLDER.newSquirt(startX, startY, endX, endY);
}
}
function reActivateThisToy() {
throwsRemaining = START_THROWS;
trayIconMc.toy_txt.text = throwsRemaining;
_global.uiCtrl.enableToy("waterGun");
}
function getRemainingShots() {
return(throwsRemaining);
}
function hideCrossHairs() {
crossHairClip._visible = false;
}
function showCrossHairs() {
crossHairClip._visible = true;
}
var START_THROWS = 30;
var throwsRemaining = classes.Toys.WaterGun.prototype.START_THROWS;
var isOutOfBounds = false;
var isOn = false;
var allowed = false;
}
Symbol 93 MovieClip [__Packages.classes.Toys.Pee] Frame 0
class classes.Toys.Pee extends classes.Toys.Toys
{
function Pee () {
super();
}
function initVars() {
}
function fireToy(gsc, actionInfo) {
gsc.broadcastAvatarToy(actionInfo);
}
function displayEvent(startX, startY, xTarget, yTarget, targetClip, myAvatar, null, targetId) {
trace("displayEvent: PEE");
myAvatar = eval (myAvatar);
myAvatar.avatarContainer.image.attachMovie("backPee", "backPee", 3);
myAvatar.avatarContainer.image.attachMovie("frontPee", "frontPee", 21);
trace("MYA V " + myAvatar);
}
function killToy() {
_global.gAvMan.getMyAvatar().avClip.avatarContainer.image.backPee.removeMovieClip();
_global.gAvMan.getMyAvatar().avClip.avatarContainer.image.frontPee.removeMovieClip();
}
}
Symbol 94 MovieClip [__Packages.classes.Toys.CandyBar] Frame 0
class classes.Toys.CandyBar extends classes.Toys.Toys
{
var randRange;
function CandyBar () {
super();
}
function initVars() {
}
function fireToy(gsc, actionInfo) {
gsc.broadcastAvatarToy(actionInfo);
}
function displayEvent(startX, startY, xTarget, yTarget, targetClip, myAvatar, null, targetId) {
myAvatar = eval (myAvatar);
var newCandyBar = myAvatar.avatarContainer.image.attachMovie("candyBar", "candyBar", 40);
var randDir = dirArray[randRange(0, 1)];
newCandyBar.gotoAndPlay(randDir);
newCandyBar._xscale = (newCandyBar._yscale = 25);
}
function killToy() {
_global.gAvMan.getMyAvatar().avClip.avatarContainer.image.candyBar.removeMovieClip();
}
var dirArray = ["left", "right"];
}
Symbol 95 MovieClip [__Packages.classes.Toys.Eggs] Frame 0
class classes.Toys.Eggs extends classes.Toys.Toys
{
var EGG_HOLDER, coolMeter, crossHairClip, trayIconMc, randRange, isToyKilled;
function Eggs () {
super();
}
function initVars() {
allowed = Boolean(parseInt(_global.eventID) == _global.EVENT_HALLOWEEN);
EGG_HOLDER = _global.eggClip;
coolMeter = undefined;
}
function initEvent(av, gsc, avId) {
crossHairClip = EGG_HOLDER.crossHairClip;
if (coolMeter == undefined) {
coolMeter = crossHairClip.attachMovie("meter", "meter", crossHairClip.getNextHighestDepth());
coolMeter._width = 50;
coolMeter._x = -23;
coolMeter._y = 25;
}
trayIconMc.gotoAndStop("on");
_global.myToyManager.enableCrossHairs(crossHairClip);
_global.myToyManager.setAvatarActive(true);
}
function setUI(trayMc) {
trayIconMc = trayMc;
trayIconMc.toy_txt.text = throwsRemaining;
}
function fireToy(gsc, actionInfo) {
trace(" TESTING THROW " + this["isThrowOn" + memberId]);
var memberId = actionInfo[7];
if (this["isThrowOn" + memberId] == undefined) {
this["isThrowOn" + memberId] = true;
}
if (!this["isThrowOn" + memberId]) {
return(undefined);
}
actionInfo[8] = randRange(0, 3);
actionInfo[9] = randRange(0, 3);
turnOffMeter(memberId);
isToyKilled = false;
isOn = true;
if (!isOutOfBounds) {
gsc.broadcastAvatarToy(actionInfo);
}
}
function turnOffMeter(memberId) {
this["isThrowOn" + memberId] = false;
crossHairClip.meter.power.gotoAndPlay("on");
this["intervalId" + memberId] = setInterval(this, "resetThrow", 2225, memberId);
}
function resetThrow(id) {
clearInterval(this["intervalId" + id]);
this["isThrowOn" + id] = true;
this["eggInstances" + id] = undefined;
}
function setIsOutOfBounds(boundsBoolean) {
isOutOfBounds = boundsBoolean;
}
function displayEvent(startX, startY, endX, endY, avAttack, thisAvatar, thisAvatarID, null, color, shape) {
if (allowed) {
if (parseInt(_global.eventID) == _global.EVENT_HALLOWEEN) {
if (this["eggInstances" + thisAvatarID] == undefined) {
this["eggInstances" + thisAvatarID] = 1;
} else {
this["eggInstances" + thisAvatarID] = this["eggInstances" + thisAvatarID] + 1;
}
if (this["eggInstances" + thisAvatarID] > START_THROWS) {
return(undefined);
}
if (thisAvatarID == _global.gAvMan.getMyAvatar().avServerID) {
trayIconMc.toy_txt.text = (throwsRemaining = throwsRemaining - 1);
}
if (throwsRemaining <= 0) {
disableThisToy();
_global.uiCtrl.disableToy("eggs");
_global.balloonActive = false;
}
EGG_HOLDER.tossEgg(startX, startY + 15, endX, endY, color, shape);
}
}
}
function disableThisToy() {
trayIconMc.gotoAndStop("off");
_global.myToyManager.removeCrossHairs();
_global.myToyManager.setAvatarActive(false);
_global.myToyManager.setActivityType(null);
}
function reActivateThisToy() {
throwsRemaining = START_THROWS;
trayIconMc.toy_txt.text = throwsRemaining;
_global.uiCtrl.enableToy("eggs");
}
function getRemainingShots() {
return(throwsRemaining);
}
function hideCrossHairs() {
crossHairClip._visible = false;
}
function showCrossHairs() {
crossHairClip._visible = true;
}
var START_THROWS = 10;
var throwsRemaining = classes.Toys.Eggs.prototype.START_THROWS;
var isOn = false;
var isOutOfBounds = false;
var allowed = false;
}
Symbol 96 MovieClip [__Packages.classes.Toys.ToiletPaper] Frame 0
class classes.Toys.ToiletPaper extends classes.Toys.Toys
{
var TOILETPAPER_HOLDER, coolMeter, crossHairClip, trayIconMc, randRange, isToyKilled;
function ToiletPaper () {
super();
}
function initVars() {
allowed = Boolean(parseInt(_global.eventID) == _global.EVENT_HALLOWEEN);
TOILETPAPER_HOLDER = _global.toiletPaperClip;
coolMeter = undefined;
}
function initEvent(av, gsc, avId) {
crossHairClip = TOILETPAPER_HOLDER.crossHairClip;
if (coolMeter == undefined) {
coolMeter = crossHairClip.attachMovie("meter", "meter", crossHairClip.getNextHighestDepth());
coolMeter._width = 50;
coolMeter._x = -23;
coolMeter._y = 25;
}
trayIconMc.gotoAndStop("on");
_global.myToyManager.enableCrossHairs(crossHairClip);
_global.myToyManager.setAvatarActive(true);
}
function setUI(trayMc) {
trayIconMc = trayMc;
trayIconMc.toy_txt.text = throwsRemaining;
}
function fireToy(gsc, actionInfo) {
trace(" TESTING THROW " + this["isThrowOn" + memberId]);
var memberId = actionInfo[7];
if (this["isThrowOn" + memberId] == undefined) {
this["isThrowOn" + memberId] = true;
}
if (!this["isThrowOn" + memberId]) {
return(undefined);
}
actionInfo[8] = randRange(0, 3);
actionInfo[9] = randRange(0, 3);
turnOffMeter(memberId);
isToyKilled = false;
isOn = true;
if (!isOutOfBounds) {
gsc.broadcastAvatarToy(actionInfo);
}
}
function turnOffMeter(memberId) {
this["isThrowOn" + memberId] = false;
crossHairClip.meter.power.gotoAndPlay("on");
this["intervalId" + memberId] = setInterval(this, "resetThrow", 2225, memberId);
}
function resetThrow(id) {
clearInterval(this["intervalId" + id]);
this["isThrowOn" + id] = true;
this["tpInstances" + id] = undefined;
}
function setIsOutOfBounds(boundsBoolean) {
isOutOfBounds = boundsBoolean;
}
function displayEvent(startX, startY, endX, endY, avAttack, thisAvatar, thisAvatarID, null, color, shape) {
if (allowed) {
if (this["tpInstances" + thisAvatarID] == undefined) {
this["tpInstances" + thisAvatarID] = 1;
} else {
this["tpInstances" + thisAvatarID] = this["tpInstances" + thisAvatarID] + 1;
}
if (this["tpInstances" + thisAvatarID] > START_THROWS) {
return(undefined);
}
if (thisAvatarID == _global.gAvMan.getMyAvatar().avServerID) {
trayIconMc.toy_txt.text = (throwsRemaining = throwsRemaining - 1);
}
if (throwsRemaining <= 0) {
disableThisToy();
_global.uiCtrl.disableToy("toiletPaper");
_global.balloonActive = false;
}
TOILETPAPER_HOLDER.startToiletPaper(startX, startY + 15, endX, endY, color, shape);
}
}
function disableThisToy() {
trayIconMc.gotoAndStop("off");
_global.myToyManager.removeCrossHairs();
_global.myToyManager.setAvatarActive(false);
_global.myToyManager.setActivityType(null);
}
function reActivateThisToy() {
throwsRemaining = START_THROWS;
trayIconMc.toy_txt.text = throwsRemaining;
_global.uiCtrl.enableToy("toiletPaper");
}
function getRemainingShots() {
return(throwsRemaining);
}
function hideCrossHairs() {
crossHairClip._visible = false;
}
function showCrossHairs() {
crossHairClip._visible = true;
}
var START_THROWS = 10;
var throwsRemaining = classes.Toys.ToiletPaper.prototype.START_THROWS;
var isOn = false;
var isOutOfBounds = false;
var allowed = false;
}
Symbol 97 MovieClip [__Packages.classes.Toys.SnowBalls] Frame 0
class classes.Toys.SnowBalls extends classes.Toys.Toys
{
var SNOWBALL_HOLDER, coolMeter, crossHairClip, trayIconMc, randRange, isToyKilled;
function SnowBalls () {
super();
}
function initVars() {
var _local3 = parseInt(_global.eventID);
allowed = (_local3 == _global.EVENT_XMAS) || (_local3 == _global.EVENT_WINTER);
SNOWBALL_HOLDER = _global.snowBallClip;
coolMeter = undefined;
}
function initEvent(av, gsc, avId) {
crossHairClip = SNOWBALL_HOLDER.crossHairClip;
if (coolMeter == undefined) {
coolMeter = crossHairClip.attachMovie("meter", "meter", crossHairClip.getNextHighestDepth());
coolMeter._width = 50;
coolMeter._x = -23;
coolMeter._y = 25;
}
trayIconMc.gotoAndStop("on");
_global.myToyManager.enableCrossHairs(crossHairClip);
_global.myToyManager.setAvatarActive(true);
}
function setUI(trayMc) {
trayIconMc = trayMc;
trayIconMc.toy_txt.text = throwsRemaining;
}
function fireToy(gsc, actionInfo) {
trace(" TESTING THROW " + this["isThrowOn" + memberId]);
var memberId = actionInfo[7];
if (this["isThrowOn" + memberId] == undefined) {
this["isThrowOn" + memberId] = true;
}
if (!this["isThrowOn" + memberId]) {
return(undefined);
}
actionInfo[8] = randRange(0, 3);
actionInfo[9] = randRange(0, 3);
turnOffMeter(memberId);
isToyKilled = false;
isOn = true;
if (!isOutOfBounds) {
gsc.broadcastAvatarToy(actionInfo);
}
}
function turnOffMeter(memberId) {
this["isThrowOn" + memberId] = false;
crossHairClip.meter.power.gotoAndPlay("on");
this["intervalId" + memberId] = setInterval(this, "resetThrow", 2225, memberId);
}
function resetThrow(id) {
clearInterval(this["intervalId" + id]);
this["isThrowOn" + id] = true;
this["ballInstances" + id] = undefined;
}
function setIsOutOfBounds(boundsBoolean) {
isOutOfBounds = boundsBoolean;
}
function displayEvent(startX, startY, endX, endY, avAttack, thisAvatar, thisAvatarID, null, color, shape) {
if (allowed) {
if (this["ballInstances" + thisAvatarID] == undefined) {
this["ballInstances" + thisAvatarID] = 1;
} else {
this["ballInstances" + thisAvatarID] = this["ballInstances" + thisAvatarID] + 1;
}
if (this["ballInstances" + thisAvatarID] > START_THROWS) {
return(undefined);
}
if (thisAvatarID == _global.gAvMan.getMyAvatar().avServerID) {
trayIconMc.toy_txt.text = (throwsRemaining = throwsRemaining - 1);
}
if (throwsRemaining <= 0) {
disableThisToy();
_global.uiCtrl.disableToy("snowBalls");
}
SNOWBALL_HOLDER.fireSnowBall(startX, startY + 15, endX, endY, color, shape);
}
}
function disableThisToy() {
trayIconMc.gotoAndStop("off");
_global.myToyManager.removeCrossHairs();
_global.myToyManager.setAvatarActive(false);
_global.myToyManager.setActivityType(null);
}
function reActivateThisToy() {
throwsRemaining = START_THROWS;
trayIconMc.toy_txt.text = throwsRemaining;
_global.uiCtrl.enableToy("snowBalls");
}
function getRemainingShots() {
return(throwsRemaining);
}
function hideCrossHairs() {
crossHairClip._visible = false;
}
function showCrossHairs() {
crossHairClip._visible = true;
}
var START_THROWS = 40;
var throwsRemaining = classes.Toys.SnowBalls.prototype.START_THROWS;
var isOn = false;
var isOutOfBounds = false;
var allowed = false;
}
Symbol 98 MovieClip [__Packages.classes.Toys.FireBall] Frame 0
class classes.Toys.FireBall extends classes.Toys.Toys
{
var FIREBALL_HOLDER, coolMeter, crossHairClip, trayIconMc, randRange, isToyKilled;
function FireBall () {
super();
}
function initVars() {
var _local3 = parseInt(_global.eventID);
FIREBALL_HOLDER = _global.fireBallClip;
coolMeter = undefined;
}
function initEvent(av, gsc, avId) {
crossHairClip = FIREBALL_HOLDER.crossHairClip;
if (coolMeter == undefined) {
coolMeter = crossHairClip.attachMovie("meter", "meter", crossHairClip.getNextHighestDepth());
coolMeter._width = 50;
coolMeter._x = -23;
coolMeter._y = 25;
}
trayIconMc.gotoAndStop("on");
_global.myToyManager.enableCrossHairs(crossHairClip);
_global.myToyManager.setAvatarActive(true);
}
function setUI(trayMc) {
trayIconMc = trayMc;
}
function fireToy(gsc, actionInfo) {
trace(" TESTING THROW " + this["isThrowOn" + memberId]);
var memberId = actionInfo[7];
if (this["isThrowOn" + memberId] == undefined) {
this["isThrowOn" + memberId] = true;
}
if (!this["isThrowOn" + memberId]) {
return(undefined);
}
actionInfo[8] = randRange(0, 3);
actionInfo[9] = randRange(0, 3);
turnOffMeter(memberId);
isToyKilled = false;
isOn = true;
if (!isOutOfBounds) {
_global.gAvMan.getMyAvatar().activateAvatarAction(actionInfo);
}
}
function turnOffMeter(memberId) {
this["isThrowOn" + memberId] = false;
crossHairClip.meter.power.gotoAndPlay("on");
this["intervalId" + memberId] = setInterval(this, "resetThrow", 2225, memberId);
}
function resetThrow(id) {
clearInterval(this["intervalId" + id]);
this["isThrowOn" + id] = true;
}
function setIsOutOfBounds(boundsBoolean) {
isOutOfBounds = boundsBoolean;
}
function displayEvent(startX, startY, endX, endY, avAttack, thisAvatar, thisAvatarID, null, color, shape) {
FIREBALL_HOLDER.fireFireBall(startX, startY + 15, endX, endY, setFire);
}
function setFire() {
if (_global.targetAvatar) {
_global.targetAvatar.ignoreUserAnimation();
}
}
function disableThisToy() {
trayIconMc.gotoAndStop("off");
_global.myToyManager.removeCrossHairs();
_global.myToyManager.setAvatarActive(false);
_global.myToyManager.setActivityType(null);
}
function reActivateThisToy() {
_global.uiCtrl.enableToy("fireBall");
}
function getRemainingShots() {
return(100);
}
function hideCrossHairs() {
crossHairClip._visible = false;
}
function showCrossHairs() {
crossHairClip._visible = true;
}
function rollOverMemberAvatar() {
crossHairClip._alpha = 100;
}
function rollOutMemberAvatar() {
crossHairClip._alpha = 100;
}
var isOn = false;
var isOutOfBounds = false;
}
Symbol 99 MovieClip [__Packages.classes.Toys.Cones] Frame 0
class classes.Toys.Cones extends classes.Toys.Toys
{
var CONES_HOLDER, coolMeter, crossHairClip, trayIconMc, randRange, isToyKilled;
function Cones () {
super();
}
function initVars() {
coneArray = [];
CONES_HOLDER = _global.conesClip;
coolMeter = undefined;
}
function initEvent(av, gsc, avId) {
trace("CONES TEST INIT EVENT");
crossHairClip = CONES_HOLDER.crossHairClip;
trayIconMc.gotoAndStop("on");
_global.myToyManager.enableCrossHairs(crossHairClip);
_global.myToyManager.setAvatarActive(true);
}
function setUI(trayMc) {
trayIconMc = trayMc;
trayIconMc.toy_txt.text = throwsRemaining;
}
function fireToy(gsc, actionInfo) {
var _local3 = actionInfo[7];
actionInfo[8] = randRange(0, 3);
actionInfo[9] = randRange(0, 3);
turnOffMeter(_local3);
isToyKilled = false;
isOn = true;
if (!isOutOfBounds) {
gsc.broadcastAvatarToy(actionInfo);
}
}
function turnOffMeter(memberId) {
this["isThrowOn" + memberId] = false;
crossHairClip.meter.power.gotoAndPlay("on");
this["intervalId" + memberId] = setInterval(this, "resetThrow", 2225, memberId);
}
function resetThrow(id) {
clearInterval(this["intervalId" + id]);
this["isThrowOn" + id] = true;
}
function setIsOutOfBounds(boundsBoolean) {
isOutOfBounds = boundsBoolean;
}
function displayEvent(mc, isMove, endX, endY, null, thisAvatar, thisAvatarID, var1, coneClip) {
var mcLoc = eval (coneClip);
if (typeof(mcLoc) == "movieclip") {
mcLoc._x = endX;
mcLoc._y = endY;
_global.myToyManager.replaceMyCone(mcLoc, endX, endY, thisAvatarID);
var instance = coneClip.split("_")[3];
trace("UPDATE CONE " + instance);
updateConeArray(thisAvatarID, endX, endY, instance);
return(undefined);
}
if (this["coneInstances" + thisAvatarID] == undefined) {
this["coneInstances" + thisAvatarID] = 1;
} else {
this["coneInstances" + thisAvatarID] = this["coneInstances" + thisAvatarID] + 1;
}
if ((this["coneInstances" + thisAvatarID] > START_THROWS) || (coneArray.length > MAX_CONES)) {
return(undefined);
}
var i = 0;
while (i < coneArray.length) {
trace("SAME CONE TEST" + endX);
trace("SAME CONE TEST" + coneArray[i].x);
if (((thisAvatarID == coneArray[i].id) && (endX == coneArray[i].x)) && (endY == coneArray[i].y)) {
trace("SAME CONE FOUND");
return(undefined);
}
i++;
}
if (thisAvatarID == _global.gAvMan.getMyAvatar().avServerID) {
trayIconMc.toy_txt.text = (throwsRemaining = throwsRemaining - 1);
var isMyCone = true;
}
var newCone = CONES_HOLDER.dropCone(endX, endY, thisAvatarID, this["coneInstances" + thisAvatarID], isMyCone);
coneArray.push({id:thisAvatarID, x:endX, y:endY, instance:this["coneInstances" + thisAvatarID]});
if (isMyCone) {
_global.myToyManager.setConeState(true, _global.myUserData[1]);
_global.myToyManager.addToMyCones(newCone, endX, endY, thisAvatarID);
if (throwsRemaining <= 0) {
disableThisToy();
_global.uiCtrl.disableToy("cones");
_global.balloonActive = false;
}
}
}
function updateConeArray(id, x, y, instance) {
var _local2 = 0;
while (_local2 < coneArray.length) {
trace("UPDATE CONE ARRAY " + instance);
trace("UPDATE CONE ARRAY " + coneArray[_local2].instance);
if ((coneArray[_local2].id == id) && (coneArray[_local2].instance == instance)) {
coneArray[_local2].x = x;
coneArray[_local2].y = y;
}
_local2++;
}
}
function disableThisToy() {
trayIconMc.gotoAndStop("off");
_global.myToyManager.removeCrossHairs();
_global.myToyManager.setAvatarActive(false);
_global.myToyManager.setActivityType(null);
}
function reActivateThisToy() {
throwsRemaining = START_THROWS;
trayIconMc.toy_txt.text = throwsRemaining;
_global.uiCtrl.enableToy("cones");
}
function getRemainingShots() {
return(throwsRemaining);
}
function hideCrossHairs() {
crossHairClip._visible = false;
}
function showCrossHairs() {
crossHairClip._visible = true;
}
function removeTheseCones(id) {
for (var _local3 in CONES_HOLDER) {
if (_local3.indexOf(id) != -1) {
CONES_HOLDER[_local3].removeMovieClip();
}
}
}
var START_THROWS = 4;
var throwsRemaining = classes.Toys.Cones.prototype.START_THROWS;
var isOn = false;
var isOutOfBounds = false;
var MAX_CONES = 16;
var coneArray = [];
}
Symbol 100 MovieClip [__Packages.classes.main.IgnoreUserManager] Frame 0
class classes.main.IgnoreUserManager
{
var ignoredUsers;
function IgnoreUserManager () {
ignoredUsers = [];
getIgnoredUsers();
}
function getIgnoredUsers() {
ignoredUsers = [];
_global.gsiMethod.invoke(132, [_global.gaiaSessionID], ignoreUsersReceived, this);
}
function ignoreUsersReceived(noErr, info) {
var _local2 = 0;
while (_local2 < info.length) {
ignoredUsers.push({gaiaID:info[_local2], serverID:""});
_local2++;
}
}
function isUserIgnoredByGaiaID(gaiaServerID, avServerID) {
var _local3 = activeIgnoredUsers.length;
var _local2 = 0;
while (_local2 < _local3) {
if (gaiaServerID == activeIgnoredUsers[_local2].gaiaID) {
activeIgnoredUsers[_local2].serverID = avServerID;
return(true);
}
_local2++;
}
return(false);
}
function shouldIgnoreUser(gaiaServerID, avServerID) {
var _local7 = ignoredUsers.length;
var _local2 = 0;
while (_local2 < _local7) {
if (gaiaServerID == ignoredUsers[_local2].gaiaID) {
trace("[IUM] user to ignore: " + gaiaServerID);
ignoredUsers[_local2].serverID = avServerID;
activeIgnoredUsers.push({gaiaID:gaiaServerID, serverID:avServerID});
updateIgnoredAvatar(avServerID, 20);
return(true);
}
_local2++;
}
return(false);
}
function isUserIgnoredByServerID(avServerID) {
var _local3 = activeIgnoredUsers.length;
var _local2 = 0;
while (_local2 < _local3) {
if (avServerID == activeIgnoredUsers[_local2].serverID) {
return(true);
}
_local2++;
}
return(false);
}
function resetIgnoreData() {
activeIgnoredUsers = [];
getIgnoredUsers();
}
function addUserToIgnoreList(gaiaServerID, avServerID) {
_global.gsiMethod.invoke(114, ["ignore", gaiaServerID, _global.gaiaSessionID], addUserReceived, this);
activeIgnoredUsers.push({gaiaID:gaiaServerID, serverID:avServerID});
updateIgnoredAvatar(avServerID, 20);
}
function removeUserIgnoreList(gaiaServerID, avServerID) {
removeUserReceived(gaiaServerID, avServerID);
_global.gsiMethod.invoke(114, ["unignore", gaiaServerID, _global.gaiaSessionID], removeUserReceived, this);
updateIgnoredAvatar(avServerID, 100);
var _local3 = 0;
while (_local3 < activeIgnoredUsers.length) {
if (activeIgnoredUsers[_local3].gaiaID == gaiaServerID) {
activeIgnoredUsers.splice(_local3, 1);
return(undefined);
}
_local3++;
}
}
function removeUserReceived(noErr, info) {
getIgnoredUsers();
}
function addUserReceived(noErr, info) {
getIgnoredUsers();
}
function updateIgnoredAvatar(avID, alpha) {
_global.gAvMan.getAvatar(avID).avClip._alpha = alpha;
}
var activeIgnoredUsers = [];
}
Symbol 101 MovieClip [__Packages.classes.main.PlayerData] Frame 0
class classes.main.PlayerData
{
var parentClass, retry107, retry112, retry113, logging;
function PlayerData (pClass) {
parentClass = pClass;
retry107 = (retry112 = (retry113 = 0));
getUserData();
}
function getUserData() {
var _local3 = _global.gsiMethod.queue(112, ["towns"], userData, this);
_global.gsiMethod.invoke(107, [_global.gaiaSessionID], _local3);
}
function getGold() {
_global.gsiMethod.invoke(113, [_global.gaiaSessionID], goldData, this);
}
function userData(noErr, info, thisClass) {
if ((info[0].success == true) && (info[1].success == true)) {
thisClass.retry107 = (thisClass.retry112 = 0);
_global.eventID = info[0].data;
trace("[PlayerData] _global.eventID " + _global.eventID);
if (_global.eventID == _global.EVENT_SUMMER) {
_global.POOL = true;
}
_global.myUserData = info[1].data;
thisClass.getGold();
} else if (info[1].success == false) {
var _local5 = info[1].data;
switch (_local5[0]) {
case "-2" :
if (thisClass.retry107 <= 3) {
thisClass.getUserData();
} else {
parentClass.errorMsg("107", _local5[0], _local5[1]);
}
thisClass.retry107++;
break;
case "-3" :
case "-4" :
case "-7" :
logging = new classes.main.LogIn();
break;
default :
if (thisClass.retry107 <= 3) {
thisClass.getUserData();
}
parentClass.errorMsg("107", _local5[0], _local5[1]);
thisClass.retry107++;
}
} else if (info[0].success == false) {
var _local5 = info[0].data;
switch (_local5[0]) {
case "0" :
thisClass.retry107 = (thisClass.retry112 = 0);
_global.eventID = info[0].data;
trace("[PlayerData] _global.eventID " + _global.eventID);
if (_global.eventID == _global.EVENT_SUMMER) {
_global.POOL = true;
}
_global.myUserData = info[1].data;
thisClass.getGold();
break;
default :
if (thisClass.retry112 <= 3) {
thisClass.getUserData();
}
parentClass.errorMsg("112", _local5[0], _local5[1]);
thisClass.retry112++;
}
}
}
function goldData(noErr, info, thisClass) {
_root.loadBar.info = "";
_root.loadBar._visible = false;
if (noErr == true) {
thisClass.retry113 = 0;
_global.myGold = info;
parentClass.nextSequence();
} else {
if (thisClass.retry113 <= 3) {
thisClass.getGold();
}
parentClass.errorMsg("113", info[0], info[1]);
thisClass.retry113++;
}
}
}
Symbol 102 MovieClip [__Packages.classes.main.EventData] Frame 0
class classes.main.EventData
{
var parentClass, retry;
function EventData (pClass) {
parentClass = pClass;
retry = 0;
whichEvent();
}
function whichEvent() {
switch (parseInt(_global.eventID)) {
case _global.EVENT_HALLOWEEN :
trace("[EventData] HALLOWEEN");
getHalloweenData();
break;
case _global.EVENT_XMAS :
trace("[EventData] CHRISTMAS");
getChristmasData();
break;
default :
parentClass.nextSequence();
}
}
function getChristmasData() {
var _local4 = _global.gsiMethod.queue(365, [8, _global.gaiaSessionID, 0], eventDataResult, this);
var _local3 = _global.jumpZip;
if (_local3 == undefined) {
_local3 = 51001000 /* 0x30A36A8 */;
}
_global.gsiMethod.invoke(366, [_local3, 8, _global.gaiaSessionID], _local4);
}
function getHalloweenData() {
var _local4 = _global.gsiMethod.queue(365, [7, _global.gaiaSessionID, 0], eventDataHalloweenResult, this);
var _local3 = _global.jumpZip;
if (_local3 == undefined) {
_local3 = 51001000 /* 0x30A36A8 */;
}
_global.gsiMethod.invoke(366, [_local3, 7, _global.gaiaSessionID], _local4);
}
function eventDataHalloweenResult(noErr, info, thisClass) {
thisClass.retry = 0;
_global.eventData = info[1].data;
trace("[EventData] CANDIES: " + _global.eventData);
var _local5 = info[0].data;
var _local4 = _local5[0];
var _local6 = Number(_local5[1]);
if (parseInt(_local4) >= _local6) {
_local4 = "Max";
} else {
_local4 = (_local4 + "/") + _local6;
}
_root.ui_mc.mapInfo.eventHalloweenInv.qty.text = _local4;
parentClass.nextSequence();
}
function eventDataResult(noErr, info, thisClass) {
thisClass.retry = 0;
_global.eventData = info[1].data;
_global.eventQty = info[0].data;
parentClass.nextSequence();
}
}
Symbol 103 MovieClip [__Packages.classes.controllers.JumpController] Frame 0
class classes.controllers.JumpController
{
var jumpModel;
function JumpController () {
jumpModel = classes.model.JumpModel.getInstance();
}
function setStart(x, y) {
jumpModel.startX = x;
jumpModel.startY = y;
}
function setJumpFlag(val) {
jumpModel.jumpFlag = val;
}
function rememberStart(x, y) {
jumpModel.rememberStart(x, y);
}
}
Symbol 104 MovieClip [__Packages.classes.model.JumpModel] Frame 0
class classes.model.JumpModel
{
static var instance;
function JumpModel () {
}
static function getInstance() {
if (instance == null) {
instance = new classes.model.JumpModel();
}
return(instance);
}
function rememberStart(x, y) {
var _local1 = SharedObject.getLocal("gloc");
_local1.data.xx = x;
_local1.data.yy = y;
_local1.flush();
}
var jumpFlag = false;
var startX = 0;
var startY = 0;
}
Symbol 105 MovieClip [__Packages.classes.main.MapData] Frame 0
class classes.main.MapData
{
var parentClass;
function MapData (pClass) {
parentClass = pClass;
getMapData();
}
function getMapData() {
trace("[MapData] _global.jumpZip = " + _global.jumpZip);
var _local3 = _global.gsiMethod.queue(301, [int(_global.jumpZip), _global.gaiaSessionID], mData, this);
_global.gsiMethod.queue(302, [int(_global.jumpZip), _global.gaiaSessionID], _local3);
_global.gsiMethod.queue(309, [int(_global.jumpZip), _global.gaiaSessionID], _local3);
_global.gsiMethod.queue(4000, [int(_global.jumpZip), _global.gaiaSessionID], _local3);
_global.gsiMethod.send();
}
function mData(noErr, info, thisClass) {
trace("[MapData] data " + info[0].data);
_root.loadBar.info = "";
_root.loadBar._visible = false;
if ((info[0].success == true) && (info[1].success == true)) {
retry301 = (retry302 = 0);
_global.mapDataOld = _global.mapData;
_global.mapData = info[0].data;
_global.mapHomeData = info[1].data;
if (_global.isAltRoom) {
_global.mapData[1] = _global.mapData[1] + "_alt";
_global.mapData[12] = "maps/barton/terrain_6.swf";
_global.mapData[13] = 6;
_global.mapData[10] = _global.mapData[10] + "_alt";
_global.mapHomeData = [0];
}
parentClass.nextSequence();
} else if (info[0].success == false) {
thisClass.retry301++;
if (thisClass.retry301 <= 3) {
thisClass.getMapData();
} else {
var _local6 = info[1].data;
parentClass.errorMsg("301", _local6[0], _local6[1]);
}
} else if (info[1].success == false) {
thisClass.retry302++;
if (thisClass.retry302 <= 3) {
thisClass.getMapData();
} else {
var _local6 = info[0].data;
parentClass.errorMsg("302", _local6[0], _local6[1]);
}
}
}
var retry302 = 0;
var retry301 = 0;
}
Symbol 106 MovieClip [__Packages.classes.main.AutoConnect] Frame 0
class classes.main.AutoConnect
{
var parentClass;
function AutoConnect (pClass) {
parentClass = pClass;
getRoomPopulation();
}
function getRoomPopulation() {
var _local3 = _global.gsiMethod.queue(2028, ["1001000", _global.gaiaSessionID], populationDataLoaded, this);
_global.gsiMethod.queue(2002, [_global.gaiaSessionID], _local3);
_global.gsiMethod.send();
}
function populationDataLoaded(noErr, info) {
var _local6 = [];
var _local5 = info[0].data;
var _local7 = info[1].data;
var _local2 = 0;
while (_local2 < _local5.length) {
var _local4 = parseInt(_local5[_local2]);
if ((_local4 > minRoomMembers) && (_local4 < MAX_PER_GRID)) {
var _local3 = new Object();
_local3.roomPopulation = _local5[_local2];
_local3.zipID = _local2;
_local6.push(_local3);
}
_local2++;
}
getTheBestRoom(_local6, _local7);
}
function getTheBestRoom(rmData, bookmarkData) {
var _local6 = 0;
while (_local6 < rmData.length) {
var _local3 = 0;
while (_local3 < bookmarkData.length) {
var _local8 = formatZipID(rmData[_local6].zipID).toString();
var _local4 = bookmarkData[_local3][3].toString().substr(2, bookmarkData[_local3][3].length);
if ((_local8.substr(1, _local8.length) == _local4) && (_global.shouldTryBookmark)) {
roomFound(_local8);
return(undefined);
}
_local3++;
}
_local6++;
}
var _local9 = randRange(0, rmData.length - 1);
var _local8 = formatZipID(rmData[_local9].zipID);
roomFound(_local8);
}
function formatZipID(zip) {
var _local3 = zip.toString();
if (_local3.length == 2) {
var _local1 = "510010" + zip;
} else {
var _local1 = "5100100" + zip;
}
return(_local1);
}
function roomFound(zipID) {
trace("[AutoConnect] This is the place: " + zipID);
_global.jumpZip = zipID;
parentClass.nextSequence();
}
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
var retry302 = 0;
var retry301 = 0;
var minRoomMembers = 50;
var MAX_PER_GRID = 500;
}
Symbol 107 MovieClip [__Packages.classes.main.HomeData] Frame 0
class classes.main.HomeData
{
var parentClass;
function HomeData (pClass) {
parentClass = pClass;
var _local3 = _global.gsiMethod.queue(307, [int(_global.gHouseOwnerId)], hData, this);
_global.gsiMethod.queue(615, [int(_global.gHouseOwnerId), _global.gaiaSessionID], _local3);
_global.gsiMethod.send();
}
function hData(noErr, info) {
var _local3;
var _local4;
if ((noErr == false) || (info[0].success == false)) {
parentClass.destroySequence();
_global.scene = "train";
parentClass.loadSequence(_global.scene);
} else {
_global.jumpZip = info[0].data[2];
_global.gHouseId = info[0].data[3].substr(0, 1);
_global.gHouseOwnerId = info[0].data[0];
_global.gHouseOwnerName = info[0].data[1];
if (_global.jumpZip == 0) {
_local4 = 0;
_local3 = 0;
while (_local3 < _global.gHouseOwnerName.length) {
_local4 = _local4 + _global.gHouseOwnerName.charCodeAt(_local3);
_local3++;
}
_local4 = _local4 % 100;
_global.jumpZip = "110010" + String(_local4);
}
if ((info[1].data[0] == 1) && (_global.gHouseId == 0)) {
parentClass.destroySequence();
_global.scene = "train";
parentClass.loadSequence(_global.scene);
} else if ((info[1].data[0] == 1) || (info[1].success == false)) {
parentClass.destroySequence();
_global.scene = "town";
parentClass.loadSequence(_global.scene);
} else {
parentClass.nextSequence();
}
}
}
}
Symbol 108 MovieClip [__Packages.classes.main.BuildEvent] Frame 0
class classes.main.BuildEvent
{
var parentClass, doNext;
function BuildEvent (pClass) {
parentClass = pClass;
doNext = true;
if (parseInt(_global.eventID) == 19) {
_global.gsiMethod.invoke(365, [9, _global.gaiaSessionID], eggData, this);
} else {
parentClass.nextSequence();
}
}
function eggData(noErr, info, thisClass) {
if (noErr == false) {
_root.ui_mc.mapInfo.eventEasterInv._visible = false;
} else {
_root.ui_mc.mapInfo.eventEasterInv._visible = true;
_root.ui_mc.mapInfo.eventEasterInv.qty = "x " + info[0];
}
if (doNext == true) {
parentClass.nextSequence();
}
}
function update() {
doNext = false;
if (parseInt(_global.eventID) == 19) {
_global.gsiMethod.invoke(365, [9, _global.gaiaSessionID], eggData, this);
}
}
function clearInv() {
if (parseInt(_global.eventID) == 19) {
_root.ui_mc.mapInfo.eventEasterInv.qty = "x 0";
}
}
}
Symbol 109 MovieClip [__Packages.classes.main.BuildTrain] Frame 0
class classes.main.BuildTrain
{
var parentClass, retry;
function BuildTrain (pClass) {
parentClass = pClass;
retry = 0;
loadTrainstation();
}
function loadTrainstation() {
var thisClass = this;
var _local4 = new Object();
_local4.onLoadError = function (target_mc, errorCode, httpStatus) {
thisClass.retryServer(target_mc, errorCode, httpStatus);
};
_local4.onLoadStart = function (target_mc) {
_root.loadBar.bar._xscale = 0;
_root.loadBar.info = "Loading Trainstation Map";
};
_local4.onLoadProgress = function (target_mc, bytesLoaded, bytesTotal) {
_root.loadBar.bar._xscale = (bytesLoaded / bytesTotal) * 100;
};
_local4.onLoadInit = function (target_mc) {
_root.loadBar.bar._xscale = 0;
_root.loadBar.info = "";
thisClass.checkCompleteLoad();
};
var _local5 = new MovieClipLoader();
_local5.addListener(_local4);
if (parseInt(_global.eventID) == _global.EVENT_XMAS) {
_local5.loadClip(_global.filePath + "maps/barton_christmas/trainstationTerrain.swf", _global.gCanvas);
} else if (parseInt(_global.eventID) == _global.EVENT_WINTER) {
_local5.loadClip(_global.filePath + "maps/barton_winter/trainstationTerrain.swf", _global.gCanvas);
} else {
_local5.loadClip(_global.filePath + "maps/barton_standard/trainstationTerrain.swf", _global.gCanvas);
}
}
function retryServer(target_mc, errorCode, httpStatus) {
if (retry <= 3) {
loadTrainstation();
} else {
parentClass.errorMsg("Trainstation Map", errorCode, httpStatus);
}
retry++;
}
function checkCompleteLoad() {
_global.gBroadcaster.addListener(this);
}
function run() {
if (_global.gCanvas.clipping_canvas) {
_global.gBroadcaster.removeListener(this);
setTrain();
}
}
function setTrain() {
_root.ui_mc.mapInfo.mapTitle = "Barton Trainstation";
_root.ui_mc.navArrows.setMapSize(768, 768);
_root.ui_mc.navArrows.clearCallback(ui.JumpPoints.ALL);
_root.ui_mc.navArrows.disable(ui.JumpPoints.ALL);
_root.ui_mc.navArrows.enable(ui.JumpPoints.SOUTH);
_root.ui_mc.navArrows.setCallback(ui.JumpPoints.SOUTH, _global.uiCtrl.dirState, [true], _global.uiCtrl);
_global.gCanvas.createEmptyMovieClip("flying_canvas", 5);
_global.gCanvas.createEmptyMovieClip("chat_mc", 6);
parentClass.nextSequence();
}
}
Symbol 110 MovieClip [__Packages.ui.JumpPoints] Frame 0
class ui.JumpPoints
{
static var WORLD_MAP, ALL_ARROWS;
var nData, sData, eData, wData, mapHeight, mapWidth;
function JumpPoints (no, so, ea, we) {
WORLD_MAP = _root.canvas_mc;
ALL_ARROWS = new Object();
ALL_ARROWS[NORTH] = null;
ALL_ARROWS[SOUTH] = null;
ALL_ARROWS[EAST] = null;
ALL_ARROWS[WEST] = null;
nData = new Object();
sData = new Object();
eData = new Object();
wData = new Object();
nData.clip = no;
sData.clip = so;
eData.clip = ea;
wData.clip = we;
no._x = STAGE_WIDTH / 2;
so._x = STAGE_WIDTH / 2;
ea._y = STAGE_HEIGHT / 2;
we._y = STAGE_HEIGHT / 2;
}
function updateLoc() {
nData.clip._y = 1 + WORLD_MAP._y;
sData.clip._y = (mapHeight + WORLD_MAP._y) - 31;
eData.clip._x = (mapWidth + WORLD_MAP._x) - 1;
wData.clip._x = 1 + WORLD_MAP._x;
}
function isTouching(theRange) {
var _local2;
if (nData.active && (theRange.testPoint(nData.clip._x - WORLD_MAP._x, (nData.clip._y - WORLD_MAP._y) + 23.5, 15))) {
_local2 = NORTH;
} else if (sData.active && (theRange.testPoint(sData.clip._x - WORLD_MAP._x, (sData.clip._y - WORLD_MAP._y) - 23.5, 15))) {
_local2 = SOUTH;
} else if (eData.active && (theRange.testPoint((eData.clip._x - WORLD_MAP._x) - 28, eData.clip._y - WORLD_MAP._y, 15))) {
_local2 = EAST;
} else if (wData.active && (theRange.testPoint((wData.clip._x - WORLD_MAP._x) + 28, wData.clip._y - WORLD_MAP._y, 15))) {
_local2 = WEST;
}
return(_local2);
}
function trigger(theArrow) {
var _local2 = this[theArrow];
_local2.callback.apply(_local2.scope, _local2.args);
}
function setMapSize(width, height) {
mapWidth = width;
mapHeight = height;
}
function enable(theArrow) {
if (theArrow == ALL) {
for (theArrow in ALL_ARROWS) {
this[theArrow].clip._visible = true;
this[theArrow].active = true;
}
} else {
this[theArrow].clip._visible = true;
this[theArrow].active = true;
}
}
function disable(theArrow) {
if (theArrow == ALL) {
for (theArrow in ALL_ARROWS) {
this[theArrow].clip._visible = false;
this[theArrow].active = false;
}
} else {
this[theArrow].clip._visible = false;
this[theArrow].active = false;
}
}
function setCallback(theArrow, cb, args, scope) {
if (theArrow == ALL) {
for (theArrow in ALL_ARROWS) {
this[theArrow].callback = cb;
this[theArrow].scope = scope;
this[theArrow].args = args;
}
} else {
this[theArrow].callback = cb;
this[theArrow].scope = scope;
this[theArrow].args = args;
}
}
function clearCallback(theArrow) {
if (theArrow == ALL) {
for (theArrow in ALL_ARROWS) {
this[theArrow].callback = null;
this[theArrow].scope = null;
this[theArrow].args = null;
}
} else {
this[theArrow].callback = null;
this[theArrow].scope = null;
this[theArrow].args = null;
}
}
static var ALL = "all";
static var NORTH = "nData";
static var SOUTH = "sData";
static var EAST = "eData";
static var WEST = "wData";
static var STAGE_WIDTH = 740;
static var STAGE_HEIGHT = 580;
}
Symbol 111 MovieClip [__Packages.classes.range.Range] Frame 0
class classes.range.Range
{
var parent, radius, X, Y;
function Range (parentClip, length, centerX, centerY) {
parent = parentClip;
radius = length;
X = ((centerX == undefined) ? 0 : (centerX));
Y = ((centerY == undefined) ? 0 : (centerY));
}
function testRange(target) {
var _local2;
var _local5;
var _local3;
var _local4;
_local2 = target.getData();
_local5 = Math.abs((X + parent._x) - _local2.X);
_local3 = Math.abs((Y + parent._y) - _local2.Y);
_local4 = radius + _local2.radius;
return((_local4 * _local4) > ((_local5 * _local5) + (_local3 * _local3)));
}
function testPoint(pX, pY, pR) {
var _local4;
var _local2;
var _local3;
_local4 = Math.abs((X + parent._x) - pX);
_local2 = Math.abs((Y + parent._y) - pY);
if (pR == undefined) {
pR = 0;
}
_local3 = radius + pR;
return((_local3 * _local3) > ((_local4 * _local4) + (_local2 * _local2)));
}
function getRadius() {
return(radius);
}
function getX() {
return(parent._x + X);
}
function getY() {
return(parent._y + Y);
}
function getData() {
var _local2 = new Object();
_local2.radius = radius;
_local2.X = parent._x + X;
_local2.Y = parent._y + Y;
return(_local2);
}
function setRadius(length) {
radius = length;
}
function setPosition(centerX, centerY) {
X = (isNaN(centerX) ? 0 : (centerX));
Y = (isNaN(centerY) ? 0 : (centerY));
}
function draw(colour, alpha, fillColour, fillAlpha, newClip) {
var _local3 = X;
var _local2 = Y;
var _local4 = radius;
var _local7 = _local4 * 0.414213562373095;
var _local6 = _local4 * Math.SQRT1_2;
var _local5;
if (newClip == undefined) {
_local5 = parent;
} else {
_local5 = parent.createEmptyMovieClip("radius" + newClip, newClip);
}
if (colour == undefined) {
colour = 16777215 /* 0xFFFFFF */;
}
if (alpha == undefined) {
alpha = 75;
}
if ((fillColour != undefined) || (fillAlpha != undefined)) {
if (fillColour == undefined) {
fillColour = 16777215 /* 0xFFFFFF */;
}
if (fillAlpha == undefined) {
fillAlpha = 50;
}
_local5.beginFill(fillColour, fillAlpha);
}
_local5.lineStyle(2, colour, alpha);
_local5.moveTo(_local3 + _local4, _local2);
_local5.curveTo(_local3 + _local4, _local2 + _local7, _local3 + _local6, _local2 + _local6);
_local5.curveTo(_local3 + _local7, _local2 + _local4, _local3, _local2 + _local4);
_local5.curveTo(_local3 - _local7, _local2 + _local4, _local3 - _local6, _local2 + _local6);
_local5.curveTo(_local3 - _local4, _local2 + _local7, _local3 - _local4, _local2);
_local5.curveTo(_local3 - _local4, _local2 - _local7, _local3 - _local6, _local2 - _local6);
_local5.curveTo(_local3 - _local7, _local2 - _local4, _local3, _local2 - _local4);
_local5.curveTo(_local3 + _local7, _local2 - _local4, _local3 + _local6, _local2 - _local6);
_local5.curveTo(_local3 + _local4, _local2 - _local7, _local3 + _local4, _local2);
if (fillColour != undefined) {
_local5.endFill();
}
}
}
Symbol 112 MovieClip [__Packages.classes.main.BuildTown] Frame 0
class classes.main.BuildTown
{
var parentClass, retry, niceZip, poolID, swfListener, seqPointer;
function BuildTown (pClass) {
_global.ignoreUserManager.resetIgnoreData();
parentClass = pClass;
var thisClass = this;
retry = 0;
niceZip = (_global.mapData[0].substring(0, 1) + " Barton ") + _global.mapData[0].substr(2, 8);
_global.uiCtrl.showSoccerBall();
var _local4 = _global.mapData[0].substr(2, 8);
poolID = _local4.charAt(5);
swfListener = new Object();
swfListener.onLoadError = function (target_mc, errorCode, httpStatus) {
thisClass.retryServer(target_mc, errorCode, httpStatus);
};
swfListener.onLoadStart = function (target_mc) {
_root.loadBar.bar._xscale = 0;
};
swfListener.onLoadProgress = function (target_mc, bytesLoaded, bytesTotal) {
_root.loadBar.bar._xscale = (bytesLoaded / bytesTotal) * 100;
};
swfListener.onLoadInit = function (target_mc) {
_root.loadBar.bar._xscale = 0;
_root.loadBar.info = "";
thisClass.nextSequence();
};
seqPointer = 0;
loadSeq[seqPointer].call(this);
}
function retryServer(target_mc, errorCode, httpStatus) {
if (retry <= 3) {
loadSeq[seqPointer].call(this);
}
errDisplay(target_mc, errorCode, httpStatus);
retry++;
}
function nextSequence() {
seqPointer++;
loadSeq[seqPointer].call(this);
}
function errDisplay(mc, errorCode, httpStatus) {
var _local2 = "";
switch (mc) {
case _level0.canvas_mc :
_local2 = "Loading Towns Map Environment Failed";
break;
case _level0.canvas_mc.mapTerrain :
_local2 = "Loading Towns Map Terrain Failed";
}
httpStatus = httpStatus + ("\nTown Address: " + niceZip);
parentClass.errorMsg(_local2, errorCode, httpStatus);
}
function layout() {
_root.loadBar.info = ("Loading " + niceZip) + ": Map Environment";
var _local4 = new MovieClipLoader();
_local4.addListener(swfListener);
var _local5 = isChessRoom();
_global.isInChess = _local5;
switch (parseInt(_global.eventID)) {
case _global.EVENT_WINTER :
_local4.loadClip(_global.filePath + "maps/barton_winter/rural_environment.swf", _global.gCanvas);
break;
case _global.EVENT_HALLOWEEN :
if (_global.isInChess) {
_local4.loadClip(_global.filePath + "maps/barton_standard/rural_environment.swf", _global.gCanvas);
_root.ui_mc.mapInfo.eventHalloweenInv._visible = false;
} else {
_local4.loadClip(_global.filePath + "maps/barton_holloween/rural_environment.swf", _global.gCanvas);
_root.ui_mc.mapInfo.eventHalloweenInv._visible = true;
}
break;
case _global.EVENT_XMAS :
_local4.loadClip(_global.filePath + "maps/barton_christmas/rural_environment.swf", _global.gCanvas);
break;
case _global.EVENT_SUMMER :
_global.POOL = true;
if (_global.isInChess) {
_local4.loadClip(_global.filePath + "maps/barton_standard/rural_environment.swf", _global.gCanvas);
} else {
_local4.loadClip(_global.filePath + "maps/barton_summer/rural_environment.swf", _global.gCanvas);
}
break;
default :
_local4.loadClip(_global.filePath + "maps/barton_standard/rural_environment.swf", _global.gCanvas);
}
}
function terrain() {
_root.loadBar.info = ("Loading " + niceZip) + ": Map Terrain";
_global.gCanvas.createEmptyMovieClip("mapTerrain", 2);
var _local4 = new MovieClipLoader();
_local4.addListener(swfListener);
if (_global.isInChess) {
if (_global.sponsorshipEvent == "madagascar2") {
_local4.loadClip(_global.filePath + "maps/barton_standard/rural_terrain_madagascar.swf", _global.gCanvas.mapTerrain);
} else {
_local4.loadClip(_global.filePath + "maps/barton_winter/rural_terrain_chess.swf", _global.gCanvas.mapTerrain);
}
} else {
switch (parseInt(_global.eventID)) {
case 10 :
_local4.loadClip(((_global.filePath + "maps/barton_holloween/rural_terrain_") + _global.mapData[13]) + ".swf", _global.gCanvas.mapTerrain);
break;
case _global.EVENT_XMAS :
_local4.loadClip(((_global.filePath + "maps/barton_christmas/rural_terrain_") + _global.mapData[13]) + ".swf", _global.gCanvas.mapTerrain);
break;
case _global.EVENT_WINTER :
_local4.loadClip(((_global.filePath + "maps/barton_winter/rural_terrain_") + _global.mapData[13]) + ".swf", _global.gCanvas.mapTerrain);
break;
default :
if (_global.mapData[13] == 1) {
if (_global.sponsorshipEvent == "housebunny") {
_local4.loadClip(_global.filePath + "maps/barton_standard/rural_terrain_1_house.swf", _global.gCanvas.mapTerrain);
} else {
_local4.loadClip(((_global.filePath + "maps/barton_standard/rural_terrain_") + _global.mapData[13]) + ".swf", _global.gCanvas.mapTerrain);
}
} else {
_local4.loadClip(((_global.filePath + "maps/barton_standard/rural_terrain_") + _global.mapData[13]) + ".swf", _global.gCanvas.mapTerrain);
}
}
}
}
function isChessRoom() {
var _local2 = 0;
while (_local2 < _global.chessRoomArray.length) {
if ((_global.mapData[10] == _global.chessRoomArray[_local2]) && (_global.mapHomeData.length < 6)) {
return(true);
}
_local2++;
}
return(false);
}
function loadToys() {
_global.beaconClip = _global.gCanvas.createEmptyMovieClip("beaconHolder", _global.gCanvas.getNextHighestDepth());
var _local10 = new MovieClipLoader();
_local10.loadClip(_global.filePath + "toys/commonAssets/beacon.swf", _global.beaconClip);
_global.soccerBallClip = _global.gCanvas.clipping_canvas.createEmptyMovieClip("soccerBallHolder", _global.gCanvas.clipping_canvas.getNextHighestDepth());
var _local3 = new MovieClipLoader();
_local3.loadClip(_global.filePath + "toys/items/soccerBall.swf", _global.soccerBallClip);
_global.beachBallClip = _global.gCanvas.clipping_canvas.createEmptyMovieClip("beachBallHolder", _global.gCanvas.clipping_canvas.getNextHighestDepth());
_local3.loadClip(_global.filePath + "toys/items/beachBall.swf", _global.beachBallClip);
_global.waterBalloonClip = _global.gCanvas.createEmptyMovieClip("waterBalloonClip", _global.gCanvas.getNextHighestDepth());
_global.waterBalloonCrosshairs = _global.gCanvas.createEmptyMovieClip("waterBalloonCrossHairs", 500);
var _local2 = new MovieClipLoader();
_local2.loadClip(_global.filePath + "toys/items/waterBalloon.swf", _global.waterBalloonClip);
_local2.loadClip(_global.filePath + "toys/items/waterBalloon.swf", _global.waterBalloonCrosshairs);
_global.waterBalloonClip._visible = false;
_global.waterGunClip = _global.gCanvas.createEmptyMovieClip("waterGunClip", 501);
var _local9 = new MovieClipLoader();
_local9.loadClip(_global.filePath + "toys/items/waterGun.swf", _global.waterGunClip);
_global.toiletPaperClip = _global.gCanvas.createEmptyMovieClip("toiletPaperClip", _global.gCanvas.getNextHighestDepth());
_global.toiletPaperCrosshairs = _global.gCanvas.createEmptyMovieClip("toiletPaperCrossHairs", 600);
var _local4 = new MovieClipLoader();
_local4.loadClip(_global.filePath + "toys/items/toiletPaper.swf", _global.toiletPaperClip);
_local4.loadClip(_global.filePath + "toys/items/toiletPaper.swf", _global.toiletPaperCrosshairs);
_global.toiletPaperClip._visible = false;
_global.eggClip = _global.gCanvas.createEmptyMovieClip("eggClip", _global.gCanvas.getNextHighestDepth());
_global.eggCrosshairs = _global.gCanvas.createEmptyMovieClip("eggCrossHairs", 600);
var _local5 = new MovieClipLoader();
_local5.loadClip(_global.filePath + "toys/items/eggs.swf", _global.eggClip);
_local5.loadClip(_global.filePath + "toys/items/eggs.swf", _global.eggCrosshairs);
_global.eggClip._visible = false;
_global.snowBallClip = _global.gCanvas.createEmptyMovieClip("snowBallClip", _global.gCanvas.getNextHighestDepth());
_global.snowBallCrosshairs = _global.gCanvas.createEmptyMovieClip("snowBallCrossHairs", 600);
var _local7 = new MovieClipLoader();
_local7.loadClip(_global.filePath + "toys/items/snowBalls.swf", _global.snowBallClip);
_local7.loadClip(_global.filePath + "toys/items/snowBalls.swf", _global.snowBallCrosshairs);
_global.snowBallClip._visible = false;
_global.conesClip = _global.gCanvas.mapTerrain.createEmptyMovieClip("cones", _global.gCanvas.getNextHighestDepth());
_global.conesrosshairs = _global.gCanvas.mapTerrain.createEmptyMovieClip("conesCrossHairs", 600);
var _local8 = new MovieClipLoader();
_local8.loadClip(_global.filePath + "toys/items/cones.swf", _global.conesClip);
_local8.loadClip(_global.filePath + "toys/items/cones.swf", _global.conesCrosshairs);
_global.conesClip._visible = false;
_global.fireBallClip = _global.gCanvas.createEmptyMovieClip("fireBallClip", _global.gCanvas.getNextHighestDepth());
_global.fireBallCrossHairs = _global.gCanvas.createEmptyMovieClip("fireBallCrossHairs", 600);
var _local6 = new MovieClipLoader();
_local6.loadClip(_global.filePath + "toys/items/fireBall.swf", _global.fireBallClip);
_local6.loadClip(_global.filePath + "toys/items/fireBall.swf", _global.fireBallCrossHairs);
_global.fireBallClip._visible = false;
_global.myToyManager.initToyVars();
}
function setLayout() {
_root.loadBar.info = ("Loading " + niceZip) + ": Map Bulletin";
var _local7 = ((_global.mapData[0].charAt(0) == "5") ? (_global.mapData[14]) : (parseInt(_global.mapData[14]) + 1));
_global.myToyManager.disableCurrentToy();
_global.hasFountain = false;
if (_global.isMiniAvatar) {
_global.gsiMethod.invoke(2052, [_global.gaiaSessionID, 0], setMiniAvatarCB);
}
if (_global.isInChess) {
if (_global.sponsorshipEvent == "madagascar2") {
_global.gCanvas.attachMovie("mask_madagascar", "mask_canvas", 1);
_global.gCanvas.attachMovie("canvas_madagascar", "clipping_canvas", 3);
_global.gCanvas.clipping_canvas.jeep.sensor.ref = this;
_global.gCanvas.clipping_canvas.jeep.sensor.onPress = function () {
this.ref.gotoProfile("15877776");
};
_root.ui_mc.uiArea.returnToTown._visible = false;
} else {
_global.gCanvas.attachMovie("mask_13", "mask_canvas", 1);
_global.gCanvas.attachMovie("canvas_13", "clipping_canvas", 3);
_root.ui_mc.uiArea.returnToTown._visible = false;
}
} else if (_global.isAltRoom) {
_global.gsiMethod.invoke(4000, [_global.gaiaSessionID, 503], questCallback);
_global.gCanvas.attachMovie("mask_12", "mask_canvas", 1);
_global.gCanvas.attachMovie("canvas_12", "clipping_canvas", 3);
_root.ui_mc.uiArea.returnToTown._visible = true;
} else if (_local7 == 1) {
if (_global.sponsorshipEvent == "housebunny") {
_global.gCanvas.attachMovie("mask_1_house", "mask_canvas", 1);
_global.gCanvas.attachMovie("canvas_1_house", "clipping_canvas", 3);
} else {
_global.gCanvas.attachMovie("mask_1", "mask_canvas", 1);
_global.gCanvas.attachMovie("canvas_1", "clipping_canvas", 3);
}
_root.ui_mc.uiArea.returnToTown._visible = false;
} else {
_global.gCanvas.attachMovie("mask_" + _local7, "mask_canvas", 1);
_global.gCanvas.attachMovie("canvas_" + _local7, "clipping_canvas", 3);
_root.ui_mc.uiArea.returnToTown._visible = false;
}
var _local11 = new classes.environment.Bulletin();
_global.gCanvas.createEmptyMovieClip("forground", 4);
_global.gCanvas.createEmptyMovieClip("flying_canvas", 5);
_global.gCanvas.createEmptyMovieClip("chat_mc", 6);
_root.ui_mc.mapInfo.mapTitle = _global.mapData[10];
if (_global.mapData[13] == 1) {
if ((parseInt(_global.eventID) == _global.EVENT_XMAS) || (parseInt(_global.eventID) == _global.EVENT_WINTER)) {
var _local8 = _global.gCanvas.clipping_canvas.createEmptyMovieClip("iceRink", _global.gCanvas.clipping_canvas.getNextHighestDepth());
_local8.loadMovie(_global.filePath + "structures/iceRink.swf");
_local8._x = 512;
_local8._y = 442;
_global.snackStandMgr = new structures.classes.Stands();
} else if (_global.POOL) {
if ((poolID % 2) != 0) {
var _local10 = "pool_1";
_global.poolNum = 1;
} else {
var _local10 = "pool_2";
_global.poolNum = 2;
}
var _local4 = _global.gCanvas.clipping_canvas.createEmptyMovieClip("pool", _global.gCanvas.clipping_canvas.getNextHighestDepth());
_global.poolMgr = new structures.classes.Pool();
_global.poolMgr.init(_local4);
_local4.loadMovie(((_global.filePath + "structures/") + _local10) + ".swf");
_local4._x = 512;
_local4._y = 442;
_global.snackStandMgr = new structures.classes.Stands();
var _local9 = _global.gCanvas.forground.attachMovie("Torches", "Torches", _global.gCanvas.forground.getNextHighestDepth());
_local9._x = 495;
_local9._y = 190;
} else if (parseInt(_global.eventID) == 10) {
var _local5 = _global.gCanvas.clipping_canvas.createEmptyMovieClip("graveyard", _global.gCanvas.clipping_canvas.getNextHighestDepth());
_local5.loadMovie(_global.filePath + "structures/graveyard.swf");
_local5._x = 512;
_local5._y = 442;
} else {
var _local6 = _global.gCanvas.clipping_canvas.createEmptyMovieClip("fountain", _global.gCanvas.clipping_canvas.getNextHighestDepth());
_local6.loadMovie(_global.filePath + "structures/fountain.swf");
_local6._x = 512;
_local6._y = 442;
_global.hasFountain = true;
}
_global.myToyManager.showAllToys();
} else {
_global.myToyManager.hideAllToys();
}
loadToys();
nextSequence();
}
function gotoProfile(id) {
getURL ("http://www.gaiaonline.com/profiles/" + id, "_blank");
}
function questCallback(noErr, info, thisClass) {
if (info[0] == "1") {
var _local3 = "trigger_key-spiderwick_movie_get_item";
var _local4 = _global.gsiMethod.queue(1125, [_global.gaiaSessionID, 11, _local3], itemGrantedCallBack, this);
if (_global.isMiniAvatar) {
_global.gsiMethod.invoke(2052, [_global.gaiaSessionID, 0], setMiniAvatarCB);
}
_global.gsiMethod.send();
_global.gCanvas.clipping_canvas.beeNPC.npcMessage = ("So, how do you like the forest? Pretty sweet, huh? Anyway, you can hang out in here for as long as you'd like. Click <a href='http://" + _global.domainURL) + "/npc/talk?npc_id=129' target='_blank'><font color='#000099'>here</font></a> to get your item!";
} else {
_global.gCanvas.clipping_canvas.beeNPC.npcMessage = "Back in the enchanted forest, huh? I don't blame you, it's a pretty great place to hang out. You can get back here whenever you want by watching the Spiderwick Chronicles trailer again, but I'm afraid I've run out of items to give you.";
}
}
function setMiniAvatarCB() {
}
function itemGrantedCallBack(noErr, info, thisClass) {
}
function arrows() {
var _local5 = _global.mapData[5][0];
var _local6 = _global.mapData[5][1];
var _local8 = _global.mapData[5][2];
var _local7 = _global.mapData[5][3];
var _local4 = function (nextZip) {
_root.stream.destroySequence();
_global.scene = "toMap";
_global.jumpZip = nextZip;
_root.stream.loadSequence(_global.scene);
_global.uiCtrl.dirState(false);
};
_root.ui_mc.navArrows.disable();
_root.ui_mc.navArrows.setMapSize(1024, 1024);
if ((_local5.length < 8) || (_local5 == undefined)) {
_root.ui_mc.navArrows.disable(ui.JumpPoints.NORTH);
_root.ui_mc.navArrows.clearCallback(ui.JumpPoints.NORTH);
} else {
_root.ui_mc.navArrows.enable(ui.JumpPoints.NORTH);
_root.ui_mc.navArrows.setCallback(ui.JumpPoints.NORTH, _local4, [_local5]);
}
if ((_local6.length < 8) || (_local6 == undefined)) {
_root.ui_mc.navArrows.disable(ui.JumpPoints.SOUTH);
_root.ui_mc.navArrows.clearCallback(ui.JumpPoints.SOUTH);
} else {
_root.ui_mc.navArrows.enable(ui.JumpPoints.SOUTH);
_root.ui_mc.navArrows.setCallback(ui.JumpPoints.SOUTH, _local4, [_local6]);
}
if ((_local8.length < 8) || (_local8 == undefined)) {
_root.ui_mc.navArrows.disable(ui.JumpPoints.EAST);
_root.ui_mc.navArrows.clearCallback(ui.JumpPoints.EAST);
} else {
_root.ui_mc.navArrows.enable(ui.JumpPoints.EAST);
_root.ui_mc.navArrows.setCallback(ui.JumpPoints.EAST, _local4, [_local8]);
}
if ((_local7.length < 8) || (_local7 == undefined)) {
_root.ui_mc.navArrows.disable(ui.JumpPoints.WEST);
_root.ui_mc.navArrows.clearCallback(ui.JumpPoints.WEST);
} else {
_root.ui_mc.navArrows.enable(ui.JumpPoints.WEST);
_root.ui_mc.navArrows.setCallback(ui.JumpPoints.WEST, _local4, [_local7]);
}
if (_global.isAltRoom) {
_root.ui_mc.navArrows.disable(ui.JumpPoints.ALL);
} else {
_root.ui_mc.navArrows.enable(ui.JumpPoints.ALL);
}
parentClass.nextSequence();
}
var loadSeq = new Array(classes.main.BuildTown.prototype.layout, classes.main.BuildTown.prototype.terrain, classes.main.BuildTown.prototype.setLayout, classes.main.BuildTown.prototype.arrows);
}
Symbol 113 MovieClip [__Packages.classes.environment.Bulletin] Frame 0
class classes.environment.Bulletin
{
var parentClass, bBoard, range, boardPanel, bound;
function Bulletin (pClass) {
parentClass = pClass;
bBoard = _global.gCanvas.clipping_canvas.bulletin;
bBoard.loadMovie(_global.filePath + "structures/bulletin.swf");
_global.gBroadcaster.addListener(this);
}
function run() {
if (bBoard._currentframe != 0) {
_global.gBroadcaster.removeListener(this);
range = new classes.range.Range(bBoard, 30);
bBoard.sensor.ref = this;
bBoard.sensor.onPress = function () {
this.ref.showMenu();
};
}
}
function showMenu() {
var _local3 = range.testRange(_global.gAvMan.getMyAvatar().feet);
if (_local3) {
var thisClass = this;
bBoard.sensor.enabled = false;
boardPanel = _global.uiCtrl.bulletinBoard(bBoard, true, []);
getBoardData();
bBoard.onEnterFrame = function () {
var _local3 = thisClass.range.testRange(_global.gAvMan.getMyAvatar().feet);
if (_local3 == false) {
delete this.onEnterFrame;
thisClass.hideMenu();
}
};
}
}
function getBoardData() {
var _local4 = _global.mapData[0];
var _local3 = _global.gsiMethod.queue(113, [_global.gaiaSessionID], boardData, this);
_global.gsiMethod.queue(2031, [_local4, _global.gaiaSessionID], _local3, this);
_global.gsiMethod.queue(2014, [_local4, _global.gaiaSessionID], _local3, this);
_global.gsiMethod.send();
}
function boardPage1(boardPanel) {
boardPanel.gotoAndStop(1);
boardPanel.address.text = boardPanel.townName;
boardPanel.topic.text = boardPanel.topicName;
var thisClass = this;
if ((boardPanel.townCost == "-1") || (boardPanel.townCost == "0")) {
boardPanel.nameEdit._visible = false;
boardPanel.townName_desc._visible = false;
} else {
boardPanel.nameEdit._visible = true;
boardPanel.townName_desc._visible = true;
}
boardPanel.topicName_desc._visible = true;
boardPanel.townTopic_desc._visible = true;
boardPanel.topicEdit._visible = true;
boardPanel.nameEdit.onRelease = function () {
thisClass.boardPage2(boardPanel);
};
boardPanel.topicEdit.onRelease = function () {
thisClass.boardPage3(boardPanel);
};
}
function boardPage2(boardPanel) {
boardPanel.gotoAndStop(2);
boardPanel.address.text = boardPanel.townName;
boardPanel.gaiaGold = "Your Gold: " + boardPanel.myGold;
boardPanel.cost.text = boardPanel.townCost;
var thisClip = this;
boardPanel.ok.onRelease = function () {
thisClip.saveTitle(boardPanel);
};
}
function boardPage3(boardPanel) {
boardPanel.gotoAndStop(3);
boardPanel.topic.text = boardPanel.topicName;
boardPanel.gaiaGold = "Your Gold: " + boardPanel.myGold;
boardPanel.cost.text = boardPanel.anchorCost;
var thisClip = this;
boardPanel.ok.onRelease = function () {
thisClip.saveTopic(boardPanel);
};
}
function saveTopic() {
trace("------ DATA FOR NEW TOPIC NAME ------");
var _local5 = _global.mapData[0];
trace("Town Address: " + _local5);
var _local3 = boardPanel.newTopic.text;
trace("Topic Name: " + _local3);
var _local4 = random(100000000);
trace("Event Key: " + _local4);
trace("Gaia SID: " + _global.gaiaSessionID);
if ((_local3 != undefined) && (_local3 != "")) {
boardPanel.gotoAndStop(4);
var _local6 = _global.gsiMethod.queue(2013, [_local5, _local3, _local4, _global.gaiaSessionID], topicData, this);
_global.gsiMethod.invoke(113, [_global.gaiaSessionID], _local6);
}
}
function saveTitle() {
trace("WTF");
var _local6 = _global.mapData[0];
var _local3 = boardPanel.titleName.text;
var _local4 = random(100000000);
if (_local3 != undefined) {
if (_local3 != "") {
boardPanel.gotoAndStop(4);
var _local5 = _global.gsiMethod.queue(2032, [_local6, _local3, _local4, _global.gaiaSessionID], titleData, this);
_global.gsiMethod.invoke(113, [_global.gaiaSessionID], _local5);
}
}
}
function boardData(noErr, info, thisClass) {
boardPanel.myGold = info[0].data;
var _local3 = info[1].data;
var _local5 = info[2].data;
if (_local3[0] == 0) {
boardPanel.topicName = "";
} else {
boardPanel.topicName = gaiaWordFilter.WordFilter.cleanBadWords(_local3[0][0], _global.myUserData[4]);
}
boardPanel.townName = gaiaWordFilter.WordFilter.cleanBadWords(_local3[1], _global.myUserData[4]);
boardPanel.townCost = _local3[5];
boardPanel.anchorCost = _local5[4];
thisClass.boardPage1(boardPanel);
}
function topicData(noErr, info, thisClass) {
if (info[0].success == true) {
_global.myGold = info[1].data;
_root.ui_mc.mapInfo.goldAmount = _global.myGold + " g";
thisClass.boardPage1(thisClass.boardPanel);
var _local6 = info[0].data;
thisClass.boardPanel.topic.text = (thisClass.boardPanel.topicName = gaiaWordFilter.WordFilter.cleanBadWords(_local6[1], _global.myUserData[4]));
} else {
thisClass.boardPanel.gotoAndStop(5);
var _local5 = info[0].data;
thisClass.boardPanel.err.text = _local5[1];
}
}
function titleData(noErr, info, thisClass) {
if (info[0].success == true) {
_global.myGold = info[1].data;
_root.ui_mc.mapInfo.goldAmount = _global.myGold + " g";
var _local5 = gaiaWordFilter.WordFilter.cleanBadWords(thisClass.boardPanel.titleName.text, _global.myUserData[4]);
thisClass.boardPage1(thisClass.boardPanel);
thisClass.boardPanel.townName = (thisClass.boardPanel.address.text = _local5);
} else {
thisClass.boardPanel.gotoAndStop(5);
var _local6 = info[0].data;
thisClass.boardPanel.err.text = _local6[1];
}
}
function hideMenu() {
bBoard.sensor.enabled = true;
_global.uiCtrl.bulletinBoard(bBoard, false);
}
function remove() {
bound.unloadMovie();
delete range;
}
static var houseCount = 1;
}
Symbol 114 MovieClip [__Packages.classes.chat.SubChat] Frame 0
class classes.chat.SubChat
{
var parentClass, sushi, roomName, roomID, retryPause;
function SubChat (pClass) {
parentClass = pClass;
sushi = _global.sushi;
roomName = (((_global.mapData[0] + "S") + _global.gHouseOwnerId) + "#") + _global.gHouseOwnerName;
findSubChat();
}
function findSubChat() {
trace(("[SubChat] ----- FIND ROOM ----------- (" + roomName) + ")");
roomTries++;
findRoomID(roomName);
}
function findRoomID(rmName) {
var _local3 = sushi.session.getRoomIDs();
var _local2 = 0;
while (_local2 < _local3.length) {
if (sushi.room.getName(_local3[_local2]) == rmName) {
onRoomFound(_local3[_local2]);
return(undefined);
}
_local2++;
}
onRoomFound("-1");
}
function onRoomFound(roomNum) {
trace(("[SubChat] ----- ROOM FOUND ----------- (" + roomNum) + ")");
roomID = roomNum;
if (roomNum == "-1") {
createRoom();
} else {
changeRoom();
}
}
function createRoom(houseData) {
trace("[SubChat] ----- CREATING ROOM NAME: " + roomName);
sushi.me.createRoom(roomName, "gaia", onNewRoom, this);
}
function onNewRoom(error, id) {
switch (error) {
case 0 :
roomID = id;
trace(("[SubChat] ----- NEW ROOM ----------- (" + roomID) + ")");
roomTries = 0;
changeRoom();
break;
case 1 :
trace(("[SubChat] ----- Create Room Failed (" + error) + ")");
if (roomTries <= TOTAL_ROOM_TRIES) {
clearPauseProc();
retryPause = setInterval(this, "retryRoom", ROOM_RETRY_PAUSE);
} else {
gotoTrain();
}
break;
case 2 :
default :
trace(("[SubChat] ----- Create Room Failed (" + error) + ")");
gotoTrain();
}
}
function changeRoom() {
if (sushi.me.room == roomID) {
saveUserInfo();
trace(("[SubChat] ----- OOPS!! I'm already in this room ----------- (" + roomID) + ")");
} else {
trace(("[SubChat] ----- CHANGING ROOM ----------- (" + roomID) + ")");
var _local4 = _global.myUserData[1];
var _local6 = _global.myUserData[2];
var _local3 = _global.myUserData[3];
var _local5 = _global.myUserData[0];
if (parseInt(_local3) >= 50) {
sushi.room.lock(roomID, 0);
}
var _local7 = ["-1", "-1", "-1", "", _local6, _local4, _local5, "", _local3, (_global.isMiniAvatar ? "1" : "0"), ""];
sushi.me.changeRoom(roomID, _local7, onRoomChanged, this);
}
}
function onRoomChanged(error) {
switch (error) {
case 0 :
roomTries = 0;
saveUserInfo();
break;
case 3 :
trace(("[SubChat] ----- Change Room Failed (" + error) + ")");
if (roomTries <= TOTAL_ROOM_TRIES) {
clearPauseProc();
retryPause = setInterval(this, "retryRoom", ROOM_RETRY_PAUSE);
} else {
gotoTrain();
}
break;
case 1 :
default :
case 2 :
case 4 :
trace(("[SubChat] ----- Change Room Failed (" + error) + ")");
gotoTrain();
}
}
function saveUserInfo() {
_global.gsiMethod.invoke(200, [_global.gaiaSessionID, _global.mapData[6], sushi.me.id, sushi.me.session, sushi.me.room], writeFinished, this);
}
function writeFinished() {
parentClass.nextSequence();
}
function gotoTrain() {
trace("[SubChat] ----- BACK TO TRAINSTATION -----");
_root.stream.destroySequence();
_global.scene = "toTrain";
_root.stream.loadSequence(_global.scene);
}
function clearPauseProc() {
if (retryPause != null) {
clearInterval(retryPause);
retryPause = null;
}
}
function retryRoom() {
clearPauseProc();
findSubChat();
}
var roomTries = 0;
var TOTAL_ROOM_TRIES = 4;
var ROOM_RETRY_PAUSE = 150;
}
Symbol 115 MovieClip [__Packages.gaiaWordFilter.WordFilter] Frame 0
class gaiaWordFilter.WordFilter
{
function WordFilter () {
}
static function cleanBadWords(raw, filterLv) {
if (isNaN(filterLv)) {
filterLv = Number.POSITIVE_INFINITY;
}
var _local6 = wordListCache["lessThan" + filterLv];
var _local1;
var _local7 = _local6.length;
var _local3 = new String(raw);
var _local5 = new String(_local3.toLowerCase());
var _local2;
if (_local6 == undefined) {
_local6 = makeWordList(filterLv);
_local7 = _local6.length;
}
var _local4 = 0;
while (_local4 < _local7) {
_local2 = _local6[_local4];
_local1 = _local5.indexOf(_local2[BAD_WORD]);
while (_local1 != -1) {
_local3 = new String((_local3.substr(0, _local1) + _local2[CLEAN_WORD]) + _local3.substr(_local1 + _local2[WORD_LEN]));
_local1 = _local5.indexOf(_local2[0], _local1 + 1);
}
_local4++;
}
return(_local3);
}
static function cleanBrackets(raw) {
var _local1;
var _local2 = new String(raw);
_local1 = _local2.indexOf(">");
while (_local1 != -1) {
_local2 = new String((_local2.substr(0, _local1) + ">") + _local2.substr(_local1 + 1));
_local1 = _local2.indexOf(">", _local1 + 1);
}
_local1 = _local2.indexOf("<");
while (_local1 != -1) {
_local2 = new String((_local2.substr(0, _local1) + "<") + _local2.substr(_local1 + 1));
_local1 = _local2.indexOf("<", _local1 + 1);
}
return(_local2);
}
static function cleanBracketsAndBadWords(raw, filterLv) {
return(cleanBrackets(cleanBadWords(raw, filterLv)));
}
static function noBadWords(raw, filterLv) {
if (isNaN(filterLv)) {
filterLv = Number.POSITIVE_INFINITY;
}
var _local5 = wordListCache["lessThan" + filterLv];
var _local2 = _local5.length;
var _local4;
var _local3;
var _local7 = new String(raw.toLowerCase());
var _local6 = true;
if (_local5 == undefined) {
_local5 = makeWordList(filterLv);
_local2 = _local5.length;
}
var _local1 = 0;
while (_local1 < _local2) {
_local4 = _local5[_local1];
_local3 = _local7.indexOf(_local4[BAD_WORD]);
if (_local3 != -1) {
_local6 = false;
_local1 = _local2;
}
_local1++;
}
return(_local6);
}
static function noBrackets(raw) {
var _local1;
var _local2 = true;
_local1 = raw.indexOf(">");
if (_local1 != -1) {
_local2 = false;
}
_local1 = raw.indexOf("<");
if (_local1 != -1) {
_local2 = false;
}
return(_local2);
}
static function noBracketsOrBadWords(raw, filterLv) {
return(noBadWords(raw, filterLv) && (noBrackets(raw)));
}
static function makeWordList(filterLv) {
var _local4 = MASTER_WORD_LIST.length;
var _local2 = new Array();
if (isNaN(filterLv)) {
filterLv = Number.POSITIVE_INFINITY;
}
var _local1 = 0;
while (_local1 < _local4) {
if (MASTER_WORD_LIST[_local1][FILTER_LV] <= filterLv) {
_local2.push([MASTER_WORD_LIST[_local1][BAD_WORD], MASTER_WORD_LIST[_local1][CLEAN_WORD], MASTER_WORD_LIST[_local1][BAD_WORD].length]);
}
_local1++;
}
wordListCache["lessThan" + filterLv] = _local2;
return(_local2);
}
static function getBadWords(filterLv) {
var _local2 = new Array();
var _local4 = MASTER_WORD_LIST.length;
if (isNaN(filterLv)) {
filterLv = Number.POSITIVE_INFINITY;
}
var _local1 = 0;
while (_local1 < _local4) {
if (MASTER_WORD_LIST[_local1][FILTER_LV] <= filterLv) {
_local2.push(MASTER_WORD_LIST[_local1][BAD_WORD]);
}
_local1++;
}
return(_local2);
}
static function getBadWordData(filterLv) {
var _local3 = new Array();
var _local2;
var _local5 = MASTER_WORD_LIST.length;
if (isNaN(filterLv)) {
filterLv = Number.POSITIVE_INFINITY;
}
var _local1 = 0;
while (_local1 < _local5) {
if (MASTER_WORD_LIST[_local1][FILTER_LV] <= filterLv) {
_local2 = new Object();
_local2.word = MASTER_WORD_LIST[_local1][BAD_WORD];
_local2.cleanedWord = MASTER_WORD_LIST[_local1][CLEAN_WORD];
_local2.filterLevel = MASTER_WORD_LIST[_local1][FILTER_LV];
_local3.push(_local2);
}
_local1++;
}
return(_local3);
}
static var BAD_WORD = 0;
static var CLEAN_WORD = 1;
static var FILTER_LV = 2;
static var WORD_LEN = 2;
static var wordListCache = {};
static var MASTER_WORD_LIST = [["\u5350", "****", 0], ["nigger", "****", 0], ["logicalgamer", "****", 0], ["asshole", "****", 1], ["asswad", "****", 1], ["blowjob", "****", 1], ["bukkake", "****", 1], ["bukake", "****", 1], ["buttsex", "****", 1], ["buttshecks", "****", 1], ["clit", "****", 1], ["cocksuck", "****", 1], ["cock", "****", 1], ["cum", "****", 1], ["cunt", "****", 1], ["cyber", "****", 1], ["dick", "****", 1], ["dildo", "****", 1], ["dyke", "****", 1], ["faggot", "****", 1], ["fag", "****", 1], ["fuck", "****", 1], ["fuk", "****", 1], ["futanari", "****", 1], ["futa", "****", 1], ["feltch", "****", 1], ["gaywad", "****", 1], ["gayfer", "****", 1], ["guro", "****", 1], ["gook", "****", 1], ["homo", "****", 1], ["jiz", "****", 1], ["kike", "****", 1], ["kunt", "****", 1], ["lez", "****", 1], ["nepio", "****", 1], ["nigga", "****", 1], ["nudes", "****", 1], ["nip", "****", 1], ["paedo", "****", 1], ["penis", "****", 1], ["prick", "****", 1], ["phuc", "****", 1], ["porn", "****", 1], ["prons", "****", 1], ["pronz", "****", 1], ["pussy", "****", 1], ["poon", "****", 1], ["rape", "****", 1], ["rapist", "****", 1], ["shit", "****", 1], ["slut", "****", 1], ["syber", "****", 1], ["titties", "****", 1], ["tit", "****", 1], ["twat", "****", 1], ["wetback", "****", 1], ["whore", "****", 1], ["yaoi", "****", 1], ["yuri", "****", 1], ["hebe", "****", 1], ["pedo", "****", 1], ["anal", "****", 4], ["bastard", "****", 4], ["bitch", "****", 4], ["chink", "****", 4], ["choad", "****", 4], ["chode", "****", 4], ["coon", "****", 4], ["douche", "****", 4], ["dike", "****", 4], ["horny", "****", 4], ["hump", "****", 4], ["heeb", "****", 4], ["queer", "****", 4], ["sex", "****", 4], ["vagina", "****", 4], ["anus", "****", 9], ["boner", "****", 9], ["boob", "****", 9]];
}
Symbol 116 MovieClip [__Packages.structures.classes.Stands] Frame 0
class structures.classes.Stands
{
var shop;
function Stands (shopMc) {
shop = shopMc;
enableRollover();
}
function enableRollover() {
shop.sensor.rollOver = function () {
trace("ROOL WITH ME");
};
}
function hideMenu() {
}
}
Symbol 117 MovieClip [__Packages.structures.classes.Pool] Frame 0
class structures.classes.Pool extends MovieClip
{
var baseMc, poolBitmapData;
function Pool () {
super();
}
function init(base) {
baseMc = base;
var _local4 = "poolDepth_" + _global.poolNum;
poolBitmapData = flash.display.BitmapData.loadBitmap(_local4);
var _local3 = baseMc.createEmptyMovieClip("mc", baseMc.getNextHighestDepth());
_local3.attachBitmap(poolBitmapData, _local3.getNextHighestDepth());
_local3._x = -340;
_local3._y = -120;
_local3._visible = true;
}
function getBitmapData(x, y) {
x = x + 320;
y = y + 120;
var _local2 = poolBitmapData.getPixel(x, y) * 1E-5;
if (_local2 != 0) {
var _local3 = Math.round((200 - _local2) / 3);
return(_local3);
}
}
}
Symbol 118 MovieClip [__Packages.classes.main.BuildHome] Frame 0
class classes.main.BuildHome
{
var parentClass, curProgress;
function BuildHome (pClass) {
parentClass = pClass;
_global.gBroadcaster.addListener(this);
_root.ui_mc.navArrows.setMapSize(740, 580);
_root.ui_mc.navArrows.clearCallback(ui.JumpPoints.ALL);
_root.ui_mc.navArrows.disable(ui.JumpPoints.ALL);
_global.myToyManager.disableCurrentToy();
_root.getURL((("http://" + _root.gsiUrl) + ".gaiaonline.com/launch/house?houseID=") + _global.gHouseOwnerId, "_self");
}
function run() {
var _local5 = _global.gCanvas.getBytesLoaded();
var _local4 = _global.gCanvas.getBytesTotal();
_root.loadBar.totalbyte = (_local5 + " ") + _local4;
_root.loadBar.bar._xscale = curProgress + ((_local5 / _local4) * 100);
if ((_local5 == _local4) && (_local4 != 0)) {
if (_global.gCanvas._currentframe != 0) {
_global.gBroadcaster.removeListener(this);
_global.gCanvas.createEmptyMovieClip("chat_mc", 9394);
parentClass.nextSequence();
}
}
}
}
Symbol 119 MovieClip [__Packages.classes.main.BuildTownHomes] Frame 0
class classes.main.BuildTownHomes
{
var parentClass;
function BuildTownHomes (pClass) {
parentClass = pClass;
if (_global.mapHomeData.length == 1) {
if ((_global.mapData[13] == 1) && (_global.sponsorshipEvent == "housebunny")) {
_global.gHomes[1] = new classes.house.BunnyHouse(this);
} else {
_root.loadBar.info = "";
_root.loadBar._visible = false;
parentClass.nextSequence();
}
} else {
var _local5 = _global.mapHomeData.length;
var _local4 = 1;
while (_local4 < _local5) {
_global.gHomes[_local4] = new classes.house.TownHouse(this, _local4, _global.mapHomeData[_local4]);
_local4++;
}
}
}
function errorMsg(meth, errCode, errMsg) {
parentClass.errorMsg(meth, errCode, errMsg);
}
function doneLoad() {
doneLoadCount++;
if (doneLoadCount == (_global.mapHomeData.length - 1)) {
_root.loadBar.info = "";
_root.loadBar._visible = false;
parentClass.nextSequence();
}
}
function singleHomeLoaded() {
_root.loadBar.info = "";
_root.loadBar._visible = false;
parentClass.nextSequence();
}
var doneLoadCount = 0;
}
Symbol 120 MovieClip [__Packages.classes.house.BunnyHouse] Frame 0
class classes.house.BunnyHouse
{
var parentClass, house, bound, swfListener, retry, range;
function BunnyHouse (pClass) {
parentClass = pClass;
house = _global.gCanvas.clipping_canvas.house_1;
bound = _global.gCanvas.mask_canvas.house_1;
house.createEmptyMovieClip("house" + (houseCount++), 1);
loadHouse();
}
function loadHouse() {
var thisClass = this;
swfListener = new Object();
swfListener.onLoadStart = function (target_mc) {
_root.loadBar.bar._xscale = 0;
_root.loadBar.info = "Loading Homes: " + thisClass.niceZip;
};
swfListener.onLoadProgress = function (target_mc, bytesLoaded, bytesTotal) {
_root.loadBar.bar._xscale = (bytesLoaded / bytesTotal) * 100;
};
swfListener.onLoadInit = function (target_mc) {
_root.loadBar.bar._xscale = 0;
_root.loadBar.info = "";
thisClass.retry = 0;
thisClass.houseSetUp();
};
var _local4 = new MovieClipLoader();
_local4.addListener(swfListener);
var _local5 = _global.filePath + "house/barton_standard/housebunny.swf";
bound.loadMovie(_global.filePath + "house/barton_mask/housebunny.swf");
if (_local5 != "") {
_local4.loadClip(_local5, house);
} else {
parentClass.singleHomeLoaded();
}
}
function retryServer(target_mc, errorCode, httpStatus, style) {
if (retry <= 3) {
loadHouse(style);
}
parentClass.errorMsg(target_mc, errorCode, httpStatus);
retry++;
}
function houseSetUp() {
house.sensor.ref = this;
house.sensor.onPress = function () {
this.ref.showMenu();
};
range = new classes.range.Range(house, 60, house.doorStep._x, house.doorStep._y);
parentClass.singleHomeLoaded();
}
function showMenu() {
var _local3 = range.testRange(_global.gAvMan.getMyAvatar().feet);
if (_local3) {
var thisClass = this;
house.sensor.enabled = false;
_global.uiCtrl.houseBunnyMenu();
house.onEnterFrame = function () {
var _local3 = thisClass.range.testRange(_global.gAvMan.getMyAvatar().feet);
if (_local3 == false) {
delete this.onEnterFrame;
thisClass.hideMenu();
}
};
}
}
function hideMenu() {
house.sensor.enabled = true;
_global.uiCtrl.menu(house, false);
}
function enterHome() {
}
function roomData(noErr, info, thisClass) {
var _local3 = ((info.length == 2) ? true : false);
if (_local3) {
if (info[1] != 0) {
thisClass.lockedHome();
} else {
enteringHome();
}
} else if (info[4] != 0) {
thisClass.lockedHome();
} else {
enteringHome();
}
}
function enteringHome() {
var _local3 = Number(getVersion().split(" ")[1].split(",")[0]);
if (_local3 < 8) {
_global.gAvMan.getMyAvatar().displayTextBubble("Download Flash Player 8 to view this house. http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash");
_root.ui_mc.historyPanel.echo("Download Flash Player 8 to view this house. http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash\n");
_global.gAvMan.getMyAvatar().lockWalking(false);
} else {
_root.stream.destroySequence();
_global.scene = "toHome";
_root.stream.loadSequence(_global.scene);
}
}
function setInHouse(style) {
house.unloadMovie();
delete range;
var thisClass = this;
var _local4 = new Object();
_local4.onLoadInit = function (target_mc) {
thisClass.house.sensor.ref = thisClass;
thisClass.house.sensor.onPress = function () {
this.ref.showMenu();
};
thisClass.range = new classes.range.Range(thisClass.house, 30, thisClass.house.doorStep._x, thisClass.house.doorStep._y);
};
var _local3 = new MovieClipLoader();
_local3.addListener(_local4);
_local3.loadClip(((_global.filePath + "house/barton_standard/") + style) + ".swf", house);
}
function remove() {
house.removeMovieClip();
bound.unloadMovie();
delete range;
}
static var houseCount = 1;
}
Symbol 121 MovieClip [__Packages.classes.house.TownHouse] Frame 0
class classes.house.TownHouse
{
var parentClass, retry, housePlot, niceZip, houseZipCode, houseData, house, bound, swfListener, range, mailRange, holloweenHouse, christmasHouse;
function TownHouse (pClass, home, hData) {
parentClass = pClass;
var thisClass = this;
var houseLoc = ("house_" + hData[3]);
retry = 0;
housePlot = home;
niceZip = (((housePlot + "") + _global.mapData[0].substring(0, 1)) + " Barton ") + _global.mapData[0].substr(2, 8);
houseZipCode = (housePlot + "") + _global.mapData[0];
houseData = hData;
var style = parseInt(hData[4]);
house = eval ("_global.gCanvas.clipping_canvas." + houseLoc);
bound = eval ("_global.gCanvas.mask_canvas." + houseLoc);
house.createEmptyMovieClip("house" + (houseCount++), 1);
loadHouse(style);
}
function loadHouse(style) {
var thisClass = this;
var currentStyle = style;
swfListener = new Object();
swfListener.onLoadError = function (target_mc, errorCode, httpStatus) {
thisClass.retryServer(target_mc, errorCode, httpStatus, currentStyle);
};
swfListener.onLoadStart = function (target_mc) {
_root.loadBar.bar._xscale = 0;
_root.loadBar.info = "Loading Homes: " + thisClass.niceZip;
};
swfListener.onLoadProgress = function (target_mc, bytesLoaded, bytesTotal) {
_root.loadBar.bar._xscale = (bytesLoaded / bytesTotal) * 100;
};
swfListener.onLoadInit = function (target_mc) {
_root.loadBar.bar._xscale = 0;
_root.loadBar.info = "";
thisClass.retry = 0;
thisClass.houseSetUp();
};
var _local5 = new MovieClipLoader();
_local5.addListener(swfListener);
var _local4 = "";
switch (style) {
case 1 :
_local4 = "";
break;
case 2 :
_local4 = "house/vacant.swf";
break;
case 9 :
_local4 = "house/reserved.swf";
break;
case 10 :
_local4 = "house/reserved.swf";
break;
default :
_local4 = setHouseEventStyle(style);
bound.loadMovie(((_global.filePath + "house/barton_mask/") + style) + ".swf");
}
if (_local4 != "") {
_local5.loadClip(_local4, house);
} else {
parentClass.doneLoad();
}
}
function setHouseEventStyle(style) {
var _local2;
switch (parseInt(_global.eventID)) {
case _global.EVENT_HALLOWEEN :
_local2 = ((_global.filePath + "house/barton_holloween/") + style) + ".swf";
break;
case _global.EVENT_WINTER :
_local2 = ((_global.filePath + "house/barton_winter/") + style) + ".swf";
break;
case _global.EVENT_XMAS :
_local2 = ((_global.filePath + "house/barton_christmas/") + style) + ".swf";
break;
default :
_local2 = ((_global.filePath + "house/barton_standard/") + style) + ".swf";
}
return(_local2);
}
function retryServer(target_mc, errorCode, httpStatus, style) {
if (retry <= 3) {
loadHouse(style);
}
parentClass.errorMsg(target_mc, errorCode, httpStatus);
retry++;
}
function houseSetUp() {
house.sensor.ref = this;
house.sensor.onPress = function () {
this.ref.showMenu();
};
range = new classes.range.Range(house, 30, house.doorStep._x, house.doorStep._y);
if (_global.gHouseId == houseData[3]) {
_global.gCanvas.clipping_canvas.startPoint._x = 0 + (house._x + house.doorStep._x);
_global.gCanvas.clipping_canvas.startPoint._y = 0 + (house._y + house.doorStep._y);
_global.gHouseId = 0;
}
if (houseData[1] == _global.myUserData[0]) {
if (_global.myUserData[10] > 0) {
house.mailbox.gotoAndStop(2);
}
mailRange = new classes.range.Range(house, 30, house.mailbox._x, house.mailbox._y);
house.mailbox.ref = this;
house.mailbox.onPress = function () {
this.ref.showMail();
};
}
if (parseInt(_global.eventID) == _global.EVENT_HALLOWEEN) {
holloweenHouse = new classes.house.HolloweenHouse(housePlot, house, houseData);
} else if (parseInt(_global.eventID) == _global.EVENT_XMAS) {
christmasHouse = new classes.house.ChristmasHouse(housePlot, house, houseData);
}
parentClass.doneLoad();
}
function showMail() {
var _local3 = mailRange.testRange(_global.gAvMan.getMyAvatar().feet);
if (_local3) {
house.mailbox.gotoAndStop(1);
getURL ("http://www.gaiaonline.com/profile/privmsg.php?folder=inbox&sid=" + _global.gaiaSessionID, "mail", "GET");
}
}
function showMenu() {
var _local3 = range.testRange(_global.gAvMan.getMyAvatar().feet);
if (_local3) {
var thisClass = this;
house.sensor.enabled = false;
_global.uiCtrl.menu(house, true, houseData, houseZipCode);
house.onEnterFrame = function () {
var _local3 = thisClass.range.testRange(_global.gAvMan.getMyAvatar().feet);
if (_local3 == false) {
delete this.onEnterFrame;
thisClass.hideMenu();
}
};
}
}
function hideMenu() {
house.sensor.enabled = true;
_global.uiCtrl.menu(house, false);
}
function enterHome() {
_global.gAvMan.getMyAvatar().lockWalking(true);
_global.gHouseOwnerId = houseData[1];
_global.gHouseId = housePlot;
_global.gHouseOwnerName = houseData[2];
trace("x on enterHome=" + _global.gAvMan.getMyAvatar().getX());
trace("y on enterHome=" + _global.gAvMan.getMyAvatar().getY());
var _local4 = new classes.controllers.JumpController();
_local4.rememberStart(_global.gAvMan.getMyAvatar().getX(), _global.gAvMan.getMyAvatar().getY());
var _local3 = (((_global.mapData[0] + "S") + _global.gHouseOwnerId) + "#") + _global.gHouseOwnerName;
_global.gsiMethod.invoke(391, [_local3, _global.gaiaSessionID], roomData, this);
}
function roomData(noErr, info, thisClass) {
if (parseInt(_global.myUserData[3]) >= 50) {
enteringHome();
} else {
var _local4 = ((info.length == 2) ? true : false);
if (_local4) {
if (info[1] != 0) {
thisClass.lockedHome();
} else {
enteringHome();
}
} else if (info[4] != 0) {
thisClass.lockedHome();
} else {
enteringHome();
}
}
}
function lockedHome() {
_global.gAvMan.getMyAvatar().emoteBubble.playCollectEmote("characters", "lock");
_global.gAvMan.getMyAvatar().lockWalking(false);
}
function enteringHome() {
var _local3 = Number(getVersion().split(" ")[1].split(",")[0]);
if (_local3 < 8) {
_global.gAvMan.getMyAvatar().displayTextBubble("Download Flash Player 8 to view this house. http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash");
_root.ui_mc.historyPanel.echo("Download Flash Player 8 to view this house. http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash\n");
_global.gAvMan.getMyAvatar().lockWalking(false);
} else {
_root.stream.destroySequence();
_global.scene = "toHome";
_root.stream.loadSequence(_global.scene);
}
}
function establishHome() {
var _local3 = housePlot + _global.mapData[0];
if (houseData[4] == 2) {
_global.gsiMethod.invoke(319, [_local3, _global.gaiaSessionID], moveInResult, this);
} else {
_global.gsiMethod.invoke(318, [_local3, _global.gaiaSessionID], moveInResult, this);
}
}
function moveInResult(noErr, info, thisClass) {
if (noErr == true) {
_global.gsc.sendUserMessage("300", 1, parseInt(_global.sushi.me.room), [thisClass.housePlot, info]);
} else {
_global.gAvMan.getMyAvatar().emoteBubble.playEmote(2, "poed");
}
}
function showNewHouse(theData) {
var _local2 = theData.split(",");
houseData[0] = _local2[0];
houseData[1] = _local2[1];
houseData[2] = _local2[2];
var _local3 = (houseData[4] = _local2[5]);
setInHouse(_local3);
}
function setInHouse(style) {
house.unloadMovie();
delete range;
var thisClass = this;
var _local4 = new Object();
_local4.onLoadInit = function (target_mc) {
thisClass.house.sensor.ref = thisClass;
thisClass.house.sensor.onPress = function () {
this.ref.showMenu();
};
thisClass.range = new classes.range.Range(thisClass.house, 30, thisClass.house.doorStep._x, thisClass.house.doorStep._y);
};
var _local3 = new MovieClipLoader();
_local3.addListener(_local4);
_local3.loadClip(((_global.filePath + "house/barton_standard/") + style) + ".swf", house);
}
function remove() {
house.removeMovieClip();
bound.unloadMovie();
delete range;
}
function lights(lightOn, lightLayer, num) {
if (lightOn == true) {
switch (houseData[4]) {
case "1" :
case "2" :
case "9" :
case "10" :
break;
default :
var lighting = eval ((lightLayer + ".light") + num);
if (lighting != undefined) {
break;
}
lighting = lightLayer.attachMovie("light", "light" + num, lightLayer.getNextHighestDepth());
lighting._x = lightLayer._x + (house._x + house.lamp._x);
lighting._y = lightLayer._y + (house._y + house.lamp._y);
}
} else {
lightLayer.unloadMovie();
}
}
static var houseCount = 1;
}
Symbol 122 MovieClip [__Packages.classes.house.ChristmasHouse] Frame 0
class classes.house.ChristmasHouse
{
var carolID, interval;
function ChristmasHouse (houseNum, house_mc, houseData) {
var thisClass = this;
var _local2 = house_mc.pumpkin;
carolID = "";
addCandy(houseNum, house_mc);
_local2.gotoAndStop(2);
_local2.onRelease = function () {
thisClass.giveCandy(this);
};
}
function addCandy(houseNum, house) {
var _local5 = _global.eventData.length;
if (_local5 == undefined) {
_local5 = 0;
}
var _local3 = 0;
while (_local3 <= _local5) {
if (parseInt(_global.eventData[_local3][1]) == houseNum) {
carolID = _global.eventData[_local3][0];
trace((("CAROL: " + houseNum) + " ") + carolID);
break;
}
_local3++;
}
}
function giveCandy(dispenser) {
var thisClass = this;
if (dispenser.hitTest(_global.gAvMan.getMyAvatar().avClip)) {
if (disableClick == false) {
dispenser.gotoAndStop(3);
disableClick = true;
dispenser.onEnterFrame = function () {
if (this._currentframe == 2) {
if (_root.ui_mc.mapInfo.eventInv.qty == "Max") {
thisClass.carolID = "";
}
thisClass.saveCandy(this._parent);
delete this.onEnterFrame;
}
};
trace("I'm CAROLING!!");
}
}
}
function saveCandy(house) {
trace("SAVING CAROL ID: " + carolID.toString());
if (_global.sushi.connectionType != "") {
_global.gsc.sendUserMessage(1, 1, parseInt(_global.sushi.me.room), ["1", "notes"]);
} else {
_global.gAvMan.getMyAvatar().emoteBubble.playEmote(1, "notes");
}
if (carolID != "") {
_global.gsiMethod.invoke(367, [_global.jumpZip, carolID, 8, _global.gaiaSessionID], saveCandyResult, this);
} else {
miss();
}
}
function saveCandyResult(noErr, info, thisClass) {
if (noErr == true) {
thisClass.carolID = "";
trace("move caroling inventory: " + info[0].toString());
_global.uiCtrl.moveEventInv(parseInt(info[0]));
interval = setInterval(this, "cheer", 1000);
} else {
thisClass.miss();
}
}
function miss() {
trace("miss candy - cry T_T");
interval = setInterval(this, "cry", 1000);
}
function cry() {
_global.gAvMan.getMyAvatar().emoteBubble.playEmote(2, "cry");
clearInterval(interval);
interval = null;
disableClick = false;
}
function cheer() {
_global.gAvMan.getMyAvatar().emoteBubble.playCollectEmote("cheer", "cheer_1");
clearInterval(interval);
interval = null;
disableClick = false;
}
function grantEnabled() {
trace("ENABLE GRANT");
}
function grant() {
}
var disableClick = false;
}
Symbol 123 MovieClip [__Packages.classes.house.HolloweenHouse] Frame 0
class classes.house.HolloweenHouse
{
var candyID, candyType;
function HolloweenHouse (houseNum, house_mc, houseData) {
var thisClass = this;
_root.ui_mc.mapInfo.eventHalloweenInv._visible = true;
var _local3 = house_mc.pumpkin;
candyID = (candyType = "");
addCandy(houseNum, house_mc);
_local3.gotoAndStop(2);
_local3.onRelease = function () {
thisClass.giveCandy(this);
};
}
function addCandy(houseNum, house) {
var _local5 = _global.eventData.length;
if (_local5 == undefined) {
_local5 = 0;
}
var _local3 = 0;
while (_local3 <= _local5) {
if (parseInt(_global.eventData[_local3][1]) == houseNum) {
var _local4 = _global.eventData[_local3][2];
trace("[HHouse] candy img: " + _local4);
candyID = _global.eventData[_local3][0];
candyType = "h2k10_candy_" + Math.ceil(Math.random() * 8).toString();
trace("[HHouse] candy type: " + candyType);
break;
}
_local3++;
}
}
function giveCandy(dispenser) {
var thisClass = this;
if (dispenser.hitTest(_global.gAvMan.getMyAvatar().avClip)) {
if (disableClick == false) {
dispenser.gotoAndStop(3);
disableClick = true;
dispenser.onEnterFrame = function () {
if (this._currentframe == 2) {
thisClass.disableClick = false;
if (_root.ui_mc.mapInfo.eventHalloweenInv.qty.text == "Max") {
thisClass.candyID = "";
}
thisClass.saveCandy(this._parent);
delete this.onEnterFrame;
}
};
trace("[HHouse] I'm giving candy!!");
}
}
}
function saveCandy(house) {
if (candyID != "") {
trace("[HHouse] SAVING CANDY ID: " + candyID);
_global.gsiMethod.invoke(367, [_global.jumpZip, candyID, 7, _global.gaiaSessionID], saveCandyResult, this);
} else {
missCandy();
}
}
function saveCandyResult(noErr, info, thisClass) {
if (noErr == true) {
_global.gAvMan.getMyAvatar().emoteBubble.playCollectEmote("candy", thisClass.candyType);
if (_global.sushi.connectionType != "") {
_global.gsc.sendUserMessage("611", 1, parseInt(_global.sushi.me.room), ["candy", thisClass.candyType]);
}
thisClass.candyType = (thisClass.candyID = "");
var _local4 = ((parseInt(info[0]) >= 100) ? "Max" : (info + "/100"));
_root.ui_mc.mapInfo.eventHalloweenInv.qty.text = _local4;
} else {
thisClass.missCandy();
}
}
function missCandy() {
_global.gAvMan.getMyAvatar().emoteBubble.playEmote(2, "cry");
}
function grantEnabled() {
trace("[HHouse] ENABLE GRANT");
}
function grant() {
}
var disableClick = false;
}
Symbol 124 MovieClip [__Packages.classes.environment.GST] Frame 0
class classes.environment.GST
{
var enteredSequence, parentClass, theTint, tintEnv, TIME_OUT, ICON_OUT, interval, currentInfo;
function GST (pClass) {
Key.addListener(this);
enteredSequence = new Array();
parentClass = pClass;
theTint = new Object();
tintEnv = new classes.environment.TintEnvironment(_global.gCanvas.clipping_canvas);
TIME_OUT = _root.ui_mc.mapInfo.gstTime;
ICON_OUT = _root.ui_mc.mapInfo.gstIcon;
Color.prototype.setTint = function (transTo) {
var _local2 = new Object();
_local2.ra = transTo[0];
_local2.rb = transTo[1];
_local2.ga = transTo[2];
_local2.gb = transTo[3];
_local2.ba = transTo[4];
_local2.bb = transTo[5];
_local2.aa = transTo[6];
this.setTransform(_local2);
};
start();
getServerTime();
}
function tintMe(tintClip) {
tintEnv.tintMe(tintClip);
}
function setTime(time, icon) {
if (time != undefined) {
TIME_OUT.text = time + " GST";
}
if (icon != undefined) {
ICON_OUT.gotoAndStop(icon);
}
checkTime(icon);
}
function setColor(theTintValues) {
if (theTintValues != undefined) {
theTint = theTintValues;
}
switch (_global.scene) {
case "toHome" :
case "home" :
_root.a = new Color(_global.gCanvas.mcBackgroundOverlay);
_root.a.setTint(theTint);
break;
default :
tintEnv.tintWorld(theTint);
_root.b = new Color(_global.gCanvas.upper);
_root.b.setTint(theTint);
_root.c = new Color(_global.gCanvas.mapTerrain);
_root.c.setTint(theTint);
}
}
function start() {
interval = setInterval(this, "getServerTime", 60000);
}
function stop() {
clearInterval(interval);
}
function getServerTime() {
_global.gsiMethod.invoke("341", [], gstDataResult, this);
}
function checkTime(dayValue) {
var _local3 = ((dayValue == 3) ? true : false);
var _local2 = 1;
while (_local2 <= _global.gHomes.length) {
_global.gHomes[_local2].lights(_local3, _global.gCanvas.forground, _local2);
_local2++;
}
}
function gstDataResult(noError, gstData, gstObject) {
gstObject.currentInfo = gstData;
var _local5 = parseInt(gstData[0]) + 1;
var _local6 = gstData[2].split(",");
gstObject.setTime(gstData[1], _local5);
if (gsiToggle == 0) {
gstObject.setColor(_local6);
}
if (initLoad == true) {
initLoad = false;
_root.loadBar.info = "";
_root.loadBar._visible = false;
gstObject.parentClass.nextSequence();
}
}
function onKeyDown() {
enteredSequence.push(Key.getCode());
var _local3 = unlockSequence.length;
var _local4 = 0;
var _local2 = 0;
while (_local2 < _local3) {
if (enteredSequence[_local2] != unlockSequence[_local2]) {
if (enteredSequence[_local2] != undefined) {
enteredSequence = new Array();
}
}
_local2++;
}
if (enteredSequence.length == _local3) {
enteredSequence = new Array();
lights();
}
}
function lights() {
((gsiToggle == 0) ? (gstTintOff()) : (gstTintOn()));
gsiToggle = ((gsiToggle == 0) ? 1 : 0);
}
function gstTintOn() {
var _local7 = currentInfo[2].split(",");
setColor(_local7);
var _local5 = _global.gCanvas.clipping_canvas;
var _local6;
var _local4;
for (_local6 in _local5) {
_local4 = _local5[_local6];
var _local3 = _local4 + "";
_local3 = _local3.split(".");
_local3 = _local3[3];
if (_local3.substring(0, 6) == "avatar") {
tintEnv.tintThis(_local4, _local7);
}
}
}
function gstTintOff() {
setColor(offTint);
var _local5 = _global.gCanvas.clipping_canvas;
var _local6;
var _local4;
for (_local6 in _local5) {
_local4 = _local5[_local6];
var _local3 = _local4 + "";
_local3 = _local3.split(".");
_local3 = _local3[3];
if (_local3.substring(0, 6) == "avatar") {
tintEnv.tintThis(_local4, offTint);
}
}
}
var initLoad = true;
var unlockSequence = new Array(49, 50, 51, 52, 49, 50, 51, 52);
var offTint = new Array(100, 0, 100, 0, 100, 0, 100);
var gsiToggle = 0;
}
Symbol 125 MovieClip [__Packages.classes.environment.TintEnvironment] Frame 0
class classes.environment.TintEnvironment
{
var curTintValue, tintLayer;
function TintEnvironment (tLayer) {
Color.prototype.setTint = function (transTo) {
var _local2 = new Object();
_local2.ra = transTo[0];
_local2.rb = transTo[1];
_local2.ga = transTo[2];
_local2.gb = transTo[3];
_local2.ba = transTo[4];
_local2.bb = transTo[5];
_local2.aa = transTo[6];
this.setTransform(_local2);
};
curTintValue = [100, 0, 100, 0, 100, 0, 100];
tintLayer = tLayer;
}
function setTint(theTint) {
curTintValue = theTint;
}
function tintWorld(theTint) {
curTintValue = theTint;
var _local5 = tintLayer;
var _local6;
var _local3;
for (_local6 in _local5) {
_local3 = _local5[_local6];
var _local4 = new Color(_local3);
var _local2 = _local3 + "";
_local2 = _local2.split(".");
_local2 = _local2[3];
if (_local2.substring(0, 6) != "avatar") {
_local4.setTint(theTint);
} else {
_local3.setTint();
}
}
}
function tintMe(tintClip) {
var _local2 = new Color(tintClip);
_local2.setTint(curTintValue);
}
function tintThis(tintClip, tintVal) {
var _local1 = new Color(tintClip.avatarContainer);
_local1.setTint(tintVal);
}
}
Symbol 126 MovieClip [__Packages.classes.main.AutoScript] Frame 0
class classes.main.AutoScript
{
function AutoScript (pClass) {
_global.gBots[1].speech.startDialog();
pClass.nextSequence();
}
}
Symbol 127 MovieClip [__Packages.classes.chat.SushiConnection] Frame 0
class classes.chat.SushiConnection
{
var parentClass, sushi, userName, avURL, userLvl, gaiaID, gaiaSessionID, roomName, serverID, sessionID, roomID, serverIP, serverPort, oldServerID, loadingMap, retryPause, oldServerIP;
function SushiConnection (pClass) {
parentClass = pClass;
sushi = _global.sushi;
trace("[SushiConnection] User Data: " + _global.myUserData.join(","));
userName = _global.myUserData[1];
avURL = _global.myUserData[2];
userLvl = _global.myUserData[3];
gaiaID = _global.myUserData[0];
gaiaSessionID = _global.gaiaSessionID;
roomName = _global.mapData[1];
serverID = _global.mapData[6];
sessionID = _global.mapData[7];
roomID = _global.mapData[8];
serverIP = _global.mapData[11];
serverPort = _global.mapData[12];
oldServerID = _global.mapDataOld[6];
loadingMap = true;
sushi.event.onDisconnect.addListener(this);
gotoServer();
}
function destroy() {
sushi.event.onDisconnect.removeListener(this);
}
function onDisconnect() {
oldServerID = -1;
clearPauseProc();
retryPause = setInterval(this, "retryServer", SERVER_RETRY_PAUSE * 8);
}
function gotoServer() {
if (sushi.connectionType == "") {
oldServerID = -1;
}
if (oldServerID != serverID) {
if (sushi.connectionType != "") {
sushi.disconnectFromServer();
}
_root.loadBar.info = "Connecting to Town server: Joining Server";
trace(((("[SushiConnection] ----- JOINING SERVER ----------- (" + serverIP) + " | ") + serverIP) + ")");
serverTries++;
sushi.connectToServer("SOCKET", serverIP, int(serverPort), "GaiaTown", onJoinServer, this);
} else {
trace(((("[SushiConnection] ----- SAME SERVER ----------- (" + serverIP) + " | ") + serverIP) + ")");
findRoom();
}
}
function onJoinServer(error) {
switch (error) {
case 0 :
serverTries = 0;
_root.loadBar.bar._xscale = 25;
_root.loadBar.info = "Connecting to Town server: Joining Session";
joinSession();
break;
case 1 :
default :
case 2 :
case 3 :
trace(("[SushiConnection] ----- Server Connection Failed (" + error) + ")");
_root.loadBar.info = "Connecting to Town server: Joining Server Failed";
if (serverTries <= TOTAL_SERVER_TRIES) {
clearPauseProc();
if (loadingMap) {
retryPause = setInterval(this, "retryServer", SERVER_RETRY_PAUSE * serverTries);
} else {
retryPause = setInterval(this, "retryServer", SERVER_RETRY_PAUSE * serverTries);
}
} else {
parentClass.errorMsg("Town Server", "Joining Server Failed", "Try reloading Gaia Towns. Report this if it fails the second time.");
}
}
}
function authCallback(info) {
if (info == "1") {
findRoom();
} else {
_root.loadBar.info = "Connecting to Town server: Joining Session Failed: Invalid User";
}
}
function joinSession() {
if (sushi.me.session != -1) {
_root.loadBar.info = "Connecting to Town server: Joining Session Failed";
trace("[SushiConnection] ----- OOPS!! I'm already in a sushi session (this is probably a logic bug) --<cleanup performed>---------");
sushi.me.leaveSession();
}
trace("[SushiConnection] ----- JOIN SESSION (lobby) -----------");
sessionTries++;
var _local4 = ["-1", "-1", "-1", "", avURL, userName, gaiaID, "", userLvl, (_global.isMiniAvatar ? "1" : "0"), _global.gaiaSessionID];
sushi.me.joinSession(gaiaID, 1, 1, 1, _local4, onJoinSession, this);
}
function onJoinSession(error) {
switch (error) {
case 0 :
_root.loadBar.bar._xscale = 50;
sessionTries = 0;
findRoom();
break;
case 4 :
_root.loadBar.info = "Connecting to Town server: Joining Session Failed: Already in Towns";
trace(("[SushiConnection] ----- Session Failed (" + error) + ") -name collision-");
parentClass.errorMsg("Town Server", "Joining Session Failed", "You are already logged in to towns. Please close all other towns windows. If you have already closed all towns windows, wait one minute and try again.");
break;
case 1 :
default :
case 2 :
case 3 :
_root.loadBar.info = "Connecting to Town server: Joining Session Failed";
trace(("[SushiConnection] ----- Session Failed (" + error) + ")");
parentClass.errorMsg("Town Server", "Joining Session Failed", "Try reloading Gaia Towns. Report this if it fails the second time.");
}
}
function findRoom() {
var _local4 = _global.mapData[1].split("_");
_root.loadBar.info = "Connecting to Town server: Finding Zipcode " + _local4[1];
trace(("[SushiConnection] ----- FIND ROOM ----------- (" + roomName) + ")");
roomTries++;
findRoomID(roomName);
}
function findRoomID(rmName) {
var _local3 = sushi.session.getRoomIDs();
var _local2 = 0;
while (_local2 < _local3.length) {
if (sushi.room.getName(_local3[_local2]) == rmName) {
onRoomFound(_local3[_local2]);
return(undefined);
}
_local2++;
}
onRoomFound("-1");
}
function onRoomFound(roomNum) {
var _local4 = sushi.room.getNumberOfMembers(roomNum);
trace("[SushiConnection] Room found! " + roomName);
if ((_global.connectionType == "auto") && (!_global.isTeleport)) {
if ((_local4 < TARGET_ROOM_OCCUPANCY) || (_local4 == undefined)) {
needToReInit = true;
if (lastZipInstance >= 9) {
_global.jumpZip = undefined;
_root.stream.destroySequence();
_root.stream.loadSequence("autoConnect");
return(undefined);
}
var _local5 = roomName.split("_" + lastZipInstance).join("_" + zipInstance);
_global.mapData[1] = _local5;
_global.jumpZip = roomName.split("gaiahood_").join("");
roomName = _local5;
lastZipInstance = zipInstance;
zipInstance = zipInstance + 1;
findRoom();
return(undefined);
}
if (needToReInit) {
_global.connectionType = null;
needToReInit = false;
var _local5 = roomName.split("_" + lastZipInstance).join("_" + zipInstance);
_global.mapData[1] = _local5;
_global.jumpZip = roomName.split("gaiahood_").join("");
roomName = _local5;
lastZipInstance = zipInstance;
zipInstance = zipInstance + 1;
_root.stream.loadSequence("town");
return(undefined);
}
}
roomID = roomNum;
if (roomNum == "-1") {
createRoom();
} else {
changeRoom();
}
}
function createRoom() {
var _local4 = _global.mapData[1].split("_");
_root.loadBar.info = ("Connecting to Town server: Create Zipcode " + _local4[1]) + " instance";
trace("[SushiConnection] ----- CREATING ROOM NAME: " + roomName);
sushi.me.createRoom(roomName, "gaia", onNewRoom, this);
}
function onNewRoom(error, id) {
switch (error) {
case 0 :
roomID = id;
trace(("[SushiConnection] ----- NEW ROOM ----------- (" + roomID) + ")");
roomTries = 0;
changeRoom();
break;
case 1 :
trace(("[SushiConnection] ----- Create Room Failed (" + error) + ")");
if (roomTries <= TOTAL_ROOM_TRIES) {
clearPauseProc();
retryPause = setInterval(this, "retryRoom", ROOM_RETRY_PAUSE);
} else {
parentClass.errorMsg("Town Server", "Joining Zipcode Failed", "Try reloading Gaia Towns. Report this if it fails the second time.");
}
break;
case 2 :
default :
trace(("[SushiConnection] ----- Create Room Failed (" + error) + ")");
parentClass.errorMsg("Town Server", "Create Zipcode Failed", "Try reloading Gaia Towns. Report this if it fails the second time.");
}
}
function changeRoom() {
var _local4 = _global.mapData[1].split("_");
_root.loadBar.info = "Connecting to Town server: Joining Zipcode " + _local4[1];
if (sushi.me.room == roomID) {
saveUserInfo();
trace(("[SushiConnection] ----- OOPS!! I'm already in this room ----------- (" + roomID) + ")");
} else {
trace(("[SushiConnection] ----- CHANGING ROOM ----------- (" + roomID) + ")");
var _local5 = ["-1", "-1", "-1", "", avURL, userName, gaiaID, "", userLvl, (_global.isMiniAvatar ? "1" : "0"), ""];
sushi.room.lock(roomID, 0);
sushi.me.changeRoom(roomID, _local5, onRoomChanged, this);
}
}
function onRoomChanged(error) {
switch (error) {
case 0 :
_root.loadBar.bar._xscale = 75;
if (loadingMap == false) {
_root.ui_mc.resetSushiListners();
_root.resetSushiListners();
}
roomTries = 0;
saveUserInfo();
break;
case 3 :
trace(("[SushiConnection] ----- Change Room Failed (" + error) + ")");
if (roomTries <= TOTAL_ROOM_TRIES) {
clearPauseProc();
retryPause = setInterval(this, "retryRoom", ROOM_RETRY_PAUSE);
} else {
parentClass.errorMsg("Town Server", "Joining Zipcode Failed", "Try reloading Gaia Towns. Report this if it fails the second time.");
}
break;
case 1 :
default :
case 2 :
case 4 :
trace(("[SushiConnection] ----- Change Room Failed (" + error) + ")");
parentClass.errorMsg("Town Server", "Joining Zipcode Failed", "Try reloading Gaia Towns. Report this if it fails the second time.");
}
}
function saveUserInfo() {
oldServerIP = serverIP;
if (_root.loadBar.bar._xscale != 100) {
_root.loadBar.bar._xscale = 100;
}
_root.loadBar.info = "Connecting to Town server: Saving Player Location";
parentClass.nextSequence();
}
function writeFinished() {
if (loadingMap == true) {
loadingMap = false;
parentClass.nextSequence();
}
}
function gotoTrain() {
trace("[SushiConnection] ----- BACK TO TRAINSTATION -----");
_root.stream.destroySequence();
_global.scene = "toTrain";
_root.stream.loadSequence(_global.scene);
}
function clearPauseProc() {
if (retryPause != null) {
clearInterval(retryPause);
retryPause = null;
}
}
function retryServer() {
clearPauseProc();
gotoServer();
}
function retrySession() {
clearPauseProc();
joinSession();
}
function retryRoom() {
clearPauseProc();
findRoom();
}
var serverTries = 0;
var TOTAL_SERVER_TRIES = 10;
var SERVER_RETRY_PAUSE = 1500;
var sessionTries = 0;
var TOTAL_SESSION_TRIES = 8;
var SESSION_RETRY_PAUSE = 5000;
var roomTries = 0;
var TOTAL_ROOM_TRIES = 4;
var ROOM_RETRY_PAUSE = 1000;
var TARGET_ROOM_OCCUPANCY = 8;
var lastZipInstance = 5;
var zipInstance = 1;
var needToReInit = false;
}
Symbol 128 MovieClip [__Packages.classes.main.PlayGame] Frame 0
class classes.main.PlayGame
{
var parentClass, sdfx, snowing;
function PlayGame (pClass) {
parentClass = pClass;
_root.loadBar.removeMovieClip();
_root.splash.removeMovieClip();
_root.ui_mc.resetSushiListners();
_root.ui_mc.initWordFilter();
_root.ui_mc.mapInfo.goldAmount = _global.myGold + " g";
_root.resetSushiListners();
sdfx.remove();
sdfx = new classes.environment.SoundEffects();
_global.textBubble = new chatui.chatuiclasses.WordBubblesManager(_root.canvas_mc.chat_mc, 28, _global.filePath + "wordbubble/wordbubble.swf");
var _local4 = new Array();
_local4[0] = "0";
_local4[1] = _global.gaiaSessionID;
_local4[2] = "1.0";
_local4[3] = _global.myUserData[0];
_global.sushi.callPlugin("G_TS_PLUGIN", _local4, missingFunction, _root);
var _local5 = parseInt(_global.eventID);
if ((_local5 == _global.EVENT_XMAS) || (_local5 == _global.EVENT_WINTER)) {
snowing = new classes.environment.Snow(100);
if (_local5 == _global.EVENT_XMAS) {
_root.ui_mc.mapInfo.eventInv._visible = true;
_global.uiCtrl.setUpEventInv();
}
}
parentClass.nextSequence();
}
function missingFunction() {
}
function turnSound(bgmState) {
sdfx.bgmSwitch(bgmState);
}
function destroy() {
sdfx.remove();
snowing.remove();
delete sdfx;
delete snowing;
}
}
Symbol 129 MovieClip [__Packages.classes.environment.SoundEffects] Frame 0
class classes.environment.SoundEffects
{
var backgroundMusic, bgMusic, bgmLayer;
function SoundEffects () {
backgroundMusic = classes.environment.BackgroundMusic.getInstance();
loadSoundFile();
}
function loadSoundFile() {
bgMusic = new Sound(this);
var _local3 = "bgMusic";
if (_global.isInChess && (_global.sponsorshipEvent == "madagascar2")) {
_local3 = "bgMusicMadagascar2";
} else if (parseInt(_global.eventID) == 10) {
_local3 = (((_global.scene == "toHome") || (_global.scene == "home")) ? "bgMusicGhost" : "bgMusicHalloween");
} else if (parseInt(_global.eventID) == _global.EVENT_XMAS) {
_local3 = "bgMusicChristmas";
}
backgroundMusic.startMusic(_local3);
var _local4 = _global.uiCtrl.checkSoundState();
bgmSwitch(_local4);
}
function bgmSwitch(bgmState) {
var _local3 = 50;
switch (_global.scene) {
case "toHome" :
case "home" :
_local3 = 10;
break;
default :
_local3 = 60;
}
((bgmState == true) ? (backgroundMusic.setVol(_local3)) : (backgroundMusic.setVol(0)));
}
function remove() {
bgMusic.stop();
bgmLayer.removeMovieClip();
}
}
Symbol 130 MovieClip [__Packages.classes.environment.BackgroundMusic] Frame 0
class classes.environment.BackgroundMusic
{
static var instance;
var bgSound;
function BackgroundMusic () {
}
static function getInstance() {
if (instance == null) {
instance = new classes.environment.BackgroundMusic();
}
return(instance);
}
function startMusic(music) {
if (beenHere == false) {
bgSound = new Sound(_root);
bgSound.attachSound(music);
bgSound.start(0, 999);
beenHere = true;
}
}
function stopMusic() {
bgSound.stop();
}
function setVol(vol) {
bgSound.setVolume(vol);
}
var beenHere = false;
}
Symbol 131 MovieClip [__Packages.classes.environment.Snow] Frame 0
class classes.environment.Snow
{
var numFlakes, startPoints;
function Snow (nf) {
numFlakes = nf;
startPoints = new Array(numFlakes);
_root.canvas_mc.createEmptyMovieClip("snowLayer", _root.canvas_mc.getNextHighestDepth());
var _local5 = 0;
while (_local5 < numFlakes) {
var _local4 = _root.canvas_mc.snowLayer.attachMovie("flake", "flake" + _local5, _root.canvas_mc.snowLayer.getNextHighestDepth());
_local4._x = random(1024);
_local4._y = random(1024);
var _local6 = random(2) + 1;
_local4.gotoAndStop(_local6);
startPoints[_local5] = [_local4._y, random(50) + 100];
_local5++;
}
_global.gBroadcaster.addListener(this);
}
function run() {
var z = 0;
while (z < numFlakes) {
var aFlake = eval ("_root.canvas_mc.snowLayer.flake" + z);
var dir = ((random(2) == 0) ? -1 : 1);
aFlake._x = aFlake._x + (1 * dir);
aFlake._y = aFlake._y + 2;
var dY = (aFlake._y - startPoints[z][0]);
if (dY > startPoints[z][1]) {
aFlake._alpha = aFlake._alpha - 25;
if (aFlake._alpha <= 0) {
aFlake._alpha = 100;
aFlake._x = random(1024);
aFlake._y = random(1024);
startPoints[z] = [aFlake._y, random(50) + 100];
}
}
z++;
}
}
function remove() {
_global.gBroadcaster.removeListener(this);
var _local4 = 0;
while (_local4 < numFlakes) {
var _local5 = _root.canvas_mc.snowLayer.attachMovie("flake", "flake" + _local4, _root.canvas_mc.snowLayer.getNextHighestDepth());
_local5.removeMovieClip();
_local4++;
}
}
}
Symbol 132 MovieClip [__Packages.chatui.chatuiclasses.WordBubblesManager] Frame 0
class chatui.chatuiclasses.WordBubblesManager
{
var _chatLayer, _wbGroups, _swf, _boundaryPoints;
function WordBubblesManager (ChatLayer, SlideSpeed, Swf, BoundaryPoints, MaxBubble) {
_chatLayer = ChatLayer;
_wbGroups = new Object();
_slideSpeed = SlideSpeed;
_swf = Swf;
_boundaryPoints = BoundaryPoints;
if (MaxBubble != null) {
_maxBubble = MaxBubble;
}
var master = this;
_chatLayer.onEnterFrame = function () {
for (var _local1 in master._wbGroups) {
if (master._wbGroups[_local1].Remove) {
delete master._wbGroups[_local1];
} else {
master._wbGroups[_local1].Render();
}
}
};
}
function AddText(UserName, targetMc, Text, Type, xOffset, yOffset, TargetMCLvl2) {
if ((_wbGroups[UserName] == undefined) || (_wbGroups[UserName] == null)) {
_wbGroups[UserName] = new Array();
var _local3 = new chatui.chatuiclasses.WordBubblesGroup(UserName, targetMc, _chatLayer, Text, _slideSpeed, _swf, Type, xOffset, yOffset, _boundaryPoints, TargetMCLvl2, _maxBubble);
_wbGroups[UserName] = _local3;
} else {
_wbGroups[UserName].AddMessage(Text, Type);
}
}
function Refresh(UserName) {
if ((_wbGroups[UserName] != undefined) && (_wbGroups[UserName] != null)) {
_wbGroups[UserName].Refresh();
}
}
function ClearAll() {
for (var _local2 in _wbGroups) {
_wbGroups[_local2].Clear();
}
}
function Clear(UserName) {
_wbGroups[UserName].Clear();
}
var _slideSpeed = 20;
var _maxBubble = 3;
}
Symbol 133 MovieClip [__Packages.chatui.chatuiclasses.WordBubblesGroup] Frame 0
class chatui.chatuiclasses.WordBubblesGroup
{
var _userName, _targetMc, _chatLayer, _txts, _swf, _boundaryPoints, _wbg, _lastPos, _targetMcSize, _pArray, _lp;
function WordBubblesGroup (UserName, TargetMc, ChatLayer, Text, SlideSpeed, Swf, Type, xOffset, yOffset, BoundaryPoints, TargetMCLvl2, MaxBubble) {
_userName = UserName;
_targetMc = TargetMc;
_chatLayer = ChatLayer;
_txts = new Array();
_slideSpeed = SlideSpeed;
_swf = Swf;
_boundaryPoints = new Array();
if (MaxBubble != undefined) {
_maxBubble = MaxBubble;
}
if (xOffset != undefined) {
_xOffset = xOffset;
}
if (yOffset != undefined) {
_yOffset = yOffset;
}
if (BoundaryPoints[0] != undefined) {
_boundaryPoints[0] = BoundaryPoints[0];
} else {
_boundaryPoints[0] = 0;
}
if (BoundaryPoints[1] != undefined) {
_boundaryPoints[1] = BoundaryPoints[1];
} else {
_boundaryPoints[1] = 0;
}
if (Text != undefined) {
var _local2 = Text.length * 70;
var _local5 = ((-8.33333333333333E-5 * _local2) * _local2) + (2 * _local2);
var _local9 = Math.max(Math.max(_local5 + 400, 3400), _local2);
_txts.push({Text:Text, time:getTimer(), lifespan:_local9, type:Type});
}
_wbg = _chatLayer.createEmptyMovieClip("wbg" + UserName.split(".").join("").split(":").join("").split("/").join(""), _chatLayer.getNextHighestDepth());
var _local3 = new MovieClipLoader();
_local3.addListener(this);
_local3.loadClip(_swf, _wbg);
RebuildPositions(TargetMCLvl2);
_lastPos = {x:_targetMc._x, y:_targetMc._y};
}
function RebuildPositions(targetMcSize) {
var _local2 = new Array();
if (targetMcSize == undefined) {
_targetMcSize = _targetMc;
} else {
_targetMcSize = targetMcSize;
}
_local2[0] = _targetMcSize._width / 2;
_local2[1] = _targetMcSize._height / 3;
_pArray = new Array();
_pArray.push({x:(-WQ) + _xOffset, y:_yOffset});
_pArray.push({x:(_local2[0] - WQ) + _xOffset, y:_yOffset});
_pArray.push({x:((-_local2[0]) - (3 * WQ)) + _xOffset, y:_yOffset});
_pArray.push({x:_local2[0] + _xOffset, y:_local2[1] + _yOffset});
_pArray.push({x:(-_local2[0]) + _xOffset, y:_local2[1] + _yOffset});
_pArray.push({x:_local2[0] + _xOffset, y:(_local2[1] * 2) + _yOffset});
_pArray.push({x:(-_local2[0]) + _xOffset, y:(_local2[1] * 2) + _yOffset});
_pArray.push({x:-WQ, y:_yOffset});
_pArray.push({x:(_local2[0] - WQ) + _xOffset, y:_yOffset});
_pArray.push({x:((-_local2[0]) - (3 * WQ)) + _xOffset, y:_yOffset});
}
function onLoadInit(target) {
_loaded = true;
setMessage();
HitTest();
_wbg._x = _targetMc._x + _pArray[_tPos].x;
if (_tPos <= 6) {
_wbg._y = ((_targetMc._y + _pArray[_tPos].y) - (_targetMcSize._height * 0.85)) - _wbg._height;
} else {
_wbg._y = (_targetMc._y + _wbg._height) - (_targetMcSize._height / 3);
}
}
function AddMessage(Text, Type) {
var _local2 = 230;
if ((_txts.length >= _maxBubble) || (_wbg._height > _local2)) {
_txts.shift();
}
var _local3 = Text.length * 70;
var _local4 = ((-8.33333333333333E-5 * _local3) * _local3) + (2 * _local3);
var _local7 = Math.max(Math.max(_local4 + 400, 3400), _local3);
_txts.push({Text:Text, time:getTimer(), lifespan:_local7, type:Type});
if (_loaded) {
setMessage();
while (_wbg._height > _local2) {
_txts.shift();
setMessage();
}
}
}
function setMessage() {
for (var _local6 in _wbg) {
if (typeof(_wbg[_local6]) == "movieclip") {
_wbg[_local6].removeMovieClip();
}
}
var _local5 = _wbg.attachMovie("NameLabel", "lbl", 5);
_local5.txt.text = _userName;
_local5.mid._width = _local5.txt.textWidth - 2;
if (_local5.mid._width < 20) {
_local5.mid._width = 20;
} else if (_local5.mid._width > 115) {
_local5.mid._width = 115;
}
_local5.right._x = (_local5.mid._x + _local5.mid._width) + _local5.right._width;
var _local4 = 10;
var _local3 = 0;
while (_local3 < _txts.length) {
var _local2 = _wbg.attachMovie("wb1", "wb" + _local3, _local3);
_local2.gotoAndStop(_txts[_local3].type);
_local2.txt.autoSize = true;
_local2.txt.html = true;
_local2.txt.htmlText = _txts[_local3].Text;
_local2.mid._height = _local2.txt.textHeight - 4;
_local2.buttom._y = (_local2.top._height * 2) + _local2.mid._height;
_local2._y = _local4;
_local4 = (_local4 + _local2._height) + 2;
_local3++;
}
_lp = _wbg.attachMovie("lappet", "lappet", 10);
_lp._y = _wbg._height - 2;
_lp._visible = false;
setPos();
}
function setPos() {
var _local3 = _targetMc._x + _pArray[_tPos].x;
var _local2 = 0;
if (_tPos <= 6) {
_local2 = ((_targetMc._y + parseInt(_pArray[_tPos].y)) - (_targetMcSize._height * 0.85)) - _wbg._height;
} else {
_local2 = _targetMc._y;
}
if ((_local3 + _slideSpeed) < _wbg._x) {
_wbg._x = Math.round(_wbg._x - _slideSpeed);
} else if ((_local3 - _slideSpeed) > _wbg._x) {
_wbg._x = Math.round(_wbg._x + _slideSpeed);
} else {
_wbg._x = Math.round(_local3);
}
if ((_local2 + _slideSpeed) < _wbg._y) {
_wbg._y = Math.round(_wbg._y - _slideSpeed);
} else if ((_local2 - _slideSpeed) > _wbg._y) {
_wbg._y = Math.round(_wbg._y + _slideSpeed);
} else {
_wbg._y = Math.round(_local2);
}
if ((_wbg._x == Math.round(_local3)) && (_wbg._y == Math.round(_local2))) {
_render = false;
setLpPos();
} else {
_render = true;
}
}
function setLpPos() {
_lp._y = _wbg._height - _lp._heigh;
var _local2 = (_targetMc._x - _wbg._x) + 10;
if (_local2 < 15) {
_local2 = 15;
} else if (_local2 > (_wbg._width - 15)) {
_local2 = _wbg._width - 15;
}
_lp._x = _local2;
if (_lp._x < (_wbg._width / 2)) {
_lp._xscale = 100;
} else {
_lp._xscale = -100;
}
if (_wbg._y >= _targetMc._y) {
_lp._visible = false;
} else {
_lp._visible = true;
}
}
function messageCheck() {
var _local3 = false;
var _local2 = getTimer();
var _local5 = _local2 - _txts[0].time;
if (_local5 > _txts[0].lifespan) {
_txts.shift();
if (_txts.length > 0) {
var _local4 = _txts[0].lifespan - (_local2 - _txts[0].time);
if (_local4 < 1500) {
_txts[0].lifespan = 1500;
_txts[0].time = _local2;
}
}
_local3 = true;
}
if (_txts.length <= 0) {
Remove = true;
_wbg.removeMovieClip();
}
if (_local3 && (!Remove)) {
setMessage();
}
}
function Render() {
messageCheck();
if (((_targetMc._x != _lastPos.x) || (_targetMc._y != _lastPos.y)) || (_tPos != 0)) {
_render = true;
}
_lastPos = {x:_targetMc._x, y:_targetMc._y};
if (_render) {
messageCheck();
HitTest();
setPos();
setLpPos();
}
}
function Refresh() {
_render = true;
messageCheck();
HitTest();
setPos();
setLpPos();
}
function HitTest() {
var _local2 = {x:_wbg._x, y:_wbg._y, w:_wbg._width, h:_wbg._height};
var _local6 = 0;
while (_local6 < _pArray.length) {
var _local5 = false;
_tPos = _local6;
_local2.x = _targetMc._x + _pArray[_tPos].x;
if (_tPos <= 6) {
_local2.y = ((_targetMc._y + _pArray[_tPos].y) - (_targetMcSize._height * 0.85)) - _local2.h;
} else {
_local2.y = (_targetMc._y + _local2.h) - (_targetMcSize._height / 3);
}
var _local4 = {x:_local2.x, y:_local2.y};
_chatLayer.localToGlobal(_local4);
if ((((_local4.y < _boundaryPoints[1]) || (_local4.x < _boundaryPoints[0])) || ((_local4.x + _local2.w) > Stage.width)) || ((_local4.y + _local2.h) > Stage.height)) {
_local5 = true;
} else {
for (var _local7 in _chatLayer) {
if ((_chatLayer[_local7] != _wbg) && (typeof(_chatLayer[_local7]) == "movieclip")) {
var _local3 = _chatLayer[_local7];
if ((((_local3._x < (_local2.x + _local2.w)) && ((_local3._x + _local3._width) > _local2.x)) && (_local3._y < (_local2.y + _local2.h))) && ((_local3._y + _local3._height) > _local2.y)) {
_local5 = true;
break;
}
}
}
}
if (!_local5) {
break;
}
_local6++;
}
if (_local5 && (_tPos == (_pArray.length - 1))) {
_tPos = 0;
}
}
function Clear() {
_txts = new Array();
for (var _local2 in _wbg) {
if (typeof(_wbg[_local2]) == "movieclip") {
_wbg[_local2].removeMovieClip();
}
}
Remove = true;
_wbg.removeMovieClip();
}
var _loaded = false;
var Remove = false;
var _tPos = 0;
var _slideSpeed = 20;
var _render = false;
var WQ = 34;
var _xOffset = 0;
var _yOffset = 0;
var _maxBubble = 3;
}
Symbol 134 MovieClip [__Packages.classes.environment.MapController] Frame 0
class classes.environment.MapController
{
function MapController (pClass) {
_global.gBroadcaster.addListener(this);
_root.loadBar.info = "";
_root.loadBar._visible = false;
pClass.nextSequence();
}
function run() {
forClipping();
forFlying();
}
function forClipping() {
var _local5 = _global.gCanvas.clipping_canvas;
var _local3;
var _local2;
var _local6 = 0;
for (_local3 in _local5) {
_local2 = _local5[_local3];
if ((_local2.ignoreZorder == false) || ((_local2.ignoreZorder == undefined) && (_local3 != "pool"))) {
var _local4 = int((_local2._y * 500) - _local6);
_local2.swapDepths(_local4);
_local6++;
}
}
}
function forFlying() {
var _local4 = _global.gCanvas.flying_canvas;
var _local6;
var _local2;
var _local5 = 0;
for (_local6 in _local4) {
_local2 = _local4[_local6];
if ((_local2.ignoreZorder == false) || (_local2.ignoreZorder == undefined)) {
var _local3 = int((_local2._y * 500) - _local5);
_local2.swapDepths(_local3);
_local5++;
}
}
}
function destroy() {
_global.gBroadcaster.removeListener(this);
}
}
Symbol 135 MovieClip [__Packages.classes.environment.MapControllerHome] Frame 0
class classes.environment.MapControllerHome
{
var houseNum, propNum, tileWidth, tileHeight, origin, sortedStaticItemArr, dynamicItemArr, gDebugShowFirstDepthArray;
function MapControllerHome (pClass) {
houseNum = (propNum = 0);
tileWidth = 20;
tileHeight = 21;
origin = {x:369, y:212};
pClass.nextSequence();
}
function initProp(type, mc) {
mc._x = int(mc._x);
mc._y = int(mc._y);
var _local4 = _global.gCanvas.mask_canvas;
_local4.attachMovie(type + "_mask", "prop_mask" + (propNum++), _local4.getNextHighestDepth(), {_x:mc._x, _y:mc._y});
}
function registerStaticItemArr(mapType, staticItemArr) {
sortedStaticItemArr = sortZorders3D(staticItemArr, numDepthsBetweenStaticItems);
dTrace("registerStaticItemArr;" + staticItemArr);
}
function initHouse(mapType) {
_global.gBroadcaster.addListener(this);
}
function run() {
if (_global.gCanvas.state == "normal") {
_global.gMapController.sortDynamicItemsAmongStatic(_global.gCanvas.clipping_canvas, _global.gMapController.sortedStaticItemArr);
}
}
function reloadMapGraphics(mapType) {
_global.gCanvas.reloadRoom();
}
function sortDynamicItemsAmongStatic(itemsToAdd, staticItems) {
var _local16;
var _local13;
var _local5;
var _local28;
var _local27;
var _local15;
var _local14;
var _local29;
var _local6;
var _local9;
var _local2;
var _local8 = new Array();
dynamicItemArr = new Array();
for (_local16 in itemsToAdd) {
_local9 = itemsToAdd[_local16];
if (_local9.staticFlag != true) {
_local2 = locToCoords({x:_local9._x, y:_local9._y - 20});
_local9.coords3D = {x:_local2.x, y:_local2.y, z:_local2.z, xMin:_local2.x - 1, xMax:_local2.x, yMin:_local2.y - 1, yMax:_local2.y, zMin:_local2.z, zMax:_local2.z + 8};
dynamicItemArr.push(_local9);
}
}
var _local4;
var _local12;
_local27 = dynamicItemArr.length;
_local15 = staticItems.length;
_local13 = 0;
while (_local13 < _local27) {
_local6 = dynamicItemArr[_local13];
_local5 = 0;
_local14 = false;
while ((!_local14) and (_local5 < _local15)) {
var _local11 = checkInFront(staticItems[_local5].coords3D, _local6.coords3D);
if (_local11 == 1) {
_local14 = true;
_local12 = staticItems[_local5];
}
_local5++;
}
if (_local12 != undefined) {
_local4 = (_local12.getDepth() - numDepthsBetweenStaticItems) + Math.floor((_local6._y / 800) * numDepthsBetweenStaticItems);
} else if (staticItems != undefined) {
_local4 = staticItems[_local15 - 1].getDepth() + Math.floor((_local6._y / 800) * numDepthsBetweenStaticItems);
} else {
_local4 = _local6._y;
}
if (_local8[String(_local4)] != undefined) {
var _local7 = _local4;
while (_local8[String(_local7 + 1)] != undefined) {
_local7++;
}
var _local3 = _local7;
while (_local3 >= _local4) {
_local8[_local3].swapDepths(_local3 + 1);
_local3--;
}
}
_local8[String(_local4)] = _local6;
_local6.swapDepths(_local4);
_local13++;
}
if ((dynamicItemArr.length > 1) and (gDebugShowFirstDepthArray == undefined)) {
gDebugShowFirstDepthArray = true;
}
}
function sortZorders3D(objects, numDepthsBetweenLayers) {
var _local7;
var _local9;
var _local2;
var _local12;
var _local6;
var _local5;
var _local8;
var _local3 = new Array();
for (_local9 in objects) {
_local7 = objects[_local9];
_local2 = 0;
_local5 = _local3.length;
_local6 = _local5;
_local8 = false;
while ((!_local8) and (_local2 < _local5)) {
var _local4 = checkInFront(_local3[_local2].coords3D, _local7.coords3D);
if (_local4 == 1) {
_local8 = true;
_local6 = _local2;
}
_local2++;
}
_local3.splice(_local6, 0, _local7);
}
_local5 = _local3.length;
_local2 = 0;
while (_local2 < _local5) {
_local3[_local2].swapDepths(100 + (_local2 * numDepthsBetweenLayers));
_local3[_local2].zorderDebug = _local2;
_local2++;
}
return(_local3);
}
function sortZorders2D(objects) {
var _local4;
var _local1;
var _local2 = 0;
var _local3;
for (_local4 in objects) {
_local1 = objects[_local4];
_local3 = int((_local1._y * 500) - _local2);
_local1.swapDepths(_local3);
_local2++;
}
}
function checkInFront(coords1, coords2) {
var _local2 = 0;
if (_local2 == 0) {
var _local10 = {xMin:0, xMax:coords1.xMax, yMin:0, yMax:coords1.yMax, zMin:0, zMax:coords1.zMax};
if (intersect3D(_local10, coords2)) {
_local2 = 1;
} else {
var _local9 = {xMin:0, xMax:coords2.xMax, yMin:0, yMax:coords2.yMax, zMin:0, zMax:coords2.zMax};
if (intersect3D(_local9, coords1)) {
_local2 = -1;
}
}
}
if (_local2 == 0) {
if (coords1.xMin < coords2.xMin) {
var _local5 = coords1;
var _local8 = coords2;
} else {
var _local5 = coords2;
var _local8 = coords1;
}
var _local7 = _local8.xMin - _local5.xMin;
var _local6 = _local5.yMin - _local8.yMin;
if (_local7 < _local6) {
if (_local5 == coords1) {
_local2 = 1;
} else {
_local2 = -1;
}
} else if (_local6 < _local7) {
if (_local5 == coords1) {
_local2 = -1;
} else {
_local2 = 1;
}
}
}
return(_local2);
}
function footPrintsIntersect(coords1, coords2) {
var _local5 = {left:coords1.xMin, right:coords1.xMax, top:coords1.yMin, bottom:coords1.yMax};
var _local4 = {left:coords2.xMin, right:coords2.xMax, top:coords2.yMin, bottom:coords2.yMax};
return(intersectRect(_local5, _local4));
}
function union3D(coords1, coords2) {
var _local1 = {xMin:Math.min(coords1.xMin, coords2.xMin), xMax:Math.max(coords1.xMax, coords2.xMax)};
_local1.yMin = Math.min(coords1.yMin, coords2.yMin);
_local1.yMax = Math.max(coords1.yMax, coords2.yMax);
_local1.zMin = Math.min(coords1.zMin, coords2.zMin);
_local1.zMax = Math.max(coords1.zMax, coords2.zMax);
return(_local1);
}
function intersect3D(coords1, coords2) {
var _local5 = false;
var _local2 = union3D(coords1, coords2);
if ((_local2.xMax - _local2.xMin) < ((coords1.xMax - coords1.xMin) + (coords2.xMax - coords2.xMin))) {
if ((_local2.yMax - _local2.yMin) < ((coords1.yMax - coords1.yMin) + (coords2.yMax - coords2.yMin))) {
if ((_local2.zMax - _local2.zMin) < ((coords1.zMax - coords1.zMin) + (coords2.zMax - coords2.zMin))) {
_local5 = true;
}
}
}
return(_local5);
}
function intersectRect(rect1, rect2) {
var _local5 = false;
var _local2 = unionRect(rect1, rect2);
if ((_local2.right - _local2.left) < ((rect1.right - rect1.left) + (rect2.right - rect2.left))) {
if ((_local2.bottom - _local2.top) < ((rect1.bottom - rect1.top) + (rect2.bottom - rect2.top))) {
_local5 = true;
}
}
return(_local5);
}
function unionRect(rect1, rect2) {
var _local1 = new Object();
_local1.left = Math.min(rect1.left, rect2.left);
_local1.right = Math.max(rect1.right, rect2.right);
_local1.top = Math.min(rect1.top, rect2.top);
_local1.bottom = Math.max(rect1.bottom, rect2.bottom);
return(_local1);
}
function coordsToLoc(tCoords, tArea, tLeftWallFlag) {
var _local5;
var _local2 = tCoords.x;
var _local3 = tCoords.y;
var _local4 = tCoords.z;
if (tArea == undefined) {
tArea = "#floor";
}
switch (tArea) {
case "#floor" :
var _local7 = ((_local2 + _local3) * 5) + _local4;
_local5 = {x:((_local2 - _local3) * tileWidth) + origin.x, y:((((_local2 + _local3) * tileWidth) / 2) - ((_local4 - 1) * tileHeight)) + origin.y, depth:_local7};
break;
case "#wall" :
if (tLeftWallFlag) {
_local5 = {x:((-(_local2 + 1)) * tileWidth) + origin.x, y:((((_local2 * tileWidth) / 2) - ((_local3 - 1) * tileHeight)) + origin.y) + 6, depth:_local4};
} else {
_local5 = {x:(origin.x + ((_local2 + 1) * tileWidth)) - 1, y:(((origin.y + ((_local2 * tileWidth) / 2)) - ((_local3 - 1) * tileHeight)) + (tileHeight / 2)) - 5, depth:_local4};
}
}
return(_local5);
}
function locToCoords(coords) {
var _local8 = coords.x;
var _local7 = coords.y;
var _local3 = 0;
var _local2 = (((((_local7 - origin.y) + tileHeight) / tileWidth) * 2) - ((_local8 - origin.x) / tileWidth)) / 2;
var _local4 = ((_local8 - origin.x) / tileWidth) + _local2;
return({x:_local4, y:_local2, z:_local3});
}
function dTrace(str) {
_global.gCanvas.mcDebug.dTrace(str);
}
function debugDisplayCoords3D(obj) {
var _local7 = new Array({x:obj.coords3D.xMin, y:obj.coords3D.yMin, z:0});
var _local4 = 0;
while (_local4 < _local7.length) {
var _local3 = ("mcDot" + obj._name) + _local4;
if (_global.gCanvas[_local3] == undefined) {
_global.gCanvas.attachMovie("debugDot", _local3, _global.gCanvas.getNextHighestDepth());
_global.gCanvas[_local3].gotoAndStop(obj.zorderDebug);
}
var _local6 = coordsToLoc(_local7[_local4], "#floor");
_global.gCanvas[_local3]._x = _local6.x;
_global.gCanvas[_local3]._y = _local6.y;
_global.gCanvas[_local3].coords = Math.floor(obj.coords3D.xMin * 10) / 10;
_global.gCanvas[_local3].coords = _global.gCanvas[_local3].coords + ("," + (Math.floor(obj.coords3D.yMin * 10) / 10));
_global.gCanvas[_local3].coords = _global.gCanvas[_local3].coords + ("," + (Math.floor(obj.coords3D.zMin * 10) / 10));
_local4++;
}
}
var numDepthsBetweenStaticItems = 10000;
}
Symbol 136 MovieClip [__Packages.classes.collectables.Spawn] Frame 0
class classes.collectables.Spawn
{
var interval;
function Spawn (pClass) {
getSpawn();
pClass.nextSequence();
}
function spawned(noError, spawnData) {
if (((noError == false) || (spawnData[0].success == false)) || (spawnData[1].success == false)) {
destroy();
} else {
createSpawns(spawnData[0].data, 1);
createSpawns(spawnData[1].data, 2);
if (parseInt(_global.eventID) == 19) {
createSpawns(spawnData[2].data, 1);
}
clearInterval(interval);
spawner();
}
}
function createSpawns(spawnData, type) {
if (parseInt(spawnData[0]) != 0) {
var _local6 = spawnData.length;
var _local2 = 0;
while (_local2 < _local6) {
var _local5 = _global.spriteBank.length;
var _local4 = 0;
while (_local4 < _local5) {
if (_global.spriteBank[_local4] == spawnData[_local2][0]) {
spawnData[_local2][0] = -1;
break;
}
_local4++;
}
if (spawnData[_local2][0] != -1) {
_global.spriteBank.push(spawnData[_local2][0]);
switch (type) {
case 1 :
_global.gSprite[spriteCount] = new classes.collectables.MovingSprites(spawnData[_local2][0], spawnData[_local2][1], spawnData[_local2][2], spawnData[_local2][3], spawnData[_local2][4], spawnData[_local2][5], spawnData[_local2][6]);
break;
case 2 :
if (spawnData[_local2][1].substr(0, 5) == "trash") {
_global.gSprite[spriteCount] = new classes.collectables.Collectables("trash", 6, spawnData[_local2][1], spawnData[_local2][2], spawnData[_local2][3], spawnData[_local2][0]);
} else {
_global.gSprite[spriteCount] = new classes.collectables.Collectables("flowers", 5, spawnData[_local2][1], spawnData[_local2][2], spawnData[_local2][3], spawnData[_local2][0]);
}
}
spriteCount++;
}
_local2++;
}
}
}
function spawner() {
interval = setInterval(this, "getSpawn", 300000);
}
function stop() {
clearInterval(interval);
interval = null;
}
function getSpawn() {
var _local3 = _global.gsiMethod.queue("360", [_global.mapData[0], _global.gaiaSessionID], spawned, this);
_global.gsiMethod.queue("362", [_global.mapData[0], _global.gaiaSessionID], _local3);
if (parseInt(_global.eventID) == 19) {
_global.gsiMethod.queue("368", [_global.gaiaSessionID], _local3);
}
_global.gsiMethod.send();
}
function destroy() {
var _local3 = 0;
while (_local3 < _global.gSprite.length) {
_global.gSprite[_local3].remove();
_local3++;
}
_global.gSprite = [];
_global.spriteBank = [];
clearInterval(interval);
}
static var spriteCount = 0;
}
Symbol 137 MovieClip [__Packages.classes.collectables.Collectables] Frame 0
class classes.collectables.Collectables
{
var spriteSerial, collectType, swfsrc, gsiID, field, sprite, emoteBubble, equipment, range;
function Collectables (type, id, img, xPos, yPos, serial) {
spriteSerial = serial;
collectType = type;
swfsrc = img;
gsiID = id;
field = _global.gCanvas.clipping_canvas;
sprite = field.createEmptyMovieClip("collect" + itemCount, field.getNextHighestDepth());
itemCount++;
sprite.createEmptyMovieClip("image", 5);
loadSprite(type, img);
sprite._x = xPos;
sprite._y = yPos;
sprite.ref = this;
sprite.ignoreZorder = false;
sprite.onPress = function () {
this.ref.collect();
};
emoteBubble = new classes.environment.EmoteBubble(sprite, "equipment", 0, 0);
switch (type) {
case "trash" :
equipment = "trash";
break;
case "flowers" :
equipment = "shovel";
break;
case "fly" :
case "ground" :
case "rareg" :
case "raref" :
case "easter" :
equipment = "net";
break;
default :
equipment = "trash";
}
range = new classes.range.Range(sprite, 20, 0, -10);
}
function loadSprite(type, img) {
var thisClass = this;
var _local3 = new Object();
_local3.onLoadInit = function (target_mc) {
target_mc.gotoAndStop(1);
thisClass.startMoving();
thisClass.setTint();
};
var _local2 = new MovieClipLoader();
_local2.addListener(_local3);
_local2.loadClip(((("npc/" + type) + "/") + img) + ".swf", sprite.image);
}
function startMoving() {
}
function remove() {
sprite.removeMovieClip();
emoteBubble.remove();
delete emoteBubble;
}
function collect() {
var _local3 = range.testRange(_global.gAvMan.getMyAvatar().range);
if (_local3) {
spriteEnable(false);
emoteBubble.playEquip(equipment);
_global.gsiMethod.invoke("363", [_global.mapData[0], gsiID, spriteSerial], collectResult, this, false);
} else {
emoteBubble.playEquipMiss();
}
}
function taken() {
emoteBubble.playEmote(equipment);
}
function collectResult(noError, saveData, classCall) {
if (noError == false) {
_global.gAvMan.getMyAvatar().emoteBubble.playEmote(2, "poed");
classCall.spriteEnable(true);
} else if (saveData) {
trace((("COLLECTTTTTTTTTTTTTTT: " + collectType) + " ") + swfsrc);
if (_global.sushi.connectionType != "") {
_global.gsc.sendUserMessage("200", 1, parseInt(_global.sushi.me.room), [collectType, swfsrc, spriteSerial]);
} else {
_global.gAvMan.getMyAvatar().emoteBubble.playCollectEmote(collectType, swfsrc);
}
_global.uiCtrl.updateInventory();
classCall.sprite.image._visible = false;
classCall.killMe();
_root.stream.townEvent.update();
} else {
_global.gAvMan.getMyAvatar().emoteBubble.playEmote(2, "poed");
classCall.spriteEnable(true);
}
classCall.emoteBubble.playFade(equipment);
}
function spriteEnable(stat) {
sprite.enabled = stat;
}
function killMe() {
var thisSprite = this;
var killCount = 0;
var toDeath = 30;
sprite.onEnterFrame = function () {
killCount++;
if (killCount >= toDeath) {
delete this.onEnterFrame;
thisSprite.remove();
}
};
}
function setTint() {
_global.gst.tintMe(sprite);
}
static var itemCount = 1;
}
Symbol 138 MovieClip [__Packages.classes.environment.EmoteBubble] Frame 0
class classes.environment.EmoteBubble
{
var xOffset, yOffset, avatar, curScale, mc, xOffScaled, yOffScaled;
function EmoteBubble (m, emoteSet, avScale, xOff, yOff) {
xOffset = ((xOff == undefined) ? 0 : (xOff));
yOffset = ((yOff == undefined) ? 140 : (yOff));
avatar = m;
curScale = avScale;
switch (emoteSet) {
case "character" :
mc = _global.gCanvas.createEmptyMovieClip("emote" + (count++), _global.gCanvas.getNextHighestDepth());
loadMovie ("emotes/emotes.swf", mc);
break;
case "equipment" :
mc = avatar.createEmptyMovieClip("emote" + (count++), avatar.getNextHighestDepth());
loadMovie ("emotes/equipment.swf", mc);
break;
default :
mc = _global.gCanvas.createEmptyMovieClip("emote" + (count++), _global.gCanvas.getNextHighestDepth());
loadMovie ("emotes/emotes.swf", mc);
}
}
function playEmote(bubType, whichEmote) {
mc.bubble.showExpressEmote(bubType, "characters", whichEmote, this);
_global.gBroadcaster.removeListener(this);
_global.gBroadcaster.addListener(this);
xOffScaled = (xOffset * curScale) / 100;
yOffScaled = (yOffset * curScale) / 100;
mc._xscale = curScale;
mc._yscale = mc._xscale;
run();
}
function playCollectEmote(collectType, swfsrc, amount) {
mc.bubble.showCollectEmote(2, collectType, swfsrc, this, amount);
_global.gBroadcaster.removeListener(this);
_global.gBroadcaster.addListener(this);
xOffScaled = (xOffset * curScale) / 100;
yOffScaled = (yOffset * curScale) / 100;
mc._xscale = curScale;
mc._yscale = mc._xscale;
run();
}
function playEquip(equip) {
mc[equip].gotoAndPlay(2);
}
function playEquipMiss() {
mc.attachMovie("miss", "miss", mc.getNextHighestDepth());
}
function playEquipFull() {
mc.attachMovie("full", "full", mc.getNextHighestDepth());
}
function playFade(equip) {
mc[equip].gotoAndPlay("fOut");
}
function done() {
_global.gBroadcaster.removeListener(this);
}
function run() {
if ((_global.mapData[10].indexOf("Hive") == -1) || (_global.mapData[10] == undefined)) {
mc._x = avatar._x - xOffScaled;
mc._y = avatar._y - yOffScaled;
} else {
mc._x = avatar._x - xOffScaled;
mc._y = (avatar._y - yOffScaled) - 60;
}
}
function remove() {
_global.gBroadcaster.removeListener(this);
mc.removeMovieClip();
}
static var count = 0;
}
Symbol 139 MovieClip [__Packages.classes.collectables.MovingSprites] Frame 0
class classes.collectables.MovingSprites extends classes.collectables.Collectables
{
var range, movement, speed, spriteType, sprite, targetY, targetX, angle, dx, dy, stopX, stopY, emoteBubble, equipment, spriteSerial, collectResult;
function MovingSprites (serial, img, type, xPos, yPos, mv, spd) {
super(type, 0, img, xPos, yPos, serial);
range.setPosition(0, 0);
movement = mv;
speed = spd;
spriteType = type;
if ((type == "raref") || (type == "rareg")) {
_global.gAvMan.getMyAvatar().emoteBubble.playEmote(2, "bugeye");
}
switch (type) {
case "ground" :
case "rareg" :
case "easter" :
collisionDetect = true;
break;
default :
sprite.ignoreZorder = true;
}
}
function startMoving() {
_global.gBroadcaster.addListener(this);
}
function getAngle() {
var _local2 = targetY - sprite._y;
var _local3 = targetX - sprite._x;
angle = mode360(((Math.atan2(_local2, _local3) / Math.PI) * 180) + 90);
facing = Math.min(int(angle / 90), 3);
dx = Math.sin((angle * Math.PI) / 180) * speed;
dy = (-Math.cos((angle * Math.PI) / 180)) * speed;
moving = true;
}
function mode360(a) {
return((a + 360) % 360);
}
function stopMove() {
stopX = (stopY = false);
dx = (dy = 0);
moving = false;
orientPose("s");
}
function run() {
if (moving) {
var _local4 = targetX;
var _local3 = targetY;
var _local6 = sprite._x;
var _local5 = sprite._y;
var _local2 = 15;
if (((_local6 + _local2) > _local4) && ((_local6 - _local2) < _local4)) {
stopX = true;
}
if (((_local5 + _local2) > _local3) && ((_local5 - _local2) < _local3)) {
stopY = true;
}
if ((stopX == true) && (stopY == true)) {
stopMove();
} else {
sprite._x = sprite._x + dx;
sprite._y = sprite._y + dy;
if (collisionDetect) {
checkCollision();
}
}
} else if (random(movement) == 1) {
nextPath();
}
}
function nextPath() {
targetX = random(1024);
targetY = random(1024);
getAngle();
orientPose("w");
}
function orientPose(stance) {
switch (stance) {
case "s" :
if (!((facing == 1) || (facing == 2))) {
(sprite.image.gotoAndStop(2));// not popped
} else {
(sprite.image.gotoAndStop(1));// not popped
}
break;
case "w" :
if (!((facing == 1) || (facing == 2))) {
(sprite.image.gotoAndStop(4));// not popped
} else {
(sprite.image.gotoAndStop(3));// not popped
}
}
(((facing == 0) || (facing == 1)) ? ((sprite.image._xscale = 100)) : ((sprite.image._xscale = -100)));
}
function checkCollision() {
var _local4 = _global.gCanvas._x;
var _local3 = _global.gCanvas._y;
if (_global.gCanvas.mask_canvas.hitTest((sprite._x + dx) + _local4, (sprite._y + dy) + _local3, 1)) {
stopMove();
}
}
function collect() {
var _local3 = range.testRange(_global.gAvMan.getMyAvatar().range);
if (_local3) {
sprite.enabled = false;
stopMove();
_global.gBroadcaster.removeListener(this);
emoteBubble.playEquip(equipment);
switch (spriteType) {
case "easter" :
_global.gsiMethod.invoke("369", [spriteSerial], collectResult, this, false);
break;
default :
_global.gsiMethod.invoke("361", [_global.mapData[0], spriteSerial], collectResult, this, false);
}
} else {
emoteBubble.playEquipMiss();
}
}
function spriteEnable(stat) {
sprite.enabled = stat;
_global.gBroadcaster.addListener(this);
}
var moving = false;
var facing = 1;
var collisionDetect = false;
}
Symbol 140 MovieClip [__Packages.classes.npc.NPCGenarator] Frame 0
class classes.npc.NPCGenarator
{
function NPCGenarator (setting, pClass) {
switch (setting) {
case "train" :
case "toTrain" :
_global.gBots[0] = new classes.npc.NPC("rina", [40], [2, true, patternMarch], [400, 520]);
_global.gBots[1] = new classes.npc.NPC("ian", [39], [0], [550, 410]);
_global.gBots[2] = new classes.npc.NPC("moira", [41], [0], [650, 640], emoteList);
_global.gBots[3] = new classes.npc.NPC("leon", [42], [1, null, patternDelta], [125, 730]);
_global.gBots[4] = new classes.npc.NPC("directory", [38], [0], [300, 380, null, false]);
break;
case "toMap" :
case "town" :
if (_global.mapData[13] != 1) {
break;
}
if (parseInt(_global.eventID) == 10) {
_global.gBots[0] = new classes.npc.NPC("jack", [58, 20, 80, 170], [1, null, null], [500, 500, 150]);
}
if (_global.sponsorshipEvent != "housebunny") {
break;
}
_global.sponsorBot[0] = new classes.npc.NPCMain("shelley", [4], [0], [734, 574]);
}
pClass.nextSequence();
}
function destroy() {
var _local4 = _global.gBots.length;
var _local3 = 0;
while (_local3 < _local4) {
_global.gBots[_local3].destroy();
_local3++;
}
_global.gBots = [];
var _local5 = _global.sponsorBot.length;
_local3 = 0;
while (_local3 < _local5) {
_global.sponsorBot[_local3].destroy();
_local3++;
}
_global.sponsorBot = [];
}
var patternDelta = new Array([125, 730], [250, 500]);
var patternMarch = new Array([400, 520], [740, 520]);
var bunnyMarch = new Array([350, 675], [670, 675]);
var emoteList = new Array([2, "wave"], [1, "heart"], [2, "hug"], [2, "wink"], [2, "kiss"], [2, "cute"]);
}
Symbol 141 MovieClip [__Packages.classes.npc.NPC] Frame 0
class classes.npc.NPC
{
var npcName, speech, emoteBubble, mc, wc;
function NPC (npc, spch, walk, npcAtt, emoteList) {
npcName = npc;
var _local4 = (((npcAtt[2] == undefined) || (npcAtt[2] == null)) ? 75 : (npcAtt[2]));
setUp(npc, _local4);
var _local5 = (((npcAtt[3] == undefined) || (npcAtt[3] == null)) ? true : false);
loadAvatar(("npc/characters/" + npc) + ".swf", walk, _local5);
var _local7 = ((spch[1] == undefined) ? 25 : (spch[1]));
var _local6 = ((spch[2] == undefined) ? 120 : (spch[2]));
speech = new classes.npc.NPCSpeech(spch[0], this, _local7, _local6, _local5, spch[3]);
if ((emoteList != undefined) || (emoteList[0].length > 1)) {
emoteBubble = new classes.npc.NPCEmote(mc, emoteList, _local4);
}
mc._x = npcAtt[0];
mc._y = npcAtt[1];
mc._xscale = (mc._yscale = _local4);
}
function setUp(npc, scaling) {
if (scaling == undefined) {
scaling = 0;
}
mc = _global.gCanvas.clipping_canvas.createEmptyMovieClip("npc" + (botCount++), _global.gCanvas.clipping_canvas.getNextHighestDepth());
var _local6 = ((scaling >= 120) ? 30 : 5);
mc.createTextField("nameTag", 1, -50, _local6, 100, 20);
var _local3 = new TextFormat();
_local3.align = "center";
_local3.font = "Arial";
mc.nameTag.selectable = false;
mc.nameTag.text = npc.toUpperCase();
mc.nameTag.setTextFormat(_local3);
var _local5 = ((scaling >= 120) ? 15 : 0);
mc.attachMovie("avatar_shadow", "dropShadow", -10);
mc.dropShadow._y = _local5;
}
function loadAvatar(whoSwf, motion, cFace) {
var walkType = motion;
var thisNPC = this;
var canFace = cFace;
var _local3 = new Object();
var _local2 = new MovieClipLoader();
_local3.onLoadInit = function (target_mc) {
target_mc.gotoAndStop(1);
thisNPC.setTint();
if (canFace == true) {
target_mc._xscale = -100;
}
thisNPC.wc = new classes.npc.WalkCycle(thisNPC.mc, walkType, walkType[2]);
};
_local2.addListener(_local3);
_local2.loadClip(whoSwf, mc.createEmptyMovieClip("asset", mc.getNextHighestDepth()));
}
function destroy() {
delete wc;
speech.remove();
delete speech;
emoteBubble.destroy();
delete emoteBubble;
mc.removeMovieClip();
}
function setTint() {
_global.gst.tintMe(mc);
}
static var botCount = 0;
}
Symbol 142 MovieClip [__Packages.classes.npc.WalkCycle] Frame 0
class classes.npc.WalkCycle
{
var moveOn, stopX, stopY, av, speed, sit, pattern, rallyPoint, tx, ty, interval, dx, dy, sitInt;
function WalkCycle (vAv, spd, mvPat) {
moveOn = (stopX = (stopY = false));
av = vAv;
speed = spd[0];
sit = spd[1];
if (sit == true) {
sitStart();
}
pattern = mvPat;
rallyPoint = 0;
_global.gBroadcaster.addListener(this);
}
function run(tx, ty) {
if (speed != 0) {
(moveOn ? (walk()) : (newMovePoint()));
}
}
function newMovePoint() {
if (random(10) == 1) {
if ((pattern.length == 0) || (pattern == undefined)) {
tx = random(900);
ty = random(900);
} else {
rallyPoint++;
if (rallyPoint == pattern.length) {
rallyPoint = 0;
}
tx = pattern[rallyPoint][0];
ty = pattern[rallyPoint][1];
}
getAngle();
moveOn = true;
orientPose("w");
}
}
function facingAt(toX, toY) {
if (sit == true) {
clearInterval(interval);
}
rallyPoint--;
tx = toX;
ty = toY;
getAngle();
stopMove();
_global.gBroadcaster.removeListener(this);
}
function stopMove() {
moveOn = (stopX = (stopY = false));
orientPose("s");
}
function orientPose(stance) {
switch (stance) {
case "s" :
if (!((facing == 1) || (facing == 2))) {
(av.asset.gotoAndStop(2));// not popped
} else {
(av.asset.gotoAndStop(1));// not popped
}
break;
case "w" :
if (!((facing == 1) || (facing == 2))) {
(av.asset.gotoAndStop(4));// not popped
} else {
(av.asset.gotoAndStop(3));// not popped
}
break;
case "c" :
if (!((facing == 1) || (facing == 2))) {
(av.asset.gotoAndStop(6));// not popped
} else {
(av.asset.gotoAndStop(5));// not popped
}
}
(((facing == 0) || (facing == 1)) ? ((av.asset._xscale = 100)) : ((av.asset._xscale = -100)));
}
function getAngle() {
var _local4 = tx - av._x;
var _local3 = ty - av._y;
var _local2 = mode360(((Math.atan2(_local3, _local4) / Math.PI) * 180) + 90);
facing = Math.min(int(_local2 / 90), 3);
dx = Math.sin((_local2 * Math.PI) / 180) * speed;
dy = (-Math.cos((_local2 * Math.PI) / 180)) * speed;
}
function mode360(a) {
return((a + 360) % 360);
}
function checkCollision() {
if (_global.gCanvas.mask_canvas.hitTest((av._x + dx) + _global.gCanvas._x, (av._y + dy) + _global.gCanvas._y, 1)) {
stopMove();
}
}
function walk() {
checkCollision();
var _local3 = av._x;
var _local2 = av._y;
if (!stopX) {
if (((_local3 + 5) > tx) && ((_local3 - 5) < tx)) {
stopX = true;
}
}
if (!stopY) {
if (((_local2 + 5) > ty) && ((_local2 - 5) < ty)) {
stopY = true;
}
}
if (stopX && (stopY)) {
stopMove();
}
av._x = av._x + dx;
av._y = av._y + dy;
}
function sitStart() {
sitInt = setInterval(this, "sitDown", 4000);
}
function sitDown() {
if (_global.gAvMan.getMyAvatar().walkLock == false) {
clearInterval(sitInt);
facingAt(tx, ty);
orientPose("c");
interval = setInterval(this, "standUp", 10000);
}
}
function standUp() {
sitStart();
orientPose("s");
clearInterval(interval);
_global.gBroadcaster.addListener(this);
}
function restartMotion() {
if (sit == true) {
sitStart();
rallyPoint++;
}
_global.gBroadcaster.addListener(this);
}
var facing = 1;
}
Symbol 143 MovieClip [__Packages.classes.npc.NPCSpeech] Frame 0
class classes.npc.NPCSpeech
{
var hasButtonBeenAdded, character, canFace, textBubble, range, dialog, dialogType, replyDialog;
function NPCSpeech (wd, npcObj, headX, headY, cFace, textY) {
if (wd != 39) {
hasButtonBeenAdded = true;
}
character = npcObj;
canFace = cFace;
character.mc.ref = this;
character.mc.onPress = function () {
this.ref.onPress();
};
character.mc.enabled = false;
textBubble = new classes.npc.NPCTextBubble(character, this, headX, headY, textY);
range = new classes.range.Range(character.mc, 75, 0, -50);
_global.gsiMethod.invoke("340", [wd, _global.gaiaSessionID], r340, this);
}
function r340(noErr, rData, obj) {
obj.dialogType = rData[0];
obj.dialog = rData;
obj.dialog.shift();
obj.character.mc.enabled = true;
}
function onUserMessage(theMessage) {
textBubble.chat(unescape(theMessage));
}
function onPress() {
var _local3 = range.testRange(_global.gAvMan.getMyAvatar().range);
if (_local3) {
startDialog();
}
}
function startDialog() {
if (dialog != undefined) {
_global.gAvMan.getMyAvatar().lockWalking(true);
if (canFace == true) {
character.wc.facingAt(_global.gAvMan.getMyAvatar().getX(), _global.gAvMan.getMyAvatar().getY());
}
switch (dialogType) {
case "random" :
var _local3 = random(dialog.length);
displayDialog(dialog[_local3]);
break;
case "submit" :
if (nextDialog == (dialog.length - 1)) {
textBubble.changeActionBtn();
}
case "tutorial" :
if (!hasButtonBeenAdded) {
dialog[nextDialog] = dialog[nextDialog] + "<p> </p><p> </p><p><A HREF=\"asfunction:_root.stream.makeAutoConnection, \"><font color='#0000CC'><b> Find me a room </b></font></A></p>";
dialog[nextDialog] = dialog[nextDialog] + "<p><A HREF=\"asfunction:_root.stream.goToDirectory, \"><font color='#0000CC'><b> Go to the Town Directory </b></font></A></p>";
hasButtonBeenAdded = true;
}
displayDialog(dialog[nextDialog]);
break;
}
enableOtherNPC(false);
} else {
_global.gBroadcaster.addListener(this);
}
}
function run() {
if ((dialog != undefined) && (textBubble.bubLoaded == true)) {
_global.gBroadcaster.removeListener(this);
startDialog();
}
}
function displayDialog(d) {
onUserMessage(d);
_root.ui_mc.historyPanel.echo(((("<FONT COLOR = '#FFCCCC'><B>" + character.npcName.toUpperCase()) + ":</B> ") + d) + "</FONT><BR>");
}
function tutorialDialog() {
nextDialog++;
if (nextDialog == dialog.length) {
nextDialog = 0;
textBubble.off();
_global.gAvMan.getMyAvatar().lockWalking(false);
enableOtherNPC(true);
character.wc.restartMotion();
} else {
textBubble.continueChat(dialog[nextDialog]);
_root.ui_mc.historyPanel.echo(((("<FONT COLOR = '#FFCCCC'><B>" + character.npcName.toUpperCase()) + ":</B> ") + dialog[nextDialog]) + "</FONT><BR>");
if ((nextDialog == (dialog.length - 1)) && (dialogType == "submit")) {
textBubble.changeActionBtn("save");
}
}
}
function enableOtherNPC(s) {
var _local2 = 0;
do {
_global.gBots[_local2].mc.enabled = s;
_local2++;
} while (_local2 < _global.gBots.length);
}
function saveRequest() {
trace("SAVE CANDY to INV!!!");
if (parseInt(_global.eventID) == 10) {
_global.gsiMethod.invoke("364", [7, _global.gaiaSessionID], r364, this);
}
}
function r364(noError, rData, obj) {
if (noError == false) {
var _local3 = "...";
obj.onUserMessage(_local3);
_root.ui_mc.historyPanel.echo(((("<FONT COLOR = '#FFCCCC'><B>" + obj.npcName.toUpperCase()) + ":</B> ") + _local3) + "</FONT><BR>");
obj.textBubble.closeActionBtn();
} else {
obj.replyDialogType = rData[0];
obj.replyDialog = rData;
obj.replyDialog.shift();
obj.onUserMessage(obj.replyDialog[obj.nextReplyDialog]);
_root.ui_mc.historyPanel.echo(((("<FONT COLOR = '#FFCCCC'><B>" + obj.character.npcName.toUpperCase()) + ":</B> ") + obj.replyDialog[obj.nextReplyDialog]) + "</FONT><BR>");
obj.textBubble.replyActionBtn();
}
}
function showReplyDialog() {
nextReplyDialog++;
if (nextReplyDialog == replyDialog.length) {
nextDialog = (nextReplyDialog = 0);
textBubble.off();
_global.gAvMan.getMyAvatar().lockWalking(false);
enableOtherNPC(true);
character.wc.restartMotion();
if ((parseInt(_global.eventID) == 10) && (_root.ui_mc.mapInfo.eventHalloweenInv.qty.text == "Max")) {
_root.ui_mc.mapInfo.eventHalloweenInv.qty.text = "0/100";
}
if (parseInt(_global.eventID) == 19) {
if (replyDialog[0].charAt(0) != "J") {
_root.stream.townEvent.clearInv();
if (_global.sushi.connectionType != "") {
_global.gsc.sendUserMessage(200, 1, parseInt(_global.sushi.me.room), ["easter", "basket"]);
} else {
_global.gAvMan.getMyAvatar().emoteBubble.playCollectEmote("easter", "basket");
}
}
}
} else {
textBubble.continueChat(replyDialog[nextReplyDialog]);
_root.ui_mc.historyPanel.echo(((("<FONT COLOR = '#FFCCCC'><B>" + character.npcName.toUpperCase()) + ":</B> ") + replyDialog[nextReplyDialog]) + "</FONT><BR>");
}
}
function remove() {
textBubble.remove();
}
var nextDialog = 0;
var nextReplyDialog = 0;
}
Symbol 144 MovieClip [__Packages.classes.npc.NPCTextBubble] Frame 0
class classes.npc.NPCTextBubble
{
var bubLoaded, character, speech, activateSave, activateStart, headX, headY, textY, mc;
function NPCTextBubble (npcObj, speechObj, hX, hY, tY) {
bubLoaded = false;
var thisClass = this;
character = npcObj;
speech = speechObj;
activateSave = false;
activateStart = false;
headX = hX;
headY = hY;
textY = (((tY == undefined) || (tY == "")) ? 100 : (tY));
mc = _global.gCanvas.createEmptyMovieClip("npc_bubble" + (count++), _global.gCanvas.getNextHighestDepth());
var _local4 = new Object();
_local4.onLoadInit = function (target_mc) {
thisClass.bubLoaded = true;
};
var _local3 = new MovieClipLoader();
_local3.addListener(_local4);
_local3.loadClip(_global.filePath + "wordbubble/wordbubble_npc.swf", mc);
_global.gBroadcaster.addListener(this);
}
function run() {
mc._x = character.mc._x;
mc._y = character.mc._y - textY;
}
function loadHeadshot(whoSwf, thisBubble) {
var _local3 = new Object();
_local3.onLoadStart = function (target_mc) {
target_mc._y = thisBubble.headY;
target_mc._x = thisBubble.headX;
};
var _local2 = new MovieClipLoader();
_local2.addListener(_local3);
_local2.loadClip(whoSwf, mc.headshot.head);
}
function changeActionBtn(action) {
if (action == "start") {
activateStart = true;
} else {
activateSave = true;
}
}
function replyActionBtn() {
mc.actionBtns.gotoAndStop("next");
var thisBubble = this;
mc.actionBtns.next_btn.onRelease = function () {
thisBubble.speech.showReplyDialog();
};
}
function closeActionBtn() {
mc.actionBtns.gotoAndStop("next");
var thisBubble = this;
mc.actionBtns.next_btn.onRelease = function () {
thisBubble.speech.nextDialog = 0;
thisBubble.off();
_global.gAvMan.getMyAvatar().lockWalking(false);
thisBubble.speech.enableOtherNPC(true);
thisBubble.speech.character.wc.restartMotion();
};
}
function closeBubble() {
mc.actionBtns.gotoAndStop("next");
var _local3 = this;
_local3.speech.nextDialog = 0;
_local3.off();
_global.gAvMan.getMyAvatar().lockWalking(false);
_local3.speech.enableOtherNPC(true);
_local3.speech.character.wc.restartMotion();
}
function chat(s) {
mc.gotoAndStop(2);
var thisBubble = this;
loadHeadshot(("npc/characters/" + character.npcName) + ".swf", this);
mc.nameTag = character.npcName.toUpperCase();
mc.cancelbtn.onRelease = function () {
thisBubble.closeBubble();
};
mc.directory.onRelease = function () {
thisBubble.closeBubble();
_global.uiCtrl.dirState();
};
if (activateSave == true) {
mc.actionBtns.gotoAndStop(2);
mc.actionBtns.next_btn.onRelease = function () {
thisBubble.speech.saveRequest();
};
} else if (activateStart == true) {
mc.actionBtns.gotoAndStop(3);
mc.actionBtns.next_btn.onRelease = function () {
thisBubble.speech.startRequest();
};
} else {
mc.actionBtns.next_btn.onRelease = function () {
((thisBubble.speech.dialogType == "random") ? (thisBubble.off()) : (thisBubble.speech.tutorialDialog()));
};
}
mc.NPCmess.htmlText = s;
_global.gBroadcaster.removeListener(this);
posBubble();
}
function continueChat(s) {
mc.NPCmess.htmlText = s;
posBubble();
_global.gBroadcaster.removeListener(this);
}
function posBubble() {
mc._y = character.mc._y - 50;
}
function off() {
_global.gBroadcaster.addListener(this);
mc.gotoAndStop(1);
}
function remove() {
_global.gBroadcaster.removeListener(this);
mc.removeMovieClip();
}
static var count = 0;
}
Symbol 145 MovieClip [__Packages.classes.npc.NPCEmote] Frame 0
class classes.npc.NPCEmote
{
var emoteListing, emoteBubble, interval;
function NPCEmote (mc, emoteList, scaling) {
emoteListing = emoteList;
emoteBubble = new classes.environment.EmoteBubble(mc, "character", scaling);
start();
}
function start() {
interval = setInterval(this, "goEmote", 6000);
}
function goEmote() {
var _local3 = random(emoteListing.length);
if (_global.gAvMan.getMyAvatar().walkLock == false) {
emoteBubble.playEmote(emoteListing[_local3][0], emoteListing[_local3][1]);
}
}
function destroy() {
clearInterval(interval);
emoteBubble.remove();
delete emoteBubble;
}
}
Symbol 146 MovieClip [__Packages.classes.npc.NPCMain] Frame 0
class classes.npc.NPCMain
{
var npcName, speech, mc, emoteBubble;
function NPCMain (npc, spch, walk, npcAtt, emoteList) {
npcName = npc;
var _local4 = (((npcAtt[2] == undefined) || (npcAtt[2] == null)) ? 75 : (npcAtt[2]));
setUp(npc, _local4);
loadAvatar(("npc/characters/" + npc) + ".swf");
var _local6 = ((spch[1] == undefined) ? 25 : (spch[1]));
var _local5 = ((spch[2] == undefined) ? 120 : (spch[2]));
speech = new classes.npc.NPCSpeechHouseBunny(spch[0], this, _local6, _local5, true, spch[3]);
mc._x = npcAtt[0];
mc._y = npcAtt[1];
mc._xscale = (mc._yscale = _local4);
}
function setUp(npc, scaling) {
if (scaling == undefined) {
scaling = 0;
}
mc = _global.gCanvas.clipping_canvas.createEmptyMovieClip("npcSpon" + (botCount++), _global.gCanvas.clipping_canvas.getNextHighestDepth());
var _local6 = ((scaling >= 120) ? 30 : 5);
mc.createTextField("nameTag", 1, -50, _local6, 100, 20);
var _local3 = new TextFormat();
_local3.align = "center";
_local3.font = "Arial";
mc.nameTag.selectable = false;
mc.nameTag.text = npc.toUpperCase();
mc.nameTag.setTextFormat(_local3);
var _local5 = ((scaling >= 120) ? 15 : 0);
mc.attachMovie("avatar_shadow", "dropShadow", -10);
mc.dropShadow._y = _local5;
}
function loadAvatar(whoSwf) {
var thisNPC = this;
var _local3 = new Object();
var _local2 = new MovieClipLoader();
_local3.onLoadInit = function (target_mc) {
target_mc.gotoAndStop(1);
thisNPC.setTint();
target_mc._xscale = -100;
};
_local2.addListener(_local3);
_local2.loadClip(whoSwf, mc.createEmptyMovieClip("asset", mc.getNextHighestDepth()));
}
function destroy() {
speech.remove();
delete speech;
emoteBubble.destroy();
delete emoteBubble;
mc.removeMovieClip();
}
function setTint() {
_global.gst.tintMe(mc);
}
static var botCount = 0;
}
Symbol 147 MovieClip [__Packages.classes.npc.NPCSpeechHouseBunny] Frame 0
class classes.npc.NPCSpeechHouseBunny
{
var hasButtonBeenAdded, character, canFace, textBubble, range, dialog, dialogType, replyDialog;
function NPCSpeechHouseBunny (wd, npcObj, headX, headY, cFace, textY) {
if (wd != 39) {
hasButtonBeenAdded = true;
}
character = npcObj;
canFace = cFace;
character.mc.ref = this;
character.mc.onPress = function () {
this.ref.onPress();
};
character.mc.enabled = false;
textBubble = new classes.npc.NPCTextBubbleSponsor(character, this, headX, headY, textY);
range = new classes.range.Range(character.mc, 75, 0, -50);
loadInfo();
}
function loadInfo() {
var _local3 = _global.gsiMethod.queue(4000, [_global.gaiaSessionID, 543], invGameData, this);
_global.gsiMethod.queue(311, [_global.gaiaSessionID, _global.myUserData[0], 100074], _local3);
_global.gsiMethod.queue(4011, [_global.gaiaSessionID, 543], _local3);
_global.gsiMethod.send();
}
function invGameData(noErr, info, thisClass) {
if (noErr == true) {
var _local3 = info[0].data;
var _local4 = info[1].data;
var _local2 = info[2].data;
trace((_local3[0] + " ") + _local4[0]);
thisClass.flowerQty = Number(_local4[0]);
if (Number(_local3[0]) == 0) {
if (Number(_local2[0]) >= 3) {
var _local7 = "Thanks for completing all my House Bunny quests. You did a great job! ";
thisClass.dialogType = "tutorial";
thisClass.dialog = [_local7];
thisClass.character.mc.enabled = true;
} else {
thisClass.dialogType = "start";
thisClass.dialog = ["Want to rush our House Bunny sorority? Show some love by gathering 3 Pink Daffodils.", "When you've got 3 Pink Daffodils, click 'Items' in the bottom right and then clck on the robot to move the items to you inventory.", "When you're done, come and see me."];
thisClass.character.mc.enabled = true;
}
} else if (Number(_local2[0]) >= 3) {
var _local7 = "Thanks for completing all my House Bunny quests. You did a great job! ";
thisClass.dialogType = "tutorial";
thisClass.dialog = [_local7];
thisClass.character.mc.enabled = true;
} else if (thisClass.flowerQty >= thisClass.flowerMax) {
thisClass.dialogType = "submit";
thisClass.dialog = ["Good job! Here's a little something special for you. Don't forget to head inside the Zeta House to check out a new House Bunny preview!"];
thisClass.character.mc.enabled = true;
} else {
var _local6 = thisClass.flowerMax - thisClass.flowerQty;
var _local7 = ("Aww, you still need to gather " + _local6) + " Pink Daffodils. Look around town a little more and you'll find some.";
thisClass.dialogType = "tutorial";
thisClass.dialog = [_local7, "When you get them, click 'Items' in the bottom right, then click the robot to move the flowers to your inventory.", "Come see me when you're done!"];
thisClass.character.mc.enabled = true;
}
}
}
function onUserMessage(theMessage) {
textBubble.chat(unescape(theMessage));
}
function onPress() {
var _local3 = range.testRange(_global.gAvMan.getMyAvatar().range);
if (_local3) {
startDialog();
}
}
function startDialog() {
if (dialog != undefined) {
_global.gAvMan.getMyAvatar().lockWalking(true);
if (canFace == true) {
character.wc.facingAt(_global.gAvMan.getMyAvatar().getX(), _global.gAvMan.getMyAvatar().getY());
}
trace(dialog);
switch (dialogType) {
case "random" :
var _local3 = random(dialog.length);
displayDialog(dialog[_local3]);
break;
case "submit" :
if (nextDialog == (dialog.length - 1)) {
textBubble.changeActionBtn();
}
case "start" :
trace((("START BUTTON" + nextDialog) + " ") + (dialog.length - 1));
if (nextDialog == (dialog.length - 1)) {
textBubble.changeActionBtn("start");
}
case "tutorial" :
if (!hasButtonBeenAdded) {
dialog[nextDialog] = dialog[nextDialog] + "<p> </p><p> </p><p><A HREF=\"asfunction:_root.stream.makeAutoConnection, \"><font color='#0000CC'><b> Find me a room </b></font></A></p>";
dialog[nextDialog] = dialog[nextDialog] + "<p><A HREF=\"asfunction:_root.stream.goToDirectory, \"><font color='#0000CC'><b> Go to the Town Directory </b></font></A></p>";
hasButtonBeenAdded = true;
}
displayDialog(dialog[nextDialog]);
break;
}
enableOtherNPC(false);
} else {
_global.gBroadcaster.addListener(this);
}
}
function run() {
if ((dialog != undefined) && (textBubble.bubLoaded == true)) {
_global.gBroadcaster.removeListener(this);
startDialog();
}
}
function displayDialog(d) {
onUserMessage(d);
_root.ui_mc.historyPanel.echo(((("<FONT COLOR = '#FFCCCC'><B>" + character.npcName.toUpperCase()) + ":</B> ") + d) + "</FONT><BR>");
}
function tutorialDialog() {
nextDialog++;
if (nextDialog == dialog.length) {
nextDialog = 0;
textBubble.off();
_global.gAvMan.getMyAvatar().lockWalking(false);
enableOtherNPC(true);
character.wc.restartMotion();
} else {
textBubble.continueChat(dialog[nextDialog]);
_root.ui_mc.historyPanel.echo(((("<FONT COLOR = '#FFCCCC'><B>" + character.npcName.toUpperCase()) + ":</B> ") + dialog[nextDialog]) + "</FONT><BR>");
if ((nextDialog == (dialog.length - 1)) && (dialogType == "submit")) {
textBubble.changeActionBtn("save");
}
trace((((("START BUTTON" + nextDialog) + " ") + (dialog.length - 1)) + " ") + dialogType);
if ((nextDialog == (dialog.length - 1)) && (dialogType == "start")) {
trace("YO");
textBubble.changeActionBtn("start", true);
}
}
}
function enableOtherNPC(s) {
var _local2 = 0;
do {
_global.gBots[_local2].mc.enabled = s;
_local2++;
} while (_local2 < _global.gBots.length);
}
function saveRequest() {
trace("[NPCSpeechHouseBunny] Grant House Bunny Item.");
var _local3 = "give_items-100074";
_global.gsiMethod.invoke(1125, [_global.gaiaSessionID, 9, _local3], r1125, this);
}
function startRequest() {
trace("START QUEST");
textBubble.closeBubble();
var _local3 = ("http://" + _global.domainURL) + "/quest/?action=accept&quest_id=543";
getURL (_local3, "_blank");
loadInfo();
}
function r1125(noError, rData, obj) {
obj.replyDialogType = "tutorial";
var _local5 = "Follow me and claim your reward. (A new browser tab or window will open to complete the quest.)";
obj.replyDialog = [_local5];
obj.onUserMessage(_local5);
_root.ui_mc.historyPanel.echo(((("<FONT COLOR = '#FFCCCC'><B>" + obj.character.npcName.toUpperCase()) + ":</B> ") + _local5) + "</FONT><BR>");
obj.textBubble.replyActionBtn();
var _local6 = ("http://" + _global.domainURL) + "/npc/talk/?npc_id=373";
getURL (_local6, "_blank");
loadInfo();
}
function r364(noError, rData, obj) {
if (noError == false) {
var _local3 = "...";
obj.onUserMessage(_local3);
_root.ui_mc.historyPanel.echo(((("<FONT COLOR = '#FFCCCC'><B>" + obj.npcName.toUpperCase()) + ":</B> ") + _local3) + "</FONT><BR>");
obj.textBubble.closeActionBtn();
} else {
obj.replyDialogType = "";
obj.replyDialog = rData;
obj.replyDialog.shift();
obj.onUserMessage(obj.replyDialog[obj.nextReplyDialog]);
_root.ui_mc.historyPanel.echo(((("<FONT COLOR = '#FFCCCC'><B>" + obj.character.npcName.toUpperCase()) + ":</B> ") + obj.replyDialog[obj.nextReplyDialog]) + "</FONT><BR>");
obj.textBubble.replyActionBtn();
}
}
function showReplyDialog() {
nextReplyDialog++;
if (nextReplyDialog == replyDialog.length) {
nextDialog = (nextReplyDialog = 0);
textBubble.off();
_global.gAvMan.getMyAvatar().lockWalking(false);
enableOtherNPC(true);
character.wc.restartMotion();
if ((parseInt(_global.eventID) == 10) && (_root.ui_mc.mapInfo.eventInv.qty == "Max")) {
_root.ui_mc.mapInfo.eventInv.qty = "0/100";
}
} else {
textBubble.continueChat(replyDialog[nextReplyDialog]);
_root.ui_mc.historyPanel.echo(((("<FONT COLOR = '#FFCCCC'><B>" + character.npcName.toUpperCase()) + ":</B> ") + replyDialog[nextReplyDialog]) + "</FONT><BR>");
}
}
function remove() {
textBubble.remove();
}
var nextDialog = 0;
var nextReplyDialog = 0;
var flowerQty = 0;
var flowerMax = 3;
}
Symbol 148 MovieClip [__Packages.classes.npc.NPCTextBubbleSponsor] Frame 0
class classes.npc.NPCTextBubbleSponsor
{
var bubLoaded, character, speech, activateSave, activateStart, headX, headY, textY, mc;
function NPCTextBubbleSponsor (npcObj, speechObj, hX, hY, tY) {
bubLoaded = false;
var thisClass = this;
character = npcObj;
speech = speechObj;
activateSave = false;
activateStart = false;
headX = hX;
headY = hY;
textY = (((tY == undefined) || (tY == "")) ? 100 : (tY));
mc = _global.gCanvas.createEmptyMovieClip("npc_bubble" + (count++), _global.gCanvas.getNextHighestDepth());
var _local4 = new Object();
_local4.onLoadInit = function (target_mc) {
thisClass.bubLoaded = true;
};
var _local3 = new MovieClipLoader();
_local3.addListener(_local4);
_local3.loadClip(_global.filePath + "wordbubble/wordbubble_npc.swf", mc);
_global.gBroadcaster.addListener(this);
}
function run() {
mc._x = character.mc._x;
mc._y = character.mc._y - textY;
_global.gBroadcaster.removeListener(this);
}
function loadHeadshot(whoSwf, thisBubble) {
var _local3 = new Object();
_local3.onLoadStart = function (target_mc) {
target_mc._y = thisBubble.headY;
target_mc._x = thisBubble.headX;
};
var _local2 = new MovieClipLoader();
_local2.addListener(_local3);
_local2.loadClip(whoSwf, mc.headshot.head);
}
function changeActionBtn(action, force) {
if (action == "start") {
activateStart = true;
} else {
activateSave = true;
}
if (force == true) {
var thisBubble = this;
mc.actionBtns.gotoAndStop(3);
mc.actionBtns.next_btn.onRelease = function () {
thisBubble.speech.startRequest();
};
}
}
function replyActionBtn() {
mc.actionBtns.gotoAndStop("next");
var thisBubble = this;
mc.actionBtns.next_btn.onRelease = function () {
thisBubble.speech.showReplyDialog();
};
}
function closeActionBtn() {
mc.actionBtns.gotoAndStop("next");
var thisBubble = this;
mc.actionBtns.next_btn.onRelease = function () {
thisBubble.speech.nextDialog = 0;
thisBubble.off();
_global.gAvMan.getMyAvatar().lockWalking(false);
thisBubble.speech.enableOtherNPC(true);
};
}
function closeBubble() {
mc.actionBtns.gotoAndStop("next");
var _local3 = this;
_local3.speech.nextDialog = 0;
_local3.off();
_global.gAvMan.getMyAvatar().lockWalking(false);
_local3.speech.enableOtherNPC(true);
}
function chat(s) {
mc._x = character.mc._x;
mc._y = character.mc._y - textY;
mc.gotoAndStop(2);
var thisBubble = this;
loadHeadshot(("npc/characters/" + character.npcName) + ".swf", this);
mc.nameTag = character.npcName.toUpperCase();
mc.cancelbtn.onRelease = function () {
thisBubble.closeBubble();
};
mc.directory.onRelease = function () {
thisBubble.closeBubble();
_global.uiCtrl.dirState();
};
if (activateSave == true) {
activateSave = false;
mc.actionBtns.gotoAndStop(2);
mc.actionBtns.next_btn.onRelease = function () {
thisBubble.speech.saveRequest();
};
} else if (activateStart == true) {
activateStart = false;
mc.actionBtns.gotoAndStop(3);
mc.actionBtns.next_btn.onRelease = function () {
thisBubble.speech.startRequest();
};
} else {
mc.actionBtns.next_btn.onRelease = function () {
((thisBubble.speech.dialogType == "random") ? (thisBubble.off()) : (thisBubble.speech.tutorialDialog()));
};
}
mc.NPCmess.htmlText = s;
posBubble();
}
function continueChat(s) {
mc.NPCmess.htmlText = s;
posBubble();
}
function posBubble() {
mc._y = character.mc._y - 50;
}
function off() {
mc._x = character.mc._x;
mc._y = character.mc._y - textY;
mc.gotoAndStop(1);
}
function remove() {
mc.removeMovieClip();
}
static var count = 0;
}
Symbol 149 MovieClip [__Packages.classes.avatar.AvatarManager] Frame 0
class classes.avatar.AvatarManager
{
static var avMan;
var maxAvLoadCounter, gsc, avServerUrl, avPool, addProperty;
function AvatarManager () {
maxAvLoad = ((_global.avMax != undefined) ? (_global.avMax) : (maxAvLoad));
maxAvLoadCounter = 0;
gsc = new classes.avatar.GameServerConnector();
_global.gsc = gsc;
avServerUrl = ("http://" + _global.avatarHost) + ".gaiaonline.com/gaia/members/";
avPool = new Object();
addProperty("me", getMyAvatar, null);
}
function makeMe() {
trace("[AvMan] makeMe");
addAvToPool(getMySID(), _global.myUserData[2]);
}
function makeAllMembers() {
var _local5;
var _local3;
var _local6;
var _local4;
_local5 = gsc.getMemberIDs(gsc.myRoom());
_local6 = _local5.length;
var _local2 = 0;
while (_local2 < _local6) {
_local3 = _local5[_local2];
if (_local3 != gsc.myID()) {
_local4 = gsc.getMemberAvUrl(_local3, 4);
if (_local4) {
addAvToPool(_local3, _local4);
}
}
_local2++;
}
}
function addAvToPool(sid, avRaw) {
trace((("add to pool " + sid) + " raw=") + avRaw);
var _local4 = avRaw.split("_");
var _local3 = _local4[0];
var _local7 = _local4[4];
var _local10 = Number(_local4[2]);
var _local9 = _local4[1];
var _local8 = Number(_local4[3].charAt(0));
var _local11 = Number(_local4[3].charAt(1));
var _local6 = 0;
if ((_local10 >= 3) && (_local7 != undefined)) {
_local3 = ((avServerUrl + _local3) + "_full.swf?") + _local7;
if (_local10 == 4) {
_local6 = 1 & _global.SUPPORT_FLY;
}
} else if (_local6 == 1) {
_local3 = "shadowufo.swf";
} else {
_local3 = ((avServerUrl + _local3) + "_full.swf?") + _local7;
}
trace(_local3);
var _local12 = gsc.getName(sid);
if (sid == getMySID()) {
avPool["m" + sid] = new classes.avatar.MyAvatar(sid, _local3, _local9, _local8, _local11, _local6, false);
} else {
var _local13 = checkAvLimit("add");
avPool["m" + sid] = new classes.avatar.MemberAvatar(sid, _local3, _local9, _local8, _local11, _local6, false);
}
}
function checkAvLimit(action) {
var _local2 = false;
switch (action) {
case "add" :
maxAvLoadCounter++;
break;
case "remove" :
maxAvLoadCounter--;
break;
case "removeAll" :
maxAvLoadCounter = 0;
}
if (maxAvLoadCounter >= maxAvLoad) {
maxAvLoadCounter = maxAvLoad - 1;
_local2 = true;
}
return(_local2);
}
function removeAll() {
checkAvLimit("removeAll");
_global.miniMenu.remove();
delete _global.miniMenu;
var _local3;
for (_local3 in avPool) {
avPool[_local3].destroy();
delete avPool[_local3];
}
}
function tellAllAvatar(todo, arg) {
}
function onNewMember(id, teamID, roomID, platform, data) {
if (roomID == gsc.myRoom()) {
var _local2 = gsc.getMemberAvUrl(id, 4);
if (_local2) {
addAvToPool(id, _local2);
}
}
}
function onMemberChangesRoom(id, newRoom, oldRoom, data) {
if (oldRoom == gsc.myRoom()) {
avPool["m" + id].destroy();
delete avPool["m" + id];
}
if (newRoom == gsc.myRoom()) {
var _local3 = gsc.getMemberAvUrl(id, 4);
if (_local3) {
addAvToPool(id, _local3);
}
}
}
function onRemoveMember(id, teamID, roomID) {
if (roomID == gsc.myRoom()) {
if (avPool["m" + id].getIsShadow() == false) {
checkAvLimit("remove");
}
avPool["m" + id].destroy();
delete avPool["m" + id];
}
}
function onMemberKicked(id) {
if (avPool["m" + id] != undefined) {
avPool["m" + id].destroy();
delete avPool["m" + id];
checkAvLimit("remove");
}
}
static function getAvatarManager() {
_global.miniMenu = new classes.environment.MiniMenu("member", 4545);
if (avMan == null) {
avMan = new classes.avatar.AvatarManager();
}
return(avMan);
}
function getAvatar(id) {
return(avPool["m" + id]);
}
function getMyAvatar() {
return(avPool["m" + getMySID()]);
}
function getMySID() {
return((((gsc.myID() == undefined) || (gsc.myID() == -1)) ? 0 : (gsc.myID())));
}
function resetListeners() {
gsc.resetListeners(this);
}
static var FRONT = 1;
static var ME = -1;
static var MEMBERS = -2;
static var ALL = -3;
var shadowUrl = "npc/characters/shadow.swf";
var maxAvLoad = 5000;
}
Symbol 150 MovieClip [__Packages.classes.environment.MiniMenu] Frame 0
class classes.environment.MiniMenu
{
var xOffset, yOffset, mc, interval, avatar, xOffScaled, yOffScaled;
function MiniMenu (owner, layerDepth) {
xOffset = 0;
yOffset = 100;
mc = _global.gCanvas.createEmptyMovieClip(owner, layerDepth);
var thisClass = this;
var _local4 = new Object();
var _local3 = new MovieClipLoader();
_local4.onLoadStart = function (target_mc) {
target_mc._visible = false;
thisClass.setControls();
};
_local3.addListener(_local4);
if (owner == "member") {
_local3.loadClip("ui/minimenu/member_menu.swf", mc);
}
if (owner == "my") {
_local3.loadClip("ui/minimenu/my_menu.swf", mc);
}
}
function decideToClose() {
clearInterval(interval);
if (mc.onPlus != true) {
hideMenu();
}
}
function showMiniMenu(avID, gaiaID, av, avScale, gName) {
clearInterval(interval);
interval = setInterval(this, "decideToClose", 2000);
mc.onPlus = false;
mc.mID = avID;
mc.gID = gaiaID;
mc.gName = gName;
avatar = av;
mc._visible = true;
_global.gBroadcaster.removeListener(this);
_global.gBroadcaster.addListener(this);
xOffScaled = (xOffset * avScale) / 100;
yOffScaled = (yOffset * avScale) / 100;
run();
}
function run() {
mc._x = avatar._x - xOffScaled;
mc._y = avatar._y - yOffScaled;
}
function hideMenu() {
_global.gBroadcaster.removeListener(this);
clearInterval(interval);
mc._visible = false;
}
function remove() {
_global.gBroadcaster.removeListener(this);
clearInterval(interval);
mc.removeMovieClip();
}
static var count = 0;
}
Symbol 151 MovieClip [__Packages.classes.avatar.GenericAvatar] Frame 0
class classes.avatar.GenericAvatar
{
static var WORLD, COLLISION, POOL, ICERINK, POSES;
var avConfig, gsc, avFollower, avURL, avFLegs, avBLegs, avServerID, avFly, isThisShadow, gaiaName, avClip, topFXLayer, backFXLayer, avImage, emoteBubble, range, feet, lastX, lastY, targetX, targetY, currentPos, currentToyType, previousIcon;
function GenericAvatar (sid, avatarURL, gender, fLegs, bLegs, fly, avShadow) {
avConfig = new classes.avatar.AvatarConfig();
gsc = new classes.avatar.GameServerConnector();
avFollower = new classes.avatar.AvatarFollowers();
avURL = avatarURL;
initGenericAvatarGlobals();
avFLegs = fLegs;
avBLegs = bLegs;
avServerID = sid;
avFly = fly & _global.SUPPORT_FLY;
if ((_global.scene == "home") || (_global.scene == "toHome")) {
avFly = 0;
}
initAvClip();
if (avShadow == false) {
isThisShadow = false;
loadAvatar(avatarURL);
} else {
isThisShadow = true;
var _local4 = ((avFly == 1) ? "shadowufo.swf" : "shadow.swf");
loadAvatar(_local4);
}
var _local3 = gsc.getMemberData(avServerID);
if (_local3) {
gaiaID = _local3[6];
gaiaName = _local3[5];
isMiniAvatar = stringToBoolean(_local3[9]);
}
if ((_global.scene == "train") && (_global.isMiniAvatar)) {
isMiniAvatar = true;
}
}
function stringToBoolean(val) {
if (typeof(val) == "boolean") {
return(val);
}
if (val == "true") {
return(true);
}
return(false);
}
static function initGenericAvatarGlobals() {
WORLD = _global.gCanvas;
COLLISION = _global.gCanvas.mask_canvas;
POOL = _global.gCanvas.clipping_canvas.pool;
ICERINK = _global.gCanvas.clipping_canvas.iceRink;
POSES = new Array(RIGHT + FRONT, LEFT + FRONT, LEFT + BACK, RIGHT + BACK);
}
function initAvClip() {
if (avFly != 1) {
avClip = WORLD.clipping_canvas.createEmptyMovieClip("avatar" + avServerID, WORLD.clipping_canvas.getNextHighestDepth());
} else {
avClip = WORLD.flying_canvas.createEmptyMovieClip("avatar" + avServerID, WORLD.flying_canvas.getNextHighestDepth());
}
var _local4 = ((avServerID == getMySID()) ? (_global.myUserData[1]) : (gsc.getName(avServerID)));
var _local5 = gsc.getMemberData(avServerID);
var _local3 = ((avServerID == getMySID()) ? (_global.myUserData[3]) : (((_local5 != null) ? (_local5[8]) : 8)));
if (_local4 == "B5") {
_local3 = "99";
}
if ((_local3 == "99") && (_local4 != "B5")) {
_local3 = "8";
}
avFollower.initNameFollower(avClip, _local4, _local3);
topFXLayer = avClip.createEmptyMovieClip("topFX", 100);
backFXLayer = avClip.createEmptyMovieClip("backFX", 20);
avClip.createEmptyMovieClip("avatarContainer", 50);
avClip.avatarContainer._xscale = (avClip.avatarContainer._yscale = avConfig.avScale);
avImage = avClip.avatarContainer.createEmptyMovieClip("image", 1);
emoteBubble = new classes.environment.EmoteBubble(avClip, "emotes/emotes.swf", avConfig.avScale);
range = new classes.range.Range(avClip, 75, 0, 0);
feet = new classes.range.Range(avClip, 27);
trace("init av clip=" + avClip);
}
function getMySID() {
return((((gsc.myID() == undefined) || (gsc.myID() == -1)) ? 0 : (gsc.myID())));
}
function loadAvatar(avatarURL) {
isAvLoaded = false;
var thisAv = this;
var avUrl = avatarURL;
var _local3 = new Object();
var _local2 = new MovieClipLoader();
_local3.onLoadStart = function (target_mc) {
target_mc.hasSpecialItem = thisAv.isMiniAvatar;
target_mc.avUrl = avUrl;
target_mc.avClass = thisAv;
thisAv.setTint();
};
_local2.addListener(_local3);
_local2.loadClip("avatar/avatar.swf", avImage);
moveToStart();
}
function loadComplete() {
isAvLoaded = true;
if (gaiaID) {
_global.ignoreUserManager.shouldIgnoreUser(gaiaID, avServerID);
}
setPose();
avClip.avatarContainer.image._waterMask._visible = false;
checkPool();
checkIceRink();
if (isMiniAvatar) {
WALK_SPEED = avConfig.miniAvSpeed;
}
}
function playFx(theFx, fxLayer, callback) {
var _local6 = ((_global.filePath + "effects/") + theFx) + ".swf";
var _local5 = ((fxLayer == "top") ? (topFXLayer) : (backFXLayer));
var _local7 = this;
var _local4 = new Object();
var _local3 = new MovieClipLoader();
_local4.onLoadStart = function (target_mc) {
target_mc._xscale = (target_mc._yscale = _global.area.avScale);
target_mc.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
delete this.onEnterFrame;
this.unloadMovie();
if (callback != null) {
callback();
}
}
};
};
_local3.addListener(_local4);
_local3.loadClip(_local6, _local5);
}
function displayTextBubble(content) {
var _local3 = 0;
switch (_global.scene) {
case "home" :
case "toHome" :
_local3 = -20;
break;
case "train" :
default :
case "toTrain" :
case "town" :
case "toMap" :
_local3 = 15;
}
_global.textBubble.AddText(avClip.nameTag.text, avClip, content, 1, 0, _local3);
}
function displayWhisperTextBubble(content) {
var _local2 = 0;
switch (_global.scene) {
case "home" :
case "toHome" :
_local2 = -20;
break;
case "train" :
default :
case "toTrain" :
case "town" :
case "toMap" :
_local2 = 15;
}
}
function destroy() {
gsc.removeListeners(this);
_global.gBroadcaster.removeListener(this);
avClip.removeMovieClip();
emoteBubble.remove();
delete emoteBubble;
delete range;
delete feet;
}
function moveToStart() {
avClip._x = avConfig.startX;
avClip._y = avConfig.startY;
resetWalkData();
}
function moveTo(toX, toY, direction) {
avClip._x = toX;
avClip._y = toY;
setPose(direction, WALK);
}
function walkTo(toX, toY, direction) {
if (!isAvLoaded) {
return(undefined);
}
trace((("WALK TO =" + toX) + "-") + toY);
trace("sid=" + getMySID());
doorX = toX;
doorY = toY;
var _local3;
var _local7;
lastX = avClip._x;
lastY = avClip._y;
_global.gBroadcaster.removeListener(this);
_global.gBroadcaster.addListener(this);
targetX = toX;
targetY = toY;
_local3 = calcAngle(toX, toY);
vX = Math.cos(_local3) * WALK_SPEED;
vY = Math.sin(_local3) * WALK_SPEED;
if (isNaN(direction)) {
direction = calcOrientation(_local3);
}
setPose(direction, WALK);
lastT = getTimer();
}
function rotateTo(toX, toY) {
var _local2;
var _local6;
var _local3;
_local2 = calcAngle(toX, toY);
_local3 = calcOrientation(_local2);
setPose(_local3);
}
function calcAngle(toX, toY) {
var _local5;
var _local4;
var _local3;
var _local2 = (Math.PI*2);
_local5 = toX - avClip._x;
_local4 = toY - avClip._y;
_local3 = Math.atan2(_local4, _local5);
return((_local3 + _local2) % _local2);
}
function calcOrientation(angle) {
var _local2 = Math.floor((2 * angle) / Math.PI);
currentPos = POSES[_local2];
return(POSES[_local2]);
}
function getDirection() {
return(currentPos);
}
function onIce() {
return(ICERINK.iceRink.iceHitMarker.hitTest((avClip._x + vX) + WORLD._x, (avClip._y + vY) + WORLD._y, 1) && (avFly != 1));
}
function checkIceRink() {
if (onIce()) {
isOnRink = true;
walkTo(avClip._x, avClip._y, orientation);
} else {
isOnRink = false;
}
}
function onPool() {
return((_global.POOL && (POOL.poolClip.poolHitMarker.hitTest((avClip._x + vX) + WORLD._x, (avClip._y + vY) + WORLD._y, 1))) && (avFly != 1));
}
function checkPool() {
if (onPool()) {
var _local4 = _global.gCanvas.clipping_canvas.pool;
var _local8 = _local4.poolBitmapData;
var _local7 = avClip._x - _local4._x;
var _local6 = avClip._y - _local4._y;
var _local5 = _global.poolMgr.getBitmapData(_local7, _local6);
avClip.avatarContainer.image._waterMask._visible = true;
avClip.avatarContainer.image._av.setMask(avClip.avatarContainer.image._waterMask);
avClip.avatarContainer.image.attachMovie("backAnim", "backAnim", 2);
avClip.avatarContainer.image.attachMovie("frontAnim", "frontAnim", 20);
if (!avClip.avatarContainer.image.splash) {
avClip.avatarContainer.image.attachMovie("diveSplash", "splash", 30);
}
var _local9 = _local5;
avClip.avatarContainer.image._av._y = _local5;
avClip.avatarContainer.image.dropShadow._visible = false;
if ((_global.gAvMan.getMyAvatar().avClip == avClip) && (!isPoolInSet)) {
_global.isInPool = true;
_global.myToyManager.inPool();
_root.ui_mc.uiArea.emoteLauncher.setPoolIcons(true);
}
isPoolInSet = true;
isPoolOutSet = false;
}
}
function move() {
var _local4;
var _local6;
if (action == WALK) {
if (avImage.avParts.waist._currentframe == 11) {
avImage.avParts.waist.gotoAndPlay(8);
avImage.avParts.legs.gotoAndPlay(12);
avImage.avParts.feet.gotoAndPlay(16);
bobPointer = 0;
} else {
bobPointer++;
}
}
avImage._y = 0 + bobPointer;
_local4 = getTimer();
while ((_local4 - lastT) > 0) {
if (onIce()) {
isOnRink = true;
} else {
isOnRink = false;
}
if (onPool()) {
var _local5 = _global.gCanvas.clipping_canvas.pool;
var _local10 = _local5.poolBitmapData;
var _local9 = avClip._x - _local5._x;
var _local8 = avClip._y - _local5._y;
var _local7 = _global.poolMgr.getBitmapData(_local9, _local8);
avClip.avatarContainer.image._waterMask._visible = true;
avClip.avatarContainer.image._av.setMask(avClip.avatarContainer.image._waterMask);
avClip.avatarContainer.image.attachMovie("backAnim", "backAnim", 2);
avClip.avatarContainer.image.attachMovie("frontAnim", "frontAnim", 20);
if (!avClip.avatarContainer.image.splash) {
avClip.avatarContainer.image.attachMovie("diveSplash", "splash", 30);
}
var _local11 = _local7;
avClip.avatarContainer.image._av._y = _local7;
avClip.avatarContainer.image.dropShadow._visible = false;
if ((_global.gAvMan.getMyAvatar().avClip == avClip) && (!isPoolInSet)) {
_global.isInPool = true;
_global.myToyManager.inPool();
_root.ui_mc.uiArea.emoteLauncher.setPoolIcons(true);
}
isPoolInSet = true;
isPoolOutSet = false;
} else if (avFly != 1) {
if ((_global.gAvMan.getMyAvatar().avClip == avClip) && (!isPoolOutSet)) {
_root.ui_mc.uiArea.emoteLauncher.setPoolIcons(false);
_global.isInPool = false;
_global.myToyManager.outOfPool();
}
isPoolInSet = false;
isPoolOutSet = true;
avClip.avatarContainer.image._av._y = 0;
avClip.avatarContainer.image._waterMask._visible = false;
avClip.avatarContainer.image._av.setMask(null);
avClip.avatarContainer.image.backAnim.removeMovieClip();
avClip.avatarContainer.image.frontAnim.removeMovieClip();
avClip.avatarContainer.image.dropShadow._visible = true;
avClip.avatarContainer.image.splash.removeMovieClip();
}
if (((((avClip._x + vX) >= 1024) || ((avClip._y + vY) >= 1024)) || ((avClip._x + vX) <= 0)) || ((avClip._y + vY) <= 0)) {
stopMove();
lastT = _local4;
} else if (COLLISION.hitTest((avClip._x + vX) + WORLD._x, (avClip._y + vY) + WORLD._y, 1) && (avFly != 1)) {
stopMove();
lastT = _local4;
} else if (((((avClip._x + BUFFER) > targetX) && ((avClip._x - BUFFER) < targetX)) && ((avClip._y + BUFFER) > targetY)) && ((avClip._y - BUFFER) < targetY)) {
stopMove();
lastT = _local4;
} else {
_local4 = getTimer();
_local6 = (_local4 - lastT) / FRAME_LENGTH;
if (_local6 >= 1) {
avClip._x = avClip._x + vX;
avClip._y = avClip._y + vY;
lastT = lastT + FRAME_LENGTH;
} else {
avClip._x = avClip._x + (vX * _local6);
avClip._y = avClip._y + (vY * _local6);
lastT = _local4;
}
}
}
}
function sitDown(direction) {
resetWalkData();
setPose(direction, SIT);
avClip.avatarContainer.image._av.gotoAndStop("sitFront");
_global.textBubble.Refresh(avClip.nameTag.text);
}
function standUp(direction) {
avClip.avatarContainer.image._av.gotoAndStop("front");
resetWalkData();
setPose(direction, STAND);
_global.textBubble.Refresh(avClip.nameTag.text);
}
function stopMove() {
if (!isOnRink) {
resetWalkData();
setPose();
} else {
bobPointer = 0;
avImage._y = 0;
}
}
function resetWalkData() {
if (action == WALK) {
_global.gBroadcaster.removeListener(this);
bobPointer = 0;
avImage._y = 0;
vX = (vY = 0);
action = STAND;
}
avClip.avatarContainer.image.lowerHalf._visible = false;
avClip.avatarContainer.image._av._rotation = 0;
}
function setPose(direction, newAction) {
var _local2 = avImage;
var _local3;
if (isNaN(direction)) {
direction = orientation;
} else {
orientation = direction;
}
if (isNaN(newAction)) {
newAction = action;
} else {
action = newAction;
}
switch ((direction + newAction) & (~RIGHT)) {
case STAND + FRONT :
_local3 = 2;
_local2.showSpecialItem();
break;
case STAND + BACK :
_local3 = 4;
_local2.hideSpecialItem();
break;
case WALK + FRONT :
_local3 = 3;
_local2.showSpecialItem();
break;
case WALK + BACK :
_local3 = 5;
_local2.hideSpecialItem();
break;
case SIT + FRONT :
_local3 = 6;
_local2.showSpecialItem();
break;
case SIT + BACK :
_local3 = 7;
_local2.hideSpecialItem();
}
_local2.avParts.body.gotoAndStop(_local3);
_local2.touchAreaDirection(_local3);
if (direction & RIGHT) {
_local2.faceRight();
} else {
_local2.faceLeft();
}
if (direction & FRONT) {
if (avFLegs == 0) {
_local2.lowerHalf.swapDepths(101);
} else {
_local2.lowerHalf.swapDepths(99);
}
} else if (avBLegs == 0) {
_local2.lowerHalf.swapDepths(101);
} else {
_local2.lowerHalf.swapDepths(99);
}
if (newAction == SIT) {
_local2.avParts.body._y = (ORIGIN_Y + 20) - _z;
_local2.avParts.touch._y = -_z;
} else {
_local2.avParts.body._y = (_local2.avParts.lowerBody._y = ORIGIN_Y - _z);
_local2.avParts.touch._y = -_z;
}
if (newAction == WALK) {
_local2.avParts.lowerBody._visible = true;
_local2.avParts.waist.gotoAndPlay(8);
_local2.avParts.legs.gotoAndPlay(12);
_local2.avParts.feet.gotoAndPlay(16);
} else {
_local2.avParts.waist.gotoAndStop(1);
_local2.avParts.legs.gotoAndStop(1);
_local2.avParts.feet.gotoAndStop(1);
_local2.avParts.lowerBody._visible = false;
}
}
function setTint() {
if ((_global.mapData[10].indexOf("alt") == -1) || (_global.mapData[10] == undefined)) {
_global.gst.tintMe(avClip.avatarContainer);
}
}
function getClip() {
return(avClip);
}
function getX() {
return(avClip._x);
}
function getY() {
return(avClip._y);
}
function getXY() {
var _local2 = new Object();
_local2._x = avClip._x;
_local2._y = avClip._y;
return(_local2);
}
function getIsShadow() {
return(isThisShadow);
}
function SetZ(Value) {
_z = Value;
if (action == SIT) {
avImage.avParts.body._y = (ORIGIN_Y + 20) - _z;
avImage.avParts.touch._y = -_z;
avImage.avParts.lowerBody._y = (ORIGIN_Y + 20) - _z;
} else {
avImage.avParts.body._y = ORIGIN_Y - _z;
avImage.avParts.touch._y = -_z;
avImage.avParts.lowerBody._y = ORIGIN_Y - _z;
}
if (_z < 0) {
avImage.SetMask();
} else {
avImage.RemoveMask();
}
}
function getAvatarActiveState() {
return(_global.myToyManager.isAvatarActive());
}
function initiateAction(type, isReset, icon) {
if (_global.myToyManager.isAvatarActive() == undefined) {
_global.myToyManager.setAvatarActive(false);
}
var _local4 = _global.myToyManager.isAvatarActive();
if ((!_local4) || (isReset)) {
currentToyType = type;
var _local5 = _global.gAvMan.getMyAvatar().avServerID;
_global.myToyManager.initToyEvent(type, avClip, gsc, _local5);
} else {
_global.myToyManager.cleanUpToy();
_global.myToyManager.setActivityType(null);
if (currentToyType == type) {
_global.myToyManager.sendDisableToServer(currentToyType, false);
} else {
_global.myToyManager.sendDisableToServer(currentToyType, true);
currentToyType = null;
initiateAction(type, true, icon);
}
}
previousIcon = icon;
}
function activateAvatarAction(actionArray) {
var _local2 = 0;
while (_local2 < 4) {
actionArray[_local2] = Number(actionArray[_local2]);
_local2++;
}
var _local4 = ((actionArray[4] == "miss") ? null : (_global.gAvMan.getAvatar(actionArray[4]).avClip));
if (actionArray[7] == "disable") {
_global.myToyManager.disableToy(actionArray);
} else {
_global.myToyManager.displayToyEvent(actionArray[0], actionArray[1], actionArray[2], actionArray[3], _local4, actionArray[5], actionArray[6], actionArray[7], actionArray[4], actionArray[7], actionArray[8], actionArray[9]);
}
}
function setAvatarAttack(avToAttack) {
if (avToAttack == "miss") {
_global.myToyManager.rollOutMemberAvatar();
} else {
_global.myToyManager.rollOverMemberAvatar();
}
avatarToAttack = avToAttack;
}
function getAvatarAttack() {
return(avatarToAttack);
}
var gaiaID = null;
var isOnRink = false;
static var ELEVATION = 0;
static var FRONT = 1;
static var BACK = 0;
static var RIGHT = 2;
static var LEFT = 0;
static var WALK = 8;
static var STAND = 4;
static var SIT = 0;
static var DIRECTIONS = ((RIGHT + LEFT) + FRONT) + BACK;
static var ACTIONS = (WALK + STAND) + SIT;
var orientation = RIGHT + FRONT;
var action = STAND;
var WALK_SPEED = 6;
static var BUFFER = 5;
static var FRAME_LENGTH = 41.6666666666667;
static var ORIGIN_Y = -139;
var vX = 0;
var vY = 0;
var lastT = 0;
var bobPointer = 0;
var isAvLoaded = false;
var isPoolInSet = true;
var isPoolOutSet = false;
static var avReady = false;
var avatarToAttack = "miss";
var isMiniAvatar = false;
var doorX = -1;
var doorY = -1;
var _z = 0;
}
Symbol 152 MovieClip [__Packages.classes.avatar.AvatarConfig] Frame 0
class classes.avatar.AvatarConfig
{
static var WORLD;
var jumpModel, viewWidth, viewHeight, mapWidth, mapHeight, avScale, startX, startY, miniAvScale, miniAvSpeed;
function AvatarConfig () {
jumpModel = classes.model.JumpModel.getInstance();
WORLD = _global.gCanvas;
viewWidth = 740;
viewHeight = 580;
trace("SCENE IN AV CONFIG=" + _global.scene);
switch (_global.scene) {
case "home" :
case "toHome" :
mapWidth = 740;
mapHeight = 580;
avScale = 100;
startX = WORLD.startPoint._x;
startY = WORLD.startPoint._y;
miniAvScale = 75;
miniAvSpeed = 15;
break;
case "train" :
case "toTrain" :
mapWidth = 768;
mapHeight = 768;
avScale = 75;
startX = WORLD.clipping_canvas.startPoint._x;
startY = WORLD.clipping_canvas.startPoint._y;
miniAvScale = 75;
miniAvSpeed = 15;
break;
case "town" :
default :
case "toMap" :
mapWidth = 1024;
mapHeight = 1024;
avScale = 75;
if (jumpModel.jumpFlag == false) {
startX = WORLD.clipping_canvas.startPoint._x;
startY = WORLD.clipping_canvas.startPoint._y;
} else {
startX = jumpModel.startX;
startY = jumpModel.startY;
}
trace("startX=" + startX);
trace("startY=" + startY);
miniAvScale = 75;
miniAvSpeed = 15;
}
}
}
Symbol 153 MovieClip [__Packages.classes.avatar.AvatarFollowers] Frame 0
class classes.avatar.AvatarFollowers
{
var dropRight, dropLeft, dropTop, dropBottom;
function AvatarFollowers () {
}
function initNameFollower(avClip, avText, avLvl) {
avClip.createTextField("nameTag", 1, -75, 8, 150, 20);
dropRight = new flash.filters.DropShadowFilter(1, 0, 4735843, 1, 0, 0, 1, 1);
dropLeft = new flash.filters.DropShadowFilter(1, 180, 4735843, 1, 0, 0, 1, 1);
dropTop = new flash.filters.DropShadowFilter(1, 90, 4735843, 1, 0, 0, 1, 1);
dropBottom = new flash.filters.DropShadowFilter(1, 270, 4735843, 1, 0, 0, 1, 1);
var _local4 = nameColor(avLvl);
var _local2 = new TextFormat();
_local2.color = _local4;
if (avLvl != "99") {
_local2.size = 10;
} else {
_local2.size = 12;
_local2.bold = true;
}
_local2.align = "center";
_local2.font = "Arial";
avClip.nameTag.setNewTextFormat(_local2);
avClip.nameTag.selectable = false;
avClip.nameTag.filters = [dropRight, dropLeft, dropTop, dropBottom];
avClip.nameTag.text = avText;
}
function nameColor(avLvl) {
var _local2 = _global.levelColors[avLvl][0];
if ((avLvl == undefined) || (avLvl == "undefined")) {
_local2 = "0xFFFFFF";
}
if (avLvl == "99") {
_local2 = "0xFF9900";
}
return(_local2);
}
function statsFollower() {
}
function menuFollower() {
}
function emoteFollower() {
}
function wordBubbleFollower() {
}
function fxFollower() {
}
function moveFollowers() {
_global.gBroadcaster.removeListener(this);
_global.gBroadcaster.addListener(this);
}
function run() {
}
function stopFollowers() {
}
function deleteAllFollowers() {
}
}
Symbol 154 MovieClip [__Packages.classes.avatar.MyAvatar] Frame 0
class classes.avatar.MyAvatar extends classes.avatar.GenericAvatar
{
static var oldAction, oldOrientation, oldEdge, oldX, oldY;
var mapMaxX, mapMaxY, mapMinX, avConfig, mapMinY, setPose, sendDelay, action, orientation, avClip, targetY, targetX, oldFrom, oldTo, oldPose, gsc, moveToStart, resetWalkData, move, feet, avatarToAttack, avServerID, walkTo;
function MyAvatar (sid, avatarURL, gender, fLegs, bLegs, fly, avShadow) {
super(sid, avatarURL, gender, fLegs, bLegs, fly, avShadow);
Mouse.addListener(this);
Key.addListener(this);
mapMaxX = (mapMaxY = 0);
mapMinX = avConfig.viewWidth - avConfig.mapWidth;
mapMinY = avConfig.viewHeight - avConfig.mapHeight;
initLocation();
initAdjustMap();
_root.ui_mc.navArrows.updateLoc();
var _local5 = ((oldAction == undefined) ? (classes.avatar.GenericAvatar.STAND) : (oldAction));
var _local6 = ((oldOrientation == undefined) ? (classes.avatar.GenericAvatar.RIGHT + classes.avatar.GenericAvatar.FRONT) : (oldOrientation));
setPose(_local6, _local5);
resetTargetXY();
if (_global.myToyManager.hasBall("soccer", _global.myUserData[1])) {
clearInterval(sendDelay);
sendDelay = setInterval(this, "sendToyUpdate", 1500, "soccer");
}
if (_global.myToyManager.hasBall("beach", _global.myUserData[1])) {
clearInterval(sendDelay);
sendDelay = setInterval(this, "sendToyUpdate", 1500, "beach");
}
_global.myToyManager.unlock("fireBall");
}
function sendToyUpdate(type) {
clearInterval(sendDelay);
_global.myToyManager.toyNotify(type);
}
function destroy() {
oldAction = ((action == classes.avatar.GenericAvatar.WALK) ? (classes.avatar.GenericAvatar.STAND) : (action));
oldOrientation = orientation;
Mouse.removeListener(this);
Key.removeListener(this);
super.destroy();
}
function sendAll() {
var _local2 = (Math.round(avClip._x) + ":") + Math.round(avClip._y);
var _local4 = (Math.round(targetX) + ":") + Math.round(targetY);
var _local3 = String(action + orientation);
if (((oldFrom != _local2) || (oldTo != _local4)) || (oldPose != _local3)) {
oldFrom = _local2;
oldTo = _local4;
oldPose = _local3;
gsc.update(_local2, _local4, _local3);
}
}
function initLocation() {
if (oldEdge == undefined) {
moveToStart();
} else {
moveToEdge(oldX, oldY, oldEdge);
oldX = null;
oldY = null;
oldEdge = null;
}
}
function moveToEdge(dataX, dataY, slideAxis) {
var _local2;
var _local4;
resetWalkData();
avClip._x = dataX;
avClip._y = dataY;
_local4 = 512 - avClip[slideAxis];
_local2 = _local4 / Math.abs(_local4);
while (classes.avatar.GenericAvatar.COLLISION.hitTest(avClip._x + classes.avatar.GenericAvatar.WORLD._x, avClip._y + classes.avatar.GenericAvatar.WORLD._y, true)) {
avClip[slideAxis] = avClip[slideAxis] + (20 * _local2);
}
}
function run() {
move();
if (updateFlag) {
updateFlag = false;
sendAll();
} else if (!(--updateInterval)) {
var _local3 = (Math.round(avClip._x) + ":") + Math.round(avClip._y);
if (oldFrom != _local3) {
oldFrom = _local3;
gsc.silentUpdate((int(avClip._x) + ":") + int(avClip._y));
}
updateInterval = updateIntervalSet;
}
adjustMap();
_root.ui_mc.navArrows.updateLoc();
}
function initAdjustMap() {
classes.avatar.GenericAvatar.WORLD._y = -(avClip._y - (avConfig.viewHeight / 2));
classes.avatar.GenericAvatar.WORLD._x = -(avClip._x - (avConfig.viewWidth / 2));
if (classes.avatar.GenericAvatar.WORLD._x < mapMinX) {
classes.avatar.GenericAvatar.WORLD._x = mapMinX;
} else if (classes.avatar.GenericAvatar.WORLD._x > mapMaxX) {
classes.avatar.GenericAvatar.WORLD._x = mapMaxX;
}
if (classes.avatar.GenericAvatar.WORLD._y < mapMinY) {
classes.avatar.GenericAvatar.WORLD._y = mapMinY;
} else if (classes.avatar.GenericAvatar.WORLD._y > mapMaxY) {
classes.avatar.GenericAvatar.WORLD._y = mapMaxY;
}
}
function adjustMap() {
var _local3 = classes.avatar.GenericAvatar.WORLD._x + avClip._x;
var _local2 = classes.avatar.GenericAvatar.WORLD._y + avClip._y;
var _local4 = avConfig.viewWidth - borderX;
var _local5 = avConfig.viewHeight - borderBot;
if (_local3 > _local4) {
classes.avatar.GenericAvatar.WORLD._x = Math.max(Math.round(_local4 - avClip._x), mapMinX);
} else if (_local3 < borderX) {
classes.avatar.GenericAvatar.WORLD._x = Math.min(Math.round(borderX - avClip._x), mapMaxX);
}
if (_local2 > _local5) {
classes.avatar.GenericAvatar.WORLD._y = Math.max(Math.round(_local5 - avClip._y), mapMinY);
} else if (_local2 < borderTop) {
classes.avatar.GenericAvatar.WORLD._y = Math.min(Math.round(borderTop - avClip._y), mapMaxY);
}
}
function sitDown(direction) {
super.sitDown(direction);
resetTargetXY();
}
function standUp(direction) {
super.standUp(direction);
resetTargetXY();
}
function rotateTo(toX, toY) {
super.rotateTo(toX, toY);
resetTargetXY();
}
function resetTargetXY() {
targetX = avClip._x;
targetY = avClip._y;
sendAll();
}
function lockWalking(setLock) {
if (setLock == true) {
stopMove();
walkLock = true;
} else {
walkLock = false;
}
}
function stopMove() {
var _local4;
super.stopMove();
updateFlag = false;
resetTargetXY();
_local4 = _root.ui_mc.navArrows.isTouching(feet);
switch (_local4) {
case ui.JumpPoints.NORTH :
oldX = avClip._x;
oldY = 1004;
oldEdge = "_x";
break;
case ui.JumpPoints.SOUTH :
oldX = avClip._x;
oldY = 150;
oldEdge = "_x";
break;
case ui.JumpPoints.EAST :
oldX = 15;
oldY = avClip._y;
oldEdge = "_y";
break;
case ui.JumpPoints.WEST :
oldX = 1009;
oldY = avClip._y;
oldEdge = "_y";
}
if (_local4 != null) {
_root.ui_mc.navArrows.trigger(_local4);
}
}
function onMouseUp() {
if (_global.isAvatarBusy) {
_global.myToyManager.mouseUpEvent();
}
}
function onMouseDown() {
if (_global.isAvatarBusy) {
var _local4 = _global.myToyManager.getActivityType();
var _local7 = [avClip._x, avClip._y - 50, _global.gCanvas._xmouse, _global.gCanvas._ymouse, avatarToAttack, _local4, avClip, avServerID];
_global.myToyManager.activateToy(gsc, _local7, _local4);
rotateTo(classes.avatar.GenericAvatar.WORLD._xmouse, classes.avatar.GenericAvatar.WORLD._ymouse);
} else if (walkLock == false) {
var _local5 = _root._xmouse;
var _local6 = _root._ymouse;
if (!_root.ui_mc.uiArea.hitTest(_local5, _local6, 1)) {
updateFlag = true;
if (action != classes.avatar.GenericAvatar.SIT) {
walkTo(classes.avatar.GenericAvatar.WORLD._xmouse, classes.avatar.GenericAvatar.WORLD._ymouse);
} else {
rotateTo(classes.avatar.GenericAvatar.WORLD._xmouse, classes.avatar.GenericAvatar.WORLD._ymouse);
}
}
}
}
function onKeyDown() {
if (walkLock == false) {
updateFlag = true;
if (Key.isDown(37) && (keyFlag != 7)) {
keyFlag = 7;
if (action != classes.avatar.GenericAvatar.SIT) {
walkTo(0, avClip._y);
} else {
rotateTo(0, avClip._y);
}
} else if (Key.isDown(38) && (keyFlag != 1)) {
keyFlag = 1;
if (action != classes.avatar.GenericAvatar.SIT) {
walkTo(avClip._x, 0);
} else {
rotateTo(avClip._x, 0);
}
} else if (Key.isDown(39) && (keyFlag != 3)) {
keyFlag = 3;
if (action != classes.avatar.GenericAvatar.SIT) {
walkTo(avConfig.mapWidth, avClip._y);
} else {
rotateTo(avConfig.mapWidth, avClip._y);
}
} else if (Key.isDown(40) && (keyFlag != 5)) {
keyFlag = 5;
if (action != classes.avatar.GenericAvatar.SIT) {
walkTo(avClip._x, avConfig.mapHeight);
} else {
rotateTo(avClip._x, avConfig.mapHeight);
}
}
}
}
function onKeyUp() {
switch (Key.getCode()) {
case 37 :
case 38 :
case 39 :
case 40 :
if (action != classes.avatar.GenericAvatar.SIT) {
sendAll();
}
stopMove();
keyFlag = -1;
}
}
var borderX = 175;
var borderTop = 250;
var borderBot = 150;
var walkLock = false;
var updateIntervalSet = 24;
var updateInterval = classes.avatar.MyAvatar.prototype.updateIntervalSet;
var updateFlag = false;
var keyFlag = -1;
}
Symbol 155 MovieClip [__Packages.classes.avatar.MemberAvatar] Frame 0
class classes.avatar.MemberAvatar extends classes.avatar.GenericAvatar
{
var sendDelay, gsc, avServerID, avClip, sitDown, standUp, isOnRink, walkTo, topFXLayer, gaiaID, avConfig, gaiaName, move;
function MemberAvatar (sid, avData, gender, fLegs, bLegs, fly, avShadow) {
super(sid, avData, gender, fLegs, bLegs, fly, avShadow);
if (_global.myToyManager.hasBall("soccer", _global.myUserData[1])) {
sendDelay = setInterval(this, "sendToyUpdate", 3000, "soccer");
}
if (_global.myToyManager.hasBall("beach", _global.myUserData[1])) {
sendDelay = setInterval(this, "sendToyUpdate", 3000, "beach");
}
if (_global.myToyManager.hasCone(_global.myUserData[1])) {
sendDelay = setInterval(this, "sendToyUpdate", 3000, "cones");
}
var _local4 = gsc.getMemberData(avServerID);
if (_local4 != null) {
gsc.regEvent(avServerID, this);
if (_local4[0] == "-1") {
_local4[0] = "-50:-50";
_local4[1] = "-50:-50";
_local4[2] = classes.avatar.GenericAvatar.STAND;
}
updateMember(avServerID, _local4);
}
}
function sendToyUpdate(type) {
clearInterval(sendDelay);
_global.myToyManager.toyNotify(type);
}
function onUpdateMember(memberID, data) {
var _local2 = gsc.getMemberData(memberID);
updateMember(memberID, _local2);
}
function updateMember(memberID, data) {
if (data != null) {
trace("[MemberAvatar] update member data: " + data.join(","));
var _local3 = data[0];
var _local5 = data[1];
var _local8;
var _local7;
var _local2;
var _local9;
var _local6;
_local2 = _local3.indexOf(":");
avClip._x = Number(_local3.substring(0, _local2));
avClip._y = Number(_local3.substring(_local2 + 1));
_local9 = data[2] & ((classes.avatar.GenericAvatar.WALK + classes.avatar.GenericAvatar.STAND) + classes.avatar.GenericAvatar.SIT);
_local6 = data[2] & (((classes.avatar.GenericAvatar.FRONT + classes.avatar.GenericAvatar.BACK) + classes.avatar.GenericAvatar.RIGHT) + classes.avatar.GenericAvatar.LEFT);
switch (_local9) {
case classes.avatar.GenericAvatar.SIT :
sitDown(_local6);
break;
case classes.avatar.GenericAvatar.STAND :
standUp(_local6);
break;
case classes.avatar.GenericAvatar.WALK :
_local2 = _local5.indexOf(":");
_local8 = Number(_local5.substring(0, _local2));
_local7 = Number(_local5.substring(_local2 + 1));
if (isOnRink && (_local3 == _local5)) {
walkTo(_local8, _local7, _local6);
} else {
walkTo(_local8, _local7);
}
break;
default :
trace("[MemberAvatar] ERROR: unexpected member data!");
}
}
}
function ignoreUserAnimation() {
if (avClip._alpha == 100) {
var thisAv = this;
var _local4 = new Object();
var _local3 = new MovieClipLoader();
_local4.onLoadStart = function (target_mc) {
target_mc._xscale = (target_mc._yscale = _global.area.avScale);
target_mc.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
thisAv.playFx("poof", "top", thisAv.ignoreUser());
delete this.onEnterFrame;
this.unloadMovie();
}
};
};
_local3.addListener(_local4);
_local3.loadClip(_global.filePath + "effects/fireBall.swf", topFXLayer);
}
}
function ignoreUser() {
_global.ignoreUserManager.addUserToIgnoreList(gaiaID, avServerID);
}
function doAction(action) {
switch (action) {
case "over" :
_global.targetAvatar = this;
_global.miniMenu.showMiniMenu(avServerID, gaiaID, avClip, avConfig.avScale, gaiaName);
break;
case "press" :
break;
case "out" :
_global.targetAvatar = null;
}
}
function destroy() {
_global.miniMenu.hideMenu();
gsc.deregEvent(avServerID);
_global.gBroadcaster.removeListener(this);
_global.myToyManager.removeBalls(avServerID);
_global.myToyManager.removeCones(avServerID);
avClip.removeMovieClip();
}
function run() {
move();
}
}
Symbol 156 MovieClip [__Packages.com.rawfishsoftware.sushi.SushiAPI] Frame 0
class com.rawfishsoftware.sushi.SushiAPI
{
var $d, $e, session, me, member, mob, room, team, challenge, event, logger, serial, connectionType, $fps, ip, port, $game, $cb, $sc, $socket, $http, $cbid, $cblist, $pollFreq, $memberIDs, $memberNames, $tempTeamList, $nocb, $toGo, $ttid, $clientSpeed;
function SushiAPI () {
$d = "\x02";
$e = "\x03";
session = new com.rawfishsoftware.sushi.Session(this);
me = new com.rawfishsoftware.sushi.Me(this);
member = new com.rawfishsoftware.sushi.Member(this);
mob = new com.rawfishsoftware.sushi.Mob(this);
room = new com.rawfishsoftware.sushi.Room(this);
team = new com.rawfishsoftware.sushi.Team(this);
challenge = new com.rawfishsoftware.sushi.Challenge(this);
event = new com.rawfishsoftware.sushi.Event(this);
logger = new com.rawfishsoftware.sushi.Logger(this);
serial = new com.rawfishsoftware.sushi.Serializer();
$speedCheck();
$init();
session.sessionList = [];
connectionType = "";
me.$init();
$fps = 0;
}
function connectToServer() {
if (arguments[0].toUpperCase() == "SOCKET") {
connectToServerSocket(arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);
} else if (arguments[0].toUpperCase() == "HTTP") {
connectToServerHTTP(arguments[1], arguments[2], arguments[3], arguments[4]);
}
}
function connectToServerSocket(ip, port, game, callback, scope) {
$smode = 1;
this.ip = ip;
this.port = port;
$game = game;
$cb = callback;
$sc = scope;
$socket = new com.rawfishsoftware.sushi.SushiSocket(ip, port, this);
}
function connectToServerHTTP(ip, game, callback, scope) {
$smode = 0;
this.ip = ip;
$game = game;
$cb = callback;
$sc = scope;
$http = new com.rawfishsoftware.sushi.SushiHTTP(ip, this);
}
function disconnectFromServer() {
if ($smode) {
$socket.close();
_root.$$sushimc.swapDepths(0);
_root.$$sushimc.removeMovieClip();
$init();
} else {
var _local3 = new LoadVars();
_local3.i = me.id;
_local3.m = (("11" + $d) + me.id) + $e;
_root.$$sushimc.swapDepths(0);
_root.$$sushimc.removeMovieClip();
$init();
_local3.onLoad = function (s) {
};
_local3.sendAndLoad($http.ip, _local3, "POST");
}
session.sessionList = [];
connectionType = "";
me.$init();
}
function sendUserMessage(messageID, routing, targetID, dataArray) {
$sts = $sts + ((((((((((("53" + $d) + messageID) + $d) + me.id) + $d) + routing) + $d) + targetID) + $d) + dataArray.join($d)) + $e);
}
function getFPS(fps) {
$fps = fps;
}
function loadSessionList(gameName, callback, scope) {
$cblist[++$cbid] = {event:callback, action:7, scope:scope};
$sts = $sts + ((((("29" + $d) + $cbid) + $d) + gameName) + $e);
}
function getSessionList() {
return(session.sessionList);
}
function setPollingInterval(frames) {
$pollFreq = frames;
}
function getPollingInterval() {
return($pollFreq);
}
function searchMember(memberName, callback, scope) {
$cblist[++$cbid] = {event:callback, scope:scope};
$sts = $sts + ((((("51" + $d) + $cbid) + $d) + memberName) + $e);
}
function isBadWord(word, callback, scope) {
$cblist[++$cbid] = {event:callback, scope:scope};
$sts = $sts + ((((("57" + $d) + $cbid) + $d) + word) + $e);
}
function callPlugin(pluginID, parameters, callback, scope) {
$cblist[++$cbid] = {event:callback, scope:scope};
$sts = $sts + ((((((("19" + $d) + $cbid) + $d) + pluginID) + $d) + parameters.join($d)) + $e);
}
function receiveMyUpdates(status) {
$sts = $sts + ((("4" + $d) + int(status)) + $e);
}
function encodeObject(objectToEncode) {
return(serial.serialize(objectToEncode));
}
function decodeObject(stringToDecode) {
return(serial.unserialize(stringToDecode));
}
function sendObject(routing, targetID, objectToSend) {
$sts = $sts + ((((((("86" + $d) + routing) + $d) + targetID) + $d) + serial.serialize(objectToSend)) + $e);
}
function getVersion() {
return(((($majorVersion + ".") + $minorVersion) + ".") + $subVersion);
}
function echo() {
var _local2 = new LocalConnection();
_local2.send("_SUSHIOutput", "echo", arguments);
}
function getMemberList(roomID) {
if (roomID == undefined) {
roomID = "";
}
$sts = $sts + ((("14" + $d) + roomID) + $e);
}
function enableLogging(value) {
logging = value;
if (connectionType != "") {
$sts = $sts + ((("87" + $d) + Number(value)) + $e);
}
}
function $init() {
$cb = null;
$sc = null;
$memberIDs = {x0:"Administrator"};
$memberNames = {xAdministrator:0};
$cbid = 0;
$cblist = {};
$tempTeamList = {};
$pollFreq = 100;
$nocb = true;
$toGo = 0;
member.$init();
mob.$init();
team.$init();
session.$init();
room.$init();
challenge.$init();
event.$init();
}
function $p($x) {
var _local71 = $x.split($e);
var _local72 = _local71.length - 1;
var _local38;
var _local12;
var _local4;
_local38 = 0;
while (_local38 < _local72) {
_local12 = _local71[_local38].split($d);
if (logging) {
logger.log(_local12, "SERVER");
}
_local4 = parseInt(_local12[0]);
if (_local4 == 6) {
$onUpdate(member, _local12, event.onUpdateMember);
} else if (_local4 == 26) {
$onUpdate(mob, _local12, event.onUpdateMob);
} else if (_local4 == 54) {
$onIndexUpdate(member, _local12, event.onIndexUpdateMember);
} else if (_local4 == 60) {
$onIndexUpdate(mob, _local12, event.onIndexUpdateMob);
} else if (_local4 == 40) {
$onUpdate(team, _local12, event.onUpdateTeam);
} else if (_local4 == 38) {
$onUpdate(room, _local12, event.onUpdateRoom);
} else if (_local4 == 17) {
var _local42 = _local12.slice(1, _local12.length);
var _local43 = _local42.length;
var _local65 = session.data;
var _local21;
var _local27 = session.__cb;
var _local7 = 0;
while (_local7 < _local43) {
_local21 = _local42[_local7];
_local65[_local21] = _local42[_local7 + 1];
if (_local27) {
var _local18 = _local27["_" + _local21];
if (_local18) {
_local18.cb.apply(_local18.sc, [_local42[_local7 + 1]]);
}
}
_local7 = _local7 + 2;
}
event.onIndexUpdateSession.$call(_local42);
} else if (_local4 == 75) {
$onIndexUpdate(room, _local12, event.onIndexUpdateRoom);
} else if (_local4 == 74) {
$onIndexUpdate(team, _local12, event.onIndexUpdateTeam);
} else if (_local4 == 25) {
var _local48 = _local12[1];
var room = parseInt(_local12[2]);
var _local44 = parseInt(_local12[3]);
var _local51 = _local12.slice(4, _local12.length);
if (mob.list["_" + _local48] == null) {
var _local6 = (mob.list["_" + _local48] = {id:_local48, room:room, member:_local44});
room.list["_" + room].mobs.push(_local48);
}
mob.list["_" + _local48].data = _local51;
if ($nocb) {
event.onNewMob.$call(_local48, _local44, _local51);
}
} else if (_local4 == 27) {
var _local48 = _local12[1];
var _local24 = mob.list["_" + _local48].room;
$removeValue(room.list["_" + _local24].mobs, _local48);
delete mob.list["_" + _local48];
event.onRemoveMob.$call(_local48);
} else if (_local4 == 21) {
var _local48 = int(_local12[1]);
if (_local48 != me.id) {
var _local19 = int(_local12[2]);
var _local6 = int(_local12[3]);
var _local42 = _local12.slice(4, _local12.length);
var _local24 = room.list["_" + _local6];
var _local10 = 0;
while (_local10 < _local24.mobs.length) {
delete mob.list["_" + _local24.mobs[_local10]];
_local10++;
}
_local24.mobs = [];
$removeValue(_local24.members, _local48);
room.list["_" + _local19].members.push(_local48);
member.list["_" + _local48].room = _local19;
$reb(_local42, member.list["_" + _local48].data);
event.onMemberChangesRoom.$call(_local48, _local19, _local6, _local42);
echo("removeMember");
if (challenge.id && (_local6 == challenge.room)) {
$removeValue(challenge.$challengers, _local48);
echo((("remove from challengerlist:" + challenge.$challengers) + " ") + _local48);
}
}
} else if (_local4 == 53) {
var _local42 = _local12.slice(5, _local12.length);
event.onUserMessage.$call(_local12[1], int(_local12[2]), int(_local12[3]), int(_local12[4]), _local42);
} else if (_local4 == 5) {
var _local28 = int(_local12[1]);
var _local30 = _local12[2];
var _local45 = int(_local12[3]);
var _local37 = int(_local12[4]);
var _local55 = _local12[5];
var _local50 = _local12.slice(6, _local12.length);
room.list["_" + _local37].members.push(_local28);
session.members.push(_local28);
$memberIDs["x" + _local28] = _local30;
$memberNames["x" + _local30] = _local28;
team.list["_" + _local45].members.push(_local28);
member.list["_" + _local28] = {id:_local28, name:_local30, room:_local37, team:_local45, data:_local50, platform:_local55, challenger:0, spectator:0};
event.onNewMember.$call(_local28, _local45, _local37, _local55, _local50);
} else if (_local4 == 16) {
var _local42 = _local12.slice(1, _local12.length);
var _local65 = session.data;
var _local27 = session.__cb;
var _local56 = _local42.length;
var _local7 = 0;
while (_local7 < _local56) {
_local65[_local7] = _local42[_local7];
if (_local27) {
var _local18 = _local27["_" + _local7];
if (_local18) {
_local18.cb.apply(_local18.sc, [_local42[_local7]]);
}
}
_local7++;
}
if ($nocb) {
event.onUpdateSession.$call(_local48, _local42);
}
} else if (_local4 == 10) {
event.onChatMessage.$call(int(_local12[1]), int(_local12[2]), int(_local12[3]), _local12[4]);
} else if (_local4 == 11) {
var _local28 = int(_local12[1]);
var _local45 = int(_local12[2]);
var room = int(_local12[3]);
var _local30 = member.getName(_local28);
if (challenge.id) {
$removeValue(challenge.$challengers, _local28);
}
session.members.removeValue(_local28);
$removeValue(room.list["_" + room].members, _local28);
$removeValue(team.list["_" + _local45].members, _local28);
$removeValue(session.members, _local28);
event.onRemoveMember.$call(_local28, _local45, room);
delete $memberIDs["x" + _local28];
delete $memberNames["x" + _local30];
} else if (_local4 == 86) {
event.onObjectReceived.$call(int(_local12[1]), int(_local12[2]), serial.unserialize(_local12[3]));
} else if (_local4 == 62) {
ping = getTimer() - $netTimer;
} else if (_local4 == 49) {
var _local48 = int(_local12[1]);
var _local41 = int(_local12[2]);
member.list["_" + _local48].spectator = _local41;
event.onBeSpectator.$call(_local48, _local41);
} else if (_local4 == 32) {
var _local9 = "";
var _local63 = 1;
var _local49 = parseInt(_local12[1]);
var _local3 = parseInt(_local12[2]);
var _local53 = $cblist[_local49];
var _local69 = _local53.action;
if (!_local3) {
if (_local69 == 2) {
if (logging) {
_local9 = "'changeRoom' status:" + logger.errors[_local3];
}
$reb(_local53.data, me.data);
$removeValue(room.list["_" + me.room].members, me.id);
if ($toGo) {
_local53.toGo = $toGo;
}
me.room = _local53.toGo;
room.list["_" + me.room].members.push(me.id);
mob.$iid = 0;
$nocb = true;
me.$roomToGo = null;
if (challenge.id && (challenge.room != _local53.toGo)) {
challenge.id = 0;
challenge.$challengers = [];
me.moderator = 0;
}
$toGo = 0;
} else if (_local69 == 3) {
if (logging) {
_local9 = "'createRoom' status:" + logger.errors[_local3];
}
} else if (_local69 == 4) {
if (logging) {
_local9 = "'joinSession' status:" + logger.errors[_local3];
}
if ($toGo) {
_local53.roomToGo = $toGo;
}
me.session = _local53.sessionToGo;
me.team = _local53.teamToGo;
me.room = _local53.roomToGo;
me.data = _local53.data;
var _local6 = $tempTeamList["_" + me.session].teamList;
var _local56 = _local6.length;
var _local13;
var _local7 = 0;
while (_local7 < _local56) {
session.teams.push(_local6[_local7].id);
_local13 = (team.list["_" + _local6[_local7].id] = {});
_local13.limit = _local6[_local7].limit;
_local13.name = _local6[_local7].name;
_local13.id = _local6[_local7].id;
_local13.members = [];
_local7++;
}
room.list["_" + me.room].members.push(me.id);
session.members.push(me.id);
$memberIDs["x" + me.id] = me.name;
$memberNames["x" + me.name] = me.id;
member.list["_" + me.id] = {challenger:0, id:me.id, name:me.name, room:me.room, team:me.team, data:me.data, platform:"FLASH"};
_local6 = session.getMemberIDs();
_local56 = _local6.length;
_local7 = 0;
while (_local7 < _local56) {
var _local65 = _local6[_local7];
team.list["_" + member.getTeam(_local65)].members.push(_local65);
_local7++;
}
_local7 = 0;
while (_local7 < session.sessionList.length) {
_local6 = session.sessionList[_local7];
if (_local6.id == me.session) {
break;
}
_local7++;
}
session.id = _local6.id;
session.name = _local6.name;
$nocb = true;
} else if (_local69 == 5) {
if (logging) {
_local9 = "'changeTeam' status:" + logger.errors[_local3];
}
$removeValue(team.list["_" + me.team].members, me.id);
me.team = _local53.toGo;
team["_" + me.team].members.push(me.id);
} else if (_local69 == 6) {
_local53.obj.data[_local53.index] = _local53.value;
} else if (_local69 == 12) {
if (logging) {
_local9 = "'beSpectator' status:" + logger.errors[_local3];
}
me.spectator = _local53.value;
} else if (_local69 == 8) {
if (logging) {
_local9 = "'changeName' status:" + logger.errors[_local3];
}
var _local19 = _local53.newName;
delete $memberNames["x" + me.name];
$memberNames["x" + _local19] = me.id;
me.name = (member.list["_" + me.id].name = ($memberIDs["x" + me.id] = _local19));
}
} else {
if (_local3 == 10) {
if (logging) {
logger.log("Server is full!", "STATUS");
}
$cb.apply($sc, [3]);
$cb = ($sc = null);
disconnectFromServer();
}
if (_local69 == 7) {
if (logging) {
_local9 = "'loadSessionList' status:" + logger.errors[_local3];
}
_local3 = 2;
} else if (_local69 == 3) {
if (_local3 == 11) {
if (logging) {
_local9 = "'createRoom' status:" + logger.errors[_local3];
}
_local3 = 2;
}
} else if (_local69 == 4) {
if (logging) {
_local9 = "'joinSession' status:" + logger.errors[_local3];
}
if (_local3 == 3) {
_local3 = 1;
} else if (_local3 == 4) {
_local3 = 2;
} else if (_local3 == 2) {
_local3 = 3;
} else if (_local3 == 5) {
_local3 = 4;
} else if (_local3 == 14) {
_local3 = 5;
}
} else if (_local69 == 2) {
if (logging) {
_local9 = "'changeRoom' status:" + logger.errors[_local3];
}
if (_local3 == 2) {
_local3 = 1;
} else if (_local3 == 6) {
_local3 = 2;
} else if (_local3 == 7) {
_local3 = 3;
} else if (_local3 == 13) {
_local63 = 0;
_local3 = 4;
} else if (_local3 == 14) {
_local3 = 5;
}
} else if (_local69 == 6) {
if (logging) {
_local9 = "'indexUpdateConditional' status:" + logger.errors[_local3];
}
_local3 = 1;
} else if (_local69 == 10) {
if (_local3 == 12) {
if (logging) {
_local9 = "'requestChallenge' status:" + logger.errors[_local3];
}
challenge.id = int(_local12[3]);
me.moderator = 1;
_local3 = 0;
challenge.$template = _local53.template;
challenge.$timeout = _local53.timeout;
challenge.$minMembers = _local53.minMembers;
} else {
if (logging) {
_local9 = "'requestChallenge' status:" + logger.errors[_local3];
}
challenge.id = 0;
_local3 = 1;
}
} else if (_local69 == 12) {
if (logging) {
_local9 = "'beSpectator' status:" + logger.errors[_local3];
}
if (_local3 == 8) {
_local3 = 1;
}
} else if (_local69 == 8) {
if (logging) {
_local9 = "'changeName' status:" + logger.errors[_local3];
}
if (_local3 == 5) {
_local3 = 1;
} else if (_local3 == 3) {
_local3 = 2;
}
}
}
if (logging) {
logger.log(_local9, "STATUS");
}
_local53.event.apply(_local53.scope, ((_local12.length == 4) ? [_local3, parseInt(_local12[3])] : [_local3]));
if (_local63) {
delete $cblist[_local49];
}
} else if (_local4 == 19) {
var _local49 = parseInt(_local12[1]);
var _local53 = $cblist[_local49];
_local53.event.apply(_local53.scope, _local12.slice(3, _local12.length));
delete $cblist[_local49];
} else if (_local4 == 30) {
var _local26 = int(_local12[1]);
var _local35 = parseInt(_local12[2]);
var _local29 = 0;
var _local30 = _local12[3];
var _local16 = _local12[4].split("\x04");
var _local56 = _local16.length;
var _local20 = [];
var _local42 = [];
_local42 = _local12.slice(5, _local12.length);
var _local10 = 0;
while (_local10 < _local56) {
_local29 = (_local20[_local16[_local10]] = int(_local16[_local10 + 1]));
_local10 = _local10 + 2;
}
session.rooms.push(_local26);
room.list["_" + _local26] = {data:_local42, mobs:[], members:[], waitingQueue:[], locked:0, id:_local26, limit:_local29, name:_local30, teamLimits:_local20, password:_local35};
(_local42.length ? event.onNewRoom.$call(_local26, _local30, _local29, _local42) : event.onNewRoom.$call(_local26, _local30, _local29));
} else if (_local4 == 23) {
var room = int(_local12[1]);
$removeValue(session.rooms, room);
delete room.list["_" + room];
event.onRemoveRoom.$call(room);
} else if (_local4 == 34) {
room.list["_" + me.$roomToGo].waitingQueue = [];
if (_local12[1] != null) {
var _local42 = _local12.slice(1, _local12.length);
room.list["_" + me.$roomToGo].waitingQueue = _local42;
event.onUpdateWaitingQueue.$call(me.$roomToGo, _local42);
}
} else if (_local4 == 67) {
challenge.id = int(_local12[1]);
_local12.push(me.id);
var _local65 = _local12.slice(3, _local12.length);
event.onChallengeRequest.$call(int(_local12[2]), _local65);
} else if (_local4 == 69) {
challenge.$challengers = _local12.slice(3, _local12.length);
challenge.room = int(_local12[2]);
event.onStartChallenge.$call(int(_local12[2]));
} else if (_local4 == 73) {
event.onPlay.$call(int(_local12[1]));
} else if (_local4 == 68) {
if (challenge.id == _local12[2]) {
event.onAnswerChallengeRequest.$call(int(_local12[1]), int(_local12[3]));
}
} else if (_local4 == 72) {
if (challenge.id == int(_local12[1])) {
challenge.id = 0;
challenge.$challengers = [];
me.moderator = 0;
event.onCancelChallenge.$call(int(_local12[2]));
}
} else if (_local4 == 18) {
if (me.id == int(_local12[1])) {
me.moderator = 1;
}
event.onModeratorChanged.$call(int(_local12[1]));
} else if (_local4 == 64) {
(int(_local12[2]) ? event.onIncludeMember.$call(int(_local12[1])) : event.onExcludeMember.$call(int(_local12[1])));
} else if (_local4 == 24) {
$toGo = int(_local12[1]);
} else if (_local4 == 36) {
var _local28 = _local12[1];
var _local30 = _local12[2];
delete $memberNames["x" + _local30];
$memberNames["x" + _local30] = _local28;
member.list["_" + _local28].name = ($memberIDs["x" + _local28] = _local30);
event.onMemberNameChanged.$call(int(_local28), _local30);
} else if (_local4 == 39) {
room.list["_" + _local12[1]].locked = int(_local12[2]);
event.onRoomLocked.$call(int(_local12[1]), int(_local12[2]));
} else if (_local4 == 8) {
me.master = 1;
event.onMaster.$call();
} else if (_local4 == 9) {
me.master = 0;
event.onSlave.$call();
} else if (_local4 == 43) {
var _local48 = parseInt(_local12[1]);
if (_local48 != me.id) {
var _local36 = int(_local12[3]);
var _local59 = int(_local12[2]);
$removeValue(team.list["_" + _local59].members, _local48);
team.list["_" + _local36].members.push(_local48);
member.list["_" + _local48].team = _local36;
event.onMemberChangesTeam.$call(_local48, _local59, _local36);
}
} else if (_local4 == 52) {
var _local53 = $cblist[_local12[1]];
if (_local12[2] == -1) {
_local53.event.apply(_local53.scope, [0]);
} else {
var _local31 = [];
var _local56 = _local12.length;
var _local7 = 2;
while (_local7 < _local56) {
if (_local12[_local7] != -1) {
_local31.push({id:_local12[_local7], session:_local12[_local7 + 1], team:_local12[_local7 + 2], room:_local12[_local7 + 3], spectator:0});
}
_local7 = _local7 + 4;
}
_local53.event.apply(_local53.scope, [_local31]);
}
} else if (_local4 == 56) {
event.onSystemMessage.$call(_local12[1]);
} else if (_local4 == 1) {
if (connectionType == "HTTP") {
$http.lv.i = (me.id = parseInt(_local12[1]));
$http.lv.s = parseInt(_local12[2]);
} else {
me.id = parseInt(_local12[1]);
}
} else if (_local4 == 2) {
$cblist[++$cbid] = {event:$cb, action:7, scope:$sc};
$sts = $sts + ((((("29" + $d) + $cbid) + $d) + $game) + $e);
$sts = $sts + ((("3" + $d) + (getTimer() - $netTimer)) + $e);
if (logging) {
$sts = $sts + ((("87" + $d) + "1") + $e);
}
} else if (_local4 == 35) {
var _local29 = 0;
var _local17;
var _local32 = _local12.length;
var _local19 = 1;
var _local64;
var _local34;
var _local20 = [];
var _local33;
var _local66;
var _local68 = 0;
while (_local19 < _local32) {
var _local48 = parseInt(_local12[_local19++]);
var _local35 = ((parseInt(_local12[_local19++]) == 1) ? true : false);
_local66 = parseInt(_local12[_local19++]);
_local64 = parseInt(_local12[_local19++]);
_local34 = _local12[_local19++];
_local33 = parseInt(_local12[_local19++]);
var _local16 = _local12[_local19++].split("\x04");
var _local56 = _local16.length;
_local20 = [];
var _local10 = 0;
while (_local10 < _local56) {
_local29 = _local29 + ((_local20[_local16[_local10]] = parseInt(_local16[_local10 + 1])));
_local10 = _local10 + 2;
}
session.rooms.push(_local48);
_local17 = (room.list["_" + _local48] = {data:[], mobs:[], members:[], waitingQueue:[], locked:_local33, id:_local48, limit:_local29, name:_local34, teamLimits:_local20, password:_local35});
while ((_local12[_local19].charCodeAt(0) != 1) && (_local19 < _local32)) {
_local17.data.push(_local12[_local19]);
_local19++;
}
_local19++;
_local29 = 0;
}
} else if (_local4 == 7) {
if (!$smode) {
event.onDisconnect.$call();
}
_root.$$sushimc.swapDepths(0);
_root.$$sushimc.removeMovieClip();
$init();
event.onServerRestart.$call();
} else if (_local4 == 65) {
var _local48 = int(_local12[1]);
if ((_local48 == me.id) && (!$smode)) {
_root.$$sushimc.swapDepths(0);
_root.$$sushimc.removeMovieClip();
$init();
}
event.onMemberKicked.$call(_local48);
} else if (_local4 == 77) {
event.onBadwordDetected.$call();
} else if (_local4 == 57) {
var _local49 = parseInt(_local12[1]);
var _local53 = $cblist[_local49];
_local53.event.apply(_local53.scope, [parseInt(_local12[2])]);
delete $cblist[_local49];
} else if (_local4 == 61) {
if (connectionType == "SOCKET") {
$pint = setInterval(this, "$ping", parseInt(_local12[1]));
}
} else if (_local4 == 44) {
var _local67 = true;
var _local19 = 2;
var _local25;
var _local5;
var _local8;
var _local11;
var _local32 = _local12.length;
var _local60 = $cblist[_local12[1]];
session.sessionList = [];
var _local22;
while (_local19 < _local32) {
_local25 = parseInt(_local12[_local19++]);
_local5 = {};
var _local14 = 0;
var _local15 = 0;
_local5.teamList = [];
_local5.name = _local12[_local19++];
_local5.version = _local12[_local19++];
_local5.id = _local25;
session.sessionList.push(_local5);
_local22 = ($tempTeamList["_" + _local25] = {});
_local22.teamList = [];
do {
_local8 = {};
_local11 = {};
var _local48 = (_local11.id = (_local8.id = parseInt(_local12[_local19++])));
$ttid[_local48] = [];
_local8.name = (_local11.name = _local12[_local19++]);
_local14 = _local14 + ((_local8.activeMembers = parseInt(_local12[_local19++])));
_local15 = _local15 + ((_local11.limit = (_local8.limit = parseInt(_local12[_local19++]))));
_local5.teamList.push(_local8);
_local22.teamList.push(_local11);
} while (_local12[_local19].charCodeAt(0) != 1);
_local5.activeMembers = _local14;
_local5.limit = _local15;
_local14 = 0;
_local15 = 0;
_local5.data = [];
_local19++;
do {
_local5.data.push(_local12[_local19++]);
} while (_local12[_local19].charCodeAt(0) != 1);
_local19++;
}
_local60.event.apply(_local60.scope, [0]);
delete $cblist[_local12[1]];
} else if (_local4 == 33) {
if (_local12[1] != null) {
var _local56 = _local12.length - 6;
var _local23;
var _local7 = 0;
while (_local7 <= _local56) {
var _local48 = parseInt(_local12[_local7 + 4]);
_local23 = parseInt(_local12[_local7 + 1]);
var _local24 = parseInt(_local12[_local7 + 2]);
var _local19 = _local12[_local7 + 5];
var _local32 = parseInt(_local12[_local7 + 3]);
var _local17 = _local12[_local7 + 6];
session.members.push(_local48);
room.list["_" + _local24].members.push(_local48);
team.list["_" + _local23].members.push(_local48);
$memberIDs["x" + _local48] = _local19;
$memberNames["x" + _local19] = _local48;
member.list["_" + _local48] = {challenger:0, id:_local48, name:_local19, room:_local24, data:[], team:_local23, platform:_local17, spectator:_local32};
_local7 = _local7 + 6;
}
if (room.$cb) {
room.$cb.apply(room.$sc, [0]);
room.$cb = (room.$sc = null);
}
}
}
_local38++;
}
}
function $speedCheck() {
var _local8 = getTimer();
var _local7 = "0,00,00000000000000,00,0000,00,0,0,0#0,000,0,000000000,0,000#0,0,0000,0,000#0,0000,00000000000,0,0#0,00000000,00#000,00#0,0,000#0,00,00000000000,00#0,00,0000,000#0,0,0000#00,0000,0#";
var _local5;
var _local6;
var _local3;
var _local2;
var _local4;
_local5 = 0;
while (_local5 <= 400) {
_local3 = _local7.split("#");
_local4 = _local3.length;
_local2 = 0;
while (_local2 < _local4) {
_local6 = _local3[_local2].split(",");
_local2++;
}
_local5++;
}
$clientSpeed = getTimer() - _local8;
}
function $reb(a, d) {
var _local1;
var _local2 = a.length;
_local1 = 0;
while (_local1 < _local2) {
d[_local1] = a[_local1];
_local1++;
}
}
function $update(o, j, id, d) {
var _local2 = d.join($d);
$reb(d, o.list["_" + id].data);
$sts = $sts + (((((j + $d) + id) + $d) + _local2) + $e);
}
function $silentUpdate(o, j, id, d) {
var _local3 = d.join($d);
var _local2 = o.list["_" + id];
$reb(d, _local2.data);
$sts = $sts + (((((j + $d) + id) + $d) + _local3) + $e);
}
function $indexUpdate(o, j, id, d) {
var _local6 = d.join($d);
var _local4 = d.length;
var _local5 = o.list["_" + id].data;
var _local2;
_local2 = 0;
while (_local2 < _local4) {
_local5[d[_local2]] = d[_local2 + 1];
_local2 = _local2 + 2;
}
$sts = $sts + (((((j + $d) + id) + $d) + _local6) + $e);
}
function $indexUpdateEval(o, j, id, d) {
$sts = $sts + (((((j + $d) + id) + $d) + d.join($d)) + $e);
}
function $indexUpdateConditional(o, j, id, d, cb, sc) {
$cblist[++$cbid] = {event:cb, action:6, obj:o.list["_" + id], index:d[0], value:d[1], scope:sc};
$sts = $sts + (((((((j + $d) + id) + $d) + d.join($d)) + $d) + $cbid) + $e);
}
function $onUpdate(o, p, cb) {
var _local5 = p[1];
var _local4 = p.slice(2, p.length);
var _local10 = o.list["_" + _local5];
var _local7 = _local10.data;
var _local2;
var _local8 = _local4.length;
var _local6 = _local10.__cb;
_local2 = 0;
while (_local2 < _local8) {
_local7[_local2] = _local4[_local2];
if (_local6) {
var _local3 = _local6["_" + _local2];
if (_local3) {
if (o != mob) {
_local3.cb.apply(_local3.sc, [int(_local5), _local4[_local2]]);
} else {
_local3.cb.apply(_local3.sc, [_local5, _local4[_local2]]);
}
}
}
_local2++;
}
if ($nocb) {
cb.$call(_local5, _local4);
}
}
function $onIndexUpdate(o, p, cb) {
var _local6 = p[1];
var _local4 = p.slice(2, p.length);
var _local9 = _local4.length;
var _local11 = o.list["_" + _local6];
var _local8 = _local11.data;
var _local7 = _local11.__cb;
var _local2 = 0;
while (_local2 < _local9) {
var _local5 = _local4[_local2];
_local8[_local5] = _local4[_local2 + 1];
if (_local7) {
var _local3 = _local7["_" + _local5];
if (_local3) {
if (o != mob) {
_local3.cb.apply(_local3.sc, [int(_local6), _local4[_local2 + 1]]);
} else {
_local3.cb.apply(_local3.sc, [_local6, _local4[_local2 + 1]]);
}
}
}
_local2 = _local2 + 2;
}
cb.$call(_local6, _local4);
}
function $removeValue() {
var _local3 = arguments[0];
var _local4 = arguments[1];
var _local2 = _local3.length;
_local2 = _local3.length;
while (_local2 >= 0) {
if (_local3[_local2] == _local4) {
_local3.splice(_local2, 1);
return(true);
}
_local2--;
}
return(false);
}
function $ping() {
$netTimer = getTimer();
$sts = $sts + (("62" + $d) + $e);
}
function $getFPS() {
fps = -1000 / ($$fps - (($$fps = getTimer())));
speedFac = $fps / fps;
}
function $dump(o) {
var _local2;
trace("**************************************************");
echo("**************************************************");
trace("Dump:");
echo("Dump:");
for (_local2 in o) {
trace((_local2 + " => ") + o[_local2]);
echo((_local2 + " => ") + o[_local2]);
}
trace("**************************************************");
echo("**************************************************");
}
var fps = 0;
var speedFac = 1;
var ping = -1;
var LIMIT = 0;
var logging = false;
var $sts = "";
var $$fps = 0;
var $pon = false;
var $smode = -1;
var $netTimer = -1;
var $pint = null;
var $majorVersion = 2;
var $minorVersion = 2;
var $subVersion = 4;
}
Symbol 157 MovieClip [__Packages.com.rawfishsoftware.sushi.Member] Frame 0
class com.rawfishsoftware.sushi.Member
{
var ref, d, e, list;
function Member (r) {
ref = r;
d = ref.$d;
e = ref.$e;
$init();
}
function $init() {
list = {};
}
function getTeam(memberID) {
return(list["_" + memberID].team);
}
function getName(memberID) {
return(ref.$memberIDs["x" + memberID]);
}
function getName_list(memberIDs) {
var _local4 = [];
var _local2;
_local2 = 0;
while (_local2 < memberIDs.length) {
_local4.push(getName(memberIDs[_local2]));
_local2++;
}
return(_local4);
}
function getID(memberName) {
return(ref.$memberNames["x" + memberName]);
}
function getObject(memberID) {
return(list["_" + memberID]);
}
function getData(memberID) {
return(list["_" + memberID].data.slice());
}
function getRoom(memberID) {
return(list["_" + memberID].room);
}
function getPlatform(memberID) {
return(list["_" + memberID].platform);
}
function isSpectator(memberID) {
return(list["_" + memberID].spectator);
}
function chat(targetMemberID, message) {
ref.$sts = ref.$sts + ((((((((("10" + d) + ref.me.id) + d) + "0") + d) + targetMemberID) + d) + message) + e);
}
function registerEvents(memberID, object) {
list["_" + memberID].$class = object;
}
function degisterEvents(memberID, object) {
list["_" + memberID].$class = null;
}
function setDataIndexCallback(memberID, index, callback, scope) {
var _local2 = list["_" + memberID];
if (!_local2.__cb) {
_local2.__cb = [];
}
_local2.__cb["_" + index] = {cb:callback, sc:scope};
}
function clearDataIndexCallback(memberID, index) {
var _local3 = list["_" + memberID];
delete _local3.__cb["_" + index];
var _local5 = _local3.data.length;
var _local4 = 0;
var _local2 = 0;
while (_local2 < _local5) {
if (_local3.__cb["_" + _local2]) {
_local4++;
break;
}
_local2++;
}
if (!_local4) {
delete _local3.__cb;
}
}
function clearAllDataIndexCallbacks(memberID) {
var _local2 = list["_" + memberID];
delete _local2.__cb;
}
var name = "member";
}
Symbol 158 MovieClip [__Packages.com.rawfishsoftware.sushi.Me] Frame 0
class com.rawfishsoftware.sushi.Me
{
var ref, d, e, data, id, room, session, team, name, $mobid, $tempcbid, spectator, master, moderator, $roomToGo;
function Me (r) {
ref = r;
d = ref.$d;
e = ref.$e;
$init();
}
function $init() {
data = [];
id = (room = (session = (team = -1)));
name = "";
$mobid = ($tempcbid = 0);
spectator = (master = (moderator = 0));
}
function joinSession(name, sessionID, teamID, roomID, data, callback, scope) {
this.name = name;
ref.$cblist[++ref.$cbid] = {data:data, cbid:ref.$cbid, event:callback, teamToGo:teamID, roomToGo:roomID, sessionToGo:sessionID, action:4, scope:scope};
ref.$nocb = false;
ref.session.data = [];
ref.$sts = ref.$sts + ((((((((((((((("45" + d) + ref.$cbid) + d) + sessionID) + d) + teamID) + d) + roomID) + d) + "") + d) + name) + d) + data.join(d)) + e);
}
function joinSessionPassword(name, password, sessionID, teamID, roomID, data, callback, scope) {
this.name = name;
ref.$cblist[++ref.$cbid] = {data:data, cbid:ref.$cbid, event:callback, teamToGo:teamID, roomToGo:roomID, sessionToGo:sessionID, action:4, scope:scope};
ref.$nocb = false;
ref.session.data = [];
ref.$sts = ref.$sts + ((((((((((((((("45" + d) + ref.$cbid) + d) + sessionID) + d) + teamID) + d) + roomID) + d) + password) + d) + name) + d) + data.join(d)) + e);
}
function leaveSession() {
ref.$sts = ref.$sts + (("28" + d) + e);
ref.$init();
}
function changeName(newName, callback, scope) {
ref.$cblist[++ref.$cbid] = {event:callback, newName:newName, action:8, scope:scope};
ref.$sts = ref.$sts + ((((((("36" + d) + ref.$cbid) + d) + id) + d) + newName) + e);
}
function changeTeam(newTeamID, callback, scope) {
ref.$cblist[++ref.$cbid] = {event:callback, toGo:newTeamID, action:5, scope:scope};
ref.$sts = ref.$sts + ((((((((("42" + d) + ref.$cbid) + d) + id) + d) + team) + d) + newTeamID) + e);
}
function createRoom(roomName, templateName, callback, scope) {
ref.$cblist[++ref.$cbid] = {event:callback, toGo:-1, action:3, scope:scope};
ref.$nocb = false;
var _local2 = [];
ref.$sts = ref.$sts + ((((((((((((("22" + d) + ref.$cbid) + d) + id) + d) + "") + d) + roomName) + d) + templateName) + d) + _local2.join("\x01")) + e);
}
function createRoomPassword(roomName, password, templateName, callback, scope) {
ref.$cblist[++ref.$cbid] = {event:callback, toGo:-1, action:3, scope:scope};
ref.$nocb = false;
var _local2 = [];
ref.$sts = ref.$sts + ((((((((((((("22" + d) + ref.$cbid) + d) + id) + d) + password) + d) + roomName) + d) + templateName) + d) + _local2.join("\x01")) + e);
}
function createPrivateRoom(roomName, templateName, memberIDs, callback, scope) {
ref.$cblist[++ref.$cbid] = {event:callback, toGo:-1, action:3, scope:scope};
ref.$nocb = false;
memberIDs.push(ref.me.id);
ref.$sts = ref.$sts + ((((((((((((("22" + d) + ref.$cbid) + d) + id) + d) + "") + d) + roomName) + d) + templateName) + d) + memberIDs.join("\x01")) + e);
}
function createPrivateRoomPassword(roomName, password, templateName, memberIDs, callback, scope) {
ref.$cblist[++ref.$cbid] = {event:callback, toGo:-1, action:3, scope:scope};
ref.$nocb = false;
memberIDs.push(ref.me.id);
ref.$sts = ref.$sts + ((((((((((((("22" + d) + ref.$cbid) + d) + id) + d) + password) + d) + roomName) + d) + templateName) + d) + memberIDs.join("\x01")) + e);
}
function changeRoom(roomID, dataArray, callback, scope) {
ref.$cblist[++ref.$cbid] = {event:callback, toGo:roomID, action:2, data:dataArray, scope:scope};
$roomToGo = roomID;
ref.$sts = ref.$sts + ((((((((((("20" + d) + ref.$cbid) + d) + id) + d) + roomID) + d) + "") + d) + dataArray.join(d)) + e);
}
function changeRoomPassword(roomID, password, dataArray, callback, scope) {
ref.$cblist[++ref.$cbid] = {event:callback, toGo:roomID, action:2, data:dataArray, scope:scope};
$roomToGo = roomID;
ref.$sts = ref.$sts + ((((((((((("20" + d) + ref.$cbid) + d) + id) + d) + roomID) + d) + password) + d) + dataArray.join(d)) + e);
}
function update(dataArray) {
ref.$reb(dataArray, data);
ref.$update(ref.member, "6", id, dataArray);
}
function silentUpdate(dataArray) {
ref.$reb(dataArray, data);
ref.$update(ref.member, "31", id, dataArray);
}
function indexUpdate(dataArray) {
ref.$ireb(dataArray, data);
ref.$indexUpdate(ref.member, "54", id, dataArray);
}
function createMob(roomID, deleteOnExit, dataArray) {
var _local2 = (id + "m") + ($mobid++);
ref.mob.list["_" + _local2] = {id:_local2, room:roomID, data:dataArray, $lu:"", $liu:""};
ref.room.list["_" + roomID].mobs.push(_local2);
ref.$sts = ref.$sts + ((((((((((("25" + d) + _local2) + d) + roomID) + d) + "1") + d) + deleteOnExit) + d) + dataArray.join(d)) + e);
return(_local2);
}
function beSpectator(status, callback, scope) {
ref.$cblist[++ref.$cbid] = {event:callback, action:12, scope:scope, value:status};
ref.$sts = ref.$sts + ((((("48" + d) + ref.$cbid) + d) + status) + e);
}
}
Symbol 159 MovieClip [__Packages.com.rawfishsoftware.sushi.Mob] Frame 0
class com.rawfishsoftware.sushi.Mob
{
var ref, d, e, list, $iid;
function Mob (r) {
ref = r;
d = ref.$d;
e = ref.$e;
$init();
}
function $init() {
list = [];
$iid = 0;
}
function update(mobID, dataArray) {
ref.$update(this, "26", mobID, dataArray);
}
function silentUpdate(mobID, dataArray) {
ref.$update(this, "15", mobID, dataArray);
}
function indexUpdate(mobID, dataArray) {
ref.$indexUpdate(this, "60", mobID, dataArray);
}
function indexUpdateEval(mobID, dataArray) {
ref.$indexUpdateEval(this, "41", mobID, dataArray);
}
function indexUpdateConditional(mobID, dataArray, callback, scope) {
ref.$indexUpdateConditional(this, "41", mobID, dataArray, callback, scope);
}
function remove(mobID) {
ref.$sts = ref.$sts + ((("27" + d) + mobID) + e);
var _local2 = list["_" + mobID].room;
ref.$removeValue(ref.room.list["_" + _local2].mobs, mobID);
trace("list:" + ref.room.list["_" + _local2].mobs);
delete list["_" + mobID];
}
function getMember(mobID) {
return(list["_" + mobID].member);
}
function getRoom(mobID) {
return(list["_" + mobID].room);
}
function getObject(mobID) {
return(list["_" + mobID]);
}
function getData(mobID) {
return(list["_" + mobID].data);
}
function init(roomID, deleteOnExit, dataArray) {
var _local2 = ((++$iid) + "m") + roomID;
var _local3 = (deleteOnExit ? 1 : 0);
if (list["_" + _local2] == null) {
list["_" + _local2] = {id:_local2, room:roomID, data:dataArray, member:ref.me.id};
if (ref.me.master) {
ref.$sts = ref.$sts + ((((((((("47" + d) + _local2) + d) + roomID) + d) + _local3) + d) + dataArray.join(d)) + e);
}
}
return(_local2);
}
function registerEvents(mobID, object) {
list["_" + mobID].$class = object;
}
function deregisterEvents(mobID) {
list["_" + mobID].$class = null;
}
function setDataIndexCallback(mobID, index, callback, scope) {
var _local2 = list["_" + mobID];
if (!_local2.__cb) {
_local2.__cb = [];
}
_local2.__cb["_" + index] = {cb:callback, sc:scope};
}
function clearDataIndexCallback(mobID, index) {
var _local3 = list["_" + mobID];
delete _local3.__cb["_" + index];
var _local5 = _local3.data.length;
var _local4 = 0;
var _local2 = 0;
while (_local2 < _local5) {
if (_local3.__cb["_" + _local2]) {
_local4++;
break;
}
_local2++;
}
if (!_local4) {
delete _local3.__cb;
}
}
function clearAllDataIndexCallbacks(mobID) {
var _local2 = list["_" + mobID];
delete _local2.__cb;
}
}
Symbol 160 MovieClip [__Packages.com.rawfishsoftware.sushi.Session] Frame 0
class com.rawfishsoftware.sushi.Session
{
var ref, d, e, teams, rooms, members, data, $cb, sessionList, name, __cb;
function Session (r) {
ref = r;
d = ref.$d;
e = ref.$e;
$init();
}
function $init() {
teams = [];
rooms = [];
members = [];
data = [];
$cb = [];
}
function getSessionList() {
return(sessionList);
}
function update(dataArray) {
var _local2 = dataArray.join(d).toString();
ref.$reb(dataArray, data);
ref.$sts = ref.$sts + ((("16" + d) + _local2) + e);
}
function indexUpdate(dataArray) {
var _local6 = dataArray.join(d).toString();
var _local4 = d.length;
var _local5 = data;
var _local2 = 0;
while (_local2 < _local4) {
_local5[dataArray[_local2]] = dataArray[_local2 + 1];
_local2 = _local2 + 2;
}
ref.$sts = ref.$sts + ((("17" + d) + _local6) + e);
}
function indexUpdateEval(dataArray) {
ref.$sts = ref.$sts + ((("59" + d) + dataArray.join(d).toString()) + e);
}
function indexUpdateConditional(dataArray, callback, scope) {
ref.$cblist[++ref.$cbid] = {event:callback, action:6, obj:this, index:dataArray[0], value:dataArray[1], scope:scope};
ref.$sts = ref.$sts + ((((("59" + d) + dataArray.join(d)) + d) + ref.$cbid) + e);
}
function getTeamIDs() {
return(teams.slice());
}
function getTeamNames() {
var _local2 = teams.length;
var _local3 = [];
while (_local2--) {
_local3.push(ref.team.list["_" + teams[_local2]].name);
}
return(_local3);
}
function getMemberNames() {
var _local2 = members.length;
var _local3 = [];
while (_local2--) {
_local3.push(ref.member.getName(members[_local2]));
}
return(_local3);
}
function getData() {
return(data);
}
function getName() {
return(name);
}
function getRoomIDs() {
return(rooms.slice());
}
function getMemberIDs() {
return(members.slice());
}
function getNumberOfRooms() {
return(rooms.length);
}
function getNumberOfTeams() {
return(teams.length);
}
function getNumberOfMembers() {
return(members.length);
}
function chat(message) {
ref.$sts = ref.$sts + ((((((((("10" + d) + ref.me.id) + d) + "2") + d) + "0") + d) + message) + e);
}
function setDataIndexCallback(index, callback, scope) {
if (!__cb) {
__cb = [];
}
__cb["_" + index] = {cb:callback, sc:scope};
}
function clearDataIndexCallback(index) {
delete __cb["_" + index];
var _local4 = data.length;
var _local3 = 0;
var _local2 = 0;
while (_local2 < _local4) {
if (__cb["_" + _local2]) {
_local3++;
break;
}
_local2++;
}
if (!_local3) {
delete __cb;
}
}
function clearAllDataIndexCallbacks() {
delete __cb;
}
}
Symbol 161 MovieClip [__Packages.com.rawfishsoftware.sushi.Team] Frame 0
class com.rawfishsoftware.sushi.Team
{
var ref, d, e, list;
function Team (r) {
ref = r;
d = ref.$d;
e = ref.$e;
$init();
}
function $init() {
list = [];
}
function update(teamID, dataArray) {
ref.$update(this, "40", teamID, dataArray);
}
function indexUpdate(teamID, dataArray) {
ref.$indexUpdate(this, "74", teamID, dataArray);
}
function indexUpdateEval(teamID, dataArray) {
ref.$indexUpdateEval(this, "50", teamID, dataArray);
}
function indexUpdateConditional(teamID, dataArray, callback, scope) {
ref.$indexUpdateConditional(this, "50", teamID, dataArray, callback, scope);
}
function getMemberIDs(teamID) {
return(list["_" + teamID].members);
}
function getName_list(teamIDs) {
var _local4 = [];
var _local2;
_local2 = 0;
while (_local2 < teamIDs.length) {
_local4.push(getName(teamIDs[_local2]));
_local2++;
}
return(_local4);
}
function getName(teamID) {
return(list["_" + teamID].name);
}
function getNumberOfMemberIDs(teamID) {
return(list["_" + teamID].members.length);
}
function getMemberNames(teamID) {
var _local4 = list["_" + teamID].members;
var _local2 = _local4.length;
var _local3 = [];
while (_local2--) {
_local3.push(ref.member["_" + _local4[_local2]].name);
}
return(_local3);
}
function getLimit(teamID) {
return(list["_" + teamID].limit);
}
function getData(teamID) {
return(list["_" + teamID].data);
}
function getObject(teamID) {
return(list["_" + teamID]);
}
function chat(targetTeamID, message) {
ref.$sts = ref.$sts + ((((((((("10" + d) + ref.me.id) + d) + "3") + d) + targetTeamID) + d) + message) + e);
}
function roomChat(targetTeamID, message) {
ref.$sts = ref.$sts + ((((((((("10" + d) + ref.me.id) + d) + "4") + d) + targetTeamID) + d) + message) + e);
}
function checkMemberID(teamID, memberID) {
var _local3 = list["_" + teamID].members;
var _local2;
var _local4 = _local3.length;
var _local5;
_local2 = 0;
while (_local2 < _local4) {
if (_local5 == _local3[_local2]) {
return(true);
}
_local2++;
}
return(false);
}
function registerEvents(teamID, object) {
list["_" + teamID].$class = object;
}
function deregisterEvents(teamID) {
list["_" + teamID].$class = null;
}
function setDataIndexCallback(teamID, index, callback, scope) {
var _local2 = list["_" + teamID];
if (!_local2.__cb) {
_local2.__cb = new Array();
}
_local2.__cb["_" + index] = {cb:callback, sc:scope};
}
function clearDataIndexCallback(teamID, index) {
var _local3 = list["_" + teamID];
delete _local3.__cb["_" + index];
var _local5 = _local3.data.length;
var _local4 = 0;
var _local2 = 0;
while (_local2 < _local5) {
if (_local3.__cb["_" + _local2]) {
_local4++;
break;
}
_local2++;
}
if (!_local4) {
delete _local3.__cb;
}
}
function clearAllDataIndexCallbacks(teamID) {
var _local2 = list["_" + teamID];
delete _local2.__cb;
}
}
Symbol 162 MovieClip [__Packages.com.rawfishsoftware.sushi.Room] Frame 0
class com.rawfishsoftware.sushi.Room
{
var ref, d, e, list;
function Room (r) {
ref = r;
d = ref.$d;
e = ref.$e;
$init();
}
function $init() {
list = new Array();
}
function update(roomID, dataArray) {
ref.$update(this, "38", roomID, dataArray);
}
function indexUpdate(roomID, dataArray) {
ref.$indexUpdate(this, "75", roomID, dataArray);
}
function getMemberList(roomID, callback, scope) {
ref.$sts = ref.$sts + ((("14" + d) + roomID) + e);
$cb = callback;
$sc = scope;
}
function indexUpdateEval(roomID, dataArray) {
ref.$indexUpdateEval(this, "58", roomID, dataArray);
}
function indexUpdateConditional(roomID, dataArray, callback, scope) {
ref.$indexUpdateConditional(this, "58", roomID, dataArray, callback, scope);
}
function getName(roomID) {
return(list["_" + roomID].name);
}
function getName_list(roomIDs) {
var _local4 = [];
var _local2;
_local2 = 0;
while (_local2 < roomIDs.length) {
_local4.push(getName(roomIDs[_local2]));
_local2++;
}
return(_local4);
}
function checkMemberID(roomID, memberID) {
var _local3 = list["_" + roomID].members;
var _local2;
var _local4 = _local3.length;
_local2 = 0;
while (_local2 < _local4) {
if (memberID == _local3[_local2]) {
return(true);
}
_local2++;
}
return(false);
}
function getMemberIDs(roomID) {
return(list["_" + roomID].members.slice());
}
function getNumberOfMobs() {
return(list["_" + ref.me.room].mobs.length);
}
function getNumberOfMembers(roomID) {
return(list["_" + roomID].members.length);
}
function lock(roomID, lock) {
ref.$sts = ref.$sts + ((((("39" + d) + roomID) + d) + lock) + e);
}
function isLocked(roomID) {
return(list["_" + roomID].locked);
}
function getNumberOfTeamMembers(roomID, teamID) {
var _local4 = 0;
var _local8;
var _local2;
var _local3 = list["_" + roomID].members;
var _local6 = _local3.length;
var _local5 = ref.member;
_local2 = 0;
while (_local2 < _local6) {
if (_local5.list["_" + _local3[_local2]].team == teamID) {
_local4++;
}
_local2++;
}
return(_local4);
}
function getMemberNames(roomID) {
var _local3 = [];
var _local4 = list["_" + roomID].members;
var _local2;
var _local5 = _local4.length;
_local2 = 0;
while (_local2 < _local5) {
_local3.push(ref.member.getName(_local4[_local2]));
_local2++;
}
return(_local3);
}
function getTeamMemberNames(roomID, teamID) {
var _local4 = [];
var _local5 = list["_" + roomID].members;
var _local2;
var _local6 = _local5.length;
var _local7 = ref.member;
var _local3;
_local2 = 0;
while (_local2 < _local6) {
_local3 = _local7.list["_" + _local5[_local2]];
if (_local3.team == teamID) {
_local4.push(_local3.name);
}
_local2++;
}
return(_local4);
}
function getTeamMemberIds(roomID, teamID) {
var _local4 = [];
var _local5 = list["_" + roomID].members;
var _local2;
var _local6 = _local5.length;
var _local7 = ref.member;
var _local3;
_local2 = 0;
while (_local2 < _local6) {
_local3 = _local7["_" + _local5[_local2]];
if (_local3.team == teamID) {
_local4.push(_local3.id);
}
_local2++;
}
return(_local4);
}
function getLimit(roomID) {
return(list["_" + roomID].limit);
}
function getTeamLimit(roomID, teamID) {
return(list["_" + roomID].teamLimits[teamID]);
}
function getWaitingQueue(roomID) {
return(list["_" + roomID].waitingQueue.slice());
}
function getMobIDs() {
return(list["_" + ref.me.room].mobs.slice());
}
function getData(roomID) {
return(list["_" + ref.me.room].data.slice());
}
function getObject(roomID) {
return(list["_" + ref.me.room]);
}
function chat(targetRoomID, message) {
ref.$sts = ref.$sts + ((((((((("10" + d) + ref.me.id) + d) + "1") + d) + targetRoomID) + d) + message) + e);
}
function registerEvents(roomID, object) {
list["_" + roomID].$class = object;
}
function degisterEvents(roomID, object) {
list["_" + roomID].$class = null;
}
function setDataIndexCallback(roomID, index, callback, scope) {
var _local2 = list["_" + roomID];
if (!_local2.__cb) {
_local2.__cb = [];
}
_local2.__cb["_" + index] = {cb:callback, sc:scope};
}
function clearDataIndexCallback(roomID, index) {
var _local3 = list["_" + roomID];
delete _local3.__cb["_" + index];
var _local5 = _local3.data.length;
var _local4 = 0;
var _local2 = 0;
while (_local2 < _local5) {
if (_local3.__cb["_" + _local2]) {
_local4++;
break;
}
_local2++;
}
if (!_local4) {
delete _local3.__cb;
}
}
function clearAllDataIndexCallbacks(roomID) {
var _local2 = list["_" + roomID];
delete _local2.__cb;
}
function hasPassword(roomID) {
return(list["_" + roomID].password);
}
var $cb = null;
var $sc = null;
}
Symbol 163 MovieClip [__Packages.com.rawfishsoftware.sushi.Challenge] Frame 0
class com.rawfishsoftware.sushi.Challenge
{
var ref, d, e, id, $challengers, $minMembers, $timeout, $template;
function Challenge (r) {
ref = r;
d = ref.$d;
e = ref.$e;
}
function $init() {
id = 0;
$challengers = [];
}
function request(roomTemplate, timeout, minMembers, memberIDs, callback, scope) {
ref.$cblist[++ref.$cbid] = {event:callback, action:10, scope:scope, template:roomTemplate, timeout:timeout, minMembers:minMembers};
ref.$sts = ref.$sts + ((((((((((((("66" + d) + "-1") + d) + ref.$cbid) + d) + roomTemplate) + d) + timeout) + d) + minMembers) + d) + memberIDs.join(d)) + e);
}
function reChallenge(callback, scope) {
ref.$cblist[++ref.$cbid] = {event:callback, action:10, scope:scope, template:$template, timeout:$timeout, minMembers:$minMembers};
var _local2 = ref.room.getMemberIDs(ref.me.room).slice(0);
ref.removeValue(_local2, ref.me.id);
ref.$sts = ref.$sts + ((((((((((((("66" + d) + id) + d) + ref.$cbid) + d) + $template) + d) + $timeout) + d) + $minMembers) + d) + _local2.join(d)) + e);
}
function answerRequest(status) {
ref.$sts = ref.$sts + ((((((("68" + d) + ref.me.id) + d) + id) + d) + status) + e);
if (!status) {
id = 0;
$challengers = [];
ref.me.moderator = 0;
}
}
function cancel() {
ref.$sts = ref.$sts + ((("72" + d) + id) + e);
id = 0;
$challengers = [];
ref.me.moderator = 0;
}
function start(memberIDsOrder) {
if (memberIDsOrder) {
ref.$sts = ref.$sts + ((((("70" + d) + id) + d) + memberIDsOrder.join(d)) + e);
} else {
ref.$sts = ref.$sts + ((("70" + d) + id) + e);
}
}
function nextMember() {
ref.$sts = ref.$sts + ((("71" + d) + id) + e);
}
function includeMember(memberID) {
ref.$sts = ref.$sts + ((((("64" + d) + memberID) + d) + "1") + e);
}
function excludeMember(memberID) {
ref.$sts = ref.$sts + ((((("64" + d) + memberID) + d) + "0") + e);
}
function getMemberIDs() {
return($challengers.slice());
}
function getMemberPosition(memberID) {
var _local3 = $challengers.length;
var _local2;
_local2 = 0;
while (_local2 < _local3) {
if ($challengers[_local2] == memberID) {
return(_local2);
}
_local2++;
}
return(-1);
}
}
Symbol 164 MovieClip [__Packages.com.rawfishsoftware.sushi.Event] Frame 0
class com.rawfishsoftware.sushi.Event
{
var ref, onNewMember, onUpdateMember, onIndexUpdateMember, onMemberChangesRoom, onRemoveMember, onNewMob, onMaster, onSlave, onUpdateMob, onIndexUpdateMob, onRemoveMob, onNewRoom, onRemoveRoom, onUpdateRoom, onIndexUpdateRoom, onUpdateWaitingQueue, onUpdateTeam, onIndexUpdateTeam, onMemberChangesTeam, onChatMessage, onUserMessage, onSystemMessage, onDisconnect, onServerRestart, onUpdateSession, onIndexUpdateSession, onChallengeRequest, onAnswerChallengeRequest, onCancelChallenge, onModeratorChanged, onIncludeMember, onExcludeMember, onRoomLocked, onStartChallenge, onPlay, onBeSpectator, onMemberKicked, onBadwordDetected, onMemberNameChanged, onObjectReceived;
function Event (r) {
ref = r;
$init();
}
function $init() {
onNewMember = new com.rawfishsoftware.sushi.$Event(ref, "onNewMember", "member");
onUpdateMember = new com.rawfishsoftware.sushi.$Event(ref, "onUpdateMember", "member");
onIndexUpdateMember = new com.rawfishsoftware.sushi.$Event(ref, "onIndexUpdateMember", "member");
onMemberChangesRoom = new com.rawfishsoftware.sushi.$Event(ref, "onMemberChangesRoom", "member");
onRemoveMember = new com.rawfishsoftware.sushi.$Event(ref, "onRemoveMember", "member");
onNewMob = new com.rawfishsoftware.sushi.$Event(ref, "onNewMob", "mob");
onMaster = new com.rawfishsoftware.sushi.$Event(ref, "onMaster");
onSlave = new com.rawfishsoftware.sushi.$Event(ref, "onSlave");
onUpdateMob = new com.rawfishsoftware.sushi.$Event(ref, "onUpdateMob", "mob");
onIndexUpdateMob = new com.rawfishsoftware.sushi.$Event(ref, "onIndexUpdateMob", "mob");
onRemoveMob = new com.rawfishsoftware.sushi.$Event(ref, "onRemoveMob", "mob");
onNewRoom = new com.rawfishsoftware.sushi.$Event(ref, "onNewRoom");
onRemoveRoom = new com.rawfishsoftware.sushi.$Event(ref, "onRemoveRoom", "room");
onUpdateRoom = new com.rawfishsoftware.sushi.$Event(ref, "onUpdateRoom", "room");
onIndexUpdateRoom = new com.rawfishsoftware.sushi.$Event(ref, "onIndexUpdateRoom", "room");
onUpdateWaitingQueue = new com.rawfishsoftware.sushi.$Event(ref, "onUpdateWaitingQueue", "room");
onUpdateTeam = new com.rawfishsoftware.sushi.$Event(ref, "onUpdateTeam", "team");
onIndexUpdateTeam = new com.rawfishsoftware.sushi.$Event(ref, "onIndexUpdateTeam", "team");
onMemberChangesTeam = new com.rawfishsoftware.sushi.$Event(ref, "onMemberChangesTeam", "team");
onChatMessage = new com.rawfishsoftware.sushi.$Event(ref, "onChatMessage", "member");
onUserMessage = new com.rawfishsoftware.sushi.$Event(ref, "onUserMessage");
onSystemMessage = new com.rawfishsoftware.sushi.$Event(ref, "onSystemMessage");
onDisconnect = new com.rawfishsoftware.sushi.$Event(ref, "onDisconnect");
onServerRestart = new com.rawfishsoftware.sushi.$Event(ref, "onServerRestart");
onUpdateSession = new com.rawfishsoftware.sushi.$Event(ref, "onUpdateSession", "session");
onIndexUpdateSession = new com.rawfishsoftware.sushi.$Event(ref, "onIndexUpdateSession", "session");
onChallengeRequest = new com.rawfishsoftware.sushi.$Event(ref, "onChallengeRequest");
onAnswerChallengeRequest = new com.rawfishsoftware.sushi.$Event(ref, "onAnswerChallengeRequest");
onCancelChallenge = new com.rawfishsoftware.sushi.$Event(ref, "onCancelChallenge");
onModeratorChanged = new com.rawfishsoftware.sushi.$Event(ref, "onModeratorChanged");
onIncludeMember = new com.rawfishsoftware.sushi.$Event(ref, "onIncludeMember");
onExcludeMember = new com.rawfishsoftware.sushi.$Event(ref, "onExcludeMember");
onRoomLocked = new com.rawfishsoftware.sushi.$Event(ref, "onRoomLocked", "room");
onStartChallenge = new com.rawfishsoftware.sushi.$Event(ref, "onStartChallenge");
onPlay = new com.rawfishsoftware.sushi.$Event(ref, "onPlay");
onBeSpectator = new com.rawfishsoftware.sushi.$Event(ref, "onBeSpectator", "member");
onMemberKicked = new com.rawfishsoftware.sushi.$Event(ref, "onMemberKicked", "member");
onBadwordDetected = new com.rawfishsoftware.sushi.$Event(ref, "onBadwordDetected");
onMemberNameChanged = new com.rawfishsoftware.sushi.$Event(ref, "onMemberNameChanged");
onObjectReceived = new com.rawfishsoftware.sushi.$Event(ref, "onObjectReceived");
}
}
Symbol 165 MovieClip [__Packages.com.rawfishsoftware.sushi.$Event] Frame 0
class com.rawfishsoftware.sushi.$Event
{
var event, object, sushi;
function $Event (s, e, obj) {
event = e;
if (obj) {
object = obj;
}
sushi = s;
}
function setCallback(callback, scope) {
this.callback = callback;
this.scope = scope;
}
function clearCallback() {
callback = null;
scope = null;
}
function addListener(object) {
removeListener(object);
listeners.push(object);
hasListeners = true;
}
function removeAllListeners() {
listeners = [];
hasListeners = false;
}
function removeListener(object) {
var _local2 = listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == object) {
_local2.splice(_local3, 1);
if (!_local2.length) {
hasListeners = false;
}
return(true);
}
}
return(false);
}
function $call() {
var _local3 = sushi[object].list["_" + arguments[0]].$class;
if (_local3) {
_local3[event].apply(_local3, arguments);
}
if (callback) {
callback.apply(scope, arguments);
}
if (hasListeners) {
var _local5;
var _local4 = listeners;
for (_local5 in _local4) {
_local3 = _local4[_local5];
_local3[event].apply(_local3, arguments);
}
}
}
var callback = null;
var scope = null;
var listeners = [];
var hasListeners = false;
}
Symbol 166 MovieClip [__Packages.com.rawfishsoftware.sushi.Logger] Frame 0
class com.rawfishsoftware.sushi.Logger
{
var ref, $d, $e, mess_in, mess_out, errors;
function Logger (r) {
ref = r;
$d = ref.$d;
$e = ref.$e;
mess_in = {m1:["idMessage", "ID", "", "", ""], m5:["newMember", "ID", "name", "teamID", "roomID", "platform", "!data"], m6:["memberUpdate", "ID", "!data"], m7:["serverRestart"], m8:["masterClient"], m9:["slaveClient"], m10:["chatMessage", "senderID", "routing", "", "message"], m11:["removeMember", "ID", "teamID", "roomID"], m16:["sessionUpdate", "!data"], m17:["sessionIndexUpdate", "$data"], m19:["pluginAnswer", "", "pluginID", "!data"], m21:["changeRoom", "ID", "newRoomID", "oldRoomID", "!data"], m23:["removeRoom", "roomID"], m25:["newMob", "mobID", "roomID", "creatorID", "!data"], m26:["mobUpdate", "mobID", "!data"], m27:["removeMob", "mobID"], m30:["newRoom", "roomID", "password", "name", "", "!data"], m34:["waitingQueue", "queue"], m36:["memberNameChanged", "memberID", "newName"], m38:["roomUpdate", "roomID", "!data"], m39:["lockRoom", "roomID", "value"], m40:["teamUpdate", "teamID", "!data"], m43:["changeTeam", "userID", "oldTeamID", "newTeamID"], m49:["beSpectator", "value"], m52:["memberSearchResult", "", "!resultList"], m53:["userMessage", "messageID", "", "routing", "targetID", "!data"], m54:["memberIndexUpdate", "memberID", "$data"], m57:["isBadwordAnswer", "", "result"], m60:["mobIndexUpdate", "mobID", "$data"], m64:["in/excludeMember", "memberID", "value"], m65:["kickMember", "memberID"], m67:["challengeRequest", "challengeID", "challengerID", "!participantIDs"], m68:["acceptChallenge", "userID", "challengeID", "value"], m69:["startChallenge", "challengeID", "roomID", "!order"], m73:["play", "userID"], m72:["cancelChallenge", "challengeID", "status"], m74:["teamIndexUpdate", "teamID", "$data"], m75:["roomIndexUpdate", "roomID", "$data"], m86:["sendObject", "routing", "targetID", "object"], m87:["serverError", "message"]};
mess_out = {m2:["clientSpeed", "time"], m3:["netSpeed", "time"], m4:["receiveMyUpdates", "value"], m6:["meUpdate", "", "!data"], m10:["chatMessage", "myID", "routing", "targetUserID", "message"], m11:["removeMe", "myID"], m14:["getMemberList", "roomID"], m15:["mobSilentUpdate", "mobID", "!data"], m16:["sessionUpdate", "!data"], m17:["sessionIndexUpdate", "$data"], m19:["callPlugin", "", "pluginID", "!data"], m20:["changeRoom", "", "myID", "roomID", "password", "!data"], m22:["createRoom", "", "myID", "password", "name", "roomTemplate", "!clientIdList"], m25:["createMob", "mobID", "roomID", "delete", "!data"], m26:["mobUpdate", "mobID", "!data"], m27:["removeMob", "mobID"], m28:["leaveSession", ""], m29:["loadSessionList", "", "game"], m31:["meSilentUpdate", "", "!data"], m36:["changeName", "", "", "newName"], m38:["roomUpdate", "roomID", "!data"], m39:["lockRoom", "roomID", "lock"], m40:["teamUpdate", "teamID", "!data"], m41:["mobIndexUpdateEval|Conditional", "mobID", "%data"], m42:["changeTeam", "", "userID", "oldTeamID", "newTeamID"], m45:["joinSession", "", "sessionID", "teamID", "roomID", "password", "name", "!data"], m47:["initMob", "mobID", "roomID", "delete", "!data"], m48:["beSpectator", "", "value"], m50:["teamIndexUpdateEval|Conditional", "teamID", "%data"], m51:["searchClient", "", "!names"], m53:["userMessage", "messageID", "", "routing", "targetID", "!data"], m54:["meIndexUpdate", "myID", "$data"], m57:["isBadword", "", "word"], m58:["roomIndexUpdateEval|Conditional", "roomID", "%data"], m59:["sessionIndexUpdateEval|Conditional", "%data"], m60:["mobIndexUpdate", "mobID", "$data"], m64:["in/excludeMember", "memberID", "value"], m66:["requestChallenge", "", "", "roomTemplate", "timeout", "minUsers", "!participantIDs"], m68:["acceptChallenge", "userID", "challengeID", "value"], m70:["startChallenge", "challengeID", "!order"], m71:["nextMember", "challengeID"], m72:["cancelChallenge", "challengeID"], m74:["teamIndexUpdate", "teamID", "$data"], m75:["roomIndexUpdate", "roomID", "$data"], m86:["sendObject", "routing", "targetID", "object"], m87:["enableLogging", "value"]};
errors = ["ok", "create room failed", "room full", "name contains badword", "team full", "name used", "user is not allowed to enter room", "room doesn't exist", "failed", "game not found", "server full", "room-template not found", "challenge born", "queued", "wrong password"];
}
function log(n, a) {
if (typeof(n) == "string") {
var _local4 = n.split($e);
var _local6 = _local4.length;
var _local3;
var _local8;
var _local5 = $d;
n = 0;
while (n < _local6) {
_local3 = _local4[n].split(_local5);
$log(_local3, a);
n++;
}
} else {
$log(n, a);
}
}
function $log(n, a) {
var _local8 = "";
if (a == "SERVER") {
_local8 = mess_in["m" + n[0]];
} else if (a == "FLASH") {
_local8 = mess_out["m" + n[0]];
} else if (a == "STATUS") {
trace("SERVER: " + n);
var _local14 = new LocalConnection();
_local14.send("_SUSHIOutput", "echo", (("<b>ID" + ref.me.id) + ":SERVER:</b> ") + n);
}
if (_local8) {
var _local9 = "";
var _local10 = "";
var _local5 = ((((_local10 + "'") + _local8[0]) + "'") + _local9) + " ";
var _local2;
var _local11 = n.length;
_local2 = 1;
while (_local2 < _local11) {
if (_local8[_local2] != "") {
var _local7 = _local8[_local2].substring(0, 1);
if (((_local7 != "$") && (_local7 != "%")) && (_local7 != "!")) {
_local5 = _local5 + (((((_local10 + _local8[_local2]) + ":") + _local9) + n[_local2]) + " ");
} else {
if (_local7 == "!") {
var _local12 = _local8[_local2].slice(1, length(_local8[_local2]));
_local5 = _local5 + ((((((_local10 + _local12) + ":") + _local9) + "[") + n.slice(_local2, _local11).join(",")) + "]");
} else if (_local7 == "$") {
_local5 = _local5 + (((_local10 + "data:") + _local9) + "[");
var _local4 = _local2;
while (_local4 < _local11) {
_local5 = _local5 + (((n[_local4] + ":") + n[_local4 + 1]) + " ");
_local4 = _local4 + 2;
}
_local5 = _local5 + "]";
} else if (_local7 == "%") {
if ((_local11 - _local2) == 3) {
var _local6 = n[_local2 + 1];
if ((((_local6 == "/") || (_local6 == "+")) || (_local6 == "-")) || (_local6 == "*")) {
_local6 = _local6 + "=";
}
_local5 = _local5 + (((((((_local10 + "evaluate:") + _local9) + "[index") + n[_local2]) + _local6) + n[_local2 + 2]) + "]");
} else {
var _local6 = n[_local2 + 1];
if ((((_local6 == "/") || (_local6 == "+")) || (_local6 == "-")) || (_local6 == "*")) {
_local6 = _local6 + "=";
}
_local5 = _local5 + (((((((((((_local10 + "conditional:") + _local9) + "[") + n[_local2]) + _local6) + n[_local2 + 2]) + " if ") + n[_local2 + 3]) + n[_local2 + 4]) + n[_local2 + 5]) + "]");
}
}
break;
}
}
_local2++;
}
trace((a + ": ") + _local5);
var _local14 = new LocalConnection();
_local14.send("_SUSHIOutput", "echo", (((("<b>ID" + ref.me.id) + ":") + a) + ":</b> ") + _local5);
}
}
}
Symbol 167 MovieClip [__Packages.com.rawfishsoftware.sushi.Serializer] Frame 0
class com.rawfishsoftware.sushi.Serializer
{
var buffer;
function Serializer () {
}
function serialize(what) {
var _local2 = new String("");
_local2 = serialize_internal("", what);
return(_local2);
}
function serialize_internal(buf, struct_c) {
if (((!isNaN(struct_c)) && (struct_c.__proto__ != Boolean.prototype)) && (struct_c.__proto__ != Date.prototype)) {
var _local2 = new Number(struct_c);
} else {
var _local2 = struct_c;
}
switch (_local2.__proto__) {
case Boolean.prototype :
buf = ((buf + "b:") + int(_local2)) + ";";
break;
case null :
case undefined :
buf = buf + "N;";
break;
case Number.prototype :
if (_local2 >= 1E15) {
buf = ((buf + "d:") + _local2) + ";";
} else if ((_local2 % 1) == 0) {
buf = ((buf + "i:") + _local2) + ";";
} else {
buf = ((buf + "d:") + _local2) + ";";
}
break;
case String.prototype :
buf = ((((buf + "s:") + calcLength(_local2)) + ":\"") + _local2) + "\";";
break;
case Date.prototype :
buf = ((((buf + "s:") + length(_local2)) + ":\"") + _local2) + "\";";
break;
case Object.prototype :
case Array.prototype :
var _local4 = 0;
var _local5 = new String("");
buf = buf + "a:";
for (var _local6 in _local2) {
_local5 = _local5 + (serialize_internal("", _local6) + serialize_internal("", _local2[_local6]));
_local4 = _local4 + 1;
}
buf = (((buf + _local4) + ":{") + _local5) + "}";
break;
default :
buf = buf + "i:0;";
}
return(buf);
}
function calcLength(struct) {
var _local1;
var _local3 = 0;
var _local4 = struct.length;
var _local2 = 0;
while (_local2 < _local4) {
_local1 = ord(struct.charAt(_local2));
if (_local1 < 128) {
_local3 = _local3 + 1;
} else if (_local1 < 1024) {
_local3 = _local3 + 2;
} else if (_local1 < 32768) {
_local3 = _local3 + 3;
} else if (_local1 < 2097152) {
_local3 = _local3 + 4;
}
_local2++;
}
return(_local3);
}
function unserialize(what) {
buffer = what;
return(unserialize_internal(what));
}
function unserialize_internal(obj) {
var _local3 = obj.charAt(0);
var _local2;
switch (_local3) {
case "d" :
_local2 = parse_double();
break;
case "i" :
_local2 = parse_int();
break;
case "b" :
_local2 = parse_boolean();
break;
case "s" :
_local2 = parse_string();
break;
case "a" :
_local2 = parse_array();
break;
case "O" :
_local2 = parse_object();
break;
case "N" :
}
if (_local2[0] != -1) {
buffer = buffer.substr(buffer.indexOf(";", (_local2[0] + length(_local3)) + length(_local2[0].toString())) + 1);
}
return(_local2[1]);
}
function parse_array() {
var _local3 = 0;
var _local5 = getArrayLength();
var _local4 = new Array();
while (_local3 < _local5) {
var _local2 = getNext();
_local4[_local2[0]] = _local2[1];
_local3++;
}
buffer = buffer.substr(1);
return(new Array(-1, _local4));
}
function parse_object() {
var _local6 = parse_string();
buffer = buffer.substr(buffer.indexOf(":", _local6[0]));
var _local7 = _local6[1];
var _local3 = 0;
var _local5 = getObjectLength();
var _local4 = new Object();
while (_local3 < _local5) {
var _local2 = getNext();
_local4[_local2[0]] = _local2[1];
_local3++;
}
buffer = buffer.substr(1);
return(new Array(-1, _local4));
}
function parse_string() {
var _local2 = getStringLenght();
var _local3 = getCStringLenght();
if (_local2 eq _local3) {
var _local4 = buffer.substr(length(_local2) + 4, _local2).toString();
} else {
var _local4 = buffer.substr(length(_local2) + 4, _local3).toString();
}
return(new Array(_local3, _local4));
}
function parse_boolean() {
var _local2 = getLength();
var _local3 = ((_local2 < 1) ? false : true);
return(new Array(length(_local2.toString()), _local3));
}
function parse_double() {
var _local2 = getFloatLength();
var _local3 = _local2;
return(new Array(length(_local2.toString()), _local3));
}
function parse_int() {
var _local2 = getLength();
var _local3 = _local2;
return(new Array(length(_local2.toString()), _local3));
}
function getStringLenght(str) {
var _local2 = parseInt(buffer.substr(2, buffer.indexOf(":", 3) - 2));
return(_local2);
}
function getCStringLenght(str) {
var _local5 = parseInt(buffer.substr(2, buffer.indexOf(":", 3) - 2));
var _local3;
var _local2 = _local5;
var _local4 = buffer;
_local3 = 0;
while (_local3 < _local2) {
if (_local4.charCodeAt(_local3 + 5) > 128) {
if (_local4.charCodeAt(_local3 + 5) > 255) {
_local2 = _local2 - 2;
} else {
_local2 = _local2 - 1;
}
}
_local3++;
}
return(_local2);
}
function getLength() {
var _local2 = parseInt(buffer.substr(2, buffer.indexOf(";", 3) - 2));
return(_local2);
}
function getFloatLength() {
var _local2 = parseFloat(buffer.substr(2, buffer.indexOf(";", 3) - 2));
return(_local2);
}
function getArrayLength() {
var _local2 = parseInt(buffer.substr(2, (buffer.indexOf(":", 2) - buffer.indexOf(":", 1)) + 1));
buffer = buffer.substr(buffer.indexOf(":", 2) + 2);
return(_local2);
}
function getObjectLength() {
var _local2 = parseInt(buffer.substr(1, buffer.indexOf(":", 1)));
buffer = buffer.substr(buffer.indexOf(":", 1) + 2);
return(_local2);
}
function getNext(str) {
var _local2 = unserialize_internal(buffer);
var _local3 = unserialize_internal(buffer);
return(new Array(_local2, _local3));
}
static var className = "it.sephiroth.Serializer";
static var classVersion = "2.1.4b";
var instanceName = "Serializer";
}
Symbol 168 MovieClip [__Packages.com.rawfishsoftware.sushi.SushiSocket] Frame 0
class com.rawfishsoftware.sushi.SushiSocket extends XMLSocket
{
var ref, mc, connect;
function SushiSocket (ip, p, r) {
super();
ref = r;
mc = _root.createEmptyMovieClip("$$sushimc", 9999998);
mc.sushi = ref;
mc.socket = this;
mc.onEnterFrame = function () {
var _local2 = this.sushi;
if (_local2.$sts != "") {
if (_local2.logging) {
_local2.logger.log(_local2.$sts, "FLASH");
}
this.socket.send(_local2.$sts);
_local2.$sts = "";
}
if (_local2.$fps) {
_local2.$getFPS();
}
};
connect(ip, p);
}
function onConnect(s) {
if (s) {
var _local2 = ref.$d;
ref.connectionType = "SOCKET";
ref.$connected = 1;
ref.$sts = ref.$sts + ((((((((((("S55" + _local2) + "FLASH") + _local2) + "1") + _local2) + ref.LIMIT) + ref.$e) + "2") + _local2) + ref.$clientSpeed) + ref.$e);
ref.$netTimer = getTimer();
} else {
ref.$cb.apply(ref.$sc, [1]);
}
}
function onData(m) {
ref.$p.apply(ref, [m]);
}
function onClose() {
ref.$connected = 0;
_root.$$sushimc.swapDepths(0);
_root.$$sushimc.removeMovieClip();
ref.event.onDisconnect.$call();
ref.$init();
ref.sessionList = [];
}
}
Symbol 169 MovieClip [__Packages.com.rawfishsoftware.sushi.SushiHTTP] Frame 0
class com.rawfishsoftware.sushi.SushiHTTP
{
var ref, ip, lv, pf;
function SushiHTTP (i, r) {
ref = r;
ip = i;
lv = new LoadVars();
pf = ref.$pollFreq;
connect();
}
function connect() {
var _local2 = ref.$d;
var _local3 = 0;
lv.onLoad = function (s) {
if (s) {
this.ref.$http.communicate();
this.ref.$p(this.m);
} else {
this.ref.$cb.apply(this.ref.$sc, [1]);
}
};
lv.ref = ref;
lv.m = (((((((((("55" + _local2) + "FLASH") + _local2) + "1") + _local2) + ref.LIMIT) + ref.$e) + "2") + _local2) + ref.$clientSpeed) + ref.$e;
lv.i = ref.me.id;
lv.sendAndLoad(ip, lv, "POST");
}
function communicate() {
_root.createEmptyMovieClip("$$sushimc", 9999998);
_root.$$sushimc.ref = this;
_root.$$sushimc.onEnterFrame = function () {
this.ref.poll();
if (this.ref.$fps) {
this.ref.$getFPS();
}
};
ref.connectionType = "HTTP";
ref.$connected = 1;
ref.$netTimer = getTimer();
lv.onLoad = function (s) {
if (this.m != "") {
this.ref.$p(this.m);
}
this.ref.$http.pon = false;
this.ref.$http.pf = this.ref.$pollFreq;
};
}
function poll() {
if (!pon) {
if (ref.$sts != "") {
update();
} else if (!(--pf)) {
update();
}
}
}
function update() {
lv.m = ref.$sts;
pon = true;
ref.$sts = "";
if (ref.logging) {
ref.logger.log(lv.m, "FLASH");
}
lv.sendAndLoad(ip, lv, "POST");
}
var pon = false;
}
Symbol 170 MovieClip [__Packages.debugTools.agentSmith.WireTap] Frame 0
class debugTools.agentSmith.WireTap
{
var target;
function WireTap (tg) {
target = tg;
thing = "agentsmith";
Key.addListener(this);
}
function onKeyDown() {
if (Key.isDown(40) && (Key.getAscii() == thing.charCodeAt(read))) {
read++;
} else if (Key.getAscii() == 40) {
read = read;
} else {
read = 0;
}
if (read == thing.length) {
trace("<agent smith>");
target.loadMovie("AgentStub.swf");
read = 0;
}
}
var thing = "fish";
var read = 0;
}
Symbol 64 MovieClip [__Packages.com.omniture.ActionSource] Frame 0
class com.omniture.ActionSource extends MovieClip
{
var _visible, broadcaster, s;
function ActionSource () {
super();
_visible = false;
broadcaster = new com.omniture.events.EventBroadcaster();
}
function set version(version) {
//return(this.version);
}
function get version() {
return(s.version);
}
function set account(account) {
s.account = account;
//return(this.account);
}
function get account() {
return(s.account);
}
function set charSet(charSet) {
s.charSet = charSet;
//return(this.charSet);
}
function get charSet() {
return(s.charSet);
}
function set pageName(pageName) {
s.pageName = pageName;
//return(this.pageName);
}
function get pageName() {
return(s.pageName);
}
function set pageURL(pageURL) {
s.pageURL = pageURL;
//return(this.pageURL);
}
function get pageURL() {
return(s.pageURL);
}
function set trackClickMap(trackClickMap) {
s.trackClickMap = trackClickMap;
//return(this.trackClickMap);
}
function get trackClickMap() {
return(s.trackClickMap);
}
function set movieID(movieID) {
s.movieID = movieID;
//return(this.movieID);
}
function get movieID() {
return(s.movieID);
}
function set autoTrack(autoTrack) {
s.autoTrack = autoTrack;
//return(this.autoTrack);
}
function get autoTrack() {
return(s.autoTrack);
}
function loadActionSource(path) {
var _local1 = this;
_local1.s = _local1.createEmptyMovieClip("s", 100);
_local1.s.loadMovie(path);
_local1.loadInterval = setInterval(_local1, "checkActionSourceLoaded", 10);
}
function checkActionSourceLoaded() {
var _local1 = this;
if (_local1.s.track.toString() == "[type Function]") {
_local1.s.movie = _local1;
_local1.s.wrapperObject = _local1;
clearInterval(_local1.loadInterval);
_local1.broadcastEvent("loaded");
}
}
function addEventListener(event, obj, method) {
broadcaster.addEventListener(event, obj, method);
}
function removeEventListener(event, obj, method) {
broadcaster.removeEventListener(event, obj, method);
}
function broadcastEvent(event, data) {
broadcaster.broadcastEvent(event, data);
}
function track() {
s.track();
}
function trackLink(linkURL, linkType, linkName) {
s.trackLink(linkURL, linkType, linkName);
}
}
Symbol 68 MovieClip [__Packages.com.omniture.events.EventBroadcaster] Frame 0
class com.omniture.events.EventBroadcaster
{
var _oListeners;
function EventBroadcaster () {
_oListeners = new Object();
}
function addEventListener(event, obj, method) {
var _local2 = event;
var _local3 = this;
if (_local3._oListeners[_local2] == undefined) {
_local3._oListeners[_local2] = new Array();
}
var len = _local3._oListeners[_local2].length;
var _local1 = 0;
while (_local1 < len) {
if ((_local3._oListeners[_local2][_local1].obj == obj) && (_local3._oListeners[_local2][_local1].method == method)) {
return;
}
_local1++;
}
_local3._oListeners[_local2].push({obj:obj, method:method});
}
function broadcastEvent(event, data) {
var _local3 = event;
var sMethod;
var aData;
var _local2 = 0;
while (_local2 < _oListeners[_local3].length) {
sMethod = _local3;
if (_oListeners[_local3][_local2].method != undefined) {
sMethod = _oListeners[_local3][_local2].method;
}
aData = new Array();
var _local1 = 1;
while (_local1 < arguments.length) {
aData.push(arguments[_local1]);
_local1++;
}
_oListeners[_local3][_local2].obj[sMethod].apply(_oListeners[_local3][_local2].obj, aData);
_local2++;
}
}
function removeEventListener(event, obj, method) {
var _local2 = event;
var _local3 = this;
var len = _local3._oListeners[_local2].length;
var _local1 = len - 1;
while (_local1 >= 0) {
if ((_local3._oListeners[_local2][_local1].obj == obj) & (_local3._oListeners[_local2][_local1].method == method)) {
_local3._oListeners[_local2].splice(_local1, 1);
}
_local1--;
}
}
}
Symbol 71 MovieClip [houseTrans] Frame 13
stop();
Symbol 71 MovieClip [houseTrans] Frame 28
this.removeMovieClip();