Frame 1
fscommand ("allowScale", "false");
Stage.showMenu = false;
onLoad = function () {
this.progressbar.bar_mc._width = 1;
var _local2 = false;
};
onEnterFrame = function () {
myLoaded = Math.round(_root.getBytesLoaded());
myTotal = Math.round(_root.getBytesTotal());
myPercent = (myLoaded / myTotal) * 100;
this.progressbar.bar_mc._width = myPercent * 2;
percenttext.percentText.text = Math.round(myPercent) + "%";
if ((myLoaded == myTotal) && (_root.animationCompleted == true)) {
gotoAndPlay (4);
_root.animationCompleted = false;
}
};
animation.onPress = function () {
getURL ("http://www.flasharcade.com/", "_blank");
};
stop();
Frame 2
stop();
Frame 3
stop();
Frame 5
stop();
fscommand ("allowScale", "false");
Stage.showMenu = false;
_global.gameBGSound.stop();
_global.gameBGSound = null;
delete _root.gameBGSound;
delete _global.soundFile;
_global.soundFile = _root.createEmptyMovieClip("soundFile", 1000);
_global.gameBGSound = new Sound(_global.soundFile);
_global.gameBGSound.attachSound("introSound");
_global.gameBGSound.start(0, 50000);
_global.gameBGSound.setVolume(80);
Frame 9
stop();
Frame 11
stop();
Mouse.hide();
Frame 14
stop();
Mouse.show();
Frame 17
stop();
Symbol 40 MovieClip Frame 95
stop();
Symbol 56 MovieClip Frame 201
stop();
_root.animationCompleted = true;
Instance of Symbol 61 MovieClip "bar_mc" in Symbol 62 MovieClip Frame 1
onClipEvent (enterFrame) {
_xscale = (_root.percentDone * 4);
}
Symbol 80 MovieClip Frame 15
stop();
Symbol 84 MovieClip Frame 16
_root.score = _root.score + 300;
_parent._parent.removeMovieClip();
Symbol 85 MovieClip Frame 1
stop();
Symbol 85 MovieClip Frame 2
stop();
_root.powerupText.gotoAndPlay("t1");
Symbol 199 MovieClip Frame 2
_root.dieStatus = true;
Symbol 199 MovieClip Frame 7
_parent.targetEnemy.gotoAndPlay("hit2");
Symbol 199 MovieClip Frame 50
_parent.gotoAndPlay(1);
Symbol 200 MovieClip [enemy5] Frame 1
this.animation = false;
Symbol 200 MovieClip [enemy5] Frame 50
gotoAndPlay (1);
Symbol 200 MovieClip [enemy5] Frame 51
this.animation = true;
Symbol 200 MovieClip [enemy5] Frame 52
stop();
Symbol 250 MovieClip Frame 16
_root.stage_mc.map.setFreeze();
_parent._parent.removeMovieClip();
Symbol 251 MovieClip Frame 1
stop();
Symbol 251 MovieClip Frame 2
stop();
_root.powerupText.gotoAndPlay("t3");
Symbol 257 MovieClip Frame 16
_root.stage_mc.map.setLife();
_parent._parent.removeMovieClip();
Symbol 258 MovieClip Frame 1
stop();
Symbol 258 MovieClip Frame 2
stop();
_root.powerupText.gotoAndPlay("t4");
Symbol 264 MovieClip Frame 16
_parent._parent.removeMovieClip();
Symbol 265 MovieClip Frame 1
stop();
Symbol 265 MovieClip Frame 2
stop();
_root.shieldStatus = true;
_root.powerupText.gotoAndPlay("t2");
_root.stage_mc.map.setShield();
Symbol 272 MovieClip Frame 16
_root.stage_mc.map.setTrack();
_parent._parent.removeMovieClip();
Symbol 273 MovieClip Frame 1
stop();
Symbol 273 MovieClip Frame 2
stop();
_root.powerupText.gotoAndPlay("t5");
Symbol 293 MovieClip Frame 15
_root.score = _root.score + 25;
this._parent.removeMovieClip();
Symbol 296 MovieClip Frame 15
_root.score = _root.score - 50;
if (_root.score < 0) {
_root.score = 0;
}
this._parent.removeMovieClip();
Symbol 297 MovieClip [weed1] Frame 1
stop();
this.poisonStatus = false;
Symbol 297 MovieClip [weed1] Frame 2
stop();
this.poisonStatus = false;
Symbol 297 MovieClip [weed1] Frame 3
stop();
this.poisonStatus = false;
Symbol 297 MovieClip [weed1] Frame 4
stop();
this.poisonStatus = false;
Symbol 297 MovieClip [weed1] Frame 5
stop();
this.poisonStatus = true;
Symbol 297 MovieClip [weed1] Frame 6
stop();
Symbol 297 MovieClip [weed1] Frame 7
stop();
Symbol 301 MovieClip [weed2] Frame 1
stop();
Symbol 301 MovieClip [weed2] Frame 2
stop();
Symbol 301 MovieClip [weed2] Frame 3
stop();
Symbol 301 MovieClip [weed2] Frame 4
stop();
Symbol 301 MovieClip [weed2] Frame 5
stop();
Symbol 301 MovieClip [weed2] Frame 6
stop();
Symbol 309 Button
on (release) {
_root.gotoAndPlay("main");
}
Symbol 313 Button
on (release) {
_root.gotoAndPlay("inst");
}
Symbol 317 Button
on (release) {
_root.gotoAndPlay("highScore");
}
Symbol 338 MovieClip Frame 20
stop();
Symbol 343 Button
on (release) {
getURL ("http://www.flasharcade.com", "_blank");
}
Symbol 347 Button
on (release) {
getURL ("http://www.flasharcade.com/flash-games/", "_blank");
}
Symbol 366 Button
on (release) {
_root.gotoAndPlay("wel");
}
Symbol 373 MovieClip Frame 2
heliObject = function () {
this.objectRef = this;
this.init();
};
heliObject.prototype = new MovieClip();
heliObject.prototype.init = function () {
this.clip = eval (this.clipRef);
this.clip._x = this.initx;
this.clip._y = this.inity;
this.bulletFlag = false;
this.bulletLocation = _root.stageMC;
this.targetEnemy = _root.targetHeroClip;
this.xvel = this.xMove;
this.gravity = 0.1;
this.thrust = 1;
this.distance = 0;
this.life = 60;
this.dieFlag = false;
this.rotationAngle = 1;
this.bulletCounter = 0;
this.blastFlag = false;
this.bulletHitFlag = false;
this.yvel = -this.thrust;
this.trackFlag = false;
};
heliObject.prototype.yMovement = function () {
this.clip._y = this.clip._y + this.yvel;
this.yvel = this.yvel + this.gravity;
if (this.yvel >= this.thrust) {
this.gravity = 0.1;
this.thrust = 1;
this.yvel = -this.thrust;
}
};
heliObject.prototype.xMovement = function () {
if (!this.trackFlag) {
this.clip._x = this.clip._x - this.xvel;
if (this.clip._x < -650) {
this.clip._x = -650;
this.reBounce();
} else if (this.clip._x > 1220) {
this.clip._x = 1220;
this.reBounce();
}
}
};
heliObject.prototype.getXDistance = function () {
return(Math.abs(this.targetEnemy._x - this.clip._x));
};
heliObject.prototype.rotateObject = function () {
this.clip._rotation = this.clip._rotation + this.rotationAngle;
if (this.clip._rotation > 3) {
this.rotationAngle = this.rotationAngle * -1;
} else if (this.clip._rotation < -3) {
this.rotationAngle = this.rotationAngle * -1;
}
};
heliObject.prototype.heliMove = function () {
this.yMovement();
this.xMovement();
this.rotateObject();
};
heliObject.prototype.reBounce = function () {
this.xvel = this.xvel * -1;
this.clip._y = this.inity;
this.clip._xscale = this.clip._xscale * -1;
};
heliObject.prototype.onEnterFrame = function () {
if (!_root.freezeStatus) {
this.objectRef.heliMove();
}
};
Object.registerClass("fish01", heliObject);
Object.registerClass("fish02", heliObject);
Object.registerClass("fish03", heliObject);
Object.registerClass("fish04", heliObject);
weedObject = function () {
this.objectRef = this;
this.init();
};
weedObject.prototype = new MovieClip();
weedObject.prototype.init = function () {
this.clip = eval (this.clipRef);
this.clip._x = this.initx;
this.clip._y = this.inity;
this.xvel = this.xMove;
this.yvel = this.yMove;
this.minx = -600;
this.maxx = 600;
this.miny = -500;
this.maxy = 500;
this.targetEnemy = _root.targetHeroClip;
this.rotationAngle = 1;
var randomNum = random(4);
if (randomNum == 0) {
this.clip.gotoAndStop(5);
} else {
this.clip.gotoAndStop(1 + random(3));
}
this.checkDirection();
};
weedObject.prototype.yMovement = function () {
this.clip._y = this.clip._y - this.yvel;
if (this.clip._y < this.miny) {
_root.createWeed1Flag = false;
this.removeMovieClip();
}
if (this.clip._y > this.maxy) {
_root.createWeed1Flag = false;
this.removeMovieClip();
}
};
weedObject.prototype.xMovement = function () {
this.clip._x = this.clip._x - this.xvel;
if (this.clip._x < this.minx) {
_root.createWeed1Flag = false;
this.removeMovieClip();
}
if (this.clip._x > this.maxx) {
_root.createWeed1Flag = false;
this.removeMovieClip();
}
};
weedObject.prototype.checkCollision = function () {
if (this.clip.head.hitTest(this.targetEnemy.head)) {
if (!this.clip.poisonStatus) {
_root.weedCounter = _root.weedCounter + 1.5;
this.removeClip();
} else {
if (_root.weedCounter > 2) {
} else {
_root.weedCounter = 0;
}
this.removeClip2();
}
}
};
weedObject.prototype.removeClip = function () {
this.clip.gotoAndStop("die");
_root.createWeed1Flag = false;
};
weedObject.prototype.removeClip2 = function () {
this.clip.gotoAndStop("die2");
_root.createWeed1Flag = false;
};
weedObject.prototype.trackUser = function () {
if (!this.clip.poisonStatus) {
var _local2 = {x:_xmouse, y:_ymouse};
this.clip._x = this.clip._x + ((_local2.x - this.clip._x) / 10);
this.clip._y = this.clip._y + ((_local2.y - this.clip._y) / 10);
}
};
weedObject.prototype.checkDirection = function () {
if (this.directiony == -1) {
this.yvel = this.yvel * 1;
} else if (this.directiony == 1) {
this.yvel = this.yvel * -1;
}
if (this.directionx == -1) {
this.xvel = this.xvel * 1;
} else if (this.directionx == 1) {
this.xvel = this.xvel * -1;
}
};
weedObject.prototype.weedMove = function () {
if (!_root.trackUserStatus) {
if (yvel != 0) {
this.yMovement();
}
if (xvel != 0) {
this.xMovement();
}
} else {
this.trackUser();
}
};
weedObject.prototype.onEnterFrame = function () {
trace("move");
if (!_root.freezeStatus) {
this.objectRef.weedMove();
}
this.objectRef.checkCollision();
};
Object.registerClass("weed1", weedObject);
Object.registerClass("weed2", weedObject);
fishObject = function () {
this.objectRef = this;
this.init();
};
fishObject.prototype = new MovieClip();
fishObject.prototype.init = function () {
this.clip = eval (this.clipRef);
this.clip._x = this.initx;
this.clip._y = this.inity;
this.bulletFlag = false;
this.bulletLocation = _root.stageMC;
this.targetEnemy = _root.targetHeroClip;
this.xvel = this.xMove;
this.gravity = 0.1;
this.thrust = 1;
this.distance = 0;
this.life = 60;
this.dieFlag = false;
this.rotationAngle = 5;
this.bulletCounter = 0;
this.blastFlag = false;
this.bulletHitFlag = false;
this.yvel = -this.thrust;
this.trackFlag = false;
if (this.direction == 1) {
this.clip._xscale = 100;
} else if (this.direction == -1) {
this.clip._xscale = -100;
}
};
fishObject.prototype.yMovement = function () {
this.clip._y = this.clip._y + this.yvel;
this.yvel = this.yvel + this.gravity;
if (this.yvel >= this.thrust) {
this.gravity = 0.1;
this.thrust = 1;
this.yvel = -this.thrust;
}
};
fishObject.prototype.changeTrack = function () {
if (this.trackFlag) {
this.trackFlag = false;
} else {
this.trackFlag = true;
}
};
fishObject.prototype.xMovement = function () {
if (!this.trackFlag) {
this.clip._x = this.clip._x - this.xvel;
if (this.clip._x < -670) {
this.clip._x = -670;
this.reBounce();
} else if (this.clip._x > 670) {
this.clip._x = 670;
this.reBounce();
}
} else {
this.clip._x = this.clip._x + ((_xmouse - this.clip._x) / 15);
this.clip._y = this.clip._y + ((_ymouse - this.clip._y) / 15);
dist_x = _xmouse - this.clip._x;
dist_y = _ymouse - this.clip._y;
angle = Math.atan(dist_y / dist_x) / (Math.PI/180);
this._rotation = angle;
}
};
fishObject.prototype.getXDistance = function () {
return(Math.abs(this.targetEnemy._x - this.clip._x));
};
fishObject.prototype.rotateObject = function () {
this.clip._rotation = this.clip._rotation + this.rotationAngle;
if (this.clip._rotation > 30) {
this.rotationAngle = this.rotationAngle * -1;
} else if (this.clip._rotation < -30) {
this.rotationAngle = this.rotationAngle * -1;
}
};
fishObject.prototype.checkCollision = function () {
if ((this.clip.head.hitTest(this.targetEnemy.body) && (!_root.shieldStatus)) && (!_root.dieStatus)) {
_root.heroBlood = _root.heroBlood - 10;
this.targetEnemy.gotoAndStop("hit");
}
};
fishObject.prototype.fishMove = function () {
this.yMovement();
this.xMovement();
};
fishObject.prototype.reBounce = function () {
this.xvel = this.xvel * -1;
var _local2 = random(5);
if ((_local2 == 0) || (_local2 == 1)) {
this.trackFlag = false;
this.clip._y = 20 + (random(480) * 1);
} else if ((_local2 == 2) || (_local2 == 3)) {
this.trackFlag = false;
this.clip._y = 20 + (random(480) * -1);
} else {
this.trackFlag = false;
this.clip._y = _ymouse;
if (this.clip._y > 500) {
this.clip._y = 450;
} else if (this.clip._y < -500) {
this.clip._y = -450;
}
}
this.clip._xscale = this.clip._xscale * -1;
};
fishObject.prototype.onEnterFrame = function () {
if (!_root.freezeStatus) {
this.objectRef.fishMove();
}
this.objectRef.checkCollision();
};
Object.registerClass("enemy1", fishObject);
fishObject2 = function () {
this.objectRef = this;
this.init();
};
fishObject2.prototype = new MovieClip();
fishObject2.prototype.init = function () {
this.clip = eval (this.clipRef);
this.clip._x = this.initx;
this.clip._y = this.inity;
this.bulletFlag = false;
this.bulletLocation = _root.stageMC;
this.targetEnemy = _root.targetHeroClip;
this.yvel = this.yMove;
this.gravity = 0.1;
this.thrust = 1;
this.distance = 0;
this.life = 60;
this.dieFlag = false;
this.rotationAngle = 5;
this.bulletCounter = 0;
this.blastFlag = false;
this.bulletHitFlag = false;
this.xvel = -this.thrust;
this.trackFlag = false;
};
fishObject2.prototype.xMovement = function () {
this.clip._x = this.clip._x + this.xvel;
this.xvel = this.xvel + this.gravity;
if (this.xvel >= this.thrust) {
this.gravity = 0.1;
this.thrust = 1;
this.xvel = -this.thrust;
}
};
fishObject2.prototype.yMovement = function () {
if (!this.trackFlag) {
this.clip._y = this.clip._y - this.yvel;
if (this.clip._y < -500) {
this.clip.removeMovieClip();
}
}
};
fishObject2.prototype.getXDistance = function () {
return(Math.abs(this.targetEnemy._x - this.clip._x));
};
fishObject2.prototype.rotateObject = function () {
this.clip._rotation = this.clip._rotation + this.rotationAngle;
if (this.clip._rotation > 30) {
this.rotationAngle = this.rotationAngle * -1;
} else if (this.clip._rotation < -30) {
this.rotationAngle = this.rotationAngle * -1;
}
};
fishObject2.prototype.checkCollision = function () {
if ((this.clip.head.hitTest(this.targetEnemy.body) && (!_root.shieldStatus)) && (!_root.dieStatus)) {
_root.heroBlood = _root.heroBlood - 5;
this.targetEnemy.gotoAndStop("hit");
}
};
fishObject2.prototype.fishMove = function () {
this.yMovement();
this.xMovement();
};
fishObject2.prototype.reBounce = function () {
this.xvel = this.xvel * -1;
this.clip._y = 50 + random(400);
this.clip._xscale = this.clip._xscale * -1;
};
fishObject2.prototype.onEnterFrame = function () {
if (!_root.freezeStatus) {
this.objectRef.fishMove();
}
this.objectRef.checkCollision();
};
Object.registerClass("enemy2", fishObject2);
powerupObject = function () {
this.objectRef = this;
this.init();
};
powerupObject.prototype = new fishObject2();
powerupObject.protoype.init = function () {
super.init();
};
powerupObject.prototype.checkCollision = function () {
if (this.clip.lclip.head.hitTest(this.targetEnemy.body)) {
this.clip.lclip.gotoAndStop("die");
}
};
powerupObject.prototype.onEnterFrame = function () {
if (!_root.freezeStatus) {
this.objectRef.fishMove();
}
this.objectRef.checkCollision();
};
Object.registerClass("bonusPowerup", powerupObject);
Object.registerClass("freezePowerup", powerupObject);
Object.registerClass("shieldPowerup", powerupObject);
Object.registerClass("trackPowerup", powerupObject);
Object.registerClass("lifePowerup", powerupObject);
function createWeed() {
if (!_root.freezeStatus) {
_global.tempName = "weed" + _root.weedDepth;
_global.xVal = (1 + random(9)) * 60;
var _local4 = this.attachMovie("weed1", _global.tempName, _root.weedDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:500, directiony:-1, yMove:3, xMove:0});
_root.weedArray.push(_local4);
_root.weedNum = 1;
_root.weedDepth++;
}
}
function createWeed2() {
if (!_root.freezeStatus) {
_global.tempName = "weed" + _root.weedDepth;
_global.xVal = ((1 + random(9)) * 60) * -1;
var _local4 = this.attachMovie("weed1", _global.tempName, _root.weedDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:500, directiony:-1, yMove:3, xMove:0});
_root.weedArray.push(_local4);
_root.weedNum = 1;
_root.weedDepth++;
}
}
function createWeed3() {
if (!_root.freezeStatus) {
_global.tempName = "weed2_" + _root.weedDepth;
_global.yVal = ((1 + random(8)) * 50) * 1;
var _local4 = this.attachMovie("weed2", _global.tempName, _root.weedDepth, {clipRef:_global.tempName, initx:600, inity:_global.yVal, directionx:-1, xMove:2, yMove:0});
_root.weedArray.push(_local4);
_root.weedNum = 2;
_root.weedDepth++;
}
}
function createWeed4() {
if (!_root.freezeStatus) {
_global.tempName = "weed2_" + _root.weedDepth;
_global.yVal = ((1 + random(8)) * 50) * 1;
var _local4 = this.attachMovie("weed2", _global.tempName, _root.weedDepth, {clipRef:_global.tempName, initx:-600, inity:_global.yVal, directionx:1, xMove:3, yMove:0});
_root.weedArray.push(_local4);
_root.weedNum = 2;
_root.weedDepth++;
}
}
function createWeed5() {
if (!_root.freezeStatus) {
_global.tempName = "weed2_" + _root.weedDepth;
_global.yVal = ((1 + random(8)) * 50) * -1;
var _local4 = this.attachMovie("weed2", _global.tempName, _root.weedDepth, {clipRef:_global.tempName, initx:-600, inity:_global.yVal, directionx:1, xMove:3, yMove:0});
_root.weedArray.push(_local4);
_root.weedNum = 2;
_root.weedDepth++;
}
}
function createWeed6() {
if (!_root.freezeStatus) {
_global.tempName = "weed2_" + _root.weedDepth;
_global.yVal = ((1 + random(8)) * 50) * -1;
var _local4 = this.attachMovie("weed2", _global.tempName, _root.weedDepth, {clipRef:_global.tempName, initx:-600, inity:_global.yVal, directionx:1, xMove:3, yMove:0});
_root.weedArray.push(_local4);
_root.weedNum = 2;
_root.weedDepth++;
}
}
function createEnemy() {
_global.tempName = "enemy" + _root.enemyDepth;
_global.yVal = ((1 + random(9)) * 50) * 1;
var _local4 = this.attachMovie("enemy1", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:-650, inity:_global.yVal, direction:1, xMove:-9});
_root.enemyArray.push(_local4);
_root.enemyNum = 1;
_root.enemyDepth++;
clearInterval(_root.myInterval7);
}
function createEnemy2() {
_global.tempName = "enemy" + _root.enemyDepth;
_global.yVal = ((1 + random(9)) * 50) * -1;
var _local4 = this.attachMovie("enemy1", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:650, inity:_global.yVal, direction:-1, xMove:7});
_root.enemyArray.push(_local4);
_root.enemyNum = 1;
_root.enemyDepth++;
clearInterval(_root.myInterval8);
}
function createEnemy3() {
_global.tempName = "enemy" + _root.enemyDepth;
_global.yVal = (1 + random(9)) * 50;
var _local4 = this.attachMovie("enemy1", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:-650, inity:_global.yVal, direction:1, xMove:-8});
_root.enemyArray.push(_local4);
_root.enemyNum = 1;
_root.enemyDepth++;
clearInterval(_root.myInterval9);
}
function createEnemy4() {
if (!_root.freezeStatus) {
_global.tempName = "enemy" + _root.enemyDepth;
_global.xVal = ((1 + random(8)) * 60) * -1;
var _local4 = this.attachMovie("enemy2", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:5});
_root.enemyArray.push(_local4);
_root.enemyNum = 1;
_root.enemyDepth++;
}
}
function createEnemy5() {
if (!_root.freezeStatus) {
_global.tempName = "enemy" + _root.enemyDepth;
_global.xVal = ((1 + random(8)) * 60) * 1;
var _local4 = this.attachMovie("enemy2", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:5});
_root.enemyArray.push(_local4);
_root.enemyNum = 1;
_root.enemyDepth++;
}
}
function getxVal() {
var _local1 = random(2);
trace(_local1);
if (_local1 == 0) {
val = 50 + (random(500) * 1);
} else {
val = 50 + (random(500) * -1);
}
return(val);
}
function createBonusPowerup() {
if (!_root.freezeStatus) {
_global.tempName = "powerup" + _root.enemyDepth;
_global.xVal = getxVal();
this.attachMovie("bonusPowerup", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:6});
_root.enemyDepth++;
}
}
function createLifePowerup() {
if (!_root.freezeStatus) {
_global.tempName = "powerup" + _root.enemyDepth;
_global.xVal = getxVal();
this.attachMovie("lifePowerup", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:6});
_root.enemyDepth++;
}
}
function createFreezePowerup() {
if (!_root.freezeStatus) {
_global.tempName = "powerup" + _root.enemyDepth;
_global.xVal = getxVal();
this.attachMovie("freezePowerup", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:6});
_root.enemyDepth++;
}
}
function createShieldPowerup() {
if (!_root.freezeStatus) {
_global.tempName = "powerup" + _root.enemyDepth;
_global.xVal = getxVal();
this.attachMovie("shieldPowerup", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:6});
_root.enemyDepth++;
}
}
function createTrackPowerup() {
if (!_root.freezeStatus) {
_global.tempName = "powerup" + _root.enemyDepth;
_global.xVal = getxVal();
this.attachMovie("trackPowerup", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:6});
_root.enemyDepth++;
}
}
function setFreeze() {
clearInterval(_root.myInterval13);
_root.freezeStatus = true;
_root.myInterval13_1 = setInterval(this, "resetFreezePowerup", 6000);
}
function resetFreezePowerup() {
clearInterval(_root.myInterval13_1);
_root.myInterval13 = setInterval(this, "createFreezePowerup", 14100);
_root.freezeStatus = false;
}
function setShield() {
clearInterval(_root.myInterval14);
_parent.hero_mc.shieldClip.gotoAndStop(2);
_root.shieldStatus = true;
_root.myInterval14_1 = setInterval(this, "resetShieldPowerup", 10000);
}
function resetShieldPowerup() {
_parent.hero_mc.shieldClip.gotoAndStop(1);
clearInterval(_root.myInterval14_1);
_root.myInterval14 = setInterval(this, "createShieldPowerup", 15300);
_root.shieldStatus = false;
}
function setLife() {
_root.heroLife = _root.heroLife + 1;
}
function setTrack() {
clearInterval(_root.myInterval15);
_root.trackUserStatus = true;
_root.myInterval15_1 = setInterval(this, "resetTrackPowerup", 10000);
}
function resetTrackPowerup() {
clearInterval(_root.myInterval15_1);
_root.myInterval15 = setInterval(this, "createTrackPowerup", 9200);
_root.trackUserStatus = false;
}
stop();
if (!_root.createFish1Flag) {
_global.tempName = "fish1";
this.attachMovie("fish01", _global.tempName, 50000, {clipRef:_global.tempName, initx:650, inity:-100, direction:-1, xMove:6});
_root.fishNum = 1;
_root.createFish1Flag = true;
}
if (!_root.createFish2Flag) {
_global.tempName = "fish2";
this.attachMovie("fish02", _global.tempName, 50001, {clipRef:_global.tempName, initx:-650, inity:100, direction:1, xMove:4});
_root.fishNum = 2;
_root.createFish2Flag = true;
}
if (!_root.createFish3Flag) {
_global.tempName = "fish3";
this.attachMovie("fish03", _global.tempName, 50002, {clipRef:_global.tempName, initx:-650, inity:-200, direction:1, xMove:6});
_root.fishNum = 3;
_root.createFish3Flag = true;
}
if (!_root.createFish4Flag) {
_global.tempName = "fish4";
this.attachMovie("fish04", _global.tempName, 50003, {clipRef:_global.tempName, initx:650, inity:200, direction:-1, xMove:5});
_root.fishNum = 4;
_root.createFish4Flag = true;
}
_root.targetHeroClip = _parent.hero_mc;
_root.weedCounter = 0;
_root.weedDepth = 65000;
_root.enemyDepth = 85000 /* 0x014C08 */;
_root.enemyArray = new Array();
_root.weedArray = new Array();
_root.myInterval1 = setInterval(this, "createWeed", 1100);
_root.myInterval2 = setInterval(this, "createWeed2", 1310);
_root.myInterval3 = setInterval(this, "createWeed3", 1600);
_root.myInterval4 = setInterval(this, "createWeed4", 2900);
_root.myInterval5 = setInterval(this, "createWeed5", 1900);
_root.myInterval6 = setInterval(this, "createWeed6", 1400);
_root.myInterval7 = setInterval(this, "createEnemy", 3100);
_root.myInterval8 = setInterval(this, "createEnemy2", 4100);
_root.myInterval9 = setInterval(this, "createEnemy3", 2100);
_root.myInterval10 = setInterval(this, "createEnemy4", 8100);
_root.myInterval11 = setInterval(this, "createEnemy5", 5100);
_root.myInterval12 = setInterval(this, "createBonusPowerup", 9100);
_root.myInterval13 = setInterval(this, "createFreezePowerup", 14100);
Symbol 402 MovieClip Frame 1
stop();
Symbol 402 MovieClip Frame 4
stop();
Symbol 405 MovieClip Frame 1
stop();
Symbol 405 MovieClip Frame 2
stop();
Symbol 406 MovieClip Frame 1
stop();
Symbol 406 MovieClip Frame 3
stop();
Symbol 414 MovieClip Frame 15
_parent.gotoAndStop("stand");
Symbol 415 MovieClip Frame 1
stop();
_root.dieStatus = false;
Symbol 415 MovieClip Frame 2
stop();
Symbol 415 MovieClip Frame 20
_root.stage_mc.checkEnd();
Symbol 415 MovieClip Frame 63
gotoAndStop ("stand");
Symbol 441 Button
on (release) {
_root.stage_mc.gotoAndStop("lev" + _root.level);
}
Symbol 442 MovieClip Frame 105
stop();
Symbol 443 MovieClip Frame 2
heliObject = function () {
this.objectRef = this;
this.init();
};
heliObject.prototype = new MovieClip();
heliObject.prototype.init = function () {
this.clip = eval (this.clipRef);
this.clip._x = this.initx;
this.clip._y = this.inity;
this.bulletFlag = false;
this.bulletLocation = _root.stageMC;
this.targetEnemy = _root.targetHeroClip;
this.xvel = this.xMove;
this.gravity = 0.1;
this.thrust = 1;
this.distance = 0;
this.life = 60;
this.dieFlag = false;
this.rotationAngle = 1;
this.bulletCounter = 0;
this.blastFlag = false;
this.bulletHitFlag = false;
this.yvel = -this.thrust;
this.trackFlag = false;
};
heliObject.prototype.yMovement = function () {
this.clip._y = this.clip._y + this.yvel;
this.yvel = this.yvel + this.gravity;
if (this.yvel >= this.thrust) {
this.gravity = 0.1;
this.thrust = 1;
this.yvel = -this.thrust;
}
};
heliObject.prototype.xMovement = function () {
if (!this.trackFlag) {
this.clip._x = this.clip._x - this.xvel;
if (this.clip._x < -650) {
this.clip._x = -650;
this.reBounce();
} else if (this.clip._x > 1220) {
this.clip._x = 1220;
this.reBounce();
}
}
};
heliObject.prototype.getXDistance = function () {
return(Math.abs(this.targetEnemy._x - this.clip._x));
};
heliObject.prototype.rotateObject = function () {
this.clip._rotation = this.clip._rotation + this.rotationAngle;
if (this.clip._rotation > 3) {
this.rotationAngle = this.rotationAngle * -1;
} else if (this.clip._rotation < -3) {
this.rotationAngle = this.rotationAngle * -1;
}
};
heliObject.prototype.heliMove = function () {
this.yMovement();
this.xMovement();
this.rotateObject();
};
heliObject.prototype.reBounce = function () {
this.xvel = this.xvel * -1;
this.clip._y = this.inity;
this.clip._xscale = this.clip._xscale * -1;
};
heliObject.prototype.onEnterFrame = function () {
if (!_root.freezeStatus) {
this.objectRef.heliMove();
}
};
Object.registerClass("fish01", heliObject);
Object.registerClass("fish02", heliObject);
Object.registerClass("fish03", heliObject);
Object.registerClass("fish04", heliObject);
weedObject = function () {
this.objectRef = this;
this.init();
};
weedObject.prototype = new MovieClip();
weedObject.prototype.init = function () {
this.clip = eval (this.clipRef);
this.clip._x = this.initx;
this.clip._y = this.inity;
this.xvel = this.xMove;
this.yvel = this.yMove;
this.minx = -600;
this.maxx = 600;
this.miny = -500;
this.maxy = 500;
this.targetEnemy = _root.targetHeroClip;
this.rotationAngle = 1;
var randomNum = random(4);
if (randomNum == 0) {
this.clip.gotoAndStop(5);
} else {
this.clip.gotoAndStop(1 + random(3));
}
this.checkDirection();
};
weedObject.prototype.yMovement = function () {
this.clip._y = this.clip._y - this.yvel;
if (this.clip._y < this.miny) {
_root.createWeed1Flag = false;
this.removeMovieClip();
}
if (this.clip._y > this.maxy) {
_root.createWeed1Flag = false;
this.removeMovieClip();
}
};
weedObject.prototype.xMovement = function () {
this.clip._x = this.clip._x - this.xvel;
if (this.clip._x < this.minx) {
_root.createWeed1Flag = false;
this.removeMovieClip();
}
if (this.clip._x > this.maxx) {
_root.createWeed1Flag = false;
this.removeMovieClip();
}
};
weedObject.prototype.checkCollision = function () {
if (this.clip.head.hitTest(this.targetEnemy.head)) {
if (!this.clip.poisonStatus) {
_root.weedCounter = _root.weedCounter + 1;
this.removeClip();
} else {
if (_root.weedCounter > 2) {
} else {
_root.weedCounter = 0;
}
this.removeClip2();
}
}
};
weedObject.prototype.removeClip = function () {
this.clip.gotoAndStop("die");
_root.createWeed1Flag = false;
};
weedObject.prototype.removeClip2 = function () {
this.clip.gotoAndStop("die2");
_root.createWeed1Flag = false;
};
weedObject.prototype.trackUser = function () {
if (!this.clip.poisonStatus) {
var _local2 = {x:_xmouse, y:_ymouse};
this.clip._x = this.clip._x + ((_local2.x - this.clip._x) / 10);
this.clip._y = this.clip._y + ((_local2.y - this.clip._y) / 10);
}
};
weedObject.prototype.checkDirection = function () {
if (this.directiony == -1) {
this.yvel = this.yvel * 1;
} else if (this.directiony == 1) {
this.yvel = this.yvel * -1;
}
if (this.directionx == -1) {
this.xvel = this.xvel * 1;
} else if (this.directionx == 1) {
this.xvel = this.xvel * -1;
}
};
weedObject.prototype.weedMove = function () {
if (!_root.trackUserStatus) {
if (yvel != 0) {
this.yMovement();
}
if (xvel != 0) {
this.xMovement();
}
} else {
this.trackUser();
}
};
weedObject.prototype.onEnterFrame = function () {
trace("move");
if (!_root.freezeStatus) {
this.objectRef.weedMove();
}
this.objectRef.checkCollision();
};
Object.registerClass("weed1", weedObject);
Object.registerClass("weed2", weedObject);
fishObject = function () {
this.objectRef = this;
this.init();
};
fishObject.prototype = new MovieClip();
fishObject.prototype.init = function () {
this.clip = eval (this.clipRef);
this.clip._x = this.initx;
this.clip._y = this.inity;
this.bulletFlag = false;
this.bulletLocation = _root.stageMC;
this.targetEnemy = _root.targetHeroClip;
this.xvel = this.xMove;
this.gravity = 0.1;
this.thrust = 1;
this.distance = 0;
this.life = 60;
this.dieFlag = false;
this.rotationAngle = 5;
this.bulletCounter = 0;
this.blastFlag = false;
this.bulletHitFlag = false;
this.yvel = -this.thrust;
this.trackFlag = false;
if (this.direction == 1) {
this.clip._xscale = 100;
} else if (this.direction == -1) {
this.clip._xscale = -100;
}
};
fishObject.prototype.yMovement = function () {
this.clip._y = this.clip._y + this.yvel;
this.yvel = this.yvel + this.gravity;
if (this.yvel >= this.thrust) {
this.gravity = 0.1;
this.thrust = 1;
this.yvel = -this.thrust;
}
};
fishObject.prototype.changeTrack = function () {
if (this.trackFlag) {
this.trackFlag = false;
} else {
this.trackFlag = true;
}
};
fishObject.prototype.xMovement = function () {
if (!this.trackFlag) {
this.clip._x = this.clip._x - this.xvel;
if (this.clip._x < -670) {
this.clip._x = -670;
this.reBounce();
} else if (this.clip._x > 670) {
this.clip._x = 670;
this.reBounce();
}
} else {
this.clip._x = this.clip._x + ((_xmouse - this.clip._x) / 15);
this.clip._y = this.clip._y + ((_ymouse - this.clip._y) / 15);
dist_x = _xmouse - this.clip._x;
dist_y = _ymouse - this.clip._y;
angle = Math.atan(dist_y / dist_x) / (Math.PI/180);
this._rotation = angle;
}
};
fishObject.prototype.getXDistance = function () {
return(Math.abs(this.targetEnemy._x - this.clip._x));
};
fishObject.prototype.rotateObject = function () {
this.clip._rotation = this.clip._rotation + this.rotationAngle;
if (this.clip._rotation > 30) {
this.rotationAngle = this.rotationAngle * -1;
} else if (this.clip._rotation < -30) {
this.rotationAngle = this.rotationAngle * -1;
}
};
fishObject.prototype.checkCollision = function () {
if ((this.clip.head.hitTest(this.targetEnemy.body) && (!_root.shieldStatus)) && (!_root.dieStatus)) {
_root.heroBlood = _root.heroBlood - 20;
this.targetEnemy.gotoAndStop("hit");
}
};
fishObject.prototype.fishMove = function () {
this.yMovement();
this.xMovement();
};
fishObject.prototype.reBounce = function () {
this.xvel = this.xvel * -1;
var _local2 = random(7);
if ((_local2 == 0) || (_local2 == 1)) {
this.trackFlag = false;
this.clip._y = 20 + (random(480) * 1);
} else if ((_local2 == 2) || (_local2 == 3)) {
this.trackFlag = false;
this.clip._y = 20 + (random(480) * -1);
} else {
this.trackFlag = false;
this.clip._y = _ymouse;
if (this.clip._y > 500) {
this.clip._y = 450;
} else if (this.clip._y < -500) {
this.clip._y = -450;
}
}
this.clip._xscale = this.clip._xscale * -1;
};
fishObject.prototype.onEnterFrame = function () {
if (!_root.freezeStatus) {
this.objectRef.fishMove();
}
this.objectRef.checkCollision();
};
Object.registerClass("enemy1", fishObject);
fishObject2 = function () {
this.objectRef = this;
this.init();
};
fishObject2.prototype = new MovieClip();
fishObject2.prototype.init = function () {
this.clip = eval (this.clipRef);
this.clip._x = this.initx;
this.clip._y = this.inity;
this.bulletFlag = false;
this.bulletLocation = _root.stageMC;
this.targetEnemy = _root.targetHeroClip;
this.yvel = this.yMove;
this.gravity = 0.1;
this.thrust = 1;
this.distance = 0;
this.life = 60;
this.dieFlag = false;
this.rotationAngle = 5;
this.bulletCounter = 0;
this.blastFlag = false;
this.bulletHitFlag = false;
this.xvel = -this.thrust;
this.trackFlag = false;
};
fishObject2.prototype.xMovement = function () {
this.clip._x = this.clip._x + this.xvel;
this.xvel = this.xvel + this.gravity;
if (this.xvel >= this.thrust) {
this.gravity = 0.1;
this.thrust = 1;
this.xvel = -this.thrust;
}
};
fishObject2.prototype.yMovement = function () {
if (!this.trackFlag) {
this.clip._y = this.clip._y - this.yvel;
if (this.clip._y < -500) {
this.clip.removeMovieClip();
}
}
};
fishObject2.prototype.getXDistance = function () {
return(Math.abs(this.targetEnemy._x - this.clip._x));
};
fishObject2.prototype.rotateObject = function () {
this.clip._rotation = this.clip._rotation + this.rotationAngle;
if (this.clip._rotation > 30) {
this.rotationAngle = this.rotationAngle * -1;
} else if (this.clip._rotation < -30) {
this.rotationAngle = this.rotationAngle * -1;
}
};
fishObject2.prototype.checkCollision = function () {
if ((this.clip.head.hitTest(this.targetEnemy.body) && (!_root.shieldStatus)) && (!_root.dieStatus)) {
_root.heroBlood = _root.heroBlood - 20;
this.targetEnemy.gotoAndStop("hit");
}
};
fishObject2.prototype.fishMove = function () {
this.yMovement();
this.xMovement();
};
fishObject2.prototype.reBounce = function () {
this.xvel = this.xvel * -1;
this.clip._y = 50 + random(400);
this.clip._xscale = this.clip._xscale * -1;
};
fishObject2.prototype.onEnterFrame = function () {
if (!_root.freezeStatus) {
this.objectRef.fishMove();
}
this.objectRef.checkCollision();
};
fishObject3 = function () {
this.objectRef = this;
this.init();
};
fishObject3.prototype = new fishObject2();
fishObject3.prototype.init = function () {
super.init();
};
fishObject3.prototype.yMovement = function () {
if (!this.trackFlag) {
this.clip._y = this.clip._y + this.yvel;
if (this.clip._y > 500) {
this.clip.removeMovieClip();
}
}
};
Object.registerClass("enemy2", fishObject2);
Object.registerClass("enemy4", fishObject3);
powerupObject = function () {
this.objectRef = this;
this.init();
};
powerupObject.prototype = new fishObject2();
powerupObject.protoype.init = function () {
super.init();
};
powerupObject.prototype.checkCollision = function () {
if (this.clip.lclip.head.hitTest(this.targetEnemy.body)) {
this.clip.lclip.gotoAndStop("die");
}
};
powerupObject.prototype.onEnterFrame = function () {
if (!_root.freezeStatus) {
this.objectRef.fishMove();
}
this.objectRef.checkCollision();
};
Object.registerClass("bonusPowerup", powerupObject);
Object.registerClass("freezePowerup", powerupObject);
Object.registerClass("shieldPowerup", powerupObject);
Object.registerClass("trackPowerup", powerupObject);
Object.registerClass("lifePowerup", powerupObject);
function createWeed() {
if (!_root.freezeStatus) {
_global.tempName = "weed" + _root.weedDepth;
_global.xVal = (1 + random(9)) * 60;
var _local4 = this.attachMovie("weed1", _global.tempName, _root.weedDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:500, directiony:-1, yMove:3, xMove:0});
_root.weedArray.push(_local4);
_root.weedNum = 1;
_root.weedDepth++;
}
}
function createWeed2() {
if (!_root.freezeStatus) {
_global.tempName = "weed" + _root.weedDepth;
_global.xVal = ((1 + random(9)) * 60) * -1;
var _local4 = this.attachMovie("weed1", _global.tempName, _root.weedDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:500, directiony:-1, yMove:3, xMove:0});
_root.weedArray.push(_local4);
_root.weedNum = 1;
_root.weedDepth++;
}
}
function createWeed3() {
if (!_root.freezeStatus) {
_global.tempName = "weed2_" + _root.weedDepth;
_global.yVal = ((1 + random(8)) * 50) * 1;
var _local4 = this.attachMovie("weed2", _global.tempName, _root.weedDepth, {clipRef:_global.tempName, initx:600, inity:_global.yVal, directionx:-1, xMove:2, yMove:0});
_root.weedArray.push(_local4);
_root.weedNum = 2;
_root.weedDepth++;
}
}
function createWeed4() {
if (!_root.freezeStatus) {
_global.tempName = "weed2_" + _root.weedDepth;
_global.yVal = ((1 + random(8)) * 50) * 1;
var _local4 = this.attachMovie("weed2", _global.tempName, _root.weedDepth, {clipRef:_global.tempName, initx:-600, inity:_global.yVal, directionx:1, xMove:3, yMove:0});
_root.weedArray.push(_local4);
_root.weedNum = 2;
_root.weedDepth++;
}
}
function createWeed5() {
if (!_root.freezeStatus) {
_global.tempName = "weed2_" + _root.weedDepth;
_global.yVal = ((1 + random(8)) * 50) * -1;
var _local4 = this.attachMovie("weed2", _global.tempName, _root.weedDepth, {clipRef:_global.tempName, initx:-600, inity:_global.yVal, directionx:1, xMove:3, yMove:0});
_root.weedArray.push(_local4);
_root.weedNum = 2;
_root.weedDepth++;
}
}
function createWeed6() {
if (!_root.freezeStatus) {
_global.tempName = "weed2_" + _root.weedDepth;
_global.yVal = ((1 + random(8)) * 50) * -1;
var _local4 = this.attachMovie("weed2", _global.tempName, _root.weedDepth, {clipRef:_global.tempName, initx:-600, inity:_global.yVal, directionx:1, xMove:3, yMove:0});
_root.weedArray.push(_local4);
_root.weedNum = 2;
_root.weedDepth++;
}
}
function createEnemy() {
_global.tempName = "enemy" + _root.enemyDepth;
_global.yVal = ((1 + random(9)) * 50) * 1;
var _local4 = this.attachMovie("enemy1", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:-650, inity:_global.yVal, direction:1, xMove:-11});
_root.enemyArray.push(_local4);
_root.enemyNum = 1;
_root.enemyDepth++;
clearInterval(_root.myInterval7);
}
function createEnemy2() {
_global.tempName = "enemy" + _root.enemyDepth;
_global.yVal = ((1 + random(9)) * 50) * -1;
var _local4 = this.attachMovie("enemy1", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:650, inity:_global.yVal, direction:-1, xMove:9});
_root.enemyArray.push(_local4);
_root.enemyNum = 1;
_root.enemyDepth++;
clearInterval(_root.myInterval8);
}
function createEnemy3() {
_global.tempName = "enemy" + _root.enemyDepth;
_global.yVal = (1 + random(9)) * 50;
var _local4 = this.attachMovie("enemy1", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:-650, inity:_global.yVal, direction:1, xMove:-10});
_root.enemyArray.push(_local4);
_root.enemyNum = 1;
_root.enemyDepth++;
clearInterval(_root.myInterval9);
}
function createEnemy4() {
if (!_root.freezeStatus) {
_global.tempName = "enemy" + _root.enemyDepth;
_global.xVal = ((1 + random(8)) * 60) * -1;
var _local4 = this.attachMovie("enemy2", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:8});
_root.enemyArray.push(_local4);
_root.enemyNum = 1;
_root.enemyDepth++;
}
}
function createEnemy5() {
if (!_root.freezeStatus) {
_global.tempName = "enemy" + _root.enemyDepth;
_global.xVal = ((1 + random(8)) * 60) * 1;
var _local4 = this.attachMovie("enemy2", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:6});
_root.enemyArray.push(_local4);
_root.enemyNum = 1;
_root.enemyDepth++;
}
}
function createEnemy6() {
if (!_root.freezeStatus) {
_global.tempName = "enemy" + _root.enemyDepth;
_global.xVal = ((1 + random(8)) * 60) * 1;
var _local4 = this.attachMovie("enemy4", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:-700, direction:1, yMove:7});
_root.enemyArray.push(_local4);
_root.enemyNum = 1;
_root.enemyDepth++;
}
}
function getxVal() {
var _local1 = random(2);
trace(_local1);
if (_local1 == 0) {
val = 50 + (random(500) * 1);
} else {
val = 50 + (random(500) * -1);
}
return(val);
}
function createBonusPowerup() {
if (!_root.freezeStatus) {
_global.tempName = "powerup" + _root.enemyDepth;
_global.xVal = getxVal();
this.attachMovie("bonusPowerup", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:6});
_root.enemyDepth++;
}
}
function createLifePowerup() {
if (!_root.freezeStatus) {
_global.tempName = "powerup" + _root.enemyDepth;
_global.xVal = getxVal();
this.attachMovie("lifePowerup", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:6});
_root.enemyDepth++;
}
}
function createFreezePowerup() {
if (!_root.freezeStatus) {
_global.tempName = "powerup" + _root.enemyDepth;
_global.xVal = getxVal();
this.attachMovie("freezePowerup", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:6});
_root.enemyDepth++;
}
}
function createShieldPowerup() {
if (!_root.freezeStatus) {
_global.tempName = "powerup" + _root.enemyDepth;
_global.xVal = getxVal();
this.attachMovie("shieldPowerup", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:6});
_root.enemyDepth++;
}
}
function createTrackPowerup() {
if (!_root.freezeStatus) {
_global.tempName = "powerup" + _root.enemyDepth;
_global.xVal = getxVal();
this.attachMovie("trackPowerup", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:6});
_root.enemyDepth++;
}
}
function setFreeze() {
clearInterval(_root.myInterval13);
_root.freezeStatus = true;
_root.myInterval13_1 = setInterval(this, "resetFreezePowerup", 8000);
}
function resetFreezePowerup() {
clearInterval(_root.myInterval13_1);
_root.myInterval13 = setInterval(this, "createFreezePowerup", 11400);
_root.freezeStatus = false;
}
function setShield() {
clearInterval(_root.myInterval14);
_parent.hero_mc.shieldClip.gotoAndStop(2);
_root.shieldStatus = true;
_root.myInterval14_1 = setInterval(this, "resetShieldPowerup", 10000);
}
function resetShieldPowerup() {
_parent.hero_mc.shieldClip.gotoAndStop(1);
clearInterval(_root.myInterval14_1);
_root.myInterval14 = setInterval(this, "createShieldPowerup", 15300);
_root.shieldStatus = false;
}
function setLife() {
_root.heroLife = _root.heroLife + 1;
}
function setTrack() {
clearInterval(_root.myInterval15);
_root.trackUserStatus = true;
_root.myInterval15_1 = setInterval(this, "resetTrackPowerup", 8000);
}
function resetTrackPowerup() {
clearInterval(_root.myInterval15_1);
_root.myInterval15 = setInterval(this, "createTrackPowerup", 14200);
_root.trackUserStatus = false;
}
stop();
if (!_root.createFish1Flag) {
_global.tempName = "fish1";
this.attachMovie("fish01", _global.tempName, 50000, {clipRef:_global.tempName, initx:650, inity:-100, direction:-1, xMove:6});
_root.fishNum = 1;
_root.createFish1Flag = true;
}
if (!_root.createFish2Flag) {
_global.tempName = "fish2";
this.attachMovie("fish02", _global.tempName, 50001, {clipRef:_global.tempName, initx:-650, inity:100, direction:1, xMove:4});
_root.fishNum = 2;
_root.createFish2Flag = true;
}
if (!_root.createFish3Flag) {
_global.tempName = "fish3";
this.attachMovie("fish03", _global.tempName, 50002, {clipRef:_global.tempName, initx:-650, inity:-200, direction:1, xMove:6});
_root.fishNum = 3;
_root.createFish3Flag = true;
}
if (!_root.createFish4Flag) {
_global.tempName = "fish4";
this.attachMovie("fish04", _global.tempName, 50003, {clipRef:_global.tempName, initx:650, inity:200, direction:-1, xMove:5});
_root.fishNum = 4;
_root.createFish4Flag = true;
}
_root.targetHeroClip = _parent.hero_mc;
_root.weedCounter = 0;
_root.weedDepth = 65000;
_root.enemyDepth = 85000 /* 0x014C08 */;
_root.enemyArray = new Array();
_root.weedArray = new Array();
_root.myInterval1 = setInterval(this, "createWeed", 1100);
_root.myInterval2 = setInterval(this, "createWeed2", 2300);
_root.myInterval3 = setInterval(this, "createWeed3", 1600);
_root.myInterval4 = setInterval(this, "createWeed4", 2900);
_root.myInterval5 = setInterval(this, "createWeed5", 1900);
_root.myInterval6 = setInterval(this, "createWeed6", 1700);
_root.myInterval7 = setInterval(this, "createEnemy", 3100);
_root.myInterval8 = setInterval(this, "createEnemy2", 4100);
_root.myInterval9 = setInterval(this, "createEnemy3", 2100);
_root.myInterval10 = setInterval(this, "createEnemy4", 8100);
_root.myInterval11 = setInterval(this, "createEnemy5", 5100);
_root.myInterval21 = setInterval(this, "createEnemy6", 9100);
_root.myInterval12 = setInterval(this, "createBonusPowerup", 9100);
_root.myInterval13 = setInterval(this, "createFreezePowerup", 11400);
Symbol 444 MovieClip Frame 2
heliObject = function () {
this.objectRef = this;
this.init();
};
heliObject.prototype = new MovieClip();
heliObject.prototype.init = function () {
this.clip = eval (this.clipRef);
this.clip._x = this.initx;
this.clip._y = this.inity;
this.bulletFlag = false;
this.bulletLocation = _root.stageMC;
this.targetEnemy = _root.targetHeroClip;
this.xvel = this.xMove;
this.gravity = 0.1;
this.thrust = 1;
this.distance = 0;
this.life = 60;
this.dieFlag = false;
this.rotationAngle = 1;
this.bulletCounter = 0;
this.blastFlag = false;
this.bulletHitFlag = false;
this.yvel = -this.thrust;
this.trackFlag = false;
};
heliObject.prototype.yMovement = function () {
this.clip._y = this.clip._y + this.yvel;
this.yvel = this.yvel + this.gravity;
if (this.yvel >= this.thrust) {
this.gravity = 0.1;
this.thrust = 1;
this.yvel = -this.thrust;
}
};
heliObject.prototype.xMovement = function () {
if (!this.trackFlag) {
this.clip._x = this.clip._x - this.xvel;
if (this.clip._x < -650) {
this.clip._x = -650;
this.reBounce();
} else if (this.clip._x > 1220) {
this.clip._x = 1220;
this.reBounce();
}
}
};
heliObject.prototype.getXDistance = function () {
return(Math.abs(this.targetEnemy._x - this.clip._x));
};
heliObject.prototype.rotateObject = function () {
this.clip._rotation = this.clip._rotation + this.rotationAngle;
if (this.clip._rotation > 3) {
this.rotationAngle = this.rotationAngle * -1;
} else if (this.clip._rotation < -3) {
this.rotationAngle = this.rotationAngle * -1;
}
};
heliObject.prototype.heliMove = function () {
this.yMovement();
this.xMovement();
this.rotateObject();
};
heliObject.prototype.reBounce = function () {
this.xvel = this.xvel * -1;
this.clip._y = this.inity;
this.clip._xscale = this.clip._xscale * -1;
};
heliObject.prototype.onEnterFrame = function () {
if (!_root.freezeStatus) {
this.objectRef.heliMove();
}
};
Object.registerClass("fish01", heliObject);
Object.registerClass("fish02", heliObject);
Object.registerClass("fish03", heliObject);
Object.registerClass("fish04", heliObject);
weedObject = function () {
this.objectRef = this;
this.init();
};
weedObject.prototype = new MovieClip();
weedObject.prototype.init = function () {
this.clip = eval (this.clipRef);
this.clip._x = this.initx;
this.clip._y = this.inity;
this.xvel = this.xMove;
this.yvel = this.yMove;
this.minx = -600;
this.maxx = 600;
this.miny = -500;
this.maxy = 500;
this.targetEnemy = _root.targetHeroClip;
this.rotationAngle = 1;
var randomNum = random(4);
if (randomNum == 0) {
this.clip.gotoAndStop(5);
} else {
this.clip.gotoAndStop(1 + random(3));
}
this.checkDirection();
};
weedObject.prototype.yMovement = function () {
this.clip._y = this.clip._y - this.yvel;
if (this.clip._y < this.miny) {
_root.createWeed1Flag = false;
this.removeMovieClip();
}
if (this.clip._y > this.maxy) {
_root.createWeed1Flag = false;
this.removeMovieClip();
}
};
weedObject.prototype.xMovement = function () {
this.clip._x = this.clip._x - this.xvel;
if (this.clip._x < this.minx) {
_root.createWeed1Flag = false;
this.removeMovieClip();
}
if (this.clip._x > this.maxx) {
_root.createWeed1Flag = false;
this.removeMovieClip();
}
};
weedObject.prototype.checkCollision = function () {
if (this.clip.head.hitTest(this.targetEnemy.head)) {
if (!this.clip.poisonStatus) {
_root.weedCounter = _root.weedCounter + 1;
this.removeClip();
} else {
if (_root.weedCounter > 2) {
} else {
_root.weedCounter = 0;
}
this.removeClip2();
}
}
};
weedObject.prototype.removeClip = function () {
this.clip.gotoAndStop("die");
_root.createWeed1Flag = false;
};
weedObject.prototype.removeClip2 = function () {
this.clip.gotoAndStop("die2");
_root.createWeed1Flag = false;
};
weedObject.prototype.trackUser = function () {
if (!this.clip.poisonStatus) {
var _local2 = {x:_xmouse, y:_ymouse};
this.clip._x = this.clip._x + ((_local2.x - this.clip._x) / 10);
this.clip._y = this.clip._y + ((_local2.y - this.clip._y) / 10);
}
};
weedObject.prototype.checkDirection = function () {
if (this.directiony == -1) {
this.yvel = this.yvel * 1;
} else if (this.directiony == 1) {
this.yvel = this.yvel * -1;
}
if (this.directionx == -1) {
this.xvel = this.xvel * 1;
} else if (this.directionx == 1) {
this.xvel = this.xvel * -1;
}
};
weedObject.prototype.weedMove = function () {
if (!_root.trackUserStatus) {
if (yvel != 0) {
this.yMovement();
}
if (xvel != 0) {
this.xMovement();
}
} else {
this.trackUser();
}
};
weedObject.prototype.onEnterFrame = function () {
trace("move");
if (!_root.freezeStatus) {
this.objectRef.weedMove();
}
this.objectRef.checkCollision();
};
Object.registerClass("weed1", weedObject);
Object.registerClass("weed2", weedObject);
fishObject = function () {
this.objectRef = this;
this.init();
};
fishObject.prototype = new MovieClip();
fishObject.prototype.init = function () {
this.clip = eval (this.clipRef);
this.clip._x = this.initx;
this.clip._y = this.inity;
this.bulletFlag = false;
this.bulletLocation = _root.stageMC;
this.targetEnemy = _root.targetHeroClip;
this.xvel = this.xMove;
this.gravity = 0.1;
this.thrust = 1;
this.distance = 0;
this.life = 60;
this.maxx = 970;
this.minx = -970;
this.dieFlag = false;
this.rotationAngle = 5;
this.bulletCounter = 0;
this.blastFlag = false;
this.bulletHitFlag = false;
this.yvel = -this.thrust;
this.trackFlag = false;
if (this.direction == 1) {
this.clip._xscale = 100;
} else if (this.direction == -1) {
this.clip._xscale = -100;
}
};
fishObject.prototype.yMovement = function () {
this.clip._y = this.clip._y + this.yvel;
this.yvel = this.yvel + this.gravity;
if (this.yvel >= this.thrust) {
this.gravity = 0.1;
this.thrust = 1;
this.yvel = -this.thrust;
}
};
fishObject.prototype.changeTrack = function () {
if (this.trackFlag) {
this.trackFlag = false;
} else {
this.trackFlag = true;
}
};
fishObject.prototype.xMovement = function () {
if (!this.trackFlag) {
this.clip._x = this.clip._x - this.xvel;
if (this.clip._x < this.minx) {
this.clip._x = this.minx;
this.reBounce();
} else if (this.clip._x > this.maxx) {
this.clip._x = this.maxx;
this.reBounce();
}
} else {
this.clip._x = this.clip._x + ((_xmouse - this.clip._x) / 15);
this.clip._y = this.clip._y + ((_ymouse - this.clip._y) / 15);
dist_x = _xmouse - this.clip._x;
dist_y = _ymouse - this.clip._y;
angle = Math.atan(dist_y / dist_x) / (Math.PI/180);
this._rotation = angle;
}
};
fishObject.prototype.getXDistance = function () {
return(Math.abs(this.targetEnemy._x - this.clip._x));
};
fishObject.prototype.rotateObject = function () {
this.clip._rotation = this.clip._rotation + this.rotationAngle;
if (this.clip._rotation > 30) {
this.rotationAngle = this.rotationAngle * -1;
} else if (this.clip._rotation < -30) {
this.rotationAngle = this.rotationAngle * -1;
}
};
fishObject.prototype.checkCollision = function () {
if ((this.clip.head.hitTest(this.targetEnemy.body) && (!_root.shieldStatus)) && (!_root.dieStatus)) {
_root.heroBlood = _root.heroBlood - 25;
this.targetEnemy.gotoAndStop("hit");
}
};
fishObject.prototype.fishMove = function () {
this.yMovement();
this.xMovement();
};
fishObject.prototype.reBounce = function () {
this.xvel = this.xvel * -1;
var _local2 = random(10);
if ((_local2 == 0) || (_local2 == 1)) {
this.trackFlag = false;
this.clip._y = 20 + (random(480) * 1);
} else if ((_local2 == 2) || (_local2 == 3)) {
this.trackFlag = false;
this.clip._y = 20 + (random(480) * -1);
} else {
this.trackFlag = false;
this.clip._y = _ymouse;
if (this.clip._y > 500) {
this.clip._y = 450;
} else if (this.clip._y < -500) {
this.clip._y = -450;
}
}
this.clip._xscale = this.clip._xscale * -1;
};
fishObject.prototype.onEnterFrame = function () {
if (!_root.freezeStatus) {
this.objectRef.fishMove();
}
this.objectRef.checkCollision();
};
fishObject4 = function () {
this.objectRef = this;
this.init();
};
fishObject4.prototype = new fishObject();
fishObject4.prototype.init = function () {
super.init();
this.maxx = 1770;
this.minx = -1770;
};
fishObject4.prototype.checkCollision = function () {
if (((this.clip.head.hitTest(this.targetEnemy.body) && (!_root.shieldStatus)) && (!_root.dieStatus)) && (!this.clip.animation)) {
if (_root.heroLife > 0) {
_root.heroLife = _root.heroLife - 1;
} else {
_root.heroBlood = 0;
}
this.clip.gotoAndPlay("grab");
this.clip.animation = true;
}
};
Object.registerClass("enemy1", fishObject);
Object.registerClass("enemy5", fishObject4);
fishObject3 = function () {
this.objectRef = this;
this.init();
};
fishObject3.prototype = new MovieClip();
fishObject3.prototype.init = function () {
this.clip = eval (this.clipRef);
this.clip._x = this.initx;
this.clip._y = this.inity;
this.bulletFlag = false;
this.bulletLocation = _root.stageMC;
this.targetEnemy = _root.targetHeroClip;
this.xvel = this.xMove;
this.gravity = 0.1;
this.thrust = 1;
this.distance = 0;
this.life = 60;
this.dieFlag = false;
this.rotationAngle = 5;
this.bulletCounter = 0;
this.blastFlag = false;
this.bulletHitFlag = false;
this.yvel = -this.thrust;
this.trackFlag = true;
if (this.direction == 1) {
this.clip._xscale = 100;
} else if (this.direction == -1) {
this.clip._xscale = -100;
}
this.trackInterval = setInterval(this, "changeTrack", 8000);
};
fishObject3.prototype.yMovement = function () {
this.clip._y = this.clip._y + this.yvel;
this.yvel = this.yvel + this.gravity;
if (this.yvel >= this.thrust) {
this.gravity = 0.1;
this.thrust = 1;
this.yvel = -this.thrust;
}
};
fishObject3.prototype.changeTrack = function () {
if (this.trackFlag) {
this.trackFlag = false;
} else {
this.trackFlag = true;
}
};
fishObject3.prototype.xMovement = function () {
if (this.trackFlag) {
this.targetx = _xmouse;
this.targety = _ymouse;
} else if (this.direction == 1) {
this.targetx = 650;
this.targety = 340;
} else {
this.targetx = -650;
this.targety = 0;
}
this.clip._x = this.clip._x + ((this.targetx - this.clip._x) / 30);
this.clip._y = this.clip._y + ((this.targety - this.clip._y) / 30);
dist_x = this.targetx - this.clip._x;
dist_y = this.targety - this.clip._y;
if (dist_x > 0) {
this.direction = 1;
this.clip._xscale = 100;
angle = Math.atan2(dist_y, dist_x) / (Math.PI/180);
this._rotation = angle;
} else {
this.direction = -1;
this.clip._xscale = -100;
angle = Math.atan2(dist_y, dist_x) / (Math.PI/180);
this._rotation = angle + 180;
}
};
fishObject3.prototype.getXDistance = function () {
return(Math.abs(this.targetEnemy._x - this.clip._x));
};
fishObject3.prototype.rotateObject = function () {
this.clip._rotation = this.clip._rotation + this.rotationAngle;
if (this.clip._rotation > 30) {
this.rotationAngle = this.rotationAngle * -1;
} else if (this.clip._rotation < -30) {
this.rotationAngle = this.rotationAngle * -1;
}
};
fishObject3.prototype.checkCollision = function () {
if ((this.clip.head.hitTest(this.targetEnemy.body) && (!_root.shieldStatus)) && (!_root.dieStatus)) {
_root.heroBlood = _root.heroBlood - 20;
this.targetEnemy.gotoAndStop("hit");
}
};
fishObject3.prototype.fishMove = function () {
this.yMovement();
this.xMovement();
};
fishObject3.prototype.reBounce = function () {
this.xvel = this.xvel * -1;
var _local2 = random(10);
if ((_local2 == 0) || (_local2 == 1)) {
this.trackFlag = false;
this.clip._y = 20 + (random(480) * 1);
} else if ((_local2 == 2) || (_local2 == 3)) {
this.trackFlag = false;
this.clip._y = 20 + (random(480) * -1);
} else {
this.trackFlag = false;
this.clip._y = _ymouse;
if (this.clip._y > 500) {
this.clip._y = 450;
} else if (this.clip._y < -500) {
this.clip._y = -450;
}
}
this.clip._xscale = this.clip._xscale * -1;
};
fishObject3.prototype.onEnterFrame = function () {
if (!_root.freezeStatus) {
this.objectRef.fishMove();
}
this.objectRef.checkCollision();
};
Object.registerClass("enemy3", fishObject3);
fishObject2 = function () {
this.objectRef = this;
this.init();
};
fishObject2.prototype = new MovieClip();
fishObject2.prototype.init = function () {
this.clip = eval (this.clipRef);
this.clip._x = this.initx;
this.clip._y = this.inity;
this.bulletFlag = false;
this.bulletLocation = _root.stageMC;
this.targetEnemy = _root.targetHeroClip;
this.yvel = this.yMove;
this.gravity = 0.1;
this.thrust = 1;
this.distance = 0;
this.life = 60;
this.dieFlag = false;
this.rotationAngle = 5;
this.bulletCounter = 0;
this.blastFlag = false;
this.bulletHitFlag = false;
this.xvel = -this.thrust;
this.trackFlag = false;
};
fishObject2.prototype.xMovement = function () {
this.clip._x = this.clip._x + this.xvel;
this.xvel = this.xvel + this.gravity;
if (this.xvel >= this.thrust) {
this.gravity = 0.1;
this.thrust = 1;
this.xvel = -this.thrust;
}
};
fishObject2.prototype.yMovement = function () {
if (!this.trackFlag) {
this.clip._y = this.clip._y - this.yvel;
if (this.clip._y < -500) {
this.clip.removeMovieClip();
}
}
};
fishObject2.prototype.getXDistance = function () {
return(Math.abs(this.targetEnemy._x - this.clip._x));
};
fishObject2.prototype.rotateObject = function () {
this.clip._rotation = this.clip._rotation + this.rotationAngle;
if (this.clip._rotation > 30) {
this.rotationAngle = this.rotationAngle * -1;
} else if (this.clip._rotation < -30) {
this.rotationAngle = this.rotationAngle * -1;
}
};
fishObject2.prototype.checkCollision = function () {
if ((this.clip.head.hitTest(this.targetEnemy.body) && (!_root.shieldStatus)) && (!_root.dieStatus)) {
_root.heroBlood = _root.heroBlood - 15;
this.targetEnemy.gotoAndStop("hit");
}
};
fishObject2.prototype.fishMove = function () {
this.yMovement();
this.xMovement();
};
fishObject2.prototype.reBounce = function () {
this.xvel = this.xvel * -1;
this.clip._y = 50 + random(400);
this.clip._xscale = this.clip._xscale * -1;
};
fishObject2.prototype.onEnterFrame = function () {
if (!_root.freezeStatus) {
this.objectRef.fishMove();
}
this.objectRef.checkCollision();
};
fishObject3 = function () {
this.objectRef = this;
this.init();
};
fishObject3.prototype = new fishObject2();
fishObject3.prototype.init = function () {
super.init();
};
fishObject3.prototype.yMovement = function () {
if (!this.trackFlag) {
this.clip._y = this.clip._y + this.yvel;
if (this.clip._y > 500) {
this.clip.removeMovieClip();
}
}
};
Object.registerClass("enemy2", fishObject2);
Object.registerClass("enemy4", fishObject3);
powerupObject = function () {
this.objectRef = this;
this.init();
};
powerupObject.prototype = new fishObject2();
powerupObject.protoype.init = function () {
super.init();
};
powerupObject.prototype.checkCollision = function () {
if (this.clip.lclip.head.hitTest(this.targetEnemy.body)) {
this.clip.lclip.gotoAndStop("die");
}
};
powerupObject.prototype.onEnterFrame = function () {
if (!_root.freezeStatus) {
this.objectRef.fishMove();
}
this.objectRef.checkCollision();
};
Object.registerClass("bonusPowerup", powerupObject);
Object.registerClass("freezePowerup", powerupObject);
Object.registerClass("shieldPowerup", powerupObject);
Object.registerClass("trackPowerup", powerupObject);
Object.registerClass("lifePowerup", powerupObject);
function createWeed() {
if (!_root.freezeStatus) {
_global.tempName = "weed" + _root.weedDepth;
_global.xVal = (1 + random(9)) * 60;
var _local4 = this.attachMovie("weed1", _global.tempName, _root.weedDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:500, directiony:-1, yMove:3, xMove:0});
_root.weedArray.push(_local4);
_root.weedNum = 1;
_root.weedDepth++;
}
}
function createWeed2() {
if (!_root.freezeStatus) {
_global.tempName = "weed" + _root.weedDepth;
_global.xVal = ((1 + random(9)) * 60) * -1;
var _local4 = this.attachMovie("weed1", _global.tempName, _root.weedDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:500, directiony:-1, yMove:3, xMove:0});
_root.weedArray.push(_local4);
_root.weedNum = 1;
_root.weedDepth++;
}
}
function createWeed3() {
if (!_root.freezeStatus) {
_global.tempName = "weed2_" + _root.weedDepth;
_global.yVal = ((1 + random(8)) * 50) * 1;
var _local4 = this.attachMovie("weed2", _global.tempName, _root.weedDepth, {clipRef:_global.tempName, initx:600, inity:_global.yVal, directionx:-1, xMove:2, yMove:0});
_root.weedArray.push(_local4);
_root.weedNum = 2;
_root.weedDepth++;
}
}
function createWeed4() {
if (!_root.freezeStatus) {
_global.tempName = "weed2_" + _root.weedDepth;
_global.yVal = ((1 + random(8)) * 50) * 1;
var _local4 = this.attachMovie("weed2", _global.tempName, _root.weedDepth, {clipRef:_global.tempName, initx:-600, inity:_global.yVal, directionx:1, xMove:3, yMove:0});
_root.weedArray.push(_local4);
_root.weedNum = 2;
_root.weedDepth++;
}
}
function createWeed5() {
if (!_root.freezeStatus) {
_global.tempName = "weed2_" + _root.weedDepth;
_global.yVal = ((1 + random(8)) * 50) * -1;
var _local4 = this.attachMovie("weed2", _global.tempName, _root.weedDepth, {clipRef:_global.tempName, initx:-600, inity:_global.yVal, directionx:1, xMove:3, yMove:0});
_root.weedArray.push(_local4);
_root.weedNum = 2;
_root.weedDepth++;
}
}
function createWeed6() {
if (!_root.freezeStatus) {
_global.tempName = "weed2_" + _root.weedDepth;
_global.yVal = ((1 + random(8)) * 50) * -1;
var _local4 = this.attachMovie("weed2", _global.tempName, _root.weedDepth, {clipRef:_global.tempName, initx:-600, inity:_global.yVal, directionx:1, xMove:3, yMove:0});
_root.weedArray.push(_local4);
_root.weedNum = 2;
_root.weedDepth++;
}
}
function createEnemy() {
_global.tempName = "enemy" + _root.enemyDepth;
_global.yVal = ((1 + random(9)) * 50) * 1;
var _local4 = this.attachMovie("enemy3", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:-650, inity:_global.yVal, direction:1, xMove:-3});
_root.enemyArray.push(_local4);
_root.enemyNum = 1;
_root.enemyDepth++;
clearInterval(_root.myInterval7);
}
function createEnemy2() {
_global.tempName = "enemy" + _root.enemyDepth;
_global.yVal = ((1 + random(9)) * 50) * -1;
var _local4 = this.attachMovie("enemy1", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:650, inity:_global.yVal, direction:-1, xMove:9});
_root.enemyArray.push(_local4);
_root.enemyNum = 1;
_root.enemyDepth++;
clearInterval(_root.myInterval8);
}
function createEnemy3() {
_global.tempName = "enemy" + _root.enemyDepth;
_global.yVal = (1 + random(9)) * 50;
var _local4 = this.attachMovie("enemy5", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:-650, inity:_global.yVal, direction:1, xMove:-13});
_root.enemyArray.push(_local4);
_root.enemyNum = 1;
_root.enemyDepth++;
clearInterval(_root.myInterval9);
}
function createEnemy5() {
if (!_root.freezeStatus) {
_global.tempName = "enemy" + _root.enemyDepth;
_global.xVal = ((1 + random(8)) * 60) * 1;
var _local4 = this.attachMovie("enemy2", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:6});
_root.enemyArray.push(_local4);
_root.enemyNum = 1;
_root.enemyDepth++;
}
}
function createEnemy6() {
if (!_root.freezeStatus) {
_global.tempName = "enemy" + _root.enemyDepth;
_global.xVal = ((1 + random(8)) * 60) * 1;
var _local4 = this.attachMovie("enemy4", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:-700, direction:1, yMove:7});
_root.enemyArray.push(_local4);
_root.enemyNum = 1;
_root.enemyDepth++;
}
}
function getxVal() {
var _local1 = random(2);
trace(_local1);
if (_local1 == 0) {
val = 50 + (random(500) * 1);
} else {
val = 50 + (random(500) * -1);
}
return(val);
}
function createBonusPowerup() {
if (!_root.freezeStatus) {
_global.tempName = "powerup" + _root.enemyDepth;
_global.xVal = getxVal();
this.attachMovie("bonusPowerup", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:6});
_root.enemyDepth++;
}
}
function createLifePowerup() {
if (!_root.freezeStatus) {
_global.tempName = "powerup" + _root.enemyDepth;
_global.xVal = getxVal();
this.attachMovie("lifePowerup", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:6});
_root.enemyDepth++;
}
}
function createFreezePowerup() {
if (!_root.freezeStatus) {
_global.tempName = "powerup" + _root.enemyDepth;
_global.xVal = getxVal();
this.attachMovie("freezePowerup", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:6});
_root.enemyDepth++;
}
}
function createShieldPowerup() {
if (!_root.freezeStatus) {
_global.tempName = "powerup" + _root.enemyDepth;
_global.xVal = getxVal();
this.attachMovie("shieldPowerup", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:6});
_root.enemyDepth++;
}
}
function createTrackPowerup() {
if (!_root.freezeStatus) {
_global.tempName = "powerup" + _root.enemyDepth;
_global.xVal = getxVal();
this.attachMovie("trackPowerup", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:6});
_root.enemyDepth++;
}
}
function setFreeze() {
clearInterval(_root.myInterval13);
_root.freezeStatus = true;
_root.myInterval13_1 = setInterval(this, "resetFreezePowerup", 8000);
}
function resetFreezePowerup() {
clearInterval(_root.myInterval13_1);
_root.myInterval13 = setInterval(this, "createFreezePowerup", 11400);
_root.freezeStatus = false;
}
function setShield() {
clearInterval(_root.myInterval14);
_parent.hero_mc.shieldClip.gotoAndStop(2);
_root.shieldStatus = true;
_root.myInterval14_1 = setInterval(this, "resetShieldPowerup", 10000);
}
function resetShieldPowerup() {
_parent.hero_mc.shieldClip.gotoAndStop(1);
clearInterval(_root.myInterval14_1);
_root.myInterval14 = setInterval(this, "createShieldPowerup", 15300);
_root.shieldStatus = false;
}
function setLife() {
_root.heroLife = _root.heroLife + 1;
}
function setTrack() {
clearInterval(_root.myInterval15);
_root.trackUserStatus = true;
_root.myInterval15_1 = setInterval(this, "resetTrackPowerup", 2000);
}
function resetTrackPowerup() {
clearInterval(_root.myInterval15_1);
_root.myInterval15 = setInterval(this, "createTrackPowerup", 14200);
_root.trackUserStatus = false;
}
stop();
if (!_root.createFish1Flag) {
_global.tempName = "fish1";
this.attachMovie("fish01", _global.tempName, 50000, {clipRef:_global.tempName, initx:650, inity:-100, direction:-1, xMove:6});
_root.fishNum = 1;
_root.createFish1Flag = true;
}
if (!_root.createFish2Flag) {
_global.tempName = "fish2";
this.attachMovie("fish02", _global.tempName, 50001, {clipRef:_global.tempName, initx:-650, inity:100, direction:1, xMove:4});
_root.fishNum = 2;
_root.createFish2Flag = true;
}
if (!_root.createFish3Flag) {
_global.tempName = "fish3";
this.attachMovie("fish03", _global.tempName, 50002, {clipRef:_global.tempName, initx:-650, inity:-200, direction:1, xMove:6});
_root.fishNum = 3;
_root.createFish3Flag = true;
}
if (!_root.createFish4Flag) {
_global.tempName = "fish4";
this.attachMovie("fish04", _global.tempName, 50003, {clipRef:_global.tempName, initx:650, inity:200, direction:-1, xMove:5});
_root.fishNum = 4;
_root.createFish4Flag = true;
}
_root.targetHeroClip = _parent.hero_mc;
_root.weedCounter = 0;
_root.weedDepth = 65000;
_root.enemyDepth = 85000 /* 0x014C08 */;
_root.enemyArray = new Array();
_root.weedArray = new Array();
_root.myInterval1 = setInterval(this, "createWeed", 1100);
_root.myInterval2 = setInterval(this, "createWeed2", 2300);
_root.myInterval3 = setInterval(this, "createWeed3", 1600);
_root.myInterval4 = setInterval(this, "createWeed4", 2900);
_root.myInterval5 = setInterval(this, "createWeed5", 1900);
_root.myInterval6 = setInterval(this, "createWeed6", 1700);
_root.myInterval7 = setInterval(this, "createEnemy", 3100);
_root.myInterval8 = setInterval(this, "createEnemy2", 4100);
_root.myInterval9 = setInterval(this, "createEnemy3", 10100);
_root.myInterval11 = setInterval(this, "createEnemy5", 12100);
_root.myInterval21 = setInterval(this, "createEnemy6", 14100);
_root.myInterval12 = setInterval(this, "createBonusPowerup", 6100);
_root.myInterval13 = setInterval(this, "createFreezePowerup", 11400);
_root.myInterval14 = setInterval(this, "createShieldPowerup", 8300);
Symbol 445 MovieClip Frame 2
heliObject = function () {
this.objectRef = this;
this.init();
};
heliObject.prototype = new MovieClip();
heliObject.prototype.init = function () {
this.clip = eval (this.clipRef);
this.clip._x = this.initx;
this.clip._y = this.inity;
this.bulletFlag = false;
this.bulletLocation = _root.stageMC;
this.targetEnemy = _root.targetHeroClip;
this.xvel = this.xMove;
this.gravity = 0.1;
this.thrust = 1;
this.distance = 0;
this.life = 60;
this.dieFlag = false;
this.rotationAngle = 1;
this.bulletCounter = 0;
this.blastFlag = false;
this.bulletHitFlag = false;
this.yvel = -this.thrust;
this.trackFlag = false;
};
heliObject.prototype.yMovement = function () {
this.clip._y = this.clip._y + this.yvel;
this.yvel = this.yvel + this.gravity;
if (this.yvel >= this.thrust) {
this.gravity = 0.1;
this.thrust = 1;
this.yvel = -this.thrust;
}
};
heliObject.prototype.xMovement = function () {
if (!this.trackFlag) {
this.clip._x = this.clip._x - this.xvel;
if (this.clip._x < -650) {
this.clip._x = -650;
this.reBounce();
} else if (this.clip._x > 1220) {
this.clip._x = 1220;
this.reBounce();
}
}
};
heliObject.prototype.getXDistance = function () {
return(Math.abs(this.targetEnemy._x - this.clip._x));
};
heliObject.prototype.rotateObject = function () {
this.clip._rotation = this.clip._rotation + this.rotationAngle;
if (this.clip._rotation > 3) {
this.rotationAngle = this.rotationAngle * -1;
} else if (this.clip._rotation < -3) {
this.rotationAngle = this.rotationAngle * -1;
}
};
heliObject.prototype.heliMove = function () {
this.yMovement();
this.xMovement();
this.rotateObject();
};
heliObject.prototype.reBounce = function () {
this.xvel = this.xvel * -1;
this.clip._y = this.inity;
this.clip._xscale = this.clip._xscale * -1;
};
heliObject.prototype.onEnterFrame = function () {
if (!_root.freezeStatus) {
this.objectRef.heliMove();
}
};
Object.registerClass("fish01", heliObject);
Object.registerClass("fish02", heliObject);
Object.registerClass("fish03", heliObject);
Object.registerClass("fish04", heliObject);
weedObject = function () {
this.objectRef = this;
this.init();
};
weedObject.prototype = new MovieClip();
weedObject.prototype.init = function () {
this.clip = eval (this.clipRef);
this.clip._x = this.initx;
this.clip._y = this.inity;
this.xvel = this.xMove;
this.yvel = this.yMove;
this.minx = -600;
this.maxx = 600;
this.miny = -500;
this.maxy = 500;
this.targetEnemy = _root.targetHeroClip;
this.rotationAngle = 1;
var randomNum = random(4);
if (randomNum == 0) {
this.clip.gotoAndStop(5);
} else {
this.clip.gotoAndStop(1 + random(3));
}
this.checkDirection();
};
weedObject.prototype.yMovement = function () {
this.clip._y = this.clip._y - this.yvel;
if (this.clip._y < this.miny) {
_root.createWeed1Flag = false;
this.removeMovieClip();
}
if (this.clip._y > this.maxy) {
_root.createWeed1Flag = false;
this.removeMovieClip();
}
};
weedObject.prototype.xMovement = function () {
this.clip._x = this.clip._x - this.xvel;
if (this.clip._x < this.minx) {
_root.createWeed1Flag = false;
this.removeMovieClip();
}
if (this.clip._x > this.maxx) {
_root.createWeed1Flag = false;
this.removeMovieClip();
}
};
weedObject.prototype.checkCollision = function () {
if (this.clip.head.hitTest(this.targetEnemy.head)) {
if (!this.clip.poisonStatus) {
_root.weedCounter = _root.weedCounter + 0.5;
this.removeClip();
} else {
if (_root.weedCounter > 2) {
} else {
_root.weedCounter = 0;
}
this.removeClip2();
}
}
};
weedObject.prototype.removeClip = function () {
this.clip.gotoAndStop("die");
_root.createWeed1Flag = false;
};
weedObject.prototype.removeClip2 = function () {
this.clip.gotoAndStop("die2");
_root.createWeed1Flag = false;
};
weedObject.prototype.trackUser = function () {
if (!this.clip.poisonStatus) {
var _local2 = {x:_xmouse, y:_ymouse};
this.clip._x = this.clip._x + ((_local2.x - this.clip._x) / 10);
this.clip._y = this.clip._y + ((_local2.y - this.clip._y) / 10);
}
};
weedObject.prototype.checkDirection = function () {
if (this.directiony == -1) {
this.yvel = this.yvel * 1;
} else if (this.directiony == 1) {
this.yvel = this.yvel * -1;
}
if (this.directionx == -1) {
this.xvel = this.xvel * 1;
} else if (this.directionx == 1) {
this.xvel = this.xvel * -1;
}
};
weedObject.prototype.weedMove = function () {
if (!_root.trackUserStatus) {
if (yvel != 0) {
this.yMovement();
}
if (xvel != 0) {
this.xMovement();
}
} else {
this.trackUser();
}
};
weedObject.prototype.onEnterFrame = function () {
trace("move");
if (!_root.freezeStatus) {
this.objectRef.weedMove();
}
this.objectRef.checkCollision();
};
Object.registerClass("weed1", weedObject);
Object.registerClass("weed2", weedObject);
fishObject = function () {
this.objectRef = this;
this.init();
};
fishObject.prototype = new MovieClip();
fishObject.prototype.init = function () {
this.clip = eval (this.clipRef);
this.clip._x = this.initx;
this.clip._y = this.inity;
this.bulletFlag = false;
this.bulletLocation = _root.stageMC;
this.targetEnemy = _root.targetHeroClip;
this.xvel = this.xMove;
this.gravity = 0.1;
this.thrust = 1;
this.distance = 0;
this.life = 60;
this.maxx = 970;
this.minx = -970;
this.dieFlag = false;
this.rotationAngle = 5;
this.bulletCounter = 0;
this.blastFlag = false;
this.bulletHitFlag = false;
this.yvel = -this.thrust;
this.trackFlag = false;
if (this.direction == 1) {
this.clip._xscale = 100;
} else if (this.direction == -1) {
this.clip._xscale = -100;
}
};
fishObject.prototype.yMovement = function () {
this.clip._y = this.clip._y + this.yvel;
this.yvel = this.yvel + this.gravity;
if (this.yvel >= this.thrust) {
this.gravity = 0.1;
this.thrust = 1;
this.yvel = -this.thrust;
}
};
fishObject.prototype.changeTrack = function () {
if (this.trackFlag) {
this.trackFlag = false;
} else {
this.trackFlag = true;
}
};
fishObject.prototype.xMovement = function () {
if (!this.trackFlag) {
this.clip._x = this.clip._x - this.xvel;
if (this.clip._x < this.minx) {
this.clip._x = this.minx;
this.reBounce();
} else if (this.clip._x > this.maxx) {
this.clip._x = this.maxx;
this.reBounce();
}
} else {
this.clip._x = this.clip._x + ((_xmouse - this.clip._x) / 15);
this.clip._y = this.clip._y + ((_ymouse - this.clip._y) / 15);
dist_x = _xmouse - this.clip._x;
dist_y = _ymouse - this.clip._y;
angle = Math.atan(dist_y / dist_x) / (Math.PI/180);
this._rotation = angle;
}
};
fishObject.prototype.getXDistance = function () {
return(Math.abs(this.targetEnemy._x - this.clip._x));
};
fishObject.prototype.rotateObject = function () {
this.clip._rotation = this.clip._rotation + this.rotationAngle;
if (this.clip._rotation > 30) {
this.rotationAngle = this.rotationAngle * -1;
} else if (this.clip._rotation < -30) {
this.rotationAngle = this.rotationAngle * -1;
}
};
fishObject.prototype.checkCollision = function () {
if ((this.clip.head.hitTest(this.targetEnemy.body) && (!_root.shieldStatus)) && (!_root.dieStatus)) {
_root.heroBlood = _root.heroBlood - 20;
this.targetEnemy.gotoAndStop("hit");
}
};
fishObject.prototype.fishMove = function () {
this.yMovement();
this.xMovement();
};
fishObject.prototype.reBounce = function () {
this.xvel = this.xvel * -1;
var _local2 = random(10);
if ((_local2 == 0) || (_local2 == 1)) {
this.trackFlag = false;
this.clip._y = 20 + (random(480) * 1);
} else if ((_local2 == 2) || (_local2 == 3)) {
this.trackFlag = false;
this.clip._y = 20 + (random(480) * -1);
} else {
this.trackFlag = false;
this.clip._y = _ymouse;
if (this.clip._y > 500) {
this.clip._y = 450;
} else if (this.clip._y < -500) {
this.clip._y = -450;
}
}
this.clip._xscale = this.clip._xscale * -1;
};
fishObject.prototype.onEnterFrame = function () {
if (!_root.freezeStatus) {
this.objectRef.fishMove();
}
this.objectRef.checkCollision();
};
fishObject4 = function () {
this.objectRef = this;
this.init();
};
fishObject4.prototype = new fishObject();
fishObject4.prototype.init = function () {
super.init();
this.maxx = 1070;
this.minx = -1070;
};
fishObject4.prototype.checkCollision = function () {
if (((this.clip.head.hitTest(this.targetEnemy.body) && (!_root.shieldStatus)) && (!_root.dieStatus)) && (!this.clip.animation)) {
if (_root.heroLife > 0) {
if (_root.heroBlood > 0) {
_root.heroLife = _root.heroLife - 1;
_root.heroBlood = 100;
} else {
_root.heroLife = _root.heroLife - 1;
}
} else {
_root.heroBlood = 0;
}
this.clip.gotoAndPlay("grab");
this.clip.animation = true;
}
};
fishObject5 = function () {
this.objectRef = this;
this.init();
};
fishObject5.prototype = new fishObject();
fishObject5.prototype.init = function () {
super.init();
this.maxx = 1170;
this.minx = -1170;
};
fishObject5.prototype.checkCollision = function () {
if ((this.clip.head.hitTest(this.targetEnemy.body) && (!_root.shieldStatus)) && (!_root.dieStatus)) {
_root.controller = 30;
_root.maxSpeed = 10;
this.targetEnemy.crazyClip.gotoAndStop(2);
_root.pufferInterval = setInterval(this, "restore", 15000);
}
};
fishObject5.prototype.restore = function () {
clearInterval(_root.pufferInterval);
this.targetEnemy.crazyClip.gotoAndStop(1);
_root.controller = 4;
_root.maxSpeed = 2;
};
Object.registerClass("enemy1", fishObject);
Object.registerClass("enemy7", fishObject);
Object.registerClass("enemy8", fishObject);
Object.registerClass("enemy5", fishObject4);
Object.registerClass("enemy6", fishObject5);
fishObject2 = function () {
this.objectRef = this;
this.init();
};
fishObject2.prototype = new MovieClip();
fishObject2.prototype.init = function () {
this.clip = eval (this.clipRef);
this.clip._x = this.initx;
this.clip._y = this.inity;
this.bulletFlag = false;
this.bulletLocation = _root.stageMC;
this.targetEnemy = _root.targetHeroClip;
this.yvel = this.yMove;
this.gravity = 0.1;
this.thrust = 1;
this.distance = 0;
this.life = 60;
this.dieFlag = false;
this.rotationAngle = 5;
this.bulletCounter = 0;
this.blastFlag = false;
this.bulletHitFlag = false;
this.xvel = -this.thrust;
this.trackFlag = false;
};
fishObject2.prototype.xMovement = function () {
this.clip._x = this.clip._x + this.xvel;
this.xvel = this.xvel + this.gravity;
if (this.xvel >= this.thrust) {
this.gravity = 0.1;
this.thrust = 1;
this.xvel = -this.thrust;
}
};
fishObject2.prototype.yMovement = function () {
if (!this.trackFlag) {
this.clip._y = this.clip._y - this.yvel;
if (this.clip._y < -500) {
this.clip.removeMovieClip();
}
}
};
fishObject2.prototype.getXDistance = function () {
return(Math.abs(this.targetEnemy._x - this.clip._x));
};
fishObject2.prototype.rotateObject = function () {
this.clip._rotation = this.clip._rotation + this.rotationAngle;
if (this.clip._rotation > 30) {
this.rotationAngle = this.rotationAngle * -1;
} else if (this.clip._rotation < -30) {
this.rotationAngle = this.rotationAngle * -1;
}
};
fishObject2.prototype.checkCollision = function () {
if ((this.clip.head.hitTest(this.targetEnemy.body) && (!_root.shieldStatus)) && (!_root.dieStatus)) {
_root.heroBlood = _root.heroBlood - 15;
this.targetEnemy.gotoAndStop("hit");
}
};
fishObject2.prototype.fishMove = function () {
this.yMovement();
this.xMovement();
};
fishObject2.prototype.reBounce = function () {
this.xvel = this.xvel * -1;
this.clip._y = 50 + random(400);
this.clip._xscale = this.clip._xscale * -1;
};
fishObject2.prototype.onEnterFrame = function () {
if (!_root.freezeStatus) {
this.objectRef.fishMove();
}
this.objectRef.checkCollision();
};
fishObject3 = function () {
this.objectRef = this;
this.init();
};
fishObject3.prototype = new fishObject2();
fishObject3.prototype.init = function () {
super.init();
};
fishObject3.prototype.yMovement = function () {
if (!this.trackFlag) {
this.clip._y = this.clip._y + this.yvel;
if (this.clip._y > 500) {
this.clip.removeMovieClip();
}
}
};
Object.registerClass("enemy2", fishObject2);
Object.registerClass("enemy4", fishObject3);
powerupObject = function () {
this.objectRef = this;
this.init();
};
powerupObject.prototype = new fishObject2();
powerupObject.protoype.init = function () {
super.init();
};
powerupObject.prototype.checkCollision = function () {
if (this.clip.lclip.head.hitTest(this.targetEnemy.body)) {
this.clip.lclip.gotoAndStop("die");
}
};
powerupObject.prototype.onEnterFrame = function () {
if (!_root.freezeStatus) {
this.objectRef.fishMove();
}
this.objectRef.checkCollision();
};
Object.registerClass("bonusPowerup", powerupObject);
Object.registerClass("freezePowerup", powerupObject);
Object.registerClass("shieldPowerup", powerupObject);
Object.registerClass("trackPowerup", powerupObject);
Object.registerClass("lifePowerup", powerupObject);
function createWeed() {
if (!_root.freezeStatus) {
_global.tempName = "weed" + _root.weedDepth;
_global.xVal = (1 + random(9)) * 60;
var _local4 = this.attachMovie("weed1", _global.tempName, _root.weedDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:500, directiony:-1, yMove:3, xMove:0});
_root.weedArray.push(_local4);
_root.weedNum = 1;
_root.weedDepth++;
}
}
function createWeed2() {
if (!_root.freezeStatus) {
_global.tempName = "weed" + _root.weedDepth;
_global.xVal = ((1 + random(9)) * 60) * -1;
var _local4 = this.attachMovie("weed1", _global.tempName, _root.weedDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:500, directiony:-1, yMove:3, xMove:0});
_root.weedArray.push(_local4);
_root.weedNum = 1;
_root.weedDepth++;
}
}
function createWeed3() {
if (!_root.freezeStatus) {
_global.tempName = "weed2_" + _root.weedDepth;
_global.yVal = ((1 + random(8)) * 50) * 1;
var _local4 = this.attachMovie("weed2", _global.tempName, _root.weedDepth, {clipRef:_global.tempName, initx:600, inity:_global.yVal, directionx:-1, xMove:2, yMove:0});
_root.weedArray.push(_local4);
_root.weedNum = 2;
_root.weedDepth++;
}
}
function createWeed4() {
if (!_root.freezeStatus) {
_global.tempName = "weed2_" + _root.weedDepth;
_global.yVal = ((1 + random(8)) * 50) * 1;
var _local4 = this.attachMovie("weed2", _global.tempName, _root.weedDepth, {clipRef:_global.tempName, initx:-600, inity:_global.yVal, directionx:1, xMove:3, yMove:0});
_root.weedArray.push(_local4);
_root.weedNum = 2;
_root.weedDepth++;
}
}
function createWeed5() {
if (!_root.freezeStatus) {
_global.tempName = "weed2_" + _root.weedDepth;
_global.yVal = ((1 + random(8)) * 50) * -1;
var _local4 = this.attachMovie("weed2", _global.tempName, _root.weedDepth, {clipRef:_global.tempName, initx:-600, inity:_global.yVal, directionx:1, xMove:3, yMove:0});
_root.weedArray.push(_local4);
_root.weedNum = 2;
_root.weedDepth++;
}
}
function createWeed6() {
if (!_root.freezeStatus) {
_global.tempName = "weed2_" + _root.weedDepth;
_global.yVal = ((1 + random(8)) * 50) * -1;
var _local4 = this.attachMovie("weed2", _global.tempName, _root.weedDepth, {clipRef:_global.tempName, initx:-600, inity:_global.yVal, directionx:1, xMove:3, yMove:0});
_root.weedArray.push(_local4);
_root.weedNum = 2;
_root.weedDepth++;
}
}
function createEnemy() {
_global.tempName = "enemy" + _root.enemyDepth;
_global.yVal = ((1 + random(9)) * 50) * 1;
var _local4 = this.attachMovie("enemy8", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:-650, inity:_global.yVal, direction:1, xMove:-10});
_root.enemyArray.push(_local4);
_root.enemyNum = 1;
_root.enemyDepth++;
clearInterval(_root.myInterval7);
}
function createEnemy2() {
_global.tempName = "enemy" + _root.enemyDepth;
_global.yVal = ((1 + random(9)) * 50) * -1;
var _local4 = this.attachMovie("enemy6", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:650, inity:_global.yVal, direction:-1, xMove:13});
_root.enemyArray.push(_local4);
_root.enemyNum = 1;
_root.enemyDepth++;
clearInterval(_root.myInterval8);
}
function createEnemy3() {
_global.tempName = "enemy" + _root.enemyDepth;
_global.yVal = (1 + random(9)) * 50;
var _local4 = this.attachMovie("enemy7", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:-650, inity:_global.yVal, direction:1, xMove:-12});
_root.enemyArray.push(_local4);
_root.enemyNum = 1;
_root.enemyDepth++;
clearInterval(_root.myInterval9);
}
function createEnemy4() {
_global.tempName = "enemy" + _root.enemyDepth;
_global.yVal = (1 + random(9)) * 50;
var _local4 = this.attachMovie("enemy5", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:-650, inity:_global.yVal, direction:1, xMove:-11});
_root.enemyArray.push(_local4);
_root.enemyNum = 1;
_root.enemyDepth++;
clearInterval(_root.myInterval10);
}
function createEnemy5() {
if (!_root.freezeStatus) {
_global.tempName = "enemy" + _root.enemyDepth;
_global.xVal = ((1 + random(8)) * 60) * 1;
var _local4 = this.attachMovie("enemy2", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:6});
_root.enemyArray.push(_local4);
_root.enemyNum = 1;
_root.enemyDepth++;
}
}
function createEnemy6() {
if (!_root.freezeStatus) {
_global.tempName = "enemy" + _root.enemyDepth;
_global.xVal = ((1 + random(8)) * 60) * 1;
var _local4 = this.attachMovie("enemy4", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:-700, direction:1, yMove:7});
_root.enemyArray.push(_local4);
_root.enemyNum = 1;
_root.enemyDepth++;
}
}
function getxVal() {
var _local1 = random(2);
trace(_local1);
if (_local1 == 0) {
val = 50 + (random(500) * 1);
} else {
val = 50 + (random(500) * -1);
}
return(val);
}
function createBonusPowerup() {
if (!_root.freezeStatus) {
_global.tempName = "powerup" + _root.enemyDepth;
_global.xVal = getxVal();
this.attachMovie("bonusPowerup", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:6});
_root.enemyDepth++;
}
}
function createLifePowerup() {
if (!_root.freezeStatus) {
_global.tempName = "powerup" + _root.enemyDepth;
_global.xVal = getxVal();
this.attachMovie("lifePowerup", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:6});
_root.enemyDepth++;
}
}
function createFreezePowerup() {
if (!_root.freezeStatus) {
_global.tempName = "powerup" + _root.enemyDepth;
_global.xVal = getxVal();
this.attachMovie("freezePowerup", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:6});
_root.enemyDepth++;
}
}
function createShieldPowerup() {
if (!_root.freezeStatus) {
_global.tempName = "powerup" + _root.enemyDepth;
_global.xVal = getxVal();
this.attachMovie("shieldPowerup", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:6});
_root.enemyDepth++;
}
}
function createTrackPowerup() {
if (!_root.freezeStatus) {
_global.tempName = "powerup" + _root.enemyDepth;
_global.xVal = getxVal();
this.attachMovie("trackPowerup", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:6});
_root.enemyDepth++;
}
}
function setFreeze() {
clearInterval(_root.myInterval13);
_root.freezeStatus = true;
_root.myInterval13_1 = setInterval(this, "resetFreezePowerup", 8000);
}
function resetFreezePowerup() {
clearInterval(_root.myInterval13_1);
_root.myInterval13 = setInterval(this, "createFreezePowerup", 11400);
_root.freezeStatus = false;
}
function setShield() {
clearInterval(_root.myInterval14);
_parent.hero_mc.shieldClip.gotoAndStop(2);
_root.shieldStatus = true;
_root.myInterval14_1 = setInterval(this, "resetShieldPowerup", 10000);
}
function resetShieldPowerup() {
_parent.hero_mc.shieldClip.gotoAndStop(1);
clearInterval(_root.myInterval14_1);
_root.myInterval14 = setInterval(this, "createShieldPowerup", 15300);
_root.shieldStatus = false;
}
function setLife() {
_root.heroLife = _root.heroLife + 1;
}
function setTrack() {
clearInterval(_root.myInterval15);
_root.trackUserStatus = true;
_root.myInterval15_1 = setInterval(this, "resetTrackPowerup", 2000);
}
function resetTrackPowerup() {
clearInterval(_root.myInterval15_1);
_root.myInterval15 = setInterval(this, "createTrackPowerup", 14200);
_root.trackUserStatus = false;
}
stop();
if (!_root.createFish1Flag) {
_global.tempName = "fish1";
this.attachMovie("fish01", _global.tempName, 50000, {clipRef:_global.tempName, initx:650, inity:-100, direction:-1, xMove:6});
_root.fishNum = 1;
_root.createFish1Flag = true;
}
if (!_root.createFish2Flag) {
_global.tempName = "fish2";
this.attachMovie("fish02", _global.tempName, 50001, {clipRef:_global.tempName, initx:-650, inity:100, direction:1, xMove:4});
_root.fishNum = 2;
_root.createFish2Flag = true;
}
if (!_root.createFish3Flag) {
_global.tempName = "fish3";
this.attachMovie("fish03", _global.tempName, 50002, {clipRef:_global.tempName, initx:-650, inity:-200, direction:1, xMove:6});
_root.fishNum = 3;
_root.createFish3Flag = true;
}
if (!_root.createFish4Flag) {
_global.tempName = "fish4";
this.attachMovie("fish04", _global.tempName, 50003, {clipRef:_global.tempName, initx:650, inity:200, direction:-1, xMove:5});
_root.fishNum = 4;
_root.createFish4Flag = true;
}
_root.targetHeroClip = _parent.hero_mc;
_root.weedCounter = 0;
_root.weedDepth = 65000;
_root.enemyDepth = 85000 /* 0x014C08 */;
_root.enemyArray = new Array();
_root.weedArray = new Array();
_root.myInterval1 = setInterval(this, "createWeed", 1100);
_root.myInterval2 = setInterval(this, "createWeed2", 2300);
_root.myInterval3 = setInterval(this, "createWeed3", 1600);
_root.myInterval4 = setInterval(this, "createWeed4", 2900);
_root.myInterval5 = setInterval(this, "createWeed5", 1900);
_root.myInterval6 = setInterval(this, "createWeed6", 1700);
_root.myInterval7 = setInterval(this, "createEnemy", 3100);
_root.myInterval8 = setInterval(this, "createEnemy2", 4100);
_root.myInterval9 = setInterval(this, "createEnemy3", 10100);
_root.myInterval10 = setInterval(this, "createEnemy4", 11100);
_root.myInterval11 = setInterval(this, "createEnemy5", 12100);
_root.myInterval21 = setInterval(this, "createEnemy6", 14100);
_root.myInterval12 = setInterval(this, "createBonusPowerup", 9100);
_root.myInterval14 = setInterval(this, "createLifePowerup", 31300);
_root.myInterval15 = setInterval(this, "createTrackPowerup", 14200);
Symbol 446 MovieClip Frame 2
heliObject = function () {
this.objectRef = this;
this.init();
};
heliObject.prototype = new MovieClip();
heliObject.prototype.init = function () {
this.clip = eval (this.clipRef);
this.clip._x = this.initx;
this.clip._y = this.inity;
this.bulletFlag = false;
this.bulletLocation = _root.stageMC;
this.targetEnemy = _root.targetHeroClip;
this.xvel = this.xMove;
this.gravity = 0.1;
this.thrust = 1;
this.distance = 0;
this.life = 60;
this.dieFlag = false;
this.rotationAngle = 1;
this.bulletCounter = 0;
this.blastFlag = false;
this.bulletHitFlag = false;
this.yvel = -this.thrust;
this.trackFlag = false;
};
heliObject.prototype.yMovement = function () {
this.clip._y = this.clip._y + this.yvel;
this.yvel = this.yvel + this.gravity;
if (this.yvel >= this.thrust) {
this.gravity = 0.1;
this.thrust = 1;
this.yvel = -this.thrust;
}
};
heliObject.prototype.xMovement = function () {
if (!this.trackFlag) {
this.clip._x = this.clip._x - this.xvel;
if (this.clip._x < -650) {
this.clip._x = -650;
this.reBounce();
} else if (this.clip._x > 1220) {
this.clip._x = 1220;
this.reBounce();
}
}
};
heliObject.prototype.getXDistance = function () {
return(Math.abs(this.targetEnemy._x - this.clip._x));
};
heliObject.prototype.rotateObject = function () {
this.clip._rotation = this.clip._rotation + this.rotationAngle;
if (this.clip._rotation > 3) {
this.rotationAngle = this.rotationAngle * -1;
} else if (this.clip._rotation < -3) {
this.rotationAngle = this.rotationAngle * -1;
}
};
heliObject.prototype.heliMove = function () {
this.yMovement();
this.xMovement();
this.rotateObject();
};
heliObject.prototype.reBounce = function () {
this.xvel = this.xvel * -1;
this.clip._y = this.inity;
this.clip._xscale = this.clip._xscale * -1;
};
heliObject.prototype.onEnterFrame = function () {
if (!_root.freezeStatus) {
this.objectRef.heliMove();
}
};
Object.registerClass("fish01", heliObject);
Object.registerClass("fish02", heliObject);
Object.registerClass("fish03", heliObject);
Object.registerClass("fish04", heliObject);
weedObject = function () {
this.objectRef = this;
this.init();
};
weedObject.prototype = new MovieClip();
weedObject.prototype.init = function () {
this.clip = eval (this.clipRef);
this.clip._x = this.initx;
this.clip._y = this.inity;
this.xvel = this.xMove;
this.yvel = this.yMove;
this.minx = -600;
this.maxx = 600;
this.miny = -500;
this.maxy = 500;
this.targetEnemy = _root.targetHeroClip;
this.rotationAngle = 1;
var randomNum = random(4);
if (randomNum == 0) {
this.clip.gotoAndStop(5);
} else {
this.clip.gotoAndStop(1 + random(3));
}
this.checkDirection();
};
weedObject.prototype.yMovement = function () {
this.clip._y = this.clip._y - this.yvel;
if (this.clip._y < this.miny) {
_root.createWeed1Flag = false;
this.removeMovieClip();
}
if (this.clip._y > this.maxy) {
_root.createWeed1Flag = false;
this.removeMovieClip();
}
};
weedObject.prototype.xMovement = function () {
this.clip._x = this.clip._x - this.xvel;
if (this.clip._x < this.minx) {
_root.createWeed1Flag = false;
this.removeMovieClip();
}
if (this.clip._x > this.maxx) {
_root.createWeed1Flag = false;
this.removeMovieClip();
}
};
weedObject.prototype.checkCollision = function () {
if (this.clip.head.hitTest(this.targetEnemy.head)) {
if (!this.clip.poisonStatus) {
_root.weedCounter = _root.weedCounter + 0.5;
this.removeClip();
} else {
if (_root.weedCounter > 2) {
} else {
_root.weedCounter = 0;
}
this.removeClip2();
}
}
};
weedObject.prototype.removeClip = function () {
this.clip.gotoAndStop("die");
_root.createWeed1Flag = false;
};
weedObject.prototype.removeClip2 = function () {
this.clip.gotoAndStop("die2");
_root.createWeed1Flag = false;
};
weedObject.prototype.trackUser = function () {
if (!this.clip.poisonStatus) {
var _local2 = {x:_xmouse, y:_ymouse};
this.clip._x = this.clip._x + ((_local2.x - this.clip._x) / 10);
this.clip._y = this.clip._y + ((_local2.y - this.clip._y) / 10);
}
};
weedObject.prototype.checkDirection = function () {
if (this.directiony == -1) {
this.yvel = this.yvel * 1;
} else if (this.directiony == 1) {
this.yvel = this.yvel * -1;
}
if (this.directionx == -1) {
this.xvel = this.xvel * 1;
} else if (this.directionx == 1) {
this.xvel = this.xvel * -1;
}
};
weedObject.prototype.weedMove = function () {
if (!_root.trackUserStatus) {
if (yvel != 0) {
this.yMovement();
}
if (xvel != 0) {
this.xMovement();
}
} else {
this.trackUser();
}
};
weedObject.prototype.onEnterFrame = function () {
trace("move");
if (!_root.freezeStatus) {
this.objectRef.weedMove();
}
this.objectRef.checkCollision();
};
Object.registerClass("weed1", weedObject);
Object.registerClass("weed2", weedObject);
fishObject = function () {
this.objectRef = this;
this.init();
};
fishObject.prototype = new MovieClip();
fishObject.prototype.init = function () {
this.clip = eval (this.clipRef);
this.clip._x = this.initx;
this.clip._y = this.inity;
this.bulletFlag = false;
this.bulletLocation = _root.stageMC;
this.targetEnemy = _root.targetHeroClip;
this.xvel = this.xMove;
this.gravity = 0.1;
this.thrust = 1;
this.distance = 0;
this.life = 60;
this.maxx = 970;
this.minx = -970;
this.dieFlag = false;
this.rotationAngle = 5;
this.bulletCounter = 0;
this.blastFlag = false;
this.bulletHitFlag = false;
this.yvel = -this.thrust;
this.trackFlag = false;
if (this.direction == 1) {
this.clip._xscale = 100;
} else if (this.direction == -1) {
this.clip._xscale = -100;
}
};
fishObject.prototype.yMovement = function () {
this.clip._y = this.clip._y + this.yvel;
this.yvel = this.yvel + this.gravity;
if (this.yvel >= this.thrust) {
this.gravity = 0.1;
this.thrust = 1;
this.yvel = -this.thrust;
}
};
fishObject.prototype.changeTrack = function () {
if (this.trackFlag) {
this.trackFlag = false;
} else {
this.trackFlag = true;
}
};
fishObject.prototype.xMovement = function () {
if (!this.trackFlag) {
this.clip._x = this.clip._x - this.xvel;
if (this.clip._x < this.minx) {
this.clip._x = this.minx;
this.reBounce();
} else if (this.clip._x > this.maxx) {
this.clip._x = this.maxx;
this.reBounce();
}
} else {
this.clip._x = this.clip._x + ((_xmouse - this.clip._x) / 15);
this.clip._y = this.clip._y + ((_ymouse - this.clip._y) / 15);
dist_x = _xmouse - this.clip._x;
dist_y = _ymouse - this.clip._y;
angle = Math.atan(dist_y / dist_x) / (Math.PI/180);
this._rotation = angle;
}
};
fishObject.prototype.getXDistance = function () {
return(Math.abs(this.targetEnemy._x - this.clip._x));
};
fishObject.prototype.rotateObject = function () {
this.clip._rotation = this.clip._rotation + this.rotationAngle;
if (this.clip._rotation > 30) {
this.rotationAngle = this.rotationAngle * -1;
} else if (this.clip._rotation < -30) {
this.rotationAngle = this.rotationAngle * -1;
}
};
fishObject.prototype.checkCollision = function () {
if ((this.clip.head.hitTest(this.targetEnemy.body) && (!_root.shieldStatus)) && (!_root.dieStatus)) {
_root.heroBlood = _root.heroBlood - 20;
this.targetEnemy.gotoAndStop("hit");
}
};
fishObject.prototype.fishMove = function () {
this.yMovement();
this.xMovement();
};
fishObject.prototype.reBounce = function () {
this.xvel = this.xvel * -1;
var _local2 = random(10);
if ((_local2 == 0) || (_local2 == 1)) {
this.trackFlag = false;
this.clip._y = 20 + (random(480) * 1);
} else if ((_local2 == 2) || (_local2 == 3)) {
this.trackFlag = false;
this.clip._y = 20 + (random(480) * -1);
} else {
this.trackFlag = false;
this.clip._y = _ymouse;
if (this.clip._y > 500) {
this.clip._y = 450;
} else if (this.clip._y < -500) {
this.clip._y = -450;
}
}
this.clip._xscale = this.clip._xscale * -1;
};
fishObject.prototype.onEnterFrame = function () {
if (!_root.freezeStatus) {
this.objectRef.fishMove();
}
this.objectRef.checkCollision();
};
fishObject4 = function () {
this.objectRef = this;
this.init();
};
fishObject4.prototype = new fishObject();
fishObject4.prototype.init = function () {
super.init();
this.maxx = 870;
this.minx = -870;
};
fishObject4.prototype.checkCollision = function () {
if (((this.clip.head.hitTest(this.targetEnemy.body) && (!_root.shieldStatus)) && (!_root.dieStatus)) && (!this.clip.animation)) {
if (_root.heroLife > 0) {
if (_root.heroBlood > 0) {
_root.heroLife = _root.heroLife - 1;
_root.heroBlood = 100;
} else {
_root.heroLife = _root.heroLife - 1;
}
} else {
_root.heroBlood = 0;
}
this.clip.gotoAndPlay("grab");
this.clip.animation = true;
}
};
fishObject5 = function () {
this.objectRef = this;
this.init();
};
fishObject5.prototype = new fishObject();
fishObject5.prototype.init = function () {
super.init();
this.maxx = 1170;
this.minx = -1170;
};
fishObject5.prototype.checkCollision = function () {
if (((this.clip.head.hitTest(this.targetEnemy.body) && (!_root.shieldStatus)) && (!_root.dieStatus)) && (!_root.crazyStatus)) {
_root.controller = 30;
_root.maxSpeed = 10;
this.targetEnemy.crazyClip.gotoAndStop(2);
_root.crazyStatus = true;
_root.pufferInterval = setInterval(this, "restore", 15000);
}
};
fishObject5.prototype.restore = function () {
clearInterval(_root.pufferInterval);
_root.crazyStatus = false;
this.targetEnemy.crazyClip.gotoAndStop(1);
_root.controller = 4;
_root.maxSpeed = 2;
};
Object.registerClass("enemy1", fishObject);
Object.registerClass("enemy7", fishObject);
Object.registerClass("enemy8", fishObject);
Object.registerClass("enemy5", fishObject4);
Object.registerClass("enemy6", fishObject5);
fishObject2 = function () {
this.objectRef = this;
this.init();
};
fishObject2.prototype = new MovieClip();
fishObject2.prototype.init = function () {
this.clip = eval (this.clipRef);
this.clip._x = this.initx;
this.clip._y = this.inity;
this.bulletFlag = false;
this.bulletLocation = _root.stageMC;
this.targetEnemy = _root.targetHeroClip;
this.yvel = this.yMove;
this.gravity = 0.1;
this.thrust = 1;
this.distance = 0;
this.life = 60;
this.dieFlag = false;
this.rotationAngle = 5;
this.bulletCounter = 0;
this.blastFlag = false;
this.bulletHitFlag = false;
this.xvel = -this.thrust;
this.trackFlag = false;
};
fishObject2.prototype.xMovement = function () {
this.clip._x = this.clip._x + this.xvel;
this.xvel = this.xvel + this.gravity;
if (this.xvel >= this.thrust) {
this.gravity = 0.1;
this.thrust = 1;
this.xvel = -this.thrust;
}
};
fishObject2.prototype.yMovement = function () {
if (!this.trackFlag) {
this.clip._y = this.clip._y - this.yvel;
if (this.clip._y < -500) {
this.clip.removeMovieClip();
}
}
};
fishObject2.prototype.getXDistance = function () {
return(Math.abs(this.targetEnemy._x - this.clip._x));
};
fishObject2.prototype.rotateObject = function () {
this.clip._rotation = this.clip._rotation + this.rotationAngle;
if (this.clip._rotation > 30) {
this.rotationAngle = this.rotationAngle * -1;
} else if (this.clip._rotation < -30) {
this.rotationAngle = this.rotationAngle * -1;
}
};
fishObject2.prototype.checkCollision = function () {
if ((this.clip.head.hitTest(this.targetEnemy.body) && (!_root.shieldStatus)) && (!_root.dieStatus)) {
_root.heroBlood = _root.heroBlood - 15;
this.targetEnemy.gotoAndStop("hit");
}
};
fishObject2.prototype.fishMove = function () {
this.yMovement();
this.xMovement();
};
fishObject2.prototype.reBounce = function () {
this.xvel = this.xvel * -1;
this.clip._y = 50 + random(400);
this.clip._xscale = this.clip._xscale * -1;
};
fishObject2.prototype.onEnterFrame = function () {
if (!_root.freezeStatus) {
this.objectRef.fishMove();
}
this.objectRef.checkCollision();
};
fishObject3 = function () {
this.objectRef = this;
this.init();
};
fishObject3.prototype = new fishObject2();
fishObject3.prototype.init = function () {
super.init();
};
fishObject3.prototype.yMovement = function () {
if (!this.trackFlag) {
this.clip._y = this.clip._y + this.yvel;
if (this.clip._y > 500) {
this.clip.removeMovieClip();
}
}
};
Object.registerClass("enemy2", fishObject2);
Object.registerClass("enemy4", fishObject3);
powerupObject = function () {
this.objectRef = this;
this.init();
};
powerupObject.prototype = new fishObject2();
powerupObject.protoype.init = function () {
super.init();
};
powerupObject.prototype.checkCollision = function () {
if (this.clip.lclip.head.hitTest(this.targetEnemy.body)) {
this.clip.lclip.gotoAndStop("die");
}
};
powerupObject.prototype.onEnterFrame = function () {
if (!_root.freezeStatus) {
this.objectRef.fishMove();
}
this.objectRef.checkCollision();
};
Object.registerClass("bonusPowerup", powerupObject);
Object.registerClass("freezePowerup", powerupObject);
Object.registerClass("shieldPowerup", powerupObject);
Object.registerClass("trackPowerup", powerupObject);
Object.registerClass("lifePowerup", powerupObject);
function createWeed() {
if (!_root.freezeStatus) {
_global.tempName = "weed" + _root.weedDepth;
_global.xVal = (1 + random(9)) * 60;
var _local4 = this.attachMovie("weed1", _global.tempName, _root.weedDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:500, directiony:-1, yMove:3, xMove:0});
_root.weedArray.push(_local4);
_root.weedNum = 1;
_root.weedDepth++;
}
}
function createWeed2() {
if (!_root.freezeStatus) {
_global.tempName = "weed" + _root.weedDepth;
_global.xVal = ((1 + random(9)) * 60) * -1;
var _local4 = this.attachMovie("weed1", _global.tempName, _root.weedDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:500, directiony:-1, yMove:3, xMove:0});
_root.weedArray.push(_local4);
_root.weedNum = 1;
_root.weedDepth++;
}
}
function createWeed3() {
if (!_root.freezeStatus) {
_global.tempName = "weed2_" + _root.weedDepth;
_global.yVal = ((1 + random(8)) * 50) * 1;
var _local4 = this.attachMovie("weed2", _global.tempName, _root.weedDepth, {clipRef:_global.tempName, initx:600, inity:_global.yVal, directionx:-1, xMove:2, yMove:0});
_root.weedArray.push(_local4);
_root.weedNum = 2;
_root.weedDepth++;
}
}
function createWeed4() {
if (!_root.freezeStatus) {
_global.tempName = "weed2_" + _root.weedDepth;
_global.yVal = ((1 + random(8)) * 50) * 1;
var _local4 = this.attachMovie("weed2", _global.tempName, _root.weedDepth, {clipRef:_global.tempName, initx:-600, inity:_global.yVal, directionx:1, xMove:3, yMove:0});
_root.weedArray.push(_local4);
_root.weedNum = 2;
_root.weedDepth++;
}
}
function createWeed5() {
if (!_root.freezeStatus) {
_global.tempName = "weed2_" + _root.weedDepth;
_global.yVal = ((1 + random(8)) * 50) * -1;
var _local4 = this.attachMovie("weed2", _global.tempName, _root.weedDepth, {clipRef:_global.tempName, initx:-600, inity:_global.yVal, directionx:1, xMove:3, yMove:0});
_root.weedArray.push(_local4);
_root.weedNum = 2;
_root.weedDepth++;
}
}
function createWeed6() {
if (!_root.freezeStatus) {
_global.tempName = "weed2_" + _root.weedDepth;
_global.yVal = ((1 + random(8)) * 50) * -1;
var _local4 = this.attachMovie("weed2", _global.tempName, _root.weedDepth, {clipRef:_global.tempName, initx:-600, inity:_global.yVal, directionx:1, xMove:3, yMove:0});
_root.weedArray.push(_local4);
_root.weedNum = 2;
_root.weedDepth++;
}
}
function createEnemy() {
_global.tempName = "enemy" + _root.enemyDepth;
_global.yVal = ((1 + random(9)) * 50) * 1;
var _local4 = this.attachMovie("enemy5", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:-650, inity:_global.yVal, direction:1, xMove:-12});
_root.enemyArray.push(_local4);
_root.enemyNum = 1;
_root.enemyDepth++;
clearInterval(_root.myInterval7);
}
function createEnemy2() {
_global.tempName = "enemy" + _root.enemyDepth;
_global.yVal = ((1 + random(9)) * 50) * -1;
var _local4 = this.attachMovie("enemy6", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:650, inity:_global.yVal, direction:-1, xMove:13});
_root.enemyArray.push(_local4);
_root.enemyNum = 1;
_root.enemyDepth++;
clearInterval(_root.myInterval8);
}
function createEnemy3() {
_global.tempName = "enemy" + _root.enemyDepth;
_global.yVal = (1 + random(9)) * 50;
var _local4 = this.attachMovie("enemy7", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:-650, inity:_global.yVal, direction:1, xMove:-13});
_root.enemyArray.push(_local4);
_root.enemyNum = 1;
_root.enemyDepth++;
clearInterval(_root.myInterval9);
}
function createEnemy4() {
_global.tempName = "enemy" + _root.enemyDepth;
_global.yVal = (1 + random(9)) * 50;
var _local4 = this.attachMovie("enemy5", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:-650, inity:_global.yVal, direction:1, xMove:-13});
_root.enemyArray.push(_local4);
_root.enemyNum = 1;
_root.enemyDepth++;
clearInterval(_root.myInterval10);
}
function createEnemy5() {
if (!_root.freezeStatus) {
_global.tempName = "enemy" + _root.enemyDepth;
_global.xVal = ((1 + random(8)) * 60) * 1;
var _local4 = this.attachMovie("enemy2", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:6});
_root.enemyArray.push(_local4);
_root.enemyNum = 1;
_root.enemyDepth++;
}
}
function createEnemy6() {
if (!_root.freezeStatus) {
_global.tempName = "enemy" + _root.enemyDepth;
_global.xVal = ((1 + random(8)) * 60) * 1;
var _local4 = this.attachMovie("enemy4", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:-700, direction:1, yMove:7});
_root.enemyArray.push(_local4);
_root.enemyNum = 1;
_root.enemyDepth++;
}
}
function getxVal() {
var _local1 = random(2);
trace(_local1);
if (_local1 == 0) {
val = 50 + (random(500) * 1);
} else {
val = 50 + (random(500) * -1);
}
return(val);
}
function createBonusPowerup() {
if (!_root.freezeStatus) {
_global.tempName = "powerup" + _root.enemyDepth;
_global.xVal = getxVal();
this.attachMovie("bonusPowerup", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:6});
_root.enemyDepth++;
}
}
function createLifePowerup() {
if (!_root.freezeStatus) {
_global.tempName = "powerup" + _root.enemyDepth;
_global.xVal = getxVal();
this.attachMovie("lifePowerup", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:6});
_root.enemyDepth++;
}
}
function createFreezePowerup() {
if (!_root.freezeStatus) {
_global.tempName = "powerup" + _root.enemyDepth;
_global.xVal = getxVal();
this.attachMovie("freezePowerup", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:6});
_root.enemyDepth++;
}
}
function createShieldPowerup() {
if (!_root.freezeStatus) {
_global.tempName = "powerup" + _root.enemyDepth;
_global.xVal = getxVal();
this.attachMovie("shieldPowerup", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:6});
_root.enemyDepth++;
}
}
function createTrackPowerup() {
if (!_root.freezeStatus) {
_global.tempName = "powerup" + _root.enemyDepth;
_global.xVal = getxVal();
this.attachMovie("trackPowerup", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:6});
_root.enemyDepth++;
}
}
function setFreeze() {
clearInterval(_root.myInterval13);
_root.freezeStatus = true;
_root.myInterval13_1 = setInterval(this, "resetFreezePowerup", 8000);
}
function resetFreezePowerup() {
clearInterval(_root.myInterval13_1);
_root.myInterval13 = setInterval(this, "createFreezePowerup", 11400);
_root.freezeStatus = false;
}
function setShield() {
clearInterval(_root.myInterval14);
_parent.hero_mc.shieldClip.gotoAndStop(2);
_root.shieldStatus = true;
_root.myInterval14_1 = setInterval(this, "resetShieldPowerup", 10000);
}
function resetShieldPowerup() {
_parent.hero_mc.shieldClip.gotoAndStop(1);
clearInterval(_root.myInterval14_1);
_root.myInterval14 = setInterval(this, "createShieldPowerup", 15300);
_root.shieldStatus = false;
}
function setLife() {
_root.heroLife = _root.heroLife + 1;
}
function setTrack() {
clearInterval(_root.myInterval15);
_root.trackUserStatus = true;
_root.myInterval15_1 = setInterval(this, "resetTrackPowerup", 2000);
}
function resetTrackPowerup() {
clearInterval(_root.myInterval15_1);
_root.myInterval15 = setInterval(this, "createTrackPowerup", 14200);
_root.trackUserStatus = false;
}
stop();
if (!_root.createFish1Flag) {
_global.tempName = "fish1";
this.attachMovie("fish01", _global.tempName, 50000, {clipRef:_global.tempName, initx:650, inity:-100, direction:-1, xMove:6});
_root.fishNum = 1;
_root.createFish1Flag = true;
}
if (!_root.createFish2Flag) {
_global.tempName = "fish2";
this.attachMovie("fish02", _global.tempName, 50001, {clipRef:_global.tempName, initx:-650, inity:100, direction:1, xMove:4});
_root.fishNum = 2;
_root.createFish2Flag = true;
}
if (!_root.createFish3Flag) {
_global.tempName = "fish3";
this.attachMovie("fish03", _global.tempName, 50002, {clipRef:_global.tempName, initx:-650, inity:-200, direction:1, xMove:6});
_root.fishNum = 3;
_root.createFish3Flag = true;
}
if (!_root.createFish4Flag) {
_global.tempName = "fish4";
this.attachMovie("fish04", _global.tempName, 50003, {clipRef:_global.tempName, initx:650, inity:200, direction:-1, xMove:5});
_root.fishNum = 4;
_root.createFish4Flag = true;
}
_root.targetHeroClip = _parent.hero_mc;
_root.weedCounter = 0;
_root.weedDepth = 65000;
_root.enemyDepth = 85000 /* 0x014C08 */;
_root.enemyArray = new Array();
_root.weedArray = new Array();
_root.myInterval1 = setInterval(this, "createWeed", 1100);
_root.myInterval2 = setInterval(this, "createWeed2", 2300);
_root.myInterval3 = setInterval(this, "createWeed3", 1600);
_root.myInterval4 = setInterval(this, "createWeed4", 2900);
_root.myInterval5 = setInterval(this, "createWeed5", 1900);
_root.myInterval6 = setInterval(this, "createWeed6", 1700);
_root.myInterval7 = setInterval(this, "createEnemy", 3100);
_root.myInterval8 = setInterval(this, "createEnemy2", 4100);
_root.myInterval9 = setInterval(this, "createEnemy3", 10100);
_root.myInterval10 = setInterval(this, "createEnemy4", 11100);
_root.myInterval11 = setInterval(this, "createEnemy5", 12100);
_root.myInterval21 = setInterval(this, "createEnemy6", 14100);
_root.myInterval12 = setInterval(this, "createBonusPowerup", 9100);
_root.myInterval14 = setInterval(this, "createShieldPowerup", 8300);
_root.myInterval15 = setInterval(this, "createTrackPowerup", 14200);
_root.myInterval16 = setInterval(this, "createLifePowerup", 31300);
Symbol 447 MovieClip Frame 41
stop();
Symbol 451 MovieClip Frame 105
stop();
Symbol 452 MovieClip Frame 2
heliObject = function () {
this.objectRef = this;
this.init();
};
heliObject.prototype = new MovieClip();
heliObject.prototype.init = function () {
this.clip = eval (this.clipRef);
this.clip._x = this.initx;
this.clip._y = this.inity;
this.bulletFlag = false;
this.bulletLocation = _root.stageMC;
this.targetEnemy = _root.targetHeroClip;
this.xvel = this.xMove;
this.gravity = 0.1;
this.thrust = 1;
this.distance = 0;
this.life = 60;
this.dieFlag = false;
this.rotationAngle = 1;
this.bulletCounter = 0;
this.blastFlag = false;
this.bulletHitFlag = false;
this.yvel = -this.thrust;
this.trackFlag = false;
};
heliObject.prototype.yMovement = function () {
this.clip._y = this.clip._y + this.yvel;
this.yvel = this.yvel + this.gravity;
if (this.yvel >= this.thrust) {
this.gravity = 0.1;
this.thrust = 1;
this.yvel = -this.thrust;
}
};
heliObject.prototype.xMovement = function () {
if (!this.trackFlag) {
this.clip._x = this.clip._x - this.xvel;
if (this.clip._x < -650) {
this.clip._x = -650;
this.reBounce();
} else if (this.clip._x > 1220) {
this.clip._x = 1220;
this.reBounce();
}
}
};
heliObject.prototype.getXDistance = function () {
return(Math.abs(this.targetEnemy._x - this.clip._x));
};
heliObject.prototype.rotateObject = function () {
this.clip._rotation = this.clip._rotation + this.rotationAngle;
if (this.clip._rotation > 3) {
this.rotationAngle = this.rotationAngle * -1;
} else if (this.clip._rotation < -3) {
this.rotationAngle = this.rotationAngle * -1;
}
};
heliObject.prototype.heliMove = function () {
this.yMovement();
this.xMovement();
this.rotateObject();
};
heliObject.prototype.reBounce = function () {
this.xvel = this.xvel * -1;
this.clip._y = this.inity;
this.clip._xscale = this.clip._xscale * -1;
};
heliObject.prototype.onEnterFrame = function () {
if (!_root.freezeStatus) {
this.objectRef.heliMove();
}
};
Object.registerClass("fish01", heliObject);
Object.registerClass("fish02", heliObject);
Object.registerClass("fish03", heliObject);
Object.registerClass("fish04", heliObject);
weedObject = function () {
this.objectRef = this;
this.init();
};
weedObject.prototype = new MovieClip();
weedObject.prototype.init = function () {
this.clip = eval (this.clipRef);
this.clip._x = this.initx;
this.clip._y = this.inity;
this.xvel = this.xMove;
this.yvel = this.yMove;
this.minx = -600;
this.maxx = 600;
this.miny = -500;
this.maxy = 500;
this.targetEnemy = _root.targetHeroClip;
this.rotationAngle = 1;
var randomNum = random(4);
if (randomNum == 0) {
this.clip.gotoAndStop(5);
} else {
this.clip.gotoAndStop(1 + random(3));
}
this.checkDirection();
};
weedObject.prototype.yMovement = function () {
this.clip._y = this.clip._y - this.yvel;
if (this.clip._y < this.miny) {
_root.createWeed1Flag = false;
this.removeMovieClip();
}
if (this.clip._y > this.maxy) {
_root.createWeed1Flag = false;
this.removeMovieClip();
}
};
weedObject.prototype.xMovement = function () {
this.clip._x = this.clip._x - this.xvel;
if (this.clip._x < this.minx) {
_root.createWeed1Flag = false;
this.removeMovieClip();
}
if (this.clip._x > this.maxx) {
_root.createWeed1Flag = false;
this.removeMovieClip();
}
};
weedObject.prototype.checkCollision = function () {
if (this.clip.head.hitTest(this.targetEnemy.head)) {
if (!this.clip.poisonStatus) {
this.removeClip();
} else {
if (_root.weedCounter > 2) {
} else {
_root.weedCounter = 0;
}
this.removeClip2();
}
}
};
weedObject.prototype.removeClip = function () {
this.clip.gotoAndStop("die");
_root.createWeed1Flag = false;
};
weedObject.prototype.removeClip2 = function () {
this.clip.gotoAndStop("die2");
_root.createWeed1Flag = false;
};
weedObject.prototype.trackUser = function () {
if (!this.clip.poisonStatus) {
var _local2 = {x:_xmouse, y:_ymouse};
this.clip._x = this.clip._x + ((_local2.x - this.clip._x) / 10);
this.clip._y = this.clip._y + ((_local2.y - this.clip._y) / 10);
}
};
weedObject.prototype.checkDirection = function () {
if (this.directiony == -1) {
this.yvel = this.yvel * 1;
} else if (this.directiony == 1) {
this.yvel = this.yvel * -1;
}
if (this.directionx == -1) {
this.xvel = this.xvel * 1;
} else if (this.directionx == 1) {
this.xvel = this.xvel * -1;
}
};
weedObject.prototype.weedMove = function () {
if (!_root.trackUserStatus) {
if (yvel != 0) {
this.yMovement();
}
if (xvel != 0) {
this.xMovement();
}
} else {
this.trackUser();
}
};
weedObject.prototype.onEnterFrame = function () {
trace("move");
if (!_root.freezeStatus) {
this.objectRef.weedMove();
}
this.objectRef.checkCollision();
};
Object.registerClass("weed1", weedObject);
Object.registerClass("weed2", weedObject);
fishObject = function () {
this.objectRef = this;
this.init();
};
fishObject.prototype = new MovieClip();
fishObject.prototype.init = function () {
this.clip = eval (this.clipRef);
this.clip._x = this.initx;
this.clip._y = this.inity;
this.bulletFlag = false;
this.bulletLocation = _root.stageMC;
this.targetEnemy = _root.targetHeroClip;
this.xvel = this.xMove;
this.gravity = 0.1;
this.thrust = 1;
this.distance = 0;
this.life = 60;
this.maxx = 970;
this.minx = -970;
this.dieFlag = false;
this.rotationAngle = 5;
this.bulletCounter = 0;
this.blastFlag = false;
this.bulletHitFlag = false;
this.yvel = -this.thrust;
this.trackFlag = false;
if (this.direction == 1) {
this.clip._xscale = 100;
} else if (this.direction == -1) {
this.clip._xscale = -100;
}
};
fishObject.prototype.yMovement = function () {
this.clip._y = this.clip._y + this.yvel;
this.yvel = this.yvel + this.gravity;
if (this.yvel >= this.thrust) {
this.gravity = 0.1;
this.thrust = 1;
this.yvel = -this.thrust;
}
};
fishObject.prototype.changeTrack = function () {
if (this.trackFlag) {
this.trackFlag = false;
} else {
this.trackFlag = true;
}
};
fishObject.prototype.xMovement = function () {
if (!this.trackFlag) {
this.clip._x = this.clip._x - this.xvel;
if (this.clip._x < this.minx) {
this.clip._x = this.minx;
this.reBounce();
} else if (this.clip._x > this.maxx) {
this.clip._x = this.maxx;
this.reBounce();
}
} else {
this.clip._x = this.clip._x + ((_xmouse - this.clip._x) / 15);
this.clip._y = this.clip._y + ((_ymouse - this.clip._y) / 15);
dist_x = _xmouse - this.clip._x;
dist_y = _ymouse - this.clip._y;
angle = Math.atan(dist_y / dist_x) / (Math.PI/180);
this._rotation = angle;
}
};
fishObject.prototype.getXDistance = function () {
return(Math.abs(this.targetEnemy._x - this.clip._x));
};
fishObject.prototype.rotateObject = function () {
this.clip._rotation = this.clip._rotation + this.rotationAngle;
if (this.clip._rotation > 30) {
this.rotationAngle = this.rotationAngle * -1;
} else if (this.clip._rotation < -30) {
this.rotationAngle = this.rotationAngle * -1;
}
};
fishObject.prototype.checkCollision = function () {
if ((this.clip.head.hitTest(this.targetEnemy.body) && (!_root.shieldStatus)) && (!_root.dieStatus)) {
_root.heroBlood = _root.heroBlood - 20;
this.targetEnemy.gotoAndStop("hit");
}
};
fishObject.prototype.fishMove = function () {
this.yMovement();
this.xMovement();
};
fishObject.prototype.reBounce = function () {
this.xvel = this.xvel * -1;
var _local2 = random(10);
if ((_local2 == 0) || (_local2 == 1)) {
this.trackFlag = false;
this.clip._y = 20 + (random(480) * 1);
} else if ((_local2 == 2) || (_local2 == 3)) {
this.trackFlag = false;
this.clip._y = 20 + (random(480) * -1);
} else {
this.trackFlag = false;
this.clip._y = _ymouse;
if (this.clip._y > 500) {
this.clip._y = 450;
} else if (this.clip._y < -500) {
this.clip._y = -450;
}
}
this.clip._xscale = this.clip._xscale * -1;
};
fishObject.prototype.onEnterFrame = function () {
if (!_root.freezeStatus) {
this.objectRef.fishMove();
}
this.objectRef.checkCollision();
};
fishObject4 = function () {
this.objectRef = this;
this.init();
};
fishObject4.prototype = new fishObject();
fishObject4.prototype.init = function () {
super.init();
this.maxx = 870;
this.minx = -870;
};
fishObject4.prototype.checkCollision = function () {
if (((this.clip.head.hitTest(this.targetEnemy.body) && (!_root.shieldStatus)) && (!_root.dieStatus)) && (!this.clip.animation)) {
if (_root.heroLife > 0) {
if (_root.heroBlood > 0) {
_root.heroLife = _root.heroLife - 1;
_root.heroBlood = 100;
} else {
_root.heroLife = _root.heroLife - 1;
}
} else {
_root.heroBlood = 0;
}
this.clip.gotoAndPlay("grab");
this.clip.animation = true;
}
};
fishObject5 = function () {
this.objectRef = this;
this.init();
};
fishObject5.prototype = new fishObject();
fishObject5.prototype.init = function () {
super.init();
this.maxx = 1170;
this.minx = -1170;
};
fishObject5.prototype.checkCollision = function () {
if (((this.clip.head.hitTest(this.targetEnemy.body) && (!_root.shieldStatus)) && (!_root.dieStatus)) && (!_root.crazyStatus)) {
_root.controller = 30;
_root.maxSpeed = 10;
this.targetEnemy.crazyClip.gotoAndStop(2);
_root.crazyStatus = true;
_root.pufferInterval = setInterval(this, "restore", 15000);
}
};
fishObject5.prototype.restore = function () {
clearInterval(_root.pufferInterval);
_root.crazyStatus = false;
this.targetEnemy.crazyClip.gotoAndStop(1);
_root.controller = 4;
_root.maxSpeed = 2;
};
Object.registerClass("enemy1", fishObject);
Object.registerClass("enemy7", fishObject);
Object.registerClass("enemy8", fishObject);
Object.registerClass("enemy5", fishObject4);
Object.registerClass("enemy6", fishObject5);
fishObject2 = function () {
this.objectRef = this;
this.init();
};
fishObject2.prototype = new MovieClip();
fishObject2.prototype.init = function () {
this.clip = eval (this.clipRef);
this.clip._x = this.initx;
this.clip._y = this.inity;
this.bulletFlag = false;
this.bulletLocation = _root.stageMC;
this.targetEnemy = _root.targetHeroClip;
this.yvel = this.yMove;
this.gravity = 0.1;
this.thrust = 1;
this.distance = 0;
this.life = 60;
this.dieFlag = false;
this.rotationAngle = 5;
this.bulletCounter = 0;
this.blastFlag = false;
this.bulletHitFlag = false;
this.xvel = -this.thrust;
this.trackFlag = false;
};
fishObject2.prototype.xMovement = function () {
this.clip._x = this.clip._x + this.xvel;
this.xvel = this.xvel + this.gravity;
if (this.xvel >= this.thrust) {
this.gravity = 0.1;
this.thrust = 1;
this.xvel = -this.thrust;
}
};
fishObject2.prototype.yMovement = function () {
if (!this.trackFlag) {
this.clip._y = this.clip._y - this.yvel;
if (this.clip._y < -500) {
this.clip.removeMovieClip();
}
}
};
fishObject2.prototype.getXDistance = function () {
return(Math.abs(this.targetEnemy._x - this.clip._x));
};
fishObject2.prototype.rotateObject = function () {
this.clip._rotation = this.clip._rotation + this.rotationAngle;
if (this.clip._rotation > 30) {
this.rotationAngle = this.rotationAngle * -1;
} else if (this.clip._rotation < -30) {
this.rotationAngle = this.rotationAngle * -1;
}
};
fishObject2.prototype.checkCollision = function () {
if ((this.clip.head.hitTest(this.targetEnemy.body) && (!_root.shieldStatus)) && (!_root.dieStatus)) {
_root.heroBlood = _root.heroBlood - 15;
this.targetEnemy.gotoAndStop("hit");
}
};
fishObject2.prototype.fishMove = function () {
this.yMovement();
this.xMovement();
};
fishObject2.prototype.reBounce = function () {
this.xvel = this.xvel * -1;
this.clip._y = 50 + random(400);
this.clip._xscale = this.clip._xscale * -1;
};
fishObject2.prototype.onEnterFrame = function () {
if (!_root.freezeStatus) {
this.objectRef.fishMove();
}
this.objectRef.checkCollision();
};
fishObject3 = function () {
this.objectRef = this;
this.init();
};
fishObject3.prototype = new fishObject2();
fishObject3.prototype.init = function () {
super.init();
};
fishObject3.prototype.yMovement = function () {
if (!this.trackFlag) {
this.clip._y = this.clip._y + this.yvel;
if (this.clip._y > 500) {
this.clip.removeMovieClip();
}
}
};
Object.registerClass("enemy2", fishObject2);
Object.registerClass("enemy4", fishObject3);
powerupObject = function () {
this.objectRef = this;
this.init();
};
powerupObject.prototype = new fishObject2();
powerupObject.protoype.init = function () {
super.init();
};
powerupObject.prototype.checkCollision = function () {
if (this.clip.lclip.head.hitTest(this.targetEnemy.body)) {
this.clip.lclip.gotoAndStop("die");
}
};
powerupObject.prototype.onEnterFrame = function () {
if (!_root.freezeStatus) {
this.objectRef.fishMove();
}
this.objectRef.checkCollision();
};
Object.registerClass("bonusPowerup", powerupObject);
Object.registerClass("freezePowerup", powerupObject);
Object.registerClass("shieldPowerup", powerupObject);
Object.registerClass("trackPowerup", powerupObject);
Object.registerClass("lifePowerup", powerupObject);
function createWeed() {
if (!_root.freezeStatus) {
_global.tempName = "weed" + _root.weedDepth;
_global.xVal = (1 + random(9)) * 60;
var _local4 = this.attachMovie("weed1", _global.tempName, _root.weedDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:500, directiony:-1, yMove:3, xMove:0});
_root.weedArray.push(_local4);
_root.weedNum = 1;
_root.weedDepth++;
}
}
function createWeed2() {
if (!_root.freezeStatus) {
_global.tempName = "weed" + _root.weedDepth;
_global.xVal = ((1 + random(9)) * 60) * -1;
var _local4 = this.attachMovie("weed1", _global.tempName, _root.weedDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:500, directiony:-1, yMove:3, xMove:0});
_root.weedArray.push(_local4);
_root.weedNum = 1;
_root.weedDepth++;
}
}
function createWeed3() {
if (!_root.freezeStatus) {
_global.tempName = "weed2_" + _root.weedDepth;
_global.yVal = ((1 + random(8)) * 50) * 1;
var _local4 = this.attachMovie("weed2", _global.tempName, _root.weedDepth, {clipRef:_global.tempName, initx:600, inity:_global.yVal, directionx:-1, xMove:2, yMove:0});
_root.weedArray.push(_local4);
_root.weedNum = 2;
_root.weedDepth++;
}
}
function createWeed4() {
if (!_root.freezeStatus) {
_global.tempName = "weed2_" + _root.weedDepth;
_global.yVal = ((1 + random(8)) * 50) * 1;
var _local4 = this.attachMovie("weed2", _global.tempName, _root.weedDepth, {clipRef:_global.tempName, initx:-600, inity:_global.yVal, directionx:1, xMove:3, yMove:0});
_root.weedArray.push(_local4);
_root.weedNum = 2;
_root.weedDepth++;
}
}
function createWeed5() {
if (!_root.freezeStatus) {
_global.tempName = "weed2_" + _root.weedDepth;
_global.yVal = ((1 + random(8)) * 50) * -1;
var _local4 = this.attachMovie("weed2", _global.tempName, _root.weedDepth, {clipRef:_global.tempName, initx:-600, inity:_global.yVal, directionx:1, xMove:3, yMove:0});
_root.weedArray.push(_local4);
_root.weedNum = 2;
_root.weedDepth++;
}
}
function createWeed6() {
if (!_root.freezeStatus) {
_global.tempName = "weed2_" + _root.weedDepth;
_global.yVal = ((1 + random(8)) * 50) * -1;
var _local4 = this.attachMovie("weed2", _global.tempName, _root.weedDepth, {clipRef:_global.tempName, initx:-600, inity:_global.yVal, directionx:1, xMove:3, yMove:0});
_root.weedArray.push(_local4);
_root.weedNum = 2;
_root.weedDepth++;
}
}
function createEnemy() {
_global.tempName = "enemy" + _root.enemyDepth;
_global.yVal = ((1 + random(9)) * 50) * 1;
var _local4 = this.attachMovie("enemy5", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:-650, inity:_global.yVal, direction:1, xMove:-12});
_root.enemyArray.push(_local4);
_root.enemyNum = 1;
_root.enemyDepth++;
clearInterval(_root.myInterval7);
}
function createEnemy2() {
_global.tempName = "enemy" + _root.enemyDepth;
_global.yVal = ((1 + random(9)) * 50) * -1;
var _local4 = this.attachMovie("enemy6", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:650, inity:_global.yVal, direction:-1, xMove:13});
_root.enemyArray.push(_local4);
_root.enemyNum = 1;
_root.enemyDepth++;
clearInterval(_root.myInterval8);
}
function createEnemy3() {
_global.tempName = "enemy" + _root.enemyDepth;
_global.yVal = (1 + random(9)) * 50;
var _local4 = this.attachMovie("enemy7", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:-650, inity:_global.yVal, direction:1, xMove:-13});
_root.enemyArray.push(_local4);
_root.enemyNum = 1;
_root.enemyDepth++;
clearInterval(_root.myInterval9);
}
function createEnemy4() {
_global.tempName = "enemy" + _root.enemyDepth;
_global.yVal = (1 + random(9)) * 50;
var _local4 = this.attachMovie("enemy5", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:-650, inity:_global.yVal, direction:1, xMove:-13});
_root.enemyArray.push(_local4);
_root.enemyNum = 1;
_root.enemyDepth++;
clearInterval(_root.myInterval10);
}
function createEnemy5() {
if (!_root.freezeStatus) {
_global.tempName = "enemy" + _root.enemyDepth;
_global.xVal = ((1 + random(8)) * 60) * 1;
var _local4 = this.attachMovie("enemy2", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:6});
_root.enemyArray.push(_local4);
_root.enemyNum = 1;
_root.enemyDepth++;
}
}
function createEnemy6() {
if (!_root.freezeStatus) {
_global.tempName = "enemy" + _root.enemyDepth;
_global.xVal = ((1 + random(8)) * 60) * 1;
var _local4 = this.attachMovie("enemy4", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:-700, direction:1, yMove:7});
_root.enemyArray.push(_local4);
_root.enemyNum = 1;
_root.enemyDepth++;
}
}
function getxVal() {
var _local1 = random(2);
trace(_local1);
if (_local1 == 0) {
val = 50 + (random(500) * 1);
} else {
val = 50 + (random(500) * -1);
}
return(val);
}
function createBonusPowerup() {
if (!_root.freezeStatus) {
_global.tempName = "powerup" + _root.enemyDepth;
_global.xVal = getxVal();
this.attachMovie("bonusPowerup", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:6});
_root.enemyDepth++;
}
}
function createLifePowerup() {
if (!_root.freezeStatus) {
_global.tempName = "powerup" + _root.enemyDepth;
_global.xVal = getxVal();
this.attachMovie("lifePowerup", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:6});
_root.enemyDepth++;
}
}
function createFreezePowerup() {
if (!_root.freezeStatus) {
_global.tempName = "powerup" + _root.enemyDepth;
_global.xVal = getxVal();
this.attachMovie("freezePowerup", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:6});
_root.enemyDepth++;
}
}
function createShieldPowerup() {
if (!_root.freezeStatus) {
_global.tempName = "powerup" + _root.enemyDepth;
_global.xVal = getxVal();
this.attachMovie("shieldPowerup", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:6});
_root.enemyDepth++;
}
}
function createTrackPowerup() {
if (!_root.freezeStatus) {
_global.tempName = "powerup" + _root.enemyDepth;
_global.xVal = getxVal();
this.attachMovie("trackPowerup", _global.tempName, _root.enemyDepth, {clipRef:_global.tempName, initx:_global.xVal, inity:700, direction:-1, yMove:6});
_root.enemyDepth++;
}
}
function setFreeze() {
clearInterval(_root.myInterval13);
_root.freezeStatus = true;
_root.myInterval13_1 = setInterval(this, "resetFreezePowerup", 8000);
}
function resetFreezePowerup() {
clearInterval(_root.myInterval13_1);
_root.myInterval13 = setInterval(this, "createFreezePowerup", 11400);
_root.freezeStatus = false;
}
function setShield() {
clearInterval(_root.myInterval14);
_parent.hero_mc.shieldClip.gotoAndStop(2);
_root.shieldStatus = true;
_root.myInterval14_1 = setInterval(this, "resetShieldPowerup", 10000);
}
function resetShieldPowerup() {
_parent.hero_mc.shieldClip.gotoAndStop(1);
clearInterval(_root.myInterval14_1);
_root.myInterval14 = setInterval(this, "createShieldPowerup", 15300);
_root.shieldStatus = false;
}
function setLife() {
_root.heroLife = _root.heroLife + 1;
}
function setTrack() {
clearInterval(_root.myInterval15);
_root.trackUserStatus = true;
_root.myInterval15_1 = setInterval(this, "resetTrackPowerup", 2000);
}
function resetTrackPowerup() {
clearInterval(_root.myInterval15_1);
_root.myInterval15 = setInterval(this, "createTrackPowerup", 14200);
_root.trackUserStatus = false;
}
stop();
if (!_root.createFish1Flag) {
_global.tempName = "fish1";
this.attachMovie("fish01", _global.tempName, 50000, {clipRef:_global.tempName, initx:650, inity:-100, direction:-1, xMove:6});
_root.fishNum = 1;
_root.createFish1Flag = true;
}
if (!_root.createFish2Flag) {
_global.tempName = "fish2";
this.attachMovie("fish02", _global.tempName, 50001, {clipRef:_global.tempName, initx:-650, inity:100, direction:1, xMove:4});
_root.fishNum = 2;
_root.createFish2Flag = true;
}
if (!_root.createFish3Flag) {
_global.tempName = "fish3";
this.attachMovie("fish03", _global.tempName, 50002, {clipRef:_global.tempName, initx:-650, inity:-200, direction:1, xMove:6});
_root.fishNum = 3;
_root.createFish3Flag = true;
}
if (!_root.createFish4Flag) {
_global.tempName = "fish4";
this.attachMovie("fish04", _global.tempName, 50003, {clipRef:_global.tempName, initx:650, inity:200, direction:-1, xMove:5});
_root.fishNum = 4;
_root.createFish4Flag = true;
}
_root.targetHeroClip = _parent.hero_mc;
_root.weedCounter = 0;
_root.weedDepth = 65000;
_root.enemyDepth = 85000 /* 0x014C08 */;
_root.enemyArray = new Array();
_root.weedArray = new Array();
_root.myInterval1 = setInterval(this, "createWeed", 1100);
_root.myInterval2 = setInterval(this, "createWeed2", 2300);
_root.myInterval3 = setInterval(this, "createWeed3", 1600);
_root.myInterval4 = setInterval(this, "createWeed4", 2900);
_root.myInterval5 = setInterval(this, "createWeed5", 1900);
_root.myInterval6 = setInterval(this, "createWeed6", 1700);
_root.myInterval7 = setInterval(this, "createEnemy", 3100);
_root.myInterval8 = setInterval(this, "createEnemy2", 4100);
_root.myInterval9 = setInterval(this, "createEnemy3", 10100);
_root.myInterval10 = setInterval(this, "createEnemy4", 11100);
_root.myInterval11 = setInterval(this, "createEnemy5", 12100);
_root.myInterval21 = setInterval(this, "createEnemy6", 14100);
_root.myInterval12 = setInterval(this, "createBonusPowerup", 9100);
_root.myInterval14 = setInterval(this, "createShieldPowerup", 8300);
_root.myInterval15 = setInterval(this, "createTrackPowerup", 14200);
_root.myInterval16 = setInterval(this, "createLifePowerup", 31300);
Symbol 453 MovieClip Frame 1
function checkWeedCollected() {
if (_root.weedClip._xscale < 100) {
_root.weedClip._xscale = _root.weedCounter;
} else {
nextLevel();
}
}
function nextLevel() {
i = 1;
while (i < 25) {
intervalNum = _root["myInterval" + i];
clearInterval(intervalNum);
i++;
}
clearInterval(_root.myInterval13_1);
clearInterval(_root.myInterval14_1);
clearInterval(_root.myInterval15_1);
i = 0;
while (i <= _root.enemyArray.length) {
_root.enemyArray[i].removeMovieClip();
i++;
}
i = 0;
while (i <= _root.weedArray.length) {
_root.weedArray[i].removeMovieClip();
i++;
}
_root.level = 2;
gotoAndPlay ("levelup");
this.onEnterFrame = null;
}
function checkLifeRemaining() {
if (_root.heroLife >= 1) {
if (_root.lifeClip._xscale > 0) {
_root.lifeClip._xscale = _root.heroBlood;
} else {
_root.heroLife = _root.heroLife - 1;
_root.lifeClip._xscale = 100;
_root.heroBlood = 100;
return(undefined);
}
_root.lifeNum.text = _root.heroLife;
} else {
_root.lifeClip._xscale = 0;
_root.heroBlood = 0;
if (_root.lifeClip._xscale <= 0) {
_root.lifeNum.text = 0;
Mouse.show();
_root.gotoAndStop("end");
}
}
}
function moveHero() {
hero_mc._x = hero_mc._x + ((_xmouse - hero_mc._x) / _root.controller);
hero_mc._y = hero_mc._y + ((_ymouse - hero_mc._y) / _root.controller);
dist_x = hero_mc._x - 300;
dist_y = hero_mc._y - 250;
angledist = hero_mc._x - _xmouse;
trace("angledist =" + angledist);
angle = Math.atan(dist_y / dist_x) / (Math.PI/180);
if (hero_mc._x < 30) {
hero_mc._x = 30;
} else if (hero_mc._x > 570) {
hero_mc._x = 570;
}
if (hero_mc._y < 70) {
hero_mc._y = 70;
} else if (hero_mc._y > 450) {
hero_mc._y = 450;
}
if (dist_x < 0) {
hero_mc._xscale = -100;
moveStatus = -1;
} else if (dist_x > 0) {
hero_mc._xscale = 100;
moveStatus = 1;
}
hero_mc._rotation = angle;
if (moveStatus == 1) {
if (angle < 10) {
hero_mc._rotation = 10;
}
}
if (moveStatus == -1) {
if (angle > -10) {
hero_mc._rotation = -10;
}
}
}
function moveBG() {
if (hero_mc._x > 300) {
moveBGLeft();
} else {
moveBGRight();
}
if (hero_mc._y > 250) {
moveBGUp();
} else {
moveBGDown();
}
}
function moveBGLeft() {
speed = Math.ceil(Math.abs(300 - hero_mc._x) / 100) * _root.maxSpeed;
map._x = map._x - speed;
if (map._x < 0) {
map._x = 0;
}
}
function moveBGUp() {
speed = Math.ceil(Math.abs(250 - hero_mc._y) / 100) * _root.maxSpeed;
map._y = map._y - speed;
if (map._y < 0) {
map._y = 0;
}
}
function moveBGDown() {
speed = Math.ceil(Math.abs(250 - hero_mc._y) / 100) * _root.maxSpeed;
map._y = map._y + speed;
if (map._y > 500) {
map._y = 500;
}
}
function moveBGRight() {
speed = Math.ceil(Math.abs(300 - hero_mc._x) / 100) * _root.maxSpeed;
map._x = map._x + speed;
if (map._x > 600) {
map._x = 600;
}
}
function checkEnd() {
_root.dieStatus = true;
hero_mc._rotation = 0;
hero_mc.crazyClip.gotoAndStop(1);
_root.trackUserStatus = false;
_root.freezeStatus = false;
_root.shieldStatus = false;
_root.crazyStatus = false;
_root.map.resetShieldPowerup();
_root.map.resetFreezePowerup();
_root.map.resetTrackPowerup();
clearInterval(_root.pufferInterval);
_root.controller = 4;
_root.maxSpeed = 2;
checkLifeRemaining();
}
Mouse.hide();
_root.maxSpeed = 2;
_root.weedClip._xscale = 0;
_root.lifeClip._xscale = 100;
_root.heroBlood = 100;
_root.heroLife = 5;
_root.score = 0;
_root.weedCounter = 0;
_root.controller = 4;
_root.level = 1;
_root.trackUserStatus = false;
_root.freezeStatus = false;
_root.shieldStatus = false;
_global.gameBGSound.stop();
_global.gameBGSound = null;
delete _root.gameBGSound;
delete _global.soundFile;
_global.soundFile = _root.createEmptyMovieClip("soundFile", 1000);
_global.gameBGSound = new Sound(_global.soundFile);
_global.gameBGSound.attachSound("introSound");
_global.gameBGSound.start(0, 50000);
_global.gameBGSound.setVolume(80);
this.onEnterFrame = function () {
if (!_root.dieStatus) {
moveHero();
moveBG();
checkWeedCollected();
checkLifeRemaining();
_root.scoreNum.text = _root.score;
_root.levelNum.text = _root.level;
}
};
stop();
Symbol 453 MovieClip Frame 4
stop();
Mouse.show();
_global.gameBGSound.stop();
_global.gameBGSound = null;
delete _root.gameBGSound;
delete _global.soundFile;
Symbol 453 MovieClip Frame 5
function checkWeedCollected() {
if (_root.weedClip._xscale < 100) {
_root.weedClip._xscale = _root.weedCounter;
} else {
nextLevel();
}
}
function nextLevel() {
i = 1;
while (i < 25) {
intervalNum = _root["myInterval" + i];
clearInterval(intervalNum);
i++;
}
clearInterval(_root.myInterval13_1);
clearInterval(_root.myInterval14_1);
clearInterval(_root.myInterval15_1);
i = 0;
while (i <= _root.enemyArray.length) {
_root.enemyArray[i].removeMovieClip();
i++;
}
i = 0;
while (i <= _root.weedArray.length) {
_root.weedArray[i].removeMovieClip();
i++;
}
_root.level = 3;
gotoAndPlay ("levelup");
this.onEnterFrame = null;
}
function checkLifeRemaining() {
if (_root.heroLife >= 1) {
if (_root.lifeClip._xscale > 0) {
_root.lifeClip._xscale = _root.heroBlood;
} else {
_root.heroLife = _root.heroLife - 1;
_root.lifeClip._xscale = 100;
_root.heroBlood = 100;
return(undefined);
}
_root.lifeNum.text = _root.heroLife;
} else {
_root.lifeClip._xscale = 0;
_root.heroBlood = 0;
if (_root.lifeClip._xscale <= 0) {
_root.lifeNum.text = 0;
Mouse.show();
_root.gotoAndStop("end");
}
}
}
function moveHero() {
hero_mc._x = hero_mc._x + ((_xmouse - hero_mc._x) / _root.controller);
hero_mc._y = hero_mc._y + ((_ymouse - hero_mc._y) / _root.controller);
dist_x = hero_mc._x - 300;
dist_y = hero_mc._y - 250;
angledist = hero_mc._x - _xmouse;
trace("angledist =" + angledist);
angle = Math.atan(dist_y / dist_x) / (Math.PI/180);
if (hero_mc._x < 30) {
hero_mc._x = 30;
} else if (hero_mc._x > 570) {
hero_mc._x = 570;
}
if (hero_mc._y < 70) {
hero_mc._y = 70;
} else if (hero_mc._y > 450) {
hero_mc._y = 450;
}
if (dist_x < 0) {
hero_mc._xscale = -100;
moveStatus = -1;
} else if (dist_x > 0) {
hero_mc._xscale = 100;
moveStatus = 1;
}
hero_mc._rotation = angle;
if (moveStatus == 1) {
if (angle < 10) {
hero_mc._rotation = 10;
}
}
if (moveStatus == -1) {
if (angle > -10) {
hero_mc._rotation = -10;
}
}
}
function moveBG() {
if (hero_mc._x > 300) {
moveBGLeft();
} else {
moveBGRight();
}
if (hero_mc._y > 250) {
moveBGUp();
} else {
moveBGDown();
}
}
function moveBGLeft() {
speed = Math.ceil(Math.abs(300 - hero_mc._x) / 100) * _root.maxSpeed;
map._x = map._x - speed;
if (map._x < 0) {
map._x = 0;
}
}
function moveBGUp() {
speed = Math.ceil(Math.abs(250 - hero_mc._y) / 100) * _root.maxSpeed;
map._y = map._y - speed;
if (map._y < 0) {
map._y = 0;
}
}
function moveBGDown() {
speed = Math.ceil(Math.abs(250 - hero_mc._y) / 100) * _root.maxSpeed;
map._y = map._y + speed;
if (map._y > 500) {
map._y = 500;
}
}
function moveBGRight() {
speed = Math.ceil(Math.abs(300 - hero_mc._x) / 100) * _root.maxSpeed;
map._x = map._x + speed;
if (map._x > 600) {
map._x = 600;
}
}
function checkEnd() {
_root.dieStatus = true;
hero_mc._rotation = 0;
hero_mc.crazyClip.gotoAndStop(1);
_root.trackUserStatus = false;
_root.freezeStatus = false;
_root.shieldStatus = false;
_root.crazyStatus = false;
_root.map.resetShieldPowerup();
_root.map.resetFreezePowerup();
_root.map.resetTrackPowerup();
clearInterval(_root.pufferInterval);
_root.controller = 4;
_root.maxSpeed = 2;
checkLifeRemaining();
}
Mouse.hide();
_root.maxSpeed = 2;
_root.weedClip._xscale = 0;
_root.weedCounter = 0;
_root.controller = 4;
_root.level = 2;
_root.trackUserStatus = false;
_root.freezeStatus = false;
_root.shieldStatus = false;
_global.gameBGSound.stop();
_global.gameBGSound = null;
delete _root.gameBGSound;
delete _global.soundFile;
_global.soundFile = _root.createEmptyMovieClip("soundFile", 1000);
_global.gameBGSound = new Sound(_global.soundFile);
_global.gameBGSound.attachSound("introSound");
_global.gameBGSound.start(0, 50000);
_global.gameBGSound.setVolume(80);
this.onEnterFrame = function () {
if (!_root.dieStatus) {
moveHero();
moveBG();
checkWeedCollected();
checkLifeRemaining();
_root.scoreNum.text = _root.score;
_root.levelNum.text = _root.level;
}
};
stop();
Symbol 453 MovieClip Frame 7
function checkWeedCollected() {
if (_root.weedClip._xscale < 100) {
_root.weedClip._xscale = _root.weedCounter;
} else {
nextLevel();
}
}
function nextLevel() {
i = 1;
while (i < 25) {
intervalNum = _root["myInterval" + i];
clearInterval(intervalNum);
i++;
}
clearInterval(_root.myInterval13_1);
clearInterval(_root.myInterval14_1);
clearInterval(_root.myInterval15_1);
i = 0;
while (i <= _root.enemyArray.length) {
_root.enemyArray[i].removeMovieClip();
i++;
}
i = 0;
while (i <= _root.weedArray.length) {
_root.weedArray[i].removeMovieClip();
i++;
}
_root.level = 4;
gotoAndPlay ("levelup");
this.onEnterFrame = null;
}
function checkLifeRemaining() {
if (_root.heroLife >= 1) {
if (_root.lifeClip._xscale > 0) {
_root.lifeClip._xscale = _root.heroBlood;
} else {
_root.heroLife = _root.heroLife - 1;
_root.lifeClip._xscale = 100;
_root.heroBlood = 100;
return(undefined);
}
_root.lifeNum.text = _root.heroLife;
} else {
_root.lifeClip._xscale = 0;
_root.heroBlood = 0;
if (_root.lifeClip._xscale <= 0) {
_root.lifeNum.text = 0;
Mouse.show();
_root.gotoAndStop("end");
}
}
}
function moveHero() {
hero_mc._x = hero_mc._x + ((_xmouse - hero_mc._x) / _root.controller);
hero_mc._y = hero_mc._y + ((_ymouse - hero_mc._y) / _root.controller);
dist_x = hero_mc._x - 300;
dist_y = hero_mc._y - 250;
angledist = hero_mc._x - _xmouse;
trace("angledist =" + angledist);
angle = Math.atan(dist_y / dist_x) / (Math.PI/180);
if (hero_mc._x < 30) {
hero_mc._x = 30;
} else if (hero_mc._x > 570) {
hero_mc._x = 570;
}
if (hero_mc._y < 70) {
hero_mc._y = 70;
} else if (hero_mc._y > 450) {
hero_mc._y = 450;
}
if (dist_x < 0) {
hero_mc._xscale = -100;
moveStatus = -1;
} else if (dist_x > 0) {
hero_mc._xscale = 100;
moveStatus = 1;
}
hero_mc._rotation = angle;
if (moveStatus == 1) {
if (angle < 10) {
hero_mc._rotation = 10;
}
}
if (moveStatus == -1) {
if (angle > -10) {
hero_mc._rotation = -10;
}
}
}
function moveBG() {
if (hero_mc._x > 300) {
moveBGLeft();
} else {
moveBGRight();
}
if (hero_mc._y > 250) {
moveBGUp();
} else {
moveBGDown();
}
}
function moveBGLeft() {
speed = Math.ceil(Math.abs(300 - hero_mc._x) / 100) * _root.maxSpeed;
map._x = map._x - speed;
if (map._x < 0) {
map._x = 0;
}
}
function moveBGUp() {
speed = Math.ceil(Math.abs(250 - hero_mc._y) / 100) * _root.maxSpeed;
map._y = map._y - speed;
if (map._y < 0) {
map._y = 0;
}
}
function moveBGDown() {
speed = Math.ceil(Math.abs(250 - hero_mc._y) / 100) * _root.maxSpeed;
map._y = map._y + speed;
if (map._y > 500) {
map._y = 500;
}
}
function moveBGRight() {
speed = Math.ceil(Math.abs(300 - hero_mc._x) / 100) * _root.maxSpeed;
map._x = map._x + speed;
if (map._x > 600) {
map._x = 600;
}
}
function checkEnd() {
_root.dieStatus = true;
hero_mc._rotation = 0;
hero_mc.crazyClip.gotoAndStop(1);
_root.trackUserStatus = false;
_root.freezeStatus = false;
_root.shieldStatus = false;
_root.crazyStatus = false;
_root.map.resetShieldPowerup();
_root.map.resetFreezePowerup();
_root.map.resetTrackPowerup();
clearInterval(_root.pufferInterval);
_root.controller = 4;
_root.maxSpeed = 2;
checkLifeRemaining();
}
Mouse.hide();
_root.maxSpeed = 2;
_root.weedClip._xscale = 0;
_root.weedCounter = 0;
_root.controller = 4;
_root.level = 3;
_root.trackUserStatus = false;
_root.freezeStatus = false;
_root.shieldStatus = false;
_global.gameBGSound.stop();
_global.gameBGSound = null;
delete _root.gameBGSound;
delete _global.soundFile;
_global.soundFile = _root.createEmptyMovieClip("soundFile", 1000);
_global.gameBGSound = new Sound(_global.soundFile);
_global.gameBGSound.attachSound("introSound");
_global.gameBGSound.start(0, 50000);
_global.gameBGSound.setVolume(80);
this.onEnterFrame = function () {
if (!_root.dieStatus) {
moveHero();
moveBG();
checkWeedCollected();
checkLifeRemaining();
_root.scoreNum.text = _root.score;
_root.levelNum.text = _root.level;
}
};
stop();
Symbol 453 MovieClip Frame 9
function checkWeedCollected() {
if (_root.weedClip._xscale < 100) {
_root.weedClip._xscale = _root.weedCounter;
} else {
nextLevel();
}
}
function nextLevel() {
i = 1;
while (i < 25) {
intervalNum = _root["myInterval" + i];
clearInterval(intervalNum);
i++;
}
clearInterval(_root.myInterval13_1);
clearInterval(_root.myInterval14_1);
clearInterval(_root.myInterval15_1);
i = 0;
while (i <= _root.enemyArray.length) {
_root.enemyArray[i].removeMovieClip();
i++;
}
i = 0;
while (i <= _root.weedArray.length) {
_root.weedArray[i].removeMovieClip();
i++;
}
_root.level = 5;
gotoAndPlay ("levelup");
this.onEnterFrame = null;
}
function checkLifeRemaining() {
if (_root.heroLife >= 1) {
if (_root.lifeClip._xscale > 0) {
_root.lifeClip._xscale = _root.heroBlood;
} else {
_root.heroLife = _root.heroLife - 1;
_root.lifeClip._xscale = 100;
_root.heroBlood = 100;
return(undefined);
}
_root.lifeNum.text = _root.heroLife;
} else {
_root.lifeClip._xscale = 0;
_root.heroBlood = 0;
if (_root.lifeClip._xscale <= 0) {
_root.lifeNum.text = 0;
Mouse.show();
_root.gotoAndStop("end");
}
}
}
function moveHero() {
hero_mc._x = hero_mc._x + ((_xmouse - hero_mc._x) / _root.controller);
hero_mc._y = hero_mc._y + ((_ymouse - hero_mc._y) / _root.controller);
dist_x = hero_mc._x - 300;
dist_y = hero_mc._y - 250;
angledist = hero_mc._x - _xmouse;
trace("angledist =" + angledist);
angle = Math.atan(dist_y / dist_x) / (Math.PI/180);
if (hero_mc._x < 30) {
hero_mc._x = 30;
} else if (hero_mc._x > 570) {
hero_mc._x = 570;
}
if (hero_mc._y < 70) {
hero_mc._y = 70;
} else if (hero_mc._y > 450) {
hero_mc._y = 450;
}
if (dist_x < 0) {
hero_mc._xscale = -100;
moveStatus = -1;
} else if (dist_x > 0) {
hero_mc._xscale = 100;
moveStatus = 1;
}
hero_mc._rotation = angle;
if (moveStatus == 1) {
if (angle < 10) {
hero_mc._rotation = 10;
}
}
if (moveStatus == -1) {
if (angle > -10) {
hero_mc._rotation = -10;
}
}
}
function moveBG() {
if (hero_mc._x > 300) {
moveBGLeft();
} else {
moveBGRight();
}
if (hero_mc._y > 250) {
moveBGUp();
} else {
moveBGDown();
}
}
function moveBGLeft() {
speed = Math.ceil(Math.abs(300 - hero_mc._x) / 100) * _root.maxSpeed;
map._x = map._x - speed;
if (map._x < 0) {
map._x = 0;
}
}
function moveBGUp() {
speed = Math.ceil(Math.abs(250 - hero_mc._y) / 100) * _root.maxSpeed;
map._y = map._y - speed;
if (map._y < 0) {
map._y = 0;
}
}
function moveBGDown() {
speed = Math.ceil(Math.abs(250 - hero_mc._y) / 100) * _root.maxSpeed;
map._y = map._y + speed;
if (map._y > 500) {
map._y = 500;
}
}
function moveBGRight() {
speed = Math.ceil(Math.abs(300 - hero_mc._x) / 100) * _root.maxSpeed;
map._x = map._x + speed;
if (map._x > 600) {
map._x = 600;
}
}
function checkEnd() {
_root.dieStatus = true;
hero_mc._rotation = 0;
hero_mc.crazyClip.gotoAndStop(1);
_root.trackUserStatus = false;
_root.freezeStatus = false;
_root.shieldStatus = false;
_root.crazyStatus = false;
_root.map.resetShieldPowerup();
_root.map.resetFreezePowerup();
_root.map.resetTrackPowerup();
clearInterval(_root.pufferInterval);
_root.controller = 4;
_root.maxSpeed = 2;
checkLifeRemaining();
}
Mouse.hide();
_root.maxSpeed = 2;
_root.weedClip._xscale = 0;
_root.weedCounter = 0;
_root.controller = 4;
_root.level = 4;
_root.trackUserStatus = false;
_root.freezeStatus = false;
_root.shieldStatus = false;
_global.gameBGSound.stop();
_global.gameBGSound = null;
delete _root.gameBGSound;
delete _global.soundFile;
_global.soundFile = _root.createEmptyMovieClip("soundFile", 1000);
_global.gameBGSound = new Sound(_global.soundFile);
_global.gameBGSound.attachSound("introSound");
_global.gameBGSound.start(0, 50000);
_global.gameBGSound.setVolume(80);
this.onEnterFrame = function () {
if (!_root.dieStatus) {
moveHero();
moveBG();
checkWeedCollected();
checkLifeRemaining();
_root.scoreNum.text = _root.score;
_root.levelNum.text = _root.level;
}
};
stop();
Symbol 453 MovieClip Frame 11
function checkWeedCollected() {
if (_root.weedClip._xscale < 100) {
_root.weedClip._xscale = _root.weedCounter;
} else {
nextLevel();
}
}
function nextLevel() {
i = 1;
while (i < 25) {
intervalNum = _root["myInterval" + i];
clearInterval(intervalNum);
i++;
}
clearInterval(_root.myInterval13_1);
clearInterval(_root.myInterval14_1);
clearInterval(_root.myInterval15_1);
i = 0;
while (i <= _root.enemyArray.length) {
_root.enemyArray[i].removeMovieClip();
i++;
}
i = 0;
while (i <= _root.weedArray.length) {
_root.weedArray[i].removeMovieClip();
i++;
}
_root.level = 6;
gotoAndPlay ("levelup2");
this.onEnterFrame = null;
}
function checkLifeRemaining() {
if (_root.heroLife >= 1) {
if (_root.lifeClip._xscale > 0) {
_root.lifeClip._xscale = _root.heroBlood;
} else {
_root.heroLife = _root.heroLife - 1;
_root.lifeClip._xscale = 100;
_root.heroBlood = 100;
return(undefined);
}
_root.lifeNum.text = _root.heroLife;
} else {
_root.lifeClip._xscale = 0;
_root.heroBlood = 0;
if (_root.lifeClip._xscale <= 0) {
_root.lifeNum.text = 0;
Mouse.show();
_root.gotoAndStop("end");
}
}
}
function moveHero() {
hero_mc._x = hero_mc._x + ((_xmouse - hero_mc._x) / _root.controller);
hero_mc._y = hero_mc._y + ((_ymouse - hero_mc._y) / _root.controller);
dist_x = hero_mc._x - 300;
dist_y = hero_mc._y - 250;
angledist = hero_mc._x - _xmouse;
trace("angledist =" + angledist);
angle = Math.atan(dist_y / dist_x) / (Math.PI/180);
if (hero_mc._x < 30) {
hero_mc._x = 30;
} else if (hero_mc._x > 570) {
hero_mc._x = 570;
}
if (hero_mc._y < 70) {
hero_mc._y = 70;
} else if (hero_mc._y > 450) {
hero_mc._y = 450;
}
if (dist_x < 0) {
hero_mc._xscale = -100;
moveStatus = -1;
} else if (dist_x > 0) {
hero_mc._xscale = 100;
moveStatus = 1;
}
hero_mc._rotation = angle;
if (moveStatus == 1) {
if (angle < 10) {
hero_mc._rotation = 10;
}
}
if (moveStatus == -1) {
if (angle > -10) {
hero_mc._rotation = -10;
}
}
}
function moveBG() {
if (hero_mc._x > 300) {
moveBGLeft();
} else {
moveBGRight();
}
if (hero_mc._y > 250) {
moveBGUp();
} else {
moveBGDown();
}
}
function moveBGLeft() {
speed = Math.ceil(Math.abs(300 - hero_mc._x) / 100) * _root.maxSpeed;
map._x = map._x - speed;
if (map._x < 0) {
map._x = 0;
}
}
function moveBGUp() {
speed = Math.ceil(Math.abs(250 - hero_mc._y) / 100) * _root.maxSpeed;
map._y = map._y - speed;
if (map._y < 0) {
map._y = 0;
}
}
function moveBGDown() {
speed = Math.ceil(Math.abs(250 - hero_mc._y) / 100) * _root.maxSpeed;
map._y = map._y + speed;
if (map._y > 500) {
map._y = 500;
}
}
function moveBGRight() {
speed = Math.ceil(Math.abs(300 - hero_mc._x) / 100) * _root.maxSpeed;
map._x = map._x + speed;
if (map._x > 600) {
map._x = 600;
}
}
function checkEnd() {
_root.dieStatus = true;
hero_mc._rotation = 0;
hero_mc.crazyClip.gotoAndStop(1);
_root.trackUserStatus = false;
_root.freezeStatus = false;
_root.shieldStatus = false;
_root.crazyStatus = false;
_root.map.resetShieldPowerup();
_root.map.resetFreezePowerup();
_root.map.resetTrackPowerup();
clearInterval(_root.pufferInterval);
_root.controller = 4;
_root.maxSpeed = 2;
checkLifeRemaining();
}
Mouse.hide();
_root.maxSpeed = 2;
_root.weedClip._xscale = 0;
_root.weedCounter = 0;
_root.controller = 4;
_root.level = 5;
_root.trackUserStatus = false;
_root.freezeStatus = false;
_root.shieldStatus = false;
_global.gameBGSound.stop();
_global.gameBGSound = null;
delete _root.gameBGSound;
delete _global.soundFile;
_global.soundFile = _root.createEmptyMovieClip("soundFile", 1000);
_global.gameBGSound = new Sound(_global.soundFile);
_global.gameBGSound.attachSound("introSound");
_global.gameBGSound.start(0, 50000);
_global.gameBGSound.setVolume(80);
this.onEnterFrame = function () {
if (!_root.dieStatus) {
moveHero();
moveBG();
checkWeedCollected();
checkLifeRemaining();
_root.scoreNum.text = _root.score;
_root.levelNum.text = _root.level;
}
};
stop();
Symbol 453 MovieClip Frame 14
stop();
Mouse.show();
_global.gameBGSound.stop();
_global.gameBGSound = null;
delete _root.gameBGSound;
delete _global.soundFile;
Symbol 453 MovieClip Frame 15
function checkWeedCollected() {
if (_root.weedClip._xscale < 100) {
_root.weedClip._xscale = _root.weedCounter;
} else {
nextLevel();
}
}
function nextLevel() {
i = 1;
while (i < 25) {
intervalNum = _root["myInterval" + i];
clearInterval(intervalNum);
i++;
}
clearInterval(_root.myInterval13_1);
clearInterval(_root.myInterval14_1);
clearInterval(_root.myInterval15_1);
i = 0;
while (i <= _root.enemyArray.length) {
_root.enemyArray[i].removeMovieClip();
i++;
}
i = 0;
while (i <= _root.weedArray.length) {
_root.weedArray[i].removeMovieClip();
i++;
}
this.onEnterFrame = null;
}
function checkLifeRemaining() {
if (_root.heroLife >= 1) {
if (_root.lifeClip._xscale > 0) {
_root.lifeClip._xscale = _root.heroBlood;
} else {
_root.heroLife = _root.heroLife - 1;
_root.lifeClip._xscale = 100;
_root.heroBlood = 100;
return(undefined);
}
_root.lifeNum.text = _root.heroLife;
} else {
_root.lifeClip._xscale = 0;
_root.heroBlood = 0;
if (_root.lifeClip._xscale <= 0) {
_root.lifeNum.text = 0;
Mouse.show();
_root.gotoAndStop("end");
}
}
}
function moveHero() {
hero_mc._x = hero_mc._x + ((_xmouse - hero_mc._x) / _root.controller);
hero_mc._y = hero_mc._y + ((_ymouse - hero_mc._y) / _root.controller);
dist_x = hero_mc._x - 300;
dist_y = hero_mc._y - 250;
angledist = hero_mc._x - _xmouse;
trace("angledist =" + angledist);
angle = Math.atan(dist_y / dist_x) / (Math.PI/180);
if (hero_mc._x < 30) {
hero_mc._x = 30;
} else if (hero_mc._x > 570) {
hero_mc._x = 570;
}
if (hero_mc._y < 70) {
hero_mc._y = 70;
} else if (hero_mc._y > 450) {
hero_mc._y = 450;
}
if (dist_x < 0) {
hero_mc._xscale = -100;
moveStatus = -1;
} else if (dist_x > 0) {
hero_mc._xscale = 100;
moveStatus = 1;
}
hero_mc._rotation = angle;
if (moveStatus == 1) {
if (angle < 10) {
hero_mc._rotation = 10;
}
}
if (moveStatus == -1) {
if (angle > -10) {
hero_mc._rotation = -10;
}
}
}
function moveBG() {
if (hero_mc._x > 300) {
moveBGLeft();
} else {
moveBGRight();
}
if (hero_mc._y > 250) {
moveBGUp();
} else {
moveBGDown();
}
}
function moveBGLeft() {
speed = Math.ceil(Math.abs(300 - hero_mc._x) / 100) * _root.maxSpeed;
map._x = map._x - speed;
if (map._x < 0) {
map._x = 0;
}
}
function moveBGUp() {
speed = Math.ceil(Math.abs(250 - hero_mc._y) / 100) * _root.maxSpeed;
map._y = map._y - speed;
if (map._y < 0) {
map._y = 0;
}
}
function moveBGDown() {
speed = Math.ceil(Math.abs(250 - hero_mc._y) / 100) * _root.maxSpeed;
map._y = map._y + speed;
if (map._y > 500) {
map._y = 500;
}
}
function moveBGRight() {
speed = Math.ceil(Math.abs(300 - hero_mc._x) / 100) * _root.maxSpeed;
map._x = map._x + speed;
if (map._x > 600) {
map._x = 600;
}
}
function checkEnd() {
_root.dieStatus = true;
hero_mc._rotation = 0;
hero_mc.crazyClip.gotoAndStop(1);
_root.trackUserStatus = false;
_root.freezeStatus = false;
_root.shieldStatus = false;
_root.crazyStatus = false;
_root.map.resetShieldPowerup();
_root.map.resetFreezePowerup();
_root.map.resetTrackPowerup();
clearInterval(_root.pufferInterval);
_root.controller = 4;
_root.maxSpeed = 2;
checkLifeRemaining();
}
Mouse.hide();
_root.maxSpeed = 2;
_root.weedClip._xscale = 0;
_root.weedCounter = 0;
_root.controller = 4;
_root.level = 6;
_root.trackUserStatus = false;
_root.freezeStatus = false;
_root.shieldStatus = false;
_global.gameBGSound.stop();
_global.gameBGSound = null;
delete _root.gameBGSound;
delete _global.soundFile;
_global.soundFile = _root.createEmptyMovieClip("soundFile", 1000);
_global.gameBGSound = new Sound(_global.soundFile);
_global.gameBGSound.attachSound("introSound");
_global.gameBGSound.start(0, 50000);
_global.gameBGSound.setVolume(80);
this.onEnterFrame = function () {
if (!_root.dieStatus) {
moveHero();
moveBG();
checkWeedCollected();
checkLifeRemaining();
_root.scoreNum.text = _root.score;
_root.levelNum.text = _root.level;
}
};
stop();
Symbol 456 MovieClip Frame 20
stop();
Symbol 458 MovieClip Frame 20
stop();
Symbol 460 MovieClip Frame 20
stop();
Symbol 462 MovieClip Frame 20
stop();
Symbol 464 MovieClip Frame 20
stop();
Symbol 465 MovieClip Frame 1
stop();
Symbol 465 MovieClip Frame 4
stop();
Symbol 465 MovieClip Frame 7
stop();
Symbol 465 MovieClip Frame 10
stop();
Symbol 465 MovieClip Frame 13
stop();
Symbol 465 MovieClip Frame 16
stop();
Symbol 481 Button
on (release) {
_root.gotoAndPlay("wel");
}
Symbol 504 MovieClip Frame 48
stop();
Symbol 519 Button
on (release) {
if (((this.scoreName.text != "") && (_root.scoreSubmit == false)) && (Number(this.scoreText2.text) > 0)) {
trans_btn._visible = false;
var lv = new LoadVars();
var lvAnswer = new LoadVars();
this.message_text.text = "Saving your score...";
lv.scoreName = this.scoreName.text;
lv.scoreText = this.scoreText2.text;
lv.gameId = "ace014";
lv.gameName = "Underwater World";
lv.sendAndLoad("http://www.flasharcade.com/setscores.php", lvAnswer, "POST");
lvAnswer.onLoad = function (success) {
if (lvAnswer.status1 == "success") {
trans_btn._visible = true;
_root.mainmc.message_text.text = "Your score is saved successfully.";
_root.gotoAndPlay("highScore");
} else {
trans_btn._visible = true;
trans_btn.useHandCursor = false;
_root.mainmc.message_text.text = "Your score could not be saved.";
}
};
} else if (Number(this.scoreText2.text) <= 0) {
trace("scoreText =");
trace(Number(this.scoreText2.text));
trace(_root.score);
message_text.text = "Your score is saved successfully.";
}
trans_btn._visible = true;
trans_btn.useHandCursor = false;
_root.scoreSubmit = true;
}
Symbol 522 MovieClip Frame 41
this.scoreText2.text = Math.ceil(_root.score);
Instance of Symbol 514 MovieClip in Symbol 522 MovieClip Frame 41
onClipEvent (load) {
_root.scoreSubmit = false;
}
onClipEvent (enterFrame) {
if (_parent.scoreName.text != "") {
_parent.trans_btn._visible = false;
} else if (_root.scoreSubmit != true) {
_parent.trans_btn.useHandCursor = false;
_parent.trans_btn._visible = true;
}
}
Symbol 522 MovieClip Frame 48
stop();
_root.scoreSubmit = false;
Selection.setFocus(this.scoreName);
trans_btn.useHandCursor = false;
Symbol 559 MovieClip Frame 12
var lv = new LoadVars();
var lvAnswer = new LoadVars();
this.get_message_text.text = "";
lv.gameId = "ace014";
lv.sendAndLoad("http://www.flasharcade.com/getscores.php", lvAnswer, "POST");
lvAnswer.onLoad = function (success) {
if (lvAnswer.status1 == "success") {
_root.score_mc.name0.text = this.name0;
_root.score_mc.name1.text = this.name1;
_root.score_mc.name2.text = this.name2;
_root.score_mc.name3.text = this.name3;
_root.score_mc.name4.text = this.name4;
_root.score_mc.name5.text = this.name5;
_root.score_mc.name6.text = this.name6;
_root.score_mc.name7.text = this.name7;
_root.score_mc.name8.text = this.name8;
_root.score_mc.name9.text = this.name9;
_root.score_mc.score0.text = this.score0;
_root.score_mc.score1.text = this.score1;
_root.score_mc.score2.text = this.score2;
_root.score_mc.score3.text = this.score3;
_root.score_mc.score4.text = this.score4;
_root.score_mc.score5.text = this.score5;
_root.score_mc.score6.text = this.score6;
_root.score_mc.score7.text = this.score7;
_root.score_mc.score8.text = this.score8;
_root.score_mc.score9.text = this.score9;
_root.score_mc.date0.text = this.date0;
_root.score_mc.date1.text = this.date1;
_root.score_mc.date2.text = this.date2;
_root.score_mc.date3.text = this.date3;
_root.score_mc.date4.text = this.date4;
_root.score_mc.date5.text = this.date5;
_root.score_mc.date6.text = this.date6;
_root.score_mc.date7.text = this.date7;
_root.score_mc.date8.text = this.date8;
_root.score_mc.date9.text = this.date9;
}
i = 0;
while (i < 11) {
var _local5 = _root.score_mc["date" + i].text;
if (String(_local5) == "undefined") {
_root.score_mc["date" + i].text = "";
}
var _local4 = _root.score_mc["name" + i].text;
if (String(_local4) == "undefined") {
_root.score_mc["name" + i].text = "";
}
var _local3 = _root.score_mc["score" + i].text;
if (String(_local3) == "undefined") {
_root.score_mc["score" + i].text = "";
}
i++;
}
};
stop();