Frame 1
function Initable() {
}
function CLayout() {
this.role = 1;
this.allowBan = false;
this.allowInvite = true;
this.allowIgnore = true;
this.allowProfile = true;
this.allowFileShare = false;
this.allowPrivateMessage = true;
this.allowCustomBackground = true;
this.showUserList = true;
this.showPublicLog = true;
this.showPrivateLog = true;
this.showInputBox = true;
this.showOptionPanel = true;
this.showLogout = true;
this.isSingleRoomMode = false;
this.allowCreateRoom = true;
this.showAddressee = true;
this.toolbar = new Object();
this.optionPanel = new Object();
this.userList = new Object();
this.publicLog = new Object();
this.privateLog = new Object();
this.inputBox = new Object();
this.userList.minWidth = 50;
this.userList.width = -1;
this.userList.relWidth = 30;
this.userList.dockWidth = 75;
this.userList.dockHeight = 50;
this.userList.position = 1;
this.publicLog.minHeight = 35;
this.publicLog.height = -1;
this.publicLog.relHeight = 66;
this.privateLog.minHeight = 35;
this.privateLog.height = -1;
this.privateLog.relHeight = 25;
this.inputBox.minHeight = 35;
this.inputBox.height = -1;
this.inputBox.relHeight = 8;
this.inputBox.position = 1;
}
function CSkin(inSrc) {
if (inSrc == null) {
this.id = "navy";
this.name = "Navy Blue";
this.backgroundImage = "";
this.dialogBackgroundImage = "";
this.backgroundImageRO = "";
this.dialogBackgroundImageRO = "";
this.showBackgroundImages = false;
this.showBackgroundImagesOnLogin = false;
this.uiAlpha = 100;
this.dialogTitle = 102;
this.dialog = 2368591 /* 0x24244F */;
this.roomText = 16777215 /* 0xFFFFFF */;
this.roomBackground = 2368591 /* 0x24244F */;
this.userListBackground = 3355494 /* 0x333366 */;
this.enterRoomNotify = 15450187 /* 0xEBC04B */;
this.buttonText = 16777215 /* 0xFFFFFF */;
this.button = 2368591 /* 0x24244F */;
this.buttonBorder = 3421297 /* 0x343471 */;
this.inputBoxBackground = 3355494 /* 0x333366 */;
this.privateLogBackground = 3355494 /* 0x333366 */;
this.publicLogBackground = 3355494 /* 0x333366 */;
this.borderColor = 0;
this.bodyText = 15450187 /* 0xEBC04B */;
this.titleText = 16777215 /* 0xFFFFFF */;
this.background = 2368591 /* 0x24244F */;
this.recommendedUserColor = 16777215 /* 0xFFFFFF */;
this.closeButton = 153;
this.closeButtonPress = 39168;
this.closeButtonArrow = 16776689 /* 0xFFFDF1 */;
this.minimizeButton = 153;
this.minimizeButtonPress = 39168;
this.check = 153;
this.scrollBG = -1;
this.scrollerBG = -1;
this.scrollBGPress = -1;
this.scrollBorder = -1;
this.closeButtonBorder = -1;
this.buttonPress = -1;
this.minimizeButtonBorder = -1;
this.headline = -1;
this.userListItem = -1;
this.controlsBackground = -1;
} else {
this.id = inSrc.id;
this.name = inSrc.name;
this.recommendedUserColor = inSrc.recommendedUserColor;
this.background = inSrc.background;
this.bodyText = inSrc.bodyText;
this.borderColor = inSrc.borderColor;
this.publicLogBackground = inSrc.publicLogBackground;
this.privateLogBackground = inSrc.privateLogBackground;
this.inputBoxBackground = inSrc.inputBoxBackground;
this.button = inSrc.button;
this.buttonText = inSrc.buttonText;
this.buttonBorder = inSrc.buttonBorder;
this.enterRoomNotify = inSrc.enterRoomNotify;
this.userListBackground = inSrc.userListBackground;
this.roomBackground = inSrc.roomBackground;
this.roomText = inSrc.roomText;
this.dialog = inSrc.dialog;
this.dialogTitle = inSrc.dialogTitle;
this.backgroundImage = inSrc.backgroundImage;
this.dialogBackgroundImage = inSrc.dialogBackgroundImage;
this.backgroundImageRO = this.backgroundImage;
this.dialogBackgroundImageRO = this.dialogBackgroundImage;
this.titleText = inSrc.titleText;
this.uiAlpha = inSrc.uiAlpha;
this.showBackgroundImages = inSrc.showBackgroundImages;
this.showBackgroundImagesOnLogin = inSrc.showBackgroundImagesOnLogin;
this.scrollBG = inSrc.scrollBG;
this.scrollerBG = inSrc.scrollerBG;
this.scrollBGPress = inSrc.scrollBGPress;
this.scrollBorder = inSrc.scrollBorder;
this.closeButton = inSrc.closeButton;
this.closeButtonPress = inSrc.closeButtonPress;
this.closeButtonBorder = inSrc.closeButtonBorder;
this.closeButtonArrow = inSrc.closeButtonArrow;
this.minimizeButton = inSrc.minimizeButton;
this.minimizeButtonPress = inSrc.minimizeButtonPress;
this.minimizeButtonBorder = inSrc.minimizeButtonBorder;
this.buttonPress = inSrc.buttonPress;
this.check = inSrc.check;
this.headline = inSrc.headline;
this.userListItem = inSrc.userListItem;
this.controlsBackground = inSrc.controlsBackground;
}
}
function CBigSkin(inSrc) {
if (inSrc == null) {
this.name = "FlashChat Default";
this.swf_name = "default_skin";
} else {
this.name = inSrc.name;
this.swf_name = inSrc.swf_name;
}
}
function CText() {
this.itemToChange = new Object();
this.fontSize = new Object();
this.fontFamily = new Object();
this.itemToChange.myTextColor = false;
this.itemToChange.mainChat = new Object();
this.itemToChange.mainChat.presence = true;
this.itemToChange.mainChat.fontSize = 13;
this.itemToChange.mainChat.fontFamily = "Arial";
this.itemToChange.interfaceElements = new Object();
this.itemToChange.interfaceElements.presence = true;
this.itemToChange.interfaceElements.fontSize = 13;
this.itemToChange.interfaceElements.fontFamily = "Arial";
this.itemToChange.title = new Object();
this.itemToChange.title.presence = true;
this.itemToChange.title.fontSize = 13;
this.itemToChange.title.fontFamily = "Arial";
this.fontSize = [20, 18, 16, 14, 13, 12, 11, 10, 9, 8];
this.fontFamily = ["Georgia", "Verdana", "Courier", "Times", "Arial"];
}
function CAvatars() {
this.mod_only = new Object();
this.user = new Object();
this.admin = new Object();
this.moderator = new Object();
this.createNode(this.user);
this.createNode(this.admin);
this.createNode(this.moderator);
}
function CLanguage() {
this.loaded = false;
this.id = "en";
this.name = "English";
this.messages = new Object();
this.messages.banned = "You've been banned";
this.messages.ignored = "User 'USER_LABEL' ignores your messages";
this.messages.login = "Please login to the chat";
this.messages.wrongPass = "Incorrect user name or password. Please try again.";
this.messages.anotherlogin = "Another user is logged in with this user name. Please try again.";
this.messages.expiredlogin = "Your connection has expired. Please re-login.";
this.messages.enterroom = "[ROOM_LABEL]: USER_LABEL has entered at TIMESTAMP";
this.messages.leaveroom = "[ROOM_LABEL]: USER_LABEL has left at TIMESTAMP";
this.messages.selfenterroom = "Welcome! You have entered [ROOM_LABEL] at TIMESTAMP";
this.messages.bellrang = "USER_LABEL rang the bell";
this.messages.chatfull = "The chat is full. Please try again later.";
this.messages.iplimit = "You are already in chat.";
this.messages.roomlock = "This room is password protected.<br>Please enter the room password:";
this.messages.locked = "Invalid password. Please try again.";
this.messages.botfeat = "The bot feature is not currently enabled.";
this.messages.securityrisk = "The file that you uploaded may contain scripting elements, which could pose a security risk. Please try another file.";
this.usermenu = new Object();
this.usermenu.privatemessage = "Private message";
this.usermenu.invite = "Invite";
this.usermenu.ignore = "Ignore";
this.usermenu.unignore = "Un-ignore";
this.usermenu.ban = "Ban";
this.usermenu.unban = "Un-ban";
this.usermenu.profile = "Profile";
this.usermenu.fileshare = "Share File";
this.status = new Object();
this.status.here = "Here";
this.status.busy = "Busy";
this.status.away = "Away";
this.dialog = new Object();
this.dialog.misc = new Object();
this.dialog.misc.roomnotcreated = "Room was not created";
this.dialog.misc.invitationaccepted = "User 'USER_LABEL' accepted your invitation to room 'ROOM_LABEL'";
this.dialog.misc.invitationdeclined = "User 'USER_LABEL' declined your invitation to room 'ROOM_LABEL'";
this.dialog.misc.ignored = "You were ignored by user 'USER_LABEL'";
this.dialog.misc.unignored = "You were un-ignored by user 'USER_LABEL'";
this.dialog.misc.banned = "You were banned by user 'USER_LABEL'";
this.dialog.misc.unbanned = "You were un-banned by user 'USER_LABEL'";
this.dialog.misc.usernotfound = "User 'USER_LABEL' not found";
this.dialog.misc.roomnotfound = "Room 'ROOM_LABEL' not found";
this.dialog.misc.roomisfull = "[ROOM_LABEL] is full. Please choose another room.";
this.dialog.misc.alert = "<b>ALERT!</b>";
this.dialog.misc.chatalert = "<b>ALERT!</b>\n\n";
this.dialog.misc.gag = "<b>You've been gagged for DURATION minute(s)!</b>\nYou may view messages in this room, but not contribute new messages to the conversation, until the gag expires.";
this.dialog.misc.ungagged = "You were un-gagged by user 'USER_LABEL'";
this.dialog.misc.gagconfirm = "USERNAME is gagged for MINUTES minute(s).";
this.dialog.misc.alertconfirm = "USERNAME has read the alert.";
this.dialog.misc.file_declined = "Your file was declined by USER_LABEL.";
this.dialog.misc.file_accepted = "Your file was accepted by USER_LABEL.";
this.dialog.unignore = new Object();
this.dialog.unignore.unignoretext = "Enter unignore text";
this.dialog.unignore.unignoreBtn = "Unignore";
this.dialog.unban = new Object();
this.dialog.unban.unbantext = "Enter unban text";
this.dialog.unban.unbanBtn = "Unban";
this.dialog.tablabels = new Object();
this.dialog.tablabels.themes = "Themes";
this.dialog.tablabels.sounds = "Sounds";
this.dialog.tablabels.text = "Text";
this.dialog.tablabels.effects = "Effects";
this.dialog.tablabels.admin = "Admin";
this.dialog.tablabels.about = "About";
this.dialog.text = new Object();
this.dialog.text.itemChange = "Item to Change";
this.dialog.text.fontSize = "Font Size";
this.dialog.text.fontFamily = "Font Family";
this.dialog.text.language = "Language";
this.dialog.text.mainChat = "Main Chat";
this.dialog.text.interfaceElements = "Interface Elements";
this.dialog.text.title = "Title";
this.dialog.text.mytextcolor = "Use my text color for all received messages.";
this.dialog.effects = new Object();
this.dialog.effects.avatars = "Avatars";
this.dialog.effects.photo = "Photo";
this.dialog.effects.mainchat = "Main chat";
this.dialog.effects.roomlist = "Room list";
this.dialog.effects.background = "Background";
this.dialog.effects.custom = "Custom";
this.dialog.effects.showBackgroundImages = "Show background";
this.dialog.effects.splashWindow = "Focus window on new message";
this.dialog.effects.uiAlpha = "Transparency";
this.dialog.sound = new Object();
this.dialog.sound.volume = "Volume";
this.dialog.sound.pan = "Pan";
this.dialog.sound.leaveroom = "Leave room";
this.dialog.sound.enterroom = "Enter room";
this.dialog.sound.reveivemessage = "Receive message";
this.dialog.sound.submitmessage = "Submit message";
this.dialog.sound.muteall = "Mute all";
this.dialog.sound.testBtn = "Test";
this.dialog.sound.sampleBtn = "Sample";
this.dialog.sound.initiallogin = "Initial login";
this.dialog.sound.logout = "Logout";
this.dialog.sound.privatemessagereceived = "Receive private message";
this.dialog.sound.invitationreceived = "Receive invitation";
this.dialog.sound.combolistopenclose = "Open/close combobox list";
this.dialog.sound.userbannedbooted = "User banned or booted";
this.dialog.sound.usermenumouseover = "User menu mouse over";
this.dialog.sound.roomopenclose = "Open/close room section";
this.dialog.sound.popupwindowopen = "Popup window opens";
this.dialog.sound.popupwindowclosemin = "Popup window closes";
this.dialog.sound.pressbutton = "Key press";
this.dialog.sound.otheruserenters = "Other user enter room";
this.dialog.skin = new Object();
this.dialog.skin.selectskin = "Select Color Scheme...";
this.dialog.skin.selectBigSkin = "Select Skin...";
this.dialog.skin.background = "Main Background";
this.dialog.skin.bodyText = "Body text";
this.dialog.skin.borderColor = "Border color";
this.dialog.skin.button = "Buttons background";
this.dialog.skin.buttonText = "Buttons text";
this.dialog.skin.buttonBorder = "Buttons border color";
this.dialog.skin.dialog = "Dialog background";
this.dialog.skin.dialogTitle = "Dialog title";
this.dialog.skin.userListBackground = "User list background";
this.dialog.skin.room = "Rooms background";
this.dialog.skin.roomText = "Rooms text";
this.dialog.skin.enterRoomNotify = "Enter room notification";
this.dialog.skin.publicLogBackground = "Public log background";
this.dialog.skin.privateLogBackground = "Private log background";
this.dialog.skin.inputBoxBackground = "Input box background";
this.dialog.skin.titleText = "Title text";
this.dialog.privateBox = new Object();
this.dialog.privateBox.sendBtn = "Send";
this.dialog.privateBox.toUser = "Talking to user USER_LABEL:";
this.dialog.login = new Object();
this.dialog.login.username = "User name:";
this.dialog.login.password = "Password:";
this.dialog.login.moderator = "(if moderator)";
this.dialog.login.required = "required";
this.dialog.login.language = "Language:";
this.dialog.login.loginBtn = "Login";
this.dialog.invitenotify = new Object();
this.dialog.invitenotify.userinvited = "User 'USER_LABEL' invited you to room 'ROOM_LABEL':\n";
this.dialog.invitenotify.acceptBtn = "Accept";
this.dialog.invitenotify.declineBtn = "Decline";
this.dialog.invite = new Object();
this.dialog.invite.inviteto = "Invite user to:";
this.dialog.invite.includemessage = "Include this message with your invitation:";
this.dialog.invite.sendBtn = "Send";
this.dialog.ignore = new Object();
this.dialog.ignore.ignoretext = "Enter ignore text";
this.dialog.ignore.ignoreBtn = "Ignore";
this.dialog.createroom = new Object();
this.dialog.createroom.entername = "Enter room name";
this.dialog.createroom.enterpass = "Enter a room password or leave blank to allow access without password.";
this.dialog.createroom.public = "Public";
this.dialog.createroom.private = "Private";
this.dialog.createroom.createBtn = "Create";
this.dialog.ban = new Object();
this.dialog.ban.banText = "Enter ban text";
this.dialog.ban.fromRoom = "from room";
this.dialog.ban.fromChat = "from chat";
this.dialog.ban.byIP = "by IP";
this.dialog.ban.banBtn = "Ban";
this.dialog.common = new Object();
this.dialog.common.okBtn = "OK";
this.dialog.common.cancelBtn = "Cancel";
this.desktop = new Object();
this.desktop.welcome = "Welcome USER_LABEL";
this.desktop.logOffBtn = "X";
this.desktop.room = "Room";
this.desktop.addRoomBtn = "Add";
this.desktop.skinBtn = "Options";
this.desktop.clearBtn = "Clear";
this.desktop.saveBtn = "Save";
this.desktop.helpBtn = "?";
this.desktop.sendBtn = "Send";
this.desktop.selectsmile = "Smilies";
this.desktop.invalidsettings = "Invalid settings";
this.desktop.ringTheBell = "No Answer? Ring The Bell:";
this.desktop.version = "Version";
this.desktop.adminSign = "";
}
function Settings() {
this.chatid = 1;
this.debug = false;
this.version = "5.0";
this.enableSocketServer = false;
this.liveSupportMode = false;
this.hideSelfPopup = true;
this.showConfirmation = true;
this.labelFormat = "[AVATAR USER] TIMESTAMP:";
this.maxMessageSize = 500;
this.maxMessageCount = 1000;
this.helpUrl = "";
this.userListAutoExpand = false;
this.msgRequestInterval = 3;
this.msgRequestIntervalAway = 5;
this.floodInterval = 1;
this.inactivityInterval = 36000;
this.roomTitleFormat = "ROOM_LABEL - USER_COUNT";
this.maxUsersPerRoom = 20;
this.listOrder = "ENTRY";
this.disabledIRC = "";
this.mods = "";
this.defaultRoom = 1;
this.defaultTheme = "navy";
this.defaultSkin = "default_skin";
this.defaultLanguage = "en";
this.allowLanguage = true;
this.allowPhoto = true;
this.splashWindow = false;
this.layouts = new Array();
this.layouts[0] = new CLayout();
this.layout = this.layouts[0];
this.socketServer = new Object();
this.smiles = new Object();
this.extendedSmiles = new Object();
this.sound = new Object();
this.sound_options = new Object();
this.avatars = new CAvatars();
this.text = new CText();
this.special_language = new Object();
this.bigSkin = new Object();
this.bigSkin.defaultSkin = 0;
this.bigSkin.preset = new Array();
this.bigSkin.preset.push(new CBigSkin());
this.skin = new Object();
this.skin.defaultSkin = 0;
this.skin.preset = new Array();
this.skin.preset.push(new CSkin());
this.languages = new Array();
this.languages.push(new CLanguage());
this.user = new Object();
this.user.skin = null;
this.user.sound = null;
this.user.profile = new Object();
this.user.user.profile.nick_image = "";
this.login = new Object();
this.logout = new Object();
this.module = new Array();
}
function toBool(arg) {
return((((arg == "1") || (arg == true)) ? true : false));
}
function setTextProperty(propName, val, obj, isNew) {
var _local2 = obj.getTextFormat();
if ((_local2[propName] != val) && (val != undefined)) {
_local2[propName] = val;
obj.setTextFormat(_local2);
if (isNew != undefined) {
obj.setNewTextFormat(_local2);
}
if (obj._height < obj.textHeight) {
obj._height = obj.textHeight + 5;
}
return(true);
}
return(false);
}
function testText(inObj, inText, inProp) {
if (_global.FlashChatNS.test_text == undefined) {
inObj._parent.createTextField("tEsT_tXt_tEsT", inObj._parent.getNextHighestDepth(), 0, 0, 0, 0);
_global.FlashChatNS.test_text = inObj._parent.tEsT_tXt_tEsT;
_global.FlashChatNS.test_text._visible = false;
_global.FlashChatNS.test_text.autoSize = "left";
}
if (inProp == undefined) {
var _local4 = inObj.getTextFormat();
_global.FlashChatNS.test_text.setNewTextFormat(_local4);
} else {
_global.FlashChatNS.test_text.setNewTextFormat(inProp);
}
_global.FlashChatNS.test_text.text = ((inText == "") ? "l" : (inText));
var _local2 = new Object();
_local2.width = _global.FlashChatNS.test_text._width;
_local2.height = _global.FlashChatNS.test_text._height;
_global.FlashChatNS.test_text.text = "";
_global.FlashChatNS.test_text._width = (_global.test_text._height = 0);
return(_local2);
}
function setSmiliesDimention() {
_global.FlashChatNS.SMILIES = new Object();
var _local4 = 0;
while (_local4 < SmileTextConst.patternList.length) {
this.attachMovie(SmileTextConst.patternList[_local4][1], "ico", this.getNextHighestDepth());
if (this.ico == undefined) {
} else {
this.ico.moveTo(0, 0);
this.ico.lineTo(0, 5);
var _local6 = 0;
var _local5 = 0;
var _local8 = SmileTextConst.patternList[_local4][2];
var _local9 = SmileTextConst.patternList[_local4][3];
if ((_local8 != undefined) && (_local9 != undefined)) {
_local6 = _local8;
_local5 = _local9;
} else {
var _local3 = 1;
while (_local3 <= this.ico._totalframes) {
this.ico.gotoAndStop(_local3);
_local6 = Math.max(_local6, this.ico._width);
_local5 = Math.max(_local5, this.ico._height);
_local3++;
}
}
var _local7 = SmileTextConst.patternList[_local4][1];
_global.FlashChatNS.SMILIES[_local7] = new Object();
_global.FlashChatNS.SMILIES[_local7].width = _local6;
_global.FlashChatNS.SMILIES[_local7].height = _local5;
this.ico.removeMovieClip();
}
_local4++;
}
}
function filterImgUrl(imageURL) {
var _local2 = this._url.split("/");
_local2.splice(_local2.length - 1, 1);
var _local3 = _local2.join("/");
var _local4 = (("inc/swfimageproxy/swfimgproxy.php?url=" + _local3) + "/") + imageURL;
return(_local4);
}
function initLoader(inObj, inFont) {
inFont.okText = inObj.okText;
var _local6 = new Array(new GroupLoaderItem(inObj.settings, _root.documentRoot + "settings.php", _root.iniLoader, inFont), new GroupLoaderItem(inObj.mainchat, "chatui.swf", 1, inFont), new GroupLoaderItem(inObj.starting, "", new Delayer(5000), inFont));
attachMovie("GroupLoaderSymbol", "loader", 12548);
_root.loader.load(_local6);
_root.loader.onLoad = function () {
this._visible = false;
_root.stageBG._visible = false;
removeMovieClip(this);
};
var _local3 = new Object();
_local3.onResize = function () {
_root.loader._x = (Stage.width - _root.loader._width) / 2;
_root.loader._y = (Stage.height - _root.loader._height) / 2;
var _local2 = new Color(_root.stageBG);
_local2.setRGB(inFont.BGColor);
_root.stageBG._width = Stage.width;
_root.stageBG._height = Stage.height;
_root.stageBG._visible = true;
};
Stage.addListener(_local3);
_local3.onResize();
}
if (_root._url.indexOf("file") == 0) {
_root.documentRoot = "http://localhost/_project/flashchat/sqlcache/FlashChat_v479/chat/";
} else {
_root.documentRoot = "";
}
Initable.prototype.copyAttrs = function (fromXML, toObj) {
for (var _local3 in toObj) {
if (fromXML.attributes[_local3] != undefined) {
switch (typeof(toObj[_local3])) {
case "number" :
toObj[_local3] = Number(fromXML.attributes[_local3]);
break;
case "boolean" :
toObj[_local3] = (fromXML.attributes[_local3] ? true : false);
break;
case "string" :
toObj[_local3] = fromXML.attributes[_local3];
}
}
}
};
Initable.prototype.copyAllAttrs = function (fromXML, toObj) {
for (var _local3 in fromXML.attributes) {
switch (typeof(toObj[_local3])) {
case "number" :
toObj[_local3] = Number(fromXML.attributes[_local3]);
break;
case "boolean" :
toObj[_local3] = ((fromXML.attributes[_local3] && (fromXML.attributes[_local3] != "")) ? true : false);
break;
default :
toObj[_local3] = fromXML.attributes[_local3];
}
}
};
CLayout.prototype = new Initable();
CLayout.prototype.init = function (xml) {
this.copyAttrs(xml, this);
var _local4 = 0;
while (_local4 < xml.childNodes.length) {
var _local2 = xml.childNodes[_local4];
if (_local2.nodeType == 1) {
switch (_local2.nodeName) {
case "toolbar" :
var _local3 = new Object();
_local3.status = true;
_local3.skin = true;
_local3.color = true;
_local3.save = true;
_local3.help = true;
_local3.smilies = 1;
_local3.clear = true;
_local3.bell = true;
this.copyAttrs(_local2, _local3);
for (var _local6 in _local2.attributes) {
this.toolbar[_local6] = _local3[_local6];
}
break;
case "optionPanel" :
_local3 = new Object();
_local3.themes = true;
_local3.sounds = true;
_local3.effects = true;
_local3.text = true;
this.copyAttrs(_local2, _local3);
for (var _local6 in _local2.attributes) {
this.optionPanel[_local6] = _local3[_local6];
}
break;
case "constraint" :
this.copyAttrs(_local2, this[_local2.attributes.id]);
}
}
_local4++;
}
};
CSkin.prototype = new Initable();
CSkin.prototype.clone = function () {
var _local2 = new CSkin(this);
return(_local2);
};
CSkin.prototype.init = function (xml) {
this.copyAttrs(xml, this);
this.backgroundImageRO = this.backgroundImage;
this.dialogBackgroundImageRO = this.dialogBackgroundImage;
};
CBigSkin.prototype = new Initable();
CBigSkin.prototype.clone = function () {
var _local2 = new CBigSkin(this);
return(_local2);
};
CBigSkin.prototype.init = function (xml) {
this.copyAttrs(xml, this);
};
CText.prototype = new Initable();
CText.prototype.init = function (xml) {
this.copyAllAttrs(xml, this);
var _local4 = 0;
while (_local4 < xml.childNodes.length) {
var _local2 = xml.childNodes[_local4];
if (_local2.nodeType == 1) {
switch (_local2.nodeName) {
case "itemToChange" :
var _local3 = 0;
while (_local3 < _local2.childNodes.length) {
this.copyAllAttrs(_local2.childNodes[_local3], this.itemToChange[_local2.childNodes[_local3].nodeName]);
_local3++;
}
break;
case "fontSize" :
this.fontSize = _local2.attributes;
break;
case "fontFamily" :
this.fontFamily = _local2.attributes;
}
}
_local4++;
}
};
CAvatars.prototype = new Initable();
CAvatars.prototype.createNode = function (inObj) {
inObj.male = new Object();
inObj.female = new Object();
inObj.male.mainchat = new Object();
this.createLastNode(inObj.male.mainchat);
inObj.male.room = new Object();
this.createLastNode(inObj.male.room);
inObj.female.mainchat = new Object();
this.createLastNode(inObj.female.mainchat);
inObj.female.room = new Object();
this.createLastNode(inObj.female.room);
};
CAvatars.prototype.createLastNode = function (inObj) {
inObj.default_value = "smi_smile";
inObj.default_state = false;
inObj.allow_override = true;
};
CAvatars.prototype.copyNode = function (inName, inNode) {
var _local5 = 0;
while (_local5 < inNode.childNodes.length) {
var _local4 = inNode.childNodes[_local5];
if (_local4.nodeType == 1) {
var _local3 = 0;
while (_local3 < _local4.childNodes.length) {
var _local2 = _local4.childNodes[_local3];
if (_local2.nodeType == 1) {
this.copyAllAttrs(_local2, this[inName][_local4.nodeName][_local2.nodeName]);
}
_local3++;
}
}
_local5++;
}
};
CAvatars.prototype.init = function (xml) {
this.copyAllAttrs(xml, this);
var _local3 = 0;
while (_local3 < xml.childNodes.length) {
var _local2 = xml.childNodes[_local3];
if (_local2.nodeType == 1) {
if (_local2.nodeName == "mod_only") {
this.copyAllAttrs(_local2, this.mod_only);
} else if (((_local2.nodeName == "user") || (_local2.nodeName == "admin")) || (_local2.nodeName == "moderator")) {
this.copyNode(_local2.nodeName, _local2);
}
}
_local3++;
}
};
CLanguage.prototype = new Initable();
CLanguage.prototype.init = function (xml) {
this.copyAttrs(xml, this);
var _local6 = 0;
while (_local6 < xml.childNodes.length) {
var _local2 = xml.childNodes[_local6];
if (_local2.nodeType == 1) {
switch (_local2.nodeName) {
case "messages" :
var _local3 = _local2.childNodes.length - 1;
while (_local3 >= 0) {
var _local4 = _local2.childNodes[_local3];
if (_local4.nodeType == 1) {
this.messages[_local4.nodeName] = _local4.firstChild.nodeValue;
}
_local3--;
}
this.copyAttrs(_local2, this.messages);
break;
case "dialog" :
this.copyAttrs(_local2, this.dialog[_local2.attributes.id]);
break;
case "desktop" :
this.copyAttrs(_local2, this.desktop);
break;
case "status" :
this.status = new Object();
var _local5 = new Array();
for (var _local8 in _local2.attributes) {
_local5.push([_local8, _local2.attributes[_local8]]);
}
_local3 = _local5.length - 1;
while (_local3 >= 0) {
this.status[_local5[_local3][0]] = _local5[_local3][1];
_local3--;
}
break;
case "usermenu" :
this.copyAttrs(_local2, this.usermenu);
break;
case "misc" :
this.copyAttrs(_local2, this.misc);
}
}
_local6++;
}
};
Settings.prototype = new Initable();
Settings.prototype.init = function (xml) {
this.copyAttrs(xml, this);
var _local23 = xml.attributes.defaultTheme;
var _local22 = xml.attributes.defaultSkin;
var _local11 = 0;
var _local18 = 0;
var _local19 = 0;
var _local10 = 0;
var _local12 = 0;
while (_local12 < xml.childNodes.length) {
var _local4 = xml.childNodes[_local12];
if (_local4.nodeType == 1) {
switch (_local4.nodeName) {
case "socketServer" :
this.copyAllAttrs(_local4, this.socketServer);
break;
case "smiles" :
this.copyAllAttrs(_local4, this.smiles);
SmileTextConst.setNewPattern(this.smiles);
break;
case "sound" :
this.copyAllAttrs(_local4, this.sound);
break;
case "language" :
if (this.languages[_local18]) {
this.languages[_local18].init(_local4);
} else {
var _local16 = new CLanguage();
_local16.init(_local4);
this.languages.push(_local16);
}
_local18++;
break;
case "skin" :
if (this.bigSkin.preset[_local10]) {
this.bigSkin.preset[_local10].init(_local4);
} else {
var _local15 = new CBigSkin();
_local15.init(_local4);
this.bigSkin.preset.push(_local15);
}
if (this.bigSkin.preset[_local10].swf_name == _local22) {
this.bigSkin.defaultSkin = _local10;
}
_local10++;
break;
case "theme" :
if (this.skin.preset[_local11]) {
this.skin.preset[_local11].init(_local4);
} else {
var _local13 = new CSkin();
_local13.init(_local4);
this.skin.preset.push(_local13);
}
if (this.skin.preset[_local11].id == _local23) {
this.skin.defaultSkin = _local11;
}
_local11++;
break;
case "layout" :
if (this.layouts[_local19]) {
this.layouts[_local19].init(_local4);
} else {
var _local14 = new CLayout();
_local14.init(_local4);
this.layouts.push(_local14);
}
_local19++;
break;
case "sound_options" :
this.copyAllAttrs(_local4, this.sound_options);
break;
case "text" :
this.text.init(_local4);
break;
case "special_language" :
this.copyAllAttrs(_local4, this.special_language);
break;
case "extendedSmiles" :
break;
case "logout" :
this.copyAllAttrs(_local4, this.logout);
break;
case "login" :
var _local2 = _local4.childNodes.length - 1;
while (_local2 >= 0) {
var _local7 = _local4.childNodes[_local2];
if (_local7.nodeType == 1) {
this.login[_local7.nodeName] = new Object();
this.copyAllAttrs(_local7, this.login[_local7.nodeName]);
}
_local2--;
}
this.copyAllAttrs(_local4, this.login);
var _local6 = 0;
while (_local6 < this.skin.preset.length) {
if (this.login.theme == this.skin.preset[_local6].id) {
this.login.theme = _local6;
}
_local6++;
}
break;
case "module" :
var _local8 = new Object();
this.copyAllAttrs(_local4, _local8);
var _local17 = _local8.path.split(",");
var _local9 = 0;
if (String(_local17) != "") {
_local9 = _local17.length;
}
if (_local9 > 3) {
_local9 = 3;
}
this.module = new Array(_local9);
this.module.anchors = new Object();
for (var _local21 in _local8) {
var _local3 = _local8[_local21].split(",");
_local2 = 0;
while (_local2 < this.module.length) {
if (this.module[_local2] == null) {
this.module[_local2] = new Object();
}
switch (_local21) {
case "path" :
var _local5 = String(_local3[_local2]);
if (_local5.indexOf("http") >= 0) {
_local5 = "";
}
this.module[_local2][_local21] = _local5;
break;
case "stretch" :
if (_local3[_local2] == "true") {
_local3[_local2] = "1";
} else if (_local3[_local2] == "false") {
_local3[_local2] = "";
}
this.module[_local2][_local21] = _local3[_local2];
break;
case "anchor" :
this.module.anchors[Number(_local3[_local2])] = _local2;
this.module[_local2][_local21] = Number(_local3[_local2]);
break;
default :
this.module[_local2][_local21] = Number(_local3[_local2]);
}
_local2++;
}
}
break;
case "avatars" :
this.avatars.init(_local4);
}
}
_local12++;
}
};
_global.dbg = function (obj, level) {
if (level == undefined) {
level = 0;
}
if (level > 5) {
return(undefined);
}
for (var _local4 in obj) {
var _local1 = "";
i = 0;
while (i < level) {
_local1 = _local1 + "\t";
i++;
}
trace((((_local1 + "obj[") + _local4) + "]=>") + obj[_local4]);
if (typeof(obj[_local4]) == "object") {
dbg(obj[_local4], level + 1);
}
}
};
_global.replaceHTMLSpecChars = function (msg) {
msg = str_replace(msg, newline, "<br>");
msg = str_replace(msg, "\r", "<br>");
msg = str_replace(msg, "<", "<");
msg = str_replace(msg, ">", ">");
msg = str_replace(msg, "&", "&");
msg = str_replace(msg, "'", "'");
msg = str_replace(msg, """, "\"");
msg = msg.split("a> ").join("a> ");
return(msg);
};
_global.areplaceHTMLSpecChars = function (msg) {
msg = str_replace(msg, "&", "&");
msg = str_replace(msg, "<", "<");
msg = str_replace(msg, ">", ">");
msg = str_replace(msg, "'", "'");
msg = str_replace(msg, """, "\"");
return(msg);
};
_global.str_replace = function (str, _old, _new) {
if (_new.indexOf(_old) >= 0) {
return(str);
}
var _local5;
var _local4;
var _local2 = str.indexOf(_old);
while (_local2 >= 0) {
_local5 = str.substring(0, _local2);
_local4 = str.substring(_local2 + _old.length);
str = (_local5 + _new) + _local4;
_local2 = str.indexOf(_old);
}
return(str);
};
MovieClip.prototype.drawRect2 = function (x1, y1, x2, y2, l_gauge, l_color, l_alpha, fill_color, fill_alpha) {
if (arguments.length < 4) {
return(undefined);
}
if ((arguments.length < 7) && (arguments.length > 4)) {
this.lineStyle(l_gauge, l_color);
} else {
this.lineStyle(l_gauge, l_color, l_alpha);
}
if ((fill_color != undefined) && (fill_alpha != undefined)) {
this.beginFill(fill_color, fill_alpha);
}
this.moveTo(x1, y1);
this.lineTo(x2, y1);
this.lineTo(x2, y2);
this.lineTo(x1, y2);
this.lineTo(x1, y1);
if ((fill_color != undefined) && (fill_alpha != undefined)) {
this.endFill();
}
};
_global.CSmileTextConst = function () {
};
_global.CSmileTextConst.prototype.sortPatern = function (a, b) {
if (a[0].length < b[0].length) {
return(-1);
}
if (a[0].length > b[0].length) {
return(1);
}
return(0);
};
_global.CSmileTextConst.prototype.patternList = [[":?", "smi_ask"], [":awe:", "smi_awe"], [":baby:", "smi_baby", 14, 14], ["8)", "smi_cool"], [":evil:", "smi_evil"], [":finger:", "smi_finger"], [":grin:", "smi_grin"], [":heart:", "smi_heart"], [":kiss:", "smi_kiss"], [":D", "smi_laugh"], [":break:", "smi_newline"], [":ninja:", "smi_ninja", 24.3, 18.7], [":red:", "smi_red"], [":roll:", "smi_roll", 37], [":rolleyes:", "smi_roll_eyes"], [":(", "smi_sad"], [":!", "smi_slash"], [":zzz:", "smi_sleep", 21.9, 17.1], [":)", "smi_smile"], [":p", "smi_tongue"], [":weird:", "smi_weird"], [":whistle:", "smi_whistle"], [";)", "smi_wink"], ["8s", "smi_wonder", 16, 16], [":call:", "smi_call"], [":cash:", "smi_cash", 16, 16], [":check:", "smi_check", 19, 25], [":shock:", "smi_shock", 16, 16], [":ball:", "smi_ball"], [":clap:", "smi_clap", 130, 80], [":cry:", "smi_cry"], [":luck:", "smi_luck"], [":nono:", "smi_nono", 112.2, 85], [":Punch:", "smi_punch", 25, 15.9], [":skull:", "smi_skull", 14, 14], [":yeah:", "smi_yeah", 140, 89.6], [":69:", "smi_yinyang", 28.3, 29], [":earth:", "smi_earth"], [":huh:", "smi_huh", 25, 16], [":hypno:", "smi_hypno", 38, 38], [":java:", "smi_java", 25, 25], [":no:", "smi_no"], [":rain:", "smi_rain"], [":rose:", "smi_rose"], [":usa:", "smi_usa"], [":biggrin:", "smi_big_grin"], [":faint:", "smi_faint"], [":mean:", "smi_ill_content"], [":cat:", "smi_meow", 18.5, 16], [":down:", "smi_thumbs_down"], [":up:", "smi_thumbs_up"], [":dog:", "smi_woof", 25, 16], [":au:", "smi_AustraliaFlag"], [":br:", "smi_Brazil"], [":ca:", "smi_CanadaFlag"], [":cn:", "smi_China"], [":eu:", "smi_European_Union"], [":fr:", "smi_France"], [":de:", "smi_Germany"], [":gr:", "smi_Greece"], [":in:", "smi_IndianFlag"], [":it:", "smi_Italy"], [":jp:", "smi_Japan"], [":mx:", "smi_MexicoFlag"], [":pl:", "smi_PolandFlag"], [":pt:", "smi_PortugalFlag"], [":ru:", "smi_Russia"], [":se:", "smi_Sweeden"], [":es:", "smi_Spain"], [":uk:", "smi_UK"], [":ua:", "smi_UkraineFlag"], [":us:", "smi_US_Map"], [":beer:", "smi_beer", 18.5, 17], [":music:", "smi_music", 27, 16], [":read:", "smi_reading", 27, 16], [":admin:", "smi_admin"], [":female:", "smi_female"], [":ms:", "smi_female2"], [":male:", "smi_male"], [":mr:", "smi_male2"], [":mod:", "smi_moderator"], [":speak:", "smi_word_bubble"], [":bball:", "smi_basketball"], [":bowl:", "smi_bowling"], [":cricket:", "smi_cricket"], [":fball:", "smi_football"], [":golf:", "smi_golf"], [":hockey:", "smi_hockey"], [":sail:", "smi_sailing"], [":soccer:", "smi_soccer"], [":tennis:", "smi_tennis"]];
_global.CSmileTextConst.prototype.setNewPattern = function (inSmilies) {
var _local6 = new Object();
var _local5 = 0;
while (_local5 < this.patternList.length) {
var _local8 = inSmilies[this.patternList[_local5][1]];
if (_local8 == "") {
} else {
var _local4 = _local8.split(" ");
_local6[this.patternList[_local5][1]] = new Array();
_local6[this.patternList[_local5][1]].push(this.patternList[_local5]);
if ((this.patternList[_local5][0] != _local4[0]) || (_local4.length > 1)) {
this.patternList[_local5][0] = _local4[0];
if (_local4.length > 1) {
var _local3 = 1;
while (_local3 < _local4.length) {
var _local7 = new Array();
var _local2 = 0;
while (_local2 < this.patternList[_local5].length) {
_local7[_local2] = this.patternList[_local5][_local2];
_local2++;
}
this.patternList.splice(_local5 + _local3, 0, _local7);
this.patternList[_local5 + _local3][0] = _local4[_local3];
_local6[this.patternList[_local5][1]].push(this.patternList[_local5 + _local3]);
_local3++;
}
_local5 = _local5 + (_local3 - 1);
}
}
}
_local5++;
}
this.patternList.splice(0, this.patternList.length);
for (var _local10 in inSmilies) {
if (_local6[_local10] == undefined) {
continue;
}
_local5 = _local6[_local10].length - 1;
while (_local5 >= 0) {
this.patternList.push(_local6[_local10][_local5]);
_local5--;
}
}
this.patternList.reverse();
};
_global.CSmileTextConst.prototype.setExtendedPattern = function (inSmilies) {
for (var _local4 in inSmilies) {
var _local3 = new Array(inSmilies[_local4].keycode, _local4, null, null, inSmilies[_local4].image);
this.patternList.push(_local3);
}
};
_global.SmileTextConst = new CSmileTextConst();
Stage.align = "TL";
Stage.scaleMode = "noScale";
this._quality = "HIGHT";
_global.FlashChatNS = new Object();
_root.stageBG._visible = false;
_root.ini = new Settings();
if (_root.dr != undefined) {
_root.documentRoot = _root.dr;
}
_root.iniLoader = new XML();
_root.iniLoader.ignoreWhite = true;
_root.iniLoader.onLoad = function (succ) {
if (succ) {
_root.ini.init(this.firstChild);
} else {
trace("Could not load settings");
}
};
_root.preLoaderXML = new XML();
_root.preLoaderXML.ignoreWhite = true;
_root.preLoaderXML.onLoad = function (succ) {
if (succ) {
initLoader(this.firstChild.firstChild.attributes, this.firstChild.attributes);
} else {
trace("Could not load preloader settings");
}
};
_root.preLoaderXML.load(_root.documentRoot + "preloader_settings.php");
Symbol 4 MovieClip [ProgressBarSymbol] Frame 1
#initclip 2
function ProgressBarClass() {
this.createEmptyMovieClip("bar", 1);
}
ProgressBarClass.prototype = new MovieClip();
Object.registerClass("ProgressBarSymbol", ProgressBarClass);
ProgressBarClass.prototype.drawBox = function (x, y, w, h, col, alpha) {
var _local4 = new Array(0, 0, 1, 1, col, alpha);
var _local5 = ((arguments.length == 1) ? (arguments[0]) : arguments);
var _local3 = 0;
while (_local3 < _local5.length) {
_local4[_local3] = _local5[_local3];
_local3++;
}
this.beginFill(_local4[4], _local4[5]);
this.moveTo(_local4[0], _local4[1]);
this.lineTo(_local4[0] + _local4[2], _local4[1]);
this.lineTo(_local4[0] + _local4[2], _local4[1] + _local4[3]);
this.lineTo(_local4[0], _local4[1] + _local4[3]);
this.endFill();
};
ProgressBarClass.prototype.update = function (bloaded, btotal) {
if ((btotal > 10) && (bloaded >= btotal)) {
this.percent.text = this.okText;
if (this.onLoad != undefined) {
this.onLoad();
}
this.clear();
} else {
var _local2 = ((btotal > 10) ? (Math.ceil((bloaded * 100) / btotal)) : 0);
this.percent.text = _local2 + "%";
this.drawBox(3, Math.ceil(this.label._height), ((this.percent._x + this.percent._width) * _local2) / 100, 2, this.barColor, 100);
}
this.percent._height = this.percent.textHeight;
};
ProgressBarClass.prototype.setLabel = function (txt, inFont) {
this.barColor = inFont.barColor;
this.okText = inFont.okText;
this.label.text = txt;
this.label.autoSize = "left";
this.percent.autoSize = "left";
this.percent._x = (this.label._x + inFont.maxLabelWidth) + 2;
setTextProperty("font", inFont.fontFamily, this.label);
setTextProperty("size", inFont.fontSize, this.label);
setTextProperty("font", inFont.fontFamily, this.percent, true);
setTextProperty("size", inFont.fontSize, this.percent, true);
this.label.textColor = (this.percent.textColor = inFont.fontColor);
};
#endinitclip
Symbol 5 MovieClip [GroupLoaderSymbol] Frame 1
#initclip 1
function GroupLoaderClass() {
this.items = new Array();
this.currItem = -1;
}
function GroupLoaderItem(label, url, target, font) {
this.label = label;
this.url = url;
this.target = target;
this.font = font;
}
function Delayer(delay) {
this.delay = delay;
}
GroupLoaderClass.prototype = new MovieClip();
Object.registerClass("GroupLoaderSymbol", GroupLoaderClass);
GroupLoaderClass.prototype.onEnterFrame = function () {
if ((this.currItem < 0) || (this.currItem >= this.items.length)) {
return(undefined);
}
var _local4 = this.items[this.currItem];
var _local3 = _local4.getBytesLoaded();
var _local2 = _local4.getBytesTotal();
this["bar" + this.currItem].update(_local3, _local2);
if ((_local2 > 10) && (_local3 >= _local2)) {
this.loadNext();
}
};
GroupLoaderClass.prototype.loadNext = function () {
if (this.currItem < (this.items.length - 1)) {
var _local3 = this["bar" + this.currItem];
this.currItem++;
this.attachMovie("ProgressBarSymbol", "bar" + this.currItem, this.currItem + 1);
var _local2 = this["bar" + this.currItem];
this.items[this.currItem].font.maxLabelWidth = this.maxLabelWidth;
_local2.setLabel(this.items[this.currItem].label, this.items[this.currItem].font);
_local2._y = ((this.currItem > 0) ? (_local3._y + _local3._height) : 0);
this.items[this.currItem].loadTarget();
} else {
if (this.onLoad != undefined) {
this.onLoad();
}
return(undefined);
}
};
GroupLoaderClass.prototype.load = function (items) {
this.items = this.items.concat(items);
this.maxLabelWidth = this.getMaxLabelWidth();
this.loadNext();
};
GroupLoaderClass.prototype.getMaxLabelWidth = function () {
this.createTextField("test_txt", 0, 0, 0, 150, 100);
this.test_txt._visible = false;
this.test_txt.autoSize = "left";
var _local3 = 0;
var _local2 = 0;
while (_local2 < this.items.length) {
this.test_txt.text = this.items[_local2].label;
setTextProperty("font", this.items[_local2].font.fontFamily, this.test_txt);
setTextProperty("size", this.items[_local2].font.fontSize, this.test_txt);
if (_local3 < this.test_txt._width) {
_local3 = this.test_txt._width;
}
_local2++;
}
delete this.test_txt;
return(_local3);
};
GroupLoaderItem.prototype.loadTarget = function () {
if (this.target instanceof MovieClip) {
this.target.loadMovie(this.url);
} else if (typeof(this.target) == "number") {
loadMovieNum (this.url, this.target);
} else {
this.target.load(this.url);
}
};
GroupLoaderItem.prototype.getBytesLoaded = function () {
if (typeof(this.target) == "number") {
return(eval ("_level" + this.target).getBytesLoaded());
}
return(this.target.getBytesLoaded());
};
GroupLoaderItem.prototype.getBytesTotal = function () {
if (typeof(this.target) == "number") {
return(eval ("_level" + this.target).getBytesTotal());
}
return(this.target.getBytesTotal());
};
Delayer.prototype.load = function (url) {
this.time = new Date().getTime();
};
Delayer.prototype.getBytesLoaded = function () {
var _local2 = new Date().getTime() - this.time;
return(Math.min(_local2, this.delay));
};
Delayer.prototype.getBytesTotal = function () {
return(this.delay);
};
#endinitclip
Symbol 8 MovieClip Frame 1
this._visible = false;
Symbol 9 MovieClip Frame 1
this._visible = false;