Frame 43
stop();
trace("got here");
loadervars = new LoadVars();
loadervars.load("../../loadsize.txt");
loadervars.onLoad = function () {
play();
trace("couldn't have gotten here");
};
Frame 44
stop();
var loadmcwidth = loadervars.loadmcwidth;
var loadmcheight = loadervars.loadmcheight;
if (_root.getBytesLoaded() >= _root.getBytesTotal()) {
play();
} else {
_root.createEmptyMovieClip("loadmc", 1);
_root.loadmc.loadMovie("../../preloader.swf");
_root.loadmc._x = (Stage.width / 2) - (loadmcwidth / 2);
_root.loadmc._y = Stage.height / 2;
}
Frame 207
hitSound = new Sound();
eatSound = new Sound();
bangSound = new Sound();
hitSound.attachSound("clink");
eatSound.attachSound("eat");
bangSound.attachSound("bang");
this.stop();
invincible = false;
rideit = false;
mikey = false;
april = false;
doublepoints = false;
showEm = true;
displaycheats = [];
showCheats = function () {
var _local1 = _root;
if (_local1.invincible) {
trace("could be working");
displaycheats.push("Invinciblity ");
}
if (_local1.mikey) {
trace("could be working");
displaycheats.push("Mikey ");
}
if (_local1.april) {
displaycheats.push("April ");
}
if (_local1.doublepoints) {
displaycheats.push("Double Points ");
}
if (_local1.rideit) {
displaycheats.push("Ride It ");
}
if (displaycheats.length > 0) {
trace("yes");
activatedCheats = "Activated Cheats: " + displaycheats;
} else {
activatedCheats = displaycheats;
trace("no");
}
trace(displaycheats.length + "array length");
showEm = false;
};
Instance of Symbol 59 MovieClip "backScroll" in Frame 207
onClipEvent (load) {
this.startX = -247;
this.endX = 793;
this._x = startX;
}
onClipEvent (enterFrame) {
if (_root.gameOn) {
this._x = this._x + 8;
if (this._x > endX) {
this._x = startX;
}
}
}
Instance of Symbol 65 MovieClip "scripts" in Frame 207
onClipEvent (load) {
function randomIn(lowerbound, upperbound) {
return(Math.round(((upperbound - lowerbound) * Math.random()) + lowerbound));
}
function newGame() {
var _local1 = _root;
_local1.gameOver = false;
_local1.gameStatus = "intro";
_local1.myScore = 0;
_local1.level = 1;
_local1.fishCounter = 0;
_local1.gAction = "blank";
_local1.waveHeight = 150;
_local1.waveBottom = 560;
_local1.scoreCounter = 0;
_local1.gameRight = 650;
_local1.spriteCounter = 0;
_local1.waveCounter = 0;
_local1.gameOn = false;
}
function showPoints(myPoints, x, y) {
_root.myScore = _root.myScore + myPoints;
_root.scoreCounter++;
myClip = "_root.scoreFade" + _root.scoreCounter;
_root.scoreFade.duplicateMovieClip("scoreFade" + _root.scoreCounter, 5000 + _root.scoreCounter);
eval (myClip).myPoints = mypoints;
eval (myClip)._x = x;
eval (myClip)._y = y;
}
function cleanAllFish() {
var _local1 = _root;
while (_local1.fishArray.length > 0) {
myClip = _local1.fishArray[0];
removeMovieClip(myClip);
_local1.fishArray.splice(0, 1);
}
}
function cleanFish(myClip) {
var _local1 = _root;
var _local2 = myClip;
n = 0;
while (n < _local1.fishArray.length) {
if (_local1.fishArray[n] == _local2) {
removeMovieClip(_local2);
_local1.fishArray.splice(n, 1);
}
n++;
}
if (_local1.fishArray.length == 0) {
trace("it's over////////////////////////////////////");
_local1.surfer.ride = false;
this.myDepth = 1000 + (_local1.surfer._y * 10);
_local1.surfer.swapDepths(this.myDepth);
_local1.surfer.reset();
_local1.intro.myTitle = ("Level " + _local1.level) + " completed.";
_local1.intro.myText = "Dude, you made it so far.<BR>";
_local1.intro.myText = ((_local1.intro.myText + "You still have ") + (4 - _local1.level)) + " waves to go to get the hideout. This time you need to get past more bad guys...";
_local1.level = _local1.level + 1;
if (_local1.level <= 4) {
_local1.sounder.gotoAndPlay("levelDone");
_local1.intro.showMe();
_local1.gameStatus == "ready";
} else {
_local1.intro.myTitle = "You made it!.";
_local1.intro.myText = "Congratulations!<BR>";
_local1.intro.myText = _local1.intro.myText + "You surfed all the way to the hideout and kicked the shell out of the bad guys!<BR><BR>";
_local1.intro.myText = _local1.intro.myText + "Splinter can now, finally, return home safely -- all thanks to you!!!!";
_local1.intro.gotoAndPlay("ender");
_local1.intro.showMe();
_local1.gameStatus == "done";
}
}
}
function addFish(fNum) {
_root.spriteCounter++;
f = 0;
while (f < fnum) {
fishType = random(100);
if (fishType > 85) {
clipname = "bonus";
} else {
clipname = "pier";
_root.enemyCount = _root.enemyCount + 1;
}
myClipNum = _root.spriteCounter;
myClip = ("_root." + clipname) + myClipNum;
baseClip = "_root." + clipname;
baseclip = eval (baseclip);
baseClip.duplicateMovieClip(clipname + myClipNum, 1000 + myClipNum);
myClip.zDepth = myClip._y;
f++;
}
}
function initClip(myClip) {
myClip = eval (myClip);
myClip.setup();
}
function checkDepths(newDepth) {
dupDepth = false;
i = 0;
while (i < _root.fishArray.length) {
if (eval (_root.fisharray[i]).zDepth == newDepth) {
dupDepth = true;
}
i++;
}
if (dupDepth) {
return(true);
}
return(false);
}
function resetGame(level) {
var _local1 = _root;
var _local2 = level;
trace("restting level to " + _local2);
bakDark = 100 - (15 * (_local2 - 0));
trace(bakDark);
_local1.levelBakdrop._alpha = bakDark;
_local1.gameOn = false;
_local1.scripts.cleanAllFish();
_local1.surfer.reset();
_local1.startTime = getTimer();
_local1.timerOn = true;
_local1.waveCounter = _local1.waveCounter + 1;
_local1.waveSpeed = 5;
_local1.curl.reset();
_local1.agility = 7;
_local1.fishArray = new Array();
_local1.fishStart = 4 + (_local2 * 1.25);
_local1.enemyTotal = 20 + (_local2 * 10);
_local1.fishNumber = _local1.fishStart;
_local1.lastSpriteTime = 0;
_local1.enemyCount = 0;
_local1.gAction = "blank";
_local1.status = "Surf On!";
}
_root.fish.clipActive = false;
_root.pier.clipActive = false;
_root.bonus.clipActive = false;
_root.gameOn = false;
newGame();
}
onClipEvent (enterFrame) {
if (_root.gameOn) {
if (_root.enemyCount < _root.enemyTotal) {
_root.myTime = getTimer() - _root.startTime;
if (getTimer() > (_root.lastSpriteTime + 700)) {
if (_root.fishArray.length < _root.fishNumber) {
_root.lastSpriteTime = getTimer();
addFish(1);
}
}
}
}
}
Instance of Symbol 101 MovieClip "surfer" in Frame 207
onClipEvent (load) {
function reset() {
var _local1 = this;
var _local2 = _root;
_local1.gotoAndPlay("surfing");
if (_local2.mikey) {
_local1.dude.gotoAndPlay("mikeidle");
}
if (_local2.april) {
_local1.dude.gotoAndPlay("aprilidle");
}
_local1._x = 250;
_local1._y = 250;
_local2.myBalance = 100;
_local1.deltaX = 0;
_local1.deltaY = 0;
_local1.agility = 0.5;
_local1.topSpeed = 12;
_local1.attacking = false;
}
function moveMe() {
var _local1 = this;
var _local2 = _root;
if (Key.isDown(39)) {
_local1.deltaX = _local1.deltaX + _local1.agility;
}
if (Key.isDown(37)) {
_local1.deltaX = _local1.deltaX - _local1.agility;
}
if (Key.isDown(38)) {
_local1.deltaY = _local1.deltaY - _local1.agility;
}
if (Key.isDown(40)) {
_local1.deltaY = _local1.deltaY + _local1.agility;
}
if (_local1.deltaY > _local1.topSpeed) {
_local1.deltaY = _local1.topSpeed;
}
if (_local1.deltaY < (-_local1.topSpeed)) {
_local1.deltaY = -_local1.topSpeed;
}
if (_local1.deltaX > _local1.topSpeed) {
_local1.deltaX = _local1.topSpeed;
}
if (_local1.deltaX < (-_local1.topSpeed)) {
_local1.deltaX = -_local1.topSpeed;
}
if (!_local1.ride) {
if ((_local1._y + _local1.deltaY) < 150) {
_local1.deltaY = 150 - _local1._y;
}
} else if (_local1.ride) {
if ((_local1._y + _local1.deltaY) < 50) {
_local1.deltaY = 50 - _local1._y;
}
}
if ((_local1._y + _local1.deltaY) > 390) {
_local1.deltaY = 390 - _local1._y;
}
if ((_local1._X + _local1.deltaX) > 560) {
_local1.deltaX = 560 - _local1._x;
}
if (_local2.rideit) {
if (_local2.curl.foam.hitTest(_local1._x, _local1._y, true)) {
_local1.ride = true;
} else if (!_local2.curl.foam.hitTest(_local1._x, _local1._y, true)) {
_local1.ride = false;
}
}
if ((_local1._X + _local1.deltaX) < -10) {
_local1.deltaX = -10 - _local1._X;
}
trace(_local1.ride);
_local1._x = _local1._x + _local1.deltaX;
_local1._y = _local1._y + _local1.deltaY;
if (_local1.ride) {
_local1.myDepth = 8000 + (_local1._y * 10);
} else {
_local1.myDepth = 1000 + (_local1._y * 10);
}
while (checkDepths(_local1.myDepth)) {
_local1.myDepth++;
}
_local1.swapDepths(_local1.myDepth);
}
this.ride = false;
if (_root.mikey) {
this.dude.gotoAndPlay("mikeidle");
}
if (_root.april) {
this.dude.gotoAndPlay("aprilidle");
}
reset();
}
onClipEvent (enterFrame) {
if (_root.gameOn) {
moveMe();
if (_root.myBalance < 1) {
_root.lifeMeter.bar._width = fullWidth * (_root.myBalance / 100);
_root.gameOn = false;
_root.gameStatus = "crash";
_root.status = "Yow!";
_root.surfer.gotoAndPlay("overFalls");
this.ride = false;
}
}
}
onClipEvent (keyDown) {
if (this.attacking == false) {
if (Key.getCode() == 32) {
if (_root.mikey) {
this.attacking = true;
this.dude.gotoAndPlay("mikeidle");
} else if (_root.april) {
this.attacking = true;
this.dude.gotoAndPlay("aprilidle");
} else {
this.attacking = true;
this.dude.gotoAndPlay("attack");
}
} else {
this.attacking = false;
}
}
}
onClipEvent (keyUp) {
this.attacking = false;
}
Instance of Symbol 113 MovieClip "bonus" in Frame 207
onClipEvent (load) {
function setup() {
var _local1 = this;
var _local2 = _root;
_local1.fishSpeed = _local2.waveSpeed;
_local1._y = (random(12) * 20) + 160;
myDepth = 1000 + (_local1._y * 10);
while (_local2.scripts.checkDepths(myDepth)) {
myDepth++;
}
_local1.zDepth = myDepth;
_local1.swapDepths(_local1.zDepth);
_local2.fishArray.push(_local1);
_local1._x = -100;
_local1.clipActive = true;
}
function reset() {
var _local1 = this;
if (_local1 == _root.bonus) {
} else {
_local1.clipActive = false;
_local1._x = -200;
_root.scripts.cleanFish(_local1);
}
}
myFrame = random(6) + 1;
this.gotoAndPlay(myFrame);
if (this == _root.bonus) {
this.clipActive = false;
} else {
this.setup();
}
}
onClipEvent (enterFrame) {
if (this.clipActive == true) {
if (_root.gameOn) {
newX = this._x + this.fishSpeed;
this._x = newX;
this.swapDepths(this.zDepth);
if (this.hitTest(_root.surfer.board)) {
_root.scripts.showpoints(this.myPoints, this._x, this._y);
_root["scoreFade" + _root.scoreCounter].points.hitPoints = this.myPoints;
_root.eatSound.start();
newBalance = _root.myBalance + myHealth;
if (newBalance > 100) {
newBalance = 100;
}
_root.myBalance = newBalance;
this.reset();
}
} else {
this.clipActive = false;
}
if (this._x > _root.gameRight) {
this.reset();
}
}
}
Instance of Symbol 116 MovieClip "scoreFade" in Frame 207
onClipEvent (load) {
this.startX = this._x;
this.startY = this._y;
trace(this.startY);
}
onClipEvent (enterFrame) {
newY = this._y - 1;
myDiff = 75 - (this.startY - newY);
if (myDiff < 5) {
removeMovieClip(this);
} else {
this._y = newY;
}
}
Instance of Symbol 119 MovieClip "fish" in Frame 207
onClipEvent (load) {
function setup() {
var _local1 = this;
var _local2 = _root;
trace("init clip " + _local1);
_local1.fishSpeed = (_local2.wavespeed + random(10)) + 1;
_local1.fishVert = -(random(5) + 2);
_local1._y = (random(12) * 20) + 160;
myDepth = 1000 + (_local1._y * 10);
while (_local2.scripts.checkDepths(myDepth)) {
myDepth++;
}
_local1.zDepth = myDepth;
_local1.swapDepths(_local1.zDepth);
_local2.fishArray.push(_local1);
_local1._x = -100;
_local1.clipActive = true;
}
function reset() {
var _local1 = this;
if (_local1 == _root.fish) {
} else {
_local1.clipActive = false;
_local1._x = -200;
_root.scripts.cleanFish(_local1);
}
}
if (this == _root.fish) {
this.clipActive = false;
trace("found myself, deactiviating " + this);
} else {
this.setup();
}
}
onClipEvent (enterFrame) {
if (this.clipActive == true) {
if (_root.gameOn) {
newY = this._y + this.fishVert;
if (newY < _root.waveHeight) {
this.fishVert = -this.fishVert;
newY = this._y + this.fishVert;
}
if (newY > _root.waveBottom) {
this.fishVert = -this.fishVert;
newY = this._y + this.fishVert;
}
this._x = this._x + this.fishSpeed;
this._y = newY;
myDepth = 1000 + (this._y * 10);
while (_root.scripts.checkDepths(myDepth)) {
myDepth++;
}
this.zDepth = myDepth;
this.swapDepths(myClip.zDepth);
if (this.hitMask.hitTest(_root.surfer.board)) {
_root.status = "Shark Sandwich...";
_root.gameOn = false;
_root.gameStatus = "crash";
_root.timerOn = false;
_root.surfer._x = this._x;
_root.surfer._y = this._y;
_root.surfer.myDepth = 5000;
_root.surfer.swapDepths(_root.surfer.myDepth);
_root.surfer.gotoAndPlay("crash");
}
} else {
this.clipActive = false;
}
if (this._x > _root.gameRight) {
this.reset();
}
}
}
Instance of Symbol 134 MovieClip "pier" in Frame 207
onClipEvent (load) {
function setUp() {
var _local1 = this;
var _local2 = _root;
myBad = _parent.scripts.randomIn(1, 4);
_local1.badguy.gotoAndStop(myBad);
_local1.fishSpeed = _local2.waveSpeed;
_local1.BalanceValue = 35;
if (_local2.doublepoints) {
_local1.myPoints = 500;
} else {
_local1.myPoints = 250;
}
_local1._y = (random(12) * 20) + 160;
myDepth = 1000 + (_local1._y * 10);
while (_local2.scripts.checkDepths(myDepth)) {
myDepth++;
}
_local1.zDepth = myDepth;
_local1.swapDepths(_local1.zDepth);
_local2.fishArray.push(_local1);
_local1._x = -100;
_local1.clipActive = true;
}
function reset() {
var _local1 = this;
if (_local1 == _root.pier) {
} else {
_local1.clipActive = false;
_local1._x = -200;
_root.scripts.cleanFish(_local1);
}
}
if (!_root.surfer.ride) {
trace(".........................................");
}
if (this == _root.pier) {
this.clipActive = false;
} else {
this.setup();
}
}
onClipEvent (enterFrame) {
if (this.clipActive == true) {
if (_root.gameOn) {
this._x = this._x + this.fishSpeed;
this.swapDepths(this.zDepth);
if (this.hitMask.hitTest(_root.surfer.board)) {
if ((!_root.invincible) && (!_root.surfer.ride)) {
_root.bangSound.start();
updateAfterEvent();
_root.myBalance = _root.myBalance - BalanceValue;
this.reset();
} else if (_root.invincible) {
updateAfterEvent();
this.reset();
}
}
if (this.attackMask.hitTest(_root.surfer.attack)) {
if (_root.surfer.attacking == true) {
_root.hitSound.start();
_root.scripts.showpoints(this.myPoints, this._x, this._y);
_root["scoreFade" + _root.scoreCounter].points.hitPoints = this.myPoints;
this.reset();
}
}
} else {
this.clipActive = false;
}
if (this._x > _root.gameRight) {
this.reset();
}
}
}
Instance of Symbol 140 MovieClip "curl" in Frame 207
onClipEvent (load) {
function reset() {
var _local1 = this;
_local1.zDepth = 6000;
_local1.swapDepths(zDepth);
_local1.incSpeed = 0;
_local1._x = 325;
_local1.waveOver = false;
trace("reset the wave ");
}
trace("this is the wave " + this);
}
onClipEvent (enterFrame) {
if (_root.gameOn) {
if (this.waveOver == false) {
}
}
}
Instance of Symbol 156 MovieClip "intro" in Frame 207
onClipEvent (load) {
function reset() {
this.gotoandPlay("intro");
myTitle = "SPLINTER HAS BEEN CAPTURED!!!";
myText = "He's being held in a secret hide-out, deep within the sewer system. You'll have to ride the sewer waves to get him back -- but watch out for the Foot Soldiers and Underground Monsters!! Knock them into the water to clear your path!<BR><BR>";
myText = myText + "The arrow keys will move you, press the space bar to attack.";
}
function showMe() {
var _local1 = _root;
var _local2 = this;
_local1.scripts.gameReset(_local1.level);
_local1.status = "press space to start";
_local1.gameStatus = "intro";
_local1.gameOn = false;
_local2.zDepth = 7001;
_local2.swapDepths(zDepth);
_local2._x = 275;
}
function hideMe() {
this._x = -1024;
}
reset();
trace("showing the box fom the onLoad handler");
showMe();
}
Instance of Symbol 161 MovieClip "lifeMeter" in Frame 207
onClipEvent (load) {
fullWidth = this.bar._width;
}
onClipEvent (enterFrame) {
myPercent = fullWidth * (_root.myBalance / 100);
if (myPercent < 0) {
myPercent = 0;
}
this.bar._width = fullWidth * (_root.myBalance / 100);
}
Frame 211
this.stop();
Symbol 12 MovieClip Frame 27
stop();
Symbol 20 Button
on (release) {
gotoAndPlay ("game");
}
Symbol 57 MovieClip Frame 1
this.stop();
Symbol 73 MovieClip Frame 10
this.stop();
Symbol 73 MovieClip Frame 20
gotoAndPlay ("none");
Symbol 73 MovieClip Frame 30
gotoAndPlay ("none");
Symbol 73 MovieClip Frame 77
gotoAndPlay ("none");
Symbol 94 MovieClip Frame 1
this.attacking = false;
_root.surfer.attacking = false;
this.stop();
Symbol 94 MovieClip Frame 4
this.attacking = false;
_root.surfer.attacking = false;
this.gotoAndPlay("idle");
Symbol 94 MovieClip Frame 5
this.attacking = false;
_root.surfer.attacking = false;
this.stop();
Symbol 94 MovieClip Frame 8
this.attacking = false;
_root.surfer.attacking = false;
this.gotoAndPlay("mikeidle");
Symbol 94 MovieClip Frame 9
this.attacking = false;
_root.surfer.attacking = false;
this.stop();
Symbol 94 MovieClip Frame 12
this.attacking = false;
_root.surfer.attacking = false;
this.gotoAndPlay("aprilidle");
Symbol 101 MovieClip Frame 2
this.stop();
Symbol 101 MovieClip Frame 3
this._y = 75;
this.swapDepths(2500);
Symbol 101 MovieClip Frame 7
_root.intro.gotoAndPlay("ender");
Symbol 101 MovieClip Frame 44
this.stop();
_root.gameOver = true;
_root.intro.myTitle = "Game Over.";
_root.intro.myText = "Bummer!<BR>";
_root.intro.myText = _root.intro.myText + "Major wipeout, dude.<BR>";
_root.intro.myText = _root.intro.myText + "Game over, man.";
_root.intro.showMe();
Symbol 105 Button
on (release) {
gotoAndPlay (207);
}
Symbol 113 MovieClip Frame 1
if (_root.doublepoints) {
this.myPoints = 1000;
this.myHealth = 60;
} else {
this.myPoints = 500;
this.myHealth = 30;
}
this.stop();
Symbol 113 MovieClip Frame 2
if (_root.doublepoints) {
this.myPoints = 200;
this.myHealth = 10;
} else {
this.myPoints = 100;
this.myHealth = 5;
}
this.stop();
Symbol 113 MovieClip Frame 3
if (_root.doublepoints) {
this.myPoints = 400;
this.myHealth = 20;
} else {
this.myPoints = 200;
this.myHealth = 10;
}
this.stop();
Symbol 113 MovieClip Frame 4
if (_root.doublepoints) {
this.myPoints = 600;
this.myHealth = 30;
} else {
this.myPoints = 300;
this.myHealth = 15;
}
this.stop();
Symbol 113 MovieClip Frame 5
if (_root.doublepoints) {
this.myPoints = 800;
this.myHealth = 40;
} else {
this.myPoints = 400;
this.myHealth = 20;
}
this.stop();
Symbol 113 MovieClip Frame 6
if (_root.doublepoints) {
this.myPoints = -500;
this.myHealth = -10;
} else {
this.myPoints = -250;
this.myHealth = -5;
}
this.stop();
Symbol 131 MovieClip Frame 1
this.stop();
Symbol 131 MovieClip Frame 2
this.stop();
Symbol 131 MovieClip Frame 3
this.stop();
Symbol 131 MovieClip Frame 4
this.stop();
Symbol 131 MovieClip Frame 5
this.stop();
Symbol 133 MovieClip Frame 1
this.stop();
Symbol 134 MovieClip Frame 9
this.stop();
Symbol 147 Button
on (release) {
_root.intro.entercheats._visible = false;
if (_root.showEm) {
trace("showEm");
_root.showCheats();
}
if (_root.gameOver == false) {
trace("restarting at same level");
this.hideMe();
_root.scripts.resetGame(_root.level);
_root.gameStatus = "ready";
_root.sounder.gotoAndPlay("starter");
_root.gameOn = true;
} else {
trace("restarting at new game");
_root.scripts.newGame();
_root.scripts.resetGame(_root.level);
_root.gameStatus = "ready";
this.hideMe();
_root.gameOn = true;
}
}
Symbol 151 Button
on (release, keyPress "<Enter>") {
trace(inputCheat.text);
if (inputCheat.text == "mikey") {
_root.april = false;
_root.mikey = true;
}
if (inputCheat.text == "april") {
_root.mikey = false;
_root.april = true;
}
if (inputCheat.text == "invincible") {
_root.invincible = true;
}
if (inputCheat.text == "doublepoints") {
_root.doublepoints = true;
}
if (inputCheat.text == "rideit") {
_root.rideit = true;
}
inputCheat.text = "";
}
Symbol 152 Button
on (release) {
if (_root.showEm) {
trace("showEm");
_root.showCheats();
}
_root.scripts.newGame();
_root.scripts.resetGame(_root.level);
_root.gameStatus = "ready";
this.hideMe();
this.message_error = "";
this.reset();
_root.gameOn = true;
}
Symbol 156 MovieClip Frame 9
this.stop();
Symbol 156 MovieClip Frame 15
this.stop();
Symbol 156 MovieClip Frame 24
this.stop();