Frame 1
StringTable = function (xmlFile) {
this.table = new Array();
this.loadData(xmlFile);
};
StringTable.prototype.loadData = function (source) {
this.xmlFile = new XML();
this.xmlFile.load(source);
this.xmlFile.ignoreWhite = true;
this.xmlFile.notify = this;
this.xmlFile.onLoad = function () {
var stringID = "";
var stringValue = "";
var obj = this.firstChild.childNodes;
var n = 0;
while (n < obj.length) {
if (!(obj[n].nodeName === "string")) {
} else {
stringID = obj[n].attributes.id;
stringValue = obj[n].firstChild.nodeValue;
this.notify.table[stringID] = stringValue;
}
n++;
}
this.notify.loaded = true;
if (this.notify.onLoad != null) {
this.notify.onLoad();
}
delete this;
};
};
StringTable.prototype.get = function (stringID) {
return(this.table[stringID]);
};
StringTable.prototype.getBytesLoaded = function () {
return(this.xmlFile.getBytesLoaded());
};
StringTable.prototype.getBytesTotal = function () {
return(this.xmlFile.getBytesTotal());
};
StringTable.prototype.getPercentLoaded = function () {
if (this.xmlFile.getBytesTotal() <= 0) {
return(0);
}
var perc = Math.round((this.xmlFile.getBytesTotal() / this.xmlFile.getBytesTotal()) * 100);
return(perc);
};
StringTable.prototype.dump = function () {
trace("===============================");
trace(" ");
trace("Dumping the String Table:");
trace(" ");
trace("String ID Value");
trace("--------- -----");
for (var obj in this.table) {
trace((obj + " ") + this.table[obj]);
}
trace(" ");
trace("String Table dump done.");
trace("===============================");
trace(" ");
};
fscommand ("trapallkeys", "true");
fscommand ("allowscale", "false");
gStrTable = new StringTable("HRStrings.xml");
stop();
onEnterFrame = function () {
var progress = ((_root.getBytesLoaded() + _root.stringTable.getBytesLoaded()) / (_root.getBytesTotal() + _root.stringTable.getBytesTotal()));
var perc = Math.round(progress * 100);
BarInst._xscale = perc;
if ((perc >= 100) && (_root.gStrTable.loaded)) {
_root.play();
}
};
Frame 10
function cSFXEngine() {
this.samp = new Array();
this.restoreVol = new Array();
this.loop = new Array();
this.name = new Array();
this.state = new Array();
this.idx = 0;
this.ctrl = new Sound();
this.proc = SE_IDLE;
this.vol = 75;
this.ctrl.setVolume(this.vol);
this.managerMuted = false;
}
function cStageShake() {
this.state = false;
}
SE_IDLE = 0;
SE_FADEDOWN = 1;
cSFXEngine.prototype.Destroy = function () {
delete this.samp;
delete this.restoreVol;
delete this.loop;
delete this.name;
delete this.state;
delete this.ctrl;
};
cSFXEngine.prototype.SetVol = function (idx, vol) {
if (this.managerMuted) {
return(undefined);
}
this.samp[idx].setVolume(vol);
};
cSFXEngine.prototype.SetVolAll = function (vol) {
var n = 0;
while (n < this.samp.length) {
this.SetVol(n, vol);
n++;
}
};
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) {
this.vol = vol;
this.ctrl.setVolume(this.vol);
};
cSFXEngine.prototype.MuteMasterVol = function () {
this.proc = SE_FADEDOWN;
};
cSFXEngine.prototype.RestoreMasterVol = function () {
this.ctrl.setVolume(this.vol);
};
cSFXEngine.prototype.StopAll = function () {
var n = 0;
while (n < this.state.length) {
this.samp[n].stop();
this.state[n] = false;
n++;
}
};
cSFXEngine.prototype.MuteAll = function () {
var n = 0;
while (n < this.samp.length) {
this.Mute(n);
n++;
}
this.managerMuted = true;
};
cSFXEngine.prototype.RestoreAll = function () {
this.managerMuted = false;
var n = 0;
while (n < this.samp.length) {
this.Restore(n);
n++;
}
};
cSFXEngine.prototype.Add = function (name, clip) {
if (clip == null) {
clip = _root.createEmptyMovieClip(name, this.idx);
}
this.samp[this.idx] = new Sound(clip);
this.samp[this.idx].attachSound(name);
this.restoreVol[this.idx] = 100;
this.name[this.idx] = name;
this.state[this.idx] = false;
return(this.idx++);
};
cSFXEngine.prototype.Play = function (idx, loopnum) {
this.samp[idx].start(0, loopnum);
this.state[idx] = true;
};
cSFXEngine.prototype.Stop = function (idx) {
this.samp[idx].stop(this.name[idx]);
this.state[idx] = false;
};
cSFXEngine.prototype.Mute = function (idx) {
if (this.managerMuted || (this.GetVol(idx) <= 0)) {
return(undefined);
}
this.restoreVol[idx] = this.GetVol(idx);
this.SetVol(idx, 0);
};
cSFXEngine.prototype.Restore = function (idx) {
if (this.managerMuted || (this.GetVol(idx) > 0)) {
return(undefined);
}
this.SetVol(idx, this.restoreVol[idx]);
};
cSFXEngine.prototype.IsPlaying = function (idx) {
return(this.state[idx]);
};
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_Bark1 = Sfx.Add("Bark5.wav", this);
SFXID_Bark2 = Sfx.Add("Bark7.wav", this);
SFXID_Bark3 = Sfx.Add("Bark8.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);
cStageShake.prototype.Impulse = function () {
this.dy = 0;
this.f = 1;
this.state = true;
};
cStageShake.prototype.Update = function () {
if (!this.state) {
_y = 0;
return(undefined);
}
this.dy = -5 + (Math.random() * 10);
_y = (this.dy * this.f);
this.f = this.f - 0.2;
if (this.f <= 0) {
this.state = false;
}
};
StageShake = new cStageShake();
onEnterFrame = function () {
StageShake.Update();
};
Frame 60
function cParticles(numParticles, layer, sourceMovieClip, maskMovieClip) {
this.particle = new Array();
this.numParticles = numParticles;
this.free = new Array();
var i = 0;
n = 0;
while (n < numParticles) {
this.particle.push(sourceMovieClip.duplicateMovieClip(("p" + layer) + i, layer + (i++)));
p = this.particle[n];
if ((maskMovieClip != undefined) && (maskMovieClip != null)) {
p.setMask(maskMovieClip.duplicateMovieClip(("m" + layer) + i, layer + (i++)));
}
p._x = 0;
p._y = 0;
p._visible = false;
p.life = 100;
this.free.push(n);
n++;
}
this.nl = i;
}
function cModeSelectionArrows() {
this.SetSelection(SELECT_INSTRUCTIONS);
}
function cKeyHandler() {
this.noKey = true;
Key.addListener(this);
}
function TransitionFlakes() {
var n = 0;
while (n < 24) {
FlakeParticleMakerInst.FlakeBurst(Math.random() * 700, Math.random() * 480);
n++;
}
}
stop();
cParticles.prototype.GetNumLayers = function () {
return(this.nl);
};
cParticles.prototype.CleanUp = function () {
n = 0;
while (n < this.numParticles) {
this.particle[n].removeMovieClip();
n++;
}
delete this.particle;
delete this.free;
};
cParticles.prototype.Reset = function () {
n = 0;
while (n < this.particle.length) {
if (this.particle[n]._visible) {
this.particle[n]._visible = false;
this.free.push(n);
}
n++;
}
};
cParticles.prototype.Add = function (x, y, life, rot, scale, dx, dy) {
if (_global.CullFx) {
return(undefined);
}
if (this.free.length == 0) {
return(undefined);
}
n = this.free.pop();
p = this.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 = life;
p.maxLife = life;
p.fade = 100 / life;
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) {
n = 0;
while (n < this.particle.length) {
p = this.particle[n];
if (p._visible) {
p.life--;
if (p.life <= 0) {
this.particle[n]._visible = false;
this.free.push(n);
} else {
p._rotation = p._rotation + p.rot;
p._alpha = p._alpha - p.fade;
p._x = p._x + (p.dx + dx);
p._y = p._y + (p.dy + dy);
p._xscale = p._xscale * p.scale;
p._yscale = p._yscale * p.scale;
}
}
n++;
}
};
cParticles.prototype.UpdateNoAlpha = function (dx, dy) {
n = 0;
while (n < this.particle.length) {
p = this.particle[n];
if (p._visible) {
p.life--;
if (p.life <= 0) {
this.particle[n]._visible = false;
this.free.push(n);
} else {
p._rotation = p._rotation + p.rot;
p._x = p._x + (p.dx + dx);
p._y = p._y + (p.dy + dy);
p._xscale = p._xscale * p.scale;
p._yscale = p._yscale * p.scale;
}
}
n++;
}
};
QuitDialogInst._visible = false;
gQuitDialog = QuitDialogInst.duplicateMovieClip("quit", 10000);
gQuitDialog._visible = false;
gNumPlayers = -1;
SELECT_1PLAYER = 0;
SELECT_2PLAYER = 1;
SELECT_INSTRUCTIONS = 2;
cModeSelectionArrows.prototype.SetSelection = function (sel) {
this.mSel = sel;
switch (sel) {
case SELECT_1PLAYER :
this.ySel = Select1PlayerInst._y;
return;
case SELECT_2PLAYER :
this.ySel = Select2PlayerInst._y;
return;
case SELECT_INSTRUCTIONS :
this.ySel = SelectInstructionsInst._y;
}
};
cModeSelectionArrows.prototype.SelectNext = function () {
this.mSel++;
if (this.mSel > SELECT_INSTRUCTIONS) {
this.mSel = SELECT_1PLAYER;
}
this.SetSelection(this.mSel);
};
cModeSelectionArrows.prototype.SelectPrev = function () {
this.mSel--;
if (this.mSel < SELECT_1PLAYER) {
this.mSel = SELECT_INSTRUCTIONS;
}
this.SetSelection(this.mSel);
};
cModeSelectionArrows.prototype.SelectCurrent = function () {
switch (this.mSel) {
case SELECT_1PLAYER :
gNumPlayers = 1;
LogoInst.gotoAndPlay("Out");
return;
case SELECT_2PLAYER :
gNumPlayers = 2;
LogoInst.gotoAndPlay("Out");
return;
case SELECT_INSTRUCTIONS :
TransitionFlakes();
gotoAndPlay (82);
}
};
cModeSelectionArrows.prototype.Update = function () {
ArrowLeftInst._y = (ArrowRightInst._y = ArrowRightInst._y + ((this.ySel - ArrowLeftInst._y) * 0.5));
};
cKeyHandler.prototype.Update = function () {
if ((((((!Key.isDown(40)) && (!Key.isDown(38))) && (!Key.isDown(37))) && (!Key.isDown(39))) && (!Key.isDown(32))) && (!Key.isDown(13))) {
this.noKey = true;
}
};
cKeyHandler.prototype.onKeyDown = function () {
if (!this.noKey) {
return(undefined);
}
if (Key.isDown(40) || (Key.isDown(39))) {
ModeSelectionArrows.SelectNext();
this.noKey = false;
} else if (Key.isDown(38) || (Key.isDown(37))) {
ModeSelectionArrows.SelectPrev();
this.noKey = false;
} else if (Key.isDown(32) || (Key.isDown(13))) {
ModeSelectionArrows.SelectCurrent();
this.noKey = false;
}
};
Select1PlayerInst.onRollOver = function () {
ModeSelectionArrows.SetSelection(SELECT_1PLAYER);
};
Select1PlayerInst.onRelease = function () {
gNumPlayers = 1;
LogoInst.gotoAndPlay("Out");
Sfx.Play(SFXID_Beep1, 1);
};
Select2PlayerInst.onRollOver = function () {
ModeSelectionArrows.SetSelection(SELECT_2PLAYER);
};
Select2PlayerInst.onRelease = function () {
gNumPlayers = 2;
LogoInst.gotoAndPlay("Out");
Sfx.Play(SFXID_Beep1, 1);
};
SelectInstructionsInst.onRollOver = function () {
ModeSelectionArrows.SetSelection(SELECT_INSTRUCTIONS);
};
SelectInstructionsInst.onRelease = function () {
gNumPlayers = 2;
TransitionFlakes();
gotoAndPlay (82);
Sfx.Play(SFXID_Beep1, 1);
};
onMouseMove = function () {
if (Math.random() > 0.95) {
FlakeParticleMakerInst.FlakeBurst(_xmouse, _ymouse);
}
};
KeyHandler = new cKeyHandler();
StageShake = new cStageShake();
ModeSelectionArrows = new cModeSelectionArrows();
onEnterFrame = function () {
StageShake.Update();
ModeSelectionArrows.Update();
KeyHandler.Update();
};
Frame 82
stop();
DialogInstructionInst.ButtonCloseInst.onRelease = function () {
TransitionFlakes();
gotoAndPlay (60);
Sfx.Play(SFXID_Beep1, 1);
};
Frame 97
function Pause(state) {
PlayerLeftInst.enabled = !state;
PlayerRightInst.enabled = !state;
Team1Inst.enabled = !state;
Team2Inst.enabled = !state;
Team3Inst.enabled = !state;
}
function Back() {
gotoAndPlay (10);
}
function SetHeadIcon(PlayerNum, TeamCol) {
switch (PlayerNum) {
case 0 :
switch (TeamCol) {
case SKIN_RED :
HUDInst.Head1_1Inst._visible = true;
HUDInst.Head1_1Inst._x = HUDInst.Marker1_1Inst._x;
HUDInst.Head1_1Inst._y = HUDInst.Marker1_1Inst._y;
HUDInst.Head1_2Inst._visible = true;
HUDInst.Head1_2Inst._x = HUDInst.Marker1_2Inst._x;
HUDInst.Head1_2Inst._y = HUDInst.Marker1_2Inst._y;
gHeadIcon1_1Inst = HUDInst.Head1_1Inst;
gHeadIcon1_2Inst = HUDInst.Head1_2Inst;
HUDInst.TeamBackRed1Inst._visible = true;
HUDInst.TeamBackRed1Inst._x = HUDInst.Team1_1BackInst._x;
HUDInst.TeamBackRed1Inst._y = HUDInst.Team1_1BackInst._y;
HUDInst.TeamBackRed2Inst._visible = true;
HUDInst.TeamBackRed2Inst._x = HUDInst.Team1_2BackInst._x;
HUDInst.TeamBackRed2Inst._y = HUDInst.Team1_2BackInst._y;
break;
case SKIN_BLUE :
HUDInst.Head2_1Inst._visible = true;
HUDInst.Head2_1Inst._x = HUDInst.Marker1_1Inst._x;
HUDInst.Head2_1Inst._y = HUDInst.Marker1_1Inst._y;
HUDInst.Head2_2Inst._visible = true;
HUDInst.Head2_2Inst._x = HUDInst.Marker1_2Inst._x;
HUDInst.Head2_2Inst._y = HUDInst.Marker1_2Inst._y;
gHeadIcon1_1Inst = HUDInst.Head2_1Inst;
gHeadIcon1_2Inst = HUDInst.Head2_2Inst;
HUDInst.TeamBackBlue1Inst._visible = true;
HUDInst.TeamBackBlue1Inst._x = HUDInst.Team1_1BackInst._x;
HUDInst.TeamBackBlue1Inst._y = HUDInst.Team1_1BackInst._y;
HUDInst.TeamBackBlue2Inst._visible = true;
HUDInst.TeamBackBlue2Inst._x = HUDInst.Team1_2BackInst._x;
HUDInst.TeamBackBlue2Inst._y = HUDInst.Team1_2BackInst._y;
break;
case SKIN_YELLOW :
HUDInst.Head3_1Inst._visible = true;
HUDInst.Head3_1Inst._x = HUDInst.Marker1_1Inst._x;
HUDInst.Head3_1Inst._y = HUDInst.Marker1_1Inst._y;
HUDInst.Head3_2Inst._visible = true;
HUDInst.Head3_2Inst._x = HUDInst.Marker1_2Inst._x;
HUDInst.Head3_2Inst._y = HUDInst.Marker1_2Inst._y;
gHeadIcon1_1Inst = HUDInst.Head3_1Inst;
gHeadIcon1_2Inst = HUDInst.Head3_2Inst;
HUDInst.TeamBackYellow1Inst._visible = true;
HUDInst.TeamBackYellow1Inst._x = HUDInst.Team1_1BackInst._x;
HUDInst.TeamBackYellow1Inst._y = HUDInst.Team1_1BackInst._y;
HUDInst.TeamBackYellow2Inst._visible = true;
HUDInst.TeamBackYellow2Inst._x = HUDInst.Team1_2BackInst._x;
HUDInst.TeamBackYellow2Inst._y = HUDInst.Team1_2BackInst._y;
}
return;
case 1 :
switch (TeamCol) {
case SKIN_RED :
HUDInst.TeamBackRed1Inst._visible = true;
HUDInst.TeamBackRed1Inst._x = HUDInst.Team2_1BackInst._x;
HUDInst.TeamBackRed1Inst._y = HUDInst.Team2_1BackInst._y;
HUDInst.TeamBackRed2Inst._visible = true;
HUDInst.TeamBackRed2Inst._x = HUDInst.Team2_2BackInst._x;
HUDInst.TeamBackRed2Inst._y = HUDInst.Team2_2BackInst._y;
HUDInst.Head1_1Inst._visible = true;
HUDInst.Head1_1Inst._x = HUDInst.Marker2_1Inst._x;
HUDInst.Head1_1Inst._y = HUDInst.Marker2_1Inst._y;
HUDInst.Head1_2Inst._visible = true;
HUDInst.Head1_2Inst._x = HUDInst.Marker2_2Inst._x;
HUDInst.Head1_2Inst._y = HUDInst.Marker2_2Inst._y;
gHeadIcon2_1Inst = HUDInst.Head1_1Inst;
gHeadIcon2_2Inst = HUDInst.Head1_2Inst;
return;
case SKIN_BLUE :
HUDInst.Head2_1Inst._visible = true;
HUDInst.Head2_1Inst._x = HUDInst.Marker2_1Inst._x;
HUDInst.Head2_1Inst._y = HUDInst.Marker2_1Inst._y;
HUDInst.Head2_2Inst._visible = true;
HUDInst.Head2_2Inst._x = HUDInst.Marker2_2Inst._x;
HUDInst.Head2_2Inst._y = HUDInst.Marker2_2Inst._y;
gHeadIcon2_1Inst = HUDInst.Head2_1Inst;
gHeadIcon2_2Inst = HUDInst.Head2_2Inst;
HUDInst.TeamBackBlue1Inst._visible = true;
HUDInst.TeamBackBlue1Inst._x = HUDInst.Team2_1BackInst._x;
HUDInst.TeamBackBlue1Inst._y = HUDInst.Team2_1BackInst._y;
HUDInst.TeamBackBlue2Inst._visible = true;
HUDInst.TeamBackBlue2Inst._x = HUDInst.Team2_2BackInst._x;
HUDInst.TeamBackBlue2Inst._y = HUDInst.Team2_2BackInst._y;
return;
case SKIN_YELLOW :
HUDInst.Head3_1Inst._visible = true;
HUDInst.Head3_1Inst._x = HUDInst.Marker2_1Inst._x;
HUDInst.Head3_1Inst._y = HUDInst.Marker2_1Inst._y;
HUDInst.Head3_2Inst._visible = true;
HUDInst.Head3_2Inst._x = HUDInst.Marker2_2Inst._x;
HUDInst.Head3_2Inst._y = HUDInst.Marker2_2Inst._y;
gHeadIcon2_1Inst = HUDInst.Head3_1Inst;
gHeadIcon2_2Inst = HUDInst.Head3_2Inst;
HUDInst.TeamBackYellow1Inst._visible = true;
HUDInst.TeamBackYellow1Inst._x = HUDInst.Team2_1BackInst._x;
HUDInst.TeamBackYellow1Inst._y = HUDInst.Team2_1BackInst._y;
HUDInst.TeamBackYellow2Inst._visible = true;
HUDInst.TeamBackYellow2Inst._x = HUDInst.Team2_2BackInst._x;
HUDInst.TeamBackYellow2Inst._y = HUDInst.Team2_2BackInst._y;
}
}
}
function ShowNextTeam() {
if (gNumPlayers == 1) {
if (gPlayer1Team != -1) {
gTeam1 = gTeam;
gotoAndPlay (107);
SetHeadIcon(0, gTeam1);
gTeam2 = gTeam1;
while (gTeam2 == gTeam1) {
gTeam2 = random(3);
}
SetHeadIcon(1, gTeam2);
}
} else if ((gPlayer1Team != -1) && (gPlayer2Team != -1)) {
gTeam2 = gTeam;
gotoAndPlay (107);
SetHeadIcon(1, gTeam2);
} else if (((gPlayer1Team != -1) && (gPlayer2Team == -1)) && (!Player2SelectTeamTextInst._visible)) {
Player1SelectTeamTextInst._visible = false;
Player2SelectTeamTextInst._visible = true;
Player2SelectTeamTextInst.gotoAndPlay(1);
gTeam1 = gTeam;
SetHeadIcon(0, gTeam1);
var t = SKIN_RED;
if (t == gTeam1) {
t++;
}
if (t > SKIN_YELLOW) {
t = SKIN_RED;
}
gTeam = t;
switch (t) {
case SKIN_RED :
gTeamInst = Team1Inst;
break;
case SKIN_BLUE :
gTeamInst = Team2Inst;
break;
case SKIN_YELLOW :
gTeamInst = Team3Inst;
}
}
gTeamInst.gotoAndPlay("In");
}
stop();
SKIN_RED = 0;
SKIN_BLUE = 1;
SKIN_YELLOW = 2;
gTeam = SKIN_RED;
gTeam1 = -1;
gTeam2 = -1;
gTeamInst = Team1Inst;
gPlayer1Team = -1;
gPlayer2Team = -1;
Player1SelectTeamTextInst._visible = true;
Player2SelectTeamTextInst._visible = false;
HUDInst.Head1_1Inst.stop();
HUDInst.Head1_2Inst.stop();
HUDInst.Head2_1Inst.stop();
HUDInst.Head2_2Inst.stop();
HUDInst.Head3_1Inst.stop();
HUDInst.Head3_2Inst.stop();
HUDInst.Head1_1Inst._visible = false;
HUDInst.Head1_2Inst._visible = false;
HUDInst.Head2_1Inst._visible = false;
HUDInst.Head2_2Inst._visible = false;
HUDInst.Head3_1Inst._visible = false;
HUDInst.Head3_2Inst._visible = false;
HUDInst.Marker1_1Inst._visible = false;
HUDInst.Marker1_2Inst._visible = false;
HUDInst.Marker2_1Inst._visible = false;
HUDInst.Marker2_2Inst._visible = false;
HUDInst.TeamBackRed1Inst._visible = false;
HUDInst.TeamBackRed2Inst._visible = false;
HUDInst.TeamBackBlue1Inst._visible = false;
HUDInst.TeamBackBlue2Inst._visible = false;
HUDInst.TeamBackYellow1Inst._visible = false;
HUDInst.TeamBackYellow2Inst._visible = false;
gHeadIcon1_1Inst = null;
gHeadIcon1_2Inst = null;
gHeadIcon2_1Inst = null;
gHeadIcon2_2Inst = null;
gTeamInst.gotoAndPlay("In");
PlayerLeftInst.onRelease = function () {
if (gTeamInst._currentframe != 15) {
return(undefined);
}
Sfx.Play(SFXID_Beep1, 1);
TransitionFlakes();
gTeamInst.gotoAndPlay("Out");
var f = false;
while (!f) {
gTeam--;
if (gTeam < 0) {
gTeam = 2;
}
if (gTeam != gTeam1) {
f = true;
}
}
switch (gTeam) {
case SKIN_RED :
gTeamInst = Team1Inst;
return;
case SKIN_BLUE :
gTeamInst = Team2Inst;
return;
case SKIN_YELLOW :
gTeamInst = Team3Inst;
}
};
PlayerRightInst.onRelease = function () {
if (gTeamInst._currentframe != 15) {
return(undefined);
}
Sfx.Play(SFXID_Beep1, 1);
TransitionFlakes();
gTeamInst.gotoAndPlay("Out");
var f = false;
while (!f) {
gTeam++;
if (gTeam > 2) {
gTeam = 0;
}
if (gTeam != gTeam1) {
f = true;
}
}
switch (gTeam) {
case SKIN_RED :
gTeamInst = Team1Inst;
return;
case SKIN_BLUE :
gTeamInst = Team2Inst;
return;
case SKIN_YELLOW :
gTeamInst = Team3Inst;
}
};
cKeyHandler.prototype.onKeyDown = function () {
if (!this.noKey) {
return(undefined);
}
if (Key.isDown(40) || (Key.isDown(39))) {
PlayerRightInst.onRelease();
this.noKey = false;
} else if (Key.isDown(38) || (Key.isDown(37))) {
PlayerLeftInst.onRelease();
this.noKey = false;
} else if (Key.isDown(32) || (Key.isDown(13))) {
gTeamInst.onRelease();
this.noKey = false;
}
};
Team1Inst.onRelease = function () {
if (gPlayer1Team == -1) {
gPlayer1Team = SKIN_RED;
} else {
gPlayer2Team = SKIN_RED;
}
Sfx.Play(SFXID_Beep2, 1);
Team1Inst.gotoAndPlay("Out");
};
Team2Inst.onRelease = function () {
if (gPlayer1Team == -1) {
gPlayer1Team = SKIN_BLUE;
} else {
gPlayer2Team = SKIN_BLUE;
}
Sfx.Play(SFXID_Beep2, 1);
Team2Inst.gotoAndPlay("Out");
};
Team3Inst.onRelease = function () {
if (gPlayer1Team == -1) {
gPlayer1Team = SKIN_YELLOW;
} else {
gPlayer2Team = SKIN_YELLOW;
}
Sfx.Play(SFXID_Beep2, 1);
Team3Inst.gotoAndPlay("Out");
};
onEnterFrame = function () {
KeyHandler.Update();
if (Math.abs(HUDInst._y - 430) > 1) {
HUDInst._y = HUDInst._y + ((430 - HUDInst._y) * 0.2);
} else {
HUDInst._y = 430;
}
};
Frame 107
function Pause(state) {
TrackLeftInst.enabled = !state;
TrackRightInst.enabled = !state;
TrackIcon01AnimInst.enabled = !state;
TrackIcon01AnimInst.enabled = !state;
}
function Back() {
gotoAndPlay (10);
}
function ShowNextTrack() {
gTrackInst._visible = true;
gTrackInst.gotoAndPlay("Play");
if (gSelected) {
gotoAndPlay (117);
}
}
stop();
TRACK_ONE = 0;
TRACK_TWO = 1;
gTrack = TRACK_ONE;
gTrackInst = TrackIcon01AnimInst;
gSelected = false;
TrackIcon01AnimInst.gotoAndPlay("In");
TrackIcon02AnimInst._visible = false;
TrackLeftInst.onRelease = function () {
if (gTrackInst._currentframe != 7) {
return(undefined);
}
Sfx.Play(SFXID_Beep1, 1);
TransitionFlakes();
gTrackInst.gotoAndPlay("Out");
gTrack--;
if (gTrack < 0) {
gTrack = 1;
}
switch (gTrack) {
case TRACK_ONE :
gTrackInst = TrackIcon01AnimInst;
return;
case TRACK_TWO :
gTrackInst = TrackIcon02AnimInst;
}
};
TrackRightInst.onRelease = function () {
if (gTrackInst._currentframe != 7) {
return(undefined);
}
Sfx.Play(SFXID_Beep1, 1);
TransitionFlakes();
gTrackInst.gotoAndPlay("Out");
gTrack++;
if (gTrack > 1) {
gTrack = 0;
}
switch (gTrack) {
case TRACK_ONE :
gTrackInst = TrackIcon01AnimInst;
return;
case TRACK_TWO :
gTrackInst = TrackIcon02AnimInst;
}
};
cKeyHandler.prototype.onKeyDown = function () {
if (!this.noKey) {
return(undefined);
}
if (Key.isDown(40) || (Key.isDown(39))) {
TrackRightInst.onRelease();
this.noKey = false;
} else if (Key.isDown(38) || (Key.isDown(37))) {
TrackLeftInst.onRelease();
this.noKey = false;
} else if (Key.isDown(32) || (Key.isDown(13))) {
gTrackInst.onRelease();
this.noKey = false;
}
};
TrackIcon01AnimInst.onRelease = function () {
gTrackInst.gotoAndPlay("Out");
gSelected = true;
Sfx.Play(SFXID_Beep2, 1);
};
TrackIcon02AnimInst.onRelease = function () {
gTrackInst.gotoAndPlay("Out");
gSelected = true;
Sfx.Play(SFXID_Beep2, 1);
};
Frame 117
function Vec2() {
}
function Vec2(x, y) {
this.x = x;
this.y = y;
}
function Pause(state) {
gPause = state;
Driver1.FreezeState(state);
Driver2.FreezeState(state);
if (state) {
gHeadIcon1_1Inst.stop();
gHeadIcon1_2Inst.stop();
gHeadIcon2_1Inst.stop();
gHeadIcon2_2Inst.stop();
gPauseTime = getTimer();
} else {
gHeadIcon1_1Inst.play();
gHeadIcon1_2Inst.play();
gHeadIcon2_1Inst.play();
gHeadIcon2_2Inst.play();
gDogSkin1.play();
gSledSkin1.play();
gDogSkin2.play();
gSledSkin2.play();
Driver1.t = Driver1.t + (getTimer() - gPauseTime);
Driver2.t = Driver2.t + (getTimer() - gPauseTime);
}
}
function Back() {
Driver1.Destroy();
Driver2.Destroy();
gotoAndPlay (10);
gHighScoreDialogInst.removeMovieClip();
gFlagInst.removeMovieClip();
HUDInst.BackInst.enabled = true;
Sfx.StopAll();
}
function ResetRace() {
Driver1.Destroy();
Driver2.Destroy();
gotoAndPlay (128);
gHighScoreDialogInst.removeMovieClip();
gFlagInst.removeMovieClip();
HUDInst.BackInst.enabled = true;
Sfx.StopAll();
}
function cDriver(playerNum, driverClip, sledClip, startClip, fullLapClip, halfLapClip, AIList, AIPlayer, keys) {
this.playerNum = playerNum;
this.freeze = true;
this.clip = driverClip.duplicateMovieClip("drv" + playerNum, LAYER_DRIVER + (playerNum * 10));
this.clip._x = startClip._x;
this.clip._y = startClip._y;
this.clip._rotation = startClip._rotation;
this.clip.Col01Inst._visible = false;
this.clip.Col02Inst._visible = false;
this.clip.Dog1Inst.gotoAndPlay(10);
this.sledClip = sledClip.duplicateMovieClip("sld" + playerNum, (LAYER_DRIVER + (playerNum * 10)) + 1);
this.ang = (Math.PI/180) * this.clip._rotation;
this.seekAng = this.ang;
this.dir = new Vec2();
this.speed = 0;
this.accel = 0;
this.lastPos = new Vec2();
this.work = new Vec2();
this.work2 = new Vec2();
this.up = new Vec2(1, 0);
this.running = false;
this.cpu = AIPlayer;
this.way = 0;
this.wayList = AIList;
this.aiMaxSpeed = 4;
this.opponent = null;
this.lapFullClip = fullLapClip;
this.lapHalfClip = halfLapClip;
this.nextLapMarker = this.lapFullClip;
this.lap = -0.5;
this.t = -1;
this.finished = false;
this.finishTime = -1;
this.dist = 0;
if (keys == KEYS_PLAYER1) {
this.keyUp = 38;
this.keyLeft = 37;
this.keyRight = 39;
} else {
this.keyUp = 83;
this.keyLeft = 90;
this.keyRight = 88;
}
this.dir.RadianToEulerAngle(this.ang);
this.sledClip._x = this.clip._x - this.dir.x;
this.sledClip._y = this.clip._y - this.dir.y;
this.PositionSled();
this.clip.Dog1Inst.stop();
this.clip.Dog2Inst.stop();
this.sledClip.stop();
}
function HideClipsInList(array) {
var n = 0;
while (n < array.length) {
array[n]._visible = false;
n++;
}
}
function GameOver() {
gHighScoreDialogInst.Show(gNumPlayers);
HUDInst.BackInst.enabled = false;
}
stop();
Track1Inst._visible = false;
Track1Inst.enabled = false;
Track2Inst._visible = false;
Track2Inst.enabled = false;
switch (gTrack) {
case 0 :
gTrackInst = Track1Inst;
AI = new Array(gTrackInst.P01Inst, gTrackInst.P02Inst, gTrackInst.P03Inst, gTrackInst.P04Inst, gTrackInst.P05Inst, gTrackInst.P06Inst, gTrackInst.P07Inst, gTrackInst.P08Inst, gTrackInst.P09Inst, gTrackInst.P10Inst, gTrackInst.P11Inst, gTrackInst.P12Inst);
gTrackInst.Flag2Inst._visible = false;
FlagInst._visible = false;
gFlagInst = FlagInst.duplicateMovieClip("flg", 200);
gFlagInst._x = gTrackInst.Flag2Inst._x;
gFlagInst._y = gTrackInst.Flag2Inst._y;
gFlagInst.AnimInst.gotoAndPlay(10);
break;
case 1 :
gTrackInst = Track2Inst;
AI = new Array(gTrackInst.P01Inst, gTrackInst.P02Inst, gTrackInst.P02aInst, gTrackInst.P03Inst, gTrackInst.P04Inst, gTrackInst.P05Inst, gTrackInst.P05aInst, gTrackInst.P06Inst, gTrackInst.P07Inst, gTrackInst.P08Inst, gTrackInst.P09Inst, gTrackInst.P10Inst, gTrackInst.P11Inst, gTrackInst.P12Inst, gTrackInst.P13Inst, gTrackInst.P14Inst);
gTrackInst.Flag2Inst._visible = false;
FlagInst._visible = false;
gFlagInst = FlagInst.duplicateMovieClip("flg", 200);
gFlagInst._x = gTrackInst.Flag2Inst._x;
gFlagInst._y = gTrackInst.Flag2Inst._y;
gFlagInst.AnimInst.gotoAndPlay(10);
}
gTrackInst._visible = true;
gTrackInst.enabled = true;
Vec2.prototype.Len = function () {
return(Math.sqrt((this.x * this.x) + (this.y * this.y)));
};
Vec2.prototype.Norm = function () {
w = Math.sqrt((this.x * this.x) + (this.y * this.y));
if (w == 0) {
return(0);
}
this.x = this.x / w;
this.y = this.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));
};
gHeadIcon1_1Inst.gotoAndStop(1);
gHeadIcon1_2Inst.gotoAndStop(1);
gHeadIcon2_1Inst.gotoAndStop(1);
gHeadIcon2_2Inst.gotoAndStop(1);
gPauseTime = 0;
gPause = false;
LAYER_DRIVER = 100;
LAYER_FLAG = 200;
LAYER_WINNER1 = 300;
LAYER_WINNER2 = 400;
LAYER_HIGHSCORE = 500;
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 = 3;
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 () {
this.clip.removeMovieClip();
this.sledClip.removeMovieClip();
delete this;
};
cDriver.prototype.FreezeState = function (state) {
this.freeze = state;
};
cDriver.prototype.SetOpponent = function (driver) {
this.opponent = driver;
};
cDriver.prototype.PositionSled = function () {
this.work.x = this.clip._x - this.sledClip._x;
this.work.y = this.clip._y - this.sledClip._y;
this.work.Norm();
var a = Math.acos(this.up.Dot(this.work));
this.work.Scale(25);
this.sledClip._x = this.clip._x - this.work.x;
this.sledClip._y = this.clip._y - this.work.y;
if (this.work.y < 0) {
this.sledClip._rotation = 360 - (a * 57.2957795130823);
} else {
this.sledClip._rotation = a * 57.2957795130823;
}
if (this.playerNum == 0) {
Sfx.Play(SFXID_Grind1, 9999);
Sfx.SetVol(SFXID_Grind1, 0);
} else {
Sfx.Play(SFXID_Grind2, 9999);
Sfx.SetVol(SFXID_Grind2, 0);
}
this.colDelay = 0;
};
cDriver.prototype.Update = function () {
if (this.freeze || (gPause)) {
return(undefined);
}
if (this.t == -1) {
this.t = getTimer();
gHeadIcon1_1Inst.behind = true;
gHeadIcon1_2Inst.behind = true;
gHeadIcon2_1Inst.behind = true;
gHeadIcon2_2Inst.behind = true;
gHeadIcon1_1Inst.gotoAndPlay(random(30));
gHeadIcon1_2Inst.gotoAndPlay(random(30));
gHeadIcon2_1Inst.gotoAndPlay(random(30));
gHeadIcon2_2Inst.gotoAndPlay(random(30));
}
if (!this.finished) {
var time = (getTimer() - this.t);
this.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 (this.playerNum == 0) {
HUDInst.Player1TimeString.text = (((("Time: " + min) + ":") + sec) + ":") + hun;
} else {
HUDInst.Player2TimeString.text = (((("Time: " + min) + ":") + sec) + ":") + hun;
}
}
if (this.cpu) {
if (this.wayList[this.way].hitTest(this.clip._x, this.clip._y, true)) {
this.way++;
if (this.way >= this.wayList.length) {
this.way = 0;
}
}
this.work.x = this.clip._x - this.wayList[this.way]._x;
this.work.y = this.clip._y - this.wayList[this.way]._y;
this.work.Norm();
this.work2.RadianToEulerAngle(this.ang - (Math.PI/2));
this.work2.Norm();
var dot = this.work.Dot(this.work2);
if (dot < -0.1) {
this.ang = this.ang - 0.075;
} else if (dot > 0.1) {
this.ang = this.ang + 0.075;
}
this.accel = 0.1;
this.seekAng = this.ang;
} else {
if (Key.isDown(this.keyLeft)) {
this.seekAng = this.seekAng - 0.07;
} else if (Key.isDown(this.keyRight)) {
this.seekAng = this.seekAng + 0.07;
}
if (Key.isDown(this.keyUp)) {
this.accel = 0.1;
} else {
this.accel = 0;
}
}
this.ang = this.ang + ((this.seekAng - this.ang) * 0.15);
this.work.x = this.clip.Col01Inst._x;
this.work.y = this.clip.Col01Inst._y;
this.clip.localToGlobal(this.work);
var c1 = (!gTrackInst.TrackGuideInst.hitTest(this.work.x, this.work.y, true));
if (!c1) {
c1 = this.opponent.clip.hitTest(this.work.x, this.work.y, false);
if (!c1) {
c1 = this.opponent.sledClip.hitTest(this.work.x, this.work.y, false);
}
}
this.work.x = this.clip.Col02Inst._x;
this.work.y = this.clip.Col02Inst._y;
this.clip.localToGlobal(this.work);
var c2 = (!gTrackInst.TrackGuideInst.hitTest(this.work.x, this.work.y, true));
if (!c2) {
c2 = this.opponent.clip.hitTest(this.work.x, this.work.y, false);
if (!c2) {
c2 = this.opponent.sledClip.hitTest(this.work.x, this.work.y, false);
}
}
if (c1 && (c2)) {
this.speed = this.speed * 0.75;
this.clip._x = this.lastPos.x;
this.clip._y = this.lastPos.y;
if ((this.speed > 3) && (this.colDelay == 0)) {
Sfx.Play(SFXID_Brush, 1);
Sfx.Play(SFXID_Bump, 1);
this.colDelay = 5;
}
} else if (c1) {
this.ang = this.ang + 0.1;
this.speed = this.speed * 0.8;
if ((this.speed > 3) && (this.colDelay == 0)) {
Sfx.Play(SFXID_Brush, 1);
Sfx.Play(SFXID_Bump, 1);
this.colDelay = 5;
}
} else if (c2) {
this.ang = this.ang - 0.1;
this.speed = this.speed * 0.8;
if ((this.speed > 3) && (this.colDelay == 0)) {
Sfx.Play(SFXID_Bump, 1);
Sfx.Play(SFXID_Brush, 1);
this.colDelay = 5;
}
} else if (this.colDelay > 0) {
this.colDelay--;
}
this.dir.RadianToEulerAngle(this.ang);
if (this.accel > 0) {
this.speed = this.speed + this.accel;
} else if (this.speed > 0) {
this.speed = this.speed - 0.2;
} else {
this.speed = 0;
}
if (this.cpu) {
if ((this.opponent.dist + 400) > this.dist) {
this.aiMaxSpeed = 5.25;
} else {
this.aiMaxSpeed = 4.5;
}
if (this.speed > this.aiMaxSpeed) {
this.speed = this.aiMaxSpeed;
}
} else if (this.speed > 5) {
this.speed = 5;
}
if (this.playerNum == 0) {
gHeadIcon1_1Inst.behind = this.dist < this.opponent.dist;
gHeadIcon1_2Inst.behind = this.dist < this.opponent.dist;
} else {
gHeadIcon2_1Inst.behind = this.dist < this.opponent.dist;
gHeadIcon2_2Inst.behind = this.dist < this.opponent.dist;
}
this.lastPos.x = this.clip._x;
this.lastPos.y = this.clip._y;
this.clip._x = this.clip._x + (this.dir.x * this.speed);
this.clip._y = this.clip._y + (this.dir.y * this.speed);
this.clip._rotation = this.seekAng * 57.2957795130823;
this.work.x = Math.abs(this.clip._x - this.lastPos.x);
this.work.y = Math.abs(this.clip._y - this.lastPos.y);
this.dist = this.dist + this.work.Len();
this.work.x = this.clip._x - this.sledClip._x;
this.work.y = this.clip._y - this.sledClip._y;
this.work.Norm();
var a = Math.acos(this.up.Dot(this.work));
this.work.Scale(25);
this.sledClip._x = this.clip._x - this.work.x;
this.sledClip._y = this.clip._y - this.work.y;
if (this.work.y < 0) {
this.sledClip._rotation = 360 - (a * 57.2957795130823);
} else {
this.sledClip._rotation = a * 57.2957795130823;
}
if (this.running) {
if (this.speed < 0.1) {
this.running = false;
this.clip.Dog1Inst.stop();
this.clip.Dog2Inst.stop();
this.sledClip.stop();
}
} else if (this.speed > 0.1) {
this.running = true;
this.clip.Dog1Inst.play();
this.clip.Dog2Inst.play();
this.sledClip.play();
}
if (this.playerNum == 0) {
Sfx.SetVol(SFXID_Grind1, 100 * (this.speed / 5));
} else {
Sfx.SetVol(SFXID_Grind2, 100 * (this.speed / 5));
}
if (this.nextLapMarker.hitTest(this.clip._x, this.clip._y, true)) {
this.lap = this.lap + 0.5;
if (this.nextLapMarker == this.lapFullClip) {
if ((this.lap > 0.5) && (this.lap < NUM_LAPS)) {
Sfx.Play(SFXID_Beep1, 1);
}
this.nextLapMarker = this.lapHalfClip;
} else {
this.nextLapMarker = this.lapFullClip;
}
if (this.lap <= (NUM_LAPS - 1)) {
if (this.playerNum == 0) {
HUDInst.Player1LapString.text = (("Lap " + Math.floor(this.lap + 1)) + " of ") + NUM_LAPS;
} else {
HUDInst.Player2LapString.text = (("Lap " + Math.floor(this.lap + 1)) + " of ") + NUM_LAPS;
}
}
if (this.lap == NUM_LAPS) {
if (gWinner == -1) {
gWinner = this.playerNum;
if (this.playerNum == 0) {
gPlayer1WinsAnimInst.gotoAndPlay("Start");
} else {
gPlayer2WinsAnimInst.gotoAndPlay("Start");
}
Sfx.Play(SFXID_Beep2, 1);
}
this.cpu = true;
this.finished = true;
if ((gNumPlayers == 2) && (this.opponent.finished)) {
GameOver();
}
if (((gNumPlayers == 1) && (gWinner == 1)) && (this.playerNum == 0)) {
GameOver();
}
}
}
if (Math.random() > 0.95) {
var r = Math.random();
if (r < 0.1) {
Sfx.Play(SFXID_Bark1, 1);
} else if (r < 0.2) {
Sfx.Play(SFXID_Bark2, 1);
} else if (r < 0.3) {
Sfx.Play(SFXID_Bark3, 1);
} else if (r < 0.4) {
Sfx.Play(SFXID_Driver, 1);
}
}
};
gTrackInst.TrackGuideInst._visible = false;
SledInst._visible = false;
gTrackInst.StartMarker01Inst._visible = false;
gTrackInst.StartMarker02Inst._visible = false;
gTrackInst.LapMarker1Inst._visible = false;
gTrackInst.LapMarker2Inst._visible = false;
RedDogTeamInst._visible = false;
BlueDogTeamInst._visible = false;
YellowDogTeamInst._visible = false;
RedSledInst._visible = false;
BlueSledInst._visible = false;
YellowSledInst._visible = 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);
Driver2 = new cDriver(1, gDogSkin2, gSledSkin2, gTrackInst.StartMarker01Inst, gTrackInst.LapMarker1Inst, gTrackInst.LapMarker2Inst, AI, true, null);
}
Driver1.SetOpponent(Driver2);
Driver2.SetOpponent(Driver1);
onEnterFrame = function () {
Driver1.Update();
Driver2.Update();
};
Frame 128
gotoAndPlay (117);
Symbol 24 MovieClip Frame 1
function cParticles(numParticles, layer, sourceMovieClip, maskMovieClip) {
this.particle = new Array();
this.numParticles = numParticles;
this.free = new Array();
var i = 0;
n = 0;
while (n < numParticles) {
this.particle.push(sourceMovieClip.duplicateMovieClip(("p" + layer) + i, layer + (i++)));
p = this.particle[n];
if ((maskMovieClip != undefined) && (maskMovieClip != null)) {
p.setMask(maskMovieClip.duplicateMovieClip(("m" + layer) + i, layer + (i++)));
}
p._x = 0;
p._y = 0;
p._visible = false;
p.life = 100;
this.free.push(n);
n++;
}
this.nl = i;
}
cParticles.prototype.GetNumLayers = function () {
return(this.nl);
};
cParticles.prototype.CleanUp = function () {
n = 0;
while (n < this.numParticles) {
this.particle[n].removeMovieClip();
n++;
}
delete this.particle;
delete this.free;
};
cParticles.prototype.Reset = function () {
n = 0;
while (n < this.particle.length) {
if (this.particle[n]._visible) {
this.particle[n]._visible = false;
this.free.push(n);
}
n++;
}
};
cParticles.prototype.Add = function (x, y, life, rot, scale, dx, dy) {
if (_global.CullFx) {
return(undefined);
}
if (this.free.length == 0) {
return(undefined);
}
n = this.free.pop();
p = this.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 = life;
p.maxLife = life;
p.fade = 100 / life;
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) {
n = 0;
while (n < this.particle.length) {
p = this.particle[n];
if (p._visible) {
p.life--;
if (p.life <= 0) {
this.particle[n]._visible = false;
this.free.push(n);
} else {
p._rotation = p._rotation + p.rot;
p._alpha = p._alpha - p.fade;
p._x = p._x + (p.dx + dx);
p._y = p._y + (p.dy + dy);
p._xscale = p._xscale * p.scale;
p._yscale = p._yscale * p.scale;
}
}
n++;
}
};
cParticles.prototype.UpdateNoAlpha = function (dx, dy) {
n = 0;
while (n < this.particle.length) {
p = this.particle[n];
if (p._visible) {
p.life--;
if (p.life <= 0) {
this.particle[n]._visible = false;
this.free.push(n);
} else {
p._rotation = p._rotation + p.rot;
p._x = p._x + (p.dx + dx);
p._y = p._y + (p.dy + dy);
p._xscale = p._xscale * p.scale;
p._yscale = p._yscale * p.scale;
}
}
n++;
}
};
stop();
MarkerInst._visible = false;
PartFlakeInst._visible = false;
Part = new cParticles(18, 1, PartFlakeInst);
onEnterFrame = function () {
if (Math.random() > 0.6) {
Part.Add(-100 + (Math.random() * 200), 0, 70, 2 + (Math.random() * 8), 1 + (Math.random() * 0.02), -3 + (Math.random() * 6), Math.random() * 5);
}
Part.Update();
};
Symbol 28 MovieClip Frame 1
function encrypt(mystring) {
var output = "";
var i = 0;
while (i < mystring.length) {
output = output + String.fromCharCode(mystring.charCodeAt(i) ^ 21);
i++;
}
return(output);
}
function ResetResults() {
results.name1 = "";
results.name2 = "";
results.name3 = "";
results.name4 = "";
results.name5 = "";
results.name6 = "";
results.name7 = "";
results.name8 = "";
results.name9 = "";
results.name10 = "";
results.score1 = "";
results.score2 = "";
results.score3 = "";
results.score4 = "";
results.score5 = "";
results.score6 = "";
results.score7 = "";
results.score8 = "";
results.score9 = "";
results.score10 = "";
}
function RetrieveScores(table) {
_machine = 1;
_table = table;
name = "";
score = "";
email = "";
loadVariables ("http://www.bbc.co.uk/apps/ifl/cbbc/highscores", "results", "GET");
}
function SubmitHighScore(table, nameString, scoreString) {
_machine = 1;
_table = table;
name = encrypt(nameString);
score = encrypt(scoreString);
email = encrypt("someone@somwhere.com");
loadVariables ("http://www.bbc.co.uk/apps/ifl/cbbc/highscores", "results", "GET");
}
createEmptyMovieClip("results", 1);
name = "";
score = "";
email = "";
Symbol 43 MovieClip Frame 1
function cParticles(numParticles, layer, sourceMovieClip, maskMovieClip) {
this.particle = new Array();
this.numParticles = numParticles;
this.free = new Array();
var i = 0;
n = 0;
while (n < numParticles) {
this.particle.push(sourceMovieClip.duplicateMovieClip(("p" + layer) + i, layer + (i++)));
p = this.particle[n];
if ((maskMovieClip != undefined) && (maskMovieClip != null)) {
p.setMask(maskMovieClip.duplicateMovieClip(("m" + layer) + i, layer + (i++)));
}
p._x = 0;
p._y = 0;
p._visible = false;
p.life = 100;
this.free.push(n);
n++;
}
this.nl = i;
}
cParticles.prototype.GetNumLayers = function () {
return(this.nl);
};
cParticles.prototype.CleanUp = function () {
n = 0;
while (n < this.numParticles) {
this.particle[n].removeMovieClip();
n++;
}
delete this.particle;
delete this.free;
};
cParticles.prototype.Reset = function () {
n = 0;
while (n < this.particle.length) {
if (this.particle[n]._visible) {
this.particle[n]._visible = false;
this.free.push(n);
}
n++;
}
};
cParticles.prototype.Add = function (x, y, life, rot, scale, dx, dy) {
if (_global.CullFx) {
return(undefined);
}
if (this.free.length == 0) {
return(undefined);
}
n = this.free.pop();
p = this.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 = life;
p.maxLife = life;
p.fade = 100 / life;
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) {
n = 0;
while (n < this.particle.length) {
p = this.particle[n];
if (p._visible) {
p.life--;
if (p.life <= 0) {
this.particle[n]._visible = false;
this.free.push(n);
} else {
p._rotation = p._rotation + p.rot;
p._alpha = p._alpha - p.fade;
p._x = p._x + (p.dx + dx);
p._y = p._y + (p.dy + dy);
p._xscale = p._xscale * p.scale;
p._yscale = p._yscale * p.scale;
}
}
n++;
}
};
cParticles.prototype.UpdateNoAlpha = function (dx, dy) {
n = 0;
while (n < this.particle.length) {
p = this.particle[n];
if (p._visible) {
p.life--;
if (p.life <= 0) {
this.particle[n]._visible = false;
this.free.push(n);
} else {
p._rotation = p._rotation + p.rot;
p._x = p._x + (p.dx + dx);
p._y = p._y + (p.dy + dy);
p._xscale = p._xscale * p.scale;
p._yscale = p._yscale * p.scale;
}
}
n++;
}
};
MarkerInst._visible = false;
Part = new cParticles(12, 1000, PartSnowInst);
Interations = 6;
onEnterFrame = function () {
if (Interations >= 0) {
Part.Add(-50 + (Math.random() * 100), 0, 40, 2, 1.02, -5 + (Math.random() * 10), Math.random() * -2);
Part.Add(-50 + (Math.random() * 100), 0, 40, 2, 1.02, -5 + (Math.random() * 10), Math.random() * -2);
Part.Add(-50 + (Math.random() * 100), 0, 40, 2, 1.02, -5 + (Math.random() * 10), Math.random() * -2);
Interations--;
}
Part.Update();
};
Symbol 45 MovieClip Frame 20
_root.StageShake.Impulse();
Symbol 45 MovieClip Frame 30
_root.StageShake.Impulse();
Symbol 45 MovieClip Frame 100
stop();
Symbol 45 MovieClip Frame 110
stop();
_parent.gotoAndPlay("Player Select");
Symbol 46 MovieClip Frame 1
function cParticles(numParticles, layer, sourceMovieClip, maskMovieClip) {
this.particle = new Array();
this.numParticles = numParticles;
this.free = new Array();
var i = 0;
n = 0;
while (n < numParticles) {
this.particle.push(sourceMovieClip.duplicateMovieClip(("p" + layer) + i, layer + (i++)));
p = this.particle[n];
if ((maskMovieClip != undefined) && (maskMovieClip != null)) {
p.setMask(maskMovieClip.duplicateMovieClip(("m" + layer) + i, layer + (i++)));
}
p._x = 0;
p._y = 0;
p._visible = false;
p.life = 100;
this.free.push(n);
n++;
}
this.nl = i;
}
function FlakeBurst(x, y) {
Part.Add(x - _x, y - _y, 15 + (Math.random() * 15), 2 + (Math.random() * 8), 1 + (Math.random() * 0.02), -5 + (Math.random() * 10), -5 + (Math.random() * 10));
}
cParticles.prototype.GetNumLayers = function () {
return(this.nl);
};
cParticles.prototype.CleanUp = function () {
n = 0;
while (n < this.numParticles) {
this.particle[n].removeMovieClip();
n++;
}
delete this.particle;
delete this.free;
};
cParticles.prototype.Reset = function () {
n = 0;
while (n < this.particle.length) {
if (this.particle[n]._visible) {
this.particle[n]._visible = false;
this.free.push(n);
}
n++;
}
};
cParticles.prototype.Add = function (x, y, life, rot, scale, dx, dy) {
if (_global.CullFx) {
return(undefined);
}
if (this.free.length == 0) {
return(undefined);
}
n = this.free.pop();
p = this.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 = life;
p.maxLife = life;
p.fade = 100 / life;
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) {
n = 0;
while (n < this.particle.length) {
p = this.particle[n];
if (p._visible) {
p.life--;
if (p.life <= 0) {
this.particle[n]._visible = false;
this.free.push(n);
} else {
p._rotation = p._rotation + p.rot;
p._alpha = p._alpha - p.fade;
p._x = p._x + (p.dx + dx);
p._y = p._y + (p.dy + dy);
p._xscale = p._xscale * p.scale;
p._yscale = p._yscale * p.scale;
}
}
n++;
}
};
cParticles.prototype.UpdateNoAlpha = function (dx, dy) {
n = 0;
while (n < this.particle.length) {
p = this.particle[n];
if (p._visible) {
p.life--;
if (p.life <= 0) {
this.particle[n]._visible = false;
this.free.push(n);
} else {
p._rotation = p._rotation + p.rot;
p._x = p._x + (p.dx + dx);
p._y = p._y + (p.dy + dy);
p._xscale = p._xscale * p.scale;
p._yscale = p._yscale * p.scale;
}
}
n++;
}
};
stop();
MarkerInst._visible = false;
PartFlakeInst._visible = false;
Part = new cParticles(24, 1, PartFlakeInst);
Interations = -1;
onEnterFrame = function () {
Part.Update();
};
Symbol 49 MovieClip Frame 1
TextOnePlayer.text = _root.gStrTable.get("ONE_PLAYER");
Symbol 53 MovieClip Frame 1
TextTwoPlayers.text = _root.gStrTable.get("TWO_PLAYER");
Symbol 58 MovieClip Frame 1
TextInstructions.text = _root.gStrTable.get("INSTRUCTIONS");
Symbol 64 MovieClip Frame 1
TextYes.text = _root.gStrTable.get("YES");
Symbol 68 MovieClip Frame 1
TextNo.text = _root.gStrTable.get("NO");
Symbol 70 MovieClip Frame 1
function Show(state) {
this._visible = state;
_parent.Pause(true);
}
TextAreYouSure.text = _parent.gStrTable.get("ARE_YOU_SURE");
YesButtonInst.onRelease = function () {
_root.Sfx.Play(_root.SFXID_Beep1, 1);
_parent.Pause(false);
_parent.Back();
_visible = false;
};
NoButtonInst.onRelease = function () {
_root.Sfx.Play(_root.SFXID_Beep1, 1);
_parent.Pause(false);
_visible = false;
};
Symbol 89 MovieClip Frame 1
TextInstructions.text = _root.gStrTable.get("INSTRUCTIONS_BODY");
Symbol 92 MovieClip Frame 1
Text.text = _root.gStrTable.get("ONE_PLAYER_GAME");
Symbol 94 MovieClip Frame 1
Text.text = _root.gStrTable.get("TWO_PLAYER_GAME");
Symbol 96 MovieClip Frame 1
Text.text = _root.gStrTable.get("ONE_PLAYER_INST");
Symbol 98 MovieClip Frame 1
Text.text = _root.gStrTable.get("TWO_PLAYER_INST");
Symbol 101 MovieClip Frame 1
Text.text = _root.gStrTable.get("PLAYER_ONE");
Symbol 103 MovieClip Frame 1
Text.text = _root.gStrTable.get("SELECT_TEAM");
Symbol 104 MovieClip Frame 12
stop();
Symbol 106 MovieClip Frame 1
Text.text = _root.gStrTable.get("PLAYER_TWO");
Symbol 107 MovieClip Frame 12
stop();
Symbol 119 MovieClip Frame 1
stop();
Symbol 119 MovieClip Frame 2
_visible = true;
play();
Symbol 119 MovieClip Frame 15
stop();
Symbol 119 MovieClip Frame 35
_visible = false;
_parent.ShowNextTeam();
Symbol 125 MovieClip Frame 1
stop();
Symbol 125 MovieClip Frame 2
_visible = true;
play();
Symbol 125 MovieClip Frame 15
stop();
Symbol 125 MovieClip Frame 35
_visible = false;
_parent.ShowNextTeam();
Symbol 131 MovieClip Frame 1
stop();
Symbol 131 MovieClip Frame 2
_visible = true;
play();
Symbol 131 MovieClip Frame 15
stop();
Symbol 131 MovieClip Frame 35
_visible = false;
_parent.ShowNextTeam();
Symbol 139 MovieClip Frame 1
Text.text = _root.gStrTable.get("QUIT");
stop();
Symbol 167 MovieClip Frame 30
if (behind) {
gotoAndPlay (1);
} else {
gotoAndPlay (40);
}
Symbol 167 MovieClip Frame 70
if (behind) {
gotoAndPlay (1);
} else {
gotoAndPlay (40);
}
Symbol 175 MovieClip Frame 30
if (behind) {
gotoAndPlay (1);
} else {
gotoAndPlay (40);
}
Symbol 175 MovieClip Frame 70
if (behind) {
gotoAndPlay (1);
} else {
gotoAndPlay (40);
}
Symbol 184 MovieClip Frame 30
if (behind) {
gotoAndPlay (1);
} else {
gotoAndPlay (40);
}
Symbol 184 MovieClip Frame 70
if (behind) {
gotoAndPlay (1);
} else {
gotoAndPlay (40);
}
Symbol 193 MovieClip Frame 30
if (behind) {
gotoAndPlay (1);
} else {
gotoAndPlay (40);
}
Symbol 193 MovieClip Frame 70
if (behind) {
gotoAndPlay (1);
} else {
gotoAndPlay (40);
}
Symbol 202 MovieClip Frame 30
if (behind) {
gotoAndPlay (1);
} else {
gotoAndPlay (40);
}
Symbol 202 MovieClip Frame 70
if (behind) {
gotoAndPlay (1);
} else {
gotoAndPlay (40);
}
Symbol 211 MovieClip Frame 30
if (behind) {
gotoAndPlay (1);
} else {
gotoAndPlay (40);
}
Symbol 211 MovieClip Frame 70
if (behind) {
gotoAndPlay (1);
} else {
gotoAndPlay (40);
}
Symbol 213 MovieClip Frame 1
Text.text = _root.gStrTable.get("HUD_PLAYER_ONE");
stop();
Symbol 215 MovieClip Frame 1
Text.text = _root.gStrTable.get("HUD_PLAYER_TWO");
stop();
Symbol 216 MovieClip Frame 1
BackInst.onRelease = function () {
_root.Sfx.Play(_root.SFXID_Beep1, 1);
_parent.gQuitDialog.Show(true);
};
Symbol 219 MovieClip Frame 1
Symbol 219 MovieClip Frame 7
stop();
Symbol 219 MovieClip Frame 13
stop();
_visible = false;
_parent.ShowNextTrack();
Symbol 222 MovieClip Frame 7
stop();
Symbol 222 MovieClip Frame 8
play();
Symbol 222 MovieClip Frame 14
stop();
_parent.ShowNextTrack();
Symbol 224 MovieClip Frame 1
Text.text = _root.gStrTable.get("SELECT_TRACK");
Symbol 225 MovieClip Frame 10
stop();
Symbol 297 MovieClip Frame 1
stop();
Symbol 297 MovieClip Frame 2
play();
Symbol 297 MovieClip Frame 50
stop();
if (_parent.gNumPlayers == 1) {
_parent.GameOver();
}
Symbol 300 MovieClip Frame 1
stop();
Symbol 300 MovieClip Frame 2
play();
Symbol 300 MovieClip Frame 50
stop();
Symbol 309 MovieClip Frame 52
_root.Driver1.FreezeState(false);
_root.Driver2.FreezeState(false);
Symbol 309 MovieClip Frame 62
stop();
Symbol 312 MovieClip Frame 1
Text.text = _root.gStrTable.get("ENTER_HIGH_SCORE");
Symbol 315 MovieClip Frame 1
Text.text = _root.gStrTable.get("OK");
Symbol 320 MovieClip Frame 1
Text.text = _root.gStrTable.get("ENTER_NAME");
Symbol 326 MovieClip Frame 1
Text.text = _root.gStrTable.get("FASTEST_RACERS");
Symbol 328 MovieClip Frame 1
Text.text = _root.gStrTable.get("RACE_AGAIN");
Symbol 362 MovieClip Frame 1
function Show(numPlayers) {
gNumPlayers = numPlayers;
_visible = true;
gotoAndPlay (10);
}
stop();
gNumPlayers = 0;
gPlayer1Name = "";
gPlayer2Name = "";
Symbol 362 MovieClip Frame 10
stop();
YesButtonInst.onRelease = function () {
_root.Sfx.Play(_root.SFXID_Beep1, 1);
gotoAndPlay (20);
};
NoButtonInst.onRelease = function () {
_root.Sfx.Play(_root.SFXID_Beep1, 1);
if (gNumPlayers == 2) {
gotoAndPlay (30);
} else {
gotoAndPlay (50);
}
};
Symbol 362 MovieClip Frame 20
stop();
Selection.setFocus("Name");
OKButtonInst.onRelease = function () {
if ((Name == "") || (Name == undefined)) {
return(undefined);
}
_root.Sfx.Play(_root.SFXID_Beep1, 1);
var score = ("" + _root.Driver1.finishTime);
if (_root.gTrack == 0) {
_root.BBCScoresInst.SubmitHighScore("husky_one", Name, score);
} else {
_root.BBCScoresInst.SubmitHighScore("husky_two", Name, score);
}
if (gNumPlayers == 2) {
gotoAndPlay (30);
} else {
gotoAndPlay (50);
}
};
onEnterFrame = function () {
if (Key.isDown(13)) {
OKButtonInst.onRelease();
}
};
Symbol 362 MovieClip Frame 30
stop();
YesButtonInst.onRelease = function () {
_root.Sfx.Play(_root.SFXID_Beep1, 1);
gotoAndPlay (40);
};
NoButtonInst.onRelease = function () {
_root.Sfx.Play(_root.SFXID_Beep1, 1);
gotoAndPlay (50);
};
Symbol 362 MovieClip Frame 40
stop();
Name = "";
Selection.setFocus("Name");
OKButtonInst.onRelease = function () {
if ((Name == "") || (Name == undefined)) {
return(undefined);
}
_root.Sfx.Play(_root.SFXID_Beep1, 1);
var score = ("" + _root.Driver2.finishTime);
if (_root.gTrack == 0) {
_root.BBCScoresInst.SubmitHighScore("husky_one", Name, score);
} else {
_root.BBCScoresInst.SubmitHighScore("husky_two", Name, score);
}
gotoAndPlay (50);
};
onEnterFrame = function () {
if (Key.isDown(13)) {
OKButtonInst.onRelease();
}
};
Symbol 362 MovieClip Frame 50
function ConvertScoreToTime(ScoreString) {
t = new Number(ScoreString);
if (isNan(t)) {
return(undefined);
}
var s = Math.floor(t / 1000);
var m = Math.floor(s / 60);
s = s - (m * 60);
var h = Math.floor((t - ((m * 60000) + (s * 1000))) / 10);
m = "" + m;
if (m.length == 1) {
m = "0" + m;
}
s = "" + s;
if (s.length == 1) {
s = "0" + s;
}
h = "" + h;
if (h.length == 1) {
h = "0" + h;
}
return((((m + ":") + s) + ":") + h);
}
stop();
PlayAgainDialogInst.name1.text = "--:--:--";
PlayAgainDialogInst.name2.text = "--:--:--";
PlayAgainDialogInst.name3.text = "--:--:--";
PlayAgainDialogInst.name4.text = "--:--:--";
PlayAgainDialogInst.name5.text = "--:--:--";
PlayAgainDialogInst.name6.text = "--:--:--";
PlayAgainDialogInst.name7.text = "--:--:--";
PlayAgainDialogInst.name8.text = "--:--:--";
PlayAgainDialogInst.name9.text = "--:--:--";
PlayAgainDialogInst.name10.text = "--:--:--";
PlayAgainDialogInst.name1.text = "";
PlayAgainDialogInst.name2.text = "";
PlayAgainDialogInst.name3.text = "";
PlayAgainDialogInst.name4.text = "";
PlayAgainDialogInst.name5.text = "";
PlayAgainDialogInst.name6.text = "";
PlayAgainDialogInst.name7.text = "";
PlayAgainDialogInst.name8.text = "";
PlayAgainDialogInst.name9.text = "";
PlayAgainDialogInst.name10.text = "";
_root.BBCScoresInst.ResetResults();
if (_root.gTrack == 0) {
_root.BBCScoresInst.RetrieveScores("husky_one");
} else {
_root.BBCScoresInst.RetrieveScores("husky_two");
}
PlayAgainDialogInst.YesButtonInst.onRelease = function () {
_root.Sfx.Play(_root.SFXID_Beep1, 1);
_parent.ResetRace();
};
PlayAgainDialogInst.NoButtonInst.onRelease = function () {
_root.Sfx.Play(_root.SFXID_Beep1, 1);
_parent.Back();
};
trace(ConvertScoreToTime("16824"));
onEnterFrame = function () {
PlayAgainDialogInst.name1.text = _root.BBCScoresInst.results.name1;
PlayAgainDialogInst.name2.text = _root.BBCScoresInst.results.name2;
PlayAgainDialogInst.name3.text = _root.BBCScoresInst.results.name3;
PlayAgainDialogInst.name4.text = _root.BBCScoresInst.results.name4;
PlayAgainDialogInst.name5.text = _root.BBCScoresInst.results.name5;
PlayAgainDialogInst.name6.text = _root.BBCScoresInst.results.name6;
PlayAgainDialogInst.name7.text = _root.BBCScoresInst.results.name7;
PlayAgainDialogInst.name8.text = _root.BBCScoresInst.results.name8;
PlayAgainDialogInst.name9.text = _root.BBCScoresInst.results.name9;
PlayAgainDialogInst.name10.text = _root.BBCScoresInst.results.name10;
PlayAgainDialogInst.time1.text = ConvertScoreToTime(_root.BBCScoresInst.results.score1);
PlayAgainDialogInst.time2.text = ConvertScoreToTime(_root.BBCScoresInst.results.score2);
PlayAgainDialogInst.time3.text = ConvertScoreToTime(_root.BBCScoresInst.results.score3);
PlayAgainDialogInst.time4.text = ConvertScoreToTime(_root.BBCScoresInst.results.score4);
PlayAgainDialogInst.time5.text = ConvertScoreToTime(_root.BBCScoresInst.results.score5);
PlayAgainDialogInst.time6.text = ConvertScoreToTime(_root.BBCScoresInst.results.score6);
PlayAgainDialogInst.time7.text = ConvertScoreToTime(_root.BBCScoresInst.results.score7);
PlayAgainDialogInst.time8.text = ConvertScoreToTime(_root.BBCScoresInst.results.score8);
PlayAgainDialogInst.time9.text = ConvertScoreToTime(_root.BBCScoresInst.results.score9);
PlayAgainDialogInst.time10.text = ConvertScoreToTime(_root.BBCScoresInst.results.score10);
};