Frame 1
stop();
Stage.scaleMode = "noScale";
Stage.showMenu = false;
if (System.exactSettings) {
trace("Published for Flash player 7");
}
var fpsSent = false;
onEnterFrame = function () {
var _local1 = Math.round((getBytesLoaded() / getBytesTotal()) * 100);
LoadBarInst.gotoAndStop(_local1);
if ((getBytesTotal() > 0) && (getBytesLoaded() >= getBytesTotal())) {
delete onEnterFrame;
gotoAndStop ("Init");
}
};
Frame 20
function cSFXEngine() {
var _local1 = this;
_local1.samp = new Array();
_local1.restoreVol = new Array();
_local1.loop = new Array();
_local1.name = new Array();
_local1.state = new Array();
_local1.idx = 0;
_local1.ctrl = new Sound();
_local1.proc = SE_IDLE;
_local1.vol = 75;
_local1.ctrl.setVolume(_local1.vol);
_local1.managerMuted = false;
}
function ticksToTime(ticks, fps) {
var _local2 = ticks;
var _local3 = fps;
var minutes = Math.floor(_local2 / (_local3 * 60));
_local2 = _local2 - (minutes * (_local3 * 60));
var _local1 = Math.floor(_local2 / _local3);
_local2 = _local2 - (_local1 * _local3);
var hundredths = Math.floor((_local2 / _local3) * 100);
var padMinutes = "";
var padSeconds = "";
var padHundredths = "";
if (minutes < 9) {
padMinutes = "0";
}
if (_local1 < 9) {
padSeconds = "0";
}
if (hundredths < 9) {
padHundredths = "0";
}
var timeStr = (((((((padMinutes + minutes) + ":") + padSeconds) + _local1) + ".") + padHundredths) + hundredths);
return(timeStr);
}
stop();
var RunMode = "Internet";
_global.finishTime = 0;
SE_IDLE = 0;
SE_FADEDOWN = 1;
cSFXEngine.prototype.Destroy = function () {
var _local1 = this;
delete _local1.samp;
delete _local1.restoreVol;
delete _local1.loop;
delete _local1.name;
delete _local1.state;
delete _local1.ctrl;
};
cSFXEngine.prototype.SetVol = function (idx, vol) {
if (this.managerMuted) {
return(undefined);
}
this.samp[idx].setVolume(vol);
};
cSFXEngine.prototype.SetVolAll = function (vol) {
var _local2 = this;
var _local3 = vol;
var _local1 = 0;
while (_local1 < _local2.samp.length) {
_local2.SetVol(_local1, _local3);
_local1++;
}
};
cSFXEngine.prototype.GetVol = function (idx) {
return(this.samp[idx].getVolume());
};
cSFXEngine.prototype.SetPan = function (idx, pan) {
this.samp[idx].setPan(pan);
};
cSFXEngine.prototype.GetPan = function (idx) {
return(this.samp[idx].getPan());
};
cSFXEngine.prototype.SetMasterVol = function (vol) {
var _local1 = this;
_local1.vol = vol;
_local1.ctrl.setVolume(_local1.vol);
};
cSFXEngine.prototype.MuteMasterVol = function () {
this.proc = SE_FADEDOWN;
};
cSFXEngine.prototype.RestoreMasterVol = function () {
this.ctrl.setVolume(this.vol);
};
cSFXEngine.prototype.StopAll = function () {
var _local2 = this;
var _local1 = 0;
while (_local1 < _local2.state.length) {
_local2.samp[_local1].stop();
_local2.state[_local1] = false;
_local1++;
}
};
cSFXEngine.prototype.MuteAll = function () {
var _local2 = this;
var _local1 = 0;
while (_local1 < _local2.samp.length) {
_local2.Mute(_local1);
_local1++;
}
_local2.managerMuted = true;
};
cSFXEngine.prototype.RestoreAll = function () {
var _local2 = this;
_local2.managerMuted = false;
var _local1 = 0;
while (_local1 < _local2.samp.length) {
_local2.Restore(_local1);
_local1++;
}
};
cSFXEngine.prototype.Add = function (name, clip) {
var _local1 = this;
var _local2 = name;
var _local3 = clip;
if (_local3 == null) {
_local3 = _root.createEmptyMovieClip(_local2, _local1.idx);
}
_local1.samp[_local1.idx] = new Sound(_local3);
_local1.samp[_local1.idx].attachSound(_local2);
_local1.restoreVol[_local1.idx] = 100;
_local1.name[_local1.idx] = _local2;
_local1.state[_local1.idx] = false;
return(_local1.idx++);
};
cSFXEngine.prototype.Play = function (idx, loopnum) {
this.samp[idx].start(0, loopnum);
this.state[idx] = true;
};
cSFXEngine.prototype.Stop = function (idx) {
var _local1 = idx;
var _local2 = this;
_local2.samp[_local1].stop(_local2.name[_local1]);
_local2.state[_local1] = false;
};
cSFXEngine.prototype.Mute = function (idx) {
var _local1 = this;
var _local2 = idx;
if (_local1.managerMuted || (_local1.GetVol(_local2) <= 0)) {
} else {
_local1.restoreVol[_local2] = _local1.GetVol(_local2);
_local1.SetVol(_local2, 0);
}
};
cSFXEngine.prototype.Restore = function (idx) {
var _local1 = this;
var _local2 = idx;
if (_local1.managerMuted || (_local1.GetVol(_local2) > 0)) {
} else {
_local1.SetVol(_local2, _local1.restoreVol[_local2]);
}
};
cSFXEngine.prototype.IsPlaying = function (idx) {
return(this.state[idx]);
};
var SCORE_ENTRIES_MAX = 10;
if (runMode == "Internet") {
var scoreMan = (new fiab.modules.hiscore.ScoreManager_fiab("http://hiscores.fishinabottle.com/submitscore_using_get.php"));
} else {
var scoreMan = (new fiab.modules.hiscore.ScoreManager_local("KR_Track1", SCORE_ENTRIES_MAX, "ascending"));
}
Sfx.Destroy();
Sfx = new cSFXEngine();
Sfx.SetMasterVol(100);
SFXID_Grind1 = Sfx.Add("MainGrind1.wav", SoundObjDriver1Inst);
SFXID_Grind2 = Sfx.Add("MainGrind4.wav", SoundObjDriver2Inst);
SFXID_Bump = Sfx.Add("Bump.wav", this);
SFXID_Driver = Sfx.Add("Driver2.wav", this);
SFXID_Beep1 = Sfx.Add("Beep01.wav", this);
SFXID_Beep2 = Sfx.Add("Beep02.wav", this);
SFXID_Pip1 = Sfx.Add("Pip1.wav", this);
SFXID_Pip2 = Sfx.Add("Pip2.wav", this);
SFXID_Brush = Sfx.Add("Brush.wav", this);
SFXID_Loop1 = Sfx.Add("taa_ingame.mp3", this);
SFXOBJ_Screech = createEmptyMovieClip("sre", 9999);
SFX_Screech = new Sound(SFXOBJ_Screech);
SFX_Screech.attachSound("screech.wav");
SFX_Screech.setVolume(50);
SFXOBJ_Reverse = createEmptyMovieClip("rev", 9998);
SFX_Reverse = new Sound(SFXOBJ_Reverse);
SFX_Reverse.attachSound("reverse.wav");
SFXOBJ_Horn = createEmptyMovieClip("hor", 9997);
SFX_Horn1 = new Sound(SFXOBJ_Horn);
SFX_Horn1.attachSound("horn01.wav");
SFX_Horn2 = new Sound(SFXOBJ_Horn);
SFX_Horn2.attachSound("horn02.wav");
SFX_Horn3 = new Sound(SFXOBJ_Horn);
SFX_Horn3.attachSound("horn03.wav");
SFX_Horn3.setVolume(15);
titleTuneClip = this.createEmptyMovieClip("TitleTuneInst", 9996);
titleTune = new Sound(titleTuneClip);
titleTune.attachSound("taa_title.mp3");
titleTune.setVolume(0);
titleTuneClip.isPlaying = false;
titleTuneClip.volumeFade = 0;
titleTuneClip.playTune = function () {
var _local1 = this;
if (!_local1.isPlaying) {
_local1.volumeFade = 0;
_local1._parent.titleTune.setVolume(volumeFade);
_local1._parent.titleTune.start(0, 9999);
_local1.onEnterFrame = function () {
var _local1 = this;
if ((++_local1.volumeFade) > 100) {
delete _local1.onEnterFrame;
} else {
_local1._parent.titleTune.setVolume(_local1.volumeFade);
}
};
_local1.isPlaying = true;
}
};
titleTuneClip.stopPlaying = function () {
var _local1 = this;
_local1.volumeFade = 0;
_local1._parent.titleTune.setVolume(volumeFade);
_local1._parent.titleTune.stop();
delete _local1.onEnterFrame;
_local1.isPlaying = false;
};
var titlePage = true;
var firstPit = true;
StatsTrackerInst.SendSystemInfo(8);
gotoAndStop ("Title");
Frame 30
stop();
titleTuneClip.playTune();
if (runMode == "Local") {
firstPit = true;
SendToAFriendButtInst._visible = false;
LeaderboardButtInst._visible = false;
InstructionsButtInst._x = LeaderboardButtInst._x;
InstructionsButtInst._y = LeaderboardButtInst._y;
}
titlePage = true;
Frame 40
function submitScore(scoreName) {
if (scoreName.length > 0) {
MainButtInst.enabled = false;
SubmitButtInst.enabled = false;
var _local1 = Math.round((_global.finishTime / 1000) * 18);
scoreMan.onLoad = function () {
gotoAndStop ("HiScores");
};
scoreMan.submit(scoreName, _local1, "KR_Track1", 87);
}
}
stop();
if (runMode == "Local") {
gotoAndStop ("Title");
}
titleTuneClip.playTune();
SubmitInst.NameEntryInst.text = "";
Selection.setFocus(SubmitInst.NameEntryInst);
Frame 50
function sendToAFriend(yourName, friendName, eMail) {
if ((yourName.length > 0) && (eMail.length > 0)) {
var _local1 = new LoadVars();
_local1.name = yourName;
_local1.emailAddr = eMail;
_local1.onLoad = function (success) {
if (success) {
if (this.res == 0) {
trace("Send to a friend failed");
}
} else {
trace("Send to a friend failed");
}
};
_local1.sendAndLoad("http://service.fishinabottle.com/challenge/kaizenracing/send_kaizenracing.php", _local1, "GET");
StatsTrackerInst.SendSendToFriend(8, "fr");
gotoAndStop ("Title");
}
}
stop();
SendInst.YourNameInst.text = "";
SendInst.FriendNameInst.text = "";
SendInst.EmailInst.text = "";
Selection.setFocus(SendInst.YourNameInst);
Frame 65
function challengeAFriend(yourName, friendName, eMail) {
if ((yourName.length > 0) && (eMail.length > 0)) {
var _local1 = new LoadVars();
_local1.name = yourName;
_local1.emailAddr = eMail;
_local1.score = ticksToTime(Math.round((_global.finishTime / 1000) * 18), 18);
_local1.onLoad = function (success) {
if (success) {
if (this.res == 0) {
trace("Challenge a friend failed");
}
} else {
trace("Challenge a friend failed");
}
};
_local1.sendAndLoad("http://service.fishinabottle.com/challenge/kaizenracing/challenge_kaizenracing.php", _local1, "GET");
StatsTrackerInst.SendSendToFriend(8, "ch");
gotoAndStop ("Tips");
}
}
stop();
ChallengeInst.YourNameInst.text = "";
ChallengeInst.FriendNameInst.text = "";
ChallengeInst.EmailInst.text = "";
Selection.setFocus(ChallengeInst.YourNameInst);
Frame 80
function closeLeaderboard() {
if (titlePage || (runMode == "Local")) {
gotoAndStop ("Title");
} else {
gotoAndStop ("Tips");
}
}
stop();
HisScoreInst.TemplateInst._visible = false;
HisScoreInst.ScoresFailedInst._visible = false;
HisScoreInst.ChallengeButtonInst._visible = (!titlePage) && (runMode == "Internet");
var i = 0;
while (i < SCORE_ENTRIES_MAX) {
HisScoreInst["name" + (i + 1)] = "";
HisScoreInst["score" + (i + 1)] = "";
i++;
}
scoreMan.onLoad = function (success) {
if (success) {
HisScoreInst.LoadingScoresInst._visible = false;
HisScoreInst.TemplateInst._visible = true;
var _local1 = 0;
while (_local1 < SCORE_ENTRIES_MAX) {
var _local2 = scoreMan.getScore(_local1 + 1);
if (_local2 != null) {
HisScoreInst["name" + (_local1 + 1)] = _local2.name;
HisScoreInst["score" + (_local1 + 1)] = ticksToTime(_local2.score, 18);
}
_local1++;
}
} else {
HisScoreInst.LoadingScoresInst._visible = false;
HisScoreInst.ScoresFailedInst._visible = true;
}
};
scoreMan.view("KR_Track1", 87);
Frame 90
stop();
Frame 100
function cParticles(numParticles, layer, sourceMovieClip, maskMovieClip) {
var _local2 = layer;
var _local3 = this;
_local3.particle = new Array();
_local3.numParticles = numParticles;
_local3.free = new Array();
var _local1 = 0;
n = 0;
while (n < numParticles) {
_local3.particle.push(sourceMovieClip.duplicateMovieClip(("p" + _local2) + _local1, _local2 + (_local1++)));
p = _local3.particle[n];
if ((maskMovieClip != undefined) && (maskMovieClip != null)) {
p.setMask(maskMovieClip.duplicateMovieClip(("m" + _local2) + _local1, _local2 + (_local1++)));
}
p._x = 0;
p._y = 0;
p._visible = false;
p.life = 100;
_local3.free.push(n);
n++;
}
_local3.nl = _local1;
}
function onPitStopComplete(time) {
penaltyTime = penaltyTime + time;
pitStop._visible = false;
firstPit = false;
EngineSound1Inst.unMute();
EngineSound2Inst.unMute();
var _local1 = new Object();
_local1.x = gTrackInst.StartMarker02Inst._x;
_local1.y = gTrackInst.StartMarker02Inst._y;
gTrackInst.localToGlobal(_local1);
Driver1.clip._x = _local1.x;
Driver1.clip._y = _local1.y;
Driver1.clip._rotation = gTrackInst.StartMarker02Inst._rotation;
Driver1.clip._visible = true;
Driver1.ang = (Math.PI/180) * Driver1.clip._rotation;
Driver1.seekAng = Driver1.ang;
Driver1.speed = 0;
Driver1.accel = 0;
Pause(false);
}
function Vec2(x, y) {
this.x = x;
this.y = y;
}
function formatTime(time) {
var _local1 = Math.floor(time / 1000);
var _local3 = Math.floor(_local1 / 60);
_local1 = _local1 - (_local3 * 60);
var _local2 = Math.floor((time - ((_local3 * 60000) + (_local1 * 1000))) / 10);
_local3 = "" + _local3;
_local1 = "" + _local1;
_local2 = "" + _local2;
if (_local1.length < 2) {
_local1 = "0" + _local1;
}
if (_local2.length < 2) {
_local2 = "0" + _local2;
}
return((_local3 + _local1) + _local2);
}
function Pause(state) {
var _local1 = state;
gPause = _local1;
Driver1.FreezeState(_local1);
Driver2.FreezeState(_local1);
if (_local1) {
gPauseTime = getTimer();
} else {
gDogSkin1.play();
gSledSkin1.play();
gDogSkin2.play();
gSledSkin2.play();
Driver1.t = Driver1.t + (getTimer() - gPauseTime);
Driver2.t = Driver2.t + (getTimer() - gPauseTime);
}
}
function Back() {
PlayerPart.CleanUp();
count.removeMovieClip();
EngineSound1Inst.Stop();
EngineSound2Inst.Stop();
Key.removeListener(EngineSound1Inst);
Key.removeListener(EngineSound2Inst);
Driver1.Destroy();
Driver2.Destroy();
gotoAndPlay ("Intro");
gTrackOverlayInst.removeMovieClip();
gHighScoreDialogInst.removeMovieClip();
HUDInst.BackInst.enabled = true;
Sfx.StopAll();
}
function ResetRace() {
PlayerPart.CleanUp();
count.removeMovieClip();
EngineSound1Inst.Stop();
EngineSound2Inst.Stop();
Key.removeListener(EngineSound1Inst);
Key.removeListener(EngineSound2Inst);
Driver1.Destroy();
Driver2.Destroy();
gotoAndPlay ("Reset Race");
gHighScoreDialogInst.removeMovieClip();
HUDInst.BackInst.enabled = true;
Sfx.StopAll();
}
function cDriver(playerNum, driverClip, sledClip, startClip, fullLapClip, halfLapClip, AIList, AIPlayer, keys) {
var _local1 = this;
var _local3 = playerNum;
_local1.playerNum = _local3;
_local1.freeze = true;
_local1.pitReady = false;
_local1.clip = driverClip;
var _local2 = new Object();
_local2.x = startClip._x;
_local2.y = startClip._y;
gTrackInst.localToGlobal(_local2);
_local1.clip._x = _local2.x;
_local1.clip._y = _local2.y;
_local1.clip._rotation = startClip._rotation;
_local1.clip._visible = true;
_local1.clip.Col1Inst._visible = false;
_local1.clip.Col2Inst._visible = false;
_local1.sledClip = sledClip.duplicateMovieClip("sld" + _local3, (LAYER_DRIVER + (_local3 * 10)) + 1);
_local1.ang = (Math.PI/180) * _local1.clip._rotation;
_local1.seekAng = _local1.ang;
_local1.dir = new Vec2();
_local1.speed = 0;
_local1.accel = 0;
_local1.lastPos = new Vec2();
_local1.work = new Vec2();
_local1.work2 = new Vec2();
_local1.up = new Vec2(1, 0);
_local1.running = false;
_local1.cpu = AIPlayer;
_local1.way = 0;
_local1.wayList = AIList;
_local1.aiMaxSpeed = 4;
_local1.opponent = null;
_local1.lapFullClip = fullLapClip;
_local1.lapHalfClip = halfLapClip;
_local1.nextLapMarker = _local1.lapFullClip;
_local1.lap = -0.5;
_local1.t = -1;
_local1.finished = false;
_local1.finishTime = -1;
_local1.dist = 0;
if (keys == KEYS_PLAYER1) {
_local1.keyUp = 38;
_local1.keyLeft = 37;
_local1.keyRight = 39;
_local1.keyDown = 40;
EngineSound1Inst.SetKeys(_local1.keyUp, _local1.keyDown, _local1.keyLeft, _local1.keyRight, 32);
EngineSound1Inst.SetHornType(0);
} else {
_local1.keyUp = 87;
_local1.keyLeft = 65;
_local1.keyRight = 68;
_local1.keyDown = 83;
if (!_local1.cpu) {
EngineSound2Inst.SetKeys(_local1.keyUp, _local1.keyDown, _local1.keyLeft, _local1.keyRight, 88);
EngineSound2Inst.SetHornType(1);
}
}
_local1.dir.RadianToEulerAngle(_local1.ang);
_local1.sledClip._x = _local1.clip._x - _local1.dir.x;
_local1.sledClip._y = _local1.clip._y - _local1.dir.y;
_local1.PositionSled();
_local1.clip.Dog1Inst.stop();
_local1.clip.Dog2Inst.stop();
_local1.sledClip.stop();
_local1.skidCounter = 0;
}
function instructionsDone() {
PitInstructionsInst._visible = false;
pitStop.startGame();
}
function HideClipsInList(array) {
var _local2 = array;
var _local1 = 0;
while (_local1 < _local2.length) {
_local2[_local1]._visible = false;
_local1++;
}
}
function GameOver() {
delete onEnterFrame;
stopAllSounds();
_global.finishTime = Driver1.finishTime;
gotoAndStop ("SubmitScore");
}
function quitGame() {
delete onEnterFrame;
stopAllSounds();
gotoAndStop ("Title");
}
stop();
titleTuneClip.stopPlaying();
PitInstructionsInst._visible = false;
QuitDlgInst._visible = false;
cParticles.prototype.GetNumLayers = function () {
return(this.nl);
};
cParticles.prototype.CleanUp = function () {
var _local1 = this;
n = 0;
while (n < _local1.numParticles) {
_local1.particle[n].removeMovieClip();
n++;
}
delete _local1.particle;
delete _local1.free;
};
cParticles.prototype.Reset = function () {
var _local1 = this;
n = 0;
while (n < _local1.particle.length) {
if (_local1.particle[n]._visible) {
_local1.particle[n]._visible = false;
_local1.free.push(n);
}
n++;
}
};
cParticles.prototype.Add = function (x, y, life, rot, scale, dx, dy) {
var _local1 = life;
var _local2 = this;
if (_global.CullFx) {
} else if (_local2.free.length == 0) {
} else {
n = _local2.free.pop();
p = _local2.particle[n];
p._x = x;
p._y = y;
p._rotation = 0;
p._visible = true;
p._alpha = 100;
p._xscale = 100;
p._yscale = 100;
p.life = _local1;
p.maxLife = _local1;
p.fade = 100 / _local1;
p.rot = rot;
p.dx = dx;
p.dy = dy;
p.scale = scale;
}
};
cParticles.prototype.GetNumActive = function () {
return(this.particle.length);
};
cParticles.prototype.Update = function (dx, dy) {
var _local1 = this;
var _local2 = dy;
var _local3 = dx;
n = 0;
while (n < _local1.particle.length) {
p = _local1.particle[n];
if (p._visible) {
p.life--;
if (p.life <= 0) {
_local1.particle[n]._visible = false;
_local1.free.push(n);
} else {
p._rotation = p._rotation + p.rot;
p._alpha = p._alpha - p.fade;
p._x = p._x + (p.dx + _local3);
p._y = p._y + (p.dy + _local2);
p._xscale = p._xscale * p.scale;
p._yscale = p._yscale * p.scale;
}
}
n++;
}
};
cParticles.prototype.UpdateNoAlpha = function (dx, dy) {
var _local1 = this;
var _local2 = dy;
var _local3 = dx;
n = 0;
while (n < _local1.particle.length) {
p = _local1.particle[n];
if (p._visible) {
p.life--;
if (p.life <= 0) {
_local1.particle[n]._visible = false;
_local1.free.push(n);
} else {
p._rotation = p._rotation + p.rot;
p._x = p._x + (p.dx + _local3);
p._y = p._y + (p.dy + _local2);
p._xscale = p._xscale * p.scale;
p._yscale = p._yscale * p.scale;
}
}
n++;
}
};
LAYER_TRACK = 50;
LAYER_PARTICLES = 60;
LAYER_DRIVER = 100;
LAYER_TRACKOVERLAY = 195;
LAYER_FLAG = 200;
LAYER_WINNER1 = 300;
LAYER_WINNER2 = 400;
LAYER_HIGHSCORE = 500;
LAYER_COUNT = 600;
lapNum = 1;
penaltyTime = 0;
pitStop._visible = false;
gTrack = 0;
gTrackInst = Track1Inst;
gNumPlayers = 1;
gTeam = 0;
PlayerPart = new cParticles(32, LAYER_PARTICLES, SmokePartInst);
IntroAnimInst._visible = false;
IntroAnimInst.stop();
duplicateMovieClip (IntroAnimInst, "count", LAYER_COUNT);
Set(undefined, undefined);
AI = new Array();
trace("Building AI waypoint list");
n = 1;
qw = ("P" + n) + "Inst";
while (gTrackInst[qw] != undefined) {
trace("Found " + qw);
AI[n - 1] = gTrackInst[qw];
n++;
qw = ("P" + n) + "Inst";
}
gTrackInst._visible = true;
gTrackInst.OverlayInst._visible = false;
gTrackInst.enabled = true;
gTrackOverlayInst._visible = true;
Vec2.prototype.Len = function () {
var _local1 = this;
return(Math.sqrt((_local1.x * _local1.x) + (_local1.y * _local1.y)));
};
Vec2.prototype.Norm = function () {
var _local1 = this;
w = Math.sqrt((_local1.x * _local1.x) + (_local1.y * _local1.y));
if (w == 0) {
return(0);
}
_local1.x = _local1.x / w;
_local1.y = _local1.y / w;
return(w);
};
Vec2.prototype.Scale = function (s) {
this.x = this.x * s;
this.y = this.y * s;
};
Vec2.prototype.RadianToEulerAngle = function (a) {
this.x = Math.sin(a);
this.y = -Math.cos(a);
};
Vec2.prototype.Dot = function (v) {
return((this.x * v.x) + (this.y * v.y));
};
gPauseTime = 0;
gPause = false;
gWinner = -1;
KEYS_PLAYER1 = 0;
KEYS_PLAYER2 = 1;
MODE_SINGLEPLAYER = 0;
MODE_TWOPLAYERS = 1;
SKIN_RED = 0;
SKIN_BLUE = 1;
SKIN_YELLOW = 2;
NUM_LAPS = 4;
gTeam1 = SKIN_BLUE;
gTeam2 = SKIN_RED;
gPlayer1WinsAnimInst = Player1WinsAnimInst.duplicateMovieClip("p1w", LAYER_WINNER1);
gPlayer1WinsAnimInst._x = Player1WinsAnimInst._x;
gPlayer1WinsAnimInst._y = Player1WinsAnimInst._y;
Player1WinsAnimInst._visible = false;
gPlayer2WinsAnimInst = Player2WinsAnimInst.duplicateMovieClip("p2w", LAYER_WINNER2);
gPlayer2WinsAnimInst._x = Player2WinsAnimInst._x;
gPlayer2WinsAnimInst._y = Player2WinsAnimInst._y;
Player2WinsAnimInst._visible = false;
HighScoreDialogInst._visible = false;
gHighScoreDialogInst = HighScoreDialogInst.duplicateMovieClip("high", LAYER_HIGHSCORE);
gHighScoreDialogInst._visible = false;
gMode = MODE_TWOPLAYERS;
gDogSkin1 = null;
gSledSkin1 = null;
gDogSkin2 = null;
gSledSkin2 = null;
switch (gTeam1) {
case SKIN_RED :
gDogSkin1 = RedDogTeamInst;
gSledSkin1 = RedSledInst;
break;
case SKIN_BLUE :
gDogSkin1 = BlueDogTeamInst;
gSledSkin1 = BlueSledInst;
break;
case SKIN_YELLOW :
gDogSkin1 = YellowDogTeamInst;
gSledSkin1 = YellowSledInst;
}
switch (gTeam2) {
case SKIN_RED :
gDogSkin2 = RedDogTeamInst;
gSledSkin2 = RedSledInst;
break;
case SKIN_BLUE :
gDogSkin2 = BlueDogTeamInst;
gSledSkin2 = BlueSledInst;
break;
case SKIN_YELLOW :
gDogSkin2 = YellowDogTeamInst;
gSledSkin2 = YellowSledInst;
}
cDriver.prototype.Destroy = function () {
var _local1 = this;
_local1.clip.removeMovieClip();
_local1.sledClip.removeMovieClip();
};
cDriver.prototype.FreezeState = function (state) {
this.freeze = state;
};
cDriver.prototype.SetOpponent = function (driver) {
this.opponent = driver;
};
cDriver.prototype.PositionSled = function () {
var _local1 = this;
_local1.work.x = _local1.clip._x - _local1.sledClip._x;
_local1.work.y = _local1.clip._y - _local1.sledClip._y;
_local1.work.Norm();
var _local2 = Math.acos(_local1.up.Dot(_local1.work));
_local1.work.Scale(12);
_local1.sledClip._x = _local1.clip._x - _local1.work.x;
_local1.sledClip._y = _local1.clip._y - _local1.work.y;
if (_local1.work.y < 0) {
_local1.sledClip._rotation = 360 - (_local2 * 57.2957795130823);
} else {
_local1.sledClip._rotation = _local2 * 57.2957795130823;
}
_local1.colDelay = 0;
};
cDriver.prototype.Update = function () {
var _local1 = this;
if (_local1.freeze || (gPause)) {
} else {
if (_local1.t == -1) {
_local1.t = getTimer();
}
if (!_local1.finished) {
var time = ((getTimer() + (penaltyTime * 1000)) - _local1.t);
_local1.finishTime = time;
var sec = Math.floor(time / 1000);
var min = Math.floor(sec / 60);
sec = sec - (min * 60);
var hun = Math.floor((time - ((min * 60000) + (sec * 1000))) / 10);
min = "" + min;
sec = "" + sec;
hun = "" + hun;
if (min.length < 2) {
min = "0" + min;
}
if (sec.length < 2) {
sec = "0" + sec;
}
if (hun.length < 2) {
hun = "0" + hun;
}
if (_local1.playerNum == 0) {
HUDInst.Player1TimeString.text = (((min + ":") + sec) + ".") + hun;
} else {
HUDInst.Player2TimeString.text = (((min + ":") + sec) + ".") + hun;
}
}
if (_local1.cpu) {
if (_local1.wayList[_local1.way].hitTest(_local1.clip._x, _local1.clip._y, true)) {
_local1.way++;
if (_local1.way >= _local1.wayList.length) {
_local1.way = 0;
}
}
var wayStage = new Object();
wayStage.x = _local1.wayList[_local1.way]._x;
wayStage.y = _local1.wayList[_local1.way]._y;
gTrackInst.localToGlobal(wayStage);
_local1.work.x = _local1.clip._x - wayStage.x;
_local1.work.y = _local1.clip._y - wayStage.y;
_local1.work.Norm();
_local1.work2.RadianToEulerAngle(_local1.ang - (Math.PI/2));
_local1.work2.Norm();
var dot = _local1.work.Dot(_local1.work2);
if (dot < -0.1) {
_local1.ang = _local1.ang - 0.08;
} else if (dot > 0.1) {
_local1.ang = _local1.ang + 0.08;
}
_local1.accel = 0.1;
_local1.seekAng = _local1.ang;
} else {
if (Key.isDown(_local1.keyLeft)) {
_local1.seekAng = _local1.seekAng - 0.07;
} else if (Key.isDown(_local1.keyRight)) {
_local1.seekAng = _local1.seekAng + 0.07;
}
if (Key.isDown(_local1.keyUp)) {
_local1.accel = 0.1;
} else if (Key.isDown(_local1.keyDown)) {
_local1.accel = -0.1;
} else {
_local1.accel = 0;
}
}
_local1.ang = _local1.ang + ((_local1.seekAng - _local1.ang) * 0.15);
if (_local1.skidCounter > 0) {
_local1.skidCounter--;
}
if (((Math.abs(_local1.seekAng - _local1.ang) > 0.35) && (_local1.speed >= 4.5)) && (_local1.skidCounter == 0)) {
SFX_Screech.start();
_local1.skidCounter = 66;
var v = new Vec2(0, 0);
if (Math.random() > 0.5) {
_local1.clip.Part1MarkInst.localToGlobal(v);
} else {
_local1.clip.Part2MarkInst.localToGlobal(v);
}
var _local2 = 0;
while (_local2 < 5) {
var _local3 = (Math.random() * 2) - 1;
var yRand = ((Math.random() * 2) - 1);
PlayerPart.Add(v.x, v.y, 15, 1.01, 1.1, ((-_local1.dir.x) * 2) + _local3, ((-_local1.dir.y) * 2) + yRand);
_local2++;
}
}
_local1.work.x = _local1.clip.Col1Inst._x;
_local1.work.y = _local1.clip.Col1Inst._y;
_local1.clip.localToGlobal(_local1.work);
var c1 = (!gTrackInst.TrackGuideInst.hitTest(_local1.work.x, _local1.work.y, true));
if (!c1) {
c1 = _local1.opponent.clip.hitTest(_local1.work.x, _local1.work.y, false);
}
_local1.work.x = _local1.clip.Col2Inst._x;
_local1.work.y = _local1.clip.Col2Inst._y;
_local1.clip.localToGlobal(_local1.work);
var c2 = (!gTrackInst.TrackGuideInst.hitTest(_local1.work.x, _local1.work.y, true));
if (!c2) {
c2 = _local1.opponent.clip.hitTest(_local1.work.x, _local1.work.y, false);
}
if (c1 && (c2)) {
_local1.speed = _local1.speed * 0.75;
_local1.clip._x = _local1.lastPos.x;
_local1.clip._y = _local1.lastPos.y;
if ((_local1.speed > 3) && (_local1.colDelay == 0)) {
Sfx.Play(SFXID_Bump, 1);
_local1.colDelay = 5;
}
} else if (c1) {
_local1.ang = _local1.ang + 0.1;
_local1.speed = _local1.speed * 0.8;
if (_local1.colDelay == 0) {
if (_local1.speed > 3) {
Sfx.Play(SFXID_Bump, 1);
} else {
Sfx.Play(SFXID_Brush, 1);
}
_local1.colDelay = 5;
}
} else if (c2) {
_local1.ang = _local1.ang - 0.1;
_local1.speed = _local1.speed * 0.8;
if (_local1.colDelay == 0) {
if (_local1.speed > 3) {
Sfx.Play(SFXID_Bump, 1);
} else {
Sfx.Play(SFXID_Brush, 1);
}
_local1.colDelay = 5;
}
} else if (_local1.colDelay > 0) {
_local1.colDelay--;
}
_local1.dir.RadianToEulerAngle(_local1.ang);
if (Math.abs(_local1.accel) > 0) {
_local1.speed = _local1.speed + _local1.accel;
} else if (_local1.speed > 0) {
_local1.speed = _local1.speed - 0.2;
} else {
_local1.speed = 0;
}
if (_local1.speed < -2) {
_local1.speed = -2;
}
if (_local1.cpu) {
if ((_local1.opponent.dist + 400) > _local1.dist) {
_local1.aiMaxSpeed = 5.35;
} else {
_local1.aiMaxSpeed = 4.5;
}
if (_local1.speed > _local1.aiMaxSpeed) {
_local1.speed = _local1.aiMaxSpeed;
}
} else if (_local1.speed > 8) {
_local1.speed = 8;
}
_local1.lastPos.x = _local1.clip._x;
_local1.lastPos.y = _local1.clip._y;
_local1.clip._x = _local1.clip._x + (_local1.dir.x * _local1.speed);
_local1.clip._y = _local1.clip._y + (_local1.dir.y * _local1.speed);
_local1.clip._rotation = _local1.seekAng * 57.2957795130823;
_local1.work.x = Math.abs(_local1.clip._x - _local1.lastPos.x);
_local1.work.y = Math.abs(_local1.clip._y - _local1.lastPos.y);
_local1.dist = _local1.dist + _local1.work.Len();
if (_local1.nextLapMarker.hitTest(_local1.clip._x, _local1.clip._y, true)) {
if (_local1.nextLapMarker._name == "LapMarker2Inst") {
_local1.pitReady = true;
}
_local1.lap = _local1.lap + 0.5;
if (_local1.nextLapMarker == _local1.lapFullClip) {
if ((_local1.lap > 0.5) && (_local1.lap < NUM_LAPS)) {
Sfx.Play(SFXID_Beep1, 1);
}
_local1.nextLapMarker = _local1.lapHalfClip;
} else {
_local1.nextLapMarker = _local1.lapFullClip;
}
if (_local1.lap <= (NUM_LAPS - 1)) {
if (_local1.playerNum == 0) {
HUDInst.Player1LapString.text = (("LAP " + lapNum) + "/") + NUM_LAPS;
} else {
HUDInst.Player2LapString.text = (("LAP " + Math.floor(_local1.lap + 1)) + " OF ") + NUM_LAPS;
}
}
if (_local1.lap == NUM_LAPS) {
if (gWinner == -1) {
gWinner = _local1.playerNum;
if (_local1.playerNum == 0) {
EngineSound1Inst.SetKeys(-1, -1, -1, -1, 32);
gPlayer1WinsAnimInst.gotoAndPlay("Start");
} else {
EngineSound2Inst.SetKeys(-1, -1, -1, -1, 32);
gPlayer2WinsAnimInst.gotoAndPlay("Start");
}
Sfx.Play(SFXID_Beep2, 1);
}
_local1.cpu = true;
_local1.finished = true;
if ((gNumPlayers == 2) && (_local1.opponent.finished)) {
GameOver();
}
if (((gNumPlayers == 1) && (gWinner == 1)) && (_local1.playerNum == 0)) {
GameOver();
}
}
}
if (((!_local1.cpu) && (_local1.pitReady)) && (_local1.lap < (NUM_LAPS - 1))) {
if (gTrackInst.PitMarkerInst.hitTest(_local1.clip._x, _local1.clip._y, true)) {
Pause(true);
EngineSound1Inst.mute();
EngineSound2Inst.mute();
lapNum = Math.floor(_local1.lap) + 1;
pitStop.hideGameElements();
pitStop._visible = true;
if (firstPit) {
PitInstructionsInst._visible = true;
} else {
pitStop.startGame();
}
_local1.pitReady = false;
}
}
}
};
_global.showQuit = function () {
QuitDlgInst._visible = true;
};
gTrackInst.TrackGuideInst._visible = false;
SledInst._visible = false;
gTrackInst.StartMarker01Inst._visible = false;
gTrackInst.StartMarker02Inst._visible = false;
gTrackInst.LapMarker1Inst._visible = false;
gTrackInst.LapMarker2Inst._visible = false;
gTrackInst.PitMarkerInst._visible = false;
RedDogTeamInst._visible = false;
BlueDogTeamInst._visible = false;
YellowDogTeamInst._visible = false;
RedSledInst._visible = false;
BlueSledInst._visible = false;
YellowSledInst._visible = false;
titlePage = false;
HideClipsInList(AI);
if (gNumPlayers == 2) {
Driver1 = new cDriver(0, gDogSkin1, gSledSkin1, gTrackInst.StartMarker02Inst, gTrackInst.LapMarker1Inst, gTrackInst.LapMarker2Inst, AI, false, KEYS_PLAYER2);
Driver2 = new cDriver(1, gDogSkin2, gSledSkin2, gTrackInst.StartMarker01Inst, gTrackInst.LapMarker1Inst, gTrackInst.LapMarker2Inst, AI, false, KEYS_PLAYER1);
} else {
Driver1 = new cDriver(0, gDogSkin1, gSledSkin1, gTrackInst.StartMarker02Inst, gTrackInst.LapMarker1Inst, gTrackInst.LapMarker2Inst, AI, false, KEYS_PLAYER1);
}
Driver1.SetOpponent(Driver2);
Driver2.SetOpponent(Driver1);
EngineSound1Inst.StartEngine();
Key.addListener(EngineSound1Inst);
Key.addListener(EngineSound2Inst);
var ticks = 0;
var fStart = getTimer();
onEnterFrame = function () {
if (!fpsSent) {
ticks++;
if ((getTimer() - fStart) >= 5000) {
StatsTrackerInst.SendFrameRateInfo(8, ticks / 5);
fpsSent = true;
}
}
Driver1.Update();
Driver2.Update();
PlayerPart.Update();
};
Frame 110
stop();
var randTip = (1 + Math.round(Math.random() * 2));
TopTipInst.gotoAndStop("Page" + randTip);
Symbol 3 MovieClip [Timer] Frame 1
#initclip 10
Object.registerClass("Timer", fiab.utils.StopWatch);
#endinitclip
Symbol 19 MovieClip [VersionClip] Frame 1
#initclip 9
Object.registerClass("VersionClip", fiab.std.Version);
#endinitclip
Symbol 31 MovieClip Frame 1
function SendGameLaunched(appID) {
var _local1 = new LoadVars();
_local1.func = "PLAYED";
_local1.id = appID;
_local1.vers = version;
var _local2 = new Date();
_local1.date = (((((((((_local2.getFullYear() + "-") + _local2.getMonth()) + "-") + _local2.getDate()) + " ") + _local2.getHours()) + ":") + _local2.getMinutes()) + ":") + _local2.getSeconds();
_local1.sendAndLoad(url, _local1, "GET");
}
function SendFrameRateInfo(appID, averageFPS) {
var _local1 = new LoadVars();
_local1.func = "FRAMERATE";
_local1.id = appID;
_local1.avfps = averageFPS;
_local1.sendAndLoad(url, _local1, "GET");
}
function SendSystemInfo(appID) {
var _local1 = new LoadVars();
_local1.func = "SYSTEM";
_local1.id = appID;
_local1.language = System.capabilities.language;
_local1.os = System.capabilities.os;
_local1.screenx = System.capabilities.screenResolutionX;
_local1.screeny = System.capabilities.screenResolutionY;
_local1.player = getVersion();
_local1.sendAndLoad(url, _local1, "GET");
}
function SendSendToFriend(appID, useCode) {
var _local1 = new LoadVars();
_local1.func = "SENDTOAFRIEND";
_local1.id = appID;
_local1.code = useCode;
_local1.sendAndLoad(url, _local1, "GET");
}
function SendClickThru(appID, urlString) {
var _local1 = new LoadVars();
_local1.func = "CLICKTHRU";
_local1.id = appID;
_local1.url = urlString;
_local1.sendAndLoad(url, _local1, "GET");
}
var version = "1.2";
var url = "http://stats.fishinabottle.com/scripts/submitstats_using_get.php";
Symbol 380 MovieClip [__Packages.fiab.std.Version] Frame 0
class fiab.std.Version extends MovieClip
{
var VersionNumberInst, BuiltByInst, BuildDateInst, CopyrightInst, ContactInst, NotesInst, _visible;
function Version () {
var _local3 = this;
super();
_local3._visible = false;
var versionXML = (new fiab.utils.XMLProxy());
versionXML.proxyRef = _local3;
versionXML.ignoreWhite = true;
versionXML.onLoad = function (success) {
var _local3 = this;
if (success) {
var root = _local3.firstChild;
var _local2 = root.childNodes;
var _local1 = 0;
while (_local1 < _local2.length) {
switch (_local2[_local1].nodeName) {
case "number" :
_local3.proxyRef.VersionNumberInst.text = _local2[_local1].firstChild.nodeValue;
break;
case "builtby" :
_local3.proxyRef.BuiltByInst.text = _local2[_local1].firstChild.nodeValue;
break;
case "date" :
_local3.proxyRef.BuildDateInst.text = _local2[_local1].firstChild.nodeValue;
break;
case "copyright" :
_local3.proxyRef.CopyrightInst.text = _local2[_local1].firstChild.nodeValue;
break;
case "contact" :
_local3.proxyRef.ContactInst.text = _local2[_local1].firstChild.nodeValue;
break;
case "notes" :
_local3.proxyRef.NotesInst.text = _local2[_local1].firstChild.nodeValue;
}
_local1++;
}
}
};
versionXML.load("version.xml");
}
function get versionNumber() {
return(VersionNumberInst.text);
}
function get builtBy() {
return(BuiltByInst.text);
}
function get buildDate() {
return(BuildDateInst.text);
}
function get copyright() {
return(CopyrightInst.text);
}
function get contact() {
return(ContactInst.text);
}
function get notes() {
return(NotesInst.text);
}
function onEnterFrame() {
if (((Key.isDown(18) && (Key.isDown(17))) && (Key.isDown(16))) && (Key.isDown(86))) {
_visible = true;
} else {
_visible = false;
}
}
}
Symbol 381 MovieClip [__Packages.fiab.utils.XMLProxy] Frame 0
class fiab.utils.XMLProxy extends XML
{
function XMLProxy () {
super();
}
}
Symbol 382 MovieClip [__Packages.fiab.utils.StopWatch] Frame 0
class fiab.utils.StopWatch extends MovieClip
{
var __get__framerate, Value;
function StopWatch () {
super();
}
function set framerate(fps) {
this.fps = fps;
//return(__get__framerate());
}
function start() {
isRunning = true;
}
function stop() {
isRunning = false;
}
function reset() {
ticks = 0;
Value.text = "00:00.00";
}
function get time() {
return(Math.round((ticks / fps) * 100));
}
function getTicks() {
return(ticks);
}
function setTicks(t) {
ticks = t;
}
function onEnterFrame() {
var _local1 = this;
if (_local1.isRunning) {
_local1.ticks++;
var _local2 = _local1.ticks;
var _local3 = Math.floor(_local2 / (_local1.fps * 60));
var minsStr = String(_local3);
if (_local3 < 10) {
minsStr = "0" + String(_local3);
}
_local2 = _local2 - (_local3 * (_local1.fps * 60));
var secs = Math.floor(_local2 / _local1.fps);
var secsStr = String(secs);
if (secs < 10) {
secsStr = "0" + String(secs);
}
_local2 = _local2 - (secs * _local1.fps);
var hundreds = Math.floor((_local2 / _local1.fps) * 100);
var hundredsStr = String(hundreds);
if (hundreds < 10) {
hundredsStr = "0" + String(hundreds);
}
_local1.Value.text = (((minsStr + ":") + secsStr) + ".") + hundredsStr;
}
}
var isRunning = false;
var ticks = 0;
var fps = 18;
}
Symbol 383 MovieClip [__Packages.fiab.modules.hiscore.iScoreManager] Frame 0
interface fiab.modules.hiscore.iScoreManager{}
Symbol 384 MovieClip [__Packages.fiab.modules.hiscore.ScoreEntry] Frame 0
class fiab.modules.hiscore.ScoreEntry
{
function ScoreEntry (index, name, score) {
var _local1 = this;
_local1.index = index;
_local1.name = name;
_local1.score = score;
}
}
Symbol 385 MovieClip [__Packages.fiab.modules.hiscore.ScoreManager_local] Frame 0
class fiab.modules.hiscore.ScoreManager_local
{
var saveState, tableList;
function ScoreManager_local (scoreTableName, entryCount, tableType) {
var _local2 = this;
_local2.tableList = new Array();
_local2.entryCount = entryCount;
if (tableType == null) {
_local2.tableType = "descending";
} else {
_local2.tableType = tableType;
}
_local2.labelList = new Array();
var _local1 = 0;
while (_local1 < _local2.entryCount) {
_local2.labelList.push("n" + _local1);
_local2.labelList.push("s" + _local1);
_local1++;
}
_local2.saveState = new fiab.utils.SaveState(_local2.labelList, scoreTableName, "/");
}
function submit(name, score, tableName, tableId) {
var _local3 = this;
var _local2 = _local3.extractScores();
_local2.push(new fiab.modules.hiscore.ScoreEntry(11, name, score));
if (_local3.tableType == "ascending") {
_local2.sortOn("score", Array.NUMERIC);
} else if (_local3.tableType == "descending") {
_local2.sortOn("score", Array.NUMERIC | Array.DESCENDING);
}
var excessEntries = (_local2.length - _local3.entryCount);
var _local1 = 0;
while (_local1 < excessEntries) {
_local2.pop();
_local1++;
}
_local1 = 0;
while (_local1 < _local2.length) {
_local2[_local1].index = _local1 + 1;
_local1++;
}
_local1 = 0;
while (_local1 < _local2.length) {
_local3.saveState.setValue("n" + _local1, _local2[_local1].name);
_local3.saveState.setValue("s" + _local1, _local2[_local1].score);
_local1++;
}
_local3.onLoad(true);
}
function extractScores() {
var _local2 = this;
_local2.clearTable();
var _local1 = 0;
while (_local1 < _local2.entryCount) {
var _local3 = _local1 + 1;
if (_local2.saveState.getValue("n" + _local1) != null) {
var getName = _local2.saveState.getValue("n" + _local1);
var getScore = Number(_local2.saveState.getValue("s" + _local1));
_local2.tableList.push(new fiab.modules.hiscore.ScoreEntry(_local3, getName, getScore));
}
_local1++;
}
return(_local2.tableList);
}
function view(tableName, tableId) {
var _local2 = this;
var _local1 = _local2.extractScores();
if (_local2.tableType == "ascending") {
_local1.sortOn("score", Array.NUMERIC);
} else if (_local2.tableType == "descending") {
_local1.sortOn("score", Array.NUMERIC | Array.DESCENDING);
}
_local2.onLoad(true);
}
function getScore(index) {
var _local2 = this;
var _local3 = index;
var _local1 = 0;
while (_local1 < _local2.tableList.length) {
if (_local2.tableList[_local1].index == _local3) {
return(_local2.tableList[_local1]);
}
_local1++;
}
return(null);
}
function clearScores() {
saveState.clear();
clearTable();
}
function dump() {
saveState.dump();
}
function onLoad(success) {
trace("Hi score load success: " + success);
}
function clearTable() {
tableList.splice(0);
}
}
Symbol 386 MovieClip [__Packages.fiab.utils.SaveState] Frame 0
class fiab.utils.SaveState
{
var fileName, filePath;
function SaveState (labelList, dataSource, localPath) {
var _local1 = this;
_local1.dataLabels = labelList;
_local1.fileName = dataSource;
_local1.filePath = localPath;
var _local2 = SharedObject.getLocal(_local1.fileName, _local1.filePath);
if (_local2.data.d == null) {
_local2.data.d = new Array();
}
}
function findLabel(labelName) {
var _local2 = this;
var _local3 = labelName;
var _local1 = 0;
while (_local1 < _local2.dataLabels.length) {
if (_local2.dataLabels[_local1] == _local3) {
return(_local1);
}
_local1++;
}
return(-1);
}
function getValue(labelName) {
var _local3 = this;
var _local1 = _local3.findLabel(labelName);
if (_local1 == -1) {
return(null);
}
var getSO = SharedObject.getLocal(_local3.fileName, _local3.filePath);
var _local2 = getSO.data.d[_local1];
if (_local2 != undefined) {
return(String(_local2));
}
return(null);
}
function setValue(labelName, value) {
var _local2 = this;
var _local3 = _local2.findLabel(labelName);
var _local1 = SharedObject.getLocal(_local2.fileName, _local2.filePath);
_local1.data.d[_local3] = value;
_local1.flush();
}
function clear() {
var _local1 = SharedObject.getLocal(fileName, filePath);
_local1.data.d.splice(0);
_local1.flush();
}
function dump() {
var _local2 = this;
var dumpSO = SharedObject.getLocal(_local2.fileName, _local2.filePath);
trace("===============================");
trace(" ");
trace("Dumping contents of the saved state:");
trace(" ");
trace("Data label Value");
trace("---------- -----");
var _local3 = "";
var _local1 = 0;
while (_local1 < _local2.dataLabels.length) {
_local3 = (_local2.dataLabels[_local1] + " ") + dumpSO.data.d[_local1];
trace(_local3);
_local1++;
}
trace(" ");
trace("Data label items total count = " + _local2.dataLabels.length);
trace("Local data items total count = " + dumpSO.data.d.length);
trace(("Total size of SharedObject = " + dumpSO.getSize()) + " bytes");
trace(" ");
trace("Saved state dump done.");
trace("===============================");
trace(" ");
}
static function SaveStateMoveLocation(saveName, oldLocation, newLocation) {
var _local2 = SharedObject.getLocal(saveName);
if ((_local2 == null) || (!_local2.data.d)) {
return(false);
}
var _local3 = SharedObject.getLocal(saveName, newLocation);
if (_local3 == null) {
return(false);
}
_local3.data.d = new Array();
var _local1 = 0;
while (_local1 < _local2.data.d.length) {
_local3.data.d.push(_local2.data.d[_local1]);
_local1++;
}
for (var obj in _local2.data.d) {
delete _local2.data.d[obj];
}
delete _local2.data.d;
return(true);
}
}
Symbol 387 MovieClip [__Packages.fiab.modules.hiscore.ScoreManager_fiab] Frame 0
class fiab.modules.hiscore.ScoreManager_fiab
{
var tableList, scriptURL;
function ScoreManager_fiab (scriptURL) {
tableList = new Array();
this.scriptURL = scriptURL;
}
function submit(name, score, tableName, tableId) {
var _local2 = this;
var _local3 = name;
var scoreSubmit = new LoadVars();
scoreSubmit.cmd = "0";
scoreSubmit.game = tableName;
scoreSubmit.gameID = tableId;
scoreSubmit.name = _local3;
scoreSubmit.score = score;
var scoreResponse = new LoadVars();
scoreResponse.proxyRef = _local2;
_local2.clearTable();
scoreResponse.onLoad = function (success) {
trace(this.proxyRef.toString());
if (success) {
if (this.proxyRef.res == 0) {
switch (this.proxRef.err) {
case "0" :
trace("could not connect to SQL server");
break;
case "1" :
trace("could not access game table");
break;
case "2" :
trace("could not find the game");
break;
case "3" :
trace("could not find bad word table");
break;
case "4" :
trace("player name contains bad words");
break;
case "5" :
trace("player score is outside of score limits");
break;
case "6" :
trace("could not insert player score in score table");
break;
case "7" :
trace("game name and game id do not match");
break;
case "8" :
trace("wrong or missing POST variables received");
break;
default :
trace("Error code not recognised: " + this.proxyRef.err);
}
success = false;
} else {
var _local1 = 0;
while (_local1 < fiab.modules.hiscore.ScoreManager_fiab.MAX_ENTRIES) {
var index = (_local1 + 1);
var _local2 = this["n" + _local1];
var _local3 = Number(this["s" + _local1]);
if ((_local2 != undefined) && (_local3 != undefined)) {
this.proxyRef.tableList.push(new fiab.modules.hiscore.ScoreEntry(index, _local2, _local3));
}
_local1++;
}
}
} else {
trace("Server did not respond");
}
this.proxyRef.onLoad(success);
};
scoreSubmit.sendAndLoad(_local2.scriptURL, scoreResponse, "GET");
}
function view(tableName, tableId) {
var _local2 = this;
var scoreSubmit = new LoadVars();
scoreSubmit.cmd = "1";
scoreSubmit.game = tableName;
scoreSubmit.gameID = tableId;
scoreSubmit.forceCache = Math.round(Math.random() * 1000);
var scoreResponse = new LoadVars();
scoreResponse.proxyRef = _local2;
_local2.clearTable();
scoreResponse.onLoad = function (success) {
if (success) {
if (this.res == 0) {
switch (this.err) {
case "0" :
trace("could not connect to SQL server");
break;
case "1" :
trace("could not access game table");
break;
case "2" :
trace("could not find the game");
break;
case "3" :
trace("could not find bad word table");
break;
case "4" :
trace("player name contains bad words");
break;
case "5" :
trace("player score is outside of score limits");
break;
case "6" :
trace("could not insert player score in score table");
break;
case "7" :
trace("game name and game id do not match");
break;
case "8" :
trace("wrong or missing POST variables received");
break;
default :
trace("Error code not recognised: " + this.err);
}
success = false;
} else {
var _local1 = 0;
while (_local1 < fiab.modules.hiscore.ScoreManager_fiab.MAX_ENTRIES) {
var index = (_local1 + 1);
var _local2 = this["n" + _local1];
var _local3 = Number(this["s" + _local1]);
if ((_local2 != undefined) && (_local3 != undefined)) {
this.proxyRef.tableList.push(new fiab.modules.hiscore.ScoreEntry(index, _local2, _local3));
}
_local1++;
}
}
} else {
trace("Server did not respond");
}
this.proxyRef.onLoad(success);
};
scoreSubmit.sendAndLoad(_local2.scriptURL, scoreResponse, "GET");
}
function getScore(index) {
var _local2 = this;
var _local3 = index;
var _local1 = 0;
while (_local1 < _local2.tableList.length) {
if (_local2.tableList[_local1].index == _local3) {
return(_local2.tableList[_local1]);
}
_local1++;
}
return(null);
}
function onLoad(success) {
trace("Hi score load success: " + success);
}
function clearTable() {
var _local2 = this;
while (_local2.tableList.length > 0) {
var _local1 = _local2.tableList.pop();
}
}
static var MAX_ENTRIES = 10;
}
Symbol 54 MovieClip Frame 1
stop();
Symbol 58 MovieClip Frame 1
function StartEngine() {
SFXStart.start(0, 1);
}
function Increase() {
SFXIdle.stop();
SFXInc.start(d, 1);
}
function Decrease() {
var d;
SFXIdle.stop();
SFXDec.start(0, 1);
}
function SetKeys(up, down, left, right, space) {
KeyUp = up;
KeyDown = down;
KeyLeft = left;
KeyRight = right;
KeySpace = space;
}
function SetHornType(hornID) {
switch (hornID) {
case 0 :
HornSFX = SFXHorn1;
return;
case 1 :
HornSFX = SFXHorn2;
return;
case 2 :
HornSFX = SFXHorn3;
}
}
function Stop() {
SFXIdle.stop();
SFXStart.stop();
SFXInc.stop();
SFXLoop.stop();
SFXDec.stop();
}
function mute() {
SFXStart.setVolume(0);
SFXHorn1.setVolume(0);
}
function unMute() {
SFXStart.setVolume(20);
SFXHorn1.setVolume(80);
}
SFXStart = new Sound(this);
SFXStart.attachSound("basestartup.wav");
SFXStart.setVolume(20);
SFXIdle = new Sound(this);
SFXIdle.attachSound("idle.wav");
SFXIdle.setVolume(20);
SFXInc = new Sound(this);
SFXInc.attachSound("revup.wav");
SFXInc.setVolume(20);
SFXLoop = new Sound(this);
SFXLoop.attachSound("fullrevsloop.wav");
SFXLoop.setVolume(20);
SFXDec = new Sound(this);
SFXDec.attachSound("revdown.wav");
SFXHornClip = createEmptyMovieClip("hrn", 100);
SFXHorn1 = new Sound(SFXHornClip);
SFXHorn1.attachSound("horn01.wav");
SFXHorn2 = new Sound(SFXHornClip);
SFXHorn2.attachSound("horn02.wav");
SFXHorn3 = new Sound(SFXHornClip);
SFXHorn3.attachSound("horn03.wav");
SFXHorn3.setVolume(80);
SFXStart.onSoundComplete = function () {
SFXIdle.start(0, 99999);
};
SFXInc.onSoundComplete = function () {
SFXLoop.start(0, 99999);
};
SFXDec.onSoundComplete = function () {
SFXIdle.start(0, 99999);
};
KeyUp = 0;
KeyDown = 0;
KeyLeft = 0;
KeyRight = 0;
KeySpace = 0;
HornSFX = -1;
lastKey = -1;
onKeyDown = function () {
if ((Key.getCode() == KeyUp) && (lastKey != KeyUp)) {
Increase();
}
if ((Key.getCode() == KeySpace) && (lastKey != KeySpace)) {
HornSFX.start(0, 1);
}
lastKey = Key.getCode();
};
onKeyUp = function () {
if (Key.getCode() == KeyUp) {
Decrease();
lastKey = -1;
}
if (Key.getCode() == KeyDown) {
_parent.SFX_Reverse.stop();
lastKey = -1;
}
if (Key.getCode() == KeySpace) {
lastKey = -1;
}
};
Symbol 68 Button
on (release) {
StatsTrackerInst.SendGameLaunched(8);
gotoAndStop ("Game");
}
Symbol 70 Button
on (release) {
gotoAndStop ("Instructions");
}
Symbol 72 Button
on (release) {
scoreMan.view("KR_Track1", 87);
gotoAndStop ("HiScores");
}
Symbol 74 Button
on (release) {
gotoAndStop ("SendToAFriend");
}
Symbol 80 Button
on (release) {
_parent.submitScore(NameEntryInst.text);
}
Symbol 85 Button
on (release) {
_root.gotoAndStop("Title");
}
Symbol 89 Button
on (release) {
_parent.gotoAndStop("Title");
}
Symbol 91 Button
on (release) {
_parent.sendToAFriend(YourNameInst.text, FriendNameInst.text, EmailInst.text);
}
Symbol 104 Button
on (release) {
_parent.gotoAndStop("Tips");
}
Symbol 105 Button
on (release) {
_parent.challengeAFriend(YourNameInst.text, FriendNameInst.text, EmailInst.text);
}
Symbol 108 Button
on (release) {
_parent.closeLeaderboard();
}
Symbol 110 Button
on (release) {
_parent.gotoAndStop("ChallengeAFriend");
}
Symbol 141 Button
on (release) {
gotoAndStop ("Page2");
}
Symbol 153 Button
on (release) {
gotoAndStop ("Page1");
}
Symbol 163 Button
on (release) {
gotoAndStop ("Page3");
}
Symbol 166 Button
on (release) {
gotoAndStop ("Page2");
}
Symbol 170 MovieClip Frame 1
stop();
Symbol 291 Button
on (release) {
_global.showQuit();
}
Symbol 294 Button
on (release) {
_parent.exitPit();
}
Symbol 300 Button
on (release) {
_parent.orderSupply(3);
}
Symbol 301 Button
on (release) {
_parent.orderSupply(1);
}
Symbol 302 Button
on (release) {
_parent.orderSupply(5);
}
Symbol 303 Button
on (release) {
_parent.orderSupply(0);
}
Symbol 304 Button
on (release) {
_parent.orderSupply(2);
}
Symbol 305 Button
on (release) {
_parent.orderSupply(4);
}
Symbol 310 MovieClip Frame 1
function hideGameElements() {
i = 0;
while (i < 6) {
theCar["carPart" + i]._visible = false;
i++;
}
i = 0;
while (i < 5) {
eval ("engine" + i)._visible = false;
eval ("brakes" + i)._visible = false;
eval ("part" + i)._visible = false;
eval ("tyres" + i)._visible = false;
eval ("oil" + i)._visible = false;
eval ("windscreen" + i)._visible = false;
i++;
}
i = 0;
while (i < 6) {
eval ("supply" + i)._visible = false;
i++;
}
i = 0;
while (i < 6) {
eval ("supplyFull" + i)._visible = false;
i++;
}
hud.btn_Exit._visible = false;
i = 0;
while (i < 6) {
hud["Tip" + i]._visible = false;
i++;
}
}
function showSupplies() {
i = 0;
while (i < 6) {
if (suppliesFull[i] == true) {
eval ("supplyFull" + i)._visible = true;
eval ("supplyFull" + i)._alpha = 100;
eval ("supply" + i)._visible = false;
}
if (suppliesFull[i] == false) {
eval ("supply" + i)._visible = true;
eval ("supplyFull" + i)._visible = false;
}
i++;
}
}
function positionTools() {
engine0._x = -202;
engine0._y = -190;
engine1._x = 30;
engine1._y = -138;
engine2._x = -79;
engine2._y = 13;
engine3._x = 290;
engine3._y = 160;
engine4._x = 40;
engine4._y = 133;
brakes0._x = -213;
brakes0._y = -226;
brakes1._x = 155;
brakes1._y = -78;
brakes2._x = -290;
brakes2._y = 15;
brakes3._x = 190;
brakes3._y = 162;
brakes4._x = -52;
brakes4._y = 145;
part0._x = -116;
part0._y = -192;
part1._x = 47;
part1._y = -205;
part2._x = -61;
part2._y = -23;
part3._x = -274;
part3._y = 200;
part4._x = -133;
part4._y = 142;
tyres0._x = -123;
tyres0._y = -143;
tyres1._x = -28;
tyres1._y = -189;
tyres2._x = 118;
tyres2._y = -7;
tyres3._x = 67;
tyres3._y = 163;
tyres4._x = -111;
tyres4._y = 162;
oil0._x = -216;
oil0._y = -92;
oil1._x = 162;
oil1._y = -187;
oil2._x = -276;
oil2._y = -61;
oil3._x = -204;
oil3._y = 173;
oil4._x = 279;
oil4._y = -21;
windscreen0._x = -102;
windscreen0._y = -87;
windscreen1._x = -11;
windscreen1._y = -77;
windscreen2._x = 219;
windscreen2._y = -39;
windscreen3._x = -28;
windscreen3._y = 224;
windscreen4._x = -201;
windscreen4._y = 165;
}
function showTools() {
if (toolInPlace[0] == true) {
engine0._visible = true;
} else {
rNum = Math.floor(random(3) + 1);
eval ("engine" + rNum)._visible = true;
}
if (toolInPlace[1] == true) {
brakes0._visible = true;
} else {
rNum = Math.floor(random(3) + 1);
eval ("brakes" + rNum)._visible = true;
}
if (toolInPlace[2] == true) {
part0._visible = true;
} else {
rNum = Math.floor(random(3) + 1);
eval ("part" + rNum)._visible = true;
}
if (toolInPlace[3] == true) {
tyres0._visible = true;
} else {
rNum = Math.floor(random(3) + 1);
eval ("tyres" + rNum)._visible = true;
}
if (toolInPlace[4] == true) {
oil0._visible = true;
} else {
rNum = Math.floor(random(3) + 1);
eval ("oil" + rNum)._visible = true;
}
if (toolInPlace[5] == true) {
windscreen0._visible = true;
} else {
rNum = Math.floor(random(3) + 1);
eval ("windscreen" + rNum)._visible = true;
}
}
function pickTasks() {
i = 0;
while (i < numberOfTasks) {
arrayNum = taskList.length;
rNum = Math.floor(random(arrayNum));
taskToDo[i] = taskList.splice(rNum, 1);
i++;
}
showTask();
}
function showTask() {
num = taskToDo[taskNum];
theCar["carPart" + num]._visible = true;
toolRequired = parseInt(num);
checkToolFlash();
}
function checkToolFlash() {
if (toolInPlace[toolRequired] == true) {
switch (toolRequired) {
case 0 :
toolToFlash = engine0;
break;
case 1 :
toolToFlash = brakes0;
break;
case 2 :
toolToFlash = part0;
break;
case 3 :
toolToFlash = tyres0;
break;
case 4 :
toolToFlash = oil0;
break;
case 5 :
toolToFlash = windscreen0;
}
flashingTool = toolToFlash;
} else {
flashingTool = null;
}
}
function flashTool() {
if (flashingTool != null) {
if (flashBool) {
flashingTool._alpha = 20;
flashBool = false;
} else {
flashingTool._alpha = 100;
flashBool = true;
}
}
}
function nextTask() {
clearInterval(intervalNextTask);
eval ("supplyfull" + toolPickedID)._visible = false;
eval ("supply" + toolPickedID).goToAndStop(1);
if (taskNum < (numberOfTasks - 1)) {
taskNum++;
showTask();
} else {
tasksComplete();
}
}
function dragMe(thisClip, toolID) {
var _local1 = thisClip;
var _local2 = _root;
hideGamePrompt();
_local2.pitStop[_local1]._alpha = 100;
toolPickedID = toolID;
if (toolRequired == toolPickedID) {
flashingTool._alpha = 100;
flashingTool = null;
}
if ((!toolPicked) || (currClip == _local1)) {
stopDropping(_global.pitStopClip[_local1]);
toolPicked = true;
_local2.pitStop[_local1].startDrag();
_local2.pitStop[_local1].swapDepths(topDepth);
topDepth++;
if (currClip == _local1) {
currClip = "";
} else {
currClip = _local1;
}
}
}
function dropMe(thisClip) {
var _local1 = thisClip;
_root.pitStop[_local1].stopDrag();
if ((((_ymouse >= -205) && (_ymouse <= -22)) && (_xmouse <= -60)) && (_xmouse >= -260)) {
stopFalling(_global.pitStopClip[_local1]);
lockPosition(_local1);
} else {
toolInPlace[toolPickedID] = false;
checkRepair(_local1);
fallingList.push(_global.pitStopClip[_local1]);
}
toolPicked = false;
}
function lockPosition(thisClip) {
_root.pitStop[thisClip]._visible = false;
switch (toolPickedID) {
case 0 :
tmpClip = "engine0";
break;
case 1 :
tmpClip = "brakes0";
break;
case 2 :
tmpClip = "part0";
break;
case 3 :
tmpClip = "tyres0";
break;
case 4 :
tmpClip = "oil0";
break;
case 5 :
tmpClip = "windscreen0";
}
_root.pitStop[tmpClip]._visible = true;
_root.pitStop[tmpClip]._alpha = 100;
_root.pitStop[tmpClip]._x = eval ("X" + tmpClip);
_root.pitStop[tmpClip]._y = eval ("Y" + tmpClip);
toolInPlace[toolPickedID] = true;
}
function checkRepair(thisClip) {
theClip = _root.pitStop[thisClip];
if (allTasksDone) {
return(undefined);
}
if (toolPickedID == toolRequired) {
correctTool = true;
}
if (theClip.hitTest(theCar)) {
if (correctTool) {
if (suppliesFull[toolPickedID] == true) {
fixCar(theClip);
correctTool = false;
} else {
showGamePrompt(promptArray[2]);
}
} else {
showGamePrompt(promptArray[1]);
}
}
}
function dropTool() {
var _local1 = 0;
while (_local1 < fallingList.length) {
if (fallingList[_local1]._y <= toolDropDepth) {
fallingList[_local1]._y = fallingList[_local1]._y + toolDropSpeed;
} else {
fallingList.splice(_local1, 1);
toolPicked = false;
}
_local1++;
}
}
function stopDropping(clipToStop) {
var _local2 = clipToStop;
var _local1 = 0;
while (_local1 < fallingList.length) {
if (fallingList[_local1] == _local2) {
fallingList.splice(_local1, 1);
toolPicked = false;
return;
}
_local1++;
}
}
function fixCar(tool) {
if (tool.hitTest(theCar["carPart" + toolPickedID])) {
eval ("supply" + toolPickedID)._visible = true;
theCar["carPart" + toolPickedID]._visible = false;
suppliesFull[toolPickedID] = false;
if (_parent.firstPit) {
hud["Tip" + toolPickedID]._visible = true;
}
intervalNextTask = setInterval(nextTask, 1000);
}
}
function orderSupply(supplyNum) {
if (!this["supplyFull" + supplyNum]._visible) {
hideGamePrompt();
if (suppliesFull[supplyNum]) {
return(undefined);
}
if (supplyOrdered[supplyNum] == true) {
eval ("supply" + supplyNum).gotoAndStop(1);
eval ("supplyFull" + supplyNum)._alpha = 40;
eval ("supplyFull" + supplyNum)._visible = true;
suppliesFull[supplyNum] = true;
} else if (!supplyWaiting[supplyNum]) {
supplyWaiting[supplyNum] = true;
_global.pitStopClip["supplyFull" + supplyNum]._alpha = 0;
restockInterval[supplyNum] = setInterval(reOrderSupply, 250, supplyNum);
}
hud["Tip" + supplyNum]._visible = false;
}
}
function reOrderSupply(supplyNum) {
var _local1 = supplyNum;
var _local2 = _global.pitStopClip["supplyFull" + _local1];
if (_local2._alpha < 100) {
_local2._alpha = _local2._alpha + 10;
_local2._visible = true;
} else {
supplyOrdered[_local1] = true;
_local2._alpha = 100;
clearInterval(restockInterval[_local1]);
suppliesFull[_local1] = true;
supplyWaiting[_local1] = false;
_global.pitStopClip["supply" + _local1]._visible = false;
}
}
function startPitTimer() {
pitSecs++;
interval++;
tSecs = interval % 100;
if (interval >= 100) {
secs++;
interval = 0;
}
if (secs >= 60) {
secs = 0;
mins++;
}
if (interval < 10) {
tSecString = "0";
} else {
tSecString = "";
}
if (secs < 10) {
secString = "0";
} else {
secString = "";
}
if (mins < 10) {
minString = "0";
} else {
minString = "";
}
hud.pitTime = ((((((("" + minString) + mins) + ":") + secString) + secs) + ".") + tSecString) + tSecs;
}
function tasksComplete() {
allTasksDone = true;
hud.btn_exit._visible = true;
}
function exitPit() {
_root.lapNum++;
var _local1 = hud.TimerInst.time / 100;
i = 0;
while (i < 6) {
if (suppliesFull[i] == true) {
supplyOrdered[i] = true;
} else {
supplyOrdered[i] = false;
}
if (toolInPlace[0]) {
engine0._alpha = 100;
}
if (toolInPlace[1]) {
brakes0._alpha = 100;
}
if (toolInPlace[2]) {
part0._alpha = 100;
}
if (toolInPlace[3]) {
tyres0._alpha = 100;
}
if (toolInPlace[4]) {
oil0._alpha = 100;
}
if (toolInPlace[5]) {
windscreen0._alpha = 100;
}
i++;
}
clearInterval(mySetInterval);
_root.onPitStopComplete(_local1);
}
function initiatePitStop() {
var _local1 = _global;
gamePrompt.swapDepths(10000);
flashingTool = null;
clearInterval(_local1.toolFlash);
_local1.toolFlash = setInterval(flashTool, 500);
clearInterval(_local1.dropToolInterval);
_local1.dropToolInterval = setInterval(dropTool, 10);
i = 0;
while (i < restockInterval.length) {
clearInterval(restockInterval[i]);
i++;
}
suppliesFull = new Array();
supplyOrdered = new Array();
supplyWaiting = new Array();
restockInterval = new Array();
toolInPlace = new Array();
fallingList = new Array();
i = 0;
while (i < 6) {
suppliesFull[i] = true;
supplyOrdered[i] = true;
supplyWaiting[i] = false;
restockInterval[i] = 0;
toolInPlace[i] = true;
i++;
}
alpha = 40;
gamePrompt._visible = true;
}
function showGamePrompt(gameText) {
gamePrompt.promptText = gameText;
gamePrompt._visible = true;
}
function hideGamePrompt() {
gamePrompt.promptText = "";
gamePrompt._visible = false;
}
function startPitStop() {
allTasksDone = false;
hud.lapCounter = ("LAP" + _root.lapNum) + "/4";
showGamePrompt(promptArray[0]);
gamePrompt._visible = false;
tsecs = 0;
secs = 0;
mins = 0;
taskNum = 0;
numberOfTasks = 3;
toolDropDepth = 140;
toolDropSpeed = 8;
toolPicked = false;
flashBool = true;
dropToolAllowed = true;
topDepth = 50;
taskList = new Array(0, 1, 2, 3, 4, 5);
taskToDo = new Array();
if (_root.lapNum == 1) {
initiatePitStop();
}
hideGameElements();
positionTools();
showSupplies();
showTools();
pickTasks();
hud.TimerInst.reset();
hud.TimerInst.start();
}
function startGame(vehicleDamage) {
startPitStop(vehicleDamage);
}
stop();
var secs;
var mins;
var hours;
var interval;
var defineTaskList;
var taskList;
var taskToDo;
var taskNum;
var toolPutBack;
var topDepth;
var currClip;
var toolPicked;
var intervalNextTask;
var toolRequired;
var toolPickedID;
var suppliesFull;
var toolInPlace;
var toolFlash;
var toolToFlash;
var flashBool;
var supplyOrdered;
var supplyWaiting;
var restockInterval;
var alpha;
var promptArray;
var flashingTool;
var allTasksDone;
var fallingList;
_global.pitStopClip = this;
promptArray = new Array();
promptArray[0] = "Drag the flashing tool onto the car";
promptArray[1] = "Nope, try a different tool";
promptArray[2] = "Out of Stock! - click product to re-order";
Xengine0 = -202;
Yengine0 = -190;
Xbrakes0 = -213;
Ybrakes0 = -226;
Xpart0 = -116;
Ypart0 = -192;
Xtyres0 = -123;
Ytyres0 = -143;
Xoil0 = -216;
Yoil0 = -92;
Xwindscreen0 = -102;
Ywindscreen0 = -87;
Instance of Symbol 181 MovieClip "part1" in Symbol 310 MovieClip Frame 1
on (press) {
_parent.dragMe("part1", 2);
}
on (release) {
_parent.dropMe("part1");
}
Instance of Symbol 183 MovieClip "engine1" in Symbol 310 MovieClip Frame 1
on (press) {
_parent.dragMe("engine1", 0);
}
on (release) {
_parent.dropMe("engine1");
}
Instance of Symbol 185 MovieClip "windscreen1" in Symbol 310 MovieClip Frame 1
on (press) {
_parent.dragMe("windscreen1", 5);
}
on (release) {
_parent.dropMe("windscreen1");
}
Instance of Symbol 187 MovieClip "brakes1" in Symbol 310 MovieClip Frame 1
on (press) {
_parent.dragMe("brakes1", 1);
}
on (release) {
_parent.dropMe("brakes1");
}
Instance of Symbol 189 MovieClip "tyres1" in Symbol 310 MovieClip Frame 1
on (press) {
_parent.dragMe("tyres1", 3);
}
on (release) {
_parent.dropMe("tyres1");
}
Instance of Symbol 191 MovieClip "oil1" in Symbol 310 MovieClip Frame 1
on (press) {
_parent.dragMe("oil1", 4);
}
on (release) {
_parent.dropMe("oil1");
}
Instance of Symbol 191 MovieClip "oil2" in Symbol 310 MovieClip Frame 1
on (press) {
_parent.dragMe("oil2", 4);
}
on (release) {
_parent.dropMe("oil2");
}
Instance of Symbol 181 MovieClip "part2" in Symbol 310 MovieClip Frame 1
on (press) {
_parent.dragMe("part2", 2);
}
on (release) {
_parent.dropMe("part2");
}
Instance of Symbol 183 MovieClip "engine2" in Symbol 310 MovieClip Frame 1
on (press) {
_parent.dragMe("engine2", 0);
}
on (release) {
_parent.dropMe("engine2");
}
Instance of Symbol 185 MovieClip "windscreen2" in Symbol 310 MovieClip Frame 1
on (press) {
_parent.dragMe("windscreen2", 5);
}
on (release) {
_parent.dropMe("windscreen2");
}
Instance of Symbol 187 MovieClip "brakes2" in Symbol 310 MovieClip Frame 1
on (press) {
_parent.dragMe("brakes2", 1);
}
on (release) {
_parent.dropMe("brakes2");
}
Instance of Symbol 189 MovieClip "tyres2" in Symbol 310 MovieClip Frame 1
on (press) {
_parent.dragMe("tyres2", 3);
}
on (release) {
_parent.dropMe("tyres2");
}
Instance of Symbol 203 MovieClip "brakes0" in Symbol 310 MovieClip Frame 1
on (press) {
_parent.dragMe("brakes0", 1);
}
on (release) {
_parent.dropMe("brakes0");
}
Instance of Symbol 205 MovieClip "tyres0" in Symbol 310 MovieClip Frame 1
on (press) {
_parent.dragMe("tyres0", 3);
}
on (release) {
_parent.dropMe("tyres0");
}
Instance of Symbol 207 MovieClip "engine0" in Symbol 310 MovieClip Frame 1
on (press) {
_parent.dragMe("engine0", 0);
}
on (release) {
_parent.dropMe("engine0");
}
Instance of Symbol 209 MovieClip "part0" in Symbol 310 MovieClip Frame 1
on (press) {
_parent.dragMe("part0", 2);
}
on (release) {
_parent.dropMe("part0");
}
Instance of Symbol 211 MovieClip "windscreen0" in Symbol 310 MovieClip Frame 1
on (press) {
_parent.dragMe("windscreen0", 5);
}
on (release) {
_parent.dropMe("windscreen0");
}
Instance of Symbol 213 MovieClip "oil0" in Symbol 310 MovieClip Frame 1
on (press) {
_parent.dragMe("oil0", 4);
}
on (release) {
_parent.dropMe("oil0");
}
Instance of Symbol 243 MovieClip "oil4" in Symbol 310 MovieClip Frame 1
on (press) {
_parent.dragMe("oil4", 4);
}
on (release) {
_parent.dropMe("oil4");
}
Instance of Symbol 244 MovieClip "part4" in Symbol 310 MovieClip Frame 1
on (press) {
_parent.dragMe("part4", 2);
}
on (release) {
_parent.dropMe("part4");
}
Instance of Symbol 245 MovieClip "engine4" in Symbol 310 MovieClip Frame 1
on (press) {
_parent.dragMe("engine4", 0);
}
on (release) {
_parent.dropMe("engine4");
}
Instance of Symbol 246 MovieClip "brakes4" in Symbol 310 MovieClip Frame 1
on (press) {
_parent.dragMe("brakes4", 1);
}
on (release) {
_parent.dropMe("brakes4");
}
Instance of Symbol 247 MovieClip "tyres4" in Symbol 310 MovieClip Frame 1
on (press) {
_parent.dragMe("tyres4", 3);
}
on (release) {
_parent.dropMe("tyres4");
}
Instance of Symbol 248 MovieClip "windscreen4" in Symbol 310 MovieClip Frame 1
on (press) {
_parent.dragMe("windscreen4", 5);
}
on (release) {
_parent.dropMe("windscreen4");
}
Instance of Symbol 258 MovieClip "supply1" in Symbol 310 MovieClip Frame 1
on (release) {
_parent.orderSupply(1);
}
Instance of Symbol 261 MovieClip "supply5" in Symbol 310 MovieClip Frame 1
on (release) {
_parent.orderSupply(5);
}
Instance of Symbol 265 MovieClip "supply3" in Symbol 310 MovieClip Frame 1
on (release) {
_parent.orderSupply(3);
}
Instance of Symbol 268 MovieClip "supply0" in Symbol 310 MovieClip Frame 1
on (release) {
_parent.orderSupply(0);
}
Instance of Symbol 271 MovieClip "supply2" in Symbol 310 MovieClip Frame 1
on (release) {
_parent.orderSupply(2);
}
Instance of Symbol 274 MovieClip "supply4" in Symbol 310 MovieClip Frame 1
on (release) {
_parent.orderSupply(4);
}
Instance of Symbol 243 MovieClip "oil3" in Symbol 310 MovieClip Frame 1
on (press) {
_parent.dragMe("oil3", 4);
}
on (release) {
_parent.dropMe("oil3");
}
Instance of Symbol 244 MovieClip "part3" in Symbol 310 MovieClip Frame 1
on (press) {
_parent.dragMe("part3", 2);
}
on (release) {
_parent.dropMe("part3");
}
Instance of Symbol 245 MovieClip "engine3" in Symbol 310 MovieClip Frame 1
on (press) {
_parent.dragMe("engine3", 0);
}
on (release) {
_parent.dropMe("engine3");
}
Instance of Symbol 248 MovieClip "windscreen3" in Symbol 310 MovieClip Frame 1
on (press) {
_parent.dragMe("windscreen3", 5);
}
on (release) {
_parent.dropMe("windscreen3");
}
Instance of Symbol 246 MovieClip "brakes3" in Symbol 310 MovieClip Frame 1
on (press) {
_parent.dragMe("brakes3", 1);
}
on (release) {
_parent.dropMe("brakes3");
}
Instance of Symbol 247 MovieClip "tyres3" in Symbol 310 MovieClip Frame 1
on (press) {
_parent.dragMe("tyres3", 3);
}
on (release) {
_parent.dropMe("tyres3");
}
Symbol 328 MovieClip Frame 1
_visible = false;
Symbol 345 MovieClip Frame 1
stop();
Symbol 345 MovieClip Frame 2
play();
Symbol 345 MovieClip Frame 50
stop();
if (_parent.gNumPlayers == 1) {
_parent.GameOver();
}
Symbol 347 MovieClip Frame 1
stop();
Symbol 347 MovieClip Frame 2
play();
Symbol 347 MovieClip Frame 50
stop();
Symbol 356 MovieClip Frame 52
_root.Driver1.FreezeState(false);
_root.Driver2.FreezeState(false);
_root.Sfx.Play(_root.SFXID_Loop1, 9999);
Symbol 356 MovieClip Frame 62
stop();
Symbol 357 Button
on (release) {
_parent.instructionsDone();
}
Symbol 360 MovieClip Frame 1
stop();
Symbol 365 Button
on (release) {
this._visible = false;
}
Symbol 367 Button
on (release) {
_parent.quitGame();
}
Symbol 374 Button
on (release) {
_parent.StatsTrackerInst.SendClickThru(8, "http://www.kaizenracing.co.uk");
getURL ("http://www.kaizenracing.co.uk", "_blank");
}
Symbol 379 MovieClip Frame 1
stop();
Symbol 379 MovieClip Frame 10
stop();
Symbol 379 MovieClip Frame 20
stop();