Frame 1
function convertNumberDisplay(param_number) {
if (param_number < 0) {
number_str = String(param_number * -1);
} else {
number_str = String(param_number);
}
convertedNumber_str = "";
commaCount = 0;
var _local1 = number_str.length - 1;
while (_local1 >= 0) {
commaCount++;
if (((commaCount % 3) == 0) and (_local1 > 0)) {
convertedNumber_str = ("," + number_str.charAt(_local1)) + convertedNumber_str;
} else {
convertedNumber_str = number_str.charAt(_local1) + convertedNumber_str;
}
_local1--;
}
if (param_number < 0) {
convertedNumber_str = "-" + convertedNumber_str;
}
return(convertedNumber_str);
}
function bonusPoints(param_points) {
_root.score = _root.score + param_points;
_root.game_mc.bonus_points_mc.bonusPoints = param_points;
_root.game_mc.bonus_points_mc.play();
}
Frame 2
percentLoaded = 100 * (_root.getBytesLoaded() / _root.getBytesTotal());
loading_str = ("Loading " + Math.round(percentLoaded)) + "%";
if (percentLoaded < 100) {
gotoAndPlay ("loaderStart");
}
Frame 3
serverPath = "http://play.driftgame.com.au/";
if (id.length > 1) {
leagueGame = true;
trace("this is a league game");
} else {
leagueGame = false;
trace("this is not a league game");
}
if (leagueGame) {
getLeagueInfo_lv = new LoadVars();
getLeagueInfo_lv.onLoad = function (success) {
trace("got league information from server");
_root.leagueName = this.LeagueName;
_root.yourName = this.YourName;
_root.yourScore = Number(this.YourScore);
_root.player_array = new Array();
_root.player_array[0] = new Array();
_root.player_array[0].name = _root.yourName;
_root.player_array[0].score = _root.yourScore;
var _local3 = 1;
while (_local3 <= 15) {
var _local4 = this[("player" + _local3) + "Name"];
var _local6 = Number(this[("player" + _local3) + "Score"]);
if (_local4 != undefined) {
_root.player_array[_local3] = new Array();
_root.player_array[_local3].name = _local4;
_root.player_array[_local3].score = _local6;
}
_local3++;
}
_root.player_array.sortOn("score", 18);
_local3 = 1;
while (_local3 <= 15) {
var _local5 = _root.player_array[_local3 - 1].name;
if (_local5 != undefined) {
_root["leagueTableNumber" + _local3] = _local3;
_root["leagueTableName" + _local3] = _root.player_array[_local3 - 1].name.toUpperCase();
_root["leagueTableScore" + _local3] = _root.player_array[_local3 - 1].score;
} else {
_root["leagueTableName" + _local3] = "";
_root["leagueTableNumber" + _local3] = "";
_root["leagueTableScore" + _local3] = "";
}
if (_root.player_array.length < 15) {
leagueInterface_mc.add_player_button_mc.gotoAndStop(_root.player_array.length + 1);
} else {
leagueInterface_mc.add_player_button_mc.gotoAndStop(1);
}
if (_local5 == _root.yourName) {
leagueInterface_mc[("leagueTableName" + _local3) + "_txt"].textColor = "0xB3FF00";
leagueInterface_mc[("leagueTableScore" + _local3) + "_txt"].textColor = "0xB3FF00";
} else {
leagueInterface_mc[("leagueTableName" + _local3) + "_txt"].textColor = "0xFFFFFF";
leagueInterface_mc[("leagueTableScore" + _local3) + "_txt"].textColor = "0xFFFFFF";
}
_local3++;
}
gotoAndStop ("leagueStart");
};
getLeagueInfo_lv.LID = id;
var serverURL = (_root.serverPath + "getLeagueInfo.cfm");
getLeagueInfo_lv.sendAndLoad(serverURL, getLeagueInfo_lv, "post");
} else {
gotoAndPlay ("SPStart");
}
stop();
Frame 4
_root.currentDrift_str = "";
stop();
Instance of Symbol 91 MovieClip "leagueScreen_mc" in Frame 4
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 111 MovieClip in Frame 4
onClipEvent (load) {
this.buttonText = "START A LEAGUE";
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut, dragOut) {
this.gotoAndStop(1);
}
on (release) {
_root.leagueScreen_mc.gotoAndStop(2);
_root.leagueScreen_mc._visible = true;
_root.startButton._visible = false;
_parent.gotoAndPlay("RealStart");
}
Instance of Symbol 111 MovieClip in Frame 4
onClipEvent (load) {
this.buttonText = "START DRIFTING";
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut, dragOut) {
this.gotoAndStop(1);
}
on (release) {
_parent.gotoAndPlay("RealStart");
}
Frame 5
_root.leagueNameCaps = _root.leagueName.toUpperCase();
stop();
Instance of Symbol 111 MovieClip in Frame 5
onClipEvent (load) {
this.buttonText = "START DRIFTING";
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut, dragOut) {
this.gotoAndStop(1);
}
on (release) {
_parent.gotoAndPlay("RealStart");
}
Frame 6
carData_array = new Array();
var i = 0;
while (i <= 20) {
carData_array[i] = new Array();
i++;
}
carData_array[0].BRAKE_POWER = 0.4;
carData_array[0].MAX_SPEED = 8;
carData_array[0].MAX_SPEED_REVERSE = 3;
carData_array[0].ACCELERATION = 0.4;
carData_array[0].REVERSE_ACCELERATION = 0.2;
carData_array[0].ROAD_WIPEOUT_THRESHOLD = 110;
carData_array[0].GRASS_WIPEOUT_THRESHOLD = 80;
carData_array[0].TYRES = 1;
carData_array[0].MAKE = "LOL";
carData_array[0].TORQUE = "400,0Nm";
carData_array[0].POWER = "281kW";
carData_array[0].WEIGHT = "1,198";
carData_array[1].BRAKE_POWER = 0.4;
carData_array[1].MAX_SPEED = 5.1;
carData_array[1].MAX_SPEED_REVERSE = 3;
carData_array[1].ACCELERATION = 0.42;
carData_array[1].REVERSE_ACCELERATION = 0.2;
carData_array[1].ROAD_WIPEOUT_THRESHOLD = 105;
carData_array[1].GRASS_WIPEOUT_THRESHOLD = 70;
carData_array[1].TYRES = 1;
carData_array[1].MAKE = "101xs";
carData_array[1].TORQUE = "335,0Nm";
carData_array[1].POWER = "295kW";
carData_array[1].WEIGHT = "3,043";
carData_array[2].BRAKE_POWER = 0.4;
carData_array[2].MAX_SPEED = 5.2;
carData_array[2].MAX_SPEED_REVERSE = 3;
carData_array[2].ACCELERATION = 0.38;
carData_array[2].REVERSE_ACCELERATION = 0.2;
carData_array[2].ROAD_WIPEOUT_THRESHOLD = 108;
carData_array[2].GRASS_WIPEOUT_THRESHOLD = 60;
carData_array[2].TYRES = 1;
carData_array[2].MAKE = "DADSON";
carData_array[2].TORQUE = "210,0Nm";
carData_array[2].POWER = "214kW";
carData_array[2].WEIGHT = "3,120";
carData_array[3].BRAKE_POWER = 0.5;
carData_array[3].MAX_SPEED = 5.8;
carData_array[3].MAX_SPEED_REVERSE = 3;
carData_array[3].ACCELERATION = 0.5;
carData_array[3].REVERSE_ACCELERATION = 0.2;
carData_array[3].ROAD_WIPEOUT_THRESHOLD = 120;
carData_array[3].GRASS_WIPEOUT_THRESHOLD = 90;
carData_array[3].TYRES = 1;
carData_array[3].MAKE = "XBOX";
carData_array[3].TORQUE = "507,0Nm";
carData_array[3].POWER = "442kW";
carData_array[3].WEIGHT = "2,245";
carData_array[4].BRAKE_POWER = 0.42;
carData_array[4].MAX_SPEED = 4.5;
carData_array[4].MAX_SPEED_REVERSE = 3;
carData_array[4].ACCELERATION = 0.5;
carData_array[4].REVERSE_ACCELERATION = 0.2;
carData_array[4].ROAD_WIPEOUT_THRESHOLD = 110;
carData_array[4].GRASS_WIPEOUT_THRESHOLD = 85;
carData_array[4].TYRES = 1;
carData_array[4].MAKE = "FJORD";
carData_array[4].TORQUE = "493,0Nm";
carData_array[4].POWER = "413kW";
carData_array[4].WEIGHT = "2,850";
carData_array[5].BRAKE_POWER = 0.4;
carData_array[5].MAX_SPEED = 5;
carData_array[5].MAX_SPEED_REVERSE = 3;
carData_array[5].ACCELERATION = 0.4;
carData_array[5].REVERSE_ACCELERATION = 0.2;
carData_array[5].ROAD_WIPEOUT_THRESHOLD = 110;
carData_array[5].GRASS_WIPEOUT_THRESHOLD = 80;
carData_array[5].TYRES = 1;
carData_array[5].MAKE = "KIDNEY";
carData_array[5].TORQUE = "289,0Nm";
carData_array[5].POWER = "344kW";
carData_array[5].WEIGHT = "2,425";
carData_array[6].BRAKE_POWER = 0.4;
carData_array[6].MAX_SPEED = 4;
carData_array[6].MAX_SPEED_REVERSE = 3;
carData_array[6].ACCELERATION = 0.5;
carData_array[6].REVERSE_ACCELERATION = 0.2;
carData_array[6].ROAD_WIPEOUT_THRESHOLD = 101;
carData_array[6].GRASS_WIPEOUT_THRESHOLD = 70;
carData_array[6].TYRES = 1;
carData_array[6].MAKE = "LOL";
carData_array[6].TORQUE = "350,0Nm";
carData_array[6].POWER = "295kW";
carData_array[6].WEIGHT = "2,641";
carData_array[7].BRAKE_POWER = 0.4;
carData_array[7].MAX_SPEED = 4.8;
carData_array[7].MAX_SPEED_REVERSE = 3;
carData_array[7].ACCELERATION = 0.3;
carData_array[7].REVERSE_ACCELERATION = 0.2;
carData_array[7].ROAD_WIPEOUT_THRESHOLD = 105;
carData_array[7].GRASS_WIPEOUT_THRESHOLD = 70;
carData_array[7].TYRES = 1;
carData_array[7].MAKE = "MINIMAL";
carData_array[7].TORQUE = "200,0Nm";
carData_array[7].POWER = "145kW";
carData_array[7].WEIGHT = "2,254";
carData_array[8].BRAKE_POWER = 0.4;
carData_array[8].MAX_SPEED = 5.1;
carData_array[8].MAX_SPEED_REVERSE = 3;
carData_array[8].ACCELERATION = 0.45;
carData_array[8].REVERSE_ACCELERATION = 0.2;
carData_array[8].ROAD_WIPEOUT_THRESHOLD = 110;
carData_array[8].GRASS_WIPEOUT_THRESHOLD = 70;
carData_array[8].TYRES = 1;
carData_array[8].MAKE = "MUZDA";
carData_array[8].TORQUE = "255,0Nm";
carData_array[8].POWER = "217kW";
carData_array[8].WEIGHT = "2,831";
carData_array[9].BRAKE_POWER = 0.4;
carData_array[9].MAX_SPEED = 5.5;
carData_array[9].MAX_SPEED_REVERSE = 3;
carData_array[9].ACCELERATION = 0.5;
carData_array[9].REVERSE_ACCELERATION = 0.2;
carData_array[9].ROAD_WIPEOUT_THRESHOLD = 120;
carData_array[9].GRASS_WIPEOUT_THRESHOLD = 90;
carData_array[9].TYRES = 1;
carData_array[9].MAKE = "NIMI";
carData_array[9].TORQUE = "163,0Nm";
carData_array[9].POWER = "155kW";
carData_array[9].WEIGHT = "2,730";
carData_array[10].BRAKE_POWER = 0.4;
carData_array[10].MAX_SPEED = 5.5;
carData_array[10].MAX_SPEED_REVERSE = 3;
carData_array[10].ACCELERATION = 0.3;
carData_array[10].REVERSE_ACCELERATION = 0.2;
carData_array[10].ROAD_WIPEOUT_THRESHOLD = 100;
carData_array[10].GRASS_WIPEOUT_THRESHOLD = 70;
carData_array[10].TYRES = 1;
carData_array[10].MAKE = "POSHE";
carData_array[10].TORQUE = "247,0Nm";
carData_array[10].POWER = "258kW";
carData_array[10].WEIGHT = "2,998";
carData_array[11].BRAKE_POWER = 0.4;
carData_array[11].MAX_SPEED = 5;
carData_array[11].MAX_SPEED_REVERSE = 3;
carData_array[11].ACCELERATION = 0.4;
carData_array[11].REVERSE_ACCELERATION = 0.2;
carData_array[11].ROAD_WIPEOUT_THRESHOLD = 105;
carData_array[11].GRASS_WIPEOUT_THRESHOLD = 75;
carData_array[11].TYRES = 1;
carData_array[11].MAKE = "EYELINE";
carData_array[11].TORQUE = "280,0Nm";
carData_array[11].POWER = "270kW";
carData_array[11].WEIGHT = "3,435";
_root.selectedCar = random(12);
_root.leaveSkidMarks = true;
singlePlayerInterface_mc._visible = false;
leagueInterface_mc._visible = false;
donutChallengeInterface_mc._visible = false;
so_id = SharedObject.getLocal("drift");
so_score = SharedObject.getLocal("driftv091");
if (so_score.data.bestDonut == undefined) {
so_score.data.bestDonut = 0;
}
if (so_score.data.bestScore == undefined) {
so_score.data.bestScore = 0;
}
_root.bestScore = so_score.data.bestScore;
_root.bestDonut = so_score.data.bestDonut;
if (so_id.data.SPID == undefined) {
trace("no SPID found... requesting");
getSPID_lv = new LoadVars();
getSPID_lv.onLoad = function (success) {
if (success) {
trace("received SPID of " + this.SPID);
} else {
trace("there was a problem getting a SPID");
}
so_id.data.SPID = this.SPID;
_root.SPID = this.SPID;
getRanking_lv = new LoadVars();
getRanking_lv.score = 0;
getRanking_lv.SPID = _root.SPID;
getRanking_lv.onLoad = function (success) {
if (success) {
trace("LOADING RANK - " + this.SPRanking);
_root.SPRanking = _root.convertNumberDisplay(this.SPRanking);
} else {
trace("-- There was a problem loading the ranking");
}
};
var _local3 = _root.serverPath + "submitSPScore.cfm";
getRanking_lv.sendAndLoad(_local3, submitSPScore_lv, "post");
};
serverURL = serverPath + "requestSPID.cfm";
getSPID_lv.sendAndLoad(serverURL, getSPID_lv, "post");
}
_root.SPID = so_id.data.SPID;
trace("using a SPID of " + _root.SPID);
if (_root.bestScore > 0) {
submitSPScore_lv = new LoadVars();
submitSPScore_lv.score = _root.bestScore;
submitSPScore_lv.SPID = _root.SPID;
submitSPScore_lv.onLoad = function (success) {
if (success) {
trace("received a ranking of " + this.SPRanking);
_root.SPRanking = _root.convertNumberDisplay(this.SPRanking);
} else {
trace("couldn't get the ranking");
}
if (_root.SPRanking == undefined) {
_root.SPRanking = "-----";
}
};
var serverURL = (_root.serverPath + "submitSPScore.cfm");
submitSPScore_lv.sendAndLoad(serverURL, submitSPScore_lv, "post");
}
createEmptyMovieClip("screech_mc", 9879877);
screech_sound = new Sound(screech_mc);
screech_sound.attachSound("screech");
createEmptyMovieClip("engineUp_mc", 9879878);
engineUp_sound = new Sound(engineUp_mc);
engineUp_sound.attachSound("engine_up");
engineUp_sound.onSoundComplete = function () {
topSpeed_sound.start(0, 999);
};
createEmptyMovieClip("engineDown_mc", 9879879);
engineDown_sound = new Sound(engineDown_mc);
engineDown_sound.attachSound("engine_down");
engineDown_sound.onSoundComplete = function () {
idle_sound.start(0, 999);
};
createEmptyMovieClip("topSpeed_mc", 9879880);
topSpeed_sound = new Sound(topSpeed_mc);
topSpeed_sound.attachSound("top_speed");
createEmptyMovieClip("idle_mc", 9879881);
idle_sound = new Sound(idle_mc);
idle_sound.attachSound("idle");
createEmptyMovieClip("beep1_mc", 9879882);
beep1_sound = new Sound(beep1_mc);
beep1_sound.attachSound("beep1");
createEmptyMovieClip("beep2_mc", 9879883);
beep2_sound = new Sound(beep2_mc);
beep2_sound.attachSound("beep2");
engineUp_sound.setVolume(20);
engineDown_sound.setVolume(20);
topSpeed_sound.setVolume(20);
idle_sound.setVolume(10);
beep1_sound.setVolume(20);
beep2_sound.setVolume(20);
play();
Instance of Symbol 214 MovieClip in Frame 6
onClipEvent (load) {
_root.ticks = 0;
}
onClipEvent (enterFrame) {
if (_root.clockOn) {
_root.ticks++;
if (_root.ticks == 40) {
_root.timerSeconds++;
_root.ticks = 0;
}
_root.timerTicks = Math.round(_root.ticks * 25);
if (String(_root.timerTicks).length == 1) {
_root.timerTicks_str = "00" + _root.timerTicks;
} else if (String(_root.timerTicks).length == 2) {
_root.timerTicks_str = "0" + _root.timerTicks;
} else {
_root.timerTicks_str = _root.timerTicks;
}
if (_root.timerSeconds == 60) {
_root.timerMinutes++;
_root.timerSeconds = 0;
}
if (String(_root.timerSeconds).length == 1) {
_root.timerSeconds_str = "0" + _root.timerSeconds;
} else {
_root.timerSeconds_str = _root.timerSeconds;
}
if (_root.timerSeconds == 30) {
_root.alert_mc.alert = "YOU TOOK TOO LONG!";
_root.alert_mc.play();
if (_root.leagueGame) {
_root.gotoAndPlay("reset_game_league");
} else {
_root.gotoAndPlay("reset_game");
}
}
}
}
Instance of Symbol 216 MovieClip in Frame 6
onClipEvent (enterFrame) {
_root.score_str = _root.convertNumberDisplay(_root.score);
}
Instance of Symbol 218 MovieClip in Frame 6
onClipEvent (enterFrame) {
_root.time_str = (((_root.timerMinutes + "'") + _root.timerSeconds_str) + "''") + _root.timerTicks_str;
_root.timeNumber = ((_root.timerMinutes * 60000) + (_root.timerSeconds * 1000)) + _root.timerTicks;
_root.currentTimeBonus = 60000 - ((10 * Math.round(_root.timeNumber / 10)) * 2);
if (_root.currentTimeBonus < 0) {
_root.currentTimeBonus = 0;
}
_root.bestScore_str = _root.convertNumberDisplay(_root.bestScore);
_root.bestDonut_str = _root.convertNumberDisplay(_root.bestDonut);
_root.finalScore_str = _root.convertNumberDisplay(_root.finalScore);
_root.currentTimeBonus_str = _root.convertNumberDisplay(_root.currentTimeBonus);
}
Instance of Symbol 225 MovieClip "restart_button_mc" in Frame 6
onClipEvent (load) {
this._visible = false;
}
on (release) {
_root.resultsPanel_mc._visible = false;
if (_root.leagueGame) {
_root.gotoAndPlay("reset_game_league");
} else {
_root.gotoAndPlay("reset_game");
}
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut, dragOut) {
this.gotoAndStop(1);
}
Instance of Symbol 43 MovieClip "garageButton_mc" in Frame 6
onClipEvent (load) {
this.buttonText_str = "UPGRADE YOUR CAR";
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut, dragOut) {
this.gotoAndStop(1);
}
on (release) {
garageTracker_lv = new LoadVars();
garageTracker_lv.Keyword = "carUpgrade";
_root.gotoAndPlay("garage_in");
}
Instance of Symbol 256 MovieClip in Frame 6
onClipEvent (enterFrame) {
var amountToRotate = (200 * ((_root.game_mc.car.directionLatency - _root.game_mc.car.SKIDMARK_THRESHOLD) / (_root.game_mc.car.wipeOutThreshold - _root.game_mc.car.SKIDMARK_THRESHOLD)));
if (amountToRotate > 220) {
amountToRotate = 220;
}
if ((amountToRotate < 0) or (_root.game_mc.car.currentSpeed == 0)) {
amountToRotate = 0;
}
this.needle_mc._rotation = -162 + amountToRotate;
}
Instance of Symbol 276 MovieClip "lights_mc" in Frame 6
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 285 MovieClip "resultsPanel_mc" in Frame 6
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 290 MovieClip "sign_up_mc" in Frame 6
onClipEvent (load) {
this._visible = false;
}
Frame 7
_root.spaceToStart = true;
if (_root.leagueGame) {
gotoAndPlay ("reset_game_league");
} else {
gotoAndPlay ("reset_game");
}
stop();
Frame 19
_root.currentDrift_str = "";
var i = 1;
while (i <= 3) {
game_mc["powerup" + i].gotoAndStop(1);
i++;
}
_root.game_mc.video_mc.gotoAndPlay("crowd");
stopAllSounds();
Stage.scaleMode = "noscale";
_root.driftScoreMultiplier = 1;
_root.DRIFT_SCORE_MULTIPLIER_INTERVAL = 15;
_root.driftScoreMultiplier_str = "";
_root.startBonus = "";
_root.score = 0;
_root.gateCount = 6;
_root.lapCount = 1;
_root.gameTicks = 0;
_root.timerMinutes = 0;
captureKeys = false;
if (!_root.spaceToStart) {
_root.lights_mc.gotoAndPlay(2);
}
_root.donutChallenge = false;
game_mc.car.MULTIPLIER_TIMEOUT = 15;
_root.ghostPlayback = false;
_root.triggerDonut = false;
game_mc.car._x = game_mc.car.startX;
game_mc.car._y = game_mc.car.startY;
idle_sound.start(0, 999);
if (game_mc.car.currentSkidmarkDepth > 0) {
var i = 1;
while (i <= game_mc.car.currentSkidmarkDepth) {
eval ("game_mc.tracks" + i).removeMovieClip();
i++;
}
}
new mx.transitions.Tween(_root.garageButton_mc, "_alpha", easeType, _root.garageButton_mc._alpha, 100, 20);
new mx.transitions.Tween(_root.donutButton_mc, "_alpha", easeType, _root.donutButton_mc._alpha, 100, 20);
_root.singlePlayerInterface_mc._visible = true;
_root.lights_mc._visible = true;
clockOn = false;
_root.timerMinutes = 0;
_root.timerSeconds = 0;
_root.timerTicks = 0;
_root.timerSeconds_str = "00";
_root.timerTicks_str = "000";
_root.gameActive = false;
_root.readyToGo = true;
_root.raceStarted = false;
if (!_root.ghostPlayback) {
keyCapture_array = new Array();
}
removeMovieClip(game_mc.car);
game_mc.originalCar.duplicateMovieClip("car", 999999);
game_mc.car._alpha = 100;
game_mc.originalCar._alpha = 0;
if (_root.selectedCar) {
game_mc.car.carNumber = _root.selectedCar;
}
game_mc.car.setCarStats(game_mc.car.carNumber);
game_mc.car.gotoAndStop(game_mc.car.carNumber);
game_mc.gate1_mc.gotoAndStop(1);
game_mc.gate2_mc.gotoAndStop(1);
game_mc.gate3_mc.gotoAndStop(1);
game_mc.gate4_mc.gotoAndStop(1);
game_mc.gate5_mc.gotoAndStop(1);
game_mc.car.active = true;
_root.ghostPlayback = false;
keyPlayback_str = "0000000000000444444444455555444444444455554444466666666664444446666666666666666444466666444444444455555555555555444444555555555555555444445555555444444444666666444444666666666666666666664444444444446666666666444444444466664444444444444444445555555555444444444444446666644446666666644444666666444444444555555544444444555444444444666444446666666666666666666666444444444444555554444444444444445555555555555555554444444000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000undefined";
keyPlayback_array = keyPlayback_str.split("");
for (i in keyPlayback_array) {
if (keyPlayback_array[i] == "A") {
keyPlayback_array[i] = 10;
} else if (keyPlayback_array[i] == "B") {
keyPlayback_array[i] = 11;
} else if (keyPlayback_array[i] == "C") {
keyPlayback_array[i] = 12;
} else if (keyPlayback_array[i] == "D") {
keyPlayback_array[i] = 13;
} else if (keyPlayback_array[i] == "E") {
keyPlayback_array[i] = 14;
} else if (keyPlayback_array[i] == "F") {
keyPlayback_array[i] = 15;
} else {
keyPlayback_array[i] = Number(keyPlayback_array[i]);
}
}
Frame 20
if (clockOn) {
_root.gameTicks++;
}
if ((!_root.ghostPlayback) and _root.captureKeys) {
keyCapCode = 0;
if (Key.isDown(37)) {
keyCapCode = keyCapCode + 1;
}
if (Key.isDown(39)) {
keyCapCode = keyCapCode + 2;
}
if (Key.isDown(38)) {
keyCapCode = keyCapCode + 4;
}
if (Key.isDown(40)) {
keyCapCode = keyCapCode + 8;
}
keyCapture_array.push(keyCapCode);
keyCapture_str = "";
j = 0;
while (j <= keyCapture_array.length) {
if (keyCapture_array[j] == 10) {
keyCapture_str = keyCapture_str + "A";
} else if (keyCapture_array[j] == 11) {
keyCapture_str = keyCapture_str + "B";
} else if (keyCapture_array[j] == 12) {
keyCapture_str = keyCapture_str + "C";
} else if (keyCapture_array[j] == 13) {
keyCapture_str = keyCapture_str + "D";
} else if (keyCapture_array[j] == 14) {
keyCapture_str = keyCapture_str + "E";
} else if (keyCapture_array[j] == 15) {
keyCapture_str = keyCapture_str + "F";
} else {
keyCapture_str = keyCapture_str + keyCapture_array[j];
}
j++;
}
}
if (_root.gameActive) {
game_mc.car.updatePosition();
}
Frame 21
if (_root.triggerDonut) {
gotoAndPlay ("donut");
} else {
gotoAndPlay ("gameLoopStart");
}
Frame 44
_root.garage = true;
var easeType = mx.transitions.easing.Strong.easeOut;
new mx.transitions.Tween(_root.game_mc, "_y", easeType, _root.game_mc._y, -405, 20);
game_mc.car.setCarStats(0);
clockOn = false;
_root.startButton._visible = false;
_root.gameTicks = 0;
Instance of Symbol 349 MovieClip "carSelector_mc" in Frame 44
onClipEvent (load) {
this._visible = false;
}
Frame 63
_root.game_mc.car._x = 48;
_root.game_mc.car._y = 424;
_root.game_mc.car._rotation = 180;
_root.game_mc.car.direction = 180;
_root.game_mc.car.heading = 180;
_root.game_mc.car.currentSpeed = 0;
_root.game_mc.car.directionLatency = 0;
_root.game_mc.car.steeringPosition = 0;
_root.keyPlayback_str = "0004444444444444444444444444444444555555555544444444444444446666644444400000000444554445555555555111111111115554444444455555511111111888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000088AAAAAAAA0022AAAAAAAAAAA800000155555555544444544666666666666444446666666644444445555555554444444444666666644446664444455554555555400000000000000000000000000000000000000000000000000000000";
keyPlayback_array = keyPlayback_str.split("");
Frame 64
_root.captureKeys = false;
if (!_root.paused) {
_root.gameTicks++;
}
if (_root.gameTicks == 149) {
_root.carSelector_mc._visible = true;
_root.carSelector_mc.gotoAndStop(_root.game_mc.car.carNumber);
}
if (_root.gameTicks == 150) {
_root.paused = true;
}
_root.ghostPlayback = true;
for (i in keyPlayback_array) {
if (keyPlayback_array[i] == "A") {
keyPlayback_array[i] = 10;
} else if (keyPlayback_array[i] == "B") {
keyPlayback_array[i] = 11;
} else if (keyPlayback_array[i] == "C") {
keyPlayback_array[i] = 12;
} else if (keyPlayback_array[i] == "D") {
keyPlayback_array[i] = 13;
} else if (keyPlayback_array[i] == "E") {
keyPlayback_array[i] = 14;
} else if (keyPlayback_array[i] == "F") {
keyPlayback_array[i] = 15;
} else {
keyPlayback_array[i] = Number(keyPlayback_array[i]);
}
}
if ((!_root.ghostPlayback) and _root.captureKeys) {
keyCapCode = 0;
if (Key.isDown(37)) {
keyCapCode = keyCapCode + 1;
}
if (Key.isDown(39)) {
keyCapCode = keyCapCode + 2;
}
if (Key.isDown(38)) {
keyCapCode = keyCapCode + 4;
}
if (Key.isDown(40)) {
keyCapCode = keyCapCode + 8;
}
keyCapture_array.push(keyCapCode);
keyCapture_str = "";
j = 0;
while (j <= keyCapture_array.length) {
if (keyCapture_array[j] == 10) {
keyCapture_str = keyCapture_str + "A";
} else if (keyCapture_array[j] == 11) {
keyCapture_str = keyCapture_str + "B";
} else if (keyCapture_array[j] == 12) {
keyCapture_str = keyCapture_str + "C";
} else if (keyCapture_array[j] == 13) {
keyCapture_str = keyCapture_str + "D";
} else if (keyCapture_array[j] == 14) {
keyCapture_str = keyCapture_str + "E";
} else if (keyCapture_array[j] == 15) {
keyCapture_str = keyCapture_str + "F";
} else {
keyCapture_str = keyCapture_str + keyCapture_array[j];
}
j++;
}
}
if (!_root.paused) {
game_mc.car.updatePosition();
}
Frame 65
gotoAndPlay ("garageLoopIn");
Frame 76
var easeType = mx.transitions.easing.Strong.easeOut;
_root.carSelector_mc._visible = false;
_root.gameTicks = 0;
Frame 86
_root.keyPlayback_str = "88AAAAAAAA0022AAAAAAAAAAA800000155555555544444544666666666666444446666666644444445555555554444444444666666644446664444455554555555400000000000000000000000000000000000000000000000000000000";
keyPlayback_array = keyPlayback_str.split("");
Frame 87
_root.captureKeys = false;
if (!_root.paused) {
_root.gameTicks++;
}
if (_root.gameTicks > 140) {
_root.garage = false;
var easeType = mx.transitions.easing.Strong.easeOut;
new mx.transitions.Tween(_root.game_mc, "_y", easeType, _root.game_mc._y, 71.4, 20);
game_mc.car._x = game_mc.car.startX;
game_mc.car._y = game_mc.car.startY;
game_mc.car._rotation = 0;
game_mc.car.direction = 0;
game_mc.car.heading = 0;
_root.startButton._visible = true;
_root.spaceToStart = true;
if (_root.leagueGame) {
gotoAndPlay ("reset_game_league");
} else {
gotoAndPlay ("reset_game");
}
}
_root.ghostPlayback = true;
for (i in keyPlayback_array) {
if (keyPlayback_array[i] == "A") {
keyPlayback_array[i] = 10;
} else if (keyPlayback_array[i] == "B") {
keyPlayback_array[i] = 11;
} else if (keyPlayback_array[i] == "C") {
keyPlayback_array[i] = 12;
} else if (keyPlayback_array[i] == "D") {
keyPlayback_array[i] = 13;
} else if (keyPlayback_array[i] == "E") {
keyPlayback_array[i] = 14;
} else if (keyPlayback_array[i] == "F") {
keyPlayback_array[i] = 15;
} else {
keyPlayback_array[i] = Number(keyPlayback_array[i]);
}
}
if ((!_root.ghostPlayback) and _root.captureKeys) {
keyCapCode = 0;
if (Key.isDown(37)) {
keyCapCode = keyCapCode + 1;
}
if (Key.isDown(39)) {
keyCapCode = keyCapCode + 2;
}
if (Key.isDown(38)) {
keyCapCode = keyCapCode + 4;
}
if (Key.isDown(40)) {
keyCapCode = keyCapCode + 8;
}
keyCapture_array.push(keyCapCode);
keyCapture_str = "";
j = 0;
while (j <= keyCapture_array.length) {
if (keyCapture_array[j] == 10) {
keyCapture_str = keyCapture_str + "A";
} else if (keyCapture_array[j] == 11) {
keyCapture_str = keyCapture_str + "B";
} else if (keyCapture_array[j] == 12) {
keyCapture_str = keyCapture_str + "C";
} else if (keyCapture_array[j] == 13) {
keyCapture_str = keyCapture_str + "D";
} else if (keyCapture_array[j] == 14) {
keyCapture_str = keyCapture_str + "E";
} else if (keyCapture_array[j] == 15) {
keyCapture_str = keyCapture_str + "F";
} else {
keyCapture_str = keyCapture_str + keyCapture_array[j];
}
j++;
}
}
if (!_root.paused) {
game_mc.car.updatePosition();
}
Frame 88
gotoAndPlay ("garageLoopOut");
trace(_root.gameTicks);
Frame 111
_root.donutChallenge = true;
_root.triggerDonut = false;
_root.clockOn = false;
trace("donut challenge started");
var easeType = mx.transitions.easing.Strong.easeOut;
new mx.transitions.Tween(_root.game_mc, "_y", easeType, _root.game_mc._y, -405, 20);
new mx.transitions.Tween(_root.garageButton_mc, "_alpha", easeType, _root.garageButton_mc._alpha, 0, 20);
_root.singlePlayerInterface_mc._visible = false;
_root.leagueInterface_mc._visible = false;
_root.donutChallengeInterface_mc._visible = true;
_root.startButton._visible = false;
_root.gameTicks = 0;
game_mc.car.MULTIPLIER_TIMEOUT = 0;
Instance of Symbol 43 MovieClip in Frame 111
onClipEvent (load) {
this.buttonText_str = "UPGRADE YOUR CAR";
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut, dragOut) {
this.gotoAndStop(1);
}
on (release) {
_root.paused = true;
_root.leagueScreen_mc._visible = false;
_root.carSelector_mc._visible = true;
_root.sign_up_mc._visible = false;
_root.carSelector_mc.gotoAndStop(_root.game_mc.car.carNumber);
}
Instance of Symbol 43 MovieClip in Frame 111
onClipEvent (load) {
this.buttonText_str = "BACK TO GAME";
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut, dragOut) {
this.gotoAndStop(1);
}
on (release) {
_root.carSelector_mc._visible = false;
_root.leagueScreen_mc._visible = false;
_root.startButton._visible = true;
_root.spaceToStart = true;
var easeType = mx.transitions.easing.Strong.easeOut;
new mx.transitions.Tween(_root.game_mc, "_y", easeType, _root.game_mc._y, 71.4, 20);
if (_root.leagueGame) {
_root.gotoAndPlay("reset_game_league");
} else {
_root.gotoAndPlay("reset_game");
}
}
Frame 115
_root.clockOn = false;
_root.donutChallenge = true;
Frame 116
if (!_root.paused) {
game_mc.car.updatePosition();
}
Frame 117
if (_root.donutChallenge) {
gotoAndPlay ("donutLoopStart");
} else if (_root.leagueGame) {
_root.gotoAndPlay("reset_game_league");
} else {
_root.gotoAndPlay("reset_game");
}
Frame 137
_root.lights_mc._visible = true;
_root.leagueGame = true;
_root.currentDrift_str = "";
var i = 1;
while (i <= 3) {
game_mc["powerup" + i].gotoAndStop(1);
i++;
}
_root.game_mc.video_mc.gotoAndPlay("crowd");
stopAllSounds();
Stage.scaleMode = "noscale";
_root.driftScoreMultiplier = 1;
_root.DRIFT_SCORE_MULTIPLIER_INTERVAL = 15;
_root.driftScoreMultiplier_str = "";
_root.score = 0;
_root.gateCount = 6;
_root.lapCount = 1;
_root.gameTicks = 0;
_root.timerMinutes = 0;
captureKeys = false;
_root.startBonus = "";
_root.readyToGo = true;
_root.raceStarted = false;
if (!_root.spaceToStart) {
_root.lights_mc.gotoAndPlay(2);
}
_root.donutChallenge = false;
game_mc.car.MULTIPLIER_TIMEOUT = 15;
_root.ghostPlayback = false;
game_mc.car._x = game_mc.car.startX;
game_mc.car._y = game_mc.car.startY;
if (game_mc.car.currentSkidmarkDepth > 0) {
var i = 1;
while (i <= game_mc.car.currentSkidmarkDepth) {
eval ("game_mc.tracks" + i).removeMovieClip();
i++;
}
}
new mx.transitions.Tween(_root.garageButton_mc, "_alpha", easeType, _root.garageButton_mc._alpha, 100, 20);
new mx.transitions.Tween(_root.donutButton_mc, "_alpha", easeType, _root.donutButton_mc._alpha, 100, 20);
_root.leagueInterface_mc._visible = true;
_root.lights_mc._visible = true;
game_mc.gate1_mc.gotoAndStop(1);
game_mc.gate2_mc.gotoAndStop(1);
game_mc.gate3_mc.gotoAndStop(1);
game_mc.gate4_mc.gotoAndStop(1);
game_mc.gate5_mc.gotoAndStop(1);
clockOn = false;
_root.timerMinutes = 0;
_root.timerSeconds = 0;
_root.timerTicks = 0;
_root.timerSeconds_str = "00";
_root.timerTicks_str = "000";
_root.gameActive = false;
_root.readyToGo = true;
if (!_root.ghostPlayback) {
keyCapture_array = new Array();
}
removeMovieClip(game_mc.car);
game_mc.originalCar.duplicateMovieClip("car", 999999);
game_mc.car._alpha = 100;
game_mc.originalCar._alpha = 0;
if (_root.selectedCar) {
game_mc.car.carNumber = _root.selectedCar;
}
game_mc.car.setCarStats(game_mc.car.carNumber);
game_mc.car.gotoAndStop(game_mc.car.carNumber);
game_mc.car.active = true;
gameStartTime = getTimer();
_root.ghostPlayback = false;
keyPlayback_str = "0000000000000444444444455555444444444455554444466666666664444446666666666666666444466666444444444455555555555555444444555555555555555444445555555444444444666666444444666666666666666666664444444444446666666666444444444466664444444444444444445555555555444444444444446666644446666666644444666666444444444555555544444444555444444444666444446666666666666666666666444444444444555554444444444444445555555555555555554444444000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000undefined";
keyPlayback_array = keyPlayback_str.split("");
for (i in keyPlayback_array) {
if (keyPlayback_array[i] == "A") {
keyPlayback_array[i] = 10;
} else if (keyPlayback_array[i] == "B") {
keyPlayback_array[i] = 11;
} else if (keyPlayback_array[i] == "C") {
keyPlayback_array[i] = 12;
} else if (keyPlayback_array[i] == "D") {
keyPlayback_array[i] = 13;
} else if (keyPlayback_array[i] == "E") {
keyPlayback_array[i] = 14;
} else if (keyPlayback_array[i] == "F") {
keyPlayback_array[i] = 15;
} else {
keyPlayback_array[i] = Number(keyPlayback_array[i]);
}
}
getLeagueInfo_lv = new LoadVars();
getLeagueInfo_lv.onLoad = function (success) {
trace("got league information from server");
_root.leagueName = this.LeagueName;
_root.yourName = this.YourName;
_root.yourScore = Number(this.YourScore);
_root.player_array = new Array();
_root.player_array[0] = new Array();
_root.player_array[0].name = _root.yourName;
_root.player_array[0].score = _root.yourScore;
var _local3 = 1;
while (_local3 <= 15) {
var _local4 = this[("player" + _local3) + "Name"];
var _local6 = Number(this[("player" + _local3) + "Score"]);
if (_local4 != undefined) {
_root.player_array[_local3] = new Array();
_root.player_array[_local3].name = _local4;
_root.player_array[_local3].score = _local6;
}
_local3++;
}
_root.player_array.sortOn("score", 18);
_local3 = 1;
while (_local3 <= 15) {
var _local5 = _root.player_array[_local3 - 1].name;
if (_local5 != undefined) {
_root["leagueTableNumber" + _local3] = _local3;
_root["leagueTableName" + _local3] = _root.player_array[_local3 - 1].name.toUpperCase();
_root["leagueTableScore" + _local3] = _root.player_array[_local3 - 1].score;
} else {
_root["leagueTableName" + _local3] = "";
_root["leagueTableNumber" + _local3] = "";
_root["leagueTableScore" + _local3] = "";
}
if (_root.player_array.length < 15) {
leagueInterface_mc.add_player_button_mc.gotoAndStop(_root.player_array.length + 1);
} else {
leagueInterface_mc.add_player_button_mc.gotoAndStop(1);
}
if (_local5 == _root.yourName) {
leagueInterface_mc[("leagueTableName" + _local3) + "_txt"].textColor = "0xB3FF00";
leagueInterface_mc[("leagueTableScore" + _local3) + "_txt"].textColor = "0xB3FF00";
} else {
leagueInterface_mc[("leagueTableName" + _local3) + "_txt"].textColor = "0xFFFFFF";
leagueInterface_mc[("leagueTableScore" + _local3) + "_txt"].textColor = "0xFFFFFF";
}
_local3++;
}
};
getLeagueInfo_lv.LID = id;
var serverURL = (_root.serverPath + "getLeagueInfo.cfm");
getLeagueInfo_lv.sendAndLoad(serverURL, getLeagueInfo_lv, "post");
Instance of Symbol 225 MovieClip "restart_button_mc" in Frame 137
onClipEvent (load) {
this._visible = false;
}
on (release) {
_root.resultsPanel_mc._visible = false;
if (_root.leagueGame) {
_root.gotoAndPlay("reset_game_league");
} else {
_root.gotoAndPlay("reset_game");
}
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut, dragOut) {
this.gotoAndStop(1);
}
Instance of Symbol 43 MovieClip "garageButton_mc" in Frame 137
onClipEvent (load) {
this.buttonText_str = "UPGRADE YOUR CAR";
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut, dragOut) {
this.gotoAndStop(1);
}
on (release) {
_root.gotoAndPlay("garage_in");
}
Instance of Symbol 256 MovieClip in Frame 137
onClipEvent (enterFrame) {
var amountToRotate = (200 * ((_root.game_mc.car.directionLatency - _root.game_mc.car.SKIDMARK_THRESHOLD) / (_root.game_mc.car.wipeOutThreshold - _root.game_mc.car.SKIDMARK_THRESHOLD)));
if (amountToRotate > 220) {
amountToRotate = 220;
}
if ((amountToRotate < 0) or (_root.game_mc.car.currentSpeed == 0)) {
amountToRotate = 0;
}
this.needle_mc._rotation = -162 + amountToRotate;
}
Instance of Symbol 276 MovieClip "lights_mc" in Frame 137
onClipEvent (load) {
this._visible = true;
}
Instance of Symbol 285 MovieClip "resultsPanel_mc" in Frame 137
onClipEvent (load) {
this._visible = false;
}
Instance of Symbol 434 MovieClip "add_a_player_mc" in Frame 137
onClipEvent (load) {
this._visible = false;
}
Frame 138
if (clockOn) {
_root.gameTicks++;
}
if ((!_root.ghostPlayback) and _root.captureKeys) {
keyCapCode = 0;
if (Key.isDown(37)) {
keyCapCode = keyCapCode + 1;
}
if (Key.isDown(39)) {
keyCapCode = keyCapCode + 2;
}
if (Key.isDown(38)) {
keyCapCode = keyCapCode + 4;
}
if (Key.isDown(40)) {
keyCapCode = keyCapCode + 8;
}
keyCapture_array.push(keyCapCode);
keyCapture_str = "";
j = 0;
while (j <= keyCapture_array.length) {
if (keyCapture_array[j] == 10) {
keyCapture_str = keyCapture_str + "A";
} else if (keyCapture_array[j] == 11) {
keyCapture_str = keyCapture_str + "B";
} else if (keyCapture_array[j] == 12) {
keyCapture_str = keyCapture_str + "C";
} else if (keyCapture_array[j] == 13) {
keyCapture_str = keyCapture_str + "D";
} else if (keyCapture_array[j] == 14) {
keyCapture_str = keyCapture_str + "E";
} else if (keyCapture_array[j] == 15) {
keyCapture_str = keyCapture_str + "F";
} else {
keyCapture_str = keyCapture_str + keyCapture_array[j];
}
j++;
}
}
if (_root.gameActive) {
game_mc.car.updatePosition();
}
Frame 139
if (_root.triggerDonut) {
gotoAndPlay ("donut");
} else {
gotoAndPlay ("gameLoopStartLeague");
}
Frame 200
stop();
Symbol 30 MovieClip [Vehicle] Frame 1
#initclip 6
Object.registerClass("Vehicle", Vehicle);
#endinitclip
stop();
Symbol 30 MovieClip [Vehicle] Frame 2
stop();
Symbol 30 MovieClip [Vehicle] Frame 3
stop();
Symbol 30 MovieClip [Vehicle] Frame 4
stop();
Symbol 30 MovieClip [Vehicle] Frame 5
stop();
Symbol 30 MovieClip [Vehicle] Frame 6
stop();
Symbol 30 MovieClip [Vehicle] Frame 7
stop();
Symbol 30 MovieClip [Vehicle] Frame 8
stop();
Symbol 30 MovieClip [Vehicle] Frame 9
stop();
Symbol 30 MovieClip [Vehicle] Frame 10
stop();
Symbol 30 MovieClip [Vehicle] Frame 11
stop();
Symbol 435 MovieClip [__Packages.Vehicle] Frame 0
class Vehicle extends MovieClip
{
var currentSpeed, heading, direction, directionLatency, steeringPosition, gotoAndStop, carNumber, startX, _x, startY, _y, BRAKE_POWER, MAX_SPEED, MAX_SPEED_REVERSE, ACCELERATION, REVERSE_ACCELERATION, ROAD_WIPEOUT_THRESHOLD, GRASS_WIPEOUT_THRESHOLD, tyres, _rotation, turningLeft, turningRight, accelerating, braking, wipeOutThreshold, lostIt, steeringResponse;
function Vehicle () {
super();
currentSpeed = 0;
heading = 0;
direction = 0;
directionLatency = 0;
steeringPosition = 0;
gotoAndStop(carNumber);
startX = _x;
startY = _y;
BRAKE_POWER = _root.carData_array[carNumber].BRAKE_POWER;
MAX_SPEED = _root.carData_array[carNumber].MAX_SPEED;
MAX_SPEED_REVERSE = _root.carData_array[carNumber].MAX_SPEED_REVERSE;
ACCELERATION = _root.carData_array[carNumber].ACCELERATION;
REVERSE_ACCELERATION = _root.carData_array[carNumber].REVERSE_ACCELERATION;
ROAD_WIPEOUT_THRESHOLD = _root.carData_array[carNumber].ROAD_WIPEOUT_THRESHOLD;
GRASS_WIPEOUT_THRESHOLD = _root.carData_array[carNumber].GRASS_WIPEOUT_THRESHOLD;
tyres = _root.carData_array[carNumber].TYRES;
}
function updatePosition() {
var newXPosition = (_x + (Math.sin((direction * Math.PI) / 180) * currentSpeed));
var newYPosition = (_y - (Math.cos((direction * Math.PI) / 180) * currentSpeed));
_x = newXPosition;
_y = newYPosition;
x = _x;
y = _y;
_rotation = heading;
turningLeft = false;
turningRight = false;
if (!_root.ghostPlayback) {
if (Key.isDown(37)) {
turningLeft = true;
}
if (Key.isDown(39)) {
turningRight = true;
}
if (Key.isDown(38)) {
if (_root.gameTicks == 1) {
_root.engineUp_sound.start(audioStartPointUp, 1);
}
if (accelerating == false) {
var acceleratorHit = true;
} else {
var acceleratorHit = false;
}
accelerating = true;
} else {
if (accelerating == true) {
var acceleratorRelease = true;
} else {
var acceleratorRelease = false;
}
accelerating = false;
}
if (Key.isDown(40)) {
braking = true;
} else {
braking = false;
}
} else {
if (_root.keyPlayback_array[_root.gameTicks] & 1) {
turningLeft = true;
}
if (_root.keyPlayback_array[_root.gameTicks] & 2) {
turningRight = true;
}
if (_root.keyPlayback_array[_root.gameTicks] & 4) {
if (accelerating == false) {
var acceleratorHit = true;
} else {
var acceleratorHit = false;
}
accelerating = true;
} else {
if (accelerating == true) {
var acceleratorRelease = true;
} else {
var acceleratorRelease = false;
}
accelerating = false;
}
if (_root.keyPlayback_array[_root.gameTicks] & 8) {
braking = true;
} else {
braking = false;
}
}
if ((acceleratorHit and (!_root.raceStarted)) and (!_root.garage)) {
trace("STARTED AT " + _root.gameTicks);
_root.startBonus = (10 - _root.gameTicks) * 1000;
trace("garage is " + _root.garage);
if (((_root.startBonus <= 0) or _root.garage) or _root.donutChallenge) {
_root.startBonus = "";
} else {
_root.bonusPoints(_root.startBonus);
}
_root.raceStarted = true;
}
if (_root.gameTicks > 60) {
_root.startBonus = "";
}
var audioStartPointUp = ((currentSpeed / MAX_SPEED) * 3);
var audioStartPointDown = (3 - audioStartPointUp);
if (acceleratorHit) {
trace("trigger");
_root.engineDown_sound.stop();
_root.idle_sound.stop();
_root.engineUp_sound.stop();
_root.engineUp_sound.start(audioStartPointUp, 1);
}
if (acceleratorRelease) {
_root.engineUp_sound.stop();
_root.topSpeed_sound.stop();
_root.engineDown_sound.stop();
_root.engineDown_sound.start(audioStartPointDown, 1);
}
if (loseIt) {
_root.engineUp_sound.stop();
_root.topSpeed_sound.stop();
_root.engineDown_sound.stop();
_root.engineDown_sound.start(audioStartPointDown, 1);
loseIt = false;
}
if (onGrass) {
wipeOutThreshold = GRASS_WIPEOUT_THRESHOLD;
} else {
wipeOutThreshold = ROAD_WIPEOUT_THRESHOLD;
}
switch (tyres) {
case 1 :
break;
case 2 :
wipeOutThreshold = wipeOutThreshold + 10;
break;
case 3 :
wipeOutThreshold = wipeOutThreshold + 5;
}
if (onBump) {
currentSpeed = currentSpeed * Math.random();
wipeOutThreshold = BUMP_WIPEOUT_THRESHOLD;
}
if (onOil) {
lostIt = true;
}
if (!lostIt) {
if (accelerating) {
if (currentSpeed < MAX_SPEED) {
currentSpeed = currentSpeed + ACCELERATION;
}
} else if (braking) {
if (currentSpeed > 0) {
currentSpeed = currentSpeed - BRAKE_POWER;
if (currentSpeed < 0) {
}
} else {
reversing = true;
currentSpeed = currentSpeed - REVERSE_ACCELERATION;
}
} else if ((currentSpeed > 0) and (!lostIt)) {
reversing = false;
currentSpeed = currentSpeed - FRICTION;
if (currentSpeed < 0) {
currentSpeed = 0;
}
}
}
if (lostIt) {
currentSpeed = currentSpeed - WIPE_OUT_FRICTION;
}
if (lostIt) {
if (steeringPosition > 0) {
turningRight = true;
} else {
turningLeft = true;
}
}
if (turningLeft) {
if (steeringPosition > (-STEERING_MAX)) {
steeringPosition = steeringPosition - STEERING_RATE_OF_CHANGE;
}
} else if (turningRight) {
if (steeringPosition < STEERING_MAX) {
steeringPosition = steeringPosition + STEERING_RATE_OF_CHANGE;
}
} else {
if (steeringPosition > 0) {
steeringPosition = steeringPosition - STEERING_RATE_OF_CHANGE;
} else if (steeringPosition < 0) {
steeringPosition = steeringPosition + STEERING_RATE_OF_CHANGE;
}
if (Math.abs(steeringPosition) < STEERING_RATE_OF_CHANGE) {
steeringPosition = 0;
}
}
heading = heading + ((currentSpeed / MAX_SPEED) * steeringPosition);
heading = Math.round(heading);
steeringResponse = (DRIFT - ((currentSpeed / MAX_SPEED) * 2)) + ((directionLatency / 90) * 4);
if (!lostIt) {
if (direction < heading) {
direction = direction + steeringResponse;
directionLatency = heading - direction;
} else if (direction > heading) {
direction = direction - steeringResponse;
directionLatency = direction - heading;
}
}
if (currentSpeed < 0) {
if (currentSpeed < (-MAX_SPEED_REVERSE)) {
currentSpeed = -MAX_SPEED_REVERSE;
}
if ((currentSpeed < (-FRICTION)) and (!reversing)) {
currentSpeed = 0;
} else {
currentSpeed = currentSpeed + FRICTION;
}
}
if (currentSpeed <= 0) {
direction = heading;
directionLatency = 0;
lostIt = false;
accelerating = false;
}
if ((directionLatency > SKIDMARK_THRESHOLD) and (!lostIt)) {
currentSkidmarkDepth++;
_root.newClipName = "tracks" + currentSkidmarkDepth;
if (_root.leaveSkidMarks) {
if (onGrass) {
_root.game_mc.tracks_grass.duplicateMovieClip(_root.newClipName, currentSkidmarkDepth);
} else {
_root.game_mc.tracks_road.duplicateMovieClip(_root.newClipName, currentSkidmarkDepth);
}
var skidAmount = (directionLatency - SKIDMARK_THRESHOLD);
eval ("_root.game_mc." + _root.newClipName)._x = _x;
eval ("_root.game_mc." + _root.newClipName)._y = _y;
if (direction < heading) {
eval ("_root.game_mc." + _root.newClipName)._rotation = direction - SKIDMARK_ADJUSTMENT;
} else {
eval ("_root.game_mc." + _root.newClipName)._rotation = direction + SKIDMARK_ADJUSTMENT;
}
eval ("_root.game_mc." + _root.newClipName)._alpha = skidAmount;
_root.screech_sound.setVolume(skidAmount);
}
}
if (!lostIt) {
var speedBleed = (SPEED_BLEED_STRENGTH * (Math.abs(directionLatency) / SPEED_BLEED_MAX));
if (speedBleed > SPEED_BLEED_STRENGTH) {
speedBleed = SPEED_BLEED_STRENGTH;
}
if (speedBleed < 0.1) {
speedBleed = 0;
}
currentSpeed = currentSpeed - speedBleed;
}
var pivotShift = (((wipeOutThreshold - Math.abs(directionLatency)) / wipeOutThreshold) * 23);
_root.originalCar.car._y = -39 + pivotShift;
if ((directionLatency > SKIDMARK_THRESHOLD) and (!lostIt)) {
if (!drifting) {
_root.game_mc.video_mc.gotoAndPlay("car");
_root.currentDrift = 0;
_root.screech_sound.setVolume(0);
_root.screech_sound.start(0, 999);
drifting = true;
if (noDriftTimer > MULTIPLIER_TIMEOUT) {
driftTimer = 0;
}
}
driftTimer++;
noDriftTimer = 0;
_root.driftScoreMultiplier = Math.round(driftTimer / _root.DRIFT_SCORE_MULTIPLIER_INTERVAL);
if (_root.driftScoreMultiplier > 1) {
_root.driftScoreMultiplier_str = _root.driftScoreMultiplier + "X";
} else {
_root.driftScoreMultiplier_str = "";
}
switch (tyres) {
case 1 :
var tyreBonus = 0;
break;
case 2 :
var tyreBonus = 10;
break;
case 3 :
var tyreBonus = 20;
}
_root.currentDrift = _root.currentDrift + Math.round(_root.driftScoreMultiplier * (2 * ((directionLatency - SKIDMARK_THRESHOLD) + tyreBonus)));
if ((_root.currentDrift > 0) and (!_root.garage)) {
_root.currentDrift_str = _root.convertNumberDisplay(_root.currentDrift);
} else {
_root.currentDrift_str = "";
}
} else {
_root.screech_sound.stop();
noDriftTimer++;
if (drifting) {
_root.game_mc.video_mc.gotoAndPlay("turn");
trace("drift was " + _root.currentDrift);
if (_root.donutChallenge) {
_root.score = _root.currentDrift;
} else {
_root.score = _root.score + _root.currentDrift;
}
_root.currentDrift = 0;
_root.currentDrift_str = "";
_root.driftScoreMultiplier_str = "";
if (_root.donutChallenge) {
if (_root.bestDonut < _root.score) {
_root.bestDonut = _root.score;
_root.so.data.bestDonut = _root.score;
}
if (_root.game_mc.car.currentSkidmarkDepth > 0) {
var i = 1;
while (i <= _root.game_mc.car.currentSkidmarkDepth) {
eval ("_root.game_mc.tracks" + i).removeMovieClip();
i++;
}
}
}
}
drifting = false;
_root.screech_sound.setVolume(0);
}
_root.directionLatency = directionLatency;
if ((Math.abs(directionLatency) > wipeOutThreshold) and (!lostIt)) {
loseIt = true;
lostIt = true;
}
if ((heading > 360) and (direction > 360)) {
heading = heading - 360;
direction = direction - 360;
}
if ((heading < 0) and (direction < 0)) {
heading = heading + 360;
direction = direction + 360;
}
}
function setCarStats(param_carNumber) {
BRAKE_POWER = _root.carData_array[param_carNumber].BRAKE_POWER;
MAX_SPEED = _root.carData_array[param_carNumber].MAX_SPEED;
MAX_SPEED_REVERSE = _root.carData_array[param_carNumber].MAX_SPEED_REVERSE;
ACCELERATION = _root.carData_array[param_carNumber].ACCELERATION;
REVERSE_ACCELERATION = _root.carData_array[param_carNumber].REVERSE_ACCELERATION;
ROAD_WIPEOUT_THRESHOLD = _root.carData_array[param_carNumber].ROAD_WIPEOUT_THRESHOLD;
GRASS_WIPEOUT_THRESHOLD = _root.carData_array[param_carNumber].GRASS_WIPEOUT_THRESHOLD;
tyres = _root.carData_array[carNumber].TYRES;
}
var STEERING_RATE_OF_CHANGE = 1;
var STEERING_MAX = 8;
var STEERING_RANDOM_ELEMENT = 2;
var FRICTION = 0.1;
var STEERING_SNAP = 10;
var SKIDMARK_THRESHOLD = 50;
var SKIDMARK_LIMIT = 500;
var SKIDMARK_ADJUSTMENT = 8;
var MOUSE_DISTANCE_LIMIT = 200;
var WIPE_OUT_FRICTION = 0.2;
var SPEED_BLEED_STRENGTH = 0.3;
var SPEED_BLEED_MAX = 60;
var MULTIPLIER_TIMEOUT = 30;
var DRIFT = 3;
var drifting = false;
var onGrass = false;
var onBump = false;
var onOil = false;
var x = 0;
var y = 0;
var targetSpeed = 0;
var currentSkidmarkDepth = 0;
var active = false;
var lastGateHit = 0;
var driftTimer = 0;
var noDriftTimer = 0;
var reversing = false;
var loseIt = false;
var BUMP_WIPEOUT_THRESHOLD = 5;
}
Symbol 436 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
}
Symbol 437 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
}
Symbol 438 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 439 MovieClip [__Packages.mx.transitions.easing.Strong] Frame 0
class mx.transitions.easing.Strong
{
function Strong () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
}
}
Symbol 43 MovieClip Frame 1
stop();
Symbol 43 MovieClip Frame 2
stop();
Symbol 83 MovieClip Frame 1
stop();
Symbol 83 MovieClip Frame 2
stop();
Symbol 84 MovieClip Frame 1
stop();
Symbol 84 MovieClip Frame 2
stop();
Instance of Symbol 83 MovieClip in Symbol 84 MovieClip Frame 2
onClipEvent (load) {
this.buttonText_str = "WHOOPS! SORRY.";
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut, dragOut) {
this.gotoAndStop(1);
}
on (release) {
_parent.gotoAndStop(1);
}
Symbol 86 MovieClip Frame 1
stop();
Symbol 86 MovieClip Frame 2
stop();
Instance of Symbol 83 MovieClip in Symbol 86 MovieClip Frame 2
onClipEvent (load) {
this.buttonText_str = "WHOOPS! SORRY.";
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut, dragOut) {
this.gotoAndStop(1);
}
on (release) {
_parent.gotoAndStop(1);
}
Symbol 88 MovieClip Frame 1
stop();
Symbol 88 MovieClip Frame 2
stop();
Instance of Symbol 83 MovieClip in Symbol 88 MovieClip Frame 2
onClipEvent (load) {
this.buttonText_str = "WHOOPS! SORRY.";
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut, dragOut) {
this.gotoAndStop(1);
}
on (release) {
_parent.gotoAndStop(1);
}
Symbol 90 MovieClip Frame 1
stop();
Symbol 90 MovieClip Frame 2
stop();
Instance of Symbol 83 MovieClip in Symbol 90 MovieClip Frame 2
onClipEvent (load) {
this.buttonText_str = "WHOOPS! SORRY.";
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut, dragOut) {
this.gotoAndStop(1);
}
on (release) {
_parent.gotoAndStop(1);
}
Symbol 91 MovieClip Frame 1
stop();
Symbol 91 MovieClip Frame 2
var i = 1;
while (i <= 31) {
eval ("txt" + i).tabIndex = i;
i++;
}
_root.startLeague_lv = new LoadVars();
_root.startLeague_lv.onLoad = function (success) {
trace("received server response");
_root.id = _root.startLeague_lv.LID;
_root.gotoAndPlay("reset_game_league");
};
_root.startLeague_lv.leagueName = "";
_root.startLeague_lv.yourName = "";
_root.startLeague_lv.yourEmail = "";
stop();
Instance of Symbol 43 MovieClip in Symbol 91 MovieClip Frame 2
onClipEvent (load) {
this.buttonText_str = "SUBMIT";
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut, dragOut) {
this.gotoAndStop(1);
}
on (release) {
startLeagueTracker_lv = new LoadVars();
startLeagueTracker_lv.Keyword = "startLeague";
throwError = false;
_root.startLeague_lv.leagueName = _parent.leagueName;
_root.startLeague_lv.yourName = _parent.yourName;
_root.startLeague_lv.yourEmail = _parent.yourEmail;
var i = 1;
while (i <= 14) {
_root.startLeague_lv[("friend" + i) + "Name"] = _parent[("friend" + i) + "Name"];
_root.startLeague_lv[("friend" + i) + "Email"] = _parent[("friend" + i) + "Email"];
if (_root.startLeague_lv[("friend" + i) + "Name"] == undefined) {
_root.startLeague_lv[("friend" + i) + "Name"] = "";
}
if (_root.startLeague_lv[("friend" + i) + "Email"] == undefined) {
_root.startLeague_lv[("friend" + i) + "Email"] = "";
}
i++;
}
var dudMailCount = 0;
var i = 1;
while (i <= 14) {
var currentString_str = _root.startLeague_lv[("friend" + i) + "Email"];
if ((currentString_str != "") and (currentString_str != undefined)) {
if (currentString_str.indexOf("@") <= 0) {
dudMailCount++;
}
}
i++;
}
if (dudMailCount > 0) {
_parent.email_alert_mc.gotoAndStop(2);
throwError = true;
}
var currentString_str = _root.startLeague_lv.yourEmail;
if (currentString_str.indexOf("@") <= 0) {
_parent.your_email_alert_mc.gotoAndStop(2);
throwError = true;
}
if ((_root.startLeague_lv.leagueName == "") or (_root.startLeague_lv.leagueName == undefined)) {
_parent.league_name_alert_mc.gotoAndStop(2);
throwError = true;
}
var duplicateNameFound = false;
var i = 1;
while (i <= 14) {
var currentString_str = _root.startLeague_lv[("friend" + i) + "Name"];
var j = 1;
while (j <= 14) {
var currentCompareString_str = _root.startLeague_lv[("friend" + j) + "Name"];
if (((((currentString_str == currentCompareString_str) or (currentString_str == _root.startLeague_lv.yourName)) and (i != j)) and (currentString_str != undefined)) and (currentString_str != "")) {
_parent.name_alert_mc.gotoAndStop(2);
throwError = true;
}
j++;
}
i++;
}
if (throwError) {
} else {
_parent.leagueName = "";
_parent.leagueName = "";
_parent.yourName = "";
_parent.yourEmail = "";
var i = 1;
while (i <= 14) {
_parent[("friend" + i) + "Name"] = "";
_parent[("friend" + i) + "Email"] = "";
i++;
}
var serverURL = (_root.serverPath + "startLeague.cfm");
_root.startLeague_lv.sendAndLoad(serverURL, _root.startLeague_lv, "post");
_root.leagueScreen_mc._visible = false;
_root.startButton._visible = true;
}
}
Instance of Symbol 43 MovieClip in Symbol 91 MovieClip Frame 2
onClipEvent (load) {
this.buttonText_str = "CLOSE";
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut, dragOut) {
this.gotoAndStop(1);
}
on (release) {
_root.leagueScreen_mc._visible = false;
_root.startButton._visible = true;
}
Symbol 111 MovieClip Frame 1
stop();
Symbol 111 MovieClip Frame 2
stop();
Symbol 123 MovieClip Frame 1
stop();
Symbol 123 MovieClip Frame 2
stop();
Symbol 144 MovieClip Frame 1
stop();
Symbol 144 MovieClip Frame 2
stop();
Symbol 146 MovieClip Frame 1
stop();
Symbol 146 MovieClip Frame 2
stop();
Symbol 148 MovieClip Frame 1
stop();
Symbol 148 MovieClip Frame 2
stop();
Symbol 155 MovieClip Frame 1
stop();
Symbol 159 MovieClip Frame 1
stop();
Symbol 207 MovieClip Frame 42
gotoAndPlay ("turn");
Symbol 207 MovieClip Frame 70
gotoAndPlay ("feet");
Symbol 207 MovieClip Frame 84
gotoAndPlay ("wheel");
Symbol 207 MovieClip Frame 112
gotoAndPlay ("car");
Symbol 207 MovieClip Frame 133
gotoAndPlay ("crowd");
Instance of Symbol 152 MovieClip in Symbol 212 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(1000000);
}
onClipEvent (enterFrame) {
this._x = _parent.car._x;
this._y = _parent.car._y;
}
Instance of Symbol 155 MovieClip "bonus_points_mc" in Symbol 212 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(1000001);
}
onClipEvent (enterFrame) {
this._x = _parent.car._x;
this._y = _parent.car._y;
}
Instance of Symbol 159 MovieClip "gate1_points_mc" in Symbol 212 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(1000002);
}
Instance of Symbol 159 MovieClip "gate2_points_mc" in Symbol 212 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(1000003);
}
Instance of Symbol 159 MovieClip "gate3_points_mc" in Symbol 212 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(1000004);
}
Instance of Symbol 159 MovieClip "gate4_points_mc" in Symbol 212 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(1000005);
}
Instance of Symbol 159 MovieClip "gate5_points_mc" in Symbol 212 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(1000006);
}
Instance of Symbol 159 MovieClip "gate6_points_mc" in Symbol 212 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(1000007);
}
Instance of Symbol 168 MovieClip in Symbol 212 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(9999999);
}
Instance of Symbol 207 MovieClip "video_mc" in Symbol 212 MovieClip Frame 1
onClipEvent (load) {
this.swapDepths(10000000);
}
Instance of Symbol 30 MovieClip [Vehicle] "originalCar" in Symbol 212 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.gameTicks == 0) {
_root.gateCounter = 0;
}
if (this.active) {
if ((!_root.donutChallenge) and (!_root.garage)) {
var point = {x:this._x, y:this._y};
_root.game_mc.localToGlobal(point);
if (_parent.donut_start_mc.hitTest(point.x, point.y, true)) {
_root.triggerDonut = true;
}
}
if (_root.donutChallenge) {
var point = {x:this._x, y:this._y};
_root.game_mc.localToGlobal(point);
if (_parent.out_of_bounds_donut.hitTest(point.x, point.y, true)) {
trace("whoops!");
var easeType = mx.transitions.easing.Strong.easeOut;
new mx.transitions.Tween(_root.game_mc, "_y", easeType, _root.game_mc._y, 71.4, 20);
if (_root.leagueGame) {
_root.gotoAndPlay("reset_game_league");
} else {
_root.gotoAndPlay("reset_game");
}
_root.startButton._visible = true;
}
}
if ((!_root.donutChallenge) and (!_root.triggerDonut)) {
var point = {x:this._x, y:this._y};
_root.game_mc.localToGlobal(point);
if (_parent.out_of_bounds.hitTest(point.x, point.y, true)) {
_root.alert_mc.alert = "WHERE ARE YOU GOING?";
_root.alert_mc.play();
if (_root.leagueGame) {
_root.gotoAndPlay("reset_game_league");
} else {
_root.gotoAndPlay("reset_game");
}
}
}
var point = {x:this._x, y:this._y};
_root.game_mc.localToGlobal(point);
if (_parent.oil_slick.hitTest(point.x, point.y, true)) {
if (this.currentSpeed > 1) {
this.onOil = true;
} else {
this.onOil = false;
}
} else {
this.onOil = false;
}
var point = {x:this._x, y:this._y};
_root.game_mc.localToGlobal(point);
if (_parent.track_bumps.hitTest(point.x, point.y, true)) {
this.onBump = true;
} else {
this.onBump = false;
}
var i = 1;
while (i <= 3) {
var point = {x:this._x, y:this._y};
_root.game_mc.localToGlobal(point);
if (_parent["powerup" + i].hitTest(point.x, point.y, true)) {
_root.bonusPoints(5000);
_parent["powerup" + i].gotoAndStop(2);
}
i++;
}
var point = {x:this._x, y:this._y};
_root.game_mc.localToGlobal(point);
if (_parent.grass.hitTest(point.x, point.y, true)) {
this.onGrass = true;
} else {
this.onGrass = false;
}
if (this.lastGateHit == _root.gateCount) {
if (nextGate != 1) {
_root.screech_sound.stop();
_root.finalScore = _root.score + _root.currentTimeBonus;
if (_root.so_score.data.bestScore < _root.finalScore) {
_root.so_score.data.bestScore = _root.finalScore;
_root.bestScore = _root.finalScore;
}
submitSPScore_lv = new LoadVars();
submitSPScore_lv.score = _root.bestScore;
submitSPScore_lv.SPID = _root.SPID;
submitSPScore_lv.onLoad = function (success) {
trace("received a ranking of " + this.SPRanking);
_root.SPRanking = _root.convertNumberDisplay(this.SPRanking);
};
var serverURL = (_root.serverPath + "submitSPScore.cfm");
submitSPScore_lv.sendAndLoad(serverURL, submitSPScore_lv, "post");
carTracker_lv = new LoadVars();
carTracker_lv.Keyword = "carType" + this.carNumber;
if (this.carNumber == 3) {
carTracker_lv.sendAndLoad("http://www.driftgame.com.au/itemCount.cfm", carTracker_lv, "get");
}
tyreTracker_lv = new LoadVars();
tyreTracker_lv.Keyword = "tyreType" + this.tyres;
if (_root.leagueGame) {
submitLScore_lv = new LoadVars();
submitLScore_lv.onLoad = function (success) {
trace("submitted league score");
};
submitLScore_lv.LID = _root.id;
if (_root.finalScore > _root.yourScore) {
submitLScore_lv.score = _root.finalScore;
} else {
submitLScore_lv.score = _root.yourScore;
}
var serverURL = (_root.serverPath + "submitLScore.cfm");
submitLScore_lv.sendAndLoad(serverURL, submitLScore_lv, "post");
}
_root.resultsPanel_mc._visible = true;
_root.currentDrift_str = "";
_root.gameActive = false;
_root.clockOn = false;
this.loseIt = true;
this.updatePosition();
trace((("lap time was " + _root.timerSeconds) + ":") + _root.timerTicks_str);
trace(_root.timerTicks);
_root.timerTicks = _root.timerTicks + random(30);
if (_root.timerTicks > 999) {
_root.timerTicks = _root.timerTicks - 1000;
_root.timerSeconds++;
}
if (String(_root.timerTicks).length == 1) {
_root.timerTicks_str = "00" + _root.timerTicks;
} else if (String(_root.timerTicks).length == 2) {
_root.timerTicks_str = "0" + _root.timerTicks;
} else {
_root.timerTicks_str = _root.timerTicks;
}
_root.lapCount++;
}
nextGate = 1;
} else {
_root.gateCounter++;
nextGate = lastGateHit + 1;
}
var i = 1;
while (i < _root.gateCount) {
if (eval ("_root.game_mc.gate" + i).hitTest(point.x, point.y, true) and (i != nextGate)) {
if (_root.justHitGate != i) {
_root.justHitGate = i;
_root.score = _root.score - _root.currentDrift;
_root.currentDrift = 0;
trace("hit gate a second time");
}
} else if (_root.justHitGate == i) {
trace("found");
_root.justHitGate = 0;
}
i++;
}
if (eval ("_root.game_mc.gate" + nextGate).hitTest(point.x, point.y, true)) {
_root.justHitGate = nextGate;
_root.currentGateBonus = 5000 - (Math.floor(_root.gateCounter / 35) * 1000);
_root.currentGateBonus_str = _root.convertNumberDisplay(_root.currentGateBonus);
if (_root.currentGateBonus > 0) {
_parent[("gate" + nextGate) + "_points_mc"].bonusPoints = _root.currentGateBonus_str;
_parent[("gate" + nextGate) + "_points_mc"].play();
_root.score = _root.score + _root.currentGateBonus;
}
_parent[("gate" + nextGate) + "_mc"].gotoAndStop(2);
this.lastGateHit = nextGate;
_root.gateCounter = 0;
}
}
}
Symbol 220 Button
on (release, keyPress "<Space>") {
_root.resultsPanel_mc._visible = false;
if (_root.leagueGame) {
_root.gotoAndPlay("reset_game_league");
} else {
_root.gotoAndPlay("reset_game");
}
trace("ready to go is " + _root.readyToGo);
if (_root.readyToGo and (!_root.donutChallenge)) {
_root.spaceToStart = false;
_root.lights_mc.gotoAndPlay(2);
}
}
Symbol 225 MovieClip Frame 1
stop();
Symbol 225 MovieClip Frame 2
stop();
Symbol 231 Button
on (press) {
if (leagueGame) {
gotoAndStop ("leagueStart");
} else {
gotoAndStop ("SPStart");
}
}
Symbol 233 Button
on (release) {
getURL ("http://www.marshaltyres.com.au/", "_blank");
}
Symbol 234 Button
on (release) {
getURL ("http://www.xbox.com.au/", "_blank");
}
Instance of Symbol 43 MovieClip in Symbol 251 MovieClip Frame 1
onClipEvent (load) {
this.buttonText_str = "START A NEW LEAGUE";
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut, dragOut) {
this.gotoAndStop(1);
}
on (release) {
_root.sign_up_mc._visible = false;
_root.leagueScreen_mc.gotoAndStop(2);
_root.leagueScreen_mc._visible = true;
_root.startButton._visible = false;
}
Instance of Symbol 43 MovieClip in Symbol 251 MovieClip Frame 1
onClipEvent (load) {
this.buttonText_str = "TELL A FRIEND";
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut, dragOut) {
this.gotoAndStop(1);
}
on (release) {
tellFriendTracker_lv = new LoadVars();
tellFriendTracker_lv.Keyword = "tellFriend";
tellFriendTracker_lv.sendAndLoad("http://www.driftgame.com.au/itemCount.cfm", tellFriendTracker_lv, "get");
_root.sign_up_mc.gotoAndStop(1);
_root.leagueScreen_mc.gotoAndStop(1);
if (_root.SPRanking == "-----") {
urlString = "mailto:?&subject=Check this awesome game out!&body=Hey! Thought you'd like to see this awesome Drifting game I found.%0A%0AIt's a great game and I know you're going to love it!%0A%0AGo to http://www.driftgame.com.au to play!";
} else {
urlString = ((("mailto:?&subject=Check this awesome game out!&body=Hey! Thought you'd like to see this awesome Drifting game I found.%0A%0AIt's a great game and I know you're going to love it! I'm currently ranked " + _root.SPRanking) + " in the world!%0A%0AMy current best score is ") + _root.bestScore_str) + " See if you can beat that!%0A%0AGo to http://www.driftgame.com.au to play!";
}
getURL (urlString, "_self");
}
Instance of Symbol 43 MovieClip in Symbol 251 MovieClip Frame 1
onClipEvent (load) {
this.buttonText_str = "SIGN UP";
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut, dragOut) {
this.gotoAndStop(1);
}
on (release) {
_root.leagueScreen_mc.gotoAndStop(1);
_root.sign_up_mc._visible = true;
}
Symbol 263 MovieClip Frame 1
stop();
Symbol 263 MovieClip Frame 2
stop();
Symbol 276 MovieClip Frame 1
var easeType = mx.transitions.easing.Strong.easeOut;
redLight_mc._alpha = 0;
orangeLight_mc._alpha = 0;
greenLight_mc._alpha = 0;
stop();
Symbol 276 MovieClip Frame 2
_root.restart_button_mc._visible = false;
new mx.transitions.Tween(arrow_mc, "_alpha", easeType, 0, 100, 20);
if (_root.spaceToStart) {
space_text.gotoAndStop(1);
} else {
space_text.gotoAndStop(2);
}
Symbol 276 MovieClip Frame 10
_root.beep1_sound.start();
Symbol 276 MovieClip Frame 40
_root.beep1_sound.start();
Symbol 276 MovieClip Frame 50
Symbol 276 MovieClip Frame 70
_root.beep2_sound.start();
Symbol 276 MovieClip Frame 80
_root.gameActive = true;
_root.clockOn = true;
Symbol 276 MovieClip Frame 106
_parent.lights_mc._visible = false;
_root.restart_button_mc._visible = true;
Instance of Symbol 83 MovieClip in Symbol 285 MovieClip Frame 1
onClipEvent (load) {
this.buttonText_str = "PLAY AGAIN";
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut, dragOut) {
this.gotoAndStop(1);
}
on (release) {
_root.resultsPanel_mc._visible = false;
if (_root.leagueGame) {
_root.gotoAndPlay("reset_game_league");
} else {
_root.gotoAndPlay("reset_game");
}
}
Instance of Symbol 83 MovieClip in Symbol 285 MovieClip Frame 1
onClipEvent (load) {
this.buttonText_str = "START A LEAGUE";
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut, dragOut) {
this.gotoAndStop(1);
}
on (release) {
_root.leagueScreen_mc.gotoAndStop(2);
_root.leagueScreen_mc._visible = true;
_root.startButton._visible = false;
}
Symbol 290 MovieClip Frame 1
_root.signUp_lv = new LoadVars();
_root.signUp_lv.fname = "";
_root.signUp_lv.lname = "";
_root.signUp_lv.email = "";
stop();
Instance of Symbol 83 MovieClip in Symbol 290 MovieClip Frame 1
onClipEvent (load) {
this.buttonText_str = "SUBMIT";
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut, dragOut) {
this.gotoAndStop(1);
}
on (release) {
if (_parent.email.indexOf("@") <= 0) {
} else {
signupTracker_lv = new LoadVars();
signupTracker_lv.Keyword = "signUp";
signupTracker_lv.sendAndLoad("http://www.driftgame.com.au/itemCount.cfm", signupTracker_lv, "get");
_root.signUp_lv.fname = _parent.fname;
_root.signUp_lv.email = _parent.email;
var serverURL = (_root.serverPath + "subscribe.cfm");
_root.signUp_lv.sendAndLoad(serverURL, _root.signUp_lv, "get");
_parent.fname = "";
_parent.email = "";
_parent._visible = false;
}
}
Instance of Symbol 83 MovieClip in Symbol 290 MovieClip Frame 1
onClipEvent (load) {
this.buttonText_str = "CLOSE";
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut, dragOut) {
this.gotoAndStop(1);
}
on (release) {
_parent._visible = false;
}
Symbol 293 MovieClip Frame 1
stop();
Symbol 319 Button
on (release) {
_root.carData_array[_parent.selectedCar].TYRES = 3;
gotoAndStop (3);
}
Symbol 322 Button
on (release) {
_root.carData_array[_parent.selectedCar].TYRES = 2;
gotoAndStop (2);
}
Symbol 325 Button
on (release) {
_root.carData_array[_parent.selectedCar].TYRES = 1;
gotoAndStop (1);
}
Symbol 326 MovieClip Frame 1
stop();
Symbol 326 MovieClip Frame 2
stop();
Symbol 326 MovieClip Frame 3
stop();
Symbol 330 MovieClip Frame 1
stop();
Symbol 330 MovieClip Frame 2
stop();
Symbol 335 Button
on (release, keyPress "<Right>") {
gotoAndStop(selectedCar + 1);
}
Symbol 348 Button
on (release, keyPress "<Left>") {
gotoAndStop(selectedCar - 1);
}
Symbol 349 MovieClip Frame 1
selectedCar = 1;
var easeType = mx.transitions.easing.Strong.easeOut;
var destination = (84 - (230 * (selectedCar - 1)));
new mx.transitions.Tween(carScroller_mc, "_x", easeType, carScroller_mc._x, destination, 10);
currentMake = _root.carData_array[selectedCar].MAKE;
currentTorque = _root.carData_array[selectedCar].TORQUE;
currentPower = _root.carData_array[selectedCar].POWER;
currentWeight = _root.carData_array[selectedCar].WEIGHT;
carScroller_mc._x = 84;
stop();
Instance of Symbol 326 MovieClip in Symbol 349 MovieClip Frame 1
onClipEvent (enterFrame) {
this.gotoAndStop(_root.carData_array[_parent.selectedCar].TYRES);
}
Instance of Symbol 330 MovieClip in Symbol 349 MovieClip Frame 1
onClipEvent (load) {
this.buttonText_str = "DRIVE THIS CAR";
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut, dragOut) {
this.gotoAndStop(1);
}
on (release, keyPress "<Space>") {
_root.paused = false;
if (_root.garage) {
_root.gotoAndPlay("garage_out");
} else {
_root.game_mc.car.setCarStats(_parent.selectedCar);
}
_root.game_mc.car.currentSpeed = 0;
_parent._visible = false;
_root.selectedCar = _parent.selectedCar;
_root.game_mc.car.gotoAndStop(_parent.selectedCar);
_root.game_mc.car.carNumber = _parent.selectedCar;
}
Symbol 349 MovieClip Frame 2
selectedCar = 2;
var easeType = mx.transitions.easing.Strong.easeOut;
var destination = (84 - (230 * (selectedCar - 1)));
new mx.transitions.Tween(carScroller_mc, "_x", easeType, carScroller_mc._x, destination, 10);
currentMake = _root.carData_array[selectedCar].MAKE;
currentTorque = _root.carData_array[selectedCar].TORQUE;
currentPower = _root.carData_array[selectedCar].POWER;
currentWeight = _root.carData_array[selectedCar].WEIGHT;
stop();
Symbol 349 MovieClip Frame 3
selectedCar = 3;
var easeType = mx.transitions.easing.Strong.easeOut;
var destination = (84 - (230 * (selectedCar - 1)));
new mx.transitions.Tween(carScroller_mc, "_x", easeType, carScroller_mc._x, destination, 10);
currentMake = _root.carData_array[selectedCar].MAKE;
currentTorque = _root.carData_array[selectedCar].TORQUE;
currentPower = _root.carData_array[selectedCar].POWER;
currentWeight = _root.carData_array[selectedCar].WEIGHT;
stop();
Symbol 349 MovieClip Frame 4
selectedCar = 4;
var easeType = mx.transitions.easing.Strong.easeOut;
var destination = (84 - (230 * (selectedCar - 1)));
new mx.transitions.Tween(carScroller_mc, "_x", easeType, carScroller_mc._x, destination, 10);
currentMake = _root.carData_array[selectedCar].MAKE;
currentTorque = _root.carData_array[selectedCar].TORQUE;
currentPower = _root.carData_array[selectedCar].POWER;
currentWeight = _root.carData_array[selectedCar].WEIGHT;
stop();
Symbol 349 MovieClip Frame 5
selectedCar = 5;
var easeType = mx.transitions.easing.Strong.easeOut;
var destination = (84 - (230 * (selectedCar - 1)));
new mx.transitions.Tween(carScroller_mc, "_x", easeType, carScroller_mc._x, destination, 10);
currentMake = _root.carData_array[selectedCar].MAKE;
currentTorque = _root.carData_array[selectedCar].TORQUE;
currentPower = _root.carData_array[selectedCar].POWER;
currentWeight = _root.carData_array[selectedCar].WEIGHT;
stop();
Symbol 349 MovieClip Frame 6
selectedCar = 6;
var easeType = mx.transitions.easing.Strong.easeOut;
var destination = (84 - (230 * (selectedCar - 1)));
new mx.transitions.Tween(carScroller_mc, "_x", easeType, carScroller_mc._x, destination, 10);
currentMake = _root.carData_array[selectedCar].MAKE;
currentTorque = _root.carData_array[selectedCar].TORQUE;
currentPower = _root.carData_array[selectedCar].POWER;
currentWeight = _root.carData_array[selectedCar].WEIGHT;
stop();
Symbol 349 MovieClip Frame 7
selectedCar = 7;
var easeType = mx.transitions.easing.Strong.easeOut;
var destination = (84 - (230 * (selectedCar - 1)));
new mx.transitions.Tween(carScroller_mc, "_x", easeType, carScroller_mc._x, destination, 10);
currentMake = _root.carData_array[selectedCar].MAKE;
currentTorque = _root.carData_array[selectedCar].TORQUE;
currentPower = _root.carData_array[selectedCar].POWER;
currentWeight = _root.carData_array[selectedCar].WEIGHT;
stop();
Symbol 349 MovieClip Frame 8
selectedCar = 8;
var easeType = mx.transitions.easing.Strong.easeOut;
var destination = (84 - (230 * (selectedCar - 1)));
new mx.transitions.Tween(carScroller_mc, "_x", easeType, carScroller_mc._x, destination, 10);
currentMake = _root.carData_array[selectedCar].MAKE;
currentTorque = _root.carData_array[selectedCar].TORQUE;
currentPower = _root.carData_array[selectedCar].POWER;
currentWeight = _root.carData_array[selectedCar].WEIGHT;
stop();
Symbol 349 MovieClip Frame 9
selectedCar = 9;
var easeType = mx.transitions.easing.Strong.easeOut;
var destination = (84 - (230 * (selectedCar - 1)));
new mx.transitions.Tween(carScroller_mc, "_x", easeType, carScroller_mc._x, destination, 10);
currentMake = _root.carData_array[selectedCar].MAKE;
currentTorque = _root.carData_array[selectedCar].TORQUE;
currentPower = _root.carData_array[selectedCar].POWER;
currentWeight = _root.carData_array[selectedCar].WEIGHT;
stop();
Symbol 349 MovieClip Frame 10
selectedCar = 10;
var easeType = mx.transitions.easing.Strong.easeOut;
var destination = (84 - (230 * (selectedCar - 1)));
new mx.transitions.Tween(carScroller_mc, "_x", easeType, carScroller_mc._x, destination, 10);
currentMake = _root.carData_array[selectedCar].MAKE;
currentTorque = _root.carData_array[selectedCar].TORQUE;
currentPower = _root.carData_array[selectedCar].POWER;
currentWeight = _root.carData_array[selectedCar].WEIGHT;
stop();
Symbol 349 MovieClip Frame 11
selectedCar = 11;
var easeType = mx.transitions.easing.Strong.easeOut;
var destination = (84 - (230 * (selectedCar - 1)));
new mx.transitions.Tween(carScroller_mc, "_x", easeType, carScroller_mc._x, destination, 10);
currentMake = _root.carData_array[selectedCar].MAKE;
currentTorque = _root.carData_array[selectedCar].TORQUE;
currentPower = _root.carData_array[selectedCar].POWER;
currentWeight = _root.carData_array[selectedCar].WEIGHT;
stop();
Instance of Symbol 43 MovieClip in Symbol 358 MovieClip Frame 1
onClipEvent (load) {
this.buttonText_str = "START A NEW LEAGUE";
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut, dragOut) {
this.gotoAndStop(1);
}
on (release) {
_root.sign_up_mc.gotoAndStop(1);
_root.leagueScreen_mc.gotoAndStop(2);
_root.carSelector_mc._visible = false;
_root.leagueScreen_mc._visible = true;
_root.startButton._visible = false;
}
Instance of Symbol 43 MovieClip in Symbol 358 MovieClip Frame 1
onClipEvent (load) {
this.buttonText_str = "TELL A FRIEND";
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut, dragOut) {
this.gotoAndStop(1);
}
on (release) {
_root.sign_up_mc.gotoAndStop(1);
_root.leagueScreen_mc.gotoAndStop(1);
if (_root.SPRanking == "-----") {
urlString = "mailto:?&subject=Check this awesome game out!&body=Hey! Thought you'd like to see this awesome Drifting game I found.%0A%0AIt's a great game and I know you're going to love it!%0A%0AGo to http://www.driftgame.com.au to play!";
} else {
urlString = ((("mailto:?&subject=Check this awesome game out!&body=Hey! Thought you'd like to see this awesome Drifting game I found.%0A%0AIt's a great game and I know you're going to love it! I'm currently ranked " + _root.SPRanking) + " in the world!%0A%0AMy current best score is ") + _root.bestScore_str) + " See if you can beat that!%0A%0AGo to http://www.driftgame.com.au to play!";
}
getURL (urlString, "_self");
}
Instance of Symbol 43 MovieClip in Symbol 358 MovieClip Frame 1
onClipEvent (load) {
this.buttonText_str = "SIGN UP";
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut, dragOut) {
this.gotoAndStop(1);
}
on (release) {
_root.carSelector_mc._visible = false;
_root.leagueScreen_mc.gotoAndStop(1);
_root.sign_up_mc._visible = true;
}
Symbol 427 Button
on (release) {
_root.add_a_player_mc.gotoAndStop(2);
_root.add_a_player_mc._visible = true;
_root.startButton._visible = false;
}
Symbol 428 MovieClip Frame 1
stop();
Symbol 428 MovieClip Frame 2
stop();
Symbol 428 MovieClip Frame 3
stop();
Symbol 428 MovieClip Frame 4
stop();
Symbol 428 MovieClip Frame 5
stop();
Symbol 428 MovieClip Frame 6
stop();
Symbol 428 MovieClip Frame 7
stop();
Symbol 428 MovieClip Frame 8
stop();
Symbol 428 MovieClip Frame 9
stop();
Symbol 428 MovieClip Frame 10
stop();
Symbol 428 MovieClip Frame 11
stop();
Symbol 428 MovieClip Frame 12
stop();
Symbol 428 MovieClip Frame 13
stop();
Symbol 428 MovieClip Frame 14
stop();
Symbol 428 MovieClip Frame 15
stop();
Instance of Symbol 43 MovieClip in Symbol 429 MovieClip Frame 1
onClipEvent (load) {
this.buttonText_str = "START A NEW LEAGUE";
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut, dragOut) {
this.gotoAndStop(1);
}
on (release) {
_root.leagueScreen_mc.gotoAndStop(2);
_root.sign_up_mc._visible = false;
_root.leagueScreen_mc._visible = true;
_root.startButton._visible = false;
}
Instance of Symbol 43 MovieClip in Symbol 429 MovieClip Frame 1
onClipEvent (load) {
this.buttonText_str = "TELL A FRIEND";
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut, dragOut) {
this.gotoAndStop(1);
}
on (release) {
tellFriendTracker_lv = new LoadVars();
tellFriendTracker_lv.Keyword = "tellFriend";
_root.sign_up_mc.gotoAndStop(1);
_root.leagueScreen_mc.gotoAndStop(1);
if (_root.SPRanking == "-----") {
urlString = "mailto:?&subject=Check this awesome game out!&body=Hey! Thought you'd like to see this awesome Drifting game I found.%0A%0AIt's a great game and I know you're going to love it!%0A%0AGo to http://www.driftgame.com.au to play!";
} else {
urlString = ((("mailto:?&subject=Check this awesome game out!&body=Hey! Thought you'd like to see this awesome Drifting game I found.%0A%0AIt's a great game and I know you're going to love it! I'm currently ranked " + _root.SPRanking) + " in the world!%0A%0AMy current best score is ") + _root.bestScore_str) + " See if you can beat that!%0A%0AGo to http://www.driftgame.com.au to play!";
}
getURL (urlString, "_self");
}
Instance of Symbol 43 MovieClip in Symbol 429 MovieClip Frame 1
onClipEvent (load) {
this.buttonText_str = "SIGN UP";
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut, dragOut) {
this.gotoAndStop(1);
}
on (release) {
_root.leagueScreen_mc._visible = false;
_root.sign_up_mc._visible = true;
}
Symbol 434 MovieClip Frame 1
stop();
Symbol 434 MovieClip Frame 2
_root.addNewPlayer_lv = new LoadVars();
_root.addNewPlayer_lv.LID = _root.id;
trace("LID is " + _root.id);
_root.addNewPlayer_lv.onLoad = function (success) {
trace("received server response");
};
stop();
Instance of Symbol 83 MovieClip in Symbol 434 MovieClip Frame 2
onClipEvent (load) {
this.buttonText_str = "CLOSE";
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut, dragOut) {
this.gotoAndStop(1);
}
on (release) {
_root.startButton._visible = true;
_parent.gotoAndStop(1);
_parent._visible = false;
}
Instance of Symbol 83 MovieClip in Symbol 434 MovieClip Frame 2
onClipEvent (load) {
this.buttonText_str = "ADD PLAYER";
}
on (rollOver) {
this.gotoAndStop(2);
}
on (rollOut, dragOut) {
this.gotoAndStop(1);
}
on (release) {
_root.addNewPlayer_lv.NewName = _parent.NewName;
_root.addNewPlayer_lv.NewEmail = _parent.NewEmail;
throwError = false;
var duplicateNameFound = false;
var currentString_str = _root.addNewPlayer_lv.NewName.toUpperCase();
var j = 1;
while (j <= 14) {
var currentCompareString_str = _root["leagueTableName" + j];
if (((((currentString_str == currentCompareString_str) or (currentString_str == _root.startLeague_lv.yourName)) and (i != j)) and (currentString_str != undefined)) and (currentString_str != "")) {
_parent.name_alert_mc.gotoAndStop(2);
throwError = true;
}
j++;
}
if ((_root.addNewPlayer_lv.NewName == "") or (_root.addNewPlayer_lv.NewName == undefined)) {
throwError = true;
_parent.name_alert_mc.gotoAndStop(2);
}
if (!throwError) {
_parent.NewName = "";
_parent.NewEmail = "";
var serverURL = (_root.serverPath + "AddNewPlayer.cfm");
trace("sending to " + serverURL);
_root.addNewPlayer_lv.sendAndLoad(serverURL, _root.addNewPlayer_lv, "post");
_root.resultsPanel_mc._visible = false;
_root.leagueScreen_mc._visible = false;
_root.startButton._visible = true;
_root.gotoAndPlay("reset_game_league");
_parent.gotoAndStop(1);
_parent._visible = false;
}
}