Frame 4
function fnGetRoot(mySWF) {
var vfullpath = _url;
var vtrimloc = vfullpath.indexOf(mySWF);
SITEROOT = vfullpath.substring(0, vtrimloc);
}
function fnEndBriefing() {
if (gfPlaying == false) {
gotoAndPlay (13);
} else if (gfInstructions == false) {
trace("gfInstructions " + gfInstructions);
fnPauseGame(false);
}
iMissionButton.gotoAndStop("Button");
iBriefing.gotoAndStop(1);
}
function fnShowMission() {
if (gfPlaying == true) {
fnPauseGame(true);
iBriefing.gotoAndPlay(2);
iHelpButton.gotoAndStop(1);
} else {
gotoAndPlay (12);
}
}
function fnPlayGame(vMode) {
if (gPlayAgain == true) {
ReverseObjTimers(false);
gotoAndPlay (19);
} else {
gotoAndStop (12);
}
}
function fnPlayAgain() {
gPlayAgain = true;
Radar.Clear();
Viewer.initViewer();
gScore = 0;
gDamage = 0;
var i = 1;
while (i < 4) {
eval ("Damage" + i).gotoAndStop(1);
i++;
}
iTitle.gotoAndStop(3);
gotoAndStop (11);
}
var gPlayAgain = false;
var gfPlaying = false;
var gfInstructions = false;
var gSkillLevel = "Cadet";
Frame 8
fnGetRoot("vehiclecontrol/snow2.swf");
loadMovieNum (SITEROOT + "nav.swf", 50000);
Frame 10
iTitle.gotoAndStop(3);
Frame 11
stop();
Frame 12
iTitle.gotoAndStop(1);
iBriefing.gotoAndPlay(2);
stop();
Frame 13
function StartGame() {
iHelp.gotoAndStop(1);
iHelpButton.gotoAndStop(1);
if (gfPlaying == true) {
fnPauseGame(false);
play();
} else {
gotoAndPlay (19);
}
}
iTitle.gotoAndStop(1);
iHelp.gotoAndStop(2);
iHelpButton.gotoAndStop(2);
stop();
Frame 14
gotoAndStop (13);
Frame 19
iTitle.gotoAndStop(1);
iHelp.gotoAndStop(1);
iBriefing.gotoAndStop(1);
iEndClip.gotoAndStop(1);
var gDirection = 0;
var gSpeed = 1;
var gfBrake = false;
var gfReverse = false;
var LEFT = -1;
var RIGHT = 1;
var gPoints = 10;
var gPASS = 200;
var gScore = 0;
var gGameID;
var gDamage = 0;
var Radar = Truck.iRadar;
var Ground = Viewer;
Viewer.initViewer();
Radar.initRadar();
iLevel.gotoAndStop(gSkillLevel);
duplicateMovieClip (Timer, "iObjTimer", 500);
duplicateMovieClip (Timer, "iObjTimer2", 501);
duplicateMovieClip (Timer, "iCraterTimer", 502);
duplicateMovieClip (Timer, "iCraterTimer2", 503);
duplicateMovieClip (Timer, "iCraterTimer3", 504);
duplicateMovieClip (Timer, "iPlaneTimer", 505);
duplicateMovieClip (Timer, "iFuelTimer", 506);
Frame 23
function PressArrow(vDir) {
gDirection = vDir;
SteeringWheel.Turn(vDir);
Truck.Rotate(vDir);
if (gfBrake == false) {
trace("Turning " + Radar);
Radar.Turn(vDir);
Ground.Turn(vDir);
}
}
function ReleaseArrow(vDir) {
gDirection = 0;
SteeringWheel.EndTurn(vDir);
Radar.EndTurn();
Ground.Turn(0);
}
function UpdateDirection() {
if (gDirection != 0) {
Ground.Turn(gDirection);
}
}
function OverShifter(vfOver) {
if (vfOver == true) {
SteeringWheel.RemoveHand();
} else {
SteeringWheel.ReturnHand();
}
}
function Shift() {
if (gfReverse == false) {
Truck.Shifter.ShiftDown();
Radar.Reverse();
ReverseObjTimers(true);
gfReverse = true;
} else {
Truck.Shifter.ShiftUp();
Radar.Forward();
ReverseObjTimers(false);
gfReverse = false;
}
}
function Brake() {
if (gfBrake == true) {
gfBrake = false;
} else {
gfBrake = true;
}
Ground.Brake(gfBrake);
}
function fnClickInstructions() {
gfInstructions = true;
fnPauseGame(true);
iHelpButton.gotoAndStop(2);
iHelp.gotoAndStop(2);
}
function fnPauseGame(fPaused) {
iObjTimer.Pause(fPaused);
iObjTimer2.Pause(fPaused);
iCraterTimer.Pause(fPaused);
iCraterTimer2.Pause(fPaused);
iCraterTimer3.Pause(fPaused);
iPlaneTimer.Pause(fPaused);
iFuelTimer.Pause(fPaused);
iArrowButtons.Pause(fPaused);
Viewer.Pause(fPaused);
Truck.Pause(fPaused);
Radar.Pause(fPaused);
gfBrake = fPaused;
if (fPaused == false) {
gfInstructions = false;
}
}
Frame 27
function HandleMessage(vString) {
if (vString == "Object") {
Radar.NewObj();
} else if (vString == "Crater") {
Radar.NewCrater();
} else if (vString == "Plane") {
Radar.NewPlane();
} else if (vString == "Fuel") {
Radar.NewFuel();
}
}
function ReverseObjTimers(fPause) {
iObjTimer.Reverse(fPause);
iObjTimer2.Reverse(fPause);
iFuelTimer.Reverse(fPause);
if (fPause == true) {
iCraterTimer.Factor(0.5);
iCraterTimer2.Factor(0.5);
iCraterTimer3.Factor(0.5);
} else {
iCraterTimer.Factor(1);
iCraterTimer2.Factor(1);
iCraterTimer3.Factor(1);
}
}
function Hit(vType, vIndex) {
if (vType == "Good") {
var vSound = new Sound();
vSound.attachSound("Door");
vSound.start();
gScore = gScore + gPoints;
Radar.Hit(vIndex);
} else if (vType == "Crater") {
getURL ("javascript:doTheTwist(2)");
var vSound = new Sound();
vSound.attachSound("Splash");
vSound.start();
EndGame("Crater");
} else if (vType == "Fuel") {
var vSound = new Sound();
vSound.attachSound("Refuel");
vSound.start();
Truck.FuelMeter.Refuel();
iEndClip.gotoAndPlay("Refuel");
}
}
function HitPlane(vIndex) {
trace("HitPlane");
getURL ("javascript:doTheTwist(2)");
Truck.Hit();
var vSound = new Sound();
vSound.attachSound("PlaneHit");
vSound.start();
gDamage = gDamage + 1;
var i = 1;
while (i < (gDamage + 1)) {
eval ("Damage" + i).gotoAndPlay("loop");
i++;
}
var vSound2 = new Sound();
vSound2.attachSound("damage");
vSound2.start();
if (gDamage >= 3) {
EndGame("Plane");
}
}
function EndGame(vType) {
gEndMessage = vType;
iObjTimer.removeMovieClip();
iObjTimer2.removeMovieClip();
iCraterTimer.removeMovieClip();
iCraterTimer2.removeMovieClip();
iCraterTimer3.removeMovieClip();
iPlaneTimer.removeMovieClip();
iFuelTimer.removeMovieClip();
Truck.gotoAndStop("Park");
Truck.FuelMeter.EndGame();
Radar.EndGame();
fnSubmitHighScore();
gotoAndPlay (39);
}
function fnSubmitHighScore() {
loadVariables ((("/scripts/scores.cfm?action=postscores&gameID=" + gGameID) + "&score=") + gScore, 0);
}
function FuelWarning() {
iEndClip.gotoAndPlay("LowFuel");
}
Frame 30
gDirection = 0;
gfBrake = false;
gfReverse = false;
iArrowButtons.Pause(false);
Viewer.initViewer();
iLevel.gotoAndStop(gSkillLevel);
if ((gSkillLevel == "Cadet") or (gSkillLevel == "cadet")) {
iObjTimer.SetTimer(7, "Object");
iObjTimer.SetRepeat(35, -3, 28);
iObjTimer2.SetTimer(20, "Object");
iObjTimer2.SetRepeat(13, 4, 45);
iCraterTimer.SetTimer(30, "Crater");
iCraterTimer.SetRepeat(45, -5, 30);
iCraterTimer2.SetTimer(12, "Crater");
iCraterTimer2.SetRepeat(37, -5, 30);
iCraterTimer3.SetTimer(50, "Crater");
iCraterTimer3.SetRepeat(50, -1, 30);
iPlaneTimer.SetTimer(80, "Plane");
iPlaneTimer.SetRepeat(120, -10, 42);
iFuelTimer.SetTimer(190, "Fuel");
iFuelTimer.SetRepeat(145, 50, 500);
gPoints = 10;
} else {
iObjTimer.SetTimer(7, "Object");
iObjTimer.SetRepeat(20, 3, 30);
iObjTimer2.SetTimer(20, "Object");
iObjTimer2.SetRepeat(13, 4, 45);
iCraterTimer.SetTimer(30, "Crater");
iCraterTimer.SetRepeat(45, -5, 30);
iCraterTimer2.SetTimer(12, "Crater");
iCraterTimer2.SetRepeat(37, -5, 30);
iCraterTimer3.SetTimer(50, "Crater");
iCraterTimer3.SetRepeat(50, -10, 20);
iPlaneTimer.SetTimer(80, "Plane");
iPlaneTimer.SetRepeat(80, -10, 33);
iFuelTimer.SetTimer(255, "Fuel");
iFuelTimer.SetRepeat(250, 55, 500);
gPoints = 15;
}
ReleaseArrow(-1);
Truck.gotoAndPlay("Start");
play();
Frame 31
var gfPlaying = true;
var gEndMessage = "";
stop();
Frame 32
fnPauseGame(false);
gotoAndStop (31);
Frame 33
stop();
Frame 34
gotoAndStop (31);
Frame 39
iEndClip.gotoAndPlay(gEndMessage);
if (gEndMessage == "Crater") {
iCraterEndClip.gotoAndPlay(2);
}
stop();
Frame 40
stop();
Frame 41
stop();
Symbol 33 MovieClip Frame 1
stop();
Symbol 33 MovieClip Frame 2
stop();
Symbol 33 MovieClip Frame 3
stop();
Symbol 43 MovieClip Frame 1
stop();
Symbol 43 MovieClip Frame 2
stop();
Symbol 43 MovieClip Frame 11
gotoAndPlay (3);
Symbol 62 Button
on (release) {
_root.fnShowMission();
}
Symbol 63 MovieClip Frame 1
stop();
Symbol 63 MovieClip Frame 2
stop();
Symbol 63 MovieClip Frame 3
stop();
Symbol 63 MovieClip Frame 4
stop();
Symbol 66 MovieClip Frame 1
function UpdateTimer() {
tCounter = tCounter + (1 * tFactor);
if (tAlarmTime < tCounter) {
trace((("Timer " + this._name) + " ") + tAlarmMessage);
_root.HandleMessage(tAlarmMessage);
if (0 < tRepeat) {
tAlarmTime = tCounter + tRepeat;
tRepeat = tRepeat + tIncRepeat;
if (0 < tIncRepeat) {
tRepeat = Math.min(tMinRepeat, tRepeat);
} else if (tIncRepeat < 0) {
tRepeat = Math.max(tMinRepeat, tRepeat);
}
gotoAndPlay (5);
} else {
gotoAndStop (1);
}
} else {
gotoAndPlay (5);
}
}
function ReverseTimer() {
tCounter = tCounter - 1;
gotoAndPlay (10);
}
function SetTimer(vTime, vMessage) {
tAlarmTime = tCounter + vTime;
tAlarmMessage = vMessage;
trace((("SetTimer " + vTime) + " ") + vMessage);
gotoAndPlay (5);
}
function SetRepeat(vRepeatTime, vDecrement, vMin) {
tRepeat = vRepeatTime;
tIncRepeat = vDecrement;
tMinRepeat = vMin;
}
function Reverse(fReverse) {
if (fReverse == true) {
gotoAndPlay (10);
} else {
tFactor = 1;
tCounter = tCounter - (5 * (random(3) + 1));
gotoAndPlay (5);
}
}
function Factor(vFrequency) {
tFactor = vFrequency;
}
function Pause(fPause) {
if (fPause == true) {
stop();
} else {
play();
}
}
var tCounter = 0;
var tAlarmTime = 0;
var tAlarmMessage = "";
var tRepeat = 0;
var tIncRepeat = 0;
var tMinRepeat = 0;
var tFactor = 1;
stop();
Symbol 66 MovieClip Frame 6
UpdateTimer();
Symbol 66 MovieClip Frame 11
ReverseTimer();
Symbol 124 MovieClip Frame 1
function Update() {
_parent.UpdateLoc(myLoc, myInc);
this._x = myLoc.x;
this._y = myLoc.y;
}
function CheckCollision() {
var vfHit = false;
if ((((-3 < myLoc.x) and (myLoc.x < 3)) and (-3 < myLoc.y)) and (myLoc.y < 3)) {
vfHit = true;
}
return(vfHit);
}
function SetLoc(vPoint) {
myLoc.x = vPoint.x;
myLoc.y = vPoint.y;
this._x = vPoint.x;
this._y = vPoint.y;
}
function GetLocX() {
return(myLoc.x);
}
function GetLocY() {
return(myLoc.y);
}
var myLoc = new Object();
var myInc = new Object();
myLoc.x = this._x;
myLoc.y = this._y;
myInc.x = 0;
myInc.y = 0;
stop();
Symbol 126 MovieClip Frame 1
function Update() {
_parent.UpdateLoc(myLoc, myInc);
this._x = myLoc.x;
this._y = myLoc.y;
}
function CheckCollision() {
if ((-10 < myLoc.y) and (myLoc.y < 10)) {
if (fOnScreen == false) {
_root.Viewer.NewPlane(this._name, myLoc.x, myType);
fOnScreen = true;
}
if (((-10 < myLoc.x) and (myLoc.x < 10)) and (fHitPlayer == false)) {
_root.HitPlane();
fHitPlayer = true;
}
} else if (myLoc.y < -50) {
_parent.DeletePlane(this);
}
}
function SetLoc(vPoint) {
myLoc.x = vPoint.x;
myLoc.y = vPoint.y;
this._x = vPoint.x;
this._y = vPoint.y;
}
function GetLocX() {
return(myLoc.x);
}
function GetLocY() {
return(myLoc.y);
}
var myLoc = new Object();
var myInc = new Object();
myLoc.x = this._x;
myLoc.y = this._y;
myType = 0;
myInc.x = 0;
myInc.y = -2;
fOnScreen = false;
fHitPlayer = false;
Symbol 126 MovieClip Frame 2
if (0 < this._rotation) {
myInc.x = 1.2;
myInc.y = -1.9;
myType = "R";
} else if (this._rotation < 0) {
myInc.x = -1.2;
myInc.y = -1.9;
myType = "L";
}
stop();
Symbol 140 Button
on (release) {
_root.StartGame();
}
Symbol 142 MovieClip Frame 1
stop();
Symbol 173 Button
on (release) {
_root.fnPlayAgain();
}
Symbol 183 Button
on (release) {
_root.fnPlayAgain();
gotoAndPlay (123);
}
Symbol 184 Button
on (release) {
getURL ("/gijoe/experience/pl/page.games/dn/default.cfm", "_self");
}
Symbol 198 Button
on (release) {
_root.fnPlayAgain();
gotoAndPlay (123);
}
Symbol 199 Button
on (release) {
getURL (("/gijoe/experience/hm/pl/path.recruit/gameID.105/score." + _root.gScore) + "/LocID.83108/dn/games_cert.cfm", "_blank");
}
Symbol 204 Button
on (release) {
var newscore = (_root.gScore * 400);
}
on (release) {
getURL (("javascript:openWindowGames('http://www.hasbro.com/gijoe/include/challenge_a_friend.cfm?server=www.hasbro.com&script=/gijoe/experience/recruitcenter/games/pl/path.recruit/dn/snow.cfm&gameID=105&rad=" + newscore) + "');");
}
Symbol 206 MovieClip Frame 1
stop();
Symbol 206 MovieClip Frame 6
stop();
Symbol 206 MovieClip Frame 8
play();
Symbol 206 MovieClip Frame 28
gotoAndStop (1);
Symbol 206 MovieClip Frame 30
play();
Symbol 206 MovieClip Frame 37
gotoAndStop (1);
Symbol 206 MovieClip Frame 39
play();
Symbol 206 MovieClip Frame 58
if (_root.user_id == "none") {
getURL (("/gijoe/experience/scripts/holder.cfm?action=postscores&gameID=105&score=" + _root.gScore) + "&test=test");
stop();
} else {
loadVariablesNum (("/gijoe/experience/scripts/scores.cfm?action=postscores&gameID=105&score=" + _root.gScore) + "&test=test", 0);
if (_root.gScore >= _root.gPASS) {
gotoAndPlay (117);
} else {
gotoAndPlay (111);
}
}
Symbol 206 MovieClip Frame 60
play();
Symbol 206 MovieClip Frame 82
if (_root.user_id == "none") {
getURL (("/gijoe/experience/scripts/holder.cfm?action=postscores&gameID=105&score=" + _root.gScore) + "&test=test");
stop();
} else {
loadVariablesNum (("/gijoe/experience/scripts/scores.cfm?action=postscores&gameID=105&score=" + _root.gScore) + "&test=test", 0);
if (_root.gScore >= _root.gPASS) {
gotoAndPlay (117);
} else {
gotoAndPlay (111);
}
}
Symbol 206 MovieClip Frame 84
play();
Symbol 206 MovieClip Frame 109
if (_root.user_id == "none") {
getURL (("/gijoe/experience/scripts/holder.cfm?action=postscores&gameID=105&score=" + _root.gScore) + "&test=test");
stop();
} else {
loadVariablesNum (("/gijoe/experience/scripts/scores.cfm?action=postscores&gameID=105&score=" + _root.gScore) + "&test=test", 0);
if (_root.gScore >= _root.gPASS) {
gotoAndPlay (117);
} else {
gotoAndPlay (111);
}
}
Symbol 206 MovieClip Frame 111
_root.gotoAndStop("NoPass");
play();
Symbol 206 MovieClip Frame 116
stop();
Symbol 206 MovieClip Frame 117
_root.gotoAndStop("Pass");
play();
Symbol 206 MovieClip Frame 122
stop();
Symbol 206 MovieClip Frame 123
_root.fnPlayAgain();
gotoAndStop (1);
Symbol 220 Button
on (release) {
_root.gSkillLevel = "cadet";
_root.fnPlayGame("cadet");
}
Symbol 222 Button
on (release) {
_root.gSkillLevel = "commando";
_root.fnPlayGame("commando");
}
Symbol 226 MovieClip Frame 1
gotoAndStop (3);
Symbol 226 MovieClip Frame 3
stop();
Symbol 226 MovieClip Frame 4
stop();
Symbol 226 MovieClip Frame 5
stop();
Symbol 227 MovieClip Frame 1
play();
Symbol 227 MovieClip Frame 5
gotoAndPlay (1);
Symbol 227 MovieClip Frame 6
stop();
Symbol 228 MovieClip Frame 1
stop();
Symbol 228 MovieClip Frame 3
stop();
Instance of Symbol 227 MovieClip "load_start" in Symbol 228 MovieClip Frame 3
onClipEvent (enterFrame) {
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
this.gotoAndStop("ready");
}
}
Symbol 245 Button
on (release) {
_root.fnEndBriefing();
}
Symbol 246 Button
on (release) {
_root.fnEndBriefing();
}
Symbol 247 MovieClip Frame 1
stop();
Symbol 247 MovieClip Frame 2
stop();
Symbol 279 MovieClip Frame 1
function Update() {
_parent.UpdateLoc(myLoc, myInc);
this._x = myLoc.x;
this._y = myLoc.y;
}
function CheckCollision() {
if ((-10 < myLoc.y) and (myLoc.y < 10)) {
if (fOnScreen == false) {
_root.Viewer.NewPlane(this._name, myLoc.x, myType);
fOnScreen = true;
}
if (((-10 < myLoc.x) and (myLoc.x < 10)) and (fHitPlayer == false)) {
_root.HitPlane();
fHitPlayer = true;
}
} else if (myLoc.y < -50) {
_parent.DeletePlane(this);
}
}
function SetLoc(vPoint) {
myLoc.x = vPoint.x;
myLoc.y = vPoint.y;
this._x = vPoint.x;
this._y = vPoint.y;
}
function GetLocX() {
return(myLoc.x);
}
function GetLocY() {
return(myLoc.y);
}
var myLoc = new Object();
var myInc = new Object();
myLoc.x = this._x;
myLoc.y = this._y;
myType = 0;
myInc.x = 0;
myInc.y = -2;
fOnScreen = false;
fHitPlayer = false;
Symbol 279 MovieClip Frame 2
if (0 < this._rotation) {
myInc.x = 1.2;
myInc.y = -1.9;
myType = "R";
} else if (this._rotation < 0) {
myInc.x = -1.2;
myInc.y = -1.9;
myType = "L";
}
stop();
Symbol 350 MovieClip Frame 1
stop();
Symbol 350 MovieClip Frame 2
_root.iMissionButton.gotoAndStop("TextOnly");
Symbol 350 MovieClip Frame 16
_root.iMissionButton.gotoAndStop("Graphic");
Symbol 350 MovieClip Frame 144
_root.iMissionButton.gotoAndStop("Button");
GoJoeBut.gotoAndStop(2);
stop();
Symbol 372 MovieClip Frame 1
stop();
Symbol 372 MovieClip Frame 525
_root.FuelWarning();
Symbol 372 MovieClip Frame 600
_root.EndGame("Fuel");
Symbol 373 MovieClip Frame 1
function Refuel() {
Needle.gotoAndPlay("Start");
}
function EndGame() {
Needle.stop();
}
stop();
Symbol 385 MovieClip Frame 1
function Update() {
_parent.UpdateLoc(myLoc, myInc);
this._x = myLoc.x;
this._y = myLoc.y;
}
function SetLoc(vPoint) {
myLoc.x = vPoint.x;
myLoc.y = vPoint.y;
this._x = vPoint.x;
this._y = vPoint.y;
}
function GetLocX() {
return(myLoc.x);
}
function GetLocY() {
return(myLoc.y);
}
var myLoc = new Object();
var myInc = new Object();
myLoc.x = this._x;
myLoc.y = this._y;
myInc.x = 0;
myInc.y = 0;
stop();
Symbol 386 MovieClip Frame 1
function Update() {
_parent.UpdateLoc(myLoc, myInc);
this._x = myLoc.x;
this._y = myLoc.y;
}
function CheckCollision() {
if ((-10 < myLoc.y) and (myLoc.y < 10)) {
if (fOnScreen == false) {
_root.Viewer.NewPlane(this._name, myLoc.x, myType);
fOnScreen = true;
}
if (((-10 < myLoc.x) and (myLoc.x < 10)) and (fHitPlayer == false)) {
_root.HitPlane();
fHitPlayer = true;
}
} else if (myLoc.y < -50) {
_parent.DeletePlane(this);
}
}
function SetLoc(vPoint) {
myLoc.x = vPoint.x;
myLoc.y = vPoint.y;
this._x = vPoint.x;
this._y = vPoint.y;
}
function GetLocX() {
return(myLoc.x);
}
function GetLocY() {
return(myLoc.y);
}
var myLoc = new Object();
var myInc = new Object();
myLoc.x = this._x;
myLoc.y = this._y;
myType = 0;
myInc.x = 0;
myInc.y = -2;
fOnScreen = false;
fHitPlayer = false;
Symbol 386 MovieClip Frame 2
if (0 < this._rotation) {
myInc.x = 1.2;
myInc.y = -1.9;
myType = "R";
} else if (this._rotation < 0) {
myInc.x = -1.2;
myInc.y = -1.9;
myType = "L";
}
stop();
Symbol 387 MovieClip Frame 1
function Update() {
_parent.UpdateLoc(myLoc, myInc);
this._x = myLoc.x;
this._y = myLoc.y;
}
function CheckCollision() {
var vfHit = false;
if ((((-3 < myLoc.x) and (myLoc.x < 3)) and (-3 < myLoc.y)) and (myLoc.y < 3)) {
vfHit = true;
}
return(vfHit);
}
function SetLoc(vPoint) {
myLoc.x = vPoint.x;
myLoc.y = vPoint.y;
this._x = vPoint.x;
this._y = vPoint.y;
}
function GetLocX() {
return(myLoc.x);
}
function GetLocY() {
return(myLoc.y);
}
var myLoc = new Object();
var myInc = new Object();
myLoc.x = this._x;
myLoc.y = this._y;
myInc.x = 0;
myInc.y = 0;
stop();
Symbol 388 MovieClip Frame 1
function Update() {
_parent.UpdateLoc(myLoc, myInc);
this._x = myLoc.x;
this._y = myLoc.y;
}
function CheckCollision() {
var vfHit = false;
if ((((-3 < myLoc.x) and (myLoc.x < 3)) and (-3 < myLoc.y)) and (myLoc.y < 3)) {
vfHit = true;
}
return(vfHit);
}
function SetLoc(vPoint) {
myLoc.x = vPoint.x;
myLoc.y = vPoint.y;
this._x = vPoint.x;
this._y = vPoint.y;
}
function GetLocX() {
return(myLoc.x);
}
function GetLocY() {
return(myLoc.y);
}
var myLoc = new Object();
var myInc = new Object();
myLoc.x = this._x;
myLoc.y = this._y;
myInc.x = 0;
myInc.y = 0;
stop();
Symbol 391 MovieClip Frame 5
stop();
Symbol 391 MovieClip Frame 7
play();
Symbol 391 MovieClip Frame 8
play();
Symbol 391 MovieClip Frame 9
play();
Symbol 391 MovieClip Frame 10
stop();
Symbol 391 MovieClip Frame 12
play();
Symbol 391 MovieClip Frame 13
play();
Symbol 391 MovieClip Frame 14
play();
Symbol 391 MovieClip Frame 15
stop();
Symbol 392 MovieClip Frame 1
function Clear() {
var i = aRadarObjects.length;
while (i >= 0) {
aRadarObjects[i].removeMovieClip();
i--;
}
var i = aPlanes.length;
while (i >= 0) {
aPlanes[i].removeMovieClip();
i--;
}
aRadarObjects.splice(0);
aConstraint.splice(0);
aPlanes.splice(0);
rXCounter = 0;
}
function InitRadar() {
rSlope.x = 0;
rSlope.y = rStraightInc;
fReverse = false;
NewStartCrater(-30 - random(15));
NewStartCrater(30 + random(15));
gotoAndPlay (23);
trace("Radar init");
}
function UpdateObjects() {
var i = aRadarObjects.length;
while (i >= 0) {
aRadarObjects[i].Update();
i--;
}
var i = 0;
while (i < aPlanes.length) {
aPlanes[i].Update();
aPlanes[i].CheckCollision();
i++;
}
rLastLoc.x = rLastLoc.x + rSlope.x;
rLastLoc.y = rLastLoc.y + rSlope.y;
i = 0;
while (i < aConstraint.length) {
aConstraint[i].xMax = aConstraint[i].xMax + rSlope.x;
aConstraint[i].xMin = aConstraint[i].xMin + rSlope.x;
aConstraint[i].yMin = aConstraint[i].yMin + rSlope.y;
i++;
}
}
function UpdateLoc(myLoc, myInc) {
if (_root.gfBrake == false) {
myLoc.x = myLoc.x + (myInc.x + rSlope.x);
myLoc.y = myLoc.y + (myInc.y + rSlope.y);
}
if (myLoc.x < (rRect.xMin - 10)) {
myLoc.x = rRect.xMax + 5;
} else if ((rRect.xMax + 10) < myLoc.x) {
myLoc.x = rRect.xMin - 5;
}
}
function Reverse() {
if (fReverse == false) {
rSlope.x = rSlope.x * -1;
rSlope.y = rSlope.y * -1;
fReverse = true;
}
}
function Forward() {
if (fReverse == true) {
rSlope.x = rSlope.x * -1;
rSlope.y = rSlope.y * -1;
fReverse = false;
}
}
function NewObj() {
if (fReverse == false) {
var vPoint = new Object();
SetConstrainedPoint(vPoint);
rXCounter = rXCounter + 1;
rLastLoc.x = vPoint.x;
rLastLoc.y = vPoint.y;
AddObject("Good", vPoint);
}
}
function NewFuel() {
if (fReverse == false) {
var vPoint = new Object();
SetConstrainedPoint(vPoint);
rXCounter = rXCounter + 1;
AddObject("Fuel", vPoint);
}
}
function NewStartCrater(vStartX) {
var vPoint = new Object();
vPoint.x = vStartX;
vPoint.y = random(myDiameter) - (myDiameter / 2);
CreateCrater(vPoint);
}
function NewCrater() {
var vPoint = new Object();
if (fReverse == false) {
var vSound = new Sound(this);
vSound.attachSound("Explosion");
vSound.start();
var vWidth = ((CraterClip._width / 2) + 10);
vPoint.y = ((-myDiameter) / 2) + 5;
vPoint.x = (((random(7) - 3) * 15) + random(11)) - 5;
if ((rLastLoc.y - 12) < vPoint.y) {
if (((rLastLoc.x - vPoint.x) < vWidth) and ((-vWidth) < (rLastLoc.x - vPoint.x))) {
vPoint.x = vPoint.x - 40;
vPoint.y = vPoint.y - 5;
}
}
} else {
vPoint.y = myDiameter;
vPoint.x = (((random(7) - 3) * 15) + random(11)) - 5;
}
CreateCrater(vPoint);
}
function CreateCrater(vPoint) {
var vWidth = ((CraterClip._width / 2) + 10);
if (fReverse == false) {
var vConstrain = new Object();
vConstrain.xMax = vPoint.x + vWidth;
vConstrain.xMin = vPoint.x - vWidth;
vConstrain.yMin = (vPoint.y - CraterClip._height) - 20;
var fAdded = false;
var i = 0;
while (i < aContraint.length) {
if (aConstraint[i].xMax >= vConstrain.xMax) {
if (vConstrain.xMax >= aConstraint[i].xMin) {
aConstraint[i].xMin = vConstrain.xMin;
aConstraint[i].yMin = vConstrain.yMin;
fAdded = true;
break;
}
aConstraint.splice(i, 0, vConstrain);
fAdded = true;
break;
}
i++;
}
if (fAdded == false) {
aConstraint.push(vConstrain);
}
}
trace((((("Constraint: " + vConstrain.xMin) + ",") + vConstrain.xMax) + " ") + yMin);
AddObject("Crater", vPoint);
}
function SetConstrainedPoint(vPoint) {
var i = aConstraint.length;
while (i >= 0) {
if (vPoint.y < aConstraint[i].yMin) {
aConstraint.splice(i, 1);
}
i--;
}
vPoint.y = (-myDiameter) / 2;
var r = random(aConstraint.length + 1);
var vConstraint = new Object();
if (r < aConstraint.length) {
vConstraint.max = aConstraint[r].xMin;
} else {
vConstraint.max = myDiameter / 2;
}
if (0 < r) {
vConstraint.min = aConstraint[r - 1].xMax;
} else {
vConstraint.min = (-myDiameter) / 2;
}
if (vConstraint.min >= vConstraint.max) {
trace("Overlapping constraints");
if (1 < r) {
vConstraint.min = aConstraint[aConstraint.length - 1].xMax;
vConstraint.max = myDiameter;
} else {
vConstraint.min = -myDiameter;
vConstraint.max = aConstraint[0].xMin;
}
}
var x = ((random((vConstraint.max - vConstraint.min) - 2) + vConstraint.min) + 2);
if ((rLastLoc.y - 5) < vPoint.y) {
if (((rLastLoc.x - vPoint.x) < 5) and (-5 < (rLastLoc.x - vPoint.x))) {
vPoint.x = vPoint.x - (rLastLoc.x - vPoint.x);
vPoint.y = vPoint.y - 5;
}
}
vPoint.x = Math.max(x, vConstraint.min);
vPoint.x = Math.min(vPoint.x, vConstraint.max);
trace((((vPoint.x + " Constraint: ") + vConstraint.min) + ", ") + vConstraint.max);
}
function NewPlane() {
var vSound = new Sound(this);
vSound.attachSound("plane");
vSound.start();
var vType = (random(3) - 1);
var x = (-60 * vType);
var y = (55 - (13 * Math.abs(vType)));
var vRotation = (vType * 45);
var i = aPlanes.length;
var vName = ("iPlane" + i);
duplicateMovieClip (PlaneClip, vName, 60 + i);
aPlanes.push(eval (vName));
eval (vName)._y = y;
eval (vName)._x = x;
eval (vName)._rotation = vRotation;
}
function AddGood(i) {
var vPoint = new Object();
var r = (random(20) - 10);
var s = -10;
vPoint.x = i * r;
vPoint.y = s * (i + 1);
AddObject("Good", vPoint);
}
function AddObject(vType, vPoint) {
var i = rXCounter;
var vName = (("i" + vType) + i);
duplicateMovieClip (eval (vType + "Clip"), vName, 2000 + i);
aRadarObjects.push(eval (vName));
eval (vName).myType = vType;
eval (vName).myNumber = i;
eval (vName).myName = vName;
eval (vName)._y = vPoint.y;
eval (vName)._x = vPoint.x;
_root.Viewer.AddObject(vName, vType, (vPoint.x / myDiameter) / 2);
rXCounter = rXCounter + 1;
if (900 < rxCounter) {
rXCounter = 0;
}
}
function DeleteObj(vName) {
var i = 0;
while (i < aRadarObjects.length) {
if (aRadarObjects[i].myName == vName) {
removeMovieClip(eval (vName));
aRadarObjects.splice(i, 1);
return;
}
i++;
}
}
function Hit(vName) {
var i = 0;
while (i < aRadarObjects.length) {
if (aRadarObjects[i].myName == vName) {
removeMovieClip(eval (vName));
aRadarObjects.splice(i, 1);
return;
}
i++;
}
}
function RemoveObj(i) {
if (vObj.myType == "Good") {
AddGood(random(15));
vObj = aRadarObjects[i];
aRadarObjects[i] = 0;
} else if (vObj.myType == "Mine") {
AddMine(random(15), random(2));
vObj = aMines[i];
aMines[i] = 0;
} else {
vObj = aRadarObjects[i];
aRadarObjects[i] = 0;
}
vObj._x = -1000;
vObj._y = -1000;
removeMovieClip(vObj);
}
function DeletePlane(vMC) {
var i = 0;
while (i < aPlanes.length) {
if (aPlanes[i]._name == vMC._name) {
aPlanes.splice(i, 1);
break;
}
i++;
}
removeMovieClip(vMC);
}
function EndGame() {
gotoAndStop (20);
}
function Pause(fPaused) {
if (fPaused == true) {
this.stop();
} else {
gotoAndPlay (23);
}
}
var aRadarObjects = new Array();
var aPlanes = new Array();
var rStraightInc = 1.2;
var rTurnIncX = 1.8;
var rTurnIncY = 0.5;
var rXCounter = 0;
var rXInc = 1;
var rLastLoc = new Object();
rLastLoc.x = 0;
rLastLoc.y = 0;
var fReverse = false;
var rRect = this.getBounds(this);
var rSlope = new Object();
rSlope.x = 0;
rSlope.y = rStraightInc;
var myDiameter = 90;
var rCraterWidth = CraterClip._width;
var rCraterHeight = CraterClip._height;
var aConstraint = new Array();
duplicateMovieClip (ArrowClip, "QuadMarker", 10000);
ArrowClip._x = -1000;
ArrowClip._y = -1000;
Symbol 392 MovieClip Frame 6
function Turn(vDir) {
trace("Radar Turn " + vDir);
if (vDir == -1) {
rSlope.x = rTurnIncX;
rSlope.y = rTurnIncY;
QuadMarker.gotoAndPlay("Left");
} else {
rSlope.x = -rTurnIncX;
rSlope.y = rTurnIncY;
QuadMarker.gotoAndPlay("Right");
}
if (fReverse == true) {
rSlope.x = rSlope.x * -1;
rSlope.y = rSlope.y * -1;
}
}
function EndTurn() {
rSlope.x = 0;
rSlope.y = rStraightInc;
if (fReverse == true) {
rSlope.y = rSlope.y * -1;
}
QuadMarker.gotoAndPlay(1);
}
function Rotate(vDir) {
rQuad = ((8 + rQuad) - vDir) % 8;
if (rQuad == 0) {
rQuad = 8;
}
QuadMarker.gotoAndPlay("Quad" + rQuad);
}
function GetInfo(vName) {
var vObj = eval (vName);
if (vObj == 0) {
trace(("Object " + vIndex) + " doesn't exist");
}
return(GetObjInfo(vObj));
}
function GetObjInfo(vObj) {
var info = new Object();
var x = vObj.GetLocX();
var y = vObj.GetLocY();
info.x = x;
info.y = y;
info.radius = GetDist(x, y);
info.dist = -y;
info.yMax = myDiameter / 2;
info.xMax = (2 * myDiameter) / 3;
return(info);
}
function GetDist(x, y) {
var d = Math.sqrt((x * x) + (y * y));
return(d);
}
var SIN2 = 0.38268343236509;
var SIN1 = 0.923879532511287;
var COS2 = 0.923879532511287;
var COS1 = 0.38268343236509;
Symbol 392 MovieClip Frame 20
stop();
Symbol 392 MovieClip Frame 23
UpdateObjects();
Symbol 392 MovieClip Frame 24
UpdateObjects();
gotoAndPlay (23);
Symbol 392 MovieClip Frame 26
gotoAndStop (20);
Symbol 392 MovieClip Frame 27
function UpdateObjects() {
trace("UpdateObjects");
var i = 0;
while (i < aGood.length) {
aGood[i].Update();
trace("Good" + i);
i++;
}
var i = 0;
while (i < aBad.length) {
aBad[i].Update();
i++;
}
var i = 0;
while (i < aMine.length) {
aMine[i].Update();
i++;
}
}
function Update(myLoc, myInc) {
trace((("Update " + myLoc.x) + ", ") + myLoc.y);
myLoc.x = myLoc.x + (myInc.x + rSlope.x);
myLoc.y = myLoc.y + (myInc.y + rSlope.y);
var fWrap = false;
if (myLoc.x < rRect.xMin) {
myLoc.x = rRect.xMax - 3;
myLoc.y = 0;
fWrap = true;
} else if (rRect.xMax < myLoc.x) {
myLoc.x = rRect.xMin + 3;
myLoc.y = 0;
fWrap = true;
}
if (myLoc.y < rRect.yMin) {
myLoc.y = rRect.yMax - 3;
myLoc.x = 0;
fWrap = true;
} else if (rRect.yMax < myLoc.y) {
myLoc.y = rRect.yMin + 3;
myLoc.x = 0;
fWrap = true;
}
}
function CheckCollision() {
if (_parent.Boat.Nose.hitTest(this.Nose)) {
HitMe();
}
}
function StartFromEdge() {
if (myQuad >= 4) {
myLoc.x = 50;
if ((myQuad == 1) || (myQuad == 4)) {
myLoc.x = 25;
}
} else {
myLoc.x = -50;
if ((myQuad == 8) || (myQuad == 5)) {
myLoc.x = -25;
}
}
if ((myQuad == 1) || (myQuad == 8)) {
myLoc.y = -50;
} else if ((myQuad == 5) || (myQuad == 4)) {
myLoc.y = 50;
} else if ((myQuad == 2) || (myQuad == 7)) {
myLoc.y = -25;
} else {
myLoc.y = 25;
}
var r = (random(3) - 1);
myLoc.x = myLoc.x + (10 * r);
r = random(3) - 1;
myLoc.y = myLoc.y + (10 * r);
}
function HitMe() {
trace("HIT SUB " + _name);
var num = this._name.charAt(3);
if (num == "W") {
_root.Game.Hit("Whale");
} else {
_root.Game.Screen.HitScope(num);
fUpdate = false;
gotoAndPlay (1);
StartFromEdge();
}
}
function getFacing() {
vOpposite = (15 - _parent.myQuad) % 8;
if (vOpposite == myQuad) {
vFace = "F";
} else if (vOpposite == ((myQuad + 1) % 8)) {
vFace = "F";
} else if (vOpposite == ((myQuad + 2) % 8)) {
vFace = "R";
} else if (vOpposite == ((myQuad + 6) % 8)) {
vFace = "L";
} else if (vOpposite == ((myQuad + 7) % 8)) {
vFace = "F";
} else if (vOpposite == ((myQuad + 3) % 8)) {
vFace = "BR";
} else if (vOpposite == ((myQuad + 5) % 8)) {
vFace = "BL";
} else if (vOpposite == ((myQuad + 4) % 8)) {
vFace = "B";
}
return(vFace);
}
function Bounce(vMyDir, vOtherDir, vOtherQuad) {
if (fUpdate == true) {
if (vOtherDir == -1) {
vOtherQuad = vOtherQuad + 4;
}
if (vOtherQuad == myQuad) {
var vQuad = ((myIndex + myQuad) % 8);
vSlope = _parent.SlopeOf(((10 - vQuad) % 8) + 1);
} else {
vSlope = _parent.SlopeOf(((10 - vOtherQuad) % 8) + 1);
}
myInc.x = myInc.x * (vMyDir / 2);
myInc.y = myInc.y * (vMyDir / 2);
myInc.x = myInc.x + (vSlope.x / 2);
myInc.y = myInc.y + (vSlope.y / 2);
Update((-myInc.x) * 2, (-myInc.y) * 2, true);
fUpdate = false;
gotoAndPlay (1);
}
}
function ChangeDir(vChange) {
var vAngle = myAngle;
if (vChange == 0) {
myQuad = ((((myQuad + 7) + random(3)) - 1) % 8) + 1;
} else if (vChange == -1) {
myQuad = ((myQuad + 3) % 8) + 1;
}
vAngle = (myQuad * 45) - 22.5;
var vSlope = _parent.SlopeOf(((10 - myQuad) % 8) + 1);
myInc.x = -vSlope.x;
myInc.y = -vSlope.y;
this._rotation = vAngle;
}
function enable() {
fUpdate = true;
gotoAndPlay (23);
StartFromEdge();
}
Symbol 392 MovieClip Frame 28
function ChangeQuads(vDir) {
var vFrame = ((myQuad - (0.25 * vDir)) * 100);
myQuad = myQuad - vDir;
if (8 < myQuad) {
myQuad = 1;
} else if (myQuad < 1) {
myQuad = 8;
}
getSlope();
gotoAndPlay("Quad" + vFrame);
}
function Move(vDir) {
Update(mySlope.x * vDir, mySlope.y * vDir);
}
function Update(x, y) {
var i = 0;
while (i < _parent.SUBS) {
eval ("sub" + i).Update(x, y);
if (_root.gState == 0) {
break;
}
i++;
}
if (_root.gState != 0) {
CheckSubCollisions();
var j = 0;
while (j < _parent.JELLYFISH) {
eval ("jelly" + j).Update(x, y);
j++;
}
subWhale1.Update(x, y);
subWhale2.Update(x, y);
}
}
function CheckSubCollisions() {
var i = 0;
while (i < _parent.SUBS) {
var vCheckSub = eval ("sub" + i);
var j = (i + 1);
while (j < _parent.SUBS) {
var vOtherSub = eval ("sub" + j);
if (vCheckSub.hitTest(vOtherSub)) {
var vMyDir;
var vOtherDir;
if (vCheckSub.hitTest(vOtherSub.Nose)) {
vOtherDir = 1;
} else {
vOtherDir = -1;
}
if (vOtherSub.hitTest(vCheckSub.Nose)) {
vMyDir = 1;
} else {
vMyDir = -1;
}
vCheckSub.Bounce(vMyDir, vOtherDir, vOtherSub.myQuad);
vOtherSub.Bounce(vOtherDir, vMyDir, vCheckSub.myQuad);
}
j++;
}
i++;
}
}
function getSlope() {
mySlope = SlopeOf(myQuad);
}
var myQuad = 2;
var mySlope = new Object();
var myDiameter = Screen._width;
var myRect = this.getBounds(this);
var SIN2 = 0.38268343236509;
var SIN1 = 0.923879532511287;
var COS2 = 0.923879532511287;
var COS1 = 0.38268343236509;
getSlope();
Symbol 395 MovieClip Frame 1
stop();
Symbol 395 MovieClip Frame 5
gotoAndStop (1);
Symbol 397 Button
on (rollOut, release) {
_root.OverShifter(false);
}
Symbol 403 MovieClip Frame 1
stop();
Symbol 403 MovieClip Frame 2
stop();
Symbol 407 MovieClip Frame 1
function Shift(vState) {
if (myState != vState) {
gotoAndPlay(myState + "Shift");
myState = vState;
}
}
function Over(vfOver) {
if (vfOver == true) {
gotoAndStop(myState + "Over");
} else {
gotoAndStop(myState);
}
}
function Down() {
gotoAndStop(myState + "Down");
}
function EndShift() {
gotoAndStop(myState);
}
var myState = "Forward";
Symbol 407 MovieClip Frame 2
stop();
Symbol 407 MovieClip Frame 9
EndShift();
Symbol 407 MovieClip Frame 10
stop();
Symbol 407 MovieClip Frame 14
EndShift();
Symbol 409 Button
on (rollOver) {
Over(true);
}
on (rollOut) {
Over(false);
}
on (press) {
Down();
}
on (release) {
_root.Shift();
}
Symbol 410 Button
on (rollOver) {
Over(true);
}
on (rollOut) {
Over(false);
}
on (press) {
Down();
}
Symbol 411 Button
on (rollOver) {
Over(true);
}
on (rollOut) {
Over(false);
}
on (press) {
Down();
}
on (release) {
_root.Shift();
}
Symbol 414 Button
on (rollOver) {
Over(true);
}
on (rollOut) {
Over(false);
}
on (press) {
Down();
}
on (release) {
_root.Shift();
}
Symbol 415 Button
on (rollOver) {
Over(true);
}
on (rollOut) {
Over(false);
}
on (press) {
Down();
}
on (release) {
_root.Shift();
}
Symbol 416 Button
on (rollOver) {
Over(true);
}
on (rollOut) {
Over(false);
}
on (press) {
Down();
}
Symbol 418 MovieClip Frame 1
function ShiftDown() {
iShifter.Shift("Reverse");
gotoAndPlay (5);
}
function ShiftUp() {
iShifter.Shift("Forward");
gotoAndPlay (3);
}
function Over(vFlag) {
iShifter.Over(vFlag);
_root.OverShifter(vFlag);
}
function Down() {
iShifter.Down();
}
stop();
Symbol 418 MovieClip Frame 2
stop();
Symbol 418 MovieClip Frame 4
gotoAndStop (2);
Symbol 418 MovieClip Frame 6
stop();
Symbol 419 MovieClip Frame 1
function Rotate(vDir) {
myRotation = vDir * 0.3;
gotoAndPlay (5);
}
function EndGame() {
gotoAndStop (16);
}
function Pause(fPaused) {
trace("Truck pause " + fPaused);
if (fPaused == true) {
gotoAndStop (16);
FuelMeter.Needle.stop();
} else {
gotoAndPlay (5);
FuelMeter.Needle.play();
}
}
function Hit() {
iFlash.gotoAndPlay(2);
}
var myRotation = 0;
stop();
Symbol 419 MovieClip Frame 3
FuelMeter.Refuel();
Symbol 419 MovieClip Frame 6
this._rotation = myRotation;
Symbol 419 MovieClip Frame 8
this._rotation = 0;
stop();
Symbol 419 MovieClip Frame 16
stop();
Symbol 428 MovieClip Frame 1
stop();
Symbol 428 MovieClip Frame 2
stop();
Symbol 435 MovieClip Frame 1
stop();
Symbol 435 MovieClip Frame 2
stop();
Symbol 436 MovieClip Frame 1
function Turn(vDir) {
if (sDirection == 0) {
sDirection = vDir;
goDirection();
} else {
sPendingDir = vDir;
if (sStopped == true) {
EndTurn();
}
}
}
function Center() {
if (sPendingDir != 0) {
sDirection = sPendingDir;
sPendingDir = 0;
} else {
sDirection = 0;
}
goDirection();
}
function EndTurn(vDir) {
if (sStopped == true) {
sDirection = 0;
sStopped = false;
nextFrame();
} else if (vDir == sDirection) {
sPendingDir = 0;
sStopped = false;
} else if ((sPendingDir == sDirection) or ((_root.gDirection == sDirection) and (sDirection != 0))) {
sStopped = true;
stop();
} else {
sDirection = 0;
sStopped = false;
nextFrame();
}
}
function goDirection() {
if (sDirection == -1) {
gotoAndPlay (9);
} else if (sDirection == 1) {
gotoAndPlay (14);
} else {
gotoAndPlay (8);
}
sStopped = false;
}
function RemoveHand() {
RightHand.gotoAndStop(2);
}
function ReturnHand() {
RightHand.gotoAndStop(1);
}
var sDirection = 0;
var sPendingDir = 0;
var sStopped = false;
Symbol 436 MovieClip Frame 8
stop();
Symbol 436 MovieClip Frame 11
EndTurn();
stop();
Symbol 436 MovieClip Frame 12
play();
Symbol 436 MovieClip Frame 13
Center();
stop();
Symbol 436 MovieClip Frame 16
EndTurn();
stop();
Symbol 436 MovieClip Frame 17
play();
Symbol 436 MovieClip Frame 18
Center();
stop();
Symbol 438 Button
on (release) {
_root.fnClickInstructions();
}
Symbol 439 MovieClip Frame 1
stop();
Symbol 439 MovieClip Frame 2
stop();
Symbol 458 MovieClip Frame 1
stop();
Symbol 458 MovieClip Frame 2
play();
Symbol 458 MovieClip Frame 8
gotoAndStop (1);
Symbol 459 MovieClip Frame 1
function SetSize(vSize) {
var vBrightness = 100;
mySize = vSize;
if (vSize == 0) {
myState = "Empty";
gotoAndStop (1);
} else if (myState != "Hit") {
var vFrameNum = Math.round(vSize * 10);
vFrameNum = Math.min(8, vFrameNum);
if ((0 < vFrameNum) and (vFrameNum < 9)) {
gotoAndStop("Size" + vFrameNum);
}
myState = "Full";
}
this._xScale = mySize * 70;
this._yScale = mySize * 70;
}
function Hit() {
if (fHit == false) {
fHit = true;
myState = "Hit";
gotoAndStop (13);
}
}
function Animate(vFrame) {
gotoAndPlay(vFrame);
}
var myState = "Empty";
var mySize = 0;
var myType = "Good";
var fHit = false;
stop();
Symbol 459 MovieClip Frame 2
stop();
Symbol 459 MovieClip Frame 3
stop();
Symbol 459 MovieClip Frame 4
stop();
Symbol 459 MovieClip Frame 5
stop();
Symbol 459 MovieClip Frame 6
stop();
Symbol 459 MovieClip Frame 7
stop();
Symbol 459 MovieClip Frame 8
stop();
Symbol 459 MovieClip Frame 9
stop();
Symbol 459 MovieClip Frame 11
stop();
Symbol 459 MovieClip Frame 13
stop();
Symbol 459 MovieClip Frame 14
stop();
Symbol 459 MovieClip Frame 15
stop();
Symbol 459 MovieClip Frame 16
stop();
Symbol 459 MovieClip Frame 17
stop();
Symbol 459 MovieClip Frame 18
stop();
Symbol 459 MovieClip Frame 19
stop();
Symbol 459 MovieClip Frame 20
stop();
Symbol 459 MovieClip Frame 21
stop();
Symbol 459 MovieClip Frame 22
stop();
Symbol 459 MovieClip Frame 23
stop();
Symbol 459 MovieClip Frame 24
stop();
Symbol 459 MovieClip Frame 25
stop();
Symbol 459 MovieClip Frame 26
stop();
Symbol 459 MovieClip Frame 27
stop();
Symbol 459 MovieClip Frame 28
stop();
Symbol 459 MovieClip Frame 29
stop();
Symbol 459 MovieClip Frame 30
stop();
Symbol 459 MovieClip Frame 31
stop();
Symbol 459 MovieClip Frame 32
stop();
Symbol 459 MovieClip Frame 33
stop();
Symbol 459 MovieClip Frame 34
stop();
Symbol 459 MovieClip Frame 35
stop();
Symbol 459 MovieClip Frame 36
stop();
Symbol 459 MovieClip Frame 37
stop();
Symbol 459 MovieClip Frame 38
stop();
Symbol 459 MovieClip Frame 39
stop();
Symbol 461 MovieClip Frame 1
function SetSize(vSize) {
var vBrightness = 100;
mySize = vSize;
if (vSize == 0) {
myState = "Empty";
gotoAndStop (1);
} else if (myState != "Hit") {
var vFrameNum = Math.round(vSize * 10);
vFrameNum = Math.min(8, vFrameNum);
if ((0 < vFrameNum) and (vFrameNum < 9)) {
gotoAndStop("Size" + vFrameNum);
} else {
trace(((myType + myNumber) + " Size") + vFrameNum);
}
myState = "Full";
}
this._xScale = mySize * 70;
this._yScale = mySize * 70;
}
function Hit() {
if (myState != "Hit") {
myState = "Hit";
gotoAndStop (13);
}
}
function Animate(vFrame) {
gotoAndPlay(vFrame);
}
var myState = "Empty";
var mySize = 0;
var myType = "Good";
stop();
Symbol 461 MovieClip Frame 2
stop();
Symbol 461 MovieClip Frame 3
stop();
Symbol 461 MovieClip Frame 4
stop();
Symbol 461 MovieClip Frame 5
stop();
Symbol 461 MovieClip Frame 6
stop();
Symbol 461 MovieClip Frame 7
stop();
Symbol 461 MovieClip Frame 8
stop();
Symbol 461 MovieClip Frame 9
stop();
Symbol 461 MovieClip Frame 11
stop();
Symbol 461 MovieClip Frame 13
stop();
Symbol 461 MovieClip Frame 14
stop();
Symbol 461 MovieClip Frame 15
stop();
Symbol 461 MovieClip Frame 16
stop();
Symbol 461 MovieClip Frame 17
stop();
Symbol 461 MovieClip Frame 18
stop();
Symbol 461 MovieClip Frame 19
stop();
Symbol 461 MovieClip Frame 20
stop();
Symbol 461 MovieClip Frame 21
stop();
Symbol 461 MovieClip Frame 22
stop();
Symbol 461 MovieClip Frame 23
stop();
Symbol 461 MovieClip Frame 24
stop();
Symbol 461 MovieClip Frame 25
stop();
Symbol 461 MovieClip Frame 26
stop();
Symbol 461 MovieClip Frame 27
stop();
Symbol 461 MovieClip Frame 28
stop();
Symbol 461 MovieClip Frame 29
stop();
Symbol 461 MovieClip Frame 30
stop();
Symbol 461 MovieClip Frame 31
stop();
Symbol 461 MovieClip Frame 32
stop();
Symbol 461 MovieClip Frame 33
stop();
Symbol 461 MovieClip Frame 34
stop();
Symbol 461 MovieClip Frame 35
stop();
Symbol 461 MovieClip Frame 36
stop();
Symbol 461 MovieClip Frame 37
stop();
Symbol 461 MovieClip Frame 38
stop();
Symbol 461 MovieClip Frame 39
stop();
Symbol 480 MovieClip Frame 1
function SetSize(vSize) {
var vBrightness = 100;
mySize = vSize;
if (vSize == 0) {
myState = "Empty";
gotoAndStop (1);
} else if (myState != "Hit") {
var vFrameNum = Math.round(vSize * 10);
vFrameNum = Math.max(Math.min(8, vFrameNum), 1);
if ((0 < vFrameNum) and (vFrameNum < 9)) {
gotoAndStop("Size" + vFrameNum);
}
myState = "Full";
}
this._xScale = mySize * 70;
this._yScale = mySize * 70;
}
function fnIsDone() {
return(fDone);
}
function Hit() {
if (myState != "Hit") {
myState = "Hit";
gotoAndPlay (20);
}
}
function Animate(vFrame) {
gotoAndPlay(vFrame);
}
var myState = "Empty";
var mySize = 0;
var myType = "Good";
var fDone = false;
stop();
Symbol 480 MovieClip Frame 2
stop();
Symbol 480 MovieClip Frame 4
stop();
Symbol 480 MovieClip Frame 6
stop();
Symbol 480 MovieClip Frame 8
stop();
Symbol 480 MovieClip Frame 10
stop();
Symbol 480 MovieClip Frame 12
stop();
Symbol 480 MovieClip Frame 14
stop();
Symbol 480 MovieClip Frame 16
stop();
Symbol 480 MovieClip Frame 18
stop();
Symbol 480 MovieClip Frame 20
if (0 < this._x) {
gotoAndPlay (29);
} else {
gotoAndPlay (24);
}
Symbol 480 MovieClip Frame 28
fDone = true;
gotoAndStop (1);
Symbol 480 MovieClip Frame 33
fDone = true;
gotoAndStop (1);
Symbol 482 MovieClip Frame 11
stop();
Symbol 483 MovieClip Frame 30
_parent.EndPlane(this);
Symbol 483 MovieClip Frame 59
_parent.EndPlane(this);
Symbol 483 MovieClip Frame 88
_parent.EndPlane(this);
Symbol 483 MovieClip Frame 117
_parent.EndPlane(this);
Symbol 483 MovieClip Frame 146
_parent.EndPlane(this);
Symbol 483 MovieClip Frame 175
_parent.EndPlane(this);
Symbol 483 MovieClip Frame 204
_parent.EndPlane(this);
Symbol 488 MovieClip Frame 1
function SetSize(vSize) {
var vBrightness = 100;
mySize = vSize;
if (vSize == 0) {
myState = "Empty";
gotoAndStop (1);
} else if (myState != "Hit") {
var vFrameNum = Math.round(vSize * 10);
vFrameNum = Math.max(Math.min(8, vFrameNum), 1);
if ((0 < vFrameNum) and (vFrameNum < 9)) {
gotoAndStop("Size" + vFrameNum);
}
myState = "Full";
}
this._xScale = mySize * 70;
this._yScale = mySize * 70;
}
function fnIsDone() {
return(fDone);
}
function Hit() {
if (myState != "Hit") {
myState = "Hit";
gotoAndPlay (20);
}
}
function Animate(vFrame) {
gotoAndPlay(vFrame);
}
var myState = "Empty";
var mySize = 0;
var myType = "Good";
var fDone = false;
stop();
Symbol 488 MovieClip Frame 2
stop();
Symbol 488 MovieClip Frame 4
stop();
Symbol 488 MovieClip Frame 6
stop();
Symbol 488 MovieClip Frame 8
stop();
Symbol 488 MovieClip Frame 10
stop();
Symbol 488 MovieClip Frame 12
stop();
Symbol 488 MovieClip Frame 14
stop();
Symbol 488 MovieClip Frame 16
stop();
Symbol 488 MovieClip Frame 18
stop();
Symbol 488 MovieClip Frame 20
if (0 < this._x) {
gotoAndPlay (25);
} else {
gotoAndPlay (30);
}
Symbol 488 MovieClip Frame 29
fDone = true;
gotoAndStop (1);
Symbol 488 MovieClip Frame 34
fDone = true;
gotoAndStop (1);
Symbol 493 MovieClip Frame 1
function SetSize(vSize) {
var vBrightness = 100;
mySize = vSize;
if (vSize == 0) {
myState = "Empty";
gotoAndStop (1);
} else if (myState != "Hit") {
var vFrameNum = Math.round(vSize * 10);
vFrameNum = Math.max(Math.min(8, vFrameNum), 1);
if ((0 < vFrameNum) and (vFrameNum < 9)) {
gotoAndStop("Size" + vFrameNum);
}
myState = "Full";
}
this._xScale = mySize * 70;
this._yScale = mySize * 70;
}
function fnIsDone() {
return(fDone);
}
function Hit() {
if (myState != "Hit") {
myState = "Hit";
gotoAndPlay (20);
}
}
function Animate(vFrame) {
gotoAndPlay(vFrame);
}
var myState = "Empty";
var mySize = 0;
var myType = "Good";
var fDone = false;
stop();
Symbol 493 MovieClip Frame 2
stop();
Symbol 493 MovieClip Frame 4
stop();
Symbol 493 MovieClip Frame 6
stop();
Symbol 493 MovieClip Frame 8
stop();
Symbol 493 MovieClip Frame 10
stop();
Symbol 493 MovieClip Frame 12
stop();
Symbol 493 MovieClip Frame 14
stop();
Symbol 493 MovieClip Frame 16
stop();
Symbol 493 MovieClip Frame 18
stop();
Symbol 493 MovieClip Frame 20
if (0 < this._x) {
gotoAndPlay (25);
} else {
gotoAndPlay (30);
}
Symbol 493 MovieClip Frame 29
fDone = true;
gotoAndStop (1);
Symbol 493 MovieClip Frame 34
fDone = true;
gotoAndStop (1);
Symbol 494 MovieClip Frame 1
function Turn(vDir) {
var vDirection;
gotoAndPlay (11);
pDirection = vDir;
}
function UpdateTurn() {
var vInc = ((-pDirection) * 20);
SlideGround(iSky1, vInc);
SlideGround(iSky2, vInc);
}
function SlideGround(vClip, vInc) {
vClip._x = vClip._x + vInc;
if ((vClip._x < ((-vClip._width) - vInc)) and (vInc < 0)) {
vClip._x = vClip._x + (2 * vClip._width);
} else if (((vClip._width + vInc) < vClip._x) and (0 < vInc)) {
vClip._x = vClip._x - (2 * vClip._width);
}
}
function SlideObjects(vInc) {
i = 0;
while (i < aViewObjects.length) {
var vSize = (100 - (aViewObjects[i].size * 100));
aViewObjects[i].x = aViewObjects[i].x + ((vInc * vSize) / 80);
aViewObjects[i].MC._x = aViewObjects[i].x;
i++;
}
}
function Brake(fStop) {
if (fStop == true) {
Ground1.Sand.stop();
Ground2.Sand.stop();
} else {
Ground1.Sand.play();
Ground2.Sand.play();
}
}
var pDirection;
Symbol 494 MovieClip Frame 2
function initViewer() {
trace("InitViewer");
i = aViewObjects.length - 1;
while (i >= 0) {
aViewObjects[i].removeMovieClip();
i--;
}
aViewObjects.splice(0);
myObjIndex = 1000;
gotoAndPlay (6);
}
function Pause(fPaused) {
}
function UpdateObjects() {
i = aViewObjects.length - 1;
while (i >= 0) {
UpdateObjLoc(aViewObjects[i]);
i--;
}
}
function UpdateObjLoc(vViewObj) {
var vRadarObj = _root.Radar.GetInfo(vViewObj.name);
if (vRadarObj == 0) {
} else {
var vSize = GetSize(vRadarObj.dist, MAXSIZE);
var yDist = ((myRect.yMin + ((1.8 * vSize) * myHeight)) + 30);
var vRelativeLen = (vRadarObj.x / vRadarObj.xMax);
var xDist = ((vRelativeLen * myWidth) * (vSize + 0.5));
vViewObj.size = vSize;
vViewObj.y = yDist;
vViewObj.x = xDist;
SetProperties(vViewObj.MC, vViewObj);
if ((((vRadarObj.dist < 0) or (0.6 < vSize)) and (vRadarObj.radius < 20)) or (vViewObj.fHit == true)) {
ObjInRange(vViewObj, vRadarObj.radius);
} else if (vViewObj.inRange == true) {
vViewObj.inRange = false;
vViewObj.anim = 0;
} else if (vRadarObj.dist < ((-vRadarObj.yMax) * 2)) {
Delete(vViewObj);
}
}
}
function ObjInRange(vViewObj, vRad) {
if (vViewObj.inRange == false) {
vViewObj.inRange = true;
}
if (vViewObj.type == "Good") {
if (vViewObj.fDeleted != true) {
vViewObj.MC.Hit();
if ((vRad < (MAXSIZE / 5)) and (vViewObj.fHit == false)) {
vViewObj.fHit = true;
Hit(vViewObj.type, vViewObj.name);
} else if (vViewObj.MC.fnIsDone() == true) {
if (vViewObj.fHit == false) {
vViewObj.fHit = true;
Hit(vViewObj.type, vViewObj.name);
}
Delete(vViewObj);
}
}
} else if (vViewObj.type == "Crater") {
if ((vRad < (MAXSIZE / 4)) and (vViewObj.fHit == false)) {
Hit(vViewObj.type, vViewObj.name);
vViewObj.MC.Hit();
vViewObj.fHit = true;
}
} else if (vViewObj.type == "Fuel") {
if (vRad < (MAXSIZE / 5)) {
Hit(vViewObj.type, vViewObj.name);
Delete(vViewObj);
}
}
}
function GetSize(vDist, vMax) {
var vSize = 0;
if ((vDist < (vMax + 5)) and (0 < vDist)) {
vSize = Math.max(1 - ((vDist - Math.sqrt(vMax / vDist)) / vMax), 0.01);
}
return(vSize);
}
function AddObject(vName, vType, vLocX) {
vObj = new Object();
vObj.type = vType;
vObj.name = vName;
vObj.x = 0;
vObj.y = 0;
vObj.size = 0;
vClipName = "v" + vName;
if (vType == "Good") {
vType = vType + random(3);
} else if (vType == "Crater") {
var x = (vLocX * myWidth);
duplicateMovieClip (iExplosion, "iExplode", 55);
iExplode._x = x;
iExplode.gotoAndPlay(2);
}
duplicateMovieClip (eval (vType + "Clip"), vClipName, myObjIndex);
vObj.MC = eval (vClipName);
SwapDown(vObj.MC);
vObj.inRange = false;
aViewObjects.push(vObj);
vObj.index = aViewObjects.length - 1;
vObj.fHit = false;
vObj.maxAnim = 3;
myObjIndex = myObjIndex - 1;
if (myObjIndex < 100) {
myObjIndex = 1000;
}
}
function NewPlane(vName, vRelativeX, vDiag) {
duplicateMovieClip (PlaneClip, "iPlane", 80);
var vRelativeLen = (vRelativeX / 95);
var xDist = (vRelativeLen * myWidth);
iPlane._y = 0;
iPlane._x = 0;
if (vDiag == 0) {
if (vRelativeX < -22) {
iPlane.gotoAndPlay("plane1");
} else if (22 < vRelativeX) {
iPlane.gotoAndPlay("plane5");
} else if (vRelativeX < -7) {
iPlane.gotoAndPlay("plane2");
} else if (7 < vRelativeX) {
iPlane.gotoAndPlay("plane4");
} else {
iPlane.gotoAndPlay("plane3");
}
} else if (vDiag == "R") {
iPlane.gotoAndPlay("plane6");
} else if (vDiag == "L") {
iPlane.gotoAndPlay("plane7");
}
}
function AddMineObject(vType, i) {
vObj = new Object();
vObj.type = vType;
vObj.ZOrder = i;
vObj.number = i;
vObj.x = 0;
vObj.y = 0;
vObj.size = 0;
vObj.inRange = false;
aMineObjects.push(vObj);
vObj.maxAnim = 1;
}
function CheckZOrder() {
SortArray(aZOrder);
}
function SetProperties(vMC, vObj) {
if (vObj != 0) {
vMC._x = vObj.x;
vMC._y = vObj.y;
vMC.SetSize(vObj.size);
}
}
function Hit(vType, vIndex) {
_root.Hit(vType, vIndex);
}
function SwapDown(vMC) {
var i = 0;
while (i < aViewObjects.length) {
vMC.swapDepths(aViewObjects[i]);
i++;
}
}
function RemoveObjects() {
trace("Removing Objects");
var i = 0;
while (i < aViewObjects.length) {
Delete(aViewObjects[i]);
i++;
}
}
function Delete(vObj) {
vObj.MC.removeMovieClip();
var i = vObj.index;
aViewObjects.splice(i, 1);
var j = i;
while (j < aViewObjects.length) {
vMC.swapDepths(aViewObjects[j].MC);
aViewObjects[j].index = j;
j++;
}
_root.Radar.DeleteObj(vObj.name);
aViewMC.push(vMC);
vObj.fDeleted = true;
vObj = 0;
}
function EndPlane(vMC) {
removeMovieClip(vMC);
}
function Animate(vObj) {
if (vObj.type == "Bad") {
vObj.mc.Animate("Hit" + vObj.anim);
} else if ((vObj.type == "Good") and (vObj.anim == 4)) {
vObj.mc.Animate("Walk" + vObj.side);
}
}
var myObjIndex = 1000;
var aViewMC = new Array();
var aSwapViewMC = newArray();
var aViewObjects = new Array();
var aViewMines = new Array();
var aZOrder = new Array();
var myRect = Mask.getBounds(this);
var myWidth = (myRect.xMax - myRect.xMin);
var myHeight = (myRect.yMax - myRect.yMin);
var MAXSIZE = 42;
Symbol 494 MovieClip Frame 3
function Sort(a, lo0, hi0) {
var lo = lo0;
var hi = hi0;
if (lo >= hi) {
return(undefined);
}
if (lo == (hi - 1)) {
if (a[hi].size < a[lo].size) {
var T = a[lo];
a[lo] = a[hi];
a[hi] = T;
}
return(undefined);
}
var vInt = Math.round((lo + hi) / 2);
var pivot = a[vInt];
a[vInt] = a[hi];
a[hi] = pivot;
while (lo < hi) {
while ((pivot.size >= a[lo].size) && (lo < hi)) {
lo++;
}
while ((a[hi].size >= pivot.size) && (lo < hi)) {
hi--;
}
if (lo < hi) {
var T = a[lo];
a[lo] = a[hi];
a[hi] = T;
}
}
a[hi0] = a[hi];
a[hi] = pivot;
Sort(a, lo0, lo - 1);
Sort(a, hi + 1, hi0);
}
function SortArray(vArray) {
Sort(vArray, 0, vArray.length - 1);
SwapZDepths(vArray);
}
function SwapZDepths(vArray) {
var i = 0;
while (i < vArray.length) {
if (vArray[i].ZOrder != i) {
vArray[i].ZOrder = i;
vArray[i].MC = aViewMC[i];
}
SetProperties(vArray[i].MC, vArray[i]);
i++;
}
}
Symbol 494 MovieClip Frame 4
stop();
Symbol 494 MovieClip Frame 6
UpdateObjects();
Symbol 494 MovieClip Frame 7
UpdateObjects();
gotoAndPlay (6);
Symbol 494 MovieClip Frame 8
gotoAndPlay (6);
Symbol 494 MovieClip Frame 11
UpdateTurn();
UpdateObjects();
Symbol 494 MovieClip Frame 12
UpdateTurn();
UpdateObjects();
gotoAndPlay (11);
Symbol 494 MovieClip Frame 13
UpdateTurn();
Symbol 494 MovieClip Frame 16
stop();
Symbol 498 Button
on (release, releaseOutside) {
_root.ReleaseArrow(1);
}
on (press) {
_root.PressArrow(1);
}
Symbol 499 Button
on (release, releaseOutside) {
_root.ReleaseArrow(-1);
}
on (press) {
_root.PressArrow(-1);
}
Symbol 501 MovieClip Frame 1
function fnCheckKey() {
if (Key.isDown(Key.LEFT)) {
if (_root.gDirection == _root.RIGHT) {
_root.ReleaseArrow();
} else if (_root.gDirection == 0) {
_root.PressArrow(_root.LEFT);
}
gKeyPressed = true;
} else if (Key.isDown(Key.RIGHT)) {
if (_root.gDirection == _root.LEFT) {
_root.ReleaseArrow();
} else if (_root.gDirection == 0) {
_root.PressArrow(_root.RIGHT);
}
gKeyPressed = true;
} else {
if (gKeyPressed == true) {
gKeyPressed = false;
_root.ReleaseArrow();
}
if (Key.isDown(Key.UP)) {
if (_root.gfReverse == true) {
gfShifting = true;
_root.OverShifter(true);
_root.Shift();
}
} else if (Key.isDown(Key.DOWN)) {
if (_root.gfReverse == false) {
gfShifting = true;
_root.OverShifter(true);
_root.Shift();
}
} else if (gfShifting == true) {
gfShifting = false;
_root.OverShifter(false);
}
}
}
var gKeyPressed;
var gfShifting;
Symbol 501 MovieClip Frame 2
fnCheckKey();
Symbol 501 MovieClip Frame 3
fnCheckKey();
gotoAndPlay (2);
Symbol 502 MovieClip Frame 1
function Pause(vFlag) {
if (vFlag == true) {
gotoAndStop (1);
} else {
gotoAndStop (2);
}
trace("Arrow buttons paused " + vFlag);
}
stop();
Symbol 502 MovieClip Frame 2
stop();
Symbol 514 MovieClip Frame 1
stop();
Symbol 514 MovieClip Frame 2
play();