Frame 1
stop();
_quality = "BEST";
myColor = new Color(this);
myTransform = new Object();
clearAllIntervals = function () {
i = 0;
while (i < 2000) {
clearInterval(i);
i++;
}
};
fade = function (destination) {
_global.finishVoiceOver();
clearAllIntervals();
locked = true;
fader.destination = destination;
};
_global.soundsLoaded = false;
Stage.scaleMode = "exactFit";
Stage.showMenu = false;
var ads = true;
stop();
Frame 2
Frame 3
Frame 5
_root.mute = false;
_root.mute_but.gotoAndStop(1);
_root.bg = new Sound();
_root.bg.attachSound("bg");
_root.bg.start(0, 99999);
_root.gamebg = new Sound();
_root.gamebg.attachSound("gamebg");
_root.aclr = new Sound();
_root.aclr.attachSound("acc");
_root.n2o = new Sound();
_root.n2o.attachSound("n2o");
_root.gover = new Sound();
_root.gover.attachSound("gameover");
_root.driftSound = new Sound();
_root.driftSound.attachSound("skid_sounds");
var ntimes = 1;
_root.money = 0;
_root.TotalScore = 0;
_root.TotalScore1 = 0;
_root.TotalScore2 = 0;
_root.TotalScore3 = 0;
_root.TotalScore4 = 0;
_root.TotalScore5 = 0;
_root.TotalScore6 = 0;
_root.TotalScore7 = 0;
_root.TotalScore8 = 0;
_root.TotalScore9 = 0;
_root.l7comp = false;
_root.l8comp = false;
_root.dgw = false;
_root.dgo = false;
_root.driftCountScore = 0;
_root.b1t = "$10000";
_root.b2t = "$20000";
_root.b3t = "$30000";
_root.b4t = "$40000";
_root.b5t = "$50000";
_root.b6t = 5000;
_root.l1comp = false;
_root.l2comp = false;
_root.l3comp = false;
_root.l4comp = false;
_root.l5comp = false;
_root.l6comp = false;
_root.l6compDrift = false;
_root.l7compDrift = false;
_root.l8compDrift = false;
_root.car1 = false;
_root.car2 = false;
_root.car3 = false;
_root.car4 = false;
_root.car5 = false;
gotoAndStop ("title");
Frame 9
gameList = ["Fast Food Barf Fest", "Bugs Bugging", "Disgusto Attack", "Intersection of Rude & Annoying"];
bestList = [0, 0, 0, 0];
score = 0;
boost = 0;
_root.gamebg.stop();
if (!_root.mute) {
_root.bg.start(0, 999);
} else {
_root.bg.stop();
}
gfx.vroom.start();
gfx.idle.enter();
stop();
Instance of Symbol 153 MovieClip "mute_but" in Frame 9
on (release) {
_root.mute = !_root.mute;
if (_root.mute) {
_root.mute_but.gotoAndStop(2);
_root.bg.setVolume(0);
} else {
_root.mute_but.gotoAndStop(1);
_root.bg.setVolume(100);
}
}
Frame 16
returnTo = "inter";
Frame 24
score = 0;
boost = 0;
cheatModeOn = true;
Frame 34
score = 0;
boost = 0;
cheatModeOn = true;
_root.enoughm._visible = false;
_root.nn._visible = false;
if (_root.b1t == "$old") {
_root.car_DET.b1._visible = false;
}
if (_root.b2t == "$old") {
_root.car_DET.b2._visible = false;
}
if (_root.b3t == "$old") {
_root.car_DET.b3._visible = false;
}
if (_root.b4t == "$old") {
_root.car_DET.b4._visible = false;
}
if (_root.b5t == "$old") {
_root.car_DET.b5._visible = false;
}
select = function (id) {
_root.choice = id;
};
if (_root.ntimes == 1) {
_root.bt6 = 6500;
}
if (_root.ntimes == 2) {
_root.bt6 = 7000;
}
if (_root.ntimes == 3) {
_root.bt6 = 8500;
}
if (_root.ntimes == 4) {
_root.bt6 = 10000;
}
if (_root.ntimes >= 5) {
_root.bt6 = 12500;
} else {
_root.bt6 = 5000;
}
Frame 42
returnTo = "location";
car.gotoAndStop(_parent.choice + 1);
if (_root.l1comp == true) {
_root.l2.gotoAndStop(2);
} else {
_root.l2.gotoAndStop(1);
}
if (_root.l2comp == true) {
_root.l3.gotoAndStop(2);
} else {
_root.l3.gotoAndStop(1);
}
if (_root.l3comp == true) {
_root.l4.gotoAndStop(2);
} else {
_root.l4.gotoAndStop(1);
}
if (_root.l4comp == true) {
_root.l5.gotoAndStop(2);
} else {
_root.l5.gotoAndStop(1);
}
if (_root.l5comp == true) {
_root.l6.gotoAndStop(2);
} else {
_root.l6.gotoAndStop(1);
}
if (_root.l6comp == true) {
trace("1 ding Taka:");
_root.l7.gotoAndStop(2);
} else if ((_root.l6comp == false) && (_root.l6compDrift == true)) {
trace("2 ding Taka:");
_root.l7.driftBtn1.enabled = false;
_root.l7.gotoAndStop(3);
} else {
trace("3 ding Taka:");
_root.l7.gotoAndStop(1);
}
if (_root.l7comp == true) {
trace("1 ding Taka:");
_root.l8.gotoAndStop(2);
} else if ((_root.l7comp == false) && (_root.l7compDrift == true)) {
trace("2 ding Taka:");
_root.l8.driftBtn2.enabled = false;
_root.l8.gotoAndStop(3);
} else {
trace("3 ding Taka:");
_root.l8.gotoAndStop(1);
}
if (_root.l8comp == true) {
trace("1 ding Taka:");
_root.l9.gotoAndStop(2);
} else if ((_root.l8comp == false) && (_root.l8compDrift == true)) {
trace("2 ding Taka:");
_root.l9.driftBtn3.enabled = false;
_root.l9.gotoAndStop(3);
} else {
trace("3 ding Taka:");
_root.l9.gotoAndStop(1);
}
Frame 50
gfx.idle.exit();
Frame 58
boost = 0;
Frame 73
function driftGameOver() {
if (_root.dgo == true) {
_root.dgo = false;
_root.gotoAndStop("results");
}
if (_root.dgw == true) {
_root.dgw = false;
_root.gotoAndStop("results");
}
}
gfx.idle.exit();
_root.pmc._visible = false;
_root.bg.stop();
_quality = "MEDIUM";
_root.nnn._xscale = 100;
_root.nnn1._visible = false;
var nnnper = _root.nnn._xscale;
_root.wrongway._visible = false;
Frame 81
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
gfx.idle.enter();
returnTo = "results";
boost = 0;
_root.gamebg.stop();
if (!_root.mute) {
_root.bg.start(0, 999);
} else {
_root.bg.stop();
}
if (_root.raceChoice == 0) {
if (_root.displayPlace == "1st") {
_root.money = randRange(11000, 12000);
_root.TotalScore1 = _root.money + randRange(11000, 12000);
_root.l1comp = true;
if (_root.l6compDrift == false) {
_root.l6comp = true;
} else {
_root.l6comp = false;
}
}
if (_root.displayPlace == "2nd") {
_root.money = randRange(6000, 7000);
_root.TotalScore1 = _root.money + randRange(6000, 7000);
}
if (_root.displayPlace == "3rd") {
_root.money = randRange(4000, 5000);
_root.TotalScore1 = _root.money + randRange(4000, 5000);
}
if (_root.displayPlace == "4th") {
_root.money = randRange(2000, 3000);
_root.TotalScore1 = _root.money + randRange(2000, 3000);
}
if (_root.displayPlace == "5th") {
_root.money = randRange(1000, 2000);
_root.TotalScore1 = _root.money + randRange(1000, 2000);
}
}
trace("_root.driftCountScore :" + _root.driftCountScore);
if (_root.raceChoice == 6) {
_root.l8compDrift = true;
_root.l8comp = false;
_root.playTS_txt._y = _root.playTS_txt._y - 40;
_root.playTS._y = _root.playTS._y - 40;
_root.playMny_txt._y = _root.playMny_txt._y - 40;
_root.playMny._y = _root.playMny._y - 40;
_root.playTime_txt._visible = false;
_root.playTime._visible = false;
_root.plyPost_place._visible = false;
_root.plyPost._visible = false;
if (_root.driftTimes >= 0) {
_root.money = _root.money + (_root.driftCountScore * 100);
_root.TotalScore9 = _root.money + randRange(52000, 56000);
_root.driftCountScore = 0;
_root.l5comp = true;
}
}
if (_root.raceChoice == 7) {
_root.l6compDrift = true;
_root.l6comp = false;
trace("result :" + _root.driftTimes);
_root.playTS_txt._y = _root.playTS_txt._y - 40;
_root.playTS._y = _root.playTS._y - 40;
_root.playMny_txt._y = _root.playMny_txt._y - 40;
_root.playMny._y = _root.playMny._y - 40;
_root.playTime_txt._visible = false;
_root.playTime._visible = false;
_root.plyPost_place._visible = false;
_root.plyPost._visible = false;
if (_root.driftTimes >= 0) {
trace("time ;;; " + time);
_root.money = _root.money + (_root.driftCountScore * 100);
_root.TotalScore7 = _root.money + randRange(17000, 19000);
_root.driftCountScore = 0;
_root.l1comp = true;
}
}
if (_root.raceChoice == 8) {
_root.l7compDrift = true;
_root.l7comp = false;
_root.playTS_txt._y = _root.playTS_txt._y - 40;
_root.playTS._y = _root.playTS._y - 40;
_root.playMny_txt._y = _root.playMny_txt._y - 40;
_root.playMny._y = _root.playMny._y - 40;
_root.playTime_txt._visible = false;
_root.playTime._visible = false;
_root.plyPost_place._visible = false;
_root.plyPost._visible = false;
if (_root.driftTimes >= 0) {
_root.money = _root.money + (_root.driftCountScore * 100);
_root.TotalScore8 = _root.money + randRange(34000, 36000);
_root.driftCountScore = 0;
_root.l3comp = true;
}
}
if (_root.raceChoice == 1) {
if ((((!_root.l3comp) && (!_root.l4comp)) && (!_root.l5comp)) && (!_root.l6comp)) {
if (_root.displayPlace == "1st") {
_root.money = _root.money + randRange(21000, 24000);
_root.TotalScore2 = _root.money + randRange(21000, 24000);
_root.l2comp = true;
}
if (_root.displayPlace == "2nd") {
_root.money = _root.money;
_root.TotalScore2 = _root.money + randRange(11000, 12000);
}
if (_root.displayPlace == "3rd") {
_root.money = _root.money;
_root.TotalScore2 = _root.money + randRange(8000, 9000);
}
if (_root.displayPlace == "4th") {
_root.money = _root.money;
_root.TotalScore2 = _root.money + randRange(6000, 7000);
}
if (_root.displayPlace == "5th") {
_root.money = _root.money;
_root.TotalScore2 = _root.money + randRange(5000, 6000);
}
}
if ((((_root.l3comp == true) || (_root.l4comp == true)) || (_root.l5comp == true)) || (_root.l6comp == true)) {
if (_root.displayPlace == "1st") {
_root.money = randRange(21000, 24000);
_root.TotalScore2 = _root.money + randRange(21000, 24000);
_root.l2comp = true;
}
if (_root.displayPlace == "2nd") {
_root.money = _root.money;
_root.TotalScore2 = _root.money + randRange(11000, 12000);
}
if (_root.displayPlace == "3rd") {
_root.money = _root.money;
_root.TotalScore2 = _root.money + randRange(8000, 9000);
}
if (_root.displayPlace == "4th") {
_root.money = _root.money;
_root.TotalScore2 = _root.money + randRange(6000, 7000);
}
if (_root.displayPlace == "5th") {
_root.money = _root.money;
_root.TotalScore2 = _root.money + randRange(5000, 6000);
}
}
}
if (_root.raceChoice == 2) {
if (((!_root.l4comp) && (!_root.l5comp)) && (!_root.l6comp)) {
if (_root.displayPlace == "1st") {
_root.money = _root.money + randRange(30000, 34000);
_root.TotalScore3 = _root.money + randRange(30000, 34000);
_root.l3comp = true;
if (_root.l7compDrift == false) {
_root.l7comp = true;
} else {
_root.l7comp = false;
}
}
if (_root.displayPlace == "2nd") {
_root.money = _root.money;
_root.TotalScore3 = _root.money + randRange(15000, 16000);
}
if (_root.displayPlace == "3rd") {
_root.money = _root.money;
_root.TotalScore3 = _root.money + randRange(10000, 11000);
}
if (_root.displayPlace == "4th") {
_root.money = _root.money;
_root.TotalScore3 = _root.money + randRange(8000, 9000);
}
if (_root.displayPlace == "5th") {
_root.money = _root.money;
_root.TotalScore3 = _root.money + randRange(6000, 7000);
}
}
if (((_root.l4comp == true) || (_root.l5comp == true)) || (_root.l6comp == true)) {
if (_root.displayPlace == "1st") {
_root.money = randRange(30000, 34000);
_root.TotalScore3 = _root.money + randRange(30000, 34000);
_root.l3comp = true;
if (_root.l7compDrift == false) {
_root.l7comp = true;
} else {
_root.l7comp = false;
}
}
if (_root.displayPlace == "2nd") {
_root.money = _root.money;
_root.TotalScore3 = _root.money + randRange(15000, 16000);
}
if (_root.displayPlace == "3rd") {
_root.money = _root.money;
_root.TotalScore3 = _root.money + randRange(10000, 11000);
}
if (_root.displayPlace == "4th") {
_root.money = _root.money;
_root.TotalScore3 = _root.money + randRange(8000, 9000);
}
if (_root.displayPlace == "5th") {
_root.money = _root.money;
_root.TotalScore3 = _root.money + randRange(6000, 7000);
}
}
}
if (_root.raceChoice == 3) {
if ((!_root.l5comp) && (!_root.l6comp)) {
if (_root.displayPlace == "1st") {
_root.money = _root.money + randRange(40000, 45000);
_root.TotalScore4 = _root.money + randRange(40000, 45000);
_root.l4comp = true;
}
if (_root.displayPlace == "2nd") {
_root.money = _root.money;
_root.TotalScore4 = _root.money + randRange(20000, 21000);
}
if (_root.displayPlace == "3rd") {
_root.money = _root.money;
_root.TotalScore4 = _root.money + randRange(15000, 16000);
}
if (_root.displayPlace == "4th") {
_root.money = _root.money;
_root.TotalScore4 = _root.money + randRange(12000, 13000);
}
if (_root.displayPlace == "5th") {
_root.money = _root.money;
_root.TotalScore4 = _root.money + randRange(10000, 11000);
}
}
if ((_root.l5comp == true) || (_root.l6comp == true)) {
if (_root.displayPlace == "1st") {
_root.money = randRange(40000, 45000);
_root.TotalScore4 = _root.money + randRange(40000, 45000);
_root.l4comp = true;
}
if (_root.displayPlace == "2nd") {
_root.money = _root.money;
_root.TotalScore4 = _root.money + randRange(20000, 21000);
}
if (_root.displayPlace == "3rd") {
_root.money = _root.money;
_root.TotalScore4 = _root.money + randRange(15000, 16000);
}
if (_root.displayPlace == "4th") {
_root.money = _root.money;
_root.TotalScore4 = _root.money + randRange(12000, 13000);
}
if (_root.displayPlace == "5th") {
_root.money = _root.money;
_root.TotalScore4 = _root.money + randRange(10000, 11000);
}
}
}
if (_root.raceChoice == 4) {
if (!_root.l6comp) {
if (_root.displayPlace == "1st") {
_root.money = _root.money + randRange(51000, 55000);
_root.TotalScore5 = _root.money + randRange(51000, 55000);
_root.l5comp = true;
if (_root.l8compDrift == false) {
_root.l8comp = true;
} else {
_root.l8comp = false;
}
}
if (_root.displayPlace == "2nd") {
_root.money = _root.money;
_root.TotalScore5 = _root.money + randRange(25000, 26000);
}
if (_root.displayPlace == "3rd") {
_root.money = _root.money;
_root.TotalScore5 = _root.money + randRange(20000, 21000);
}
if (_root.displayPlace == "4th") {
_root.money = _root.money;
_root.TotalScore5 = _root.money + randRange(15000, 16000);
}
if (_root.displayPlace == "5th") {
_root.money = _root.money;
_root.TotalScore5 = _root.money + randRange(13000, 14000);
}
}
if (_root.l6comp == true) {
if (_root.displayPlace == "1st") {
_root.money = randRange(51000, 55000);
_root.TotalScore5 = _root.money + randRange(51000, 55000);
_root.l5comp = true;
if (_root.l8compDrift == false) {
_root.l8comp = true;
} else {
_root.l8comp = false;
}
}
if (_root.displayPlace == "2nd") {
_root.money = _root.money;
_root.TotalScore5 = _root.money + randRange(25000, 26000);
}
if (_root.displayPlace == "3rd") {
_root.money = _root.money;
_root.TotalScore5 = _root.money + randRange(20000, 21000);
}
if (_root.displayPlace == "4th") {
_root.money = _root.money;
_root.TotalScore5 = _root.money + randRange(15000, 16000);
}
if (_root.displayPlace == "5th") {
_root.money = _root.money;
_root.TotalScore5 = _root.money + randRange(13000, 14000);
}
}
}
if (_root.raceChoice == 5) {
if (_root.displayPlace == "1st") {
_root.money = _root.money + randRange(55000, 60000);
_root.TotalScore6 = _root.money + randRange(55000, 60000);
_root.l6comp = true;
}
if (_root.displayPlace == "2nd") {
_root.money = _root.money;
_root.TotalScore6 = _root.money + randRange(25000, 26000);
}
if (_root.displayPlace == "3rd") {
_root.money = _root.money;
_root.TotalScore6 = _root.money + randRange(20000, 21000);
}
if (_root.displayPlace == "4th") {
_root.money = _root.money;
_root.TotalScore6 = _root.money + randRange(18000, 19000);
}
if (_root.displayPlace == "5th") {
_root.money = _root.money;
_root.TotalScore6 = _root.money + randRange(16000, 17000);
}
}
_root.TotalScore = (((((((_root.TotalScore1 + _root.TotalScore2) + _root.TotalScore3) + _root.TotalScore4) + _root.TotalScore5) + _root.TotalScore6) + _root.TotalScore7) + _root.TotalScore8) + _root.TotalScore9;
Frame 87
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
gfx.idle.enter();
returnTo = "results";
boost = 0;
_root.gamebg.stop();
if (!_root.mute) {
_root.bg.start(0, 999);
} else {
_root.bg.stop();
}
if (_root.raceChoice == 0) {
if (_root.displayPlace == "1st") {
_root.money = randRange(11000, 12000);
_root.TotalScore1 = _root.money + randRange(11000, 12000);
_root.l1comp = true;
if (_root.l6compDrift == false) {
_root.l6comp = true;
} else {
_root.l6comp = false;
}
}
if (_root.displayPlace == "2nd") {
_root.money = randRange(6000, 7000);
_root.TotalScore1 = _root.money + randRange(6000, 7000);
}
if (_root.displayPlace == "3rd") {
_root.money = randRange(4000, 5000);
_root.TotalScore1 = _root.money + randRange(4000, 5000);
}
if (_root.displayPlace == "4th") {
_root.money = randRange(2000, 3000);
_root.TotalScore1 = _root.money + randRange(2000, 3000);
}
if (_root.displayPlace == "5th") {
_root.money = randRange(1000, 2000);
_root.TotalScore1 = _root.money + randRange(1000, 2000);
}
}
if (_root.raceChoice == 1) {
if ((((!_root.l3comp) && (!_root.l4comp)) && (!_root.l5comp)) && (!_root.l6comp)) {
if (_root.displayPlace == "1st") {
_root.money = _root.money + randRange(21000, 24000);
_root.TotalScore2 = _root.money + randRange(21000, 24000);
_root.l2comp = true;
}
if (_root.displayPlace == "2nd") {
_root.money = _root.money;
_root.TotalScore2 = _root.money + randRange(11000, 12000);
}
if (_root.displayPlace == "3rd") {
_root.money = _root.money;
_root.TotalScore2 = _root.money + randRange(8000, 9000);
}
if (_root.displayPlace == "4th") {
_root.money = _root.money;
_root.TotalScore2 = _root.money + randRange(6000, 7000);
}
if (_root.displayPlace == "5th") {
_root.money = _root.money;
_root.TotalScore2 = _root.money + randRange(5000, 6000);
}
}
if ((((_root.l3comp == true) || (_root.l4comp == true)) || (_root.l5comp == true)) || (_root.l6comp == true)) {
if (_root.displayPlace == "1st") {
_root.money = randRange(21000, 24000);
_root.TotalScore2 = _root.money + randRange(21000, 24000);
_root.l2comp = true;
}
if (_root.displayPlace == "2nd") {
_root.money = _root.money;
_root.TotalScore2 = _root.money + randRange(11000, 12000);
}
if (_root.displayPlace == "3rd") {
_root.money = _root.money;
_root.TotalScore2 = _root.money + randRange(8000, 9000);
}
if (_root.displayPlace == "4th") {
_root.money = _root.money;
_root.TotalScore2 = _root.money + randRange(6000, 7000);
}
if (_root.displayPlace == "5th") {
_root.money = _root.money;
_root.TotalScore2 = _root.money + randRange(5000, 6000);
}
}
}
if (_root.raceChoice == 2) {
if (((!_root.l4comp) && (!_root.l5comp)) && (!_root.l6comp)) {
if (_root.displayPlace == "1st") {
_root.money = _root.money + randRange(30000, 34000);
_root.TotalScore3 = _root.money + randRange(30000, 34000);
_root.l3comp = true;
if (_root.l7compDrift == false) {
_root.l7comp = true;
} else {
_root.l7comp = false;
}
}
if (_root.displayPlace == "2nd") {
_root.money = _root.money;
_root.TotalScore3 = _root.money + randRange(15000, 16000);
}
if (_root.displayPlace == "3rd") {
_root.money = _root.money;
_root.TotalScore3 = _root.money + randRange(10000, 11000);
}
if (_root.displayPlace == "4th") {
_root.money = _root.money;
_root.TotalScore3 = _root.money + randRange(8000, 9000);
}
if (_root.displayPlace == "5th") {
_root.money = _root.money;
_root.TotalScore3 = _root.money + randRange(6000, 7000);
}
}
if (((_root.l4comp == true) || (_root.l5comp == true)) || (_root.l6comp == true)) {
if (_root.displayPlace == "1st") {
_root.money = randRange(30000, 34000);
_root.TotalScore3 = _root.money + randRange(30000, 34000);
_root.l3comp = true;
if (_root.l7compDrift == false) {
_root.l7comp = true;
} else {
_root.l7comp = false;
}
}
if (_root.displayPlace == "2nd") {
_root.money = _root.money;
_root.TotalScore3 = _root.money + randRange(15000, 16000);
}
if (_root.displayPlace == "3rd") {
_root.money = _root.money;
_root.TotalScore3 = _root.money + randRange(10000, 11000);
}
if (_root.displayPlace == "4th") {
_root.money = _root.money;
_root.TotalScore3 = _root.money + randRange(8000, 9000);
}
if (_root.displayPlace == "5th") {
_root.money = _root.money;
_root.TotalScore3 = _root.money + randRange(6000, 7000);
}
}
}
if (_root.raceChoice == 3) {
if ((!_root.l5comp) && (!_root.l6comp)) {
if (_root.displayPlace == "1st") {
_root.money = _root.money + randRange(40000, 45000);
_root.TotalScore4 = _root.money + randRange(40000, 45000);
_root.l4comp = true;
}
if (_root.displayPlace == "2nd") {
_root.money = _root.money;
_root.TotalScore4 = _root.money + randRange(20000, 21000);
}
if (_root.displayPlace == "3rd") {
_root.money = _root.money;
_root.TotalScore4 = _root.money + randRange(15000, 16000);
}
if (_root.displayPlace == "4th") {
_root.money = _root.money;
_root.TotalScore4 = _root.money + randRange(12000, 13000);
}
if (_root.displayPlace == "5th") {
_root.money = _root.money;
_root.TotalScore4 = _root.money + randRange(10000, 11000);
}
}
if ((_root.l5comp == true) || (_root.l6comp == true)) {
if (_root.displayPlace == "1st") {
_root.money = randRange(40000, 45000);
_root.TotalScore4 = _root.money + randRange(40000, 45000);
_root.l4comp = true;
}
if (_root.displayPlace == "2nd") {
_root.money = _root.money;
_root.TotalScore4 = _root.money + randRange(20000, 21000);
}
if (_root.displayPlace == "3rd") {
_root.money = _root.money;
_root.TotalScore4 = _root.money + randRange(15000, 16000);
}
if (_root.displayPlace == "4th") {
_root.money = _root.money;
_root.TotalScore4 = _root.money + randRange(12000, 13000);
}
if (_root.displayPlace == "5th") {
_root.money = _root.money;
_root.TotalScore4 = _root.money + randRange(10000, 11000);
}
}
}
if (_root.raceChoice == 4) {
if (!_root.l6comp) {
if (_root.displayPlace == "1st") {
_root.money = _root.money + randRange(51000, 55000);
_root.TotalScore5 = _root.money + randRange(51000, 55000);
_root.l5comp = true;
if (_root.l8compDrift == false) {
_root.l8comp = true;
} else {
_root.l8comp = false;
}
}
if (_root.displayPlace == "2nd") {
_root.money = _root.money;
_root.TotalScore5 = _root.money + randRange(25000, 26000);
}
if (_root.displayPlace == "3rd") {
_root.money = _root.money;
_root.TotalScore5 = _root.money + randRange(20000, 21000);
}
if (_root.displayPlace == "4th") {
_root.money = _root.money;
_root.TotalScore5 = _root.money + randRange(15000, 16000);
}
if (_root.displayPlace == "5th") {
_root.money = _root.money;
_root.TotalScore5 = _root.money + randRange(13000, 14000);
}
}
if (_root.l6comp == true) {
if (_root.displayPlace == "1st") {
_root.money = randRange(51000, 55000);
_root.TotalScore5 = _root.money + randRange(51000, 55000);
_root.l5comp = true;
if (_root.l8compDrift == false) {
_root.l8comp = true;
} else {
_root.l8comp = false;
}
}
if (_root.displayPlace == "2nd") {
_root.money = _root.money;
_root.TotalScore5 = _root.money + randRange(25000, 26000);
}
if (_root.displayPlace == "3rd") {
_root.money = _root.money;
_root.TotalScore5 = _root.money + randRange(20000, 21000);
}
if (_root.displayPlace == "4th") {
_root.money = _root.money;
_root.TotalScore5 = _root.money + randRange(15000, 16000);
}
if (_root.displayPlace == "5th") {
_root.money = _root.money;
_root.TotalScore5 = _root.money + randRange(13000, 14000);
}
}
}
if (_root.raceChoice == 5) {
if (_root.displayPlace == "1st") {
_root.money = _root.money + randRange(55000, 60000);
_root.TotalScore6 = _root.money + randRange(55000, 60000);
_root.l6comp = true;
}
if (_root.displayPlace == "2nd") {
_root.money = _root.money;
_root.TotalScore6 = _root.money + randRange(25000, 26000);
}
if (_root.displayPlace == "3rd") {
_root.money = _root.money;
_root.TotalScore6 = _root.money + randRange(20000, 21000);
}
if (_root.displayPlace == "4th") {
_root.money = _root.money;
_root.TotalScore6 = _root.money + randRange(18000, 19000);
}
if (_root.displayPlace == "5th") {
_root.money = _root.money;
_root.TotalScore6 = _root.money + randRange(16000, 17000);
}
}
if (_root.raceChoice == 6) {
_root.l8compDrift = true;
_root.l8comp = false;
_root.playTS_txt._y = _root.playTS_txt._y - 40;
_root.playTS._y = _root.playTS._y - 40;
_root.playMny_txt._y = _root.playMny_txt._y - 40;
_root.playMny._y = _root.playMny._y - 40;
_root.playTime_txt._visible = false;
_root.playTime._visible = false;
_root.plyPost_place._visible = false;
_root.plyPost._visible = false;
if (_root.driftTimes >= 0) {
_root.money = randRange(52000, 56000);
_root.TotalScore9 = _root.money + randRange(52000, 56000);
_root.l5comp = true;
}
}
if (_root.raceChoice == 7) {
_root.l6compDrift = true;
_root.l6comp = false;
_root.playTS_txt._y = _root.playTS_txt._y - 40;
_root.playTS._y = _root.playTS._y - 40;
_root.playMny_txt._y = _root.playMny_txt._y - 40;
_root.playMny._y = _root.playMny._y - 40;
_root.playTime_txt._visible = false;
_root.playTime._visible = false;
_root.plyPost_place._visible = false;
_root.plyPost._visible = false;
if (_root.driftTimes >= 0) {
trace("time ;;; " + time);
_root.money = randRange(17000, 19000);
_root.TotalScore7 = _root.money + randRange(17000, 19000);
_root.l1comp = true;
}
}
if (_root.raceChoice == 8) {
_root.l7compDrift = true;
_root.l7comp = false;
_root.playTS_txt._y = _root.playTS_txt._y - 40;
_root.playTS._y = _root.playTS._y - 40;
_root.playMny_txt._y = _root.playMny_txt._y - 40;
_root.playMny._y = _root.playMny._y - 40;
_root.playTime_txt._visible = false;
_root.playTime._visible = false;
_root.plyPost_place._visible = false;
_root.plyPost._visible = false;
if (_root.driftTimes >= 0) {
_root.money = randRange(34000, 36000);
_root.TotalScore8 = _root.money + randRange(34000, 36000);
_root.l3comp = true;
}
}
_root.TotalScore = (((((((_root.TotalScore1 + _root.TotalScore2) + _root.TotalScore3) + _root.TotalScore4) + _root.TotalScore5) + _root.TotalScore6) + _root.TotalScore7) + _root.TotalScore8) + _root.TotalScore9;
Instance of Symbol 740 MovieClip in Frame 87
on (release) {
getURL ("http://www.startonlinegames.com/play.php?id=4270", "_blank");
}
Instance of Symbol 744 MovieClip in Frame 87
on (release) {
getURL ("http://www.startonlinegames.com/play.php?id=4215", "_blank");
}
Instance of Symbol 748 MovieClip in Frame 87
on (release) {
getURL ("http://www.startonlinegames.com/play.php?id=4338", "_blank");
}
Instance of Symbol 752 MovieClip in Frame 87
on (release) {
getURL ("http://www.startonlinegames.com/play.php?id=4404", "_blank");
}
Frame 93
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
gfx.idle.enter();
returnTo = "results";
boost = 0;
_root.gamebg.stop();
if (!_root.mute) {
_root.bg.start(0, 999);
} else {
_root.bg.stop();
}
if (_root.raceChoice == 0) {
if (_root.displayPlace == "1st") {
if (_root.l6compDrift == false) {
_root.l6comp = true;
} else {
_root.l6comp = false;
}
_root.money = randRange(11000, 12000);
_root.TotalScore1 = _root.money + randRange(11000, 12000);
_root.l1comp = true;
}
if (_root.displayPlace == "2nd") {
_root.money = randRange(6000, 7000);
_root.TotalScore1 = _root.money + randRange(6000, 7000);
}
if (_root.displayPlace == "3rd") {
_root.money = randRange(4000, 5000);
_root.TotalScore1 = _root.money + randRange(4000, 5000);
}
if (_root.displayPlace == "4th") {
_root.money = randRange(2000, 3000);
_root.TotalScore1 = _root.money + randRange(2000, 3000);
}
if (_root.displayPlace == "5th") {
_root.money = randRange(1000, 2000);
_root.TotalScore1 = _root.money + randRange(1000, 2000);
}
}
if (_root.raceChoice == 1) {
if ((((!_root.l3comp) && (!_root.l4comp)) && (!_root.l5comp)) && (!_root.l6comp)) {
if (_root.displayPlace == "1st") {
_root.money = _root.money + randRange(21000, 24000);
_root.TotalScore2 = _root.money + randRange(21000, 24000);
_root.l2comp = true;
}
if (_root.displayPlace == "2nd") {
_root.money = _root.money;
_root.TotalScore2 = _root.money + randRange(11000, 12000);
}
if (_root.displayPlace == "3rd") {
_root.money = _root.money;
_root.TotalScore2 = _root.money + randRange(8000, 9000);
}
if (_root.displayPlace == "4th") {
_root.money = _root.money;
_root.TotalScore2 = _root.money + randRange(6000, 7000);
}
if (_root.displayPlace == "5th") {
_root.money = _root.money;
_root.TotalScore2 = _root.money + randRange(5000, 6000);
}
}
if ((((_root.l3comp == true) || (_root.l4comp == true)) || (_root.l5comp == true)) || (_root.l6comp == true)) {
if (_root.displayPlace == "1st") {
_root.money = randRange(21000, 24000);
_root.TotalScore2 = _root.money + randRange(21000, 24000);
_root.l2comp = true;
}
if (_root.displayPlace == "2nd") {
_root.money = _root.money;
_root.TotalScore2 = _root.money + randRange(11000, 12000);
}
if (_root.displayPlace == "3rd") {
_root.money = _root.money;
_root.TotalScore2 = _root.money + randRange(8000, 9000);
}
if (_root.displayPlace == "4th") {
_root.money = _root.money;
_root.TotalScore2 = _root.money + randRange(6000, 7000);
}
if (_root.displayPlace == "5th") {
_root.money = _root.money;
_root.TotalScore2 = _root.money + randRange(5000, 6000);
}
}
}
if (_root.raceChoice == 2) {
if (((!_root.l4comp) && (!_root.l5comp)) && (!_root.l6comp)) {
if (_root.displayPlace == "1st") {
_root.money = _root.money + randRange(30000, 34000);
_root.TotalScore3 = _root.money + randRange(30000, 34000);
_root.l3comp = true;
if (_root.l7compDrift == false) {
_root.l7comp = true;
} else {
_root.l7comp = false;
}
}
if (_root.displayPlace == "2nd") {
_root.money = _root.money;
_root.TotalScore3 = _root.money + randRange(15000, 16000);
}
if (_root.displayPlace == "3rd") {
_root.money = _root.money;
_root.TotalScore3 = _root.money + randRange(10000, 11000);
}
if (_root.displayPlace == "4th") {
_root.money = _root.money;
_root.TotalScore3 = _root.money + randRange(8000, 9000);
}
if (_root.displayPlace == "5th") {
_root.money = _root.money;
_root.TotalScore3 = _root.money + randRange(6000, 7000);
}
}
if (((_root.l4comp == true) || (_root.l5comp == true)) || (_root.l6comp == true)) {
if (_root.displayPlace == "1st") {
_root.money = randRange(30000, 34000);
_root.TotalScore3 = _root.money + randRange(30000, 34000);
_root.l3comp = true;
if (_root.l7compDrift == false) {
_root.l7comp = true;
} else {
_root.l7comp = false;
}
}
if (_root.displayPlace == "2nd") {
_root.money = _root.money;
_root.TotalScore3 = _root.money + randRange(15000, 16000);
}
if (_root.displayPlace == "3rd") {
_root.money = _root.money;
_root.TotalScore3 = _root.money + randRange(10000, 11000);
}
if (_root.displayPlace == "4th") {
_root.money = _root.money;
_root.TotalScore3 = _root.money + randRange(8000, 9000);
}
if (_root.displayPlace == "5th") {
_root.money = _root.money;
_root.TotalScore3 = _root.money + randRange(6000, 7000);
}
}
}
if (_root.raceChoice == 3) {
if ((!_root.l5comp) && (!_root.l6comp)) {
if (_root.displayPlace == "1st") {
_root.money = _root.money + randRange(40000, 45000);
_root.TotalScore4 = _root.money + randRange(40000, 45000);
_root.l4comp = true;
}
if (_root.displayPlace == "2nd") {
_root.money = _root.money;
_root.TotalScore4 = _root.money + randRange(20000, 21000);
}
if (_root.displayPlace == "3rd") {
_root.money = _root.money;
_root.TotalScore4 = _root.money + randRange(15000, 16000);
}
if (_root.displayPlace == "4th") {
_root.money = _root.money;
_root.TotalScore4 = _root.money + randRange(12000, 13000);
}
if (_root.displayPlace == "5th") {
_root.money = _root.money;
_root.TotalScore4 = _root.money + randRange(10000, 11000);
}
}
if ((_root.l5comp == true) || (_root.l6comp == true)) {
if (_root.displayPlace == "1st") {
_root.money = randRange(40000, 45000);
_root.TotalScore4 = _root.money + randRange(40000, 45000);
_root.l4comp = true;
}
if (_root.displayPlace == "2nd") {
_root.money = _root.money;
_root.TotalScore4 = _root.money + randRange(20000, 21000);
}
if (_root.displayPlace == "3rd") {
_root.money = _root.money;
_root.TotalScore4 = _root.money + randRange(15000, 16000);
}
if (_root.displayPlace == "4th") {
_root.money = _root.money;
_root.TotalScore4 = _root.money + randRange(12000, 13000);
}
if (_root.displayPlace == "5th") {
_root.money = _root.money;
_root.TotalScore4 = _root.money + randRange(10000, 11000);
}
}
}
if (_root.raceChoice == 4) {
if (!_root.l6comp) {
if (_root.displayPlace == "1st") {
_root.money = _root.money + randRange(51000, 55000);
_root.TotalScore5 = _root.money + randRange(51000, 55000);
_root.l5comp = true;
if (_root.l8compDrift == false) {
_root.l8comp = true;
} else {
_root.l8comp = false;
}
}
if (_root.displayPlace == "2nd") {
_root.money = _root.money;
_root.TotalScore5 = _root.money + randRange(25000, 26000);
}
if (_root.displayPlace == "3rd") {
_root.money = _root.money;
_root.TotalScore5 = _root.money + randRange(20000, 21000);
}
if (_root.displayPlace == "4th") {
_root.money = _root.money;
_root.TotalScore5 = _root.money + randRange(15000, 16000);
}
if (_root.displayPlace == "5th") {
_root.money = _root.money;
_root.TotalScore5 = _root.money + randRange(13000, 14000);
}
}
if (_root.l6comp == true) {
if (_root.displayPlace == "1st") {
_root.money = randRange(51000, 55000);
_root.TotalScore5 = _root.money + randRange(51000, 55000);
_root.l5comp = true;
if (_root.l8compDrift == false) {
_root.l8comp = true;
} else {
_root.l8comp = false;
}
}
if (_root.displayPlace == "2nd") {
_root.money = _root.money;
_root.TotalScore5 = _root.money + randRange(25000, 26000);
}
if (_root.displayPlace == "3rd") {
_root.money = _root.money;
_root.TotalScore5 = _root.money + randRange(20000, 21000);
}
if (_root.displayPlace == "4th") {
_root.money = _root.money;
_root.TotalScore5 = _root.money + randRange(15000, 16000);
}
if (_root.displayPlace == "5th") {
_root.money = _root.money;
_root.TotalScore5 = _root.money + randRange(13000, 14000);
}
}
}
if (_root.raceChoice == 5) {
if (_root.displayPlace == "1st") {
_root.money = _root.money + randRange(55000, 60000);
_root.TotalScore6 = _root.money + randRange(55000, 60000);
}
if (_root.displayPlace == "2nd") {
_root.money = _root.money;
_root.TotalScore6 = _root.money + randRange(25000, 26000);
}
if (_root.displayPlace == "3rd") {
_root.money = _root.money;
_root.TotalScore6 = _root.money + randRange(20000, 21000);
}
if (_root.displayPlace == "4th") {
_root.money = _root.money;
_root.TotalScore6 = _root.money + randRange(18000, 19000);
}
if (_root.displayPlace == "5th") {
_root.money = _root.money;
_root.TotalScore6 = _root.money + randRange(16000, 17000);
}
}
if (_root.raceChoice == 6) {
_root.l8compDrift = true;
_root.l8comp = false;
_root.playTime_txt._visible = false;
_root.playTime._visible = false;
_root.plyPost_place._visible = false;
_root.plyPost._visible = false;
if (_root.driftTimes >= 0) {
_root.money = randRange(52000, 56000);
_root.TotalScore9 = _root.money + randRange(52000, 56000);
_root.l5comp = true;
}
}
if (_root.raceChoice == 7) {
_root.l6compDrift = true;
_root.l6comp = false;
_root.playTime_txt._visible = false;
_root.playTime._visible = false;
_root.plyPost_place._visible = false;
_root.plyPost._visible = false;
if (_root.driftTimes >= 0) {
trace("time ;;; " + time);
_root.money = randRange(17000, 19000);
_root.TotalScore7 = _root.money + randRange(17000, 19000);
_root.l1comp = true;
}
}
if (_root.raceChoice == 8) {
_root.l7compDrift = true;
_root.l7comp = false;
_root.playTime_txt._visible = false;
_root.playTime._visible = false;
_root.plyPost_place._visible = false;
_root.plyPost._visible = false;
if (_root.driftTimes >= 0) {
_root.money = randRange(34000, 36000);
_root.TotalScore8 = _root.money + randRange(34000, 36000);
_root.l3comp = true;
}
}
_root.TotalScore = (((((((_root.TotalScore1 + _root.TotalScore2) + _root.TotalScore3) + _root.TotalScore4) + _root.TotalScore5) + _root.TotalScore6) + _root.TotalScore7) + _root.TotalScore8) + _root.TotalScore9;
Symbol 4 MovieClip [skid1] Frame 15
removeMovieClip(this);
Symbol 21 MovieClip Frame 29
stop();
Symbol 22 MovieClip [skid] Frame 15
removeMovieClip(this);
Symbol 86 MovieClip Frame 88
stop();
Symbol 97 Button
on (release) {
getURL ("http://www.startonlinegames.com/", "_blank");
}
Symbol 104 Button
on (release) {
gotoAndPlay ("anim");
}
Symbol 105 MovieClip Frame 1
stop();
this.onEnterFrame = function () {
var _local3 = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
bar._width = _local3 * 3.54;
per.text = _local3;
if ((_local3 == 100) && (_root.ads == true)) {
gotoAndStop ("loaded");
delete this.onEnterFrame;
}
};
Symbol 105 MovieClip Frame 2
stop();
Symbol 105 MovieClip Frame 64
_root.gotoAndStop("pre");
Symbol 118 Button
on (press) {
_root.sounds.press.start();
_root.gotoAndStop("instructions");
}
on (rollOver) {
curmccc.gotoAndPlay(2);
}
on (rollOut) {
curmccc.gotoAndPlay(13);
}
Symbol 123 Button
on (press) {
_root.sounds.press.start();
_root.gotoAndStop("instructions");
}
on (rollOver) {
curmcc.gotoAndPlay(2);
}
on (rollOut) {
curmcc.gotoAndPlay(13);
}
Symbol 128 Button
on (release) {
getURL ("http://www.startonlinegames.com", "_blank");
}
on (rollOver) {
curmcccc.gotoAndPlay(2);
}
on (rollOut) {
curmcccc.gotoAndPlay(13);
}
Symbol 131 Button
on (release) {
getURL ("http://www.startonlinegames.com", "_blank");
}
Symbol 153 MovieClip Frame 1
stop();
Symbol 153 MovieClip Frame 2
stop();
Symbol 160 Button
on (release) {
_root.controlMode = 0;
_root.gotoAndStop("choose");
}
on (rollOver) {
curmcccc.gotoAndPlay(2);
}
on (rollOut) {
curmcccc.gotoAndPlay(13);
}
Symbol 165 Button
on (release) {
_root.gotoAndStop("title");
}
Symbol 180 MovieClip Frame 1
stop();
Symbol 180 MovieClip Frame 2
stop();
Symbol 180 MovieClip Frame 3
stop();
Symbol 180 MovieClip Frame 4
stop();
Symbol 180 MovieClip Frame 5
stop();
Symbol 180 MovieClip Frame 6
stop();
Symbol 201 Button
on (release) {
if (_root.money >= 10000) {
_root.select(1);
_root.boost = 1.5;
_root.money = Math.abs(10000 - _root.money);
_root.car1 = true;
if (_root.car1 == true) {
_root.b1t = "$old";
_root.car_DET.b1._visible = false;
}
} else {
_root.nn._visible = false;
_root.enoughm._visible = true;
_root.enoughm.cc.gotoAndPlay(2);
}
_root.cardetails.gotoAndStop(2);
}
Symbol 209 Button
on (release) {
if (_root.money >= 20000) {
_root.select(2);
_root.boost = 0.4;
_root.money = Math.abs(20000 - _root.money);
_root.car2 = true;
if (_root.car2 == true) {
_root.b2t = "$old";
_root.car_DET.b2._visible = false;
}
} else {
_root.nn._visible = false;
_root.enoughm._visible = true;
_root.enoughm.cc.gotoAndPlay(2);
}
_root.cardetails.gotoAndStop(3);
}
Symbol 218 Button
on (release) {
if (_root.money >= 30000) {
_root.select(3);
_root.boost = 1;
_root.money = Math.abs(30000 - _root.money);
_root.car3 = true;
if (_root.car3 == true) {
_root.b3t = "$old";
_root.car_DET.b3._visible = false;
}
} else {
_root.nn._visible = false;
_root.enoughm._visible = true;
_root.enoughm.cc.gotoAndPlay(2);
}
_root.cardetails.gotoAndStop(4);
}
Symbol 225 Button
on (release) {
if (_root.money >= 40000) {
_root.select(4);
_root.boost = 1;
_root.money = Math.abs(40000 - _root.money);
_root.car4 = true;
if (_root.car4 == true) {
_root.b4t = "$old";
_root.car_DET.b4._visible = false;
}
} else {
_root.nn._visible = false;
_root.enoughm._visible = true;
_root.enoughm.cc.gotoAndPlay(2);
}
_root.cardetails.gotoAndStop(5);
}
Symbol 234 Button
on (release) {
if (_root.money >= 50000) {
_root.select(5);
_root.boost = 1;
_root.money = Math.abs(50000 - _root.money);
_root.car5 = true;
if (_root.car5 == true) {
_root.b5t = "$old";
_root.car_DET.b5._visible = false;
}
} else {
_root.nn._visible = false;
_root.enoughm._visible = true;
_root.enoughm.cc.gotoAndPlay(2);
}
_root.cardetails.gotoAndStop(6);
}
Symbol 235 MovieClip Frame 1
stop();
Symbol 235 MovieClip Frame 2
stop();
Symbol 235 MovieClip Frame 3
stop();
Symbol 235 MovieClip Frame 4
stop();
Symbol 235 MovieClip Frame 5
stop();
Symbol 235 MovieClip Frame 6
stop();
Symbol 239 Button
on (release) {
_root.select(0);
car_CYC.gotoAndStop(1);
car_DET.gotoAndStop(1);
}
Symbol 243 Button
on (release) {
car_CYC.gotoAndStop(2);
car_DET.gotoAndStop(2);
if (_root.b1t == "$old") {
trace("1111111111111111111");
_root.car_DET.b1._visible = false;
_root.select(1);
}
}
Symbol 247 Button
on (release) {
car_CYC.gotoAndStop(3);
car_DET.gotoAndStop(3);
if (_root.b2t == "$old") {
trace("2222222222222222222222");
_root.car_DET.b2._visible = false;
_root.select(2);
}
}
Symbol 251 Button
on (release) {
car_CYC.gotoAndStop(4);
car_DET.gotoAndStop(4);
if (_root.b3t == "$old") {
trace("333333333333333333");
_root.car_DET.b3._visible = false;
_root.select(3);
}
}
Symbol 255 Button
on (release) {
car_CYC.gotoAndStop(5);
car_DET.gotoAndStop(5);
if (_root.b4t == "$old") {
trace("444444444444444444444444");
_root.car_DET.b4._visible = false;
_root.select(4);
}
}
Symbol 259 Button
on (release) {
car_CYC.gotoAndStop(6);
car_DET.gotoAndStop(6);
if (_root.b5t == "$old") {
trace("5555555555555555555");
_root.car_DET.b5._visible = false;
_root.select(5);
}
}
Symbol 262 Button
on (release) {
if (_root.money >= _root.bt6) {
_root.ntimes = _root.ntimes + 1;
if (_root.ntimes == 1) {
_root.bt6 = 6500;
}
if (_root.ntimes == 2) {
_root.bt6 = 7000;
}
if (_root.ntimes == 3) {
_root.bt6 = 8500;
}
if (_root.ntimes == 4) {
_root.bt6 = 10000;
}
if (_root.ntimes >= 5) {
_root.bt6 = 12500;
}
_root.boost = 1;
_root.money = Math.abs(_root.bt6 - _root.money);
} else {
_root.enoughm._visible = false;
_root.nn._visible = true;
_root.nn.gotoAndPlay(2);
}
_root.cardetails.gotoAndStop(7);
}
Symbol 272 Button
on (release) {
if ((_root.choice == undefined) && (_root.choice == null)) {
_root.choice = 0;
_root.gotoAndStop("location");
} else if ((_root.choice != undefined) && (_root.choice != null)) {
_root.gotoAndStop("location");
}
}
on (rollOver) {
curmccccn.gotoAndPlay(2);
}
on (rollOut) {
curmccccn.gotoAndPlay(13);
}
Symbol 281 MovieClip Frame 39
_parent._parent.enoughm._visible = false;
Symbol 282 MovieClip Frame 1
stop();
Symbol 284 MovieClip Frame 39
_parent.nn._visible = false;
Symbol 287 MovieClip Frame 6
stop();
Symbol 293 Button
on (release) {
_root.raceChoice = 0;
_root.gotoAndStop("game");
}
Symbol 305 MovieClip Frame 1
stop();
Symbol 305 MovieClip Frame 2
stop();
Instance of Symbol 303 MovieClip "driftBtn1" in Symbol 305 MovieClip Frame 2
on (release) {
_root.raceChoice = 7;
_root.gotoAndStop("game");
}
Symbol 305 MovieClip Frame 3
stop();
Instance of Symbol 303 MovieClip in Symbol 305 MovieClip Frame 3
/* no clip actions */
Symbol 311 MovieClip Frame 1
stop();
Symbol 311 MovieClip Frame 2
stop();
Instance of Symbol 310 MovieClip in Symbol 311 MovieClip Frame 2
on (release) {
_root.raceChoice = 1;
_root.gotoAndStop("game");
}
Symbol 317 MovieClip Frame 1
stop();
Symbol 317 MovieClip Frame 2
stop();
Instance of Symbol 316 MovieClip in Symbol 317 MovieClip Frame 2
on (release) {
_root.raceChoice = 2;
_root.gotoAndStop("game");
}
Symbol 322 MovieClip Frame 1
stop();
Symbol 322 MovieClip Frame 2
stop();
Instance of Symbol 321 MovieClip "driftBtn2" in Symbol 322 MovieClip Frame 2
on (release) {
_root.raceChoice = 8;
_root.gotoAndStop("game");
}
Symbol 322 MovieClip Frame 3
stop();
Instance of Symbol 321 MovieClip in Symbol 322 MovieClip Frame 3
/* no clip actions */
Symbol 328 MovieClip Frame 1
stop();
Symbol 328 MovieClip Frame 2
stop();
Instance of Symbol 327 MovieClip in Symbol 328 MovieClip Frame 2
on (release) {
_root.raceChoice = 3;
_root.gotoAndStop("game");
}
Symbol 334 MovieClip Frame 1
stop();
Symbol 334 MovieClip Frame 2
stop();
Instance of Symbol 333 MovieClip in Symbol 334 MovieClip Frame 2
on (release) {
_root.raceChoice = 4;
_root.gotoAndStop("game");
}
Symbol 339 MovieClip Frame 1
stop();
Symbol 339 MovieClip Frame 2
stop();
Instance of Symbol 338 MovieClip "driftBtn3" in Symbol 339 MovieClip Frame 2
on (release) {
_root.raceChoice = 6;
_root.gotoAndStop("game");
}
Symbol 339 MovieClip Frame 3
stop();
Instance of Symbol 338 MovieClip in Symbol 339 MovieClip Frame 3
/* no clip actions */
Symbol 345 MovieClip Frame 1
stop();
Symbol 345 MovieClip Frame 2
stop();
Instance of Symbol 344 MovieClip in Symbol 345 MovieClip Frame 2
on (release) {
_root.raceChoice = 5;
_root.gotoAndStop("game");
}
Symbol 350 Button
on (press) {
_root.sounds.press.start();
_root.gotoAndStop("choose");
}
on (rollOver) {
curmccccm.gotoAndPlay(2);
}
on (rollOut) {
curmccccm.gotoAndPlay(13);
}
Symbol 371 MovieClip Frame 1
_visible = false;
Symbol 372 MovieClip Frame 1
nodeList = [node0, node1];
hitterList = [hitter0, hitter1, hitter2, hitter3];
hitterList[0].nodeList = [node0, node1];
hitterList[1].nodeList = [node1, node2];
hitterList[2].nodeList = [node2, node3];
hitterList[3].nodeList = [node3, node4];
var n = [];
for (var j in hitterList) {
for (var i in hitterList[j].nodeList) {
n[i] = {x:hitterList[j].nodeList[i]._x, y:hitterList[j].nodeList[i]._y};
hitterList[j].localToGlobal(n[i]);
}
var distx = (n[0].x - n[1].x);
var disty = (n[0].y - n[1].y);
hitterList[j].collisionNormal = {x:-disty, y:distx};
}
_parent.boxList.push(this);
_visible = _parent.showObjects;
Symbol 375 MovieClip Frame 1
hitterList = [hitter0];
hitterList[0].nodeList = [node0, node1];
var n = [];
for (var j in hitterList) {
for (var i in hitterList[j].nodeList) {
n[i] = {x:hitterList[j].nodeList[i]._x, y:hitterList[j].nodeList[i]._y};
hitterList[j].localToGlobal(n[i]);
}
var distx = (n[0].x - n[1].x);
var disty = (n[0].y - n[1].y);
hitterList[j].collisionNormal = {x:-disty, y:distx};
}
_parent.boxList.push(this);
_visible = _parent.showObjects;
Symbol 384 MovieClip Frame 1
nodeList = [node0, node1];
hitterList = [hitter0, hitter1, hitter2, hitter3];
hitterList[0].nodeList = [node0, node1];
hitterList[1].nodeList = [node1, node2];
hitterList[2].nodeList = [node2, node3];
hitterList[3].nodeList = [node3, node4];
var n = [];
for (var j in hitterList) {
for (var i in hitterList[j].nodeList) {
n[i] = {x:hitterList[j].nodeList[i]._x, y:hitterList[j].nodeList[i]._y};
hitterList[j].localToGlobal(n[i]);
}
var distx = (n[0].x - n[1].x);
var disty = (n[0].y - n[1].y);
hitterList[j].collisionNormal = {x:-disty, y:distx};
}
_parent.boxList.push(this);
_visible = _parent.showObjects;
Symbol 423 MovieClip Frame 1
gotoAndStop(_parent._parent._parent.choice + 1);
Symbol 424 MovieClip Frame 1
_parent.nodeList.push(this);
this._visible = false;
Symbol 443 MovieClip Frame 1
distance = function (x1, y1, x2, y2) {
distx = x1 - x2;
disty = y1 - y2;
return(Math.sqrt((distx * distx) + (disty * disty)));
};
magnitude = function (v1) {
return(distance(0, 0, v1.x, v1.y));
};
dot = function (v1, v2) {
return((v1.x * v2.x) + (v1.y * v2.y));
};
normalize = function (v1) {
var _local1 = 1 / magnitude(v1);
return({x:v1.x * _local1, y:v1.y * _local1});
};
adds = function (v1, v2) {
tempVector = new Object();
tempVector.x = v1.x + v2.x;
tempVector.y = v1.y + v2.y;
return(tempVector);
};
subtract = function (v1, v2) {
tempVector = new Object();
tempVector.x = v1.x - v2.x;
tempVector.y = v1.y - v2.y;
return(tempVector);
};
multiply = function (s, v) {
tempVector = new Object();
tempVector.x = v.x * s;
tempVector.y = v.y * s;
return(tempVector);
};
resetCollisions = function () {
myCollisions = new Array();
myColliders = [];
};
findAngle = function (xdist, ydist) {
a = Math.atan(ydist / xdist) * rad;
if ((xdist > 0) && (ydist < 0)) {
a = -a;
}
if (xdist < 0) {
a = 180 - a;
}
if ((xdist > 0) && (ydist > 0)) {
a = 360 - a;
}
return(a);
};
getSlope = function (x1, y1, x2, y2) {
return((y1 - y2) / (x1 - x2));
};
getIntercept = function (x1, y1, slope) {
return(y1 - (x1 * slope));
};
getIntersection = function (x1, y1, x2, y2, x3, y3, x4, y4) {
m1 = getSlope(x1, y1, x2, y2);
m2 = getSlope(x3, y3, x4, y4);
b1 = getIntercept(x1, y1, m1);
b2 = getIntercept(x3, y3, m2);
tempPoint = new Object();
tempPoint.x = (b2 - b1) / (m1 - m2);
tempPoint.y = (m1 * tempPoint.x) + b1;
return(tempPoint);
};
boxTest = function (which) {
clip = _parent.boxList[which];
if (hitter.hitTest(clip)) {
for (var _local9 in gNodeList) {
if (this._name == "ball") {
_root.hittst = true;
}
var _local4 = {x:gNodeList[_local9].x, y:gNodeList[_local9].y};
this._parent.localToGlobal(_local4);
if (clip.hitTest(_local4.x, _local4.y, true)) {
bumpness = 0.4;
var _local5 = {x:(this.speed.x * bumpness) + gNodeList[_local9].diff.x, y:(this.speed.y * bumpness) + gNodeList[_local9].diff.y};
for (var _local8 in clip.hitterList) {
myDist = distance(gNodeList[_local9].x, gNodeList[_local9].y, clip._x - (clip.hitterList[_local8].collisionNormal.x * 10000000), clip._y - (clip.hitterList[_local8].collisionNormal.y * 10000000));
futureDist = distance(gNodeList[_local9].x + _local5.x, gNodeList[_local9].y + _local5.y, clip._x - (clip.hitterList[_local8].collisionNormal.x * 10000000), clip._y - (clip.hitterList[_local8].collisionNormal.y * 10000000));
if (clip.hitterList[_local8].hitTest(_local4.x, _local4.y, true) && (myDist > futureDist)) {
collisionInfo = new Object();
collisionInfo.perpVector = {x:0, y:0};
collisionInfo.where = _local4;
collisionInfo.heft = heft * 1E16;
collisionInfo.normal = clip.hitterList[_local8].collisionNormal;
collisionInfo.speed = {x:0, y:0};
collisionInfo.mySpeed = _local5;
collisionInfo.mass = 1E18;
collisionInfo.body = clip;
if (nodeList[_local9]._x < 0) {
collisionInfo.backwards = -1.4;
} else {
collisionInfo.backwards = 1;
}
myCollisions.push(collisionInfo);
}
}
}
}
} else if (!hitter.hitTest(clip)) {
for (var _local9 in gNodeList) {
if (this._name == "ball") {
_root.hittst = false;
}
}
}
};
bumperTest = function (which) {
clip = currentBumperList[which];
if (clip.active) {
if (hitter.hitTest(clip)) {
for (var _local5 in gNodeList) {
bumpness = 0.4;
var _local2 = {x:(this.speed.x * bumpness) + gNodeList[_local5].diff.x, y:(this.speed.y * bumpness) + gNodeList[_local5].diff.y};
myDist = distance(gNodeList[_local5].x, gNodeList[_local5].y, clip._x, clip._y);
futureDist = distance(gNodeList[_local5].x + _local2.x, gNodeList[_local5].y + _local2.y, clip._x, clip._y);
myDiff = myDist - clip.span;
myCount++;
if ((myDiff <= 0) && (myDist > futureDist)) {
collisionInfo = new Object();
collisionInfo.collider = clip._name;
collisionInfo.perpVector = {x:0, y:0};
collisionInfo.heft = heft * 1000;
collisionInfo.normal = findNormal(this, clip);
collisionInfo.speed = {x:0, y:0};
collisionInfo.mySpeed = _local2;
collisionInfo.mass = 100000000000000;
myCollisions.push(collisionInfo);
}
}
}
}
};
globalizeNodes = function (who) {
who.gNodeList = [];
for (var _local4 in who.nodeList) {
who.gNodeList[_local4] = {x:nodeList[_local4]._x, y:nodeList[_local4]._y};
who.localToGlobal(who.gNodeList[_local4]);
who.gNodeList[_local4].diff = {x:who.gNodeList[_local4].x - who.nodeList[_local4].oldPos.x, y:who.gNodeList[_local4].y - who.nodeList[_local4].oldPos.y};
who._parent.globalToLocal(who.gNodeList[_local4]);
}
};
saveNodePositions = function () {
for (var _local5 in nodeList) {
var _local2 = {x:nodeList[_local5]._x, y:nodeList[_local5]._y};
this.localToGlobal(_local2);
nodeList[_local5].oldPos = {x:_local2.x, y:_local2.y};
}
};
findNormal = function (me, him) {
tempVector = new Object();
tempVector.x = him._x - me._x;
tempVector.y = him._y - me._y;
return(tempVector);
};
unDaze = function () {
clearInterval(dazeInterval);
dazed = false;
};
daze = function () {
clearInterval(dazeInterval);
if (this != _parent.ball) {
dazeInterval = setInterval(unDaze, 200);
} else {
dazeInterval = setInterval(unDaze, 100);
}
dazed = true;
};
getJ = function (mine, his, normal, hismass, hisHeft, hisPerp) {
myr = (temp = new Object());
diff = new Object();
diff = subtract(mine, his);
temp = multiply(-(1.05 + elastic), diff);
top = dot(temp, normal);
massnum = (1 / mass) + (1 / hismass);
temp = multiply(massnum, normal);
firstAdd = dot(perpVector, normal);
firstAdd = firstAdd * firstAdd;
firstAdd = firstAdd / heft;
secondAdd = dot(hisPerp, normal);
secondAdd = secondAdd * secondAdd;
secondAdd = secondAdd / hisHeft;
bottom = dot(normal, temp);
bottom = bottom + (firstAdd + secondAdd);
j = top / bottom;
return(j);
};
getCollisions = function () {
var _local4 = 0;
while (_local4 < currentBallList.length) {
clip = currentBallList[_local4];
if (clip.id != id) {
isCollider = false;
for (var _local8 in myColliders) {
if (myColliders[_local8] == clip) {
isCollider = true;
}
}
if (!isCollider) {
if (hitter.hitTest(clip.hitter)) {
for (_local4 in gNodeList) {
bumpness = 0.5;
var _local5 = {x:(this.speed.x * bumpness) + gNodeList[_local4].diff.x, y:(this.speed.y * bumpness) + gNodeList[_local4].diff.y};
myDist = distance(this._x, this._y, clip._x, clip._y);
futureDist = distance(this._x + speed.x, this._y + speed.y, clip._x + clip.speed.x, clip._y + clip.speed.y);
var _local3 = {x:gNodeList[_local4].x, y:gNodeList[_local4].y};
this._parent.localToGlobal(_local3);
if (clip.hitter.hitTest(_local3.x, _local3.y, true) && (myDist > futureDist)) {
collisionInfo = new Object();
collisionInfo.where = _local3;
collisionInfo.perpVector = clip.perpVector;
collisionInfo.normal = findNormal(clip, this);
if (this == _parent.ball) {
_parent.makeSpark(_local3, normalize(collisionInfo.normal));
}
collisionInfo.speed = clip.speed;
collisionInfo.mySpeed = speed;
collisionInfo.rot = clip.rot;
collisionInfo.mass = clip.mass;
collisionInfo.heft = clip.heft;
if (nodeList[_local4]._x < 0) {
collisionInfo.backwards = -1.4;
} else {
collisionInfo.backwards = 1;
}
myCollisions.push(collisionInfo);
collisionInfo2 = new Object();
collisionInfo2.perpVector = this.perpVector;
collisionInfo2.normal = findNormal(this, clip);
collisionInfo2.speed = this.speed;
collisionInfo2.mySpeed = clip.speed;
collisionInfo2.rot = this.rot;
collisionInfo2.mass = this.mass;
collisionInfo2.heft = this.heft;
clip.globalToLocal(_local3);
if (_local3.x < 0) {
collisionInfo2.backwards = -1.4;
} else {
collisionInfo2.backwards = 1;
}
clip.myCollisions.push(collisionInfo2);
clip.myColliders.push(this);
}
}
}
}
}
_local4++;
}
var _local9 = magnitude(speed);
_local4 = 0;
while (_local4 < _parent.cornerList.length) {
cornerTest(_local4);
_local4++;
}
_local4 = 0;
while (_local4 < currentBumperList.length) {
bumperTest(_local4);
_local4++;
}
_local4 = 0;
while (_local4 < _parent.boxList.length) {
boxTest(_local4);
_local4++;
}
return(myCollisions);
};
applyFriction = function () {
var _local4 = _parent.findAngle(speed.x, speed.y);
var _local3 = Math.abs((this._rotation - _local4) % 90);
_local3 = ((_local3 / 90) * 0.25) + 0.75;
if (this == _parent.ball) {
}
if (this._name == "ball") {
}
velocity = preVelocity - (friction * _local3);
velocity = Math.max(0, velocity);
ratio = velocity / preVelocity;
speed.x = speed.x * ratio;
speed.y = speed.y * ratio;
};
translate = function () {
saveNodePositions();
oldPos = new Object();
oldPos.x = _x;
oldPos.y = _y;
preVelocity = distance(0, 0, speed.x, speed.y);
spin = spin + preVelocity;
frame = (int(spin * 0.1) % 35) + 1;
_parent.display.hider.gotoAndStop(frame);
if (maxVelocity > maxVelocity) {
finalVel = finalVel * 0.8;
} else {
finalVel = maxVelocity;
}
finalVel = Math.max(finalVel, maxVelocity);
if (preVelocity > finalVel) {
ratio = finalVel / preVelocity;
speed.x = speed.x * ratio;
speed.y = speed.y * ratio;
}
_x = (_x + (speed.x / _parent.iterations));
_y = (_y + (speed.y / _parent.iterations));
_rotation = (_rotation + (rot * rad));
rot = rot * 0.85;
perpVector.x = (-Math.sin(_rotation / rad)) * span;
perpVector.y = Math.cos(_rotation / rad) * span;
preVelocity = distance(0, 0, speed.x, speed.y);
if (preVelocity > 0) {
applyFriction();
}
assignNodeSpeeds();
};
collisionDetection = function () {
collisionList = new Array();
collisionList = getCollisions();
};
collisionResponse = function () {
if (collisionList.length > 0) {
speedTotal = new Object();
speedTotal.x = 0;
speedTotal.y = 0;
rotTotal = 0;
i = 0;
while (i < collisionList.length) {
j = getJ(collisionList[i].mySpeed, collisionList[i].speed, collisionList[i].normal, collisionList[i].mass, collisionList[i].heft, collisionList[i].perpVector);
temp = new Object();
temp = multiply(j / mass, collisionList[i].normal);
speedTotal = adds(speedTotal, temp);
jNormal = new Object();
jNormal = multiply(j, collisionList[i].normal);
value = dot(jNormal, perpVector);
rotTotal = rotTotal + ((value / heft) * collisionList[i].backwards);
var _local3 = collisionList[i].body;
if ((this == _parent.ball) && (collisionList[i].where != undefined)) {
_parent.makeSpark(collisionList[i].where, normalize(collisionList[i].normal));
}
i++;
}
_parent.determineSpecs(_local3._name);
vol = int(magnitude(speedTotal) * 2);
if (vol > 0) {
daze();
}
if ((vol > 4) && (this == _parent.ball)) {
gfx.crash.start(vol * 5);
}
speedTotal.x = speedTotal.x / collisionList.length;
speedTotal.y = speedTotal.y / collisionList.length;
speedTotal.x;
speedTotal.y;
rotTotal = rotTotal / collisionList.length;
rot = rot + rotTotal;
speed = adds(speed, speedTotal);
_parent.checkBounces();
}
};
stop();
myCount = 0;
nodeList = [];
Symbol 445 MovieClip Frame 1
_visible = false;
Symbol 447 MovieClip Frame 1
_visible = false;
Symbol 479 MovieClip Frame 1
stop();
Symbol 479 MovieClip Frame 15
this._visible = false;
Symbol 527 MovieClip Frame 1
function goTowardGoal(who) {
if (!who.dazed) {
if (distance(who._x, who._y, who.path._x, who.path._y) < who.reaction) {
who.nextPath++;
if (who.nextPath == pathList.length) {
who.nextPath = 0;
}
who.path = pathList[who.nextPath];
}
var _local5 = (who.path._x - who._x) + who.xOff;
var _local7 = (who.path._y - who._y) + who.yOff;
var _local6 = Math.min(0.1 * who.preVelocity, 0.02) + 0.002;
var _local4 = findDirection(who._rotation, 360 - who.findAngle(_local5, _local7));
who.rot = who.rot + (_local6 * _local4);
who.speed.x = who.speed.x + (Math.cos(who._rotation / who.rad) * who.accel);
who.speed.y = who.speed.y + (Math.sin(who._rotation / who.rad) * who.accel);
var _local2 = distance(0, 0, who.speed.x, who.speed.y);
if (_local2 > who.maxSpeed) {
var _local3 = who.maxSpeed / _local2;
who.speed.x = who.speed.x * _local3;
who.speed.y = who.speed.y * _local3;
}
}
}
function skidmark() {
var _local3 = {x:ball._x - 4, y:ball._y - 8};
var _local2 = {x:ball._x + 4, y:ball._y - 8};
var _local5 = {x:ball._x - 4, y:ball._y + 8};
var _local4 = {x:ball._x + 4, y:ball._y + 8};
_root.game.attachMovie("skid", "skidtl" + _root.game.getNextHighestDepth(), _root.game.getNextHighestDepth(), {_x:_local3.x, _y:_local3.y, _rotation:ball._rotation});
_root.game.attachMovie("skid", "skidtl" + _root.game.getNextHighestDepth(), _root.game.getNextHighestDepth(), {_x:_local2.x, _y:_local2.y, _rotation:ball._rotation});
_root.game.attachMovie("skid", "skidtl" + _root.game.getNextHighestDepth(), _root.game.getNextHighestDepth(), {_x:_local5.x, _y:_local5.y, _rotation:ball._rotation});
_root.game.attachMovie("skid", "skidtl" + _root.game.getNextHighestDepth(), _root.game.getNextHighestDepth(), {_x:_local4.x, _y:_local4.y, _rotation:ball._rotation});
_root.game.ball.drif_skid.globalToLocal(_local3);
_root.game.ball.drif_skid.globalToLocal(_local2);
_root.game.ball.drif_skid.globalToLocal(_local5);
_root.game.ball.drif_skid.globalToLocal(_local4);
}
function skidmark2() {
var _local3 = {x:ball._x - 4, y:ball._y};
var _local2 = {x:ball._x + 4, y:ball._y};
var _local10 = {x:ball._x - 4, y:ball._y + 8};
var _local8 = {x:ball._x + 4, y:ball._y + 8};
_root.game.attachMovie("skid1", "skidtb" + _root.game.getNextHighestDepth(), _root.game.getNextHighestDepth(), {_x:_local3.x, _y:_local3.y, _rotation:ball._rotation});
_root.game.attachMovie("skid1", "skidtr" + _root.game.getNextHighestDepth(), _root.game.getNextHighestDepth(), {_x:_local2.x, _y:_local2.y, _rotation:ball._rotation});
}
function starVariabels() {
_root.myStar1 = false;
_root.myStar2 = false;
_root.myStar3 = false;
_root.myStar4 = false;
_root.myStar5 = false;
star1._visible = true;
star2._visible = true;
star3._visible = true;
star4._visible = true;
star5._visible = true;
_root.myStar6 = false;
_root.myStar7 = false;
_root.myStar8 = false;
_root.myStar9 = false;
_root.myStar10 = false;
star6._visible = true;
star7._visible = true;
star8._visible = true;
star9._visible = true;
star10._visible = true;
_root.myStar11 = false;
_root.myStar12 = false;
_root.myStar13 = false;
_root.myStar14 = false;
_root.myStar15 = false;
star11._visible = true;
star12._visible = true;
star13._visible = true;
star14._visible = true;
star15._visible = true;
_root.myStar16 = false;
_root.myStar17 = false;
_root.myStar18 = false;
_root.myStar19 = false;
_root.myStar20 = false;
star16._visible = true;
star17._visible = true;
star18._visible = true;
star19._visible = true;
star20._visible = true;
_root.myStar21 = false;
_root.myStar22 = false;
_root.myStar23 = false;
_root.myStar24 = false;
_root.myStar25 = false;
star21._visible = true;
star22._visible = true;
star23._visible = true;
star24._visible = true;
star25._visible = true;
_root.myStar26 = false;
_root.myStar27 = false;
_root.myStar28 = false;
_root.myStar29 = false;
_root.myStar30 = false;
star26._visible = true;
star27._visible = true;
star28._visible = true;
star29._visible = true;
star30._visible = true;
}
function starVariabels1() {
_root.myStar31 = false;
_root.myStar32 = false;
_root.myStar33 = false;
_root.myStar34 = false;
_root.myStar35 = false;
star31._visible = true;
star32._visible = true;
star33._visible = true;
star34._visible = true;
star35._visible = true;
}
function starVariabels2() {
_root.myStar36 = false;
_root.myStar37 = false;
_root.myStar38 = false;
_root.myStar39 = false;
_root.myStar40 = false;
star36._visible = true;
star37._visible = true;
star38._visible = true;
star39._visible = true;
star40._visible = true;
}
function starConditions() {
if (!_root.myStar1) {
if (ball.hitTest(star1)) {
_root.driftCountScore++;
_root.myStar1 = true;
star1.gotoAndPlay(2);
trace("testStar1 :" + _root.driftCountScore);
}
}
if (!_root.myStar2) {
if (ball.hitTest(star2)) {
_root.driftCountScore++;
_root.myStar2 = true;
star2.gotoAndPlay(2);
trace("testStar2 :" + _root.driftCountScore);
}
}
if (!_root.myStar3) {
if (ball.hitTest(star3)) {
_root.driftCountScore++;
_root.myStar3 = true;
star3.gotoAndPlay(2);
trace("testStar3 :" + _root.driftCountScore);
}
}
if (!_root.myStar4) {
if (ball.hitTest(star4)) {
_root.driftCountScore++;
_root.myStar4 = true;
star4.gotoAndPlay(2);
trace("testStar4 :" + _root.driftCountScore);
}
}
if (!_root.myStar5) {
if (ball.hitTest(star5)) {
_root.driftCountScore++;
_root.myStar5 = true;
star5.gotoAndPlay(2);
trace("testStar5 :" + _root.driftCountScore);
}
}
if (!_root.myStar6) {
if (ball.hitTest(star6)) {
_root.driftCountScore++;
_root.myStar6 = true;
star6.gotoAndPlay(2);
trace("testStar6 :" + _root.driftCountScore);
}
}
if (!_root.myStar7) {
if (ball.hitTest(star7)) {
_root.driftCountScore++;
_root.myStar7 = true;
star7.gotoAndPlay(2);
trace("testStar7 :" + _root.driftCountScore);
}
}
if (!_root.myStar8) {
if (ball.hitTest(star8)) {
_root.driftCountScore++;
_root.myStar8 = true;
star8.gotoAndPlay(2);
trace("testStar8 :" + _root.driftCountScore);
}
}
if (!_root.myStar9) {
if (ball.hitTest(star9)) {
_root.driftCountScore++;
_root.myStar9 = true;
star9.gotoAndPlay(2);
trace("testStar9 :" + _root.driftCountScore);
}
}
if (!_root.myStar10) {
if (ball.hitTest(star10)) {
_root.driftCountScore++;
_root.myStar10 = true;
star10.gotoAndPlay(2);
trace("testStar10 :" + _root.driftCountScore);
}
}
if (!_root.myStar11) {
if (ball.hitTest(star11)) {
_root.driftCountScore++;
_root.myStar11 = true;
star11.gotoAndPlay(2);
trace("testStar11 :" + _root.driftCountScore);
}
}
if (!_root.myStar12) {
if (ball.hitTest(star12)) {
_root.driftCountScore++;
_root.myStar12 = true;
star12.gotoAndPlay(2);
trace("testStar12 :" + _root.driftCountScore);
}
}
if (!_root.myStar13) {
if (ball.hitTest(star13)) {
_root.driftCountScore++;
_root.myStar13 = true;
star13.gotoAndPlay(2);
trace("testStar13 :" + _root.driftCountScore);
}
}
if (!_root.myStar14) {
if (ball.hitTest(star14)) {
_root.driftCountScore++;
_root.myStar14 = true;
star14.gotoAndPlay(2);
trace("testStar14 :" + _root.driftCountScore);
}
}
if (!_root.myStar15) {
if (ball.hitTest(star15)) {
_root.driftCountScore++;
_root.myStar15 = true;
star15.gotoAndPlay(2);
trace("testStar15 :" + _root.driftCountScore);
}
}
if (!_root.myStar16) {
if (ball.hitTest(star16)) {
_root.driftCountScore++;
_root.myStar16 = true;
star16.gotoAndPlay(2);
trace("testStar16 :" + _root.driftCountScore);
}
}
if (!_root.myStar17) {
if (ball.hitTest(star17)) {
_root.driftCountScore++;
_root.myStar17 = true;
star17.gotoAndPlay(2);
trace("testStar17 :" + _root.driftCountScore);
}
}
if (!_root.myStar18) {
if (ball.hitTest(star18)) {
_root.driftCountScore++;
_root.myStar18 = true;
star18.gotoAndPlay(2);
trace("testStar18 :" + _root.driftCountScore);
}
}
if (!_root.myStar19) {
if (ball.hitTest(star19)) {
_root.driftCountScore++;
_root.myStar19 = true;
star19.gotoAndPlay(2);
trace("testStar19 :" + _root.driftCountScore);
}
}
if (!_root.myStar20) {
if (ball.hitTest(star20)) {
_root.driftCountScore++;
_root.myStar20 = true;
star20.gotoAndPlay(2);
trace("testStar20 :" + _root.driftCountScore);
}
}
if (!_root.myStar21) {
if (ball.hitTest(star21)) {
_root.driftCountScore++;
_root.myStar21 = true;
star21.gotoAndPlay(2);
trace("testStar21 :" + _root.driftCountScore);
}
}
if (!_root.myStar22) {
if (ball.hitTest(star22)) {
_root.driftCountScore++;
_root.myStar22 = true;
star22.gotoAndPlay(2);
trace("testStar22 :" + _root.driftCountScore);
}
}
if (!_root.myStar23) {
if (ball.hitTest(star23)) {
_root.driftCountScore++;
_root.myStar23 = true;
star23.gotoAndPlay(2);
trace("testStar23 :" + _root.driftCountScore);
}
}
if (!_root.myStar24) {
if (ball.hitTest(star24)) {
_root.driftCountScore++;
_root.myStar24 = true;
star24.gotoAndPlay(2);
trace("testStar24 :" + _root.driftCountScore);
}
}
if (!_root.myStar25) {
if (ball.hitTest(star25)) {
_root.driftCountScore++;
_root.myStar25 = true;
star25.gotoAndPlay(2);
trace("testStar25 :" + _root.driftCountScore);
}
}
if (!_root.myStar26) {
if (ball.hitTest(star26)) {
_root.driftCountScore++;
_root.myStar26 = true;
star26.gotoAndPlay(2);
trace("testStar26 :" + _root.driftCountScore);
}
}
if (!_root.myStar27) {
if (ball.hitTest(star27)) {
_root.driftCountScore++;
_root.myStar27 = true;
star27.gotoAndPlay(2);
trace("testStar27 :" + _root.driftCountScore);
}
}
if (!_root.myStar28) {
if (ball.hitTest(star28)) {
_root.driftCountScore++;
_root.myStar28 = true;
star28.gotoAndPlay(2);
trace("testStar28 :" + _root.driftCountScore);
}
}
if (!_root.myStar29) {
if (ball.hitTest(star29)) {
_root.driftCountScore++;
_root.myStar29 = true;
star29.gotoAndPlay(2);
trace("testStar29 :" + _root.driftCountScore);
}
}
if (!_root.myStar30) {
if (ball.hitTest(star30)) {
_root.driftCountScore++;
_root.myStar30 = true;
star30.gotoAndPlay(2);
trace("testStar30 :" + _root.driftCountScore);
}
}
}
function starConditions1() {
if (!_root.myStar31) {
if (ball.hitTest(star31)) {
_root.driftCountScore++;
_root.myStar31 = true;
star31.gotoAndPlay(2);
trace("testStar31 :" + _root.driftCountScore);
}
}
if (!_root.myStar32) {
if (ball.hitTest(star32)) {
_root.driftCountScore++;
_root.myStar32 = true;
star32.gotoAndPlay(2);
trace("testStar32 :" + _root.driftCountScore);
}
}
if (!_root.myStar33) {
if (ball.hitTest(star33)) {
_root.driftCountScore++;
_root.myStar33 = true;
star33.gotoAndPlay(2);
trace("testStar33 :" + _root.driftCountScore);
}
}
if (!_root.myStar34) {
if (ball.hitTest(star34)) {
_root.driftCountScore++;
_root.myStar34 = true;
star34.gotoAndPlay(2);
trace("testStar34 :" + _root.driftCountScore);
}
}
if (!_root.myStar35) {
if (ball.hitTest(star35)) {
_root.driftCountScore++;
_root.myStar35 = true;
star35.gotoAndPlay(2);
trace("testStar35 :" + _root.driftCountScore);
}
}
}
function starConditions2() {
if (!_root.myStar36) {
if (ball.hitTest(star36)) {
_root.driftCountScore++;
_root.myStar36 = true;
star36.gotoAndPlay(2);
trace("testStar36 :" + _root.driftCountScore);
}
}
if (!_root.myStar37) {
if (ball.hitTest(star37)) {
_root.driftCountScore++;
_root.myStar37 = true;
star37.gotoAndPlay(2);
trace("testStar37 :" + _root.driftCountScore);
}
}
if (!_root.myStar38) {
if (ball.hitTest(star38)) {
_root.driftCountScore++;
_root.myStar38 = true;
star38.gotoAndPlay(2);
trace("testStar38 :" + _root.driftCountScore);
}
}
if (!_root.myStar39) {
if (ball.hitTest(star39)) {
_root.driftCountScore++;
_root.myStar39 = true;
star39.gotoAndPlay(2);
trace("testStar39 :" + _root.driftCountScore);
}
}
if (!_root.myStar40) {
if (ball.hitTest(star40)) {
_root.driftCountScore++;
_root.myStar40 = true;
star40.gotoAndPlay(2);
trace("testStar40 :" + _root.driftCountScore);
}
}
}
giveBall = function (who) {
if (who.owner.picture == undefined) {
ballCount++;
duplicateMovieClip ("ballKing", "ball" + ballCount, ballCount + 300);
var b = eval ("ball" + ballCount);
b._x = who._x;
b._y = who._y;
b._xscale = who._width;
b._yscale = who._height;
who.alpha = 0;
who.kid = b;
var r = random(3);
b.gotoAndStop(r + 1);
}
};
rotate = function (n) {
var _local2 = n.parent._x - n._x;
n._rotation = _local2 * 1.95;
};
distance = function (x1, y1, x2, y2) {
distx = x1 - x2;
disty = y1 - y2;
return(Math.sqrt((distx * distx) + (disty * disty)));
};
moveBall = function (who) {
who.speed.x = who.speed.x + (Math.cos(who._rotation / who.rad) * 0.6);
who.speed.y = who.speed.y + (Math.sin(who._rotation / who.rad) * 0.6);
var _local2 = distance(0, 0, who.speed.x, who.speed.y);
if (_local2 > (maxSpeed - 2)) {
var _local3 = (maxSpeed - 2) / _local2;
who.speed.x = who.speed.x * _local3;
who.speed.y = who.speed.y * _local3;
}
};
doKeys = function () {
if ((!gameOver) && (gameplay == true)) {
if (Key.isDown(38) && (!ball.dazed)) {
if (pp == true) {
pp = false;
_root.aclr.start(0, 999);
}
if (!pressed38) {
gfx.accel.start();
}
pressed38 = true;
ball.speed.x = ball.speed.x + (Math.cos(ball._rotation / ball.rad) * accel);
ball.speed.y = ball.speed.y + (Math.sin(ball._rotation / ball.rad) * accel);
var _local3 = distance(0, 0, ball.speed.x, ball.speed.y);
if (_root.hittst == false) {
if (_root.hud.needle._rotation >= 0) {
var1 = int(_root.hud.needle._rotation / 3);
_root.hud.needle._rotation = _root.hud.needle._rotation + 1;
} else if (_root.hud.needle._rotation < -10) {
var1 = int((_root.hud.needle._rotation + 360) / 3);
_root.hud.needle._rotation = _root.hud.needle._rotation + 1;
}
} else if (_root.hittst == true) {
if ((_root.hud.needle._rotation != 0) && (_root.hud.needle._rotation > 0)) {
var1 = int(_root.hud.needle._rotation / 3);
_root.hud.needle._rotation = _root.hud.needle._rotation - 5;
} else if ((_root.hud.needle._rotation != 0) && (_root.hud.needle._rotation < 0)) {
var1 = int((_root.hud.needle._rotation + 360) / 3);
_root.hud.needle._rotation = _root.hud.needle._rotation - 5;
}
}
if (((_parent.raceChoice == 0) || (_parent.raceChoice == 1)) || (_parent.raceChoice == 2)) {
if ((_root.ntimes == 0) && ((_parent.game.rank == 5) || (_parent.game.rank == 4))) {
ball.maxSpeed = 20;
} else {
ball.maxSpeed = 18.5;
}
}
if (((_parent.raceChoice == 3) || (_parent.raceChoice == 4)) || (_parent.raceChoice == 5)) {
if ((_root.ntimes == 0) && ((_parent.game.rank == 5) || (_parent.game.rank == 4))) {
ball.maxSpeed = 21;
} else {
ball.maxSpeed = 19.5;
}
}
if (((_parent.raceChoice == 6) || (_parent.raceChoice == 7)) || (_parent.raceChoice == 8)) {
handling = 5;
if ((_root.ntimes == 0) && ((_parent.game.rank == 5) || (_parent.game.rank == 4))) {
ball.maxSpeed = 17;
} else {
ball.maxSpeed = 17.5;
}
}
if (nitro == true) {
ball.maxSpeed = 25;
_root.nnn._xscale = _root.nnn._xscale - 1;
nn = true;
if (nn == true) {
_root.game.ball.nitromc._visible = true;
if (_root.game.ball.nitromc._visible == true) {
if (qq == true) {
qq = false;
_root.n2o.start();
}
}
} else {
_root.game.ball.nitromc._visible = false;
}
if (_root.nnn._xscale == 0) {
nclose = true;
ball.maxSpeed = 18;
_root.nnn._xscale = 100;
nitro = false;
qq = true;
_root.game.ball.nitromc._visible = false;
_root.nnn1._visible = false;
}
}
if (_local3 > ball.maxSpeed) {
var _local4 = ball.maxSpeed / _local3;
ball.speed.x = ball.speed.x * _local4;
ball.speed.y = ball.speed.y * _local4;
}
if (!gameStarted) {
clearInterval(thing1Interval);
clearInterval(thing2Interval);
hideWordBubble();
setSpans();
startTime = getTimer();
gfx.music.enter();
gameStarted = true;
}
}
if (!Key.isDown(38)) {
if (pp == false) {
pp = true;
ppp = true;
}
pressed38 = false;
nn = false;
_root.game.ball.nitromc._visible = false;
}
if (Key.isDown(78)) {
if (_root.ntimes > 0) {
if (nclose == true) {
_root.ntimes = _root.ntimes - 1;
_root.nnn1._visible = true;
nitro = true;
qq = true;
nclose = false;
}
}
}
if (Key.isDown(40)) {
_root.hittst = false;
if (_root.hud.needle._rotation > 10) {
var1 = int(_root.hud.needle._rotation / 3);
_root.hud.needle._rotation = _root.hud.needle._rotation - 5;
} else if (_root.hud.needle._rotation < 0) {
var1 = int((_root.hud.needle._rotation + 360) / 3);
_root.hud.needle._rotation = _root.hud.needle._rotation - 5;
}
ball.speed.x = 0;
ball.speed.y = 0;
}
if (Key.isDown(37)) {
if (turnFactor > 0) {
turnFactor = 0;
}
turnFactor = turnFactor - 3;
turnFactor = Math.min(handling, turnFactor);
ball._rotation = ball._rotation - handling;
if (((_parent.raceChoice == 6) || (_parent.raceChoice == 7)) || (_parent.raceChoice == 8)) {
if ((Math.abs(ball.speed.x) > 1) && (Math.abs(ball.speed.y) > 1)) {
_root.driftSound.start();
skidmark();
}
}
if ((((((_parent.raceChoice == 0) || (_parent.raceChoice == 1)) || (_parent.raceChoice == 2)) || (_parent.raceChoice == 3)) || (_parent.raceChoice == 4)) || (_parent.raceChoice == 5)) {
if ((Math.abs(ball.speed.x) > 1) && (Math.abs(ball.speed.y) > 1)) {
skidmark();
}
}
_root.hittst = false;
}
if (Key.isDown(39)) {
if (turnFactor < 0) {
turnFactor = 0;
}
turnFactor = turnFactor + 3;
turnFactor = Math.min(handling, turnFactor);
ball._rotation = ball._rotation + handling;
if (((_parent.raceChoice == 6) || (_parent.raceChoice == 7)) || (_parent.raceChoice == 8)) {
if ((Math.abs(ball.speed.x) > 1) && (Math.abs(ball.speed.y) > 1)) {
_root.driftSound.start();
skidmark();
}
}
if ((((((_parent.raceChoice == 0) || (_parent.raceChoice == 1)) || (_parent.raceChoice == 2)) || (_parent.raceChoice == 3)) || (_parent.raceChoice == 4)) || (_parent.raceChoice == 5)) {
if ((Math.abs(ball.speed.x) > 1) && (Math.abs(ball.speed.y) > 1)) {
skidmark();
}
}
_root.hittst = false;
}
if ((!Key.isDown(40)) && (!Key.isDown(38))) {
_root.hittst = false;
if ((_root.hud.needle._rotation != 0) && (_root.hud.needle._rotation > 0)) {
var1 = int(_root.hud.needle._rotation / 3);
_root.hud.needle._rotation = _root.hud.needle._rotation - 5;
if (_root.hud.needle._rotation <= 0) {
_root.hud.needle._rotation = 0;
}
} else if ((_root.hud.needle._rotation != 0) && (_root.hud.needle._rotation < 0)) {
var1 = int((_root.hud.needle._rotation + 360) / 3);
_root.hud.needle._rotation = _root.hud.needle._rotation - 5;
if (_root.hud.needle._rotation >= 0) {
_root.hud.needle._rotation = 0;
}
}
}
bbx = Math.round(ball._x);
bby = Math.round(ball._y);
if (_parent.raceChoice == 0) {
}
if (_parent.raceChoice == 1) {
}
if (_parent.raceChoice == 2) {
}
if (_parent.raceChoice == 3) {
}
if (_parent.raceChoice == 4) {
}
if (_parent.raceChoice == 5) {
}
if (_parent.raceChoice == 6) {
}
if (_parent.raceChoice == 7) {
}
if (_parent.raceChoice == 8) {
}
}
};
doTime = function () {
if ((!gameOver) && (gameplay == true)) {
var _local3 = getTimer() - startTime;
time = Math.round(_local3 * 0.01) * 0.1;
time = int(time * 10) * 0.1;
displayTime = time;
var _local1 = time % 60;
var _local2 = int(time / 60);
if (_local1 < 10) {
_local1 = "0" + _local1;
}
if (int(time) == time) {
_local1 = _local1 + ".0";
}
_local1 = _local1 + "";
_local1 = _local1.substr(0, 4);
displayTime = (_local2 + ":") + _local1;
}
};
moveCamera = function () {
var _local8 = ball._x - ballStartx;
var _local9 = ball._y - ballStarty;
var _local2 = startx - _local8;
var _local3 = starty - _local9;
var _local6 = Math.cos(ball._rotation / ball.rad) * 50;
var _local7 = Math.sin(ball._rotation / ball.rad) * 50;
_local2 = _local2 - (((((_local6 + oldSpeed.x) + reallyOldSpeed.x) + reallyOldSpeed1.x) + reallyOldSpeed2.x) + reallyOldSpeed3.x);
_local3 = _local3 - (((((_local7 + oldSpeed.y) + reallyOldSpeed.y) + reallyOldSpeed1.y) + reallyOldSpeed2.y) + reallyOldSpeed3.y);
reallyOldSpeed3 = reallyOldSpeed2;
reallyOldSpeed2 = reallyOldSpeed1;
reallyOldSpeed1 = reallyOldSpeed;
reallyOldSpeed = oldSpeed;
oldSpeed = ball.speed;
var _local4 = distance(this._x, this._y, _local2, _local3) / 4;
if (camSpeed < _local4) {
camSpeed = camSpeed + 4;
}
camSpeed = Math.min(camMax, camSpeed);
camSpeed = Math.min(camSpeed, _local4);
var _local5 = camSpeed / _local4;
this._x = this._x + int(((_local2 - this._x) / 4) * _local5);
this._y = this._y + int(((_local3 - this._y) / 4) * _local5);
this._y = Math.max(-2435, this._y);
};
jumpCamera = function () {
var _local2 = ball._x - ballStartx;
var _local3 = ball._y - ballStarty;
var _local4 = startx - _local2;
var _local5 = starty - _local3;
this._x = _local4;
this._y = _local5;
};
distance = function (x1, y1, x2, y2) {
distx = x1 - x2;
disty = y1 - y2;
return(Math.sqrt((distx * distx) + (disty * disty)));
};
doTime = function () {
if ((!gameOver) && (gameplay == true)) {
var _local3 = getTimer() - startTime;
time = Math.round(_local3 * 0.01) * 0.1;
time = int(time * 10) * 0.1;
displayTime = time;
var _local1 = time % 60;
var _local2 = int(time / 60);
if (_local1 < 10) {
_local1 = "0" + _local1;
}
if (int(time) == time) {
_local1 = _local1 + ".0";
}
_local1 = _local1 + "";
_local1 = _local1.substr(0, 4);
displayTime = (_local2 + ":") + _local1;
}
};
alignBalls = function () {
for (var _local1 in bumperList) {
bumperList[_local1].kid._x = bumperList[_local1]._x;
bumperList[_local1].kid._y = bumperList[_local1]._y;
bumperList[_local1].kid._rotation = bumperList[_local1]._rotation;
}
};
setSpans = function (who) {
ballSpan = who.hitter._width / 2;
for (var _local1 in bumperList) {
bumperList[_local1].ballSpan = (bumperList[_local1]._width / 2) + ballSpan;
}
for (var _local1 in ballList) {
ballList[_local1].ballSpan = (ballList[_local1]._width / 2) + ballSpan;
}
};
buildCurrentBumperList = function (who) {
setSpans(who);
who.currentBumperList = [];
for (var _local4 in bumperList) {
var _local2 = Math.abs(who._x - bumperList[_local4]._x);
if (_local2 < bumperList[_local4].ballSpan) {
var _local3 = Math.abs(who._y - bumperList[_local4]._y);
if (_local3 <= bumperList[_local4].ballSpan) {
who.currentBumperList.push(bumperList[_local4]);
}
}
}
who.disp = who.currentBumperList.length;
};
findClosestPath = function (who) {
closest = 10000;
for (var _local4 in pathList) {
var _local1 = distance(who._x, who._y, pathList[_local4]._x, pathList[_local4]._y);
if (_local1 < closest) {
var _local3 = pathList[_local4];
winnerNum = _local4;
closest = _local1;
}
}
return(winnerNum);
};
findSides = function (who) {
var _local12 = findClosestPath(who);
var _local9 = _local12.normal;
var _local8 = 4;
var _local5 = {x:0, y:0};
_local5.x = _local5.x + ((-_local9.y) * _local8);
_local5.y = _local5.y + (_local9.x * _local8);
var _local4 = {x:0, y:0};
_local4.x = _local4.x + (_local9.y * _local8);
_local4.y = _local4.y + ((-_local9.x) * _local8);
var _local6 = false;
attempts = 0;
while ((!_local6) && (attempts < 200)) {
attempts++;
var _local2 = {x:who._x + (_local5.x * attempts), y:who._y + (_local5.y * attempts)};
this.localToGlobal(_local2);
if (hitter.hitTest(_local2.x, _local2.y, true)) {
_local6 = true;
}
}
var _local2 = {x:who._x + (_local5.x * attempts), y:who._y + (_local5.y * attempts)};
rider0._x = _local2.x;
rider0._y = _local2.y;
var _local7 = false;
leftDist = attempts;
attempts = 0;
while ((!_local7) && (attempts < 200)) {
attempts++;
_local2 = {x:who._x + (_local4.x * attempts), y:who._y + (_local4.y * attempts)};
this.localToGlobal(_local2);
if (hitter.hitTest(_local2.x, _local2.y, true)) {
_local7 = true;
}
}
_local2 = {x:who._x + (_local4.x * attempts), y:who._y + (_local4.y * attempts)};
rider1._x = _local2.x;
rider1._y = _local2.y;
rightDist = attempts;
var _local11 = rightDist + leftDist;
var _local10 = (leftDist / _local11) - 0.5;
who._rotation = who._rotation + (_local10 * who.magnitude(who.speed));
};
findDirection = function (a1, a2) {
a1 = a1 + 1000;
a2 = a2 + 1000;
if (a1 < 0) {
a1 = a1 + 360;
}
if ((a1 - a2) > 180) {
a2 = a2 + 360;
}
if ((a2 - a1) > 180) {
a1 = a1 + 360;
}
if (Math.abs(a1 - a2) < 4) {
return(0);
}
if (a1 < a2) {
return(1);
}
return(-1);
};
buildCurrentBallList = function (who) {
who.currentBallList = [];
for (var _local4 in ballList) {
if (ballList[_local4] != who) {
var _local2 = Math.abs(who._x - ballList[_local4]._x);
if (_local2 < ballList[_local4].ballSpan) {
var _local3 = Math.abs(who._y - ballList[_local4]._y);
if (_local3 <= ballList[_local4].ballSpan) {
who.currentBallList.push(ballList[_local4]);
}
}
}
}
};
findAngle = function (dx, dy) {
var _local1 = (Math.atan2(dy, dx) * 180) / 3.141593;
return(_local1);
};
magnitude = function (v1) {
return(distance(0, 0, v1.x, v1.y));
};
normalize = function (v1) {
var _local1 = 1 / magnitude(v1);
var _local2 = v1.x * _local1;
var _local3 = v1.y * _local1;
var _local4 = {x:_local2, y:_local3};
return(_local4);
};
newBall = function (who, mass, heft) {
who.rad = 57.29578;
who.span = who.hitter._width / 2;
who.active = false;
who.rot = 0;
who.preVelocity = 0;
who.maxVelocity = 200;
who.elastic = 0.7;
who.bumpness = 0.3;
who.heft = heft;
who.speed = new Object();
who.speed.y = 0;
who.speed.x = 0;
who.mass = mass;
who.id = ballList.length;
who.growthRate = 1.1;
if (_parent.raceChoice == 0) {
who.friction = 0.5;
} else {
who.friction = 0.3;
}
if (_parent.choice == 4) {
who.friction = 0.3;
}
if (_parent.choice == 5) {
who.friction = 0.3;
}
who.reaction = 180;
who.nextPath = findClosestPath(who);
who.path = pathList[who.nextPath];
who.hitDistance = new Array();
who.wallDistance = new Array();
who.bumperDistance = new Array();
who.cornerDistance = new Array();
who.perpVector = new Object();
who.hitter._alpha = (showObjects ? 100 : 100);
who.spin = 0;
who.dazed = false;
who.type = "ball";
if (who._name != "ball") {
who.maxSpeed = 17 + (0.4 * ballList.length);
who.accel = 4.7 + (random(50) * 0.01);
who.wildness = random(100) + 50;
who.xOff = random(who.wildness * 2) - who.wildness;
who.yOff = random(who.wildness * 2) - who.wildness;
} else {
if (_parent.choice == 0) {
who.maxSpeed = 19 + _parent.boost;
} else {
who.maxSpeed = 19;
}
if (_parent.choice > 0) {
accel = 7.3 + _parent.boost;
} else {
accel = 7;
}
if (_parent.choice == 5) {
accel = 8.3 + _parent.boost;
}
handling = 8;
if (_parent.choice == 4) {
handling = 9;
who.friction = 0.3;
}
if (_parent.choice == 3) {
accel = 7.6 + _parent.boost;
handling = 8;
who.friction = 0.3;
}
if (_parent.choice == 2) {
accel = 7.6 + _parent.boost;
handling = 8;
who.friction = 0.3;
}
if (_parent.raceChoice == 0) {
if (_parent.choice >= 2) {
who.maxSpeed = who.maxSpeed + 1.5;
}
who.friction = 0.3;
}
if (_parent.raceChoice == 1) {
if (_parent.choice >= 1) {
who.maxSpeed = who.maxSpeed + 1.7;
}
}
if (_parent.raceChoice == 2) {
if (_parent.choice >= 2) {
who.maxSpeed = who.maxSpeed + 1.8;
}
}
if (_parent.raceChoice == 3) {
if (_parent.choice >= 3) {
who.maxSpeed = who.maxSpeed + 1.9;
}
}
if (_parent.raceChoice == 4) {
if (_parent.choice >= 4) {
who.maxSpeed = who.maxSpeed + 2;
}
}
if (_parent.raceChoice == 5) {
if (_parent.choice >= 4) {
who.maxSpeed = who.maxSpeed + 2.5;
}
}
}
ballList.push(who);
who.gotoAndStop(ballList.length);
};
leaveRace = function () {
clearInterval(leaveInterval);
_parent.time = time;
trace("time :" + time);
trace("sss :" + seconds);
_global.totalScore = time;
_parent.displayTime = displayTime;
if (((((_parent.raceChoice == 0) || (_parent.raceChoice == 1)) || (_parent.raceChoice == 2)) || (_parent.raceChoice == 3)) || (_parent.raceChoice == 4)) {
if (_parent.displayPlace == "1st") {
_root.gotoAndStop("results");
}
if (_parent.displayPlace != "1st") {
_root.gotoAndStop("gover");
}
}
if (_parent.raceChoice == 5) {
if (_parent.displayPlace == "1st") {
_root.gotoAndStop("gwin");
}
if (_parent.displayPlace != "1st") {
_root.gotoAndStop("gover");
}
}
if (((_parent.raceChoice == 6) || (_parent.raceChoice == 7)) || (_parent.raceChoice == 8)) {
if (((_parent.displayPlace == "1st") && (_root.hud.mc_stopwatch.driftTimes >= 1)) && (_root.dgw == false)) {
_root.dgw = true;
_root.driftGameOver();
}
}
};
makeSpark = function (where, dir) {
sparkCount++;
if ((((_parent.choice == 2) || (_parent.choice == 5)) || (_parent.choice == 7)) || (_parent.choice == 10)) {
this.globalToLocal(where);
_loc6._x = where.x;
_loc6._y = where.y;
var _local3 = ball.findAngle(dir.x, dir.y);
_local3 = _local3 + (random(40) + 20);
var _local5 = new Object();
_local5.x = Math.cos(_local3 / ball.rad) * 16;
_local5.y = Math.sin(_local3 / ball.rad) * 16;
_loc6.speed = {x:_local5.x, y:_local5.y};
}
if (((((_parent.choice == 0) || (_parent.choice == 3)) || (_parent.choice == 6)) || (_parent.choice == 8)) || (_parent.choice == 11)) {
this.globalToLocal(where);
_loc6._x = where.x;
_loc6._y = where.y;
_loc6._rotation = random(360);
_loc6._xscale = random(100) + 50;
_loc6._yscale = _loc6._xscale;
}
if ((((_parent.choice == 1) || (_parent.choice == 4)) || (_parent.choice == 9)) || (_parent.choice == 12)) {
this.globalToLocal(where);
_loc6._x = where.x;
_loc6._y = where.y;
var _local3 = ball.findAngle(dir.x, dir.y);
_local3 = _local3 + (random(40) + 20);
_loc6._rotation = _local3;
var _local7 = random(4);
if (_local7 == 0) {
sparkCount++;
_loc6._x = where.x;
_loc6._y = where.y;
_local3 = ball.findAngle(dir.x, dir.y);
_local3 = _local3 + (random(40) + 20);
_loc6._rotation = _local3;
}
}
};
doLaps = function (who) {
var _local5 = currentCheckPoint[who.id];
var _local4 = checkPoint[_local5];
if (_local4.hitTest(who)) {
currentCheckPoint[who.id]++;
if (_parent.raceChoice == 7) {
if (currentLap == 1) {
if (currentCheckPoint[0] == 21) {
}
}
if (currentLap == 2) {
if (currentCheckPoint[0] == 1) {
starVariabels();
}
if (currentCheckPoint[0] == 21) {
}
}
if (currentLap == 3) {
if (currentCheckPoint[0] == 1) {
starVariabels();
}
if (currentCheckPoint[0] == 21) {
}
}
}
if (_parent.raceChoice == 8) {
if (currentLap == 1) {
if (currentCheckPoint[0] == 1) {
starVariabels();
}
if (currentCheckPoint[0] == 21) {
}
}
if (currentLap == 2) {
if (currentCheckPoint[0] == 1) {
starVariabels();
starVariabels1();
}
if (currentCheckPoint[0] == 21) {
}
}
if (currentLap == 3) {
if (currentCheckPoint[0] == 1) {
starVariabels();
starVariabels1();
}
if (currentCheckPoint[0] == 21) {
}
}
}
if (_parent.raceChoice == 6) {
if (currentLap == 1) {
if (currentCheckPoint[0] == 1) {
starVariabels();
}
if (currentCheckPoint[0] == 21) {
}
}
if (currentLap == 2) {
if (currentCheckPoint[0] == 1) {
starVariabels();
starVariabels1();
starVariabels2();
}
if (currentCheckPoint[0] == 21) {
}
}
if (currentLap == 3) {
if (currentCheckPoint[0] == 1) {
starVariabels();
starVariabels1();
starVariabels2();
}
if (currentCheckPoint[0] == 21) {
}
}
}
if (currentLap1 == 1) {
if (currentCheckPoint[who.id] == 0) {
f1++;
if (((who.id == 0) && (currentLap == 1)) && (finalround1 == true)) {
_parent.game.rank = f1;
}
if (who.id == 1) {
_parent.game.rank1 = f1;
}
if (who.id == 2) {
_parent.game.rank2 = f1;
}
if (who.id == 3) {
_parent.game.rank3 = f1;
}
if (who.id == 4) {
_parent.game.rank4 = f1;
}
if (who.id == 5) {
_parent.game.rank5 = f1;
}
}
if (currentCheckPoint[who.id] == 1) {
f2++;
if (((who.id == 0) && (currentLap == 1)) && (finalround1 == true)) {
_parent.game.rank = f2;
}
if (who.id == 1) {
_parent.game.rank1 = f2;
}
if (who.id == 2) {
_parent.game.rank2 = f2;
}
if (who.id == 3) {
_parent.game.rank3 = f2;
}
if (who.id == 4) {
_parent.game.rank4 = f2;
}
if (who.id == 5) {
_parent.game.rank5 = f2;
}
}
if (currentCheckPoint[who.id] == 2) {
f3++;
if (((who.id == 0) && (currentLap == 1)) && (finalround1 == true)) {
_parent.game.rank = f3;
}
if (who.id == 1) {
_parent.game.rank1 = f3;
}
if (who.id == 2) {
_parent.game.rank2 = f3;
}
if (who.id == 3) {
_parent.game.rank3 = f3;
}
if (who.id == 4) {
_parent.game.rank4 = f3;
}
if (who.id == 5) {
_parent.game.rank5 = f3;
}
}
if (currentCheckPoint[who.id] == 3) {
f4++;
if (((who.id == 0) && (currentLap == 1)) && (finalround1 == true)) {
_parent.game.rank = f4;
}
if (who.id == 1) {
_parent.game.rank1 = f4;
}
if (who.id == 2) {
_parent.game.rank2 = f4;
}
if (who.id == 3) {
_parent.game.rank3 = f4;
}
if (who.id == 4) {
_parent.game.rank4 = f4;
}
if (who.id == 5) {
_parent.game.rank5 = f4;
}
}
if (currentCheckPoint[who.id] == 4) {
f5++;
if (((who.id == 0) && (currentLap == 1)) && (finalround1 == true)) {
_parent.game.rank = f5;
}
if (who.id == 1) {
_parent.game.rank1 = f5;
}
if (who.id == 2) {
_parent.game.rank2 = f5;
}
if (who.id == 3) {
_parent.game.rank3 = f5;
}
if (who.id == 4) {
_parent.game.rank4 = f5;
}
if (who.id == 5) {
_parent.game.rank5 = f5;
}
}
if (currentCheckPoint[who.id] == 5) {
f6++;
if (((who.id == 0) && (currentLap == 1)) && (finalround1 == true)) {
_parent.game.rank = f6;
}
if (who.id == 1) {
_parent.game.rank1 = f6;
}
if (who.id == 2) {
_parent.game.rank2 = f6;
}
if (who.id == 3) {
_parent.game.rank3 = f6;
}
if (who.id == 4) {
_parent.game.rank4 = f6;
}
if (who.id == 5) {
_parent.game.rank5 = f6;
}
}
if (currentCheckPoint[who.id] == 6) {
f7++;
if (((who.id == 0) && (currentLap == 1)) && (finalround1 == true)) {
_parent.game.rank = f7;
}
if (who.id == 1) {
_parent.game.rank1 = f7;
}
if (who.id == 2) {
_parent.game.rank2 = f7;
}
if (who.id == 3) {
_parent.game.rank3 = f7;
}
if (who.id == 4) {
_parent.game.rank4 = f7;
}
if (who.id == 5) {
_parent.game.rank5 = f7;
}
}
if (currentCheckPoint[who.id] == 7) {
f8++;
if (((who.id == 0) && (currentLap == 1)) && (finalround1 == true)) {
_parent.game.rank = f8;
}
if (who.id == 1) {
_parent.game.rank1 = f8;
}
if (who.id == 2) {
_parent.game.rank2 = f8;
}
if (who.id == 3) {
_parent.game.rank3 = f8;
}
if (who.id == 4) {
_parent.game.rank4 = f8;
}
if (who.id == 5) {
_parent.game.rank5 = f8;
}
}
if (currentCheckPoint[who.id] == 8) {
f9++;
if (((who.id == 0) && (currentLap == 1)) && (finalround1 == true)) {
_parent.game.rank = f9;
}
if (who.id == 1) {
_parent.game.rank1 = f9;
}
if (who.id == 2) {
_parent.game.rank2 = f9;
}
if (who.id == 3) {
_parent.game.rank3 = f9;
}
if (who.id == 4) {
_parent.game.rank4 = f9;
}
if (who.id == 5) {
_parent.game.rank5 = f9;
}
}
if (currentCheckPoint[who.id] == 9) {
f10++;
if (((who.id == 0) && (currentLap == 1)) && (finalround1 == true)) {
_parent.game.rank = f10;
}
if (who.id == 1) {
_parent.game.rank1 = f10;
}
if (who.id == 2) {
_parent.game.rank2 = f10;
}
if (who.id == 3) {
_parent.game.rank3 = f10;
}
if (who.id == 4) {
_parent.game.rank4 = f10;
}
if (who.id == 5) {
_parent.game.rank5 = f10;
}
}
if (currentCheckPoint[who.id] == 10) {
f11++;
if (((who.id == 0) && (currentLap == 1)) && (finalround1 == true)) {
_parent.game.rank = f11;
}
if (who.id == 1) {
_parent.game.rank1 = f11;
}
if (who.id == 2) {
_parent.game.rank2 = f11;
}
if (who.id == 3) {
_parent.game.rank3 = f11;
}
if (who.id == 4) {
_parent.game.rank4 = f11;
}
if (who.id == 5) {
_parent.game.rank5 = f11;
}
}
if (currentCheckPoint[who.id] == 11) {
f13++;
if (((who.id == 0) && (currentLap == 1)) && (finalround1 == true)) {
_parent.game.rank = f13;
}
if (who.id == 1) {
_parent.game.rank1 = f13;
}
if (who.id == 2) {
_parent.game.rank2 = f13;
}
if (who.id == 3) {
_parent.game.rank3 = f13;
}
if (who.id == 4) {
_parent.game.rank4 = f13;
}
if (who.id == 5) {
_parent.game.rank5 = f13;
}
}
if (currentCheckPoint[who.id] == 12) {
f14++;
if (((who.id == 0) && (currentLap == 1)) && (finalround1 == true)) {
_parent.game.rank = f14;
}
if (who.id == 1) {
_parent.game.rank1 = f14;
}
if (who.id == 2) {
_parent.game.rank2 = f14;
}
if (who.id == 3) {
_parent.game.rank3 = f14;
}
if (who.id == 4) {
_parent.game.rank4 = f14;
}
if (who.id == 5) {
_parent.game.rank5 = f14;
}
}
if (currentCheckPoint[who.id] == 13) {
f15++;
if (((who.id == 0) && (currentLap == 1)) && (finalround1 == true)) {
_parent.game.rank = f15;
}
if (who.id == 1) {
_parent.game.rank1 = f15;
}
if (who.id == 2) {
_parent.game.rank2 = f15;
}
if (who.id == 3) {
_parent.game.rank3 = f15;
}
if (who.id == 4) {
_parent.game.rank4 = f15;
}
if (who.id == 5) {
_parent.game.rank5 = f15;
}
}
if (currentCheckPoint[who.id] == 14) {
f16++;
if (((who.id == 0) && (currentLap == 1)) && (finalround1 == true)) {
_parent.game.rank = f16;
}
if (who.id == 1) {
_parent.game.rank1 = f16;
}
if (who.id == 2) {
_parent.game.rank2 = f16;
}
if (who.id == 3) {
_parent.game.rank3 = f16;
}
if (who.id == 4) {
_parent.game.rank4 = f16;
}
if (who.id == 5) {
_parent.game.rank5 = f16;
}
}
if (currentCheckPoint[who.id] == 15) {
f17++;
if (((who.id == 0) && (currentLap == 1)) && (finalround1 == true)) {
_parent.game.rank = f17;
}
if (who.id == 1) {
_parent.game.rank1 = f17;
}
if (who.id == 2) {
_parent.game.rank2 = f17;
}
if (who.id == 3) {
_parent.game.rank3 = f17;
}
if (who.id == 4) {
_parent.game.rank4 = f17;
}
if (who.id == 5) {
_parent.game.rank5 = f17;
}
}
if (currentCheckPoint[who.id] == 16) {
f18++;
if (((who.id == 0) && (currentLap == 1)) && (finalround1 == true)) {
_parent.game.rank = f18;
}
if (who.id == 1) {
_parent.game.rank1 = f18;
}
if (who.id == 2) {
_parent.game.rank2 = f18;
}
if (who.id == 3) {
_parent.game.rank3 = f18;
}
if (who.id == 4) {
_parent.game.rank4 = f18;
}
if (who.id == 5) {
_parent.game.rank5 = f18;
}
}
if (currentCheckPoint[who.id] == 17) {
f19++;
if (((who.id == 0) && (currentLap == 1)) && (finalround1 == true)) {
_parent.game.rank = f19;
}
if (who.id == 1) {
_parent.game.rank1 = f19;
}
if (who.id == 2) {
_parent.game.rank2 = f19;
}
if (who.id == 3) {
_parent.game.rank3 = f19;
}
if (who.id == 4) {
_parent.game.rank4 = f19;
}
if (who.id == 5) {
_parent.game.rank5 = f19;
}
}
if (currentCheckPoint[who.id] == 18) {
f20++;
if (((who.id == 0) && (currentLap == 1)) && (finalround1 == true)) {
_parent.game.rank = f20;
}
if (who.id == 1) {
_parent.game.rank1 = f20;
}
if (who.id == 2) {
_parent.game.rank2 = f20;
}
if (who.id == 3) {
_parent.game.rank3 = f20;
}
if (who.id == 4) {
_parent.game.rank4 = f20;
}
if (who.id == 5) {
_parent.game.rank5 = f20;
}
}
if (currentCheckPoint[who.id] == 19) {
f21++;
if (((who.id == 0) && (currentLap == 1)) && (finalround1 == true)) {
_parent.game.rank = f21;
}
if (who.id == 1) {
_parent.game.rank1 = f21;
}
if (who.id == 2) {
_parent.game.rank2 = f21;
}
if (who.id == 3) {
_parent.game.rank3 = f21;
}
if (who.id == 4) {
_parent.game.rank4 = f21;
}
if (who.id == 5) {
_parent.game.rank5 = f21;
}
}
if (currentCheckPoint[who.id] == 20) {
f22++;
if (((who.id == 0) && (currentLap == 1)) && (finalround1 == true)) {
_parent.game.rank = f22;
}
if (who.id == 1) {
_parent.game.rank1 = f22;
}
if (who.id == 2) {
_parent.game.rank2 = f22;
}
if (who.id == 3) {
_parent.game.rank3 = f22;
}
if (who.id == 4) {
_parent.game.rank4 = f22;
}
if (who.id == 5) {
_parent.game.rank5 = f22;
}
}
if ((who._name != "ball") && (_parent.game.rank == 1)) {
who.maxSpeed = 18 + (0.4 * ballList.length);
who.accel = 5.7 + (random(50) * 0.01);
}
if ((who._name != "ball") && (_parent.game.rank != 1)) {
who.maxSpeed = 17 + (0.4 * ballList.length);
who.accel = 4.7 + (random(50) * 0.01);
}
}
if (currentLap1 == 2) {
if (currentCheckPoint[who.id] == 0) {
g1++;
if (((who.id == 0) && (currentLap == 2)) && (finalround2 == true)) {
_parent.game.rank = g1;
}
if (who.id == 1) {
_parent.game.rank1 = g1;
}
if (who.id == 2) {
_parent.game.rank2 = g1;
}
if (who.id == 3) {
_parent.game.rank3 = g1;
}
if (who.id == 4) {
_parent.game.rank4 = g1;
}
if (who.id == 5) {
_parent.game.rank5 = g1;
}
}
if (currentCheckPoint[who.id] == 1) {
g2++;
if (((who.id == 0) && (currentLap == 2)) && (finalround2 == true)) {
_parent.game.rank = g2;
}
if (who.id == 1) {
_parent.game.rank1 = g2;
}
if (who.id == 2) {
_parent.game.rank2 = g2;
}
if (who.id == 3) {
_parent.game.rank3 = g2;
}
if (who.id == 4) {
_parent.game.rank4 = g2;
}
if (who.id == 5) {
_parent.game.rank5 = g2;
}
}
if (currentCheckPoint[who.id] == 2) {
g3++;
if (((who.id == 0) && (currentLap == 2)) && (finalround2 == true)) {
_parent.game.rank = g3;
}
if (who.id == 1) {
_parent.game.rank1 = g3;
}
if (who.id == 2) {
_parent.game.rank2 = g3;
}
if (who.id == 3) {
_parent.game.rank3 = g3;
}
if (who.id == 4) {
_parent.game.rank4 = g3;
}
if (who.id == 5) {
_parent.game.rank5 = g3;
}
}
if (currentCheckPoint[who.id] == 3) {
g4++;
if (((who.id == 0) && (currentLap == 2)) && (finalround2 == true)) {
_parent.game.rank = g4;
}
if (who.id == 1) {
_parent.game.rank1 = g4;
}
if (who.id == 2) {
_parent.game.rank2 = g4;
}
if (who.id == 3) {
_parent.game.rank3 = g4;
}
if (who.id == 4) {
_parent.game.rank4 = g4;
}
if (who.id == 5) {
_parent.game.rank5 = g4;
}
}
if (currentCheckPoint[who.id] == 4) {
g5++;
if (((who.id == 0) && (currentLap == 2)) && (finalround2 == true)) {
_parent.game.rank = g5;
}
if (who.id == 1) {
_parent.game.rank1 = g5;
}
if (who.id == 2) {
_parent.game.rank2 = g5;
}
if (who.id == 3) {
_parent.game.rank3 = g5;
}
if (who.id == 4) {
_parent.game.rank4 = g5;
}
if (who.id == 5) {
_parent.game.rank5 = g5;
}
}
if (currentCheckPoint[who.id] == 5) {
g6++;
if (((who.id == 0) && (currentLap == 2)) && (finalround2 == true)) {
_parent.game.rank = g6;
}
if (who.id == 1) {
_parent.game.rank1 = g6;
}
if (who.id == 2) {
_parent.game.rank2 = g6;
}
if (who.id == 3) {
_parent.game.rank3 = g6;
}
if (who.id == 4) {
_parent.game.rank4 = g6;
}
if (who.id == 5) {
_parent.game.rank5 = g6;
}
}
if (currentCheckPoint[who.id] == 6) {
g7++;
if (((who.id == 0) && (currentLap == 2)) && (finalround2 == true)) {
_parent.game.rank = g7;
}
if (who.id == 1) {
_parent.game.rank1 = g7;
}
if (who.id == 2) {
_parent.game.rank2 = g7;
}
if (who.id == 3) {
_parent.game.rank3 = g7;
}
if (who.id == 4) {
_parent.game.rank4 = g7;
}
if (who.id == 5) {
_parent.game.rank5 = g7;
}
}
if (currentCheckPoint[who.id] == 7) {
g8++;
if (((who.id == 0) && (currentLap == 2)) && (finalround2 == true)) {
_parent.game.rank = g8;
}
if (who.id == 1) {
_parent.game.rank1 = g8;
}
if (who.id == 2) {
_parent.game.rank2 = g8;
}
if (who.id == 3) {
_parent.game.rank3 = g8;
}
if (who.id == 4) {
_parent.game.rank4 = g8;
}
if (who.id == 5) {
_parent.game.rank5 = g8;
}
}
if (currentCheckPoint[who.id] == 8) {
g9++;
if (((who.id == 0) && (currentLap == 2)) && (finalround2 == true)) {
_parent.game.rank = g9;
}
if (who.id == 1) {
_parent.game.rank1 = g9;
}
if (who.id == 2) {
_parent.game.rank2 = g9;
}
if (who.id == 3) {
_parent.game.rank3 = g9;
}
if (who.id == 4) {
_parent.game.rank4 = g9;
}
if (who.id == 5) {
_parent.game.rank5 = g9;
}
}
if (currentCheckPoint[who.id] == 9) {
g10++;
if (((who.id == 0) && (currentLap == 2)) && (finalround2 == true)) {
_parent.game.rank = g10;
}
if (who.id == 1) {
_parent.game.rank1 = g10;
}
if (who.id == 2) {
_parent.game.rank2 = g10;
}
if (who.id == 3) {
_parent.game.rank3 = g10;
}
if (who.id == 4) {
_parent.game.rank4 = g10;
}
if (who.id == 5) {
_parent.game.rank5 = g10;
}
}
if (currentCheckPoint[who.id] == 10) {
g11++;
if (((who.id == 0) && (currentLap == 2)) && (finalround2 == true)) {
_parent.game.rank = g11;
}
if (who.id == 1) {
_parent.game.rank1 = g11;
}
if (who.id == 2) {
_parent.game.rank2 = g11;
}
if (who.id == 3) {
_parent.game.rank3 = g11;
}
if (who.id == 4) {
_parent.game.rank4 = g11;
}
if (who.id == 5) {
_parent.game.rank5 = g11;
}
}
if (currentCheckPoint[who.id] == 11) {
g13++;
if (((who.id == 0) && (currentLap == 2)) && (finalround2 == true)) {
_parent.game.rank = g13;
}
if (who.id == 1) {
_parent.game.rank1 = g13;
}
if (who.id == 2) {
_parent.game.rank2 = g13;
}
if (who.id == 3) {
_parent.game.rank3 = g13;
}
if (who.id == 4) {
_parent.game.rank4 = g13;
}
if (who.id == 5) {
_parent.game.rank5 = g13;
}
}
if (currentCheckPoint[who.id] == 12) {
g14++;
if (((who.id == 0) && (currentLap == 2)) && (finalround2 == true)) {
_parent.game.rank = g14;
}
if (who.id == 1) {
_parent.game.rank1 = g14;
}
if (who.id == 2) {
_parent.game.rank2 = g14;
}
if (who.id == 3) {
_parent.game.rank3 = g14;
}
if (who.id == 4) {
_parent.game.rank4 = g14;
}
if (who.id == 5) {
_parent.game.rank5 = g14;
}
}
if (currentCheckPoint[who.id] == 13) {
g15++;
if (((who.id == 0) && (currentLap == 2)) && (finalround2 == true)) {
_parent.game.rank = g15;
}
if (who.id == 1) {
_parent.game.rank1 = g15;
}
if (who.id == 2) {
_parent.game.rank2 = g15;
}
if (who.id == 3) {
_parent.game.rank3 = g15;
}
if (who.id == 4) {
_parent.game.rank4 = g15;
}
if (who.id == 5) {
_parent.game.rank5 = g15;
}
}
if (currentCheckPoint[who.id] == 14) {
g16++;
if (((who.id == 0) && (currentLap == 2)) && (finalround2 == true)) {
_parent.game.rank = g16;
}
if (who.id == 1) {
_parent.game.rank1 = g16;
}
if (who.id == 2) {
_parent.game.rank2 = g16;
}
if (who.id == 3) {
_parent.game.rank3 = g16;
}
if (who.id == 4) {
_parent.game.rank4 = g16;
}
if (who.id == 5) {
_parent.game.rank5 = g16;
}
}
if (currentCheckPoint[who.id] == 15) {
g17++;
if (((who.id == 0) && (currentLap == 2)) && (finalround2 == true)) {
_parent.game.rank = g17;
}
if (who.id == 1) {
_parent.game.rank1 = g17;
}
if (who.id == 2) {
_parent.game.rank2 = g17;
}
if (who.id == 3) {
_parent.game.rank3 = g17;
}
if (who.id == 4) {
_parent.game.rank4 = g17;
}
if (who.id == 5) {
_parent.game.rank5 = g17;
}
}
if (currentCheckPoint[who.id] == 16) {
g18++;
if (((who.id == 0) && (currentLap == 2)) && (finalround2 == true)) {
_parent.game.rank = g18;
}
if (who.id == 1) {
_parent.game.rank1 = g18;
}
if (who.id == 2) {
_parent.game.rank2 = g18;
}
if (who.id == 3) {
_parent.game.rank3 = g18;
}
if (who.id == 4) {
_parent.game.rank4 = g18;
}
if (who.id == 5) {
_parent.game.rank5 = g18;
}
}
if (currentCheckPoint[who.id] == 17) {
g19++;
if (((who.id == 0) && (currentLap == 2)) && (finalround2 == true)) {
_parent.game.rank = g19;
}
if (who.id == 1) {
_parent.game.rank1 = g19;
}
if (who.id == 2) {
_parent.game.rank2 = g19;
}
if (who.id == 3) {
_parent.game.rank3 = g19;
}
if (who.id == 4) {
_parent.game.rank4 = g19;
}
if (who.id == 5) {
_parent.game.rank5 = g19;
}
}
if (currentCheckPoint[who.id] == 18) {
g20++;
if (((who.id == 0) && (currentLap == 2)) && (finalround2 == true)) {
_parent.game.rank = g20;
}
if (who.id == 1) {
_parent.game.rank1 = g20;
}
if (who.id == 2) {
_parent.game.rank2 = g20;
}
if (who.id == 3) {
_parent.game.rank3 = g20;
}
if (who.id == 4) {
_parent.game.rank4 = g20;
}
if (who.id == 5) {
_parent.game.rank5 = g20;
}
}
if (currentCheckPoint[who.id] == 19) {
g21++;
if (((who.id == 0) && (currentLap == 2)) && (finalround2 == true)) {
_parent.game.rank = g21;
}
if (who.id == 1) {
_parent.game.rank1 = g21;
}
if (who.id == 2) {
_parent.game.rank2 = g21;
}
if (who.id == 3) {
_parent.game.rank3 = g21;
}
if (who.id == 4) {
_parent.game.rank4 = g21;
}
if (who.id == 5) {
_parent.game.rank5 = g21;
}
}
if (currentCheckPoint[who.id] == 20) {
g22++;
if (((who.id == 0) && (currentLap == 2)) && (finalround2 == true)) {
_parent.game.rank = g22;
}
if (who.id == 1) {
_parent.game.rank1 = g22;
}
if (who.id == 2) {
_parent.game.rank2 = g22;
}
if (who.id == 3) {
_parent.game.rank3 = g22;
}
if (who.id == 4) {
_parent.game.rank4 = g22;
}
if (who.id == 5) {
_parent.game.rank5 = g22;
}
}
if ((who._name != "ball") && (_parent.game.rank == 1)) {
who.maxSpeed = 18 + (0.4 * ballList.length);
who.accel = 5.7 + (random(50) * 0.01);
}
if ((who._name != "ball") && (_parent.game.rank != 1)) {
who.maxSpeed = 17 + (0.4 * ballList.length);
who.accel = 4.7 + (random(50) * 0.01);
}
}
if (currentLap1 == 3) {
if (currentCheckPoint[who.id] == 0) {
h1++;
if (((who.id == 0) && (currentLap == 3)) && (finalround3 == true)) {
_parent.game.rank = h1;
}
if (who.id == 1) {
_parent.game.rank1 = h1;
}
if (who.id == 2) {
_parent.game.rank2 = h1;
}
if (who.id == 3) {
_parent.game.rank3 = h1;
}
if (who.id == 4) {
_parent.game.rank4 = h1;
}
if (who.id == 5) {
_parent.game.rank5 = h1;
}
}
if (currentCheckPoint[who.id] == 1) {
h2++;
if (((who.id == 0) && (currentLap == 3)) && (finalround3 == true)) {
_parent.game.rank = h2;
}
if (who.id == 1) {
_parent.game.rank1 = h2;
}
if (who.id == 2) {
_parent.game.rank2 = h2;
}
if (who.id == 3) {
_parent.game.rank3 = h2;
}
if (who.id == 4) {
_parent.game.rank4 = h2;
}
if (who.id == 5) {
_parent.game.rank5 = h2;
}
}
if (currentCheckPoint[who.id] == 2) {
h3++;
if (((who.id == 0) && (currentLap == 3)) && (finalround3 == true)) {
_parent.game.rank = h3;
}
if (who.id == 1) {
_parent.game.rank1 = h3;
}
if (who.id == 2) {
_parent.game.rank2 = h3;
}
if (who.id == 3) {
_parent.game.rank3 = h3;
}
if (who.id == 4) {
_parent.game.rank4 = h3;
}
if (who.id == 5) {
_parent.game.rank5 = h3;
}
}
if (currentCheckPoint[who.id] == 3) {
h4++;
if (((who.id == 0) && (currentLap == 3)) && (finalround3 == true)) {
_parent.game.rank = h4;
}
if (who.id == 1) {
_parent.game.rank1 = h4;
}
if (who.id == 2) {
_parent.game.rank2 = h4;
}
if (who.id == 3) {
_parent.game.rank3 = h4;
}
if (who.id == 4) {
_parent.game.rank4 = h4;
}
if (who.id == 5) {
_parent.game.rank5 = h4;
}
}
if (currentCheckPoint[who.id] == 4) {
h5++;
if (((who.id == 0) && (currentLap == 3)) && (finalround3 == true)) {
_parent.game.rank = h5;
}
if (who.id == 1) {
_parent.game.rank1 = h5;
}
if (who.id == 2) {
_parent.game.rank2 = h5;
}
if (who.id == 3) {
_parent.game.rank3 = h5;
}
if (who.id == 4) {
_parent.game.rank4 = h5;
}
if (who.id == 5) {
_parent.game.rank5 = h5;
}
}
if (currentCheckPoint[who.id] == 5) {
h6++;
if (((who.id == 0) && (currentLap == 3)) && (finalround3 == true)) {
_parent.game.rank = h6;
}
if (who.id == 1) {
_parent.game.rank1 = h6;
}
if (who.id == 2) {
_parent.game.rank2 = h6;
}
if (who.id == 3) {
_parent.game.rank3 = h6;
}
if (who.id == 4) {
_parent.game.rank4 = h6;
}
if (who.id == 5) {
_parent.game.rank5 = h6;
}
}
if (currentCheckPoint[who.id] == 6) {
h7++;
if (((who.id == 0) && (currentLap == 3)) && (finalround3 == true)) {
_parent.game.rank = h7;
}
if (who.id == 1) {
_parent.game.rank1 = h7;
}
if (who.id == 2) {
_parent.game.rank2 = h7;
}
if (who.id == 3) {
_parent.game.rank3 = h7;
}
if (who.id == 4) {
_parent.game.rank4 = h7;
}
if (who.id == 5) {
_parent.game.rank5 = h7;
}
}
if (currentCheckPoint[who.id] == 7) {
h8++;
if (((who.id == 0) && (currentLap == 3)) && (finalround3 == true)) {
_parent.game.rank = h8;
}
if (who.id == 1) {
_parent.game.rank1 = h8;
}
if (who.id == 2) {
_parent.game.rank2 = h8;
}
if (who.id == 3) {
_parent.game.rank3 = h8;
}
if (who.id == 4) {
_parent.game.rank4 = h8;
}
if (who.id == 5) {
_parent.game.rank5 = h8;
}
}
if (currentCheckPoint[who.id] == 8) {
h9++;
if (((who.id == 0) && (currentLap == 3)) && (finalround3 == true)) {
_parent.game.rank = h9;
}
if (who.id == 1) {
_parent.game.rank1 = h9;
}
if (who.id == 2) {
_parent.game.rank2 = h9;
}
if (who.id == 3) {
_parent.game.rank3 = h9;
}
if (who.id == 4) {
_parent.game.rank4 = h9;
}
if (who.id == 5) {
_parent.game.rank5 = h9;
}
}
if (currentCheckPoint[who.id] == 9) {
h10++;
if (((who.id == 0) && (currentLap == 3)) && (finalround3 == true)) {
_parent.game.rank = h10;
}
if (who.id == 1) {
_parent.game.rank1 = h10;
}
if (who.id == 2) {
_parent.game.rank2 = h10;
}
if (who.id == 3) {
_parent.game.rank3 = h10;
}
if (who.id == 4) {
_parent.game.rank4 = h10;
}
if (who.id == 5) {
_parent.game.rank5 = h10;
}
}
if (currentCheckPoint[who.id] == 10) {
h11++;
if (((who.id == 0) && (currentLap == 3)) && (finalround3 == true)) {
_parent.game.rank = h11;
}
if (who.id == 1) {
_parent.game.rank1 = h11;
}
if (who.id == 2) {
_parent.game.rank2 = h11;
}
if (who.id == 3) {
_parent.game.rank3 = h11;
}
if (who.id == 4) {
_parent.game.rank4 = h11;
}
if (who.id == 5) {
_parent.game.rank5 = h11;
}
}
if (currentCheckPoint[who.id] == 11) {
h13++;
if (((who.id == 0) && (currentLap == 3)) && (finalround3 == true)) {
_parent.game.rank = h13;
}
if (who.id == 1) {
_parent.game.rank1 = h13;
}
if (who.id == 2) {
_parent.game.rank2 = h13;
}
if (who.id == 3) {
_parent.game.rank3 = h13;
}
if (who.id == 4) {
_parent.game.rank4 = h13;
}
if (who.id == 5) {
_parent.game.rank5 = h13;
}
}
if (currentCheckPoint[who.id] == 12) {
h14++;
if (((who.id == 0) && (currentLap == 3)) && (finalround3 == true)) {
_parent.game.rank = h14;
}
if (who.id == 1) {
_parent.game.rank1 = h14;
}
if (who.id == 2) {
_parent.game.rank2 = h14;
}
if (who.id == 3) {
_parent.game.rank3 = h14;
}
if (who.id == 4) {
_parent.game.rank4 = h14;
}
if (who.id == 5) {
_parent.game.rank5 = h14;
}
}
if (currentCheckPoint[who.id] == 13) {
h15++;
if (((who.id == 0) && (currentLap == 3)) && (finalround3 == true)) {
_parent.game.rank = h15;
}
if (who.id == 1) {
_parent.game.rank1 = h15;
}
if (who.id == 2) {
_parent.game.rank2 = h15;
}
if (who.id == 3) {
_parent.game.rank3 = h15;
}
if (who.id == 4) {
_parent.game.rank4 = h15;
}
if (who.id == 5) {
_parent.game.rank5 = h15;
}
}
if (currentCheckPoint[who.id] == 14) {
h16++;
if (((who.id == 0) && (currentLap == 3)) && (finalround3 == true)) {
_parent.game.rank = h16;
}
if (who.id == 1) {
_parent.game.rank1 = h16;
}
if (who.id == 2) {
_parent.game.rank2 = h16;
}
if (who.id == 3) {
_parent.game.rank3 = h16;
}
if (who.id == 4) {
_parent.game.rank4 = h16;
}
if (who.id == 5) {
_parent.game.rank5 = h16;
}
}
if (currentCheckPoint[who.id] == 15) {
h17++;
if (((who.id == 0) && (currentLap == 3)) && (finalround3 == true)) {
_parent.game.rank = h17;
}
if (who.id == 1) {
_parent.game.rank1 = h17;
}
if (who.id == 2) {
_parent.game.rank2 = h17;
}
if (who.id == 3) {
_parent.game.rank3 = h17;
}
if (who.id == 4) {
_parent.game.rank4 = h17;
}
if (who.id == 5) {
_parent.game.rank5 = h17;
}
}
if (currentCheckPoint[who.id] == 16) {
h18++;
if (((who.id == 0) && (currentLap == 3)) && (finalround3 == true)) {
_parent.game.rank = h18;
}
if (who.id == 1) {
_parent.game.rank1 = h18;
}
if (who.id == 2) {
_parent.game.rank2 = h18;
}
if (who.id == 3) {
_parent.game.rank3 = h18;
}
if (who.id == 4) {
_parent.game.rank4 = h18;
}
if (who.id == 5) {
_parent.game.rank5 = h18;
}
}
if (currentCheckPoint[who.id] == 17) {
h19++;
if (((who.id == 0) && (currentLap == 3)) && (finalround3 == true)) {
_parent.game.rank = h19;
}
if (who.id == 1) {
_parent.game.rank1 = h19;
}
if (who.id == 2) {
_parent.game.rank2 = h19;
}
if (who.id == 3) {
_parent.game.rank3 = h19;
}
if (who.id == 4) {
_parent.game.rank4 = h19;
}
if (who.id == 5) {
_parent.game.rank5 = h19;
}
}
if (currentCheckPoint[who.id] == 18) {
h20++;
if (((who.id == 0) && (currentLap == 3)) && (finalround3 == true)) {
_parent.game.rank = h20;
}
if (who.id == 1) {
_parent.game.rank1 = h20;
}
if (who.id == 2) {
_parent.game.rank2 = h20;
}
if (who.id == 3) {
_parent.game.rank3 = h20;
}
if (who.id == 4) {
_parent.game.rank4 = h20;
}
if (who.id == 5) {
_parent.game.rank5 = h20;
}
}
if (currentCheckPoint[who.id] == 19) {
h21++;
if (((who.id == 0) && (currentLap == 3)) && (finalround3 == true)) {
_parent.game.rank = h21;
}
if (who.id == 1) {
_parent.game.rank1 = h21;
}
if (who.id == 2) {
_parent.game.rank2 = h21;
}
if (who.id == 3) {
_parent.game.rank3 = h21;
}
if (who.id == 4) {
_parent.game.rank4 = h21;
}
if (who.id == 5) {
_parent.game.rank5 = h21;
}
}
if (currentCheckPoint[who.id] == 20) {
h22++;
if (((who.id == 0) && (currentLap == 3)) && (finalround3 == true)) {
_parent.game.rank = h22;
}
if (who.id == 1) {
_parent.game.rank1 = h22;
}
if (who.id == 2) {
_parent.game.rank2 = h22;
}
if (who.id == 3) {
_parent.game.rank3 = h22;
}
if (who.id == 4) {
_parent.game.rank4 = h22;
}
if (who.id == 5) {
_parent.game.rank5 = h22;
}
}
}
if (currentCheckPoint[who.id] >= checkPoint.length) {
laps[who.id]++;
if (laps[who.id] == 1) {
finalround1 = false;
f12++;
if (who.id == 0) {
_parent.game.rank = f12;
}
if (who.id == 1) {
_parent.game.rank1 = f12;
}
if (who.id == 2) {
_parent.game.rank2 = f12;
}
if (who.id == 3) {
_parent.game.rank3 = f12;
}
if (who.id == 4) {
_parent.game.rank4 = f12;
}
if (who.id == 5) {
_parent.game.rank5 = f12;
}
}
if (laps[who.id] == 2) {
finalround2 = false;
g12++;
if (who.id == 0) {
_parent.game.rank = g12;
}
if (who.id == 1) {
_parent.game.rank1 = g12;
}
if (who.id == 2) {
_parent.game.rank2 = g12;
}
if (who.id == 3) {
_parent.game.rank3 = g12;
}
if (who.id == 4) {
_parent.game.rank4 = g12;
}
if (who.id == 5) {
_parent.game.rank5 = g12;
}
}
if (laps[who.id] == 3) {
finalround3 = false;
h12++;
if (who.id == 0) {
_parent.game.rank = h12;
}
if (who.id == 1) {
_parent.game.rank1 = h12;
}
if (who.id == 2) {
_parent.game.rank2 = h12;
}
if (who.id == 3) {
_parent.game.rank3 = h12;
}
if (who.id == 4) {
_parent.game.rank4 = h12;
}
if (who.id == 5) {
_parent.game.rank5 = h12;
}
if ((who._name != "ball") && (_parent.game.rank == 1)) {
who.maxSpeed = 18 + (0.4 * ballList.length);
who.accel = 5.7 + (random(50) * 0.01);
}
if ((who._name != "ball") && (_parent.game.rank != 1)) {
who.maxSpeed = 17 + (0.4 * ballList.length);
who.accel = 4.7 + (random(50) * 0.01);
}
}
if ((who == ball) && (laps[who.id] != totalLaps)) {
_parent.hud.slammer.play();
}
currentCheckPoint[who.id] = 0;
if (laps[who.id] == totalLaps) {
finished++;
if (who == ball1) {
ball1.maxSpeed = 0;
ball1.accel = 0;
ball1.wildness = 0;
ball1.xOff = 0;
ball1.yOff = 0;
}
if (who == ball2) {
ball2.maxSpeed = 0;
ball2.accel = 0;
ball2.wildness = 0;
ball2.xOff = 0;
ball2.yOff = 0;
}
if (who == ball3) {
ball3.maxSpeed = 0;
ball3.accel = 0;
ball3.wildness = 0;
ball3.xOff = 0;
ball3.yOff = 0;
}
if (who == ball4) {
ball4.maxSpeed = 0;
ball4.accel = 0;
ball4.wildness = 0;
ball4.xOff = 0;
ball4.yOff = 0;
}
if (who == ball5) {
}
if (who == ball) {
trace("Kumar");
gameOver = true;
gfx.victory.start();
displayPlaceList = ["1st", "2nd", "3rd", "4th", "5th"];
_parent.place = finished;
_parent.displayPlace = displayPlaceList[finished - 1];
_root.mytest = _parent.displayPlace;
gfx.music.exit();
gfx.crowd.start();
leaveInterval = setInterval(leaveRace, 1000);
}
}
}
}
if (who == ball1) {
currentLap1 = Math.min(totalLaps, laps[who.id] + 1);
}
if (who == ball2) {
currentLap1 = Math.min(totalLaps, laps[who.id] + 1);
}
if (who == ball3) {
currentLap1 = Math.min(totalLaps, laps[who.id] + 1);
}
if (who == ball4) {
currentLap1 = Math.min(totalLaps, laps[who.id] + 1);
}
if (who == ball5) {
}
if (who == ball) {
currentLap = Math.min(totalLaps, laps[who.id] + 1);
displayLaps = (currentLap + " / ") + totalLaps;
}
};
beginGame = function () {
startTime = getTimer();
if (!_root.mute) {
_root.gamebg.start(0, 999);
} else {
_root.gamebg.stop();
}
gameStarted = true;
};
onEnterFrame = function () {
if (gameStarted && (gameplay == true)) {
doKeys();
var _local3 = 1;
while (_local3 < ballList.length) {
goTowardGoal(ballList[_local3]);
_local3++;
}
_local3 = 0;
while (_local3 < iterations) {
for (var _local4 in ballList) {
ballList[_local4].globalizeNodes(ballList[_local4]);
ballList[_local4].resetCollisions();
}
for (var _local4 in ballList) {
buildCurrentBumperList(ballList[_local4]);
buildCurrentBallList(ballList[_local4]);
ballList[_local4].collisionDetection();
}
for (var _local4 in ballList) {
ballList[_local4].collisionResponse();
}
for (var _local4 in ballList) {
ballList[_local4].translate();
doLaps(ballList[_local4]);
}
_local3++;
}
if (ppp == true) {
ppp = false;
_root.aclr.stop();
_root.gamebg.start(0, 999);
}
_root.hud.mc_stopwatch.startstoptimer();
}
moveCamera();
doTime();
alignBalls();
if (_parent.raceChoice == 6) {
starConditions();
starConditions1();
starConditions2();
}
if (_parent.raceChoice == 7) {
starConditions();
}
if (_parent.raceChoice == 8) {
starConditions();
starConditions1();
}
};
init = function () {
oldSpeed = {x:0, y:0};
reallyOldSpeed = {x:0, y:0};
reallyOldSpeed1 = {x:0, y:0};
reallyOldSpeed2 = {x:0, y:0};
reallyOldSpeed3 = {x:0, y:0};
sparkCount = 0;
i = 0;
while (i < pathList.length) {
var _local5 = pathList[i];
if (i < (pathList.length - 1)) {
var _local4 = pathList[i + 1];
} else {
var _local4 = pathList[0];
}
var _local6 = _local5._x - _local4._x;
var _local7 = _local5._y - _local4._y;
var _local8 = {x:-_local6, y:-_local7};
pathList[i].normal = normalize(_local8);
pathList[i].clear();
pathList[i].lineStyle(2, 16742314, 100);
pathList[i].moveTo(0, 0);
pathList[i].lineTo(pathList[i].normal.x * 50, pathList[i].normal.y * 50);
i++;
}
_parent.game.rank4 = 1;
_parent.game.rank3 = 2;
_parent.game.rank2 = 3;
_parent.game.rank1 = 4;
_parent.game.rank = 5;
_root.game.ball.nitromc._visible = false;
_root.game.ball1.nitromc._visible = false;
_root.game.ball2.nitromc._visible = false;
_root.game.ball3.nitromc._visible = false;
_root.game.ball4.nitromc._visible = false;
turnFactor = 0;
finished = 0;
finalround3 = true;
finalround1 = true;
finalround2 = true;
_root.hittst = false;
f1 = 0;
f2 = 0;
f3 = 0;
f4 = 0;
f5 = 0;
f6 = 0;
f7 = 0;
f8 = 0;
f9 = 0;
f10 = 0;
f11 = 0;
f12 = 0;
f13 = 0;
f14 = 0;
f15 = 0;
f16 = 0;
f17 = 0;
f18 = 0;
f19 = 0;
f20 = 0;
f21 = 0;
f22 = 0;
f23 = 0;
f24 = 0;
f25 = 0;
g1 = 0;
g2 = 0;
g3 = 0;
g4 = 0;
g5 = 0;
g6 = 0;
g7 = 0;
g8 = 0;
g9 = 0;
g10 = 0;
g11 = 0;
g12 = 0;
g13 = 0;
g14 = 0;
g15 = 0;
g16 = 0;
g17 = 0;
g18 = 0;
g19 = 0;
g20 = 0;
g21 = 0;
g22 = 0;
g23 = 0;
g24 = 0;
g25 = 0;
h1 = 0;
h2 = 0;
h3 = 0;
h4 = 0;
h5 = 0;
h6 = 0;
h7 = 0;
h8 = 0;
h9 = 0;
h10 = 0;
h11 = 0;
h12 = 0;
h13 = 0;
h14 = 0;
h15 = 0;
h16 = 0;
h17 = 0;
h18 = 0;
h19 = 0;
h20 = 0;
h21 = 0;
h22 = 0;
h23 = 0;
h24 = 0;
h25 = 0;
canLap = false;
laps = [0, 0, 0, 0, 0];
totalLaps = 3;
checkPoint = [checkPoint0, checkPoint1, checkPoint2, checkPoint3, checkPoint4, checkPoint5, checkPoint6, checkPoint7, checkPoint8, checkPoint9, checkPoint10, checkPoint11, checkPoint12, checkPoint13, checkPoint14, checkPoint15, checkPoint16, checkPoint17, checkPoint18, checkPoint19, checkPoint20];
currentCheckPoint = [0, 0, 0, 0, 0];
showObjects = false;
thing1Interval = setInterval(sayThing1, 500);
thing2Interval = setInterval(sayThing2, 3250);
wally = _parent.wally.dude;
gravity = 2.5;
balls = 2;
maxSpring = 37;
maxSpeed = 14;
iterations = 3;
display.startx = display.slider._x;
display.starty = display.slider._y;
camSpeed = 0;
camMax = 40;
dudeDist = 30;
startx = this._x;
starty = this._y;
ballStartx = ball._x;
ballStarty = ball._y;
bumperList = [];
cornerList = [];
boxList = [];
wallList = [];
ballProperties();
timeChoices = [90, 80, 70];
totalTime = timeChoices[_parent.choice];
gameStarted = false;
gameOver = false;
gameplay = true;
objectsEaten = 0;
bumped = 0;
ballCount = 0;
clocked = false;
overlay.swapDepths(1000);
display.swapDepths(900);
state = "idle";
display.pusher.dude.gotoAndStop("idle");
doWally("intro");
setSpans();
toldSmallStuff = false;
toldDoingGreat = false;
ballList = [];
if (_parent.raceChoice == 0) {
newBall(ball, 50, 400000);
newBall(ball1, 20, 100000);
newBall(ball2, 20, 100000);
newBall(ball3, 20, 100000);
newBall(ball4, 20, 100000);
}
if (_parent.raceChoice == 1) {
newBall(ball, 50, 400000);
newBall(ball1, 20, 100000);
newBall(ball2, 20, 100000);
newBall(ball3, 20, 100000);
newBall(ball4, 20, 100000);
}
if (_parent.raceChoice == 2) {
newBall(ball, 50, 400000);
newBall(ball1, 20, 100000);
newBall(ball2, 20, 100000);
newBall(ball3, 20, 100000);
newBall(ball4, 20, 100000);
}
if (_parent.raceChoice == 3) {
newBall(ball, 50, 400000);
newBall(ball1, 20, 100000);
newBall(ball2, 20, 100000);
newBall(ball3, 20, 100000);
newBall(ball4, 20, 100000);
}
if (_parent.raceChoice == 4) {
newBall(ball, 50, 400000);
newBall(ball1, 20, 100000);
newBall(ball2, 20, 100000);
newBall(ball3, 20, 100000);
newBall(ball4, 20, 100000);
}
if (_parent.raceChoice == 5) {
newBall(ball, 50, 400000);
newBall(ball1, 20, 100000);
newBall(ball2, 20, 100000);
newBall(ball3, 20, 100000);
newBall(ball4, 20, 100000);
}
if (_parent.raceChoice == 6) {
_root.hud.game.ball1._visible = false;
_root.hud.game.ball2._visible = false;
_root.hud.game.ball3._visible = false;
_root.hud.game.ball4._visible = false;
_root.hud.postOfCar._visible = false;
ball1._visible = false;
ball2._visible = false;
ball3._visible = false;
ball4._visible = false;
newBall(ball, 50, 400000);
}
if (_parent.raceChoice == 7) {
_root.hud.game.ball1._visible = false;
_root.hud.game.ball2._visible = false;
_root.hud.game.ball3._visible = false;
_root.hud.game.ball4._visible = false;
_root.hud.postOfCar._visible = false;
ball1._visible = false;
ball2._visible = false;
ball3._visible = false;
ball4._visible = false;
newBall(ball, 50, 400000);
}
if (_parent.raceChoice == 8) {
_root.hud.game.ball1._visible = false;
_root.hud.game.ball2._visible = false;
_root.hud.game.ball3._visible = false;
_root.hud.game.ball4._visible = false;
_root.hud.postOfCar._visible = false;
ball1._visible = false;
ball2._visible = false;
ball3._visible = false;
ball4._visible = false;
newBall(ball, 50, 400000);
}
var1 = 0;
nitro = false;
nn = false;
qq = false;
nclose = true;
pp = true;
ppp = false;
_root.wrongway._visible = false;
_parent.hud.setter.gotoAndPlay(2);
};
var keyListener = new Object();
keyListener.onKeyDown = function () {
if ((Key.getCode() == 80) || (Key.getCode() == 112)) {
if (gameplay) {
_root.pmc._visible = true;
} else {
_root.pmc._visible = false;
}
gameplay = !gameplay;
}
};
if (!_root.excuteKey) {
_root.excuteKey = true;
Key.addListener(keyListener);
}
gotoAndStop("course" + _parent.raceChoice);
Symbol 527 MovieClip Frame 5
pathList = [path0, path1, path2, path3, path4, path5, path6, path7, path8, path9, path10, path11, path12, path13, path14, path15, path16, path17, path18];
init();
Symbol 527 MovieClip Frame 13
pathList = [path0, path1, path2, path3, path4, path5, path6, path7, path8, path9, path10, path11, path12, path13, path14, path15, path16, path17, path18];
init();
Instance of Symbol 479 MovieClip "star2" in Symbol 527 MovieClip Frame 13
/* no clip actions */
Symbol 527 MovieClip Frame 21
pathList = [path0, path1, path2, path3, path4, path5, path6, path7, path8, path9, path10, path11, path12, path13, path14, path15, path16, path17, path18];
init();
Symbol 527 MovieClip Frame 28
pathList = [path0, path1, path2, path3, path4, path5, path6, path7, path8, path9, path10, path11, path12, path13, path14, path15, path16, path17, path18];
init();
Symbol 527 MovieClip Frame 38
pathList = [path0, path1, path2, path3, path4, path5, path6, path7, path8, path9, path10, path11, path12, path13, path14, path15, path16, path17, path18];
init();
Symbol 527 MovieClip Frame 48
pathList = [path0, path1, path2, path3, path4, path5, path6, path7, path8, path9, path10, path11, path12, path13, path14, path15, path16, path17, path18, path19, path20, path21, path22, path23, path24, path25, path26];
init();
Symbol 527 MovieClip Frame 58
pathList = [path0, path1, path2, path3, path4, path5, path6, path7, path8, path9, path10, path11, path12, path13, path14, path15, path16, path17, path18, path19, path20, path21, path22, path23, path24, path25];
init();
Symbol 527 MovieClip Frame 68
pathList = [path0, path1, path2, path3, path4, path5, path6, path7, path8, path9, path10, path11, path12, path13, path14, path15, path16, path17, path18, path19, path20, path21, path22, path23, path24, path25];
init();
Symbol 527 MovieClip Frame 78
pathList = [path0, path1, path2, path3, path4, path5, path6, path7, path8, path9, path10, path11, path12, path13, path14, path15, path16, path17, path18, path19, path20, path21, path22, path23, path24, path25];
init();
Symbol 560 MovieClip Frame 1
stop();
count = 1;
Symbol 560 MovieClip Frame 2
play();
Symbol 560 MovieClip Frame 10
gfx.buzzerShort.start();
Symbol 560 MovieClip Frame 22
count = 2;
Symbol 560 MovieClip Frame 31
gfx.buzzerShort.start();
Symbol 560 MovieClip Frame 43
count = 3;
Symbol 560 MovieClip Frame 52
gfx.buzzerLong.start();
Symbol 560 MovieClip Frame 62
gfx.music.enter();
Symbol 560 MovieClip Frame 67
gfx.crowd.start();
Symbol 560 MovieClip Frame 105
_parent._parent.game.beginGame();
Symbol 560 MovieClip Frame 131
stop();
Symbol 575 MovieClip Frame 1
function startstoptimer() {
if (!stopwatch) {
if (paused) {
startTime = getTimer() - elapsedTime;
} else {
startTime = getTimer();
}
paused = false;
stopwatch = true;
}
}
function stopstopwatchtimer() {
stopwatch = false;
paused = false;
stopwatch_txt = "00:00:00:00";
}
var stopwatch = false;
var paused = false;
var remaining;
var elapsedTime;
var elapsedHours;
var elapsedM;
var elapsedS;
var elapsedH;
var startTime;
var remaining;
var hours;
var minutes;
var seconds;
var hundredths;
pause_btn.onPress = function () {
if (stopwatch) {
stopwatch = false;
paused = true;
} else {
stopwatch = true;
paused = false;
}
};
onEnterFrame = function () {
if ((stopwatch && (_root.game.gameplay == true)) && (!_root.game.gameOver)) {
elapsedTime = getTimer() - startTime;
elapsedHours = Math.floor(elapsedTime / 3600000);
remaining = elapsedTime - (elapsedHours * 3600000);
elapsedM = Math.floor(remaining / 60000);
remaining = remaining - (elapsedM * 60000);
elapsedS = Math.floor(remaining / 1000);
remaining = remaining - (elapsedS * 1000);
elapsedH = Math.floor(remaining / 10);
if (elapsedHours < 10) {
hours = "0" + elapsedHours.toString();
} else {
hours = elapsedHours.toString();
}
if (elapsedM < 10) {
minutes = "0" + elapsedM.toString();
} else {
minutes = elapsedM.toString();
}
if (elapsedS < 10) {
seconds = "0" + elapsedS.toString();
} else {
seconds = elapsedS.toString();
}
if (elapsedH < 10) {
hundredths = "0" + elapsedH.toString();
} else {
hundredths = elapsedH.toString();
}
if ((((((_root.raceChoice == 0) || (_root.raceChoice == 1)) || (_root.raceChoice == 2)) || (_root.raceChoice == 3)) || (_root.raceChoice == 4)) || (_root.raceChoice == 5)) {
_root.driftMC._x = 1000;
_root.driftMC._y = 1000;
_root.FinalTime = (stopwatch_txt = (((((hours + " : ") + minutes) + " : ") + seconds) + " : ") + hundredths);
stopwatch_minutes_txt = minutes;
stopwatch_seconds_txt = seconds;
stopwatch_hundredths_txt = hundredths;
}
if (((_root.raceChoice == 6) || (_root.raceChoice == 7)) || (_root.raceChoice == 8)) {
_root.hud.mc_stopwatch._visible = false;
_root.driftMC._x = 45;
_root.driftMC._y = 30;
_root.driftTimes = Number(70 - ((elapsedM * 60) + elapsedS));
_root.driftMC.secDrift = _root.driftTimes;
if (_root.driftTimes <= 0) {
_root.dgo = true;
_root.driftGameOver();
}
}
} else {
startTime = getTimer() - elapsedTime;
}
};
Symbol 617 MovieClip Frame 1
stop();
Symbol 617 MovieClip Frame 2
stop();
Symbol 617 MovieClip Frame 3
stop();
Symbol 617 MovieClip Frame 4
stop();
Symbol 617 MovieClip Frame 5
stop();
Symbol 617 MovieClip Frame 6
stop();
Symbol 617 MovieClip Frame 7
stop();
Symbol 617 MovieClip Frame 8
stop();
Symbol 617 MovieClip Frame 9
stop();
Symbol 632 MovieClip Frame 1
distance = function (x1, y1, x2, y2) {
distx = x1 - x2;
disty = y1 - y2;
return(Math.sqrt((distx * distx) + (disty * disty)));
};
magnitude = function (v1) {
return(distance(0, 0, v1.x, v1.y));
};
dot = function (v1, v2) {
return((v1.x * v2.x) + (v1.y * v2.y));
};
normalize = function (v1) {
var _local1 = 1 / magnitude(v1);
return({x:v1.x * _local1, y:v1.y * _local1});
};
adds = function (v1, v2) {
tempVector = new Object();
tempVector.x = v1.x + v2.x;
tempVector.y = v1.y + v2.y;
return(tempVector);
};
subtract = function (v1, v2) {
tempVector = new Object();
tempVector.x = v1.x - v2.x;
tempVector.y = v1.y - v2.y;
return(tempVector);
};
multiply = function (s, v) {
tempVector = new Object();
tempVector.x = v.x * s;
tempVector.y = v.y * s;
return(tempVector);
};
resetCollisions = function () {
myCollisions = new Array();
myColliders = [];
};
findAngle = function (xdist, ydist) {
a = Math.atan(ydist / xdist) * rad;
if ((xdist > 0) && (ydist < 0)) {
a = -a;
}
if (xdist < 0) {
a = 180 - a;
}
if ((xdist > 0) && (ydist > 0)) {
a = 360 - a;
}
return(a);
};
getSlope = function (x1, y1, x2, y2) {
return((y1 - y2) / (x1 - x2));
};
getIntercept = function (x1, y1, slope) {
return(y1 - (x1 * slope));
};
getIntersection = function (x1, y1, x2, y2, x3, y3, x4, y4) {
m1 = getSlope(x1, y1, x2, y2);
m2 = getSlope(x3, y3, x4, y4);
b1 = getIntercept(x1, y1, m1);
b2 = getIntercept(x3, y3, m2);
tempPoint = new Object();
tempPoint.x = (b2 - b1) / (m1 - m2);
tempPoint.y = (m1 * tempPoint.x) + b1;
return(tempPoint);
};
boxTest = function (which) {
clip = _parent.boxList[which];
if (hitter.hitTest(clip)) {
for (var _local8 in gNodeList) {
var _local3 = {x:gNodeList[_local8].x, y:gNodeList[_local8].y};
this._parent.localToGlobal(_local3);
if (clip.hitTest(_local3.x, _local3.y, true)) {
bumpness = 0.5;
var _local4 = {x:(this.speed.x * bumpness) + gNodeList[_local8].diff.x, y:(this.speed.y * bumpness) + gNodeList[_local8].diff.y};
for (var _local7 in clip.hitterList) {
myDist = distance(gNodeList[_local8].x, gNodeList[_local8].y, clip._x - (clip.hitterList[_local7].collisionNormal.x * 10000000), clip._y - (clip.hitterList[_local7].collisionNormal.y * 10000000));
futureDist = distance(gNodeList[_local8].x + _local4.x, gNodeList[_local8].y + _local4.y, clip._x - (clip.hitterList[_local7].collisionNormal.x * 10000000), clip._y - (clip.hitterList[_local7].collisionNormal.y * 10000000));
if (clip.hitterList[_local7].hitTest(_local3.x, _local3.y, true) && (myDist > futureDist)) {
collisionInfo = new Object();
collisionInfo.perpVector = {x:0, y:0};
collisionInfo.heft = heft * 1E16;
collisionInfo.normal = clip.hitterList[_local7].collisionNormal;
collisionInfo.speed = {x:0, y:0};
collisionInfo.mySpeed = _local4;
collisionInfo.mass = 1E18;
collisionInfo.body = clip;
if (nodeList[_local8]._x < 0) {
collisionInfo.backwards = -1.4;
} else {
collisionInfo.backwards = 1;
}
myCollisions.push(collisionInfo);
}
}
}
}
}
};
bumperTest = function (which) {
clip = currentBumperList[which];
if (clip.active) {
if (hitter.hitTest(clip)) {
for (var _local5 in gNodeList) {
bumpness = 0.5;
var _local2 = {x:(this.speed.x * bumpness) + gNodeList[_local5].diff.x, y:(this.speed.y * bumpness) + gNodeList[_local5].diff.y};
myDist = distance(gNodeList[_local5].x, gNodeList[_local5].y, clip._x, clip._y);
futureDist = distance(gNodeList[_local5].x + _local2.x, gNodeList[_local5].y + _local2.y, clip._x, clip._y);
myDiff = myDist - clip.span;
myCount++;
if ((myDiff <= 0) && (myDist > futureDist)) {
collisionInfo = new Object();
collisionInfo.collider = clip._name;
collisionInfo.perpVector = {x:0, y:0};
collisionInfo.heft = heft * 1000;
collisionInfo.normal = findNormal(this, clip);
collisionInfo.speed = {x:0, y:0};
collisionInfo.mySpeed = _local2;
collisionInfo.mass = 100000000000000;
myCollisions.push(collisionInfo);
}
}
}
}
};
globalizeNodes = function (who) {
who.gNodeList = [];
for (var _local4 in who.nodeList) {
who.gNodeList[_local4] = {x:nodeList[_local4]._x, y:nodeList[_local4]._y};
who.localToGlobal(who.gNodeList[_local4]);
who.gNodeList[_local4].diff = {x:who.gNodeList[_local4].x - who.nodeList[_local4].oldPos.x, y:who.gNodeList[_local4].y - who.nodeList[_local4].oldPos.y};
who._parent.globalToLocal(who.gNodeList[_local4]);
}
};
saveNodePositions = function () {
for (var _local5 in nodeList) {
var _local2 = {x:nodeList[_local5]._x, y:nodeList[_local5]._y};
this.localToGlobal(_local2);
nodeList[_local5].oldPos = {x:_local2.x, y:_local2.y};
}
};
findNormal = function (me, him) {
tempVector = new Object();
tempVector.x = him._x - me._x;
tempVector.y = him._y - me._y;
return(tempVector);
};
unDaze = function () {
clearInterval(dazeInterval);
dazed = false;
};
daze = function () {
clearInterval(dazeInterval);
if (this != _parent.ball) {
dazeInterval = setInterval(unDaze, 100);
} else {
dazeInterval = setInterval(unDaze, 50);
}
dazed = true;
};
getJ = function (mine, his, normal, hismass, hisHeft, hisPerp) {
myr = (temp = new Object());
diff = new Object();
diff = subtract(mine, his);
temp = multiply(-(1.05 + elastic), diff);
top = dot(temp, normal);
massnum = (1 / mass) + (1 / hismass);
temp = multiply(massnum, normal);
firstAdd = dot(perpVector, normal);
firstAdd = firstAdd * firstAdd;
firstAdd = firstAdd / heft;
secondAdd = dot(hisPerp, normal);
secondAdd = secondAdd * secondAdd;
secondAdd = secondAdd / hisHeft;
bottom = dot(normal, temp);
bottom = bottom + (firstAdd + secondAdd);
j = top / bottom;
return(j);
};
getCollisions = function () {
var _local4 = 0;
while (_local4 < currentBallList.length) {
clip = currentBallList[_local4];
if (clip.id != id) {
isCollider = false;
for (var _local8 in myColliders) {
if (myColliders[_local8] == clip) {
isCollider = true;
}
}
if (!isCollider) {
if (hitter.hitTest(clip.hitter)) {
for (_local4 in gNodeList) {
bumpness = 0.5;
var _local5 = {x:(this.speed.x * bumpness) + gNodeList[_local4].diff.x, y:(this.speed.y * bumpness) + gNodeList[_local4].diff.y};
myDist = distance(this._x, this._y, clip._x, clip._y);
futureDist = distance(this._x + speed.x, this._y + speed.y, clip._x + clip.speed.x, clip._y + clip.speed.y);
var _local3 = {x:gNodeList[_local4].x, y:gNodeList[_local4].y};
this._parent.localToGlobal(_local3);
if (clip.hitter.hitTest(_local3.x, _local3.y, true) && (myDist > futureDist)) {
collisionInfo = new Object();
collisionInfo.perpVector = clip.perpVector;
collisionInfo.normal = findNormal(clip, this);
collisionInfo.speed = clip.speed;
collisionInfo.mySpeed = speed;
collisionInfo.rot = clip.rot;
collisionInfo.mass = clip.mass;
collisionInfo.heft = clip.heft;
if (nodeList[_local4]._x < 0) {
collisionInfo.backwards = -1.4;
} else {
collisionInfo.backwards = 1;
}
myCollisions.push(collisionInfo);
collisionInfo2 = new Object();
collisionInfo2.perpVector = this.perpVector;
collisionInfo2.normal = findNormal(this, clip);
collisionInfo2.speed = this.speed;
collisionInfo2.mySpeed = clip.speed;
collisionInfo2.rot = this.rot;
collisionInfo2.mass = this.mass;
collisionInfo2.heft = this.heft;
clip.globalToLocal(_local3);
if (_local3.x < 0) {
collisionInfo2.backwards = -1.4;
} else {
collisionInfo2.backwards = 1;
}
clip.myCollisions.push(collisionInfo2);
clip.myColliders.push(this);
}
}
}
}
}
_local4++;
}
var _local9 = magnitude(speed);
_local4 = 0;
while (_local4 < _parent.cornerList.length) {
cornerTest(_local4);
_local4++;
}
_local4 = 0;
while (_local4 < currentBumperList.length) {
bumperTest(_local4);
_local4++;
}
_local4 = 0;
while (_local4 < _parent.boxList.length) {
boxTest(_local4);
_local4++;
}
return(myCollisions);
};
applyFriction = function () {
var _local4 = _parent.findAngle(speed.x, speed.y);
var _local3 = Math.abs((this._rotation - _local4) % 90);
_local3 = ((_local3 / 90) * 0.25) + 0.75;
if (this == _parent.ball) {
}
velocity = preVelocity - (friction * _local3);
velocity = Math.max(0, velocity);
ratio = velocity / preVelocity;
speed.x = speed.x * ratio;
speed.y = speed.y * ratio;
};
translate = function () {
saveNodePositions();
oldPos = new Object();
oldPos.x = _x;
oldPos.y = _y;
preVelocity = distance(0, 0, speed.x, speed.y);
spin = spin + preVelocity;
frame = (int(spin * 0.1) % 35) + 1;
_parent.display.hider.gotoAndStop(frame);
if (maxVelocity > maxVelocity) {
finalVel = finalVel * 0.8;
} else {
finalVel = maxVelocity;
}
finalVel = Math.max(finalVel, maxVelocity);
if (preVelocity > finalVel) {
ratio = finalVel / preVelocity;
speed.x = speed.x * ratio;
speed.y = speed.y * ratio;
}
_x = (_x + (speed.x / _parent.iterations));
_y = (_y + (speed.y / _parent.iterations));
_rotation = (_rotation + (rot * rad));
rot = rot * 0.85;
perpVector.x = (-Math.sin(_rotation / rad)) * span;
perpVector.y = Math.cos(_rotation / rad) * span;
preVelocity = distance(0, 0, speed.x, speed.y);
if (preVelocity > 0) {
applyFriction();
}
assignNodeSpeeds();
};
collisionDetection = function () {
collisionList = new Array();
collisionList = getCollisions();
};
collisionResponse = function () {
if (collisionList.length > 0) {
speedTotal = new Object();
speedTotal.x = 0;
speedTotal.y = 0;
rotTotal = 0;
i = 0;
while (i < collisionList.length) {
j = getJ(collisionList[i].mySpeed, collisionList[i].speed, collisionList[i].normal, collisionList[i].mass, collisionList[i].heft, collisionList[i].perpVector);
temp = new Object();
temp = multiply(j / mass, collisionList[i].normal);
speedTotal = adds(speedTotal, temp);
jNormal = new Object();
jNormal = multiply(j, collisionList[i].normal);
value = dot(jNormal, perpVector);
rotTotal = rotTotal + ((value / heft) * collisionList[i].backwards);
var _local3 = collisionList[i].body;
i++;
}
_parent.determineSpecs(_local3._name);
vol = int(magnitude(speedTotal) * 2);
if (vol > 0) {
daze();
}
if (vol > 15) {
var _local4 = determineSound(_local3);
_root.sounds.instance[_local4].setVolume(vol);
_root.sounds.volumes[_local4] = vol;
_root.sounds.goals[_local4] = vol;
if (_local4 == 1) {
_root.sounds.bounce.start();
} else if (_local4 == 2) {
_root.sounds.rim.start();
} else if (_local4 == 4) {
_root.sounds.backboard.start();
}
}
speedTotal.x = speedTotal.x / collisionList.length;
speedTotal.y = speedTotal.y / collisionList.length;
speedTotal.x;
speedTotal.y;
rotTotal = rotTotal / collisionList.length;
rot = rot + rotTotal;
speed = adds(speed, speedTotal);
_parent.checkBounces();
}
};
stop();
myCount = 0;
nodeList = [];
Symbol 633 MovieClip Frame 1
ballList = [ball, ball1, ball2, ball3, ball4, ball5];
for (var i in ballList) {
ballList[i].gotoAndStop(Number(i) + 1);
}
ball.swapDepths(100);
onEnterFrame = function () {
for (var _local2 in ballList) {
ballList[_local2]._x = _parent._parent.game.ballList[_local2]._x;
ballList[_local2]._y = _parent._parent.game.ballList[_local2]._y;
}
};
Symbol 636 MovieClip Frame 1
stop();
Symbol 636 MovieClip Frame 2
gotoAndPlay (3);
Symbol 637 MovieClip Frame 1
car.gotoAndStop(_parent.choice + 1);
sidebar.gotoAndStop(_parent.raceChoice + 1);
game.track.gotoAndStop(_parent.raceChoice + 1);
Symbol 667 Button
on (press) {
if (_root.game.gameStarted && (_root.game.gameplay == true)) {
_root.gotoAndStop("title");
}
}
Symbol 684 MovieClip Frame 1
stop();
Symbol 684 MovieClip Frame 12
gotoAndPlay (8);
Symbol 684 MovieClip Frame 16
stop();
Symbol 692 Button
on (release) {
getURL ("http://www.startonlinegames.com", "_blank");
}
on (rollOver) {
curmcccc.gotoAndPlay(2);
}
on (rollOut) {
curmcccc.gotoAndPlay(13);
}
Symbol 697 Button
on (press) {
_root.gotoAndStop("choose");
}
on (rollOver) {
curmcccc2.gotoAndPlay(2);
}
on (rollOut) {
curmcccc2.gotoAndPlay(13);
}
Symbol 702 Button
on (press) {
_root.gotoAndStop("location");
}
on (rollOver) {
curmcccc1.gotoAndPlay(2);
}
on (rollOut) {
curmcccc1.gotoAndPlay(13);
}
Symbol 727 Button
on (press) {
_root.gotoAndStop("location");
}
on (rollOver) {
curmcc.gotoAndPlay(2);
}
on (rollOut) {
curmcc.gotoAndPlay(13);
}
Symbol 732 Button
on (press) {
_root.gotoAndStop("title");
}
on (rollOver) {
curmccc.gotoAndPlay(2);
}
on (rollOut) {
curmccc.gotoAndPlay(13);
}
on (rollOver) {
curmccc.gotoAndPlay(2);
}
on (rollOut) {
curmccc.gotoAndPlay(13);
}
Symbol 736 Button
on (release) {
getURL ("http://www.startonlinegames.com", "_blank");
}
on (rollOver) {
curmcccc.gotoAndPlay(2);
}
on (rollOut) {
curmcccc.gotoAndPlay(13);
}
Symbol 762 MovieClip Frame 1
stop();
Symbol 762 MovieClip Frame 12
gotoAndPlay (8);
Symbol 762 MovieClip Frame 16
stop();
Symbol 767 Button
on (press) {
_root.gotoAndStop("title");
}
on (rollOver) {
curmccc.gotoAndPlay(2);
}
on (rollOut) {
curmccc.gotoAndPlay(13);
}
on (rollOver) {
curmccc.gotoAndPlay(2);
}
on (rollOut) {
curmccc.gotoAndPlay(13);
}
Symbol 771 Button
on (release) {
getURL ("http://www.startonlinegames.com", "_blank");
}
on (rollOver) {
curmcccc.gotoAndPlay(2);
}
on (rollOut) {
curmcccc.gotoAndPlay(13);
}
Symbol 776 Button
on (press) {
_root.gotoAndStop("title");
}
on (rollOver) {
curmccc.gotoAndPlay(2);
}
on (rollOut) {
curmccc.gotoAndPlay(13);
}
on (rollOver) {
curmcc.gotoAndPlay(2);
}
on (rollOut) {
curmcc.gotoAndPlay(13);
}