Frame 1
function getNetDebugVersion() {
return(1);
}
function NetDebugConfig() {
}
function attachNetDebugConfigFunctions(ndc) {
var _local1 = ndc;
_local1.setDebug = function (setval) {
this.m_debug = setval;
};
_local1.getDebug = function () {
return(this.m_debug);
};
for (var _local2 in _local1) {
if (typeof(_local1[_local2]) == "object") {
attachNetDebugConfigFunctions(_local1[_local2]);
}
}
}
function getDefaultNetDebugConfig(iscontroller) {
var _local1 = _global;
if (_local1.netDebugConfigSO == undefined) {
var _local2 = "TestMovie_Config_Info";
if (iscontroller) {
_local2 = "Controller_Config_Info";
}
_local1.netDebugConfigSO = SharedObject.getLocal(_local2);
}
if (_local1.netDebugConfigSO.data.config == undefined) {
_local1.netDebugConfigSO.data.config = getRealDefaultNetDebugConfig();
}
_local1.netDebugConfigSO.flush();
return(_local1.netDebugConfigSO.data.config);
}
function getRealDefaultNetDebugConfig() {
var _local1 = new NetDebugConfig();
_local1.m_debug = true;
_local1.client = new NetDebugConfig();
_local1.client.m_debug = true;
_local1.client.trace = true;
_local1.client.recordset = true;
_local1.client.http = true;
_local1.client.rtmp = true;
_local1.realtime_server = new NetDebugConfig();
_local1.realtime_server.m_debug = true;
_local1.realtime_server.trace = true;
_local1.app_server = new NetDebugConfig();
_local1.app_server.m_debug = true;
_local1.app_server.trace = true;
_local1.app_server.error = true;
_local1.app_server.recordset = true;
_local1.app_server.httpheaders = false;
_local1.app_server.amf = false;
_local1.app_server.amfheaders = false;
_local1.app_server.coldfusion = true;
return(_local1);
}
function NetDebugEvent() {
}
function NetDebugErrorEvent(dataobj) {
var _local1 = this;
_local1.init();
_local1.EventType = "NetDebugError";
_local1.Error = dataobj;
}
function NetDebugTraceEvent(traceobj) {
var _local1 = this;
_local1.init();
_local1.EventType = "Trace";
_local1.Trace = traceobj;
}
function NetDebugTraceNetServicesEvent(w, s, n, m) {
var _local1 = this;
_local1.init();
_local1.EventType = "NetServicesTrace";
_local1.Trace = m;
_local1.Who = w;
_local1.Severity = s;
_local1.Number = n;
}
function NetDebugNCEvent() {
}
function NetDebugResultEvent(resultobj) {
var _local1 = this;
_local1.init();
_local1.EventType = "Result";
_local1.Result = resultobj;
}
function NetDebugStatusEvent(statusobj) {
var _local1 = this;
_local1.init();
_local1.EventType = "Status";
_local1.Status = statusobj;
}
function NetDebugConnectEvent(args) {
var _local1 = this;
var _local2 = args;
_local1.init();
_local1.EventType = "Connect";
_local1.ConnectString = _local2[0];
if (_local2[1] != null) {
_local1.UserName = _local2[1];
}
if (_local2[2] != null) {
_local1.Password = _local2[2];
}
}
function NetDebugCallEvent(args) {
var _local2 = this;
var _local3 = args;
_local2.init();
_local2.EventType = "Call";
_local2.MethodName = _local3[0];
_local2.Parameters = new Array();
var alen = _local3.length;
var _local1 = 2;
while (_local1 < alen) {
_local2.Parameters[_local1 - 2] = _local3[_local1];
_local1++;
}
}
function NetDebugCloseEvent() {
this.init();
this.EventType = "Close";
}
function NetDebugAddHeaderEvent(args) {
var _local1 = this;
var _local2 = args;
_local1.init();
_local1.EventType = "AddHeader";
_local1.HeaderName = _local2[0];
_local1.MustUnderstand = _local2[1];
if (_local2[2] != null) {
_local1.HeaderObject = _local2[2];
}
}
function NetDebugRtmpLogEvent(infoobj) {
var _local1 = this;
_local1.initDate();
_local1.EventType = "Trace";
_local1.Source = "Flash Communication Server";
_local1.Info = infoobj;
_local1.Trace = infoobj.description;
}
function NetDebugDuplicateNCDErrorEvent() {
var _local1 = this;
_local1.initDate();
_local1.EventType = "Error";
_local1.Source = "NCD";
_local1.Message = "NCD_ALREADY_RUNNING";
}
function NetDebugFailedSendErrorEvent(ev) {
var _local1 = this;
_local1.initDate();
_local1.EventType = "Error";
_local1.Source = "NCD";
_local1.OriginalEvent = ev;
_local1.Message = "NCD_FAILED_TO_SEND_EVENT";
}
function NetDebugInfoErrorEvent(infoobj, mes) {
var _local1 = this;
_local1.initDate();
_local1.EventType = "Error";
_local1.Source = "NCD";
_local1.Info = infoobj;
if (mes != null) {
_local1.Message = mes;
}
}
function NetDebugReceiveCallEvent(mName, args) {
var _local1 = this;
_local1.init();
_local1.EventType = "ReceivedCall";
_local1.MethodName = mName;
_local1.Parameters = args;
}
function netDebugProxyConnect() {
var _local1 = this;
var _local2 = arguments;
_local1.attachDebug();
var _local3 = _local2[0].substr(0, 4);
if ((_local3 == "http") || (_local3.substr(0, 4) == "rtmp")) {
if (_local2[0].charAt(4) == ":") {
_local1.m_Protocol = _local3;
} else {
_local1.m_Protocol = _local2[0].substr(0, 5);
}
} else {
_local1.m_Protocol = "http";
}
_local1.sendClientEvent(new NetDebugConnectEvent(_local2));
if (_local1.isRealTime()) {
_local1.m_ConnectString = _local2[0];
getNetDebug().sendCommand(new StartRTMPTraceCommand(_local2[0]));
var ret = _local1.realconnect.apply(_local1, _local2);
_local1.realcall("@getClientID", new RTMPClientIDResponse(_local2[0], _local1));
return(ret);
}
return(_local1.realconnect.apply(_local1, _local2));
}
function netDebugProxyCall() {
var _local1 = this;
var _local2 = arguments;
_local1.attachDebug();
_local1.sendClientEvent(new NetDebugCallEvent(_local2));
_local1.addNetDebugHeader();
if (_local1.m_Config.app_server) {
_local2[1] = new NetDebugResponseProxy(_local1, _local2[1]);
return(_local1.realcall.apply(_local1, _local2));
}
return(_local1.realcall.apply(_local1, _local2));
}
function netDebugProxyClose() {
var _local1 = this;
_local1.attachDebug();
_local1.sendClientEvent(new NetDebugCloseEvent());
if (_local1.isRealTime()) {
getNetDebug().sendCommand(new StopRTMPTraceCommand(_local1.m_ConnectString, _local1.m_ClientId));
}
var _local2 = _local1.realclose();
getNetDebug().removeNetConnection(_local1);
return(_local2);
}
function netDebugProxyAddHeader() {
var _local1 = this;
_local1.attachDebug();
_local1.sendClientEvent(new NetDebugAddHeaderEvent(arguments));
return(_local1.realaddHeader.apply(_local1, arguments));
}
function RTMPClientIDResponse(cs, nc) {
this.m_ConnectString = cs;
this.m_NC = nc;
}
function NetDebugResponseProxy(source, original) {
this.m_SourceNC = source;
this.m_OriginalNR = original;
}
function GlobalLocalConnection(iscontroller, receiver, domainname) {
var _local2 = this;
var _local3 = _global;
_local2.maxConnections = 10;
var sToMovie = "_NetDebugLocalToDebugMovie";
var sToController = "_NetDebugLocalToController";
var connectname = null;
if (iscontroller) {
connectname = sToController;
_local2.sendnames = new Array();
_local2.sendnames.push(sToMovie);
var _local1 = 0;
while (_local1 < _local2.maxConnections) {
_local2.sendnames.push(sToMovie + _local1);
_local1++;
}
_local2.maxConnections = 0;
} else {
connectname = sToMovie;
_local2.sendnames = new Array();
_local2.sendnames.push(sToController);
}
_local2.setDomainName(domainname);
if (_local3.g_NetDebugLocalConnection == undefined) {
_local3.g_NetDebugLocalConnection = new LocalConnection();
_local3.g_NetDebugLocalConnection.allowDomain = function () {
return(true);
};
}
if (receiver != null) {
_local3.g_NetDebugLocalConnection.m_Receiver = receiver;
_local3.g_NetDebugLocalConnection.onData = function (dataobj) {
_global.g_NetDebugLocalConnection.m_Receiver.onReceive(dataobj);
};
_local3.g_NetDebugLocalConnection.onCommand = function (commandobj) {
_global.g_NetDebugLocalConnection.m_Receiver.onReceiveCommand(commandobj);
};
if (!_local3.g_NetDebugLocalConnection.connect(connectname)) {
var connected = false;
var _local1 = 0;
while (_local1 < _local2.maxConnections) {
if (_local3.g_NetDebugLocalConnection.connect(connectname + _local1)) {
connected = true;
break;
}
_local1++;
}
if (!connected) {
if (iscontroller) {
receiver.onReceiveError(new NetDebugDuplicateNCDErrorEvent());
}
}
}
}
}
function LocalCommand() {
}
function UpdateNetDebugConfigCommand(dataobj) {
this.init("updateConfig", dataobj);
}
function GetConfigCommand() {
this.init("getConfig", null);
}
function StartRTMPTraceCommand(cs) {
var _local1 = new Object();
_local1.connectstring = cs;
_local1.url = _root._url;
this.init("startRealTimeTrace", _local1);
}
function AddRTMPClientCommand(cs, cid) {
var _local1 = new Object();
_local1.connectstring = cs;
_local1.url = _root._url;
_local1.clientid = cid;
this.init("addRealTimeClient", _local1);
}
function StopRTMPTraceCommand(cs, cid) {
var _local1 = new Object();
_local1.connectstring = cs;
_local1.url = _root._url;
_local1.clientid = cid;
this.init("stopRealTimeTrace", _local1);
}
function NetDebug() {
var _local1 = this;
_local1.m_ncs = new Array();
_local1.m_Config = getDefaultNetDebugConfig();
_local1.m_glc = new GlobalLocalConnection(false, _local1);
_local1.m_glc.sendCommand(new GetConfigCommand());
_local1.m_NextNewId = 0;
}
function getNetDebug() {
return(_global.netDebugInstance);
}
function xmlLoaded() {
xmlIsLoaded = true;
var _local2 = this.firstChild;
var _local1 = 0;
while (_local1 < _local2.childNodes.length) {
switch (_local2.childNodes[_local1].nodeName) {
case "scriptLink" :
scriptLink = _local2.childNodes[_local1].firstChild.nodeValue;
break;
case "connectionType" :
connectionType = _local2.childNodes[_local1].firstChild.nodeValue;
break;
case "URLTarget" :
URLTarget = _local2.childNodes[_local1].firstChild.nodeValue;
break;
case "ssRoom" :
ssRoom = _local2.childNodes[_local1].firstChild.nodeValue;
break;
case "scriptTimeOut" :
scriptTimeOut = Number(_local2.childNodes[_local1].firstChild.nodeValue);
break;
case "mainVolume" :
basedVolume = Number(_local2.childNodes[_local1].firstChild.nodeValue);
mainVolume = basedVolume;
soundVolume = new Sound(musique);
soundVolume.setVolume(mainVolume);
break;
case "cashInitialAmount" :
budget = (cashAmount = Number(_local2.childNodes[_local1].firstChild.nodeValue));
break;
case "userQtyMin" :
userQtyMin = Number(_local2.childNodes[_local1].firstChild.nodeValue);
break;
case "timeAddRobot" :
timeAddRobot = Number(_local2.childNodes[_local1].firstChild.nodeValue);
break;
case "startRequestTimeOut" :
startRequestTimeOut = Number(_local2.childNodes[_local1].firstChild.nodeValue);
}
_local1++;
}
}
function setGameTypeFct(btnName) {
var _local1 = btnName;
gameType = _local1;
if (xmlIsLoaded) {
if (_local1 == "quickGame") {
ssUserLogin = ((lang == "fr") ? "joueur #1" : "player #1");
dudeNbr = random(4) + 1;
carNbr = random(4) + 1;
if ((carNbr == 3) && (maskCarState)) {
do {
carNbr = random(4) + 1;
} while (carNbr == 3);
}
pisteNbr = random(2) + 1;
if (main._currentframe > 1) {
main.gotoAndStop("gaming");
} else {
main.nextFrame();
}
} else if (_local1 == "solitary") {
stepTotal = "/4";
ssUserLogin = ((lang == "fr") ? "joueur #1" : "player #1");
if (main._currentframe > 1) {
main.gotoAndStop("start");
} else {
main.nextFrame();
}
} else {
stepTotal = "/7";
nr_nc = new NetConnection();
if (main._currentframe > 1) {
main.gotoAndStop("step1");
setNrNcFunction();
} else {
main.nextFrame();
}
}
}
}
_global.copyProperties = function (to, from) {
var _local1 = from;
var _local2 = to;
for (var _local3 in _local1) {
if ((_local3 == "__proto__") || (_local3 == "function")) {
continue;
}
if (typeof(_local1[_local3]) == "object") {
if (_local2[_local3] == undefined) {
_local2[_local3] = new _local1[_local3].__proto__.constructor();
}
copyProperties(_local2[_local3], _local1[_local3]);
} else {
_local2[_local3] = _local1[_local3];
}
}
};
_global.copyObject = function (obj) {
var _local2 = obj;
if (typeof(_local2) == "object") {
var _local1 = new _local2.__proto__.constructor();
copyProperties(_local1, _local2);
return(_local1);
}
return(_local2);
};
_global.objectToStringTree = function (obj, openstr, typesepstr, valuesepstr, closestr) {
var _local1 = new StringLineAdder(obj, new TreeLineRenderer(((openstr == null) ? "{" : (openstr)), ((typesepstr == null) ? ":" : (typesepstr)), ((valuesepstr == null) ? ", " : (valuesepstr)), ((closestr == null) ? "}" : (closestr))));
return(_local1.getString());
};
_global.objectToListboxTree = function (listbox, obj, openstr, typesepstr, valuesepstr, closestr) {
new ListLineAdder(listbox, obj, new TreeLineRenderer(((openstr == null) ? "{" : (openstr)), ((typesepstr == null) ? ":" : (typesepstr)), ((valuesepstr == null) ? ", " : (valuesepstr)), ((closestr == null) ? "}" : (closestr))));
};
_global.StringLineAdder = function (obj, renderer) {
var _local1 = this;
_local1.linerenderer = renderer;
_local1.output = "";
nestedObjectDump(0, null, obj, _local1);
};
StringLineAdder.prototype.getString = function () {
return(this.output);
};
StringLineAdder.prototype.addLine = function (level, objname, objtype, objvalue, objnum) {
var _local1 = this.linerenderer.getLine(level, objname, objtype, objvalue, objnum);
if (_local1 != null) {
this.output = this.output + (_local1 + newline);
}
return(true);
};
_global.ListLineAdder = function (listbox, obj, renderer) {
var _local1 = this;
_local1.linerenderer = renderer;
_local1.output_lb = listbox;
nestedObjectDump(0, null, obj, _local1);
};
ListLineAdder.prototype.addLine = function (level, objname, objtype, objvalue, objnum) {
var _local1 = this.linerenderer.getLine(level, objname, objtype, objvalue, objnum);
if (_local1 != null) {
this.output_lb.addItem(_local1);
}
return(true);
};
_global.TreeLineRenderer = function (pre, typedelim, valuedelim, post) {
this.init(pre, typedelim, valuedelim, post);
};
TreeLineRenderer.prototype.init = function (pre, typedelim, valuedelim, post) {
var _local1 = this;
_local1.prechar = pre;
_local1.typechar = typedelim;
_local1.valuechar = valuedelim;
_local1.postchar = post;
};
TreeLineRenderer.prototype.getLine = function (level, objname, objtype, objvalue, objnum) {
var _local3 = this;
var _local2 = "";
var _local1 = 0;
while (_local1 < level) {
_local2 = _local2 + "\t";
_local1++;
}
var valuedelim = _local3.valuechar;
if ((objname != null) && (objtype != "object")) {
_local2 = _local2 + (((_local3.prechar + objtype) + _local3.typechar) + objname);
} else if (objtype == "object") {
if (typeof(objvalue) == "number") {
_local2 = _local2 + (((_local3.prechar + objtype) + _local3.typechar) + objname);
_local2 = _local2 + ((valuedelim + "object#") + objvalue);
objvalue = null;
} else {
_local2 = _local2 + (((((_local3.prechar + objtype) + "#") + objnum) + _local3.typechar) + objname);
}
} else {
_local2 = _local2 + (_local3.prechar + objtype);
valuedelim = _local3.typechar;
}
if (objvalue != null) {
_local2 = _local2 + (valuedelim + objvalue);
}
_local2 = _local2 + _local3.postchar;
return(_local2);
};
_global.nestedObjectDump = function (level, objname, obj, lineadder) {
var _local1 = obj;
if (level == 0) {
nestedObjectDump.callcount++;
nestedObjectDump.objcount = -1;
}
if (_local1 == null) {
return(lineadder.addLine(level, objname, "undefined"));
}
if (typeof(_local1) == "function") {
return(lineadder.addLine(level, objname, "function"));
}
if (typeof(_local1) == "object") {
if ((_local1.__nestedObjectDump_id != undefined) && (_local1.__nestedObjectDump_ref == nestedObjectDump.callcount)) {
return(lineadder.addLine(level, objname, "object", _local1.__nestedObjectDump_id));
}
nestedObjectDump.objcount++;
if (lineadder.addLine(level, objname, "object", null, nestedObjectDump.objcount) == nestedObjectDump.skip) {
return(nestedObjectDump.proceed);
}
_local1.__nestedObjectDump_id = nestedObjectDump.objcount;
_local1.__nestedObjectDump_ref = nestedObjectDump.callcount;
var props = new Array();
var _local3 = new Array();
for (var prop in _local1) {
if (((prop == "__proto__") || (prop == "__nestedObjectDump_id")) || (prop == "__nestedObjectDump_ref")) {
continue;
}
if (typeof(_local1[prop]) == "object") {
_local3.push(prop);
} else {
props.push(prop);
}
}
if ((_local3.length == 0) && (props.length == 0)) {
if ((typeof(_local1.toString) == "function") && (_local1.toString() != "")) {
return(lineadder.addLine(level + 1, null, "string", _local1.toString()));
}
if (lineadder.noProps != undefined) {
lineadder.noProps(level + 1);
return(nestedObjectDump.proceed);
}
}
props.sort();
_local3.sort();
var bret = true;
var plen = props.length;
var _local2 = 0;
while (_local2 < plen) {
if (nestedObjectDump(level + 1, props[_local2], _local1[props[_local2]], lineadder) == nestedObjectDump.stop) {
bret = false;
break;
}
_local2++;
}
if (bret) {
var olen = _local3.length;
_local2 = 0;
while (_local2 < olen) {
if (!nestedObjectDump(level + 1, _local3[_local2], _local1[_local3[_local2]], lineadder)) {
bret = false;
}
_local2++;
}
}
return(nestedObjectDump.proceed);
}
return(lineadder.addLine(level, objname, typeof(_local1), _local1));
};
nestedObjectDump.proceed = 1;
nestedObjectDump.skip = 2;
nestedObjectDump.stop = 3;
nestedObjectDump.callcount = 0;
nestedObjectDump.objcount = 0;
Object.registerClass("NetDebugConfig", NetDebugConfig);
NetDebugEvent.prototype.init = function () {
var _local1 = this;
_local1.EventType = "DebugEvent";
_local1.Source = "Client";
_local1.MovieUrl = unescape(_root._url);
_local1.initDate();
};
NetDebugEvent.prototype.initDate = function () {
var _local1 = new Date();
this.Date = _local1;
this.Time = _local1.getTime();
};
NetDebugErrorEvent.prototype = new NetDebugEvent();
NetDebugTraceEvent.prototype = new NetDebugEvent();
NetDebugTraceNetServicesEvent.prototype = new NetDebugEvent();
NetDebugNCEvent.prototype = new NetDebugEvent();
NetDebugResultEvent.prototype = new NetDebugNCEvent();
NetDebugStatusEvent.prototype = new NetDebugNCEvent();
NetDebugConnectEvent.prototype = new NetDebugNCEvent();
NetDebugCallEvent.prototype = new NetDebugNCEvent();
NetDebugCloseEvent.prototype = new NetDebugNCEvent();
NetDebugAddHeaderEvent.prototype = new NetDebugNCEvent();
NetDebugRtmpLogEvent.prototype = new NetDebugNCEvent();
NetDebugDuplicateNCDErrorEvent.prototype = new NetDebugNCEvent();
NetDebugFailedSendErrorEvent.prototype = new NetDebugNCEvent();
NetDebugInfoErrorEvent.prototype = new NetDebugNCEvent();
NetDebugResultEvent.prototype = new NetDebugNCEvent();
_global.StripNCDEventToMinmal = function (ev) {
var _local1 = ev;
var _local2 = new Object();
if (_local1.EventType != null) {
_local2.EventType = _local1.EventType;
}
if (_local1.Source != null) {
_local2.Source = _local1.Source;
}
if (_local1.MovieUrl != null) {
_local2.MovieUrl = _local1.MovieUrl;
}
if (_local1.Date != null) {
_local2.Date = _local1.Date;
}
if (_local1.Time != null) {
_local2.Time = _local1.Time;
}
if (_local1.Protocol != null) {
_local2.Protocol = _local1.Protocol;
}
if (_local1.DebugId != null) {
_local2.DebugId = _local1.DebugId;
}
return(_local2);
};
NetConnection.prototype.attachDebug = function () {
var _local1 = this;
if (!_local1.m_Attached) {
_local1.m_Attached = true;
_local1.m_HeaderAdded = false;
_local1.m_Config = new NetDebugConfig();
copyProperties(_local1.m_Config, getNetDebug().m_Config);
_local1.m_Protocol = "none";
_local1.m_Id = getNetDebug().addNetConnection(_local1);
}
};
NetConnection.prototype.sendDebugEvent = function (eventobj) {
var _local1 = eventobj;
_local1.Protocol = this.m_Protocol;
_local1.DebugId = this.m_Id;
return(getNetDebug().onEvent(_local1));
};
NetConnection.prototype.sendServerEvent = function (eventobj) {
eventobj.MovieUrl = unescape(_root._url);
if (!this.sendDebugEvent(eventobj)) {
}
};
NetConnection.prototype.sendClientEvent = function (eventobj) {
var _local1 = this;
if (_local1.m_Config.m_debug && (_local1.m_Config.client.m_debug)) {
if ((_local1.m_Config.client.http && (_local1.m_Protocol == "http")) || (_local1.m_Config.client.rtmp && (_local1.m_Protocol.substr(0, 4) == "rtmp"))) {
if (!_local1.sendDebugEvent(eventobj)) {
}
}
}
};
NetConnection.prototype.addNetDebugHeader = function () {
var _local1 = this;
if (!_local1.m_HeaderAdded) {
_local1.m_HeaderAdded = true;
if ((_local1.m_Config.m_debug && (_local1.m_Config.app_server.m_debug)) && (_local1.m_Protocol == "http")) {
_local1.realaddHeader("amf_server_debug", true, _local1.m_Config.app_server);
} else {
_local1.realaddHeader("amf_server_debug", true, undefined);
}
}
};
NetConnection.prototype.updateConfig = function (config) {
var _local1 = this;
_local1.attachDebug();
copyProperties(_local1.m_Config, config);
_local1.m_HeaderAdded = false;
};
NetConnection.prototype.isRealTime = function () {
return(this.m_Protocol.substr(0, 4) == "rtmp");
};
NetConnection.prototype.setupRecordset = function () {
var _local1 = this;
_local1.attachDebug();
_local1.m_Config.client.http = _local1.m_Config.client.recordset;
};
NetConnection.prototype.setDebugId = function (id) {
this.attachDebug();
this.m_Id = id;
};
NetConnection.prototype.getDebugId = function () {
this.attachDebug();
return(this.m_Id);
};
NetConnection.prototype.trace = function (traceobj) {
var _local1 = this;
_local1.attachDebug();
if ((_local1.m_Config.m_debug && (_local1.m_Config.client.m_debug)) && (_local1.m_Config.client.trace)) {
_local1.sendDebugEvent(new NetDebugTraceEvent(traceobj));
}
};
NetConnection.prototype.getDebugConfig = function () {
this.attachDebug();
return(this.m_Config);
};
if (!NetConnection.prototype.netDebugProxyFunctions) {
NetConnection.prototype.netDebugProxyFunctions = true;
NetConnection.prototype.realconnect = NetConnection.prototype.connect;
NetConnection.prototype.realcall = NetConnection.prototype.call;
NetConnection.prototype.realclose = NetConnection.prototype.close;
NetConnection.prototype.realaddHeader = NetConnection.prototype.addHeader;
NetConnection.prototype.connect = netDebugProxyConnect;
NetConnection.prototype.call = netDebugProxyCall;
NetConnection.prototype.close = netDebugProxyClose;
NetConnection.prototype.addHeader = netDebugProxyAddHeader;
}
RTMPClientIDResponse.prototype.onResult = function (cid) {
this.m_NC.m_ClientId = cid;
getNetDebug().sendCommand(new AddRTMPClientCommand(this.m_ConnectString, cid));
};
NetDebugResponseProxy.prototype.onDebugEvents = function (debugevents) {
var _local3 = debugevents;
var _local2 = _local3.length;
var _local1 = 0;
while (_local1 < _local2) {
this.m_SourceNC.sendServerEvent(_local3[_local1]);
_local1++;
}
};
NetDebugResponseProxy.prototype.onResult = function (resultobj) {
this.m_SourceNC.sendClientEvent(new NetDebugResultEvent(resultobj));
this.m_OriginalNR.onResult(resultobj);
};
NetDebugResponseProxy.prototype.onStatus = function (statusobj) {
var _local1 = this;
var _local2 = statusobj;
_local1.m_SourceNC.sendClientEvent(new NetDebugStatusEvent(_local2));
if (_local1.m_OriginalNR.onStatus != undefined) {
_local1.m_OriginalNR.onStatus(_local2);
} else {
_global.System.onStatus(_local2);
}
};
NetDebugResponseProxy.prototype.__resolve = function (name) {
this.m_SourceNC.sendClientEvent(new NetDebugReceiveCallEvent(name, arguments));
this.m_OriginalNR[name].apply(arguments);
};
GlobalLocalConnection.prototype.setDomainName = function (domainname) {
var _local1 = domainname;
if ((_local1 != null) && (_local1 != "")) {
this.sendPrefix = _local1 + ":";
} else {
this.sendPrefix = "";
}
};
GlobalLocalConnection.prototype.send = function (dataobj) {
return(this.sendRaw("onData", dataobj));
};
GlobalLocalConnection.prototype.sendCommand = function (commandobj) {
return(this.sendRaw("onCommand", commandobj));
};
GlobalLocalConnection.prototype.sendRaw = function (functionname, obj) {
var _local2 = this;
var _local3 = true;
var snlen = _local2.sendnames.length;
var _local1 = 0;
while (_local1 < snlen) {
_local3 = _local3 & _global.g_NetDebugLocalConnection.send(_local2.sendPrefix + _local2.sendnames[_local1], functionname, obj);
_local1++;
}
return(_local3);
};
LocalCommand.prototype.init = function (commandname, dataobj) {
this.command = commandname;
this.data = dataobj;
};
UpdateNetDebugConfigCommand.prototype = new LocalCommand();
GetConfigCommand.prototype = new LocalCommand();
StartRTMPTraceCommand.prototype = new LocalCommand();
AddRTMPClientCommand.prototype = new LocalCommand();
StopRTMPTraceCommand.prototype = new LocalCommand();
NetDebug.prototype.addNetConnection = function (nc) {
this.m_ncs.push(nc);
return(this.m_NextNewId++);
};
NetDebug.prototype.removeNetConnection = function (nc) {
var _local2 = this;
var _local3 = _local2.m_ncs.length;
var _local1 = 0;
while (_local1 < _local3) {
if (nc == _local2.m_ncs[_local1]) {
_local2.m_ncs.splice(_local1, 1);
return;
}
_local1++;
}
};
NetDebug.prototype.sendDebugEvent = function (eventobj) {
if (!this.m_glc.send(eventobj)) {
this.m_glc.send(new NetDebugFailedSendErrorEvent(StripNCDEventToMinmal(eventobj)));
return(false);
}
return(true);
};
NetDebug.prototype.sendCommand = function (commandobj) {
return(this.m_glc.sendCommand(commandobj));
};
NetDebug.prototype.requestNewConfig = function () {
return(this.sendCommand(new GetConfigCommand()));
};
NetDebug.prototype.updateConfig = function (config) {
var _local2 = this;
copyProperties(_local2.m_Config, config);
var _local3 = _local2.m_ncs.length;
var _local1 = 0;
while (_local1 < _local3) {
if (_local2.m_ncs[_local1] != null) {
_local2.m_ncs[_local1].updateConfig(config);
}
_local1++;
}
};
NetDebug.prototype.sendStatus = function (statusobj) {
var _local1 = this;
if (_local1.m_Config.m_debug && (_local1.m_Config.client.m_debug)) {
return(_local1.m_glc.send(new NetDebugStatusEvent(statusobj)));
}
return(undefined);
};
NetDebug.prototype.onEvent = function (eventobj) {
return(this.sendDebugEvent(eventobj));
};
NetDebug.prototype.onEventError = function (errorobj) {
return(this.sendDebugEvent(new NetDebugErrorEvent(errorobj)));
};
NetDebug.prototype.onReceiveCommand = function (commandobj) {
this[commandobj.command](commandobj.data);
};
NetDebug.prototype.onReceiveError = function (errorobj) {
this.sendDebugEvent(new NetDebugErrorEvent(errorobj));
};
NetDebug.prototype.traceNetServices = function (who, severity, number, message) {
var _local1 = this;
if ((_local1.m_Config.m_debug && (_local1.m_Config.client.m_debug)) && (_local1.m_Config.client.trace)) {
if (!_local1.sendDebugEvent(new NetDebugTraceNetServicesEvent(who, severity, number, message))) {
}
}
};
NetDebug.prototype.trace = function (traceobj) {
var _local1 = this;
if ((_local1.m_Config.m_debug && (_local1.m_Config.client.m_debug)) && (_local1.m_Config.client.trace)) {
if (!_local1.sendDebugEvent(new NetDebugTraceEvent(traceobj))) {
}
}
};
if (_global.netDebugInstance == undefined) {
_global.netDebugInstance = new NetDebug();
}
NetDebug.trace = function (obj) {
getNetDebug().trace(obj);
};
NetDebug.traceNetServices = function (who, severity, number, message) {
getNetDebug().traceNetServices(who, severity, number, message);
};
NetDebug.getVersion = function () {
return(getNetDebugVersion());
};
NetDebug.globalOnStatus = function (statusobj) {
getNetDebug().sendStatus(statusobj);
};
if (_global.System.onStatus == undefined) {
_global.System.onStatus = NetDebug.globalOnStatus;
}
Object.version = getVersion().split(",");
Object.majorVersion = int(substring(Object.version[0], Object.version[0].length, 1));
Object.minorVersion = int(Object.version[2]);
if (Object.majorVersion == 5) {
XML.prototype.checkEmpty = function (text) {
var _local3 = text.length;
var _local2 = true;
var _local1 = 0;
while (_local1 < _local3) {
if (ord(substring(text, _local1 + _local1, 1)) > 32) {
_local2 = false;
break;
}
_local1++;
}
return(_local2);
};
XML.prototype.parseXML = function (str) {
var _local3 = this;
_local3.firstChild.removeNode();
var _local2 = _local3;
var tags = new Array();
var textNode = null;
if (Object.minorVersion == 30) {
_local3.status = ASnative(300, 0) /* [XML.prototype.parseXML] - inner function */(str, tags);
} else {
_local3.status = ASnative(300, 0) /* [XML.prototype.parseXML] - inner function */(str, tags, false);
}
if (_local3.status == 0) {
var _local1;
var i = 0;
var max = tags.length;
if (_local3.ignoreWhite) {
while (i < max) {
_local1 = tags[i];
if (_local1.type == 1) {
if (_local1.value == ("/" + _local2.nodeName)) {
_local2 = _local2.parentNode;
} else {
_local2.appendChild(_local3.createElement(_local1.value));
_local2 = _local2.lastChild;
_local2.attributes = _local1.attrs;
if (_local1.empty) {
_local2 = _local2.parentNode;
}
}
} else if (_local1.type == 3) {
if (!_local3.checkEmpty(_local1.value)) {
_local2.appendChild(_local3.createTextNode(_local1.value));
}
} else if (_local1.type == 6) {
_local2.appendChild(_local3.createTextNode(_local1.value));
} else if (_local1.type == 4) {
_local3.xmlDecl = _local1.value;
} else {
_local3.docTypeDecl = _local1.value;
}
i++;
}
} else {
while (i < max) {
_local1 = tags[i];
if (_local1.type == 1) {
if (_local1.value == ("/" + _local2.nodeName)) {
_local2 = _local2.parentNode;
} else {
_local2.appendChild(_local3.createElement(_local1.value));
_local2 = _local2.lastChild;
_local2.attributes = _local1.attrs;
if (_local1.empty) {
_local2 = _local2.parentNode;
}
}
} else if ((_local1.type == 3) || (_local1.type == 6)) {
_local2.appendChild(_local3.createTextNode(_local1.value));
} else if (_local1.type == 4) {
_local3.xmlDecl = _local1.value;
} else {
_local3.docTypeDecl = _local1.value;
}
i++;
}
}
}
};
}
Stage.showMenu = false;
_global.main = this;
lang = _root.lang;
_focusrect = false;
firstInit = true;
xmlIsLoaded = false;
callScriptEnable = true;
maskCarState = true;
xmlNbr = _root.swfLoad.substring(_root.swfLoad.length - 2, _root.swfLoad.length);
thisXML = new XML();
thisXML.ignoreWhite = true;
thisXML.onLoad = xmlLoaded;
thisXML.load(("nanoRaceSetting" + xmlNbr) + ".xml");
stop();
Instance of Symbol 148 MovieClip in Frame 1
onClipEvent (load) {
_visible = false;
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
onClipEvent (enterFrame) {
if (_parent._framesloaded >= 4) {
_visible = true;
}
}
Frame 2
vPool1 = new Array("a", "e", "i", "o", "u", "y");
vPool2 = new Array("au", "oi", "ou", "ya", "ye", "yo", "yu");
cPool1 = new Array("b", "c", "d", "f", "g", "h", "j", "k", "l", "m", "n", "p", "r", "s", "t", "v", "w", "x", "z");
cPool2 = new Array("br", "ch", "cr", "dr", "fr", "gr", "pr", "qu", "tr", "vr");
cPool = cPool1.concat(cPool2);
vPool = vPool1.concat(vPool2);
stop();
Instance of Symbol 177 MovieClip "loader" in Frame 2
onClipEvent (enterFrame) {
bLoaded = _parent.getBytesLoaded();
bTotal = _parent.getBytesTotal();
gotoAndStop(Math.round((bLoaded * this._totalframes) / bTotal));
pLoaded = Math.round((bLoaded * 100) / bTotal);
if (pLoaded < 100) {
counter.text = pLoaded;
} else {
_parent.play();
}
}
Frame 3
function xmlBadWordsLoaded() {
badWordsArray = this.firstChild.firstChild.firstChild.nodeValue.split(",");
}
function xmlUPCLoaded() {
upcString = this.firstChild.firstChild.firstChild.nodeValue;
}
function formatChar(charToFormat) {
var _local1 = charToFormat;
_local1 = _local1.toLowerCase();
if ((((_local1 == "\u00E0") || (_local1 == "\u00E4")) || (_local1 == "\u00E2")) || (_local1 == "\u00E1")) {
return("a");
}
if ((((_local1 == "\u00E8") || (_local1 == "\u00EB")) || (_local1 == "\u00EA")) || (_local1 == "\u00E9")) {
return("e");
}
if ((((_local1 == "\u00EC") || (_local1 == "\u00EF")) || (_local1 == "\u00EE")) || (_local1 == "\u00ED")) {
return("i");
}
if ((((_local1 == "\u00F2") || (_local1 == "\u00F6")) || (_local1 == "\u00F4")) || (_local1 == "\u00F3")) {
return("o");
}
if ((((_local1 == "\u00F9") || (_local1 == "\u00FC")) || (_local1 == "\u00FB")) || (_local1 == "\u00FA")) {
return("u");
}
if ((_local1 == "\u00FF") || (_local1 == "\u00FD")) {
return("y");
}
if (_local1 == "\u00E7") {
return("c");
}
if (regularLetter.indexOf(_local1) < 0) {
return("");
}
return(_local1);
}
function formatString(stringToFormat) {
var _local2 = stringToFormat.split("");
var _local1 = 0;
while (_local1 < _local2.length) {
_local2[_local1] = formatChar(_local2[_local1]);
_local1++;
}
return(_local2.join(""));
}
function validUserLogin() {
var _local2 = formatString(ssUserLogin);
var _local1 = false;
for (var _local3 in badWordsArray) {
if (_local2.indexOf(badWordsArray[_local3]) >= 0) {
_local1 = true;
}
}
if (_local1) {
var ssError = ((lang == "fr") ? "..:: ERREUR ::..\nce mot ne peut pas \u00EAtre utilis\u00E9 comme nom d'utilisateur!" : "..:: ERROR ::..\nthis word can't be used as a login name!");
criticMsgWindow.drawWindow(ssError);
} else {
ssUserLogin = _local2;
}
return(!_local1);
}
function step2Enabled() {
if (loginInput.text != "") {
ok_txt._visible = (ok_btn._visible = (nextBtn._visible = true));
} else {
ok_txt._visible = (ok_btn._visible = (nextBtn._visible = false));
}
}
function setDudeFct(btnObj) {
if (("dude" + main.dudeNbr) != btnObj._name) {
btnObj.nextFrame();
} else {
btnObj.stop();
}
btnObj.hitZone.onRollOver = function () {
if (main.dudteNbr != undefined) {
eval ("dude" + main.dudeNbr).gotoAndStop(2);
main.dudeNbr = undefined;
}
if (("dude" + main.dudeNbr) != btnObj._name) {
btnObj.onEnterFrame = function () {
if (btnObj._currentframe < btnObj._totalframes) {
btnObj.nextFrame();
} else {
btnObj.stop();
}
};
}
};
btnObj.hitZone.onRollOut = function () {
if (("dude" + main.dudeNbr) != btnObj._name) {
btnObj.onEnterFrame = function () {
if (btnObj._currentframe > 2) {
btnObj.prevFrame();
} else {
btnObj.stop();
}
};
}
};
btnObj.hitZone.onPress = function () {
main.dudeNbr = btnObj._name.substring(btnObj._name.length - 1);
main.nextFrame();
};
}
function setCarFct(btnObj) {
if (("car" + main.carNbr) != btnObj._name) {
eval (("main." + btnObj._name) + "Details")._visible = false;
btnObj.gotoAndStop(2);
} else {
if (btnObj._name != "car3") {
eval (("main." + btnObj._name) + "Details")._visible = true;
} else {
eval (("main." + btnObj._name) + "Details")._visible = !main.maskCarState;
windowCar1.gotoAndStop(((!main.maskCarState) ? 1 : 2));
}
btnObj.stop();
}
btnObj.hitZone.onRollOver = function () {
if (((("car" + main.carNbr) == btnObj._name) && (main.carNbr == 3)) && (btnObj._currentframe)) {
} else {
windowCar1.gotoAndStop(1);
if (main.carNbr != undefined) {
nextBtn._visible = false;
eval ("car" + main.carNbr).gotoAndStop(2);
main.carNbr = undefined;
}
if (("car" + main.carNbr) != btnObj._name) {
btnObj.onEnterFrame = function () {
if (btnObj._currentframe < btnObj._totalframes) {
btnObj.nextFrame();
} else {
btnObj.stop();
}
};
}
}
};
btnObj.hitZone.onRollOut = function () {
if (("car" + main.carNbr) != btnObj._name) {
btnObj.onEnterFrame = function () {
if (btnObj._currentframe > 2) {
btnObj.prevFrame();
} else {
btnObj.stop();
}
};
}
};
btnObj.hitZone.onPress = function () {
if (main.carNbr != undefined) {
eval ("car" + main.carNbr).gotoAndStop(2);
}
main.carNbr = Number(btnObj._name.substring(btnObj._name.length - 1));
if ((btnObj._name == "car3") && (main.maskCarState)) {
windowStats3.gotoAndStop(1);
windowCar1.gotoAndStop(2);
btnObj.onEnterFrame = undefined;
btnObj.gotoAndStop(1);
} else {
main.nextFrame();
}
};
}
function setPieceFct(btnObj) {
btnObj.instNum = btnObj._name.substring(btnObj._name.length - 1);
btnObj.chartPieceObj = eval ((("car" + customzMc._currentframe) + "Chart.p") + btnObj.instNum);
btnObj._visible = (eval ("main.customzMc.obj" + btnObj.instNum)._visible = !btnObj.chartPieceObj.purchased);
if (btnObj._visible) {
btnObj.hitZone.onRollOver = function () {
if (("btn" + main.pieceNbr) != btnObj._name) {
btnObj.gotoAndStop(2);
}
};
btnObj.hitZone.onRollOut = function () {
if ((("btn" + main.pieceNbr) != btnObj._name) && (btnObj._currentframe < 3)) {
btnObj.gotoAndStop(1);
}
};
btnObj.hitZone.onPress = function () {
if (main.pieceNbr != undefined) {
eval ("customzMc.btn" + main.pieceNbr).gotoAndStop(1);
}
main.pieceNbr = btnObj.instNum;
chartPieceObj = btnObj.chartPieceObj;
budgetTxt.text = budget;
descTxt.text = btnObj.chartPieceObj.desc;
priceTxt.text = btnObj.chartPieceObj.price;
buyTxt._visible = (purchaseBtn._visible = (btnObj.chartPieceObj.price <= budget) && (!btnObj.chartPieceObj.purchased));
btnObj.gotoAndStop(3);
};
}
}
function setTypeMapFct(btnObj) {
if (("track" + main.pisteNbr) != btnObj._name) {
btnObj.gotoAndStop(2);
} else {
btnObj.stop();
}
btnObj.onRollOver = function () {
if (("track" + main.pisteNbr) != btnObj._name) {
btnObj.onEnterFrame = function () {
if (btnObj._currentframe < btnObj._totalframes) {
btnObj.nextFrame();
} else {
btnObj.stop();
btnObj.onEnterFrame = undefined;
}
};
}
};
btnObj.onRollOut = function () {
if (("track" + main.pisteNbr) != btnObj._name) {
btnObj.onEnterFrame = function () {
if (btnObj._currentframe > 2) {
btnObj.prevFrame();
} else {
btnObj.stop();
btnObj.onEnterFrame = undefined;
}
};
}
};
btnObj.onPress = function () {
if (main.pisteNbr != undefined) {
eval ("track" + main.pisteNbr).gotoAndStop(2);
}
main.pisteNbr = btnObj._name.substring(btnObj._name.length - 1);
if (gameType == "solitary") {
gotoAndStop ("gaming");
} else {
createRoom();
}
};
}
function drawGame(gameObj) {
if (gameObj != undefined) {
gameDesc.roomID = gameObj.roomID;
gameDesc.faces.gotoAndStop(gameObj.userArrayRoom[0].userDude);
gameDesc.tracks.gotoAndStop(gameObj.map);
gameDesc.carSmall.gotoAndStop(gameObj.userArrayRoom[0].userCar);
if (state == "creating") {
if (gameObj.userArrayRoom.length >= userMinQty) {
launchGameBtn._visible = (launchGameTxt._visible = true);
} else {
launchGameBtn._visible = (launchGameTxt._visible = false);
}
} else if (state == "joining") {
if (gameObj.userArrayRoom.length < userMaxQty) {
joinBtn._visible = (joinTxt._visible = true);
}
}
var i = 0;
while (i < userMaxQty) {
if (i < gameObj.userArrayRoom.length) {
eval ("gameDesc.userName" + i).text = gameObj.userArrayRoom[i].userName;
eval ("gameDesc.delBtn" + i)._visible = (state == "creating") || (gameObj.userArrayRoom[i].userName == ssUserLogin);
} else {
eval ("gameDesc.userName" + i).text = "";
eval ("gameDesc.delBtn" + i)._visible = false;
}
i++;
}
gameDesc._visible = true;
} else {
gameDesc._visible = false;
gameDesc.roomID = false;
if (state == "creating") {
launchGameBtn._visible = (launchGameTxt._visible = false);
inviteBtn._visible = (inviteTxt._visible = false);
cancelGameBtn._visible = (cancelGameTxt._visible = false);
} else if (state == "joining") {
joinBtn._visible = (joinTxt._visible = false);
cancelUserBtn._visible = (cancelUserTxt._visible = false);
}
}
}
function drawUser() {
if (main.gameType == "multiPlayer") {
var i = 0;
var j = 0;
do {
if (userRoom.userArrayRoom[i].userName != ssUserLogin) {
j++;
avatarTarget = eval ("avatar" + j);
if (i < userRoom.userArrayRoom.length) {
eval (("gameMain.piste.enemi" + j) + ".colorCircle").gotoAndStop(i + 1);
avatarTarget.faceCircle.gotoAndStop(i + 1);
avatarTarget.carSmall.gotoAndStop(userRoom.userArrayRoom[i].userCar);
avatarTarget.faces.gotoAndStop(userRoom.userArrayRoom[i].userDude);
avatarTarget.userName.text = userRoom.userArrayRoom[i].userName;
twinTarget = eval ("gameMain.twins.twin" + j);
twinTarget.dot.gotoAndStop(i + 1);
twinTarget.userName.text = userRoom.userArrayRoom[i].userName;
} else {
avatarTarget._visible = false;
}
} else {
gameMain.turnTotal = eval ("track" + userRoom.map).turnTotal;
gameMain.piste.car.colorCircle.gotoAndStop(i + 1);
faceCircle.gotoAndStop(i + 1);
}
i++;
} while (i < userMaxQty);
} else {
gameMain.turnTotal = eval ("track" + pisteNbr).turnTotal;
avatar3._visible = (avatar2._visible = (avatar1._visible = false));
}
carSmall.gotoAndStop(carNbr);
energyBar.gotoAndStop(carNbr);
faces.gotoAndStop(dudeNbr);
gameMain.ptsCounter = 0;
}
function reduceEnergy(energyLost) {
energyBar.energyBar.bar._x = energyBar.energyBar.bar._x - energyLost;
if ((energyBar.energyBar.bar._x + energyBar.energyBar.bar._width) <= energyBar.energyBar.barBkg._x) {
keyActive = false;
gameMain.startTimer(timeToRestart);
}
}
function increaseEnergy(energyGain) {
energyBar.energyBar.bar._x = energyBar.energyBar.bar._x + energyGain;
if (energyBar.energyBar.bar._x > energyBar.energyBar.barBkg._x) {
energyBar.energyBar.bar._x = energyBar.energyBar.barBkg._x;
}
}
function initTrackChart() {
track1 = new Object();
track1.turnTotal = 3;
track1.estimatedTime = 30000;
track2 = new Object();
track2.turnTotal = 4;
track2.estimatedTime = 26000;
track3 = new Object();
track3.estimatedTime = 90000 /* 0x015F90 */;
track3.turnTotal = 3;
track4 = new Object();
track4.estimatedTime = 75000 /* 0x0124F8 */;
track4.turnTotal = 2;
}
function initCarChart() {
car1Chart = new Object();
car1Chart.energy = (car1Chart.speed = 0);
car1Chart.maxSpeed = 1.1;
car1Chart.p2 = new Object();
car1Chart.p2.desc = ((lang == "fr") ? "roues 19\" chrom\u00E9es or" : "mags 19\" gold finish");
car1Chart.p2.price = 22000;
car1Chart.p2.speed = 50;
car1Chart.p2.energy = 10;
car1Chart.p2.purchased = false;
car1Chart.p3 = new Object();
car1Chart.p3.desc = ((lang == "fr") ? "prises d'air type testarossa" : "air trap testarossa style");
car1Chart.p3.price = 11500;
car1Chart.p3.speed = 0;
car1Chart.p3.energy = 55;
car1Chart.p3.purchased = false;
car1Chart.p5 = new Object();
car1Chart.p5.desc = ((lang == "fr") ? "tuyaux d'\u00E9chappement, sortie rapide des gazs" : "rapid flow air pipe");
car1Chart.p5.price = 5000;
car1Chart.p5.speed = 5;
car1Chart.p5.energy = 10;
car1Chart.p5.purchased = false;
car1Chart.p6 = new Object();
car1Chart.p6.desc = ((lang == "fr") ? "moteur turbo superformant" : "overperforming turbo motor");
car1Chart.p6.price = 35500;
car1Chart.p6.speed = 45;
car1Chart.p6.energy = 25;
car1Chart.p6.purchased = false;
car2Chart = new Object();
car2Chart.energy = (car2Chart.speed = 0);
car2Chart.maxSpeed = 1;
car2Chart.p2 = new Object();
car2Chart.p2.desc = ((lang == "fr") ? "roues 18\" chrom\u00E9es or" : "mags 18\" gold finish");
car2Chart.p2.price = 22000;
car2Chart.p2.speed = 45;
car2Chart.p2.energy = 10;
car2Chart.p2.purchased = false;
car2Chart.p3 = new Object();
car2Chart.p3.desc = ((lang == "fr") ? "prises d'air type testarossa" : "air trap testarossa style");
car2Chart.p3.price = 11500;
car2Chart.p3.speed = 0;
car2Chart.p3.energy = 20;
car2Chart.p3.purchased = false;
car2Chart.p4 = new Object();
car2Chart.p4.desc = ((lang == "fr") ? "moteur turbo superformant" : "overperforming turbo motor");
car2Chart.p4.price = 35500;
car2Chart.p4.speed = 35;
car2Chart.p4.energy = 45;
car2Chart.p4.purchased = false;
car2Chart.p5 = new Object();
car2Chart.p5.desc = ((lang == "fr") ? "tuyaux d'\u00E9chappement, sortie rapide des gazs" : "rapid flow air pipe");
car2Chart.p5.price = 5000;
car2Chart.p5.speed = 5;
car2Chart.p5.energy = 15;
car2Chart.p5.purchased = false;
car2Chart.p6 = new Object();
car2Chart.p6.desc = ((lang == "fr") ? "jupes lat\u00E9rales a\u00E9rodynamiques" : "aerodynamic wind panel kit");
car2Chart.p6.price = 14000;
car2Chart.p6.speed = 15;
car2Chart.p6.energy = 10;
car2Chart.p6.purchased = false;
car3Chart = new Object();
car3Chart.energy = (car3Chart.speed = 0);
car3Chart.maxSpeed = 1.2;
car3Chart.p1 = new Object();
car3Chart.p1.desc = ((lang == "fr") ? "prise d'air au moteur" : "motor air trap");
car3Chart.p1.price = 12000;
car3Chart.p1.speed = 5;
car3Chart.p1.energy = 30;
car3Chart.p1.purchased = false;
car3Chart.p2 = new Object();
car3Chart.p2.desc = ((lang == "fr") ? "roue 18\" s\u00E9rie titane" : "mags 18\" titanium");
car3Chart.p2.price = 23000;
car3Chart.p2.speed = 50;
car3Chart.p2.energy = 10;
car3Chart.p2.purchased = false;
car3Chart.p3 = new Object();
car3Chart.p3.desc = ((lang == "fr") ? "prises d'air type testarossa" : "air trap testarossa style");
car3Chart.p3.price = 11500;
car3Chart.p3.speed = 0;
car3Chart.p3.energy = 20;
car3Chart.p3.purchased = false;
car3Chart.p4 = new Object();
car3Chart.p4.desc = ((lang == "fr") ? "aileron stabilisateur" : "rear stabilizing spoiler");
car3Chart.p4.price = 16000;
car3Chart.p4.speed = 20;
car3Chart.p4.energy = 15;
car3Chart.p4.purchased = false;
car3Chart.p5 = new Object();
car3Chart.p5.desc = ((lang == "fr") ? "tuyaux d'\u00E9chappement, sortie rapide des gazs" : "rapid flow air pipe");
car3Chart.p5.price = 5000;
car3Chart.p5.speed = 5;
car3Chart.p5.energy = 5;
car3Chart.p5.purchased = false;
car3Chart.p6 = new Object();
car3Chart.p6.desc = ((lang == "fr") ? "lames DTM canaliseur d'air" : "DTM blade wind canalizer");
car3Chart.p6.price = 8500;
car3Chart.p6.speed = 10;
car3Chart.p6.energy = 5;
car3Chart.p6.purchased = false;
car3Chart.p7 = new Object();
car3Chart.p7.desc = ((lang == "fr") ? "jupes lat\u00E9rales a\u00E9rodynamiques" : "aerodynamic wind panel kit");
car3Chart.p7.price = 14000;
car3Chart.p7.speed = 10;
car3Chart.p7.energy = 15;
car3Chart.p7.purchased = false;
car4Chart = new Object();
car4Chart.energy = (car4Chart.speed = 0);
car4Chart.maxSpeed = 0.9;
car4Chart.p2 = new Object();
car4Chart.p2.desc = ((lang == "fr") ? "roues 19\" s\u00E9rie titane" : "mags 19\" titanium");
car4Chart.p2.price = 22000;
car4Chart.p2.speed = 50;
car4Chart.p2.energy = 10;
car4Chart.p2.purchased = false;
car4Chart.p3 = new Object();
car4Chart.p3.desc = ((lang == "fr") ? "prises d'air type testarossa" : "air trap testarossa style");
car4Chart.p3.price = 11500;
car4Chart.p3.speed = 0;
car4Chart.p3.energy = 20;
car4Chart.p3.purchased = false;
car4Chart.p4 = new Object();
car4Chart.p4.desc = ((lang == "fr") ? "aileron stabilisateur" : "rear stabilizing spoiler");
car4Chart.p4.price = 16000;
car4Chart.p4.speed = 25;
car4Chart.p4.energy = 15;
car4Chart.p4.purchased = false;
car4Chart.p5 = new Object();
car4Chart.p5.desc = ((lang == "fr") ? "tuyaux d'\u00E9chappement, sortie rapide des gazs" : "rapid flow air pipe");
car4Chart.p5.price = 5000;
car4Chart.p5.speed = 5;
car4Chart.p5.energy = 15;
car4Chart.p5.purchased = false;
car4Chart.p6 = new Object();
car4Chart.p6.desc = ((lang == "fr") ? "lames DTM canaliseur d'air" : "DTM blade wind canalizer");
car4Chart.p6.price = 8500;
car4Chart.p6.speed = 10;
car4Chart.p6.energy = 15;
car4Chart.p6.purchased = false;
car4Chart.p7 = new Object();
car4Chart.p7.desc = ((lang == "fr") ? "jupes lat\u00E9rales a\u00E9rodynamiques" : "aerodynamic wind panel kit");
car4Chart.p7.price = 14000;
car4Chart.p7.speed = 10;
car4Chart.p7.energy = 25;
car4Chart.p7.purchased = false;
}
function setGlobalStyle() {
globalStyleFormat.background = 16777215 /* 0xFFFFFF */;
globalStyleFormat.face = 2265550 /* 0x2291CE */;
globalStyleFormat.shadow = 2265550 /* 0x2291CE */;
globalStyleFormat.darkshadow = 10998505 /* 0xA7D2E9 */;
globalStyleFormat.highlight = 2265550 /* 0x2291CE */;
globalStyleFormat.highlight3D = 10998505 /* 0xA7D2E9 */;
globalStyleFormat.scrollTrack = 10998505 /* 0xA7D2E9 */;
globalStyleFormat.arrow = 16773175 /* 0xFFF037 */;
globalStyleFormat.selection = 10998505 /* 0xA7D2E9 */;
globalStyleFormat.textSelected = 1263462 /* 0x134766 */;
globalStyleFormat.textColor = 14517504 /* 0xDD8500 */;
globalStyleFormat.applyChanges();
}
function varInitialisation() {
incT = 0;
regularLetter = "abcdefghijklmnopqrstuvwxyz1234567890";
txtTransSpeed = 0.166666666666667;
clearInterval(carInt);
roomAdmin = false;
roomParticipant = false;
roomArray = new Array();
userRoom = new Object();
userConnectedArray = new Array();
updateTime = 1000;
userMaxQty = 4;
userMinQty = 2;
timeToRestart = 3;
ultimateSpeed = 33;
loseEBumpBack = 3;
loseEBumpFront = 2;
gainEGoldenBlock = 10;
pointEnergyBlock = 500;
pointSpeedBlock = 100;
pointOilBlock = -25;
pointJump = 10;
pointLoop = 100;
nbMaxPositions = 10;
splitChr = "*";
testUpdateScore = 0;
callArray = new Array();
waitingForReply = false;
}
function handleReply(successFlag) {
if (successFlag) {
if (this.ssError == undefined) {
switch (lastCallType) {
case "returnScore" :
top10Panel.drawWindow(slObj);
processCall();
break;
default :
processCall();
}
} else {
switch (lastCallType) {
case "userScore" :
if (testUpdateScore < 3) {
testUpdateScore = 0;
updateUserScore(ssUserLogin, lastScore);
}
break;
default :
processCall();
}
this.ssError = undefined;
}
}
}
function incTime() {
incT++;
if (incT >= 90) {
clearInterval(intTime);
}
callObj = new Object();
callObj.callType = "incTime";
callArray.push(callObj);
if (!waitingForReply) {
processCall();
}
}
function newUser() {
callObj = new Object();
callObj.callType = "newUser";
callArray.push(callObj);
if (!waitingForReply) {
processCall();
}
}
function newVisit() {
callObj = new Object();
callObj.callType = "newVisit";
callArray.push(callObj);
if (!waitingForReply) {
processCall();
}
}
function selectGame(gameType) {
callObj = new Object();
callObj.callType = "selectGame";
if (gameType == "quickGame") {
callObj.gameType = 1;
} else if (gameType == "solitary") {
callObj.gameType = 2;
} else {
callObj.gameType = 3;
}
callArray.push(callObj);
if (!waitingForReply) {
processCall();
}
}
function selectCar(carNb) {
callObj = new Object();
callObj.callType = "selectCar";
callObj.carNbr = Number(carNb);
callArray.push(callObj);
if (!waitingForReply) {
processCall();
}
}
function selectDude(dudeNb) {
callObj = new Object();
callObj.callType = "selectDude";
callObj.dudeNbr = Number(dudeNb);
callArray.push(callObj);
if (!waitingForReply) {
processCall();
}
}
function selectTrack(trackNb) {
callObj = new Object();
callObj.callType = "selectTrack";
callObj.trackNbr = Number(trackNb);
callArray.push(callObj);
if (!waitingForReply) {
processCall();
}
}
function timeTrack(trackNb, timeSpent) {
callObj = new Object();
callObj.callType = "timeTrack";
callObj.trackNbr = Number(trackNb);
callObj.timeSpent = Number(Math.round(timeSpent / 1000));
callArray.push(callObj);
if (!waitingForReply) {
processCall();
}
}
function updateUserScore(userName, userScore) {
testUpdateScore++;
callObj = new Object();
callObj.callType = "userScore";
callObj.userName = escape(userName);
callObj.userScore = (lastScore = Number(userScore));
callArray.push(callObj);
if (!waitingForReply) {
processCall();
}
}
function returnScore() {
top10Panel.drawWindow(undefined);
callObj = new Object();
callObj.callType = "returnScore";
callArray.push(callObj);
if (!waitingForReply) {
processCall();
}
}
function processCall() {
if (callScriptEnable) {
clearInterval(processInt);
if (callArray.length > 0) {
processInt = setInterval(processCall, 8000);
callObj = callArray.shift();
slObj = new LoadVars();
for (var _local1 in callObj) {
Set("slObj." + _local1, callObj[_local1]);
}
lastCallType = callObj.callType;
slObj.onLoad = handleReply;
slObj.sendAndLoad(scriptLink, slObj, "post");
waitingForReply = true;
} else {
waitingForReply = false;
}
}
}
function doConnect() {
nr_nc.connect(((connectionType + "://") + URLTarget) + ssRoom);
}
function testLogin() {
nr_nc.call("login", null, ssUserLogin, lang);
}
function setNrNcFunction() {
nr_nc.testLoginResult = function (msgStatus) {
var _local1 = msgStatus;
if (_local1 == "userLimitExceeded") {
criticMsgWindow.drawCriticWindow(((lang == "fr") ? "..:: ERREUR ::..\nla limite d'utilisateurs est d\u00E9j\u00E0 atteinte, essayes plus tard" : "..:: ERROR ::..\nthe user limit is already reached, try again later"));
connectWindow.connectStatus("notConnected");
} else if (_local1 == "userAlreadyConnected") {
criticMsgWindow.drawCriticWindow(((lang == "fr") ? (("..:: ERREUR ::..\n" + ssUserLogin) + " est un nom d\u00E9j\u00E0 utilis\u00E9") : (("..:: ERROR ::..\n" + ssUserLogin) + " is already a name used")));
connectWindow.connectStatus("notConnected");
} else if (_local1 == "userConnected") {
connectWindow.connectStatus("connected");
initUserSO();
callInitRoomArray();
}
};
nr_nc.onStatus = function (info) {
var _local1 = info;
if (_local1.code == "NetConnection.Connect.Success") {
testLogin();
} else if (_local1.code == "NetConnection.Connect.Rejected") {
criticMsgWindow.drawCriticWindow(((lang == "fr") ? ((("..:: ERREUR ::..\n" + _local1.code) + " - ") + _local1.application.errorMsg) : ((("..:: ERROR ::..\n" + _local1.code) + " - ") + _local1.application.errorMsg)));
connectWindow.connectStatus("disconnected");
} else if ((_local1.code == "NetConnection.Call.Failed") || (_local1.code == "NetConnection.Call.BadVersion")) {
criticMsgWindow.drawCriticWindow(((lang == "fr") ? ((("..:: ERREUR ::.. \n" + _local1.code) + " - ") + _local1.description) : ((("..:: ERROR ::..\n" + _local1.code) + " - ") + _local1.description)));
connectWindow.connectStatus("disconnected");
} else {
criticMsgWindow.drawCriticWindow(((lang == "fr") ? ((("..:: ERREUR ::..\n" + _local1.code) + " - ") + _local1.description) : ((("..:: ERROR ::..\n" + _local1.code) + " - ") + _local1.description)));
connectWindow.connectStatus("disconnected");
userSO.close();
delete userSO;
}
};
nr_nc.pingCall = function () {
nr_nc.call("pingCall", null);
};
nr_nc.throwCriticMsgWindow = function (msgContent) {
if (gameType == "multiPlayer") {
criticMsgWindow.drawWindow(((lang == "fr") ? (unescape(msgContent)) : (msgContent)));
}
};
nr_nc.initRoomArray = function (roomObjArray) {
var _local2 = roomObjArray;
roomArray = new Array();
var _local1 = 0;
while (_local1 < _local2.length) {
addRoom(_local2[_local1]);
_local1++;
}
};
nr_nc.receiveInvitation = function (fromUser, toRoomID) {
adminRequestID = toRoomID;
confirmWindow.drawWindow(((lang == "fr") ? (fromUser + " vous invite \u00E0 joindre sa partie, acceptez-vous?") : (fromUser + " is inviting you to join his/her game, do you accept?")), "receiveAdminRequest");
};
nr_nc.receiveStartRoomRequest = function (fromUser) {
confirmWindow.drawWindow(((lang == "fr") ? (fromUser + " aimerait bien commencer \u00E0 jouer. Voulez-vous commencer la partie?") : (fromUser + " would like to start the race. Do you want to start the game?")), "startRoomRequest");
};
}
function initUserSO() {
userSO = SharedObject.getRemote("userSO", nr_nc.uri, false);
userSO.onSync = function (userArray) {
var i = 0;
while (i < userArray.length) {
switch (userArray[i].code) {
case "clear" :
userConnectedArray = new Array();
if ((state == "creating") || (state == "joining")) {
free_lb.removeAll();
}
break;
case "change" :
var tmpData = eval ("this.data." + userArray[i].name);
if (userArray[i].name == ssUserLogin) {
state = tmpData;
if (state == "creating") {
roomAdmin = true;
roomParticipant = true;
} else if (state == "joining") {
roomAdmin = false;
roomParticipant = true;
} else if (state == "gaming") {
} else {
roomAdmin = false;
roomParticipant = false;
}
gotoAndStop(state);
processWindow.closeWindow();
}
if (tmpData == "joining") {
if (state == "creating") {
free_lb.addItem(userArray[i].name);
}
} else if (tmpData == "creating") {
if (state == "joining") {
free_lb.addItem(userArray[i].name);
}
}
var newUserObj = new Object();
newUserObj.userName = userArray[i].name;
newUserObj.state = tmpData;
userConnectedArray.push(newUserObj);
break;
case "delete" :
var j = 0;
while (j < userConnectedArray.length) {
if (userConnectedArray[j].userName == userArray[i].name) {
userConnectedArray.splice(j, 1);
break;
}
j++;
}
if (!((state == "creating") || (state == "joining"))) {
break;
}
if (free_lb.getValue() == userArray[i].name) {
if (state == "creating") {
inviteTxt._visible = (inviteBtn._visible = false);
} else {
drawGame(undefined);
}
}
var j = 0;
for(;;){
if (j >= free_lb.getLength()) {
break;
}
if (free_lb.getItemAt(j).label == userArray[i].name) {
free_lb.removeItemAt(j);
break;
}
j++;
};
}
i++;
}
if ((state == "creating") || (state == "joining")) {
free_lb.sortItemsBy("label", "ASC");
}
};
userSO.addRoom = function (addRoomObj) {
addRoom(addRoomObj);
};
userSO.removeRoom = function (removeRoomID) {
removeRoom(removeRoomID);
};
userSO.updateRoom = function (updateRoomObj) {
updateRoom(updateRoomObj);
};
if (!userSO.connect(nr_nc)) {
criticMsgWindow.drawCriticWindow(((lang == "fr") ? "..:: ERREUR ::..\nImpossible d'\u00E9tablir une connection" : "..:: ERROR ::..\nCan't establish the connection"));
connectWindow.connectStatus("disconnected");
}
}
function initRoomSO(roomNameSO) {
roomSO = SharedObject.getRemote(roomNameSO, nr_nc.uri, false);
roomSO.startGame = function () {
gotoAndStop ("game");
};
roomSO.showUserDisconnected = function (targetUser) {
var i = 1;
while (i < userMaxQty) {
avatarTarget = eval ("avatar" + i);
if (avatarTarget.userName.text == targetUser) {
avatarTarget.gotoAndStop(((lang == "fr") ? "disconnected" : "disconnected2"));
eval ("gameMain.piste.enemi" + i).gotoAndStop("disconnected");
eval ("gameMain.twins.twin" + i).gotoAndStop("disconnected");
return;
}
i++;
}
};
roomSO.showRobotDisconnected = function () {
var i = 0;
while (i < userRoom.userArrayRoom.length) {
if (userRoom.userArrayRoom[i].userType == "robot") {
var j = 1;
while (j < userMaxQty) {
avatarTarget = eval ("avatar" + j);
if (avatarTarget.userName.text == userRoom.userArrayRoom[i].userName) {
avatarTarget.gotoAndStop(((lang == "fr") ? "disconnected" : "disconnected2"));
eval ("gameMain.piste.enemi" + j).gotoAndStop("disconnected");
eval ("gameMain.twins.twin" + j).gotoAndStop("disconnected");
break;
}
j++;
}
}
i++;
}
};
roomSO.updatePosition = function (newX, newY, targetUser) {
if (targetUser != ssUserLogin) {
var i = 1;
while (i < userMaxQty) {
avatarTarget = eval ("avatar" + i);
if (avatarTarget.userName.text == targetUser) {
twinTarget = eval ("gameMain.twins.twin" + i);
enemiTarget = eval ("gameMain.piste.enemi" + i);
twinTarget._x = (enemiTarget._x = newX);
twinTarget._y = (enemiTarget._y = newY);
return;
}
i++;
}
}
};
roomSO.updateResult = function (winner) {
if (roomAdmin) {
var i = 0;
while (i < userRoom.userArrayRoom.length) {
if ((userRoom.userArrayRoom[i].userType == "robot") && (userRoom.userArrayRoom[i].userName != winner)) {
var j = 1;
while (j < userMaxQty) {
avatarTarget = eval ("avatar" + j);
if (avatarTarget.userName.text == userRoom.userArrayRoom[i].userName) {
nr_nc.call("updateResult", null, roomID, userRoom.userArrayRoom[i].userName, eval ("gameMain.piste.enemi" + j).turn, getRandomScore());
break;
}
j++;
}
}
i++;
}
}
if (winner != ssUserLogin) {
nr_nc.call("updateResult", null, roomID, ssUserLogin, gameMain.turn, gameMain.ptsCounter);
}
};
roomSO.showEndWindow = function (resultArray) {
endScreen.resultArray = new Array();
endScreen.resultArray = resultArray;
endScreen.drawWindow();
};
if (!roomSO.connect(nr_nc)) {
criticMsgWindow.drawCriticWindow(((lang == "fr") ? "..:: ERREUR ::..\nImpossible d'\u00E9tablir une connection" : "..:: ERROR ::..\nCan't establish the connection"));
connectWindow.connectStatus("disconnected");
}
}
function changeUserState(newState) {
nr_nc.call("changeUserState", null, ssUserLogin, newState);
processWindow.drawWindow();
}
function callInitRoomArray() {
nr_nc.call("initRoomArray", null);
}
function populateFreeLb() {
free_lb.removeAll();
if (state == "creating") {
inviteBtn._visible = (inviteTxt._visible = false);
launchGameBtn._visible = (launchGameTxt._visible = false);
robotInt = setInterval(addRobot, timeAddRobot * 1000);
for (var _local1 in userConnectedArray) {
if (userConnectedArray[_local1].state == "joining") {
free_lb.addItem(userConnectedArray[_local1].userName);
}
}
} else if (state == "joining") {
joinBtn._visible = (joinTxt._visible = false);
for (var _local1 in userConnectedArray) {
if (userConnectedArray[_local1].state == "creating") {
free_lb.addItem(userConnectedArray[_local1].userName);
}
}
}
}
function deleteRoomSO() {
roomSO.close();
delete userRoom;
delete roomSO;
}
function createRoom() {
var _local1 = new Object();
_local1.state = "room";
_local1.map = pisteNbr;
_local1.userArrayRoom = new Array();
_local1.userArrayRoom.push(collectUserDetails());
nr_nc.call("addRoom", null, _local1);
processWindow.drawWindow();
}
function addRoom(addRoomObj) {
var _local1 = addRoomObj;
if (_local1.userArrayRoom[0].userName == ssUserLogin) {
userRoom = new Object();
userRoom = _local1;
roomAdmin = i == 0;
roomParticipant = true;
roomID = _local1.roomID;
initRoomSO("r" + roomID);
drawGame(_local1);
}
roomArray.push(_local1);
}
function destroyRoom() {
clearInterval(robotInt);
nr_nc.call("removeRoom", null, roomID);
processWindow.drawWindow();
}
function removeRoom(removeRoomID) {
var _local1 = removeRoomID;
for (var _local2 in roomArray) {
if (roomArray[_local2].roomID == _local1) {
roomArray.splice(_local2, 1);
}
}
if (roomID == _local1) {
deleteRoomSO();
roomID = undefined;
roomAdmin = false;
roomParticipant = false;
}
if (gameDesc.roomID == _local1) {
drawGame(undefined);
joinBtn._visible = (joinTxt._visible = false);
launchGameBtn._visible = (launchGameTxt._visible = false);
}
}
function updateRoom(updateRoomObj) {
var _local1 = updateRoomObj;
if (_local1.state == "game") {
if (gameDesc.roomID == _local1.roomID) {
drawGame(undefined);
}
}
if ((roomID == undefined) || (roomID == _local1.roomID)) {
var _local2 = false;
var oldRoomID = roomID;
var _local3 = 0;
while (_local3 < _local1.userArrayRoom.length) {
if (_local1.userArrayRoom[_local3].userName == ssUserLogin) {
_local2 = true;
userRoom = new Object();
userRoom = _local1;
if (roomID == undefined) {
roomID = _local1.roomID;
initRoomSO("r" + roomID);
roomParticipant = true;
}
roomAdmin = _local3 == 0;
break;
}
_local3++;
}
if ((!_local2) && (roomID == _local1.roomID)) {
deleteRoomSO();
roomID = undefined;
roomAdmin = false;
roomParticipant = false;
drawGame(undefined);
}
if ((gameDesc.roomID == _local1.roomID) || (roomID == _local1.roomID)) {
drawGame(_local1);
}
}
for (var _local3 in roomArray) {
if (roomArray[_local3].roomID == _local1.roomID) {
roomArray[_local3] = new Object();
roomArray[_local3] = _local1;
break;
}
}
}
function startRoom() {
clearInterval(robotInt);
nr_nc.call("startRoom", null, roomID);
processWindow.drawWindow();
}
function flushResult() {
clearInterval(intFlushResult);
nr_nc.call("flushResult", null, roomID);
}
function stopGame(userWinner) {
clearInterval(carInt);
if (gameType == "multiPlayer") {
intFlushResult = setInterval(flushResult, 10000);
nr_nc.call("stopGame", null, roomID, ssUserLogin, gameMain.turnTotal, gameMain.ptsCounter, getTimer() - main.offSet, eval ("track" + userRoom.map).estimatedTime);
} else {
endScreen.drawWindow();
}
}
function stopGameRobot(robotWinner) {
nr_nc.call("stopGame", null, roomID, robotWinner, gameMain.turnTotal, getRandomScore(), main.offSet - getTimer(), eval ("track" + userRoom.map).estimatedTime);
}
function collectUserDetails() {
var userDetails = new Object();
var carUsed = eval (("car" + carNbr) + "Chart");
userDetails.userName = ssUserLogin;
userDetails.userType = "real";
userDetails.userCar = carNbr;
userDetails.userDude = dudeNbr;
userDetails.userSpeed = carUsed.speed;
userDetails.userEnergy = carUsed.energy;
return(userDetails);
}
function collectRobotDetails() {
var _local1 = new Object();
_local1.userName = getRandomWord(6);
_local1.userType = "robot";
_local1.userCar = random(4) + 1;
_local1.userDude = random(4) + 1;
_local1.userSpeed = (Math.random() * 0.02) + 0.03;
_local1.userEnergy = 50 + random(25);
return(_local1);
}
function getRandomScore() {
return(random(150) * 10);
}
function addUser(addUserRoomID) {
nr_nc.call("addUser", null, addUserRoomID, collectUserDetails());
processWindow.drawWindow();
}
function addRobot() {
nr_nc.call("addUser", null, roomID, collectRobotDetails());
clearInterval(robotInt);
robotInt = setInterval(addRobot, (timeAddRobot * 3) * 500);
}
function removeUser(userName) {
nr_nc.call("removeUser", null, roomID, userName);
if (userName == ssUserLogin) {
processWindow.drawWindow();
}
}
function selectRoom() {
var _local1 = 0;
while (_local1 < roomArray.length) {
if (roomArray[_local1].userArrayRoom[0].userName == free_lb.getValue()) {
drawGame(roomArray[_local1]);
return;
}
_local1++;
}
}
function selectPlayer() {
inviteBtn._visible = (inviteTxt._visible = true);
}
function inviteUser(invitedUserName) {
nr_nc.call("inviteUser", null, roomID, invitedUserName);
}
function requestStartRoom(adminName) {
nr_nc.call("requestStartRoom", null, adminName);
}
function updatePosition() {
nr_nc.call("updatePosition", null, ssUserLogin, gameMain.piste.car._x, gameMain.piste.car._y, roomID);
if (roomAdmin) {
var i = 0;
while (i < userRoom.userArrayRoom.length) {
if (userRoom.userArrayRoom[i].userType == "robot") {
var j = 1;
while (j < userMaxQty) {
if (eval (("avatar" + j) + ".userName").text == userRoom.userArrayRoom[i].userName) {
enemiTarget = eval ("gameMain.piste.enemi" + j);
nr_nc.call("updatePosition", null, userRoom.userArrayRoom[i].userName, enemiTarget._x, enemiTarget._y, roomID);
break;
}
j++;
}
}
i++;
}
}
}
stopAllSounds();
_quality = "HIGH";
getRandomWord = function (wordSize) {
var _local3 = wordSize;
endWord = _local3 - 2;
var _local1 = "";
var _local2 = Boolean(random(2));
_local1 = _local1 + (_local2 ? (cPool[random(cPool.length)].substr(0, 1).toUpperCase()) : (vPool[random(vPool.length)].substr(0, 1).toUpperCase()));
do {
_local2 = !_local2;
sizeOption = ((_local1.length < endWord) ? (Boolean(random(2))) : false);
addS = (_local2 ? ((sizeOption ? (cPool2[random(cPool2.length)]) : (cPool1[random(cPool1.length)]))) : ((sizeOption ? (vPool2[random(vPool2.length)]) : (vPool1[random(vPool1.length)]))));
if ((_local1.length + addS.length) > _local3) {
return(_local1);
}
_local1 = _local1 + addS;
} while (_local1.length <= _local3);
return(_local1);
};
varInitialisation();
setGlobalStyle();
initCarChart();
initTrackChart();
badWordXML = new XML();
badWordXML.ignoreWhite = true;
badWordXML.onLoad = xmlBadWordsLoaded;
badWordXML.load("badWords.xml");
upcXML = new XML();
upcXML.ignoreWhite = true;
upcXML.onLoad = xmlUPCLoaded;
upcXML.load("upcCode.xml");
timeOffset = getTimer() / 1000;
if (_parent.newUser) {
newUser();
}
newVisit();
intTime = setInterval(incTime, 60000);
if (firstInit) {
firstInit = false;
if (gameType == "quickGame") {
gotoAndStop ("gaming");
} else if (gameType == "solitary") {
gotoAndStop ("start");
} else {
gotoAndStop ("step1");
setNrNcFunction();
}
} else {
gotoAndStop ("chooseType");
}
Frame 4
budget = cashAmount;
gameType = undefined;
dudeNbr = undefined;
carNbr = undefined;
pisteNbr = undefined;
ssUserLogin = "";
nr_nc.close();
delete nr_nc;
Instance of Symbol 180 MovieClip "musique" in Frame 4
onClipEvent (load) {
main.soundVolume.setVolume(main.mainVolume);
}
Instance of Symbol 148 MovieClip in Frame 4
onClipEvent (load) {
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
Frame 5
Selection.setFocus("loginInput");
loginInput.onChanged = step2Enabled;
step2Enabled();
step_txt.text = 1;
Instance of Symbol 202 MovieClip in Frame 5
onClipEvent (load) {
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
Instance of Symbol 239 MovieClip in Frame 5
onClipEvent (load) {
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
Instance of Symbol 247 MovieClip in Frame 5
onClipEvent (load) {
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
Instance of Symbol 256 MovieClip "processWindow" in Frame 5
onClipEvent (load) {
_visible = false;
bkg.onPress = function () {
};
bkg.useHandCursor = false;
drawWindow = function () {
timeOut = setInterval(closeWindow, 5000);
openWindow();
};
openWindow = function () {
_visible = true;
};
closeWindow = function () {
clearInterval(timeOut);
_visible = false;
};
}
Instance of Symbol 271 MovieClip "connectWindow" in Frame 5
onClipEvent (load) {
bkg._visible = false;
bkg.onPress = function () {
};
bkg.useHandCursor = false;
connectStatus = function (connectionStatus) {
switch (connectionStatus) {
case "notConnected" :
led.gotoAndStop("grey");
bkg._visible = false;
return;
case "asked" :
led.gotoAndStop("yellow");
bkg._visible = true;
return;
case "connected" :
led.gotoAndStop("green");
bkg._visible = false;
return;
case "disconnected" :
led.gotoAndStop("red");
bkg._visible = false;
}
};
}
Instance of Symbol 287 MovieClip "confirmWindow" in Frame 5
onClipEvent (load) {
_visible = false;
clock._visible = false;
openWindow = function () {
_visible = true;
};
closeWindow = function () {
delete this.onEnterFrame;
clock._visible = false;
_visible = false;
};
startTimer = function (thisTimeOut) {
initTimer = getTimer() / 1000;
this.onEnterFrame = function () {
timeElaped = Math.abs(getTimer() / 1000) - initTimer;
clock.showTime(timeElaped, thisTimeOut);
if ((thisTimeOut - Math.floor(timeElaped)) <= 0) {
doAction();
delete this.onEnterFrame;
}
};
};
drawWindow = function (msgContent, processType) {
msg.text = msgContent;
switch (processType) {
case "destroyRoom" :
doAction = function () {
main.destroyRoom();
closeWindow();
};
break;
case "userQuitting" :
doAction = function () {
main.removeUser(ssUserLogin);
closeWindow();
};
break;
case "inviteUser" :
doAction = function () {
main.inviteUser();
closeWindow();
};
break;
case "receiveAdminRequest" :
doAction = function () {
main.addUser(main.adminRequestID);
closeWindow();
};
break;
case "startRoomRequest" :
if (main.roomAdmin) {
clock._visible = true;
startTimer(main.startRequestTimeOut);
doAction = function () {
main.startRoom();
closeWindow();
};
} else {
closeWindow();
}
}
openWindow();
};
}
Instance of Symbol 295 MovieClip "criticMsgWindow" in Frame 5
onClipEvent (load) {
_visible = false;
drawWindow = function (msgContent) {
msg.text = msgContent;
ok_btn._visible = (ok_txt._visible = true);
critic_btn._visible = (critic_txt._visible = false);
openWindow();
};
drawCriticWindow = function (msgContent) {
msg.text = msgContent;
ok_btn._visible = (ok_txt._visible = false);
critic_btn._visible = (critic_txt._visible = true);
openWindow();
};
openWindow = function () {
_visible = true;
};
closeWindow = function () {
_visible = false;
};
}
Instance of Symbol 322 MovieClip "top10Panel" in Frame 5
onClipEvent (load) {
_visible = false;
drawWindow = function (varObj) {
if (varObj == undefined) {
loading.gotoAndPlay("actif");
} else {
loading.gotoAndStop("inactif");
var _local1;
_local1 = 1;
while (_local1 <= main.nbMaxPositions) {
var _local2 = this["elem_pos_" + _local1];
if (_local1 <= varObj.nbPositions) {
var newScore = varObj["score" + _local1];
var _local3 = unescape(newScore).split(main.splitChr);
_local2.v_user = _local3[0];
_local2.v_score = Number(_local3[1]);
_local2._visible = true;
} else {
_local2._visible = false;
}
_local1++;
}
}
openWindow();
};
openWindow = function () {
_visible = true;
};
closeWindow = function () {
_visible = false;
};
}
Frame 6
if (dudeNbr != undefined) {
nextBtn._visible = true;
} else {
nextBtn._visible = false;
}
if (gameType == "multiPlayer") {
step_txt.text = 2;
} else {
step_txt.text = 1;
}
Instance of Symbol 359 MovieClip "dude4" in Frame 6
onClipEvent (load) {
main.setDudeFct(this);
}
Instance of Symbol 369 MovieClip "dude1" in Frame 6
onClipEvent (load) {
main.setDudeFct(this);
}
Instance of Symbol 379 MovieClip "dude2" in Frame 6
onClipEvent (load) {
main.setDudeFct(this);
}
Instance of Symbol 389 MovieClip "dude3" in Frame 6
onClipEvent (load) {
main.setDudeFct(this);
}
Instance of Symbol 395 MovieClip in Frame 6
onClipEvent (load) {
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
Frame 7
if (carNbr != undefined) {
if (carNbr != 3) {
nextBtn._visible = true;
} else {
nextBtn._visible = !main.maskCarState;
}
} else {
nextBtn._visible = false;
}
if (gameType == "multiPlayer") {
step_txt.text = 3;
} else {
step_txt.text = 2;
}
Instance of Symbol 414 MovieClip "car3" in Frame 7
onClipEvent (load) {
main.setCarFct(this);
}
Instance of Symbol 420 MovieClip "car2" in Frame 7
onClipEvent (load) {
main.setCarFct(this);
}
Instance of Symbol 426 MovieClip "car1" in Frame 7
onClipEvent (load) {
main.setCarFct(this);
}
Instance of Symbol 432 MovieClip "car4" in Frame 7
onClipEvent (load) {
main.setCarFct(this);
}
Instance of Symbol 502 MovieClip "windowCar1" in Frame 7
onClipEvent (load) {
_visible = main.maskCarState;
}
Instance of Symbol 542 MovieClip in Frame 7
onClipEvent (load) {
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
Frame 8
_quality = "HIGH";
pieceNbr = undefined;
pisteNbr = undefined;
budgetTxt.text = budget;
buyTxt._visible = (purchaseBtn._visible = false);
nextBtn._visible = true;
if (gameType == "multiPlayer") {
step_txt.text = 4;
} else {
step_txt.text = 3;
}
Instance of Symbol 682 MovieClip "customzMc" in Frame 8
onClipEvent (load) {
gotoAndStop("car" + main.carNbr);
}
Instance of Symbol 698 MovieClip "buyTxt" in Frame 8
onClipEvent (load) {
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
Instance of Symbol 703 MovieClip in Frame 8
onClipEvent (load) {
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
Instance of Symbol 721 MovieClip in Frame 8
onClipEvent (load) {
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
Instance of Symbol 767 MovieClip "endScreen" in Frame 8
onClipEvent (load) {
function numericSort(a, b) {
var _local1 = b;
var _local2 = a;
if (_local2.bonus != undefined) {
return(-1);
}
if (_local1.bonus != undefined) {
return(-1);
}
if (_local2.score < _local1.score) {
return(1);
}
if (_local2.score > _local1.score) {
return(-1);
}
return(0);
}
_visible = false;
cleanUp = function () {
var i = 0;
while (i < main.userMaxQty) {
var instNbr = (i + 1);
eval ("number" + instNbr)._visible = false;
eval ("cercle" + instNbr)._visible = false;
eval ("bkgName" + instNbr)._visible = false;
eval ("bkgPoint" + instNbr)._visible = false;
eval ("userName" + instNbr).text = "";
eval ("score" + instNbr).text = (eval ("rScore" + instNbr).text = "");
bonus.text = "";
i++;
}
};
drawWindow = function () {
cleanUp();
if (main.gameType == "multiPlayer") {
resultArray.sort(numericSort);
var i = 0;
while (i < resultArray.length) {
var instNbr = (i + 1);
eval ("number" + instNbr)._visible = true;
eval ("cercle" + instNbr)._visible = true;
eval ("bkgName" + instNbr)._visible = true;
eval ("bkgPoint" + instNbr)._visible = true;
eval ("userName" + instNbr).text = resultArray[i].userName;
eval ("rScore" + instNbr).text = Math.round(Number(resultArray[i].score));
if (resultArray[i].bonus != undefined) {
bonus.text = Math.round(Number(resultArray[i].bonus));
eval ("score" + instNbr).text = Math.round(Number(resultArray[i].score) + Number(resultArray[i].bonus));
} else {
eval ("score" + instNbr).text = Math.round(Number(resultArray[i].score));
}
if (resultArray[i].userName == main.ssUserLogin) {
thisUserScore = Number(resultArray[i].score);
if (i == 0) {
thisUserScore = thisUserScore + Number(resultArray[i].bonus);
}
main.budget = main.budget + Math.abs(Math.round(Number(thisUserScore)));
}
i++;
}
} else {
gotoAndStop (2);
}
main.keyActive = false;
openWindow();
};
openWindow = function () {
main.timeTrack(((main.gameType == "multiPlayer") ? (main.userRoom.map) : (main.pisteNbr)), getTimer() - main.offSet);
stopAllSounds();
clearInterval(main.carInt);
clearInterval(main.intFlushResult);
_quality = "HIGH";
_visible = true;
};
closeWindow = function () {
_quality = "HIGH";
delete resultArray;
gameMain.lowSpeed.s.setVolume(0);
gameMain.highSpeed.s.setVolume(0);
if (main.gameType == "multiPlayer") {
main.deleteRoomSO();
main.nr_nc.call("flushRoom", null, main.roomID);
main.updateUserScore(main.ssUserLogin, Math.round(Number(thisUserScore)));
} else if (main.gameType == "quickGame") {
main.gotoAndStop("chooseType");
} else {
main.budget = main.budget + Math.round(gameMain.ptsCounter);
main.gotoAndStop("custom");
}
_visible = false;
gotoAndStop (1);
};
stop();
}
Frame 9
callInitRoomArray();
clearInterval(robotInt);
step_txt.text = 5;
Instance of Symbol 780 MovieClip in Frame 9
onClipEvent (load) {
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
Frame 10
clearInterval(robotInt);
drawGame(undefined);
if (gameType == "multiPlayer") {
step_txt.text = 6;
} else {
step_txt.text = 4;
}
Instance of Symbol 797 MovieClip "track3" in Frame 10
onClipEvent (load) {
main.setTypeMapFct(this);
}
Instance of Symbol 817 MovieClip "track4" in Frame 10
onClipEvent (load) {
main.setTypeMapFct(this);
}
Instance of Symbol 826 MovieClip "track1" in Frame 10
onClipEvent (load) {
main.setTypeMapFct(this);
}
Instance of Symbol 829 MovieClip "track2" in Frame 10
onClipEvent (load) {
main.setTypeMapFct(this);
}
Instance of Symbol 863 MovieClip "gameDesc" in Frame 10
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 870 MovieClip in Frame 10
onClipEvent (load) {
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
Frame 11
free_lb.setChangeHandler("selectPlayer");
inviteTxt._visible = (inviteBtn._visible = false);
launchGameBtn._visible = (launchGameTxt._visible = false);
populateFreeLb();
step_txt.text = 7;
Instance of Symbol 103 MovieClip [FListBoxSymbol] "free_lb" in Frame 11
//component parameters
onClipEvent (initialize) {
selectMultiple = false;
changeHandler = "";
}
Instance of Symbol 886 MovieClip "inviteTxt" in Frame 11
onClipEvent (load) {
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
Instance of Symbol 893 MovieClip "launchGameTxt" in Frame 11
onClipEvent (load) {
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
Instance of Symbol 898 MovieClip "cancelGameTxt" in Frame 11
onClipEvent (load) {
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
Instance of Symbol 908 MovieClip in Frame 11
onClipEvent (load) {
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
Instance of Symbol 910 MovieClip "clock" in Frame 11
onClipEvent (enterFrame) {
swatch._rotation = swatch._rotation + 5;
}
Frame 12
populateFreeLb();
free_lb.setChangeHandler("selectRoom");
drawGame(undefined);
joinTxt._visible = (joinBtn._visible = false);
step_txt.text = 6;
Instance of Symbol 916 MovieClip "joinTxt" in Frame 12
onClipEvent (load) {
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
Instance of Symbol 929 MovieClip in Frame 12
onClipEvent (load) {
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
Frame 13
var i = 0;
while (i < roomArray.length) {
if (roomArray[i].roomID == free_lb.getValue()) {
drawGame(roomArray[i]);
break;
}
i++;
}
step_txt.text = 7;
Instance of Symbol 937 MovieClip "cancelUserTxt" in Frame 13
onClipEvent (load) {
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
Instance of Symbol 946 MovieClip in Frame 13
onClipEvent (load) {
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
Frame 15
pingFreq = 20000;
userMaxQty = 4;
userNbrLimit = 50;
Client.prototype.login = function (name, lang) {
var _local1 = this;
if (application.clients.length >= userNbrLimit) {
_local1.call("testLoginResult", null, "userLimitExceeded");
} else if (application.userSO.getProperty(name) != undefined) {
_local1.call("testLoginResult", null, "userAlreadyConnected");
} else {
_local1.name = name;
_local1.lang = lang;
_local1.userObj = undefined;
_local1.pingAsked = false;
application.userSO.setProperty(_local1.name, "start");
_local1.call("testLoginResult", null, "userConnected");
}
};
application.getNewID = function () {
return((application.lastRoomID = application.lastRoomID + 1));
};
application.findUser = function (userName) {
var _local2 = userName;
var _local1 = 0;
while (_local1 < application.clients.length) {
if (application.clients[_local1].name == _local2) {
return(_local1);
}
_local1++;
}
return(undefined);
};
application.findRoomIndex = function (roomID) {
var _local2 = roomID;
var _local1 = 0;
while (_local1 < application.roomArray.length) {
if (application.roomArray[_local1].roomID == _local2) {
return(_local1);
}
_local1++;
}
return(undefined);
};
Client.prototype.pingCall = function () {
this.pingAsked = false;
};
Client.prototype.initRoomArray = function () {
this.call("initRoomArray", null, application.roomArray);
};
Client.prototype.addRoom = function (roomObj) {
application.addRoom(roomObj, this);
};
Client.prototype.removeRoom = function (roomID) {
application.removeRoom(roomID, this);
};
Client.prototype.startRoom = function (roomID) {
application.startRoom(roomID, this);
};
Client.prototype.stopGame = function (roomID, userTarget, turn, pts, delay, estimatedTime) {
var _local2 = userTarget;
trace((((("STOP_GAME roomID = " + roomID) + " called by = ") + this.name) + " userTarget = ") + _local2);
var _local3 = application.userSO.getProperty(this.name);
if (_local3 != undefined) {
if (_local3 == "gaming") {
var roomIndex = application.findRoomIndex(roomID);
if (roomIndex != undefined) {
roomConcerned = application.roomArray[application.findRoomIndex(roomID)];
if (roomConcerned.winner == undefined) {
roomConcerned.winner = _local2;
roomConcerned.endArray = new Array();
var _local1 = new Object();
_local1.userName = _local2;
_local1.timing = delay;
_local1.estimatedTime = estimatedTime;
_local1.score = pts;
trace("estimatedTime = " + estimatedTime);
trace("delay = " + delay);
trace("turn = " + turn);
trace("");
_local1.bonus = (estimatedTime / (delay / turn)) * 5000;
_local1.turn = turn;
roomConcerned.endArray.push(_local1);
roomConcerned.roomSO.send("updateResult", _local2);
}
}
}
} else {
application.disconnect(this);
}
trace("--- fin STOP_GAME");
};
Client.prototype.updateResult = function (roomID, userTarget, turn, pts) {
trace((("UPDATE_RESULT roomID = " + roomID) + " called by = ") + this.name);
var roomIndex = application.findRoomIndex(roomID);
roomConcerned = application.roomArray[roomIndex];
if (userTarget != roomConcerned.winner) {
var userAdded = false;
var _local3 = new Object();
var delay = roomConcerned.endArray[0].timing;
_local3.userName = userTarget;
_local3.timing = delay;
_local3.score = pts;
_local3.turn = turn;
roomConcerned.endArray.push(_local3);
}
if (roomConcerned.endArray.length == roomConcerned.userArrayRoom.length) {
var userState = application.userSO.getProperty(this.name);
if (userState != undefined) {
if (userState == "gaming") {
if (roomIndex != undefined) {
application.userSO.lock();
var _local2 = 0;
while (_local2 < roomConcerned.userArrayRoom.length) {
var _local1 = roomConcerned.userArrayRoom[_local2].userName;
if (application.userSO.getProperty(_local1) != undefined) {
application.userSO.setProperty(_local1, null);
application.userSO.setProperty(_local1, "custom");
}
_local2++;
}
application.userSO.unlock();
roomConcerned.roomSO.send("showEndWindow", roomConcerned.endArray);
}
}
}
}
trace("--- fin UPDATE_RESULT");
};
Client.prototype.flushResult = function (roomID) {
var _local1 = application.findRoomIndex(roomID);
if (_local1 != undefined) {
var _local2 = application.roomArray[_local1];
this.call("showEndWindow", null, _local2.endArray);
}
application.changeUserState(this.name, "custom");
};
Client.prototype.flushRoom = function (roomID) {
var _local2 = this;
trace((("FLUSH_ROOM roomID = " + roomID) + " called by = ") + _local2.name);
var userState = application.userSO.getProperty(_local2.name);
if (userState != undefined) {
var _local1 = application.findRoomIndex(roomID);
if (_local1 != undefined) {
var _local3 = application.roomArray[_local1];
_local3.roomSO.close();
application.roomArray.splice(_local1, 1);
application.userSO.send("removeRoom", roomID);
}
} else {
application.disconnect(_local2);
}
trace("--- fin FLUSH_ROOM");
};
Client.prototype.addUser = function (roomID, userObj) {
application.addUser(roomID, userObj, this);
};
Client.prototype.removeUser = function (roomID, userName) {
application.removeUser(roomID, userName, this);
};
Client.prototype.inviteUser = function (roomID, toUser) {
application.clients[application.findUser(toUser)].call("receiveInvitation", null, this.name, roomID);
};
Client.prototype.requestStartRoom = function (toUser) {
application.clients[application.findUser(toUser)].call("receiveStartRoomRequest", null, this.name);
};
Client.prototype.updatePosition = function (targetUser, newX, newY, roomID) {
var _local1 = application.findRoomIndex(roomID);
if (_local1 != undefined) {
application.roomArray[_local1].roomSO.send("updatePosition", newX, newY, targetUser);
}
};
Client.prototype.changeUserState = function (targetUser, newState) {
application.changeUserState(targetUser, newState);
};
application.changeUserState = function (targetUser, newState) {
application.userSO.lock();
application.userSO.setProperty(targetUser, null);
application.userSO.setProperty(targetUser, newState);
application.userSO.unlock();
};
application.addRoom = function (roomObj, thisUser) {
var _local1 = thisUser;
var _local3 = roomObj;
trace("ADD_ROOM called by = " + _local1.name);
var _local2 = application.userSO.getProperty(_local1.name);
var msgToSend = undefined;
if (_local2 != undefined) {
if (((_local2 != "creating") && (_local2 != "joining")) && (_local2 != "gaming")) {
application.changeUserState(_local1.name, "creating");
_local1.roomID = (_local3.roomID = application.getNewID());
_local1.roomSO = (_local3.roomSO = SharedObject.get("r" + _local3.roomID, false));
application.roomArray.push(_local3);
application.userSO.send("addRoom", _local3);
}
} else {
application.disconnect(_local1);
}
trace("--- fin ADD_ROOM");
};
application.removeRoom = function (roomID, thisUser) {
trace((("REMOVE_ROOM roomID = " + roomID) + " called by = ") + thisUser.name);
var userState = application.userSO.getProperty(thisUser.name);
var msgToSend = undefined;
if (userState != undefined) {
if (userState == "creating") {
var roomIndex = application.findRoomIndex(roomID);
if (roomIndex != undefined) {
roomConcerned = application.roomArray[roomIndex];
application.userSO.lock();
var _local3 = 0;
while (_local3 < roomConcerned.userArrayRoom.length) {
var _local1 = roomConcerned.userArrayRoom[_local3].userName;
var _local2 = application.userSO.getProperty(_local1);
if (_local2 != undefined) {
application.userSO.setProperty(_local1, null);
if (_local2 == "creating") {
application.userSO.setProperty(_local1, "browsing");
} else if (_local2 == "waiting") {
application.userSO.setProperty(_local1, "joining");
thisOtherUser = application.clients[application.findUser(_local1)];
msgToSend = ((thisOtherUser.lang == "fr") ? "D%C3%A9sol%C3%A9%2C%20cette%20partie%20est%20introuvable%21" : "Sorry this game can't be found!");
thisOtherUser.call("throwCriticMsgWindow", null, msgToSend);
}
}
_local3++;
}
application.userSO.unlock();
roomConcerned.roomSO.close();
application.roomArray.splice(roomIndex, 1);
application.userSO.send("removeRoom", roomConcerned.roomID);
} else {
msgToSend = ((thisUser.lang == "fr") ? "D%C3%A9sol%C3%A9%2C%20cette%20partie%20est%20introuvable%21" : "Sorry this game can't be found!");
thisUser.call("throwCriticMsgWindow", null, msgToSend);
}
}
} else {
application.disconnect(thisUser);
}
trace("--- fin REMOVE_ROOM");
};
application.startRoom = function (roomID, thisUser) {
var _local3 = thisUser;
trace((("START_ROOM roomID = " + roomID) + " called by = ") + _local3.name);
var userState = application.userSO.getProperty(_local3.name);
var msgToSend = undefined;
if (userState != undefined) {
if (userState == "creating") {
var roomIndex = application.findRoomIndex(roomID);
if (roomIndex != undefined) {
roomConcerned = application.roomArray[roomIndex];
roomConcerned.state = "game";
application.userSO.send("updateRoom", roomConcerned);
application.userSO.lock();
var _local2 = 0;
while (_local2 < roomConcerned.userArrayRoom.length) {
var _local1 = roomConcerned.userArrayRoom[_local2].userName;
if (application.userSO.getProperty(_local1) != undefined) {
application.userSO.setProperty(_local1, null);
application.userSO.setProperty(_local1, "gaming");
}
_local2++;
}
application.userSO.unlock();
} else {
msgToSend = ((_local3.lang == "fr") ? "D%C3%A9sol%C3%A9%2C%20cette%20partie%20est%20introuvable%21" : "Sorry this game can't be found!");
_local3.call("throwCriticMsgWindow", null, msgToSend);
}
}
} else {
application.disconnect(_local3);
}
trace("--- fin START_ROOM");
};
application.addUser = function (roomID, userObj, thisUser) {
var _local1 = thisUser;
var _local3 = userObj;
trace((((("ADD_USER roomID = " + roomID) + " userAdded = ") + _local3.userName) + " called by = ") + _local1.name);
var userState = application.userSO.getProperty(_local1.name);
var _local2;
if (userState != undefined) {
var roomIndex = application.findRoomIndex(roomID);
if (roomIndex != undefined) {
roomConcerned = application.roomArray[roomIndex];
if (userState == "creating") {
if (_local3.userType != "real") {
if ((roomConcerned.userArrayRoom.length < userMaxQty) && (application.userSO.getProperty(_local3.userName) == undefined)) {
roomConcerned.userArrayRoom.push(_local3);
application.userSO.send("updateRoom", roomConcerned);
}
}
} else if (userState == "joining") {
if (_local1.name == _local3.userName) {
if (roomConcerned.state == "game") {
_local2 = ((_local1.lang == "fr") ? "D%C3%A9sol%C3%A9%20la%20partie%20est%20d%C3%A9j%C3%A0%20commenc%C3%A9e%21" : "Sorry this game as already started!");
} else if (roomConcerned.userArrayRoom.length < userMaxQty) {
application.changeUserState(_local1.name, "waiting");
_local1.roomID = roomConcerned.roomID;
_local1.roomSO = roomConcerned.roomSO;
roomConcerned.userArrayRoom.push(_local3);
application.userSO.send("updateRoom", roomConcerned);
} else {
_local2 = ((_local1.lang == "fr") ? "D%C3%A9sol%C3%A9%2C%20cette%20partie%20est%20d%C3%A9j%C3%A0%20rempli%21" : "Sorry this game is already full!");
}
}
}
} else {
_local2 = ((_local1.lang == "fr") ? "D%C3%A9sol%C3%A9%2C%20cette%20partie%20est%20introuvable%21" : "Sorry this game can't be found!");
}
} else {
application.disconnect(_local1);
}
if ((_local2 != undefined) && (_local3.userType == "real")) {
_local1.call("throwCriticMsgWindow", null, _local2);
}
trace("--- fin ADD_USER");
};
application.removeUser = function (roomID, userName, thisUser) {
var _local2 = userName;
var _local3 = thisUser;
trace((((("REMOVE_USER roomID = " + roomID) + " userRemoved = ") + _local2) + " called by = ") + _local3.name);
var userState = application.userSO.getProperty(_local3.name);
var msgToSend = undefined;
if (userState != undefined) {
var roomIndex = application.findRoomIndex(roomID);
if (roomIndex != undefined) {
roomConcerned = application.roomArray[roomIndex];
if (userState == "creating") {
if (application.userSO.getProperty(_local2) != undefined) {
application.userSO.setProperty(_local2, null);
application.userSO.setProperty(_local2, "joining");
var userIndex = application.findUser(_local2);
application.clients[userIndex].roomSO = undefined;
application.clients[userIndex].roomID = undefined;
msgToSend = ((application.clients[userIndex].lang == "fr") ? (("D%C3%A9sol%C3%A9%2C%20" + _local3.name) + " %20d%C3%A9sire%20jouer%20avec%20d%27autres%20joueurs%21") : (("Sorry " + _local3.name) + " would like to play with other players!"));
application.clients[userIndex].call("throwCriticMsgWindow", null, msgToSend);
}
var _local1 = 0;
while (_local1 < roomConcerned.userArrayRoom.length) {
if (roomConcerned.userArrayRoom[_local1].userName == _local2) {
roomConcerned.userArrayRoom.splice(_local1, 1);
application.userSO.send("updateRoom", roomConcerned);
break;
}
_local1++;
}
} else if (userState == "waiting") {
if (_local2 != _local3.name) {
} else {
application.userSO.setProperty(_local2, null);
application.userSO.setProperty(_local2, "joining");
var userIndex = application.findUser(_local2);
application.clients[userIndex].roomSO = undefined;
application.clients[userIndex].roomID = undefined;
var _local1 = 0;
while (_local1 < roomConcerned.userArrayRoom.length) {
if (roomConcerned.userArrayRoom[_local1].userName == _local2) {
roomConcerned.userArrayRoom.splice(_local1, 1);
application.userSO.send("updateRoom", roomConcerned);
break;
}
_local1++;
}
}
}
} else {
msgToSend = ((_local3.lang == "fr") ? "D%C3%A9sol%C3%A9%2C%20cette%20partie%20est%20introuvable%21" : "Sorry this game can't be found!");
_local3.call("throwCriticMsgWindow", null, msgToSend);
}
} else {
application.disconnect(_local3);
}
trace("--- fin REMOVE_USER");
};
application.testPing = function () {
var _local1 = 0;
while (_local1 < application.clients.length) {
if (application.clients[_local1].pingAsked) {
application.disconnect(application.clients[_local1]);
} else {
application.clients[_local1].call("pingCall", null);
application.clients[_local1].pingAsked = true;
}
_local1++;
}
};
application.onAppStart = function () {
trace("appStart");
application.lastRoomID = 0;
application.userSO = SharedObject.get("userSO", false);
application.roomArray = new Array();
application.pingInterval = setInterval(application, "testPing", pingFreq);
};
application.onAppStop = function () {
trace("appStop");
clearInterval(application.pingInterval);
application.userSO.close();
};
application.onConnect = function (clientObj) {
application.acceptConnection(clientObj);
};
application.onDisconnect = function (client) {
var _local2 = client;
trace("DISCONNECTED " + _local2.name);
var _local3 = application.userSO.getProperty(_local2.name);
if (_local3 != undefined) {
if (_local3 == "creating") {
application.removeRoom(_local2.roomID, _local2);
} else if (_local3 == "waiting") {
var roomIndex = application.findRoomIndex(_local2.roomID);
if (roomIndex != undefined) {
roomConcerned = application.roomArray[roomIndex];
var _local1 = 0;
while (_local1 < roomConcerned.userArrayRoom.length) {
if (roomConcerned.userArrayRoom[_local1].userName == _local2.name) {
roomConcerned.userArrayRoom.splice(_local1, 1);
application.userSO.send("updateRoom", roomConcerned);
break;
}
_local1++;
}
}
} else if (_local3 == "gaming") {
var roomIndex = application.findRoomIndex(_local2.roomID);
if (roomIndex != undefined) {
roomConcerned = application.roomArray[roomIndex];
if (roomConcerned.userArrayRoom.length > 1) {
roomConcerned.roomSO.send("showUserDisconnected", _local2.name);
var _local1 = 0;
while (_local1 < roomConcerned.userArrayRoom.length) {
if (roomConcerned.userArrayRoom[_local1].userName == _local2.name) {
roomConcerned.userArrayRoom.splice(_local1, 1);
application.userSO.send("updateRoom", roomConcerned);
if (_local1 == 0) {
_local1 = 0;
while (_local1 < roomConcerned.userArrayRoom.length) {
if (roomConcerned.userArrayRoom[_local1].userType == "robot") {
roomConcerned.userArrayRoom.splice(_local1, 1);
}
_local1++;
}
roomConcerned.roomSO.send("showRobotDisconnected");
}
break;
}
_local1++;
}
} else {
roomConcerned.roomSO.close();
application.roomArray.splice(roomIndex, 1);
application.userSO.send("removeRoom", _local2.roomID);
}
}
}
}
if (application.clients.length == 0) {
application.roomArray = new Array();
}
application.userSO.setProperty(_local2.name, null);
};
Symbol 1 MovieClip [FUIComponentSymbol] Frame 1
#initclip 3
function FUIComponentClass() {
this.init();
}
FUIComponentClass.prototype = new MovieClip();
FUIComponentClass.prototype.init = function () {
var _local1 = this;
var _local3 = _global;
_local1.enable = true;
_local1.focused = false;
_local1.useHandCursor = false;
_local1._accImpl = new Object();
_local1._accImpl.stub = true;
_local1.styleTable = new Array();
if (_local3.globalStyleFormat == undefined) {
_local3.globalStyleFormat = new FStyleFormat();
globalStyleFormat.isGlobal = true;
_local3._focusControl = new Object();
_local3._focusControl.onSetFocus = function (oldFocus, newFocus) {
oldFocus.myOnKillFocus();
newFocus.myOnSetFocus();
};
Selection.addListener(_local3._focusControl);
}
if (_local1._name != undefined) {
_local1._focusrect = false;
_local1.tabEnabled = true;
_local1.focusEnabled = true;
_local1.tabChildren = false;
_local1.tabFocused = true;
if (_local1.hostStyle == undefined) {
globalStyleFormat.addListener(_local1);
} else {
_local1.styleTable = _local1.hostStyle;
}
_local1.deadPreview._visible = false;
_local1.deadPreview._width = (_local1.deadPreview._height = 1);
_local1.methodTable = new Object();
_local1.keyListener = new Object();
_local1.keyListener.controller = _local1;
_local1.keyListener.onKeyDown = function () {
this.controller.myOnKeyDown();
};
_local1.keyListener.onKeyUp = function () {
this.controller.myOnKeyUp();
};
for (var _local2 in _local1.styleFormat_prm) {
_local1.setStyleProperty(_local2, _local1.styleFormat_prm[_local2]);
}
}
};
FUIComponentClass.prototype.setEnabled = function (enabledFlag) {
var _local1 = this;
_local1.enable = ((arguments.length > 0) ? (enabledFlag) : true);
_local1.tabEnabled = (_local1.focusEnabled = enabledFlag);
if ((!_local1.enable) && (_local1.focused)) {
Selection.setFocus(undefined);
}
};
FUIComponentClass.prototype.getEnabled = function () {
return(this.enable);
};
FUIComponentClass.prototype.setSize = function (w, h) {
var _local1 = this;
_local1.width = w;
_local1.height = h;
_local1.focusRect.removeMovieClip();
};
FUIComponentClass.prototype.setChangeHandler = function (chng, obj) {
var _local1 = this;
_local1.handlerObj = ((obj == undefined) ? (_local1._parent) : (obj));
_local1.changeHandler = chng;
};
FUIComponentClass.prototype.invalidate = function (methodName) {
var _local1 = this;
_local1.methodTable[methodName] = true;
_local1.onEnterFrame = _local1.cleanUI;
};
FUIComponentClass.prototype.cleanUI = function () {
var _local1 = this;
if (_local1.methodTable.setSize) {
_local1.setSize(_local1.width, _local1.height);
} else {
_local1.cleanUINotSize();
}
_local1.methodTable = new Object();
delete _local1.onEnterFrame;
};
FUIComponentClass.prototype.cleanUINotSize = function () {
var _local1 = this;
for (var _local2 in _local1.methodTable) {
_local1[_local2]();
}
};
FUIComponentClass.prototype.drawRect = function (x, y, w, h) {
var _local1 = this;
var _local2 = y;
var _local3 = x;
var inner = _local1.styleTable.focusRectInner.value;
var outer = _local1.styleTable.focusRectOuter.value;
if (inner == undefined) {
inner = 16777215 /* 0xFFFFFF */;
}
if (outer == undefined) {
outer = 0;
}
_local1.createEmptyMovieClip("focusRect", 1000);
_local1.focusRect.controller = _local1;
_local1.focusRect.lineStyle(1, outer);
_local1.focusRect.moveTo(_local3, _local2);
_local1.focusRect.lineTo(_local3 + w, _local2);
_local1.focusRect.lineTo(_local3 + w, _local2 + h);
_local1.focusRect.lineTo(_local3, _local2 + h);
_local1.focusRect.lineTo(_local3, _local2);
_local1.focusRect.lineStyle(1, inner);
_local1.focusRect.moveTo(_local3 + 1, _local2 + 1);
_local1.focusRect.lineTo((_local3 + w) - 1, _local2 + 1);
_local1.focusRect.lineTo((_local3 + w) - 1, (_local2 + h) - 1);
_local1.focusRect.lineTo(_local3 + 1, (_local2 + h) - 1);
_local1.focusRect.lineTo(_local3 + 1, _local2 + 1);
};
FUIComponentClass.prototype.pressFocus = function () {
var _local1 = this;
_local1.tabFocused = false;
_local1.focusRect.removeMovieClip();
Selection.setFocus(_local1);
};
FUIComponentClass.prototype.drawFocusRect = function () {
var _local1 = this;
_local1.drawRect(-2, -2, _local1.width + 4, _local1.height + 4);
};
FUIComponentClass.prototype.myOnSetFocus = function () {
var _local1 = this;
_local1.focused = true;
Key.addListener(_local1.keyListener);
if (_local1.tabFocused) {
_local1.drawFocusRect();
}
};
FUIComponentClass.prototype.myOnKillFocus = function () {
var _local1 = this;
_local1.tabFocused = true;
_local1.focused = false;
_local1.focusRect.removeMovieClip();
Key.removeListener(_local1.keyListener);
};
FUIComponentClass.prototype.executeCallBack = function () {
var _local1 = this;
_local1.handlerObj[_local1.changeHandler](_local1);
};
FUIComponentClass.prototype.updateStyleProperty = function (styleFormat, propName) {
this.setStyleProperty(propName, styleFormat[propName], styleFormat.isGlobal);
};
FUIComponentClass.prototype.setStyleProperty = function (propName, value, isGlobal) {
var _local1 = this;
var _local2 = propName;
if (value == "") {
} else {
var tmpValue = parseInt(value);
if (!isNaN(tmpValue)) {
value = tmpValue;
}
var global = ((arguments.length > 2) ? (isGlobal) : false);
if (_local1.styleTable[_local2] == undefined) {
_local1.styleTable[_local2] = new Object();
_local1.styleTable[_local2].useGlobal = true;
}
if (_local1.styleTable[_local2].useGlobal || (!global)) {
_local1.styleTable[_local2].value = value;
if (_local1.setCustomStyleProperty(_local2, value)) {
} else if (_local2 == "embedFonts") {
_local1.invalidate("setSize");
} else if (_local2.subString(0, 4) == "text") {
if (_local1.textStyle == undefined) {
_local1.textStyle = new TextFormat();
}
var textProp = _local2.subString(4, _local2.length);
_local1.textStyle[textProp] = value;
_local1.invalidate("setSize");
} else {
for (var j in _local1.styleTable[_local2].coloredMCs) {
var _local3 = new Color(_local1.styleTable[_local2].coloredMCs[j]);
if (_local1.styleTable[_local2].value == undefined) {
var myTObj = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
_local3.setTransform(myTObj);
} else {
_local3.setRGB(value);
}
}
}
_local1.styleTable[_local2].useGlobal = global;
}
}
};
FUIComponentClass.prototype.registerSkinElement = function (skinMCRef, propName) {
var _local1 = this;
var _local2 = propName;
if (_local1.styleTable[_local2] == undefined) {
_local1.styleTable[_local2] = new Object();
_local1.styleTable[_local2].useGlobal = true;
}
if (_local1.styleTable[_local2].coloredMCs == undefined) {
_local1.styleTable[_local2].coloredMCs = new Object();
}
_local1.styleTable[_local2].coloredMCs[skinMCRef] = skinMCRef;
if (_local1.styleTable[_local2].value != undefined) {
var _local3 = new Color(skinMCRef);
_local3.setRGB(_local1.styleTable[_local2].value);
}
};
_global.FStyleFormat = function () {
var _local1 = arguments;
var _local2 = this;
_local2.nonStyles = {listeners:true, isGlobal:true, isAStyle:true, addListener:true, removeListener:true, nonStyles:true, applyChanges:true};
_local2.listeners = new Object();
_local2.isGlobal = false;
if (_local1.length > 0) {
for (var _local3 in _local1[0]) {
_local2[_local3] = _local1[0][_local3];
}
}
};
_global.FStyleFormat.prototype = new Object();
FStyleFormat.prototype.addListener = function () {
var _local1 = this;
var _local2 = 0;
while (_local2 < arguments.length) {
var _local3 = arguments[_local2];
_local1.listeners[arguments[_local2]] = _local3;
for (var i in _local1) {
if (_local1.isAStyle(i)) {
_local3.updateStyleProperty(_local1, i.toString());
}
}
_local2++;
}
};
FStyleFormat.prototype.removeListener = function (component) {
var _local1 = this;
var _local2 = component;
_local1.listeners[_local2] = undefined;
for (var prop in _local1) {
if (_local1.isAStyle(prop)) {
if (_local2.styleTable[prop].useGlobal == _local1.isGlobal) {
_local2.styleTable[prop].useGlobal = true;
var _local3 = (_local1.isGlobal ? undefined : (globalStyleFormat[prop]));
_local2.setStyleProperty(prop, _local3, true);
}
}
}
};
FStyleFormat.prototype.applyChanges = function () {
var _local1 = this;
var _local2 = arguments;
var count = 0;
for (var i in _local1.listeners) {
var _local3 = _local1.listeners[i];
if (_local2.length > 0) {
var j = 0;
while (j < _local2.length) {
if (_local1.isAStyle(_local2[j])) {
_local3.updateStyleProperty(_local1, _local2[j]);
}
j++;
}
} else {
for (var j in _local1) {
if (_local1.isAStyle(j)) {
_local3.updateStyleProperty(_local1, j.toString());
}
}
}
}
};
FStyleFormat.prototype.isAStyle = function (name) {
return((this.nonStyles[name] ? false : true));
};
#endinitclip
Symbol 14 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 24 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 33 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "foregroundDisabled");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 34 MovieClip [UpArrow] Frame 1
stop();
Symbol 34 MovieClip [UpArrow] Frame 2
stop();
Symbol 34 MovieClip [UpArrow] Frame 3
stop();
Symbol 41 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 48 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 53 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(highlight3D_mc, "highlight3D");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
Symbol 54 MovieClip [ScrollThumb] Frame 1
stop();
Symbol 62 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 70 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "arrow");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 78 MovieClip Frame 1
var component = _parent._parent;
component.registerSkinElement(arrow_mc, "foregroundDisabled");
component.registerSkinElement(face_mc, "face");
component.registerSkinElement(shadow_mc, "shadow");
component.registerSkinElement(darkshadow_mc, "darkshadow");
component.registerSkinElement(highlight_mc, "highlight");
component.registerSkinElement(highlight3D_mc, "highlight3D");
Symbol 79 MovieClip [DownArrow] Frame 1
stop();
Symbol 79 MovieClip [DownArrow] Frame 2
stop();
Symbol 79 MovieClip [DownArrow] Frame 3
stop();
Symbol 82 MovieClip [FHighlightSymbol] Frame 1
var component = _parent.controller;
component.registerSkinElement(highlight_mc, "selection");
stop();
Symbol 82 MovieClip [FHighlightSymbol] Frame 2
component.registerSkinElement(highlight_mc2, "selectionDisabled");
stop();
Symbol 82 MovieClip [FHighlightSymbol] Frame 3
component.registerSkinElement(highlight_mc3, "selectionUnfocused");
stop();
Symbol 85 MovieClip [FLabelSymbol] Frame 1
#initclip 1
_global.FLabelClass = function () {
var _local1 = this;
if (_local1.hostComponent == undefined) {
_local1.hostComponent = ((_local1._parent.controller == undefined) ? (_local1._parent) : (_local1._parent.controller));
}
if (_local1.customTextStyle == undefined) {
if (_local1.hostComponent.textStyle == undefined) {
_local1.hostComponent.textStyle = new TextFormat();
}
_local1.textStyle = _local1.hostComponent.textStyle;
_local1.enable = true;
}
};
FLabelClass.prototype = new MovieClip();
Object.registerClass("FLabelSymbol", FLabelClass);
FLabelClass.prototype.setLabel = function (label) {
var _local1 = this;
var _local2 = _local1.hostComponent.styleTable.embedFonts.value;
if (_local2 != undefined) {
_local1.labelField.embedFonts = _local2;
}
_local1.labelField.setNewTextFormat(_local1.textStyle);
_local1.labelField.text = label;
_local1.labelField._height = _local1.labelField.textHeight + 2;
};
FLabelClass.prototype.setSize = function (width) {
this.labelField._width = width;
};
FLabelClass.prototype.setEnabled = function (enable) {
var _local2 = this;
var _local3 = enable;
_local2.enable = _local3;
var _local1 = _local2.hostComponent.styleTable[(_local3 ? "textColor" : "textDisabled")].value;
if (_local1 == undefined) {
_local1 = (_local3 ? 0 : 8947848);
}
_local2.setColor(_local1);
};
FLabelClass.prototype.getLabel = function () {
return(this.labelField.text);
};
FLabelClass.prototype.setColor = function (col) {
this.labelField.textColor = col;
};
#endinitclip
Symbol 87 MovieClip [dot] Frame 1
_visible = false;
Symbol 90 MovieClip Frame 1
var component = _parent;
component.registerSkinElement(track_mc, "scrollTrack");
Symbol 91 MovieClip [FScrollBarSymbol] Frame 1
#initclip 4
FScrollBarClass = function () {
var _local1 = this;
if (_local1._height == 4) {
} else {
_local1.init();
_local1.minPos = (_local1.maxPos = (_local1.pageSize = (_local1.largeScroll = 0)));
_local1.smallScroll = 1;
_local1.width = (_local1.horizontal ? (_local1._width) : (_local1._height));
_local1._xscale = (_local1._yscale = 100);
_local1.setScrollPosition(0);
_local1.tabEnabled = false;
if (_local1._targetInstanceName.length > 0) {
_local1.setScrollTarget(_local1._parent[_local1._targetInstanceName]);
}
_local1.tabChildren = false;
_local1.setSize(_local1.width);
}
};
FScrollBarClass.prototype = new FUIComponentClass();
FScrollBarClass.prototype.setHorizontal = function (flag) {
var _local1 = this;
var _local2 = flag;
if (_local1.horizontal && (!_local2)) {
_local1._xscale = 100;
_local1._rotation = 0;
} else if (_local2 && (!_local1.horizontal)) {
_local1._xscale = -100;
_local1._rotation = -90;
}
_local1.horizontal = _local2;
};
FScrollBarClass.prototype.setScrollProperties = function (pSize, mnPos, mxPos) {
var _local1 = this;
if (!_local1.enable) {
} else {
_local1.pageSize = pSize;
_local1.minPos = Math.max(mnPos, 0);
_local1.maxPos = Math.max(mxPos, 0);
_local1.scrollPosition = Math.max(_local1.minPos, _local1.scrollPosition);
_local1.scrollPosition = Math.min(_local1.maxPos, _local1.scrollPosition);
if ((_local1.maxPos - _local1.minPos) <= 0) {
_local1.scrollThumb_mc.removeMovieClip();
_local1.upArrow_mc.gotoAndStop(3);
_local1.downArrow_mc.gotoAndStop(3);
_local1.downArrow_mc.onPress = (_local1.downArrow_mc.onRelease = (_local1.downArrow_mc.onDragOut = null));
_local1.upArrow_mc.onPress = (_local1.upArrow_mc.onRelease = (_local1.upArrow_mc.onDragOut = null));
_local1.scrollTrack_mc.onPress = (_local1.scrollTrack_mc.onRelease = null);
_local1.scrollTrack_mc.onDragOut = (_local1.scrollTrack_mc.onRollOut = null);
_local1.scrollTrack_mc.useHandCursor = false;
} else {
var _local2 = _local1.getScrollPosition();
_local1.upArrow_mc.gotoAndStop(1);
_local1.downArrow_mc.gotoAndStop(1);
_local1.upArrow_mc.onPress = (_local1.upArrow_mc.onDragOver = _local1.startUpScroller);
_local1.upArrow_mc.onRelease = (_local1.upArrow_mc.onDragOut = _local1.stopScrolling);
_local1.downArrow_mc.onPress = (_local1.downArrow_mc.onDragOver = _local1.startDownScroller);
_local1.downArrow_mc.onRelease = (_local1.downArrow_mc.onDragOut = _local1.stopScrolling);
_local1.scrollTrack_mc.onPress = (_local1.scrollTrack_mc.onDragOver = _local1.startTrackScroller);
_local1.scrollTrack_mc.onRelease = _local1.stopScrolling;
_local1.scrollTrack_mc.onDragOut = _local1.stopScrolling;
_local1.scrollTrack_mc.onRollOut = _local1.stopScrolling;
_local1.scrollTrack_mc.useHandCursor = false;
_local1.attachMovie("ScrollThumb", "scrollThumb_mc", 3);
_local1.scrollThumb_mc._x = 0;
_local1.scrollThumb_mc._y = _local1.upArrow_mc._height;
_local1.scrollThumb_mc.onPress = _local1.startDragThumb;
_local1.scrollThumb_mc.controller = _local1;
_local1.scrollThumb_mc.onRelease = (_local1.scrollThumb_mc.onReleaseOutside = _local1.stopDragThumb);
_local1.scrollThumb_mc.useHandCursor = false;
_local1.thumbHeight = (_local1.pageSize / ((_local1.maxPos - _local1.minPos) + _local1.pageSize)) * _local1.trackSize;
_local1.thumbMid_mc = _local1.scrollThumb_mc.mc_sliderMid;
_local1.thumbTop_mc = _local1.scrollThumb_mc.mc_sliderTop;
_local1.thumbBot_mc = _local1.scrollThumb_mc.mc_sliderBot;
_local1.thumbHeight = Math.max(_local1.thumbHeight, 6);
_local1.midHeight = (_local1.thumbHeight - _local1.thumbTop_mc._height) - _local1.thumbBot_mc._height;
_local1.thumbMid_mc._yScale = (_local1.midHeight * 100) / _local1.thumbMid_mc._height;
_local1.thumbMid_mc._y = _local1.thumbTop_mc._height;
_local1.thumbBot_mc._y = _local1.thumbTop_mc._height + _local1.midHeight;
_local1.scrollTop = _local1.scrollThumb_mc._y;
_local1.trackHeight = _local1.trackSize - _local1.thumbHeight;
_local1.scrollBot = _local1.trackHeight + _local1.scrollTop;
_local2 = Math.min(_local2, _local1.maxPos);
_local1.setScrollPosition(Math.max(_local2, _local1.minPos));
}
}
};
FScrollBarClass.prototype.getScrollPosition = function () {
return(this.scrollPosition);
};
FScrollBarClass.prototype.setScrollPosition = function (pos) {
var _local1 = this;
var _local2 = pos;
_local1.scrollPosition = _local2;
if (_local1.scrollThumb_mc != undefined) {
_local2 = Math.min(_local2, _local1.maxPos);
_local2 = Math.max(_local2, _local1.minPos);
}
_local1.scrollThumb_mc._y = (((_local2 - _local1.minPos) * _local1.trackHeight) / (_local1.maxPos - _local1.minPos)) + _local1.scrollTop;
_local1.executeCallBack();
};
FScrollBarClass.prototype.setLargeScroll = function (lScroll) {
this.largeScroll = lScroll;
};
FScrollBarClass.prototype.setSmallScroll = function (sScroll) {
this.smallScroll = sScroll;
};
FScrollBarClass.prototype.setEnabled = function (enabledFlag) {
var _local1 = this;
var _local2 = enabledFlag;
var _local3 = _local1.enable;
if (_local2 && (!_local3)) {
_local1.enable = _local2;
if (_local1.textField != undefined) {
_local1.setScrollTarget(_local1.textField);
} else {
_local1.setScrollProperties(_local1.pageSize, _local1.cachedMinPos, _local1.cachedMaxPos);
_local1.setScrollPosition(_local1.cachedPos);
}
_local1.clickFilter = undefined;
} else if ((!_local2) && (_local3)) {
_local1.textField.removeListener(_local1);
_local1.cachedPos = _local1.getScrollPosition();
_local1.cachedMinPos = _local1.minPos;
_local1.cachedMaxPos = _local1.maxPos;
if (_local1.clickFilter == undefined) {
_local1.setScrollProperties(_local1.pageSize, 0, 0);
} else {
_local1.clickFilter = true;
}
_local1.enable = _local2;
}
};
FScrollBarClass.prototype.setSize = function (hgt) {
var _local1 = this;
if (_local1._height == 1) {
} else {
_local1.width = hgt;
_local1.scrollTrack_mc._yscale = 100;
_local1.scrollTrack_mc._yscale = (100 * _local1.width) / _local1.scrollTrack_mc._height;
if (_local1.upArrow_mc == undefined) {
_local1.attachMovie("UpArrow", "upArrow_mc", 1);
_local1.attachMovie("DownArrow", "downArrow_mc", 2);
_local1.downArrow_mc.controller = (_local1.upArrow_mc.controller = _local1);
_local1.upArrow_mc.useHandCursor = (_local1.downArrow_mc.useHandCursor = false);
_local1.upArrow_mc._x = (_local1.upArrow_mc._y = 0);
_local1.downArrow_mc._x = 0;
}
_local1.scrollTrack_mc.controller = _local1;
_local1.downArrow_mc._y = _local1.width - _local1.downArrow_mc._height;
_local1.trackSize = _local1.width - (2 * _local1.downArrow_mc._height);
if (_local1.textField != undefined) {
_local1.onTextChanged();
} else {
_local1.setScrollProperties(_local1.pageSize, _local1.minPos, _local1.maxPos);
}
}
};
FScrollBarClass.prototype.scrollIt = function (inc, mode) {
var _local1 = this;
var _local3 = _local1.smallScroll;
if (inc != "one") {
_local3 = ((_local1.largeScroll == 0) ? (_local1.pageSize) : (_local1.largeScroll));
}
var _local2 = _local1.getScrollPosition() + (mode * _local3);
if (_local2 > _local1.maxPos) {
_local2 = _local1.maxPos;
} else if (_local2 < _local1.minPos) {
_local2 = _local1.minPos;
}
_local1.setScrollPosition(_local2);
};
FScrollBarClass.prototype.startDragThumb = function () {
var _local1 = this;
_local1.lastY = _local1._ymouse;
_local1.onMouseMove = _local1.controller.dragThumb;
};
FScrollBarClass.prototype.dragThumb = function () {
var _local1 = this;
_local1.scrollMove = _local1._ymouse - _local1.lastY;
_local1.scrollMove = _local1.scrollMove + _local1._y;
if (_local1.scrollMove < _local1.controller.scrollTop) {
_local1.scrollMove = _local1.controller.scrollTop;
} else if (_local1.scrollMove > _local1.controller.scrollBot) {
_local1.scrollMove = _local1.controller.scrollBot;
}
_local1._y = _local1.scrollMove;
var _local2 = _local1.controller;
_local2.scrollPosition = Math.round(((_local2.maxPos - _local2.minPos) * (_local1._y - _local2.scrollTop)) / _local2.trackHeight) + _local2.minPos;
_local1.controller.isScrolling = true;
updateAfterEvent();
_local1.controller.executeCallBack();
};
FScrollBarClass.prototype.stopDragThumb = function () {
this.controller.isScrolling = false;
this.onMouseMove = null;
};
FScrollBarClass.prototype.startTrackScroller = function () {
var _local1 = this;
_local1.controller.trackScroller();
_local1.controller.scrolling = setInterval(_local1.controller, "scrollInterval", 500, "page", -1);
};
FScrollBarClass.prototype.scrollInterval = function (inc, mode) {
var _local1 = this;
var _local2 = inc;
clearInterval(_local1.scrolling);
if (_local2 == "page") {
_local1.trackScroller();
} else {
_local1.scrollIt(_local2, mode);
}
_local1.scrolling = setInterval(_local1, "scrollInterval", 35, _local2, mode);
};
FScrollBarClass.prototype.trackScroller = function () {
var _local1 = this;
if ((_local1.scrollThumb_mc._y + _local1.thumbHeight) < _local1._ymouse) {
_local1.scrollIt("page", 1);
} else if (_local1.scrollThumb_mc._y > _local1._ymouse) {
_local1.scrollIt("page", -1);
}
};
FScrollBarClass.prototype.stopScrolling = function () {
var _local1 = this;
_local1.controller.downArrow_mc.gotoAndStop(1);
_local1.controller.upArrow_mc.gotoAndStop(1);
clearInterval(_local1.controller.scrolling);
};
FScrollBarClass.prototype.startUpScroller = function () {
var _local1 = this;
_local1.controller.upArrow_mc.gotoAndStop(2);
_local1.controller.scrollIt("one", -1);
_local1.controller.scrolling = setInterval(_local1.controller, "scrollInterval", 500, "one", -1);
};
FScrollBarClass.prototype.startDownScroller = function () {
var _local1 = this;
_local1.controller.downArrow_mc.gotoAndStop(2);
_local1.controller.scrollIt("one", 1);
_local1.controller.scrolling = setInterval(_local1.controller, "scrollInterval", 500, "one", 1);
};
FScrollBarClass.prototype.setScrollTarget = function (tF) {
var _local1 = this;
var _local2 = tF;
if (_local2 == undefined) {
_local1.textField.removeListener(_local1);
delete _local1.textField[(_local1.horizontal ? "hScroller" : "vScroller")];
if ((_local1.textField.hScroller != undefined) && (_local1.textField.vScroller != undefined)) {
_local1.textField.unwatch("text");
_local1.textField.unwatch("htmltext");
}
}
_local1.textField = undefined;
if (!(_local2 instanceof TextField)) {
} else {
_local1.textField = _local2;
_local1.textField[(_local1.horizontal ? "hScroller" : "vScroller")] = _local1;
_local1.onTextChanged();
_local1.onChanged = function () {
this.onTextChanged();
};
_local1.onScroller = function () {
var _local1 = this;
if (!_local1.isScrolling) {
if (!_local1.horizontal) {
_local1.setScrollPosition(_local1.textField.scroll);
} else {
_local1.setScrollPosition(_local1.textField.hscroll);
}
}
};
_local1.textField.addListener(_local1);
_local1.textField.watch("text", _local1.callback);
_local1.textField.watch("htmlText", _local1.callback);
}
};
FScrollBarClass.prototype.callback = function (prop, oldVal, newVal) {
var _local1 = this;
clearInterval(_local1.hScroller.synchScroll);
clearInterval(_local1.vScroller.synchScroll);
_local1.hScroller.synchScroll = setInterval(_local1.hScroller, "onTextChanged", 50);
_local1.vScroller.synchScroll = setInterval(_local1.vScroller, "onTextChanged", 50);
return(newVal);
};
FScrollBarClass.prototype.onTextChanged = function () {
var _local1 = this;
if ((!_local1.enable) || (_local1.textField == undefined)) {
} else {
clearInterval(_local1.synchScroll);
if (_local1.horizontal) {
var _local2 = _local1.textField.hscroll;
_local1.setScrollProperties(_local1.textField._width, 0, _local1.textField.maxhscroll);
_local1.setScrollPosition(Math.min(_local2, _local1.textField.maxhscroll));
} else {
var _local2 = _local1.textField.scroll;
var _local3 = _local1.textField.bottomScroll - _local1.textField.scroll;
_local1.setScrollProperties(_local3, 1, _local1.textField.maxscroll);
_local1.setScrollPosition(Math.min(_local2, _local1.textField.maxscroll));
}
}
};
FScrollBarClass.prototype.executeCallBack = function () {
var _local1 = this;
if (_local1.textField == undefined) {
super.executeCallBack();
} else if (_local1.horizontal) {
_local1.textField.hscroll = _local1.getScrollPosition();
} else {
_local1.textField.scroll = _local1.getScrollPosition();
}
};
Object.registerClass("FScrollBarSymbol", FScrollBarClass);
#endinitclip
Symbol 92 MovieClip [FListItemSymbol] Frame 1
#initclip 9
function FListItemClass() {
this.init();
}
FListItemClass.prototype = new FSelectableItemClass();
Object.registerClass("FListItemSymbol", FListItemClass);
#endinitclip
Symbol 93 MovieClip [DataProviderSymbol] Frame 1
#initclip 2
_global.DataProviderClass = function () {
this.init();
};
DataProviderClass.prototype.init = function () {
var _local1 = this;
_local1.items = new Array();
_local1.uniqueID = 0;
_local1.views = new Array();
};
DataProviderClass.prototype.addView = function (viewRef) {
this.views.push(viewRef);
var _local1 = {event:"updateAll"};
viewRef.modelChanged(_local1);
};
DataProviderClass.prototype.addItemAt = function (index, value) {
var _local1 = index;
var _local2 = this;
var _local3 = value;
if (_local1 < _local2.getLength()) {
_local2.items.splice(_local1, 0, "tmp");
}
_local2.items[_local1] = new Object();
if (typeof(_local3) == "object") {
_local2.items[_local1] = _local3;
} else {
_local2.items[_local1].label = _local3;
}
_local2.items[_local1].__ID__ = _local2.uniqueID++;
var eventObj = {event:"addRows", firstRow:_local1, lastRow:_local1};
_local2.updateViews(eventObj);
};
DataProviderClass.prototype.addItem = function (value) {
this.addItemAt(this.getLength(), value);
};
DataProviderClass.prototype.removeItemAt = function (index) {
var _local1 = index;
var _local2 = this;
var tmpItm = _local2.items[_local1];
_local2.items.splice(_local1, 1);
var _local3 = {event:"deleteRows", firstRow:_local1, lastRow:_local1};
_local2.updateViews(_local3);
return(tmpItm);
};
DataProviderClass.prototype.removeAll = function () {
var _local1 = this;
_local1.items = new Array();
_local1.updateViews({event:"deleteRows", firstRow:0, lastRow:_local1.getLength() - 1});
};
DataProviderClass.prototype.replaceItemAt = function (index, itemObj) {
var _local1 = index;
var _local2 = this;
if ((_local1 < 0) || (_local1 >= _local2.getLength())) {
} else {
var _local3 = _local2.getItemID(_local1);
if (typeof(itemObj) == "object") {
_local2.items[_local1] = itemObj;
} else {
_local2.items[_local1].label = itemObj;
}
_local2.items[_local1].__ID__ = _local3;
_local2.updateViews({event:"updateRows", firstRow:_local1, lastRow:_local1});
}
};
DataProviderClass.prototype.getLength = function () {
return(this.items.length);
};
DataProviderClass.prototype.getItemAt = function (index) {
return(this.items[index]);
};
DataProviderClass.prototype.getItemID = function (index) {
return(this.items[index].__ID__);
};
DataProviderClass.prototype.sortItemsBy = function (fieldName, order) {
var _local1 = this;
_local1.items.sortOn(fieldName);
if (order == "DESC") {
_local1.items.reverse();
}
_local1.updateViews({event:"sort"});
};
DataProviderClass.prototype.updateViews = function (eventObj) {
var _local2 = this;
var _local3 = eventObj;
var _local1 = 0;
while (_local1 < _local2.views.length) {
_local2.views[_local1].modelChanged(_local3);
_local1++;
}
};
#endinitclip
Symbol 94 MovieClip [FSelectableItemSymbol] Frame 1
#initclip 6
function FSelectableItemClass() {
this.init();
}
FSelectableItemClass.prototype = new FUIComponentClass();
FSelectableItemClass.prototype.init = function () {
var _local1 = this;
if (_local1._name != "itemAsset") {
_local1.highlighted = false;
_local1.layoutContent(100);
}
};
FSelectableItemClass.prototype.drawItem = function (itmObj, selected) {
var _local1 = this;
var _local2 = selected;
_local1.displayContent(itmObj, _local2);
if ((_local1.highlighted != _local2) || ((_local1.controller.focused != _local1.oldFocus) && (_local2))) {
_local1.setHighlighted(_local2);
}
_local1.oldFocus = _local1.controller.focused;
};
FSelectableItemClass.prototype.setSize = function (width, height) {
var _local1 = this;
var _local3 = width;
var _local2 = -16384;
_local1.width = _local3;
_local1.layoutContent(_local3);
_local1.attachMovie("FHighlightSymbol", "highlight_mc", _local2);
_local1.highlight_mc._x = 0.5;
_local1.highlight_mc._width = _local3 - 0.5;
_local1.highlight_mc._height = height;
_local1.highlight_mc.controller = _local1;
_local1.highlight_mc._alpha = 0;
_local1.highlight_mc.trackAsMenu = true;
_local1.highlight_mc.onPress = function () {
var _local1 = this;
if (_local1.controller.enable) {
_local1.controller.controller.clickHandler(_local1.controller.itemNum);
}
};
_local1.highlight_mc.onDragOver = function () {
if (this.controller.controller.focused) {
this.onPress();
}
};
_local1.highlight_mc.useHandCursor = false;
_local1.highlight_mc.trackAsMenu = true;
};
FSelectableItemClass.prototype.setEnabled = function (enabledFlag) {
var _local1 = this;
var _local2 = enabledFlag;
_local1.enable = _local2;
_local1.fLabel_mc.setEnabled(_local2);
_local1.highlight_mc.gotoAndStop((_local2 ? "unfocused" : "disabled"));
};
FSelectableItemClass.prototype.layoutContent = function (width) {
var _local1 = this;
_local1.attachMovie("FLabelSymbol", "fLabel_mc", 2, {hostComponent:_local1.controller});
_local1.fLabel_mc._x = 2;
_local1.fLabel_mc._y = 0;
_local1.fLabel_mc.setSize(width - 2);
_local1.fLabel_mc.labelField.selectable = false;
};
FSelectableItemClass.prototype.displayContent = function (itmObj, selected) {
var _local2 = itmObj;
var _local1 = "";
if (_local2.label != undefined) {
_local1 = _local2.label;
} else if (typeof(_local2) == "object") {
for (var _local3 in _local2) {
if (_local3 != "__ID__") {
_local1 = (_local2[_local3] + ", ") + _local1;
}
}
_local1 = _local1.substring(0, _local1.length - 2);
} else {
_local1 = _local2;
}
if (this.fLabel_mc.labelField.text != _local1) {
this.fLabel_mc.setLabel(_local1);
}
var clr = (selected ? (this.controller.styleTable.textSelected.value) : (this.controller.styleTable.textColor.value));
if (clr == undefined) {
clr = (selected ? 16777215 : 0);
}
this.fLabel_mc.setColor(clr);
};
FSelectableItemClass.prototype.getItemIndex = function () {
return(this.controller.getScrollPosition() + this.itemNum);
};
FSelectableItemClass.prototype.getItemModel = function () {
return(this.controller.getItemAt(this.getItemIndex()));
};
FSelectableItemClass.prototype.getHostDataProvider = function () {
return(this.controller.dataProvider);
};
FSelectableItemClass.prototype.setHighlighted = function (flag) {
var _local1 = this;
var _local2 = flag;
fade = _local1.controller.styleTable.fadeRate.value;
if (((fade == undefined) || (fade == 0)) || (!_local2)) {
_local1.highlight_mc._alpha = (_local2 ? 100 : 0);
delete _local1.onEnterFrame;
} else {
_local1.fadeN = fade;
_local1.fadeX = 1;
_local1.highLight_mc._alpha = 20;
_local1.onEnterFrame = function () {
var _local1 = this;
_local1.highLight_mc._alpha = (60 * Math.sqrt((_local1.fadeX++) / _local1.fadeN)) + 40;
if (_local1.fadeX > _local1.fadeN) {
delete _local1.onEnterFrame;
}
};
}
_local1.highlighted = _local2;
};
#endinitclip
Symbol 95 MovieClip [FSelectableListSymbol] Frame 1
#initclip 5
function FSelectableListClass() {
this.init();
}
FSelectableListClass.prototype = new FUIComponentClass();
FSelectableListClass.prototype.init = function () {
var _local1 = this;
super.init();
_local1.enable = true;
_local1.selected = new Array();
_local1.topDisplayed = (_local1.numDisplayed = 0);
_local1.lastSelected = 0;
_local1.tabChildren = false;
if (_local1._name != undefined) {
_local1.dataProvider = new DataProviderClass();
_local1.dataProvider.addView(_local1);
}
};
FSelectableListClass.prototype.addItemAt = function (index, label, data) {
if ((index < 0) || (!this.enable)) {
return(undefined);
}
this.dataProvider.addItemAt(index, {label:label, data:data});
};
FSelectableListClass.prototype.addItem = function (label, data) {
if (!this.enable) {
return(undefined);
}
this.dataProvider.addItem({label:label, data:data});
};
FSelectableListClass.prototype.removeItemAt = function (index) {
var _local1 = this;
_local1.selectHolder = _local1.getSelectedIndex();
var _local2 = _local1.getItemAt(index);
_local1.dataProvider.removeItemAt(index);
return(_local2);
};
FSelectableListClass.prototype.removeAll = function () {
this.dataProvider.removeAll();
};
FSelectableListClass.prototype.replaceItemAt = function (index, newLabel, newData) {
this.dataProvider.replaceItemAt(index, {label:newLabel, data:newData});
};
FSelectableListClass.prototype.sortItemsBy = function (fieldName, order) {
var _local1 = this;
_local1.lastSelID = _local1.dataProvider.getItemID(_local1.lastSelected);
_local1.dataProvider.sortItemsBy(fieldName, order);
};
FSelectableListClass.prototype.getLength = function () {
return(this.dataProvider.getLength());
};
FSelectableListClass.prototype.getSelectedIndex = function () {
var _local2 = this;
for (var _local3 in _local2.selected) {
var _local1 = _local2.selected[_local3].sIndex;
if (_local1 != undefined) {
return(_local1);
}
}
return(undefined);
};
FSelectableListClass.prototype.getSelectedItem = function () {
return(this.getItemAt(this.getSelectedIndex()));
};
FSelectableListClass.prototype.getItemAt = function (index) {
return(this.dataProvider.getItemAt(index));
};
FSelectableListClass.prototype.getEnabled = function () {
return(this.enable);
};
FSelectableListClass.prototype.getValue = function () {
var _local1 = this.getSelectedItem();
if (_local1.data != undefined) {
return(_local1.data);
}
return(_local1.label);
};
FSelectableListClass.prototype.setSelectedIndex = function (index, flag) {
var _local1 = this;
var _local2 = index;
if (((_local2 >= 0) && (_local2 < _local1.getLength())) && (_local1.enable)) {
_local1.clearSelected();
_local1.selectItem(_local2, true);
_local1.lastSelected = _local2;
_local1.invalidate("updateControl");
if (flag != false) {
_local1.executeCallBack();
}
}
};
FSelectableListClass.prototype.setDataProvider = function (obj) {
var _local2 = obj;
this.setScrollPosition(0);
this.clearSelected();
if (_local2 instanceof Array) {
this.dataProvider = new DataProviderClass();
var _local1 = 0;
while (_local1 < _local2.length) {
var _local3 = ((typeof(_local2[_local1]) == "string") ? ({label:_local2[_local1]}) : (_local2[_local1]));
this.dataProvider.addItem(_local3);
_local1++;
}
} else {
this.dataProvider = _local2;
}
this.dataProvider.addView(this);
};
FSelectableListClass.prototype.setItemSymbol = function (linkID) {
var _local1 = this;
_local1.tmpPos = _local1.getScrollPosition();
_local1.itemSymbol = linkID;
_local1.invalidate("setSize");
_local1.setScrollPosition(_local1.tmpPos);
};
FSelectableListClass.prototype.setEnabled = function (enabledFlag) {
var _local2 = this;
_local2.cleanUI();
super.setEnabled(enabledFlag);
_local2.enable = enabledFlag;
_local2.boundingBox_mc.gotoAndStop((_local2.enable ? "enabled" : "disabled"));
var _local3 = Math.min(_local2.numDisplayed, _local2.getLength());
var _local1 = 0;
while (_local1 < _local3) {
_local2.container_mc[("fListItem" + _local1) + "_mc"].setEnabled(_local2.enable);
_local1++;
}
if (_local2.enable) {
_local2.invalidate("updateControl");
}
};
FSelectableListClass.prototype.updateControl = function () {
var _local2 = this;
var _local1 = 0;
while (_local1 < _local2.numDisplayed) {
_local2.container_mc[("fListItem" + _local1) + "_mc"].drawItem(_local2.getItemAt(_local2.topDisplayed + _local1), _local2.isSelected(_local2.topDisplayed + _local1));
_local1++;
}
};
FSelectableListClass.prototype.setSize = function (w, h) {
var _local1 = this;
super.setSize(w, h);
_local1.boundingBox_mc._xscale = (_local1.boundingBox_mc._yscale = 100);
_local1.boundingBox_mc._xscale = (_local1.width * 100) / _local1.boundingBox_mc._width;
_local1.boundingBox_mc._yscale = (_local1.height * 100) / _local1.boundingBox_mc._height;
var _local2 = 0;
while (_local2 < _local1.numDisplayed) {
_local1.container_mc.attachMovie(_local1.itemSymbol, ("fListItem" + _local2) + "_mc", 10 + _local2, {controller:_local1, itemNum:_local2});
var _local3 = _local1.container_mc[("fListItem" + _local2) + "_mc"];
var offset = ((_local1.scrollOffset == undefined) ? 0 : (_local1.scrollOffset));
_local3.setSize(_local1.width - offset, _local1.itmHgt);
_local3._y = (_local1.itmHgt - 2) * _local2;
_local2++;
}
_local1.updateControl();
};
FSelectableListClass.prototype.modelChanged = function (eventObj) {
var _local1 = this;
var firstRow = eventObj.firstRow;
var lastRow = eventObj.lastRow;
var event = eventObj.event;
if (event == "addRows") {
for (var _local2 in _local1.selected) {
if ((_local1.selected[_local2].sIndex != undefined) && (_local1.selected[_local2].sIndex >= firstRow)) {
_local1.selected[_local2].sIndex = _local1.selected[_local2].sIndex + ((lastRow - firstRow) + 1);
_local1.setSelectedIndex(_local1.selected[_local2].sIndex, false);
}
}
} else if (event == "deleteRows") {
if (firstRow == lastRow) {
var index = firstRow;
if (_local1.selectHolder == index) {
_local1.selectionDeleted = true;
}
if (((_local1.topDisplayed + _local1.numDisplayed) >= _local1.getLength()) && (_local1.topDisplayed > 0)) {
_local1.topDisplayed--;
if (_local1.selectionDeleted && ((index - 1) >= 0)) {
_local1.setSelectedIndex(index - 1, false);
}
} else if (_local1.selectionDeleted) {
var len = _local1.getLength();
if (((index == (len - 1)) && (len > 1)) || (index > (len / 2))) {
_local1.setSelectedIndex(index - 1, false);
} else {
_local1.setSelectedIndex(index, false);
}
}
for (var _local2 in _local1.selected) {
if (_local1.selected[_local2].sIndex > firstRow) {
_local1.selected[_local2].sIndex--;
}
}
} else {
_local1.clearSelected();
_local1.topDisplayed = 0;
}
} else if (event == "sort") {
var len = _local1.getLength();
var _local2 = 0;
while (_local2 < len) {
if (_local1.isSelected(_local2)) {
var _local3 = _local1.dataProvider.getItemID(_local2);
if (_local3 == _local1.lastSelID) {
_local1.lastSelected = _local2;
}
_local1.selected[String(_local3)].sIndex = _local2;
}
_local2++;
}
}
_local1.invalidate("updateControl");
};
FSelectableListClass.prototype.measureItmHgt = function () {
var _local1 = this;
_local1.attachMovie(_local1.itemSymbol, "tmpItem_mc", 0, {controller:_local1});
_local1.tmpItem_mc.drawItem({label:"Sizer: PjtTopg"}, false);
_local1.itmHgt = _local1.tmpItem_mc._height;
_local1.tmpItem_mc.removeMovieClip();
};
FSelectableListClass.prototype.selectItem = function (index, selectedFlag) {
var _local1 = this;
var _local2 = index;
if (selectedFlag && (!_local1.isSelected(_local2))) {
_local1.selected[String(_local1.dataProvider.getItemID(_local2))] = {sIndex:_local2};
} else if (!selectedFlag) {
delete _local1.selected[String(_local1.dataProvider.getItemID(_local2))];
}
};
FSelectableListClass.prototype.isSelected = function (index) {
return(this.selected[String(this.dataProvider.getItemID(index))].sIndex != undefined);
};
FSelectableListClass.prototype.clearSelected = function () {
var _local1 = this;
for (var _local3 in _local1.selected) {
var _local2 = _local1.selected[_local3].sIndex;
if (((_local2 != undefined) && (_local1.topDisplayed <= _local2)) && (_local2 < (_local1.topDisplayed + _local1.numDisplayed))) {
_local1.container_mc[("fListItem" + (_local2 - _local1.topDisplayed)) + "_mc"].drawItem(_local1.getItemAt(_local2), false);
}
}
delete _local1.selected;
_local1.selected = new Array();
};
FSelectableListClass.prototype.selectionHandler = function (itemNum) {
var _local1 = this;
var _local2 = _local1.topDisplayed + itemNum;
if (_local1.getItemAt(_local2 == undefined)) {
_local1.changeFlag = false;
} else {
_local1.changeFlag = true;
_local1.clearSelected();
_local1.selectItem(_local2, true);
_local1.container_mc[("fListItem" + itemNum) + "_mc"].drawItem(_local1.getItemAt(_local2), _local1.isSelected(_local2));
}
};
FSelectableListClass.prototype.moveSelBy = function (incr) {
var _local1 = this;
var _local3 = _local1.getSelectedIndex();
var _local2 = _local3 + incr;
_local2 = Math.max(0, _local2);
_local2 = Math.min(_local1.getLength() - 1, _local2);
if (_local2 == _local3) {
} else {
if ((_local3 < _local1.topDisplayed) || (_local3 >= (_local1.topDisplayed + _local1.numDisplayed))) {
_local1.setScrollPosition(_local3);
}
if ((_local2 >= (_local1.topDisplayed + _local1.numDisplayed)) || (_local2 < _local1.topDisplayed)) {
_local1.setScrollPosition(_local1.topDisplayed + incr);
}
_local1.selectionHandler(_local2 - _local1.topDisplayed);
}
};
FSelectableListClass.prototype.clickHandler = function (itmNum) {
var _local1 = this;
_local1.focusRect.removeMovieClip();
if (!_local1.focused) {
_local1.pressFocus();
}
_local1.selectionHandler(itmNum);
_local1.onMouseUp = _local1.releaseHandler;
};
FSelectableListClass.prototype.releaseHandler = function () {
var _local1 = this;
if (_local1.changeFlag) {
_local1.executeCallBack();
}
_local1.changeFlag = false;
_local1.onMouseUp = undefined;
};
FSelectableListClass.prototype.myOnSetFocus = function () {
var _local2 = this;
super.myOnSetFocus();
var _local1 = 0;
while (_local1 < _local2.numDisplayed) {
_local2.container_mc[("fListItem" + _local1) + "_mc"].highlight_mc.gotoAndStop("enabled");
_local1++;
}
};
FSelectableListClass.prototype.myOnKillFocus = function () {
var _local2 = this;
super.myOnKillFocus();
var _local1 = 0;
while (_local1 < _local2.numDisplayed) {
_local2.container_mc[("fListItem" + _local1) + "_mc"].highlight_mc.gotoAndStop("unfocused");
_local1++;
}
};
#endinitclip
Instance of Symbol 93 MovieClip [DataProviderSymbol] "dPAsset" in Symbol 95 MovieClip [FSelectableListSymbol] Frame 1
//component parameters
onClipEvent (initialize) {
}
Instance of Symbol 94 MovieClip [FSelectableItemSymbol] "ItemAsset" in Symbol 95 MovieClip [FSelectableListSymbol] Frame 1
//component parameters
onClipEvent (initialize) {
}
Symbol 96 MovieClip [FScrollSelectListSymbol] Frame 1
#initclip 7
function FScrollSelectListClass() {
this.init();
}
FScrollSelectListClass.prototype = new FSelectableListClass();
FScrollSelectListClass.prototype.getScrollPosition = function () {
return(this.topDisplayed);
};
FScrollSelectListClass.prototype.setScrollPosition = function (pos) {
var _local1 = pos;
var _local2 = this;
if (_local2.enable) {
_local1 = Math.min(_local1, _local2.getLength() - _local2.numDisplayed);
_local1 = Math.max(_local1, 0);
_local2.scrollBar_mc.setScrollPosition(_local1);
}
};
FScrollSelectListClass.prototype.setAutoHideScrollBar = function (flag) {
var _local1 = this;
_local1.permaScrollBar = !flag;
_local1.setSize(_local1.width, _local1.height);
};
FScrollSelectListClass.prototype.setEnabled = function (enabledFlag) {
super.setEnabled(enabledFlag);
this.scrollBar_mc.setEnabled(this.enable);
};
FScrollSelectListClass.prototype.setSize = function (w, h) {
var _local1 = this;
var _local2 = _local1.getScrollPosition();
super.setSize(w, h);
if (_local1.scrollBar_mc != undefined) {
_local1.removed = true;
}
_local1.scrollBar_mc = undefined;
_local1.initScrollBar();
_local1.setScrollPosition(_local2);
};
FScrollSelectListClass.prototype.modelChanged = function (eventObj) {
super.modelChanged(eventObj);
this.invalidate("initScrollBar");
};
FScrollSelectListClass.prototype.initScrollBar = function () {
var _local1 = this;
if ((!_local1.permaScrollBar) && (_local1.getLength() <= _local1.numDisplayed)) {
if (_local1.removed) {
_local1.scrollBar_mc.removeMovieClip();
_local1.scrollBar_mc = undefined;
_local1.scrollOffset = undefined;
_local1.invalidate("setSize");
}
} else {
if (_local1.scrollBar_mc == undefined) {
_local1.container_mc.attachMovie("FScrollBarSymbol", "scrollBar_mc", 3000, {hostStyle:_local1.styleTable});
_local1.scrollBar_mc = _local1.container_mc.scrollBar_mc;
_local1.scrollBar_mc.setChangeHandler("scrollHandler", _local1);
_local1.scrollBar_mc.setSize(_local1.height);
_local1.scrollBar_mc._x = _local1.width - _local1.scrollBar_mc._width;
_local1.scrollBar_mc._y = 0;
_local1.scrollBar_mc.setLargeScroll(_local1.numDisplayed - 1);
_local1.scrollOffset = _local1.scrollBar_mc._width;
_local1.invalidate("setSize");
}
_local1.scrollBar_mc.setScrollProperties(_local1.numDisplayed, 0, _local1.getLength() - _local1.numDisplayed);
}
};
FScrollSelectListClass.prototype.scrollHandler = function (scrollBar) {
var _local2 = this;
var _local1 = scrollBar.getScrollPosition();
_local2.topDisplayed = _local1;
if (_local2.lastPosition != _local1) {
_local2.updateControl();
}
_local2.lastPosition = _local1;
};
FScrollSelectListClass.prototype.clickHandler = function (itmNum) {
var _local1 = this;
super.clickHandler(itmNum);
if ((_local1.dragScrolling == undefined) && (_local1.scrollBar_mc != undefined)) {
_local1.dragScrolling = setInterval(_local1, "dragScroll", 15);
}
};
FScrollSelectListClass.prototype.releaseHandler = function () {
clearInterval(this.dragScrolling);
this.dragScrolling = undefined;
super.releaseHandler();
};
FScrollSelectListClass.prototype.dragScroll = function () {
var _local1 = this;
clearInterval(_local1.dragScrolling);
if (_local1.container_mc._ymouse < 0) {
_local1.setScrollPosition(_local1.getScrollPosition() - 1);
_local1.selectionHandler(0);
_local1.scrollInterval = Math.max(25, (-23.8 * (-_local1.container_mc._ymouse)) + 500);
_local1.dragScrolling = setInterval(_local1, "dragScroll", _local1.scrollInterval);
} else if (_local1.container_mc._ymouse > ((_local1.itmHgt - 2) * _local1.numDisplayed)) {
_local1.setScrollPosition(_local1.getScrollPosition() + 1);
_local1.selectionHandler(_local1.numDisplayed - 1);
_local1.scrollInterval = Math.max(25, (-23.8 * Math.abs((_local1.container_mc._ymouse - ((_local1.itmHgt - 2) * _local1.numDisplayed)) - 2)) + 500);
_local1.dragScrolling = setInterval(_local1, "dragScroll", _local1.scrollInterval);
} else {
_local1.dragScrolling = setInterval(_local1, "dragScroll", 15);
}
};
FScrollSelectListClass.prototype.myOnKeyDown = function () {
var _local2 = this;
if (_local2.focused) {
_local2.keyCodes = new Array(40, 38, 34, 33, 36, 35);
_local2.keyIncrs = new Array(1, -1, _local2.numDisplayed - 1, -(_local2.numDisplayed - 1), -_local2.getLength(), _local2.getLength());
var _local1 = 0;
while (_local1 < _local2.keyCodes.length) {
if (Key.isDown(_local2.keyCodes[_local1])) {
_local2.moveSelBy(_local2.keyIncrs[_local1]);
return;
}
_local1++;
}
_local2.findInputText();
}
};
FScrollSelectListClass.prototype.findInputText = function () {
var _local1 = Key.getAscii();
if ((_local1 >= 33) && (_local1 <= 126)) {
this.findString(String.fromCharCode(_local1));
}
};
FScrollSelectListClass.prototype.findString = function (str) {
if (this.getLength() == 0) {
} else {
var _local3 = this.getSelectedIndex();
var jump = 0;
var _local1 = _local3 + 1;
while (_local1 != _local3) {
var _local2 = this.getItemAt(_local1).label.substring(0, str.length);
if ((str == _local2) || (str.toUpperCase() == _local2.toUpperCase())) {
var jump = (_local1 - _local3);
break;
}
if (_local1 >= (this.getLength() - 1)) {
_local1 = -1;
}
_local1++;
}
if (jump != 0) {
this.moveSelBy(jump);
}
}
};
#endinitclip
Instance of Symbol 91 MovieClip [FScrollBarSymbol] "scrollBarAsset" in Symbol 96 MovieClip [FScrollSelectListSymbol] Frame 1
//component parameters
onClipEvent (initialize) {
_targetInstanceName = "";
horizontal = false;
}
onClipEvent (load) {
this._width = (this._height = 1);
}
Instance of Symbol 95 MovieClip [FSelectableListSymbol] "superClassAsset" in Symbol 96 MovieClip [FScrollSelectListSymbol] Frame 1
//component parameters
onClipEvent (initialize) {
}
Symbol 100 MovieClip [FBoundingBoxSymbol] Frame 1
var component = _parent;
component.registerSkinElement(boundingBox, "background");
stop();
Symbol 100 MovieClip [FBoundingBoxSymbol] Frame 2
component.registerSkinElement(boundingBox2, "backgroundDisabled");
stop();
Symbol 103 MovieClip [FListBoxSymbol] Frame 1
#initclip 8
function FListBoxClass() {
var _local1 = this;
_local1.itemSymbol = "FListItemSymbol";
_local1.init();
_local1.permaScrollBar = true;
var _local2 = 0;
while (_local2 < _local1.labels.length) {
_local1.addItem(_local1.labels[_local2], _local1.data[_local2]);
_local2++;
}
_local1.boundingBox_mc.gotoAndStop(1);
_local1.width = _local1._width;
_local1.height = _local1._height;
_local1._yscale = (_local1._xscale = 100);
_local1.setSize(_local1.width, _local1.height);
if (_local1.changeHandler.length > 0) {
_local1.setChangeHandler(_local1.changeHandler);
}
}
FListBoxClass.prototype = new FScrollSelectListClass();
Object.registerClass("FListBoxSymbol", FListBoxClass);
FListBoxClass.prototype.getSelectedIndices = function () {
var _local1 = this;
var _local2 = new Array();
for (var _local3 in _local1.selected) {
_local2.push(_local1.selected[_local3].sIndex);
}
if (_local2.length <= 0) {
return(undefined);
}
return(_local2);
};
FListBoxClass.prototype.getSelectedItems = function () {
var _local2 = this.getSelectedIndices();
var _local3 = new Array();
var _local1 = 0;
while (_local1 < _local2.length) {
_local3.push(this.getItemAt(_local2[_local1]));
_local1++;
}
if (_local3.length <= 0) {
return(undefined);
}
return(_local3);
};
FListBoxClass.prototype.getSelectMultiple = function () {
return(this.selectMultiple);
};
FListBoxClass.prototype.getRowCount = function () {
return(this.numDisplayed);
};
FListBoxClass.prototype.setSelectedIndices = function (indexArray) {
var _local2 = indexArray;
var _local3 = this;
_local3.clearSelected();
var _local1 = 0;
while (_local1 < _local2.length) {
_local3.selectItem(_local2[_local1], true);
_local1++;
}
_local3.updateControl();
};
FListBoxClass.prototype.setSelectMultiple = function (flag) {
this.selectMultiple = flag;
};
FListBoxClass.prototype.setRowCount = function (count) {
var _local2 = this;
var _local1 = (count * (_local2.itmHgt - 2)) + 2;
_local2.setSize(_local2.width, _local1);
};
FListBoxClass.prototype.setWidth = function (wdt) {
this.setSize(wdt, this.height);
};
FListBoxClass.prototype.setSize = function (w, h) {
var _local1 = this;
var _local2 = h;
var _local3 = w;
if (!_local1.enable) {
} else {
_local3 = Math.max(_local3, 20);
_local2 = Math.max(_local2, 40);
_local1.container_mc.removeMovieClip();
_local1.container_mc = _local1.createEmptyMovieClip("container", 3);
_local1.measureItmHgt();
_local1.numDisplayed = Math.floor(_local2 / (_local1.itmHgt - 2));
_local1.height = (_local1.numDisplayed * (_local1.itmHgt - 2)) + 2;
super.setSize(_local3, _local1.height);
}
};
FListBoxClass.prototype.removeItemAt = function (index) {
this.selectHolder = this.getSelectedIndices();
return(super.removeItemAt(index));
};
FListBoxClass.prototype.selectionHandler = function (itemNum) {
var _local1 = this;
if (_local1.clickFilter) {
var _local3 = _local1.topDisplayed + itemNum;
if (_local1.getItemAt(_local3) == undefined) {
_local1.changeFlag = false;
return;
}
_local1.changeFlag = true;
if (((!_local1.selectMultiple) && (!Key.isDown(17))) || ((!Key.isDown(16)) && (!Key.isDown(17)))) {
_local1.clearSelected();
_local1.selectItem(_local3, true);
_local1.lastSelected = _local3;
_local1.container_mc[("fListItem" + itemNum) + "_mc"].drawItem(_local1.getItemAt(_local3), _local1.isSelected(_local3));
} else if (Key.isDown(16) && (_local1.selectMultiple)) {
if (_local1.lastSelected == -1) {
_local1.lastSelected = _local3;
}
var incr = ((_local1.lastSelected < _local3) ? 1 : -1);
_local1.clearSelected();
var _local2 = _local1.lastSelected;
while (_local2 != _local3) {
_local1.selectItem(_local2, true);
if ((_local2 >= _local1.topDisplayed) && (_local2 < (_local1.topDisplayed + _local1.numDisplayed))) {
_local1.container_mc[("fListItem" + (_local2 - _local1.topDisplayed)) + "_mc"].drawItem(_local1.getItemAt(_local2), _local1.isSelected(_local2));
}
_local2 = _local2 + incr;
}
_local1.selectItem(_local3, true);
_local1.container_mc[("fListItem" + (_local3 - _local1.topDisplayed)) + "_mc"].drawItem(_local1.getItemAt(_local3), _local1.isSelected(_local3));
} else if (key.isDown(17)) {
var selectedFlag = _local1.isSelected(_local3);
if (!_local1.selectMultiple) {
_local1.clearSelected();
}
if (!((!_local1.selectMultiple) && (selectedFlag))) {
_local1.selectItem(_local3, !selectedFlag);
_local1.container_mc[("fListItem" + itemNum) + "_mc"].drawItem(_local1.getItemAt(_local1.topDisplayed + itemNum), _local1.isSelected(_local1.topDisplayed + itemNum));
}
_local1.lastSelected = _local3;
}
} else {
_local1.clickFilter = true;
}
};
FListBoxClass.prototype.moveSelBy = function (itemNum) {
super.moveSelBy(itemNum);
this.releaseHandler();
};
#endinitclip
this.deadPreview._visible = false;
Instance of Symbol 96 MovieClip [FScrollSelectListSymbol] "superClassAsset" in Symbol 103 MovieClip [FListBoxSymbol] Frame 1
//component parameters
onClipEvent (initialize) {
}
Symbol 114 Button
on (release) {
main.setGameTypeFct("quickGame");
}
Symbol 120 Button
on (release) {
main.setGameTypeFct("multiPlayer");
}
Symbol 126 Button
on (release) {
main.setGameTypeFct("solitary");
}
Symbol 135 Button
on (release) {
main.setGameTypeFct("quickGame");
}
Symbol 141 Button
on (release) {
main.setGameTypeFct("solitary");
}
Symbol 147 Button
on (release) {
main.setGameTypeFct("multiPlayer");
}
Instance of Symbol 174 MovieClip in Symbol 177 MovieClip Frame 1
onClipEvent (load) {
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
Symbol 180 MovieClip Frame 3
stop();
Symbol 185 Button
on (press) {
curseur.startDrag(true, 0, curseur._y, curseur._width, curseur._y);
}
on (release, releaseOutside) {
curseur.stopDrag();
newVolume = Math.round((curseur._x * 100) / curseur._width);
main.mainVolume = (newVolume * main.basedVolume) / 100;
main.soundVolume.setVolume(main.mainVolume);
}
Symbol 197 Button
on (release) {
if (validUserLogin()) {
connectWindow.connectStatus("asked");
doConnect();
}
}
Symbol 206 Button
on (release) {
_quality = "HIGH";
main.keyActive = false;
stopAllSounds();
clearInterval(main.carInt);
clearInterval(main.intFlushResult);
gameMain.lowSpeed.s.setVolume(0);
gameMain.highSpeed.s.setVolume(0);
if (main.gameType == "quickGame") {
main.gotoAndStop("chooseType");
} else {
main.gotoAndStop("custom");
}
}
Symbol 217 Button
on (release) {
main.returnScore();
}
Symbol 252 Button
on (release) {
gotoAndStop ("chooseType");
}
Symbol 253 Button
on (release, keyPress "<Enter>") {
if (validUserLogin()) {
connectWindow.connectStatus("asked");
doConnect();
}
}
Symbol 255 MovieClip Frame 1
this.onPress = function () {
};
this.useHandCursor = false;
Symbol 270 MovieClip Frame 1
stop();
Instance of Symbol 278 MovieClip "clock" in Symbol 287 MovieClip Frame 1
onClipEvent (load) {
showTime = function (actualTime, timeOut) {
swatch._rotation = (actualTime * 360) / timeOut;
};
}
Instance of Symbol 196 MovieClip in Symbol 287 MovieClip Frame 1
onClipEvent (load) {
this.onPress = function () {
_parent.closeWindow();
};
}
Instance of Symbol 196 MovieClip in Symbol 287 MovieClip Frame 1
onClipEvent (load) {
this.onPress = function () {
_parent.doAction();
};
}
Instance of Symbol 286 MovieClip in Symbol 287 MovieClip Frame 1
onClipEvent (load) {
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
Instance of Symbol 196 MovieClip "ok_btn" in Symbol 295 MovieClip Frame 1
onClipEvent (load) {
this.onPress = function () {
_parent.closeWindow();
};
}
Instance of Symbol 196 MovieClip "critic_btn" in Symbol 295 MovieClip Frame 1
onClipEvent (load) {
this.onPress = function () {
main.gotoAndStop("reInit");
delete main.nr_nc;
_parent.closeWindow();
};
}
Instance of Symbol 294 MovieClip "critic_txt" in Symbol 295 MovieClip Frame 1
onClipEvent (load) {
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
Symbol 321 MovieClip Frame 43
gotoAndPlay ("actif");
Symbol 322 MovieClip Frame 1
this._visible = false;
Instance of Symbol 196 MovieClip in Symbol 322 MovieClip Frame 1
onClipEvent (load) {
this.onPress = function () {
_parent.closeWindow();
};
}
Symbol 396 Button
on (release) {
if (gameType == "solitary") {
gotoAndStop ("chooseType");
} else {
gotoAndStop ("step1");
}
}
Symbol 397 Button
on (release) {
gotoAndStop ("step3");
}
Symbol 414 MovieClip Frame 6
_parent.windowStats3.gotoAndStop(1);
Instance of Symbol 413 MovieClip "lockSign" in Symbol 414 MovieClip Frame 6
onClipEvent (load) {
_visible = main.maskCarState;
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
Symbol 414 MovieClip Frame 7
_parent.windowStats3.gotoAndPlay(2);
Symbol 420 MovieClip Frame 6
_parent.windowStats2.gotoAndStop(1);
Symbol 420 MovieClip Frame 7
_parent.windowStats2.gotoAndPlay(2);
Symbol 426 MovieClip Frame 6
_parent.windowStats1.gotoAndStop(1);
Symbol 426 MovieClip Frame 7
_parent.windowStats1.gotoAndPlay(2);
Symbol 432 MovieClip Frame 6
_parent.windowStats4.gotoAndStop(1);
Symbol 432 MovieClip Frame 7
_parent.windowStats4.gotoAndPlay(2);
Symbol 433 Button
on (release, keyPress "<Enter>") {
theCode = codeInput.text;
if (theCode.length < 5) {
do {
theCode = "0" + theCode;
} while (theCode.length < 5);
}
if (main.upcString.indexOf(theCode) >= 0) {
main.maskCarState = false;
main.nextFrame();
}
}
Symbol 434 Button
on (release) {
gotoAndStop ("desc1");
}
Symbol 453 Button
on (release) {
gotoAndStop ("desc2");
}
Symbol 454 Button
on (release) {
gotoAndStop ("code");
}
Symbol 489 Button
on (release) {
gotoAndStop ("desc1");
}
Symbol 502 MovieClip Frame 1
stop();
Symbol 502 MovieClip Frame 2
Selection.setFocus("codeInput");
Instance of Symbol 440 MovieClip in Symbol 502 MovieClip Frame 2
onClipEvent (load) {
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
Symbol 502 MovieClip Frame 3
Selection.setFocus("codeInput");
Instance of Symbol 447 MovieClip in Symbol 502 MovieClip Frame 3
onClipEvent (load) {
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
this.onPress = function () {
};
this.useHandCursor = false;
}
Instance of Symbol 452 MovieClip in Symbol 502 MovieClip Frame 3
onClipEvent (load) {
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
Instance of Symbol 472 MovieClip "p7" in Symbol 502 MovieClip Frame 3
onClipEvent (load) {
_visible = eval (((("main.car" + main.carNbr) + "Chart.") + _name) + ".purchased");
}
Instance of Symbol 475 MovieClip "p2" in Symbol 502 MovieClip Frame 3
onClipEvent (load) {
_visible = eval (((("main.car" + main.carNbr) + "Chart.") + _name) + ".purchased");
}
Instance of Symbol 478 MovieClip "p1" in Symbol 502 MovieClip Frame 3
onClipEvent (load) {
_visible = eval (((("main.car" + main.carNbr) + "Chart.") + _name) + ".purchased");
}
Instance of Symbol 481 MovieClip "p3" in Symbol 502 MovieClip Frame 3
onClipEvent (load) {
_visible = eval (((("main.car" + main.carNbr) + "Chart.") + _name) + ".purchased");
}
Instance of Symbol 484 MovieClip "p4" in Symbol 502 MovieClip Frame 3
onClipEvent (load) {
_visible = eval (((("main.car" + main.carNbr) + "Chart.") + _name) + ".purchased");
}
Instance of Symbol 487 MovieClip "p6" in Symbol 502 MovieClip Frame 3
onClipEvent (load) {
_visible = eval (((("main.car" + main.carNbr) + "Chart.") + _name) + ".purchased");
}
Instance of Symbol 472 MovieClip "p7" in Symbol 502 MovieClip Frame 3
onClipEvent (load) {
_visible = eval (((("main.car" + main.carNbr) + "Chart.") + _name) + ".purchased");
}
Instance of Symbol 475 MovieClip "p2" in Symbol 502 MovieClip Frame 3
onClipEvent (load) {
_visible = eval (((("main.car" + main.carNbr) + "Chart.") + _name) + ".purchased");
}
Instance of Symbol 478 MovieClip "p1" in Symbol 502 MovieClip Frame 3
onClipEvent (load) {
_visible = eval (((("main.car" + main.carNbr) + "Chart.") + _name) + ".purchased");
}
Instance of Symbol 481 MovieClip "p3" in Symbol 502 MovieClip Frame 3
onClipEvent (load) {
_visible = eval (((("main.car" + main.carNbr) + "Chart.") + _name) + ".purchased");
}
Instance of Symbol 484 MovieClip "p4" in Symbol 502 MovieClip Frame 3
onClipEvent (load) {
_visible = eval (((("main.car" + main.carNbr) + "Chart.") + _name) + ".purchased");
}
Instance of Symbol 487 MovieClip "p6" in Symbol 502 MovieClip Frame 3
onClipEvent (load) {
_visible = eval (((("main.car" + main.carNbr) + "Chart.") + _name) + ".purchased");
}
Symbol 502 MovieClip Frame 4
Selection.setFocus("codeInput");
Instance of Symbol 501 MovieClip in Symbol 502 MovieClip Frame 4
onClipEvent (load) {
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
Symbol 520 MovieClip Frame 1
stop();
Symbol 520 MovieClip Frame 16
stop();
Instance of Symbol 509 MovieClip "speedBar" in Symbol 520 MovieClip Frame 16
onClipEvent (load) {
bar._x = (((barBkg._width / 2) + (((barBkg._width / 2) * main.car4Chart.speed) / 100)) - bar._width) + barBkg._x;
}
Instance of Symbol 510 MovieClip "energyBar" in Symbol 520 MovieClip Frame 16
onClipEvent (load) {
bar._x = (((barBkg._width / 2) + (((barBkg._width / 2) * main.car4Chart.energy) / 100)) - bar._width) + barBkg._x;
}
Instance of Symbol 519 MovieClip in Symbol 520 MovieClip Frame 16
onClipEvent (load) {
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
Symbol 524 MovieClip Frame 1
stop();
Symbol 524 MovieClip Frame 14
stop();
Instance of Symbol 522 MovieClip "speedBar" in Symbol 524 MovieClip Frame 14
onClipEvent (load) {
bar._x = (((barBkg._width / 2) + (((barBkg._width / 2) * main.car1Chart.speed) / 100)) - bar._width) + barBkg._x;
}
Instance of Symbol 523 MovieClip "energyBar" in Symbol 524 MovieClip Frame 14
onClipEvent (load) {
bar._x = (((barBkg._width / 2) + (((barBkg._width / 2) * main.car1Chart.energy) / 100)) - bar._width) + barBkg._x;
}
Instance of Symbol 519 MovieClip in Symbol 524 MovieClip Frame 14
onClipEvent (load) {
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
Symbol 528 MovieClip Frame 1
stop();
Symbol 528 MovieClip Frame 14
stop();
Instance of Symbol 526 MovieClip "speedBar" in Symbol 528 MovieClip Frame 14
onClipEvent (load) {
bar._x = (((barBkg._width / 2) + (((barBkg._width / 2) * eval (("main.car" + _parent._currentframe) + "Chart.speed")) / 100)) - bar._width) + barBkg._x;
}
Instance of Symbol 527 MovieClip "energyBar" in Symbol 528 MovieClip Frame 14
onClipEvent (load) {
bar._x = (((barBkg._width / 2) + (((barBkg._width / 2) * eval (("main.car" + _parent._currentframe) + "Chart.energy")) / 100)) - bar._width) + barBkg._x;
}
Instance of Symbol 519 MovieClip in Symbol 528 MovieClip Frame 14
onClipEvent (load) {
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
Symbol 529 MovieClip Frame 1
stop();
Symbol 529 MovieClip Frame 14
stop();
Instance of Symbol 522 MovieClip "speedBar" in Symbol 529 MovieClip Frame 14
onClipEvent (load) {
bar._x = (((barBkg._width / 2) + (((barBkg._width / 2) * eval (("main.car" + _parent._currentframe) + "Chart.speed")) / 100)) - bar._width) + barBkg._x;
}
Instance of Symbol 510 MovieClip "energyBar" in Symbol 529 MovieClip Frame 14
onClipEvent (load) {
bar._x = (((barBkg._width / 2) + (((barBkg._width / 2) * eval (("main.car" + _parent._currentframe) + "Chart.energy")) / 100)) - bar._width) + barBkg._x;
}
Instance of Symbol 519 MovieClip in Symbol 529 MovieClip Frame 14
onClipEvent (load) {
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
Symbol 543 Button
on (release) {
gotoAndStop ("start");
}
Symbol 544 Button
on (release) {
gotoAndStop ("custom");
}
Symbol 563 MovieClip Frame 1
stop();
Instance of Symbol 563 MovieClip "btn2" in Symbol 682 MovieClip Frame 1
onClipEvent (load) {
main.setPieceFct(this);
}
Instance of Symbol 563 MovieClip "btn3" in Symbol 682 MovieClip Frame 1
onClipEvent (load) {
main.setPieceFct(this);
}
Instance of Symbol 563 MovieClip "btn5" in Symbol 682 MovieClip Frame 1
onClipEvent (load) {
main.setPieceFct(this);
}
Instance of Symbol 563 MovieClip "btn6" in Symbol 682 MovieClip Frame 1
onClipEvent (load) {
main.setPieceFct(this);
}
Instance of Symbol 519 MovieClip in Symbol 682 MovieClip Frame 1
onClipEvent (load) {
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
Instance of Symbol 522 MovieClip "speedBar" in Symbol 682 MovieClip Frame 1
onClipEvent (load) {
bar._x = (((barBkg._width / 2) + (((barBkg._width / 2) * eval (("main.car" + _parent._currentframe) + "Chart.speed")) / 100)) - bar._width) + barBkg._x;
}
Instance of Symbol 523 MovieClip "energyBar" in Symbol 682 MovieClip Frame 1
onClipEvent (load) {
bar._x = (((barBkg._width / 2) + (((barBkg._width / 2) * eval (("main.car" + _parent._currentframe) + "Chart.energy")) / 100)) - bar._width) + barBkg._x;
}
Instance of Symbol 583 MovieClip "p2" in Symbol 682 MovieClip Frame 1
onClipEvent (load) {
_visible = eval (((("main.car" + main.carNbr) + "Chart.") + _name) + ".purchased");
}
Instance of Symbol 586 MovieClip "p5" in Symbol 682 MovieClip Frame 1
onClipEvent (load) {
_visible = eval (((("main.car" + main.carNbr) + "Chart.") + _name) + ".purchased");
}
Instance of Symbol 589 MovieClip "p3" in Symbol 682 MovieClip Frame 1
onClipEvent (load) {
_visible = eval (((("main.car" + main.carNbr) + "Chart.") + _name) + ".purchased");
}
Instance of Symbol 592 MovieClip "p6" in Symbol 682 MovieClip Frame 1
onClipEvent (load) {
_visible = eval (((("main.car" + main.carNbr) + "Chart.") + _name) + ".purchased");
}
Instance of Symbol 563 MovieClip "btn4" in Symbol 682 MovieClip Frame 2
onClipEvent (load) {
main.setPieceFct(this);
}
Instance of Symbol 526 MovieClip "speedBar" in Symbol 682 MovieClip Frame 2
onClipEvent (load) {
bar._x = (((barBkg._width / 2) + (((barBkg._width / 2) * eval (("main.car" + _parent._currentframe) + "Chart.speed")) / 100)) - bar._width) + barBkg._x;
}
Instance of Symbol 527 MovieClip "energyBar" in Symbol 682 MovieClip Frame 2
onClipEvent (load) {
bar._x = (((barBkg._width / 2) + (((barBkg._width / 2) * eval (("main.car" + _parent._currentframe) + "Chart.energy")) / 100)) - bar._width) + barBkg._x;
}
Instance of Symbol 613 MovieClip "p6" in Symbol 682 MovieClip Frame 2
onClipEvent (load) {
_visible = eval (((("main.car" + main.carNbr) + "Chart.") + _name) + ".purchased");
}
Instance of Symbol 616 MovieClip "p2" in Symbol 682 MovieClip Frame 2
onClipEvent (load) {
_visible = eval (((("main.car" + main.carNbr) + "Chart.") + _name) + ".purchased");
}
Instance of Symbol 619 MovieClip "p3" in Symbol 682 MovieClip Frame 2
onClipEvent (load) {
_visible = eval (((("main.car" + main.carNbr) + "Chart.") + _name) + ".purchased");
}
Instance of Symbol 622 MovieClip "p4" in Symbol 682 MovieClip Frame 2
onClipEvent (load) {
_visible = eval (((("main.car" + main.carNbr) + "Chart.") + _name) + ".purchased");
}
Instance of Symbol 563 MovieClip "btn1" in Symbol 682 MovieClip Frame 3
onClipEvent (load) {
main.setPieceFct(this);
}
Instance of Symbol 563 MovieClip "btn7" in Symbol 682 MovieClip Frame 3
onClipEvent (load) {
main.setPieceFct(this);
}
Instance of Symbol 522 MovieClip "speedBar" in Symbol 682 MovieClip Frame 3
onClipEvent (load) {
bar._x = (((barBkg._width / 2) + (((barBkg._width / 2) * eval (("main.car" + _parent._currentframe) + "Chart.speed")) / 100)) - bar._width) + barBkg._x;
}
Instance of Symbol 510 MovieClip "energyBar" in Symbol 682 MovieClip Frame 3
onClipEvent (load) {
bar._x = (((barBkg._width / 2) + (((barBkg._width / 2) * eval (("main.car" + _parent._currentframe) + "Chart.energy")) / 100)) - bar._width) + barBkg._x;
}
Instance of Symbol 472 MovieClip "p7" in Symbol 682 MovieClip Frame 3
onClipEvent (load) {
_visible = eval (((("main.car" + main.carNbr) + "Chart.") + _name) + ".purchased");
}
Instance of Symbol 475 MovieClip "p2" in Symbol 682 MovieClip Frame 3
onClipEvent (load) {
_visible = eval (((("main.car" + main.carNbr) + "Chart.") + _name) + ".purchased");
}
Instance of Symbol 478 MovieClip "p1" in Symbol 682 MovieClip Frame 3
onClipEvent (load) {
_visible = eval (((("main.car" + main.carNbr) + "Chart.") + _name) + ".purchased");
}
Instance of Symbol 481 MovieClip "p3" in Symbol 682 MovieClip Frame 3
onClipEvent (load) {
_visible = eval (((("main.car" + main.carNbr) + "Chart.") + _name) + ".purchased");
}
Instance of Symbol 484 MovieClip "p4" in Symbol 682 MovieClip Frame 3
onClipEvent (load) {
_visible = eval (((("main.car" + main.carNbr) + "Chart.") + _name) + ".purchased");
}
Instance of Symbol 487 MovieClip "p6" in Symbol 682 MovieClip Frame 3
onClipEvent (load) {
_visible = eval (((("main.car" + main.carNbr) + "Chart.") + _name) + ".purchased");
}
Instance of Symbol 509 MovieClip "speedBar" in Symbol 682 MovieClip Frame 4
onClipEvent (load) {
bar._x = (((barBkg._width / 2) + (((barBkg._width / 2) * eval (("main.car" + _parent._currentframe) + "Chart.speed")) / 100)) - bar._width) + barBkg._x;
}
Instance of Symbol 666 MovieClip "p2" in Symbol 682 MovieClip Frame 4
onClipEvent (load) {
_visible = eval (((("main.car" + main.carNbr) + "Chart.") + _name) + ".purchased");
}
Instance of Symbol 669 MovieClip "p3" in Symbol 682 MovieClip Frame 4
onClipEvent (load) {
_visible = eval (((("main.car" + main.carNbr) + "Chart.") + _name) + ".purchased");
}
Instance of Symbol 672 MovieClip "p4" in Symbol 682 MovieClip Frame 4
onClipEvent (load) {
_visible = eval (((("main.car" + main.carNbr) + "Chart.") + _name) + ".purchased");
}
Instance of Symbol 675 MovieClip "p5" in Symbol 682 MovieClip Frame 4
onClipEvent (load) {
_visible = eval (((("main.car" + main.carNbr) + "Chart.") + _name) + ".purchased");
}
Instance of Symbol 678 MovieClip "p7" in Symbol 682 MovieClip Frame 4
onClipEvent (load) {
_visible = eval (((("main.car" + main.carNbr) + "Chart.") + _name) + ".purchased");
}
Instance of Symbol 681 MovieClip "p6" in Symbol 682 MovieClip Frame 4
onClipEvent (load) {
_visible = eval (((("main.car" + main.carNbr) + "Chart.") + _name) + ".purchased");
}
Symbol 694 Button
on (release) {
budget = budget - chartPieceObj.price;
chartPieceObj.purchased = true;
eval (("car" + customzMc._currentframe) + "Chart").energy = eval (("car" + customzMc._currentframe) + "Chart").energy + chartPieceObj.energy;
eval (("car" + customzMc._currentframe) + "Chart").speed = eval (("car" + customzMc._currentframe) + "Chart").speed + chartPieceObj.speed;
customzMc.energyBar.bar._x = (((customzMc.energyBar.barBkg._width / 2) + (((customzMc.energyBar.barBkg._width / 2) * eval (("car" + customzMc._currentframe) + "Chart.energy")) / 100)) - customzMc.energyBar.bar._width) + customzMc.energyBar.barBkg._x;
customzMc.speedBar.bar._x = (((customzMc.speedBar.barBkg._width / 2) + (((customzMc.speedBar.barBkg._width / 2) * eval (("car" + customzMc._currentframe) + "Chart.speed")) / 100)) - customzMc.speedBar.bar._width) + customzMc.speedBar.barBkg._x;
eval ("customzMc.p" + pieceNbr)._visible = true;
budgetBkg.onEnterFrame = function () {
budgetTxtValue = Number(budgetTxt.text);
if (budgetTxtValue != budget) {
diff = budgetTxtValue - budget;
budgetTxtValue = budgetTxtValue - (((diff < 0) ? -1 : 1) * Math.ceil(diff * txtTransSpeed));
}
budgetTxt.text = budgetTxtValue;
if (budgetTxtValue == budget) {
delete budgetBkg.onEnterFrame;
}
};
eval ("customzMc.obj" + main.pieceNbr)._visible = (eval ("customzMc.btn" + main.pieceNbr)._visible = (buyTxt._visible = (purchaseBtn._visible = false)));
}
Symbol 695 Button
on (release) {
if (gameType == "solitary") {
gotoAndStop ("chooseCourse");
} else {
gotoAndStop ("browsing");
}
}
Symbol 722 Button
on (release) {
if (gameType == "solitary") {
gotoAndStop ("chooseCourse");
} else {
gotoAndStop ("browsing");
}
}
Instance of Symbol 196 MovieClip in Symbol 767 MovieClip Frame 1
onClipEvent (load) {
this.onPress = function () {
_parent.closeWindow();
};
}
Instance of Symbol 761 MovieClip in Symbol 767 MovieClip Frame 1
onClipEvent (load) {
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
Symbol 767 MovieClip Frame 2
score1.text = gameMain.ptsCounter;
Instance of Symbol 766 MovieClip in Symbol 767 MovieClip Frame 2
onClipEvent (load) {
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
Symbol 768 Button
on (release) {
multiGameType = "choose";
changeUserState("joining");
}
Symbol 769 Button
on (release) {
multiGameType = "create";
nextFrame();
}
Symbol 788 MovieClip Frame 1
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
Symbol 796 MovieClip Frame 1
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
Symbol 825 MovieClip Frame 1
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
Symbol 842 Button
on (release) {
main.removeUser(userName1.text);
}
Symbol 843 Button
on (release) {
main.removeUser(userName2.text);
}
Symbol 844 Button
on (release) {
main.removeUser(userName3.text);
}
Symbol 862 MovieClip Frame 1
stop();
Instance of Symbol 862 MovieClip "faces" in Symbol 863 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(main.dudeNbr.substring(main.dudeNbr.length - 1));
}
Symbol 871 Button
on (release) {
if (gameType == "solitary") {
gotoAndStop ("step4");
} else {
gotoAndStop ("browsing");
}
}
Symbol 874 Button
on (release) {
inviteUser(free_lb.getValue());
}
Symbol 878 Button
on (release) {
startRoom();
}
Symbol 881 Button
on (release) {
confirmWindow.drawWindow(((lang == "fr") ? "\u00CAtes-vous s\u00FBr de vouloir annuler votre partie?" : "Are-you sure you wish to delete you game?"), "destroyRoom");
}
Symbol 911 Button
on (release) {
addUser(gameDesc.roomID);
}
Symbol 930 Button
on (release) {
changeUserState("browsing");
gotoAndStop ("step5");
}
Symbol 931 Button
on (release) {
requestStartRoom(gameDesc.userName0.text);
}
Symbol 932 Button
on (release) {
main.removeUser(ssUserLogin);
}
Symbol 949 MovieClip Frame 2
stop();
Symbol 951 MovieClip Frame 2
stop();
Symbol 953 MovieClip Frame 1
stop();
Symbol 956 MovieClip Frame 1
stop();
Symbol 956 MovieClip Frame 3
gotoAndStop ("bump");
Symbol 956 MovieClip Frame 5
gotoAndStop ("slide");
Symbol 967 MovieClip Frame 1
stop();
Symbol 968 MovieClip Frame 1
stop();
Symbol 968 MovieClip Frame 2
dot.gotoAndStop(dot._currentframe + 4);
Symbol 973 MovieClip Frame 1
_visible = false;
Symbol 976 MovieClip Frame 13
if (_parent.penalty) {
_visible = false;
}
Symbol 977 MovieClip Frame 1
dotTarget = eval ("gameMain.piste.d" + random(gameMain.numPoints));
penalty = false;
_x = dotTarget._x;
_y = dotTarget._y;
_rotation = random(360);
Symbol 977 MovieClip Frame 133
gotoAndPlay (1);
Symbol 977 MovieClip Frame 134
if (!penalty) {
penalty = true;
animePts.box.pointField.text = main.pointOilBlock;
gameMain.ptsCounter = gameMain.ptsCounter + main.pointOilBlock;
gameMain.ptsCounter = ((gameMain.ptsCounter < 0) ? 0 : (gameMain.ptsCounter));
gameMain.gotoAndStop("slide");
animePts._rotation = -_rotation;
}
Symbol 977 MovieClip Frame 146
gotoAndPlay (1);
Symbol 982 MovieClip Frame 1
do {
dotChoosen = random(gameMain.numPoints);
dotTarget = eval ("gameMain.piste.d" + dotChoosen);
} while (dotTarget.disabled);
dotTarget2 = eval ("gameMain.piste.d" + (dotChoosen + 1));
_x = dotTarget._x;
_y = dotTarget._y;
if (dotTarget2._x > dotTarget._x) {
diffX = dotTarget2._x - dotTarget._x;
if (dotTarget2._y > dotTarget._y) {
diffY = dotTarget2._y - dotTarget._y;
_rotation = (((Math.atan2(diffY, diffX) * 180) / Math.PI) + 90);
} else {
diffY = dotTarget._y - dotTarget2._y;
_rotation = ((Math.atan2(diffX, diffY) * 180) / Math.PI);
}
} else {
diffX = dotTarget._x - dotTarget2._x;
if (dotTarget2._y > dotTarget._y) {
diffY = dotTarget2._y - dotTarget._y;
_rotation = ((-((Math.atan2(diffY, diffX) * 180) / Math.PI)) - 90);
} else {
diffY = dotTarget._y - dotTarget2._y;
_rotation = (((-Math.atan2(diffX, diffY)) * 180) / Math.PI);
}
}
Symbol 982 MovieClip Frame 133
gotoAndPlay (1);
Symbol 982 MovieClip Frame 134
_rotation = 0;
animePts.box.pointField.text = "+" + main.pointSpeedBlock;
gameMain.piste.car.tspeed = gameMain.piste.car.tspeed * 3;
gameMain.ptsCounter = gameMain.ptsCounter + main.pointSpeedBlock;
gameMain.ptsCounter = ((gameMain.ptsCounter < 0) ? 0 : (gameMain.ptsCounter));
Symbol 982 MovieClip Frame 146
gotoAndPlay (1);
Symbol 989 MovieClip Frame 1
dotTarget = eval ("gameMain.piste.d" + random(gameMain.numPoints));
_x = dotTarget._x;
_y = dotTarget._y;
Symbol 989 MovieClip Frame 133
gotoAndPlay (1);
Symbol 989 MovieClip Frame 134
animePts.box.pointField.text = "+" + main.pointEnergyBlock;
main.increaseEnergy(main.gainEGoldenBlock);
gameMain.ptsCounter = gameMain.ptsCounter + main.pointEnergyBlock;
gameMain.ptsCounter = ((gameMain.ptsCounter < 0) ? 0 : (gameMain.ptsCounter));
Symbol 989 MovieClip Frame 146
gotoAndPlay (1);
Symbol 990 MovieClip Frame 14
stop();
Instance of Symbol 977 MovieClip "oil" in Symbol 991 MovieClip Frame 1
onClipEvent (load) {
steerSmooth = 0.2;
gf = 0.3;
tline = 5;
cline = 5324856 /* 0x514038 */;
aline = 100;
}
Symbol 993 MovieClip Frame 1
_visible = false;
Instance of Symbol 1019 MovieClip in Symbol 1020 MovieClip Frame 1
onClipEvent (load) {
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
Symbol 1183 MovieClip Frame 1
gameMain.piste.dummy.twin = this;
stop();
Symbol 1184 MovieClip Frame 1
function traceLineL(obj, moveTo) {
var _local1 = obj;
lineL.lineStyle(gameMain.tline, gameMain.cline, gameMain.aline);
if (moveTo) {
lineL.moveTo((_local1.x * 100) / gameMain.piste._xscale, (_local1.y * 100) / gameMain.piste._yscale);
}
lineL.lineTo((_local1.x * 100) / gameMain.piste._xscale, (_local1.y * 100) / gameMain.piste._yscale);
lineL = createEmptyMovieClip("line" + gameMain.cl, 100 + (gameMain.cl++));
lineL.moveTo((_local1.x * 100) / gameMain.piste._xscale, (_local1.y * 100) / gameMain.piste._yscale);
lineL.intervalID = setInterval(gameMain.fadeLine, gameMain.sfade, gameMain.lineL);
gameMain.cl = gameMain.cl % gameMain.mline;
}
Instance of Symbol 1183 MovieClip in Symbol 1184 MovieClip Frame 1
onClipEvent (load) {
function getPoint(obj) {
point.x = obj._x;
point.y = obj._y;
localToGlobal(point);
point.x = point.x - _x;
point.y = point.y - _y;
return(point);
}
point = new Object();
}
Symbol 1206 MovieClip Frame 7
stop();
Symbol 1213 MovieClip Frame 7
_parent.gotoAndStop("inactif");
Symbol 1218 MovieClip Frame 7
stop();
Symbol 1223 MovieClip Frame 7
stop();
Symbol 1228 MovieClip Frame 7
_parent.gotoAndStop("inactif");
Symbol 1233 MovieClip Frame 7
stop();
Symbol 1238 MovieClip Frame 7
stop();
Symbol 1245 MovieClip Frame 7
stop();
Symbol 1248 MovieClip Frame 7
stop();
Symbol 1253 MovieClip Frame 7
stop();
Symbol 1254 MovieClip Frame 7
stop();
Symbol 1255 MovieClip Frame 7
_parent.gotoAndStop("inactif");
Symbol 1256 MovieClip Frame 7
stop();
Symbol 1257 MovieClip Frame 7
stop();
Symbol 1261 MovieClip Frame 36
stop();
Symbol 1263 MovieClip Frame 36
_parent.gotoAndStop("inactif");
Symbol 1264 MovieClip Frame 36
stop();
Symbol 1271 MovieClip Frame 40
stop();
Symbol 1282 MovieClip Frame 40
_parent.gotoAndStop("inactif");
Symbol 1290 MovieClip Frame 40
stop();
Symbol 1297 MovieClip Frame 40
stop();
Symbol 1298 MovieClip Frame 1
gameMain.carAnim = undefined;
stop();
Symbol 1298 MovieClip Frame 2
main.reduceEnergy(main.loseEBumpBack);
Symbol 1298 MovieClip Frame 3
main.reduceEnergy(main.loseEBumpFront);
Symbol 1307 MovieClip Frame 7
_parent.gotoAndStop("inactif");
Symbol 1312 MovieClip Frame 7
_parent.gotoAndStop("inactif");
Symbol 1319 MovieClip Frame 7
stop();
Symbol 1320 MovieClip Frame 7
stop();
Symbol 1321 MovieClip Frame 36
_parent.gotoAndStop("inactif");
Symbol 1329 MovieClip Frame 40
_parent.gotoAndStop("inactif");
Symbol 1330 MovieClip Frame 1
gameMain.carAnim = undefined;
stop();
Symbol 1330 MovieClip Frame 2
main.reduceEnergy(main.loseEBumpBack);
Symbol 1330 MovieClip Frame 3
main.reduceEnergy(main.loseEBumpFront);
Symbol 1338 MovieClip Frame 7
_parent.gotoAndStop("inactif");
Symbol 1343 MovieClip Frame 7
_parent.gotoAndStop("inactif");
Symbol 1348 MovieClip Frame 7
stop();
Symbol 1349 MovieClip Frame 7
stop();
Symbol 1350 MovieClip Frame 36
_parent.gotoAndStop("inactif");
Symbol 1357 MovieClip Frame 40
_parent.gotoAndStop("inactif");
Symbol 1358 MovieClip Frame 1
gameMain.carAnim = undefined;
stop();
Symbol 1358 MovieClip Frame 2
main.reduceEnergy(main.loseEBumpBack);
Symbol 1358 MovieClip Frame 3
main.reduceEnergy(main.loseEBumpFront);
Symbol 1385 MovieClip Frame 7
_parent.gotoAndStop("inactif");
Symbol 1407 MovieClip Frame 7
_parent.gotoAndStop("inactif");
Symbol 1420 MovieClip Frame 7
stop();
Symbol 1421 MovieClip Frame 7
stop();
Symbol 1426 MovieClip Frame 7
stop();
Symbol 1431 MovieClip Frame 7
stop();
Symbol 1432 MovieClip Frame 7
stop();
Symbol 1437 MovieClip Frame 7
stop();
Symbol 1439 MovieClip Frame 7
stop();
Symbol 1440 MovieClip Frame 7
stop();
Symbol 1441 MovieClip Frame 7
_parent.gotoAndStop("inactif");
Symbol 1442 MovieClip Frame 7
stop();
Symbol 1444 MovieClip Frame 7
stop();
Symbol 1445 MovieClip Frame 7
stop();
Symbol 1446 MovieClip Frame 7
stop();
Symbol 1447 MovieClip Frame 7
stop();
Symbol 1448 MovieClip Frame 7
stop();
Symbol 1449 MovieClip Frame 7
stop();
Symbol 1450 MovieClip Frame 7
stop();
Symbol 1451 MovieClip Frame 7
stop();
Symbol 1453 MovieClip Frame 7
stop();
Symbol 1459 MovieClip Frame 36
_parent.gotoAndStop("inactif");
Symbol 1480 MovieClip Frame 40
_parent.gotoAndStop("inactif");
Symbol 1485 MovieClip Frame 40
stop();
Symbol 1486 MovieClip Frame 40
stop();
Symbol 1492 MovieClip Frame 1
gameMain.carAnim = undefined;
stop();
Symbol 1492 MovieClip Frame 2
main.reduceEnergy(main.loseEBumpBack);
Symbol 1492 MovieClip Frame 3
main.reduceEnergy(main.loseEBumpFront);
Symbol 1500 MovieClip Frame 12
_parent.gotoAndStop("inactif");
Symbol 1505 MovieClip Frame 12
_parent.gotoAndStop("inactif");
Symbol 1510 MovieClip Frame 7
stop();
Symbol 1515 MovieClip Frame 7
_parent.gotoAndStop("inactif");
Symbol 1516 MovieClip Frame 36
_parent.gotoAndStop("inactif");
Symbol 1525 MovieClip Frame 40
_parent.gotoAndStop("inactif");
Symbol 1526 MovieClip Frame 1
gameMain.carAnim = undefined;
stop();
Symbol 1526 MovieClip Frame 2
main.reduceEnergy(main.loseEBumpBack);
Symbol 1526 MovieClip Frame 3
main.reduceEnergy(main.loseEBumpFront);
Symbol 1527 MovieClip Frame 1
function getPoint(obj) {
point.x = obj._x;
point.y = obj._y;
localToGlobal(point);
point.x = point.x - _x;
point.y = point.y - _y;
return(point);
}
point = new Object();
if (main.carNbr != undefined) {
gotoAndStop(main.carNbr);
} else {
stop();
}
Instance of Symbol 1330 MovieClip "car" in Symbol 1527 MovieClip Frame 2
onClipEvent (load) {
function getPoint(obj) {
point.x = obj._x;
point.y = obj._y;
localToGlobal(point);
point.x = point.x - _x;
point.y = point.y - _y;
return(point);
}
point = new Object();
}
Instance of Symbol 1358 MovieClip "car" in Symbol 1527 MovieClip Frame 3
onClipEvent (load) {
function getPoint(obj) {
point.x = obj._x;
point.y = obj._y;
localToGlobal(point);
point.x = point.x - _x;
point.y = point.y - _y;
return(point);
}
point = new Object();
}
Symbol 1532 MovieClip Frame 1
_visible = false;
if (Math.abs(Math.abs(_rotation) - 90) < 2) {
_rotation = ((_rotation < 0) ? -90 : 90);
}
htype = ((Math.abs(_rotation) % 90) ? true : ((((Math.abs(_rotation) / 90) % 2) ? false : true)));
if (!htype) {
line._rotation = 90;
_rotation = (_rotation - 90);
}
_name = gameMain.getName();
bounds = this.getBounds(gameMain.piste);
angle = _rotation * gameMain.radVal;
cosa = Math.cos(angle);
sina = Math.sin(angle);
gameMain.addObjIfHit(this, "hitZone", "borderArray");
tcol = true;
if (addIt != undefined) {
Set((("gameMain." + addIt) + ".") + _name, this);
tcol = false;
}
Symbol 1535 MovieClip Frame 1
function mTween() {
var _local1 = this;
if (!lock) {
if ((vx != 0) || (vy != 0)) {
_local1.onEnterFrame = function () {
var _local1 = this;
vx = vx * friction;
vy = vy * friction;
_x = (_x + vx);
_y = (_y + vy);
i = 0;
while (i < gameMain.obsArray.length) {
gameMain.checkObs(_local1, gameMain.obsArray[i]);
i++;
}
if (!lock) {
twin._x = _x;
twin._y = _y;
}
var i = 1;
while (i <= gameMain.borderArray.length) {
if (gameMain.checkBorder(_local1, gameMain.borderArray[i - 1])) {
vx = (vy = 0);
lock = true;
break;
}
i++;
}
if ((Math.round(vx) == 0) && (Math.round(vy) == 0)) {
vx = (vy = 0);
delete _local1.onEnterFrame;
}
};
}
}
}
if (!lock) {
twin = eval ("gameMain.map." + _name);
}
_visible = false;
m = _width;
ray = _width / 2;
friction = 0.9;
vx = (vy = 0);
gameMain.addObjIfHit(this, "hitZone", "obsArray");
Symbol 1536 MovieClip Frame 1
function incSeg() {
seg++;
seg2 = seg + 1;
if (seg >= (gameMain.numPointsT - 1)) {
seg2 = 0;
}
if (seg >= gameMain.numPointsT) {
seg = 0;
seg2 = 1;
}
}
function tTween() {
t = t + speed;
if (t > 0.99) {
t = 0;
incSeg();
speed = vSpeed;
mid1.x = gameMain.midT[seg].x;
mid1.y = gameMain.midT[seg].y;
point2.x = gameMain.pointsT[seg2]._x;
point2.y = gameMain.pointsT[seg2]._y;
mid2.x = gameMain.midT[seg2].x;
mid2.y = gameMain.midT[seg2].y;
}
_x = ((((mid1.x * (1 - t)) * (1 - t)) + (((2 * point2.x) * (1 - t)) * t)) + ((mid2.x * t) * t));
_y = ((((mid1.y * (1 - t)) * (1 - t)) + (((2 * point2.y) * (1 - t)) * t)) + ((mid2.y * t) * t));
vx = _x - oldx;
vy = _y - oldy;
oldx = _x;
oldy = _y;
trot = (Math.atan2(vy, vx) * 180) / Math.PI;
diff = trot - _rotation;
if (diff > 180) {
diff = diff - 360;
}
if (diff < -180) {
diff = diff + 360;
}
vrot = vrot + (diff * 0.5);
vrot = vrot * 0.8;
_rotation = (_rotation + vrot);
if (main.gameStarted && (twin._visible)) {
if (gameMain.swapObj.getDepth() < gameMain.elementMap.getDepth()) {
var i = 1;
while (i <= gameMain.hitZoneQty) {
if (hitZone.hitTest(eval ("gameMain.hitZone" + i))) {
hitObjList = eval ("gameMain.zoneArray" + i);
}
i++;
}
i = 0;
while (i < hitObjList.obsArray.length) {
if (hitObjList.borderArray[i].addIt == "type1") {
if (gameMain.checkObs(this, hitObjList.obsArray[i])) {
this.onEnterFrame = cTween;
}
}
i++;
}
i = 0;
while (i < gameMain.carArray.length) {
if (!gameMain.clock._visible) {
if (gameMain.checkObs(this, gameMain.carArray[i])) {
gameMain.allCar.car.gotoAndStop("bumpFront");
gameMain.bumpSnd.gotoAndPlay("bump");
this.onEnterFrame = cTween;
}
}
i++;
}
var i = 0;
while (i < hitObjList.borderArray.length) {
if (hitObjList.borderArray[i].addIt == "type1") {
if (gameMain.checkBorder(this, hitObjList.borderArray[i])) {
lock = true;
delete this.onEnterFrame;
break;
}
}
i++;
}
}
}
if (!lock) {
twin._x = _x;
twin._y = _y;
twin._rotation = _rotation;
}
}
function cTween() {
vx = vx * friction;
vy = vy * friction;
_x = (_x + vx);
_y = (_y + vy);
if (gameMain.swapObj.getDepth() < gameMain.elementMap.getDepth()) {
var i = 1;
while (i <= gameMain.hitZoneQty) {
if (hitZone.hitTest(eval ("gameMain.hitZone" + i))) {
hitObjList = eval ("gameMain.zoneArray" + i);
}
i++;
}
i = 0;
while (i < hitObjList.obsArray.length) {
if (hitObjList.borderArray[i].addIt == "type1") {
gameMain.checkObs(this, hitObjList.obsArray[i]);
}
i++;
}
i = 0;
while (i < gameMain.carArray.length) {
if (!gameMain.clock._visible) {
if (gameMain.checkObs(this, gameMain.carArray[i])) {
gameMain.allCar.car.gotoAndStop("bumpFront");
gameMain.bumpSnd.gotoAndPlay("bump");
}
}
i++;
}
var i = 0;
while (i < hitObjList.borderArray.length) {
if (hitObjList.borderArray[i].addIt == "type1") {
if (gameMain.checkBorder(this, hitObjList.borderArray[i])) {
lock = true;
hitObjList.obsArray.push(this);
delete this.onEnterFrame;
break;
}
}
i++;
}
}
if (!lock) {
twin._x = _x;
twin._y = _y;
twin._rotation = _rotation;
}
if ((Math.round(vx) == 0) && (Math.round(vy) == 0)) {
t = 0;
if (collSeg != seg2) {
incSeg();
speed = vSpeed2;
collSeg = seg2;
}
mid1.x = _x;
mid1.y = _y;
point2.x = gameMain.pointsT[seg2]._x;
point2.y = gameMain.pointsT[seg2]._y;
mid2.x = gameMain.midT[seg2].x;
mid2.y = gameMain.midT[seg2].y;
vx = (vy = 0);
onEnterFrame = tTween;
}
}
lock = false;
m = 45;
ray = 20;
friction = 0.9;
vx = (vy = 0);
vSpeed = 0.06;
vSpeed2 = vSpeed / 2;
seg = 0;
seg2 = 1;
mid1 = new Object();
mid2 = new Object();
point2 = new Object();
coll = false;
t = 1;
this.onEnterFrame = tTween;
stop();
Symbol 1541 MovieClip Frame 1
stop();
Symbol 1542 MovieClip Frame 1
phase = 0;
enemiNbr = Number(this._name.substring(this._name.length - 1));
if (main.gameType == "multiPlayer") {
avartarTarget = eval ("main.avatar" + enemiNbr);
var i = 0;
while (i < main.userRoom.userArrayRoom.length) {
if (avartarTarget.userName.text == main.userRoom.userArrayRoom[i].userName) {
if ((main.userRoom.userArrayRoom[i].userType == "robot") && (main.roomAdmin)) {
vSpeed = main.userRoom.userArrayRoom[i].userSpeed;
} else {
vSpeed = 0;
}
break;
}
i++;
}
}
if (vSpeed == undefined) {
eval ("gameMain.twins.twin" + enemiNbr).actif = false;
_visible = false;
} else if (vSpeed == 0) {
} else {
vx = (vy = 0);
seg = 41;
seg2 = 42;
mid1 = new Object();
mid2 = new Object();
point2 = new Object();
t = 1;
turn = 0;
this.incSeg = function () {
seg++;
seg2 = seg + 1;
if (seg >= (gameMain.numPoints - 1)) {
seg2 = 0;
}
if (seg >= gameMain.numPoints) {
seg = 0;
seg2 = 1;
}
};
this.tTween = function () {
if (main.gameStarted) {
t = t + speed;
if (t > 0.99) {
t = 0;
incSeg();
speed = vSpeed;
mid1.x = gameMain.mid[seg].x;
mid1.y = gameMain.mid[seg].y;
point2.x = gameMain.points[seg2]._x;
point2.y = gameMain.points[seg2]._y;
mid2.x = gameMain.mid[seg2].x;
mid2.y = gameMain.mid[seg2].y;
}
_x = ((((mid1.x * (1 - t)) * (1 - t)) + (((2 * point2.x) * (1 - t)) * t)) + ((mid2.x * t) * t));
_y = ((((mid1.y * (1 - t)) * (1 - t)) + (((2 * point2.y) * (1 - t)) * t)) + ((mid2.y * t) * t));
vx = _x - oldx;
vy = _y - oldy;
oldx = _x;
oldy = _y;
if (((seg == 42) && (seg2 == 43)) && (phase > 0)) {
if (phase == 1) {
turn++;
phase = 0;
}
if (turn >= gameMain.turnTotal) {
phase = -1;
vSpeed = 0;
main.stopGameRobot(eval (("main.avatar" + enemiNbr) + ".userName").text);
}
} else if ((seg == 43) && (seg2 == 44)) {
phase = 1;
}
}
};
this.onEnterFrame = this.tTween;
}
stop();
Symbol 1542 MovieClip Frame 2
colorCircle.gotoAndStop(colorCircle._currentframe + 4);
this.onEnterFrame = undefined;
Instance of Symbol 973 MovieClip in Symbol 1544 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
for (var _local1 in gameMain.type2) {
gameMain.type2[_local1].tcol = true;
}
for (var _local1 in gameMain.type1) {
gameMain.type1[_local1].tcol = false;
}
for (var _local1 in gameMain.hitArray) {
gameMain.hitArray[_local1].hitAction = gameMain.hitArray[_local1].hitFct;
}
if (gameMain.swapObj.getDepth() < gameMain.elementMap.getDepth()) {
gameMain.elementMap.swapDepths(gameMain.swapObj);
}
if (gameMain.tcount == 2) {
gameMain.tcount++;
}
hitAction = undefined;
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1544 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
for (var _local1 in gameMain.type1) {
gameMain.type1[_local1].tcol = true;
}
for (var _local1 in gameMain.type2) {
gameMain.type2[_local1].tcol = false;
}
for (var _local1 in gameMain.hitArray) {
gameMain.hitArray[_local1].hitAction = gameMain.hitArray[_local1].hitFct;
}
if (gameMain.swapObj.getDepth() > gameMain.elementMap.getDepth()) {
gameMain.elementMap.swapDepths(gameMain.swapObj);
}
if (gameMain.tcount == 1) {
gameMain.tcount++;
}
hitAction = undefined;
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1544 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
for (var _local1 in gameMain.type1) {
gameMain.type1[_local1].tcol = true;
}
for (var _local1 in gameMain.type2) {
gameMain.type2[_local1].tcol = false;
}
for (var _local1 in gameMain.hitArray) {
gameMain.hitArray[_local1].hitAction = gameMain.hitArray[_local1].hitFct;
}
if (gameMain.swapObj.getDepth() > gameMain.elementMap.getDepth()) {
gameMain.elementMap.swapDepths(gameMain.swapObj);
}
if (gameMain.tcount == 0) {
gameMain.tcount++;
}
hitAction = undefined;
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1544 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
for (var _local1 in gameMain.type2) {
gameMain.type2[_local1].tcol = true;
}
for (var _local1 in gameMain.type1) {
gameMain.type1[_local1].tcol = false;
}
for (var _local1 in gameMain.hitArray) {
gameMain.hitArray[_local1].hitAction = gameMain.hitArray[_local1].hitFct;
}
if (gameMain.swapObj.getDepth() < gameMain.elementMap.getDepth()) {
gameMain.elementMap.swapDepths(gameMain.swapObj);
}
if (gameMain.tcount == 3) {
gameMain.tcount++;
}
hitAction = undefined;
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip "finishLine" in Symbol 1544 MovieClip Frame 1
onClipEvent (load) {
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
gameMain.finishLine = this;
hitFct = function () {
for (var _local1 in gameMain.hitArray) {
gameMain.hitArray[_local1].hitAction = gameMain.hitArray[_local1].hitFct;
}
if (gameMain.tcount == 4) {
gameMain.tcount = 0;
gameMain.turn++;
if (gameMain.turn >= gameMain.turnTotal) {
main.stopGame(ssUserLogin);
}
}
hitAction = undefined;
};
if (gameMain.swapObj.getDepth() < gameMain.elementMap.getDepth()) {
gameMain.elementMap.swapDepths(gameMain.swapObj);
}
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1544 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
var _local1 = _parent;
if (((_local1.car._y > this._y) && ((gameMain.carAnim != "jumpFront") && (gameMain.carAnim != "jumpSide"))) && (_local1.car._x < (_x + _width))) {
if (_local1.car.speed > _local1.car.skidSpeed) {
gameMain.carAnim = ((random(2) > 0) ? "jumpFront" : "jumpSide");
gameMain.allCar.car.gotoAndStop(gameMain.carAnim);
gameMain.twins.animePts._x = _x + (_height / 2);
gameMain.twins.animePts._y = _y + (_width / 2);
gameMain.twins.animePts.box.pointField.text = "+" + main.pointJump;
gameMain.twins.animePts.gotoAndPlay(1);
gameMain.ptsCounter = gameMain.ptsCounter + main.pointJump;
gameMain.ptsCounter = ((gameMain.ptsCounter < 0) ? 0 : (gameMain.ptsCounter));
} else {
gameMain.allCar.car._yscale = (gameMain.allCar.car._xscale = 75);
}
}
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1544 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
var _local1 = _parent;
if (((_local1.car._y < this._y) && ((gameMain.carAnim != "jumpFront") && (gameMain.carAnim != "jumpSide"))) && (_local1.car._x > _x)) {
if (_local1.car.speed > _local1.car.skidSpeed) {
gameMain.carAnim = ((random(2) > 0) ? "jumpFront" : "jumpSide");
gameMain.twins.animePts._x = _x + (_width / 2);
gameMain.twins.animePts._y = _y + (_height / 2);
gameMain.twins.animePts.box.pointField.text = "+" + main.pointJump;
gameMain.twins.animePts.gotoAndPlay(1);
gameMain.ptsCounter = gameMain.ptsCounter + main.pointJump;
gameMain.allCar.car.gotoAndStop(gameMain.carAnim);
} else {
gameMain.allCar.car._yscale = (gameMain.allCar.car._xscale = 75);
}
}
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1544 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.upArray.push(this);
}
Instance of Symbol 973 MovieClip in Symbol 1544 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.upArray.push(this);
}
Instance of Symbol 1532 MovieClip in Symbol 1544 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
}
Instance of Symbol 1532 MovieClip in Symbol 1544 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
}
Instance of Symbol 1532 MovieClip in Symbol 1544 MovieClip Frame 1
onClipEvent (load) {
addIt = "type2";
}
Instance of Symbol 1532 MovieClip in Symbol 1544 MovieClip Frame 1
onClipEvent (load) {
addIt = "type2";
}
Instance of Symbol 1532 MovieClip in Symbol 1544 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
}
Instance of Symbol 1532 MovieClip in Symbol 1544 MovieClip Frame 1
onClipEvent (load) {
addIt = "type2";
}
Instance of Symbol 1532 MovieClip in Symbol 1544 MovieClip Frame 1
onClipEvent (load) {
addIt = "type2";
}
Instance of Symbol 1532 MovieClip in Symbol 1544 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
}
Instance of Symbol 1532 MovieClip in Symbol 1544 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
}
Instance of Symbol 1532 MovieClip in Symbol 1544 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
}
Instance of Symbol 1532 MovieClip in Symbol 1544 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
}
Instance of Symbol 1532 MovieClip in Symbol 1544 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
}
Instance of Symbol 1535 MovieClip in Symbol 1544 MovieClip Frame 1
onClipEvent (load) {
lock = true;
}
Instance of Symbol 1535 MovieClip in Symbol 1544 MovieClip Frame 1
onClipEvent (load) {
lock = true;
}
Instance of Symbol 1535 MovieClip in Symbol 1544 MovieClip Frame 1
onClipEvent (load) {
lock = true;
}
Instance of Symbol 1535 MovieClip in Symbol 1544 MovieClip Frame 1
onClipEvent (load) {
lock = true;
}
Instance of Symbol 1535 MovieClip in Symbol 1544 MovieClip Frame 1
onClipEvent (load) {
lock = true;
}
Instance of Symbol 1535 MovieClip in Symbol 1544 MovieClip Frame 1
onClipEvent (load) {
lock = true;
}
Instance of Symbol 1543 MovieClip "car" in Symbol 1544 MovieClip Frame 1
onClipEvent (load) {
minVolume = (newVolume = 10);
x = _x;
y = _y;
vx = (vy = 0);
tspeed = 0;
carGrid = eval (("main.car" + main.carNbr) + "Chart");
trust = ((carGrid.maxSpeed * carGrid.speed) / 560) + ((carGrid.maxSpeed * 80) / 100);
bTrust = 0.5;
decay = 0.9;
angle = 180;
tfriction = 0.16;
steer = 0;
steerInc = 1;
steerDec = 1;
steerMax = 10;
skidAngle = 5;
skidSpeed = 5;
gObj = this;
tline = 5;
cline = 6710886 /* 0x666666 */;
aline = 100;
steerSmooth = 0.1;
moveTo = false;
skid = false;
gf = 1;
m = 40;
ray = 20;
gameMain.carArray.push(this);
if (main.gameType == "multiPlayer") {
main.carInt = setInterval(main.updatePosition, main.updateTime);
}
main.minutTxt = "00";
main.secondTxt = "00";
main.centiSecondTxt = "00";
}
onClipEvent (enterFrame) {
if (main.keyActive) {
main.timerGame = getTimer() - main.offSet;
minut = Math.round((main.timerGame / 1000) / 60);
second = Math.round((main.timerGame / 1000) % 60);
centiSecond = Math.round((main.timerGame % 1000) / 10);
main.minutTxt = ((minut < 10) ? ("0" + minut) : (minut));
main.secondTxt = ((second < 10) ? ("0" + second) : (second));
main.centiSecondTxt = ((centiSecond < 10) ? ("0" + centiSecond) : (centiSecond));
keyLeft = Key.isDown(37);
keyRight = Key.isDown(39);
keyup = Key.isDown(38);
keydown = Key.isDown(40);
} else {
keyLeft = (keyRight = (keyup = (keydown = false)));
}
gHit = gObj;
var i = 0;
while (i < gameMain.hitObjList.gArray.length) {
hitG = gameMain.hitObjList.gArray[i].hitTest(((_x * _parent._xscale) / 100) + _parent._x, ((_y * _parent._yscale) / 100) + _parent._y, true);
if (hitG) {
gHit = gameMain.hitObjList.gArray[i];
break;
}
i++;
}
if (gameMain.twins.oil.hitZone.hitTest(gameMain.allCar)) {
gameMain.twins.oil.gotoAndPlay("hit");
gHit = gameMain.twins.oil;
}
if (keyup) {
dir = 1;
tspeed = tspeed + (dir * (trust * gHit.gf));
}
if (keydown) {
dir = -1;
tspeed = tspeed + (dir * (btrust * gHit.gf));
}
tspeed = Math.min(tspeed, main.ultimateSpeed);
hVolume = (tspeed * main.mainVolume) / 12;
gameMain.lowSpeed.s.setVolume(main.mainVolume - hVolume);
gameMain.highSpeed.s.setVolume(Math.min(hVolume, 80));
tspeed = tspeed * decay;
angDeg = angle * gameMain.radVal;
idealvx = tspeed * Math.cos(angDeg);
idealvy = tspeed * Math.sin(angDeg);
vx = vx + ((idealvx - vx) * tfriction);
vy = vy + ((idealvy - vy) * tfriction);
x = x + vx;
y = y + vy;
if (keyLeft || (keyRight)) {
steer = steer + ((keyRight - keyLeft) * steerInc);
} else {
steer = steer + (((steer < 0) - (steer > 0)) * steerDec);
}
if (steer < (-steerMax)) {
steer = -steerMax;
} else if (steer > steerMax) {
steer = steerMax;
}
speed = Math.sqrt((vx * vx) + (vy * vy));
angle = angle + ((steer * speed) * gHit.steerSmooth);
gameMain.allCar.wtl._rotation = (gameMain.allCar.wtr._rotation = (steer * 3) * dir);
gameMain.carShadow._rotation = (gameMain.allCar._rotation = angle + 90);
if (x < 150) {
_x = ((x = 160));
vx = 0;
vy = 0;
} else if (x > 1850) {
_x = ((x = 1840));
vx = 0;
vy = 0;
} else {
_x = x;
}
if (y < 110) {
_y = ((y = 120));
vx = 0;
vy = 0;
} else if (y > 1400) {
_y = ((y = 1390));
vx = 0;
vy = 0;
} else {
_y = y;
}
var i = 1;
while (i <= gameMain.hitZoneQty) {
if (hitZone.hitTest(eval ("gameMain.hitZone" + i))) {
gameMain.hitObjList = eval ("gameMain.zoneArray" + i);
}
i++;
}
upHit = false;
i = 0;
while (i < gameMain.upArray.length) {
if (gameMain.upArray[i].hitTest(this) && (gameMain.swapObj.getDepth() > gameMain.elementMap.getDepth())) {
upHit = true;
if (gameMain.allCar.car._xscale < 70) {
gameMain.allCar.car._xscale = (gameMain.allCar.car._yscale = gameMain.allCar.car._yscale + 5);
}
}
i++;
}
if ((!upHit) && (gameMain.allCar.car._xscale > 65)) {
gameMain.allCar.car._xscale = (gameMain.allCar.car._yscale = gameMain.allCar.car._yscale - 5);
}
i = 0;
while (i < gameMain.hitObjList.hitArray.length) {
if (gameMain.hitObjList.hitArray[i].hitTest(this)) {
gameMain.hitObjList.hitArray[i].hitAction();
}
i++;
}
bump = ((tspeed > 0) ? "bumpFront" : "bumpBack");
i = 0;
while (i < gameMain.hitObjList.obsArray.length) {
if (gameMain.checkObs(this, gameMain.hitObjList.obsArray[i])) {
if ((gameMain.carAnim != "jumpFront") && (gameMain.carAnim != "jumpSide")) {
gameMain.allCar.car.gotoAndStop(bump);
gameMain.bumpSnd.gotoAndPlay("bump");
}
}
i++;
}
var i = 0;
var i = 0;
while (i <= gameMain.hitObjList.borderArray.length) {
if (gameMain.checkBorder(this, gameMain.hitObjList.borderArray[i])) {
if (gameMain.hitObjList.borderArray[i].dommage == undefined) {
if ((gameMain.carAnim != "jumpFront") && (gameMain.carAnim != "jumpSide")) {
gameMain.allCar.car.gotoAndStop(bump);
gameMain.bumpSnd.gotoAndPlay("bump");
}
}
}
i++;
}
if (((Math.abs(Math.round(steer)) > skidAngle) && (speed > skidSpeed)) || (hitG)) {
gameMain.traceLine(_x, _y, gHit, moveTo);
if (keyRight || (keyLeft)) {
skid = true;
skidSide = (keyRight ? "skid1" : "skid2");
}
if ((gameMain.carAnim != "jumpFront") && (gameMain.carAnim != "jumpSide")) {
gameMain.skidSound.gotoAndStop("snd");
gameMain.allCar.car.gotoAndStop(skidSide);
}
moveTo = false;
} else {
moveTo = true;
if (skid) {
if ((gameMain.carAnim != "jumpFront") && (gameMain.carAnim != "jumpSide")) {
skid = false;
gameMain.skidSound.gotoAndStop("mute");
gameMain.allCar.car.gotoAndStop(skidSide + "b");
}
}
gameMain.lineL.clear();
gameMain.lineR.clear();
}
gameMain.twins._x = (gameMain.elementMap._x = (gameMain.map._x = Math.round((-_x) + gameMain.allCar._x)));
gameMain.twins._y = (gameMain.elementMap._y = (gameMain.map._y = Math.round((-_y) + gameMain.allCar._y)));
if (gameMain.twins.energyBoost.hitZone.hitTest(gameMain.allCar)) {
gameMain.twins.energyBoost.gotoAndPlay("hit");
}
if (gameMain.twins.speedBoost.hitZone.hitTest(gameMain.allCar)) {
gameMain.twins.speedBoost.gotoAndPlay("hit");
}
var i = 0;
while (i < gameMain.mapArray.length) {
gameMain.mapArray[i]._visible = gameMain.mapArray[i].hitTest(gameMain.frame);
i++;
}
for (var i in gameMain.twins) {
gameMain.twins[i]._visible = gameMain.twins[i].hitTest(gameMain.frame) && (gameMain.twins[i].actif != false);
}
}
Symbol 1549 MovieClip Frame 123
_parent._parent.gotoAndPlay("actif");
Symbol 1559 MovieClip Frame 1
stop();
Instance of Symbol 1558 MovieClip in Symbol 1559 MovieClip Frame 1
onClipEvent (load) {
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
Symbol 1559 MovieClip Frame 2
main.keyActive = true;
main.gameStarted = true;
main.offSet = getTimer();
Symbol 1559 MovieClip Frame 13
stop();
Symbol 1737 MovieClip Frame 1
function traceLineL(obj, moveTo) {
var _local1 = obj;
lineL.lineStyle(gameMain.tline, gameMain.cline, gameMain.aline);
if (moveTo) {
lineL.moveTo((_local1.x * 100) / gameMain.piste._xscale, (_local1.y * 100) / gameMain.piste._yscale);
}
lineL.lineTo((_local1.x * 100) / gameMain.piste._xscale, (_local1.y * 100) / gameMain.piste._yscale);
lineL = createEmptyMovieClip("line" + gameMain.cl, 100 + (gameMain.cl++));
lineL.moveTo((_local1.x * 100) / gameMain.piste._xscale, (_local1.y * 100) / gameMain.piste._yscale);
lineL.intervalID = setInterval(gameMain.fadeLine, gameMain.sfade, gameMain.lineL);
gameMain.cl = gameMain.cl % gameMain.mline;
}
Instance of Symbol 1183 MovieClip in Symbol 1737 MovieClip Frame 1
onClipEvent (load) {
function getPoint(obj) {
point.x = obj._x;
point.y = obj._y;
localToGlobal(point);
point.x = point.x - _x;
point.y = point.y - _y;
return(point);
}
point = new Object();
}
Symbol 1744 MovieClip Frame 1
_visible = false;
Instance of Symbol 973 MovieClip in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
for (var _local1 in gameMain.type1) {
gameMain.type1[_local1].tcol = true;
}
for (var _local1 in gameMain.type2) {
gameMain.type2[_local1].tcol = false;
}
for (var _local1 in gameMain.hitArray) {
gameMain.hitArray[_local1].hitAction = gameMain.hitArray[_local1].hitFct;
}
if (gameMain.swapObj.getDepth() < gameMain.elementMap.getDepth()) {
gameMain.elementMap.swapDepths(gameMain.swapObj);
}
if (gameMain.tcount == 0) {
gameMain.tcount++;
}
hitAction = undefined;
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip "finishLine" in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
gameMain.finishLine = this;
hitFct = function () {
for (var _local1 in gameMain.hitArray) {
gameMain.hitArray[_local1].hitAction = gameMain.hitArray[_local1].hitFct;
}
if (gameMain.tcount == 8) {
gameMain.tcount = 0;
gameMain.turn++;
if (gameMain.turn >= gameMain.turnTotal) {
main.stopGame(ssUserLogin);
}
}
hitAction = undefined;
};
if (gameMain.swapObj.getDepth() < gameMain.elementMap.getDepth()) {
gameMain.elementMap.swapDepths(gameMain.swapObj);
}
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
var _local1 = _parent;
if (((_local1.car._y > this._y) && ((gameMain.carAnim != "jumpFront") && (gameMain.carAnim != "jumpSide"))) && (_local1.car._x > _x)) {
if (_local1.car.speed > _local1.car.skidSpeed) {
gameMain.carAnim = ((random(2) > 0) ? "jumpFront" : "jumpSide");
gameMain.allCar.car.gotoAndStop(gameMain.carAnim);
gameMain.twins.animePts._x = _x + (_height / 2);
gameMain.twins.animePts._y = _y + (_width / 2);
gameMain.twins.animePts.box.pointField.text = "+" + main.pointJump;
gameMain.twins.animePts.gotoAndPlay(1);
gameMain.ptsCounter = gameMain.ptsCounter + main.pointJump;
gameMain.ptsCounter = ((gameMain.ptsCounter < 0) ? 0 : (gameMain.ptsCounter));
} else {
gameMain.allCar.car._yscale = (gameMain.allCar.car._xscale = 75);
}
}
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
var _local1 = _parent;
if (((_local1.car._y < this._y) && ((gameMain.carAnim != "jumpFront") && (gameMain.carAnim != "jumpSide"))) && (_local1.car._x < (_x + _width))) {
if (_local1.car.speed > _local1.car.skidSpeed) {
gameMain.carAnim = ((random(2) > 0) ? "jumpFront" : "jumpSide");
gameMain.twins.animePts._x = _x + (_width / 2);
gameMain.twins.animePts._y = _y + (_height / 2);
gameMain.twins.animePts.box.pointField.text = "+" + main.pointJump;
gameMain.twins.animePts.gotoAndPlay(1);
gameMain.ptsCounter = gameMain.ptsCounter + main.pointJump;
gameMain.allCar.car.gotoAndStop(gameMain.carAnim);
} else {
gameMain.allCar.car._yscale = (gameMain.allCar.car._xscale = 75);
}
}
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.upArray.push(this);
}
Instance of Symbol 973 MovieClip in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
for (var _local1 in gameMain.type1) {
gameMain.type1[_local1].tcol = true;
}
for (var _local1 in gameMain.type2) {
gameMain.type2[_local1].tcol = false;
}
for (var _local1 in gameMain.hitArray) {
gameMain.hitArray[_local1].hitAction = gameMain.hitArray[_local1].hitFct;
}
if (gameMain.swapObj.getDepth() < gameMain.elementMap.getDepth()) {
gameMain.elementMap.swapDepths(gameMain.swapObj);
}
if (gameMain.tcount == 1) {
gameMain.tcount++;
}
hitAction = undefined;
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
for (var _local1 in gameMain.type1) {
gameMain.type1[_local1].tcol = false;
}
for (var _local1 in gameMain.type2) {
gameMain.type2[_local1].tcol = true;
}
for (var _local1 in gameMain.hitArray) {
gameMain.hitArray[_local1].hitAction = gameMain.hitArray[_local1].hitFct;
}
if (gameMain.swapObj.getDepth() > gameMain.elementMap.getDepth()) {
gameMain.elementMap.swapDepths(gameMain.swapObj);
}
if (gameMain.tcount == 2) {
gameMain.tcount++;
}
hitAction = undefined;
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
for (var _local1 in gameMain.type1) {
gameMain.type1[_local1].tcol = true;
}
for (var _local1 in gameMain.type2) {
gameMain.type2[_local1].tcol = false;
}
for (var _local1 in gameMain.hitArray) {
gameMain.hitArray[_local1].hitAction = gameMain.hitArray[_local1].hitFct;
}
if (gameMain.swapObj.getDepth() < gameMain.elementMap.getDepth()) {
gameMain.elementMap.swapDepths(gameMain.swapObj);
}
if (gameMain.tcount == 4) {
gameMain.tcount++;
}
hitAction = undefined;
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
for (var _local1 in gameMain.type1) {
gameMain.type1[_local1].tcol = false;
}
for (var _local1 in gameMain.type2) {
gameMain.type2[_local1].tcol = true;
}
for (var _local1 in gameMain.hitArray) {
gameMain.hitArray[_local1].hitAction = gameMain.hitArray[_local1].hitFct;
}
if (gameMain.swapObj.getDepth() > gameMain.elementMap.getDepth()) {
gameMain.elementMap.swapDepths(gameMain.swapObj);
}
if (gameMain.tcount == 3) {
gameMain.tcount++;
}
hitAction = undefined;
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
for (var _local1 in gameMain.type1) {
gameMain.type1[_local1].tcol = true;
}
for (var _local1 in gameMain.type2) {
gameMain.type2[_local1].tcol = false;
}
for (var _local1 in gameMain.hitArray) {
gameMain.hitArray[_local1].hitAction = gameMain.hitArray[_local1].hitFct;
}
if (gameMain.swapObj.getDepth() < gameMain.elementMap.getDepth()) {
gameMain.elementMap.swapDepths(gameMain.swapObj);
}
if (gameMain.tcount == 5) {
gameMain.tcount++;
}
hitAction = undefined;
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
for (var _local1 in gameMain.type1) {
gameMain.type1[_local1].tcol = false;
}
for (var _local1 in gameMain.type2) {
gameMain.type2[_local1].tcol = true;
}
for (var _local1 in gameMain.hitArray) {
gameMain.hitArray[_local1].hitAction = gameMain.hitArray[_local1].hitFct;
}
if (gameMain.swapObj.getDepth() > gameMain.elementMap.getDepth()) {
gameMain.elementMap.swapDepths(gameMain.swapObj);
}
if (gameMain.tcount == 6) {
gameMain.tcount++;
}
hitAction = undefined;
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
for (var _local1 in gameMain.type1) {
gameMain.type1[_local1].tcol = false;
}
for (var _local1 in gameMain.type2) {
gameMain.type2[_local1].tcol = true;
}
for (var _local1 in gameMain.hitArray) {
gameMain.hitArray[_local1].hitAction = gameMain.hitArray[_local1].hitFct;
}
if (gameMain.swapObj.getDepth() > gameMain.elementMap.getDepth()) {
gameMain.elementMap.swapDepths(gameMain.swapObj);
}
if (gameMain.tcount == 7) {
gameMain.tcount++;
}
hitAction = undefined;
};
hitAction = hitFct;
}
Instance of Symbol 1744 MovieClip in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "gArray");
steerSmooth = 0.2;
gf = 0.3;
tline = 5;
cline = 12303322 /* 0xBBBBDA */;
aline = 100;
}
Instance of Symbol 1532 MovieClip in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
addIt = "type2";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
addIt = "type2";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
addIt = "type2";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
addIt = "type2";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
}
Instance of Symbol 1532 MovieClip in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
}
Instance of Symbol 1532 MovieClip in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
addIt = "type2";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
dommage = false;
}
Instance of Symbol 1535 MovieClip in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
lock = true;
}
Instance of Symbol 1535 MovieClip in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
lock = true;
}
Instance of Symbol 1535 MovieClip in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
lock = true;
}
Instance of Symbol 87 MovieClip [dot] "d6" in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d7" in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d10" in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d11" in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d12" in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d13" in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d16" in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d15" in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d18" in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d20" in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d21" in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d22" in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d23" in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d24" in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 1543 MovieClip "car" in Symbol 1745 MovieClip Frame 1
onClipEvent (load) {
minVolume = (newVolume = 10);
x = _x;
y = _y;
vx = (vy = 0);
tspeed = 0;
carGrid = eval (("main.car" + main.carNbr) + "Chart");
trust = ((carGrid.maxSpeed * carGrid.speed) / 560) + ((carGrid.maxSpeed * 80) / 100);
bTrust = 0.5;
decay = 0.9;
angle = 0;
tfriction = 0.16;
steer = 0;
steerInc = 1;
steerDec = 1;
steerMax = 10;
skidAngle = 5;
skidSpeed = 5;
gObj = this;
tline = 5;
cline = 6710886 /* 0x666666 */;
aline = 100;
steerSmooth = 0.1;
moveTo = false;
skid = false;
gf = 1;
m = 40;
ray = 20;
gameMain.carArray.push(this);
if (main.gameType == "multiPlayer") {
main.carInt = setInterval(main.updatePosition, main.updateTime);
}
main.minutTxt = "00";
main.secondTxt = "00";
main.centiSecondTxt = "00";
}
onClipEvent (enterFrame) {
if (main.keyActive) {
main.timerGame = getTimer() - main.offSet;
minut = Math.round((main.timerGame / 1000) / 60);
second = Math.round((main.timerGame / 1000) % 60);
centiSecond = Math.round((main.timerGame % 1000) / 10);
main.minutTxt = ((minut < 10) ? ("0" + minut) : (minut));
main.secondTxt = ((second < 10) ? ("0" + second) : (second));
main.centiSecondTxt = ((centiSecond < 10) ? ("0" + centiSecond) : (centiSecond));
keyLeft = Key.isDown(37);
keyRight = Key.isDown(39);
keyup = Key.isDown(38);
keydown = Key.isDown(40);
} else {
keyLeft = (keyRight = (keyup = (keydown = false)));
}
gHit = gObj;
var i = 0;
while (i < gameMain.hitObjList.gArray.length) {
hitG = gameMain.hitObjList.gArray[i].hitTest(((_x * _parent._xscale) / 100) + _parent._x, ((_y * _parent._yscale) / 100) + _parent._y, true);
if (hitG) {
gHit = gameMain.hitObjList.gArray[i];
break;
}
i++;
}
if (gameMain.twins.oil.hitZone.hitTest(gameMain.allCar)) {
gameMain.twins.oil.gotoAndPlay("hit");
gHit = gameMain.twins.oil;
}
if (keyup) {
dir = 1;
tspeed = tspeed + (dir * (trust * gHit.gf));
}
if (keydown) {
dir = -1;
tspeed = tspeed + (dir * (btrust * gHit.gf));
}
tspeed = Math.min(tspeed, main.ultimateSpeed);
hVolume = (tspeed * main.mainVolume) / 12;
gameMain.lowSpeed.s.setVolume(main.mainVolume - hVolume);
gameMain.highSpeed.s.setVolume(Math.min(hVolume, 80));
tspeed = tspeed * decay;
angDeg = angle * gameMain.radVal;
idealvx = tspeed * Math.cos(angDeg);
idealvy = tspeed * Math.sin(angDeg);
vx = vx + ((idealvx - vx) * tfriction);
vy = vy + ((idealvy - vy) * tfriction);
x = x + vx;
y = y + vy;
if (keyLeft || (keyRight)) {
steer = steer + ((keyRight - keyLeft) * steerInc);
} else {
steer = steer + (((steer < 0) - (steer > 0)) * steerDec);
}
if (steer < (-steerMax)) {
steer = -steerMax;
} else if (steer > steerMax) {
steer = steerMax;
}
speed = Math.sqrt((vx * vx) + (vy * vy));
angle = angle + ((steer * speed) * gHit.steerSmooth);
gameMain.allCar.wtl._rotation = (gameMain.allCar.wtr._rotation = (steer * 3) * dir);
gameMain.carShadow._rotation = (gameMain.allCar._rotation = angle + 90);
if (x < 138) {
_x = ((x = 143));
vx = 0;
vy = 0;
} else if (x > 1056) {
_x = ((x = 1052));
vx = 0;
vy = 0;
} else {
_x = x;
}
if (y < 102) {
_y = ((y = 110));
vx = 0;
vy = 0;
} else if (y > 1420) {
_y = ((y = 1414));
vx = 0;
vy = 0;
} else {
_y = y;
}
var i = 1;
while (i <= gameMain.hitZoneQty) {
if (hitZone.hitTest(eval ("gameMain.hitZone" + i))) {
gameMain.hitObjList = eval ("gameMain.zoneArray" + i);
}
i++;
}
upHit = false;
i = 0;
while (i < gameMain.upArray.length) {
if (gameMain.upArray[i].hitTest(this) && (gameMain.swapObj.getDepth() > gameMain.elementMap.getDepth())) {
upHit = true;
if (gameMain.allCar.car._xscale < 66) {
gameMain.allCar.car._xscale = (gameMain.allCar.car._yscale = gameMain.allCar.car._yscale + 2);
}
}
i++;
}
if ((!upHit) && (gameMain.allCar.car._xscale > 60)) {
gameMain.allCar.car._xscale = (gameMain.allCar.car._yscale = gameMain.allCar.car._yscale - 2);
}
i = 0;
while (i < gameMain.hitObjList.hitArray.length) {
if (gameMain.hitObjList.hitArray[i].hitTest(this)) {
gameMain.hitObjList.hitArray[i].hitAction();
}
i++;
}
bump = ((tspeed > 0) ? "bumpFront" : "bumpBack");
i = 0;
while (i < gameMain.hitObjList.obsArray.length) {
if (gameMain.checkObs(this, gameMain.hitObjList.obsArray[i])) {
if ((gameMain.carAnim != "jumpFront") && (gameMain.carAnim != "jumpSide")) {
gameMain.allCar.car.gotoAndStop(bump);
gameMain.bumpSnd.gotoAndPlay("bump");
}
}
i++;
}
var i = 0;
var i = 0;
while (i <= gameMain.hitObjList.borderArray.length) {
if (gameMain.checkBorder(this, gameMain.hitObjList.borderArray[i])) {
if (gameMain.hitObjList.borderArray[i].dommage == undefined) {
if ((gameMain.carAnim != "jumpFront") && (gameMain.carAnim != "jumpSide")) {
gameMain.allCar.car.gotoAndStop(bump);
gameMain.bumpSnd.gotoAndPlay("bump");
}
}
}
i++;
}
if (((Math.abs(Math.round(steer)) > skidAngle) && (speed > skidSpeed)) || (hitG)) {
gameMain.traceLine(_x, _y, gHit, moveTo);
if (keyRight || (keyLeft)) {
skid = true;
skidSide = (keyRight ? "skid1" : "skid2");
}
if ((gameMain.carAnim != "jumpFront") && (gameMain.carAnim != "jumpSide")) {
gameMain.skidSound.gotoAndStop("snd");
gameMain.allCar.car.gotoAndStop(skidSide);
}
moveTo = false;
} else {
moveTo = true;
if (skid) {
if ((gameMain.carAnim != "jumpFront") && (gameMain.carAnim != "jumpSide")) {
skid = false;
gameMain.skidSound.gotoAndStop("mute");
gameMain.allCar.car.gotoAndStop(skidSide + "b");
}
}
gameMain.lineL.clear();
gameMain.lineR.clear();
}
gameMain.twins._x = (gameMain.elementMap._x = (gameMain.map._x = Math.round((-_x) + gameMain.allCar._x)));
gameMain.twins._y = (gameMain.elementMap._y = (gameMain.map._y = Math.round((-_y) + gameMain.allCar._y)));
if (gameMain.twins.energyBoost.hitZone.hitTest(gameMain.allCar)) {
gameMain.twins.energyBoost.gotoAndPlay("hit");
}
if (gameMain.twins.speedBoost.hitZone.hitTest(gameMain.allCar)) {
gameMain.twins.speedBoost.gotoAndPlay("hit");
}
var i = 0;
while (i < gameMain.mapArray.length) {
gameMain.mapArray[i]._visible = gameMain.mapArray[i].hitTest(gameMain.frame);
i++;
}
for (var i in gameMain.twins) {
gameMain.twins[i]._visible = gameMain.twins[i].hitTest(gameMain.frame) && (gameMain.twins[i].actif != false);
}
}
Symbol 1905 MovieClip Frame 1
stop();
Instance of Symbol 1900 MovieClip "allCarF" in Symbol 1905 MovieClip Frame 2
onClipEvent (load) {
_visible = _parent.carFVisibility;
if (_visible) {
gotoAndStop(Number(main.carNbr));
}
}
Instance of Symbol 1900 MovieClip "allCarB" in Symbol 1905 MovieClip Frame 2
onClipEvent (load) {
_visible = _parent.carBVisibility;
if (_visible) {
gotoAndStop(Number(main.carNbr));
}
}
Symbol 1905 MovieClip Frame 30
endHitAction();
Symbol 1906 MovieClip Frame 1
function traceLineL(obj, moveTo) {
var _local1 = obj;
lineL.lineStyle(gameMain.tline, gameMain.cline, gameMain.aline);
if (moveTo) {
lineL.moveTo((_local1.x * 100) / gameMain.piste._xscale, (_local1.y * 100) / gameMain.piste._yscale);
}
lineL.lineTo((_local1.x * 100) / gameMain.piste._xscale, (_local1.y * 100) / gameMain.piste._yscale);
lineL = createEmptyMovieClip("line" + gameMain.cl, 100 + (gameMain.cl++));
lineL.moveTo((_local1.x * 100) / gameMain.piste._xscale, (_local1.y * 100) / gameMain.piste._yscale);
lineL.intervalID = setInterval(gameMain.fadeLine, gameMain.sfade, gameMain.lineL);
gameMain.cl = gameMain.cl % gameMain.mline;
}
Instance of Symbol 1905 MovieClip in Symbol 1906 MovieClip Frame 1
onClipEvent (load) {
diffAng = 10;
point = new Object();
point2 = new Object();
point.x = hitZone1._x;
point2.x = hitZone2._x + hitZone2._width;
point.y = hitZone1._y + (hitZone1._width / 2);
point2.y = hitZone2._y + (hitZone2._width / 2);
localToGlobal(point);
localToGlobal(point2);
_parent.globalToLocal(point);
_parent.globalToLocal(point2);
endX1 = point2.x;
endY1 = point2.y;
endX2 = point.x;
endY2 = point.y;
hitAction = function () {
if (gameMain.piste.car.speed > gameMain.piste.car.skidSpeed) {
if (gameMain.allCar.hitZone.hitTest(hitZone1) && ((gameMain.allCar._rotation > (90 - diffAng)) && (gameMain.allCar._rotation < (90 + diffAng)))) {
carFVisibility = true;
carBVisibility = false;
endRotation = 90;
diffX = (endX1 - gameMain.piste.car.x) / _totalframes;
diffY = (endY1 - gameMain.piste.car.y) / _totalframes;
} else if (gameMain.allCar.hitZone.hitTest(hitZone2) && ((gameMain.allCar._rotation < (-(90 - diffAng))) && (gameMain.allCar._rotation > (-(90 + diffAng))))) {
carFVisibility = false;
carBVisibility = true;
endRotation = -90;
diffX = (endX2 - gameMain.piste.car.x) / _totalframes;
diffY = (endY2 - gameMain.piste.car.y) / _totalframes;
}
if (carFVisibility != undefined) {
gameMain.twins.animePts._x = _x;
gameMain.twins.animePts._y = _y;
gameMain.twins.animePts.box.pointField.text = "+" + main.pointLoop;
gameMain.twins.animePts.gotoAndPlay(1);
gameMain.ptsCounter = gameMain.ptsCounter + main.pointLoop;
main.keyActive = false;
tspeed = gameMain.piste.car.tspeed;
angDeg = gameMain.piste.car.angDeg;
idealvx = gameMain.piste.car.idealvx;
idealvy = gameMain.piste.car.idealvy;
vx = gameMain.piste.car.vx;
vy = gameMain.piste.car.vy;
gameMain.piste.car.vx = 0;
gameMain.piste.car.vy = 0;
steer = gameMain.piste.car.steer;
gameMain.allCar._visible = false;
gameMain.carShadow._visible = false;
play();
}
}
};
transitionCar = function () {
gameMain.piste.car.x = gameMain.piste.car.x + diffX;
gameMain.piste.car.y = gameMain.piste.car.y + diffY;
gameMain.piste.car._x = gameMain.piste.car.x;
gameMain.piste.car._y = gameMain.piste.car.y;
};
endHitAction = function () {
gameMain.piste.car.tspeed = tspeed;
gameMain.piste.car.angDeg = angDeg;
gameMain.piste.car.idealvx = idealvx;
gameMain.piste.car.idealvy = idealvy;
gameMain.carShadow._rotation = (gameMain.allCar._rotation = endRotation);
gameMain.allCar.wtl._rotation = (gameMain.allCar.wtr._rotation = 0);
if (carFVisibility) {
gameMain.piste.car._x = endX1;
gameMain.piste.car._y = endY1;
} else {
gameMain.piste.car._x = endX2;
gameMain.piste.car._y = endY2;
}
gameMain.piste.car.vx = vx;
gameMain.piste.car.vy = vy;
gameMain.piste.car.steer = steer;
gameMain.allCar._visible = true;
gameMain.carShadow._visible = true;
carFVisibility = undefined;
carBVisibility = undefined;
main.keyActive = true;
};
}
onClipEvent (enterFrame) {
if (_visible) {
if (main.keyActive) {
hitAction();
} else if (carFVisibility != undefined) {
transitionCar();
}
}
}
Instance of Symbol 1905 MovieClip in Symbol 1906 MovieClip Frame 1
onClipEvent (load) {
diffAng = 10;
point = new Object();
point2 = new Object();
point.x = hitZone1._x;
point2.x = hitZone2._x + hitZone2._width;
point.y = hitZone1._y + (hitZone1._width / 2);
point2.y = hitZone2._y + (hitZone2._width / 2);
localToGlobal(point);
localToGlobal(point2);
_parent.globalToLocal(point);
_parent.globalToLocal(point2);
endX1 = point2.x;
endY1 = point2.y;
endX2 = point.x;
endY2 = point.y;
hitAction = function () {
if (gameMain.piste.car.speed > gameMain.piste.car.skidSpeed) {
if (gameMain.allCar.hitZone.hitTest(hitZone1) && ((gameMain.allCar._rotation < (-(90 - diffAng))) && (gameMain.allCar._rotation > (-(90 + diffAng))))) {
carFVisibility = true;
carBVisibility = false;
endRotation = -90;
diffX = (endX1 - gameMain.piste.car.x) / _totalframes;
diffY = (endY1 - gameMain.piste.car.y) / _totalframes;
} else if (gameMain.allCar.hitZone.hitTest(hitZone2) && ((gameMain.allCar._rotation > (90 - diffAng)) && (gameMain.allCar._rotation < (90 + diffAng)))) {
carFVisibility = false;
carBVisibility = true;
endRotation = 90;
diffX = (endX2 - gameMain.piste.car.x) / _totalframes;
diffY = (endY2 - gameMain.piste.car.y) / _totalframes;
}
if (carFVisibility != undefined) {
gameMain.twins.animePts._x = _x;
gameMain.twins.animePts._y = _y;
gameMain.twins.animePts.box.pointField.text = "+" + main.pointLoop;
gameMain.twins.animePts.gotoAndPlay(1);
gameMain.ptsCounter = gameMain.ptsCounter + main.pointLoop;
main.keyActive = false;
tspeed = gameMain.piste.car.tspeed;
angDeg = gameMain.piste.car.angDeg;
idealvx = gameMain.piste.car.idealvx;
idealvy = gameMain.piste.car.idealvy;
vx = gameMain.piste.car.vx;
vy = gameMain.piste.car.vy;
gameMain.piste.car.vx = 0;
gameMain.piste.car.vy = 0;
steer = gameMain.piste.car.steer;
gameMain.allCar._visible = false;
gameMain.carShadow._visible = false;
play();
}
}
};
transitionCar = function () {
gameMain.piste.car.x = gameMain.piste.car.x + diffX;
gameMain.piste.car.y = gameMain.piste.car.y + diffY;
gameMain.piste.car._x = gameMain.piste.car.x;
gameMain.piste.car._y = gameMain.piste.car.y;
};
endHitAction = function () {
gameMain.piste.car.tspeed = tspeed;
gameMain.piste.car.angDeg = angDeg;
gameMain.piste.car.idealvx = idealvx;
gameMain.piste.car.idealvy = idealvy;
gameMain.carShadow._rotation = (gameMain.allCar._rotation = endRotation);
gameMain.allCar.wtl._rotation = (gameMain.allCar.wtr._rotation = 0);
if (carFVisibility) {
gameMain.piste.car._x = endX1;
gameMain.piste.car._y = endY1;
} else {
gameMain.piste.car._x = endX2;
gameMain.piste.car._y = endY2;
}
gameMain.piste.car.vx = vx;
gameMain.piste.car.vy = vy;
gameMain.piste.car.steer = steer;
gameMain.allCar._visible = true;
gameMain.carShadow._visible = true;
carFVisibility = undefined;
carBVisibility = undefined;
main.keyActive = true;
};
}
onClipEvent (enterFrame) {
if (_visible) {
if (main.keyActive) {
hitAction();
} else if (carFVisibility != undefined) {
transitionCar();
}
}
}
Instance of Symbol 973 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
for (var _local1 in gameMain.hitArray) {
gameMain.hitArray[_local1].hitAction = gameMain.hitArray[_local1].hitFct;
}
if (gameMain.swapObj.getDepth() < gameMain.elementMap.getDepth()) {
gameMain.elementMap.swapDepths(gameMain.swapObj);
}
if (gameMain.tcount == 2) {
gameMain.tcount++;
}
hitAction = undefined;
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
for (var _local1 in gameMain.hitArray) {
gameMain.hitArray[_local1].hitAction = gameMain.hitArray[_local1].hitFct;
}
if (gameMain.swapObj.getDepth() > gameMain.elementMap.getDepth()) {
gameMain.elementMap.swapDepths(gameMain.swapObj);
}
if (gameMain.tcount == 0) {
gameMain.tcount++;
}
hitAction = undefined;
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
for (var _local1 in gameMain.hitArray) {
gameMain.hitArray[_local1].hitAction = gameMain.hitArray[_local1].hitFct;
}
if (gameMain.swapObj.getDepth() < gameMain.elementMap.getDepth()) {
gameMain.elementMap.swapDepths(gameMain.swapObj);
}
if (gameMain.tcount == 1) {
gameMain.tcount++;
}
hitAction = undefined;
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip "finishLine" in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
gameMain.finishLine = this;
hitFct = function () {
for (var _local1 in gameMain.hitArray) {
gameMain.hitArray[_local1].hitAction = gameMain.hitArray[_local1].hitFct;
}
if (gameMain.tcount == 3) {
gameMain.tcount = 0;
gameMain.turn++;
if (gameMain.turn >= gameMain.turnTotal) {
main.stopGame(ssUserLogin);
}
}
hitAction = undefined;
};
if (gameMain.swapObj.getDepth() < gameMain.elementMap.getDepth()) {
gameMain.elementMap.swapDepths(gameMain.swapObj);
}
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
var _local1 = _parent;
if (((_local1.car._y > this._y) && ((gameMain.carAnim != "jumpFront") && (gameMain.carAnim != "jumpSide"))) && (_local1.car._x < (_x + _width))) {
if (_local1.car.speed > _local1.car.skidSpeed) {
gameMain.carAnim = ((random(2) > 0) ? "jumpFront" : "jumpSide");
gameMain.allCar.car.gotoAndStop(gameMain.carAnim);
gameMain.twins.animePts._x = _x + (_height / 2);
gameMain.twins.animePts._y = _y + (_width / 2);
gameMain.twins.animePts.box.pointField.text = "+" + main.pointJump;
gameMain.twins.animePts.gotoAndPlay(1);
gameMain.ptsCounter = gameMain.ptsCounter + main.pointJump;
gameMain.ptsCounter = ((gameMain.ptsCounter < 0) ? 0 : (gameMain.ptsCounter));
} else {
gameMain.allCar.car._yscale = (gameMain.allCar.car._xscale = 75);
}
}
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
var _local1 = _parent;
if (((_local1.car._y < this._y) && ((gameMain.carAnim != "jumpFront") && (gameMain.carAnim != "jumpSide"))) && (_local1.car._x > _x)) {
if (_local1.car.speed > _local1.car.skidSpeed) {
gameMain.carAnim = ((random(2) > 0) ? "jumpFront" : "jumpSide");
gameMain.twins.animePts._x = _x + (_width / 2);
gameMain.twins.animePts._y = _y + (_height / 2);
gameMain.twins.animePts.box.pointField.text = "+" + main.pointJump;
gameMain.twins.animePts.gotoAndPlay(1);
gameMain.ptsCounter = gameMain.ptsCounter + main.pointJump;
gameMain.allCar.car.gotoAndStop(gameMain.carAnim);
} else {
gameMain.allCar.car._yscale = (gameMain.allCar.car._xscale = 75);
}
}
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.upArray.push(this);
}
Instance of Symbol 973 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.upArray.push(this);
}
Instance of Symbol 973 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.upArray.push(this);
}
Instance of Symbol 973 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.upArray.push(this);
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1535 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
lock = true;
}
Instance of Symbol 1535 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
lock = true;
}
Instance of Symbol 1535 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
lock = true;
}
Instance of Symbol 1535 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
lock = true;
}
Instance of Symbol 1535 MovieClip in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
lock = true;
}
Instance of Symbol 87 MovieClip [dot] "d2" in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d3" in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d6" in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d7" in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d8" in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d9" in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d12" in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d11" in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d13" in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d16" in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d17" in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d18" in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d19" in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d20" in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 1543 MovieClip "car" in Symbol 1908 MovieClip Frame 1
onClipEvent (load) {
minVolume = (newVolume = 10);
x = _x;
y = _y;
vx = (vy = 0);
tspeed = 0;
carGrid = eval (("main.car" + main.carNbr) + "Chart");
trust = ((carGrid.maxSpeed * carGrid.speed) / 560) + ((carGrid.maxSpeed * 80) / 100);
bTrust = 0.5;
decay = 0.9;
angle = 180;
tfriction = 0.16;
steer = 0;
steerInc = 1;
steerDec = 1;
steerMax = 10;
skidAngle = 5;
skidSpeed = 5;
gObj = this;
tline = 5;
cline = 6710886 /* 0x666666 */;
aline = 100;
steerSmooth = 0.1;
moveTo = false;
skid = false;
gf = 1;
m = 40;
ray = 20;
gameMain.carArray.push(this);
if (main.gameType == "multiPlayer") {
main.carInt = setInterval(main.updatePosition, main.updateTime);
}
main.minutTxt = "00";
main.secondTxt = "00";
main.centiSecondTxt = "00";
}
onClipEvent (enterFrame) {
if (main.keyActive) {
main.timerGame = getTimer() - main.offSet;
minut = Math.round((main.timerGame / 1000) / 60);
second = Math.round((main.timerGame / 1000) % 60);
centiSecond = Math.round((main.timerGame % 1000) / 10);
main.minutTxt = ((minut < 10) ? ("0" + minut) : (minut));
main.secondTxt = ((second < 10) ? ("0" + second) : (second));
main.centiSecondTxt = ((centiSecond < 10) ? ("0" + centiSecond) : (centiSecond));
keyLeft = Key.isDown(37);
keyRight = Key.isDown(39);
keyup = Key.isDown(38);
keydown = Key.isDown(40);
} else {
keyLeft = (keyRight = (keyup = (keydown = false)));
}
gHit = gObj;
var i = 0;
while (i < gameMain.hitObjList.gArray.length) {
hitG = gameMain.hitObjList.gArray[i].hitTest(((_x * _parent._xscale) / 100) + _parent._x, ((_y * _parent._yscale) / 100) + _parent._y, true);
if (hitG) {
gHit = gameMain.hitObjList.gArray[i];
break;
}
i++;
}
if (gameMain.twins.oil.hitZone.hitTest(gameMain.allCar)) {
gameMain.twins.oil.gotoAndPlay("hit");
gHit = gameMain.twins.oil;
}
if (keyup) {
dir = 1;
tspeed = tspeed + (dir * (trust * gHit.gf));
}
if (keydown) {
dir = -1;
tspeed = tspeed + (dir * (btrust * gHit.gf));
}
tspeed = Math.min(tspeed, main.ultimateSpeed);
hVolume = (tspeed * main.mainVolume) / 12;
gameMain.lowSpeed.s.setVolume(main.mainVolume - hVolume);
gameMain.highSpeed.s.setVolume(Math.min(hVolume, 80));
tspeed = tspeed * decay;
angDeg = angle * gameMain.radVal;
idealvx = tspeed * Math.cos(angDeg);
idealvy = tspeed * Math.sin(angDeg);
vx = vx + ((idealvx - vx) * tfriction);
vy = vy + ((idealvy - vy) * tfriction);
x = x + vx;
y = y + vy;
if (keyLeft || (keyRight)) {
steer = steer + ((keyRight - keyLeft) * steerInc);
} else {
steer = steer + (((steer < 0) - (steer > 0)) * steerDec);
}
if (steer < (-steerMax)) {
steer = -steerMax;
} else if (steer > steerMax) {
steer = steerMax;
}
speed = Math.sqrt((vx * vx) + (vy * vy));
angle = angle + ((steer * speed) * gHit.steerSmooth);
gameMain.allCar.wtl._rotation = (gameMain.allCar.wtr._rotation = (steer * 3) * dir);
gameMain.carShadow._rotation = (gameMain.allCar._rotation = angle + 90);
if (x < 160) {
_x = ((x = 170));
vx = 0;
vy = 0;
} else if (x > 1844) {
_x = ((x = 1834));
vx = 0;
vy = 0;
} else {
_x = x;
}
if (y < 125) {
_y = ((y = 129));
vx = 0;
vy = 0;
} else if (y > 1390) {
_y = ((y = 1380));
vx = 0;
vy = 0;
} else {
_y = y;
}
var i = 1;
while (i <= gameMain.hitZoneQty) {
if (hitZone.hitTest(eval ("gameMain.hitZone" + i))) {
gameMain.hitObjList = eval ("gameMain.zoneArray" + i);
}
i++;
}
upHit = false;
i = 0;
while (i < gameMain.upArray.length) {
if (gameMain.upArray[i].hitTest(this)) {
upHit = true;
if (gameMain.allCar.car._xscale < 66) {
gameMain.allCar.car._xscale = (gameMain.allCar.car._yscale = gameMain.allCar.car._yscale + 2);
}
}
i++;
}
if ((!upHit) && (gameMain.allCar.car._xscale > 60)) {
gameMain.allCar.car._xscale = (gameMain.allCar.car._yscale = gameMain.allCar.car._yscale - 2);
}
i = 0;
while (i < gameMain.hitObjList.hitArray.length) {
if (gameMain.hitObjList.hitArray[i].hitTest(this)) {
gameMain.hitObjList.hitArray[i].hitAction();
}
i++;
}
bump = ((tspeed > 0) ? "bumpFront" : "bumpBack");
i = 0;
while (i < gameMain.hitObjList.obsArray.length) {
if (gameMain.checkObs(this, gameMain.hitObjList.obsArray[i])) {
if ((gameMain.carAnim != "jumpFront") && (gameMain.carAnim != "jumpSide")) {
gameMain.allCar.car.gotoAndStop(bump);
gameMain.bumpSnd.gotoAndPlay("bump");
}
}
i++;
}
var i = 0;
var i = 0;
while (i <= gameMain.hitObjList.borderArray.length) {
if (gameMain.checkBorder(this, gameMain.hitObjList.borderArray[i])) {
if (gameMain.hitObjList.borderArray[i].dommage == undefined) {
if ((gameMain.carAnim != "jumpFront") && (gameMain.carAnim != "jumpSide")) {
gameMain.allCar.car.gotoAndStop(bump);
gameMain.bumpSnd.gotoAndPlay("bump");
}
}
}
i++;
}
if (((Math.abs(Math.round(steer)) > skidAngle) && (speed > skidSpeed)) || (hitG)) {
gameMain.traceLine(_x, _y, gHit, moveTo);
if (keyRight || (keyLeft)) {
skid = true;
skidSide = (keyRight ? "skid1" : "skid2");
}
if ((gameMain.carAnim != "jumpFront") && (gameMain.carAnim != "jumpSide")) {
gameMain.skidSound.gotoAndStop("snd");
gameMain.allCar.car.gotoAndStop(skidSide);
}
moveTo = false;
} else {
moveTo = true;
if (skid) {
if ((gameMain.carAnim != "jumpFront") && (gameMain.carAnim != "jumpSide")) {
skid = false;
gameMain.skidSound.gotoAndStop("mute");
gameMain.allCar.car.gotoAndStop(skidSide + "b");
}
}
gameMain.lineL.clear();
gameMain.lineR.clear();
}
gameMain.twins._x = (gameMain.elementMap._x = (gameMain.map._x = Math.round((-_x) + gameMain.allCar._x)));
gameMain.twins._y = (gameMain.elementMap._y = (gameMain.map._y = Math.round((-_y) + gameMain.allCar._y)));
if (gameMain.twins.energyBoost.hitZone.hitTest(gameMain.allCar)) {
gameMain.twins.energyBoost.gotoAndPlay("hit");
}
if (gameMain.twins.speedBoost.hitZone.hitTest(gameMain.allCar)) {
gameMain.twins.speedBoost.gotoAndPlay("hit");
}
var i = 0;
while (i < gameMain.mapArray.length) {
gameMain.mapArray[i]._visible = gameMain.mapArray[i].hitTest(gameMain.frame);
i++;
}
for (var i in gameMain.twins) {
gameMain.twins[i]._visible = gameMain.twins[i].hitTest(gameMain.frame) && (gameMain.twins[i].actif != false);
}
}
Symbol 1940 MovieClip Frame 1
gameMain.piste.dummy2.twin = this;
stop();
Symbol 1941 MovieClip Frame 1
function traceLineL(obj, moveTo) {
var _local1 = obj;
lineL.lineStyle(gameMain.tline, gameMain.cline, gameMain.aline);
if (moveTo) {
lineL.moveTo((_local1.x * 100) / gameMain.piste._xscale, (_local1.y * 100) / gameMain.piste._yscale);
}
lineL.lineTo((_local1.x * 100) / gameMain.piste._xscale, (_local1.y * 100) / gameMain.piste._yscale);
lineL = createEmptyMovieClip("line" + gameMain.cl, 100 + (gameMain.cl++));
lineL.moveTo((_local1.x * 100) / gameMain.piste._xscale, (_local1.y * 100) / gameMain.piste._yscale);
lineL.intervalID = setInterval(gameMain.fadeLine, gameMain.sfade, gameMain.lineL);
gameMain.cl = gameMain.cl % gameMain.mline;
}
Instance of Symbol 1905 MovieClip in Symbol 1941 MovieClip Frame 1
onClipEvent (load) {
diffAng = 10;
point = new Object();
point2 = new Object();
point.x = hitZone1._x;
point2.x = hitZone2._x + hitZone2._width;
point.y = hitZone1._y + (hitZone1._width / 2);
point2.y = hitZone2._y + (hitZone2._width / 2);
localToGlobal(point);
localToGlobal(point2);
_parent.globalToLocal(point);
_parent.globalToLocal(point2);
endX1 = point2.x;
endY1 = point2.y;
endX2 = point.x;
endY2 = point.y;
hitAction = function () {
if (gameMain.piste.car.speed > gameMain.piste.car.skidSpeed) {
if (gameMain.allCar.hitZone.hitTest(hitZone1) && ((gameMain.allCar._rotation > (-diffAng)) && (gameMain.allCar._rotation < diffAng))) {
carFVisibility = true;
carBVisibility = false;
endRotation = 0;
diffX = (endX1 - gameMain.piste.car.x) / _totalframes;
diffY = (endY1 - gameMain.piste.car.y) / _totalframes;
} else if (gameMain.allCar.hitZone.hitTest(hitZone2) && ((gameMain.allCar._rotation < (-(180 - diffAng))) && (gameMain.allCar._rotation > (180 - diffAng)))) {
carFVisibility = false;
carBVisibility = true;
endRotation = 180;
diffX = (endX2 - gameMain.piste.car.x) / _totalframes;
diffY = (endY2 - gameMain.piste.car.y) / _totalframes;
}
if (carFVisibility != undefined) {
gameMain.twins.animePts._x = _x;
gameMain.twins.animePts._y = _y;
gameMain.twins.animePts.box.pointField.text = "+" + main.pointLoop;
gameMain.twins.animePts.gotoAndPlay(1);
gameMain.ptsCounter = gameMain.ptsCounter + main.pointLoop;
main.keyActive = false;
tspeed = gameMain.piste.car.tspeed;
angDeg = gameMain.piste.car.angDeg;
idealvx = gameMain.piste.car.idealvx;
idealvy = gameMain.piste.car.idealvy;
vx = gameMain.piste.car.vx;
vy = gameMain.piste.car.vy;
gameMain.piste.car.vx = 0;
gameMain.piste.car.vy = 0;
steer = gameMain.piste.car.steer;
gameMain.allCar._visible = false;
gameMain.carShadow._visible = false;
play();
}
}
};
transitionCar = function () {
gameMain.piste.car.x = gameMain.piste.car.x + diffX;
gameMain.piste.car.y = gameMain.piste.car.y + diffY;
gameMain.piste.car._x = gameMain.piste.car.x;
gameMain.piste.car._y = gameMain.piste.car.y;
};
endHitAction = function () {
gameMain.piste.car.tspeed = tspeed;
gameMain.piste.car.angDeg = angDeg;
gameMain.carShadow._rotation = (gameMain.allCar._rotation = endRotation);
gameMain.allCar.wtl._rotation = (gameMain.allCar.wtr._rotation = 0);
gameMain.piste.car.idealvx = idealvx;
gameMain.piste.car.idealvy = idealvy;
if (carFVisibility) {
gameMain.piste.car._x = endX1;
gameMain.piste.car._y = endY1;
} else {
gameMain.piste.car._x = endX2;
gameMain.piste.car._y = endY2;
}
gameMain.piste.car.vx = vx;
gameMain.piste.car.vy = vy;
gameMain.piste.car.steer = steer;
gameMain.allCar._visible = true;
gameMain.carShadow._visible = true;
carFVisibility = undefined;
carBVisibility = undefined;
main.keyActive = true;
};
}
onClipEvent (enterFrame) {
if (_visible) {
if (main.keyActive) {
hitAction();
} else if (carFVisibility != undefined) {
transitionCar();
}
}
}
Instance of Symbol 1905 MovieClip in Symbol 1941 MovieClip Frame 1
onClipEvent (load) {
diffAng = 10;
point = new Object();
point2 = new Object();
point.x = hitZone1._x;
point2.x = hitZone2._x + hitZone2._width;
point.y = hitZone1._y + (hitZone1._width / 2);
point2.y = hitZone2._y + (hitZone2._width / 2);
localToGlobal(point);
localToGlobal(point2);
_parent.globalToLocal(point);
_parent.globalToLocal(point2);
endX1 = point2.x;
endY1 = point2.y;
endX2 = point.x;
endY2 = point.y;
hitAction = function () {
if (gameMain.piste.car.speed > gameMain.piste.car.skidSpeed) {
if (gameMain.allCar.hitZone.hitTest(hitZone1) && ((gameMain.allCar._rotation > (-diffAng)) && (gameMain.allCar._rotation < diffAng))) {
carFVisibility = true;
carBVisibility = false;
endRotation = 0;
diffX = (endX1 - gameMain.piste.car.x) / _totalframes;
diffY = (endY1 - gameMain.piste.car.y) / _totalframes;
} else if (gameMain.allCar.hitZone.hitTest(hitZone2) && ((gameMain.allCar._rotation < (-(180 - diffAng))) && (gameMain.allCar._rotation > (180 - diffAng)))) {
carFVisibility = false;
carBVisibility = true;
endRotation = 180;
diffX = (endX2 - gameMain.piste.car.x) / _totalframes;
diffY = (endY2 - gameMain.piste.car.y) / _totalframes;
}
if (carFVisibility != undefined) {
gameMain.twins.animePts._x = _x;
gameMain.twins.animePts._y = _y;
gameMain.twins.animePts.box.pointField.text = "+" + main.pointLoop;
gameMain.twins.animePts.gotoAndPlay(1);
gameMain.ptsCounter = gameMain.ptsCounter + main.pointLoop;
main.keyActive = false;
tspeed = gameMain.piste.car.tspeed;
angDeg = gameMain.piste.car.angDeg;
idealvx = gameMain.piste.car.idealvx;
idealvy = gameMain.piste.car.idealvy;
vx = gameMain.piste.car.vx;
vy = gameMain.piste.car.vy;
gameMain.piste.car.vx = 0;
gameMain.piste.car.vy = 0;
steer = gameMain.piste.car.steer;
gameMain.allCar._visible = false;
gameMain.carShadow._visible = false;
play();
}
}
};
transitionCar = function () {
gameMain.piste.car.x = gameMain.piste.car.x + diffX;
gameMain.piste.car.y = gameMain.piste.car.y + diffY;
gameMain.piste.car._x = gameMain.piste.car.x;
gameMain.piste.car._y = gameMain.piste.car.y;
};
endHitAction = function () {
gameMain.piste.car.tspeed = tspeed;
gameMain.piste.car.angDeg = angDeg;
gameMain.carShadow._rotation = (gameMain.allCar._rotation = endRotation);
gameMain.allCar.wtl._rotation = (gameMain.allCar.wtr._rotation = 0);
gameMain.piste.car.idealvx = idealvx;
gameMain.piste.car.idealvy = idealvy;
if (carFVisibility) {
gameMain.piste.car._x = endX1;
gameMain.piste.car._y = endY1;
} else {
gameMain.piste.car._x = endX2;
gameMain.piste.car._y = endY2;
}
gameMain.piste.car.vx = vx;
gameMain.piste.car.vy = vy;
gameMain.piste.car.steer = steer;
gameMain.allCar._visible = true;
gameMain.carShadow._visible = true;
carFVisibility = undefined;
carBVisibility = undefined;
main.keyActive = true;
};
}
onClipEvent (enterFrame) {
if (_visible) {
if (main.keyActive) {
hitAction();
} else if (carFVisibility != undefined) {
transitionCar();
}
}
}
Instance of Symbol 1905 MovieClip in Symbol 1941 MovieClip Frame 1
onClipEvent (load) {
diffAng = 10;
point = new Object();
point2 = new Object();
point.x = hitZone1._x;
point2.x = hitZone2._x + hitZone2._width;
point.y = hitZone1._y + (hitZone1._width / 2);
point2.y = hitZone2._y + (hitZone2._width / 2);
localToGlobal(point);
localToGlobal(point2);
_parent.globalToLocal(point);
_parent.globalToLocal(point2);
endX1 = point2.x;
endY1 = point2.y;
endX2 = point.x;
endY2 = point.y;
hitAction = function () {
if (gameMain.piste.car.speed > gameMain.piste.car.skidSpeed) {
if (gameMain.allCar.hitZone.hitTest(hitZone1) && ((gameMain.allCar._rotation > (90 - diffAng)) && (gameMain.allCar._rotation < (90 + diffAng)))) {
carFVisibility = true;
carBVisibility = false;
endRotation = 90;
diffX = (endX1 - gameMain.piste.car.x) / _totalframes;
diffY = (endY1 - gameMain.piste.car.y) / _totalframes;
} else if (gameMain.allCar.hitZone.hitTest(hitZone2) && ((gameMain.allCar._rotation < (-(90 - diffAng))) && (gameMain.allCar._rotation > (-(90 + diffAng))))) {
carFVisibility = false;
carBVisibility = true;
endRotation = -90;
diffX = (endX2 - gameMain.piste.car.x) / _totalframes;
diffY = (endY2 - gameMain.piste.car.y) / _totalframes;
}
if (carFVisibility != undefined) {
gameMain.twins.animePts._x = _x;
gameMain.twins.animePts._y = _y;
gameMain.twins.animePts.box.pointField.text = "+" + main.pointLoop;
gameMain.twins.animePts.gotoAndPlay(1);
gameMain.ptsCounter = gameMain.ptsCounter + main.pointLoop;
main.keyActive = false;
tspeed = gameMain.piste.car.tspeed;
angDeg = gameMain.piste.car.angDeg;
idealvx = gameMain.piste.car.idealvx;
idealvy = gameMain.piste.car.idealvy;
vx = gameMain.piste.car.vx;
vy = gameMain.piste.car.vy;
gameMain.piste.car.vx = 0;
gameMain.piste.car.vy = 0;
steer = gameMain.piste.car.steer;
gameMain.allCar._visible = false;
gameMain.carShadow._visible = false;
play();
}
}
};
transitionCar = function () {
gameMain.piste.car.x = gameMain.piste.car.x + diffX;
gameMain.piste.car.y = gameMain.piste.car.y + diffY;
gameMain.piste.car._x = gameMain.piste.car.x;
gameMain.piste.car._y = gameMain.piste.car.y;
};
endHitAction = function () {
gameMain.piste.car.tspeed = tspeed;
gameMain.piste.car.angDeg = angDeg;
gameMain.piste.car.idealvx = idealvx;
gameMain.piste.car.idealvy = idealvy;
gameMain.carShadow._rotation = (gameMain.allCar._rotation = endRotation);
gameMain.allCar.wtl._rotation = (gameMain.allCar.wtr._rotation = 0);
if (carFVisibility) {
gameMain.piste.car._x = endX1;
gameMain.piste.car._y = endY1;
} else {
gameMain.piste.car._x = endX2;
gameMain.piste.car._y = endY2;
}
gameMain.piste.car.vx = vx;
gameMain.piste.car.vy = vy;
gameMain.piste.car.steer = steer;
gameMain.allCar._visible = true;
gameMain.carShadow._visible = true;
carFVisibility = undefined;
carBVisibility = undefined;
main.keyActive = true;
};
}
onClipEvent (enterFrame) {
if (_visible) {
if (main.keyActive) {
hitAction();
} else if (carFVisibility != undefined) {
transitionCar();
}
}
}
Instance of Symbol 1905 MovieClip in Symbol 1941 MovieClip Frame 1
onClipEvent (load) {
diffAng = 10;
point = new Object();
point2 = new Object();
point.x = hitZone1._x;
point2.x = hitZone2._x + hitZone2._width;
point.y = hitZone1._y + (hitZone1._width / 2);
point2.y = hitZone2._y + (hitZone2._width / 2);
localToGlobal(point);
localToGlobal(point2);
_parent.globalToLocal(point);
_parent.globalToLocal(point2);
endX1 = point2.x;
endY1 = point2.y;
endX2 = point.x;
endY2 = point.y;
hitAction = function () {
if (gameMain.piste.car.speed > gameMain.piste.car.skidSpeed) {
if (gameMain.allCar.hitZone.hitTest(hitZone1) && ((gameMain.allCar._rotation < (-(90 - diffAng))) && (gameMain.allCar._rotation > (-(90 + diffAng))))) {
carFVisibility = true;
carBVisibility = false;
endRotation = -90;
diffX = (endX1 - gameMain.piste.car.x) / _totalframes;
diffY = (endY1 - gameMain.piste.car.y) / _totalframes;
} else if (gameMain.allCar.hitZone.hitTest(hitZone2) && ((gameMain.allCar._rotation > (90 - diffAng)) && (gameMain.allCar._rotation < (90 + diffAng)))) {
carFVisibility = false;
carBVisibility = true;
endRotation = 90;
diffX = (endX2 - gameMain.piste.car.x) / _totalframes;
diffY = (endY2 - gameMain.piste.car.y) / _totalframes;
}
if (carFVisibility != undefined) {
gameMain.twins.animePts._x = _x;
gameMain.twins.animePts._y = _y;
gameMain.twins.animePts.box.pointField.text = "+" + main.pointLoop;
gameMain.twins.animePts.gotoAndPlay(1);
gameMain.ptsCounter = gameMain.ptsCounter + main.pointLoop;
main.keyActive = false;
tspeed = gameMain.piste.car.tspeed;
angDeg = gameMain.piste.car.angDeg;
idealvx = gameMain.piste.car.idealvx;
idealvy = gameMain.piste.car.idealvy;
vx = gameMain.piste.car.vx;
vy = gameMain.piste.car.vy;
gameMain.piste.car.vx = 0;
gameMain.piste.car.vy = 0;
steer = gameMain.piste.car.steer;
gameMain.allCar._visible = false;
gameMain.carShadow._visible = false;
play();
}
}
};
transitionCar = function () {
gameMain.piste.car.x = gameMain.piste.car.x + diffX;
gameMain.piste.car.y = gameMain.piste.car.y + diffY;
gameMain.piste.car._x = gameMain.piste.car.x;
gameMain.piste.car._y = gameMain.piste.car.y;
};
endHitAction = function () {
gameMain.piste.car.tspeed = tspeed;
gameMain.piste.car.angDeg = angDeg;
gameMain.piste.car.idealvx = idealvx;
gameMain.piste.car.idealvy = idealvy;
gameMain.carShadow._rotation = (gameMain.allCar._rotation = endRotation);
gameMain.allCar.wtl._rotation = (gameMain.allCar.wtr._rotation = 0);
if (carFVisibility) {
gameMain.piste.car._x = endX1;
gameMain.piste.car._y = endY1;
} else {
gameMain.piste.car._x = endX2;
gameMain.piste.car._y = endY2;
}
gameMain.piste.car.vx = vx;
gameMain.piste.car.vy = vy;
gameMain.piste.car.steer = steer;
gameMain.allCar._visible = true;
gameMain.carShadow._visible = true;
carFVisibility = undefined;
carBVisibility = undefined;
main.keyActive = true;
};
}
onClipEvent (enterFrame) {
if (_visible) {
if (main.keyActive) {
hitAction();
} else if (carFVisibility != undefined) {
transitionCar();
}
}
}
Instance of Symbol 1183 MovieClip in Symbol 1941 MovieClip Frame 1
onClipEvent (load) {
function getPoint(obj) {
point.x = obj._x;
point.y = obj._y;
localToGlobal(point);
point.x = point.x - _x;
point.y = point.y - _y;
return(point);
}
point = new Object();
}
Instance of Symbol 1940 MovieClip in Symbol 1941 MovieClip Frame 1
onClipEvent (load) {
function getPoint(obj) {
point.x = obj._x;
point.y = obj._y;
localToGlobal(point);
point.x = point.x - _x;
point.y = point.y - _y;
return(point);
}
point = new Object();
}
Symbol 1945 MovieClip Frame 1
function incSeg() {
seg++;
seg2 = seg + 1;
if (seg >= (gameMain.numPointsS - 1)) {
seg2 = 0;
}
if (seg >= gameMain.numPointsS) {
seg = 0;
seg2 = 1;
}
}
function tTween() {
t = t + speed;
if (t > 0.99) {
t = 0;
incSeg();
speed = vSpeed;
mid1.x = gameMain.midS[seg].x;
mid1.y = gameMain.midS[seg].y;
point2.x = gameMain.pointsS[seg2]._x;
point2.y = gameMain.pointsS[seg2]._y;
mid2.x = gameMain.midS[seg2].x;
mid2.y = gameMain.midS[seg2].y;
}
_x = ((((mid1.x * (1 - t)) * (1 - t)) + (((2 * point2.x) * (1 - t)) * t)) + ((mid2.x * t) * t));
_y = ((((mid1.y * (1 - t)) * (1 - t)) + (((2 * point2.y) * (1 - t)) * t)) + ((mid2.y * t) * t));
vx = _x - oldx;
vy = _y - oldy;
oldx = _x;
oldy = _y;
trot = (Math.atan2(vy, vx) * 180) / Math.PI;
diff = trot - _rotation;
if (diff > 180) {
diff = diff - 360;
}
if (diff < -180) {
diff = diff + 360;
}
vrot = vrot + (diff * 0.5);
vrot = vrot * 0.8;
_rotation = (_rotation + vrot);
if (main.gameStarted && (twin._visible)) {
if (gameMain.swapObj.getDepth() < gameMain.elementMap.getDepth()) {
var i = 1;
while (i <= gameMain.hitZoneQty) {
if (hitZone.hitTest(eval ("gameMain.hitZone" + i))) {
hitObjList = eval ("gameMain.zoneArray" + i);
}
i++;
}
i = 0;
while (i < hitObjList.obsArray.length) {
if (hitObjList.borderArray[i].addIt == "type1") {
if (gameMain.checkObs(this, hitObjList.obsArray[i])) {
this.onEnterFrame = cTween;
}
}
i++;
}
i = 0;
while (i < gameMain.carArray.length) {
if (!gameMain.clock._visible) {
if (gameMain.checkObs(this, gameMain.carArray[i])) {
gameMain.allCar.car.gotoAndStop("bumpFront");
gameMain.bumpSnd.gotoAndPlay("bump");
this.onEnterFrame = cTween;
}
}
i++;
}
var i = 0;
while (i < hitObjList.borderArray.length) {
if (hitObjList.borderArray[i].addIt == "type1") {
if (gameMain.checkBorder(this, hitObjList.borderArray[i])) {
lock = true;
delete this.onEnterFrame;
break;
}
}
i++;
}
}
}
if (!lock) {
twin._x = _x;
twin._y = _y;
twin._rotation = _rotation;
}
}
function cTween() {
vx = vx * friction;
vy = vy * friction;
_x = (_x + vx);
_y = (_y + vy);
if (gameMain.swapObj.getDepth() < gameMain.elementMap.getDepth()) {
var i = 1;
while (i <= gameMain.hitZoneQty) {
if (hitZone.hitTest(eval ("gameMain.hitZone" + i))) {
hitObjList = eval ("gameMain.zoneArray" + i);
}
i++;
}
i = 0;
while (i < hitObjList.obsArray.length) {
if (hitObjList.borderArray[i].addIt == "type1") {
gameMain.checkObs(this, hitObjList.obsArray[i]);
}
i++;
}
i = 0;
while (i < gameMain.carArray.length) {
if (!gameMain.clock._visible) {
if (gameMain.checkObs(this, gameMain.carArray[i])) {
gameMain.allCar.car.gotoAndStop("bumpFront");
gameMain.bumpSnd.gotoAndPlay("bump");
}
}
i++;
}
var i = 0;
while (i < hitObjList.borderArray.length) {
if (hitObjList.borderArray[i].addIt == "type1") {
if (gameMain.checkBorder(this, hitObjList.borderArray[i])) {
lock = true;
hitObjList.obsArray.push(this);
delete this.onEnterFrame;
break;
}
}
i++;
}
}
if (!lock) {
twin._x = _x;
twin._y = _y;
twin._rotation = _rotation;
}
if ((Math.round(vx) == 0) && (Math.round(vy) == 0)) {
t = 0;
if (collSeg != seg2) {
incSeg();
speed = vSpeed2;
collSeg = seg2;
}
mid1.x = _x;
mid1.y = _y;
point2.x = gameMain.pointsS[seg2]._x;
point2.y = gameMain.pointsS[seg2]._y;
mid2.x = gameMain.midS[seg2].x;
mid2.y = gameMain.midS[seg2].y;
vx = (vy = 0);
onEnterFrame = tTween;
}
}
lock = false;
m = 45;
ray = 20;
friction = 0.9;
vx = (vy = 0);
vSpeed = 0.06;
vSpeed2 = vSpeed / 2;
seg = 0;
seg2 = 1;
mid1 = new Object();
mid2 = new Object();
point2 = new Object();
coll = false;
t = 1;
this.onEnterFrame = tTween;
stop();
Instance of Symbol 973 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
var _local1 = _parent;
if (((_local1.car._y < (_y + _height)) && ((gameMain.carAnim != "jumpFront") && (gameMain.carAnim != "jumpSide"))) && (_local1.car._x < (_x + _width))) {
if (_local1.car.speed > _local1.car.skidSpeed) {
gameMain.carAnim = ((random(2) > 0) ? "jumpFront" : "jumpSide");
gameMain.twins.animePts._x = _x + (_width / 2);
gameMain.twins.animePts._y = _y + (_height / 2);
gameMain.twins.animePts.box.pointField.text = "+" + main.pointJump;
gameMain.twins.animePts.gotoAndPlay(1);
gameMain.ptsCounter = gameMain.ptsCounter + main.pointJump;
gameMain.allCar.car.gotoAndStop(gameMain.carAnim);
} else {
gameMain.allCar.car._yscale = (gameMain.allCar.car._xscale = 75);
}
}
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
for (var _local1 in gameMain.type1) {
gameMain.type1[_local1].tcol = true;
}
for (var _local1 in gameMain.type2) {
gameMain.type2[_local1].tcol = false;
}
for (var _local1 in gameMain.hitArray) {
gameMain.hitArray[_local1].hitAction = gameMain.hitArray[_local1].hitFct;
}
if (gameMain.swapObj.getDepth() < gameMain.elementMap.getDepth()) {
gameMain.elementMap.swapDepths(gameMain.swapObj);
}
if (gameMain.tcount == 8) {
gameMain.tcount++;
}
hitAction = undefined;
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip "finishLine" in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
gameMain.finishLine = this;
hitFct = function () {
for (var _local1 in gameMain.hitArray) {
gameMain.hitArray[_local1].hitAction = gameMain.hitArray[_local1].hitFct;
}
if (gameMain.tcount == 16) {
gameMain.tcount = 0;
gameMain.turn++;
if (gameMain.turn >= gameMain.turnTotal) {
main.stopGame(ssUserLogin);
}
}
hitAction = undefined;
};
if (gameMain.swapObj.getDepth() < gameMain.elementMap.getDepth()) {
gameMain.elementMap.swapDepths(gameMain.swapObj);
}
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
var _local1 = _parent;
if (((_local1.car._y > this._y) && ((gameMain.carAnim != "jumpFront") && (gameMain.carAnim != "jumpSide"))) && ((_local1.car._x > _x) && (_local1.car._x < (_x + _width)))) {
if (_local1.car.speed > _local1.car.skidSpeed) {
gameMain.carAnim = ((random(2) > 0) ? "jumpFront" : "jumpSide");
gameMain.allCar.car.gotoAndStop(gameMain.carAnim);
gameMain.twins.animePts._x = _x + (_height / 2);
gameMain.twins.animePts._y = _y + (_width / 2);
gameMain.twins.animePts.box.pointField.text = "+" + main.pointJump;
gameMain.twins.animePts.gotoAndPlay(1);
gameMain.ptsCounter = gameMain.ptsCounter + main.pointJump;
gameMain.ptsCounter = ((gameMain.ptsCounter < 0) ? 0 : (gameMain.ptsCounter));
} else {
gameMain.allCar.car._yscale = (gameMain.allCar.car._xscale = 75);
}
}
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
var _local1 = _parent;
if (((_local1.car._y < this._y) && ((gameMain.carAnim != "jumpFront") && (gameMain.carAnim != "jumpSide"))) && (_local1.car._x < (_x + _width))) {
if (_local1.car.speed > _local1.car.skidSpeed) {
gameMain.carAnim = ((random(2) > 0) ? "jumpFront" : "jumpSide");
gameMain.twins.animePts._x = _x + (_width / 2);
gameMain.twins.animePts._y = _y + (_height / 2);
gameMain.twins.animePts.box.pointField.text = "+" + main.pointJump;
gameMain.twins.animePts.gotoAndPlay(1);
gameMain.ptsCounter = gameMain.ptsCounter + main.pointJump;
gameMain.allCar.car.gotoAndStop(gameMain.carAnim);
} else {
gameMain.allCar.car._yscale = (gameMain.allCar.car._xscale = 75);
}
}
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.upArray.push(this);
}
Instance of Symbol 973 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
for (var _local1 in gameMain.type1) {
gameMain.type1[_local1].tcol = true;
}
for (var _local1 in gameMain.type2) {
gameMain.type2[_local1].tcol = false;
}
for (var _local1 in gameMain.hitArray) {
gameMain.hitArray[_local1].hitAction = gameMain.hitArray[_local1].hitFct;
}
if (gameMain.swapObj.getDepth() < gameMain.elementMap.getDepth()) {
gameMain.elementMap.swapDepths(gameMain.swapObj);
}
if (gameMain.tcount == 9) {
gameMain.tcount++;
}
hitAction = undefined;
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
for (var _local1 in gameMain.type1) {
gameMain.type1[_local1].tcol = false;
}
for (var _local1 in gameMain.type2) {
gameMain.type2[_local1].tcol = true;
}
for (var _local1 in gameMain.hitArray) {
gameMain.hitArray[_local1].hitAction = gameMain.hitArray[_local1].hitFct;
}
if (gameMain.swapObj.getDepth() > gameMain.elementMap.getDepth()) {
gameMain.elementMap.swapDepths(gameMain.swapObj);
}
if (gameMain.tcount == 10) {
gameMain.tcount++;
}
hitAction = undefined;
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
for (var _local1 in gameMain.type1) {
gameMain.type1[_local1].tcol = true;
}
for (var _local1 in gameMain.type2) {
gameMain.type2[_local1].tcol = false;
}
for (var _local1 in gameMain.hitArray) {
gameMain.hitArray[_local1].hitAction = gameMain.hitArray[_local1].hitFct;
}
if (gameMain.swapObj.getDepth() < gameMain.elementMap.getDepth()) {
gameMain.elementMap.swapDepths(gameMain.swapObj);
}
if (gameMain.tcount == 12) {
gameMain.tcount++;
}
hitAction = undefined;
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
for (var _local1 in gameMain.type1) {
gameMain.type1[_local1].tcol = false;
}
for (var _local1 in gameMain.type2) {
gameMain.type2[_local1].tcol = true;
}
for (var _local1 in gameMain.hitArray) {
gameMain.hitArray[_local1].hitAction = gameMain.hitArray[_local1].hitFct;
}
if (gameMain.swapObj.getDepth() > gameMain.elementMap.getDepth()) {
gameMain.elementMap.swapDepths(gameMain.swapObj);
}
if (gameMain.tcount == 11) {
gameMain.tcount++;
}
hitAction = undefined;
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
for (var _local1 in gameMain.type1) {
gameMain.type1[_local1].tcol = true;
}
for (var _local1 in gameMain.type2) {
gameMain.type2[_local1].tcol = false;
}
for (var _local1 in gameMain.hitArray) {
gameMain.hitArray[_local1].hitAction = gameMain.hitArray[_local1].hitFct;
}
if (gameMain.swapObj.getDepth() < gameMain.elementMap.getDepth()) {
gameMain.elementMap.swapDepths(gameMain.swapObj);
}
if (gameMain.tcount == 13) {
gameMain.tcount++;
}
hitAction = undefined;
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
for (var _local1 in gameMain.type1) {
gameMain.type1[_local1].tcol = false;
}
for (var _local1 in gameMain.type2) {
gameMain.type2[_local1].tcol = true;
}
for (var _local1 in gameMain.hitArray) {
gameMain.hitArray[_local1].hitAction = gameMain.hitArray[_local1].hitFct;
}
if (gameMain.swapObj.getDepth() > gameMain.elementMap.getDepth()) {
gameMain.elementMap.swapDepths(gameMain.swapObj);
}
if (gameMain.tcount == 14) {
gameMain.tcount++;
}
hitAction = undefined;
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
for (var _local1 in gameMain.type1) {
gameMain.type1[_local1].tcol = false;
}
for (var _local1 in gameMain.type2) {
gameMain.type2[_local1].tcol = true;
}
for (var _local1 in gameMain.hitArray) {
gameMain.hitArray[_local1].hitAction = gameMain.hitArray[_local1].hitFct;
}
if (gameMain.swapObj.getDepth() > gameMain.elementMap.getDepth()) {
gameMain.elementMap.swapDepths(gameMain.swapObj);
}
if (gameMain.tcount == 15) {
gameMain.tcount++;
}
hitAction = undefined;
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
for (var _local1 in gameMain.type1) {
gameMain.type1[_local1].tcol = true;
}
for (var _local1 in gameMain.type2) {
gameMain.type2[_local1].tcol = false;
}
for (var _local1 in gameMain.hitArray) {
gameMain.hitArray[_local1].hitAction = gameMain.hitArray[_local1].hitFct;
}
if (gameMain.swapObj.getDepth() < gameMain.elementMap.getDepth()) {
gameMain.elementMap.swapDepths(gameMain.swapObj);
}
if (gameMain.tcount == 0) {
gameMain.tcount++;
}
hitAction = undefined;
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.upArray.push(this);
}
Instance of Symbol 973 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
for (var _local1 in gameMain.type1) {
gameMain.type1[_local1].tcol = true;
}
for (var _local1 in gameMain.type2) {
gameMain.type2[_local1].tcol = false;
}
for (var _local1 in gameMain.hitArray) {
gameMain.hitArray[_local1].hitAction = gameMain.hitArray[_local1].hitFct;
}
if (gameMain.swapObj.getDepth() < gameMain.elementMap.getDepth()) {
gameMain.elementMap.swapDepths(gameMain.swapObj);
}
if (gameMain.tcount == 1) {
gameMain.tcount++;
}
hitAction = undefined;
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
for (var _local1 in gameMain.type1) {
gameMain.type1[_local1].tcol = false;
}
for (var _local1 in gameMain.type2) {
gameMain.type2[_local1].tcol = true;
}
for (var _local1 in gameMain.hitArray) {
gameMain.hitArray[_local1].hitAction = gameMain.hitArray[_local1].hitFct;
}
if (gameMain.swapObj.getDepth() > gameMain.elementMap.getDepth()) {
gameMain.elementMap.swapDepths(gameMain.swapObj);
}
if (gameMain.tcount == 2) {
gameMain.tcount++;
}
hitAction = undefined;
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
for (var _local1 in gameMain.type1) {
gameMain.type1[_local1].tcol = true;
}
for (var _local1 in gameMain.type2) {
gameMain.type2[_local1].tcol = false;
}
for (var _local1 in gameMain.hitArray) {
gameMain.hitArray[_local1].hitAction = gameMain.hitArray[_local1].hitFct;
}
if (gameMain.swapObj.getDepth() < gameMain.elementMap.getDepth()) {
gameMain.elementMap.swapDepths(gameMain.swapObj);
}
if (gameMain.tcount == 4) {
gameMain.tcount++;
}
hitAction = undefined;
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
for (var _local1 in gameMain.type1) {
gameMain.type1[_local1].tcol = false;
}
for (var _local1 in gameMain.type2) {
gameMain.type2[_local1].tcol = true;
}
for (var _local1 in gameMain.hitArray) {
gameMain.hitArray[_local1].hitAction = gameMain.hitArray[_local1].hitFct;
}
if (gameMain.swapObj.getDepth() > gameMain.elementMap.getDepth()) {
gameMain.elementMap.swapDepths(gameMain.swapObj);
}
if (gameMain.tcount == 3) {
gameMain.tcount++;
}
hitAction = undefined;
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
for (var _local1 in gameMain.type1) {
gameMain.type1[_local1].tcol = true;
}
for (var _local1 in gameMain.type2) {
gameMain.type2[_local1].tcol = false;
}
for (var _local1 in gameMain.hitArray) {
gameMain.hitArray[_local1].hitAction = gameMain.hitArray[_local1].hitFct;
}
if (gameMain.swapObj.getDepth() < gameMain.elementMap.getDepth()) {
gameMain.elementMap.swapDepths(gameMain.swapObj);
}
if (gameMain.tcount == 5) {
gameMain.tcount++;
}
hitAction = undefined;
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
for (var _local1 in gameMain.type1) {
gameMain.type1[_local1].tcol = false;
}
for (var _local1 in gameMain.type2) {
gameMain.type2[_local1].tcol = true;
}
for (var _local1 in gameMain.hitArray) {
gameMain.hitArray[_local1].hitAction = gameMain.hitArray[_local1].hitFct;
}
if (gameMain.swapObj.getDepth() > gameMain.elementMap.getDepth()) {
gameMain.elementMap.swapDepths(gameMain.swapObj);
}
if (gameMain.tcount == 6) {
gameMain.tcount++;
}
hitAction = undefined;
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
for (var _local1 in gameMain.type1) {
gameMain.type1[_local1].tcol = false;
}
for (var _local1 in gameMain.type2) {
gameMain.type2[_local1].tcol = true;
}
for (var _local1 in gameMain.hitArray) {
gameMain.hitArray[_local1].hitAction = gameMain.hitArray[_local1].hitFct;
}
if (gameMain.swapObj.getDepth() > gameMain.elementMap.getDepth()) {
gameMain.elementMap.swapDepths(gameMain.swapObj);
}
if (gameMain.tcount == 7) {
gameMain.tcount++;
}
hitAction = undefined;
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
var _local1 = _parent;
if (((_local1.car._y < this._y) && ((gameMain.carAnim != "jumpFront") && (gameMain.carAnim != "jumpSide"))) && ((_local1.car._x < (_x + _width)) && (_local1.car._x > _x))) {
if (_local1.car.speed > _local1.car.skidSpeed) {
gameMain.carAnim = ((random(2) > 0) ? "jumpFront" : "jumpSide");
gameMain.twins.animePts._x = _x + (_width / 2);
gameMain.twins.animePts._y = _y + (_height / 2);
gameMain.twins.animePts.box.pointField.text = "+" + main.pointJump;
gameMain.twins.animePts.gotoAndPlay(1);
gameMain.ptsCounter = gameMain.ptsCounter + main.pointJump;
gameMain.allCar.car.gotoAndStop(gameMain.carAnim);
} else {
gameMain.allCar.car._yscale = (gameMain.allCar.car._xscale = 75);
}
}
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
var _local1 = _parent;
if (((_local1.car._y < this._y) && ((gameMain.carAnim != "jumpFront") && (gameMain.carAnim != "jumpSide"))) && (_local1.car._x > _x)) {
if (_local1.car.speed > _local1.car.skidSpeed) {
gameMain.carAnim = ((random(2) > 0) ? "jumpFront" : "jumpSide");
gameMain.twins.animePts._x = _x + (_width / 2);
gameMain.twins.animePts._y = _y + (_height / 2);
gameMain.twins.animePts.box.pointField.text = "+" + main.pointJump;
gameMain.twins.animePts.gotoAndPlay(1);
gameMain.ptsCounter = gameMain.ptsCounter + main.pointJump;
gameMain.allCar.car.gotoAndStop(gameMain.carAnim);
} else {
gameMain.allCar.car._yscale = (gameMain.allCar.car._xscale = 75);
}
}
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
var _local1 = _parent;
if (((_local1.car._y > this._y) && ((gameMain.carAnim != "jumpFront") && (gameMain.carAnim != "jumpSide"))) && (_local1.car._x > _x)) {
if (_local1.car.speed > _local1.car.skidSpeed) {
gameMain.carAnim = ((random(2) > 0) ? "jumpFront" : "jumpSide");
gameMain.allCar.car.gotoAndStop(gameMain.carAnim);
gameMain.twins.animePts._x = _x + (_height / 2);
gameMain.twins.animePts._y = _y + (_width / 2);
gameMain.twins.animePts.box.pointField.text = "+" + main.pointJump;
gameMain.twins.animePts.gotoAndPlay(1);
gameMain.ptsCounter = gameMain.ptsCounter + main.pointJump;
gameMain.ptsCounter = ((gameMain.ptsCounter < 0) ? 0 : (gameMain.ptsCounter));
} else {
gameMain.allCar.car._yscale = (gameMain.allCar.car._xscale = 75);
}
}
};
hitAction = hitFct;
}
Instance of Symbol 973 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
_name = gameMain.getName();
gameMain.addObjIfHit(this, "hitZone", "hitArray");
gameMain.hitArray.push(this);
hitFct = function () {
var _local1 = _parent;
if ((((_local1.car._y > _y) && ((gameMain.carAnim != "jumpFront") && (gameMain.carAnim != "jumpSide"))) && (_local1.car._x < (_x + _width))) && (_local1.car._x > _x)) {
if (_local1.car.speed > _local1.car.skidSpeed) {
gameMain.carAnim = ((random(2) > 0) ? "jumpFront" : "jumpSide");
gameMain.allCar.car.gotoAndStop(gameMain.carAnim);
gameMain.twins.animePts._x = _x + (_height / 2);
gameMain.twins.animePts._y = _y + (_width / 2);
gameMain.twins.animePts.box.pointField.text = "+" + main.pointJump;
gameMain.twins.animePts.gotoAndPlay(1);
gameMain.ptsCounter = gameMain.ptsCounter + main.pointJump;
gameMain.ptsCounter = ((gameMain.ptsCounter < 0) ? 0 : (gameMain.ptsCounter));
} else {
gameMain.allCar.car._yscale = (gameMain.allCar.car._xscale = 75);
}
}
};
hitAction = hitFct;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
addIt = "type2";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
addIt = "type2";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
addIt = "type2";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
addIt = "type2";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
addIt = "type2";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
addIt = "type2";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
addIt = "type2";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
addIt = "type2";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
addIt = "type2";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
addIt = "type2";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
addIt = "type1";
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1532 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
dommage = false;
}
Instance of Symbol 1535 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
lock = true;
}
Instance of Symbol 1535 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
lock = true;
}
Instance of Symbol 1535 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
lock = true;
}
Instance of Symbol 1535 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
lock = true;
}
Instance of Symbol 1535 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
lock = true;
}
Instance of Symbol 1535 MovieClip in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
lock = true;
}
Instance of Symbol 87 MovieClip [dot] "d5" in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d6" in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d9" in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d10" in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d11" in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d12" in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d15" in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d14" in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d16" in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d19" in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d20" in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d21" in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d22" in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d23" in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d58" in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d59" in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d62" in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d63" in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d64" in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d65" in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d68" in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d67" in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d69" in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d72" in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d73" in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d74" in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d75" in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 87 MovieClip [dot] "d76" in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
disabled = true;
}
Instance of Symbol 1543 MovieClip "car" in Symbol 1946 MovieClip Frame 1
onClipEvent (load) {
minVolume = (newVolume = 10);
x = _x;
y = _y;
vx = (vy = 0);
tspeed = 0;
carGrid = eval (("main.car" + main.carNbr) + "Chart");
trust = ((carGrid.maxSpeed * carGrid.speed) / 560) + ((carGrid.maxSpeed * 80) / 100);
bTrust = 0.5;
decay = 0.9;
angle = 0;
tfriction = 0.16;
steer = 0;
steerInc = 1;
steerDec = 1;
steerMax = 10;
skidAngle = 5;
skidSpeed = 5;
gObj = this;
tline = 5;
cline = 6710886 /* 0x666666 */;
aline = 100;
steerSmooth = 0.1;
moveTo = false;
skid = false;
gf = 1;
m = 40;
ray = 20;
gameMain.carArray.push(this);
if (main.gameType == "multiPlayer") {
main.carInt = setInterval(main.updatePosition, main.updateTime);
}
main.minutTxt = "00";
main.secondTxt = "00";
main.centiSecondTxt = "00";
}
onClipEvent (enterFrame) {
if (main.keyActive) {
main.timerGame = getTimer() - main.offSet;
minut = Math.round((main.timerGame / 1000) / 60);
second = Math.round((main.timerGame / 1000) % 60);
centiSecond = Math.round((main.timerGame % 1000) / 10);
main.minutTxt = ((minut < 10) ? ("0" + minut) : (minut));
main.secondTxt = ((second < 10) ? ("0" + second) : (second));
main.centiSecondTxt = ((centiSecond < 10) ? ("0" + centiSecond) : (centiSecond));
keyLeft = Key.isDown(37);
keyRight = Key.isDown(39);
keyup = Key.isDown(38);
keydown = Key.isDown(40);
} else {
keyLeft = (keyRight = (keyup = (keydown = false)));
}
gHit = gObj;
var i = 0;
while (i < gameMain.hitObjList.gArray.length) {
hitG = gameMain.hitObjList.gArray[i].hitTest(((_x * _parent._xscale) / 100) + _parent._x, ((_y * _parent._yscale) / 100) + _parent._y, true);
if (hitG) {
gHit = gameMain.hitObjList.gArray[i];
break;
}
i++;
}
if (gameMain.twins.oil.hitZone.hitTest(gameMain.allCar)) {
gameMain.twins.oil.gotoAndPlay("hit");
gHit = gameMain.twins.oil;
}
if (keyup) {
dir = 1;
tspeed = tspeed + (dir * (trust * gHit.gf));
}
if (keydown) {
dir = -1;
tspeed = tspeed + (dir * (btrust * gHit.gf));
}
tspeed = Math.min(tspeed, main.ultimateSpeed);
hVolume = (tspeed * main.mainVolume) / 12;
gameMain.lowSpeed.s.setVolume(main.mainVolume - hVolume);
gameMain.highSpeed.s.setVolume(Math.min(hVolume, 80));
tspeed = tspeed * decay;
angDeg = angle * gameMain.radVal;
idealvx = tspeed * Math.cos(angDeg);
idealvy = tspeed * Math.sin(angDeg);
vx = vx + ((idealvx - vx) * tfriction);
vy = vy + ((idealvy - vy) * tfriction);
x = x + vx;
y = y + vy;
if (keyLeft || (keyRight)) {
steer = steer + ((keyRight - keyLeft) * steerInc);
} else {
steer = steer + (((steer < 0) - (steer > 0)) * steerDec);
}
if (steer < (-steerMax)) {
steer = -steerMax;
} else if (steer > steerMax) {
steer = steerMax;
}
speed = Math.sqrt((vx * vx) + (vy * vy));
angle = angle + ((steer * speed) * gHit.steerSmooth);
gameMain.allCar.wtl._rotation = (gameMain.allCar.wtr._rotation = (steer * 3) * dir);
gameMain.carShadow._rotation = (gameMain.allCar._rotation = angle + 90);
if (x < 193) {
_x = ((x = 196));
vx = 0;
vy = 0;
} else if (x > 2387) {
_x = ((x = 2380));
vx = 0;
vy = 0;
} else {
_x = x;
}
if (y < 123) {
_y = ((y = 126));
vx = 0;
vy = 0;
} else if (y > 1390) {
_y = ((y = 1386));
vx = 0;
vy = 0;
} else {
_y = y;
}
var i = 1;
while (i <= gameMain.hitZoneQty) {
if (hitZone.hitTest(eval ("gameMain.hitZone" + i))) {
gameMain.hitObjList = eval ("gameMain.zoneArray" + i);
}
i++;
}
upHit = false;
i = 0;
while (i < gameMain.upArray.length) {
if (gameMain.upArray[i].hitTest(this) && (gameMain.swapObj.getDepth() > gameMain.elementMap.getDepth())) {
upHit = true;
if (gameMain.allCar.car._xscale < 66) {
gameMain.allCar.car._xscale = (gameMain.allCar.car._yscale = gameMain.allCar.car._yscale + 2);
}
}
i++;
}
if ((!upHit) && (gameMain.allCar.car._xscale > 60)) {
gameMain.allCar.car._xscale = (gameMain.allCar.car._yscale = gameMain.allCar.car._yscale - 2);
}
i = 0;
while (i < gameMain.hitObjList.hitArray.length) {
if (gameMain.hitObjList.hitArray[i].hitTest(this)) {
gameMain.hitObjList.hitArray[i].hitAction();
}
i++;
}
bump = ((tspeed > 0) ? "bumpFront" : "bumpBack");
i = 0;
while (i < gameMain.hitObjList.obsArray.length) {
if (gameMain.checkObs(this, gameMain.hitObjList.obsArray[i])) {
if ((gameMain.carAnim != "jumpFront") && (gameMain.carAnim != "jumpSide")) {
gameMain.allCar.car.gotoAndStop(bump);
gameMain.bumpSnd.gotoAndPlay("bump");
}
}
i++;
}
var i = 0;
var i = 0;
while (i <= gameMain.hitObjList.borderArray.length) {
if (gameMain.checkBorder(this, gameMain.hitObjList.borderArray[i])) {
if (gameMain.hitObjList.borderArray[i].dommage == undefined) {
if ((gameMain.carAnim != "jumpFront") && (gameMain.carAnim != "jumpSide")) {
gameMain.allCar.car.gotoAndStop(bump);
gameMain.bumpSnd.gotoAndPlay("bump");
}
}
}
i++;
}
if (((Math.abs(Math.round(steer)) > skidAngle) && (speed > skidSpeed)) || (hitG)) {
gameMain.traceLine(_x, _y, gHit, moveTo);
if (keyRight || (keyLeft)) {
skid = true;
skidSide = (keyRight ? "skid1" : "skid2");
}
if ((gameMain.carAnim != "jumpFront") && (gameMain.carAnim != "jumpSide")) {
gameMain.skidSound.gotoAndStop("snd");
gameMain.allCar.car.gotoAndStop(skidSide);
}
moveTo = false;
} else {
moveTo = true;
if (skid) {
if ((gameMain.carAnim != "jumpFront") && (gameMain.carAnim != "jumpSide")) {
skid = false;
gameMain.skidSound.gotoAndStop("mute");
gameMain.allCar.car.gotoAndStop(skidSide + "b");
}
}
gameMain.lineL.clear();
gameMain.lineR.clear();
}
gameMain.twins._x = (gameMain.elementMap._x = (gameMain.map._x = Math.round((-_x) + gameMain.allCar._x)));
gameMain.twins._y = (gameMain.elementMap._y = (gameMain.map._y = Math.round((-_y) + gameMain.allCar._y)));
if (gameMain.twins.energyBoost.hitZone.hitTest(gameMain.allCar)) {
gameMain.twins.energyBoost.gotoAndPlay("hit");
}
if (gameMain.twins.speedBoost.hitZone.hitTest(gameMain.allCar)) {
gameMain.twins.speedBoost.gotoAndPlay("hit");
}
var i = 0;
while (i < gameMain.mapArray.length) {
gameMain.mapArray[i]._visible = gameMain.mapArray[i].hitTest(gameMain.frame);
i++;
}
for (var i in gameMain.twins) {
gameMain.twins[i]._visible = gameMain.twins[i].hitTest(gameMain.frame) && (gameMain.twins[i].actif != false);
}
}
Symbol 1947 MovieClip Frame 1
function addObjIfHit(anObj, hitType, tableType) {
var i = 1;
while (i <= hitZoneQty) {
if (anObj.hitTest(eval (hitType + i))) {
eval (tableType + i).push(anObj);
}
i++;
}
}
function startTimer(thisTimeOut) {
initTimer = getTimer() / 1000;
clock._visible = true;
clock.onEnterFrame = function () {
timeElaped = Math.abs(getTimer() / 1000) - initTimer;
clock.showTime(timeElaped, thisTimeOut);
if ((thisTimeOut - Math.floor(timeElaped)) <= 0) {
clock._visible = false;
main.keyActive = true;
main.energyBar.energyBar.bar._x = main.energyGame;
delete clock.onEnterFrame;
}
};
}
function getName() {
i++;
return("o" + i);
}
function fadeLine(line) {
var _local1 = line;
_local1._alpha = _local1._alpha - aDec;
if (_local1._alpha <= 0) {
clearInterval(_local1.intervalID);
removeMovieClip(_local1);
}
}
function traceLine(objX, objY, gObj, moveTo) {
var _local1 = gObj;
pt = allCar.getPoint(allCar.car.wbl);
objXL = objX + pt.x;
objYL = objY + pt.y;
pt = allCar.getPoint(allCar.car.wbr);
objXR = objX + pt.x;
objYR = objY + pt.y;
lineL.lineStyle(_local1.tline, _local1.cline, _local1.aline);
if (moveTo) {
lineL.moveTo(objXL, objYL);
}
lineL.lineTo(objXL, objYL);
lineL = map.createEmptyMovieClip("line" + cl, 100 + (cl++));
lineL.moveTo(objXL, objYL);
lineL.intervalID = setInterval(fadeLine, sfade, lineL);
lineR.lineStyle(_local1.tline, _local1.cline, _local1.aline);
if (moveTo) {
lineR.moveTo(objXR, objYR);
}
lineR.lineTo(objXR, objYR);
lineR = map.createEmptyMovieClip("line" + cl, 100 + (cl++));
lineR.moveTo(objXR, objYR);
lineR.intervalID = setInterval(fadeLine, sfade, lineR);
cl = cl % mline;
}
function checkBorder(obj, line) {
var _local1 = line;
var _local2 = obj;
if (_local1.tcol) {
if (_local1.htype) {
if ((_local2._x > _local1.bounds.xMin) && (_local2._x < _local1.bounds.xMax)) {
var dx = (_local1._x - _local2._x);
var dy = (_local1._y - _local2._y);
var y1 = ((_local1.cosa * dy) - (_local1.sina * dx));
var vy1 = ((_local1.cosa * _local2.vy) - (_local1.sina * _local2.vx));
if ((y1 < 1) && (y1 > (-vy1))) {
var x1 = ((_local1.cosa * dx) + (_local1.sina * dy));
y1 = 1;
var _local3 = (_local1.cosa * _local2.vx) + (_local1.sina * _local2.vy);
var vFactor = ((Math.abs(_local2.speed) < 1) ? 1 : (Math.abs(_local2.speed)));
vy1 = vy1 * (bounce * vFactor);
_local2.tspeed = 0;
vy1 = ((vy1 > (-_local2.trust)) ? (-_local2.trust) : (vy1));
_local2.vx = (_local1.cosa * _local3) - (_local1.sina * vy1);
_local2.vy = (_local1.cosa * vy1) + (_local1.sina * _local3);
dx = (_local1.cosa * x1) - (_local1.sina * y1);
dy = (_local1.cosa * y1) + (_local1.sina * x1);
return(true);
}
}
} else if ((_local2._y > _local1.bounds.yMin) && (_local2._y < _local1.bounds.yMax)) {
var dx = (_local1._x - _local2._x);
var dy = (_local1._y - _local2._y);
var x1 = ((_local1.cosa * dx) + (_local1.sina * dy));
var _local3 = (_local1.cosa * _local2.vx) - (_local1.sina * _local2.vy);
if ((x1 < 1) && (x1 > (-_local3))) {
var y1 = ((_local1.cosa * dy) - (_local1.sina * dx));
x1 = 1;
var vy1 = ((_local1.cosa * _local2.vy) - (_local1.sina * _local2.vx));
var vFactor = ((Math.abs(_local2.speed) < 1) ? 1 : (Math.abs(_local2.speed)));
_local3 = _local3 * (bounce * vFactor);
_local2.tspeed = 0;
_local3 = ((_local3 > (-_local2.trust)) ? (-_local2.trust) : (_local3));
_local2.vx = (_local1.cosa * _local3) - (_local1.sina * vy1);
_local2.vy = (_local1.cosa * vy1) + (_local1.sina * _local3);
dx = (_local1.sina * y1) - (_local1.cosa * x1);
dy = (_local1.cosa * y1) - (_local1.sina * x1);
_local2._x = _local1._x - dx;
_local2._y = _local1._y - dy;
return(true);
}
}
}
return(false);
}
function checkObs(obj1, obj2) {
var _local1 = obj2;
var _local2 = obj1;
var dx = (_local1._x - _local2._x);
var _local3 = _local1._y - _local2._y;
var dist = Math.sqrt((dx * dx) + (_local3 * _local3));
if (dist < (_local2.ray + _local1.ray)) {
var angle = Math.atan2(_local3, dx);
cosa = Math.cos(angle);
sina = Math.sin(angle);
vx1p = (cosa * _local2.vx) + (sina * _local2.vy);
vy1p = (cosa * _local2.vy) - (sina * _local2.vx);
if (!_local1.lock) {
vx2p = (cosa * _local1.vx) + (sina * _local1.vy);
vy2p = (cosa * _local1.vy) - (sina * _local1.vx);
P = (vx1p * _local2.m) + (vx2p * _local1.m);
} else {
vx2p = (-vx1p) * 2;
vy2p = (-vy1p) * 2;
P = vx1p * _local2.m;
}
V = vx1p - vx2p;
vx1p = (P - (_local1.m * V)) / (_local2.m + _local1.m);
_local2.vx = (cosa * vx1p) - (sina * vy1p);
_local2.vy = (cosa * vy1p) + (sina * vx1p);
if (!_local1.lock) {
vx2p = V + vx1p;
_local1.vx = (cosa * vx2p) - (sina * vy2p);
_local1.vy = (cosa * vy2p) + (sina * vx2p);
}
diff = ((_local2.ray + _local1.ray) - dist) / 2;
cosd = cosa * diff;
sind = sina * diff;
_local2.tspeed = 0;
_local2._x = _local2._x - cosd;
_local2._y = _local2._y - sind;
if (!_local1.lock) {
_local1._x = _local1._x + cosd;
_local1._y = _local1._y + sind;
_local1.mTween();
}
return(true);
}
return(false);
}
function computeTrack(dotNbr) {
points = new Array();
numPoints = dotNbr;
mid = new Array();
i = 0;
while (i < numPoints) {
angle = ((Math.PI*2) / numPoints) * i;
points[i] = eval ("piste.d" + i);
mid[i] = {};
i++;
}
i = 0;
while (i < (numPoints - 1)) {
mid[i].x = (points[i]._x + points[i + 1]._x) / 2;
mid[i].y = (points[i]._y + points[i + 1]._y) / 2;
i++;
}
mid[i].x = (points[i]._x + points[0]._x) / 2;
mid[i].y = (points[i]._y + points[0]._y) / 2;
}
function computeTrack2(dotNbr) {
pointsT = new Array();
numPointsT = dotNbr;
midT = new Array();
i = 0;
while (i < numPointsT) {
angle = ((Math.PI*2) / numPointsT) * i;
pointsT[i] = eval ("piste.t" + i);
midT[i] = {};
i++;
}
i = 0;
while (i < (numPointsT - 1)) {
midT[i].x = (pointsT[i]._x + pointsT[i + 1]._x) / 2;
midT[i].y = (pointsT[i]._y + pointsT[i + 1]._y) / 2;
i++;
}
midT[i].x = (pointsT[i]._x + pointsT[0]._x) / 2;
midT[i].y = (pointsT[i]._y + pointsT[0]._y) / 2;
}
function computeTrack3(dotNbr) {
pointsS = new Array();
numPointsS = dotNbr;
midS = new Array();
i = 0;
while (i < numPointsS) {
angle = ((Math.PI*2) / numPointsS) * i;
pointsS[i] = eval ("piste.s" + i);
midS[i] = {};
i++;
}
i = 0;
while (i < (numPointsS - 1)) {
midS[i].x = (pointsS[i]._x + pointsS[i + 1]._x) / 2;
midS[i].y = (pointsS[i]._y + pointsS[i + 1]._y) / 2;
i++;
}
midS[i].x = (pointsS[i]._x + pointsS[0]._x) / 2;
midS[i].y = (pointsS[i]._y + pointsS[0]._y) / 2;
}
_quality = "LOW";
_global.gameMain = this;
clearInterval(main.robotInt);
main.gameStarted = false;
radVal = (Math.PI/180);
bounce = -0.2;
cl = 0;
mline = 40;
sfade = 50;
aDec = 10;
type1 = new Object();
type2 = new Object();
tcount = 0;
turn = 0;
carArray = new Array();
hitArray = new Array();
mapArray = new Array();
hitZoneQty = 4;
var i = 1;
while (i <= hitZoneQty) {
Set("borderArray" + i, new Array());
Set("obsArray" + i, new Array());
Set("hitArray" + i, new Array());
Set("gArray" + i, new Array());
Set("zoneArray" + i, new Object());
zoneArrayTarget = eval ("zoneArray" + i);
zoneArrayTarget.borderArray = eval ("borderArray" + i);
zoneArrayTarget.obsArray = eval ("obsArray" + i);
zoneArrayTarget.hitArray = eval ("hitArray" + i);
zoneArrayTarget.gArray = eval ("gArray" + i);
i++;
}
upArray = new Array();
main.selectGame(main.gameType);
main.selectCar(main.carNbr);
main.selectDude(main.dudeNbr);
if (main.gameType == "multiPlayer") {
main.quitBtn._visible = false;
main.selectTrack(main.userRoom.map);
gotoAndStop("track" + main.userRoom.map);
} else {
main.quitBtn._visible = true;
main.selectTrack(main.pisteNbr);
gotoAndStop("track" + main.pisteNbr);
}
Instance of Symbol 949 MovieClip "lowSpeed" in Symbol 1947 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
}
Instance of Symbol 951 MovieClip "highSpeed" in Symbol 1947 MovieClip Frame 1
onClipEvent (load) {
s = new Sound(this);
}
Instance of Symbol 1005 MovieClip in Symbol 1947 MovieClip Frame 1
onClipEvent (load) {
if (_root.lang == "fr") {
stop();
} else {
gotoAndStop (2);
}
}
Instance of Symbol 1020 MovieClip "clock" in Symbol 1947 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
showTime = function (actualTime, timeOut) {
swatch._rotation = (actualTime * 360) / timeOut;
};
}
Symbol 1947 MovieClip Frame 2
gameMain.hitObjList = gameMain.zoneArray;
gameMain.computeTrack(47);
gameMain.computeTrack2(25);
main.drawUser();
Instance of Symbol 1184 MovieClip "map" in Symbol 1947 MovieClip Frame 2
onClipEvent (load) {
for (var i in this) {
this[i]._name = gameMain.getName();
}
for (var i in this) {
gameMain.mapArray.push(this[i]);
}
}
Instance of Symbol 1194 MovieClip "elementMap" in Symbol 1947 MovieClip Frame 2
onClipEvent (load) {
for (var i in this) {
this[i]._name = gameMain.getName();
}
for (var i in this) {
gameMain.mapArray.push(this[i]);
}
}
Symbol 1947 MovieClip Frame 3
gameMain.hitObjList = gameMain.zoneArray;
gameMain.computeTrack(47);
gameMain.computeTrack2(18);
main.drawUser();
Instance of Symbol 1737 MovieClip "map" in Symbol 1947 MovieClip Frame 3
onClipEvent (load) {
for (var i in this) {
this[i]._name = gameMain.getName();
}
for (var i in this) {
gameMain.mapArray.push(this[i]);
}
}
Instance of Symbol 1741 MovieClip "elementMap" in Symbol 1947 MovieClip Frame 3
onClipEvent (load) {
for (var i in this) {
this[i]._name = gameMain.getName();
}
for (var i in this) {
gameMain.mapArray.push(this[i]);
}
}
Symbol 1947 MovieClip Frame 4
gameMain.hitObjList = gameMain.zoneArray;
gameMain.computeTrack(50);
main.drawUser();
Instance of Symbol 1906 MovieClip "map" in Symbol 1947 MovieClip Frame 4
onClipEvent (load) {
for (var i in this) {
this[i]._name = gameMain.getName();
}
for (var i in this) {
gameMain.mapArray.push(this[i]);
}
}
Symbol 1947 MovieClip Frame 5
gameMain.hitObjList = gameMain.zoneArray;
gameMain.computeTrack(106);
gameMain.computeTrack2(18);
gameMain.computeTrack3(18);
main.drawUser();
Instance of Symbol 1941 MovieClip "map" in Symbol 1947 MovieClip Frame 5
onClipEvent (load) {
for (var i in this) {
this[i]._name = gameMain.getName();
}
for (var i in this) {
gameMain.mapArray.push(this[i]);
}
}
Instance of Symbol 1942 MovieClip "elementMap" in Symbol 1947 MovieClip Frame 5
onClipEvent (load) {
for (var i in this) {
this[i]._name = gameMain.getName();
}
for (var i in this) {
gameMain.mapArray.push(this[i]);
}
}
Symbol 1961 MovieClip Frame 1
stop();
Symbol 1967 MovieClip Frame 1
stop();
Symbol 1972 MovieClip Frame 1
stop();
Instance of Symbol 523 MovieClip "energyBar" in Symbol 1972 MovieClip Frame 1
onClipEvent (load) {
main.energyGame = (bar._x = (((barBkg._width / 2) + (((barBkg._width / 2) * eval (("main.car" + _parent._currentframe) + "Chart.energy")) / 100)) - bar._width) + barBkg._x);
}
Instance of Symbol 527 MovieClip "energyBar" in Symbol 1972 MovieClip Frame 2
onClipEvent (load) {
main.energyGame = (bar._x = (((barBkg._width / 2) + (((barBkg._width / 2) * eval (("main.car" + _parent._currentframe) + "Chart.energy")) / 100)) - bar._width) + barBkg._x);
}
Instance of Symbol 510 MovieClip "energyBar" in Symbol 1972 MovieClip Frame 3
onClipEvent (load) {
main.energyGame = (bar._x = (((barBkg._width / 2) + (((barBkg._width / 2) * eval (("main.car" + _parent._currentframe) + "Chart.energy")) / 100)) - bar._width) + barBkg._x);
}