Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function loginCBS(s, sendInterval, secondBuffer, tournamentChatRoomID, teamRivalPenalty, teamRivalBracketPenalty)
- {
- switch (s)
- {
- case 1:
- {
- if (!consoleMan)
- {
- consoleMan = new classes.Console(this);
- } // end if
- classes.GlobalData.tournamentChatRoomID = tournamentChatRoomID;
- classes.GlobalData.teamRivalPenalty = Number(teamRivalPenalty);
- classes.GlobalData.teamRivalBracketPenalty = Number(teamRivalBracketPenalty);
- classes.Control.loginFinished("socket");
- _root.getCars();
- break;
- }
- case 0:
- {
- _root.displayAlert("warning", "Unauthorized Login", "Your login is not using the correct protocol. Please try again.");
- break;
- }
- case -1:
- {
- _root.displayAlert("warning", "Too Many Attempts", "You have exceeded the login limit. Please try again later.");
- break;
- }
- case -2:
- {
- displayAlert("warning", "Duplicate Login", "You are already logged in. Please close any instances of the game that you have previously opened.");
- break;
- }
- case -3:
- {
- _root.displayAlert("warning", "Traffic Block", "There are too many racers currently logged in. Please wait a few minutes and try again./r/rYou can bypass the traffic block if you have a membership. See www.NittoLegends.com for details.");
- break;
- }
- } // End of switch
- } // End of the function
- function noActivityCB()
- {
- classes.GlobalData.isDisconnected = true;
- _root.abc.closeMe();
- var _loc3 = (classes.AlertBox)(_root.attachMovie("alertBox", "abc", _root.getNextHighestDepth()));
- _loc3.setValue("User Timed Out", "The server disconnected you because you have been inactive for over 20 minutes.", "warning");
- _loc3.addButton("Quit");
- _loc3.onOK = function ()
- {
- getURL("lingo: CLOSEGAME");
- };
- _loc3.addButton("Close");
- var _loc4 = new Object();
- _loc4.onRelease = function (theButton)
- {
- if (theButton.btnLabel.text == "Quit")
- {
- theButton._parent._parent.onOK();
- } // end if
- false;
- };
- _root.abc.addListener(_loc4);
- } // End of the function
- function showSocketConnectionErrorCB()
- {
- classes.Control.dialogContainer("dialogSocketErrorContent");
- } // End of the function
- function sendNim(rid, msg)
- {
- getURL("lingo: SENDNIMMESSAGE (" + rid + ",\"" + escape(msg) + "\")", "");
- } // End of the function
- function sendNimCB(s, rid)
- {
- if (s > 0)
- {
- }
- else
- {
- var _loc1 = new Date();
- var _loc4 = _loc1.getHours() + ":" + classes.NumFuncs.get2Mins(_loc1.getMinutes());
- classes.Console.updateConverse(rid, "<br/><font color=\"#FF0000\">****This user is unavailable****</font>", s);
- if (Number(classes.Lookup.buddyNum(rid)) < 0)
- {
- classes.Console._NIM.conversationGroup["conversation" + rid].tb1.txt_buddyloc.text = classes.Console.offlineText;
- } // end if
- } // end else if
- } // End of the function
- function addNimUser(xmlStr)
- {
- var _loc4;
- var _loc3 = new XML();
- _loc3.ignoreWhite = true;
- _loc3.parseXML(xmlStr);
- if (!_loc3.firstChild.attributes.s.length)
- {
- _loc4 = _loc3.firstChild.childNodes.length;
- for (var _loc2 = 0; _loc2 < _loc4; ++_loc2)
- {
- var _loc1 = _loc3.firstChild.childNodes[_loc2];
- classes.Console.addToBuddyList(_loc1.attributes.i, _loc1.attributes.n, _loc1.attributes.s, _loc1.attributes.b, _loc1.attributes.r);
- } // end of for
- if (_loc4)
- {
- panel.refreshMe(1);
- } // end if
- } // end if
- } // End of the function
- function addSingleNimUser(i, n, s, r)
- {
- classes.Console.addToBuddyList(i, n, s, 0, r);
- panel.refreshMe(1);
- } // End of the function
- function updateNimUser(id, userStatus)
- {
- var _loc2;
- _loc2 = classes.Lookup.buddyNum(id);
- if (_loc2 >= 0)
- {
- _global.buddylist_xml.firstChild.childNodes[_loc2].attributes.s = userStatus;
- panel.refreshMe(1);
- } // end if
- } // End of the function
- function getNimMessage(id, fromName, ur, msg)
- {
- if (classes.Console.findConverse(id) == undefined)
- {
- classes.Console.newConverse(id);
- } // end if
- var _loc1 = new Date();
- var _loc3 = _loc1.getHours() + ":" + classes.NumFuncs.get2Mins(_loc1.getMinutes());
- classes.Console.updateConverse(id, "<span class=\"e" + ur + "\"><span class=\"nim\">[" + _loc3 + "] " + fromName + ": " + msg + "</span></span>");
- classes.Console.updateIndicator(id, 3);
- } // End of the function
- function deleteNimUser(id)
- {
- getURL("lingo: DELETENIMUSER " + id, "");
- } // End of the function
- function deleteNimUserCB(stat, id)
- {
- switch (stat)
- {
- case 1:
- {
- classes.Console.removeFromBuddyList(id);
- break;
- }
- case 0:
- {
- break;
- }
- case -1:
- {
- break;
- }
- case -2:
- } // End of switch
- } // End of the function
- function removeNimUserCB(id)
- {
- classes.Console.removeFromBuddyList(id);
- } // End of the function
- function blockNimUser(id)
- {
- getURL("lingo: BLOCKNIMUSER " + id, "");
- } // End of the function
- function blockNimUserCB(stat)
- {
- switch (stat)
- {
- case 1:
- {
- break;
- }
- case 0:
- {
- break;
- }
- case -1:
- {
- break;
- }
- } // End of switch
- } // End of the function
- function unblockNimUser(id)
- {
- _global.unblockUserID = id;
- getURL("lingo: UNBLOCKNIMUSER " + id, "");
- } // End of the function
- function unblockNimUserCB(stat)
- {
- switch (stat)
- {
- case 0:
- {
- classes.Control.dialogAlert("Failed to Block User", "Sorry, there was an error when trying to block this user. Please try again.");
- break;
- }
- case -1:
- case 1:
- {
- for (var _loc2 = 0; _loc2 < _global.buddylist_xml.firstChild.childNodes.length; ++_loc2)
- {
- if (_global.buddylist_xml.firstChild.childNodes[_loc2].attributes.id == _global.unblockUserID)
- {
- _global.buddylist_xml.firstChild.childNodes[_loc2].attributes.b = 0;
- delete _global.unblockUserID;
- break;
- } // end if
- } // end of for
- classes.Console._BASE.panel.refreshMe();
- break;
- }
- } // End of switch
- } // End of the function
- function inquiryNimUser(uname, uid)
- {
- var _loc2 = _global.outgoingRequestsXML.createElement("u");
- _loc2.attributes.s = 2;
- _loc2.attributes.n = uname;
- _loc2.attributes.i = uid;
- _global.outgoingRequestsXML.firstChild.appendChild(_loc2);
- getURL("lingo: INQUIRYNIMUSER \"" + uname + "\"", "");
- } // End of the function
- function inquiryNimUserCB(stat)
- {
- switch (stat)
- {
- case 1:
- {
- getNimIncomingRequests();
- classes.Control.focusNim();
- break;
- }
- case 0:
- {
- _root.displayAlert("warning", "Buddy Request Failed", "Sorry, this username could not be found in our system.");
- break;
- }
- case -1:
- {
- getNimIncomingRequests();
- classes.Control.focusNim();
- break;
- }
- case -2:
- {
- break;
- }
- case -3:
- {
- getNimIncomingRequests();
- classes.Control.focusNim();
- break;
- }
- case -4:
- {
- getNimIncomingRequests();
- classes.Control.focusNim();
- break;
- }
- case -5:
- {
- _root.displayAlert("warning", "Buddy Request Failed", "Sorry, this user is not accepting requests.");
- break;
- }
- case -6:
- {
- _root.displayAlert("warning", "Buddy Request Failed", "Sorry, you must wait a while before you try to add this user as a buddy again.");
- break;
- }
- case -7:
- {
- _root.displayAlert("warning", "Buddy List Full", "Sorry, you already have the maximum number of buddies.");
- break;
- }
- case -8:
- {
- _root.displayAlert("warning", "Buddy Request Failed", "Sorry, you can\'t have yourself as your buddy.");
- break;
- }
- case -9:
- {
- _root.displayAlert("warning", "Buddy Request Failed", "Sorry, this user already has the maximum number of buddies.");
- break;
- }
- case -60:
- {
- _root.displayAlert("warning", "Account Verification Required", "I\'m sorry, but you need to verify your account to add someone as a buddy.");
- break;
- }
- } // End of switch
- } // End of the function
- function receiveNimInquiryCB(reqID, reqName)
- {
- var _loc2 = _global.incomingRequestsXML.createElement("u");
- _loc2.attributes.n = reqName;
- _loc2.attributes.i = reqID;
- _global.incomingRequestsXML.firstChild.appendChild(_loc2);
- if (classes.Console._BASE.panel.tbB.scrollerReq._visible)
- {
- classes.Console._BASE.panel.refreshMe();
- } // end if
- } // End of the function
- function allowNimUser(reqID, answer)
- {
- getURL("lingo: ALLOWNIMUSER " + reqID + ", " + answer, "");
- } // End of the function
- function allowNimUserCB(s)
- {
- switch (s)
- {
- case 1:
- {
- break;
- }
- case -1:
- {
- _root.displayAlert("warning", "Buddy Request Failed", "Sorry, you already have the maximum number of buddies.");
- break;
- }
- case -2:
- {
- _root.displayAlert("warning", "Buddy Request Failed", "Sorry, this user already has the maximum number of buddies.");
- break;
- }
- } // End of switch
- } // End of the function
- function inquiryNimAnswerCB(recID, recName, answer)
- {
- if (answer == 1)
- {
- classes.Console.changeOutgoingItemStatus(recID, 1);
- inquiryNimOK(recID);
- }
- else
- {
- classes.Console.changeOutgoingItemStatus(recID, 0);
- } // end else if
- } // End of the function
- function inquiryNimOK(recID)
- {
- getURL("lingo: NIMOKRESPONSE " + recID, "");
- } // End of the function
- function deleteNimInquiredUser(aid)
- {
- getURL("lingo: DELETENIMINQUIREDUSER " + aid, "");
- } // End of the function
- function deleteNimInquiredUserCB(s)
- {
- if (s)
- {
- } // end if
- } // End of the function
- function deleteNimInquireeUserCB(aid)
- {
- for (var _loc2 = 0; _loc2 < _global.incomingRequestsXML.firstChild.childNodes.length; ++_loc2)
- {
- if (_global.incomingRequestsXML.firstChild.childNodes[_loc2].attributes.i == aid)
- {
- _global.incomingRequestsXML.firstChild.childNodes[_loc2].removeNode();
- if (classes.Console._BASE.panel.tbB.scrollerReq._visible)
- {
- classes.Console._BASE.panel.refreshMe();
- } // end if
- break;
- } // end if
- } // end of for
- } // End of the function
- function getNimIncomingRequests()
- {
- getURL("lingo: GETNIMINREQUESTS");
- } // End of the function
- function getNimIncomingRequestsCB(xmlStr)
- {
- _global.incomingRequestsXML = new XML();
- _global.incomingRequestsXML.ignoreWhite = true;
- _global.incomingRequestsXML.parseXML(xmlStr);
- getNimOutgoingRequests();
- } // End of the function
- function getNimOutgoingRequests()
- {
- getURL("lingo: GETNIMOUTREQUESTS");
- } // End of the function
- function getNimOutgoingRequestsCB(xmlStr)
- {
- _global.outgoingRequestsXML = new XML();
- _global.outgoingRequestsXML.ignoreWhite = true;
- _global.outgoingRequestsXML.parseXML(xmlStr);
- classes.Console._BASE.panel.tbB.showRequests = true;
- if (classes.Console.panelNum == 2)
- {
- classes.Console._BASE.panel.refreshMe();
- }
- else
- {
- classes.Console.changePanel(2);
- } // end else if
- } // End of the function
- function chatListRoom2(raceTrackID, typeID)
- {
- getURL("lingo: LISTRACECHATROOMS2 " + raceTrackID + ", " + typeID, "");
- } // End of the function
- function chatListRoom2CB(d)
- {
- _global.chatRoomListXML = new XML();
- _global.chatRoomListXML.ignoreWhite = true;
- _global.chatRoomListXML.parseXML(d);
- if (classes.GlobalData.prefsObj.didViewRace)
- {
- _global.chatRoomListMC.gotoAndPlay("showList");
- }
- else
- {
- _global.roomJoinTrys = 0;
- _global.roomCreateTrys = 0;
- joinNewbieRivalsChat();
- } // end else if
- } // End of the function
- function joinNewbieRivalsChat()
- {
- var _loc4 = _global.chatRoomListXML;
- var _loc10 = false;
- var _loc9 = 0;
- var _loc7 = 0;
- var _loc8 = 0;
- for (var _loc2 = 0; _loc2 < _loc4.firstChild.childNodes.length; ++_loc2)
- {
- var _loc3 = _loc4.firstChild.childNodes[_loc2].attributes.rc;
- var _loc6 = _loc4.firstChild.childNodes[_loc2].attributes.cy;
- var _loc5 = _loc4.firstChild.childNodes[_loc2].attributes.sm;
- if (_loc5 == 1)
- {
- if (_loc3 >= _loc7 && _loc3 < _loc6)
- {
- _loc10 = true;
- _loc7 = _loc3;
- _loc8 = _loc2;
- } // end if
- ++_loc9;
- } // end if
- } // end of for
- _global.newbieRoom = true;
- if (_loc10 == true)
- {
- _global.tempPCID = _loc4.firstChild.childNodes[_loc8].attributes.cid;
- _global.tempPCY = _loc4.firstChild.childNodes[_loc8].attributes.cy;
- _global.newRoomName = _loc4.firstChild.childNodes[_loc8].attributes.rn;
- chatJoin(5, _loc4.firstChild.childNodes[_loc8].attributes.cid, "", 0);
- }
- else
- {
- ++_loc9;
- var _loc11 = "Newbie Rivals Strip " + _loc9;
- _global.newRoomName = _loc11;
- chatCreateRoom(5, 20, _loc11, 0, "", 0);
- } // end else if
- } // End of the function
- function chatCreateRoom(raceTrackID, typeID, roomName, isPrivate, pw, memberOnly)
- {
- _global.chatRoomIDTracker = typeID;
- getURL("lingo: CREATECHATROOM " + raceTrackID + ", " + typeID + ", \"" + escape(roomName) + "\", " + isPrivate + ", \"" + escape(pw) + "\", " + memberOnly, "");
- } // End of the function
- function chatCreateRoomCB(s, d)
- {
- if (!classes.GlobalData.prefsObj.didViewRace)
- {
- if (s != 1)
- {
- classes.GlobalData.prefsObj.didViewRace = 1;
- classes.GlobalData.savePrefsObj();
- _root.play();
- } // end if
- }
- else
- {
- switch (s)
- {
- case 1:
- {
- var _loc4 = new XML(d);
- break;
- }
- case 0:
- {
- classes.Control.dialogAlert("Server Error", "Sorry, for some reason the room could not be created.");
- break;
- }
- case -1:
- {
- classes.Control.dialogAlert("Banned", "You can not create a room because you have been banned from chatrooms.");
- break;
- }
- case -2:
- {
- classes.Control.dialogAlert("Not a Member", "You can not create a Members Room because you are not a member.");
- break;
- }
- case -3:
- {
- classes.Control.dialogAlert("Illegal Values", "Illegal values were received. Field lengths are too long.");
- break;
- }
- case -4:
- {
- classes.Control.dialogAlert("Room Name Not Allowed", "Sorry, the Room Name you entered is not allowed.");
- break;
- }
- case -5:
- {
- classes.Control.dialogAlert("Room Type Not Allowed", "Sorry, the Room Type you entered is not allowed.");
- break;
- }
- case -6:
- {
- classes.Control.dialogAlert("Room Type Not Allowed", "Sorry, specator room creation is not allowed when there\'s no tournament running.");
- break;
- }
- case -7:
- {
- classes.Control.dialogAlert("Must be in a Team", "Sorry, you must be a team member to create this room.");
- _global.sectionTrackMC.clearWait();
- break;
- }
- case -8:
- {
- classes.Control.dialogAlert("No Interview", "Sorry, the interview is over.");
- classes.SectionModElection.MC.clearWait();
- break;
- }
- } // End of switch
- } // end else if
- } // End of the function
- function chatJoin(raceTrackID, chatRoomID, pw, asInvisible)
- {
- if (!asInvisible)
- {
- asInvisible = 0;
- } // end if
- getURL("lingo: JOINRACECHAT " + raceTrackID + ", " + chatRoomID + ", \"" + escape(pw) + "\", " + asInvisible, "");
- } // End of the function
- function chatJoinCB(s)
- {
- if (!classes.GlobalData.prefsObj.didViewRace)
- {
- if (s == 1)
- {
- _root.play();
- }
- else
- {
- ++_global.roomJoinTrys;
- if (_global.roomJoinTrys == 4)
- {
- classes.GlobalData.prefsObj.didViewRace = 1;
- classes.GlobalData.savePrefsObj();
- _root.play();
- }
- else
- {
- joinNewbieRivalsChat();
- } // end else if
- } // end else if
- }
- else
- {
- chatRoomJoined(s);
- } // end else if
- } // End of the function
- function joinRivalsRoom()
- {
- isInAChat = true;
- _root.abc.closeMe();
- _global.sectionTrackMC.showRaceRoom(5);
- } // End of the function
- function chatRoomJoined(s)
- {
- if (_global.electionChatRoom == true)
- {
- _global.sectionTrackMC = classes.SectionModElection.MC;
- } // end if
- switch (s)
- {
- case 1:
- {
- isInAChat = true;
- _root.abc.closeMe();
- if (_global.electionChatRoom == true)
- {
- classes.SectionModElection.MC.showRaceRoom(false);
- }
- else
- {
- _global.sectionTrackMC.showRaceRoom();
- } // end else if
- break;
- }
- case 0:
- {
- classes.Control.dialogAlert("Room Does Not Exist", "Sorry, the room you are trying to enter no longer exists. Everyone in the room must have left before you entered.");
- _global.sectionTrackMC.clearWait();
- break;
- }
- case -1:
- {
- classes.Control.dialogAlert("Room Is Full", "Sorry, this room is full. You can try again later, or find another room to join.");
- _global.sectionTrackMC.clearWait();
- break;
- }
- case -2:
- {
- classes.Control.dialogAlert("Banned User", "Sorry, you can not enter because you have been banned from this room.");
- _global.sectionTrackMC.clearWait();
- break;
- }
- case -3:
- {
- _root.abc.contentMC.showWrongPW();
- _global.sectionTrackMC.clearWait();
- break;
- }
- case -4:
- {
- classes.Control.dialogAlert("Access Denied", "Sorry, this room is restricted to members only.\rYou must have a valid game membership in order to enter this room.");
- _global.sectionTrackMC.clearWait();
- break;
- }
- case -5:
- {
- classes.Control.dialogAlert("Too Many Moderators", "Sorry, this room already has the maximum number of moderators allowed.");
- _global.sectionTrackMC.clearWait();
- break;
- }
- case -6:
- {
- classes.Control.dialogAlert("Access Denied", "Sorry, this room is restricted.");
- _global.sectionTrackMC.clearWait();
- break;
- }
- case -7:
- {
- classes.Control.dialogAlert("No Tournament", "Sorry, there is no tournament currently running.");
- _global.sectionTrackMC.clearWait();
- break;
- }
- case -8:
- {
- classes.Control.dialogAlert("Must be in a Team", "Sorry, you must be a team member to join this room.");
- _global.sectionTrackMC.clearWait();
- break;
- }
- case -9:
- {
- classes.Control.dialogAlert("No Interview", "Sorry, the interview is over.");
- classes.SectionModElection.MC.clearWait();
- break;
- }
- } // End of switch
- } // End of the function
- function chatLeave()
- {
- if (isInAChat)
- {
- getURL("lingo: LEAVERACECHAT");
- isInAChat = false;
- } // end if
- } // End of the function
- function chatListUsers()
- {
- getURL("lingo: LISTRACECHATUSERS");
- } // End of the function
- function chatListUsersCB(d)
- {
- _global.chatObj.userListXML = new XML(d);
- var _loc3;
- for (var _loc2 = 0; _loc2 < _global.chatObj.userListXML.firstChild.childNodes.length; ++_loc2)
- {
- _loc3 = Number(_global.chatObj.userListXML.firstChild.childNodes[_loc2].attributes.i);
- classes.Lookup.addUserName(_loc3, _global.chatObj.userListXML.firstChild.childNodes[_loc2].attributes.un);
- classes.Lookup.removeFromRaceCarsXMLByUser(_loc3);
- } // end of for
- _global.chatObj.raceRoomMC.CB_listUsers();
- } // End of the function
- function chatUpdateUserCB(d)
- {
- var _loc4 = new XML(d);
- var _loc5 = false;
- var _loc6 = false;
- var _loc2;
- for (var _loc3 = 0; _loc3 < _loc4.firstChild.childNodes.length; ++_loc3)
- {
- _loc2 = _loc4.firstChild.childNodes[_loc3];
- if (_loc2.attributes.ul == "0")
- {
- _global.chatObj.userListXML.firstChild.appendChild(_loc2);
- classes.Lookup.addUserName(Number(_loc2.attributes.i), _loc2.attributes.un);
- classes.Lookup.removeFromRaceCarsXMLByUser(Number(_loc2.attributes.i));
- _loc5 = true;
- continue;
- } // end if
- if (_loc2.attributes.ul == "1")
- {
- _global.chatObj.raceRoomMC.userLeaves(Number(_loc2.attributes.i));
- _loc6 = true;
- } // end if
- } // end of for
- if (classes.RacePlay._MC.myLane)
- {
- return;
- } // end if
- if (_loc5)
- {
- delete _global.CB_getTwoRacersCars;
- _global.chatObj.raceRoomMC.CB_listUsers();
- }
- else if (_loc6)
- {
- _global.chatObj.raceRoomMC.drawUserList();
- _global.chatObj.raceRoomMC.drawQueue();
- classes.RivalsChallengePanel._MC.drawIncomingList();
- } // end else if
- } // End of the function
- function chatSend(msg)
- {
- msg = msg.split("\r").join(" ");
- msg = msg.split("\n").join(" ");
- msg = classes.data.Validate.cleanMessage(msg);
- msg = classes.SpecialText.convertFromSmilies(msg);
- msg = classes.data.Profanity.filterString(msg);
- getURL("lingo: SENDRACECHAT \"" + escape(msg) + "\"", "");
- } // End of the function
- function chatGetCB(classNum, username, msg)
- {
- if (_global.electionChatRoom == true)
- {
- var _loc4 = false;
- if (classes.SectionModElection.MC.isJudge(username) || classes.SectionModElection.MC.isInterviewee(username))
- {
- _loc4 = true;
- } // end if
- if (classes.SectionModElection.MC._isInterviewRoom == true || _loc4 == false)
- {
- classes.Chat.addToHistory(classNum, username, classes.data.Profanity.filterString(msg));
- } // end if
- if (_loc4 == true)
- {
- classes.SectionModElection.MC.displayElectionInterviewMessage(username, classes.data.Profanity.filterString(msg));
- } // end if
- }
- else if (username == "System" && msg == "****** You must verify your account to send a message here. ******")
- {
- _root.displayAlert("warning", "Verification Required", "Sorry, you must verify your account to send a message here.");
- }
- else
- {
- classes.Chat.addToHistory(classNum, username, classes.data.Profanity.filterString(msg));
- } // end else if
- } // End of the function
- function chatKickCB(d)
- {
- var _loc3 = new XML(d);
- if (_global.electionChatRoom == true)
- {
- classes.SectionModElection.MC.cleanUp();
- classes.Lookup.addCallback("setElectionPhase", classes.SectionModElection.MC, classes.SectionModElection.MC.setElectionPhase, "1");
- _root.getElectionPhase(1);
- }
- else
- {
- _global.sectionTrackMC.gotoAndPlay("map");
- } // end else if
- _root.displayAlert("warningtriangle", "Removed From Room", _loc3.firstChild.attributes.r + "\r\r- " + _loc3.firstChild.attributes.u);
- } // End of the function
- function raceEngineInit(raceControlMC, raceTreeMC)
- {
- raceMovie = raceControlMC;
- raceTreeMovie = raceTreeMC;
- raceSound = new classes.RaceSound();
- getURL("lingo: runEngineGaugeInit");
- } // End of the function
- function runEngineGaugeInitCB(redLine, nosSize, nosRemain, boostType)
- {
- raceMovie.RpmRedLine = redLine;
- raceMovie.initNos(nosSize, nosRemain);
- raceMovie.initBoost(boostType);
- raceSound.__set__RpmRedLine(redLine);
- } // End of the function
- function runEngine(throttlePercent)
- {
- this.now = new Date();
- this.t = getTimer();
- this.frameRate = Math.round(1000 / (this.t - this.o));
- this.systemFrameRate = Math.round(1000 / (this.now.getMilliseconds() - this.onow.getMilliseconds()));
- this.o = this.t;
- this.onow = this.now;
- getURL("lingo: runEngine " + throttlePercent, "");
- } // End of the function
- function runEngineCB(rpm, mph, d, boostPSI, timeIndex)
- {
- raceSound.playEngineSound(rpm, boostPSI);
- if (d > -2 && d < 1)
- {
- classes.RacePlay._MC.isStaged = true;
- }
- else if (!classes.RacePlay._MC.raceStarted)
- {
- classes.RacePlay._MC.isStaged = false;
- } // end else if
- raceMovie.s.text = d;
- raceMovie.gaugeCluster.mphMovie.mph.text = Math.floor(mph);
- raceMovie.rpm.text = rpm;
- raceMovie.updateRPM(rpm);
- raceMovie.updateBoost(boostPSI);
- var _loc3 = mph * 1.466667;
- classes.RacePlay._MC.updateDistance(classes.RacePlay._MC.myLane, d, classes.RacePlay._MC.raceStarted, _loc3, 0, timeIndex);
- classes.RacePlay._MC.amComp.renderBothCars();
- classes.RacePlay._MC.amLive.renderBothCars();
- } // End of the function
- function runEngineGearUp()
- {
- getURL("lingo: runEngineGearUp");
- } // End of the function
- function runEngineGearDown()
- {
- getURL("lingo: runEngineGearDown");
- } // End of the function
- function runEngineGearUpdateCB(gearNum)
- {
- raceSound.playGearSound();
- if (gearNum == -1)
- {
- raceMovie.gearCluster.gear.text = "R";
- }
- else if (gearNum == 0)
- {
- raceMovie.gearCluster.gear.text = "N";
- }
- else
- {
- raceMovie.gearCluster.gear.text = gearNum;
- classes.RacePlay._MC.playEffect("gear" + gearNum);
- } // end else if
- } // End of the function
- function runEngineSetBrake(brake)
- {
- getURL("lingo: runEngineSetBrake " + brake, "");
- } // End of the function
- function runEngineSetClutch(clutchFeather)
- {
- getURL("lingo: runEngineSetClutch " + clutchFeather, "");
- } // End of the function
- function runEngineSetNOS(nosState)
- {
- getURL("lingo: runEngineSetNOS " + nosState, "");
- if (nosState == 0)
- {
- raceSound.stopNitrousSound();
- } // end if
- } // End of the function
- function runEngineNOSCB(nosPercent)
- {
- if (nosPercent <= 0)
- {
- raceSound.stopNitrousSound();
- }
- else
- {
- raceSound.playNitrousSound();
- } // end else if
- raceMovie.updateNos(nosPercent);
- } // End of the function
- function runEngineTractionLightCB(isOn)
- {
- if (isOn)
- {
- raceMovie.tractionIcon.gotoAndStop("on");
- }
- else
- {
- raceMovie.tractionIcon.gotoAndStop("off");
- } // end else if
- raceSound.updateScreech(isOn);
- } // End of the function
- function runEngineStageLightCB(isMyCar, staged, preStaged)
- {
- raceTreeMovie.setLight(isMyCar ? (_global.chatObj.raceRoomMC.container.myLane) : (_global.chatObj.raceRoomMC.container.oppLane), "staged", staged);
- raceTreeMovie.setLight(isMyCar ? (_global.chatObj.raceRoomMC.container.myLane) : (_global.chatObj.raceRoomMC.container.oppLane), "pre", preStaged);
- } // End of the function
- function runEngineSetLightOnCB(position, lightName)
- {
- if (position == "1T" || positiong == "2T")
- {
- _global.setTimeout(this, "do_runEngineSetLightOnCB", 2000, position, lightName);
- }
- else
- {
- do_runEngineSetLightOnCB(position, lightName);
- } // end else if
- } // End of the function
- function do_runEngineSetLightOnCB(position, lightName)
- {
- var _loc2;
- var _loc5;
- switch (position)
- {
- case "p":
- {
- _loc2 = _global.chatObj.raceRoomMC.container.myLane;
- _loc5 = true;
- break;
- }
- case "o":
- {
- _loc2 = _global.chatObj.raceRoomMC.container.oppLane;
- _loc5 = true;
- break;
- }
- case "1":
- case "1T":
- {
- _loc2 = 1;
- break;
- }
- case "2":
- case "2T":
- {
- _loc2 = 2;
- break;
- }
- case "b":
- case "s":
- case "sT":
- {
- _loc2 = 0;
- break;
- }
- } // End of switch
- var _loc3;
- if (_loc5)
- {
- _loc3 = classes.RacePlay._MC.tree;
- }
- else
- {
- _loc3 = classes.Race._MC.tree;
- } // end else if
- if (lightName == "red")
- {
- _loc3.setLight(_loc2, "green", false);
- _loc3.setLight(_loc2, lightName, true);
- }
- else
- {
- if ((_loc2 == 0 || _loc2 == 1) && !_loc3.red1._visible)
- {
- _loc3.setLight(1, lightName, true);
- } // end if
- if ((_loc2 == 0 || _loc2 == 2) && !_loc3.red2._visible)
- {
- _loc3.setLight(2, lightName, true);
- } // end if
- } // end else if
- } // End of the function
- function runEngineSetMyRTCB(rt)
- {
- classes.RacePlay._MC.tripWire(classes.GlobalData.id, rt);
- if (rt < 0)
- {
- classes.Control.ctourneyMC.finishCompRace(-1, -1);
- } // end if
- } // End of the function
- function raceStartTimeCB()
- {
- classes.RacePlay._MC.onRaceStartTime();
- } // End of the function
- function raceEngineRaceInProgressCB(d)
- {
- function CB_getTwoRacersCars(txml)
- {
- _global.chatObj.twoRacersCarsXML = txml;
- } // End of the function
- var _loc4 = new XML(d);
- _global.chatObj.raceObj = new Object();
- _global.chatObj.raceObj.inp = true;
- _global.chatObj.raceObj.inp2 = true;
- _global.chatObj.raceObj.r1Obj = new Object();
- _global.chatObj.raceObj.r2Obj = new Object();
- _global.chatObj.raceObj.r1Obj.id = _loc4.firstChild.attributes.r1id;
- _global.chatObj.raceObj.r1Obj.cid = _loc4.firstChild.attributes.r1acid;
- _global.chatObj.raceObj.r2Obj.id = _loc4.firstChild.attributes.r2id;
- _global.chatObj.raceObj.r2Obj.cid = _loc4.firstChild.attributes.r2acid;
- _global.chatObj.raceObj.r1Obj.ti = _loc4.firstChild.attributes.r1tid;
- _global.chatObj.raceObj.r2Obj.ti = _loc4.firstChild.attributes.r2tid;
- _global.chatObj.raceObj.r1Obj.sc = _loc4.firstChild.attributes.sc1;
- _global.chatObj.raceObj.r2Obj.sc = _loc4.firstChild.attributes.sc2;
- classes.Lookup.addCallback("raceGetTwoRacersCars", this, CB_getTwoRacersCars, _global.chatObj.raceObj.r1Obj.cid + "," + _global.chatObj.raceObj.r2Obj.cid);
- _root.raceGetTwoRacersCars(_global.chatObj.raceObj.r1Obj.cid, _global.chatObj.raceObj.r2Obj.cid);
- } // End of the function
- function runEngineDamageLightCB()
- {
- raceMovie.damageLight.gotoAndStop(2);
- } // End of the function
- function raceSpectateCB(d)
- {
- var _loc8 = new XML(d);
- var _loc3 = Number(_loc8.firstChild.attributes.r);
- var _loc9 = Number(_loc8.firstChild.attributes.t.split(",")[0]);
- var _loc4 = Math.ceil(_loc9 / 200);
- var _loc13 = 200;
- var _loc10 = Math.floor(_loc9 / _loc13);
- if (!_loc10)
- {
- _loc10 = 0;
- } // end if
- if ((_loc4 || _loc4 === 0) && !_global.chatObj.raceObj["r" + _loc3 + "Obj"].dArr)
- {
- _global.chatObj.raceObj["r" + _loc3 + "Obj"].dArr = new Array();
- _global.chatObj.raceObj["r" + _loc3 + "Obj"].dArr[0] = -1;
- _global.chatObj.raceObj["r" + _loc3 + "Obj"].dArr[Math.max(0, _loc10 - 1)] = Number(_loc8.firstChild.attributes.d.split(",")[0]);
- classes.Race._MC.startSpectatorController(_loc9);
- }
- else if (!_loc4 && !_global.chatObj.raceObj["r" + _loc3 + "Obj"].sArr)
- {
- _global.chatObj.raceObj["r" + _loc3 + "Obj"].sArr = new Array();
- classes.Race._MC.startStagingController();
- } // end else if
- var _loc11 = _loc8.firstChild.attributes.d.split(",");
- if (_loc4 || _loc4 === 0)
- {
- if (_global.chatObj.raceObj["r" + _loc3 + "Obj"].dArr.length - 1 < _loc4)
- {
- var _loc5 = _global.chatObj.raceObj["r" + _loc3 + "Obj"].dArr.length - _loc4;
- if (_loc5 > 1)
- {
- var _loc6 = _global.chatObj.raceObj["r" + _loc3 + "Obj"].dArr[_global.chatObj.raceObj["r" + _loc3 + "Obj"].dArr.length - 1];
- var _loc12 = Number(_loc11[0]);
- var _loc7 = (_loc12 - _loc6) / _loc5;
- for (var _loc2 = 1; _loc2 < _loc5; ++_loc2)
- {
- _global.chatObj.raceObj["r" + _loc3 + "Obj"].dArr.push(_loc6 + _loc2 * _loc7);
- } // end of for
- } // end if
- } // end if
- if (_global.chatObj.raceObj["r" + _loc3 + "Obj"].dArr.length > _loc4)
- {
- _global.chatObj.raceObj["r" + _loc3 + "Obj"].dArr.splice(_loc4);
- } // end if
- _global.chatObj.raceObj["r" + _loc3 + "Obj"].dArr = _global.chatObj.raceObj["r" + _loc3 + "Obj"].dArr.concat(_loc11);
- }
- else if (!_loc4)
- {
- _global.chatObj.raceObj["r" + _loc3 + "Obj"].sArr = _global.chatObj.raceObj["r" + _loc3 + "Obj"].sArr.concat(_loc11);
- } // end else if
- } // End of the function
- function runEngineStart()
- {
- getURL("lingo: runEngineStart");
- } // End of the function
- function runEngineStop()
- {
- getURL("lingo: runEngineStop");
- } // End of the function
- function chatKOTHGet()
- {
- getURL("lingo: GETKOTH");
- } // End of the function
- function chatKOTHJoin(acid, bt)
- {
- classes.GlobalData.setMyRaceCarNode(acid);
- if (!bt)
- {
- bt = -1;
- } // end if
- getURL("lingo: JOINKOTH " + acid + ", " + bt, "");
- } // End of the function
- function chatKOTHJoinCB(s)
- {
- _global.chatObj.raceRoomMC.joinPanel.panel.togLineUp.gotoAndStop(1);
- _global.chatObj.raceRoomMC.joinPanel.panel.togLineUp._visible = true;
- switch (s)
- {
- case -1:
- {
- break;
- }
- case -2:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected is impounded.");
- break;
- }
- case -3:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected doesn\'t belong to you.");
- break;
- }
- case -4:
- {
- _root.displayAlert("warning", "Invalid Dial In Time", "I\'m sorry, but the dial-in time you entered is not valid.");
- break;
- }
- case -5:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected is locked.");
- break;
- }
- case -6:
- {
- _root.markTestDriveExpiredAndDisplayWarning();
- break;
- }
- case -50:
- {
- _root.displayAlert("triangle", "Account Locked", "Sorry, you left a race that is still in progress. Your account is temporarily locked until the race is finished. This may take moment.");
- break;
- }
- case -60:
- {
- _root.displayAlert("warning", "Account Verification Required", "I\'m sorry, but you need to verify your account to perform this action.");
- break;
- }
- } // End of switch
- } // End of the function
- function chatKOTHNewRacerCB(aid, acid)
- {
- var _loc2 = new XMLNode(1, "k");
- _loc2.attributes.i = aid;
- _loc2.attributes.ci = acid;
- _global.chatObj.queueXML.firstChild.appendChild(_loc2);
- if (classes.GlobalData.id == aid)
- {
- _global.chatObj.raceRoomMC.joinPanel.panel.togLineUp.gotoAndStop("inLine");
- _global.chatObj.raceRoomMC.joinPanel.panel.togLineUp._visible = true;
- } // end if
- _global.chatObj.raceRoomMC.drawQueue();
- } // End of the function
- function chatKOTHUsersCB(d)
- {
- _global.chatObj.queueXML = new XML(d);
- if (Number(_global.chatObj.queueXML.firstChild.firstChild.attributes.ks) > 0)
- {
- var _loc2 = _global.chatObj.raceRoomMC.kingObj;
- _loc2.id = Number(_global.chatObj.queueXML.firstChild.firstChild.attributes.i);
- _loc2.ks = Number(_global.chatObj.queueXML.firstChild.firstChild.attributes.ks);
- _loc2.cid = Number(_global.chatObj.queueXML.firstChild.firstChild.attributes.ci);
- _loc2.username = _global.chatObj.raceRoomMC.lookupUsername(_loc2.id);
- } // end if
- _global.chatObj.raceRoomMC.checkForData();
- } // End of the function
- function chatKOTHNRaceCB(d)
- {
- function CB_getTwoRacersCars(pxml)
- {
- var _loc3 = 10000;
- var _loc2;
- if (_global.chatObj.lastResultsTS)
- {
- _loc2 = new Date() - _global.chatObj.lastResultsTS;
- }
- else
- {
- _loc2 = _loc3;
- } // end else if
- if (_loc2 < _loc3)
- {
- _global.setTimeout(nextRace, _loc3 - _loc2, pxml);
- }
- else
- {
- nextRace(pxml);
- } // end else if
- } // End of the function
- function nextRace(pxml)
- {
- _global.chatObj.twoRacersCarsXML = pxml;
- if (classes.GlobalData.id == _global.chatObj.raceObj.r1Obj.id)
- {
- _global.chatObj.raceObj.isRacer = true;
- _global.chatObj.raceRoomMC.joinPanel.panel.togLineUp._visible = false;
- classes.GlobalData.setMyRaceCarNode(_global.chatObj.raceObj.r1Obj.cid);
- if (Number(_global.chatObj.queueXML.firstChild.firstChild.attributes.ks) <= 0)
- {
- _global.setTimeout(showChal2, 2000);
- }
- else
- {
- _global.setTimeout(showKingChal, 2000);
- } // end else if
- }
- else if (classes.GlobalData.id == _global.chatObj.raceObj.r2Obj.id)
- {
- _global.chatObj.raceObj.isRacer = true;
- _global.chatObj.raceRoomMC.joinPanel.panel.togLineUp._visible = false;
- classes.GlobalData.setMyRaceCarNode(_global.chatObj.raceObj.r2Obj.cid);
- _global.setTimeout(showChal2, 2000);
- }
- else
- {
- _global.chatObj.raceObj.isRacer = false;
- } // end else if
- } // End of the function
- function showChal2()
- {
- _global.chatObj.raceRoomMC.showChallengerNew2();
- } // End of the function
- function showKingChal()
- {
- _global.chatObj.raceRoomMC.showKingChallenge();
- } // End of the function
- var _loc4 = new XML(d);
- _global.chatObj.newRaceTS = new Date();
- _global.chatObj.queueXML.firstChild.childNodes[0].attributes.sc = _loc4.firstChild.attributes.sc1;
- _global.chatObj.queueXML.firstChild.childNodes[1].attributes.sc = _loc4.firstChild.attributes.sc2;
- _global.chatObj.raceObj = new Object();
- _global.chatObj.raceObj.r1Obj = new Object();
- _global.chatObj.raceObj.r2Obj = new Object();
- _global.chatObj.raceObj.r1Obj.id = _loc4.firstChild.attributes.r1id;
- _global.chatObj.raceObj.r1Obj.cid = _loc4.firstChild.attributes.r1cid;
- _global.chatObj.raceObj.r2Obj.id = _loc4.firstChild.attributes.r2id;
- _global.chatObj.raceObj.r2Obj.cid = _loc4.firstChild.attributes.r2cid;
- _global.chatObj.raceObj.r1Obj.bt = _loc4.firstChild.attributes.b1;
- _global.chatObj.raceObj.r2Obj.bt = _loc4.firstChild.attributes.b2;
- _global.chatObj.raceObj.r1Obj.un = _global.chatObj.raceRoomMC.lookupUserName(_global.chatObj.raceObj.r1Obj.id);
- _global.chatObj.raceObj.r2Obj.un = _global.chatObj.raceRoomMC.lookupUserName(_global.chatObj.raceObj.r2Obj.id);
- _global.chatObj.raceObj.r1Obj.ti = _global.chatObj.raceRoomMC.lookupTeamID(_global.chatObj.raceObj.r1Obj.id);
- _global.chatObj.raceObj.r2Obj.ti = _global.chatObj.raceRoomMC.lookupTeamID(_global.chatObj.raceObj.r2Obj.id);
- _global.chatObj.raceObj.r1Obj.tn = _global.chatObj.raceRoomMC.lookupTeamName(_global.chatObj.raceObj.r1Obj.ti);
- _global.chatObj.raceObj.r2Obj.tn = _global.chatObj.raceRoomMC.lookupTeamName(_global.chatObj.raceObj.r2Obj.ti);
- _global.chatObj.raceObj.r1Obj.sc = _loc4.firstChild.attributes.sc1;
- _global.chatObj.raceObj.r2Obj.sc = _loc4.firstChild.attributes.sc2;
- _global.chatObj.raceObj.timeToRespond = Number(_loc4.firstChild.attributes.t);
- _global.chatObj.raceObj.mb = _loc4.firstChild.attributes.mb;
- classes.Lookup.addCallback("raceGetTwoRacersCars", this, CB_getTwoRacersCars, _global.chatObj.raceObj.r1Obj.cid + "," + _global.chatObj.raceObj.r2Obj.cid);
- _root.raceGetTwoRacersCars(_global.chatObj.raceObj.r1Obj.cid, _global.chatObj.raceObj.r2Obj.cid);
- false;
- } // End of the function
- function chatKOTHLeave()
- {
- getURL("lingo: LEAVEKOTH");
- } // End of the function
- function chatKOTHLeaveCB(aid, isKing)
- {
- var _loc5 = aid == _global.chatObj.raceObj.r1Obj.id || aid == _global.chatObj.raceObj.r2Obj.id;
- var _loc6 = !_global.chatObj.raceObj.inp2 && (classes.GlobalData.id == _global.chatObj.raceObj.r1Obj.id || classes.GlobalData.id == _global.chatObj.raceObj.r2Obj.id);
- if (aid == classes.GlobalData.id)
- {
- _global.chatObj.raceObj.myTimedOut = true;
- _global.chatObj.raceRoomMC.joinPanel.panel.togLineUp.gotoAndStop(1);
- _global.chatObj.raceRoomMC.joinPanel.panel.togLineUp._visible = true;
- classes.Control.setMapButton("race");
- }
- else if (_loc6)
- {
- if (_loc5)
- {
- if (!_global.chatObj.raceObj.stageTS && !_global.chatObj.raceObj.myTimedOut)
- {
- _global.chatObj.raceObj.r1Obj.id = 0;
- _global.chatObj.raceObj.r2Obj.id = 0;
- _root.abc.closeMe();
- var _loc4 = (classes.AlertBox)(_root.attachMovie("alertBox", "abc", _root.getNextHighestDepth()));
- _loc4.setValue("Opponent Chickened Out", "Your opponent chickened out! You retain your position and await the next challenger.", "warningtriangle");
- _loc4.addButton("OK");
- _global.chatObj.raceRoomMC.joinPanel.panel.togLineUp._visible = true;
- } // end if
- } // end if
- } // end else if
- if (isKing)
- {
- _root.abc.closeMe();
- if (!_global.chatObj.raceObj.stageTS || _global.chatObj.raceObj.stageTS && _global.chatObj.raceObj.lastResultsXML)
- {
- _global.chatObj.raceRoomMC.showContainer("raceKingStepsDown");
- } // end if
- }
- else
- {
- _global.chatObj.raceRoomMC.updateQueue(aid, "", true);
- } // end else if
- } // End of the function
- function chatCheerVote(isBoo, aid)
- {
- if (!aid)
- {
- aid = 0;
- } // end if
- getURL("lingo: SENDVOTE " + isBoo + ", " + aid, "");
- } // End of the function
- function chatCheerVoteCB(s)
- {
- switch (s)
- {
- case 1:
- {
- break;
- }
- case 0:
- {
- break;
- }
- case -1:
- {
- break;
- }
- } // End of switch
- } // End of the function
- function chatCheerGetVoteCB(aid, isBoo, iid)
- {
- if (_global.chatObj.raceRoomMC.container.linkName == "racePlay")
- {
- _global.chatObj.raceRoomMC.container.addVote(aid, isBoo, iid);
- } // end if
- } // End of the function
- function chatKOTHKingContinue(bet, bt)
- {
- if (!bet)
- {
- bet = 0;
- } // end if
- if (!bt)
- {
- bt = -1;
- } // end if
- getURL("lingo: KCNT " + bet + ", " + bt, "");
- } // End of the function
- function raceKOTHFinishCB(d)
- {
- if (_global.chatObj.raceObj.isRacer)
- {
- do_raceKOTHFinishCB(d);
- }
- else
- {
- _global.setTimeout(this, "do_raceKOTHFinishCB", 6000, d);
- } // end else if
- } // End of the function
- function do_raceKOTHFinishCB(d)
- {
- var _loc2 = new XML(d);
- _global.chatObj.raceRoomMC.container.crossWire(_loc2.firstChild.attributes.i, _loc2.firstChild.attributes.et, _loc2.firstChild.attributes.ts);
- } // End of the function
- function raceKOTHRTOpponentCB(rt)
- {
- var _loc3 = _global.chatObj.raceRoomMC.container;
- var _loc4;
- if (_loc3.racer1Obj.id == classes.GlobalData.id)
- {
- _loc4 = _loc3.racer2Obj.id;
- }
- else
- {
- _loc4 = _loc3.racer1Obj.id;
- } // end else if
- if (rt == -1)
- {
- _root.raceTreeMovie.setLight(_global.chatObj.raceRoomMC.container.oppLane, "green", false);
- _root.raceTreeMovie.setLight(_global.chatObj.raceRoomMC.container.oppLane, "red", true);
- } // end if
- _loc3.tripWire(_loc4, rt);
- } // End of the function
- function raceKOTHRTCB(r, rt, i)
- {
- if (_global.chatObj.raceObj.isRacer)
- {
- do_raceKOTHRTCB(r, rt, i);
- }
- else
- {
- _global.setTimeout(this, "do_raceKOTHRTCB", 6000, r, rt, i);
- } // end else if
- } // End of the function
- function do_raceKOTHRTCB(r, rt)
- {
- _global.chatObj.raceRoomMC.container.tripWire(_global.chatObj.raceRoomMC.container["racer" + r + "Obj"].id, rt);
- if (rt == -1)
- {
- _root.raceTreeMovie.setLight(r, "green", false);
- _root.raceTreeMovie.setLight(r, "red", true);
- } // end if
- } // End of the function
- function raceKOTHIntOpponentCB(d, v, a, t)
- {
- if (!_global.chatObj.raceRoomMC.container.raceStarted)
- {
- _root.raceTreeMovie.setLight(_global.chatObj.raceRoomMC.container.oppLane, "pre", d > -3 && d < 0);
- _root.raceTreeMovie.setLight(_global.chatObj.raceRoomMC.container.oppLane, "staged", d > -2 && d < 1);
- } // end if
- classes.RacePlay._MC.updateDistance(classes.RacePlay._MC.oppLane, d, classes.RacePlay._MC.raceStarted, v, a, t);
- } // End of the function
- function raceKOTHFoulOpponentCB()
- {
- _root.raceTreeMovie.setLight(_global.chatObj.raceRoomMC.container.oppLane, "green", false);
- _root.raceTreeMovie.setLight(_global.chatObj.raceRoomMC.container.oppLane, "red", true);
- } // End of the function
- function raceKOTHFoulCB(r)
- {
- _root.raceTreeMovie.setLight(r, "green", false);
- _root.raceTreeMovie.setLight(r, "red", true);
- } // End of the function
- function raceKOTHOK(bet)
- {
- if (!bet)
- {
- bet = 0;
- } // end if
- getURL("lingo: KOK " + bet, "");
- } // End of the function
- function raceKOTHOKCB(bet, t)
- {
- if (classes.GlobalData.id == _global.chatObj.raceObj.r1Obj.id || classes.GlobalData.id == _global.chatObj.raceObj.r2Obj.id)
- {
- classes.Control.setMapButton("racing");
- _global.chatObj.raceObj.imRacer = true;
- } // end if
- _global.chatObj.raceObj.bt = Number(bet);
- _global.chatObj.raceObj.stageTS = new Date();
- _global.chatObj.raceObj.timeToStage = t;
- _global.chatObj.raceRoomMC.showContainer();
- } // End of the function
- function raceKOTHReady(s)
- {
- getURL("lingo: KREADY " + s, "");
- } // End of the function
- function raceKOTHReadyOpponentCB()
- {
- } // End of the function
- function raceKOTHReadyCB(s, t, t2)
- {
- if (s == 1)
- {
- classes.RacePlay._MC.onRaceStart();
- } // end if
- } // End of the function
- function raceKOTHNotReadyOpponentCB()
- {
- } // End of the function
- function raceKOTHNotReadyCB(r)
- {
- } // End of the function
- function raceKOTHResultCB(d)
- {
- _global.chatObj.lastResultsTS = new Date();
- _global.chatObj.raceRoomMC.onRaceResults(d);
- } // End of the function
- function raceKOTHTimeoutCB(s)
- {
- switch (s)
- {
- case 1:
- {
- _global.chatObj.raceObj.myTimedOut = true;
- _global.chatObj.raceRoomMC.showTimedOut("You failed to continue in time. You have lost your turn to race. If you wish to race you will have to get back in line.");
- break;
- }
- case 2:
- {
- _global.chatObj.raceRoomMC.showTimedOut("You failed to stage in time. You automatically foul this race.");
- break;
- }
- case 3:
- {
- break;
- }
- case 4:
- {
- _global.chatObj.raceRoomMC.showTimedOut("You failed to continue in time. You automatically lose your position as King.");
- break;
- }
- } // End of switch
- } // End of the function
- function chatQMHJoin(acid)
- {
- getURL("lingo: JOINQMH " + acid, "");
- } // End of the function
- function chatQMHJoinCB(s)
- {
- switch (s)
- {
- case 0:
- {
- break;
- }
- case -1:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected is impounded.");
- break;
- }
- case -2:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected doesn\'t belong to you.");
- break;
- }
- case -50:
- {
- _root.displayAlert("triangle", "Account Locked", "Sorry, you left a race that is still in progress. Your account is temporarily locked until the race is finished. This may take moment.");
- break;
- }
- } // End of switch
- } // End of the function
- function chatQMHRaceCB(d)
- {
- classes.Control.quickmatchMC.matchFound(d);
- } // End of the function
- function chatQMHLeave()
- {
- getURL("lingo: LEAVEQMH");
- } // End of the function
- function chatQMHLeaveCB(s)
- {
- switch (s)
- {
- case 1:
- {
- break;
- }
- case 0:
- {
- break;
- }
- } // End of switch
- } // End of the function
- function chatPRChallengeRequest(aid, eacid, racid, bt, bet)
- {
- getURL("lingo: CHALLENGEREQUEST " + aid + ", " + eacid + ", " + racid + ", " + bt + ", " + bet, "");
- } // End of the function
- function chatPRChallengeRequestCB(s, rid)
- {
- switch (s)
- {
- case 1:
- {
- break;
- }
- case 0:
- {
- break;
- }
- case -1:
- {
- break;
- }
- case -2:
- {
- break;
- }
- } // End of switch
- } // End of the function
- function chatPRCancelRequest(raceID)
- {
- getURL("lingo: CANCELREQUEST " + raceID, "");
- } // End of the function
- function chatPRCancelRequestCB(s, raceID)
- {
- switch (s)
- {
- case 1:
- {
- break;
- }
- case 0:
- {
- break;
- }
- } // End of switch
- } // End of the function
- function chatPRChallengeResponse(a)
- {
- getURL("lingo: CHALLENGERESPONSE " + a, "");
- } // End of the function
- function chatPRChallengeResponseCB()
- {
- } // End of the function
- function raceQMHFinishCB(d)
- {
- var _loc1 = new XML(d);
- classes.RacePlay._MC.crossWire(_loc1.firstChild.attributes.i, _loc1.firstChild.attributes.et, _loc1.firstChild.attributes.ts);
- classes.Chat.enableWindow();
- } // End of the function
- function raceQMHRTOpponentCB(rt)
- {
- var _loc3 = _global.chatObj.raceRoomMC.container;
- var _loc4;
- if (_loc3.racer1Obj.id == classes.GlobalData.id)
- {
- _loc4 = _loc3.racer2Obj.id;
- }
- else
- {
- _loc4 = _loc3.racer1Obj.id;
- } // end else if
- if (rt == -1)
- {
- _root.raceTreeMovie.setLight(_global.chatObj.raceRoomMC.container.oppLane, "green", false);
- _root.raceTreeMovie.setLight(_global.chatObj.raceRoomMC.container.oppLane, "red", true);
- } // end if
- _loc3.tripWire(_loc4, rt);
- } // End of the function
- function raceQMHIntOpponentCB(d, v, a, rpm, g, t)
- {
- if (!_global.chatObj.raceRoomMC.container.raceStarted)
- {
- _root.raceTreeMovie.setLight(_global.chatObj.raceRoomMC.container.oppLane, "pre", d > -3 && d < 0);
- _root.raceTreeMovie.setLight(_global.chatObj.raceRoomMC.container.oppLane, "staged", d > -2 && d < 1);
- } // end if
- _global.chatObj.raceRoomMC.container.updateDistance(_global.chatObj.raceRoomMC.container.oppLane, d, _global.chatObj.raceRoomMC.container.raceStarted, v, a);
- } // End of the function
- function raceQMHReadyCB(s, t, t2)
- {
- if (s == 1)
- {
- classes.RacePlay._MC.onRaceStart();
- } // end if
- } // End of the function
- function raceQMHResultCB(d)
- {
- classes.Control.quickmatchMC.onRaceResults(d);
- } // End of the function
- function raceQMHTimeoutCB(s)
- {
- switch (s)
- {
- case 1:
- {
- break;
- }
- case 2:
- {
- break;
- }
- case 3:
- {
- break;
- }
- case 4:
- {
- break;
- }
- } // End of switch
- } // End of the function
- function chatQMBJoin(acid, bt)
- {
- getURL("lingo: JOINQMB " + acid + ", " + bt, "");
- } // End of the function
- function chatQMBJoinCB(s)
- {
- switch (s)
- {
- case 0:
- {
- break;
- }
- case -1:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected is impounded.");
- break;
- }
- case -2:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected doesn\'t belong to you.");
- break;
- }
- case -50:
- {
- _root.displayAlert("triangle", "Account Locked", "Sorry, you left a race that is still in progress. Your account is temporarily locked until the race is finished. This may take moment.");
- break;
- }
- } // End of switch
- } // End of the function
- function chatQMBRaceCB(d)
- {
- classes.Control.quickmatchMC.matchFound(d);
- } // End of the function
- function chatQMBLeave()
- {
- getURL("lingo: LEAVEQMB");
- } // End of the function
- function chatQMBLeaveCB(s)
- {
- switch (s)
- {
- case 1:
- {
- break;
- }
- case 0:
- {
- break;
- }
- } // End of switch
- } // End of the function
- function chatQMSend(m)
- {
- getURL("lingo: QMSM \"" + escape(m) + "\"", "");
- } // End of the function
- function chatQMSendCB(s)
- {
- switch (s)
- {
- case 0:
- {
- break;
- }
- case -1:
- {
- break;
- }
- } // End of switch
- } // End of the function
- function chatQMReceiveCB(i, u, m)
- {
- classes.Chat.addToHistory(5, u, m);
- } // End of the function
- function chatQMLeave()
- {
- getURL("lingo: QMLR");
- } // End of the function
- function chatQMLeaveCB(s)
- {
- if (s == 1)
- {
- } // end if
- } // End of the function
- function chatQMLeaveOpponentCB(s, i, u)
- {
- if (s == 0)
- {
- } // end if
- } // End of the function
- function chatRIVGet()
- {
- getURL("lingo: GETRIVALS");
- } // End of the function
- function chatRIVListCB(d)
- {
- _global.chatObj.queueXML = new XML(d);
- _global.chatObj.raceRoomMC.checkForData();
- } // End of the function
- function chatRIVRequest(acid, baid, bacid, bt, brt)
- {
- getURL("lingo: RREQ " + acid + ", " + baid + ", " + bacid + ", " + bt + ", " + brt, "");
- } // End of the function
- function chatRIVRequestCB(s, guid)
- {
- switch (s)
- {
- case 1:
- {
- break;
- }
- case -1:
- {
- _root.displayAlert("warning", "Cannot Create New Race", "Sorry, you cannot create a race when you are already in line to race.");
- break;
- }
- case -2:
- {
- _root.displayAlert("warning", "Opponent Not Available", "Sorry, the person you are trying to challenge is already in line to race. You can try again later.");
- break;
- }
- case -3:
- {
- _root.displayAlert("warning", "Opponent Not In Room", "Sorry, the person you are trying to challenge is not currently in the room.");
- break;
- }
- case -4:
- {
- _root.displayAlert("warning", "Opponent Does Not Qualify", "Sorry, the person you are trying to challenge cannot race their only car for pink slips.");
- break;
- }
- case -5:
- {
- _root.displayAlert("warning", "Opponent Does Not Qualify", "Sorry, either you or the person you are challenging cannot race for pink slips because of insufficient garage space.");
- break;
- }
- case -6:
- {
- _root.displayAlert("warning", "Not Enough Funds", "Sorry, either you or the person you are trying to challenge does not have enough funds for the bet.");
- break;
- }
- case -7:
- {
- _root.displayAlert("warning", "Opponent Not In Room", "Sorry, the person you are trying to challenge is not currently in the room.");
- break;
- }
- case -8:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the challengee\'s car is impounded.");
- break;
- }
- case -9:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the challenger\'s car is impounded.");
- break;
- }
- case -10:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected doesn\'t belong to you.");
- break;
- }
- case -11:
- {
- _root.displayAlert("warning", "Invalid Dial In Time", "I\'m sorry, but the dial-in time you entered is not valid.");
- break;
- }
- case -12:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the challengee\'s car is locked.");
- break;
- }
- case -13:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the challenger\'s car is locked.");
- break;
- }
- case -14:
- {
- _root.displayAlert("warning", "Test Drive Car", "I\'m sorry, you cannot race a pink slip race with a test drive car");
- break;
- }
- case -15:
- {
- _root.displayAlert("warning", "Test Drive Car", "I\'m sorry, your opponent\'s car is a test drive car and cannot do a pink slip race with that car.");
- break;
- }
- case -16:
- {
- _root.markTestDriveExpiredAndDisplayWarning();
- break;
- }
- case -17:
- {
- _root.displayAlert("warning", "Test Drive Expired", "I\'m sorry, your opponent\'s car is a test drive car and their test drive has expired.");
- break;
- }
- case -50:
- {
- _root.displayAlert("triangle", "Account\'s Locked", "Sorry, you left a race that is still in progress. Your account is temporarily locked until the race is finished. This may take moment.");
- break;
- }
- case -51:
- {
- _root.displayAlert("triangle", "Opponent\'s Locked", "Sorry, your opponent left a race that is still in progress. His/her account is temporarily locked until the race is finished. This may take moment.");
- break;
- }
- case -60:
- {
- _root.displayAlert("warning", "Account Verification Required", "I\'m sorry, but you need to verify your account to perform this action.");
- break;
- }
- } // End of switch
- } // End of the function
- function chatRIVChallengeCB(d)
- {
- classes.RivalsChallengePanel.addChallenge(d);
- } // End of the function
- function chatRIVResponse(isAccepted, cebt, guid)
- {
- if (!brt1)
- {
- brt1 = -1;
- } // end if
- if (!brt2)
- {
- brt2 = -1;
- } // end if
- getURL("lingo: RRSP " + isAccepted + ", " + cebt + ", \"" + guid + "\"", "");
- } // End of the function
- function chatRIVResponseCB(s, id)
- {
- if (s != -1 && s != -2)
- {
- classes.RivalsChallengePanel.removeChallenge(id);
- } // end if
- switch (s)
- {
- case 1:
- {
- break;
- }
- case -1:
- {
- _root.displayAlert("warning", "Cannot Accept New Race", "Sorry, you cannot accept a new challenge when you are already in line to race.");
- break;
- }
- case -2:
- {
- _root.displayAlert("warning", "Opponent Not Available", "Sorry, the challenger is already in line to race. You can try again later.");
- break;
- }
- case -3:
- {
- _root.displayAlert("warning", "Opponent Not In Room", "Sorry, the challenger is no longer in the room.");
- break;
- }
- case -4:
- {
- _root.displayAlert("warning", "Does Not Qualify", "Sorry, either you or the challenger only has one car so cannot race for pink slips.");
- break;
- }
- case -5:
- {
- _root.displayAlert("warning", "Does Not Qualify", "Sorry, either you or the challenger cannot race for pink slips because of insufficient garage space. When racing for pinks, both racers need at least one open garage space so that there is rooom for a won car.");
- break;
- }
- case -6:
- {
- _root.displayAlert("warning", "Not Enough Funds", "Sorry, either you or the challenger does not have enough funds for this bet.");
- break;
- }
- case -7:
- {
- _root.displayAlert("warning", "Opponent Not In Room", "Sorry, the person you are trying to challenge is not currently in the room.");
- break;
- }
- case -8:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the challengee\'s car is impounded.");
- break;
- }
- case -9:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the challenger\'s car is impounded.");
- break;
- }
- case -10:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected doesn\'t belong to you.");
- break;
- }
- case -11:
- {
- _root.displayAlert("warning", "Invalid Dial In Time", "I\'m sorry, but the dial-in time you entered is not valid.");
- break;
- }
- case -12:
- {
- _root.displayAlert("warning", "Error", "Sorry, some error occured which made this challenge impossible.");
- break;
- }
- case -13:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the challengee\'s car is locked.");
- break;
- }
- case -14:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the challenger\'s car is locked.");
- break;
- }
- case -50:
- {
- _root.displayAlert("triangle", "Account Locked", "Sorry, you left a race that is still in progress. Your account is temporarily locked until the race is finished. This may take moment.");
- break;
- }
- case -51:
- {
- _root.displayAlert("triangle", "Opponent\'s Locked", "Sorry, your opponent left a race that is still in progress. His/her account is temporarily locked until the race is finished. This may take moment.");
- break;
- }
- case -60:
- {
- _root.displayAlert("warning", "Account Verification Required", "I\'m sorry, but you need to verify your account to perform this action.");
- break;
- }
- default:
- {
- _root.displayAlert("warning", "Error", "Sorry, some error occured which made this challenge impossible.");
- }
- } // End of switch
- } // End of the function
- function chatRIVDeniedCB(guid)
- {
- } // End of the function
- function chatRIVJoinCB(d)
- {
- var _loc3 = new XML(d);
- var _loc4 = false;
- for (var _loc2 = 0; _loc2 < _global.chatObj.queueXML.firstChild.childNodes.length; ++_loc2)
- {
- if (_global.chatObj.queueXML.firstChild.childNodes[_loc2].attributes.icid == _loc3.firstChild.firstChild.attributes.icid && _global.chatObj.queueXML.firstChild.childNodes[_loc2].attributes.cicid == _loc3.firstChild.firstChild.attributes.cicid)
- {
- _loc4 = true;
- } // end if
- } // end of for
- if (!_loc4)
- {
- _global.chatObj.queueXML.firstChild.appendChild(_loc3.firstChild.firstChild);
- _global.chatObj.raceRoomMC.drawQueue();
- } // end if
- false;
- } // End of the function
- function chatRIVNRaceCB(d)
- {
- function CB_getTwoRacersCars(pxml)
- {
- var _loc3 = 10000;
- var _loc2;
- if (_global.chatObj.lastResultsTS)
- {
- _loc2 = new Date() - _global.chatObj.lastResultsTS;
- }
- else
- {
- _loc2 = _loc3;
- } // end else if
- if (_loc2 < _loc3)
- {
- _global.setTimeout(nextRace, _loc3 - _loc2, pxml);
- }
- else
- {
- nextRace(pxml);
- } // end else if
- } // End of the function
- function nextRace(pxml)
- {
- _global.chatObj.twoRacersCarsXML = pxml;
- _global.chatObj.raceObj = _global.chatObj.newRaceObj;
- if (classes.GlobalData.id == _global.chatObj.raceObj.r1Obj.id)
- {
- classes.GlobalData.setMyRaceCarNode(_global.chatObj.raceObj.r1Obj.cid);
- _global.setTimeout(showChal2, 2000);
- }
- else if (classes.GlobalData.id == _global.chatObj.raceObj.r2Obj.id)
- {
- classes.GlobalData.setMyRaceCarNode(_global.chatObj.raceObj.r2Obj.cid);
- _global.setTimeout(showChal2, 2000);
- } // end else if
- } // End of the function
- function showChal2()
- {
- _global.chatObj.raceRoomMC.showChallengerNew2();
- } // End of the function
- var _loc4 = new XML(d);
- var _loc5 = _loc4.firstChild.attributes;
- _global.chatObj.newRaceTS = new Date();
- var _loc6 = 0;
- var _loc7 = false;
- if (classes.GlobalData.id == _loc5.r1id)
- {
- _loc6 = _loc5.r1cid;
- _loc7 = true;
- }
- else if (classes.GlobalData.id == _loc5.r2id)
- {
- _loc6 = _loc5.r2cid;
- _loc7 = true;
- } // end else if
- _global.chatObj.raceRoomMC.removeQueueNode(_loc5.r1cid, _loc5.r2cid);
- _global.chatObj.raceRoomMC.drawQueue();
- classes.RivalsChallengePanel.removeChallenge(_loc5.r1cid + "_" + _loc5.r2cid);
- if (_loc6)
- {
- getURL("lingo: executeCall \"getonecarengine\", \"acid=" + _loc6 + "\"", "");
- } // end if
- _global.chatObj.newRaceObj = new Object();
- _global.chatObj.newRaceObj.isRacer = _loc7;
- _global.chatObj.newRaceObj.timeToRespond = Number(_loc5.t);
- _global.chatObj.newRaceObj.r1Obj = new Object();
- _global.chatObj.newRaceObj.r2Obj = new Object();
- _global.chatObj.newRaceObj.r1Obj.id = _loc4.firstChild.attributes.r1id;
- _global.chatObj.newRaceObj.r1Obj.cid = _loc4.firstChild.attributes.r1cid;
- _global.chatObj.newRaceObj.r2Obj.id = _loc4.firstChild.attributes.r2id;
- _global.chatObj.newRaceObj.r2Obj.cid = _loc4.firstChild.attributes.r2cid;
- _global.chatObj.newRaceObj.r1Obj.bt = _loc4.firstChild.attributes.b1;
- _global.chatObj.newRaceObj.r2Obj.bt = _loc4.firstChild.attributes.b2;
- _global.chatObj.newRaceObj.r1Obj.un = _global.chatObj.raceRoomMC.lookupUserName(_global.chatObj.newRaceObj.r1Obj.id);
- _global.chatObj.newRaceObj.r2Obj.un = _global.chatObj.raceRoomMC.lookupUserName(_global.chatObj.newRaceObj.r2Obj.id);
- _global.chatObj.newRaceObj.r1Obj.ti = _global.chatObj.raceRoomMC.lookupTeamID(_global.chatObj.newRaceObj.r1Obj.id);
- _global.chatObj.newRaceObj.r2Obj.ti = _global.chatObj.raceRoomMC.lookupTeamID(_global.chatObj.newRaceObj.r2Obj.id);
- _global.chatObj.newRaceObj.r1Obj.tn = _global.chatObj.raceRoomMC.lookupTeamName(_global.chatObj.newRaceObj.r1Obj.ti);
- _global.chatObj.newRaceObj.r2Obj.tn = _global.chatObj.raceRoomMC.lookupTeamName(_global.chatObj.newRaceObj.r2Obj.ti);
- _global.chatObj.newRaceObj.r1Obj.sc = _loc4.firstChild.attributes.sc1;
- _global.chatObj.newRaceObj.r2Obj.sc = _loc4.firstChild.attributes.sc2;
- _global.chatObj.newRaceObj.bt = _loc4.firstChild.attributes.bt;
- _global.chatObj.newRaceObj.t = _loc4.firstChild.attributes.t;
- classes.Lookup.addCallback("raceGetTwoRacersCars", this, CB_getTwoRacersCars, _global.chatObj.newRaceObj.r1Obj.cid + "," + _global.chatObj.newRaceObj.r2Obj.cid);
- _root.raceGetTwoRacersCars(_global.chatObj.newRaceObj.r1Obj.cid, _global.chatObj.newRaceObj.r2Obj.cid);
- false;
- } // End of the function
- function chatRIVLeave()
- {
- getURL("lingo: RLVE");
- } // End of the function
- function chatRIVLeaveCB(s)
- {
- } // End of the function
- function chatRIVLeftCB(d)
- {
- var _loc3 = new XML(d);
- if (classes.GlobalData.attr.dc == _loc3.firstChild.attributes.icid || classes.GlobalData.attr.dc == _loc3.firstChild.attributes.cicid)
- {
- if (!_global.chatObj.raceObj.stageTS)
- {
- _root.abc.closeMe();
- var _loc4 = (classes.AlertBox)(_root.attachMovie("alertBox", "abc", _root.getNextHighestDepth()));
- _loc4.setValue("Race Canceled", "Your race was canceled because you or your opponent chickened out.", "warningtriangle");
- _loc4.addButton("OK");
- } // end if
- } // end if
- _global.chatObj.raceRoomMC.updateQueue(d, true);
- } // End of the function
- function raceRIVFinishCB(d)
- {
- if (_global.chatObj.raceObj.isRacer)
- {
- do_raceRIVFinishCB(d);
- }
- else
- {
- _global.setTimeout(this, "do_raceRIVFinishCB", 6000, d);
- } // end else if
- } // End of the function
- function do_raceRIVFinishCB(d)
- {
- var _loc2 = new XML(d);
- classes.Race._MC.crossWire(Number(_loc2.firstChild.attributes.i), Number(_loc2.firstChild.attributes.et), Number(_loc2.firstChild.attributes.ts));
- classes.Chat.enableWindow();
- _global.chatObj.raceRoomMC.optimizeBottom(true);
- } // End of the function
- function raceRIVRTOpponentCB(rt)
- {
- var _loc1 = classes.RacePlay._MC;
- var _loc2;
- if (_loc1.racer1Obj.id == classes.GlobalData.id)
- {
- _loc2 = _loc1.racer2Obj.id;
- }
- else
- {
- _loc2 = _loc1.racer1Obj.id;
- } // end else if
- if (rt == -1)
- {
- _loc1.setLight(_loc1.oppLane, "green", false);
- _loc1.setLight(_loc1.oppLane, "red", true);
- } // end if
- _loc1.tripWire(_loc2, rt);
- } // End of the function
- function raceRIVRTCB(r, rt, i)
- {
- if (_global.chatObj.challengeXML.firstChild.attributes.isRacer == 1 || _global.chatObj.raceObj.isRacer)
- {
- do_raceRIVRTCB(r, rt, i);
- }
- else
- {
- _global.setTimeout(this, "do_raceRIVRTCB", 6000, r, rt, i);
- } // end else if
- } // End of the function
- function do_raceRIVRTCB(r, rt, i)
- {
- if (classes.Race._MC["racer" + r + "Obj"].id == i)
- {
- classes.Race._MC.tripWire(classes.Race._MC["racer" + r + "Obj"].id, rt);
- if (rt == -1)
- {
- classes.Race._MC.tree.setLight(r, "green", false);
- classes.Race._MC.tree.setLight(r, "red", true);
- classes.Race._MC.tree.syncAllForLane(r);
- } // end if
- } // end if
- } // End of the function
- function raceRIVIntOpponentCB(d, v, a, t)
- {
- if (!classes.RacePlay._MC.raceStarted)
- {
- classes.RacePlay._MC.tree.setLight(classes.RacePlay._MC.oppLane, "pre", d > -3 && d < 0);
- classes.RacePlay._MC.tree.setLight(classes.RacePlay._MC.oppLane, "staged", d > -2 && d < 1);
- } // end if
- classes.RacePlay._MC.updateDistance(classes.RacePlay._MC.oppLane, d, classes.RacePlay._MC.raceStarted, v, a, t);
- } // End of the function
- function raceRIVIntCB(r, d, v, a, rpm, g)
- {
- if (!classes.Race._MC.raceStarted)
- {
- classes.Race._MC.tree.setLight(r, "pre", d > -3 && d < 0);
- classes.Race._MC.tree.setLight(r, "staged", d > -2 && d < 1);
- } // end if
- classes.Race._MC.spectatorRender(r, d, classes.Race._MC.raceStarted, v, a);
- } // End of the function
- function raceRIVOK()
- {
- getURL("lingo: RIVOK");
- } // End of the function
- function raceRIVOKCB(t)
- {
- _global.chatObj.raceObj.stageTS = new Date();
- _global.chatObj.raceObj.timeToStage = t;
- _global.chatObj.raceRoomMC.showContainer();
- } // End of the function
- function raceRIVReadyOpponentCB()
- {
- } // End of the function
- function raceRIVReadyCB(s, t, t2)
- {
- if (s == 1)
- {
- classes.RacePlay._MC.onRaceStart();
- } // end if
- } // End of the function
- function raceRIVResultCB(d)
- {
- _global.chatObj.lastResultsTS = new Date();
- _global.chatObj.raceRoomMC.onRaceResults(d);
- } // End of the function
- function raceRIVTimeoutCB(s)
- {
- switch (s)
- {
- case 1:
- {
- break;
- }
- case 2:
- {
- break;
- }
- case 3:
- {
- break;
- }
- } // End of switch
- } // End of the function
- function teamRoleCB(d, mbp)
- {
- classes.GlobalData.attr.tr = d;
- if (d == 0)
- {
- delete _global.teamXML;
- classes.GlobalData.attr.ti = 0;
- if (classes.Frame._MC.sectionHolder.sectionClip.objectName == "sectionTeamHQ")
- {
- classes.Frame._MC.createMap();
- classes.Control.setMapButton();
- } // end if
- _root.displayAlert("success", "Off the Team", "You have been removed from the team. You will no longer be able to view this team\'s details in the Team HQ.");
- }
- else if (d > 0)
- {
- if (classes.Frame.__MC.sectionHolder.sectionClip.objectName == "sectionTeamHQ")
- {
- classes.Control.dialogTextBrief("Team Role Updated", "Note, your team role has just been changed by a team leader.", "warningtriangle");
- classes.Frame._MC.goMainSection("teamhq");
- } // end if
- } // end else if
- } // End of the function
- function teamKick(aidtk)
- {
- _global.teamKickID = aidtk;
- getURL("lingo: TEAMKICK " + aidtk, "");
- } // End of the function
- function teamKickCB(s)
- {
- switch (s)
- {
- case 1:
- {
- break;
- }
- case 0:
- {
- _root.displayAlert("warning", "You can\'t Kick Yourself Out", "You can\'t kick yourself out of the team. You can leave the team by clicking on Quit Team.");
- break;
- }
- case -1:
- {
- _root.displayAlert("warning", "Not a Leader", "I\'m sorry, only team leader can kick this member out the team.");
- break;
- }
- case -2:
- {
- _root.displayAlert("warning", "Member Not Found", "The member you tried to kick out is no longer on your team.");
- break;
- }
- case -3:
- {
- _root.displayAlert("warning", "Not a Leader/Co-leader", "I\'m sorry, only team leader/co-leader can kick someone out the team.");
- break;
- }
- case -60:
- {
- _root.displayAlert("warning", "Team is Locked", "The team is locked because it\'s currently in a team race. Please try again later.");
- break;
- }
- } // End of switch
- classes.Lookup.runCallback("teamKick", "", s);
- } // End of the function
- function teamChangeRole(aidta, roleID, maxBet)
- {
- _global.teamAppointID = aidta;
- _global.teamAppointRoleID = roleID;
- if (!maxBet)
- {
- maxBet = 0;
- } // end if
- _global.teamAppointMaxBet = maxBet;
- getURL("lingo: TEAMCHANGEROLE " + aidta + "," + roleID + "," + maxBet, "");
- } // End of the function
- function teamChangeRoleCB(s)
- {
- switch (s)
- {
- case 1:
- {
- break;
- }
- case 0:
- {
- _root.displayAlert("warning", "Access Denied", "You can\'t change someone\'s role if you\'re not a leader or a co-leader of the team.");
- break;
- }
- case -1:
- {
- _root.displayAlert("warning", "Member Not Found", "The member you tried to appoint is no longer on your team.");
- break;
- }
- case -2:
- {
- _root.displayAlert("warning", "Access Denied", "You can\'t appoint a leader of the team.");
- break;
- }
- case -3:
- {
- _root.displayAlert("warning", "Access Denied", "You can\'t appoint a co-leader of the team.");
- break;
- }
- case -4:
- {
- _root.displayAlert("warning", "Wrong Bet Amount", "You must enter a value between 0 and 100 for maximum bet percentage.");
- break;
- }
- } // End of switch
- if (s == 1)
- {
- var _loc4 = _global.teamXML.firstChild.firstChild;
- for (var _loc3 = 0; _loc3 < _loc4.childNodes.length; ++_loc3)
- {
- if (_loc4.childNodes[_loc3].attributes.i == _global.teamAppointID)
- {
- _loc4.childNodes[_loc3].attributes.tr = _global.teamAppointRoleID;
- _loc4.childNodes[_loc3].attributes.mbp = _global.teamAppointMaxBet;
- classes.SectionTeamHQ._MC.goPage(2);
- delete _global.teamAppointID;
- delete _global.teamAppointRoleID;
- delete _global.teamAppointMaxBet;
- break;
- } // end if
- } // end of for
- } // end if
- } // End of the function
- function teamUpdateDealerMaxBet(aidta, maxBet)
- {
- getURL("lingo: TEAMUPDATEMAXBET " + aidta + "," + maxBet, "");
- } // End of the function
- function teamUpdateDealerMaxBetCB(s)
- {
- switch (s)
- {
- case 1:
- {
- break;
- }
- case 0:
- {
- _root.displayAlert("warning", "Access Denied", "You can\'t change someone\'s maximum bet if you\'re not a leader or a co-leader of the team.");
- break;
- }
- case -1:
- {
- _root.displayAlert("warning", "Member Not Found", "The member is no longer on your team.");
- break;
- }
- case -2:
- {
- _root.displayAlert("warning", "Access Denied", "You can only set the maximum bet to a dealer of the team.");
- break;
- }
- case -3:
- {
- _root.displayAlert("warning", "Wrong Bet Amount", "You must enter a value between 0 and 100 for maximum bet percentage.");
- break;
- }
- } // End of switch
- classes.Lookup.runCallback("teamAppointDealer", "", s);
- } // End of the function
- function teamDeposit(amount)
- {
- classes.SectionTeamHQ.depositObj.amount = amount;
- getURL("lingo: TEAMDEPOSIT " + amount, "");
- } // End of the function
- function teamDepositCB(s)
- {
- switch (s)
- {
- case 1:
- {
- classes.Lookup.runCallback("teamDeposit", "", 1);
- break;
- }
- case 0:
- {
- _root.displayAlert("warning", "Not on the Team", "You are no longer on the team you tried to deposit the money to.");
- classes.Lookup.clearCallback("teamDeposit", "");
- break;
- }
- case -1:
- {
- _root.displayAlert("warning", "Insufficient Funds", "I\'m sorry, you can\'t deposit more than what you have.");
- classes.Lookup.clearCallback("teamDeposit", "");
- break;
- }
- case -2:
- {
- _root.displayAlert("warning", "Amount too Large", "I\'m sorry, you can\'t deposit that much money at once.");
- classes.Lookup.clearCallback("teamDeposit", "");
- break;
- }
- case -50:
- {
- _root.displayAlert("triangle", "Account Locked", "Sorry, you left a race that is still in progress. Your account is temporarily locked until the race is finished. This may take moment.");
- classes.Lookup.clearCallback("teamDeposit", "");
- break;
- }
- case -60:
- {
- _root.displayAlert("warning", "Team is Locked", "The team is locked because it\'s currently in a team race. Please try again later.");
- classes.Lookup.clearCallback("teamDeposit", "");
- break;
- }
- case -70:
- {
- _root.displayAlert("warning", "Account Verification Required", "I\'m sorry, but you need to verify your account to perform this action.");
- classes.Lookup.clearCallback("teamDeposit", "");
- break;
- }
- } // End of switch
- } // End of the function
- function teamWithdrawal(amount)
- {
- classes.SectionTeamHQ.withdrawalObj.amount = amount;
- getURL("lingo: TEAMWITHDRAW " + amount, "");
- } // End of the function
- function teamWithdrawalCB(s)
- {
- switch (s)
- {
- case 1:
- {
- if (s == 1)
- {
- var _loc4 = classes.SectionTeamHQ.withdrawalObj.amount + Number(_global.loginXML.firstChild.firstChild.attributes.m);
- classes.GlobalData.updateInfo("m", _loc4);
- _global.teamXML.firstChild.firstChild.attributes.tf = Number(_global.teamXML.firstChild.firstChild.attributes.tf) - classes.SectionTeamHQ.withdrawalObj.amount;
- classes.SectionTeamHQ._MC.setFundsField(_global.teamXML.firstChild.firstChild.attributes.tf);
- classes.SectionTeamHQ._MC.selfNode.attributes.fu = Number(classes.SectionTeamHQ._MC.selfNode.attributes.fu) - classes.SectionTeamHQ.withdrawalObj.amount;
- var _loc3 = Math.round(10000 * classes.SectionTeamHQ._MC.selfNode.attributes.fu / _global.teamXML.firstChild.firstChild.attributes.tf) / 100;
- if (!_loc3 || _loc3 < 0 || _loc3 == Infinity)
- {
- _loc3 = 0;
- } // end if
- classes.SectionTeamHQ._MC.selfNode.attributes.po = _loc3;
- classes.SectionTeamHQ._MC.goPage(4);
- _root.displayAlert("funds", "Withdrawal Succeeded", "You have successfully withdrawn $" + classes.SectionTeamHQ.withdrawalObj.amount + " from the team.\r\rYour personal funds balance is now $" + _loc4 + ".");
- }
- else
- {
- _root.displayAlert("warning", "Withdrawal Failed", "Sorry, for some reason your withdrawal did not go through. Please try again later.");
- } // end else if
- classes.SectionTeamHQ.withdrawalObj.amount = 0;
- break;
- }
- case 0:
- {
- _root.displayAlert("warning", "Not in the Team", "You are no longer on the team you tried to withdraw the money from.");
- break;
- }
- case -1:
- {
- _root.displayAlert("warning", "Excessive Amount", "I\'m sorry, but you tried to take more than you can withdraw.");
- break;
- }
- case -3:
- {
- _root.displayAlert("warning", "Amount too Large", "I\'m sorry, you can\'t withdrawal that much money at once.");
- break;
- }
- case -50:
- {
- _root.displayAlert("triangle", "Account Locked", "Sorry, you left a race that is still in progress. Your account is temporarily locked until the race is finished. This may take moment.");
- break;
- }
- case -60:
- {
- _root.displayAlert("warning", "Team is Locked", "The team is locked because it\'s currently in a team race. Please try again later.");
- break;
- }
- } // End of switch
- } // End of the function
- function teamQuit()
- {
- getURL("lingo: TEAMQUIT");
- } // End of the function
- function teamQuitCB(s)
- {
- switch (s)
- {
- case 0:
- {
- break;
- }
- case -50:
- {
- _root.displayAlert("triangle", "Account Locked", "Sorry, you left a race that is still in progress. Your account is temporarily locked until the race is finished. This may take moment.");
- break;
- }
- case -60:
- {
- _root.displayAlert("warning", "Team is Locked", "The team is locked because it\'s currently in a team race. You can quit once that race is completed.");
- break;
- }
- } // End of switch
- } // End of the function
- function teamAccept(tid)
- {
- _global.teamToJoin = tid;
- getURL("lingo: TEAMACCEPT " + tid, "");
- } // End of the function
- function teamAcceptCB(s)
- {
- switch (s)
- {
- case 1:
- {
- _global.loginXML.firstChild.firstChild.attributes.ti = _global.teamToJoin;
- _global.loginXML.firstChild.firstChild.attributes.tr = 3;
- delete _global.teamToJoin;
- classes.Control.goSection("teamhq");
- break;
- }
- case 0:
- {
- _root.displayAlert("warning", "Invalid Applicant", "I\'m sorry, but the applicant is no longer available.");
- break;
- }
- case -1:
- {
- _root.displayAlert("warning", "Invalid Command", "I\'m sorry, but you can\'t accept a denied / pending application.");
- break;
- }
- case -2:
- {
- _root.displayAlert("warning", "Problem with Application", "I\'m sorry, there\'s a problem with the application. Please try again later.");
- break;
- }
- } // End of switch
- } // End of the function
- function teamDisperse(amount, aidTo)
- {
- classes.SectionTeamHQ.disburseObj.amount = amount;
- classes.SectionTeamHQ.disburseObj.toid = aidTo;
- getURL("lingo: TEAMDISPERSE " + amount + ", " + aidTo, "");
- } // End of the function
- function teamDisperseCB(s)
- {
- switch (s)
- {
- case 1:
- {
- if (s == 1)
- {
- var _loc5 = Number(_global.teamXML.firstChild.firstChild.attributes.tf) - classes.SectionTeamHQ.disburseObj.amount;
- _global.teamXML.firstChild.firstChild.attributes.tf = _loc5;
- classes.SectionTeamHQ._MC.setFundsField(_global.teamXML.firstChild.firstChild.attributes.tf);
- for (var _loc3 = 0; _loc3 < _global.teamXML.firstChild.firstChild.childNodes.length; ++_loc3)
- {
- if (_global.teamXML.firstChild.firstChild.childNodes[_loc3].attributes.i == classes.SectionTeamHQ.disburseObj.toid)
- {
- _global.teamXML.firstChild.firstChild.childNodes[_loc3].attributes.fu = Number(_global.teamXML.firstChild.firstChild.childNodes[_loc3].attributes.fu) - classes.SectionTeamHQ.disburseObj.amount;
- var _loc4 = Math.round(10000 * _global.teamXML.firstChild.firstChild.childNodes[_loc3].attributes.fu / _global.teamXML.firstChild.firstChild.attributes.tf) / 100;
- if (!_loc4 || _loc4 < 0 || _loc4 == Infinity)
- {
- _loc4 = 0;
- } // end if
- _global.teamXML.firstChild.firstChild.childNodes[_loc3].attributes.po = _loc4;
- break;
- } // end if
- } // end of for
- classes.SectionTeamHQ._MC.goPage(4);
- _root.displayAlert("funds", "Disbursement Succeeded", "The disbursement was successfully processed. The team funds balance is now $" + _loc5 + ".");
- }
- else
- {
- _root.displayAlert("warning", "Disbursement Failed", "Sorry, for some reason the disbursement failed. Please try again later.");
- } // end else if
- classes.SectionTeamHQ.disburseObj.amount = 0;
- break;
- }
- case 0:
- {
- _root.displayAlert("warning", "Access Denied", "I\'m sorry, but only a team leader can disperse funds.");
- break;
- }
- case -1:
- {
- _root.displayAlert("warning", "Insufficient Fund", "I\'m sorry, but the team doesn\'t have that much money.");
- break;
- }
- case -3:
- {
- _root.displayAlert("warning", "Amount too Large", "I\'m sorry, you can\'t disperse that much money at once.");
- break;
- }
- case -50:
- {
- _root.displayAlert("triangle", "Account Locked", "Sorry, you left a race that is still in progress. Your account is temporarily locked until the race is finished. This may take moment.");
- break;
- }
- case -51:
- {
- _root.displayAlert("triangle", "Account Locked", "Sorry, the account you\'re disbursing the money to is temporarily locked until the race is finished. This may take moment.");
- break;
- }
- case -60:
- {
- _root.displayAlert("warning", "Team is Locked", "The team is locked because it\'s currently in a team race. Please try again later.");
- break;
- }
- } // End of switch
- } // End of the function
- function teamCreate(n)
- {
- getURL("lingo: TEAMCREATE \"" + escape(n) + "\"", "");
- } // End of the function
- function teamCreateCB(s, tid)
- {
- switch (s)
- {
- case 1:
- {
- classes.GlobalData.updateInfo("ti", tid);
- classes.GlobalData.updateInfo("tr", 1);
- break;
- }
- case 0:
- {
- _root.displayAlert("warning", "Invalid Name", "I\'m sorry, but the team name you tried to create contained invalid words.");
- break;
- }
- case -1:
- {
- _root.displayAlert("warning", "Already on the Team", "You\'re already on the team you wanted to create.");
- break;
- }
- case -2:
- {
- _root.displayAlert("warning", "Team Name Taken", "I\'m sorry, but the team name already exists.");
- break;
- }
- case -60:
- {
- _root.displayAlert("warning", "Account Verification Required", "I\'m sorry, but you need to verify your account to perform this action.");
- break;
- }
- } // End of switch
- classes.Lookup.runCallback("teamCreate", "", s);
- } // End of the function
- function teamStepDown()
- {
- getURL("lingo: TEAMSTEPDOWN");
- } // End of the function
- function teamStepDownCB(s)
- {
- switch (s)
- {
- case 1:
- {
- break;
- }
- case 0:
- {
- _root.displayAlert("warning", "Access Denied", "I\'m sorry, but only a team leader can step down.");
- break;
- }
- case -1:
- {
- _root.displayAlert("warning", "Access Denied", "I\'m sorry, but there\'s no one who can replace you if you step down.");
- break;
- }
- case -50:
- {
- _root.displayAlert("triangle", "Account Locked", "Sorry, you left a race that is still in progress. Your account is temporarily locked until the race is finished. This may take moment.");
- break;
- }
- } // End of switch
- classes.Lookup.runCallback("teamStepDown", "", s);
- } // End of the function
- function addMoneyCB(c)
- {
- classes.GlobalData.updateInfo("m", c + Number(classes.GlobalData.attr.m));
- } // End of the function
- function teamRivalsGetRacers()
- {
- getURL("lingo: TRGETRACERS");
- } // End of the function
- function teamRivalsGetRacersCB(d)
- {
- _global.chatObj.queueXML = new XML(d);
- _global.chatObj.raceRoomMC.checkForData();
- } // End of the function
- function teamRivalsGetTeams()
- {
- getURL("lingo: TRGETTEAMS");
- } // End of the function
- function teamRivalsGetTeamsCB(d)
- {
- if (_root.createTeamChallengePanel._currentframe != 1)
- {
- _root.createTeamChallengePanel.teamListXML = new XML(d);
- _root.createTeamChallengePanel.gotoAndPlay("team");
- } // end if
- } // End of the function
- function teamRivalsPreRequest(challengeeTeamID)
- {
- getURL("lingo: TRPREREQUEST " + challengeeTeamID, "");
- } // End of the function
- function teamRivalsPreRequestCB(s, d)
- {
- if (s == 0)
- {
- }
- else if (s == 1)
- {
- } // end else if
- } // End of the function
- function teamRivalsRequest(challengeeTeamID, challengerAccountIDs, challengeeAccountIDs, challengerAccountCarIDs, challengeeAccountCarIDs, betAmount, isHeadsUp, isRanked)
- {
- getURL("lingo: TRREQUEST " + challengeeTeamID + ", \"" + challengerAccountIDs + "\", \"" + challengeeAccountIDs + "\", \"" + challengerAccountCarIDs + "\", \"" + challengeeAccountCarIDs + "\", " + betAmount + ", " + isHeadsUp + ", " + isRanked, "");
- } // End of the function
- function teamRivalsRequestCB(s, d)
- {
- if (s == 0)
- {
- if (!_root.createTeamChallengePanel.hidden)
- {
- _root.createTeamChallengePanel.gotoAndPlay("matches");
- } // end if
- var _loc4 = new XML(d);
- var _loc3 = _loc4.firstChild.attributes.e;
- _root.displayAlert("warning", "Team Challenge Error", _loc3);
- }
- else if (s == 1)
- {
- if (!_root.createTeamChallengePanel.hidden)
- {
- _root.createTeamChallengePanel.gotoAndPlay("hide");
- } // end if
- } // end else if
- } // End of the function
- function teamRivalsIncomingChallengeCB(sx)
- {
- classes.TeamRivalsChallengePanel.addChallenge(sx);
- } // End of the function
- function teamRivalsResponse(raceGUID, accept)
- {
- getURL("lingo: TRRESPONSE \"" + raceGUID + "\", " + accept, "");
- } // End of the function
- function teamRivalsResponseCB(s, raceGUID, msg)
- {
- if (s == 0)
- {
- _root.displayAlert("warning", "Team Challenge Failed", msg);
- }
- else if (s == -1)
- {
- classes.TeamRivalsChallengePanel.removeChallenge(raceGUID);
- _root.displayAlert("warning", "Team Challenge Failed", msg);
- }
- else if (s == 1)
- {
- classes.TeamRivalsChallengePanel.removeChallenge(raceGUID);
- } // end else if
- } // End of the function
- function teamRivalsDenyCB(raceGUID)
- {
- } // End of the function
- function teamRivalsNewQueueCB(sx)
- {
- _global.chatObj.raceRoomMC.updateQueue(sx);
- } // End of the function
- function teamRivalsNewRaceCB(sx, t)
- {
- _global.chatObj.newRaceTS = new Date();
- _global.chatObj.newRaceObj = new Object();
- _global.chatObj.newRaceObj.isRacer = false;
- _global.chatObj.challengeXML = new XML(sx);
- _global.chatObj.challengeXML.firstChild.attributes.isRacer = 0;
- _global.chatObj.raceRoomMC.updateQueue(sx, 1);
- var _loc3 = _global.chatObj.challengeXML.firstChild.attributes.h == 0 ? (true) : (false);
- _global.chatObj.raceRoomMC.showContainer("teamRivAnnounce", {isRacer: false, isBracket: _loc3});
- } // End of the function
- function teamRivalsYourRaceCB(sx, t)
- {
- _global.chatObj.newRaceTS = new Date();
- _global.chatObj.newRaceObj = new Object();
- _global.chatObj.newRaceObj.isRacer = true;
- _global.chatObj.newRaceObj.timeToRespond = t;
- _global.chatObj.challengeXML = new XML(sx);
- _global.chatObj.challengeXML.firstChild.attributes.isRacer = 1;
- _global.chatObj.raceRoomMC.updateQueue(sx, 1);
- var _loc3 = _global.chatObj.challengeXML.firstChild.attributes.h == 0 ? (true) : (false);
- _global.chatObj.raceRoomMC.showContainer("teamRivAnnounce", {isRacer: true, isBracket: _loc3});
- } // End of the function
- function teamRivalsOK(bracketTime)
- {
- _root.abc.contentMC.txtDialError = "";
- if (!bracketTime)
- {
- bracketTime = 0;
- } // end if
- getURL("lingo: TROK " + bracketTime, "");
- } // End of the function
- function teamRivalsWrongBracketCB()
- {
- if (_root.abc.contentName == "dialogRivalNewContent")
- {
- _root.abc.contentMC.txtDialError = "Dial-in not valid.";
- _root.abc.contentMC.btnStage.enabled = true;
- _root.abc.contentMC.btnChicken.enabled = true;
- } // end if
- } // End of the function
- function teamRivalsOKCB(d)
- {
- var _loc4 = new XML(d);
- if (classes.GlobalData.id == _loc4.firstChild.attributes.i && _root.abc.contentName == "dialogRivalNewContent")
- {
- _root.abc.closeMe();
- } // end if
- _global.chatObj.raceRoomMC.setRacerOK(d);
- } // End of the function
- function teamRivalsTimeoutCB()
- {
- if (_global.chatObj.raceRoomMC.container.isRacer)
- {
- _global.chatObj.raceRoomMC.showTimedOut();
- } // end if
- _global.chatObj.raceRoomMC.showWaiting();
- } // End of the function
- function teamRivalsNRaceCB(d)
- {
- var _loc3 = new Date();
- if (_global.chatObj.raceRoomMC.container.isTeamRivAnnounce)
- {
- _global.chatObj.raceRoomMC.container.gotoAndPlay("announce");
- } // end if
- _global.setTimeout(this, "go_teamRivalsNRaceCB", 9000, d, _loc3);
- } // End of the function
- function go_teamRivalsNRaceCB(d, stageTS)
- {
- classes.RacePlay._MC.tree.clearTimer();
- var _loc6 = new XML(d);
- var _loc5 = _loc6.firstChild.attributes;
- var _loc2 = new Object();
- _loc2.racer1Obj = new Object();
- _loc2.racer1Obj.id = Number(_loc5.r1id);
- _loc2.racer1Obj.bt = Number(_loc5.b1) ? (Number(_loc5.b1)) : (0);
- _loc2.racer1Obj.uName = classes.Lookup.buddyName(Number(_loc2.racer1Obj.id));
- _loc2.racer1Obj.un = _loc2.racer1Obj.uName;
- _loc2.racer1Obj.sc = Number(_loc5.sc1);
- _loc2.racer1Obj.ti = _global.chatObj.raceRoomMC.lookupTeamID(_loc2.racer1Obj.id);
- _loc2.racer1Obj.tn = _global.chatObj.raceRoomMC.lookupTeamName(_loc2.racer1Obj.ti);
- _loc2.racer2Obj = new Object();
- _loc2.racer2Obj.id = Number(_loc5.r2id);
- _loc2.racer2Obj.bt = Number(_loc5.b2) ? (Number(_loc5.b2)) : (0);
- _loc2.racer2Obj.uName = classes.Lookup.buddyName(Number(_loc2.racer2Obj.id));
- _loc2.racer2Obj.un = _loc2.racer2Obj.uName;
- _loc2.racer2Obj.sc = Number(_loc5.sc2);
- _loc2.racer2Obj.ti = _global.chatObj.raceRoomMC.lookupTeamID(_loc2.racer2Obj.id);
- _loc2.racer2Obj.tn = _global.chatObj.raceRoomMC.lookupTeamName(_loc2.racer2Obj.ti);
- _global.chatObj.raceObj = new Object();
- _global.chatObj.raceObj.stageTS = stageTS;
- _global.chatObj.raceObj.timeToStage = Number(_loc5.t);
- _global.chatObj.raceObj.r1Obj = new Object();
- _global.chatObj.raceObj.r2Obj = new Object();
- _global.chatObj.raceObj.r1Obj.id = _loc2.racer1Obj.id;
- _global.chatObj.raceObj.r1Obj.cid = Number(_loc5.r1cid);
- _global.chatObj.raceObj.r2Obj.id = _loc2.racer2Obj.id;
- _global.chatObj.raceObj.r2Obj.cid = Number(_loc5.r2cid);
- _global.chatObj.raceObj.r1Obj.bt = _loc2.racer1Obj.bt;
- _global.chatObj.raceObj.r2Obj.bt = _loc2.racer2Obj.bt;
- _global.chatObj.raceObj.r1Obj.un = _loc2.racer1Obj.uName;
- _global.chatObj.raceObj.r2Obj.un = _loc2.racer2Obj.uName;
- _global.chatObj.raceObj.r1Obj.ti = _loc2.racer1Obj.ti;
- _global.chatObj.raceObj.r2Obj.ti = _loc2.racer2Obj.ti;
- _global.chatObj.raceObj.r1Obj.tn = _loc2.racer1Obj.tn;
- _global.chatObj.raceObj.r2Obj.tn = _loc2.racer2Obj.tn;
- _global.chatObj.raceObj.r1Obj.sc = _loc2.racer1Obj.sc;
- _global.chatObj.raceObj.r2Obj.sc = _loc2.racer2Obj.sc;
- _global.chatObj.raceObj.r1Obj.scc = 0;
- _global.chatObj.raceObj.r2Obj.scc = 0;
- if (_loc5.r1id == classes.GlobalData.id || _loc5.r2id == classes.GlobalData.id)
- {
- _global.chatObj.raceObj.isRacer = 1;
- } // end if
- _global.chatObj.challengeXML.firstChild.attributes.td = _loc6.firstChild.attributes.td;
- var _loc3;
- var _loc4;
- for (var _loc4 = 0; _loc4 < _global.chatObj.challengeXML.firstChild.childNodes.length; ++_loc4)
- {
- _loc3 = _global.chatObj.challengeXML.firstChild.childNodes[_loc4].attributes;
- if (_loc2.racer1Obj.id == _loc3.ai1 && _loc2.racer2Obj.id == _loc3.ai2)
- {
- break;
- } // end if
- _loc3 = undefined;
- } // end of for
- if (_loc3.ai1 == undefined)
- {
- return;
- } // end if
- _global.chatObj.raceRoomMC.showContainer("teamRivMatchAnnounce");
- } // End of the function
- function teamRivalsRaceInProgressCB(sx)
- {
- _global.chatObj.newRaceTS = new Date();
- _global.chatObj.newRaceObj = new Object();
- _global.chatObj.newRaceObj.isRacer = false;
- _global.chatObj.newRaceObj.raceInProgress = true;
- _global.chatObj.challengeXML = new XML(sx);
- _global.chatObj.challengeXML.firstChild.attributes.isRacer = 0;
- var _loc2 = _global.chatObj.challengeXML.firstChild.attributes.h == 0 ? (true) : (false);
- _global.chatObj.raceRoomMC.showContainer("teamRivAnnounce", {isRacer: false, isBracket: _loc2});
- } // End of the function
- function teamRivalsFinishCB(d)
- {
- function cont(type)
- {
- if (type == 1)
- {
- _global.chatObj.raceRoomMC.showContainer("teamRivWin");
- }
- else if (type == 2)
- {
- _global.chatObj.raceRoomMC.showContainer("raceNoWinner");
- } // end else if
- _root.raceSound.stopSound();
- _global.chatObj.raceRoomMC.userListXML = _global.chatObj.userListXML;
- _global.chatObj.raceRoomMC.drawUserList();
- _global.chatObj.raceRoomMC.drawQueue();
- } // End of the function
- var _loc3 = new XML(d);
- _global.chatObj.raceObj.teamResultsXML = _loc3;
- _global.chatObj.raceRoomMC.updateQueue(d, 1);
- classes.Chat.enableWindow();
- _global.chatObj.raceRoomMC.optimizeBottom(true);
- classes.Control.setMapButton("race");
- if (Number(_loc3.firstChild.attributes.wid) > 0)
- {
- _global.setTimeout(cont, 9000, 1);
- }
- else
- {
- _global.setTimeout(cont, 9000, 2);
- } // end else if
- } // End of the function
- function htConnect(tid)
- {
- getURL("lingo: HTJOIN " + tid, "");
- } // End of the function
- function htConnectCB(s, d)
- {
- if (s == 1)
- {
- }
- else
- {
- classes.Control.dialogAlert("Tournament Error", d);
- } // end else if
- } // End of the function
- function htQualifyOK(tid)
- {
- getURL("lingo: HQOK " + tid, "");
- } // End of the function
- function htQualifyOKCB(s, d, t)
- {
- if (s == 1)
- {
- _global.chatObj.raceObj.stageTS = new Date();
- _global.chatObj.raceObj.timeToStage = Math.ceil(t / 2);
- classes.Control.htourneyMC.gotoAndPlay("qualifyTrack");
- }
- else
- {
- classes.Control.dialogAlert("Tournament Error", d);
- } // end else if
- } // End of the function
- function htQualifyReadyCB(s)
- {
- if (s == 1)
- {
- classes.Control.htourneyMC.countdownGroup._visible = false;
- classes.RacePlay._MC.onRaceStart();
- }
- else
- {
- classes.Control.htourneyMC.qualStatus = -1;
- classes.Control.htourneyMC.gotoAndPlay("restart");
- } // end else if
- } // End of the function
- function htGetTop32()
- {
- getURL("lingo: HTGET32");
- } // End of the function
- function htGetTop32CB(d)
- {
- classes.Control.htourneyMC.processTop32(d);
- } // End of the function
- function htTop32AddCB(d)
- {
- classes.Control.htourneyMC.addLeader(d);
- } // End of the function
- function htTop32RemoveCB(aid)
- {
- classes.Control.htourneyMC.removeLeader(aid);
- } // End of the function
- function htQualifyingResultCB(s, d)
- {
- var _loc1 = new XML(d);
- classes.Control.htourneyMC.finishQual(Number(s), Number(_loc1.firstChild.attributes.et), Number(_loc1.firstChild.attributes.ts), Number(_loc1.firstChild.attributes.carChanged));
- } // End of the function
- function htQualifyingTimeoutCB()
- {
- classes.Control.htourneyMC.showTimedOut();
- } // End of the function
- function htQuit()
- {
- getURL("lingo: HTQUIT");
- } // End of the function
- function htEndQualifyingCB(d)
- {
- classes.Control.htourneyMC.startRaceRoom(d);
- } // End of the function
- function htStartRaceCB(d)
- {
- function CB_getTwoRacersCars(pxml)
- {
- var _loc3 = 10000;
- var _loc2;
- if (_global.chatObj.lastResultsTS)
- {
- _loc2 = new Date() - _global.chatObj.lastResultsTS;
- }
- else
- {
- _loc2 = _loc3;
- } // end else if
- if (_loc2 < _loc3)
- {
- _global.setTimeout(nextRace, _loc3 - _loc2, pxml);
- }
- else
- {
- nextRace(pxml);
- } // end else if
- } // End of the function
- function nextRace(pxml)
- {
- _global.chatObj.twoRacersCarsXML = pxml;
- _global.chatObj.raceObj = _global.chatObj.newRaceObj;
- if (classes.GlobalData.id == _global.chatObj.raceObj.r1Obj.id)
- {
- _global.chatObj.raceObj.isRacer = true;
- classes.GlobalData.setMyRaceCarNode(_global.chatObj.raceObj.r1Obj.cid);
- }
- else if (classes.GlobalData.id == _global.chatObj.raceObj.r2Obj.id)
- {
- _global.chatObj.raceObj.isRacer = true;
- classes.GlobalData.setMyRaceCarNode(_global.chatObj.raceObj.r2Obj.cid);
- } // end else if
- _global.setTimeout(goNext, 2000);
- } // End of the function
- function goNext()
- {
- classes.Control.htourneyMC.goNextRace(Number(tAttr.r), Number(tAttr.m));
- } // End of the function
- var _loc6 = new XML(d);
- var tAttr = _loc6.firstChild.attributes;
- _global.chatObj.newRaceTS = new Date();
- _global.chatObj.newRaceObj = new Object();
- _global.chatObj.newRaceObj.stageTS = new Date();
- _global.chatObj.newRaceObj.timeToStage = Number(tAttr.t);
- _global.chatObj.newRaceObj.timeToRespond = Number(tAttr.t);
- _global.chatObj.newRaceObj.r1Obj = new Object();
- _global.chatObj.newRaceObj.r2Obj = new Object();
- _global.chatObj.newRaceObj.r1Obj.id = tAttr.r1id;
- _global.chatObj.newRaceObj.r1Obj.cid = tAttr.r1cid;
- _global.chatObj.newRaceObj.r2Obj.id = tAttr.r2id;
- _global.chatObj.newRaceObj.r2Obj.cid = tAttr.r2cid;
- _global.chatObj.newRaceObj.r1Obj.bt = tAttr.b1;
- _global.chatObj.newRaceObj.r2Obj.bt = tAttr.b2;
- _global.chatObj.newRaceObj.r1Obj.un = classes.Control.htourneyMC.lookupUserName(_global.chatObj.newRaceObj.r1Obj.id);
- _global.chatObj.newRaceObj.r2Obj.un = classes.Control.htourneyMC.lookupUserName(_global.chatObj.newRaceObj.r2Obj.id);
- _global.chatObj.newRaceObj.r1Obj.sc = tAttr.sc1;
- _global.chatObj.newRaceObj.r2Obj.sc = tAttr.sc2;
- _global.chatObj.newRaceObj.r1Obj.racerNum = tAttr.k1;
- _global.chatObj.newRaceObj.r2Obj.racerNum = tAttr.k2;
- _global.chatObj.newRaceObj.bt = Number(tAttr.bt);
- _global.chatObj.newRaceObj.t = _loc6.firstChild.attributes.t;
- classes.Lookup.addCallback("raceGetTwoRacersCars", this, CB_getTwoRacersCars, _global.chatObj.newRaceObj.r1Obj.cid + "," + _global.chatObj.newRaceObj.r2Obj.cid);
- _root.raceGetTwoRacersCars(_global.chatObj.newRaceObj.r1Obj.cid, _global.chatObj.newRaceObj.r2Obj.cid);
- } // End of the function
- function htTreeResultCB(d)
- {
- var _loc1 = new XML(d);
- classes.Control.htourneyMC.updateChartMatch(Number(_loc1.firstChild.attributes.r), Number(_loc1.firstChild.attributes.m), Number(_loc1.firstChild.attributes.w));
- } // End of the function
- function htReadyCB(s, t, t2)
- {
- if (s == 1)
- {
- classes.RacePlay._MC.onRaceStart();
- } // end if
- } // End of the function
- function htRTOpponentCB(rt)
- {
- var _loc3 = _global.chatObj.raceRoomMC.container;
- var _loc4;
- if (_loc3.racer1Obj.id == classes.GlobalData.id)
- {
- _loc4 = _loc3.racer2Obj.id;
- }
- else
- {
- _loc4 = _loc3.racer1Obj.id;
- } // end else if
- if (rt == -1)
- {
- _root.raceTreeMovie.setLight(_global.chatObj.raceRoomMC.container.oppLane, "green", false);
- _root.raceTreeMovie.setLight(_global.chatObj.raceRoomMC.container.oppLane, "red", true);
- } // end if
- _loc3.tripWire(_loc4, rt);
- } // End of the function
- function htRTCB(r, rt)
- {
- _global.chatObj.raceRoomMC.container.tripWire(_global.chatObj.raceRoomMC.container["racer" + r + "Obj"].id, rt);
- if (rt == -1)
- {
- _root.raceTreeMovie.setLight(r, "green", false);
- _root.raceTreeMovie.setLight(r, "red", true);
- } // end if
- } // End of the function
- function htFinishCB(d)
- {
- if (_global.chatObj.raceObj.isRacer)
- {
- do_htFinishCB(d);
- }
- else
- {
- _global.setTimeout(this, "do_htFinishCB", 6000, d);
- } // end else if
- } // End of the function
- function do_htFinishCB(d)
- {
- var _loc2 = new XML(d);
- _global.chatObj.raceRoomMC.container.crossWire(_loc2.firstChild.attributes.i, _loc2.firstChild.attributes.et, _loc2.firstChild.attributes.ts);
- classes.Chat.enableWindow();
- } // End of the function
- function htResultCB(d)
- {
- _global.chatObj.lastResultsTS = new Date();
- _global.chatObj.raceRoomMC.onRaceResults(d);
- } // End of the function
- function htTimeoutCB(s)
- {
- classes.Control.htourneyMC.showTimedOut();
- } // End of the function
- function htGetTournamentTree()
- {
- getURL("lingo: HTGETTREE");
- } // End of the function
- function htGetTournamentTreeCB(d)
- {
- var _loc1 = new XML(d);
- if (!_loc1.firstChild.firstChild.childNodes.length)
- {
- classes.Control.htourneyMC.loadRaceBG();
- }
- else
- {
- classes.Control.htourneyMC.startRaceRoom(d);
- } // end else if
- } // End of the function
- function htSpectate()
- {
- getURL("lingo: HTSPECTATE");
- } // End of the function
- function htSpectateCB(d)
- {
- isInAChat = true;
- var _loc2 = new XML(d);
- _global.newRoomName = _loc2.firstChild.attributes.n;
- _global.sectionTrackMC.showRaceRoom(7);
- } // End of the function
- function htInfo()
- {
- getURL("lingo: HTINFO");
- } // End of the function
- function htInfoCB(d)
- {
- _global.sectionTrackMC.processHtInfo(d);
- } // End of the function
- function htAwardPrizeCB(d)
- {
- var _loc2 = new XML(d);
- classes.GlobalData.updateInfo("m", _loc2.firstChild.attributes.b);
- if (Number(_loc2.firstChild.attributes.acid))
- {
- _root.getCars();
- } // end if
- } // End of the function
- function updateCarListCB(d)
- {
- var _loc1 = new XML();
- _loc1.ignoreWhite = true;
- _loc1.parseXML(d);
- classes.Frame._MC.overlay.carIcon.nextFrame();
- classes.Frame._MC.overlay.carIcon.onRelease = function ()
- {
- classes.GlobalData.onCarAlert();
- };
- if (_loc1.firstChild.attributes.e == 1)
- {
- classes.GlobalData.addToRemoveCars(Number(_loc1.firstChild.attributes.i));
- if (classes.GlobalData.onUpdateCars != classes.GlobalData.doGetAllCars)
- {
- classes.GlobalData.onUpdateCars = classes.GlobalData.doRemoveCars;
- classes.GlobalData.onCarAlert = classes.GlobalData.carWasSold;
- } // end if
- }
- else
- {
- classes.GlobalData.onUpdateCars = classes.GlobalData.doGetAllCars;
- classes.GlobalData.onCarAlert = classes.GlobalData.carWasTraded;
- } // end else if
- classes.Control.getEmailNow();
- } // End of the function
- function updateBalanceCB(d)
- {
- var _loc1 = new XML();
- _loc1.ignoreWhite = true;
- _loc1.parseXML(d);
- if (_loc1.firstChild.attributes.t == 1)
- {
- classes.GlobalData.updateInfo("m", Number(_loc1.firstChild.attributes.b));
- }
- else if (_loc1.firstChild.attributes.t == 2)
- {
- classes.GlobalData.updateInfo("p", Number(_loc1.firstChild.attributes.b));
- } // end else if
- } // End of the function
- function JoinElection()
- {
- getURL("lingo: JOINELECTION");
- classes.Frame.serverLights(true);
- } // End of the function
- function JoinElectionCB(s, d)
- {
- classes.Frame.serverLights(false);
- if (s == 1)
- {
- isInAChat = true;
- classes.SectionModElection.MC.showRaceRoom(true);
- }
- else
- {
- classes.SectionModElection.MC.clearWait();
- classes.Control.dialogAlert("Error", d);
- } // end else if
- } // End of the function
- function GetElectionInterviewList()
- {
- getURL("lingo: ELECTIONINTERVIEWLIST");
- classes.Frame.serverLights(true);
- } // End of the function
- function GetElectionInterviewListCB(s, d)
- {
- classes.Frame.serverLights(false);
- if (s == 1)
- {
- classes.SectionModElection.MC.takeInterviewList(d);
- }
- else
- {
- classes.Control.dialogAlert("Error", d);
- } // end else if
- } // End of the function
- function ElectionNewIntervieweeCB(intervieweeAccountID, isUserAvail)
- {
- if (isUserAvail == 1)
- {
- classes.SectionModElection.MC.takeNewInterviewee(intervieweeAccountID);
- } // end if
- } // End of the function
- function ElectionOverCB()
- {
- classes.SectionModElection.MC.interviewOver();
- } // End of the function
- function ElectionStartInterviewCB(d)
- {
- classes.SectionModElection.MC.takeIntervieweeList(new XML(d));
- } // End of the function
- function doPreLoginStuff()
- {
- if (_root.supportCenterPreLogin)
- {
- _root.supportCenterPreLogin.closeSupportCenter();
- } // end if
- classes.Frame._MC.showSupportButton(false);
- } // End of the function
- function login(u, p, facebookLogin)
- {
- _root.doPreLoginStuff();
- var _loc3 = 0;
- var _loc2 = new LoadVars();
- _loc2.u = u;
- _loc2.p = p;
- if (facebookLogin == true)
- {
- _loc3 = 1;
- } // end if
- _loc2.fbl = _loc3;
- _loc2.dt = classes.GlobalData.prefsXML.firstChild.attributes.dt;
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"login\", \"" + _loc2.toString() + "\"", "");
- } // End of the function
- function loginCB(stat, d, at, am)
- {
- classes.Frame.serverLights(false);
- if (stat == 1)
- {
- _global.iniXML = new XML();
- _global.iniXML.ignoreWhite = true;
- _global.iniXML.parseXML(d);
- _global.loginXML = new XML(_global.iniXML.idMap.login);
- _global.locationXML = new XML(_global.iniXML.idMap.locations);
- _global.scLevelsXML = new XML(_global.iniXML.idMap.sclevels);
- _global.platesXML = new XML(_global.iniXML.idMap.getlicenseplates);
- _global.paintCategoriesXML = new XML(_global.iniXML.idMap.getpaintcats);
- _global.paintsXML = new XML(_global.iniXML.idMap.getpaints);
- _global.bannersXML = new XML(_global.iniXML.idMap.banners);
- _global.garageXML = new XML(_global.iniXML.idMap.getallcars);
- _global.dynoXML = new XML(_global.iniXML.idMap.dyno);
- _global.badgesXML = new XML(_global.iniXML.idMap.badges);
- _global.gearsXML = new XML(_global.iniXML.idMap.gears);
- _global.broadcastXML = new XML(_global.iniXML.idMap.broadcast);
- _global.carsXML = new XML(_global.iniXML.idMap.cars);
- _global.impoundXML = new XML(_global.iniXML.idMap.impound);
- _global.usedCarXML = new XML(_global.iniXML.idMap.usedcar);
- _global.username = _global.loginXML.firstChild.firstChild.attributes.u;
- classes.GlobalData.uname = _global.loginXML.firstChild.firstChild.attributes.u;
- classes.GlobalData.id = _global.loginXML.firstChild.firstChild.attributes.i;
- classes.GlobalData.role = _global.loginXML.firstChild.firstChild.attributes.r;
- classes.GlobalData.dailyAwardType = at;
- classes.GlobalData.dailyAwardAmount = am;
- _global.specialEvent = new classes.SpecialEvent(_global.iniXML.idMap.specialEvent);
- var _loc6 = new XML(_global.iniXML.idMap.testdrivecar);
- classes.GlobalData.testDriveCarExpired = false;
- if (_loc6.firstChild.attributes.acid)
- {
- classes.GlobalData.testDriveCarAccountID = Number(_loc6.firstChild.attributes.acid);
- classes.GlobalData.testDriveInvitationID = Number(_loc6.firstChild.attributes.tid);
- classes.GlobalData.testDriveCarPrice = Number(_loc6.firstChild.attributes.m);
- classes.GlobalData.testDriveCarPointPrice = Number(_loc6.firstChild.attributes.p);
- classes.GlobalData.testDriveTimeRemaining = _loc6.firstChild.attributes.rh;
- if (Number(_loc6.firstChild.attributes.e) == 1)
- {
- classes.GlobalData.testDriveCarExpired = true;
- } // end if
- }
- else
- {
- classes.GlobalData.testDriveCarExpired = false;
- } // end else if
- var _loc7 = false;
- if (_global.loginXML.firstChild.firstChild.attributes.vip == 1)
- {
- _loc7 = true;
- } // end if
- classes.GlobalData.isVIPUser = _loc7;
- var _loc8 = false;
- if (_global.loginXML.firstChild.firstChild.attributes.fbc == 1)
- {
- _loc8 = true;
- } // end if
- classes.GlobalData.facebookConnected = _loc8;
- classes.GlobalData.attr = _global.loginXML.firstChild.firstChild.attributes;
- classes.GlobalData.updateInfo("m", _global.loginXML.firstChild.firstChild.attributes.m);
- classes.GlobalData.updateInfo("p", _global.loginXML.firstChild.firstChild.attributes.p);
- classes.GlobalData.updateInfo("sc", _global.loginXML.firstChild.firstChild.attributes.sc);
- classes.GlobalData.updateInfo("im", _global.loginXML.firstChild.firstChild.attributes.im);
- classes.GlobalData.updateInfo("act", _global.loginXML.firstChild.firstChild.attributes.act);
- classes.Control.loginFinished("web");
- classes.Control.setPeriodicEmail();
- classes.GlobalData.priorStreetCredit = 0;
- classes.GlobalData.savePrefsXMLDT(_global.loginXML.firstChild.firstChild.attributes.dt);
- var _loc4 = new XML(_global.iniXML.idMap.userDecalBans);
- if (_loc4.firstChild.attributes.s == "2")
- {
- _root.fileClearAllDecals();
- }
- else if (_loc4.firstChild.attributes.s == "1")
- {
- for (var _loc3 = 0; _loc3 < _loc4.firstChild.childNodes.length; ++_loc3)
- {
- _root.fileClearADecal(_loc4.firstChild.childNodes[_loc3].attributes.pcid, _loc4.firstChild.childNodes[_loc3].attributes.did);
- } // end of for
- } // end else if
- for (var _loc3 = 0; _loc3 < _global.garageXML.firstChild.childNodes.length; ++_loc3)
- {
- var _loc5 = new XML(_global.garageXML.firstChild.childNodes[_loc3].toString());
- classes.Lookup.addToRaceCarsXML(_loc5.firstChild);
- } // end of for
- _global.introData = new classes.IntroData();
- _global.specialEvent.currentEvent == true && _global.specialEvent.teamID;
- _global.introData.dailyAwardType = classes.GlobalData.dailyAwardType;
- _global.introData.dailyAwardAmount = classes.GlobalData.dailyAwardAmount;
- _global.introData.broadcastNum = Number(_global.broadcastXML.firstChild.firstChild.attributes.i);
- _global.introData.broadcastRead = classes.GlobalData.prefsObj.broadcastRead;
- _global.introData.broadcastMessage = _global.broadcastXML.firstChild.firstChild.attributes.m;
- _global.introData.currentEvent = _global.specialEvent.currentEvent;
- _global.introData.teamID = _global.specialEvent.teamID;
- _global.introData.specialEvent = _global.specialEvent;
- _global.introData.testDriveCarExpired = classes.GlobalData.testDriveCarExpired;
- _global.introData.introXML = new XML(_global.iniXML.idMap.intro);
- }
- else
- {
- _root.imp.loginCB(stat, d, at, am);
- } // end else if
- } // End of the function
- function loadUpdate()
- {
- var _loc1 = classes.Frame.assetLoader;
- _loc1.downloadText2.text = "Fetching update list";
- getURL("lingo: fetchCacheXML");
- } // End of the function
- function loadInstaller()
- {
- getURL("lingo: downloadNewInstaller");
- } // End of the function
- function loadUpdateCB(fileName, fileLoaded, fileSize, totalLoaded, totalSize)
- {
- var _loc1 = classes.Frame.assetLoader;
- _loc1.downloadText1.text = "Downloading:";
- _loc1.downloadText2.text = fileName + " (" + fileLoaded + "/" + fileSize + ")";
- _loc1.totalDownloadText.text = totalLoaded + "/" + totalSize + " bytes";
- _loc1.progressBar.bar._width = totalLoaded / totalSize * 425;
- _loc1.progressBar.shade._x = _loc1.progressBar.bar._x + _loc1.progressBar.bar._width;
- } // End of the function
- function loadFinishCB()
- {
- var _loc1 = classes.Frame.assetLoader;
- _loc1.downloadText1.text = "";
- _loc1.downloadText2.text = "Update is complete";
- _loc1.progressBar.bar._width = 425;
- _loc1.progressBar.shade._x = _loc1.progressBar.bar._x + _loc1.progressBar.bar._width;
- if (_loc1._parent.facebookLinkPage == false)
- {
- _loc1._parent.gotoAndPlay("updateDone");
- }
- else
- {
- _loc1._parent.gotoAndPlay("updateDoneFB");
- } // end else if
- } // End of the function
- function getPartCategories()
- {
- if (!_global.partCatXML)
- {
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"getallcats\"");
- }
- else
- {
- _global.shopPartsMC.gotoAndPlay("retrieve");
- } // end else if
- } // End of the function
- function getPartCategoriesCB(d)
- {
- classes.Frame.serverLights(false);
- _global.partCatXML = new XML(d);
- _global.shopPartsMC.gotoAndPlay("retrieve");
- } // End of the function
- function getParts(acid)
- {
- var _loc1 = Number(classes.GlobalData.attr.mb);
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"getallparts\", \"acid=" + acid + "&m=" + _loc1 + "\"", "");
- } // End of the function
- function getPartsCB(d, d1)
- {
- classes.Frame.serverLights(false);
- _global.partXML = new XML();
- _global.partXML.ignoreWhite = true;
- _global.partXML.parseXML(d);
- _global.shopPartsMC.gotoShowroom(d1);
- } // End of the function
- function getWheelsTires(acid)
- {
- var _loc1 = Number(classes.GlobalData.attr.mb);
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"getallwheelstires\", \"acid=" + acid + "&m=" + _loc1 + "\"", "");
- } // End of the function
- function getWheelsTiresCB(d, d1)
- {
- classes.Frame.serverLights(false);
- _global.partXML = new XML();
- _global.partXML.ignoreWhite = true;
- _global.partXML.parseXML(d);
- _global.shopPartsMC.gotoShowroom(d1);
- } // End of the function
- function buyPart(acid, pid, pt, t, pvid, c)
- {
- classes.Frame.serverLights(true);
- switch (t)
- {
- case "c":
- {
- classes.Lookup.removeFromRaceCarsXML(acid);
- getURL("lingo: executeCall \"buypart\", \"acid=" + acid + "&pid=" + pid + "&pt=" + pt + "&pvid=" + pvid + "&c=" + c + "\"", "");
- break;
- }
- case "e":
- {
- getURL("lingo: executeCall \"buyenginepart\", \"acid=" + acid + "&epid=" + pid + "&pt=" + pt + "\"", "");
- break;
- }
- case "m":
- {
- getURL("lingo: executeCall \"buyengine\", \"acid=" + acid + "&eid=" + pid + "&pt=" + pt + "\"", "");
- break;
- }
- default:
- {
- classes.Frame.serverLights(false);
- break;
- }
- } // End of switch
- } // End of the function
- function buyPartCB(t, d1, d2)
- {
- classes.Frame.serverLights(false);
- var _loc2 = new XML();
- _loc2.ignoreWhite = true;
- _loc2.parseXML(d1);
- switch (Number(_loc2.firstChild.attributes.s))
- {
- case 2:
- case 1:
- {
- if (Number(_loc2.firstChild.attributes.s) == 2)
- {
- classes.GlobalData.updateInfo("m", Number(_loc2.firstChild.attributes.b));
- }
- else
- {
- classes.GlobalData.updateInfo("p", Number(_loc2.firstChild.attributes.b));
- } // end else if
- installPartCB(t, d2, true, Number(_loc2.firstChild.attributes.ai));
- break;
- }
- case 0:
- {
- _root.displayAlert("warning", "Purchase Error", "Sorry, the purchase attempt failed. Please try again later.");
- break;
- }
- case -1:
- {
- _root.displayAlert("warning", "Purchase Error", "Sorry, this part is only available to users with paid memberships. Please see www.NittoLegends.com for more information.");
- break;
- }
- case -2:
- {
- _root.displayAlert("warning", "Purchase Error", "This attempt failed because the part is not available for purchase with the chosen payment method. Please use another form of payment.");
- break;
- }
- case -3:
- {
- _root.displayAlert("warning", "Insufficient Funds", "Sorry, you do not have enough in your balance to pay for this. Try winning some races, or you could try buying a cheaper part.");
- break;
- }
- case -4:
- {
- _root.displayAlert("warning", "Purchase Error", "This part will not fit on the selected car.");
- break;
- }
- case -5:
- {
- _root.displayAlert("warning", "Purchase Error", "Sorry, but you can\'t shop in a city higher than the one you live in.");
- break;
- }
- case -6:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected to buy the part for is impounded.");
- break;
- }
- case -7:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected to buy the part for is locked.");
- break;
- }
- case -8:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected to buy the part for is not yours.");
- break;
- }
- case -9:
- {
- _root.displayAlert("warning", "Purchase Error", "I\'m sorry, but the part you\'d like to purchase is for black card holders only.");
- break;
- }
- case -10:
- {
- _root.displayAlert("warning", "Purchase Error", "Error creating new engine.");
- break;
- }
- case -11:
- {
- _root.displayAlert("warning", "Purchase Error", "Error installing stock parts.");
- break;
- }
- case -12:
- {
- _root.displayAlert("warning", "Purchase Error", "Error getting AF Ratio.");
- break;
- }
- case -13:
- {
- _root.displayAlert("warning", "Purchase Error", "Error updating AF Ratio.");
- break;
- }
- case -14:
- {
- _root.displayAlert("warning", "Purchase Error", "Error updating money.");
- break;
- }
- case -15:
- {
- _root.displayAlert("warning", "Purchase Error", "Error updating spending.");
- break;
- }
- case -16:
- {
- _root.displayAlert("warning", "Purchase Error", "Transaction Error.");
- break;
- }
- case -17:
- {
- _root.displayAlert("warning", "Purchase Error", "Error adding transaction object.");
- break;
- }
- case -18:
- {
- _root.markTestDriveExpiredAndDisplayWarning();
- break;
- }
- case -19:
- {
- _root.displayAlert("warning", "Purchase Error", "I\'m sorry, but you don\'t meet a requirement for purchasing this part.");
- break;
- }
- case -50:
- {
- _root.displayAlert("triangle", "Account Locked", "Sorry, you left a race that is still in progress. Your account is temporarily locked until the race is finished. This may take moment.");
- break;
- }
- } // End of switch
- } // End of the function
- function getCarPartsBin(acid)
- {
- if (classes.Control.serverAvail())
- {
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"getcarpartsbin\", \"acid=" + acid + "\"", "");
- } // end if
- } // End of the function
- function getCarPartsBinCB(d)
- {
- classes.Frame.serverLights(false);
- classes.Control.serverUnlock();
- _global.partsBinXML = new XML();
- _global.partsBinXML.ignoreWhite = true;
- _global.partsBinXML.parseXML(d);
- _global.shopPartsMC.gotoAndPlay("showroom");
- } // End of the function
- function getPartsBin()
- {
- if (classes.Control.serverAvail())
- {
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"getpartsbin\"");
- } // end if
- } // End of the function
- function getPartsBinCB(d)
- {
- classes.Frame.serverLights(false);
- classes.Control.serverUnlock();
- _global.partsBinXML = new XML();
- _global.partsBinXML.ignoreWhite = true;
- _global.partsBinXML.parseXML(d);
- _global.shopPartsMC.gotoAndPlay("showroom");
- } // End of the function
- function sellPart(acpid, t)
- {
- classes.Frame.serverLights(true);
- if (t == "c")
- {
- classes.Lookup.removeFromRaceCarsXML(acid);
- getURL("lingo: executeCall \"sellcarpart\", \"acpid=" + acpid + "\"", "");
- }
- else if (t == "e")
- {
- getURL("lingo: executeCall \"sellenginepart\", \"aepid=" + acpid + "\"", "");
- }
- else if (t == "m")
- {
- getURL("lingo: executeCall \"sellengine\", \"aeid=" + acpid + "\"", "");
- }
- else
- {
- classes.Frame.serverLights(false);
- } // end else if
- } // End of the function
- function sellPartCB(t, s, b)
- {
- classes.Frame.serverLights(false);
- switch (s)
- {
- case 1:
- {
- classes.GlobalData.updateInfo("m", Number(b));
- _root.abc.contentMC.gotoAndStop("response");
- _root.abc.contentMC.alertIconMC.gotoAndStop("shopplus");
- if (t == "m")
- {
- _root.abc.contentMC.txtTitle = "Engine is Traded In";
- _root.abc.contentMC.txtMsg = "The engine is successfully traded in.";
- }
- else
- {
- _root.abc.contentMC.txtTitle = "Part is Traded In";
- _root.abc.contentMC.txtMsg = "The part is successfully traded in.";
- } // end else if
- _root.abc.removeButtons();
- _root.abc.addButton("OK");
- _global.shopPartsMC.tradeInCartPart();
- break;
- }
- case 0:
- {
- _root.abc.contentMC.gotoAndStop("response");
- _root.abc.contentMC.alertIconMC.gotoAndStop("warning");
- if (t == "m")
- {
- _root.abc.contentMC.txtTitle = "Engine is Installed in a Car";
- _root.abc.contentMC.txtMsg = "I\'m sorry, but you must uninstall this engine from your car by swapping before you can trade it in.";
- }
- else
- {
- _root.abc.contentMC.txtTitle = "Part is Installed in a Car";
- _root.abc.contentMC.txtMsg = "I\'m sorry, but you must uninstall this part before you can trade it in.";
- } // end else if
- _root.abc.removeButtons();
- _root.abc.addButton("Cancel");
- _global.shopPartsMC.clearCart();
- break;
- }
- case -1:
- {
- _root.abc.contentMC.gotoAndStop("response");
- _root.abc.contentMC.alertIconMC.gotoAndStop("warning");
- if (t == "m")
- {
- _root.abc.contentMC.txtTitle = "Engine Not Found";
- _root.abc.contentMC.txtMsg = "I\'m sorry, but this engine cannot be found in your account.";
- }
- else
- {
- _root.abc.contentMC.txtTitle = "Part Not Found";
- _root.abc.contentMC.txtMsg = "I\'m sorry, but this part cannot be found in your account.";
- } // end else if
- _root.abc.removeButtons();
- _root.abc.addButton("Cancel");
- _global.shopPartsMC.clearCart();
- break;
- }
- case -2:
- {
- _root.abc.contentMC.gotoAndStop("response");
- _root.abc.contentMC.alertIconMC.gotoAndStop("warning");
- _root.abc.contentMC.txtTitle = "Test Drive Car";
- _root.abc.contentMC.txtMsg = "I\'m sorry, but you cannot sell parts from a test drive car.";
- _root.abc.removeButtons();
- _root.abc.addButton("Cancel");
- _global.shopPartsMC.clearCart();
- break;
- }
- case -50:
- {
- _root.abc.contentMC.gotoAndStop("response");
- _root.abc.contentMC.alertIconMC.gotoAndStop("warning");
- _root.abc.contentMC.txtTitle = "Account Locked";
- _root.abc.contentMC.txtMsg = "Sorry, you left a race that is still in progress. Your account is temporarily locked until the race is finished. This may take moment.";
- _root.abc.removeButtons();
- _root.abc.addButton("Cancel");
- _global.shopPartsMC.clearCart();
- break;
- }
- } // End of switch
- } // End of the function
- function installPart(acpid, pid, acid, aeid, t)
- {
- classes.Frame.serverLights(true);
- if (t == "c")
- {
- classes.Lookup.removeFromRaceCarsXML(acid);
- getURL("lingo: executeCall \"installpart\", \"acpid=" + acpid + "&pid=" + pid + "&acid=" + acid + "\"", "");
- }
- else if (t == "e")
- {
- getURL("lingo: executeCall \"installenginepart\", \"aepid=" + acpid + "&epid=" + pid + "&acid=" + acid + "&aeid=" + aeid + "\"", "");
- }
- else if (t == "m")
- {
- getURL("lingo: executeCall \"swapengine\", \"aeid=" + acpid + "&acid=" + acid + "&pt=m\"", "");
- }
- else
- {
- classes.Frame.serverLights(false);
- } // end else if
- } // End of the function
- function installPartCB(t, c, callFromBuyPart, aiFromBuyPart)
- {
- classes.Frame.serverLights(false);
- var _loc7 = new XML();
- _loc7.ignoreWhite = true;
- _loc7.parseXML(c);
- var _loc3 = _loc7.firstChild;
- if (Number(_loc3.attributes.s) < 1 && callFromBuyPart)
- {
- _global.shopPartsMC.partBoughtButNotInstalled();
- } // end if
- switch (Number(_loc3.attributes.s))
- {
- case 2:
- case 1:
- {
- if (Number(_loc3.attributes.b) > 0)
- {
- if (Number(_loc3.attributes.s) == 2)
- {
- classes.GlobalData.updateInfo("m", Number(_loc3.attributes.b));
- }
- else
- {
- classes.GlobalData.updateInfo("p", Number(_loc3.attributes.b));
- } // end if
- } // end else if
- _root.abc.contentMC.gotoAndStop("response");
- if (callFromBuyPart)
- {
- _root.abc.contentMC.alertIconMC.gotoAndStop("shopplus");
- if (t == "m")
- {
- _root.abc.contentMC.txtTitle = "Engine is Purchased and Installed";
- _root.abc.contentMC.txtMsg = "Congratulations, the engine is successfully purchased and automatically installed in your car.";
- _global.shopPartsMC.afterBuyEngine();
- }
- else
- {
- _root.abc.contentMC.txtTitle = "Part is Purchased and Installed";
- _root.abc.contentMC.txtMsg = "Congratulations, the part is successfully purchased and automatically installed in your car.";
- _global.shopPartsMC.installCartPart(aiFromBuyPart);
- } // end else if
- _root.abc.removeButtons();
- _root.abc.addButton("OK");
- }
- else
- {
- _root.abc.contentMC.alertIconMC.gotoAndStop("installplus");
- if (t == "m")
- {
- _root.abc.contentMC.txtTitle = "Engine is Swapped";
- _root.abc.contentMC.txtMsg = "The engine is successfully swapped in your car.";
- }
- else
- {
- _root.abc.contentMC.txtTitle = "Part is Installed";
- _root.abc.contentMC.txtMsg = "The part is successfully installed in your car.";
- } // end else if
- _root.abc.removeButtons();
- _root.abc.addButton("OK");
- _global.shopPartsMC.installCartPart();
- } // end else if
- break;
- }
- case 0:
- {
- _root.abc.contentMC.gotoAndStop("response");
- _root.abc.contentMC.alertIconMC.gotoAndStop("install");
- _root.abc.removeButtons();
- if (t == "m")
- {
- _root.abc.contentMC.txtTitle = "Engine is not for the Car";
- if (callFromBuyPart)
- {
- _root.abc.contentMC.txtMsg = "Congratulations, the part is successfully purchased. However, this engine doesn\'t fit in your car.";
- _root.abc.addButton("OK");
- }
- else
- {
- _root.abc.contentMC.txtMsg = "I\'m sorry, but this engine does not fit in your car.";
- _root.abc.addButton("Cancel");
- } // end else if
- }
- else
- {
- _root.abc.contentMC.txtTitle = "Part is already Installed";
- if (callFromBuyPart)
- {
- _root.abc.contentMC.txtMsg = "Congratulations, the part is successfully purchased. However, you already have this part installed in your car.";
- _root.abc.addButton("OK");
- }
- else
- {
- _root.abc.contentMC.txtMsg = "I\'m sorry, but this part is already installed in your car.";
- _root.abc.addButton("Cancel");
- } // end else if
- } // end else if
- _global.shopPartsMC.clearCart();
- break;
- }
- case -1:
- {
- var _loc6 = "";
- for (var _loc4 = 0; _loc4 < _loc3.childNodes.length; ++_loc4)
- {
- _loc6 = _loc6 + ("\n" + _loc3.childNodes[_loc4].firstChild.nodeValue);
- } // end of for
- _root.abc.contentMC.gotoAndStop("response");
- _root.abc.contentMC.alertIconMC.gotoAndStop("install");
- _root.abc.removeButtons();
- if (t == "m")
- {
- _root.abc.contentMC.txtTitle = "Engine not Found";
- if (callFromBuyPart)
- {
- _root.abc.contentMC.txtMsg = "The engine is successfully purchased, but this engine cannot be found in the system.";
- _root.abc.addButton("OK");
- }
- else
- {
- _root.abc.contentMC.txtMsg = "I\'m sorry, but this engine cannot be found in the system.";
- _root.abc.addButton("Cancel");
- } // end else if
- }
- else
- {
- _root.abc.contentMC.txtTitle = "Part has Conflicts";
- if (callFromBuyPart)
- {
- _root.abc.contentMC.txtMsg = "The part is successfully purchased, but there are conflicting parts:" + _loc6;
- _root.abc.addButton("OK");
- }
- else
- {
- _root.abc.contentMC.txtMsg = "I\'m sorry, but this part is conflicting with these parts:" + _loc6;
- _root.abc.addButton("Cancel");
- } // end else if
- } // end else if
- _global.shopPartsMC.clearCart();
- break;
- }
- case -2:
- {
- _loc6 = "";
- for (var _loc4 = 0; _loc4 < _loc3.childNodes.length; ++_loc4)
- {
- _loc6 = _loc6 + ("\n" + _loc3.childNodes[_loc4].firstChild.nodeValue);
- } // end of for
- _root.abc.contentMC.gotoAndStop("response");
- _root.abc.contentMC.alertIconMC.gotoAndStop("install");
- _root.abc.contentMC.txtTitle = "Part has Requirements";
- _root.abc.removeButtons();
- if (callFromBuyPart)
- {
- _root.abc.contentMC.txtMsg = "The part you have purchased is part of a SYSTEM that must be installed from your GARAGE once you own all the required parts.";
- _root.abc.addButton("OK");
- }
- else
- {
- _root.abc.contentMC.txtMsg = "I\'m sorry, but this part requires you to have these other parts:" + _loc6;
- _root.abc.addButton("Cancel");
- } // end else if
- _global.shopPartsMC.clearCart();
- break;
- }
- case -3:
- {
- _root.abc.contentMC.gotoAndStop("response");
- _root.abc.contentMC.alertIconMC.gotoAndStop("install");
- _root.abc.contentMC.txtTitle = "Kit Conflict";
- _root.abc.removeButtons();
- if (callFromBuyPart)
- {
- _root.abc.contentMC.txtMsg = "The kit is successfully purchased, but it\'s conflicting with your setup. Please go to your garage to install it manually.";
- _root.abc.addButton("OK");
- }
- else
- {
- _root.abc.contentMC.txtMsg = "I\'m sorry, but this kit can\'t be installed.";
- _root.abc.addButton("Cancel");
- } // end else if
- _global.shopPartsMC.clearCart();
- break;
- }
- case -4:
- {
- _root.abc.contentMC.gotoAndStop("response");
- _root.abc.contentMC.alertIconMC.gotoAndStop("install");
- _root.abc.contentMC.txtTitle = "Car Impounded";
- _root.abc.removeButtons();
- if (callFromBuyPart)
- {
- _root.abc.contentMC.txtMsg = "The part is successfully purchased, but it cannot be installed because your car is impounded.";
- _root.abc.addButton("OK");
- }
- else
- {
- _root.abc.contentMC.txtMsg = "I\'m sorry, but this part can\'t be installed because your car is impounded.";
- _root.abc.addButton("Cancel");
- } // end else if
- _global.shopPartsMC.clearCart();
- break;
- }
- case -5:
- {
- _root.abc.contentMC.gotoAndStop("response");
- _root.abc.contentMC.alertIconMC.gotoAndStop("install");
- _root.abc.contentMC.txtTitle = "Car Locked";
- _root.abc.removeButtons();
- if (callFromBuyPart)
- {
- _root.abc.contentMC.txtMsg = "The part is successfully purchased, but it cannot be installed because your car is locked.";
- _root.abc.addButton("OK");
- }
- else
- {
- _root.abc.contentMC.txtMsg = "I\'m sorry, but this part can\'t be installed because your car is locked.";
- _root.abc.addButton("Cancel");
- } // end else if
- _global.shopPartsMC.clearCart();
- break;
- }
- case -6:
- {
- _root.abc.contentMC.gotoAndStop("response");
- _root.abc.contentMC.alertIconMC.gotoAndStop("install");
- _root.abc.contentMC.txtTitle = "Car not Yours";
- _root.abc.removeButtons();
- if (callFromBuyPart)
- {
- _root.abc.contentMC.txtMsg = "The part is successfully purchased, but it cannot be installed because the car is not yours.";
- _root.abc.addButton("OK");
- }
- else
- {
- _root.abc.contentMC.txtMsg = "I\'m sorry, but this part can\'t be installed because the car is not yours.";
- _root.abc.addButton("Cancel");
- } // end else if
- _global.shopPartsMC.clearCart();
- break;
- }
- case -7:
- {
- _root.abc.contentMC.gotoAndStop("response");
- _root.abc.contentMC.alertIconMC.gotoAndStop("install");
- _root.abc.contentMC.txtTitle = "Drive Expired";
- _root.abc.removeButtons();
- if (callFromBuyPart)
- {
- _root.abc.contentMC.txtMsg = "The part is successfully purchased, but it cannot be installed because your test drive has expired.";
- _root.abc.addButton("OK");
- }
- else
- {
- _root.abc.contentMC.txtMsg = "I\'m sorry, but this part can\'t be installed because your test drive has expired.";
- _root.abc.addButton("Cancel");
- } // end else if
- _global.shopPartsMC.clearCart();
- break;
- }
- case -8:
- {
- _root.abc.contentMC.gotoAndStop("response");
- _root.abc.contentMC.alertIconMC.gotoAndStop("install");
- _root.abc.contentMC.txtTitle = "Test Drive";
- _root.abc.removeButtons();
- if (callFromBuyPart)
- {
- _root.abc.contentMC.txtMsg = "The part is successfully purchased, but it cannot be installed in a non test drive car.";
- _root.abc.addButton("OK");
- }
- else
- {
- _root.abc.contentMC.txtMsg = "I\'m sorry, but this part can\'t be installed in a non test drive car.";
- _root.abc.addButton("Cancel");
- } // end else if
- _global.shopPartsMC.clearCart();
- break;
- }
- case -50:
- {
- _root.abc.contentMC.gotoAndStop("response");
- _root.abc.contentMC.alertIconMC.gotoAndStop("install");
- _root.abc.contentMC.txtTitle = "Account Locked";
- _root.abc.removeButtons();
- _root.abc.contentMC.txtMsg = "Sorry, you left a race that is still in progress. Your account is temporarily locked until the race is finished. This may take moment.";
- _root.abc.addButton("Cancel");
- _global.shopPartsMC.clearCart();
- break;
- }
- } // End of switch
- } // End of the function
- function uninstallPart(acpids, pids, acid, t)
- {
- classes.Frame.serverLights(true);
- if (t == "c")
- {
- classes.Lookup.removeFromRaceCarsXML(acid);
- getURL("lingo: executeCall \"uninstallpart\", \"acpids=" + acpids + "&pids=" + pids + "&acid=" + acid + "\"", "");
- }
- else if (t == "e")
- {
- getURL("lingo: executeCall \"uninstallenginepart\", \"aepids=" + acpids + "&epids=" + pids + "&aeid=" + acid + "\"", "");
- }
- else
- {
- classes.Frame.serverLights(false);
- } // end else if
- } // End of the function
- function uninstallPartCB(t, c)
- {
- classes.Frame.serverLights(false);
- var _loc6 = new XML();
- _loc6.ignoreWhite = true;
- _loc6.parseXML(c);
- var _loc4 = _loc6.firstChild;
- switch (Number(_loc4.attributes.s))
- {
- case 1:
- {
- _root.abc.contentMC.gotoAndStop("response");
- _root.abc.contentMC.alertIconMC.gotoAndStop("installplus");
- _root.abc.contentMC.txtTitle = "Part is Uninstalled";
- _root.abc.contentMC.txtMsg = "The part is successfully uninstalled from your car.";
- _root.abc.removeButtons();
- _root.abc.addButton("OK");
- _global.shopPartsMC.uninstallCartPart();
- break;
- }
- case 0:
- {
- _root.abc.contentMC.gotoAndStop("response");
- _root.abc.contentMC.alertIconMC.gotoAndStop("install");
- _root.abc.contentMC.txtTitle = "Part is Already Uninstalled";
- _root.abc.contentMC.txtMsg = "I\'m sorry, but this part is already uninstalled from your car.";
- _root.abc.removeButtons();
- _root.abc.addButton("Cancel");
- _global.shopPartsMC.clearCart();
- break;
- }
- case -1:
- {
- var _loc5 = "Error, dependent parts:";
- for (var _loc3 = 0; _loc3 < _loc4.childNodes.length; ++_loc3)
- {
- _loc5 = _loc5 + ("\n" + _loc4.childNodes[_loc3].firstChild.nodeValue);
- } // end of for
- _root.abc.contentMC.gotoAndStop("response");
- _root.abc.contentMC.alertIconMC.gotoAndStop("install");
- _root.abc.contentMC.txtTitle = "Part is Required";
- _root.abc.contentMC.txtMsg = "I\'m sorry, but this part was required by these parts:" + _loc5;
- _root.abc.removeButtons();
- _root.abc.addButton("Cancel");
- _global.shopPartsMC.clearCart();
- break;
- }
- case -2:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected to buy the part for is impounded.");
- break;
- }
- case -3:
- {
- _root.abc.contentMC.txtTitle = "Part is Required";
- _root.abc.contentMC.txtMsg = "I\'m sorry, but this part can\'t be uninstalled.";
- _root.abc.removeButtons();
- _root.abc.addButton("Cancel");
- _global.shopPartsMC.clearCart();
- break;
- }
- case -4:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected to buy the part for is locked.");
- break;
- }
- case -5:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected to buy the part for is not yours.");
- break;
- }
- case -6:
- {
- _root.markTestDriveExpiredAndDisplayWarning();
- break;
- }
- case -50:
- {
- _root.abc.contentMC.txtTitle = "Account Locked";
- _root.abc.contentMC.txtMsg = "Sorry, you left a race that is still in progress. Your account is temporarily locked until the race is finished. This may take moment.";
- _root.abc.removeButtons();
- _root.abc.addButton("Cancel");
- _global.shopPartsMC.clearCart();
- break;
- }
- } // End of switch
- } // End of the function
- function getPaintCategories()
- {
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"getpaintcats\"");
- } // End of the function
- function getPaintCategoriesCB(d)
- {
- classes.Frame.serverLights(false);
- _global.paintCategoriesXML = new XML(d);
- getPaints();
- } // End of the function
- function getPaints()
- {
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"getpaints\"");
- } // End of the function
- function getPaintsCB(d)
- {
- classes.Frame.serverLights(false);
- _global.paintsXML = new XML(d);
- _root.getCars();
- } // End of the function
- function buyPaint(acid, partArray, pt, cartArray)
- {
- _global.paintJobArr = cartArray;
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"buypaint\", \"acid=" + acid + "&p=" + partArray + "&pt=" + pt + "\"", "");
- } // End of the function
- function buyPaintCB(s, b)
- {
- classes.Frame.serverLights(false);
- _root.abc.closeMe();
- switch (s)
- {
- case 2:
- case 1:
- {
- if (s == 1)
- {
- classes.GlobalData.updateInfo("p", b);
- }
- else if (s == 2)
- {
- classes.GlobalData.updateInfo("m", b);
- } // end else if
- var _loc3 = classes.GlobalData.getSelectedCarXML();
- for (var _loc5 = 0; _loc5 < _global.paintJobArr.length; ++_loc5)
- {
- if (Number(_global.paintJobArr[_loc5].partCategoryID) == -2)
- {
- _loc3.attributes.cc = _global.paintJobArr[_loc5].paintColor;
- for (var _loc4 = 0; _loc4 < _loc3.childNodes.length; ++_loc4)
- {
- if (_loc3.childNodes[_loc4].attributes.in == 1 && classes.CarSpecs.isPaintable(Number(_loc3.childNodes[_loc4].attributes.ci)))
- {
- _loc3.childNodes[_loc4].attributes.cc = _global.paintJobArr[_loc5].paintColor;
- } // end if
- } // end of for
- continue;
- } // end if
- if (Number(_global.paintJobArr[_loc5].partCategoryID) == -1)
- {
- _loc3.attributes.cc = _global.paintJobArr[_loc5].paintColor;
- continue;
- } // end if
- for (var _loc4 = 0; _loc4 < _loc3.childNodes.length; ++_loc4)
- {
- if (_loc3.childNodes[_loc4].attributes.in == 1)
- {
- if (Number(_loc3.childNodes[_loc4].attributes.ci) == Number(_global.paintJobArr[_loc5].partCategoryID))
- {
- _loc3.childNodes[_loc4].attributes.cc = _global.paintJobArr[_loc5].paintColor;
- break;
- } // end if
- } // end if
- } // end of for
- } // end of for
- delete _global.paintJobArr;
- _global.shopPaintMC.cloneSelectedCarXML();
- break;
- }
- case 0:
- {
- _root.displayAlert("warning", "Connection Problem", "The purchase did not go through because of a server error. Please try again later.");
- break;
- }
- case -1:
- {
- _root.displayAlert("warning", "Illegal Action", "Sorry, one or more of the selected colors are not available.");
- break;
- }
- case -2:
- {
- _root.displayAlert("warning", "Unavailable Funds", "Sorry, you do not have enough in your account to pay for this.");
- break;
- }
- case -3:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected to buy the paint for is impounded.");
- break;
- }
- case -4:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected to buy the paint for is locked.");
- break;
- }
- case -5:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected to buy the paint for is not yours.");
- break;
- }
- case -6:
- {
- _root.markTestDriveExpiredAndDisplayWarning();
- break;
- }
- case -50:
- {
- _root.displayAlert("triangle", "Account Locked", "Sorry, you left a race that is still in progress. Your account is temporarily locked until the race is finished. This may take moment.");
- break;
- }
- } // End of switch
- } // End of the function
- function buyPlate(acid, pid, pt)
- {
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"buyplate\", \"acid=" + acid + "&pid=" + pid + "&pt=" + pt + "\"", "");
- } // End of the function
- function buyPlateCB(s, b, pl)
- {
- classes.Frame.serverLights(false);
- switch (s)
- {
- case 2:
- case 1:
- {
- if (s == 1)
- {
- classes.GlobalData.updateInfo("p", b);
- }
- else if (s == 2)
- {
- classes.GlobalData.updateInfo("m", b);
- } // end else if
- _global.shopLicensesMC.installCartPlate(pl);
- break;
- }
- case 0:
- {
- _root.displayAlert("warning", "Connection Problem", "The purchase did not go through because of a server error. Please try again later.");
- break;
- }
- case -1:
- {
- _root.displayAlert("warning", "Not Qualified", "Sorry, you must live at or above this location (" + classes.Lookup.homeName(_global.shopLicensesMC.locationID) + ") in order to purchase from this store.");
- break;
- }
- case -2:
- {
- _root.displayAlert("warning", "Not Enough Street Credit", "Sorry, you do not have enough Street Credit to qualify for this purchase. You need to win races and build up your cred.");
- break;
- }
- case -3:
- {
- _root.displayAlert("warning", "Unavailable Funds", "Sorry, you do not have enough in your account to pay for this.");
- break;
- }
- case -4:
- {
- _root.displayAlert("warning", "Illegal Action", "Sorry, you can\'t buy a stock plate for your car. Stock plates only come with new car purchases.");
- break;
- }
- case -5:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected to buy the plate for is impounded.");
- break;
- }
- case -6:
- {
- _root.displayAlert("warning", "Member Only", "I\'m sorry, but the plate you selected is only available for members only.");
- break;
- }
- case -7:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected to buy the plate for is locked.");
- break;
- }
- case -8:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected to buy the plate for is not yours.");
- break;
- }
- case -9:
- {
- _root.markTestDriveExpiredAndDisplayWarning();
- break;
- }
- case -50:
- {
- _root.displayAlert("triangle", "Account Locked", "Sorry, you left a race that is still in progress. Your account is temporarily locked until the race is finished. This may take moment.");
- break;
- }
- } // End of switch
- } // End of the function
- function getLicensePlates()
- {
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"getlicenseplates\"");
- } // End of the function
- function getLicensePlatesCB(d)
- {
- classes.Frame.serverLights(false);
- _global.platesXML = new XML(d);
- } // End of the function
- function buyVanity(acid, pn, pt)
- {
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"buyvanity\", \"acid=" + acid + "&pn=" + escape(pn) + "&pt=" + pt + "\"", "");
- } // End of the function
- function buyVanityCB(s, b)
- {
- classes.Frame.serverLights(false);
- switch (s)
- {
- case 2:
- case 1:
- {
- if (s == 1)
- {
- classes.GlobalData.updateInfo("p", b);
- }
- else if (s == 2)
- {
- classes.GlobalData.updateInfo("m", b);
- } // end else if
- _global.shopLicensesMC.installCartPlateNumber();
- break;
- }
- case 0:
- {
- _root.displayAlert("warning", "Plate not Available", "Sorry, the plate you selected is not available.");
- break;
- }
- case -1:
- {
- _root.displayAlert("warning", "Plate not Available", "Sorry, the plate you selected is not available.");
- break;
- }
- case -2:
- {
- _root.displayAlert("warning", "Too Many Characters", "Sorry, the plate number you selected is too long.");
- break;
- }
- case -3:
- {
- _root.displayAlert("warning", "Insufficient Funds", "Sorry, you do not have enough in your balance to pay for this. Try winning some races.");
- break;
- }
- case -4:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected to buy the plate for is impounded.");
- break;
- }
- case -5:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected to buy the plate for is locked.");
- break;
- }
- case -6:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected to buy the plate for is not yours.");
- break;
- }
- case -7:
- {
- _root.markTestDriveExpiredAndDisplayWarning();
- break;
- }
- case -50:
- {
- _root.displayAlert("triangle", "Account Locked", "Sorry, you left a race that is still in progress. Your account is temporarily locked until the race is finished. This may take moment.");
- break;
- }
- } // End of switch
- } // End of the function
- function getSystemParts(acid, etid)
- {
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"getsystemparts\", \"acid=" + acid + "&etid=" + etid + "\"", "");
- } // End of the function
- function getSystemPartsCB(s, d)
- {
- classes.Frame.serverLights(false);
- if (s == 1)
- {
- var _loc3 = new XML();
- _loc3.ignoreWhite = true;
- _loc3.parseXML(d);
- _global.shopPartsMC.gotoAndPlay("swap");
- _global.shopPartsMC.buildSwapMenu(_loc3);
- }
- else
- {
- _root.displayAlert("warning", "Engine not Found", "Sorry, the engine type you picked can\'t be loaded.");
- } // end else if
- } // End of the function
- function systemSwap(acid, etid, aepids)
- {
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"systemswap\", \"acid=" + acid + "&etid=" + etid + "&aepids=" + aepids + "\"", "");
- } // End of the function
- function systemSwapCB(s, d)
- {
- classes.Frame.serverLights(false);
- switch (s)
- {
- case 1:
- {
- if (d.length)
- {
- classes.GlobalData.replaceCarNode(d);
- } // end if
- _global.shopPartsMC.swapMenuSP.destroy();
- _global.shopPartsMC.swapItemSP.destroy();
- _global.shopPartsMC.partType = "Car Parts";
- _global.shopPartsMC.gotoAndPlay("retrieve");
- _root.displayAlert("success", "System Updated", "Congratulations, you have successfully swapped your system.");
- break;
- }
- case -1:
- {
- _root.displayAlert("warning", "Incomplete Parts", "I\'m sorry, but you\'re missing parts for the system swap.");
- break;
- }
- case -2:
- {
- _root.displayAlert("warning", "Incomplete Parts", "I\'m sorry, but you\'re missing parts for the system swap.");
- break;
- }
- case -3:
- {
- _root.displayAlert("warning", "Incomplete Parts", "I\'m sorry, but you\'re missing parts for the system swap.");
- break;
- }
- case -4:
- {
- _root.displayAlert("warning", "Incomplete Parts", "I\'m sorry, but you\'re missing parts for the system swap.");
- break;
- }
- case -5:
- {
- _root.displayAlert("warning", "Incomplete Parts", "I\'m sorry, but you\'re missing parts for the system swap.");
- break;
- }
- case -6:
- {
- _root.displayAlert("warning", "Incomplete Parts", "I\'m sorry, but you\'re missing parts for the system swap.");
- break;
- }
- case -7:
- {
- break;
- }
- case -8:
- {
- _root.displayAlert("warning", "Incomplete Parts", "I\'m sorry, but you\'re missing parts for the system swap.");
- break;
- }
- case -9:
- {
- _root.displayAlert("warning", "Incomplete Parts", "I\'m sorry, but you\'re missing parts for the system swap.");
- break;
- }
- case -10:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected is impounded.");
- break;
- }
- case -11:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected is locked.");
- break;
- }
- case -12:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected is not yours.");
- break;
- }
- case -13:
- {
- _root.markTestDriveExpiredAndDisplayWarning();
- break;
- }
- case -50:
- {
- _root.displayAlert("triangle", "Account Locked", "Sorry, you left a race that is still in progress. Your account is temporarily locked until the race is finished. This may take moment.");
- break;
- }
- } // End of switch
- } // End of the function
- function engineList()
- {
- getURL("lingo: executeCall \"egue\"");
- } // End of the function
- function engineListCB(s, d)
- {
- if (s == 1)
- {
- _global.shopPartsMC.enginePartXML.parseXML(d);
- _root.abc.contentMC.CB_engineList();
- } // end if
- } // End of the function
- function engineGetAllParts(aeid)
- {
- var _loc1 = Number(classes.GlobalData.attr.mb);
- getURL("lingo: executeCall \"egep\", \"aeid=" + aeid + "&m=" + _loc1 + "\"", "");
- classes.Frame.serverLights(true);
- } // End of the function
- function engineGetAllPartsCB(d, d1)
- {
- classes.Frame.serverLights(false);
- _global.partXML = new XML();
- _global.partXML.ignoreWhite = true;
- _global.partXML.parseXML(d);
- _global.shopPartsMC.gotoShowroom(d1);
- } // End of the function
- function engineBuyPart(epid, pt)
- {
- getURL("lingo: executeCall \"ebep\", \"epid=" + epid + "&pt=" + pt + "\"", "");
- } // End of the function
- function engineBuyPartCB(d)
- {
- var _loc2 = new XML();
- _loc2.ignoreWhite = true;
- _loc2.parseXML(d);
- switch (Number(_loc2.firstChild.attributes.s))
- {
- case 2:
- case 1:
- {
- if (Number(_loc2.firstChild.attributes.s) == 1)
- {
- classes.GlobalData.updateInfo("p", Number(_loc2.firstChild.attributes.b));
- }
- else
- {
- classes.GlobalData.updateInfo("m", Number(_loc2.firstChild.attributes.b));
- } // end else if
- _root.abc.contentMC.txtTitle = "Part is Purchased";
- _root.abc.contentMC.txtMsg = "Congratulations, the part is successfully purchased and placed in your garage.";
- _root.abc.removeButtons();
- _root.abc.addButton("OK");
- break;
- }
- case 0:
- {
- _root.displayAlert("warning", "Purchase Error", "Sorry, the purchase attempt failed. Please try again later.");
- break;
- }
- case -1:
- {
- _root.displayAlert("warning", "Purchase Error", "Sorry, this part is only available to users with paid memberships. Please see www.NittoLegends.com for more information.");
- break;
- }
- case -2:
- {
- _root.displayAlert("warning", "Purchase Error", "This attempt failed because the part is not available for purchase with the chosen payment method. Please use another form of payment.");
- break;
- }
- case -3:
- {
- _root.displayAlert("warning", "Insufficient Funds", "Sorry, you do not have enough in your balance to pay for this. Try winning some races, or you could try buying a cheaper part.");
- break;
- }
- case -4:
- {
- _root.displayAlert("warning", "Purchase Error", "This part will not fit on the selected car.");
- break;
- }
- case -5:
- {
- _root.displayAlert("warning", "Purchase Error", "This part is not available for your location.");
- break;
- }
- case -50:
- {
- _root.displayAlert("triangle", "Account Locked", "Sorry, you left a race that is still in progress. Your account is temporarily locked until the race is finished. This may take moment.");
- break;
- }
- } // End of switch
- } // End of the function
- function engineSwapStart(aeid)
- {
- getURL("lingo: executeCall \"esst\", \"aeid=" + aeid + "\"", "");
- } // End of the function
- function engineSwapStartCB(s, d)
- {
- if (s == 1)
- {
- var _loc3 = new XML();
- _loc3.ignoreWhite = true;
- _loc3.parseXML(d);
- _global.shopPartsMC.gotoAndPlay("swap");
- _global.shopPartsMC.buildSwapMenu(_loc3);
- }
- else
- {
- _root.displayAlert("warning", "Engine not Found", "Sorry, the engine type you picked can\'t be loaded.");
- } // end else if
- } // End of the function
- function engineSwapFinish(acid, aeid, aepids)
- {
- getURL("lingo: executeCall \"esfi\", \"acid=" + acid + "&aeid=" + aeid + "&aepids=" + aepids + "\"", "");
- } // End of the function
- function engineSwapFinishCB(s, d)
- {
- switch (s)
- {
- case 1:
- {
- var _loc3 = new XML();
- _loc3.ignoreWhite = true;
- _loc3.parseXML(d);
- classes.GlobalData.getSelectedCarXML().attributes.ae = _loc3.firstChild.attributes.ae;
- classes.GlobalData.getSelectedCarXML().attributes.et = _loc3.firstChild.attributes.et;
- _global.shopPartsMC.onSwapEngineSuccess();
- _root.displayAlert("success", "Engine Swapped", "Congratulations, you have successfully swapped your engine.");
- break;
- }
- case 0:
- {
- _root.displayAlert("warning", "Engine Not Available", "I\'m sorry, but we can\'t locate the engine you selected.");
- break;
- }
- case -1:
- {
- _root.displayAlert("warning", "Car Not Available", "I\'m sorry, but we can\'t locate the car you selected.");
- break;
- }
- case -2:
- {
- _root.displayAlert("warning", "Engine Not Available", "I\'m sorry, but we can\'t locate the engine you selected.");
- break;
- }
- case -3:
- {
- _root.displayAlert("warning", "Parts Incompatibility", "I\'m sorry, but we can\'t use the parts you selected.");
- break;
- }
- case -4:
- {
- _root.displayAlert("warning", "Missing Parts", "I\'m sorry, but there are missing parts for the engine swap.");
- break;
- }
- case -5:
- {
- _root.displayAlert("warning", "Missing Parts", "I\'m sorry, but there are missing parts for the engine swap.");
- break;
- }
- case -6:
- {
- _root.displayAlert("warning", "Missing Parts", "I\'m sorry, but there are missing parts for the engine swap.");
- break;
- }
- case -7:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected to swap the engine for is impounded.");
- break;
- }
- case -8:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected to swap the engine for is locked.");
- break;
- }
- case -50:
- {
- _root.displayAlert("triangle", "Account Locked", "Sorry, you left a race that is still in progress. Your account is temporarily locked until the race is finished. This may take moment.");
- break;
- }
- } // End of switch
- } // End of the function
- function getGearInfo(acid)
- {
- getURL("lingo: executeCall \"getgearinfo\" \"acid=" + acid + "\"", "");
- } // End of the function
- function getGearInfoCB(s, d)
- {
- if (s == 1)
- {
- _global.shopPartsMC.showGearRatio(d);
- }
- else
- {
- _root.displayAlert("warning", "Data Not Available", "Sorry, the gear ratio for your car can\'t be found.");
- } // end else if
- } // End of the function
- function buyGears(acid, pt, g1, g2, g3, g4, g5, g6, fg)
- {
- var _loc1 = new LoadVars();
- _loc1.acid = acid;
- _loc1.pt = pt;
- if (isNaN(Number(g1)))
- {
- _loc1.g1 = 0;
- }
- else
- {
- _loc1.g1 = g1;
- } // end else if
- if (isNaN(Number(g2)))
- {
- _loc1.g2 = 0;
- }
- else
- {
- _loc1.g2 = g2;
- } // end else if
- if (isNaN(Number(g3)))
- {
- _loc1.g3 = 0;
- }
- else
- {
- _loc1.g3 = g3;
- } // end else if
- if (isNaN(Number(g4)))
- {
- _loc1.g4 = 0;
- }
- else
- {
- _loc1.g4 = g4;
- } // end else if
- if (isNaN(Number(g5)))
- {
- _loc1.g5 = 0;
- }
- else
- {
- _loc1.g5 = g5;
- } // end else if
- if (isNaN(Number(g6)))
- {
- _loc1.g6 = 0;
- }
- else
- {
- _loc1.g6 = g6;
- } // end else if
- if (isNaN(Number(fg)))
- {
- _loc1.fg = 0;
- }
- else
- {
- _loc1.fg = fg;
- } // end else if
- getURL("lingo: executeCall \"buygears\", \"" + _loc1.toString() + "\"", "");
- } // End of the function
- function buyGearsCB(s, b)
- {
- if (s > 0)
- {
- if (s == 2)
- {
- classes.GlobalData.updateInfo("m", b);
- }
- else
- {
- classes.GlobalData.updateInfo("p", b);
- } // end else if
- _root.abc.contentMC.alertIconMC.gotoAndStop("shopplus");
- _root.abc.contentMC.txtTitle = "Gear Ratio is Modified";
- _root.abc.contentMC.txtMsg = "Congratulations, the gear ratios are successfully purchased and modified in your engine.";
- _root.abc.removeButtons();
- _root.abc.addButton("OK");
- }
- else
- {
- _root.abc.contentMC.gotoAndStop("response");
- _root.abc.contentMC.alertIconMC.gotoAndStop("install");
- _root.abc.removeButtons();
- _root.abc.addButton("Cancel");
- switch (s)
- {
- case 0:
- {
- _root.abc.contentMC.txtTitle = "Engine not Available";
- _root.abc.contentMC.txtMsg = "I\'m sorry, but we can\'t load the engine to modify the gear ratios. Please try again.";
- break;
- }
- case -1:
- {
- _root.abc.contentMC.txtTitle = "Gears not Available";
- _root.abc.contentMC.txtMsg = "I\'m sorry, but you don\'t have that many gears available in your engine. Please try again.";
- break;
- }
- case -2:
- {
- _root.abc.contentMC.txtTitle = "Invalid Gear Value";
- _root.abc.contentMC.txtMsg = "I\'m sorry, but negative numbers aren\'t allowed. Please try again.";
- break;
- }
- case -3:
- {
- _root.abc.contentMC.txtTitle = "Incomplete Gear Ratios";
- _root.abc.contentMC.txtMsg = "I\'m sorry, but at least one of the gears doesn\'t have a value. Please try again.";
- break;
- }
- case -4:
- {
- _root.abc.contentMC.txtTitle = "Wrong Gear Order";
- _root.abc.contentMC.txtMsg = "I\'m sorry, but gear ratios must be in order from largest to smallest (1st > 2nd > 3rd, etc). Please try again.";
- break;
- }
- case -5:
- case -6:
- {
- _root.abc.contentMC.txtTitle = "Insufficient Fund";
- _root.abc.contentMC.txtMsg = "Sorry, you do not have enough in your balance to pay for this. Try winning some races, or you could try buying a cheaper part.";
- break;
- }
- case -7:
- {
- _root.abc.contentMC.txtTitle = "Invalid Gear Value";
- _root.abc.contentMC.txtMsg = "I\'m sorry, but 10 is the highest value allowed. Please try again.";
- break;
- }
- case -8:
- {
- _root.abc.contentMC.txtTitle = "Car is Impounded";
- _root.abc.contentMC.txtMsg = "I\'m sorry, but the car you\'re buying the gear for is impounded. Please try again.";
- break;
- }
- case -9:
- {
- _root.abc.contentMC.txtTitle = "Car is Locked";
- _root.abc.contentMC.txtMsg = "I\'m sorry, but the car you\'re buying the gear for is locked. Please try again.";
- break;
- }
- case -10:
- {
- _root.abc.contentMC.txtTitle = "Car not Available";
- _root.abc.contentMC.txtMsg = "I\'m sorry, but the car you\'re buying the gear for is not yours. Please try again.";
- break;
- }
- case -11:
- {
- _root.abc.contentMC.txtTitle = "Invalid Gear Value";
- _root.abc.contentMC.txtMsg = "I\'m sorry, but the first gear must be higher than 2.50. Please try again.";
- break;
- }
- case -12:
- {
- _root.abc.contentMC.txtTitle = "Invalid Gear Value";
- _root.abc.contentMC.txtMsg = "I\'m sorry, but the second gear must be higher than 1.60. Please try again.";
- break;
- }
- case -13:
- {
- _root.abc.contentMC.txtTitle = "Invalid Gear Value";
- _root.abc.contentMC.txtMsg = "I\'m sorry, but the third gear must be higher than 1.20. Please try again.";
- break;
- }
- case -14:
- {
- _root.abc.contentMC.txtTitle = "Invalid Gear Value";
- _root.abc.contentMC.txtMsg = "I\'m sorry, but the final gear must be higher than 2.50. Please try again.";
- break;
- }
- case -15:
- {
- classes.GlobalData.makeTestDriveCarExpired();
- _root.abc.contentMC.txtTitle = "Drive Expired";
- _root.abc.contentMC.txtMsg = "I\'m sorry, but the car you\'re buying the gear for is an expired test drive car. Please try again.";
- break;
- }
- } // End of switch
- } // end else if
- } // End of the function
- function getSparePrice()
- {
- getURL("lingo: executeCall \"getspareprice\"");
- } // End of the function
- function getSparePriceCB(s, p)
- {
- if (s == 1)
- {
- _global.shopPartsMC.onSellAllSpareParts(p);
- } // end if
- } // End of the function
- function sellAllSpare()
- {
- getURL("lingo: executeCall \"sellallspare\", \"acid=" + classes.GlobalData.getSelectedCarXML().attributes.i + "\"", "");
- } // End of the function
- function sellAllSpareCB(s, b)
- {
- if (s == 1)
- {
- classes.GlobalData.updateInfo("m", b);
- _root.abc.contentMC.gotoAndStop("response");
- _root.abc.contentMC.alertIconMC.gotoAndStop("shopplus");
- _root.abc.contentMC.txtTitle = "All Spare Parts are Sold";
- _root.abc.contentMC.txtMsg = "All parts are successfully traded in.";
- _root.abc.removeButtons();
- _root.abc.addButton("OK");
- _global.partsBinXML.parseXML("<n2/>");
- _global.shopPartsMC.gotoAndPlay("refresh");
- }
- else if (s == -1)
- {
- displayAlert("warning", "Test Drive Car", "I\'m sorry, but you cannot sell parts from a test drive car.");
- } // end else if
- } // End of the function
- function getPartDescription(pid, pt)
- {
- getURL("lingo: executeCall \"getdescription\", \"id=" + pid + "&pt=" + pt + "\"", "");
- } // End of the function
- function getPartDescriptionCB(d)
- {
- var _loc2 = new XML();
- _loc2.ignoreWhite = true;
- _loc2.parseXML(d);
- if (_loc2.firstChild.firstChild.nodeValue)
- {
- _global.shopPartsMC.partDetail.fldDescription.text = _loc2.firstChild.firstChild.nodeValue;
- } // end if
- } // End of the function
- function getInstalledEngineParts(accountCarID)
- {
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"getinstalledenginepartbyaccountcar\", \"acid=" + accountCarID + "\"", "");
- } // End of the function
- function getInstalledEnginePartsCB(s, d)
- {
- classes.Frame.serverLights(false);
- switch (s)
- {
- case 1:
- {
- var _loc1 = new XML(d);
- classes.Lookup.runCallback("getInstalledEngineParts", "", _loc1);
- break;
- }
- case -1:
- {
- break;
- }
- case -2:
- {
- break;
- }
- } // End of switch
- } // End of the function
- function getRepairParts(acid)
- {
- getURL("lingo: executeCall \"getrepairparts\", \"acid=" + acid + "\"", "");
- } // End of the function
- function getRepairPartsCB(s, d)
- {
- if (s == 1)
- {
- var _loc2 = new XML();
- _loc2.ignoreWhite = true;
- _loc2.parseXML(d);
- repairPartMC.loadRepairShop(_loc2);
- }
- else
- {
- _root.displayAlert("warning", "Repair Error", "Sorry, the repair attempt failed. Please try again later.");
- } // end else if
- } // End of the function
- function repairParts(acid, aepids, price, pt)
- {
- _global.repairPartsPrice = price;
- getURL("lingo: executeCall \"repairparts\", \"acid=" + acid + "&aepids=" + aepids + "&pt=" + pt + "\"", "");
- } // End of the function
- function repairPartsCB(s)
- {
- switch (s)
- {
- case 2:
- {
- _root.displayAlert("success", "Part(s) Repaired", "You have repaired the selected part(s).");
- classes.GlobalData.addFunds(-_global.repairPartsPrice);
- repairPartMC.gotoAndPlay("refresh");
- break;
- }
- case 1:
- {
- _root.displayAlert("success", "Part(s) Repaired", "You have repaired the selected part(s).");
- classes.GlobalData.addPoints(-_global.repairPartsPrice);
- repairPartMC.gotoAndPlay("refresh");
- break;
- }
- case 0:
- {
- _root.displayAlert("warning", "Repair Error", "Sorry, the repair attempt failed. Please try again later.");
- break;
- }
- case -1:
- {
- _root.displayAlert("warning", "Repair Error", "Sorry, you don\'t have enough balance to repair the parts.");
- break;
- }
- case -2:
- {
- _root.displayAlert("warning", "Repair Error", "Sorry, you don\'t have enough points to repair the parts.");
- break;
- }
- case -3:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected is impounded.");
- break;
- }
- case -4:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected is locked.");
- break;
- }
- case -5:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected is not yours.");
- break;
- }
- case -50:
- {
- _root.displayAlert("triangle", "Account Locked", "Sorry, you left a race that is still in progress. Your account is temporarily locked until the race is finished. This may take moment.");
- break;
- }
- } // End of switch
- delete _global.repairPartsPrice;
- } // End of the function
- function getEmailTotalNew()
- {
- getURL("lingo: executeCall \"gettotalnewmail\"");
- } // End of the function
- function getEmailTotalNewCB(s, eNum)
- {
- classes.GlobalData.updateInfo("im", eNum);
- } // End of the function
- function getEmailList()
- {
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"getemaillist\"");
- } // End of the function
- function getEmailListCB(d)
- {
- classes.Frame.serverLights(false);
- _global.inbox_xml = new XML();
- _global.inbox_xml.ignoreWhite = true;
- _global.inbox_xml.parseXML(d);
- classes.GlobalData.updateInfo("im", "count");
- classes.Email.redrawInbox();
- } // End of the function
- function getEmail(id)
- {
- getURL("lingo: executeCall \"getemail\", \"eid=" + id + "\"", "");
- } // End of the function
- function getEmailCB(d)
- {
- var _loc1 = new XML();
- _loc1.ignoreWhite = true;
- _loc1.parseXML(d);
- classes.Email.viewMail(_loc1);
- } // End of the function
- function markEmailRead(id)
- {
- getURL("lingo: executeCall \"markemailread\", \"eid=" + id + "\"", "");
- } // End of the function
- function deleteEmail(id)
- {
- classes.Email.viewedEmailID = 0;
- getURL("lingo: executeCall \"deleteemail\", \"eid=" + id + "\"", "");
- } // End of the function
- function deleteEmailCB(s, eid)
- {
- if (s == 1)
- {
- for (var _loc2 = 0; _loc2 < _global.inbox_xml.firstChild.childNodes.length; ++_loc2)
- {
- if (_global.inbox_xml.firstChild.childNodes[_loc2].attributes.i == eid)
- {
- _global.inbox_xml.firstChild.childNodes[_loc2].removeNode();
- getEmailTotalNew();
- break;
- } // end if
- } // end of for
- } // end if
- } // End of the function
- function sendEmail(tu, s, b, id)
- {
- if (classes.Control.serverAvail())
- {
- if (!s.length)
- {
- s = " ";
- } // end if
- classes.Frame.serverLights(true);
- var _loc1 = new LoadVars();
- _loc1.tu = tu;
- _loc1.s = s;
- _loc1.b = b;
- _loc1.i = id;
- getURL("lingo: executeCall \"sendemail\", \"" + _loc1.toString() + "\"", "");
- } // end if
- } // End of the function
- function sendEmailCB(d)
- {
- var _loc2 = new XML();
- _loc2.ignoreWhite = true;
- _loc2.parseXML(d);
- classes.Frame.serverLights(false);
- classes.Control.serverUnlock();
- switch (_loc2.firstChild.attributes.s)
- {
- case "1":
- {
- _root["compose" + _loc2.firstChild.attributes.id].removeMovieClip();
- break;
- }
- default:
- {
- _root.displayAlert("warning", _loc2.firstChild.attributes.t, _loc2.firstChild.attributes.m);
- }
- } // End of switch
- } // End of the function
- function addRemark(remark, toID)
- {
- var _loc1 = new LoadVars();
- _loc1.rmk = remark;
- _loc1.tid = toID;
- getURL("lingo: executeCall \"addremark\", \"" + _loc1.toString() + "\"", "");
- } // End of the function
- function addRemarkCB(s)
- {
- switch (s)
- {
- case 1:
- {
- dialogGiveRemark.contentMC.gotoAndPlay("success");
- break;
- }
- case 0:
- {
- viewer.remarkError("Sorry, this user was not found in our records.");
- break;
- }
- case -1:
- {
- viewer.remarkError("Sorry, this user is not your buddy. You may only give remarks to your buddies.");
- break;
- }
- case -2:
- {
- viewer.remarkError("Sorry, there was a server error. Please try again.");
- break;
- }
- case -3:
- {
- viewer.remarkError("Sorry, this user\'s remark box is full.");
- break;
- }
- case -60:
- {
- viewer.remarkError("Sorry, you must verify your account to leave remarks.");
- break;
- }
- } // End of switch
- } // End of the function
- function deleteRemark(accountRemarkID)
- {
- if (classes.Control.serverAvail())
- {
- getURL("lingo: executeCall \"deleteremark\", \"arid=" + accountRemarkID + "\"", "");
- } // end if
- } // End of the function
- function deleteRemarkCB(s, arid)
- {
- classes.Control.serverUnlock();
- if (s)
- {
- var _loc4 = _global.myRemarksXML.firstChild.childNodes.length - 1;
- if (_loc4 || _loc4 === 0)
- {
- for (var _loc2 = _loc4; _loc2 >= 0; --_loc2)
- {
- if (_global.myRemarksXML.firstChild.childNodes[_loc2].attributes.rid == arid)
- {
- _global.myRemarksXML.firstChild.childNodes[_loc2].removeNode();
- } // end if
- } // end of for
- } // end if
- if (classes.HomeProfile._MC.scrollerContent.remarkMC)
- {
- classes.HomeProfile._MC.scrollerContent.remarkMC.drawAllRemark(_global.myRemarksXML, true);
- } // end if
- } // end if
- } // End of the function
- function getRemarks()
- {
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"getremarks\"");
- } // End of the function
- function getRemarksCB(d)
- {
- classes.Frame.serverLights(false);
- classes.HomeProfile._MC.CB_getRemarks(d);
- } // End of the function
- function getUserRemarks(tid)
- {
- getURL("lingo: executeCall \"getuserremarks\", \"tid=" + tid + "\"", "");
- } // End of the function
- function getUserRemarksCB(d)
- {
- classes.Viewer.viewRemarksXML = new XML();
- classes.Viewer.viewRemarksXML.ignoreWhite = true;
- classes.Viewer.viewRemarksXML.parseXML(d);
- _root.viewer.scrollerContent.remarkMC.drawAllRemark(classes.Viewer.viewRemarksXML, false);
- } // End of the function
- function setRemarkNonDeletes(arids)
- {
- if (classes.Control.serverAvail())
- {
- getURL("lingo: executeCall \"setnondeletes\", \"arids=" + arids + "\"", "");
- } // end if
- } // End of the function
- function setRemarkNonDeletesCB(s)
- {
- classes.Control.serverUnlock();
- switch (s)
- {
- case 1:
- {
- _root.getRemarks();
- break;
- }
- case 0:
- {
- break;
- }
- case -1:
- {
- break;
- }
- case -2:
- {
- break;
- }
- } // End of switch
- } // End of the function
- function setRemarkDeletes(arids)
- {
- if (classes.Control.serverAvail())
- {
- getURL("lingo: executeCall \"setdeletes\", \"arids=" + arids + "\"", "");
- } // end if
- } // End of the function
- function setRemarkDeletesCB(s)
- {
- classes.Control.serverUnlock();
- if (s)
- {
- _root.getRemarks();
- } // end if
- } // End of the function
- function buddySetTop(baid)
- {
- getURL("lingo: executeCall \"addastopbuddy\", \"baid=" + baid + "\"", "");
- } // End of the function
- function buddyUnsetTop(baid)
- {
- getURL("lingo: executeCall \"removeastopbuddy\", \"baid=" + baid + "\"", "");
- } // End of the function
- function getLocations()
- {
- getURL("lingo: executeCall \"getlocations\"");
- } // End of the function
- function getLocationsCB(d)
- {
- _global.locationXML.parseXML(d);
- } // End of the function
- function moveLocation(lid, pt)
- {
- _global.hMoveLoc = lid;
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"movelocation\", \"lid=" + lid + "&pt=" + pt + "\"", "");
- } // End of the function
- function moveLocationCB(s, m)
- {
- classes.Frame.serverLights(false);
- switch (s)
- {
- case 2:
- case 1:
- {
- if (s == 1)
- {
- classes.GlobalData.updateInfo("p", m);
- }
- else
- {
- classes.GlobalData.updateInfo("m", m);
- } // end else if
- classes.GlobalData.updateInfo("lid", _global.hMoveLoc);
- if (classes.Frame.__MC.map != undefined)
- {
- classes.Frame.__MC.resetMap();
- }
- else
- {
- classes.SectionHome.__MC.updateUserValues();
- classes.HomeProfile._MC.goProfilePage(2);
- } // end else if
- _root.getCars();
- break;
- }
- case 0:
- {
- displayAlert("warning", "Error", "Sorry, you could not move your home because of some error.");
- break;
- }
- case -1:
- {
- break;
- }
- case -2:
- {
- displayAlert("warning", "Error", "Sorry, you could not move your home because of some error.");
- break;
- }
- case -3:
- {
- displayAlert("warning", "Not Enough Money", "Sorry, you do not have enough money to make this move.");
- break;
- }
- case -4:
- {
- displayAlert("warning", "Moving Failed", "Sorry, your move failed because you can not move to this location from your current location. You can only move one level up from your current location.");
- break;
- }
- case -5:
- {
- displayAlert("warning", "Not Enough Points", "Sorry, you do not have enough points to make this move.");
- break;
- }
- case -50:
- {
- displayAlert("triangle", "Account Locked", "Sorry, you left a race that is still in progress. Your account is temporarily locked until the race is finished. This may take moment.");
- break;
- }
- } // End of switch
- delete _global.hMoveLoc;
- } // End of the function
- function changeHomeMachine()
- {
- getURL("lingo: executeCall \"changehomemachine\"");
- } // End of the function
- function changeHomeMachineCB(s)
- {
- if (s)
- {
- } // end if
- } // End of the function
- function changeEmail(newEmail, newEmailConfirm)
- {
- if (newEmail == newEmailConfirm)
- {
- getURL("lingo: executeCall \"changeemail\", \"e=" + escape(newEmail) + "&ec=" + escape(newEmailConfirm) + "\"", "");
- }
- else
- {
- changeEmailCB(-2);
- } // end else if
- } // End of the function
- function changeEmailCB(s)
- {
- switch (s)
- {
- case 2:
- {
- _global.homeAccountEmailMC.gotoAndPlay("updateSent");
- break;
- }
- case 1:
- {
- _global.homeAccountEmailMC.gotoAndPlay("emailDone");
- break;
- }
- case 0:
- {
- _root.displayAlert("warning", "Error Updating Email", "Sorry, an error occurred while trying to save your new email. Please try again later.");
- _global.homeAccountEmailMC.gotoAndPlay("emailForm");
- break;
- }
- case -1:
- {
- _global.homeAccountEmailMC.gotoAndPlay("emailForm");
- _root.displayAlert("warning", "Invalid Machine", "Sorry, you can not update your email from the computer you are currently using. Security protocols allow you to make account updates from your home machine only.");
- break;
- }
- case -2:
- {
- _global.homeAccountEmailMC.gotoAndPlay("emailForm");
- _root.displayAlert("warning", "New Emails Don\'t Match", "Sorry, the new email doesn\'t match the confirmed email. Please try again.");
- break;
- }
- case -3:
- {
- _global.homeAccountEmailMC.gotoAndPlay("emailForm");
- _root.displayAlert("warning", "Email Taken", "Sorry, the email you have entered has been used and verified by another account. Please try again.");
- break;
- }
- case -4:
- {
- _global.homeAccountEmailMC.gotoAndPlay("emailForm");
- _root.displayAlert("warning", "Invalid Email Format", "Sorry, the email you have entered is invalid. An email must follow the youremail@yourdomain.com format. Please try again.");
- break;
- }
- case -5:
- {
- _global.homeAccountEmailMC.gotoAndPlay("emailForm");
- _root.displayAlert("warning", "Error Sending Email", "Sorry, we can\'t send the new activation code to the email you have entered. Please try again.");
- break;
- }
- } // End of switch
- } // End of the function
- function getUser(tid)
- {
- classes.Control.getUserID = tid;
- getURL("lingo: executeCall \"getuser\", \"tid=" + tid + "\"", "");
- } // End of the function
- function getUserCB(d)
- {
- var _loc2 = new XML(d);
- var _loc1 = _loc2.firstChild.firstChild.attributes.i;
- classes.Lookup.addUserName(Number(_loc1), _loc2.firstChild.firstChild.attributes.u);
- classes.Lookup.addToUsersXML(_loc2.firstChild.firstChild);
- classes.Lookup.runCallback("getUser", _loc1, d);
- } // End of the function
- function getUsers(aidsArr)
- {
- for (var _loc1 = 0; _loc1 < aidsArr.length; ++_loc1)
- {
- var _loc3 = classes.Lookup.getUserNode(aidsArr[_loc1]);
- if (_loc3)
- {
- var _loc4 = "<n2>" + _loc3.toString() + "</n2>";
- classes.Lookup.runCallback("getUsers", String(aidsArr[_loc1]), _loc4);
- aidsArr.splice(_loc1, 1);
- } // end if
- } // end of for
- if (aidsArr.length)
- {
- getURL("lingo: executeCall \"getusers\", \"aids=" + aidsArr.toString() + "\"", "");
- } // end if
- } // End of the function
- function getUsersCB(d)
- {
- var _loc6 = new XML(d);
- var _loc5 = _loc6.firstChild.childNodes.length - 1;
- if (!isNaN(_loc5))
- {
- for (var _loc2 = _loc5; _loc2 >= 0; --_loc2)
- {
- var _loc1 = _loc6.firstChild.childNodes[_loc2];
- d = "<n2>" + _loc1.toString() + "</n2>";
- var _loc3 = String(_loc1.attributes.i);
- classes.Lookup.addUserName(Number(_loc3), _loc1.attributes.u);
- classes.Lookup.addToUsersXML(_loc1);
- classes.Lookup.runCallback("getUsers", _loc3, d);
- } // end of for
- } // end if
- } // End of the function
- function getUserBuddies(tid)
- {
- classes.Control.serverAvail();
- getURL("lingo: executeCall \"getbuddies\", \"tid=" + tid + "\"", "");
- } // End of the function
- function getUserBuddiesCB(d)
- {
- classes.Control.serverUnlock();
- classes.Viewer.viewBuddiesXML = new XML();
- classes.Viewer.viewBuddiesXML.ignoreWhite = true;
- classes.Viewer.viewBuddiesXML.parseXML(d);
- viewer.drawBuddies(1);
- } // End of the function
- function updateBgColor(bg)
- {
- classes.GlobalData.updateInfo("bg", bg);
- getURL("lingo: executeCall \"updatebg\", \"bg=" + bg + "\"", "");
- } // End of the function
- function updateBgColorCB(s)
- {
- } // End of the function
- function updateDefaultCar(acid)
- {
- classes.GlobalData.setSelectedCar(acid);
- getURL("lingo: executeCall \"updatedefaultcar\", \"acid=" + acid + "\"", "");
- } // End of the function
- function updateDefaultCarCB(s)
- {
- } // End of the function
- function racerSearch(st, pn)
- {
- if (!pn)
- {
- pn = 1;
- } // end if
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"racersearch\", \"st=" + escape(st) + "&pn=" + pn + "\"", "");
- } // End of the function
- function racerSearchCB(s, d)
- {
- classes.Frame.serverLights(false);
- classes.Lookup.runCallback("racerSearch", "", d);
- } // End of the function
- function racerSearchNoPage(st)
- {
- if (!pn)
- {
- pn = 1;
- } // end if
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"racersearchnopage\", \"st=" + escape(st) + "\"", "");
- } // End of the function
- function racerSearchNoPageCB(s, d)
- {
- classes.Frame.serverLights(false);
- classes.Lookup.runCallback("racerSearchNoPage", "", d);
- } // End of the function
- function getInfo()
- {
- getURL("lingo: executeCall \"getinfo\"");
- } // End of the function
- function getInfoCB(d)
- {
- } // End of the function
- function changePassword(opw, npw, npwc)
- {
- if (npw.indexOf(" ") > -1)
- {
- changePasswordCB(-4);
- }
- else if (npw == npwc)
- {
- getURL("lingo: executeCall \"changepassword\",\"opw=" + escape(opw) + "&npw=" + escape(npw) + "&npwc=" + escape(npwc) + "\"", "");
- }
- else
- {
- changePasswordCB(-3);
- } // end else if
- } // End of the function
- function changePasswordCB(s)
- {
- switch (s)
- {
- case 1:
- {
- _global.homeAccountSecurityMC.gotoAndPlay("passDone");
- break;
- }
- case 0:
- {
- _global.homeAccountSecurityMC.gotoAndPlay("securityForm");
- _root.displayAlert("warning", "Server Problem", "Sorry, the server can\'t save your new password. Please try again.");
- break;
- }
- case -1:
- {
- _global.homeAccountSecurityMC.gotoAndPlay("securityForm");
- _root.displayAlert("warning", "Invalid Machine", "Sorry, you can not update your email from the computer you are currently using. Security protocols allow you to make account updates from your home machine only.");
- break;
- }
- case -2:
- {
- _global.homeAccountSecurityMC.gotoAndPlay("securityForm");
- _root.displayAlert("warning", "Wrong Old Password", "Sorry, the old password you have entered doesn\'t match the password in the system. Please try again.");
- break;
- }
- case -3:
- {
- _global.homeAccountSecurityMC.gotoAndPlay("securityForm");
- _root.displayAlert("warning", "Passwords Don\'t Match", "Sorry, the new password doesn\'t match the confirmed password. Please try again.");
- break;
- }
- case -4:
- {
- _global.homeAccountSecurityMC.gotoAndPlay("securityForm");
- _root.displayAlert("warning", "Bad Password", "Sorry, your password cannot contain any spaces. Please try again.");
- break;
- }
- } // End of switch
- } // End of the function
- function changePasswordReq(npw, npwc)
- {
- if (npw.indexOf(" ") > -1)
- {
- _root.introHolder.cpCB_Intro(-4);
- }
- else if (npw == npwc)
- {
- getURL("lingo: executeCall \"changepasswordreq\",\"npw=" + escape(npw) + "&npwc=" + escape(npwc) + "\"", "");
- }
- else
- {
- _root.introHolder.cpCB_Intro(-3);
- } // end else if
- } // End of the function
- function forgotPassword(username)
- {
- getURL("lingo: executeCall \"forgotpw\", \"un=" + escape(username) + "\"", "");
- } // End of the function
- function forgotPasswordCB(s)
- {
- _global.clearTimeout(_root.abc.contentMC.sendSI);
- switch (s)
- {
- case 1:
- {
- _root.abc.contentMC.gotoAndPlay("sent");
- break;
- }
- case 0:
- {
- _root.displayAlert("warning", "User Not Found", "Sorry, the username you have entered is not in the system. Please try again.");
- break;
- }
- case -1:
- {
- _root.displayAlert("warning", "Server Error", "Sorry, there is an error with the server. Please try again a little later.");
- break;
- }
- case -2:
- {
- _root.displayAlert("warning", "Account Has No Email", "This account does not have a registered email address, therefore you cannot recover your password.");
- break;
- }
- } // End of switch
- } // End of the function
- function createAccountCB(s)
- {
- _root.dialogCreateAccountExt.createAccountCB(s);
- } // End of the function
- function verifyAccount(ac, u, p)
- {
- getURL("lingo: executeCall \"verifyaccount\", \"ac=" + escape(ac) + "&un=" + escape(u) + "&pw=" + escape(p) + "\"", "");
- } // End of the function
- function verifyAccountCB(s)
- {
- _global.clearTimeout(_root.abc.contentMC.sendSI);
- switch (s)
- {
- case 1:
- {
- var _loc4 = _root.abc.contentMC.tu;
- var _loc6 = _root.abc.contentMC.tp;
- _root.abc.closeMe();
- _root.attachMovie("dialogContainer", "abc", _root.getNextHighestDepth(), {contentName: "dialogTermsContent", askAgree: true, u: _loc4, p: _loc6});
- break;
- }
- case 0:
- {
- _root.abc.contentMC.errHead = "Incorrect Activation Code";
- _root.abc.contentMC.err = "Sorry, the activation code you\'ve entered is incorrect. Please try again.";
- break;
- }
- case -1:
- {
- _root.abc.contentMC.errHead = "Email Not Available";
- _root.abc.contentMC.err = "Sorry, the email you have entered is already being used by another account. Try creating a new account with a different email.";
- break;
- }
- case -2:
- {
- _root.abc.contentMC.errHead = "Racer Name Not Available";
- _root.abc.contentMC.err = "Sorry, the Racer Name (username) you have entered is already taken. Someone must have activated this username before you. Please try creating a new account with a new name.";
- break;
- }
- case -3:
- {
- _root.abc.contentMC.errHead = "Server Problem";
- _root.abc.contentMC.err = "Sorry, the system can\'t verify your account at this time. Please try again later.";
- break;
- }
- } // End of switch
- if (s <= 0)
- {
- _root.abc.contentMC.gotoAndPlay("error");
- } // end if
- } // End of the function
- function activateAccount(activationCode)
- {
- getURL("lingo: executeCall \"activateaccount\", \"acd=" + escape(activationCode) + "\"", "");
- } // End of the function
- function activateAccountCB(s, e)
- {
- _global.clearTimeout(_root.abc.contentMC.sendSI);
- if (s == 1)
- {
- _root.abc.contentMC.gotoAndStop("success");
- classes.GlobalData.updateInfo("act", "1");
- if (_global.emailLimitedAccessAlert)
- {
- classes.LimitedAccessFunctions.showLimitedAccessAlert(false, _global.emailLimitedAccessAlert);
- } // end if
- if (_global.supportCenterLimitedAccessAlert)
- {
- classes.LimitedAccessFunctions.showLimitedAccessAlert(false, _global.supportCenterLimitedAccessAlert);
- } // end if
- }
- else
- {
- _root.abc.contentMC.gotoAndStop("error");
- _root.abc.contentMC.takeErrorMessage(e);
- } // end else if
- } // End of the function
- function resendActivation(username)
- {
- getURL("lingo: executeCall \"resendactivation\", \"un=" + escape(username) + "\"", "");
- } // End of the function
- function resendActivationCB(s)
- {
- switch (s)
- {
- case 1:
- {
- if (_root.abc.contentName == "dialogActivateAccountContentNew")
- {
- _root.abc.contentMC.gotoAndPlay("resent");
- } // end if
- break;
- }
- case 0:
- {
- _root.abc.closeMe();
- _root.displayAlert("warning", "User Not Found", "Sorry, there is no verification code for the username you have entered. Try creating a new account.");
- break;
- }
- case -1:
- {
- _root.abc.closeMe();
- _root.displayAlert("warning", "Server Error", "Sorry, there is an error with the server. Please try again a little later.");
- break;
- }
- case -2:
- {
- _root.abc.closeMe();
- _root.displayAlert("triangle", "Account Already Verified", "Your account has already been verified. Please log out and back in if you\'re getting verification alerts.");
- break;
- }
- case -3:
- {
- _root.abc.closeMe();
- _root.displayAlert("warning", "Email Unavailable", "You can\'t send the verification code without an email. Please update your email and try again.");
- break;
- }
- case -4:
- {
- _root.abc.closeMe();
- _root.displayAlert("warning", "Email Taken", "Sorry, the email associated to this account has been used and verified by another account. Please change your email and try again.");
- break;
- }
- } // End of switch
- } // End of the function
- function agreeToTerms(username, pwd, facebookLogin)
- {
- var _loc1 = 0;
- if (facebookLogin == true)
- {
- _loc1 = 1;
- } // end if
- getURL("lingo: executeCall \"agreetoterms\", \"un=" + escape(username) + "&pw=" + escape(pwd) + "&fbl=" + _loc1 + "\"", "");
- } // End of the function
- function agreeToTermsCB(s)
- {
- _global.clearTimeout(_root.abc.contentMC.sendSI);
- switch (s)
- {
- case 1:
- {
- var _loc3 = _root.abc.contentMC.tu;
- var _loc4 = _root.abc.contentMC.tp;
- if (!_loc3.length)
- {
- _loc3 = classes.Frame._MC.loginGroup.username;
- } // end if
- if (!_loc4.length)
- {
- _loc4 = classes.Frame._MC.loginGroup.pass;
- } // end if
- _root.abc.closeMe();
- _root.login(_loc3, _loc4, classes.Frame._MC.loginGroup.facebookLogin);
- break;
- }
- case 0:
- {
- _root.displayAlert("warning", "User Not Found", "Sorry, the username you have entered is not in the system. Please restart the game and try again.");
- break;
- }
- } // End of switch
- } // End of the function
- function getCode()
- {
- getURL("lingo: executeCall \"getcode\"");
- } // End of the function
- function getCodeCB(s, guid)
- {
- if (s == 1)
- {
- _root.dialogCreateAccountExt.loadCode(guid);
- } // end if
- } // End of the function
- function activatePoints(ac)
- {
- if (classes.Control.serverAvail())
- {
- var _loc1 = new LoadVars();
- _loc1.ac = ac;
- getURL("lingo: executeCall \"activatepoints\", \"" + _loc1.toString() + "\"", "");
- } // end if
- } // End of the function
- function activateMember(u, p, ac)
- {
- if (classes.Control.serverAvail())
- {
- var _loc1 = new LoadVars();
- _loc1.un = u;
- _loc1.pw = p;
- _loc1.ac = ac;
- getURL("lingo: executeCall \"activatemember\", \"" + _loc1.toString() + "\"", "");
- } // end if
- } // End of the function
- function activatePurchaseCB(s, m, p, ma, va, d)
- {
- classes.Control.serverUnlock();
- switch (s)
- {
- case 1:
- {
- classes.GlobalData.updateInfo("p", String(p));
- if (ma == 1)
- {
- _global.loginXML.firstChild.firstChild.attributes.mb = String(ma);
- } // end if
- if (va == 1)
- {
- classes.GlobalData.isVIPUser = true;
- } // end if
- if (d)
- {
- var _loc3 = new XML();
- _loc3.ignoreWhite = true;
- _loc3.parseXML(d);
- _root.updateDefaultCar(_loc3.firstChild.attributes.i);
- _global.garageXML.firstChild.appendChild(_loc3.firstChild);
- } // end if
- classes.Frame._MC.loginGroup.activateSuccess(m);
- break;
- }
- case 0:
- {
- _root.displayAlert("warning", "Incorrect Login", "Sorry, your login was incorrect. Please try again.");
- break;
- }
- case -1:
- case -7:
- {
- _root.displayAlert("warning", "Incorrect Code", "Sorry, your activation code was incorrect. Please try again.");
- break;
- }
- case -2:
- {
- _root.displayAlert("warning", "Expired Code", "Sorry, your code was already activated. Please try again.");
- break;
- }
- case -3:
- {
- _root.displayAlert("warning", "Update Error", "Sorry, there was an error updating the database. Please try again.");
- break;
- }
- case -6:
- {
- _root.displayAlert("warning", "Too Many Attempts", "Sorry, your have exceeded the number of trials allowed. Please call us at 562.285.0298 or 888-Nitto-1320 (888-648-8613) to activate your purchase.");
- break;
- }
- case -8:
- {
- _root.displayAlert("warning", "Purchase Voided", "Sorry, your purchase has been voided. Please call us at 562.285.0298 or 888-Nitto-1320 (888-648-8613) to activate your purchase.");
- break;
- }
- case -9:
- {
- _root.displayAlert("warning", "Purchase Refunded", "Sorry, your purchase has been refunded. Please call us at 562.285.0298 or 888-Nitto-1320 (888-648-8613) to activate your purchase.");
- break;
- }
- case -11:
- case -12:
- {
- displayAlert("warning", "Computer Banned", "This computer has been banned. If you think this is in error, please contact Customer Service for help.");
- break;
- }
- case -13:
- {
- displayAlert("warning", "Account Banned", "This account has been banned. If you think this is in error, please contact Customer Service for help.");
- break;
- }
- case -14:
- {
- displayAlert("warning", "Transaction Error", "Sorry, there was an error starting transaction activation. Please try again.");
- break;
- }
- case -15:
- {
- displayAlert("warning", "Transfer Error", "Sorry, there was an error transfering the car. Please try again.");
- break;
- }
- case -16:
- {
- displayAlert("warning", "Car Sales Error", "Sorry, there was an error updating car sales. Please try again.");
- break;
- }
- case -17:
- {
- displayAlert("warning", "Badge Error", "Sorry, there was an error awarding your badge. Please try again.");
- break;
- }
- case -18:
- {
- displayAlert("warning", "Membership Error", "Sorry, there was an error updating membership info. Please try again.");
- break;
- }
- case -19:
- {
- displayAlert("warning", "VIP Error", "Sorry, there was error updating your VIP Status. Please try again");
- break;
- }
- case -20:
- {
- displayAlert("warning", "Car Load Error", "Sorry, there was error loading your new car info. Please try again.");
- break;
- }
- } // End of switch
- } // End of the function
- function getWinsAndLosses()
- {
- getURL("lingo: executeCall \"getwinsandlosses\"");
- } // End of the function
- function getWinsAndLossesCB(d)
- {
- classes.SectionHome._MC.CB_getWinsAndLosses(d);
- } // End of the function
- function earnIncentive(iid)
- {
- getURL("lingo: executeCall \"earnincentive\", \"iid=" + iid + "\"", "");
- } // End of the function
- function earnIncentiveCB(s, b)
- {
- if (s == 1)
- {
- classes.GlobalData.prefsObj.incentiveArray[classes.data.TutorialData.holdIncentiveID] = 1;
- delete classes.data.TutorialData.holdIncentiveID;
- classes.GlobalData.updateInfo("m", b);
- classes.Control.dialogTextBrief("Congratulations!", classes.data.TutorialData.holdIncentiveMsg, "plus");
- }
- else if (s == 0)
- {
- }
- else if (s == -1)
- {
- classes.GlobalData.prefsObj.incentiveArray[classes.data.TutorialData.holdIncentiveID] = 1;
- } // end else if
- delete classes.data.TutorialData.holdIncentiveID;
- delete classes.data.TutorialData.holdIncentiveMsg;
- classes.GlobalData.savePrefsObj();
- } // End of the function
- function getStarterShowroom()
- {
- getURL("lingo: executeCall \"getstartershowroom\"");
- } // End of the function
- function getStarterShowroomCB(d)
- {
- _root.dialogCreateAccount.infoXML = new XML();
- _root.dialogCreateAccount.infoXML.ignoreWhite = true;
- _root.dialogCreateAccount.infoXML.parseXML(d);
- _root.dialogCreateAccount.gotoAndPlay("car");
- } // End of the function
- function getBlackCardProgress()
- {
- getURL("lingo: executeCall \"getblackcardprogress\"");
- } // End of the function
- function getBlackCardProgressCB(d)
- {
- classes.SectionHome._MC.CB_getBlackCardProgress(d);
- } // End of the function
- function getAvatar(tid, io, avatarType, noCache)
- {
- if (Number(tid))
- {
- var _loc3 = false;
- for (var _loc1 = 0; _loc1 < aryAvatar.length; ++_loc1)
- {
- if (aryAvatar[_loc1][0] == tid && aryAvatar[_loc1][2] == avatarType)
- {
- _loc3 = true;
- aryAvatar[_loc1][1].push(io);
- if (noCache)
- {
- aryAvatar[_loc1][3] = true;
- } // end if
- break;
- } // end if
- } // end of for
- if (!_loc3)
- {
- aryAvatar.push(new Array(tid, new Array(io), avatarType, noCache));
- if (!isTimeoutSet)
- {
- isTimeoutSet = true;
- setTimeout(getAvatarTimer, 150);
- } // end if
- } // end if
- } // end if
- } // End of the function
- function getAvatarCB(tid, avatarType, avatarAvailable)
- {
- for (var _loc1 = 0; _loc1 < aryAvatar.length; ++_loc1)
- {
- if (aryAvatar[_loc1][0] == tid && aryAvatar[_loc1][2] == avatarType)
- {
- for (var _loc2 = 0; _loc2 < aryAvatar[_loc1][1].length; ++_loc2)
- {
- if (avatarAvailable)
- {
- aryAvatar[_loc1][1][_loc2].showAvatar();
- continue;
- } // end if
- aryAvatar[_loc1][1][_loc2].showDefaultAvatar();
- } // end of for
- aryAvatar.splice(_loc1, 1);
- break;
- } // end if
- } // end of for
- } // End of the function
- function getAvatarTimer()
- {
- isTimeoutSet = false;
- var _loc5 = "";
- var _loc2 = "";
- var _loc4 = "";
- var _loc3 = "";
- for (var _loc1 = 0; _loc1 < aryAvatar.length; ++_loc1)
- {
- if (aryAvatar[_loc1][2] == "avatars")
- {
- if (aryAvatar[_loc1][3])
- {
- _loc4 = _loc4 + (aryAvatar[_loc1][0] + ",");
- }
- else
- {
- _loc5 = _loc5 + (aryAvatar[_loc1][0] + ",");
- } // end else if
- continue;
- } // end if
- if (aryAvatar[_loc1][2] == "teamavatars")
- {
- if (aryAvatar[_loc1][3])
- {
- _loc3 = _loc3 + (aryAvatar[_loc1][0] + ",");
- continue;
- } // end if
- _loc2 = _loc2 + (aryAvatar[_loc1][0] + ",");
- } // end if
- } // end of for
- if (_loc5)
- {
- _loc5 = _loc5.substr(0, _loc5.length - 1);
- getURL("lingo: getAvatar \"" + _loc5 + "\", \"avatars\"", "");
- } // end if
- if (_loc2)
- {
- _loc2 = _loc2.substr(0, _loc2.length - 1);
- getURL("lingo: getAvatar \"" + _loc2 + "\", \"teamavatars\"", "");
- } // end if
- if (_loc4)
- {
- _loc4 = _loc4.substr(0, _loc4.length - 1);
- getURL("lingo: getAvatar \"" + _loc4 + "\", \"avatars\", 1", "");
- } // end if
- if (_loc3)
- {
- _loc3 = _loc3.substr(0, _loc3.length - 1);
- getURL("lingo: getAvatar \"" + _loc3 + "\", \"teamavatars\", 1", "");
- } // end if
- } // End of the function
- function avatarUploadRequest(l)
- {
- getURL("lingo: executeCall \"uploadrequest\", \"" + l.toString() + "\"", "");
- } // End of the function
- function avatarUploadRequestCB(s)
- {
- if (aub)
- {
- aub.uploadRequestCB(s);
- } // end if
- } // End of the function
- function getCars()
- {
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"getallcars\"");
- } // End of the function
- function getCarsCB(stat, d)
- {
- classes.Frame.serverLights(false);
- var _loc10 = classes.GlobalData.getTestDriveCarXML();
- var _loc4 = Number(_loc10.attributes.i);
- var _loc6 = _loc10.attributes.tdex;
- var _loc8 = Number(_loc10.attributes.tid);
- var _loc5 = Number(_loc10.attributes.p);
- var _loc9 = Number(_loc10.attributes.pp);
- var _loc7 = _loc10.attributes.rh;
- if (classes.Control.loginDone == false)
- {
- _loc4 = Number(classes.GlobalData.testDriveCarAccountID);
- if (classes.GlobalData.testDriveCarExpired == true)
- {
- _loc6 = "1";
- }
- else
- {
- _loc6 = "0";
- } // end else if
- _loc8 = Number(classes.GlobalData.testDriveInvitationID);
- _loc5 = Number(classes.GlobalData.testDriveCarPrice);
- _loc9 = Number(classes.GlobalData.testDriveCarPointPrice);
- _loc7 = classes.GlobalData.testDriveTimeRemaining;
- } // end if
- _global.garageXML = new XML(d);
- for (var _loc2 = 0; _loc2 < _global.garageXML.firstChild.childNodes.length; ++_loc2)
- {
- if (_global.garageXML.firstChild.childNodes[_loc2].attributes.i == _loc4)
- {
- _global.garageXML.firstChild.childNodes[_loc2].attributes.td = 1;
- _global.garageXML.firstChild.childNodes[_loc2].attributes.tdex = _loc6;
- _global.garageXML.firstChild.childNodes[_loc2].attributes.tid = _loc8;
- _global.garageXML.firstChild.childNodes[_loc2].attributes.p = _loc5;
- _global.garageXML.firstChild.childNodes[_loc2].attributes.pp = _loc9;
- _global.garageXML.firstChild.childNodes[_loc2].attributes.rh = _loc7;
- break;
- } // end if
- } // end of for
- for (var _loc2 = 0; _loc2 < _global.garageXML.firstChild.childNodes.length; ++_loc2)
- {
- var _loc3 = new XML(_global.garageXML.firstChild.childNodes[_loc2].toString());
- classes.Lookup.addToRaceCarsXML(_loc3.firstChild);
- } // end of for
- if (!classes.Control.loginObj.completed)
- {
- switch (stat)
- {
- case 1:
- {
- for (var _loc2 = 0; _loc2 < _global.garageXML.firstChild.childNodes.length; ++_loc2)
- {
- if (_global.garageXML.firstChild.childNodes[_loc2].attributes.sel == 1)
- {
- classes.GlobalData.setSelectedCar(Number(_global.garageXML.firstChild.childNodes[_loc2].attributes.i));
- break;
- } // end if
- } // end of for
- classes.Control.loginFinished("cars");
- break;
- }
- case 0:
- {
- displayAlert("warning", "Error Loading Parts", "Sorry, there was a problem loading your car parts.");
- classes.Frame._MC.loginGroup.gotoAndPlay(1);
- break;
- }
- case -1:
- {
- displayAlert("warning", "Error Loading Cars", "Sorry, there was a problem loading your cars");
- classes.Frame._MC.loginGroup.gotoAndPlay(1);
- break;
- }
- } // End of switch
- }
- else if (stat == 1)
- {
- for (var _loc2 = 0; _loc2 < _global.garageXML.firstChild.childNodes.length; ++_loc2)
- {
- if (_global.garageXML.firstChild.childNodes[_loc2].attributes.sel == 1)
- {
- classes.GlobalData.setSelectedCar(Number(_global.garageXML.firstChild.childNodes[_loc2].attributes.i));
- break;
- } // end if
- } // end of for
- } // end else if
- _global.introData.testDriveCarXML = classes.GlobalData.getTestDriveCarXML();
- } // End of the function
- function getCarCategories()
- {
- getURL("lingo: executeCall \"getcarcategories\"");
- } // End of the function
- function getCarCategoriesCB(d)
- {
- _global.dealerXML = new XML(d);
- viewShowroom();
- } // End of the function
- function viewShowroom()
- {
- getURL("lingo: executeCall \"viewshowroom\"");
- } // End of the function
- function viewShowroomCB(d)
- {
- _global.dealerCarsXML = new XML(d);
- _root.main.sectionHolder.sectionClip.gotoAndPlay("refresh");
- } // End of the function
- function getOtherUserCars(i)
- {
- classes.Control.serverAvail();
- getURL("lingo: executeCall \"getallotherusercars\", \"tid=" + i + "\"", "");
- } // End of the function
- function getOtherUserCarsCB(stat, d)
- {
- classes.Control.serverUnlock();
- switch (stat)
- {
- case 1:
- {
- var _loc1 = new XML(d);
- var _loc2 = _loc1.firstChild.attributes.i;
- classes.Lookup.runCallback("getOtherUserCars", String(_loc2), _loc1);
- break;
- }
- case 0:
- {
- break;
- }
- case -1:
- {
- break;
- }
- } // End of switch
- } // End of the function
- function buyCar(cid, pt, c)
- {
- var _loc1 = new LoadVars();
- _loc1.cid = cid;
- _loc1.pt = pt;
- _loc1.c = c;
- getURL("lingo: executeCall \"buycar\", \"" + _loc1.toString() + "\"", "");
- } // End of the function
- function buyCarCB(stat, m, d)
- {
- if (stat <= 0)
- {
- _root.abc.thumb.dispose();
- _root.abc.closeMe();
- } // end if
- switch (stat)
- {
- case 1:
- case 2:
- {
- if (stat == 1)
- {
- classes.GlobalData.updateInfo("p", String(m));
- }
- else if (stat == 2)
- {
- classes.GlobalData.updateInfo("m", String(m));
- } // end else if
- if (d)
- {
- var _loc4 = new XML();
- _loc4.ignoreWhite = true;
- _loc4.parseXML(d);
- _root.updateDefaultCar(_loc4.firstChild.attributes.i);
- _global.garageXML.firstChild.appendChild(_loc4.firstChild);
- } // end if
- _root.abc.removeButtons();
- _root.abc.contentMC.gotoAndStop("success");
- _root.abc.addButton("OK");
- var _loc7 = new Object();
- _loc7.onRelease = function (theButton, keepBoxOpen)
- {
- switch (theButton.btnLabel.text)
- {
- case "OK":
- {
- _root.abc.thumb.dispose();
- break;
- }
- } // End of switch
- if (!keepBoxOpen)
- {
- false;
- theButton._parent._parent.closeMe();
- } // end if
- };
- _root.abc.addListener(_loc7);
- break;
- }
- case 0:
- {
- displayAlert("warning", "Invalid Vehicle", "Sorry, the vehicle is not available for purchase.");
- break;
- }
- case -1:
- {
- displayAlert("warning", "Access Denied", "Sorry, this vehicle is only available to users with paid memberships. Please see www.NittoLegends.com for more information.");
- break;
- }
- case -2:
- {
- displayAlert("warning", "Unrecognized Payment", "Sorry, your payment method is not accepted.");
- break;
- }
- case -3:
- {
- displayAlert("warning", "Account Inaccessible", "Sorry, your account cannot be accessed at this time. Please try again later.");
- break;
- }
- case -4:
- {
- displayAlert("warning", "Insufficient Balance", "Sorry, you don\'t have enough to purchase this vehicle.");
- break;
- }
- case -5:
- {
- var _loc6 = "Sorry, but your parking lot is full. To make space for a new car, you can move to a better neighborhood or sell an extra car.";
- if (classes.GlobalData.attr.mb != 1)
- {
- _loc6 = _loc6 + " You can also get more space with a membership. Members get double the parking spaces! See www.NittoLegends.com for details.";
- } // end if
- displayAlert("warning", "Not Enough Space", _loc6);
- break;
- }
- case -6:
- {
- displayAlert("warning", "Invalid Location", "Sorry, but you need to move to a better neighborhood to purchase this car.");
- break;
- }
- case -7:
- {
- displayAlert("warning", "Sold Out!", "Sorry, but these cars are sold out!");
- break;
- }
- case -8:
- {
- displayAlert("warning", "Black Card Required!", "Sorry, but these cars are only available for black card holders!");
- break;
- }
- case -9:
- {
- displayAlert("warning", "Sold Out!", "Sorry, but this car has sold out!");
- break;
- }
- case -50:
- {
- displayAlert("triangle", "Account Locked", "Sorry, you left a race that is still in progress. Your account is temporarily locked until the race is finished. This may take moment.");
- break;
- }
- } // End of switch
- } // End of the function
- function getCarPrice(acid)
- {
- getURL("lingo: executeCall \"getcarprice\", \"acid=" + acid + "\"", "");
- } // End of the function
- function getCarPriceCB(s, p)
- {
- if (s == 1)
- {
- _global.myGarageMC.carXML.firstChild.attributes.vw = p;
- classes.Control.dialogContainer("dialogSellCarContent", _global.sellCarObj.tObj);
- } // end if
- } // End of the function
- function sellCar(acid)
- {
- getURL("lingo: executeCall \"sellcar\", \"acid=" + acid + "\"", "");
- } // End of the function
- function sellCarCB(s, b)
- {
- var _loc1 = {s: s, b: b};
- classes.Lookup.runCallback("sellCar", "", _loc1);
- } // End of the function
- function getAllImCars()
- {
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"getallimcars\"");
- } // End of the function
- function getAllImCarsCB(s, d)
- {
- classes.Frame.serverLights(false);
- if (s == 1 || s == -1)
- {
- classes.Lookup.runCallback("getAllImCars", "", d);
- }
- else
- {
- displayAlert("warning", "Problem Encountered", "Sorry, there was a problem finding your impounded cars. Please try again later.");
- classes.Lookup.clearCallback("getAllImCars", "");
- } // end else if
- } // End of the function
- function getCarOutOfImpound(acid)
- {
- _global.retrieveCarObj = new Object();
- _global.retrieveCarObj.id = acid;
- getURL("lingo: executeCall \"getoutofimpound\", \"acid=" + acid + "\"", "");
- } // End of the function
- function getCarOutOfImpoundCB(s, b)
- {
- classes.SectionImpound._MC.infoBar.btnRelease.enabled = true;
- switch (s)
- {
- case 1:
- {
- classes.GlobalData.updateInfo("m", b);
- classes.GlobalData.updateCarAttr(_global.retrieveCarObj.id, "ii", 0);
- classes.Frame._MC.goMainSection("impound");
- classes.Control.dialogAlert("Success", "You have successfully retrieved this car from impound. It is now back in your garage.");
- _root.abc.contentMC.alertIconMC.gotoAndStop("success");
- break;
- }
- case 0:
- {
- classes.Control.dialogAlert("Problem Encountered", "Sorry, there was a problem releasing your impounded car. Please try again later.");
- break;
- }
- case -1:
- {
- classes.Frame._MC.goMainSection("impound");
- classes.Control.dialogAlert("Problem Encountered", "We could not find this car in the impound.");
- break;
- }
- case -2:
- {
- classes.Control.dialogAlert("Not Enough Funds", "Sorry, you do not have enough funds to release your car. You can sell the car or try again later.");
- break;
- }
- case -3:
- {
- classes.Control.dialogAlert("No Garage Space Available", "Sorry, you do not have any available space in your garage to accommodate this vehicle. To make garage space available, you need to either move your home to a nicer area, or sell some cars.");
- break;
- }
- case -4:
- {
- classes.Control.dialogAlert("Car not Available", "I\'m sorry, but the car you selected is locked.");
- break;
- }
- case -50:
- {
- classes.Control.dialogAlert("Account Locked", "Sorry, you left a race that is still in progress. Your account is temporarily locked until the race is finished. This may take moment.");
- break;
- }
- } // End of switch
- } // End of the function
- function getOneCar(acid)
- {
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"getonecar\", \"acid=" + acid + "\"", "");
- } // End of the function
- function getOneCarCB(s, d)
- {
- classes.Frame.serverLights(false);
- if (s == 1)
- {
- var _loc1 = new XML(d);
- classes.Lookup.runCallback("getOneCar", _loc1.firstChild.firstChild.attributes.i, _loc1);
- } // end if
- } // End of the function
- function teamInfo(tids)
- {
- getURL("lingo: executeCall \"teaminfo\", \"tids=" + escape(tids) + "\"", "");
- } // End of the function
- function teamInfoCB(d)
- {
- var _loc2 = new XML(d);
- var _loc3 = _loc2.firstChild.childNodes.length - 1;
- for (var _loc1 = _loc3; _loc1 >= 0; --_loc1)
- {
- classes.Lookup.addToTeamsXML(_loc2.firstChild.firstChild);
- } // end of for
- classes.Lookup.runCallback("teamInfo", "", d);
- } // End of the function
- function teamTrans(tid)
- {
- if (classes.Control.serverAvail())
- {
- getURL("lingo: executeCall \"teamtrans\", \"tid=" + tid + "\"", "");
- } // end if
- } // End of the function
- function teamTransCB(s, d)
- {
- classes.Control.serverUnlock();
- if (s == 1)
- {
- classes.Lookup.runCallback("teamTrans", "sectionTeamHQ", d);
- } // end if
- } // End of the function
- function teamSearch(st, pn)
- {
- if (!pn)
- {
- pn = 1;
- } // end if
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"teamsearch\", \"st=" + escape(st) + "&pn=" + pn + "\"", "");
- } // End of the function
- function teamSearchCB(s, d)
- {
- classes.Frame.serverLights(false);
- classes.Lookup.runCallback("teamSearch", "", d);
- } // End of the function
- function teamUpdateLeaderComments(lc)
- {
- _global.newLeaderComments = lc;
- getURL("lingo: executeCall \"updateleadercomments\", \"lc=" + lc + "\"", "");
- } // End of the function
- function teamUpdateLeaderCommentsCB(s)
- {
- if (s == 1)
- {
- } // end if
- classes.Lookup.runCallback("teamUpdateLeaderComments", "", s);
- } // End of the function
- function teamUpdateTeamReq(rt, v)
- {
- getURL("lingo: executeCall \"updateteamreq\", \"rt=" + rt + "&v=" + v + "\"", "");
- } // End of the function
- function teamUpdateTeamReqCB(s)
- {
- if (s == 1)
- {
- } // end if
- } // End of the function
- function teamGetInfo(tid)
- {
- classes.Control.serverAvail();
- getURL("lingo: executeCall \"getteaminfo\", \"tid=" + tid + "\"", "");
- } // End of the function
- function teamGetInfoCB(s, d)
- {
- classes.Control.serverUnlock();
- if (s == 1)
- {
- var _loc1 = new XML(d);
- classes.Lookup.addToTeamsXML(_loc1.firstChild.firstChild, true);
- classes.Lookup.runCallback("teamGetInfo", "", d);
- } // end if
- } // End of the function
- function teamGetAllApps(tid)
- {
- if (classes.Control.serverAvail())
- {
- getURL("lingo: executeCall \"getallteamapps\", \"tid=" + tid + "\"", "");
- } // end if
- } // End of the function
- function teamGetAllAppsCB(s, d)
- {
- classes.Control.serverUnlock();
- if (s == 1)
- {
- classes.Lookup.runCallback("teamGetAllApps", "sectionTeamHQ", d);
- } // end if
- } // End of the function
- function teamGetMyApps()
- {
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"getallmyapps\"");
- } // End of the function
- function teamGetMyAppsCB(s, d)
- {
- classes.Frame.serverLights(false);
- if (s == 1)
- {
- } // end if
- classes.Lookup.runCallback("teamGetMyApps", "", d);
- } // End of the function
- function teamDeleteApp(tid)
- {
- getURL("lingo: executeCall \"deleteapp\", \"tid=" + tid + "\"", "");
- } // End of the function
- function teamDeleteAppCB(s)
- {
- if (s == 1)
- {
- } // end if
- } // End of the function
- function teamUpdateApp(aaid, r)
- {
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"updateteamapp\", \"aaid=" + aaid + "&r=" + r + "\"", "");
- } // End of the function
- function teamUpdateAppCB(s)
- {
- classes.Frame.serverLights(false);
- switch (s)
- {
- case 1:
- {
- break;
- }
- case 0:
- {
- break;
- }
- case -1:
- {
- break;
- }
- case -2:
- {
- break;
- }
- } // End of switch
- classes.Lookup.runCallback("teamUpdateApp", "", s);
- } // End of the function
- function teamAddApp(tid, c)
- {
- getURL("lingo: executeCall \"addteamapp\", \"tid=" + tid + "&c=" + escape(c) + "\"", "");
- } // End of the function
- function teamAddAppCB(s)
- {
- classes.Lookup.runCallback("teamAddApp", "", s);
- switch (s)
- {
- case 1:
- {
- break;
- }
- case 0:
- {
- break;
- }
- case -1:
- {
- break;
- }
- case -2:
- {
- break;
- }
- case -3:
- {
- break;
- }
- case -4:
- {
- break;
- }
- case -5:
- {
- break;
- }
- case -6:
- {
- break;
- }
- case -60:
- {
- break;
- }
- } // End of switch
- } // End of the function
- function teamUpdateBgColor(bg)
- {
- _global.teamXML.firstChild.firstChild.attributes.bg = bg;
- var _loc2 = Number(_global.teamXML.firstChild.firstChild.attributes.i);
- if (_loc2)
- {
- getURL("lingo: executeCall \"setteamcolor\", \"tid=" + _loc2 + "&bg=" + bg + "\"", "");
- } // end if
- } // End of the function
- function teamUpdateBgColorCB(s)
- {
- } // End of the function
- function raceGetTwoRacersCars(r1acid, r2acid)
- {
- if (!r2acid)
- {
- r2acid = 0;
- } // end if
- var _loc5 = classes.Lookup.getRaceCarNode(r1acid);
- var _loc4 = classes.Lookup.getRaceCarNode(r2acid);
- if (_loc5.toString() && (!r2acid || _loc4.toString()))
- {
- var _loc2 = "<n2>";
- _loc2 = _loc2 + _loc5.toString();
- if (_loc4.toString())
- {
- _loc2 = _loc2 + _loc4.toString();
- } // end if
- _loc2 = _loc2 + "</n2>";
- _root.raceGetTwoRacersCarsCB(1, _loc2);
- }
- else if (r1acid)
- {
- getURL("lingo: executeCall \"gettworacerscars\", \"r1acid=" + r1acid + "&r2acid=" + r2acid + "\"", "");
- }
- else
- {
- _root.raceGetTwoRacersCarsCB(0, "");
- } // end else if
- } // End of the function
- function raceGetTwoRacersCarsCB(s, d)
- {
- if (s == 1)
- {
- var _loc1 = new XML(d);
- for (var _loc2 = 0; _loc2 < _loc1.firstChild.firstChild.childNodes.length; ++_loc2)
- {
- _loc1.firstChild.firstChild.childNodes[_loc2].attributes.in = 1;
- } // end of for
- for (var _loc2 = 0; _loc2 < _loc1.firstChild.childNodes[1].childNodes.length; ++_loc2)
- {
- _loc1.firstChild.childNodes[1].childNodes[_loc2].attributes.in = 1;
- } // end of for
- var _loc4 = new XML(_loc1.toString());
- var _loc3 = "";
- if (_loc1.firstChild.childNodes[1].attributes.i)
- {
- _loc3 = "," + _loc1.firstChild.childNodes[1].attributes.i;
- classes.Lookup.addToRaceCarsXML(_loc1.firstChild.childNodes[1]);
- } // end if
- classes.Lookup.addToRaceCarsXML(_loc1.firstChild.firstChild);
- classes.Lookup.runCallback("raceGetTwoRacersCars", _loc4.firstChild.childNodes[0].attributes.i + _loc3, _loc4);
- } // end if
- } // End of the function
- function getRacersCars(pArr)
- {
- var _loc4 = pArr.length - 1;
- if (!isNaN(_loc4))
- {
- for (var _loc1 = _loc4; _loc1 >= 0; --_loc1)
- {
- var _loc2 = classes.Lookup.getRaceCarNode(pArr[_loc1]);
- if (_loc2)
- {
- classes.Lookup.runCallback("getRacersCars", String(pArr[_loc1]), _loc2.toString());
- pArr.splice(_loc1, 1);
- } // end if
- } // end of for
- } // end if
- if (pArr.length)
- {
- getURL("lingo: executeCall \"getracerscars\", \"acids=" + pArr.toString() + "\"", "");
- } // end if
- } // End of the function
- function getRacersCarsCB(s, d)
- {
- var _loc6 = new XML(d);
- var _loc5 = _loc6.firstChild.childNodes.length - 1;
- if (!isNaN(_loc5))
- {
- for (var _loc3 = _loc5; _loc3 >= 0; --_loc3)
- {
- var _loc2 = _loc6.firstChild.childNodes[_loc3];
- for (var _loc1 = 0; _loc1 < _loc2.childNodes.length; ++_loc1)
- {
- _loc2.childNodes[_loc1].attributes.in = 1;
- } // end of for
- var _loc4 = String(_loc2.attributes.i);
- classes.Lookup.addToRaceCarsXML(_loc2.cloneNode(true));
- classes.Lookup.runCallback("getRacersCars", _loc4, _loc2.toString());
- } // end of for
- } // end if
- } // End of the function
- function ctGetRacers()
- {
- if (classes.Control.serverAvail())
- {
- getURL("lingo: executeCall \"ctgr\"");
- } // end if
- } // End of the function
- function ctGetRacersCB(d)
- {
- classes.Control.serverUnlock();
- classes.Control.ctourneyMC.compXML = new XML(d);
- classes.Control.ctourneyMC.startRoom();
- } // End of the function
- function ctJoin(ctid)
- {
- if (classes.Control.serverAvail())
- {
- getURL("lingo: executeCall \"ctjt\" \"ctid=" + ctid + "\"", "");
- } // end if
- } // End of the function
- function ctJoinCB(s)
- {
- classes.Control.serverUnlock();
- switch (s)
- {
- case 1:
- {
- classes.Control.ctourneyMC.gotoAndPlay("computerPreQualification");
- break;
- }
- case 0:
- {
- _root.displayAlert("warning", "Tournament Error", "Sorry, the tournament you selected does not exist.");
- break;
- }
- case -1:
- {
- _root.displayAlert("warning", "Tournament Error", "Sorry, the tournament you selected is temporarily unavailable.");
- break;
- }
- } // End of switch
- } // End of the function
- function ctCreate(k, bt, acid)
- {
- _global.chatObj.raceObj = new Object();
- _global.chatObj.raceObj.bt = bt;
- _global.chatObj.raceObj.myObj = new Object();
- var _loc2 = _global.chatObj.raceObj.myObj;
- _loc2.cid = acid;
- _loc2.id = classes.GlobalData.id;
- _loc2.un = classes.GlobalData.uname;
- _loc2.ti = classes.GlobalData.attr.ti;
- _loc2.tn = classes.GlobalData.attr.tn;
- _loc2.sc = classes.GlobalData.attr.sc;
- _loc2.bt = bt;
- _global.chatObj.raceObj.r1Obj = _global.chatObj.raceObj.myObj;
- getURL("lingo: executeCall \"ctct\" \"k=" + escape(k) + "&bt=" + bt + "&acid=" + acid + "\"", "");
- } // End of the function
- function CB_getTwoRacersCars(txml)
- {
- _global.chatObj.twoRacersCarsXML = txml;
- classes.Control.ctourneyMC.gotoAndPlay("qualifyTrack");
- } // End of the function
- function ctCreateCB(s)
- {
- if (s == 1)
- {
- classes.Lookup.addCallback("raceGetTwoRacersCars", this, CB_getTwoRacersCars, _global.chatObj.raceObj.myObj.cid);
- _root.raceGetTwoRacersCars(_global.chatObj.raceObj.myObj.cid, 0);
- }
- else if (s == -1)
- {
- _root.displayAlert("warning", "Wrong Number", "Sorry, the number you put on your car is wrong. Please try again.");
- }
- else if (s == -2)
- {
- _root.displayAlert("warning", "Disqualified", "Sorry, the tournament has started without you. Please rejoin the tournament.");
- }
- else if (s == -3)
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected is impounded.");
- }
- else if (s == -4)
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected is locked.");
- }
- else if (s == -5)
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected is not yours.");
- }
- else if (s == -6)
- {
- _root.markTestDriveExpiredAndDisplayWarning();
- }
- else
- {
- _root.displayAlert("warning", "Tournament Error", "Sorry, the tournament you selected is temporarily unavailable.");
- } // end else if
- } // End of the function
- function ctRequest(caid)
- {
- getURL("lingo: executeCall \"ctrt\" \"caid=" + caid + "\"", "");
- } // End of the function
- function ctRequestCB(s, d, b)
- {
- if (s == 1)
- {
- var _loc2 = new XML(d);
- classes.Control.ctourneyMC.CB_ctRequest(_loc2, Number(b));
- }
- else
- {
- _root.displayAlert("warning", "Tournament Error", "Sorry, the tournament you selected is temporarily unavailable.");
- } // end else if
- } // End of the function
- function ctSaveCB(s, d)
- {
- if (s == 1)
- {
- var _loc3 = new XML(d);
- var _loc2 = Number(_loc3.firstChild.attributes.b);
- switch (Number(_loc3.firstChild.attributes.w))
- {
- case 0:
- {
- classes.Control.ctourneyMC.goLoserPage();
- classes.Control.setMapButton("nonrace");
- break;
- }
- case 1:
- {
- classes.GlobalData.updateInfo("m", Number(classes.GlobalData.attr.m) + _loc2);
- classes.Control.ctourneyMC.goWinOneAndContinue(_loc2);
- break;
- }
- case 2:
- {
- classes.GlobalData.updateInfo("m", Number(classes.GlobalData.attr.m) + _loc2);
- classes.Control.ctourneyMC.goWinnerPage(_loc2);
- classes.Control.setMapButton("nonrace");
- break;
- }
- } // End of switch
- }
- else
- {
- _root.displayAlert("warning", "Tournament Error", "Sorry, the tournament you selected is temporarily unavailable.");
- } // end else if
- } // End of the function
- function ctStartAnimateComputerCB()
- {
- classes.RacePlay._MC.tripWire(_global.chatObj.raceObj.oppObj.id, _global.chatObj.raceObj.oppObj.rt);
- _global.chatObj.raceObj.oppObj.startTS = new Date();
- } // End of the function
- function ctFinishCB(et, ts)
- {
- classes.Control.ctourneyMC.finishCompRace(et, ts);
- } // End of the function
- function practiceCreate(acid)
- {
- classes.GlobalData.currentAccountCarID = acid;
- if (classes.Control.serverAvail())
- {
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"practice\" \"acid=" + acid + "\"", "");
- } // end if
- } // End of the function
- function practiceCreateCB(s)
- {
- function CB_getTwoRacersCars(pxml)
- {
- classes.mc.TrackPractice._mc.resetTrack();
- } // End of the function
- classes.Frame.serverLights(false);
- classes.Control.serverUnlock();
- if (s == 1)
- {
- classes.Lookup.addCallback("raceGetTwoRacersCars", this, CB_getTwoRacersCars, String(classes.GlobalData.currentAccountCarID));
- _root.raceGetTwoRacersCars(classes.GlobalData.currentAccountCarID);
- }
- else if (s == -1)
- {
- if (classes.GlobalData.priorSelectedCarID)
- {
- _root.updateDefaultCar(classes.GlobalData.priorSelectedCarID);
- classes.mc.TrackPractice._mc.selCarID = classes.GlobalData.priorSelectedCarID;
- classes.mc.TrackPractice._mc.selCarXML = new XML(classes.GlobalData.getSelectedCarXML().toString());
- } // end if
- _root.markTestDriveExpiredAndDisplayWarning();
- } // end else if
- } // End of the function
- function practiceFinishCB(et, ts)
- {
- classes.mc.TrackPractice._mc.finishRace(et, ts);
- } // End of the function
- function garageDynoBuy(acid)
- {
- if (classes.Control.serverAvail())
- {
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"buydyno\", \"acid=" + acid + "\"", "");
- } // end if
- } // End of the function
- function garageDynoBuyCB(s, b, bs, mp, cs, sl, rl)
- {
- classes.Frame.serverLights(false);
- classes.Control.serverUnlock();
- switch (s)
- {
- case 1:
- {
- classes.GlobalData.updateInfo("m", b);
- garageDynoMC.boostSetting = Number(bs);
- garageDynoMC.maxPsi = Number(mp);
- garageDynoMC.chipSetting = garageDynoMC.AFMeter = Number(cs);
- classes.GlobalData.shiftLightGaugeRPM = Number(sl);
- garageDynoMC.redLine = Number(rl);
- garageDynoMC.gotoAndStop("dynoReady");
- break;
- }
- case 0:
- {
- _root.displayAlert("warning", "Car not Available", "Sorry, we cannot locate the car for the dyno.");
- break;
- }
- case -2:
- {
- _root.displayAlert("warning", "Insufficient Funds", "Sorry, you do not have enough in your balance to pay for a dyno session.");
- break;
- }
- case -3:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected to buy the dyno for is impounded.");
- break;
- }
- case -4:
- {
- _root.markTestDriveExpiredAndDisplayWarning();
- break;
- }
- } // End of switch
- } // End of the function
- function garageDynoBuySession(acid, m)
- {
- getURL("lingo: executeCall \"buydyno\", \"acid=" + acid + "\"", "");
- } // End of the function
- function garageDynoBuySessionCB(s, b)
- {
- if (s == 2)
- {
- classes.GlobalData.updateInfo("p", b);
- garageDynoMC.gotoAndStop("dynoReady");
- garageDynoMC.populateSessionSwatch();
- }
- else if (s == 1)
- {
- classes.GlobalData.updateInfo("m", b);
- garageDynoMC.gotoAndStop("dynoReady");
- }
- else if (s == -50)
- {
- _root.displayAlert("triangle", "Account Locked", "Sorry, you left a race that is still in progress. Your account is temporarily locked until the race is finished. This may take moment.");
- }
- else
- {
- _root.displayAlert("warning", "Insufficient Funds", "Sorry, you do not have enough in your balance to pay for dyno run.");
- } // end else if
- } // End of the function
- function garageDynoRun(boost, chip)
- {
- getURL("lingo: runEngineDyno " + boost + ", " + chip, "");
- } // End of the function
- function garageDynoRunCB(strTorque, strFlow, strRatio, strMaxIcon)
- {
- var _loc2 = strTorque.split(",");
- var _loc4 = strFlow.split(",");
- var _loc5 = strRatio.split(",");
- var _loc3 = strMaxIcon.split(",");
- for (var _loc1 = 0; _loc1 < _loc2.length; ++_loc1)
- {
- _loc2[_loc1] = Number(_loc2[_loc1]);
- _loc4[_loc1] = Number(_loc4[_loc1]);
- _loc5[_loc1] = Number(_loc5[_loc1]);
- _loc3[_loc1] = Number(_loc3[_loc1]);
- } // end of for
- garageDynoMC.drawDyno(_loc2, _loc4, _loc5, _loc3);
- } // End of the function
- function garageDynoLoad()
- {
- getURL("lingo: loadDyno");
- } // End of the function
- function garageDynoLoadCB(n, strTorque, strFlow, strRatio, strMaxIcon)
- {
- var _loc2 = strTorque.split(",");
- var _loc4 = strFlow.split(",");
- var _loc5 = strRatio.split(",");
- var _loc3 = strMaxIcon.split(",");
- for (var _loc1 = 0; _loc1 < _loc2.length; ++_loc1)
- {
- _loc2[_loc1] = Number(_loc2[_loc1]);
- _loc4[_loc1] = Number(_loc4[_loc1]);
- _loc5[_loc1] = Number(_loc5[_loc1]);
- _loc3[_loc1] = Number(_loc3[_loc1]);
- } // end of for
- garageDynoMC.drawDyno(_loc2, _loc4, _loc5, _loc3, n);
- } // End of the function
- function garageDynoSave(aryDyno, aryAir, aryRatio, aryMaxIcon)
- {
- getURL("lingo: saveDyno \"" + aryDyno.toString() + "\", \"" + aryAir.toString() + "\", \"" + aryRatio.toString() + "\", \"" + aryMaxIcon.toString() + "\"", "");
- } // End of the function
- function garageDynoSaveCB(n)
- {
- garageDynoMC.saveDynoInfoCallback(n);
- } // End of the function
- function garageSetBoost(acid, b)
- {
- getURL("lingo: executeCall \"changeboost\", \"acid=" + acid + "&bs=" + b + "\"", "");
- } // End of the function
- function garageSetBoostCB(s)
- {
- switch (s)
- {
- case 1:
- {
- break;
- }
- case 0:
- {
- _root.displayAlert("warning", "No Controller", "Sorry, you do not have a boost controller to adjust your boost.");
- break;
- }
- case -1:
- {
- _root.displayAlert("warning", "Invalid Value", "Sorry, the boost you entered is invalid.");
- break;
- }
- case -2:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected is impounded.");
- break;
- }
- case -3:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected is locked.");
- break;
- }
- case -4:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected is not yours.");
- break;
- }
- } // End of switch
- } // End of the function
- function garageSetAFRatio(acid, af)
- {
- getURL("lingo: executeCall \"changeairfuel\", \"acid=" + acid + "&af=" + af + "\"", "");
- } // End of the function
- function garageSetAFRatioCB(s)
- {
- switch (s)
- {
- case 1:
- {
- break;
- }
- case 0:
- {
- _root.displayAlert("warning", "No Controller", "Sorry, you do not have a Full Engine Management to adjust your air to fuel ratio.");
- break;
- }
- case -1:
- {
- _root.displayAlert("warning", "Invalid Value", "Sorry, the air to fuel ratio you entered is invalid.");
- break;
- }
- case -2:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected is impounded.");
- break;
- }
- case -3:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected is locked.");
- break;
- }
- case -4:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected is not yours.");
- break;
- }
- } // End of switch
- } // End of the function
- function garageSetShiftLightRPM(acid, b)
- {
- getURL("lingo: executeCall \"changeshiftlightrpm\", \"acid=" + acid + "&slr=" + b + "\"", "");
- } // End of the function
- function garageSetShiftLightRPMCB(s, r)
- {
- switch (s)
- {
- case 1:
- {
- break;
- }
- case 0:
- {
- _root.displayAlert("warning", "No Indicator", "Sorry, you do not have a shift light indicator.");
- break;
- }
- case -1:
- {
- _root.displayAlert("warning", "Invalid Value", "Sorry, the rpm you entered is invalid.");
- break;
- }
- case -2:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected is impounded.");
- break;
- }
- case -3:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected is locked.");
- break;
- }
- case -4:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected is not yours.");
- break;
- }
- case -5:
- {
- _root.displayAlert("warning", "Database Error", "I\'m sorry, there was an error accessing your info in the database.");
- break;
- }
- case -6:
- {
- _root.displayAlert("warning", "Database Error", "I\'m sorry, but there was an error loading your engine.");
- break;
- }
- } // End of switch
- } // End of the function
- function htGetTournaments()
- {
- if (classes.Control.serverAvail())
- {
- getURL("lingo: executeCall \"gethumantournaments\"");
- } // end if
- } // End of the function
- function htGetTournamentsCB(s, d)
- {
- classes.Control.serverUnlock();
- if (s == 1)
- {
- classes.Control.tourneyMenuMC.eventListXML = new XML();
- classes.Control.tourneyMenuMC.eventListXML.ignoreWhite = true;
- classes.Control.tourneyMenuMC.eventListXML.parseXML(d);
- } // end if
- classes.Control.tourneyMenuMC.gotoAndPlay("listing");
- } // End of the function
- function htJoinTournament(k, bt, acid, tid, pt)
- {
- if (classes.Control.serverAvail())
- {
- _global.htJoinTournamentBT = bt;
- _global.htJoinTournamentACID = acid;
- getURL("lingo: executeCall \"joinhumantournament\", \"acid=" + acid + "&tid=" + tid + "&pt=" + pt + "&bt=" + bt + "&k=" + k + "\"", "");
- } // end if
- } // End of the function
- function htJoinTournamentCB(s, b, d)
- {
- classes.Control.serverUnlock();
- if (s == 1)
- {
- classes.Control.dialogClose();
- classes.GlobalData.updateInfo("p", b);
- _global.sectionTrackMC.gotoAndPlay("humanTourney");
- }
- else if (s == 2)
- {
- classes.Control.dialogClose();
- classes.GlobalData.updateInfo("m", b);
- _global.sectionTrackMC.gotoAndPlay("humanTourney");
- }
- else if (s == -27)
- {
- delete _global.htJoinTournamentBT;
- delete _global.htJoinTournamentACID;
- _root.markTestDriveExpiredAndDisplayWarning();
- }
- else
- {
- delete _global.htJoinTournamentBT;
- delete _global.htJoinTournamentACID;
- _root.displayAlert("warning", "Tournament Error", d);
- } // end else if
- } // End of the function
- function putCarOnClassified(acid, p, pw, t)
- {
- if (!acid)
- {
- putCarOnClassifiedCB(0, "<n2 e=\"This car is invalid. (System error. Please report code CL760.)\" />");
- return;
- } // end if
- if (!p)
- {
- p = 0;
- } // end if
- if (!pw.length)
- {
- pw = "";
- } // end if
- if (!t)
- {
- t = 0;
- } // end if
- getURL("lingo: executeCall \"putcaronclassified\", \"acid=" + acid + "&p=" + p + "&pw=" + escape(pw) + "&t=" + t + "\"", "");
- } // End of the function
- function putCarOnClassifiedCB(s, d)
- {
- var _loc1 = new XML();
- _loc1.ignoreWhite = true;
- _loc1.parseXML(d);
- if (s == 1)
- {
- classes.GlobalData.updateInfo("m", Number(_loc1.firstChild.attributes.ub));
- } // end if
- classes.Control.currentDialog.s = s;
- classes.Control.currentDialog.msg = _loc1.firstChild.attributes.e;
- classes.Control.currentDialog.newClassifiedID = _loc1.firstChild.attributes.i;
- classes.Control.currentDialog.gotoAndStop("finished");
- } // End of the function
- function listClassified(cid, et, p)
- {
- if (!cid)
- {
- cid = 0;
- } // end if
- if (!et)
- {
- et = 0;
- } // end if
- if (!p)
- {
- p = 1;
- } // end if
- getURL("lingo: executeCall \"listclassified\", \"cid=" + cid + "&et=" + et + "&p=" + p + "\"", "");
- } // End of the function
- function listClassifiedCB(d)
- {
- classes.SectionClassified._mc.listingGroup.buildList(d);
- } // End of the function
- function getClassifiedDetail(cid)
- {
- if (!cid)
- {
- getClassifiedDetailCB(0, "<n2 e=\"This listing is invalid. (System error. Please report code CL228.)\" />");
- return;
- } // end if
- getURL("lingo: executeCall \"getclassifieddetail\", \"cid=" + cid + "\"", "");
- } // End of the function
- function getClassifiedDetailCB(s, d)
- {
- if (s == 1)
- {
- classes.SectionClassified._mc.detail.build(d);
- }
- else
- {
- var _loc1 = new XML();
- _loc1.ignoreWhite = true;
- _loc1.parseXML(d);
- classes.Control.dialogTextBrief("Error", _loc1.firstChild.attributes.e, "warning");
- classes.SectionClassified._mc.closeDetail();
- } // end else if
- } // End of the function
- function buyFromClassified(cid, p)
- {
- if (!cid)
- {
- buyFromClassifiedCB(0, "<n2 e=\"This listing is invalid. (System error. Please report code CL870.)\" />");
- return;
- } // end if
- getURL("lingo: executeCall \"buyfromclassified\", \"cid=" + cid + "&p=" + escape(p) + "\"", "");
- } // End of the function
- function buyFromClassifiedCB(s, d)
- {
- var _loc1 = new XML();
- _loc1.ignoreWhite = true;
- _loc1.parseXML(d);
- if (s == 1)
- {
- classes.GlobalData.updateInfo("m", Number(_loc1.firstChild.attributes.ub));
- } // end if
- classes.Control.currentDialog.s = s;
- classes.Control.currentDialog.msg = _loc1.firstChild.attributes.e;
- classes.Control.currentDialog.gotoAndStop("finished");
- } // End of the function
- function sellerClassifiedHistory()
- {
- getURL("lingo: executeCall \"classifiedhistory\"");
- } // End of the function
- function sellerClassifiedHistoryCB(d)
- {
- classes.SectionClassified._mc.myListingsGroup.buildList(d);
- } // End of the function
- function cancelClassified(cid)
- {
- if (!cid)
- {
- cancelClassifiedCB(0, "<n2 e=\"Listing is invalid. (System error. Please report code CL239.)\" />");
- return;
- } // end if
- getURL("lingo: executeCall \"cancelclassified\", \"cid=" + cid + "\"", "");
- } // End of the function
- function cancelClassifiedCB(s, d)
- {
- var _loc1 = new XML();
- _loc1.ignoreWhite = true;
- _loc1.parseXML(d);
- if (s == 1)
- {
- classes.SectionClassified._mc.gotoAndPlay("trade");
- classes.GlobalData.updateCarAttr(Number(_loc1.firstChild.attributes.i), "lk", 0);
- classes.Control.dialogTextBrief("Listing Retracted", "You have canceled this listing, so it has been removed from Used Cars. If this car was impounded, it will remain impounded. Otherwise, you can now race with this car again.", "key");
- }
- else
- {
- classes.Control.dialogTextBrief("Error", _loc1.firstChild.attributes.e, "warning");
- classes.SectionClassified._mc.closeDetail();
- } // end else if
- } // End of the function
- function requestTrade(cid1, cid2, p)
- {
- if (!cid1 || !cid2)
- {
- requestTradeCB(0, "<n2 e=\"Two used car listing ID\'s are required to make a trade offer. Please try again.\" />");
- return;
- } // end if
- getURL("lingo: executeCall \"requesttrade\", \"cid1=" + cid1 + "&cid2=" + cid2 + "&p=" + escape(p) + "\"", "");
- } // End of the function
- function requestTradeCB(s, d)
- {
- var _loc1 = new XML();
- _loc1.ignoreWhite = true;
- _loc1.parseXML(d);
- classes.Control.currentDialog.s = s;
- classes.Control.currentDialog.msg = _loc1.firstChild.attributes.e;
- classes.Control.currentDialog.gotoAndStop("finished");
- } // End of the function
- function respondTrade(cid1, cid2, a)
- {
- if (!cid1 || !cid2)
- {
- respondTradeCB(0, "<n2 e=\"Trade offer cannot be found. (System error. Please report code CL283.)\" />");
- return;
- } // end if
- if (!a)
- {
- a = 0;
- } // end if
- getURL("lingo: executeCall \"respondtrade\", \"cid1=" + cid1 + "&cid2=" + cid2 + "&a=" + a + "\"", "");
- } // End of the function
- function respondTradeCB(s, d)
- {
- var _loc2 = new XML();
- _loc2.ignoreWhite = true;
- _loc2.parseXML(d);
- if (s == 1)
- {
- if (_loc2.firstChild.attributes.a == 1)
- {
- classes.GlobalData.updateInfo("m", Number(_loc2.firstChild.attributes.ub));
- _root.getCars();
- classes.Control.dialogTextBrief("Trade Succeeded", "The trade has been made! Your new car is now in your garage. Your old car has been removed from your garage and has been given to the other party.", "keyPlus");
- } // end if
- classes.SectionClassified._mc.gotoAndPlay("trade");
- }
- else
- {
- classes.Control.dialogTextBrief("Error", _loc2.firstChild.attributes.e, "warning");
- } // end else if
- } // End of the function
- function cancelTrade(cid1, cid2)
- {
- if (!cid1 || !cid2)
- {
- cancelTradeCB(0, "<n2 e=\"Trade offer cannot be found. (System error. Please report code CL196.)\" />");
- return;
- } // end if
- getURL("lingo: executeCall \"canceltrade\", \"cid1=" + cid1 + "&cid2=" + cid2 + "\"", "");
- } // End of the function
- function cancelTradeCB(s, d)
- {
- if (s == 1)
- {
- classes.SectionClassified._mc.closeDetail();
- classes.SectionClassified._mc.gotoAndPlay("trade");
- }
- else
- {
- var _loc1 = new XML();
- _loc1.ignoreWhite = true;
- _loc1.parseXML(d);
- classes.Control.dialogTextBrief("Error", _loc1.firstChild.attributes.e, "warning");
- } // end else if
- } // End of the function
- function pendingTrades(cid)
- {
- if (!cid)
- {
- return;
- } // end if
- getURL("lingo: executeCall \"getpendingtrades\", \"cid=" + cid + "\"", "");
- } // End of the function
- function pendingTradesCB(d)
- {
- classes.mc.UCIncomingTrades._mc.buildList(d);
- } // End of the function
- function outgoingTradeHistory()
- {
- getURL("lingo: executeCall \"getoutgoingtradehistory\"");
- } // End of the function
- function outgoingTradeHistoryCB(d)
- {
- classes.SectionClassified._mc.myTradesGroup.buildList(d);
- } // End of the function
- function claimPendingUCLProfit()
- {
- getURL("lingo: executeCall \"claimpendinguclprofit\"");
- } // End of the function
- function claimPendingUCLProfitCB(s, d)
- {
- var _loc2 = new XML(d);
- if (s == 0)
- {
- var _loc3 = _loc2.firstChild.attributes.e;
- _root.displayAlert("warning", "Error", _loc3);
- }
- else if (s == -1)
- {
- _root.displayAlert("warning", "Warning", "There were no sold cars to deposit money for");
- } // end else if
- } // End of the function
- function uggGetPartID(catID)
- {
- for (var _loc2 = 0; _loc2 < _global.partXML.firstChild.childNodes.length; ++_loc2)
- {
- if (_global.partXML.firstChild.childNodes[_loc2].attributes.pi == catID)
- {
- return (Number(_global.partXML.firstChild.childNodes[_loc2].attributes.i));
- break;
- } // end if
- } // end of for
- return (0);
- } // End of the function
- function uggUpload(acid, pathHood, pathSide, pathFront, pathBack)
- {
- _global.uggUploadObj = new Object();
- _global.uggUploadObj.selectedCar = Number(acid);
- if (!pathHood.length || pathHood == "" || pathHood == "undefined")
- {
- pathHood = "";
- } // end if
- if (!pathSide.length || pathSide == "" || pathSide == "undefined")
- {
- pathSide = "";
- } // end if
- if (!pathFront.length || pathFront == "" || pathFront == "undefined")
- {
- pathFront = "";
- } // end if
- if (!pathBack.length || pathBack == "" || pathBack == "undefined")
- {
- pathBack = "";
- } // end if
- getURL("lingo: uggUpload \"" + pathHood + "\", \"" + pathSide + "\", \"" + pathFront + "\", \"" + pathBack + "\"", "");
- } // End of the function
- function uggUploadCB(s, d)
- {
- _global.uggUploadObj.uggInstallArr = new Array();
- if (s == 1)
- {
- var _loc4 = new XML();
- _loc4.ignoreWhite = true;
- _loc4.parseXML(d);
- var _loc3;
- if (_loc4.firstChild.attributes.h)
- {
- _loc3 = uggGetPartID(160);
- if (_loc3)
- {
- _global.uggUploadObj.uggInstallArr.push(["Hood", "lingo: executeCall \"buypartugg\", \"acid=" + _global.uggUploadObj.selectedCar + "&pid=" + _loc3 + "&did=" + _loc4.firstChild.attributes.h + "&pt=p&pvid=&c=\""]);
- } // end if
- } // end if
- if (_loc4.firstChild.attributes.s)
- {
- _loc3 = uggGetPartID(161);
- if (_loc3)
- {
- _global.uggUploadObj.uggInstallArr.push(["Side", "lingo: executeCall \"buypartugg\", \"acid=" + _global.uggUploadObj.selectedCar + "&pid=" + _loc3 + "&did=" + _loc4.firstChild.attributes.s + "&pt=p&pvid=&c=\""]);
- } // end if
- } // end if
- if (_loc4.firstChild.attributes.f)
- {
- _loc3 = uggGetPartID(162);
- if (_loc3)
- {
- _global.uggUploadObj.uggInstallArr.push(["Front", "lingo: executeCall \"buypartugg\", \"acid=" + _global.uggUploadObj.selectedCar + "&pid=" + _loc3 + "&did=" + _loc4.firstChild.attributes.f + "&pt=p&pvid=&c=\""]);
- } // end if
- } // end if
- if (_loc4.firstChild.attributes.b)
- {
- _loc3 = uggGetPartID(163);
- if (_loc3)
- {
- _global.uggUploadObj.uggInstallArr.push(["Back", "lingo: executeCall \"buypartugg\", \"acid=" + _global.uggUploadObj.selectedCar + "&pid=" + _loc3 + "&did=" + _loc4.firstChild.attributes.b + "&pt=p&pvid=&c=\""]);
- } // end if
- } // end if
- if (_global.uggUploadObj.uggInstallArr.length > 0)
- {
- uggBuyCycleCB();
- }
- else
- {
- _root.abc.contentMC.gotoAndStop("done");
- _root.abc.contentMC.msg = "Sorry, some kind of error occurred, which caused the process to fail.";
- } // end else if
- }
- else
- {
- _root.abc.contentMC.gotoAndStop("done");
- _root.abc.contentMC.msg = "Sorry, some kind of error occurred, which caused the process to fail.";
- } // end else if
- } // End of the function
- function uggBuyCycleCB(d1, d2)
- {
- _root.abc.contentMC.gotoAndStop("installing");
- var _loc7 = new XML(d1);
- if (d1.length)
- {
- if (_loc7.firstChild.attributes.s == 0)
- {
- _root.abc.contentMC.gotoAndStop("done");
- _root.abc.contentMC.msg = "Sorry, some kind of error occurred, which caused the process to fail.";
- return;
- } // end if
- var _loc6 = new XML(d1);
- var _loc4 = Number(_loc6.firstChild.attributes.b);
- if (!_global.uggUploadObj.newBal || _loc4 <= _global.uggUploadObj.newBal)
- {
- _global.uggUploadObj.newBal = _loc4;
- } // end if
- } // end if
- if (_global.uggUploadObj.uggInstallArr.length)
- {
- getURL(_global.uggUploadObj.uggInstallArr[0][1], "");
- _global.uggUploadObj.uggInstallArr.shift();
- }
- else
- {
- classes.Lookup.addCallback("getOneCar", this, uggUpdateCarCB, String(_global.uggUploadObj.selectedCar));
- _root.getOneCar(_global.uggUploadObj.selectedCar);
- if (_global.uggUploadObj.newBal != undefined)
- {
- classes.GlobalData.updateInfo("p", _global.uggUploadObj.newBal);
- delete _global.uggUploadObj.newBal;
- } // end if
- delete _global.uggUploadObj.uggInstallArr;
- delete _global.uggUploadObj;
- } // end else if
- } // End of the function
- function uggUpdateCarCB(carXML)
- {
- var _loc4 = Number(carXML.firstChild.firstChild.attributes.i);
- var _loc3;
- for (var _loc3 = 0; _loc3 < _global.garageXML.firstChild.childNodes.length; ++_loc3)
- {
- if (_loc4 == _global.garageXML.firstChild.childNodes[_loc3].attributes.i)
- {
- _global.garageXML.firstChild.childNodes[_loc3].removeNode();
- break;
- } // end if
- } // end of for
- if (_loc3 < _global.garageXML.firstChild.childNodes.length - 1)
- {
- _global.garageXML.firstChild.insertBefore(carXML.firstChild.firstChild, _global.garageXML.firstChild.childNodes[_loc3]);
- }
- else
- {
- _global.garageXML.firstChild.appendChild(carXML.firstChild.firstChild);
- } // end else if
- _global.shopPartsMC.cloneGarageCar();
- _global.shopUGGGroup.init();
- _global.shopPartsMC.initUGGPurchase();
- _root.abc.contentMC.gotoAndStop("done");
- classes.Lookup.removeFromRaceCarsXML(_loc4);
- _root.abc.contentMC.msg = "Graphics purchase and installation complete! " + _root.abc.uggCost + " points have been deducted from your account.";
- } // End of the function
- function downloadUgg(finalLocalPath, requestingCarMC)
- {
- var _loc6 = finalLocalPath.split("/");
- var _loc3 = _loc6.pop();
- if (_loc3.length)
- {
- if (!_global.downloadUggArray)
- {
- _global.downloadUggArray = new Array();
- } // end if
- var _loc4;
- for (var _loc2 = 0; _loc2 < _global.downloadUggArray.length; ++_loc2)
- {
- if (_global.downloadUggArray[_loc2][0] == _loc3)
- {
- _loc4 = true;
- break;
- } // end if
- } // end of for
- var _loc5 = new Array(_loc3, requestingCarMC);
- _global.downloadUggArray.push(_loc5);
- if (!_loc4)
- {
- getURL("lingo: downloadUgg \"" + _loc3 + "\"", "");
- } // end if
- } // end if
- } // End of the function
- function downloadUggCB(filename, isAvailable)
- {
- var _loc4 = filename.split("_")[0];
- for (var _loc2 = 0; _loc2 < _global.downloadUggArray.length; ++_loc2)
- {
- if (_global.downloadUggArray[_loc2][0] == filename)
- {
- _global.downloadUggArray[_loc2][1].uggOnRetrieve(_loc4, isAvailable);
- _global.downloadUggArray.splice(_loc2, 1);
- --_loc2;
- } // end if
- } // end of for
- } // End of the function
- function twitterLogin(username, password, command)
- {
- var _loc1 = new LoadVars();
- _loc1.twu = username;
- _loc1.twp = password;
- _loc1.twc = command;
- getURL("lingo: executeCall \"logintwitter\", \"" + _loc1.toString() + "\"", "");
- } // End of the function
- function loginTwitterCB(s, u)
- {
- _global.homeTwitterAccountMC.visible = true;
- _global.twitterName = u;
- if (s == 1)
- {
- _global.homeTwitterAccountMC.gotoAndStop("loggedIn");
- }
- else if (s == 2)
- {
- _global.homeTwitterAccountMC.gotoAndStop("disable");
- }
- else if (s == 3)
- {
- _global.homeTwitterAccountMC.gotoAndStop("enable");
- }
- else if (s == 4)
- {
- _global.homeTwitterAccountMC.gotoAndStop("login");
- }
- else if (s == 5)
- {
- _global.homeTwitterAccountMC.gotoAndStop("disable");
- }
- else if (s == 6)
- {
- _global.homeTwitterAccountMC.gotoAndStop("enable");
- }
- else if (s == -7)
- {
- _root.displayAlert("warning", "Disabled", "This feature has been temporarily disabled.");
- }
- else
- {
- _root.displayAlert("warning", "Failed Login", "Sorry, your login failed.");
- } // end else if
- } // End of the function
- function setBadgeVisible(badgeID, visible)
- {
- var _loc1 = new LoadVars();
- var _loc2 = 0;
- if (visible == true)
- {
- _loc2 = 1;
- } // end if
- _loc1.vis = _loc2;
- _loc1.bid = badgeID;
- getURL("lingo: executeCall \"setbadgevisible\", \"" + _loc1.toString() + "\"", "");
- } // End of the function
- function setBadgeVisibleCB(s)
- {
- } // End of the function
- function getElectionPhase(id)
- {
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"getelectionphase\", \"i=" + id + "\"", "");
- } // End of the function
- function getElectionPhaseCB(s, phase, timeRemainingInPhase, i)
- {
- classes.Frame.serverLights(false);
- var _loc1 = new Object();
- _loc1.phase = phase;
- _loc1.secsRemaining = timeRemainingInPhase;
- _loc1.activeElection = s;
- classes.Lookup.runCallback("setElectionPhase", String(i), _loc1);
- } // End of the function
- function getElectionSchedule()
- {
- getURL("lingo: executeCall \"getelectionschedule\"");
- classes.Frame.serverLights(true);
- } // End of the function
- function getElectionScheduleCB(d)
- {
- classes.Frame.serverLights(false);
- var _loc8 = new XML(d);
- var _loc1 = new classes.ElectionSchedule();
- var _loc11 = new Date();
- for (var _loc6 = 0; _loc6 < _loc8.firstChild.childNodes.length; ++_loc6)
- {
- var _loc7 = _loc8.firstChild.childNodes[_loc6].childNodes[0].nodeValue;
- var _loc3;
- var _loc2;
- if (_loc8.firstChild.childNodes[_loc6].nodeName != "q" && _loc8.firstChild.childNodes[_loc6].nodeName != "nomdates" && _loc8.firstChild.childNodes[_loc6].nodeName != "eliminationdates" && _loc8.firstChild.childNodes[_loc6].nodeName != "finalvotedates")
- {
- _loc3 = new Date(Number(_loc7) * 1000);
- _loc2 = new Date(_loc3.getUTCFullYear(), _loc3.getUTCMonth(), _loc3.getUTCDate(), _loc3.getUTCHours(), _loc3.getUTCMinutes(), _loc3.getUTCSeconds(), _loc3.getUTCMilliseconds());
- } // end if
- switch (_loc8.firstChild.childNodes[_loc6].nodeName)
- {
- case "q":
- {
- _loc1.quarter = Number(_loc7);
- break;
- }
- case "nomdates":
- {
- _loc1.nomDates = _loc7;
- break;
- }
- case "eliminationdates":
- {
- _loc1.eliminationDates = _loc7;
- break;
- }
- case "finalvotedates":
- {
- _loc1.finalVoteDates = _loc7;
- break;
- }
- case "currentdate":
- {
- _loc1.currentDate = _loc2;
- break;
- }
- case "promobeg":
- {
- _loc1.promoBeg = _loc2;
- break;
- }
- case "promoend":
- {
- _loc1.promoEnd = _loc2;
- break;
- }
- case "nomclosedbeg":
- {
- _loc1.nomClosedBeg = _loc2;
- break;
- }
- case "nomclosedend":
- {
- _loc1.nomClosedEnd = _loc2;
- break;
- }
- case "nomannouncebeg":
- {
- _loc1.nomAnnounceBeg = _loc2;
- break;
- }
- case "nomannounceend":
- {
- _loc1.nomAnnounceEnd = _loc2;
- break;
- }
- case "nombeg":
- {
- _loc1.nomBeg = _loc2;
- break;
- }
- case "nomend":
- {
- _loc1.nomEnd = _loc2;
- break;
- }
- case "voting":
- {
- for (var _loc10 = 0; _loc10 < _loc8.firstChild.childNodes[_loc6].childNodes.length; ++_loc10)
- {
- var _loc9 = _loc8.firstChild.childNodes[_loc6].childNodes[_loc10];
- var _loc4 = Number(_loc8.firstChild.childNodes[_loc6].childNodes[_loc10].nodeName);
- _loc1.votingRounds[_loc4] = new Object();
- for (var _loc5 = 0; _loc5 < _loc9.childNodes.length; ++_loc5)
- {
- _loc7 = _loc9.childNodes[_loc5].childNodes[0].nodeValue;
- _loc3 = new Date(Number(_loc7) * 1000);
- _loc2 = new Date(_loc3.getUTCFullYear(), _loc3.getUTCMonth(), _loc3.getUTCDate(), _loc3.getUTCHours(), _loc3.getUTCMinutes(), _loc3.getUTCSeconds(), _loc3.getUTCMilliseconds());
- switch (_loc9.childNodes[_loc5].nodeName)
- {
- case "interviewbeg":
- {
- _loc1.votingRounds[_loc4].interviewBeg = _loc2;
- break;
- }
- case "interviewend":
- {
- _loc1.votingRounds[_loc4].interviewEnd = _loc2;
- break;
- }
- case "votingbeg":
- {
- _loc1.votingRounds[_loc4].votingBeg = _loc2;
- break;
- }
- case "votingend":
- {
- _loc1.votingRounds[_loc4].votingEnd = _loc2;
- break;
- }
- case "votingclosedbeg":
- {
- _loc1.votingRounds[_loc4].votingClosedBeg = _loc2;
- break;
- }
- case "votingclosedend":
- {
- _loc1.votingRounds[_loc4].votingClosedEnd = _loc2;
- break;
- }
- case "votingresults":
- {
- _loc1.votingRounds[_loc4].votingResults = _loc2;
- }
- } // End of switch
- } // end of for
- } // end of for
- }
- } // End of switch
- } // end of for
- classes.SectionModElection.MC.takeElectionSchedule(_loc1);
- } // End of the function
- function getNominateCount()
- {
- getURL("lingo: executeCall \"getnominatecount\"");
- classes.Frame.serverLights(true);
- } // End of the function
- function getNominateCountCB(c)
- {
- classes.Frame.serverLights(false);
- classes.SectionModElection.MC.takeNomsRemaining(3 - c);
- classes.SectionModElection.MC.startNomination();
- } // End of the function
- function nominate(nomineeAccountID)
- {
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"nominate\", \"nid=" + nomineeAccountID + "\"", "");
- } // End of the function
- function nominateCB(s, e)
- {
- classes.Frame.serverLights(false);
- classes.SectionModElection.MC.takeNominationResult(s, e);
- } // End of the function
- function getElectionResult(phaseId)
- {
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"getelectionresult\", \"pid=" + phaseId + "\"", "");
- } // End of the function
- function getElectionResultCB(d)
- {
- classes.Frame.serverLights(false);
- var _loc2 = new XML(d);
- var _loc7 = Number(_loc2.firstChild.attributes.s);
- if (_loc7 == 0)
- {
- var _loc8 = _loc2.firstChild.childNodes[0].firstChild;
- }
- else
- {
- var _loc3 = new Array();
- var _loc6 = _loc2.firstChild.childNodes.length;
- for (var _loc1 = 0; _loc1 < _loc6; ++_loc1)
- {
- _loc3.push(new Object({i: _loc2.firstChild.childNodes[_loc1].attributes.i, u: _loc2.firstChild.childNodes[_loc1].attributes.u, c: _loc2.firstChild.childNodes[_loc1].attributes.c}));
- } // end of for
- classes.SectionModElection.MC.takeElectionResult(_loc3);
- } // end else if
- } // End of the function
- function electionVote(nomineeAccountID, amount)
- {
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"electionvote\", \"nid=" + nomineeAccountID + "&amt=" + amount + "\"", "");
- } // End of the function
- function electionVoteCB(s, e)
- {
- classes.Frame.serverLights(false);
- if (s == 1)
- {
- classes.GlobalData.updateInfo("m", Number(e));
- } // end if
- classes.SectionModElection.MC.takeVoteResult(s, e);
- } // End of the function
- function getSupport(supportID, supportVars, callID)
- {
- classes.Frame.serverLights(true);
- var _loc2 = new LoadVars();
- _loc2.sid = supportID;
- _loc2.i = callID;
- if (supportVars.email)
- {
- _loc2.em = supportVars.email;
- } // end if
- if (supportVars.offenderUsername)
- {
- _loc2.offun = supportVars.offenderUsername;
- } // end if
- if (supportVars.playerName)
- {
- _loc2.pn = supportVars.playerName;
- } // end if
- if (supportVars.notes1)
- {
- _loc2.n1 = supportVars.notes1;
- } // end if
- if (supportVars.notes2)
- {
- _loc2.n2 = supportVars.notes2;
- } // end if
- getURL("lingo: executeCall \"getsupport\", \"" + _loc2.toString() + "\"", "");
- } // End of the function
- function getSupportCB(s, m, i, t)
- {
- classes.Frame.serverLights(false);
- var _loc1 = new Object();
- _loc1.s = s;
- _loc1.m = m;
- _loc1.t = t;
- classes.Lookup.runCallback("getSupport", String(i), _loc1);
- } // End of the function
- function getMisconductCount(offenderAccountID)
- {
- getURL("lingo: executeCall \"getmisconductcount\", \"oid=" + offenderAccountID + "\"", "");
- } // End of the function
- function getMisconductCountCB(offenderAccountID, newReport, totalBanned)
- {
- var _loc1 = new Object();
- _loc1.id = offenderAccountID;
- _loc1.r = newReport;
- _loc1.b = totalBanned;
- classes.Lookup.runCallback("getMisconductCount", String(offenderAccountID), _loc1);
- } // End of the function
- function fbGetToken()
- {
- getURL("lingo: executeCall \"fbgettoken\"");
- } // End of the function
- function fbGetTokenCB(s)
- {
- if (s == 1)
- {
- classes.Frame._MC.loginGroup.fbTokenSuccess();
- } // end if
- } // End of the function
- function fbGetSession()
- {
- _root.doPreLoginStuff();
- getURL("lingo: executeCall \"fbgetsession\"");
- } // End of the function
- function fbGetSessionCB(s)
- {
- classes.Frame._MC.loginGroup.getSessionCB(s);
- } // End of the function
- function fbRemoveFacebook(password, passwordConfirm)
- {
- var _loc1 = new LoadVars();
- _loc1.npw = password;
- _loc1.npwc = passwordConfirm;
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"fbremovefacebook\", \"" + _loc1.toString() + "\"", "");
- } // End of the function
- function fbRemoveFacebookCB(s)
- {
- _global.clearTimeout(_root.abc.contentMC.sendSI);
- classes.Frame.serverLights(false);
- switch (s)
- {
- case 1:
- {
- classes.GlobalData.facebookConnected = false;
- classes.Console.hideFacebookInviteButton();
- if (classes.HomeAccount._MC.accountSecurity.btnRemoveFacebook)
- {
- classes.HomeAccount._MC.accountSecurity.btnRemoveFacebook._visible = false;
- classes.HomeAccount._MC.accountSecurity.btnRemoveFacebook.onRelease = null;
- } // end if
- _root.abc.contentMC.gotoAndPlay("sent");
- break;
- }
- case 0:
- {
- _root.abc.contentMC.err = "Error creating new password, please try again later.";
- _root.abc.contentMC.gotoAndPlay("error");
- break;
- }
- case -1:
- {
- _root.abc.contentMC.err = "Error disconnecting account from Facebook. Please try again later.";
- _root.abc.contentMC.gotoAndPlay("error");
- break;
- }
- case -3:
- {
- _root.abc.contentMC.err = "Passwords don\'t match, please try again.";
- _root.abc.contentMC.gotoAndPlay("error");
- break;
- }
- case -4:
- {
- _root.abc.contentMC.err = "Password cannot contain spaces.";
- _root.abc.contentMC.gotoAndPlay("error");
- break;
- }
- } // End of switch
- } // End of the function
- function openFBInviteURL()
- {
- if (classes.GlobalData.prefsObj.dev)
- {
- openURL("http://wwwstaging.nittolegends.com/invite.aspx");
- }
- else
- {
- openURL("http://www.nittolegends.com/invite.aspx");
- } // end else if
- } // End of the function
- function clearFB()
- {
- getURL("lingo: clearFB");
- } // End of the function
- function checkTestDrive()
- {
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"checktestdrive\"");
- } // End of the function
- function checkTestDriveCB(s, d)
- {
- classes.Frame.serverLights(false);
- switch (s)
- {
- case 1:
- {
- var _loc1 = new XML(d);
- classes.TestDriveCar.carID = _loc1.firstChild.attributes.ci;
- classes.TestDriveCar.color = _loc1.firstChild.attributes.c;
- classes.TestDriveCar.invitationID = _loc1.firstChild.attributes.tid;
- var _loc2 = new Object();
- _loc2.loc = _loc1.firstChild.attributes.lod;
- _loc2.carID = classes.TestDriveCar.carID;
- classes.Control.dialogContainer("dialogTestDriveAcceptContent", _loc2);
- break;
- }
- case -2:
- {
- break;
- }
- case -3:
- {
- displayAlert("warning", "Account Error", "Sorry, there was error accessing your account.");
- break;
- }
- case -4:
- {
- break;
- }
- case -5:
- {
- displayAlert("warning", "Error", "Sorry, unable to create the test drive invitation");
- break;
- }
- } // End of switch
- } // End of the function
- function acceptTestDrive()
- {
- var _loc1 = new LoadVars();
- _loc1.tid = classes.TestDriveCar.invitationID;
- _loc1.c = classes.TestDriveCar.color;
- _loc1.cid = classes.TestDriveCar.carID;
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"accepttestdrive\", \"" + _loc1.toString() + "\"", "");
- } // End of the function
- function acceptTestDriveCB(s, h, m, p, d)
- {
- classes.Frame.serverLights(false);
- switch (s)
- {
- case 1:
- {
- var _loc3 = new XML();
- _loc3.ignoreWhite = true;
- _loc3.parseXML(d);
- _root.updateDefaultCar(_loc3.firstChild.attributes.i);
- _loc3.firstChild.attributes.td = 1;
- _loc3.firstChild.attributes.tdex = 0;
- _loc3.firstChild.attributes.tid = classes.TestDriveCar.invitationID;
- _loc3.firstChild.attributes.rh = h;
- _loc3.firstChild.attributes.p = m;
- _loc3.firstChild.attributes.pp = p;
- _global.garageXML.firstChild.appendChild(_loc3.firstChild);
- displayAlert("success", "Test Drive Accepted", "Your test drive car is in your garage and you have " + h + " hours left in your test drive.");
- break;
- }
- case -1:
- {
- displayAlert("warning", "Invalid", "Sorry, invalid test drive invitation.");
- break;
- }
- case -2:
- {
- displayAlert("warning", "Error Loading", "Sorry, unable to load test drive invitation.");
- break;
- }
- case -3:
- {
- displayAlert("warning", "Error", "Sorry, there was error giving you the car.");
- break;
- }
- case -4:
- {
- displayAlert("warning", "Error", "Sorry, unable to accept test drive.");
- break;
- }
- case -5:
- {
- displayAlert("warning", "Error", "Sorry, unable to load test drive car details");
- break;
- }
- case -6:
- {
- displayAlert("warning", "Error", "Sorry, unable to load test drive car");
- break;
- }
- case -50:
- {
- displayAlert("warning", "Account Locked", "Sorry, your account is locked");
- break;
- }
- } // End of switch
- } // End of the function
- function buyTestDriveCar(paymentType)
- {
- var _loc2 = classes.GlobalData.getTestDriveCarXML();
- var _loc1 = new LoadVars();
- _loc1.tid = Number(_loc2.attributes.tid);
- _loc1.pt = paymentType;
- _loc1.cid = Number(_loc2.attributes.ci);
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"buytestdrivecar\", \"" + _loc1.toString() + "\"", "");
- } // End of the function
- function buyTestDriveCarCB(s, m)
- {
- classes.Frame.serverLights(false);
- if (s <= 0)
- {
- _root.abc.thumb.dispose();
- _root.abc.closeMe();
- } // end if
- if (s == 1 || s == 2)
- {
- var _loc3 = classes.GlobalData.getTestDriveCarXML();
- _loc3.attributes.td = 0;
- _loc3.attributes.tdex = 0;
- _root.updateDefaultCar(_loc3.attributes.i);
- } // end if
- if (s == 1)
- {
- classes.GlobalData.updateInfo("p", String(m));
- }
- else if (s == 2)
- {
- classes.GlobalData.updateInfo("m", String(m));
- } // end else if
- _root.introHolder.buyTestDriveCarCB_Intro(s);
- } // End of the function
- function removeTestDriveCar()
- {
- var _loc2 = classes.GlobalData.getTestDriveCarXML();
- var _loc1 = new LoadVars();
- _loc1.tid = Number(_loc2.attributes.tid);
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"removetestdrivecar\", \"" + _loc1.toString() + "\"", "");
- } // End of the function
- function removeTestDriveCarCB(s)
- {
- classes.Frame.serverLights(false);
- if (s == 1)
- {
- var _loc2 = classes.GlobalData.getTestDriveCarXML();
- classes.GlobalData.removeCar(Number(_loc2.attributes.i));
- } // end if
- _root.introHolder.removeTestDriveCarCB_Intro(s);
- } // End of the function
- function rejectTestDrive()
- {
- var _loc1 = new LoadVars();
- _loc1.tid = Number(classes.TestDriveCar.invitationID);
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"rejecttestdrive\", \"" + _loc1.toString() + "\"", "");
- } // End of the function
- function rejectTestDriveCB(s)
- {
- classes.Frame.serverLights(false);
- switch (s)
- {
- case 1:
- {
- break;
- }
- case -1:
- {
- displayAlert("warning", "Failed", "Sorry, there was a db error.");
- break;
- }
- } // End of switch
- } // End of the function
- function joinSpecialEvent(eid, tid)
- {
- classes.Frame.serverLights(true);
- var _loc2 = new LoadVars();
- _loc2.eid = eid;
- _loc2.tid = tid;
- _global.specialEvent.teamID = tid;
- getURL("lingo: executeCall \"joinspecialevent\", \"" + _loc2.toString() + "\"", "");
- } // End of the function
- function joinSpecialEventCB(s, m)
- {
- classes.Frame.serverLights(false);
- _root.introHolder.joinSpecialEventCB_Intro(s, m, _global.specialEvent.teamID);
- } // End of the function
- function getLatestNews(count)
- {
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"getnews\", \"nc=" + count + "\"", "");
- } // End of the function
- function getLatestNewsCB(s, d)
- {
- classes.Frame.serverLights(false);
- d = unescape(d);
- var _loc3 = new XML(d);
- if (s == 1)
- {
- classes.Lookup.runCallback("getLatestNews", "", _loc3);
- }
- else
- {
- _root.displayAlert("warning", "Error", "Error retrieving news.");
- } // end else if
- } // End of the function
- function getRacerSpotlight(count)
- {
- classes.Frame.serverLights(true);
- getURL("lingo: executeCall \"getspotlightracers\", \"rc=" + count + "\"", "");
- } // End of the function
- function getRacerSpotlightCB(s, d)
- {
- classes.Frame.serverLights(false);
- d = unescape(d);
- var _loc3 = new XML(d);
- if (s == 1)
- {
- classes.Lookup.runCallback("getRacerSpotlight", "", _loc3);
- }
- else
- {
- _root.displayAlert("warning", "Error", "Error retrieving racers.");
- } // end else if
- } // End of the function
- function linkHandler(param)
- {
- _root.openURL(param);
- } // End of the function
- function genericWebCB(command, s, d)
- {
- _root.imp.genericWebCB(command, s, d);
- } // End of the function
- function getPromoObjects()
- {
- var _loc4 = new Array();
- for (var _loc3 = 0; _loc3 < _global.bannersXML.firstChild.childNodes.length; ++_loc3)
- {
- var _loc2 = new Object();
- _loc2.position = _global.bannersXML.firstChild.childNodes[_loc3].attributes.p;
- _loc2.linkType = _global.bannersXML.firstChild.childNodes[_loc3].attributes.t;
- _loc2.imageFile = _global.bannersXML.firstChild.childNodes[_loc3].attributes.i;
- _loc2.clickLink = _global.bannersXML.firstChild.childNodes[_loc3].attributes.l;
- if (Number(_loc2.linkType) == 2)
- {
- _loc2.locationID = classes.Lookup.carLocation(Number(_loc2.clickLink));
- } // end if
- _loc4[_loc3] = _loc2;
- } // end of for
- return (_loc4);
- } // End of the function
- function genericWebCB(command, s, d)
- {
- _root.imp.genericWebCB(command, s, d);
- } // End of the function
- function displayAlert(alertIcon, alertTitle, alertMessage)
- {
- _root.abc.closeMe();
- _root.alertMC.closeMe();
- var _loc3 = (classes.AlertBox)(this.attachMovie("alertBox", "alertMC", this.getNextHighestDepth()));
- _loc3.setValue(alertTitle, alertMessage, alertIcon);
- _loc3.addButton("OK");
- } // End of the function
- function displayMembershipAlert(alertIcon, alertTitle, alertMessage)
- {
- _root.abc.closeMe();
- _root.alertMC.closeMe();
- var _loc3 = (classes.MembershipAlertBox)(this.attachMovie("membershipAlertBox", "alertMC", this.getNextHighestDepth()));
- _loc3.setValue(alertTitle, alertMessage, alertIcon);
- _loc3.addButton("OK");
- } // End of the function
- function displayDailyAward()
- {
- _root.abc.closeMe();
- _root.alertMC.closeMe();
- var _loc6 = (classes.AlertBox)(this.attachMovie("alertBox", "alertMC", this.getNextHighestDepth()));
- var _loc7 = "";
- var _loc9 = "";
- var _loc4 = "";
- if (classes.GlobalData.dailyAwardType == 1)
- {
- _loc7 = "$";
- _loc4 = "funds";
- }
- else
- {
- _loc9 = "points";
- _loc4 = "success";
- } // end else if
- var _loc10 = "You received a daily reward of " + _loc7 + classes.NumFuncs.commaFormat(classes.GlobalData.dailyAwardAmount) + " " + _loc9;
- _loc6.setValue("Daily Reward!", _loc10, _loc4);
- _loc6.addButton("OK");
- var _loc5 = new Object();
- _loc5.owner = this;
- _loc5.onRelease = function (theButton, keepBoxOpen)
- {
- switch (theButton.btnLabel.text)
- {
- case "OK":
- {
- var _loc3 = Number(_global.broadcastXML.firstChild.firstChild.attributes.i);
- if (!classes.GlobalData.prefsObj.broadcastRead || classes.GlobalData.prefsObj.broadcastRead < _loc3)
- {
- _root.abc.closeMe();
- _root.attachMovie("dialogContainer", "abc", _root.getNextHighestDepth(), {contentName: "dialogBroadcastContent", msg: _global.broadcastXML.firstChild.firstChild.attributes.m});
- classes.GlobalData.prefsObj.broadcastRead = _loc3;
- classes.GlobalData.savePrefsObj();
- }
- else if (_root.displaySpecialEventDialogIfNecessary())
- {
- }
- else
- {
- _root.displayTestDriveExpiredIfNecessary();
- } // end else if
- break;
- }
- } // End of switch
- };
- _root.alertMC.addListener(_loc5);
- } // End of the function
- function displayTestDriveExpiredIfNecessary()
- {
- var _loc3 = false;
- var _loc2 = classes.GlobalData.getTestDriveCarXML();
- var _loc4 = Number(_loc2.attributes.rh);
- if (_loc2 && (classes.GlobalData.testDriveCarExpired || _loc4 <= 1))
- {
- _loc3 = true;
- _root.abc.closeMe();
- _root.attachMovie("dialogContainer", "abc", _root.getNextHighestDepth(), {contentName: "dialogTestDriveExpiredContent"});
- } // end if
- return (_loc3);
- } // End of the function
- function displayTestDriveExpiredIfNecessaryNotLogin()
- {
- var _loc3 = false;
- var _loc4 = classes.GlobalData.getTestDriveCarXML();
- _global.introData.testDriveCarXML = _loc4;
- _root.introHolder.displayTestDriveExpired(_global.introData);
- return (_loc3);
- } // End of the function
- function displayTestDriveExpiredWarning()
- {
- _root.displayAlert("warning", "Test Drive Car", "Your test drive with this car has expired.");
- } // End of the function
- function displayTestDriveExpiredWarningIfNecessary()
- {
- var _loc2 = false;
- if (Number(_parent.selCarXML.attributes.td) && Number(_parent.selCarXML.attributes.tdex))
- {
- _loc2 = true;
- displayTestDriveExpiredWarning();
- } // end if
- return (_loc2);
- } // End of the function
- function markTestDriveExpiredAndDisplayWarning()
- {
- classes.GlobalData.makeTestDriveCarExpired();
- displayTestDriveExpiredWarning();
- } // End of the function
- function displaySpecialEventDialogIfNecessary()
- {
- var _loc2 = false;
- if (_global.specialEvent.currentEvent == true && _global.specialEvent.teamID == -1)
- {
- _loc2 = true;
- displaySpecialEventDialog();
- } // end if
- return (_loc2);
- } // End of the function
- function displaySpecialEventDialog()
- {
- _root.abc.closeMe();
- _root.eventHolder._visible = true;
- _root.eventHolder._x = 186.500000;
- _root.eventHolder._y = 107;
- _root.attachMovie("dialogContainer", "abc", _root.getNextHighestDepth(), {contentName: "dialogSpecialEvent"});
- } // End of the function
- function showBroadcastCB(msg)
- {
- classes.Frame._MC.overlay.systemMsg.txtTitle = "Message From System Admin";
- classes.Frame._MC.overlay.systemMsg.txtMsg = msg;
- classes.Frame._MC.overlay.systemMsg._visible = true;
- } // End of the function
- function showConnectionErrorCB(msgTitle, msg)
- {
- classes.Frame.serverLights(false);
- displayAlert("warning", msgTitle, msg);
- } // End of the function
- function showDisconnectedErrorCB(msgTitle, msg)
- {
- classes.Frame.serverLights(false);
- _root.abc.closeMe();
- var _loc3 = (classes.AlertBox)(_root.attachMovie("alertBox", "abc", _root.getNextHighestDepth()));
- _loc3.setValue(msgTitle, msg, "warning");
- _loc3.addButton("OK");
- _loc3.onOK = function ()
- {
- getURL("lingo: CLOSEGAME");
- };
- var _loc4 = new Object();
- _loc4.onRelease = function (theButton)
- {
- if (theButton.btnLabel.text == "OK")
- {
- theButton._parent._parent.onOK();
- } // end if
- false;
- };
- _root.abc.addListener(_loc4);
- } // End of the function
- function openFile(fileName)
- {
- getURL("lingo: openFile \"" + fileName + "\"", "");
- } // End of the function
- function openFileCB(s, fileName, textValue)
- {
- if (fileName == "cache/cd.txt")
- {
- if (s)
- {
- var _loc4 = new XML(textValue);
- _root.fromcd = _loc4.firstChild.attributes.id;
- } // end if
- _root.getStarterShowroom();
- }
- else
- {
- if (s)
- {
- classes.GlobalData.prefsXML = new XML(textValue);
- } // end if
- classes.GlobalData.setPrefsObj();
- _root.gotoAndPlay("doneLoadPrefs");
- } // end else if
- } // End of the function
- function saveFile(fileName, textValue)
- {
- getURL("lingo: saveFile \"" + fileName + "\", \"" + escape(textValue) + "\"", "");
- } // End of the function
- function saveFileCB(s, fileName)
- {
- } // End of the function
- function openBanURL(accountID)
- {
- var _loc1 = "http://admin.nittolegends.com/";
- if (classes.GlobalData.prefsObj.dev)
- {
- _loc1 = "http://adminstaging.nittolegends.com/";
- } // end if
- _loc1 = _loc1 + ("userInfo.aspx?aid=" + accountID);
- openURL(_loc1);
- } // End of the function
- function openReportsURL(accountID)
- {
- var _loc1 = "http://admin.nittolegends.com/";
- if (classes.GlobalData.prefsObj.dev)
- {
- _loc1 = "http://adminstaging.nittolegends.com/";
- } // end if
- _loc1 = _loc1 + ("userInfo.aspx?aid=" + accountID);
- openURL(_loc1);
- } // End of the function
- function openPointsURL()
- {
- openURL("http://www.nittolegends.com/1320Shop_points.aspx");
- } // End of the function
- function openMembershipURL()
- {
- openURL("http://www.nittolegends.com/1320Shop_default.aspx");
- } // End of the function
- function openURL(url)
- {
- getURL("lingo: openURL \"" + escape(url) + "\"", "");
- } // End of the function
- function openTestDriveFAQURL()
- {
- openURL("http://www.nittolegends.com/support_testdrive.aspx");
- } // End of the function
- function fileBrowse(id)
- {
- getURL("lingo: fileBrowse \"" + id + "\"", "");
- } // End of the function
- function fileBrowseCB(id, path, filesize)
- {
- var _loc1 = new Object();
- _loc1.path = path;
- _loc1.filesize = filesize;
- classes.Lookup.runCallback("fileBrowse", id, _loc1);
- } // End of the function
- function fileParseCB(filedata, temp)
- {
- classes.Lookup.runCallback("fileParse", "", filedata + "\r\n" + temp);
- } // End of the function
- function fileClearAllDecals()
- {
- getURL("lingo: fileClearAllDecals");
- } // End of the function
- function fileClearADecal(pcid, did)
- {
- getURL("lingo: fileClearADecal " + pcid + ", " + did, "");
- } // End of the function
- function newTutorialObj(_context, arrContent, useBGOverlay, overlayWidth, overlayHeight)
- {
- tutorialObj = new classes.util.Tutorial(_context, arrContent, useBGOverlay, overlayWidth, overlayHeight);
- } // End of the function
- function clearTutorialObj()
- {
- tutorialObj.destroy();
- } // End of the function
- function linkHandler(param)
- {
- _root.openURL(param);
- } // End of the function
- function getOneCarEngineCB(d)
- {
- var _loc1 = new XML();
- _loc1.ignoreWhite = true;
- _loc1.parseXML(d);
- classes.GlobalData.engineSound = _loc1.firstChild.attributes.es;
- classes.GlobalData.shiftLightGaugeRPM = _loc1.firstChild.attributes.sl;
- classes.GlobalData.hasShiftLightGauge = false;
- if (Number(_loc1.firstChild.attributes.sg) == 1)
- {
- classes.GlobalData.hasShiftLightGauge = true;
- } // end if
- classes.GlobalData.raceControlsID = _loc1.firstChild.attributes.rc;
- } // End of the function
- function CheckNittoProcesses()
- {
- getURL("lingo: CheckNittoProcesses");
- } // End of the function
- function CheckNittoProcessesCB(s)
- {
- if (s > 0)
- {
- var _loc4;
- var _loc6;
- if (s == 1)
- {
- _loc4 = "Already Running";
- _loc6 = "Only one instance of Nitto 1320 Legends is allowed to be run at a time";
- }
- else
- {
- _loc4 = "Wrong Name";
- _loc6 = "The Nitto 1320 Legends application needs to be named NittoLegendsBeta.exe to run";
- } // end else if
- _root.abc.closeMe();
- var _loc3 = (classes.AlertBox)(_root.attachMovie("alertBox", "abc", _root.getNextHighestDepth()));
- _loc3.setValue(_loc4, _loc6, "warning");
- _loc3.addButton("OK");
- _loc3.onOK = function ()
- {
- getURL("lingo: CLOSEGAME");
- };
- var _loc5 = new Object();
- _loc5.onRelease = function (theButton)
- {
- if (theButton.btnLabel.text == "OK")
- {
- theButton._parent._parent.onOK();
- } // end if
- false;
- };
- _root.abc.addListener(_loc5);
- }
- else
- {
- _root.openFile("prefs.txt");
- } // end else if
- } // End of the function
- function saveBroadcastRead(broadcastNum)
- {
- classes.GlobalData.prefsObj.broadcastRead = broadcastNum;
- classes.GlobalData.savePrefsObj();
- } // End of the function
- function setSpecialEventTeamID(id)
- {
- _global.specialEvent.teamID = id;
- } // End of the function
- _global.mainURL = _root.mainURL = "http://game.nittolegends.com/";
- _global.uggURL = "http://ugg.nittolegends.com/";
- _global.devURL = "http://gamestaging.nittolegends.com/";
- _global.storeLinkURL = "http://www.nittolegends.com/1320Shop_points.aspx";
- _global.assetPath = "cache";
- System.security.allowDomain("game.nittolegends.com");
- System.security.allowDomain("gamestaging.nittolegends.com");
- _global.n2CSS = new TextField.StyleSheet();
- _global.n2CSS.load(_global.mainURL + "gameStyles.css");
- _global.newsCSS = new TextField.StyleSheet();
- _global.newsCSS.load(_global.mainURL + "newsStyles.css");
- var isInAChat = false;
- var raceMovie;
- var raceTreeMovie;
- var raceSound;
- var teamRinp_lookupCarIds;
- var repairPartMC;
- var aryAvatar = new Array();
- var isTimeoutSet = false;
- var garageDynoMC;
- stop ();
- _root.CheckNittoProcesses();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement