Instance of Symbol 13 MovieClip "iSoundManager" in Frame 1
onClipEvent (load) {
function mMusicTransition(vMusic1, vMusic2) {
vMusic1.stop();
vMusic2.start(0, 9999);
}
_root.globalVolume = new Sound();
_root.globalVolume.music_Title = new Sound();
_root.globalVolume.music_Title.attachSound("music_Title");
_root.globalVolume.music_Track1 = new Sound();
_root.globalVolume.music_Track1.attachSound("music_Track1");
_root.globalVolume.music_Track2 = new Sound();
_root.globalVolume.music_Track2.attachSound("music_Track2");
_root.globalVolume.music_Track3 = new Sound();
_root.globalVolume.music_Track3.attachSound("music_Track3");
_root.globalVolume.sound_Start = new Sound();
_root.globalVolume.sound_Start.attachSound("sound_Start");
_root.globalVolume.sound_Select = new Sound();
_root.globalVolume.sound_Select.attachSound("sound_Select");
_root.globalVolume.sound_Finish = new Sound();
_root.globalVolume.sound_Finish.attachSound("sound_Finish");
_root.globalVolume.sound_Skid = new Sound();
_root.globalVolume.sound_Skid.attachSound("sound_Skid");
_root.globalVolume.sound_PickUp = new Sound();
_root.globalVolume.sound_PickUp.attachSound("sound_PickUp");
}
Frame 2
stop();
if (_root.getBytesLoaded() >= _root.getBytesTotal()) {
_root.vTargetFrame = "Title";
_root.play();
_root.globalVolume.music_Title.start(0, 9999);
} else {
_root.gotoAndPlay("Loading");
}
Frame 10
_root.gotoAndPlay(_root.vTargetFrame);
Instance of Symbol 43 MovieClip "iVolume" in Frame 14
onClipEvent (load) {
if (0 >= _root.globalVolume.getVolume()) {
this.pStatus = false;
this.gotoAndStop(2);
} else {
this.pStatus = true;
this.gotoAndStop(1);
}
}
onClipEvent (mouseUp) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (this.pStatus) {
_root.globalVolume.setVolume(0);
this.play();
} else {
_root.globalVolume.setVolume(100);
this.play();
}
this.pStatus = !this.pStatus;
}
}
Frame 23
stop();
Mouse.show();
Frame 32
_root.gotoAndPlay(_root.vTargetFrame);
Instance of Symbol 54 MovieClip in Frame 36
onClipEvent (load) {
this.gotoAndStop(1);
}
Instance of Symbol 55 MovieClip in Frame 36
onClipEvent (load) {
this.gotoAndStop(2);
}
Instance of Symbol 56 MovieClip in Frame 36
onClipEvent (load) {
this.gotoAndStop(3);
}
Instance of Symbol 43 MovieClip "iVolume" in Frame 36
onClipEvent (load) {
if (0 >= _root.globalVolume.getVolume()) {
this.pStatus = false;
this.gotoAndStop(2);
} else {
this.pStatus = true;
this.gotoAndStop(1);
}
}
onClipEvent (mouseUp) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (this.pStatus) {
_root.globalVolume.setVolume(0);
this.play();
} else {
_root.globalVolume.setVolume(100);
this.play();
}
this.pStatus = !this.pStatus;
}
}
Frame 45
stop();
Frame 54
_root.gotoAndPlay(_root.vTargetFrame);
Instance of Symbol 43 MovieClip "iVolume" in Frame 58
onClipEvent (load) {
if (0 >= _root.globalVolume.getVolume()) {
this.pStatus = false;
this.gotoAndStop(2);
} else {
this.pStatus = true;
this.gotoAndStop(1);
}
}
onClipEvent (mouseUp) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (this.pStatus) {
_root.globalVolume.setVolume(0);
this.play();
} else {
_root.globalVolume.setVolume(100);
this.play();
}
this.pStatus = !this.pStatus;
}
}
Frame 67
stop();
Frame 76
_root.gotoAndPlay(_root.vTargetFrame);
Instance of Symbol 75 MovieClip "iBeetle" in Frame 80
onClipEvent (load) {
this._alpha = 0;
}
onClipEvent (mouseUp) {
if (this.hitTest(_root._xmouse, _root._ymouse, true) && (_root.iSelectPopUp._currentFrame == 1)) {
_root.vSelectedCar = "v2";
_root.i4x4._alpha = 0;
_root.iBeetle._alpha = 100;
_root.iImpreza._alpha = 0;
}
}
onClipEvent (enterFrame) {
if ((_root.vSelectedCar != "v2") && (_root.iSelectPopUp._currentFrame == 1)) {
if (this.hitTest(_root._xmouse, _root._ymouse, true) && (this._alpha < 70)) {
this._alpha = this._alpha + 10;
} else if ((!this.hitTest(_root._xmouse, _root._ymouse, true)) && (0 < this._alpha)) {
this._alpha = this._alpha - 10;
}
}
}
Instance of Symbol 77 MovieClip "iImpreza" in Frame 80
onClipEvent (load) {
this._alpha = 0;
}
onClipEvent (mouseUp) {
if (this.hitTest(_root._xmouse, _root._ymouse, true) && (_root.iSelectPopUp._currentFrame == 1)) {
_root.vSelectedCar = "v3";
_root.i4x4._alpha = 0;
_root.iBeetle._alpha = 0;
_root.iImpreza._alpha = 100;
}
}
onClipEvent (enterFrame) {
if ((_root.vSelectedCar != "v3") && (_root.iSelectPopUp._currentFrame == 1)) {
if (this.hitTest(_root._xmouse, _root._ymouse, true) && (this._alpha < 70)) {
this._alpha = this._alpha + 10;
} else if ((!this.hitTest(_root._xmouse, _root._ymouse, true)) && (0 < this._alpha)) {
this._alpha = this._alpha - 10;
}
}
}
Instance of Symbol 78 MovieClip "i4x4" in Frame 80
onClipEvent (load) {
this._alpha = 0;
}
onClipEvent (mouseUp) {
if (this.hitTest(_root._xmouse, _root._ymouse, true) && (_root.iSelectPopUp._currentFrame == 1)) {
_root.vSelectedCar = "v1";
_root.i4x4._alpha = 100;
_root.iBeetle._alpha = 0;
_root.iImpreza._alpha = 0;
}
}
onClipEvent (enterFrame) {
if ((_root.vSelectedCar != "v1") && (_root.iSelectPopUp._currentFrame == 1)) {
if (this.hitTest(_root._xmouse, _root._ymouse, true) && (this._alpha < 70)) {
this._alpha = this._alpha + 10;
} else if ((!this.hitTest(_root._xmouse, _root._ymouse, true)) && (0 < this._alpha)) {
this._alpha = this._alpha - 10;
}
}
}
Frame 89
stop();
Frame 98
_root.gotoAndPlay(_root.vTargetFrame);
Instance of Symbol 91 MovieClip "iWP1" in Frame 102
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Instance of Symbol 91 MovieClip "iWP2" in Frame 102
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Instance of Symbol 91 MovieClip "iWP3" in Frame 102
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Instance of Symbol 91 MovieClip "iWP7" in Frame 102
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Instance of Symbol 91 MovieClip "iWP4" in Frame 102
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Instance of Symbol 91 MovieClip "iWP5" in Frame 102
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Instance of Symbol 91 MovieClip "iWP6" in Frame 102
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Instance of Symbol 91 MovieClip "iWP8" in Frame 102
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Instance of Symbol 91 MovieClip "iWP9" in Frame 102
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Instance of Symbol 91 MovieClip "iWP10" in Frame 102
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Instance of Symbol 116 MovieClip "iPlayer" in Frame 102
/* no clip actions */
Instance of Symbol 120 MovieClip "iCPU" in Frame 102
/* no clip actions */
Instance of Symbol 149 MovieClip "iCollisionManager" in Frame 102
onClipEvent (load) {
function mContactWithLimits(oCar) {
oCar.pMomentum = oCar.pMomentum * -1;
}
function mContactWithCar(oCar, vCollision) {
if (vCollision) {
oCar.pResist++;
if (oCar.pResist >= 5) {
oCar.pResist = 0;
this.mContactWithOilPatch(oCar);
}
} else {
oCar.pResist = oCar.pResist - 0.5;
if (0 >= oCar.pResist) {
oCar.pResist = 0;
}
}
}
function mContactWithGrass(oCar) {
oCar.pMomentum = oCar.pMomentum * 0.94;
}
function mContactWithSand(oCar) {
oCar.pMomentum = oCar.pMomentum * 0.96;
}
function mContactWithOilPatch(oCar) {
oCar.gotoAndPlay("slip");
oCar.pSlipping = true;
}
}
onClipEvent (enterFrame) {
if (_root.oTrack.mDetectCollision(_root.iCPU, _root.iTrack1Limits, 6)) {
this.mContactWithLimits(_root.iCPU);
} else if (_root.oTrack.mDetectCollision(_root.iCPU, _root.iTrack1Grass, 0)) {
this.mContactWithGrass(_root.iCPU);
} else if (_root.oTrack.mDetectCollision(_root.iCPU, _root.iTrack1Sand, 0)) {
this.mContactWithSand(_root.iCPU);
}
if (_root.oTrack.mDetectCollision(_root.iCPU, _root.iPlayer, 3)) {
this.mContactWithCar(_root.iCPU, true);
} else {
this.mContactWithCar(_root.iCPU, false);
}
if (_root.oTrack.mDetectCollision(_root.iCPU, _root.iObstacle1, 0)) {
this.mContactWithOilPatch(_root.iCPU);
} else if (_root.oTrack.mDetectCollision(_root.iCPU, _root.iObstacle2, 6)) {
this.mContactWithLimits(_root.iCPU);
} else if (_root.oTrack.mDetectCollision(_root.iCPU, _root.iObstacle3, 6)) {
this.mContactWithLimits(_root.iCPU);
}
if (_root.oTrack.mDetectCollision(_root.iPlayer, _root.iTrack1Limits, 6)) {
this.mContactWithLimits(_root.iPlayer);
} else if (_root.oTrack.mDetectCollision(_root.iPlayer, _root.iTrack1Grass, 0)) {
this.mContactWithGrass(_root.iPlayer);
} else if (_root.oTrack.mDetectCollision(_root.iPlayer, _root.iTrack1Sand, 0)) {
this.mContactWithSand(_root.iPlayer);
}
if (_root.oTrack.mDetectCollision(_root.iPlayer, _root.iCPU, 3)) {
this.mContactWithCar(_root.iPlayer, true);
} else {
this.mContactWithCar(_root.iPlayer, false);
}
if (_root.oTrack.mDetectCollision(_root.iPlayer, _root.iObstacle1, 0)) {
this.mContactWithOilPatch(_root.iPlayer);
} else if (_root.oTrack.mDetectCollision(_root.iPlayer, _root.iObstacle2, 6)) {
this.mContactWithLimits(_root.iPlayer);
} else if (_root.oTrack.mDetectCollision(_root.iPlayer, _root.iObstacle3, 6)) {
this.mContactWithLimits(_root.iPlayer);
}
if (_root.oTrack.mDetectCollision(_root.iPlayer, _root.iItems, 0)) {
_root.iItemManager.mPickUpItem();
}
}
Instance of Symbol 151 MovieClip "iChronoManager" in Frame 102
onClipEvent (load) {
function mResetChrono() {
this.pRunning = false;
this.pMilliseconds = 0;
this.pSeconds = 0;
this.pMinutes = 0;
}
function mStartChrono() {
this.pRunning = true;
}
function mStopChrono() {
this.pRunning = false;
}
this.pRunning = false;
this.pFieldVariable = "iChrono.oChrono";
this.pMilliseconds = 0;
this.pSeconds = 0;
this.pMinutes = 0;
this.pRefreshMilliseconds = "00";
this.pRefreshSeconds = "00";
this.pRefreshMinutes = "00";
}
onClipEvent (enterFrame) {
if (this.pRunning) {
this.pMilliseconds = this.pMilliseconds + 1.66666666666667;
if (this.pMilliseconds >= 100) {
this.pMilliseconds = 0;
this.pSeconds++;
if (this.pSeconds >= 60) {
this.pSeconds = 0;
this.pMinutes++;
}
}
if (int(this.pMilliseconds) < 10) {
this.pRefreshMilliseconds = "0" + int(this.pMilliseconds);
} else {
this.pRefreshMilliseconds = int(this.pMilliseconds);
}
if (int(this.pSeconds) < 10) {
this.pRefreshSeconds = "0" + int(this.pSeconds);
} else {
this.pRefreshSeconds = int(this.pSeconds);
}
if (int(this.pMinutes) < 10) {
this.pRefreshMinutes = "0" + int(this.pMinutes);
} else {
this.pRefreshMinutes = int(this.pMinutes);
}
var vTimeRefresh = ((((this.pRefreshMinutes + " ") + this.pRefreshSeconds) + " ") + this.pRefreshMilliseconds);
Set("_root." + this.pFieldVariable, vTimeRefresh);
}
}
Instance of Symbol 154 MovieClip in Frame 102
onClipEvent (load) {
function cTrigoTools() {
this.pAngle = null;
this.pSpeed = null;
this.pOrigineX = null;
this.pOrigineY = null;
this.pTargetX = null;
this.pTargetY = null;
this.mVectorMove = fVectorMove;
this.mGetDistance = fGetDistance;
this.mGetAngle = fGetAngle;
}
function fVectorMove(oObjectName, iAngle, iSpeed) {
this.pAngle = iAngle;
this.pSpeed = iSpeed;
oObjectName._x = oObjectName._x + (Math.sin(this.pAngle * (Math.PI/180)) * this.pSpeed);
oObjectName._y = oObjectName._y + (Math.cos(this.pAngle * (Math.PI/180)) * (this.pSpeed * -1));
}
function fGetDistance(iOrigineX, iOrigineY, iTargetX, iTargetY) {
this.pOrigineX = iOrigineX;
this.pOrigineY = iOrigineY;
this.pTargetX = iTargetX;
this.pTargetY = iTargetY;
var vA = (this.pOrigineY - this.pTargetY);
var vB = (this.pOrigineX - this.pTargetX);
var vDistance = Math.sqrt((vA * vA) + (vB * vB));
return(vDistance);
}
function fGetAngle(iOrigineX, iOrigineY, iTargetX, iTargetY) {
this.pOrigineX = iOrigineX;
this.pOrigineY = iOrigineY;
this.pTargetX = iTargetX;
this.pTargetY = iTargetY;
var vA = (this.pOrigineX - this.pTargetX);
var vB = (this.pOrigineY - this.pTargetY);
var vAngleRadian = (Math.atan2(vB, vA) - (Math.PI/2));
var vAngleDegree = ((vAngleRadian * 180) / Math.PI);
return(vAngleDegree);
}
_root.oCPUMovement = new cTrigoTools();
_root.oWaypointChecker = new cTrigoTools();
}
Instance of Symbol 156 MovieClip in Frame 102
onClipEvent (load) {
function cCDetect() {
this.pObjectDetected = null;
this.pFeedbackPixels = null;
this.mDetectCollision = fDetectCollision;
}
function fDetectCollision(oObjectDetecting, oObjectDetected, iFeedbackPixels) {
this.pObjectDetected = oObjectDetected;
this.pFeedbackPixels = iFeedbackPixels;
with (oObjectDetecting) {
if (oObjectDetected.hitTest(getBounds(_root).xMin, _y, true)) {
_x = _x + this.pFeedbackPixels;
return(true);
}
if (oObjectDetected.hitTest(getBounds(_root).xMax, _y, true)) {
_x = _x - this.pFeedbackPixels;
return(true);
}
if (oObjectDetected.hitTest(_x, getBounds(_root).yMin, true)) {
_y = _y + this.pFeedbackPixels;
return(true);
}
if (oObjectDetected.hitTest(_x, getBounds(_root).yMax, true)) {
_y = _y - this.pFeedbackPixels;
return(true);
}
return(false);
}
}
_root.oTrack = new cCDetect();
}
Instance of Symbol 158 MovieClip "iCPUWaypointManager" in Frame 102
onClipEvent (load) {
function mNextWaypoint() {
this.pCurrentWaypointNmb++;
if (this.pTotalWaypoints < this.pCurrentWaypointNmb) {
this.pCanCompleteLap = true;
this.pCurrentWaypointNmb = 1;
}
}
this.pCanCompleteLap = false;
this.pNumberOfLaps = 7;
this.pCompletedLaps = 0;
this.pTrackCompleted = false;
this.pTotalWaypoints = 10;
this.pPointsName = "iWP";
this.pCurrentWaypointNmb = 1;
this.pMinDistanceToWaypoint = 20;
}
onClipEvent (enterFrame) {
this.pCurrentWaypoint = eval (("_root." + this.pPointsName) + this.pCurrentWaypointNmb);
if (_root.oWaypointChecker.mGetDistance(_root.iCPU._x, _root.iCPU._y, pCurrentWaypoint._x, pCurrentWaypoint._y) < this.pMinDistanceToWaypoint) {
this.mNextWaypoint();
}
if (_root.oTrack.mDetectCollision(_root.iCPU, _root.iStartLine, 0) && (this.pCanCompleteLap)) {
this.pCompletedLaps++;
this.pCanCompleteLap = false;
if (this.pCompletedLaps == this.pNumberOfLaps) {
this.pTrackCompleted = true;
_root.iCPU.pBehavior = false;
_root.iCPU.pMomentum = 0;
_root.vCPUMilliseconds = int(_root.iChronoManager.pMilliseconds);
_root.vCPUSeconds = _root.iChronoManager.pSeconds;
_root.vCPUMinutes = _root.iChronoManager.pMinutes;
_root.iCPU._x = -500;
_root.iCPU._y = -500;
if (_root.iPlayerWayPointManager.pTrackCompleted) {
_root.iChronoManager.mStopChrono();
_root.vTargetFrame = "Result1";
_root.play();
_root.iSoundManager.mMusicTransition(_root.globalVolume.music_Track1, _root.globalVolume.music_Title);
}
}
}
}
Instance of Symbol 159 MovieClip "iPlayerWaypointManager" in Frame 102
onClipEvent (load) {
function mNextWaypoint() {
this.pCurrentWaypointNmb++;
if (this.pTotalWaypoints < this.pCurrentWaypointNmb) {
this.pCanCompleteLap = true;
this.pCurrentWaypointNmb = 1;
}
}
this.pCanCompleteLap = false;
this.pNumberOfLaps = 7;
this.pCompletedLaps = 0;
this.pTrackCompleted = false;
this.pTotalWaypoints = 4;
this.pPointsName = "iPWP";
this.pCurrentWaypointNmb = 1;
this.pMinDistanceToWaypoint = 70;
}
onClipEvent (enterFrame) {
this.pCurrentWaypoint = eval (("_root." + this.pPointsName) + this.pCurrentWaypointNmb);
if (_root.oWaypointChecker.mGetDistance(_root.iPlayer._x, _root.iPlayer._y, pCurrentWaypoint._x, pCurrentWaypoint._y) < this.pMinDistanceToWaypoint) {
this.mNextWaypoint();
}
if (_root.oTrack.mDetectCollision(_root.iPlayer, _root.iStartLine, 0) && (this.pCanCompleteLap)) {
this.pCompletedLaps++;
this.pCanCompleteLap = false;
if (this.pcompletedLaps == (this.pNumberOfLaps - 1)) {
_root.iCountDown.gotoAndPlay("LastLap");
}
if (this.pCompletedLaps == this.pNumberOfLaps) {
this.pTrackCompleted = true;
_root.iCountDown.gotoAndPlay("Finish");
_root.iPlayer.pBehavior = false;
_root.iPlayer.pMomentum = 0;
_root.vPlayerMilliseconds = int(_root.iChronoManager.pMilliseconds);
_root.vPlayerSeconds = _root.iChronoManager.pSeconds;
_root.vPlayerMinutes = _root.iChronoManager.pMinutes;
_root.iPlayer._x = 500;
_root.iPlayer._y = -500;
if (_root.iCPUWayPointManager.pTrackCompleted) {
_root.iChronoManager.mStopChrono();
_root.vTargetFrame = "Result1";
_root.play();
_root.iSoundManager.mMusicTransition(_root.globalVolume.music_Track1, _root.globalVolume.music_Title);
}
} else {
var vRefreshLaps = (((this.pCompletedLaps + 1) + "/") + this.pNumberOfLaps);
_root.iLaps.oLaps = vRefreshLaps;
}
}
}
Instance of Symbol 161 MovieClip "iItemManager" in Frame 102
onClipEvent (load) {
function mPlaceItem() {
var vRandom = (random(this.pPositionsNmbr) + 1);
var vNewPosition = eval (("_root." + this.pPositionsName) + vRandom);
_root.iItems.gotoAndStop(random(3) + 1);
_root.iItems._x = vNewPosition._x;
_root.iItems._y = vNewPosition._y;
this.pActive = true;
}
function mPickUpItem() {
this.mRemoveItem();
_root.globalVolume.sound_PickUp.start(0.05, 0);
if (_root.iItems._currentFrame == 1) {
_root.vPointsBonus = _root.vPointsBonus + 250;
} else if (_root.iItems._currentFrame == 2) {
_root.vPointsBonus = _root.vPointsBonus + 350;
} else if (_root.iItems._currentFrame == 3) {
_root.vPointsBonus = _root.vPointsBonus + 500;
}
}
function mRemoveItem() {
this.pActive = false;
this.vToken = 0;
_root.iItems._x = -200;
_root.iItems._y = -200;
}
_root.vPointsBonus = 0;
this.pActive = null;
this.vToken = 0;
this.pPositionsName = "iWP";
this.pPositionsNmbr = 10;
}
onClipEvent (enterFrame) {
if (this.pActive == true) {
this.vToken++;
if (this.vToken >= 360) {
this.mRemoveItem();
this.vToken = 0;
}
} else if (this.pActive == false) {
this.vToken++;
if (this.vToken >= (random(181) + 60)) {
this.mPlaceItem();
this.vToken = 0;
}
}
}
Instance of Symbol 163 MovieClip "iObstacleManager" in Frame 102
onClipEvent (load) {
function mPlaceObstacle() {
var vRandom = (random(this.pPositionsNmbr) + 1);
var vNewPosition = eval (("_root." + this.pPositionsName) + vRandom);
var vNumber = (random(3) + 1);
this.pCurrentObstacle = eval ("_root.iObstacle" + vNumber);
this.pCurrentObstacle._x = vNewPosition._x + (random(61) - 30);
this.pCurrentObstacle._y = vNewPosition._y + (random(61) - 30);
this.pCurrentObstacle.gotoAndPlay(1);
this.pActive = true;
}
function mRemoveObstacle() {
this.pActive = false;
this.vToken = 0;
this.pCurrentObstacle._x = -200;
this.pCurrentObstacle._y = -200;
}
this.pActive = null;
this.vToken = 0;
this.pCurrentObstacle = null;
this.pPositionsName = "iPWP";
this.pPositionsNmbr = 4;
}
onClipEvent (enterFrame) {
if (this.pActive == true) {
if (this.pCurrentObstacle._currentFrame == this.pCurrentObstacle._totalFrames) {
this.mRemoveObstacle();
this.vToken = 0;
}
} else if (this.pActive == false) {
this.vToken++;
if (this.vToken >= (random(61) + 30)) {
this.mPlaceObstacle();
this.vToken = 0;
}
}
}
Frame 111
stop();
Instance of Symbol 164 MovieClip "iPlayer" in Frame 111
onClipEvent (load) {
function checkMaximums() {
if (this.pMomentum >= this.pMaxForwardSpeed) {
this.pMomentum = this.pMaxForwardSpeed;
}
if (this.pMaxBackwardSpeed >= this.pMomentum) {
this.pMomentum = this.pMaxBackwardSpeed;
}
}
this.pBehavior = false;
this.pMaxRotationSpeed = 2.75;
this.pRotationSpeed = 0;
this.pSlipping = false;
this.pResist = 0;
this.pMomentum = 0;
this.pLastMomentum = 0;
this.pFriction = 0.95;
this.pAcceleration = 0.05;
this.pMaxForwardSpeed = 3;
this.pMaxBackwardSpeed = -1.5;
}
onClipEvent (enterFrame) {
_root.oCPUMovement.mVectorMove(this, this._rotation, this.pMomentum);
if (((!Key.isDown(Key.UP)) || (this.pSlipping)) || (!this.pBehavior)) {
if (this.pLastMomentum == this.pMomentum) {
if (this.pMomentum != 0) {
this.pMomentum = this.pMomentum * this.pFriction;
}
}
}
if (Math.abs(this.pMomentum) < this.pAcceleration) {
this.pRotationSpeed = 0;
} else {
this.pRotationSpeed = this.pMaxRotationSpeed;
}
this.pLastMomentum = this.pMomentum;
if ((Key.isDown(Key.UP) && (!this.pSlipping)) && (this.pBehavior)) {
this.pMomentum = this.pMomentum + this.pAcceleration;
this.checkMaximums();
}
if ((Key.isDown(Key.DOWN) && (!this.pSlipping)) && (this.pBehavior)) {
this.pMomentum = this.pMomentum - this.pAcceleration;
this.checkMaximums();
}
if (Key.isDown(Key.LEFT) && (this.pBehavior)) {
if (this.pMomentum < 0) {
this._rotation = this._rotation + this.pRotationSpeed;
} else {
this._rotation = this._rotation - this.pRotationSpeed;
}
}
if (Key.isDown(Key.RIGHT) && (this.pBehavior)) {
if (this.pMomentum < 0) {
this._rotation = this._rotation - this.pRotationSpeed;
} else {
this._rotation = this._rotation + this.pRotationSpeed;
}
}
}
Instance of Symbol 165 MovieClip "iCPU" in Frame 111
onClipEvent (load) {
function mAdjustAngle(vAngle) {
if (vAngle < -360) {
vAngle = vAngle + 720;
} else if (vAngle < 0) {
vAngle = vAngle + 360;
}
vAngle = vAngle % 360;
return(vAngle);
}
function checkMaximums() {
if (this.pMomentum >= this.pMaxForwardSpeed) {
this.pMomentum = this.pMaxForwardSpeed;
}
if (this.pMaxBackwardSpeed >= this.pMomentum) {
this.pMomentum = this.pMaxBackwardSpeed;
}
}
this.pBehavior = "Idle";
this.pMaxRotationSpeed = 2.55;
this.pRotationSpeed = 0;
this.pSlipping = false;
this.pResist = 0;
this.pMomentum = 0;
this.pLastMomentum = 0;
this.pFriction = 0.95;
this.pAcceleration = 0.05;
this.pMaxForwardSpeed = 3;
this.pMaxBackwardSpeed = -1.5;
}
onClipEvent (enterFrame) {
_root.oCPUMovement.mVectorMove(this, this._rotation, this.pMomentum);
if (this.pSlipping || (this.pBehavior != "Forward")) {
if (this.pLastMomentum == this.pMomentum) {
if (this.pMomentum != 0) {
this.pMomentum = this.pMomentum * this.pFriction;
}
}
}
if (Math.abs(this.pMomentum) < this.pAcceleration) {
this.pRotationSpeed = 0;
} else {
this.pRotationSpeed = this.pMaxRotationSpeed;
}
this.pLastMomentum = this.pMomentum;
if ((this.pBehavior == "Forward") && (!this.pSlipping)) {
this.pMomentum = this.pMomentum + this.pAcceleration;
this.checkMaximums();
}
if ((this.pBehavior == "Backward") && (!this.pSlipping)) {
this.pMomentum = this.pMomentum - this.pAcceleration;
this.checkMaximums();
}
var vTargetAngle = this.mAdjustAngle(_root.oCPUMovement.mGetAngle(this._x, this._y, _root.iCPUWaypointManager.pCurrentWaypoint._x, _root.iCPUWaypointManager.pCurrentWaypoint._y));
var vCurrentAngle = this.mAdjustAngle(this._rotation);
var vDifference = (vCurrentAngle - vTargetAngle);
if (3 < Math.abs(vDifference)) {
if ((vCurrentAngle < 90) && (270 < vTargetAngle)) {
this._rotation = this._rotation - this.pRotationSpeed;
} else if ((270 < vCurrentAngle) && (vTargetAngle < 90)) {
this._rotation = this._rotation + this.pRotationSpeed;
} else if (0 < vDifference) {
this._rotation = this._rotation - this.pRotationSpeed;
} else if (vDifference < 0) {
this._rotation = this._rotation + this.pRotationSpeed;
}
}
}
Frame 120
_root.gotoAndPlay(_root.vTargetFrame);
Instance of Symbol 198 MovieClip "iTrackResultManager" in Frame 124
onClipEvent (load) {
function mUpdatePlayerTime() {
if (this.pPlayerMilliseconds < 10) {
this.pTempMillisecondsA = "0" + this.pPlayerMilliseconds;
} else {
this.pTempMillisecondsA = this.pPlayerMilliseconds;
}
if (this.pPlayerSeconds < 10) {
this.pTempSecondsA = "0" + this.pPlayerSeconds;
} else {
this.pTempSecondsA = this.pPlayerSeconds;
}
if (this.pPlayerMinutes < 10) {
this.pTempMinutesA = "0" + this.pPlayerMinutes;
} else {
this.pTempMinutesA = this.pPlayerMinutes;
}
var vTempTimeRefreshA = ((((this.pTempMinutesA + ":") + this.pTempSecondsA) + ":") + this.pTempMillisecondsA);
_root.iTrackResults.oPlayerTime = vTempTimeRefreshA;
}
function mUpdateCPUTime() {
if (this.pCPUMilliseconds < 10) {
this.pTempMillisecondsB = "0" + this.pCPUMilliseconds;
} else {
this.pTempMillisecondsB = this.pCPUMilliseconds;
}
if (this.pCPUSeconds < 10) {
this.pTempSecondsB = "0" + this.pCPUSeconds;
} else {
this.pTempSecondsB = this.pCPUSeconds;
}
if (this.pCPUMinutes < 10) {
this.pTempMinutesB = "0" + this.pCPUMinutes;
} else {
this.pTempMinutesB = this.pCPUMinutes;
}
var vTempTimeRefreshB = ((((this.pTempMinutesB + ":") + this.pTempSecondsB) + ":") + this.pTempMillisecondsB);
_root.iTrackResults.oCPUTime = vTempTimeRefreshB;
}
function mUpdatePointsTime() {
this.pCPUSeconds = this.pCPUSeconds + (this.pCPUMinutes * 60);
this.pPlayerSeconds = this.pPlayerSeconds + (this.pPlayerMinutes * 60);
if ((this.pCPUMilliseconds < this.pPlayerMilliseconds) && (0 < this.pCPUSeconds)) {
this.pCPUSeconds--;
this.pCPUMilliseconds = this.pCPUMilliseconds + 100;
}
this.pSousTotalA = (this.pCPUMilliseconds - this.pPlayerMilliseconds) * 10;
this.pSousTotalB = (this.pCPUSeconds - this.pPlayerSeconds) * 1000;
this.pTotalPointsTime = this.pSousTotalA + this.pSousTotalB;
_root.iTrackResults.oPointsTime = this.pTotalPointsTime;
}
function mUpdatePointsBonus() {
this.pTotalPointsBonus = _root.vPointsBonus;
var vTempBonusPoints = this.pTotalPointsBonus;
_root.iTrackResults.oPointsBonus = vTempBonusPoints;
}
function mUpdateTrackTotal() {
_root.pTrack1Total = this.pTotalPointsTime + this.pTotalPointsBonus;
_root.iTrackResults.oTrackTotal = _root.pTrack1Total;
}
this.pPlayerMilliseconds = _root.vPlayerMilliseconds;
this.pPlayerSeconds = _root.vPlayerSeconds;
this.pPlayerMinutes = _root.vPlayerMinutes;
this.pCPUMilliseconds = _root.vCPUMilliseconds;
this.pCPUSeconds = _root.vCPUSeconds;
this.pCPUMinutes = _root.vCPUMinutes;
_root.pTrack1Total = 0;
this.mUpdatePlayerTime();
this.mUpdateCPUTime();
this.mUpdatePointsTime();
this.mUpdatePointsBonus();
this.mUpdateTrackTotal();
this.pTempMillisecondsA = "00";
this.pTempSecondsA = "00";
this.pTempMinutesA = "00";
this.pTempMillisecondsB = "00";
this.pTempSecondsB = "00";
this.pTempMinutesB = "00";
this.pSousTotalA = 0;
this.pSousTotalB = 0;
this.pTotalPointsTime = 0;
this.pTotalPointsBonus = 0;
}
Frame 133
stop();
Frame 142
_root.gotoAndPlay(_root.vTargetFrame);
Instance of Symbol 91 MovieClip "iWP1" in Frame 146
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Instance of Symbol 91 MovieClip "iWP2" in Frame 146
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Instance of Symbol 91 MovieClip "iWP3" in Frame 146
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Instance of Symbol 91 MovieClip "iWP7" in Frame 146
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Instance of Symbol 91 MovieClip "iWP4" in Frame 146
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Instance of Symbol 91 MovieClip "iWP5" in Frame 146
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Instance of Symbol 91 MovieClip "iWP6" in Frame 146
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Instance of Symbol 91 MovieClip "iWP8" in Frame 146
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Instance of Symbol 91 MovieClip "iWP9" in Frame 146
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Instance of Symbol 91 MovieClip "iWP10" in Frame 146
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Instance of Symbol 217 MovieClip "iCPU" in Frame 146
/* no clip actions */
Instance of Symbol 154 MovieClip in Frame 146
onClipEvent (load) {
function cTrigoTools() {
this.pAngle = null;
this.pSpeed = null;
this.pOrigineX = null;
this.pOrigineY = null;
this.pTargetX = null;
this.pTargetY = null;
this.mVectorMove = fVectorMove;
this.mGetDistance = fGetDistance;
this.mGetAngle = fGetAngle;
}
function fVectorMove(oObjectName, iAngle, iSpeed) {
this.pAngle = iAngle;
this.pSpeed = iSpeed;
oObjectName._x = oObjectName._x + (Math.sin(this.pAngle * (Math.PI/180)) * this.pSpeed);
oObjectName._y = oObjectName._y + (Math.cos(this.pAngle * (Math.PI/180)) * (this.pSpeed * -1));
}
function fGetDistance(iOrigineX, iOrigineY, iTargetX, iTargetY) {
this.pOrigineX = iOrigineX;
this.pOrigineY = iOrigineY;
this.pTargetX = iTargetX;
this.pTargetY = iTargetY;
var vA = (this.pOrigineY - this.pTargetY);
var vB = (this.pOrigineX - this.pTargetX);
var vDistance = Math.sqrt((vA * vA) + (vB * vB));
return(vDistance);
}
function fGetAngle(iOrigineX, iOrigineY, iTargetX, iTargetY) {
this.pOrigineX = iOrigineX;
this.pOrigineY = iOrigineY;
this.pTargetX = iTargetX;
this.pTargetY = iTargetY;
var vA = (this.pOrigineX - this.pTargetX);
var vB = (this.pOrigineY - this.pTargetY);
var vAngleRadian = (Math.atan2(vB, vA) - (Math.PI/2));
var vAngleDegree = ((vAngleRadian * 180) / Math.PI);
return(vAngleDegree);
}
_root.oCPUMovement = new cTrigoTools();
_root.oWaypointChecker = new cTrigoTools();
}
Instance of Symbol 156 MovieClip in Frame 146
onClipEvent (load) {
function cCDetect() {
this.pObjectDetected = null;
this.pFeedbackPixels = null;
this.mDetectCollision = fDetectCollision;
}
function fDetectCollision(oObjectDetecting, oObjectDetected, iFeedbackPixels) {
this.pObjectDetected = oObjectDetected;
this.pFeedbackPixels = iFeedbackPixels;
with (oObjectDetecting) {
if (oObjectDetected.hitTest(getBounds(_root).xMin, _y, true)) {
_x = _x + this.pFeedbackPixels;
return(true);
}
if (oObjectDetected.hitTest(getBounds(_root).xMax, _y, true)) {
_x = _x - this.pFeedbackPixels;
return(true);
}
if (oObjectDetected.hitTest(_x, getBounds(_root).yMin, true)) {
_y = _y + this.pFeedbackPixels;
return(true);
}
if (oObjectDetected.hitTest(_x, getBounds(_root).yMax, true)) {
_y = _y - this.pFeedbackPixels;
return(true);
}
return(false);
}
}
_root.oTrack = new cCDetect();
}
Instance of Symbol 163 MovieClip "iObstacleManager" in Frame 146
onClipEvent (load) {
function mPlaceObstacle() {
var vRandom = (random(this.pPositionsNmbr) + 1);
var vNewPosition = eval (("_root." + this.pPositionsName) + vRandom);
var vNumber = (random(3) + 1);
this.pCurrentObstacle = eval ("_root.iObstacle" + vNumber);
this.pCurrentObstacle._x = vNewPosition._x + (random(61) - 30);
this.pCurrentObstacle._y = vNewPosition._y + (random(61) - 30);
this.pCurrentObstacle.gotoAndPlay(1);
this.pActive = true;
}
function mRemoveObstacle() {
this.pActive = false;
this.vToken = 0;
this.pCurrentObstacle._x = -200;
this.pCurrentObstacle._y = -200;
}
this.pActive = null;
this.vToken = 0;
this.pCurrentObstacle = null;
this.pPositionsName = "iPWP";
this.pPositionsNmbr = 4;
}
onClipEvent (enterFrame) {
if (this.pActive == true) {
if (this.pCurrentObstacle._currentFrame == this.pCurrentObstacle._totalFrames) {
this.mRemoveObstacle();
this.vToken = 0;
}
} else if (this.pActive == false) {
this.vToken++;
if (this.vToken >= (random(61) + 30)) {
this.mPlaceObstacle();
this.vToken = 0;
}
}
}
Instance of Symbol 161 MovieClip "iItemManager" in Frame 146
onClipEvent (load) {
function mPlaceItem() {
var vRandom = (random(this.pPositionsNmbr) + 1);
var vNewPosition = eval (("_root." + this.pPositionsName) + vRandom);
_root.iItems.gotoAndStop(random(3) + 1);
_root.iItems._x = vNewPosition._x;
_root.iItems._y = vNewPosition._y;
this.pActive = true;
}
function mPickUpItem() {
this.mRemoveItem();
_root.globalVolume.sound_PickUp.start(0.05, 0);
if (_root.iItems._currentFrame == 1) {
_root.vPointsBonus = _root.vPointsBonus + 250;
} else if (_root.iItems._currentFrame == 2) {
_root.vPointsBonus = _root.vPointsBonus + 350;
} else if (_root.iItems._currentFrame == 3) {
_root.vPointsBonus = _root.vPointsBonus + 500;
}
}
function mRemoveItem() {
this.pActive = false;
this.vToken = 0;
_root.iItems._x = -200;
_root.iItems._y = -200;
}
_root.vPointsBonus = 0;
this.pActive = null;
this.vToken = 0;
this.pPositionsName = "iWP";
this.pPositionsNmbr = 10;
}
onClipEvent (enterFrame) {
if (this.pActive == true) {
this.vToken++;
if (this.vToken >= 360) {
this.mRemoveItem();
this.vToken = 0;
}
} else if (this.pActive == false) {
this.vToken++;
if (this.vToken >= (random(181) + 60)) {
this.mPlaceItem();
this.vToken = 0;
}
}
}
Instance of Symbol 151 MovieClip "iChronoManager" in Frame 146
onClipEvent (load) {
function mResetChrono() {
this.pRunning = false;
this.pMilliseconds = 0;
this.pSeconds = 0;
this.pMinutes = 0;
}
function mStartChrono() {
this.pRunning = true;
}
function mStopChrono() {
this.pRunning = false;
}
this.pRunning = false;
this.pFieldVariable = "iChrono.oChrono";
this.pMilliseconds = 0;
this.pSeconds = 0;
this.pMinutes = 0;
this.pRefreshMilliseconds = "00";
this.pRefreshSeconds = "00";
this.pRefreshMinutes = "00";
}
onClipEvent (enterFrame) {
if (this.pRunning) {
this.pMilliseconds = this.pMilliseconds + 1.66666666666667;
if (this.pMilliseconds >= 100) {
this.pMilliseconds = 0;
this.pSeconds++;
if (this.pSeconds >= 60) {
this.pSeconds = 0;
this.pMinutes++;
}
}
if (int(this.pMilliseconds) < 10) {
this.pRefreshMilliseconds = "0" + int(this.pMilliseconds);
} else {
this.pRefreshMilliseconds = int(this.pMilliseconds);
}
if (int(this.pSeconds) < 10) {
this.pRefreshSeconds = "0" + int(this.pSeconds);
} else {
this.pRefreshSeconds = int(this.pSeconds);
}
if (int(this.pMinutes) < 10) {
this.pRefreshMinutes = "0" + int(this.pMinutes);
} else {
this.pRefreshMinutes = int(this.pMinutes);
}
var vTimeRefresh = ((((this.pRefreshMinutes + " ") + this.pRefreshSeconds) + " ") + this.pRefreshMilliseconds);
Set("_root." + this.pFieldVariable, vTimeRefresh);
}
}
Instance of Symbol 221 MovieClip "iCollisionManager" in Frame 146
onClipEvent (load) {
function mContactWithLimits(oCar) {
oCar.pMomentum = oCar.pMomentum * -1;
}
function mContactWithCar(oCar, vCollision) {
if (vCollision) {
oCar.pResist++;
if (oCar.pResist >= 5) {
oCar.pResist = 0;
this.mContactWithOilPatch(oCar, vPlayer);
}
} else {
oCar.pResist = oCar.pResist - 0.5;
if (0 >= oCar.pResist) {
oCar.pResist = 0;
}
}
}
function mContactWithGrass(oCar) {
oCar.pMomentum = oCar.pMomentum * 0.94;
}
function mContactWithSand(oCar) {
oCar.pMomentum = oCar.pMomentum * 0.96;
}
function mContactWithOilPatch(oCar, vPlayer) {
oCar.gotoAndPlay("slip");
oCar.pSlipping = true;
if (vPlayer) {
_root.iPlayerHeadLights.gotoAndPlay("slip");
} else {
_root.iCPUHeadLights.gotoAndPlay("slip");
}
}
}
onClipEvent (enterFrame) {
if (_root.oTrack.mDetectCollision(_root.iCPU, _root.iTrack2Limits, 6)) {
this.mContactWithLimits(_root.iCPU);
} else if (_root.oTrack.mDetectCollision(_root.iCPU, _root.iTrack2Grass, 0)) {
this.mContactWithGrass(_root.iCPU);
} else if (_root.oTrack.mDetectCollision(_root.iCPU, _root.iTrack2Sand, 0)) {
this.mContactWithSand(_root.iCPU);
}
if (_root.oTrack.mDetectCollision(_root.iCPU, _root.iPlayer, 3)) {
this.mContactWithCar(_root.iCPU, true, false);
} else {
this.mContactWithCar(_root.iCPU, false, false);
}
if (_root.oTrack.mDetectCollision(_root.iCPU, _root.iObstacle1, 0)) {
this.mContactWithOilPatch(_root.iCPU, false);
} else if (_root.oTrack.mDetectCollision(_root.iCPU, _root.iObstacle2, 6)) {
this.mContactWithLimits(_root.iCPU);
} else if (_root.oTrack.mDetectCollision(_root.iCPU, _root.iObstacle3, 6)) {
this.mContactWithLimits(_root.iCPU);
}
if (_root.oTrack.mDetectCollision(_root.iPlayer, _root.iTrack2Limits, 6)) {
this.mContactWithLimits(_root.iPlayer);
} else if (_root.oTrack.mDetectCollision(_root.iPlayer, _root.iTrack2Grass, 0)) {
this.mContactWithGrass(_root.iPlayer);
} else if (_root.oTrack.mDetectCollision(_root.iPlayer, _root.iTrack2Sand, 0)) {
this.mContactWithSand(_root.iPlayer);
}
if (_root.oTrack.mDetectCollision(_root.iPlayer, _root.iCPU, 3)) {
this.mContactWithCar(_root.iPlayer, true, true);
} else {
this.mContactWithCar(_root.iPlayer, false, true);
}
if (_root.oTrack.mDetectCollision(_root.iPlayer, _root.iObstacle1, 0)) {
this.mContactWithOilPatch(_root.iPlayer, true);
} else if (_root.oTrack.mDetectCollision(_root.iPlayer, _root.iObstacle2, 6)) {
this.mContactWithLimits(_root.iPlayer);
} else if (_root.oTrack.mDetectCollision(_root.iPlayer, _root.iObstacle3, 6)) {
this.mContactWithLimits(_root.iPlayer);
}
if (_root.oTrack.mDetectCollision(_root.iPlayer, _root.iItems, 0)) {
_root.iItemManager.mPickUpItem();
}
}
Instance of Symbol 222 MovieClip "iCPUWaypointManager" in Frame 146
onClipEvent (load) {
function mNextWaypoint() {
this.pCurrentWaypointNmb++;
if (this.pTotalWaypoints < this.pCurrentWaypointNmb) {
this.pCanCompleteLap = true;
this.pCurrentWaypointNmb = 1;
}
}
this.pCanCompleteLap = false;
this.pNumberOfLaps = 7;
this.pCompletedLaps = 0;
this.pTrackCompleted = false;
this.pTotalWaypoints = 10;
this.pPointsName = "iWP";
this.pCurrentWaypointNmb = 1;
this.pMinDistanceToWaypoint = 20;
}
onClipEvent (enterFrame) {
this.pCurrentWaypoint = eval (("_root." + this.pPointsName) + this.pCurrentWaypointNmb);
if (_root.oWaypointChecker.mGetDistance(_root.iCPU._x, _root.iCPU._y, pCurrentWaypoint._x, pCurrentWaypoint._y) < this.pMinDistanceToWaypoint) {
this.mNextWaypoint();
}
if (_root.oTrack.mDetectCollision(_root.iCPU, _root.iStartLine, 0) && (this.pCanCompleteLap)) {
this.pCompletedLaps++;
this.pCanCompleteLap = false;
if (this.pCompletedLaps == this.pNumberOfLaps) {
this.pTrackCompleted = true;
_root.iCPU.pBehavior = false;
_root.iCPU.pMomentum = 0;
_root.vCPUMilliseconds = int(_root.iChronoManager.pMilliseconds);
_root.vCPUSeconds = _root.iChronoManager.pSeconds;
_root.vCPUMinutes = _root.iChronoManager.pMinutes;
_root.iCPU._x = -500;
_root.iCPU._y = -500;
if (_root.iPlayerWayPointManager.pTrackCompleted) {
_root.iChronoManager.mStopChrono();
_root.vTargetFrame = "Result2";
_root.play();
_root.iSoundManager.mMusicTransition(_root.globalVolume.music_Track2, _root.globalVolume.music_Title);
}
}
}
}
Instance of Symbol 223 MovieClip "iPlayerWaypointManager" in Frame 146
onClipEvent (load) {
function mNextWaypoint() {
this.pCurrentWaypointNmb++;
if (this.pTotalWaypoints < this.pCurrentWaypointNmb) {
this.pCanCompleteLap = true;
this.pCurrentWaypointNmb = 1;
}
}
this.pCanCompleteLap = false;
this.pNumberOfLaps = 7;
this.pCompletedLaps = 0;
this.pTrackCompleted = false;
this.pTotalWaypoints = 4;
this.pPointsName = "iPWP";
this.pCurrentWaypointNmb = 1;
this.pMinDistanceToWaypoint = 70;
}
onClipEvent (enterFrame) {
this.pCurrentWaypoint = eval (("_root." + this.pPointsName) + this.pCurrentWaypointNmb);
if (_root.oWaypointChecker.mGetDistance(_root.iPlayer._x, _root.iPlayer._y, pCurrentWaypoint._x, pCurrentWaypoint._y) < this.pMinDistanceToWaypoint) {
this.mNextWaypoint();
}
if (_root.oTrack.mDetectCollision(_root.iPlayer, _root.iStartLine, 0) && (this.pCanCompleteLap)) {
this.pCompletedLaps++;
this.pCanCompleteLap = false;
if (this.pcompletedLaps == (this.pNumberOfLaps - 1)) {
_root.iCountDown.gotoAndPlay("LastLap");
}
if (this.pCompletedLaps == this.pNumberOfLaps) {
this.pTrackCompleted = true;
_root.iCountDown.gotoAndPlay("Finish");
_root.iPlayer.pBehavior = false;
_root.iPlayer.pMomentum = 0;
_root.vPlayerMilliseconds = int(_root.iChronoManager.pMilliseconds);
_root.vPlayerSeconds = _root.iChronoManager.pSeconds;
_root.vPlayerMinutes = _root.iChronoManager.pMinutes;
_root.iPlayer._x = 500;
_root.iPlayer._y = -500;
if (_root.iCPUWayPointManager.pTrackCompleted) {
_root.iChronoManager.mStopChrono();
_root.vTargetFrame = "Result2";
_root.play();
_root.iSoundManager.mMusicTransition(_root.globalVolume.music_Track2, _root.globalVolume.music_Title);
}
} else {
var vRefreshLaps = (((this.pCompletedLaps + 1) + "/") + this.pNumberOfLaps);
_root.iLaps.oLaps = vRefreshLaps;
}
}
}
Frame 155
stop();
Instance of Symbol 224 MovieClip "iPlayerHeadLights" in Frame 155
onClipEvent (enterFrame) {
this._x = _root.iPlayer._x;
this._y = _root.iPlayer._y;
this._rotation = _root.iPlayer._rotation;
}
Instance of Symbol 225 MovieClip "iCPUHeadLights" in Frame 155
onClipEvent (enterFrame) {
this._x = _root.iCPU._x;
this._y = _root.iCPU._y;
this._rotation = _root.iCPU._rotation;
}
Instance of Symbol 226 MovieClip "iCPU" in Frame 155
onClipEvent (load) {
function mAdjustAngle(vAngle) {
if (vAngle < -360) {
vAngle = vAngle + 720;
} else if (vAngle < 0) {
vAngle = vAngle + 360;
}
vAngle = vAngle % 360;
return(vAngle);
}
function checkMaximums() {
if (this.pMomentum >= this.pMaxForwardSpeed) {
this.pMomentum = this.pMaxForwardSpeed;
}
if (this.pMaxBackwardSpeed >= this.pMomentum) {
this.pMomentum = this.pMaxBackwardSpeed;
}
}
this.pBehavior = "Idle";
this.pMaxRotationSpeed = 2.55;
this.pRotationSpeed = 0;
this.pSlipping = false;
this.pResist = 0;
this.pMomentum = 0;
this.pLastMomentum = 0;
this.pFriction = 0.95;
this.pAcceleration = 0.05;
this.pMaxForwardSpeed = 3;
this.pMaxBackwardSpeed = -1.5;
}
onClipEvent (enterFrame) {
_root.oCPUMovement.mVectorMove(this, this._rotation, this.pMomentum);
if (this.pSlipping || (this.pBehavior != "Forward")) {
if (this.pLastMomentum == this.pMomentum) {
if (this.pMomentum != 0) {
this.pMomentum = this.pMomentum * this.pFriction;
}
}
}
if (Math.abs(this.pMomentum) < this.pAcceleration) {
this.pRotationSpeed = 0;
} else {
this.pRotationSpeed = this.pMaxRotationSpeed;
}
this.pLastMomentum = this.pMomentum;
if ((this.pBehavior == "Forward") && (!this.pSlipping)) {
this.pMomentum = this.pMomentum + this.pAcceleration;
this.checkMaximums();
}
if ((this.pBehavior == "Backward") && (!this.pSlipping)) {
this.pMomentum = this.pMomentum - this.pAcceleration;
this.checkMaximums();
}
var vTargetAngle = this.mAdjustAngle(_root.oCPUMovement.mGetAngle(this._x, this._y, _root.iCPUWaypointManager.pCurrentWaypoint._x, _root.iCPUWaypointManager.pCurrentWaypoint._y));
var vCurrentAngle = this.mAdjustAngle(this._rotation);
var vDifference = (vCurrentAngle - vTargetAngle);
if (3 < Math.abs(vDifference)) {
if ((vCurrentAngle < 90) && (270 < vTargetAngle)) {
this._rotation = this._rotation - this.pRotationSpeed;
} else if ((270 < vCurrentAngle) && (vTargetAngle < 90)) {
this._rotation = this._rotation + this.pRotationSpeed;
} else if (0 < vDifference) {
this._rotation = this._rotation - this.pRotationSpeed;
} else if (vDifference < 0) {
this._rotation = this._rotation + this.pRotationSpeed;
}
}
}
Instance of Symbol 227 MovieClip "iPlayer" in Frame 155
onClipEvent (load) {
function checkMaximums() {
if (this.pMomentum >= this.pMaxForwardSpeed) {
this.pMomentum = this.pMaxForwardSpeed;
}
if (this.pMaxBackwardSpeed >= this.pMomentum) {
this.pMomentum = this.pMaxBackwardSpeed;
}
}
this.pBehavior = false;
this.pMaxRotationSpeed = 2.75;
this.pRotationSpeed = 0;
this.pSlipping = false;
this.pResist = 0;
this.pMomentum = 0;
this.pLastMomentum = 0;
this.pFriction = 0.95;
this.pAcceleration = 0.05;
this.pMaxForwardSpeed = 3;
this.pMaxBackwardSpeed = -1.5;
}
onClipEvent (enterFrame) {
_root.oCPUMovement.mVectorMove(this, this._rotation, this.pMomentum);
if (((!Key.isDown(Key.UP)) || (this.pSlipping)) || (!this.pBehavior)) {
if (this.pLastMomentum == this.pMomentum) {
if (this.pMomentum != 0) {
this.pMomentum = this.pMomentum * this.pFriction;
}
}
}
if (Math.abs(this.pMomentum) < this.pAcceleration) {
this.pRotationSpeed = 0;
} else {
this.pRotationSpeed = this.pMaxRotationSpeed;
}
this.pLastMomentum = this.pMomentum;
if ((Key.isDown(Key.UP) && (!this.pSlipping)) && (this.pBehavior)) {
this.pMomentum = this.pMomentum + this.pAcceleration;
this.checkMaximums();
}
if ((Key.isDown(Key.DOWN) && (!this.pSlipping)) && (this.pBehavior)) {
this.pMomentum = this.pMomentum - this.pAcceleration;
this.checkMaximums();
}
if (Key.isDown(Key.LEFT) && (this.pBehavior)) {
if (this.pMomentum < 0) {
this._rotation = this._rotation + this.pRotationSpeed;
} else {
this._rotation = this._rotation - this.pRotationSpeed;
}
}
if (Key.isDown(Key.RIGHT) && (this.pBehavior)) {
if (this.pMomentum < 0) {
this._rotation = this._rotation - this.pRotationSpeed;
} else {
this._rotation = this._rotation + this.pRotationSpeed;
}
}
}
Frame 164
_root.gotoAndPlay(_root.vTargetFrame);
Instance of Symbol 230 MovieClip "iTrackResultManager" in Frame 168
onClipEvent (load) {
function mUpdatePlayerTime() {
if (this.pPlayerMilliseconds < 10) {
this.pTempMillisecondsA = "0" + this.pPlayerMilliseconds;
} else {
this.pTempMillisecondsA = this.pPlayerMilliseconds;
}
if (this.pPlayerSeconds < 10) {
this.pTempSecondsA = "0" + this.pPlayerSeconds;
} else {
this.pTempSecondsA = this.pPlayerSeconds;
}
if (this.pPlayerMinutes < 10) {
this.pTempMinutesA = "0" + this.pPlayerMinutes;
} else {
this.pTempMinutesA = this.pPlayerMinutes;
}
var vTempTimeRefreshA = ((((this.pTempMinutesA + ":") + this.pTempSecondsA) + ":") + this.pTempMillisecondsA);
_root.iTrackResults.oPlayerTime = vTempTimeRefreshA;
}
function mUpdateCPUTime() {
if (this.pCPUMilliseconds < 10) {
this.pTempMillisecondsB = "0" + this.pCPUMilliseconds;
} else {
this.pTempMillisecondsB = this.pCPUMilliseconds;
}
if (this.pCPUSeconds < 10) {
this.pTempSecondsB = "0" + this.pCPUSeconds;
} else {
this.pTempSecondsB = this.pCPUSeconds;
}
if (this.pCPUMinutes < 10) {
this.pTempMinutesB = "0" + this.pCPUMinutes;
} else {
this.pTempMinutesB = this.pCPUMinutes;
}
var vTempTimeRefreshB = ((((this.pTempMinutesB + ":") + this.pTempSecondsB) + ":") + this.pTempMillisecondsB);
_root.iTrackResults.oCPUTime = vTempTimeRefreshB;
}
function mUpdatePointsTime() {
this.pCPUSeconds = this.pCPUSeconds + (this.pCPUMinutes * 60);
this.pPlayerSeconds = this.pPlayerSeconds + (this.pPlayerMinutes * 60);
if ((this.pCPUMilliseconds < this.pPlayerMilliseconds) && (0 < this.pCPUSeconds)) {
this.pCPUSeconds--;
this.pCPUMilliseconds = this.pCPUMilliseconds + 100;
}
this.pSousTotalA = (this.pCPUMilliseconds - this.pPlayerMilliseconds) * 10;
this.pSousTotalB = (this.pCPUSeconds - this.pPlayerSeconds) * 1000;
this.pTotalPointsTime = this.pSousTotalA + this.pSousTotalB;
_root.iTrackResults.oPointsTime = this.pTotalPointsTime;
}
function mUpdatePointsBonus() {
this.pTotalPointsBonus = _root.vPointsBonus;
var vTempBonusPoints = this.pTotalPointsBonus;
_root.iTrackResults.oPointsBonus = vTempBonusPoints;
}
function mUpdateTrackTotal() {
_root.pTrack2Total = this.pTotalPointsTime + this.pTotalPointsBonus;
_root.iTrackResults.oTrackTotal = _root.pTrack2Total;
}
this.pPlayerMilliseconds = _root.vPlayerMilliseconds;
this.pPlayerSeconds = _root.vPlayerSeconds;
this.pPlayerMinutes = _root.vPlayerMinutes;
this.pCPUMilliseconds = _root.vCPUMilliseconds;
this.pCPUSeconds = _root.vCPUSeconds;
this.pCPUMinutes = _root.vCPUMinutes;
_root.pTrack2Total = 0;
this.mUpdatePlayerTime();
this.mUpdateCPUTime();
this.mUpdatePointsTime();
this.mUpdatePointsBonus();
this.mUpdateTrackTotal();
this.pTempMillisecondsA = "00";
this.pTempSecondsA = "00";
this.pTempMinutesA = "00";
this.pTempMillisecondsB = "00";
this.pTempSecondsB = "00";
this.pTempMinutesB = "00";
this.pSousTotalA = 0;
this.pSousTotalB = 0;
this.pTotalPointsTime = 0;
this.pTotalPointsBonus = 0;
}
Frame 177
stop();
Frame 186
_root.gotoAndPlay(_root.vTargetFrame);
Instance of Symbol 91 MovieClip "iWP1" in Frame 190
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Instance of Symbol 91 MovieClip "iWP2" in Frame 190
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Instance of Symbol 91 MovieClip "iWP3" in Frame 190
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Instance of Symbol 91 MovieClip "iWP7" in Frame 190
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Instance of Symbol 91 MovieClip "iWP4" in Frame 190
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Instance of Symbol 91 MovieClip "iWP5" in Frame 190
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Instance of Symbol 91 MovieClip "iWP6" in Frame 190
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Instance of Symbol 91 MovieClip "iWP8" in Frame 190
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Instance of Symbol 91 MovieClip "iWP9" in Frame 190
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Instance of Symbol 91 MovieClip "iWP10" in Frame 190
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Instance of Symbol 91 MovieClip "iWP11" in Frame 190
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Instance of Symbol 91 MovieClip "iWP12" in Frame 190
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Instance of Symbol 91 MovieClip "iWP13" in Frame 190
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
this.startDrag();
}
}
onClipEvent (mouseUp) {
this.stopDrag();
}
Instance of Symbol 245 MovieClip "iCPU" in Frame 190
/* no clip actions */
Instance of Symbol 246 MovieClip "iPlayer" in Frame 190
/* no clip actions */
Instance of Symbol 154 MovieClip in Frame 190
onClipEvent (load) {
function cTrigoTools() {
this.pAngle = null;
this.pSpeed = null;
this.pOrigineX = null;
this.pOrigineY = null;
this.pTargetX = null;
this.pTargetY = null;
this.mVectorMove = fVectorMove;
this.mGetDistance = fGetDistance;
this.mGetAngle = fGetAngle;
}
function fVectorMove(oObjectName, iAngle, iSpeed) {
this.pAngle = iAngle;
this.pSpeed = iSpeed;
oObjectName._x = oObjectName._x + (Math.sin(this.pAngle * (Math.PI/180)) * this.pSpeed);
oObjectName._y = oObjectName._y + (Math.cos(this.pAngle * (Math.PI/180)) * (this.pSpeed * -1));
}
function fGetDistance(iOrigineX, iOrigineY, iTargetX, iTargetY) {
this.pOrigineX = iOrigineX;
this.pOrigineY = iOrigineY;
this.pTargetX = iTargetX;
this.pTargetY = iTargetY;
var vA = (this.pOrigineY - this.pTargetY);
var vB = (this.pOrigineX - this.pTargetX);
var vDistance = Math.sqrt((vA * vA) + (vB * vB));
return(vDistance);
}
function fGetAngle(iOrigineX, iOrigineY, iTargetX, iTargetY) {
this.pOrigineX = iOrigineX;
this.pOrigineY = iOrigineY;
this.pTargetX = iTargetX;
this.pTargetY = iTargetY;
var vA = (this.pOrigineX - this.pTargetX);
var vB = (this.pOrigineY - this.pTargetY);
var vAngleRadian = (Math.atan2(vB, vA) - (Math.PI/2));
var vAngleDegree = ((vAngleRadian * 180) / Math.PI);
return(vAngleDegree);
}
_root.oCPUMovement = new cTrigoTools();
_root.oWaypointChecker = new cTrigoTools();
}
Instance of Symbol 156 MovieClip in Frame 190
onClipEvent (load) {
function cCDetect() {
this.pObjectDetected = null;
this.pFeedbackPixels = null;
this.mDetectCollision = fDetectCollision;
}
function fDetectCollision(oObjectDetecting, oObjectDetected, iFeedbackPixels) {
this.pObjectDetected = oObjectDetected;
this.pFeedbackPixels = iFeedbackPixels;
with (oObjectDetecting) {
if (oObjectDetected.hitTest(getBounds(_root).xMin, _y, true)) {
_x = _x + this.pFeedbackPixels;
return(true);
}
if (oObjectDetected.hitTest(getBounds(_root).xMax, _y, true)) {
_x = _x - this.pFeedbackPixels;
return(true);
}
if (oObjectDetected.hitTest(_x, getBounds(_root).yMin, true)) {
_y = _y + this.pFeedbackPixels;
return(true);
}
if (oObjectDetected.hitTest(_x, getBounds(_root).yMax, true)) {
_y = _y - this.pFeedbackPixels;
return(true);
}
return(false);
}
}
_root.oTrack = new cCDetect();
}
Instance of Symbol 163 MovieClip "iObstacleManager" in Frame 190
onClipEvent (load) {
function mPlaceObstacle() {
var vRandom = (random(this.pPositionsNmbr) + 1);
var vNewPosition = eval (("_root." + this.pPositionsName) + vRandom);
var vNumber = (random(3) + 1);
this.pCurrentObstacle = eval ("_root.iObstacle" + vNumber);
this.pCurrentObstacle._x = vNewPosition._x + (random(61) - 30);
this.pCurrentObstacle._y = vNewPosition._y + (random(61) - 30);
this.pCurrentObstacle.gotoAndPlay(1);
this.pActive = true;
}
function mRemoveObstacle() {
this.pActive = false;
this.vToken = 0;
this.pCurrentObstacle._x = -200;
this.pCurrentObstacle._y = -200;
}
this.pActive = null;
this.vToken = 0;
this.pCurrentObstacle = null;
this.pPositionsName = "iPWP";
this.pPositionsNmbr = 4;
}
onClipEvent (enterFrame) {
if (this.pActive == true) {
if (this.pCurrentObstacle._currentFrame == this.pCurrentObstacle._totalFrames) {
this.mRemoveObstacle();
this.vToken = 0;
}
} else if (this.pActive == false) {
this.vToken++;
if (this.vToken >= (random(61) + 30)) {
this.mPlaceObstacle();
this.vToken = 0;
}
}
}
Instance of Symbol 161 MovieClip "iItemManager" in Frame 190
onClipEvent (load) {
function mPlaceItem() {
var vRandom = (random(this.pPositionsNmbr) + 1);
var vNewPosition = eval (("_root." + this.pPositionsName) + vRandom);
_root.iItems.gotoAndStop(random(3) + 1);
_root.iItems._x = vNewPosition._x;
_root.iItems._y = vNewPosition._y;
this.pActive = true;
}
function mPickUpItem() {
this.mRemoveItem();
_root.globalVolume.sound_PickUp.start(0.05, 0);
if (_root.iItems._currentFrame == 1) {
_root.vPointsBonus = _root.vPointsBonus + 250;
} else if (_root.iItems._currentFrame == 2) {
_root.vPointsBonus = _root.vPointsBonus + 350;
} else if (_root.iItems._currentFrame == 3) {
_root.vPointsBonus = _root.vPointsBonus + 500;
}
}
function mRemoveItem() {
this.pActive = false;
this.vToken = 0;
_root.iItems._x = -200;
_root.iItems._y = -200;
}
_root.vPointsBonus = 0;
this.pActive = null;
this.vToken = 0;
this.pPositionsName = "iWP";
this.pPositionsNmbr = 10;
}
onClipEvent (enterFrame) {
if (this.pActive == true) {
this.vToken++;
if (this.vToken >= 360) {
this.mRemoveItem();
this.vToken = 0;
}
} else if (this.pActive == false) {
this.vToken++;
if (this.vToken >= (random(181) + 60)) {
this.mPlaceItem();
this.vToken = 0;
}
}
}
Instance of Symbol 151 MovieClip "iChronoManager" in Frame 190
onClipEvent (load) {
function mResetChrono() {
this.pRunning = false;
this.pMilliseconds = 0;
this.pSeconds = 0;
this.pMinutes = 0;
}
function mStartChrono() {
this.pRunning = true;
}
function mStopChrono() {
this.pRunning = false;
}
this.pRunning = false;
this.pFieldVariable = "iChrono.oChrono";
this.pMilliseconds = 0;
this.pSeconds = 0;
this.pMinutes = 0;
this.pRefreshMilliseconds = "00";
this.pRefreshSeconds = "00";
this.pRefreshMinutes = "00";
}
onClipEvent (enterFrame) {
if (this.pRunning) {
this.pMilliseconds = this.pMilliseconds + 1.66666666666667;
if (this.pMilliseconds >= 100) {
this.pMilliseconds = 0;
this.pSeconds++;
if (this.pSeconds >= 60) {
this.pSeconds = 0;
this.pMinutes++;
}
}
if (int(this.pMilliseconds) < 10) {
this.pRefreshMilliseconds = "0" + int(this.pMilliseconds);
} else {
this.pRefreshMilliseconds = int(this.pMilliseconds);
}
if (int(this.pSeconds) < 10) {
this.pRefreshSeconds = "0" + int(this.pSeconds);
} else {
this.pRefreshSeconds = int(this.pSeconds);
}
if (int(this.pMinutes) < 10) {
this.pRefreshMinutes = "0" + int(this.pMinutes);
} else {
this.pRefreshMinutes = int(this.pMinutes);
}
var vTimeRefresh = ((((this.pRefreshMinutes + " ") + this.pRefreshSeconds) + " ") + this.pRefreshMilliseconds);
Set("_root." + this.pFieldVariable, vTimeRefresh);
}
}
Instance of Symbol 249 MovieClip "iCollisionManager" in Frame 190
onClipEvent (load) {
function mContactWithLimits(oCar) {
oCar.pMomentum = oCar.pMomentum * -1;
}
function mContactWithCar(oCar, vCollision) {
if (vCollision) {
oCar.pResist++;
if (oCar.pResist >= 5) {
oCar.pResist = 0;
this.mContactWithOilPatch(oCar);
}
} else {
oCar.pResist = oCar.pResist - 0.5;
if (0 >= oCar.pResist) {
oCar.pResist = 0;
}
}
}
function mContactWithGrass(oCar) {
oCar.pMomentum = oCar.pMomentum * 0.94;
}
function mContactWithSand(oCar) {
oCar.pMomentum = oCar.pMomentum * 0.96;
}
function mContactWithOilPatch(oCar) {
oCar.gotoAndPlay("slip");
oCar.pSlipping = true;
}
}
onClipEvent (enterFrame) {
if (_root.oTrack.mDetectCollision(_root.iCPU, _root.iTrack3Limits, 6)) {
this.mContactWithLimits(_root.iCPU);
} else if (_root.oTrack.mDetectCollision(_root.iCPU, _root.iTrack3Grass, 0)) {
this.mContactWithGrass(_root.iCPU);
} else if (_root.oTrack.mDetectCollision(_root.iCPU, _root.iTrack3Sand, 0)) {
this.mContactWithSand(_root.iCPU);
}
if (_root.oTrack.mDetectCollision(_root.iCPU, _root.iPlayer, 3)) {
this.mContactWithCar(_root.iCPU, true);
} else {
this.mContactWithCar(_root.iCPU, false);
}
if (_root.oTrack.mDetectCollision(_root.iCPU, _root.iObstacle1, 0)) {
this.mContactWithOilPatch(_root.iCPU);
} else if (_root.oTrack.mDetectCollision(_root.iCPU, _root.iObstacle2, 6)) {
this.mContactWithLimits(_root.iCPU);
} else if (_root.oTrack.mDetectCollision(_root.iCPU, _root.iObstacle3, 6)) {
this.mContactWithLimits(_root.iCPU);
}
if (_root.oTrack.mDetectCollision(_root.iPlayer, _root.iTrack3Limits, 6)) {
this.mContactWithLimits(_root.iPlayer);
} else if (_root.oTrack.mDetectCollision(_root.iPlayer, _root.iTrack3Grass, 0)) {
this.mContactWithGrass(_root.iPlayer);
} else if (_root.oTrack.mDetectCollision(_root.iPlayer, _root.iTrack3Sand, 0)) {
this.mContactWithSand(_root.iPlayer);
}
if (_root.oTrack.mDetectCollision(_root.iPlayer, _root.iCPU, 3)) {
this.mContactWithCar(_root.iPlayer, true);
} else {
this.mContactWithCar(_root.iPlayer, false);
}
if (_root.oTrack.mDetectCollision(_root.iPlayer, _root.iObstacle1, 0)) {
this.mContactWithOilPatch(_root.iPlayer);
} else if (_root.oTrack.mDetectCollision(_root.iPlayer, _root.iObstacle2, 6)) {
this.mContactWithLimits(_root.iPlayer);
} else if (_root.oTrack.mDetectCollision(_root.iPlayer, _root.iObstacle3, 6)) {
this.mContactWithLimits(_root.iPlayer);
}
if (_root.oTrack.mDetectCollision(_root.iPlayer, _root.iItems, 0)) {
_root.iItemManager.mPickUpItem();
}
}
Instance of Symbol 250 MovieClip "iCPUWaypointManager" in Frame 190
onClipEvent (load) {
function mNextWaypoint() {
this.pCurrentWaypointNmb++;
if (this.pTotalWaypoints < this.pCurrentWaypointNmb) {
this.pCanCompleteLap = true;
this.pCurrentWaypointNmb = 1;
}
}
this.pCanCompleteLap = false;
this.pNumberOfLaps = 7;
this.pCompletedLaps = 0;
this.pTrackCompleted = false;
this.pTotalWaypoints = 13;
this.pPointsName = "iWP";
this.pCurrentWaypointNmb = 1;
this.pMinDistanceToWaypoint = 20;
}
onClipEvent (enterFrame) {
this.pCurrentWaypoint = eval (("_root." + this.pPointsName) + this.pCurrentWaypointNmb);
if (_root.oWaypointChecker.mGetDistance(_root.iCPU._x, _root.iCPU._y, pCurrentWaypoint._x, pCurrentWaypoint._y) < this.pMinDistanceToWaypoint) {
this.mNextWaypoint();
}
if (_root.oTrack.mDetectCollision(_root.iCPU, _root.iStartLine, 0) && (this.pCanCompleteLap)) {
this.pCompletedLaps++;
this.pCanCompleteLap = false;
if (this.pCompletedLaps == this.pNumberOfLaps) {
this.pTrackCompleted = true;
_root.iCPU.pBehavior = false;
_root.iCPU.pMomentum = 0;
_root.vCPUMilliseconds = int(_root.iChronoManager.pMilliseconds);
_root.vCPUSeconds = _root.iChronoManager.pSeconds;
_root.vCPUMinutes = _root.iChronoManager.pMinutes;
_root.iCPU._x = -500;
_root.iCPU._y = -500;
if (_root.iPlayerWayPointManager.pTrackCompleted) {
_root.iChronoManager.mStopChrono();
_root.vTargetFrame = "Result3";
_root.play();
_root.iSoundManager.mMusicTransition(_root.globalVolume.music_Track3, _root.globalVolume.music_Title);
}
}
}
}
Instance of Symbol 251 MovieClip "iPlayerWaypointManager" in Frame 190
onClipEvent (load) {
function mNextWaypoint() {
this.pCurrentWaypointNmb++;
if (this.pTotalWaypoints < this.pCurrentWaypointNmb) {
this.pCanCompleteLap = true;
this.pCurrentWaypointNmb = 1;
}
}
this.pCanCompleteLap = false;
this.pNumberOfLaps = 7;
this.pCompletedLaps = 0;
this.pTrackCompleted = false;
this.pTotalWaypoints = 4;
this.pPointsName = "iPWP";
this.pCurrentWaypointNmb = 1;
this.pMinDistanceToWaypoint = 70;
}
onClipEvent (enterFrame) {
this.pCurrentWaypoint = eval (("_root." + this.pPointsName) + this.pCurrentWaypointNmb);
if (_root.oWaypointChecker.mGetDistance(_root.iPlayer._x, _root.iPlayer._y, pCurrentWaypoint._x, pCurrentWaypoint._y) < this.pMinDistanceToWaypoint) {
this.mNextWaypoint();
}
if (_root.oTrack.mDetectCollision(_root.iPlayer, _root.iStartLine, 0) && (this.pCanCompleteLap)) {
this.pCompletedLaps++;
this.pCanCompleteLap = false;
if (this.pcompletedLaps == (this.pNumberOfLaps - 1)) {
_root.iCountDown.gotoAndPlay("LastLap");
}
if (this.pCompletedLaps == this.pNumberOfLaps) {
this.pTrackCompleted = true;
_root.iCountDown.gotoAndPlay("Finish");
_root.iPlayer.pBehavior = false;
_root.iPlayer.pMomentum = 0;
_root.vPlayerMilliseconds = int(_root.iChronoManager.pMilliseconds);
_root.vPlayerSeconds = _root.iChronoManager.pSeconds;
_root.vPlayerMinutes = _root.iChronoManager.pMinutes;
_root.iPlayer._x = 500;
_root.iPlayer._y = -500;
if (_root.iCPUWayPointManager.pTrackCompleted) {
_root.iChronoManager.mStopChrono();
_root.vTargetFrame = "Result3";
_root.play();
_root.iSoundManager.mMusicTransition(_root.globalVolume.music_Track1, _root.globalVolume.music_Title);
}
} else {
var vRefreshLaps = (((this.pCompletedLaps + 1) + "/") + this.pNumberOfLaps);
_root.iLaps.oLaps = vRefreshLaps;
}
}
}
Frame 199
stop();
Instance of Symbol 227 MovieClip "iPlayer" in Frame 199
onClipEvent (load) {
function checkMaximums() {
if (this.pMomentum >= this.pMaxForwardSpeed) {
this.pMomentum = this.pMaxForwardSpeed;
}
if (this.pMaxBackwardSpeed >= this.pMomentum) {
this.pMomentum = this.pMaxBackwardSpeed;
}
}
this.pBehavior = false;
this.pMaxRotationSpeed = 2.75;
this.pRotationSpeed = 0;
this.pSlipping = false;
this.pResist = 0;
this.pMomentum = 0;
this.pLastMomentum = 0;
this.pFriction = 0.95;
this.pAcceleration = 0.05;
this.pMaxForwardSpeed = 3;
this.pMaxBackwardSpeed = -1.5;
}
onClipEvent (enterFrame) {
_root.oCPUMovement.mVectorMove(this, this._rotation, this.pMomentum);
if (((!Key.isDown(Key.UP)) || (this.pSlipping)) || (!this.pBehavior)) {
if (this.pLastMomentum == this.pMomentum) {
if (this.pMomentum != 0) {
this.pMomentum = this.pMomentum * this.pFriction;
}
}
}
if (Math.abs(this.pMomentum) < this.pAcceleration) {
this.pRotationSpeed = 0;
} else {
this.pRotationSpeed = this.pMaxRotationSpeed;
}
this.pLastMomentum = this.pMomentum;
if ((Key.isDown(Key.UP) && (!this.pSlipping)) && (this.pBehavior)) {
this.pMomentum = this.pMomentum + this.pAcceleration;
this.checkMaximums();
}
if ((Key.isDown(Key.DOWN) && (!this.pSlipping)) && (this.pBehavior)) {
this.pMomentum = this.pMomentum - this.pAcceleration;
this.checkMaximums();
}
if (Key.isDown(Key.LEFT) && (this.pBehavior)) {
if (this.pMomentum < 0) {
this._rotation = this._rotation + this.pRotationSpeed;
} else {
this._rotation = this._rotation - this.pRotationSpeed;
}
}
if (Key.isDown(Key.RIGHT) && (this.pBehavior)) {
if (this.pMomentum < 0) {
this._rotation = this._rotation - this.pRotationSpeed;
} else {
this._rotation = this._rotation + this.pRotationSpeed;
}
}
}
Instance of Symbol 226 MovieClip "iCPU" in Frame 199
onClipEvent (load) {
function mAdjustAngle(vAngle) {
if (vAngle < -360) {
vAngle = vAngle + 720;
} else if (vAngle < 0) {
vAngle = vAngle + 360;
}
vAngle = vAngle % 360;
return(vAngle);
}
function checkMaximums() {
if (this.pMomentum >= this.pMaxForwardSpeed) {
this.pMomentum = this.pMaxForwardSpeed;
}
if (this.pMaxBackwardSpeed >= this.pMomentum) {
this.pMomentum = this.pMaxBackwardSpeed;
}
}
this.pBehavior = "Idle";
this.pMaxRotationSpeed = 2.55;
this.pRotationSpeed = 0;
this.pSlipping = false;
this.pResist = 0;
this.pMomentum = 0;
this.pLastMomentum = 0;
this.pFriction = 0.95;
this.pAcceleration = 0.05;
this.pMaxForwardSpeed = 3;
this.pMaxBackwardSpeed = -1.5;
}
onClipEvent (enterFrame) {
_root.oCPUMovement.mVectorMove(this, this._rotation, this.pMomentum);
if (this.pSlipping || (this.pBehavior != "Forward")) {
if (this.pLastMomentum == this.pMomentum) {
if (this.pMomentum != 0) {
this.pMomentum = this.pMomentum * this.pFriction;
}
}
}
if (Math.abs(this.pMomentum) < this.pAcceleration) {
this.pRotationSpeed = 0;
} else {
this.pRotationSpeed = this.pMaxRotationSpeed;
}
this.pLastMomentum = this.pMomentum;
if ((this.pBehavior == "Forward") && (!this.pSlipping)) {
this.pMomentum = this.pMomentum + this.pAcceleration;
this.checkMaximums();
}
if ((this.pBehavior == "Backward") && (!this.pSlipping)) {
this.pMomentum = this.pMomentum - this.pAcceleration;
this.checkMaximums();
}
var vTargetAngle = this.mAdjustAngle(_root.oCPUMovement.mGetAngle(this._x, this._y, _root.iCPUWaypointManager.pCurrentWaypoint._x, _root.iCPUWaypointManager.pCurrentWaypoint._y));
var vCurrentAngle = this.mAdjustAngle(this._rotation);
var vDifference = (vCurrentAngle - vTargetAngle);
if (3 < Math.abs(vDifference)) {
if ((vCurrentAngle < 90) && (270 < vTargetAngle)) {
this._rotation = this._rotation - this.pRotationSpeed;
} else if ((270 < vCurrentAngle) && (vTargetAngle < 90)) {
this._rotation = this._rotation + this.pRotationSpeed;
} else if (0 < vDifference) {
this._rotation = this._rotation - this.pRotationSpeed;
} else if (vDifference < 0) {
this._rotation = this._rotation + this.pRotationSpeed;
}
}
}
Frame 208
_root.gotoAndPlay(_root.vTargetFrame);
Instance of Symbol 255 MovieClip "iTrackResultManager" in Frame 212
onClipEvent (load) {
function mUpdatePlayerTime() {
if (this.pPlayerMilliseconds < 10) {
this.pTempMillisecondsA = "0" + this.pPlayerMilliseconds;
} else {
this.pTempMillisecondsA = this.pPlayerMilliseconds;
}
if (this.pPlayerSeconds < 10) {
this.pTempSecondsA = "0" + this.pPlayerSeconds;
} else {
this.pTempSecondsA = this.pPlayerSeconds;
}
if (this.pPlayerMinutes < 10) {
this.pTempMinutesA = "0" + this.pPlayerMinutes;
} else {
this.pTempMinutesA = this.pPlayerMinutes;
}
var vTempTimeRefreshA = ((((this.pTempMinutesA + ":") + this.pTempSecondsA) + ":") + this.pTempMillisecondsA);
_root.iTrackResults.oPlayerTime = vTempTimeRefreshA;
}
function mUpdateCPUTime() {
if (this.pCPUMilliseconds < 10) {
this.pTempMillisecondsB = "0" + this.pCPUMilliseconds;
} else {
this.pTempMillisecondsB = this.pCPUMilliseconds;
}
if (this.pCPUSeconds < 10) {
this.pTempSecondsB = "0" + this.pCPUSeconds;
} else {
this.pTempSecondsB = this.pCPUSeconds;
}
if (this.pCPUMinutes < 10) {
this.pTempMinutesB = "0" + this.pCPUMinutes;
} else {
this.pTempMinutesB = this.pCPUMinutes;
}
var vTempTimeRefreshB = ((((this.pTempMinutesB + ":") + this.pTempSecondsB) + ":") + this.pTempMillisecondsB);
_root.iTrackResults.oCPUTime = vTempTimeRefreshB;
}
function mUpdatePointsTime() {
this.pCPUSeconds = this.pCPUSeconds + (this.pCPUMinutes * 60);
this.pPlayerSeconds = this.pPlayerSeconds + (this.pPlayerMinutes * 60);
if ((this.pCPUMilliseconds < this.pPlayerMilliseconds) && (0 < this.pCPUSeconds)) {
this.pCPUSeconds--;
this.pCPUMilliseconds = this.pCPUMilliseconds + 100;
}
this.pSousTotalA = (this.pCPUMilliseconds - this.pPlayerMilliseconds) * 10;
this.pSousTotalB = (this.pCPUSeconds - this.pPlayerSeconds) * 1000;
this.pTotalPointsTime = this.pSousTotalA + this.pSousTotalB;
_root.iTrackResults.oPointsTime = this.pTotalPointsTime;
}
function mUpdatePointsBonus() {
this.pTotalPointsBonus = _root.vPointsBonus;
var vTempBonusPoints = this.pTotalPointsBonus;
_root.iTrackResults.oPointsBonus = vTempBonusPoints;
}
function mUpdateTrackTotal() {
_root.pTrack3Total = this.pTotalPointsTime + this.pTotalPointsBonus;
_root.iTrackResults.oTrackTotal = _root.pTrack3Total;
}
this.pPlayerMilliseconds = _root.vPlayerMilliseconds;
this.pPlayerSeconds = _root.vPlayerSeconds;
this.pPlayerMinutes = _root.vPlayerMinutes;
this.pCPUMilliseconds = _root.vCPUMilliseconds;
this.pCPUSeconds = _root.vCPUSeconds;
this.pCPUMinutes = _root.vCPUMinutes;
_root.pTrack3Total = 0;
this.mUpdatePlayerTime();
this.mUpdateCPUTime();
this.mUpdatePointsTime();
this.mUpdatePointsBonus();
this.mUpdateTrackTotal();
this.pTempMillisecondsA = "00";
this.pTempSecondsA = "00";
this.pTempMinutesA = "00";
this.pTempMillisecondsB = "00";
this.pTempSecondsB = "00";
this.pTempMinutesB = "00";
this.pSousTotalA = 0;
this.pSousTotalB = 0;
this.pTotalPointsTime = 0;
this.pTotalPointsBonus = 0;
}
Frame 221
stop();
Frame 230
_root.gotoAndPlay(_root.vTargetFrame);
Instance of Symbol 272 MovieClip "iTrackResultManager" in Frame 234
onClipEvent (load) {
function mUpdateGrandTotal() {
_root.iFinalResults.oTrack1 = this.pTrack1Total;
_root.iFinalResults.oTrack2 = this.pTrack2Total;
_root.iFinalResults.oTrack3 = this.pTrack3Total;
_root.pGrandTotal = (this.pTrack1Total + this.pTrack2Total) + this.pTrack3Total;
_root.iFinalResults.oGrandTotal = _root.pGrandTotal;
}
this.pTrack1Total = _root.pTrack1Total;
this.pTrack2Total = _root.pTrack2Total;
this.pTrack3Total = _root.pTrack3Total;
_root.pGrandTotal = 0;
this.mUpdateGrandTotal();
}
Frame 243
stop();
Frame 252
_root.gotoAndPlay(_root.vTargetFrame);
Symbol 25 Button
on (release) {
_root.vTargetFrame = "Select";
_root.play();
_root.globalVolume.sound_Start.start(0, 0);
}
Symbol 29 Button
on (release) {
_root.vTargetFrame = "Credits";
_root.play();
_root.globalVolume.sound_Select.start(0, 0);
}
Symbol 33 Button
on (release) {
_root.vTargetFrame = "Instructions";
_root.play();
_root.globalVolume.sound_Select.start(0, 0);
}
Symbol 43 MovieClip Frame 1
stop();
Symbol 43 MovieClip Frame 2
stop();
Symbol 47 Button
on (release) {
_root.vTargetFrame = "Title";
_root.play();
_root.globalVolume.sound_Select.start(0, 0);
}
Symbol 54 MovieClip Frame 1
stop();
Symbol 54 MovieClip Frame 2
stop();
Symbol 54 MovieClip Frame 3
stop();
Symbol 55 MovieClip Frame 1
stop();
Symbol 55 MovieClip Frame 2
stop();
Symbol 55 MovieClip Frame 3
stop();
Symbol 56 MovieClip Frame 1
stop();
Symbol 56 MovieClip Frame 2
stop();
Symbol 56 MovieClip Frame 3
stop();
Symbol 79 Button
on (release) {
if (_root.vSelectedCar != null) {
_root.vTargetFrame = "Track1";
_root.play();
_root.iSoundManager.mMusicTransition(_root.globalVolume.music_Title, _root.globalVolume.music_Track1);
_root.globalVolume.sound_Start.start(0, 0);
} else {
_root.iSelectPopUp.play();
}
}
Symbol 80 Button
on (release) {
_root.vTargetFrame = "Title";
_root.play();
_root.vSelectedCar = null;
_root.globalVolume.sound_Select.start(0, 0);
}
Symbol 84 Button
on (release) {
this.play();
}
Symbol 86 MovieClip Frame 1
stop();
Symbol 86 MovieClip Frame 5
stop();
Symbol 105 MovieClip Frame 211
stop();
Symbol 107 MovieClip Frame 215
stop();
Symbol 109 MovieClip Frame 211
stop();
Symbol 110 MovieClip Frame 1
stop();
Symbol 110 MovieClip Frame 2
stop();
Symbol 110 MovieClip Frame 3
stop();
Symbol 115 MovieClip Frame 1
if (_root.vSelectedCar != null) {
gotoAndStop(_root.vSelectedCar);
}
Symbol 115 MovieClip Frame 2
stop();
Symbol 115 MovieClip Frame 6
stop();
Symbol 116 MovieClip Frame 1
stop();
Symbol 116 MovieClip Frame 45
_root.iPlayer.pSlipping = false;
gotoAndStop (1);
Symbol 120 MovieClip Frame 1
stop();
Symbol 120 MovieClip Frame 45
_root.iCPU.pSlipping = false;
gotoAndStop (1);
Symbol 131 Button
on (release) {
if (_root.iChronoManager.pRunning) {
_root.iChronoManager.mStopChrono();
_root.iPlayer.pBehavior = false;
_root.iPlayer.pMomentum = 0;
_root.iCPU.pBehavior = "Idle";
_root.iCPU.pMomentum = 0;
_root.vCurrentTrack = 1;
_root.iQuitPopUp.play();
}
}
Symbol 134 Button
on (release) {
if (_root.iChronoManager.pRunning) {
_root.iChronoManager.mStopChrono();
_root.iPlayer.pBehavior = false;
_root.iPlayer.pMomentum = 0;
_root.iCPU.pBehavior = "Idle";
_root.iCPU.pMomentum = 0;
_root.iHelpPopUp.play();
}
}
Symbol 139 Button
on (release) {
_root.vIsQuitting = true;
this.play();
}
Symbol 143 Button
on (release) {
_root.vIsQuitting = false;
this.play();
}
Symbol 144 MovieClip Frame 1
stop();
Symbol 144 MovieClip Frame 5
stop();
Symbol 144 MovieClip Frame 9
if (_root.vIsQuitting) {
_root.vTargetFrame = "Title";
_root.play();
_root.vSelectedCar = null;
_root.iSoundManager.mMusicTransition(eval ("_root.globalVolume.music_Track" + _root.vCurrentTrack), _root.globalVolume.music_Title);
_root.globalVolume.sound_Skid.start(0, 0);
} else {
_root.iChronoManager.mStartChrono();
_root.iPlayer.pBehavior = true;
_root.iPlayer.pMomentum = _root.iPlayer.pLastMomentum;
_root.iCPU.pBehavior = "Forward";
_root.iCPU.pMomentum = _root.iCPU.pLastMomentum;
}
Symbol 147 MovieClip Frame 1
stop();
Symbol 147 MovieClip Frame 5
stop();
Instance of Symbol 54 MovieClip in Symbol 147 MovieClip Frame 5
onClipEvent (load) {
this.gotoAndStop(1);
}
Instance of Symbol 55 MovieClip in Symbol 147 MovieClip Frame 5
onClipEvent (load) {
this.gotoAndStop(2);
}
Instance of Symbol 56 MovieClip in Symbol 147 MovieClip Frame 5
onClipEvent (load) {
this.gotoAndStop(3);
}
Symbol 147 MovieClip Frame 9
_root.iChronoManager.mStartChrono();
_root.iPlayer.pBehavior = true;
_root.iPlayer.pMomentum = _root.iPlayer.pLastMomentum;
_root.iCPU.pBehavior = "Forward";
_root.iCPU.pMomentum = _root.iCPU.pLastMomentum;
Symbol 164 MovieClip Frame 1
stop();
Symbol 164 MovieClip Frame 45
_root.iPlayer.pSlipping = false;
gotoAndStop (1);
Symbol 165 MovieClip Frame 1
stop();
Symbol 165 MovieClip Frame 45
_root.iCPU.pSlipping = false;
gotoAndStop (1);
Symbol 176 MovieClip Frame 180
_root.iChronoManager.mStartChrono();
_root.iItemManager.mPlaceItem();
_root.iObstacleManager.mPlaceObstacle();
_root.iPlayer.pBehavior = true;
_root.iCPU.pBehavior = "Forward";
Symbol 176 MovieClip Frame 261
stop();
Symbol 176 MovieClip Frame 346
stop();
Symbol 176 MovieClip Frame 391
gotoAndPlay (351);
Symbol 194 Button
on (release) {
_root.vTargetFrame = "Track2";
_root.play();
_root.iSoundManager.mMusicTransition(_root.globalVolume.music_Title, _root.globalVolume.music_Track2);
_root.globalVolume.sound_Start.start(0, 0);
}
Symbol 196 Button
on (release) {
_root.vTargetFrame = "Title";
_root.play();
_root.vSelectedCar = null;
_root.globalVolume.sound_Skid.start(0, 0);
}
Symbol 209 MovieClip Frame 163
stop();
Symbol 211 MovieClip Frame 215
stop();
Symbol 213 MovieClip Frame 211
stop();
Symbol 214 MovieClip Frame 1
stop();
Symbol 214 MovieClip Frame 2
stop();
Symbol 214 MovieClip Frame 3
stop();
Symbol 216 MovieClip Frame 1
stop();
Symbol 216 MovieClip Frame 45
gotoAndStop (1);
Symbol 217 MovieClip Frame 1
stop();
Symbol 217 MovieClip Frame 45
_root.iCPU.pSlipping = false;
gotoAndStop (1);
Symbol 218 MovieClip Frame 1
stop();
Symbol 218 MovieClip Frame 45
_root.iPlayer.pSlipping = false;
gotoAndStop (1);
Symbol 220 Button
on (release) {
if (_root.iChronoManager.pRunning) {
_root.iChronoManager.mStopChrono();
_root.iPlayer.pBehavior = false;
_root.iPlayer.pMomentum = 0;
_root.iCPU.pBehavior = "Idle";
_root.iCPU.pMomentum = 0;
_root.vCurrentTrack = 2;
_root.iQuitPopUp.play();
}
}
Symbol 224 MovieClip Frame 1
stop();
Symbol 224 MovieClip Frame 45
gotoAndStop (1);
Symbol 225 MovieClip Frame 1
stop();
Symbol 225 MovieClip Frame 45
gotoAndStop (1);
Symbol 226 MovieClip Frame 1
stop();
Symbol 226 MovieClip Frame 45
_root.iCPU.pSlipping = false;
gotoAndStop (1);
Symbol 227 MovieClip Frame 1
stop();
Symbol 227 MovieClip Frame 45
_root.iPlayer.pSlipping = false;
gotoAndStop (1);
Symbol 229 Button
on (release) {
_root.vTargetFrame = "Track3";
_root.play();
_root.iSoundManager.mMusicTransition(_root.globalVolume.music_Title, _root.globalVolume.music_Track3);
_root.globalVolume.sound_Start.start(0, 0);
}
Symbol 240 MovieClip Frame 211
stop();
Symbol 242 MovieClip Frame 215
stop();
Symbol 244 MovieClip Frame 211
stop();
Symbol 245 MovieClip Frame 1
stop();
Symbol 245 MovieClip Frame 45
_root.iCPU.pSlipping = false;
gotoAndStop (1);
Symbol 246 MovieClip Frame 1
stop();
Symbol 246 MovieClip Frame 45
_root.iPlayer.pSlipping = false;
gotoAndStop (1);
Symbol 247 Button
on (release) {
if (_root.iChronoManager.pRunning) {
_root.iChronoManager.mStopChrono();
_root.iPlayer.pBehavior = false;
_root.iPlayer.pMomentum = 0;
_root.iCPU.pBehavior = "Idle";
_root.iCPU.pMomentum = 0;
_root.vCurrentTrack = 3;
_root.iQuitPopUp.play();
}
}
Symbol 248 MovieClip Frame 1
stop();
Symbol 248 MovieClip Frame 5
stop();
Instance of Symbol 54 MovieClip in Symbol 248 MovieClip Frame 5
onClipEvent (load) {
this.gotoAndStop(1);
}
Instance of Symbol 55 MovieClip in Symbol 248 MovieClip Frame 5
onClipEvent (load) {
this.gotoAndStop(2);
}
Instance of Symbol 56 MovieClip in Symbol 248 MovieClip Frame 5
onClipEvent (load) {
this.gotoAndStop(3);
}
Symbol 248 MovieClip Frame 9
_root.iChronoManager.mStartChrono();
_root.iPlayer.pBehavior = true;
_root.iPlayer.pMomentum = _root.iPlayer.pLastMomentum;
_root.iCPU.pBehavior = "Forward";
_root.iCPU.pMomentum = _root.iCPU.pLastMomentum;
Symbol 254 Button
on (release) {
_root.vTargetFrame = "Finish";
_root.play();
_root.globalVolume.sound_Finish.start(0, 0);
}
Symbol 271 Button
on (release) {
_root.vTargetFrame = "Select";
_root.play();
_root.vSelectedCar = null;
_root.globalVolume.sound_Select.start(0, 0);
}