Frame 1
var loadAmount = _totalframes;
if (_framesloaded == loadAmount) {
gotoAndPlay (5);
}
Frame 3
if (_framesloaded == loadAmount) {
gotoAndPlay (5);
} else {
total = Math.round(getBytesTotal() / 1024);
loaded = Math.round(getBytesLoaded() / 1024);
percent = Math.round((loaded / total) * 100);
bytesTotalOutput = total + "k";
percentOutput = percent + "%";
loadBar._width = loadBarHousing._width * (percent / 100);
gotoAndPlay (2);
}
Frame 5
tlap1 = 1;
tlap2 = 2;
saved = 0;
tNum = "track1";
p1name = "player 1";
p2name = "player 2";
maxLaps = 10;
singleP = 0;
lightsP1 = 0;
lightsP2 = 0;
c1 = 0;
c2 = 0;
mct1 = new Object();
mct2 = new Object();
mct3 = new Object();
mct4 = new Object();
mct5 = new Object();
mct6 = new Object();
mct7 = new Object();
mct8 = new Object();
mct9 = new Object();
mct10 = new Object();
mct1 = {ra:"70", rb:"0", ga:"70", gb:"46", ba:"70", bb:"0", aa:"100", ab:"0"};
mct2 = {ra:"70", rb:"0", ga:"70", gb:"10", ba:"70", bb:"70", aa:"100", ab:"0"};
mct3 = {ra:"70", rb:"70", ga:"70", gb:"0", ba:"70", bb:"0", aa:"100", ab:"0"};
mct4 = {ra:"70", rb:"50", ga:"70", gb:"50", ba:"70", bb:"0", aa:"100", ab:"0"};
mct5 = {ra:"70", rb:"0", ga:"70", gb:"50", ba:"70", bb:"80", aa:"100", ab:"0"};
mct6 = {ra:"70", rb:"0", ga:"70", gb:"15", ba:"70", bb:"46", aa:"100", ab:"0"};
mct7 = {ra:"70", rb:"10", ga:"70", gb:"0", ba:"70", bb:"10", aa:"100", ab:"0"};
mct8 = {ra:"70", rb:"60", ga:"70", gb:"30", ba:"70", bb:"0", aa:"100", ab:"0"};
mct9 = {ra:"70", rb:"0", ga:"70", gb:"70", ba:"70", bb:"0", aa:"100", ab:"0"};
mct10 = {ra:"70", rb:"80", ga:"70", gb:"90", ba:"70", bb:"40", aa:"100", ab:"0"};
Frame 6
function p1color(name) {
t1c.setTransform(name);
n1c.setTransform(name);
n1ca.setTransform(name);
}
function p2color(name) {
t2c.setTransform(name);
n2c.setTransform(name);
n2ca.setTransform(name);
}
stop();
turnRate = 6;
maxSpeed = 5;
startRace = 0;
p1time = 0;
p1total = 0;
p2time = 0;
p2total = 0;
lights._alpha = 0;
lights2._alpha = 0;
lights._x = -1000;
lights2._x = -1000;
t1c = new Color(truck);
n1c = new Color(options.scores.names);
n1ca = new Color(vs.p1);
t2c = new Color(truck2);
n2c = new Color(options.scores.names2);
n2ca = new Color(vs.p2);
Instance of Symbol 21 MovieClip "truck" in Frame 6
onClipEvent (load) {
angle = 0;
speed = 0;
maxSpeed = 0;
turnRate = 0;
accelRate = 0.25;
}
onClipEvent (enterFrame) {
if ((this.hitTest(_root.truck2) && (_xscale == 100)) && (_root.truck2._xscale == 100)) {
_root.truck.speed = _root.truck.speed - 2;
_root.truck2.speed = _root.truck2.speed - 2;
if (_root.truck.speed < 0) {
_root.truck.speed = 0;
}
if (_root.truck2.speed < 0) {
_root.truck2.speed = 0;
}
if (_root.truck2._y < (_y - 10)) {
_y = (_y + 5);
_root.truck2._y = _root.truck2._y - 5;
}
if ((_y + 10) < _root.truck2._y) {
_y = (_y - 5);
_root.truck2._y = _root.truck2._y + 5;
}
if (_root.truck2._x < (_x - 10)) {
_x = (_x + 5);
_root.truck2._x = _root.truck2._x - 5;
}
if ((_x + 10) < _root.truck2._x) {
_x = (_x - 5);
_root.truck2._x = _root.truck2._x + 5;
}
}
if ((_xscale == 100) && (_root.startRace == 1)) {
turnRate = _root.turnRate;
} else {
turnRate = 0;
}
angle = angle + turn;
_rotation = angle;
if (((0 < speed) && (accel < 0)) || ((speed < maxSpeed) && (0 < accel))) {
speed = speed + accel;
}
if (((((_x < 20) && (_rotation < 0)) || ((630 < _x) && (0 < _rotation))) || ((_y < 20) && ((_rotation < 90) && (-90 < _rotation)))) || ((340 < _y) && ((_rotation < -90) || (90 < _rotation)))) {
} else {
_x = (_x + (Math.sin(angle * (Math.PI/180)) * speed));
_y = (_y - (Math.cos(angle * (Math.PI/180)) * speed));
}
_root.lights._rotation = this._rotation;
if (_root.lights._alpha < 20) {
_root.lights._x = -1000;
} else {
_root.lights._x = this._x;
_root.lights._y = this._y;
}
}
onClipEvent (keyDown) {
pressed = Key.getCode();
if (pressed == 37) {
turn = -turnRate;
} else if (pressed == 39) {
turn = turnRate;
} else if (pressed == 38) {
accel = accelRate;
} else if (pressed == 40) {
accel = -accelRate;
}
updateAfterEvent();
}
onClipEvent (keyUp) {
pressed = Key.getCode();
if ((pressed == 37) || (pressed == 39)) {
turn = 0;
} else if ((pressed == 38) || (pressed == 40)) {
accel = -accelRate;
}
updateAfterEvent();
}
Instance of Symbol 22 MovieClip "truck2" in Frame 6
onClipEvent (load) {
angle = 0;
speed = 0;
maxSpeed = 0;
turnRate = 0;
accelRate = 0.25;
}
onClipEvent (enterFrame) {
if (_root.singleP == 1) {
_x = -2000;
_root.p2cf = 1;
} else {
if ((_xscale == 100) && (_root.startRace == 1)) {
turnRate = _root.turnRate;
} else {
turnRate = 0;
}
angle = angle + turn;
_rotation = angle;
if (((0 < speed) && (accel < 0)) || ((speed < maxSpeed) && (0 < accel))) {
speed = speed + accel;
}
if (((((_x < 20) && (_rotation < 0)) || ((630 < _x) && (0 < _rotation))) || ((_y < 20) && ((_rotation < 90) && (-90 < _rotation)))) || ((340 < _y) && ((_rotation < -90) || (90 < _rotation)))) {
} else {
_x = (_x + (Math.sin(angle * (Math.PI/180)) * speed));
_y = (_y - (Math.cos(angle * (Math.PI/180)) * speed));
}
_root.lights2._rotation = this._rotation;
if (_root.lights2._alpha < 20) {
_root.lights2._x = -1000;
} else {
_root.lights2._x = this._x;
_root.lights2._y = this._y;
}
}
}
onClipEvent (keyDown) {
pressed = Key.getCode();
if (pressed == 65) {
turn = -turnRate;
} else if (pressed == 68) {
turn = turnRate;
} else if (pressed == 87) {
accel = accelRate;
} else if (pressed == 83) {
accel = -accelRate;
}
updateAfterEvent();
}
onClipEvent (keyUp) {
pressed = Key.getCode();
if ((pressed == 65) || (pressed == 68)) {
turn = 0;
} else if ((pressed == 87) || (pressed == 83)) {
accel = -accelRate;
}
updateAfterEvent();
}
Frame 11
hitB1 = 0;
hitB2 = 0;
hitJ1 = 0;
hitJ2 = 0;
hitP1 = 0;
hitP2 = 0;
lapP1 = 0;
lapP2 = 0;
cp1p1 = 0;
cp2p1 = 0;
cp1p2 = 0;
cp2p2 = 0;
p1cf = 0;
p2cf = 0;
truck._x = 52.9;
truck._y = 320;
truck._rotation = 0;
truck.angle = 0;
vs.p1.p1name = p1name;
vs.p1lap = "lap: 0";
if (singleP != 1) {
truck2._x = 91.8;
truck2._y = 320;
truck2._rotation = 0;
truck2.angle = 0;
vs.p2lap = "lap: 0";
vs.p2.p2name = p2name;
} else {
truck._x = 72;
}
Frame 15
stopLight.gotoAndPlay(2);
stop();
Frame 16
hitB1 = 0;
hitB2 = 0;
hitJ1 = 0;
hitJ2 = 0;
hitP1 = 0;
hitP2 = 0;
lapP1 = 0;
lapP2 = 0;
cp1p1 = 0;
cp2p1 = 0;
cp3p1 = 0;
cp1p2 = 0;
cp2p2 = 0;
cp3p2 = 0;
p1cf = 0;
p2cf = 0;
truck._x = 52.9;
truck._y = 320;
truck._rotation = 0;
truck.angle = 0;
vs.p1.p1name = p1name;
vs.p1lap = "lap: 0";
if (singleP != 1) {
truck2._x = 91.8;
truck2._y = 320;
truck2._rotation = 0;
truck2.angle = 0;
vs.p2lap = "lap: 0";
vs.p2.p2name = p2name;
} else {
truck._x = 72;
}
Frame 21
stopLight.gotoAndPlay(2);
stop();
Frame 22
hitB1 = 0;
hitB2 = 0;
hitJ1 = 0;
hitJ2 = 0;
hitP1 = 0;
hitP2 = 0;
lapP1 = 0;
lapP2 = 0;
cp1p1 = 0;
cp2p1 = 0;
cp3p1 = 0;
cp1p2 = 0;
cp2p2 = 0;
cp3p2 = 0;
p1cf = 0;
p2cf = 0;
truck._x = 52.9;
truck._y = 320;
truck._rotation = 0;
truck.angle = 0;
vs.p1.p1name = p1name;
vs.p1lap = "lap: 0";
if (singleP != 1) {
truck2._x = 91.8;
truck2._y = 320;
truck2._rotation = 0;
truck2.angle = 0;
vs.p2lap = "lap: 0";
vs.p2.p2name = p2name;
} else {
truck._x = 72;
}
Frame 27
stopLight.gotoAndPlay(2);
stop();
Symbol 17 MovieClip Frame 2
if (_root.startRace == 1) {
} else {
gotoAndPlay (1);
}
Symbol 35 MovieClip Frame 1
stop();
a = 0;
Symbol 35 MovieClip Frame 25
if (a == 2) {
stop();
delete a;
} else {
gotoAndPlay (2);
}
Symbol 36 MovieClip Frame 1
stop();
a = 0;
Symbol 36 MovieClip Frame 25
if (a == 2) {
stop();
delete a;
} else {
gotoAndPlay (2);
}
Symbol 39 Button
on (keyPress "\") {
if (_root.lightsP1 == 0) {
_root.lights._alpha = 70;
_root.lightsP1 = 1;
} else {
_root.lights._alpha = 0;
_root.lightsP1 = 0;
}
}
on (keyPress "q") {
if (_root.lightsP2 == 0) {
_root.lights2._alpha = 70;
_root.lightsP2 = 1;
} else {
_root.lights2._alpha = 0;
_root.lightsP2 = 0;
}
}
Symbol 47 Button
on (press) {
gotoAndStop (6);
}
Symbol 52 Button
on (release) {
tNum = "track1";
_root.tNum = tNum;
glow._x = -190.1;
}
Symbol 56 Button
on (release) {
tNum = "track2";
_root.tNum = tNum;
glow._x = -49;
}
Symbol 59 Button
on (release) {
tNum = "track3";
_root.tNum = tNum;
glow._x = 97;
}
Symbol 70 Button
on (press) {
if (maxLaps == 20) {
} else {
maxLaps++;
_root.maxLaps++;
}
}
Symbol 71 Button
on (press) {
if (maxLaps == 1) {
} else {
maxLaps--;
_root.maxLaps--;
}
}
Symbol 75 Button
on (release) {
if (length(p1name) < 3) {
eName.gotoAndPlay("name1");
} else if ((length(p2name) < 3) && (_root.singleP != 1)) {
eName.gotoAndPlay("name2");
} else {
if (_root.singleP == 1) {
_root.p2name = "";
} else {
_root.p2name = p2name;
_root.truck2.lap = tLap2;
}
_root.p1name = p1name;
_root.truck.lap = tLap1;
_root.gotoAndPlay(_root.tNum);
}
}
Symbol 80 Button
on (press) {
if (tlap1 == 9) {
} else {
tlap1++;
if (tlap1 == tlap2) {
tlap1++;
if (tlap1 >= 10) {
tlap1 = 8;
}
}
_root.tlap1 = tlap1;
}
}
Symbol 81 Button
on (press) {
if (tlap1 == 1) {
} else {
tlap1--;
if (tlap1 == tlap2) {
tlap1--;
if (tlap1 < 1) {
tlap1 = 2;
}
}
_root.tlap1 = tlap1;
}
}
Symbol 83 Button
on (press) {
if (tlap2 == 9) {
} else {
tlap2++;
if (tlap2 == tlap1) {
tlap2++;
if (tlap2 >= 10) {
tlap2 = 8;
}
}
_root.tlap2 = tlap2;
}
}
Symbol 84 Button
on (press) {
if (tlap2 == 1) {
} else {
tlap2--;
if (tlap2 == tlap1) {
tlap2--;
if (tlap2 < 1) {
tlap2 = 2;
}
}
_root.tlap2 = tlap2;
}
}
Symbol 93 Button
on (release) {
if (_root.lightsP2 == 0) {
_root.lights2._alpha = 70;
_root.lightsP2 = 1;
l2._alpha = 100;
} else {
_root.lights2._alpha = 0;
_root.lightsP2 = 0;
l2._alpha = 0;
}
}
Symbol 94 Button
on (release) {
if (_root.lightsP1 == 0) {
_root.lights._alpha = 70;
_root.lightsP1 = 1;
l1._alpha = 100;
} else {
_root.lights._alpha = 0;
_root.lightsP1 = 0;
l1._alpha = 0;
}
}
Symbol 96 Button
on (release) {
_root.p1color(_root.mct1);
_root.c1 = 1;
}
Symbol 98 Button
on (release) {
_root.p1color(_root.mct2);
_root.c1 = 2;
}
Symbol 99 Button
on (release) {
_root.p1color(_root.mct3);
_root.c1 = 3;
}
Symbol 100 Button
on (release) {
_root.p1color(_root.mct4);
_root.c1 = 4;
}
Symbol 101 Button
on (release) {
_root.p1color(_root.mct5);
_root.c1 = 5;
}
Symbol 102 Button
on (release) {
_root.p2color(_root.mct6);
_root.c2 = 6;
}
Symbol 103 Button
on (release) {
_root.p2color(_root.mct7);
_root.c2 = 7;
}
Symbol 104 Button
on (release) {
_root.p2color(_root.mct8);
_root.c2 = 8;
}
Symbol 105 Button
on (release) {
_root.p2color(_root.mct9);
_root.c2 = 9;
}
Symbol 106 Button
on (release) {
_root.p2color(_root.mct10);
_root.c2 = 10;
}
Symbol 109 Button
on (release) {
if (_root.singleP == 0) {
_root.singleP = 1;
sP._alpha = 100;
} else {
_root.singleP = 0;
sP._alpha = 0;
}
}
Symbol 128 MovieClip Frame 1
stop();
Symbol 128 MovieClip Frame 35
gotoAndStop (1);
Symbol 132 Button
on (press) {
gotoAndStop (1);
}
Symbol 136 Button
on (release) {
clearEm();
tm = 1;
gotoAndStop (8);
}
Symbol 138 Button
on (release) {
clearEm();
tm = 2;
gotoAndStop (9);
}
Symbol 140 Button
on (release) {
clearEm();
tm = 3;
gotoAndStop (10);
}
Symbol 143 Button
on (release) {
getURL ("http://www.vfov.com", "_blank");
}
Symbol 150 MovieClip Frame 15
if ((_parent.name0 == "retrieving") && (_parent.done == 1)) {
_parent.name0 = "Nobody!";
_parent.time0 = "0:00:000";
}
Symbol 157 Button
on (release) {
lc = 1;
getScores();
}
Symbol 158 Button
on (release) {
lc = 2;
getScores();
}
Symbol 159 Button
on (release) {
lc = 3;
getScores();
}
Symbol 160 Button
on (release) {
lc = 4;
getScores();
}
Symbol 161 Button
on (release) {
lc = 5;
getScores();
}
Symbol 162 Button
on (release) {
lc = 6;
getScores();
}
Symbol 163 Button
on (release) {
lc = 7;
getScores();
}
Symbol 164 Button
on (release) {
lc = 8;
getScores();
}
Symbol 165 Button
on (release) {
lc = 9;
getScores();
}
Symbol 166 Button
on (release) {
lc = 13;
getScores();
}
Symbol 167 Button
on (release) {
lc = 14;
getScores();
}
Symbol 168 Button
on (release) {
lc = 15;
getScores();
}
Symbol 169 Button
on (release) {
lc = 16;
getScores();
}
Symbol 170 Button
on (release) {
lc = 17;
getScores();
}
Symbol 171 Button
on (release) {
lc = 18;
getScores();
}
Symbol 172 Button
on (release) {
lc = 19;
getScores();
}
Symbol 173 Button
on (release) {
lc = 12;
getScores();
}
Symbol 174 Button
on (release) {
lc = 11;
getScores();
}
Symbol 175 Button
on (release) {
lc = 10;
getScores();
}
Symbol 176 Button
on (release) {
lc = 20;
getScores();
}
Symbol 198 MovieClip Frame 1
stop();
maxLaps = _root.maxLaps;
tlap1 = _root.tlap1;
tlap2 = _root.tlap2;
if (_root.c1 == 1) {
_root.p1color(_root.mct1);
}
if (_root.c1 == 2) {
_root.p1color(_root.mct2);
}
if (_root.c1 == 3) {
_root.p1color(_root.mct3);
}
if (_root.c1 == 4) {
_root.p1color(_root.mct4);
}
if (_root.c1 == 5) {
_root.p1color(_root.mct5);
}
if (_root.c2 == 6) {
_root.p2color(_root.mct6);
}
if (_root.c2 == 7) {
_root.p2color(_root.mct7);
}
if (_root.c2 == 8) {
_root.p2color(_root.mct8);
}
if (_root.c2 == 9) {
_root.p2color(_root.mct9);
}
if (_root.c2 == 10) {
_root.p2color(_root.mct10);
}
if (_root.tNum == "track2") {
glow._x = -49;
} else if (_root.tNum == "track3") {
glow._x = 97;
} else {
tNum = "track1";
glow._x = -190.1;
}
if (_root.singleP == 1) {
sP._alpha = 100;
} else {
sP._alpha = 0;
}
if (_root.lightsP1 == 1) {
l1._alpha = 100;
} else {
l1._alpha = 0;
}
if (_root.lightsP2 == 1) {
l2._alpha = 100;
} else {
l2._alpha = 0;
}
if (_root.p1name != "player 1") {
p1name = _root.p1name;
}
if (_root.p2name != "player 2") {
p2name = _root.p2name;
}
if (!length(p1name)) {
Selection.setFocus("p1name");
} else if ((!length(p2name)) && (_root.singleP != 1)) {
Selection.setFocus("p2name");
}
if (_root.lightsP1 == 1) {
_root.lights._alpha = 70;
}
if (_root.lightsP2 == 1) {
_root.lights2._alpha = 70;
}
Symbol 198 MovieClip Frame 6
function clearEm() {
done = 0;
name0 = "";
name1 = "";
name2 = "";
time0 = "";
time1 = "";
time2 = "";
}
function goTitle() {
if (tm == 1) {
track = "Track 1";
}
if (tm == 2) {
track = "Track 2";
}
if (tm == 3) {
track = "Track 3";
}
}
function getScores() {
done = 0;
name0 = "retrieving";
name1 = "";
name2 = "";
time0 = "scores...";
time1 = "";
time2 = "";
a = "&blah=" + ((getTimer() + Math.random(10000000)) + 1);
if (tm == 1) {
this.loadVariables(("http://www.vfov.com/race/getdb1.php?id=" add lc) + a, "GET");
track = ("Track 1 Laps: " + lc) + " Top 3";
} else if (tm == 2) {
this.loadVariables(("http://www.vfov.com/race/getdb2.php?id=" add lc) + a, "GET");
track = ("Track 2 Laps: " + lc) + " Top 3";
} else if (tm == 3) {
this.loadVariables(("http://www.vfov.com/race/getdb3.php?id=" add lc) + a, "GET");
track = ("Track 3 Laps: " + lc) + " Top 3";
}
}
clearEm();
Instance of Symbol 152 MovieClip in Symbol 198 MovieClip Frame 6
onClipEvent (load) {
gotoAndPlay (10);
}
Instance of Symbol 153 MovieClip in Symbol 198 MovieClip Frame 6
onClipEvent (load) {
gotoAndPlay (5);
}
Symbol 198 MovieClip Frame 8
goTitle();
Symbol 198 MovieClip Frame 9
goTitle();
Symbol 198 MovieClip Frame 10
goTitle();
Symbol 222 MovieClip Frame 1
stop();
Symbol 222 MovieClip Frame 17
name0 = "retrieving";
time0 = "times...";
name1 = "";
time1 = "";
name2 = "";
time2 = "";
a = "&blah=" + ((getTimer() + Math.random(10000000)) + 1);
if (_root.tNum == "track1") {
this.loadVariables(("http://www.vfov.com/race/getdb1.php?id=" add _root.maxLaps) + a, "GET");
track = ("Track 1 Laps: " + _root.maxLaps) + " Top 3";
} else if (_root.tNum == "track2") {
this.loadVariables(("http://www.vfov.com/race/getdb2.php?id=" add _root.maxLaps) + a, "GET");
track = ("Track 2 Laps: " + _root.maxLaps) + " Top 3";
} else if (_root.tNum == "track3") {
this.loadVariables(("http://www.vfov.com/race/getdb3.php?id=" add _root.maxLaps) + a, "GET");
track = ("Track 3 Laps: " + _root.maxLaps) + " Top 3";
}
Symbol 222 MovieClip Frame 19
if (done == 1) {
delete done;
} else {
gotoAndPlay (18);
}
Symbol 222 MovieClip Frame 25
stop();
if (name0 == "retrieving") {
name0 = "Nobody!";
time0 = "0:00:000";
}
Symbol 222 MovieClip Frame 26
laps = _root.maxLaps;
p1name = _root.p1name;
p1time = _root.p1time;
p1total = _root.p1total;
p2name = _root.p2name;
p2time = _root.p2time;
p2total = _root.p2total;
endData = (((((((((((((((("laps=" + laps) + "&p1name=") + p1name) + "&p1time=") + p1time) + "&p1total=") + p1total) + "&p2name=") + p2name) + "&p2time=") + p2time) + "&p2total=") + p2total) + "&singleP=") + _root.singleP) + "&blah=") + ((getTimer() + Math.random(10000000)) + 1);
Symbol 222 MovieClip Frame 37
if (_root.saved == 1) {
status = "already saved";
gotoAndPlay (41);
} else {
if (_root.singleP == 1) {
status = "saving time...";
} else {
status = "saving times...";
}
if (_root.tNum == "track1") {
this.loadVariables("http://www.vfov.com/race/putdb1.php?" add endData, "GET");
} else if (_root.tNum == "track2") {
this.loadVariables("http://www.vfov.com/race/putdb2.php?" add endData, "GET");
} else if (_root.tNum == "track3") {
this.loadVariables("http://www.vfov.com/race/putdb3.php?" add endData, "GET");
}
}
Symbol 222 MovieClip Frame 40
if (done == 1) {
delete done;
if (_root.singleP == 1) {
status = "time saved";
} else {
status = "times saved";
}
_root.saved = 1;
} else {
gotoAndPlay (39);
}
Symbol 225 MovieClip Frame 1
if (this.hitTest(_root.truck) && (_root.truck._xscale == 100)) {
if (2 < _root.truck.speed) {
_root.truck.speed = _root.truck.speed - 1;
}
}
if (this.hitTest(_root.truck2) && (_root.truck2._xscale == 100)) {
if (2 < _root.truck2.speed) {
_root.truck2.speed = _root.truck2.speed - 1;
}
}
Symbol 229 MovieClip Frame 1
function jumpDown(sm) {
_root.lights._xscale = _root.lights._xscale - sm;
_root.lights._yscale = _root.lights._yscale - sm;
_root.truck._xscale = _root.truck._xscale - sm;
_root.truck._yscale = _root.truck._yscale - sm;
_root.truck._alpha = _root.truck._alpha - 10;
_root.lights._alpha = _root.lights._alpha - 10;
if (_root.truck._x < 335) {
_root.truck._alpha = _root.truck._alpha - 20;
_root.lights._alpha = _root.lights._alpha - 20;
}
}
stop();
Symbol 229 MovieClip Frame 4
jumpDown(10);
Symbol 229 MovieClip Frame 5
jumpDown(10);
Symbol 229 MovieClip Frame 6
jumpDown(10);
Symbol 229 MovieClip Frame 7
jumpDown(10);
Symbol 229 MovieClip Frame 8
jumpDown(10);
Symbol 229 MovieClip Frame 9
jumpDown(10);
Symbol 229 MovieClip Frame 10
jumpDown(10);
Symbol 229 MovieClip Frame 11
jumpDown(10);
Symbol 229 MovieClip Frame 12
_root.truck._alpha = 0;
_root.lights._alpha = 0;
Symbol 229 MovieClip Frame 39
_root.truck._alpha = 100;
if (_root.lightsP1 == 1) {
_root.lights._alpha = 70;
}
_root.hitP1 = 0;
_root.truck._x = 280;
if (330 < _root.truck._y) {
_root.truck._y = 330;
}
if (_root.truck._y < 270) {
_root.truck._y = 270;
}
_root.truck._xscale = 100;
_root.truck._yscale = 100;
_root.truck._rotation = -90;
_root.truck.angle = -90;
_root.lights._x = -1000;
_root.lights._xscale = 100;
_root.lights._yscale = 100;
_root.truck.speed = 0;
if (_root.startRace == 0) {
_root.truck._x = 52.9;
_root.truck._y = 320;
_root.truck._rotation = 0;
_root.truck.angle = 0;
_root.truck2._x = 91.8;
_root.truck2._y = 320;
_root.truck2._rotation = 0;
_root.truck2.angle = 0;
}
Symbol 230 MovieClip Frame 1
function jumpDown(sm) {
_root.lights2._xscale = _root.lights2._xscale - sm;
_root.lights2._yscale = _root.lights2._yscale - sm;
_root.truck2._xscale = _root.truck2._xscale - sm;
_root.truck2._yscale = _root.truck2._yscale - sm;
_root.truck2._alpha = _root.truck2._alpha - 10;
_root.lights2._alpha = _root.lights2._alpha - 10;
if (_root.truck2._x < 335) {
_root.truck2._alpha = _root.truck2._alpha - 20;
_root.lights2._alpha = _root.lights2._alpha - 20;
}
}
stop();
Symbol 230 MovieClip Frame 4
jumpDown(10);
Symbol 230 MovieClip Frame 5
jumpDown(10);
Symbol 230 MovieClip Frame 6
jumpDown(10);
Symbol 230 MovieClip Frame 7
jumpDown(10);
Symbol 230 MovieClip Frame 8
jumpDown(10);
Symbol 230 MovieClip Frame 9
jumpDown(10);
Symbol 230 MovieClip Frame 10
jumpDown(10);
Symbol 230 MovieClip Frame 11
jumpDown(10);
Symbol 230 MovieClip Frame 12
_root.truck2._alpha = 0;
_root.lights2._alpha = 0;
Symbol 230 MovieClip Frame 39
_root.truck2._alpha = 100;
if (_root.lightsP2 == 1) {
_root.lights2._alpha = 70;
}
_root.hitP2 = 0;
_root.truck2._x = 280;
if (330 < _root.truck2._y) {
_root.truck2._y = 330;
}
if (_root.truck2._y < 270) {
_root.truck2._y = 270;
}
_root.truck2._xscale = 100;
_root.truck2._yscale = 100;
_root.truck2._rotation = -90;
_root.truck2.angle = -90;
_root.lights2._x = -1000;
_root.lights2._xscale = 100;
_root.lights2._yscale = 100;
_root.truck2.speed = 0;
if (_root.startRace == 0) {
_root.truck._x = 52.9;
_root.truck._y = 320;
_root.truck._rotation = 0;
_root.truck.angle = 0;
_root.truck2._x = 91.8;
_root.truck2._y = 320;
_root.truck2._rotation = 0;
_root.truck2.angle = 0;
}
Symbol 232 MovieClip Frame 1
if (this.hitTest(_root.truck)) {
if (3 < _root.truck.speed) {
_root.truck.speed = _root.truck.speed - 1;
}
}
if (this.hitTest(_root.truck2)) {
if (3 < _root.truck2.speed) {
_root.truck2.speed = _root.truck2.speed - 1;
}
}
Symbol 233 MovieClip Frame 1
if (this.hitTest(_root.truck)) {
if (3 < _root.truck.speed) {
_root.truck.speed = _root.truck.speed - 1;
}
}
if (this.hitTest(_root.truck2)) {
if (3 < _root.truck2.speed) {
_root.truck2.speed = _root.truck2.speed - 1;
}
}
Symbol 234 MovieClip Frame 1
if (this.hitTest(_root.truck) && (_root.truck._xscale == 100)) {
if (1 < _root.truck.speed) {
_root.truck.speed = _root.truck.speed - 1;
}
}
if (this.hitTest(_root.truck2) && (_root.truck2._xscale == 100)) {
if (1 < _root.truck2.speed) {
_root.truck2.speed = _root.truck2.speed - 1;
}
}
Symbol 235 MovieClip Frame 1
if (this.hitTest(_root.truck) && (_root.truck._xscale == 100)) {
if (1 < _root.truck.speed) {
_root.truck.speed = _root.truck.speed - 1;
}
}
if (this.hitTest(_root.truck2) && (_root.truck2._xscale == 100)) {
if (1 < _root.truck2.speed) {
_root.truck2.speed = _root.truck2.speed - 1;
}
}
Symbol 237 MovieClip Frame 1
if (this.hitTest(_root.truck)) {
if (3 < _root.truck.speed) {
_root.truck.speed = _root.truck.speed - 1;
}
}
if (this.hitTest(_root.truck2)) {
if (3 < _root.truck2.speed) {
_root.truck2.speed = _root.truck2.speed - 1;
}
}
Symbol 238 MovieClip Frame 1
if (this.hitTest(_root.truck)) {
if (3 < _root.truck.speed) {
_root.truck.speed = _root.truck.speed - 1;
}
}
if (this.hitTest(_root.truck2)) {
if (3 < _root.truck2.speed) {
_root.truck2.speed = _root.truck2.speed - 1;
}
}
Symbol 242 MovieClip Frame 1
stop();
Symbol 243 MovieClip Frame 1
stop();
Symbol 243 MovieClip Frame 2
_root.truck.speed = _root.truck.speed + 2;
Symbol 243 MovieClip Frame 50
_root.hitB1 = 0;
Symbol 244 MovieClip Frame 1
stop();
Symbol 244 MovieClip Frame 2
_root.truck2.speed = _root.truck2.speed + 2;
Symbol 244 MovieClip Frame 50
_root.hitB2 = 0;
Symbol 247 MovieClip Frame 1
function jumpUp(big) {
_root.lights._xscale = big;
_root.lights._yscale = big;
_root.truck._xscale = big;
_root.truck._yscale = big;
}
function jumpDown(sm) {
_root.lights._xscale = sm;
_root.lights._yscale = sm;
_root.truck._xscale = sm;
_root.truck._yscale = sm;
}
stop();
Symbol 247 MovieClip Frame 2
jumpUp(100.1);
Symbol 247 MovieClip Frame 5
jumpUp(105);
Symbol 247 MovieClip Frame 6
jumpUp(110);
Symbol 247 MovieClip Frame 7
jumpUp(115);
Symbol 247 MovieClip Frame 8
jumpUp(120);
Symbol 247 MovieClip Frame 9
jumpUp(125);
Symbol 247 MovieClip Frame 10
jumpUp(130);
Symbol 247 MovieClip Frame 11
jumpUp(135);
Symbol 247 MovieClip Frame 12
jumpUp(140);
Symbol 247 MovieClip Frame 13
jumpUp(143);
Symbol 247 MovieClip Frame 14
jumpUp(145);
Symbol 247 MovieClip Frame 18
jumpDown(143);
Symbol 247 MovieClip Frame 19
jumpDown(140);
Symbol 247 MovieClip Frame 20
jumpDown(135);
Symbol 247 MovieClip Frame 21
jumpDown(130);
Symbol 247 MovieClip Frame 22
jumpDown(125);
Symbol 247 MovieClip Frame 23
jumpDown(120);
Symbol 247 MovieClip Frame 24
jumpDown(115);
Symbol 247 MovieClip Frame 25
jumpDown(110);
Symbol 247 MovieClip Frame 26
jumpDown(105);
Symbol 247 MovieClip Frame 27
jumpDown(100);
Symbol 247 MovieClip Frame 29
_root.truck.turnRate = _root.turnRate;
Symbol 247 MovieClip Frame 115
_root.hitJ1 = 0;
Symbol 248 MovieClip Frame 1
function jumpUp(big) {
_root.lights2._xscale = big;
_root.lights2._yscale = big;
_root.truck2._xscale = big;
_root.truck2._yscale = big;
}
function jumpDown(sm) {
_root.lights2._xscale = sm;
_root.lights2._yscale = sm;
_root.truck2._xscale = sm;
_root.truck2._yscale = sm;
}
stop();
Symbol 248 MovieClip Frame 2
jumpUp(100.1);
Symbol 248 MovieClip Frame 5
jumpUp(105);
Symbol 248 MovieClip Frame 6
jumpUp(110);
Symbol 248 MovieClip Frame 7
jumpUp(115);
Symbol 248 MovieClip Frame 8
jumpUp(120);
Symbol 248 MovieClip Frame 9
jumpUp(125);
Symbol 248 MovieClip Frame 10
jumpUp(130);
Symbol 248 MovieClip Frame 11
jumpUp(135);
Symbol 248 MovieClip Frame 12
jumpUp(140);
Symbol 248 MovieClip Frame 13
jumpUp(143);
Symbol 248 MovieClip Frame 14
jumpUp(145);
Symbol 248 MovieClip Frame 18
jumpDown(143);
Symbol 248 MovieClip Frame 19
jumpDown(140);
Symbol 248 MovieClip Frame 20
jumpDown(135);
Symbol 248 MovieClip Frame 21
jumpDown(130);
Symbol 248 MovieClip Frame 22
jumpDown(125);
Symbol 248 MovieClip Frame 23
jumpDown(120);
Symbol 248 MovieClip Frame 24
jumpDown(115);
Symbol 248 MovieClip Frame 25
jumpDown(110);
Symbol 248 MovieClip Frame 26
jumpDown(105);
Symbol 248 MovieClip Frame 27
jumpDown(100);
Symbol 248 MovieClip Frame 29
_root.truck2.turnRate = _root.turnRate;
Symbol 248 MovieClip Frame 115
_root.hitJ2 = 0;
Symbol 252 MovieClip Frame 1
if (this.hitTest(_root.truck2)) {
if (_root.lapP2 == 0) {
_root.lapP2 = 1;
_root.cp1p2 = 1;
_root.vs.p2lap = "lap: 1";
_root.truck2.lap = _root.lapP2;
}
}
if (this.hitTest(_root.truck)) {
if (_root.lapP1 == 0) {
_root.lapP1 = 1;
_root.cp1p1 = 1;
_root.vs.p1lap = "lap: 1";
_root.truck.lap = _root.lapP1;
}
}
Instance of Symbol 228 MovieClip "oil" in Symbol 258 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((this.hitTest(_root.truck) && (_root.hitP1 != 1)) && (_root.truck._xscale == 100)) {
_root.hitP1 = 1;
_root.track.pit1.gotoAndPlay(2);
}
if ((this.hitTest(_root.truck2) && (_root.hitP2 != 1)) && (_root.truck2._xscale == 100)) {
_root.hitP2 = 1;
_root.track.pit2.gotoAndPlay(2);
}
}
Instance of Symbol 242 MovieClip "booster" in Symbol 258 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((this.hitTest(_root.truck) && (_root.hitB1 != 1)) && (_root.startRace == 1)) {
_root.hitB1 = 1;
_root.track.boost1.gotoAndPlay(2);
gotoAndPlay (2);
}
if ((this.hitTest(_root.truck2) && (_root.hitB2 != 1)) && (_root.startRace == 1)) {
_root.hitB2 = 1;
_root.track.boost2.gotoAndPlay(2);
gotoAndPlay (2);
}
}
Instance of Symbol 246 MovieClip in Symbol 258 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((((this.hitTest(_root.truck) && (_root.hitJ1 != 1)) && (_root.truck._xscale == 100)) && (_root.startRace == 1)) && (4 < _root.truck.speed)) {
_root.truck.turnRate = 0;
_root.hitJ1 = 1;
_parent.jp1.gotoAndPlay(2);
}
if ((((this.hitTest(_root.truck2) && (_root.hitJ2 != 1)) && (_root.truck2._xscale == 100)) && (_root.startRace == 1)) && (4 < _root.truck2.speed)) {
_root.truck2.turnRate = 0;
_root.hitJ2 = 1;
_parent.jp2.gotoAndPlay(2);
}
}
Instance of Symbol 250 MovieClip "line1" in Symbol 258 MovieClip Frame 1
onClipEvent (load) {
function flagGreen(name) {
myColorTransform = {ra:"0", rb:"0", ga:"0", gb:"120", ba:"0", bb:"0", aa:"70", ab:"0"};
name.setTransform(myColorTransform);
}
function flagWhite(name) {
myColorTransform = {ra:"0", rb:"255", ga:"0", gb:"255", ba:"0", bb:"255", aa:"70", ab:"0"};
name.setTransform(myColorTransform);
}
function flagCheck(name) {
myColorTransform = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"70", ab:"0"};
name.setTransform(myColorTransform);
}
function raceOver() {
_root.truck.maxSpeed = 0;
_root.truck2.maxSpeed = 0;
_root.truck.speed = 0;
_root.truck2.speed = 0;
_root.startRace = 0;
}
myColor = new Color(_root.vs.flag1);
myColor2 = new Color(_root.vs.flag2);
myColorTransform = new Object();
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.truck)) {
if (_root.lapP1 == 0) {
_root.lapP1 = 1;
_root.cp1p1 = 1;
_root.vs.p1lap = "lap: 1";
} else if ((_root.cp3p1 == 1) && (_root.p1cf == 0)) {
_root.lapP1++;
_root.cp1p1 = 0;
_root.cp2p1 = 0;
_root.cp3p1 = 0;
_root.vs.p1lap = "lap: " + _root.lapP1;
} else {
_root.cp1p1 = 1;
}
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.truck2)) {
if (_root.lapP2 == 0) {
_root.lapP2 = 1;
_root.cp1p2 = 1;
_root.vs.p2lap = "lap: 1";
} else if ((_root.cp3p2 == 1) && (_root.p2cf == 0)) {
_root.lapP2++;
_root.cp1p2 = 0;
_root.cp2p2 = 0;
_root.cp3p2 = 0;
_root.vs.p2lap = "lap: " + _root.lapP2;
} else {
_root.cp1p2 = 1;
}
}
if (_root.lapP1 == _root.maxLaps) {
_root.vs.p1lap = "last lap";
flagWhite(myColor);
_root.vs.flag1._x = -105;
_root.vs.flag1.play();
}
if (_root.lapP2 == _root.maxLaps) {
_root.vs.p2lap = "last lap";
flagWhite(myColor2);
_root.vs.flag2._x = 105;
_root.vs.flag2.play();
}
if (_root.maxLaps < _root.lapP1) {
flagCheck(myColor);
_root.vs.flag1.gotoAndStop(1);
if (_root.p2cf == 1) {
raceOver();
_root.winText.gotoAndPlay("p1lose");
} else if (_root.p1cf == 0) {
_root.p1cf = 1;
_root.vs.p1lap = "winner!";
_root.winText.gotoAndPlay("p1win");
}
}
if (_root.maxLaps < _root.lapP2) {
flagCheck(myColor2);
_root.vs.flag2.gotoAndStop(1);
if (_root.p1cf == 1) {
raceOver();
_root.winText.gotoAndPlay("p2lose");
} else if (_root.p2cf == 0) {
_root.p2cf = 1;
_root.vs.p2lap = "winner!";
_root.winText.gotoAndPlay("p2win");
}
}
}
Instance of Symbol 253 MovieClip "line2" in Symbol 258 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.truck)) {
if (_root.cp1p1 == 1) {
_root.cp2p1 = 1;
}
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.truck2)) {
if (_root.cp1p2 == 1) {
_root.cp2p2 = 1;
}
}
}
Instance of Symbol 254 MovieClip "line3" in Symbol 258 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.truck)) {
if (_root.cp2p1 == 1) {
_root.cp3p1 = 1;
}
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.truck2)) {
if (_root.cp2p2 == 1) {
_root.cp3p2 = 1;
}
}
}
Symbol 273 MovieClip Frame 1
stop();
Symbol 273 MovieClip Frame 2
_root.vs.flag1._x = -1000;
_root.vs.flag2._x = -1000;
_root.truck.maxSpeed = 0;
_root.truck2.maxSpeed = 0;
if (_root.singleP == 1) {
_root.vs.p2lap = "";
}
Symbol 273 MovieClip Frame 29
if (a < 6) {
gotoAndPlay (22);
a = Number(a) + 1;
} else {
delete a;
}
Symbol 273 MovieClip Frame 36
if (a < 6) {
gotoAndPlay (30);
a = Number(a) + 1;
} else {
delete a;
}
Symbol 273 MovieClip Frame 37
function flagGreen(name) {
myColorTransform = {ra:"0", rb:"0", ga:"0", gb:"120", ba:"0", bb:"0", aa:"70", ab:"0"};
name.setTransform(myColorTransform);
}
_root.truck.maxSpeed = _root.maxSpeed;
_root.truck.turnRate = 6;
_root.startRace = 1;
_root.vs.flag1._x = -105;
if (_root.singleP != 1) {
_root.truck2.maxSpeed = _root.maxSpeed;
_root.truck2.turnRate = 6;
_root.vs.flag2._x = 105;
}
myColor = new Color(_root.vs.flag1);
myColor2 = new Color(_root.vs.flag2);
flagGreen(myColor);
flagGreen(myColor2);
Symbol 273 MovieClip Frame 73
_root.vs.flag1._x = -1000;
_root.vs.flag2._x = -1000;
Symbol 284 MovieClip Frame 1
if (_parent.waiting == 1) {
gotoAndPlay (27);
} else {
gotoAndPlay (1);
}
Symbol 284 MovieClip Frame 7
if (_parent.waiting == 1) {
gotoAndPlay (27);
}
Symbol 284 MovieClip Frame 17
if (_parent.waiting == 1) {
gotoAndPlay (27);
}
Symbol 288 MovieClip Frame 1
if (this.hitTest(_root.truck)) {
_root.truck.speed = _root.truck.speed - 2;
if (_root.truck.speed < 0) {
_root.truck.speed = 0;
}
_root.truck.angle = _root.truck.angle - (random(100) - 50);
}
if (this.hitTest(_root.truck2)) {
_root.truck2.speed = _root.truck2.speed - 2;
if (_root.truck2.speed < 0) {
_root.truck2.speed = 0;
}
_root.truck2.angle = _root.truck2.angle - (random(100) - 50);
}
Symbol 289 MovieClip Frame 1
gotoAndPlay (611);
Symbol 289 MovieClip Frame 99
gotoAndPlay (611);
Symbol 289 MovieClip Frame 199
gotoAndPlay (611);
Symbol 289 MovieClip Frame 319
gotoAndPlay (611);
Symbol 289 MovieClip Frame 375
waiting = 1;
Symbol 289 MovieClip Frame 450
delete waiting;
Symbol 289 MovieClip Frame 794
aF = new Array("num1", "num2", "num3", "num4", "num4", "num4", "end");
gotoAndPlay(aF[random(7)]);
Symbol 295 MovieClip Frame 1
if ((this.hitTest(_root.truck) || (this.hitTest(_root.truck2))) || (this.hitTest(_root.barrier))) {
gotoAndPlay (13);
}
Symbol 295 MovieClip Frame 3
if ((this.hitTest(_root.truck) || (this.hitTest(_root.truck2))) || (this.hitTest(_root.barrier))) {
gotoAndPlay (13);
}
Symbol 295 MovieClip Frame 5
if ((this.hitTest(_root.truck) || (this.hitTest(_root.truck2))) || (this.hitTest(_root.barrier))) {
gotoAndPlay (13);
}
Symbol 295 MovieClip Frame 7
if ((this.hitTest(_root.truck) || (this.hitTest(_root.truck2))) || (this.hitTest(_root.barrier))) {
gotoAndPlay (13);
}
Symbol 295 MovieClip Frame 9
if ((this.hitTest(_root.truck) || (this.hitTest(_root.truck2))) || (this.hitTest(_root.barrier))) {
gotoAndPlay (13);
}
Symbol 295 MovieClip Frame 11
if ((this.hitTest(_root.truck) || (this.hitTest(_root.truck2))) || (this.hitTest(_root.barrier))) {
gotoAndPlay (13);
}
Symbol 295 MovieClip Frame 12
gotoAndPlay (1);
Symbol 295 MovieClip Frame 23
stop();
Symbol 297 MovieClip Frame 1
if (this.hitTest(_root.truck) && (_root.truck._xscale == 100)) {
_root.truck.speed = _root.truck.speed - 0.5;
if (_root.truck.speed < 0) {
_root.truck.speed = 0;
}
if (_root.truck._x < (_x - 5)) {
if (_x < 620) {
this._x = this._x + 5;
}
this._rotation = random(30) - 15;
}
if ((_x + 5) < _root.truck._x) {
if (30 < _x) {
this._x = this._x - 5;
}
this._rotation = random(30) - 15;
}
if (_root.truck._y < (_y - 5)) {
if (_y < 357) {
this._y = this._y + 5;
}
this._rotation = random(30) - 15;
}
if ((_y + 5) < _root.truck._y) {
if (35 < _y) {
this._y = this._y - 5;
}
this._rotation = random(30) - 15;
}
}
if (this.hitTest(_root.truck2) && (_root.truck2._xscale == 100)) {
_root.truck2.speed = _root.truck2.speed - 0.5;
if (_root.truck2.speed < 0) {
_root.truck2.speed = 0;
}
if (_root.truck2._x < (_x - 5)) {
if (_x < 620) {
this._x = this._x + 5;
}
this._rotation = random(30) - 15;
}
if ((_x + 5) < _root.truck2._x) {
if (30 < _x) {
this._x = this._x - 5;
}
this._rotation = random(30) - 15;
}
if (_root.truck2._y < (_y - 5)) {
if (_y < 357) {
this._y = this._y + 5;
}
this._rotation = random(30) - 15;
}
if ((_y + 5) < _root.truck2._y) {
if (35 < _y) {
this._y = this._y - 5;
}
this._rotation = random(30) - 15;
}
}
Symbol 298 MovieClip Frame 1
if (this.hitTest(_root.truck) && (_root.truck._xscale == 100)) {
_root.truck.speed = _root.truck.speed - 0.5;
if (_root.truck.speed < 0) {
_root.truck.speed = 0;
}
if (_root.truck._x < (_x - 5)) {
if (_x < 620) {
this._x = this._x + 5;
}
this._rotation = random(30) - 15;
}
if ((_x + 5) < _root.truck._x) {
if (30 < _x) {
this._x = this._x - 5;
}
this._rotation = random(30) - 15;
}
if (_root.truck._y < (_y - 5)) {
if (_y < 357) {
this._y = this._y + 5;
}
this._rotation = random(30) - 15;
}
if ((_y + 5) < _root.truck._y) {
if (35 < _y) {
this._y = this._y - 5;
}
this._rotation = random(30) - 15;
}
}
if (this.hitTest(_root.truck2) && (_root.truck2._xscale == 100)) {
_root.truck2.speed = _root.truck2.speed - 0.5;
if (_root.truck2.speed < 0) {
_root.truck2.speed = 0;
}
if (_root.truck2._x < (_x - 5)) {
if (_x < 620) {
this._x = this._x + 5;
}
this._rotation = random(30) - 15;
}
if ((_x + 5) < _root.truck2._x) {
if (30 < _x) {
this._x = this._x - 5;
}
this._rotation = random(30) - 15;
}
if (_root.truck2._y < (_y - 5)) {
if (_y < 357) {
this._y = this._y + 5;
}
this._rotation = random(30) - 15;
}
if ((_y + 5) < _root.truck2._y) {
if (35 < _y) {
this._y = this._y - 5;
}
this._rotation = random(30) - 15;
}
}
Symbol 300 MovieClip Frame 1
if (this.hitTest(_root.truck) && (_root.truck._xscale == 100)) {
_root.truck.speed = _root.truck.speed - 2;
if (_root.truck.speed < 0) {
_root.truck.speed = 0;
}
if (_root.truck._x < (_x - 5)) {
if (_x < 620) {
this._x = this._x + 10;
}
this._rotation = random(30) - 15;
}
if ((_x + 5) < _root.truck._x) {
if (30 < _x) {
this._x = this._x - 10;
}
this._rotation = random(30) - 15;
}
if (_root.truck._y < (_y - 10)) {
if (_y < 357) {
this._y = this._y + 2;
}
this._rotation = random(30) - 15;
}
if ((_y + 10) < _root.truck._y) {
if (35 < _y) {
this._y = this._y - 2;
}
this._rotation = random(30) - 15;
}
}
if (this.hitTest(_root.truck2) && (_root.truck2._xscale == 100)) {
_root.truck2.speed = _root.truck2.speed - 2;
if (_root.truck2.speed < 0) {
_root.truck2.speed = 0;
}
if (_root.truck2._x < (_x - 5)) {
if (_x < 620) {
this._x = this._x + 10;
}
this._rotation = random(30) - 15;
}
if ((_x + 5) < _root.truck2._x) {
if (30 < _x) {
this._x = this._x - 10;
}
this._rotation = random(30) - 15;
}
if (_root.truck2._y < (_y - 10)) {
if (_y < 357) {
this._y = this._y + 2;
}
this._rotation = random(30) - 15;
}
if ((_y + 10) < _root.truck2._y) {
if (35 < _y) {
this._y = this._y - 2;
}
this._rotation = random(30) - 15;
}
}
Symbol 306 Button
on (release) {
_root.truck.maxSpeed = 0;
_root.truck2.maxSpeed = 0;
_root.truck.speed = 0;
_root.truck2.speed = 0;
_root.startRace = 0;
_root.lapP1 = 0;
_root.lapP2 = 0;
_root.cp1p1 = 0;
_root.cp2p1 = 0;
_root.cp3p1 = 0;
_root.cp1p2 = 0;
_root.cp2p2 = 0;
_root.cp3p2 = 0;
_root.gotoAndPlay(_root.tNum);
}
Symbol 310 Button
on (release) {
_root.gotoAndPlay("menu");
}
Symbol 311 Button
on (release) {
delete sc;
_root.saved = 0;
_root.scores.gotoAndStop(1);
_root.gotoAndPlay(_root.tNum);
gotoAndStop (1);
}
Symbol 315 Button
on (release) {
delete sc;
_root.scores.gotoAndPlay("saving");
}
Symbol 316 Button
on (release) {
delete sc;
_root.saved = 0;
_root.scores.gotoAndStop(1);
_root.gotoAndPlay("menu");
}
Symbol 320 Button
on (release) {
if (sc != 1) {
_root.scores.gotoAndPlay("best");
sc = 1;
}
}
Symbol 321 MovieClip Frame 1
stop();
Symbol 321 MovieClip Frame 2
winText = _root.p1name + " wins the race!";
_root.p1time = _root.theTimer.timer;
_root.p1total = _root.theTimer.timer5;
timeText = "Time: " + _root.p1time;
_root.vs.p1lap = _root.p1time;
Symbol 321 MovieClip Frame 6
gotoAndStop (1);
Symbol 321 MovieClip Frame 7
_root.p1time = _root.theTimer.timer;
_root.p1total = _root.theTimer.timer5;
_root.vs.p1lap = _root.p1time;
winText = "";
timeText = "";
gotoAndPlay (24);
Symbol 321 MovieClip Frame 12
gotoAndStop (1);
Symbol 321 MovieClip Frame 13
winText = _root.p2name + " wins the race!";
_root.p2time = _root.theTimer.timer;
_root.p2total = _root.theTimer.timer5;
timeText = "Time: " + _root.p2time;
_root.vs.p2lap = _root.p2time;
Symbol 321 MovieClip Frame 18
gotoAndStop (1);
Symbol 321 MovieClip Frame 19
_root.p2time = _root.theTimer.timer;
_root.p2total = _root.theTimer.timer5;
_root.vs.p2lap = _root.p2time;
winText = "";
timeText = "";
gotoAndPlay (24);
Symbol 321 MovieClip Frame 29
stop();
Symbol 324 MovieClip Frame 1
function doMins() {
if (time >= 60) {
i = 1;
while (59 < time) {
time = time - 60;
mins = i;
i++;
}
}
if (length(time) < 2) {
time = "0" + time;
}
if (length(secs) < 3) {
time = "0" + time;
}
}
function cutTimer() {
if (length(time) == 1) {
secs = substring(time, 1, 3);
time = 0;
mins = 0;
} else if (length(time) == 2) {
secs = substring(time, 1, 3);
time = 0;
mins = 0;
} else if (length(time) == 3) {
secs = substring(time, 1, 3);
time = 0;
mins = 0;
} else if (length(time) == 4) {
secs = substring(time, 2, 3);
time = substring(time, 0, 1);
mins = 0;
} else if (length(time) == 5) {
secs = substring(time, 3, 3);
time = substring(time, 0, 2);
} else if (length(time) == 6) {
secs = substring(time, 4, 3);
time = substring(time, 0, 3);
} else if (length(time) == 7) {
secs = substring(time, 5, 3);
time = substring(time, 0, 4);
} else if (length(time) == 8) {
secs = substring(time, 6, 3);
time = substring(time, 0, 5);
}
doMins();
}
time2 = getTimer();
Symbol 324 MovieClip Frame 2
if (((_root.lapP1 >= 1) || (_root.lapP2 >= 1)) && (_root.startRace == 1)) {
time = getTimer() - time2;
timer5 = time / 1000;
cutTimer();
timer = (((mins + ":") + time) + ":") + secs;
} else {
gotoAndPlay (1);
}
Symbol 324 MovieClip Frame 3
time = getTimer() - time2;
timer5 = time / 1000;
cutTimer();
timer = (((mins + ":") + time) + ":") + secs;
gotoAndPlay (2);
Symbol 325 MovieClip Frame 1
_root.winText.winText = "Best Time:";
_root.winText.timeText = "retrieving...";
a = "&blah=" + ((getTimer() + Math.random(10000000)) + 1);
if (_root.tNum == "track1") {
this.loadVariables(("http://www.vfov.com/race/getdb1.php?id=" add _root.maxLaps) + a, "GET");
} else if (_root.tNum == "track2") {
this.loadVariables(("http://www.vfov.com/race/getdb2.php?id=" add _root.maxLaps) + a, "GET");
} else if (_root.tNum == "track3") {
this.loadVariables(("http://www.vfov.com/race/getdb3.php?id=" add _root.maxLaps) + a, "GET");
}
Symbol 325 MovieClip Frame 5
if (done == 1) {
done = 0;
} else {
gotoAndPlay (2);
}
Symbol 325 MovieClip Frame 6
if (!length(time0)) {
} else {
_root.winText.timeText = time0;
}
Symbol 325 MovieClip Frame 12
if (_root.winText.timeText == "retrieving...") {
_root.winText.timeText = "Nobody!";
}
stop();
Symbol 328 MovieClip Frame 1
if (this.hitTest(_root.truck)) {
if (3 < _root.truck.speed) {
_root.truck.speed = _root.truck.speed - 1;
}
}
if (this.hitTest(_root.truck2)) {
if (3 < _root.truck2.speed) {
_root.truck2.speed = _root.truck2.speed - 1;
}
}
Symbol 329 MovieClip Frame 1
if (this.hitTest(_root.truck) && (_root.truck._xscale == 100)) {
if (1 < _root.truck.speed) {
_root.truck.speed = _root.truck.speed - 1;
}
}
if (this.hitTest(_root.truck2) && (_root.truck2._xscale == 100)) {
if (1 < _root.truck2.speed) {
_root.truck2.speed = _root.truck2.speed - 1;
}
}
Symbol 330 MovieClip Frame 1
stop();
Symbol 331 MovieClip Frame 1
stop();
Symbol 331 MovieClip Frame 2
_root.truck.speed = _root.truck.speed + 2;
Symbol 331 MovieClip Frame 50
_root.hitB1 = 0;
Symbol 332 MovieClip Frame 1
function jumpUp(big) {
_root.lights2._xscale = big;
_root.lights2._yscale = big;
_root.truck2._xscale = big;
_root.truck2._yscale = big;
}
function jumpDown(sm) {
_root.lights2._xscale = sm;
_root.lights2._yscale = sm;
_root.truck2._xscale = sm;
_root.truck2._yscale = sm;
}
stop();
Symbol 332 MovieClip Frame 2
jumpUp(100.1);
Symbol 332 MovieClip Frame 5
jumpUp(105);
Symbol 332 MovieClip Frame 6
jumpUp(110);
Symbol 332 MovieClip Frame 7
jumpUp(115);
Symbol 332 MovieClip Frame 8
jumpUp(120);
Symbol 332 MovieClip Frame 9
jumpUp(125);
Symbol 332 MovieClip Frame 10
jumpUp(130);
Symbol 332 MovieClip Frame 11
jumpUp(135);
Symbol 332 MovieClip Frame 12
jumpUp(140);
Symbol 332 MovieClip Frame 13
jumpUp(143);
Symbol 332 MovieClip Frame 14
jumpUp(145);
Symbol 332 MovieClip Frame 18
jumpDown(143);
Symbol 332 MovieClip Frame 19
jumpDown(140);
Symbol 332 MovieClip Frame 20
jumpDown(135);
Symbol 332 MovieClip Frame 21
jumpDown(130);
Symbol 332 MovieClip Frame 22
jumpDown(125);
Symbol 332 MovieClip Frame 23
jumpDown(120);
Symbol 332 MovieClip Frame 24
jumpDown(115);
Symbol 332 MovieClip Frame 25
jumpDown(110);
Symbol 332 MovieClip Frame 26
jumpDown(105);
Symbol 332 MovieClip Frame 27
jumpDown(100);
Symbol 332 MovieClip Frame 29
_root.truck2.turnRate = _root.turnRate;
Symbol 332 MovieClip Frame 115
_root.hitJ2 = 0;
Symbol 335 MovieClip Frame 1
g = 0;
g2 = random(20) + 20;
Symbol 335 MovieClip Frame 20
if (g == g2) {
g = 0;
} else {
g++;
gotoAndPlay (2);
}
Instance of Symbol 334 MovieClip in Symbol 335 MovieClip Frame 21
onClipEvent (enterFrame) {
if (((this.hitTest(_root.truck) && (_root.truck._xscale == 100)) && (_root.startRace == 1)) && (3 < _root.truck.speed)) {
_root.truck.turnRate = 0;
_parent._parent.jp1.gotoAndPlay(2);
}
if (((this.hitTest(_root.truck2) && (_root.truck2._xscale == 100)) && (_root.startRace == 1)) && (3 < _root.truck2.speed)) {
_root.truck2.turnRate = 0;
_parent._parent.jp2.gotoAndPlay(2);
}
}
Instance of Symbol 328 MovieClip in Symbol 337 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.truck) && (_root.truck._xscale == 100)) {
_root.truck.speed = 0;
}
if (this.hitTest(_root.truck2) && (_root.truck2._xscale == 100)) {
_root.truck2.speed = 0;
}
}
Instance of Symbol 330 MovieClip "booster" in Symbol 337 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((this.hitTest(_root.truck) && (_root.hitB1 != 1)) && (_root.startRace == 1)) {
_root.hitB1 = 1;
_parent.boost1.gotoAndPlay(2);
gotoAndPlay (2);
}
if ((this.hitTest(_root.truck2) && (_root.hitB2 != 1)) && (_root.startRace == 1)) {
_root.hitB2 = 1;
_parent.boost2.gotoAndPlay(2);
gotoAndPlay (2);
}
}
Instance of Symbol 246 MovieClip in Symbol 337 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((((this.hitTest(_root.truck) && (_root.hitJ1 != 1)) && (_root.truck._xscale == 100)) && (_root.startRace == 1)) && (4 < _root.truck.speed)) {
_root.truck.turnRate = 0;
_root.hitJ1 = 1;
_parent.jp1.gotoAndPlay(2);
}
if ((((this.hitTest(_root.truck2) && (_root.hitJ2 != 1)) && (_root.truck2._xscale == 100)) && (_root.startRace == 1)) && (4 < _root.truck2.speed)) {
_root.truck2.turnRate = 0;
_root.hitJ2 = 1;
_parent.jp2.gotoAndPlay(2);
}
}
Instance of Symbol 333 MovieClip "line1" in Symbol 337 MovieClip Frame 1
onClipEvent (load) {
function flagGreen(name) {
myColorTransform = {ra:"0", rb:"0", ga:"0", gb:"120", ba:"0", bb:"0", aa:"70", ab:"0"};
name.setTransform(myColorTransform);
}
function flagWhite(name) {
myColorTransform = {ra:"0", rb:"255", ga:"0", gb:"255", ba:"0", bb:"255", aa:"70", ab:"0"};
name.setTransform(myColorTransform);
}
function flagCheck(name) {
myColorTransform = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"70", ab:"0"};
name.setTransform(myColorTransform);
}
function raceOver() {
_root.truck.maxSpeed = 0;
_root.truck2.maxSpeed = 0;
_root.truck.speed = 0;
_root.truck2.speed = 0;
_root.startRace = 0;
}
myColor = new Color(_root.vs.flag1);
myColor2 = new Color(_root.vs.flag2);
myColorTransform = new Object();
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.truck)) {
if (_root.lapP1 == 0) {
_root.lapP1 = 1;
_root.cp1p1 = 1;
_root.vs.p1lap = "lap: 1";
} else if ((_root.cp3p1 == 1) && (_root.p1cf == 0)) {
_root.lapP1++;
_root.cp1p1 = 0;
_root.cp2p1 = 0;
_root.cp3p1 = 0;
_root.vs.p1lap = "lap: " + _root.lapP1;
} else {
_root.cp1p1 = 1;
}
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.truck2)) {
if (_root.lapP2 == 0) {
_root.lapP2 = 1;
_root.cp1p2 = 1;
_root.vs.p2lap = "lap: 1";
} else if ((_root.cp3p2 == 1) && (_root.p2cf == 0)) {
_root.lapP2++;
_root.cp1p2 = 0;
_root.cp2p2 = 0;
_root.cp3p2 = 0;
_root.vs.p2lap = "lap: " + _root.lapP2;
} else {
_root.cp1p2 = 1;
}
}
if (_root.lapP1 == _root.maxLaps) {
_root.vs.p1lap = "last lap";
flagWhite(myColor);
_root.vs.flag1._x = -105;
_root.vs.flag1.play();
}
if (_root.lapP2 == _root.maxLaps) {
_root.vs.p2lap = "last lap";
flagWhite(myColor2);
_root.vs.flag2._x = 105;
_root.vs.flag2.play();
}
if (_root.maxLaps < _root.lapP1) {
flagCheck(myColor);
_root.vs.flag1.gotoAndStop(1);
if (_root.p2cf == 1) {
raceOver();
_root.winText.gotoAndPlay("p1lose");
} else if (_root.p1cf == 0) {
_root.p1cf = 1;
_root.vs.p1lap = "winner!";
_root.winText.gotoAndPlay("p1win");
}
}
if (_root.maxLaps < _root.lapP2) {
flagCheck(myColor2);
_root.vs.flag2.gotoAndStop(1);
if (_root.p1cf == 1) {
raceOver();
_root.winText.gotoAndPlay("p2lose");
} else if (_root.p2cf == 0) {
_root.p2cf = 1;
_root.vs.p2lap = "winner!";
_root.winText.gotoAndPlay("p2win");
}
}
}
Instance of Symbol 253 MovieClip "line2" in Symbol 337 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.truck)) {
if (_root.cp1p1 == 1) {
_root.cp2p1 = 1;
}
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.truck2)) {
if (_root.cp1p2 == 1) {
_root.cp2p2 = 1;
}
}
}
Instance of Symbol 254 MovieClip "line3" in Symbol 337 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.truck)) {
if (_root.cp2p1 == 1) {
_root.cp3p1 = 1;
}
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.truck2)) {
if (_root.cp2p2 == 1) {
_root.cp3p2 = 1;
}
}
}
Instance of Symbol 330 MovieClip "booster" in Symbol 341 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((this.hitTest(_root.truck) && (_root.hitB1 != 1)) && (_root.startRace == 1)) {
_root.hitB1 = 1;
_parent.boost1.gotoAndPlay(2);
gotoAndPlay (2);
}
if ((this.hitTest(_root.truck2) && (_root.hitB2 != 1)) && (_root.startRace == 1)) {
_root.hitB2 = 1;
_parent.boost2.gotoAndPlay(2);
gotoAndPlay (2);
}
}
Instance of Symbol 246 MovieClip in Symbol 341 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((((this.hitTest(_root.truck) && (_root.hitJ1 != 1)) && (_root.truck._xscale == 100)) && (_root.startRace == 1)) && (4 < _root.truck.speed)) {
_root.truck.turnRate = 0;
_root.hitJ1 = 1;
_parent.jp1.gotoAndPlay(2);
}
if ((((this.hitTest(_root.truck2) && (_root.hitJ2 != 1)) && (_root.truck2._xscale == 100)) && (_root.startRace == 1)) && (4 < _root.truck2.speed)) {
_root.truck2.turnRate = 0;
_root.hitJ2 = 1;
_parent.jp2.gotoAndPlay(2);
}
}
Instance of Symbol 333 MovieClip "line1" in Symbol 341 MovieClip Frame 1
onClipEvent (load) {
function flagGreen(name) {
myColorTransform = {ra:"0", rb:"0", ga:"0", gb:"120", ba:"0", bb:"0", aa:"70", ab:"0"};
name.setTransform(myColorTransform);
}
function flagWhite(name) {
myColorTransform = {ra:"0", rb:"255", ga:"0", gb:"255", ba:"0", bb:"255", aa:"70", ab:"0"};
name.setTransform(myColorTransform);
}
function flagCheck(name) {
myColorTransform = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"70", ab:"0"};
name.setTransform(myColorTransform);
}
function raceOver() {
_root.truck.maxSpeed = 0;
_root.truck2.maxSpeed = 0;
_root.truck.speed = 0;
_root.truck2.speed = 0;
_root.startRace = 0;
}
myColor = new Color(_root.vs.flag1);
myColor2 = new Color(_root.vs.flag2);
myColorTransform = new Object();
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.truck)) {
if (_root.lapP1 == 0) {
_root.lapP1 = 1;
_root.cp1p1 = 1;
_root.vs.p1lap = "lap: 1";
} else if ((_root.cp3p1 == 1) && (_root.p1cf == 0)) {
_root.lapP1++;
_root.cp1p1 = 0;
_root.cp2p1 = 0;
_root.cp3p1 = 0;
_root.vs.p1lap = "lap: " + _root.lapP1;
} else {
_root.cp1p1 = 1;
}
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.truck2)) {
if (_root.lapP2 == 0) {
_root.lapP2 = 1;
_root.cp1p2 = 1;
_root.vs.p2lap = "lap: 1";
} else if ((_root.cp3p2 == 1) && (_root.p2cf == 0)) {
_root.lapP2++;
_root.cp1p2 = 0;
_root.cp2p2 = 0;
_root.cp3p2 = 0;
_root.vs.p2lap = "lap: " + _root.lapP2;
} else {
_root.cp1p2 = 1;
}
}
if (_root.lapP1 == _root.maxLaps) {
_root.vs.p1lap = "last lap";
flagWhite(myColor);
_root.vs.flag1._x = -105;
_root.vs.flag1.play();
}
if (_root.lapP2 == _root.maxLaps) {
_root.vs.p2lap = "last lap";
flagWhite(myColor2);
_root.vs.flag2._x = 105;
_root.vs.flag2.play();
}
if (_root.maxLaps < _root.lapP1) {
flagCheck(myColor);
_root.vs.flag1.gotoAndStop(1);
if (_root.p2cf == 1) {
raceOver();
_root.winText.gotoAndPlay("p1lose");
} else if (_root.p1cf == 0) {
_root.p1cf = 1;
_root.vs.p1lap = "winner!";
_root.winText.gotoAndPlay("p1win");
}
}
if (_root.maxLaps < _root.lapP2) {
flagCheck(myColor2);
_root.vs.flag2.gotoAndStop(1);
if (_root.p1cf == 1) {
raceOver();
_root.winText.gotoAndPlay("p2lose");
} else if (_root.p2cf == 0) {
_root.p2cf = 1;
_root.vs.p2lap = "winner!";
_root.winText.gotoAndPlay("p2win");
}
}
}
Instance of Symbol 253 MovieClip "line2" in Symbol 341 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.truck)) {
if (_root.cp1p1 == 1) {
_root.cp2p1 = 1;
}
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.truck2)) {
if (_root.cp1p2 == 1) {
_root.cp2p2 = 1;
}
}
}
Instance of Symbol 254 MovieClip "line3" in Symbol 341 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.truck)) {
if (_root.cp2p1 == 1) {
_root.cp3p1 = 1;
}
}
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.truck2)) {
if (_root.cp2p2 == 1) {
_root.cp3p2 = 1;
}
}
}