Frame 1
stop();
function loadWall(path) {
path._visible = _root.wallVisible;
}
function crashTest(path, median) {
if (path.hitTest(_root.buggy1._x, _root.buggy1._y, true)) {
_root.crash = median;
}
}
function gameOver() {
_root.home.gotoAndStop("on");
_root.buggy1._x = _root.buggy1.startX;
_root.buggy1._y = _root.buggy1.startY;
_root.buggy1.buggyTurn._currentFrame = 27;
direction = 80;
introTuneSound.start(0, 999);
raceTuneSound.stop();
}
function setVolumes() {
lapRecordSound.setVolume(69 * _root.volumeLevel);
introTuneSound.setVolume(100 * _root.volumeLevel);
crashSound.setVolume(100 * _root.volumeLevel);
raceTuneSound.setVolume(100 * _root.volumeLevel);
}
fscommand ("allowscale", "false");
fscommand ("fullscreen", "true");
fscommand ("showmenu", "true");
_root.wallVisible = 0;
_root.volumeLevel = 1;
_root.raceOn = 0;
raceTuneSound = new Sound(_root.raceTuneClip);
raceTuneSound.attachSound("raceTune");
crashSound = new Sound(_root.crashClip);
crashSound.attachSound("crash");
introTuneSound = new Sound(_root.introTuneClip);
introTuneSound.attachSound("introTune");
lapRecordSound = new Sound(_root.lapRecordClip);
lapRecordSound.attachSound("lapRecord");
setVolumes();
introTuneSound.start(0, 999);
function AnimateConstructor(target) {
Set(target add ".path", target);
this.rotateMe = function () {
if (exploding != 1) {
speedFactor = 1 - ((maxSpeed - speed) / maxSpeed);
speedFactor = Math.min(speedFactor, 1);
if (Key.isDown(Key.RIGHT)) {
turnDirection = 1;
} else if (Key.isDown(Key.LEFT)) {
turnDirection = -1;
} else {
turnDirection = 0;
}
if (turnDirection != 0) {
turn = (turnDirection * turnSpeed) - ((turnDirection * grip) * speedFactor);
} else {
turn = 0;
}
direction = direction + turn;
if (360 < direction) {
direction = direction - 360;
}
if (direction < 0) {
direction = direction + 360;
}
buggyFrame = int(direction / 10) + 1;
path.buggyTurn.bonnet.gotoAndStop(buggyFrame);
path.buggyTurn.body.gotoAndStop(buggyFrame);
path.buggyTurn.gotoAndStop(buggyFrame);
}
};
this.calcSpeed = function () {
if (exploding != 1) {
if (Key.isDown(65)) {
if ((accelerate == "startAccel") || (accelerate == "moreAccel")) {
accelerate = "moreAccel";
} else {
accelerate = "startAccel";
}
if (_root.raceOn) {
speed = (speed - accel) + crashSpeed;
limitSpeed(speed);
}
} else if ((accelerate == "startDeccel") || (accelerate == "moreDeccel")) {
accelerate = "moreDeccel";
} else {
accelerate = "startDeccel";
}
if (0 < crashSpeed) {
crashSpeed = crashSpeed - strength;
if (crashSpeed < 0.2) {
crashSpeed = 0;
}
}
if (0 < speed) {
speed = speed - friction;
if (speed < 0.05) {
speed = 0;
}
} else if (speed < 0) {
speed = speed + friction;
if (-0.05 < speed) {
speed = 0;
}
}
}
};
this.limitSpeed = function () {
if (speed < maxSpeed) {
speed = maxSpeed;
} else if (minSpeed < speed) {
speed = minSpeed;
}
if (boost) {
boost = boost - boostDecay;
if (boost < 0.1) {
boost = 0;
}
speed = speed - boost;
}
};
this.calcWithinScreen = function () {
if ((path._x < leftEdge) or (rightEdge < path._x)) {
median = 0;
} else if ((path._y < topEdge) or (bottomEdge < path._y)) {
median = 180;
} else {
median = -1;
}
if (median >= 0) {
direction = median - direction;
}
};
this.crash = function (angle) {
if ((path._x < leftEdge) or (rightEdge < path._x)) {
median = 0;
} else if ((path._y < topEdge) or (bottomEdge < path._y)) {
median = 180;
} else {
median = -1;
}
if (median >= 0) {
crashBounce = 2;
direction = median - direction;
}
if (_root.crash >= 0) {
if (justCrashed == 1) {
if (exploding != 1) {
_root.crashSound.setPan((path._x / 2.5) - 100);
_root.crashSound.start();
_root.raceTuneSound.stop();
speed = 0;
boost = 0;
_root.buggy1.explosion.gotoAndPlay("on");
restartX = eval (("_root.trackLine" add _root.buggy1.lapper) add "._x");
restartY = eval (("_root.trackLine" add _root.buggy1.lapper) add "._y");
exploding = 1;
}
} else if (exploding != 1) {
direction = _root.crash - direction;
crashSpeed = crashDamage;
speed = speed / weight;
crashBounce = weight * 2;
_root.crash = -1;
justCrashed = 1;
}
} else {
justCrashed = 0;
}
};
this.moveMe = function () {
angle = direction + 90;
angle = (Math.PI/180) * angle;
x = (speed * crashBounce) * Math.cos(angle);
y = (speed * crashBounce) * Math.sin(angle);
path._x = path._x + x;
path._y = path._y + y;
crashBounce = 1;
};
}
Instance of Symbol 16 MovieClip in Frame 1
/* no clip actions */
Instance of Symbol 61 MovieClip "timer" in Frame 1
onClipEvent (load) {
function resetLapTimes() {
lapTime = 0;
raceTime = 0;
newRecord = 0;
newRaceRecord = 0;
startLapTime = getTimer();
_root.buggy1.currentLap = 1;
i = 1;
while (10 >= i) {
Set("lapTime" add i, "");
i++;
}
}
lapRecord = 69.69;
raceRecord = 123.69;
_root.homeLapRecord = "LAP RECORD : 23.69";
_root.homeRaceRecord = "RACE RECORD : 123.69";
}
onClipEvent (enterFrame) {
if (_root.raceOn) {
lapTime = (getTimer() - startLapTime) / 10;
lapTime = Math.round(lapTime);
lapTime = lapTime / 100;
if (resetTimer) {
raceTime = raceTime + lapTime;
if (lapTime < lapRecord) {
_root.message.gotoAndPlay("fastestLap");
_root.lapRecordSound.start();
lapRecord = lapTime;
newRecord = 1;
}
if (10 < _root.buggy1.currentLap) {
if (raceTime < raceRecord) {
newRaceRecord = 1;
raceRecord = raceTime;
raceTime = String(raceTime);
dotPos = raceTime.indexOf(".");
if (0 < dotPos) {
fractions = raceTime.substr(dotpos + 1, 4);
if (fractions.length < 2) {
raceTime = raceTime add "0";
}
} else {
raceTime = raceTime add ".00";
}
_root.homeRaceRecord = "RACE RECORD : " add raceTime;
_root.raceRecordMessage = "NEW RACE RECORD : " add raceTime;
}
if (newRaceRecord) {
newRaceRecord = 0;
_root.message.gotoAndPlay("gameOverRecord");
} else {
_root.message.gotoAndPlay("gameOver");
}
_root.raceOn = 0;
}
resetTimer = 0;
startLapTime = getTimer();
lapTime10 = lapTime9;
lapTime9 = lapTime8;
lapTime8 = lapTime7;
lapTime7 = lapTime6;
lapTime6 = lapTime5;
lapTime5 = lapTime4;
lapTime4 = lapTime3;
lapTime3 = lapTime2;
lapTime2 = lapTime1;
lapTime1 = String(lapTime);
dotPos = lapTime1.indexOf(".");
if (0 < dotPos) {
fractions = lapTime1.substr(dotpos + 1, 4);
if (fractions.length < 2) {
lapTime1 = lapTime1 add "0";
}
} else {
lapTime1 = lapTime1 add ".00";
}
if (newRecord) {
lapRecordString = lapTime1;
}
_root.homeLapRecord = "LAP RECORD : " add lapRecordString;
}
}
}
Instance of Symbol 66 MovieClip in Frame 1
onClipEvent (load) {
myMedian = int(this._rotation * 2);
this._visible = _root.wallVisible;
}
onClipEvent (enterFrame) {
if (hitTest(_root.buggy1._x, _root.buggy1._y, true)) {
_root.buggy1.boost = 4;
}
}
Instance of Symbol 89 MovieClip in Frame 1
onClipEvent (load) {
_root.loadWall(this);
myMedian = int(this._rotation * 2);
}
onClipEvent (enterFrame) {
_root.crashTest(this, myMedian);
}
Instance of Symbol 89 MovieClip in Frame 1
onClipEvent (load) {
_root.loadWall(this);
myMedian = int(this._rotation * 2);
}
onClipEvent (enterFrame) {
_root.crashTest(this, myMedian);
}
Instance of Symbol 91 MovieClip in Frame 1
onClipEvent (load) {
_root.loadWall(this);
myMedian = int(this._rotation * 2);
}
onClipEvent (enterFrame) {
_root.crashTest(this, myMedian);
}
Instance of Symbol 91 MovieClip in Frame 1
onClipEvent (load) {
_root.loadWall(this);
myMedian = int(this._rotation * 2);
}
onClipEvent (enterFrame) {
_root.crashTest(this, myMedian);
}
Instance of Symbol 91 MovieClip in Frame 1
onClipEvent (load) {
_root.loadWall(this);
myMedian = int(this._rotation * 2);
}
onClipEvent (enterFrame) {
_root.crashTest(this, myMedian);
}
Instance of Symbol 89 MovieClip in Frame 1
onClipEvent (load) {
_root.loadWall(this);
myMedian = int(this._rotation * 2);
}
onClipEvent (enterFrame) {
_root.crashTest(this, myMedian);
}
Instance of Symbol 91 MovieClip in Frame 1
onClipEvent (load) {
_root.loadWall(this);
myMedian = int(this._rotation * 2);
}
onClipEvent (enterFrame) {
_root.crashTest(this, myMedian);
}
Instance of Symbol 91 MovieClip in Frame 1
onClipEvent (load) {
_root.loadWall(this);
myMedian = int(this._rotation * 2);
}
onClipEvent (enterFrame) {
_root.crashTest(this, myMedian);
}
Instance of Symbol 91 MovieClip in Frame 1
onClipEvent (load) {
_root.loadWall(this);
myMedian = int(this._rotation * 2);
}
onClipEvent (enterFrame) {
_root.crashTest(this, myMedian);
}
Instance of Symbol 91 MovieClip in Frame 1
onClipEvent (load) {
_root.loadWall(this);
myMedian = int(this._rotation * 2);
}
onClipEvent (enterFrame) {
_root.crashTest(this, myMedian);
}
Instance of Symbol 91 MovieClip in Frame 1
onClipEvent (load) {
_root.loadWall(this);
myMedian = int(this._rotation * 2);
}
onClipEvent (enterFrame) {
_root.crashTest(this, myMedian);
}
Instance of Symbol 91 MovieClip in Frame 1
onClipEvent (load) {
_root.loadWall(this);
myMedian = int(this._rotation * 2);
}
onClipEvent (enterFrame) {
_root.crashTest(this, myMedian);
}
Instance of Symbol 93 MovieClip "wally" in Frame 1
onClipEvent (load) {
_root.loadWall(this);
myMedian = int(this._rotation * 2);
}
onClipEvent (enterFrame) {
_root.crashTest(this, myMedian);
}
Instance of Symbol 93 MovieClip in Frame 1
onClipEvent (load) {
_root.loadWall(this);
myMedian = int(this._rotation * 2);
}
onClipEvent (enterFrame) {
_root.crashTest(this, myMedian);
}
Instance of Symbol 95 MovieClip in Frame 1
onClipEvent (load) {
myMedian = int(this._rotation * 2);
this._visible = _root.wallVisible;
}
onClipEvent (enterFrame) {
if (hitTest(_root.buggy1._x, _root.buggy1._y, true)) {
_root.crash = myMedian;
}
}
Instance of Symbol 91 MovieClip in Frame 1
onClipEvent (load) {
_root.loadWall(this);
myMedian = int(this._rotation * 2);
}
onClipEvent (enterFrame) {
_root.crashTest(this, myMedian);
}
Instance of Symbol 91 MovieClip in Frame 1
onClipEvent (load) {
_root.loadWall(this);
myMedian = int(this._rotation * 2);
}
onClipEvent (enterFrame) {
_root.crashTest(this, myMedian);
}
Instance of Symbol 89 MovieClip in Frame 1
onClipEvent (load) {
_root.loadWall(this);
myMedian = int(this._rotation * 2);
}
onClipEvent (enterFrame) {
_root.crashTest(this, myMedian);
}
Instance of Symbol 91 MovieClip in Frame 1
onClipEvent (load) {
_root.loadWall(this);
myMedian = int(this._rotation * 2);
}
onClipEvent (enterFrame) {
_root.crashTest(this, myMedian);
}
Instance of Symbol 89 MovieClip in Frame 1
onClipEvent (load) {
_root.loadWall(this);
myMedian = int(this._rotation * 2);
}
onClipEvent (enterFrame) {
_root.crashTest(this, myMedian);
}
Instance of Symbol 97 MovieClip in Frame 1
onClipEvent (load) {
_root.loadWall(this);
myMedian = 34;
}
onClipEvent (enterFrame) {
_root.crashTest(this, myMedian);
}
Instance of Symbol 99 MovieClip "trackLine7" in Frame 1
onClipEvent (load) {
this._visible = _root.wallVisible;
}
onClipEvent (enterFrame) {
if (hitTest(_root.buggy1._x, _root.buggy1._y, true)) {
_root.buggy1.lapper = 7;
}
}
Instance of Symbol 100 MovieClip "trackLine6" in Frame 1
onClipEvent (load) {
this._visible = _root.wallVisible;
}
onClipEvent (enterFrame) {
if (hitTest(_root.buggy1._x, _root.buggy1._y, true)) {
_root.buggy1.lapper = 6;
}
}
Instance of Symbol 101 MovieClip "trackLine5" in Frame 1
onClipEvent (load) {
this._visible = _root.wallVisible;
}
onClipEvent (enterFrame) {
if (hitTest(_root.buggy1._x, _root.buggy1._y, true)) {
_root.buggy1.lapper = 5;
}
}
Instance of Symbol 102 MovieClip "trackLine4" in Frame 1
onClipEvent (load) {
this._visible = _root.wallVisible;
}
onClipEvent (enterFrame) {
if (hitTest(_root.buggy1._x, _root.buggy1._y, true)) {
_root.buggy1.lapper = 4;
}
}
Instance of Symbol 103 MovieClip "trackLine3" in Frame 1
onClipEvent (load) {
this._visible = _root.wallVisible;
}
onClipEvent (enterFrame) {
if (hitTest(_root.buggy1._x, _root.buggy1._y, true)) {
_root.buggy1.lapper = 3;
}
}
Instance of Symbol 104 MovieClip "trackLine2" in Frame 1
onClipEvent (load) {
this._visible = _root.wallVisible;
}
onClipEvent (enterFrame) {
if (hitTest(_root.buggy1._x, _root.buggy1._y, true)) {
_root.buggy1.lapper = 2;
}
}
Instance of Symbol 105 MovieClip "trackLine1" in Frame 1
onClipEvent (load) {
this._visible = _root.wallVisible;
}
onClipEvent (enterFrame) {
if (hitTest(_root.buggy1._x, _root.buggy1._y, true)) {
_root.buggy1.lapper = 1;
}
}
Instance of Symbol 106 MovieClip "trackLine0" in Frame 1
onClipEvent (load) {
this._visible = _root.wallVisible;
_root.buggy1.lapper = 0;
_root.buggy1.currentLap = 1;
}
onClipEvent (enterFrame) {
if (hitTest(_root.buggy1._x, _root.buggy1._y, true)) {
if (_root.buggy1.lapper == 7) {
_root.buggy1.lapper = 0;
_root.buggy1.currentLap = _root.buggy1.currentLap + 1;
_root.timer.resetTimer = 1;
}
}
}
Instance of Symbol 253 MovieClip "buggy1" in Frame 1
onClipEvent (load) {
turnSpeed = 8;
grip = 5;
speed = 0;
maxSpeed = -5;
minSpeed = 1.3;
accel = 0.13;
friction = 0.08;
currentSpeed = 0;
crashSpeed = 0;
crashDamage = 0.2;
weight = 3;
strength = 0.002;
crashBounce = 1;
boostDecay = 0.1;
leftEdge = 0;
rightEdge = 500;
topEdge = 0;
bottomEdge = 500;
soundTime = 0;
maxrev = 0;
currentLap = 0;
this.buggyTurn._currentFrame = 27;
direction = 80;
stop();
startX = this._x;
startY = this._y;
animate = new _root.AnimateConstructor(this);
score = new _root.ScoreConstructor(this);
}
onClipEvent (enterFrame) {
animate.rotateMe();
animate.calcSpeed();
animate.limitSpeed();
animate.crash();
animate.moveMe();
}
Instance of Symbol 11 MovieClip "bonnet" in Symbol 14 MovieClip Frame 1
onClipEvent (load) {
myColor = new Color(this);
}
Instance of Symbol 13 MovieClip "body" in Symbol 14 MovieClip Frame 1
onClipEvent (load) {
myColor = new Color(this);
}
Symbol 16 MovieClip Frame 1
function checkLoad() {
loadedSoFar = _root.getBytesLoaded();
percentLoaded = int((loadedSoFar / movieFileSize) * 100);
if (percentLoaded >= 100) {
this.gotoAndStop("off");
}
}
movieFileSize = _root.getBytesTotal();
Symbol 16 MovieClip Frame 2
checkLoad();
Symbol 16 MovieClip Frame 4
gotoAndPlay (2);
Symbol 16 MovieClip Frame 7
stop();
Symbol 18 Button
on (release) {
_root.volumeLevel = 0;
_root.setVolumes();
nextFrame();
}
Symbol 20 Button
on (release) {
_root.volumeLevel = 1;
_root.setVolumes();
prevFrame();
}
Symbol 22 MovieClip Frame 1
stop();
Symbol 22 MovieClip Frame 2
stop();
Symbol 25 Button
on (press) {
_parent.blueDrag = 1;
}
on (release, releaseOutside) {
_parent.blueDrag = 0;
}
Symbol 28 Button
on (press) {
_parent.greenDrag = 1;
}
on (release, releaseOutside) {
_parent.greenDrag = 0;
}
Symbol 31 Button
on (press) {
_parent.redDrag = 1;
}
on (release, releaseOutside) {
_parent.redDrag = 0;
}
Symbol 37 Button
on (release) {
gotoAndStop (5);
_root.message.gotoAndPlay("countdown");
_root.introTuneSound.stop();
_root.timer.resetLapTimes();
}
Symbol 46 MovieClip Frame 1
bodyColour._visible = 1;
bonnetColour._visible = 1;
bigBuggy._visible = 1;
_root._quality = "HIGH";
_root.soundSwitch._alpha = 100;
stop();
Instance of Symbol 35 MovieClip "bodyColour" in Symbol 46 MovieClip Frame 1
onClipEvent (load) {
function changeColour() {
_root.buggy1.buggyTurn.body.myColor.setRGB(((r << 16) | (g << 8)) | b);
_root.home.bigBuggy.body.myColor.setRGB(((r << 16) | (g << 8)) | b);
}
function limitDest() {
if (dest < 0) {
dest = 0;
}
if (127.5 < dest) {
dest = 127.5;
}
}
function setUp() {
redButton._x = 127.5;
greenButton._x = 0;
blueButton._x = 0;
r = redButton._x * 2;
g = greenButton._x * 2;
b = blueButton._x * 2;
changeColour();
}
carpart = "BODY";
setUp();
}
onClipEvent (enterFrame) {
if (redDrag) {
delta = (redButton._x - _xmouse) / 4;
dest = redButton._x - delta;
limitDest();
redButton._x = dest;
r = redButton._x * 2;
changeColour();
}
if (greenDrag) {
delta = (greenButton._x - _xmouse) / 4;
dest = greenButton._x - delta;
limitDest();
greenButton._x = dest;
g = greenButton._x * 2;
changeColour();
}
if (blueDrag) {
delta = (blueButton._x - _xmouse) / 4;
dest = blueButton._x - delta;
limitDest();
blueButton._x = dest;
b = blueButton._x * 2;
changeColour();
}
}
Instance of Symbol 36 MovieClip "bonnetColour" in Symbol 46 MovieClip Frame 1
onClipEvent (load) {
function changeColour() {
_root.buggy1.buggyTurn.bonnet.myColor.setRGB(((r << 16) | (g << 8)) | b);
_root.home.bigBuggy.bonnet.myColor.setRGB(((r << 16) | (g << 8)) | b);
}
function limitDest() {
if (dest < 0) {
dest = 0;
}
if (127.5 < dest) {
dest = 127.5;
}
}
function setUp() {
redButton._x = 127.5;
greenButton._x = 127.5;
blueButton._x = 127.5;
r = redButton._x * 2;
g = greenButton._x * 2;
b = blueButton._x * 2;
changeColour();
}
carpart = "HILIGHT";
setUp();
}
onClipEvent (enterFrame) {
if (redDrag) {
delta = (redButton._x - _xmouse) / 4;
dest = redButton._x - delta;
limitDest();
redButton._x = dest;
r = redButton._x * 2;
changeColour();
}
if (greenDrag) {
delta = (greenButton._x - _xmouse) / 4;
dest = greenButton._x - delta;
limitDest();
greenButton._x = dest;
g = greenButton._x * 2;
changeColour();
}
if (blueDrag) {
delta = (blueButton._x - _xmouse) / 4;
dest = blueButton._x - delta;
limitDest();
blueButton._x = dest;
b = blueButton._x * 2;
changeColour();
}
}
Symbol 46 MovieClip Frame 5
bodyColour._visible = 0;
bonnetColour._visible = 0;
bigBuggy._visible = 0;
gotoAndPlay (11);
Symbol 46 MovieClip Frame 11
_root._quality = "MEDIUM";
_root.soundSwitch._alpha = 50;
stop();
Symbol 87 MovieClip Frame 1
stop();
Symbol 87 MovieClip Frame 10
Symbol 87 MovieClip Frame 226
_root.raceOn = 1;
_root.timer.resetLapTimes();
Symbol 87 MovieClip Frame 247
_root.raceTuneSound.start(0, 9999);
Symbol 87 MovieClip Frame 281
stop();
Symbol 87 MovieClip Frame 329
gotoAndStop (1);
Symbol 87 MovieClip Frame 452
_root.gameOver();
gotoAndStop (1);
Symbol 87 MovieClip Frame 574
_root.gameOver();
gotoAndStop (1);
Symbol 141 MovieClip Frame 1
stop();
Symbol 141 MovieClip Frame 9
_root.buggy1.swapDepths(_root.topClip);
Symbol 141 MovieClip Frame 27
_root.buggy1.buggyTurn._alpha = 0;
Symbol 141 MovieClip Frame 60
_root.buggy1._x = _root.buggy1.restartX;
_root.buggy1._y = _root.buggy1.restartY;
_root.buggy1.exploding = 0;
_root.buggy1.justCrashed = 0;
_root.buggy1.swapDepths(_root.topClip);
Symbol 141 MovieClip Frame 63
_root.buggy1.buggyTurn._alpha = _root.buggy1.buggyTurn._alpha + 2;
Symbol 141 MovieClip Frame 64
if (97 < _root.buggy1.buggyTurn._alpha) {
_root.buggy1.buggyTurn._alpha = 100;
_root.raceTuneSound.start(0, 9999);
gotoAndStop (1);
} else {
_root.buggy1.buggyTurn._alpha = _root.buggy1.buggyTurn._alpha + 2;
gotoAndPlay (63);
}
Symbol 252 MovieClip Frame 1
stop();
Instance of Symbol 178 MovieClip "bonnet" in Symbol 252 MovieClip Frame 1
onClipEvent (load) {
myColor = new Color(this);
}
Instance of Symbol 215 MovieClip "body" in Symbol 252 MovieClip Frame 1
onClipEvent (load) {
myColor = new Color(this);
}