Frame 3
enemyFish._visible = false;
fishies = new Array();
fishMade = (d = (score = 0));
minimumFishOnScreen = 7;
maximumFishOnScreen = 15;
frame = _currentframe;
stop();
_root.onEnterFrame = function () {
if (_currentframe == frame) {
if (_root.fish._width < Stage.width) {
fishFound = 0;
i = 0;
while (i < fishies.length) {
if (fishies[i] == 1) {
fishFound++;
}
i++;
}
if (fishFound < minimumFishOnScreen) {
chanceOfNewFishComing = 0;
} else if (fishFound < maximumFishOnScreen) {
chanceOfNewFishComing = random(60);
}
if (chanceOfNewFishComing == 0) {
enemyFish.duplicateMovieClip("newEnemyFish" + d, d++, {left:random(2), speed:random(6) + 2, scale:random(_root.fish.scale + 40) + 10, _y:random(Stage.height), newFish:true});
fishies[fishMade] = 1;
fishMade++;
}
i = 0;
while (i < fishies.length) {
if (fishies[i] == 1) {
_root["newEnemyFish" + i]._x = _root["newEnemyFish" + i]._x + _root["newEnemyFish" + i].speed;
if (_root["newEnemyFish" + i].hitTest(_root.fish)) {
if (_root["newEnemyFish" + i].scale <= _root.fish.scale) {
fish.scale = fish.scale + 5;
score = score + _root["newEnemyFish" + i].scale;
removeMovieClip(_root["newEnemyFish" + i]);
fishies[i] = 0;
} else {
nextFrame();
clearScreen();
}
}
if (_root["newEnemyFish" + i].left == 1) {
if (_root["newEnemyFish" + i]._x < (-_root["newEnemyFish" + i]._width)) {
fishies[i] = 0;
removeMovieClip(_root["newEnemyFish" + i]);
}
} else if (_root["newEnemyFish" + i]._x > (Stage.width + _root["newEnemyFish" + i]._width)) {
fishies[i] = 0;
removeMovieClip(_root["newEnemyFish" + i]);
}
}
i++;
}
} else {
_root.gotoAndStop(_currentframe + 2);
}
}
};
clearScreen = function () {
i = 0;
while (i < fishies.length) {
removeMovieClip(_root["newEnemyFish" + i]);
i++;
}
fishies = new Array();
fishMade = 0;
};
Instance of Symbol 31 MovieClip "enemyFish" in Frame 3
onClipEvent (load) {
if (_name != "enemyFish") {
_yscale = ((xscale = scale));
if (left == 1) {
speed = speed * -1;
_xscale = xscale;
_x = (Stage.width + _width);
} else {
_xscale = (-xscale);
_x = (-_width);
}
}
}
Instance of Symbol 34 MovieClip "fish" in Frame 3
onClipEvent (load) {
xspeed = (yspeed = 0);
goingDown = (goingForward = false);
acceleration = 1;
maxSpeed = 10;
scale = 100;
facingRight = false;
}
onClipEvent (enterFrame) {
_x = (_x - xspeed);
_y = (_y - yspeed);
_yscale = scale;
xscale = scale;
if (!goingForward) {
_xscale = (-xscale);
} else {
_xscale = xscale;
}
if (Key.isDown(37)) {
goingForward = true;
if (xspeed < maxSpeed) {
xspeed = xspeed + acceleration;
}
} else if (Key.isDown(39)) {
goingForward = false;
if (xspeed > (-maxSpeed)) {
xspeed = xspeed - acceleration;
}
} else if (goingForward) {
if (xspeed > 0) {
xspeed = xspeed - acceleration;
} else if (xspeed < 0) {
xspeed = xspeed + acceleration;
}
} else if (xspeed < 0) {
xspeed = xspeed + acceleration;
} else if (xspeed > 0) {
xspeed = xspeed - acceleration;
}
if (Key.isDown(38)) {
goingDown = true;
if (yspeed < maxSpeed) {
yspeed = yspeed + acceleration;
}
} else if (Key.isDown(40)) {
goingDown = false;
if (yspeed > (-maxSpeed)) {
yspeed = yspeed - acceleration;
}
} else if (goingDown) {
if (yspeed > 0) {
yspeed = yspeed - acceleration;
} else if (yspeed < 0) {
yspeed = yspeed + acceleration;
}
} else if (yspeed < 0) {
yspeed = yspeed + acceleration;
} else if (yspeed > 0) {
yspeed = yspeed - acceleration;
}
if (_x > (Stage.width + (_width / 2))) {
_x = (-(_width / 2));
} else if (_x < (-(_width / 2))) {
_x = (Stage.width + (_width / 2));
}
if (_y > Stage.height) {
_y = Stage.height;
yspeed = 0;
} else if (_y < 0) {
_y = 0;
yspeed = 0;
}
}
Symbol 13 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
bar._xscale = PercentLoaded;
} else {
gotoAndPlay ("loaded");
}
Symbol 13 MovieClip Frame 2
gotoAndPlay (1);
Symbol 13 MovieClip Frame 15
_root.gotoAndStop("Menu");
Symbol 14 MovieClip Frame 11
stop();
Symbol 18 MovieClip Frame 12
stop();
Symbol 22 Button
on (release) {
nextFrame();
}
Symbol 26 MovieClip Frame 18
gotoAndPlay (13);
Symbol 39 MovieClip Frame 11
stop();
Symbol 44 MovieClip Frame 6
stop();
Symbol 48 MovieClip Frame 6
stop();
Symbol 53 MovieClip Frame 5
stop();
Symbol 58 Button
on (release) {
gotoAndStop(frame);
}
Symbol 60 MovieClip Frame 1
score = _root.score;
Symbol 61 MovieClip Frame 6
stop();
Symbol 72 MovieClip Frame 1
if (_root.score < 550) {
this.gotoAndStop(1);
} else if (_root.score < 1500) {
this.gotoAndStop(2);
} else if (_root.score < 3000) {
this.gotoAndStop(3);
} else if (_root.score < 7000) {
this.gotoAndStop(4);
} else if (_root.score < 10000) {
this.gotoAndStop(5);
}
Symbol 73 MovieClip Frame 5
stop();
Symbol 78 MovieClip Frame 6
stop();