Frame 1
stop();
fscommand ("allowscale", true);
fscommand ("showmenu", false);
fscommand ("trapallkeys", true);
System.security.allowDomain("*");
var newMenu = new ContextMenu();
newMenu.hideBuiltInItems();
this.menu = newMenu;
var needle = "http://agungcp.co.nr";
var haystack = _url.toLowerCase().split("/");
var validDomain;
var localFile;
if (haystack[2].indexOf(needle.toLowerCase()) > -1) {
validDomain = true;
localFile = false;
} else if (haystack[0] == "file:") {
validDomain = false;
localFile = true;
} else {
validDomain = false;
localFile = false;
}
Frame 6
stop();
Frame 7
Frame 8
function tongueIn() {
clearInterval(timerShoot);
tongue.inside._xscale = 1;
tongue.outer._x = tongue.inside._width;
tongue._visible = false;
if (objInMouth == true) {
frog.head.gotoAndStop(2);
} else {
frog.head.gotoAndStop(1);
}
timerShoot = setInterval(tongueOut, 100);
}
function tongueOut() {
movBg1.count = 0;
clearInterval(timerShoot);
shoot = false;
}
function spitOut() {
clearInterval(timerSpit);
keylock = false;
frog.gotoAndStop("standby");
frog.eyes.gotoAndStop("watch" + anglePos);
}
function back() {
clearInterval(timerBack);
frog.head.gotoAndStop(1);
frog.eyes.gotoAndStop("watch" + anglePos);
frogHit = false;
}
function spitObj(obj, rotValue) {
gravity = 0.5;
vo = 8;
obj.fall = false;
obj.vx = ((Math.cos(Math.atan2(difY, difX)) * vo) * 1.5) / vo;
obj.vy = ((Math.sin(Math.atan2(difY, difX)) * vo) * 1.5) / vo;
obj.onEnterFrame = function () {
if ((gamePause == false) && (this.fall == false)) {
this.vy = this.vy + (gravity / vo);
this._rotation = this._rotation + rotValue;
if (flame == true) {
this._rotation = (Math.atan2(obj.vy, obj.vx) * 180) / 3.141593;
}
i = 0;
while (i < 16) {
this._x = this._x + this.vx;
this._y = this._y + this.vy;
if (this._y > 355) {
this.fall = true;
this.gotoAndPlay(2);
break;
}
i++;
}
}
};
}
function defecation() {
if (movInfo.SM.meter._xscale > 0) {
movInfo.DM.meter._xscale = movInfo.DM.meter._xscale + countDef;
ctrlDef++;
}
if (ctrlDef == 60) {
attachMovie("feces", "feces", 9999);
feces._x = frog._x;
feces._y = 340;
if (frogSplash == true) {
feces.pic.gotoAndStop(2);
}
ctrlDef = 0;
movInfo.DM.effect._xscale = movInfo.DM.meter._xscale;
movInfo.DM.meter._xscale = 0;
movInfo.DM.effect.gotoAndPlay(1);
totQty = totQty + lossQty;
if (totQty < 0) {
totQty = 0;
}
stomachFull = false;
mouthFull = false;
movInfo.SM.meter._xscale = movInfo.SM.meter._xscale + (lossQty / 2);
movInfo.SM.effect.gotoAndPlay(1);
movInfo.SM.effect2._visible = false;
if (flame == false) {
movInfo.FM.meter._xscale = movInfo.FM.meter._xscale + 25;
}
}
}
function throwFlame() {
movInfo.FM.effect._xscale = movInfo.FM.effect._xscale - 1;
if (movInfo.FM.effect._xscale < 0) {
flame = false;
movInfo.FM.effect._visible = false;
movInfo.FM.effect._xscale = 100;
clearInterval(flameTimer);
}
}
function writeData() {
mySo.data.sound = fOptSound;
mySo.data.music = fOptMusic;
mySo.data.score = recScore;
mySo.flush();
}
function playMusic(soundID) {
musicObject = new Sound();
musicObject.attachSound(soundID);
musicObject.start(0, 100);
}
function playSound(soundID) {
soundObject = new Sound();
soundObject.attachSound(soundID);
soundObject.start();
}
function sendScore() {
now = new Date();
_root.diff = 0;
_root.username = userName.text;
_root.score = totScore;
_root.game_id = 3;
_root.chs = ((_root.score * now.getUTCHours()) * now.getUTCDate()) + (now.getUTCFullYear() * 77);
loadVariablesNum ("http://scores.funny-games.biz/scores.php", 0, "POST");
}
var difX;
var difY;
var difYMagnitude;
var xSquared;
var ySquared;
var hypSquared;
var hyp;
var hypSquared;
var counter;
var part1;
var part2;
var part2Squared;
var part3;
var sine;
var arcsine;
var angle;
var rotate;
var rotateValue;
var anglePos;
var timerShoot;
var shoot = false;
var spit = false;
var frogSplash = false;
var keylock = false;
var leftBound = false;
var rightBound = false;
var frogHit = false;
var frogDeath;
var jumpTimer = 0;
var xMove = 0;
var yMove = 0;
var c = 0;
var time;
var stopLeftBg = false;
var stopRightBg = false;
var keyhold = false;
var flame = false;
var onRange;
var freeze = false;
var frogXMove;
var j = 0;
var timerSpit;
var timerBack;
var frmObjBeEaten;
var objInMouth = false;
var objInStomach = false;
var stomachFull = false;
var mouthFull = false;
var defecateTimer;
var flameTimer;
var ctrlDef = 0;
var countDef = 1.666666667;
var lossQty = -100;
var totQty = 0;
var objQty = 0;
var objScore = 0;
var gamePause = false;
var scrTarget1;
var scrTarget2;
var xPos = 275;
var yPos = 330;
var control = new Object();
var stageOpen1;
var stageOpen2;
var scrTarget1 = 1000;
var scrTarget4 = 4000;
var scrTarget2 = 2000;
var scrTarget5 = 5000;
var scrTarget3 = 3000;
var gameStage;
var gameLevel;
var hP;
var totScore = 0;
var musicObject;
var soundObject;
var fOptSound;
var fOptMusic;
var recScore;
var mySo = SharedObject.getLocal("userData");
fOptSound = mySo.data.sound;
fOptMusic = mySo.data.music;
recScore = mySo.data.score;
if ((fOptSound == undefined) && (fOptMusic == undefined)) {
fOptSound = true;
fOptMusic = true;
recScore = 0;
}
if (fOptMusic == true) {
playMusic("music0.wav");
}
attachMovie("movPause", "movPause", 10050);
Frame 9
butPlay._focusrect = false;
butPlay.onPress = function () {
if (fOptSound == true) {
playSound("click.wav");
}
};
butPlay.onRelease = function () {
if (fOptMusic == true) {
musicObject.stop();
}
gotoAndStop ("wait");
movPause.gotoAndPlay("waitplay");
};
butSetting._focusrect = false;
butSetting.onPress = function () {
if (fOptSound == true) {
playSound("click.wav");
}
};
butSetting.onRelease = function () {
gotoAndStop ("setting");
};
butHelp._focusrect = false;
butHelp.onPress = function () {
if (fOptSound == true) {
playSound("click.wav");
}
};
butHelp.onRelease = function () {
gotoAndStop ("help");
};
butHighScore._focusrect = false;
butHighScore.onPress = function () {
if (fOptSound == true) {
playSound("click.wav");
}
};
butHighScore.onRelease = function () {
getURL ("http://scores.funny-games.biz/show.php?game_id=3&difficulty=0", "_blank");
};
butMoreGames._focusrect = false;
butMoreGames.onPress = function () {
if (fOptSound == true) {
playSound("click.wav");
}
};
butMoreGames.onRelease = function () {
getURL ("http://www.funny-games.biz/main.html", "_blank");
};
stop();
Frame 10
optSound.gotoAndStop(Number(fOptSound) + 1);
optMusic.gotoAndStop(Number(fOptMusic) + 1);
optSound.onPress = function () {
if (this._currentframe == 2) {
fOptSound = false;
} else {
fOptSound = true;
}
this.gotoAndStop(Number(fOptSound) + 1);
if (fOptSound == true) {
playSound("click.wav");
}
writeData();
};
optMusic.onPress = function () {
if (this._currentframe == 2) {
fOptMusic = false;
musicObject.stop();
} else {
fOptMusic = true;
}
this.gotoAndStop(Number(fOptMusic) + 1);
if (fOptMusic == true) {
playMusic("music0.wav");
}
if (fOptSound == true) {
playSound("click.wav");
}
writeData();
};
butBack._focusrect = false;
butBack.onPress = function () {
if (fOptSound == true) {
playSound("click.wav");
}
};
butBack.onRelease = function () {
gotoAndStop ("menu");
};
Frame 12
userName.text = "";
sc.text = totScore;
var char = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
var testChar = false;
butSubmit._focusrect = false;
butSubmit.onPress = function () {
if (fOptSound == true) {
playSound("click.wav");
}
};
butSubmit.onRelease = function () {
i = 0;
while (i < char.length) {
if (userName.text.charAt(0) == char.charAt(i)) {
testChar = true;
break;
}
i++;
}
if (testChar == true) {
sendScore();
gotoAndStop ("menu");
}
};
butCancel._focusrect = false;
butCancel.onPress = function () {
if (fOptSound == true) {
playSound("click.wav");
}
};
butCancel.onRelease = function () {
gotoAndStop ("menu");
};
Frame 14
gameStage = 1;
gameLevel = 1;
gamePause = false;
frogDeath = false;
leftBound = false;
stopLeftBg = false;
rightBound = false;
stopRightBg = false;
flame = false;
hP = 100;
totScore = 0;
if (fOptMusic == true) {
playMusic(("music" + gameStage) + ".wav");
}
attachMovie("frog", "frog", 10000);
attachMovie("cursor", "cursor", 10010);
attachMovie("tongue", "tongue", 10020);
attachMovie("movBg3", "movBg3", 10030);
attachMovie("infoboard", "movInfo", 10040);
frog._xscale = 45;
frog._yscale = 45;
frog._x = xPos;
frog._y = yPos;
frog.body.gotoAndStop("body0");
tongue._visible = false;
movBg3._x = -600;
movBg3.bg._x = 0;
movBg3._y = 400;
movInfo._x = 0;
movInfo._y = 0;
movInfo.score.text = 0;
movInfo.HM.meter._xscale = 100;
movInfo.HM.effect._xscale = 100;
movInfo.FM.meter._xscale = 0;
movInfo.FM.effect._xscale = 100;
movInfo.FM.effect._visible = false;
movInfo.SM.meter._xscale = 0;
movInfo.SM.effect._xscale = 0;
movInfo.SM.effect2._visible = false;
movInfo.DM.meter._xscale = 0;
movInfo.DM.effect._xscale = 0;
gotoAndStop("stage" + gameStage);
movBg3.gotoAndStop(gameStage);
Frame 15
defecateTimer = setInterval(defecation, 1000);
if (totScore >= scrTarget1) {
gameLevel = 2;
}
if (totScore >= scrTarget2) {
gameLevel = 3;
}
if (totScore >= scrTarget3) {
gameLevel = 4;
}
if (totScore >= scrTarget4) {
gameLevel = 5;
}
if (totScore >= scrTarget5) {
gameLevel = 6;
}
movBg3.setMask(movMask);
frogSplash = false;
control.onMouseDown = function () {
if (((((((shoot == false) && (onRange == true)) && (frogHit == false)) && (mouthFull == false)) && (freeze == false)) && (frogDeath == false)) && (gamePause == false)) {
Mouse.hide();
shoot = true;
if (fOptSound == true) {
playSound("catch.wav");
}
if (objInMouth == false) {
movInfo.frogStat.gotoAndStop(1);
} else if (stomachFull == false) {
movInfo.frogStat.gotoAndPlay("instomach");
if ((frmObjBeEaten == 13) && (hP < 100)) {
hP = hP + 10;
movInfo.HM.meter._xscale = hP;
} else if (frmObjBeEaten == 14) {
if (hP < 100) {
hP = hP + 50;
}
if (hP > 100) {
hP = 100;
movInfo.HM.meter._xscale = hP;
} else {
movInfo.HM.meter._xscale = hP;
}
} else if (frmObjBeEaten == 15) {
if (hP < 100) {
hP = hP + 100;
}
if (hP > 100) {
hP = 100;
movInfo.HM.meter._xscale = hP;
} else {
movInfo.HM.meter._xscale = hP;
}
if (flame == false) {
movInfo.FM.meter._xscale = movInfo.FM.meter._xscale + 100;
}
}
totScore = totScore + objScore;
if (totScore >= scrTarget1) {
movBg1.stageInfo1.gotoAndStop(3);
stageOpen1 = true;
}
if (totScore >= scrTarget2) {
movBg1.stageInfo2.gotoAndStop(3);
stageOpen2 = true;
}
movInfo.score.text = totScore;
if (totQty < 200) {
totQty = totQty + objQty;
}
movInfo.SM.meter._xscale = movInfo.SM.meter._xscale + (objQty / 2);
movInfo.SM.effect._xscale = movInfo.SM.meter._xscale;
}
objInMouth = false;
tongue._visible = true;
tongue.inside._xscale = hyp * 100;
tongue.outer._x = tongue.inside._width;
frog.head.gotoAndStop("shoot");
timerShoot = setInterval(tongueIn, 100);
}
};
control.onMouseMove = function () {
if (((frogHit == false) && (frogDeath == false)) && (gamePause == false)) {
frog.eyes.gotoAndStop("watch" + anglePos);
}
};
control.onKeyDown = function () {
if (((((Key.getCode() == 32) && (keylock == false)) && (objInMouth == true)) && (frogDeath == false)) && (gamePause == false)) {
keylock = true;
freeze = false;
j++;
if (j > 5) {
j = 1;
}
attachMovie("objspit", "objSpit" + j, 10001 + j);
eval ("objSpit" + j).setMask(movLayer);
eval ("objSpit" + j)._x = frog._x;
eval ("objSpit" + j)._y = frog._y;
if (flame) {
eval ("objSpit" + j).obj.gotoAndStop("flame");
spitObj(eval ("objSpit" + j), 0);
} else {
eval ("objSpit" + j).obj.gotoAndStop(frmObjBeEaten);
spitObj(eval ("objSpit" + j), 45);
}
objInMouth = false;
movInfo.frogStat.gotoAndPlay("spitup");
objQty = 0;
frog.gotoAndStop("spit" + anglePos);
timerSpit = setInterval(spitOut, 250);
} else if (((((((Key.getCode() == 65) && (keylock == false)) && (leftBound == false)) && (stopLeftBg == false)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
keylock = true;
keyhold = true;
freeze = false;
c = 5;
power = 1;
xMove = 5;
frogXMove = 0;
yMove = -10;
frog.gotoAndPlay("jump1");
} else if (((((((Key.getCode() == 65) && (keylock == false)) && (leftBound == false)) && (stopLeftBg == true)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
keylock = true;
keyhold = true;
freeze = false;
c = 5;
power = 1;
xMove = 0;
frogXMove = -5;
yMove = -10;
movBg1.frogPos = movBg1.frogPos - 50;
frog.gotoAndPlay("jump1");
} else if (((((((Key.getCode() == 68) && (keylock == false)) && (rightBound == false)) && (stopRightBg == false)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
keylock = true;
keyhold = true;
freeze = false;
c = 5;
power = 1;
xMove = -5;
frogXMove = 0;
yMove = -10;
frog.gotoAndPlay("jump2");
} else if (((((((Key.getCode() == 68) && (keylock == false)) && (rightBound == false)) && (stopRightBg == true)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
keylock = true;
keyhold = true;
freeze = false;
c = 5;
power = 1;
xMove = 0;
frogXMove = 5;
yMove = -10;
movBg1.frogPos = movBg1.frogPos + 50;
frog.gotoAndPlay("jump2");
} else if (((((Key.getCode() == 87) && (keylock == false)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
keylock = true;
keyhold = true;
freeze = false;
c = 5;
power = 1;
xMove = 0;
yMove = -10;
frog.gotoAndPlay("jump3");
} else if (((((Key.getCode() == 83) && (keylock == false)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
freeze = true;
frog.gotoAndStop("freeze");
} else if ((((((Key.getCode() == 69) && (keylock == false)) && (objInMouth == true)) && (stomachFull == false)) && (frogDeath == false)) && (gamePause == false)) {
frog.head.gotoAndStop(1);
objInMouth = false;
movInfo.frogStat.gotoAndPlay("instomach");
if (fOptSound == true) {
playSound("eat.wav");
}
if ((frmObjBeEaten == 13) && (hP < 100)) {
hP = hP + 10;
movInfo.HM.meter._xscale = hP;
} else if (frmObjBeEaten == 14) {
if (hP < 100) {
hP = hP + 50;
}
if (hP > 100) {
hP = 100;
movInfo.HM.meter._xscale = hP;
} else {
movInfo.HM.meter._xscale = hP;
}
} else if (frmObjBeEaten == 15) {
if (hP < 100) {
hP = hP + 100;
}
if (hP > 100) {
hP = 100;
movInfo.HM.meter._xscale = hP;
} else {
movInfo.HM.meter._xscale = hP;
}
if (flame == false) {
movInfo.FM.meter._xscale = movInfo.FM.meter._xscale + 100;
}
}
totScore = totScore + objScore;
if (totScore >= scrTarget1) {
movBg1.stageInfo1.gotoAndStop(3);
stageOpen1 = true;
}
if (totScore >= scrTarget2) {
movBg1.stageInfo2.gotoAndStop(3);
stageOpen2 = true;
}
movInfo.score.text = totScore;
if (totQty < 200) {
totQty = totQty + objQty;
}
movInfo.SM.meter._xscale = movInfo.SM.meter._xscale + (objQty / 2);
movInfo.SM.effect._xscale = movInfo.SM.meter._xscale;
} else if ((((Key.getCode() == 65) && (keylock == false)) && (frogDeath == false)) && (gamePause == false)) {
if ((leftBound == true) && (stageOpen1 == true)) {
keylock = true;
gameStage = 2;
movLayer.gotoAndPlay(2);
}
} else if ((((Key.getCode() == 68) && (keylock == false)) && (frogDeath == false)) && (gamePause == false)) {
if ((rightBound == true) && (stageOpen2 == true)) {
keylock = true;
gameStage = 3;
movLayer.gotoAndPlay(2);
}
} else if (((Key.getCode() == 77) && (frogDeath == false)) && (keylock == false)) {
if (gamePause == false) {
gamePause = true;
movPause.gotoAndStop(2);
cursor._visible = false;
Mouse.show();
clearInterval(defecateTimer);
if (fOptMusic == true) {
musicObject.stop();
}
} else {
gamePause = false;
movPause.gotoAndStop(1);
cursor._visible = true;
Mouse.hide();
defecateTimer = setInterval(defecation, 1000);
if (flame == true) {
flameTimer = setInterval(throwFlame, 500);
}
if (fOptMusic == true) {
playMusic(("music" + gameStage) + ".wav");
}
}
}
};
control.onKeyUp = function () {
if (Key.getCode() == 65) {
keyhold = false;
} else if (Key.getCode() == 68) {
keyhold = false;
} else if (Key.getCode() == 87) {
keyhold = false;
} else if (((((Key.getCode() == 83) && (keylock == false)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
freeze = false;
frog.gotoAndStop("standby");
}
};
Mouse.addListener(control);
Key.addListener(control);
frog.onEnterFrame = function () {
jumpTimer = jumpTimer + c;
if (jumpTimer == ((50 * power) + 5)) {
keylock = false;
c = 0;
yMove = 0;
xMove = 0;
frogXMove = 0;
jumpTimer = 0;
this.gotoAndPlay(1);
}
if (jumpTimer == (((50 * power) / 2) + 5)) {
yMove = 10;
this.gotoAndPlay(this._currentframe + 1);
}
this._y = this._y + yMove;
this._x = this._x + frogXMove;
i = 1;
while (i <= 5) {
eval ("objSpit" + i)._x = eval ("objSpit" + i)._x + xMove;
i++;
}
feces._x = feces._x + xMove;
movBg1._x = movBg1._x + xMove;
movBg2._x = movBg2._x + (xMove / 8);
movBg3._x = movBg3._x + xMove;
movBg1.frogPos = movBg1.frogPos - xMove;
if (movBg1._x == -50) {
stopLeftBg = true;
} else if (movBg1._x == -100) {
stopLeftBg = false;
}
if ((this._x == 225) && (movBg1._x == -50)) {
stopRightBg = true;
if (stageOpen1 == false) {
movBg1.stageInfo1.gotoAndStop(2);
}
} else if ((this._x == 275) && (movBg1._x == -50)) {
stopRightBg = false;
if (stageOpen1 == false) {
movBg1.stageInfo1.gotoAndStop(1);
}
}
if (this._x == 75) {
leftBound = true;
} else if (this._x == 125) {
leftBound = false;
}
if (movBg1._x == -1150) {
stopRightBg = true;
} else if (movBg1._x == -1100) {
stopRightBg = false;
}
if ((this._x == 325) && (movBg1._x == -1150)) {
stopLeftBg = true;
if (stageOpen2 == false) {
movBg1.stageInfo2.gotoAndStop(2);
}
} else if ((this._x == 275) && (movBg1._x == -1150)) {
stopLeftBg = false;
if (stageOpen2 == false) {
movBg1.stageInfo2.gotoAndStop(1);
}
}
if (this._x == 475) {
rightBound = true;
} else if (this._x == 425) {
rightBound = false;
}
tongue._x = this._x;
tongue._y = this._y;
cursor._x = _xmouse;
cursor._y = _ymouse;
if (((hyp <= 200) && (mouthFull == false)) && (freeze == false)) {
cursor.gotoAndStop(1);
onRange = true;
} else {
cursor.gotoAndStop(2);
onRange = false;
}
difX = _xmouse - this._x;
difY = _ymouse - this._y;
xSquared = difX * difX;
ySquared = difY * difY;
hypSquared = Number(xSquared) + Number(ySquared);
hyp = 1;
counter = 0;
while (Number(counter) < 15) {
hyp = hyp - (((hyp * hyp) - hypSquared) / (2 * hyp));
counter++;
}
if (Number(difY) < 0) {
difYMagnitude = difY * -1;
} else {
difYMagnitude = difY;
}
sine = difYMagnitude / hyp;
part1 = (Math.PI/2);
part2Squared = 1 - sine;
part2 = 1;
counter = 0;
while (Number(counter) < 15) {
part2 = part2 - (((part2 * part2) - part2Squared) / (2 * part2));
counter = Number(counter) + 1;
}
part3 = Number(Number(Number(1.5707288) + Number(-0.2121144 * sine)) + Number(0.074261 * (sine * sine))) + Number(-0.0187293 * ((sine * sine) * sine));
arcsine = part1 - (part2 * part3);
angle = arcsine / 0.01745329;
if ((Number(difX) <= 0) and (Number(difY) > 0)) {
rotate = 90 + Number(90 - angle);
} else if ((Number(difX) > 0) and (Number(difY) > 0)) {
rotate = angle;
} else if ((Number(difX) > 0) and (Number(difY) < 0)) {
rotate = -angle;
} else if ((Number(difX) <= 0) and (Number(difY) < 0)) {
rotate = -(90 + Number(90 - angle));
}
tongue._rotation = rotate;
rotateValue = rotate + 180;
if ((rotateValue >= 247.5) && (rotateValue <= 292.5)) {
anglePos = 1;
} else if ((rotateValue >= 292.5) && (rotateValue <= 337.5)) {
anglePos = 2;
} else if ((rotateValue >= 337.5) || (rotateValue <= 22.5)) {
anglePos = 3;
} else if ((rotateValue >= 22.5) && (rotateValue <= 67.5)) {
anglePos = 4;
} else if ((rotateValue >= 67.5) && (rotateValue <= 112.5)) {
anglePos = 5;
} else if ((rotateValue >= 112.5) && (rotateValue <= 157.5)) {
anglePos = 6;
} else if ((rotateValue >= 157.5) && (rotateValue <= 202.5)) {
anglePos = 7;
} else if ((rotateValue >= 202.5) && (rotateValue <= 247.5)) {
anglePos = 8;
}
};
movInfo.onEnterFrame = function () {
if (this.SM.meter._xscale > 100) {
this.SM.meter._xscale = 100;
} else if (this.SM.meter._xscale < 0) {
this.SM.meter._xscale = 0;
}
if (totQty < 0) {
totQty = 0;
} else if (totQty < 50) {
frog.body.gotoAndStop("body0");
} else if (totQty < 100) {
frog.body.gotoAndStop("body1");
} else if (totQty < 150) {
frog.body.gotoAndStop("body2");
} else if (totQty < 200) {
frog.body.gotoAndStop("body3");
} else if (totQty >= 200) {
totQty = 200;
this.SM.effect2._visible = true;
stomachFull = true;
mouthFull = true;
}
if (objInMouth == false) {
mouthFull = false;
}
if (this.HM.meter._xscale <= 0) {
this.HM.meter._xscale = 0;
clearInterval(defecateTimer);
if (flame == true) {
clearInterval(flameTimer);
}
removeMovieClip(cursor);
Mouse.show();
frog.gotoAndStop("death");
frogDeath = true;
movPause.gotoAndStop("gameover");
} else if (this.HM.meter._xscale <= 20) {
frog.head.bump.gotoAndStop("bump3");
} else if (this.HM.meter._xscale <= 50) {
frog.head.bump.gotoAndStop("bump2");
} else if (this.HM.meter._xscale <= 80) {
frog.head.bump.gotoAndStop("bump1");
} else if (this.HM.meter._xscale <= 100) {
frog.head.bump.gotoAndStop("bump0");
}
if (this.FM.meter._xscale >= 100) {
flame = true;
if (fOptSound == true) {
playSound("magicpower.wav");
}
this.FM.meter._xscale = 0;
this.FM.effect._visible = true;
flameTimer = setInterval(throwFlame, 500);
}
};
Mouse.hide();
stop();
Frame 16
defecateTimer = setInterval(defecation, 1000);
if (totScore >= scrTarget1) {
gameLevel = 2;
}
if (totScore >= scrTarget2) {
gameLevel = 3;
}
if (totScore >= scrTarget3) {
gameLevel = 4;
}
if (totScore >= scrTarget4) {
gameLevel = 5;
}
if (totScore >= scrTarget5) {
gameLevel = 6;
}
movBg3.setMask(movMask);
control.onMouseDown = function () {
if (((((((shoot == false) && (onRange == true)) && (frogHit == false)) && (mouthFull == false)) && (freeze == false)) && (frogDeath == false)) && (gamePause == false)) {
Mouse.hide();
shoot = true;
if (fOptSound == true) {
playSound("catch.wav");
}
if (objInMouth == false) {
movInfo.frogStat.gotoAndStop(1);
} else if (stomachFull == false) {
movInfo.frogStat.gotoAndPlay("instomach");
if ((frmObjBeEaten == 13) && (hP < 100)) {
hP = hP + 10;
movInfo.HM.meter._xscale = hP;
} else if (frmObjBeEaten == 14) {
if (hP < 100) {
hP = hP + 50;
}
if (hP > 100) {
hP = 100;
movInfo.HM.meter._xscale = hP;
} else {
movInfo.HM.meter._xscale = hP;
}
} else if (frmObjBeEaten == 15) {
if (hP < 100) {
hP = hP + 100;
}
if (hP > 100) {
hP = 100;
movInfo.HM.meter._xscale = hP;
} else {
movInfo.HM.meter._xscale = hP;
}
if (flame == false) {
movInfo.FM.meter._xscale = movInfo.FM.meter._xscale + 100;
}
}
totScore = totScore + objScore;
if (totScore >= scrTarget5) {
movBg1.stageInfo1.gotoAndStop(3);
stageOpen1 = true;
}
movInfo.score.text = totScore;
if (totQty < 200) {
totQty = totQty + objQty;
}
movInfo.SM.meter._xscale = movInfo.SM.meter._xscale + (objQty / 2);
movInfo.SM.effect._xscale = movInfo.SM.meter._xscale;
}
objInMouth = false;
tongue._visible = true;
tongue.inside._xscale = hyp * 100;
tongue.outer._x = tongue.inside._width;
frog.head.gotoAndStop("shoot");
timerShoot = setInterval(tongueIn, 100);
}
};
control.onMouseMove = function () {
if (((frogHit == false) && (frogDeath == false)) && (gamePause == false)) {
frog.eyes.gotoAndStop("watch" + anglePos);
}
};
control.onKeyDown = function () {
if (((((Key.getCode() == 32) && (keylock == false)) && (objInMouth == true)) && (frogDeath == false)) && (gamePause == false)) {
keylock = true;
freeze = false;
j++;
if (j > 5) {
j = 1;
}
attachMovie("objspit", "objSpit" + j, 10001 + j);
eval ("objSpit" + j).setMask(movLayer);
eval ("objSpit" + j)._x = frog._x;
eval ("objSpit" + j)._y = frog._y;
if (flame) {
eval ("objSpit" + j).obj.gotoAndStop("flame");
spitObj(eval ("objSpit" + j), 0);
} else {
eval ("objSpit" + j).obj.gotoAndStop(frmObjBeEaten);
spitObj(eval ("objSpit" + j), 45);
}
objInMouth = false;
movInfo.frogStat.gotoAndPlay("spitup");
objQty = 0;
frog.gotoAndStop("spit" + anglePos);
timerSpit = setInterval(spitOut, 250);
} else if (((((((Key.getCode() == 65) && (keylock == false)) && (leftBound == false)) && (stopLeftBg == false)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
keylock = true;
keyhold = true;
freeze = false;
c = 5;
power = 1;
xMove = 5;
frogXMove = 0;
yMove = -10;
frog.gotoAndPlay("jump1");
} else if (((((((Key.getCode() == 65) && (keylock == false)) && (leftBound == false)) && (stopLeftBg == true)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
keylock = true;
keyhold = true;
freeze = false;
c = 5;
power = 1;
xMove = 0;
frogXMove = -5;
yMove = -10;
movBg1.frogPos = movBg1.frogPos - 50;
frog.gotoAndPlay("jump1");
} else if (((((((Key.getCode() == 68) && (keylock == false)) && (rightBound == false)) && (stopRightBg == false)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
keylock = true;
keyhold = true;
freeze = false;
c = 5;
power = 1;
xMove = -5;
frogXMove = 0;
yMove = -10;
frog.gotoAndPlay("jump2");
} else if (((((((Key.getCode() == 68) && (keylock == false)) && (rightBound == false)) && (stopRightBg == true)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
keylock = true;
keyhold = true;
freeze = false;
c = 5;
power = 1;
xMove = 0;
frogXMove = 5;
yMove = -10;
movBg1.frogPos = movBg1.frogPos + 50;
frog.gotoAndPlay("jump2");
} else if (((((Key.getCode() == 87) && (keylock == false)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
keylock = true;
keyhold = true;
freeze = false;
c = 5;
power = 1;
xMove = 0;
yMove = -10;
frog.gotoAndPlay("jump3");
} else if (((((Key.getCode() == 83) && (keylock == false)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
freeze = true;
frog.gotoAndStop("freeze");
} else if ((((((Key.getCode() == 69) && (keylock == false)) && (objInMouth == true)) && (stomachFull == false)) && (frogDeath == false)) && (gamePause == false)) {
frog.head.gotoAndStop(1);
objInMouth = false;
movInfo.frogStat.gotoAndPlay("instomach");
if (fOptSound == true) {
playSound("eat.wav");
}
if ((frmObjBeEaten == 13) && (hP < 100)) {
hP = hP + 10;
movInfo.HM.meter._xscale = hP;
} else if (frmObjBeEaten == 14) {
if (hP < 100) {
hP = hP + 50;
}
if (hP > 100) {
hP = 100;
movInfo.HM.meter._xscale = hP;
} else {
movInfo.HM.meter._xscale = hP;
}
} else if (frmObjBeEaten == 15) {
if (hP < 100) {
hP = hP + 100;
}
if (hP > 100) {
hP = 100;
movInfo.HM.meter._xscale = hP;
} else {
movInfo.HM.meter._xscale = hP;
}
if (flame == false) {
movInfo.FM.meter._xscale = movInfo.FM.meter._xscale + 100;
}
}
totScore = totScore + objScore;
if (totScore >= scrTarget5) {
movBg1.stageInfo1.gotoAndStop(3);
stageOpen1 = true;
}
movInfo.score.text = totScore;
if (totQty < 200) {
totQty = totQty + objQty;
}
movInfo.SM.meter._xscale = movInfo.SM.meter._xscale + (objQty / 2);
movInfo.SM.effect._xscale = movInfo.SM.meter._xscale;
} else if ((((Key.getCode() == 65) && (keylock == false)) && (frogDeath == false)) && (gamePause == false)) {
if ((leftBound == true) && (stageOpen1 == true)) {
keylock = true;
gameStage = 5;
movLayer.gotoAndPlay(2);
}
} else if ((((Key.getCode() == 68) && (keylock == false)) && (frogDeath == false)) && (gamePause == false)) {
if (rightBound == true) {
keylock = true;
gameStage = 1;
movLayer.gotoAndPlay(2);
}
} else if ((Key.getCode() == 77) && (frogDeath == false)) {
if (gamePause == false) {
gamePause = true;
movPause.gotoAndStop(2);
cursor._visible = false;
Mouse.show();
clearInterval(defecateTimer);
if (fOptMusic == true) {
musicObject.stop();
}
} else {
gamePause = false;
movPause.gotoAndStop(1);
cursor._visible = true;
Mouse.hide();
defecateTimer = setInterval(defecation, 1000);
if (flame == true) {
flameTimer = setInterval(throwFlame, 500);
}
if (fOptMusic == true) {
playMusic(("music" + gameStage) + ".wav");
}
}
}
};
control.onKeyUp = function () {
if (Key.getCode() == 65) {
keyhold = false;
} else if (Key.getCode() == 68) {
keyhold = false;
} else if (Key.getCode() == 87) {
keyhold = false;
} else if (((((Key.getCode() == 83) && (keylock == false)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
freeze = false;
frog.gotoAndStop("standby");
}
};
Mouse.addListener(control);
Key.addListener(control);
frog.onEnterFrame = function () {
jumpTimer = jumpTimer + c;
if (jumpTimer == ((50 * power) + 5)) {
keylock = false;
c = 0;
yMove = 0;
xMove = 0;
frogXMove = 0;
jumpTimer = 0;
this.gotoAndPlay(1);
}
if (jumpTimer == (((50 * power) / 2) + 5)) {
yMove = 10;
this.gotoAndPlay(this._currentframe + 1);
}
this._y = this._y + yMove;
this._x = this._x + frogXMove;
i = 1;
while (i <= 5) {
eval ("objSpit" + i)._x = eval ("objSpit" + i)._x + xMove;
i++;
}
feces._x = feces._x + xMove;
movBg1._x = movBg1._x + xMove;
movBg2._x = movBg2._x + (xMove / 8);
movBg3._x = movBg3._x + xMove;
movBg1.frogPos = movBg1.frogPos - xMove;
if (movBg1._x == -50) {
stopLeftBg = true;
} else if (movBg1._x == -100) {
stopLeftBg = false;
}
if ((this._x == 225) && (movBg1._x == -50)) {
stopRightBg = true;
if (stageOpen1 == false) {
movBg1.stageInfo1.gotoAndStop(2);
}
} else if ((this._x == 275) && (movBg1._x == -50)) {
stopRightBg = false;
if (stageOpen1 == false) {
movBg1.stageInfo1.gotoAndStop(1);
}
}
if (this._x == 75) {
leftBound = true;
} else if (this._x == 125) {
leftBound = false;
}
if (movBg1._x == -1150) {
stopRightBg = true;
} else if (movBg1._x == -1100) {
stopRightBg = false;
}
if ((this._x == 325) && (movBg1._x == -1150)) {
stopLeftBg = true;
} else if ((this._x == 275) && (movBg1._x == -1150)) {
stopLeftBg = false;
}
if (this._x == 475) {
rightBound = true;
} else if (this._x == 425) {
rightBound = false;
}
tongue._x = this._x;
tongue._y = this._y;
cursor._x = _xmouse;
cursor._y = _ymouse;
if (((hyp <= 200) && (mouthFull == false)) && (freeze == false)) {
cursor.gotoAndStop(1);
onRange = true;
} else {
cursor.gotoAndStop(2);
onRange = false;
}
difX = _xmouse - this._x;
difY = _ymouse - this._y;
xSquared = difX * difX;
ySquared = difY * difY;
hypSquared = Number(xSquared) + Number(ySquared);
hyp = 1;
counter = 0;
while (Number(counter) < 15) {
hyp = hyp - (((hyp * hyp) - hypSquared) / (2 * hyp));
counter++;
}
if (Number(difY) < 0) {
difYMagnitude = difY * -1;
} else {
difYMagnitude = difY;
}
sine = difYMagnitude / hyp;
part1 = (Math.PI/2);
part2Squared = 1 - sine;
part2 = 1;
counter = 0;
while (Number(counter) < 15) {
part2 = part2 - (((part2 * part2) - part2Squared) / (2 * part2));
counter = Number(counter) + 1;
}
part3 = Number(Number(Number(1.5707288) + Number(-0.2121144 * sine)) + Number(0.074261 * (sine * sine))) + Number(-0.0187293 * ((sine * sine) * sine));
arcsine = part1 - (part2 * part3);
angle = arcsine / 0.01745329;
if ((Number(difX) <= 0) and (Number(difY) > 0)) {
rotate = 90 + Number(90 - angle);
} else if ((Number(difX) > 0) and (Number(difY) > 0)) {
rotate = angle;
} else if ((Number(difX) > 0) and (Number(difY) < 0)) {
rotate = -angle;
} else if ((Number(difX) <= 0) and (Number(difY) < 0)) {
rotate = -(90 + Number(90 - angle));
}
tongue._rotation = rotate;
rotateValue = rotate + 180;
if ((rotateValue >= 247.5) && (rotateValue <= 292.5)) {
anglePos = 1;
} else if ((rotateValue >= 292.5) && (rotateValue <= 337.5)) {
anglePos = 2;
} else if ((rotateValue >= 337.5) || (rotateValue <= 22.5)) {
anglePos = 3;
} else if ((rotateValue >= 22.5) && (rotateValue <= 67.5)) {
anglePos = 4;
} else if ((rotateValue >= 67.5) && (rotateValue <= 112.5)) {
anglePos = 5;
} else if ((rotateValue >= 112.5) && (rotateValue <= 157.5)) {
anglePos = 6;
} else if ((rotateValue >= 157.5) && (rotateValue <= 202.5)) {
anglePos = 7;
} else if ((rotateValue >= 202.5) && (rotateValue <= 247.5)) {
anglePos = 8;
}
};
movInfo.onEnterFrame = function () {
if (this.SM.meter._xscale > 100) {
this.SM.meter._xscale = 100;
} else if (this.SM.meter._xscale < 0) {
this.SM.meter._xscale = 0;
}
if (totQty < 0) {
totQty = 0;
} else if (totQty < 50) {
frog.body.gotoAndStop("body0");
} else if (totQty < 100) {
frog.body.gotoAndStop("body1");
} else if (totQty < 150) {
frog.body.gotoAndStop("body2");
} else if (totQty < 200) {
frog.body.gotoAndStop("body3");
} else if (totQty >= 200) {
totQty = 200;
this.SM.effect2._visible = true;
stomachFull = true;
mouthFull = true;
}
if (objInMouth == false) {
mouthFull = false;
}
if (this.HM.meter._xscale <= 0) {
this.HM.meter._xscale = 0;
clearInterval(defecateTimer);
if (flame == true) {
clearInterval(flameTimer);
}
removeMovieClip(cursor);
Mouse.show();
frog.gotoAndStop("death");
frogDeath = true;
movPause.gotoAndStop("gameover");
} else if (this.HM.meter._xscale <= 20) {
frog.head.bump.gotoAndStop("bump3");
} else if (this.HM.meter._xscale <= 50) {
frog.head.bump.gotoAndStop("bump2");
} else if (this.HM.meter._xscale <= 80) {
frog.head.bump.gotoAndStop("bump1");
} else if (this.HM.meter._xscale <= 100) {
frog.head.bump.gotoAndStop("bump0");
}
if (this.FM.meter._xscale >= 100) {
flame = true;
if (fOptSound == true) {
playSound("magicpower.wav");
}
this.FM.meter._xscale = 0;
this.FM.effect._visible = true;
flameTimer = setInterval(throwFlame, 500);
}
};
Mouse.hide();
stop();
Frame 17
defecateTimer = setInterval(defecation, 1000);
if (totScore >= scrTarget1) {
gameLevel = 2;
}
if (totScore >= scrTarget2) {
gameLevel = 3;
}
if (totScore >= scrTarget3) {
gameLevel = 4;
}
if (totScore >= scrTarget4) {
gameLevel = 5;
}
if (totScore >= scrTarget5) {
gameLevel = 6;
}
movBg3.setMask(movMask);
control.onMouseDown = function () {
if (((((((shoot == false) && (onRange == true)) && (frogHit == false)) && (mouthFull == false)) && (freeze == false)) && (frogDeath == false)) && (gamePause == false)) {
Mouse.hide();
shoot = true;
if (fOptSound == true) {
playSound("catch.wav");
}
if (objInMouth == false) {
movInfo.frogStat.gotoAndStop(1);
} else if (stomachFull == false) {
movInfo.frogStat.gotoAndPlay("instomach");
if ((frmObjBeEaten == 13) && (hP < 100)) {
hP = hP + 10;
movInfo.HM.meter._xscale = hP;
} else if (frmObjBeEaten == 14) {
if (hP < 100) {
hP = hP + 50;
}
if (hP > 100) {
hP = 100;
movInfo.HM.meter._xscale = hP;
} else {
movInfo.HM.meter._xscale = hP;
}
} else if (frmObjBeEaten == 15) {
if (hP < 100) {
hP = hP + 100;
}
if (hP > 100) {
hP = 100;
movInfo.HM.meter._xscale = hP;
} else {
movInfo.HM.meter._xscale = hP;
}
if (flame == false) {
movInfo.FM.meter._xscale = movInfo.FM.meter._xscale + 100;
}
}
totScore = totScore + objScore;
if (totScore >= scrTarget3) {
movBg1.stageInfo2.gotoAndStop(3);
stageOpen2 = true;
}
movInfo.score.text = totScore;
if (totQty < 200) {
totQty = totQty + objQty;
}
movInfo.SM.meter._xscale = movInfo.SM.meter._xscale + (objQty / 2);
movInfo.SM.effect._xscale = movInfo.SM.meter._xscale;
}
objInMouth = false;
tongue._visible = true;
tongue.inside._xscale = hyp * 100;
tongue.outer._x = tongue.inside._width;
frog.head.gotoAndStop("shoot");
timerShoot = setInterval(tongueIn, 100);
}
};
control.onMouseMove = function () {
if (((frogHit == false) && (frogDeath == false)) && (gamePause == false)) {
frog.eyes.gotoAndStop("watch" + anglePos);
}
};
control.onKeyDown = function () {
if (((((Key.getCode() == 32) && (keylock == false)) && (objInMouth == true)) && (frogDeath == false)) && (gamePause == false)) {
keylock = true;
freeze = false;
j++;
if (j > 5) {
j = 1;
}
attachMovie("objspit", "objSpit" + j, 10001 + j);
eval ("objSpit" + j).setMask(movLayer);
eval ("objSpit" + j)._x = frog._x;
eval ("objSpit" + j)._y = frog._y;
if (flame) {
eval ("objSpit" + j).obj.gotoAndStop("flame");
spitObj(eval ("objSpit" + j), 0);
} else {
eval ("objSpit" + j).obj.gotoAndStop(frmObjBeEaten);
spitObj(eval ("objSpit" + j), 45);
}
objInMouth = false;
movInfo.frogStat.gotoAndPlay("spitup");
objQty = 0;
frog.gotoAndStop("spit" + anglePos);
timerSpit = setInterval(spitOut, 250);
} else if (((((((Key.getCode() == 65) && (keylock == false)) && (leftBound == false)) && (stopLeftBg == false)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
keylock = true;
keyhold = true;
freeze = false;
c = 5;
power = 1;
xMove = 5;
frogXMove = 0;
yMove = -10;
frog.gotoAndPlay("jump1");
} else if (((((((Key.getCode() == 65) && (keylock == false)) && (leftBound == false)) && (stopLeftBg == true)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
keylock = true;
keyhold = true;
freeze = false;
c = 5;
power = 1;
xMove = 0;
frogXMove = -5;
yMove = -10;
movBg1.frogPos = movBg1.frogPos - 50;
frog.gotoAndPlay("jump1");
} else if (((((((Key.getCode() == 68) && (keylock == false)) && (rightBound == false)) && (stopRightBg == false)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
keylock = true;
keyhold = true;
freeze = false;
c = 5;
power = 1;
xMove = -5;
frogXMove = 0;
yMove = -10;
frog.gotoAndPlay("jump2");
} else if (((((((Key.getCode() == 68) && (keylock == false)) && (rightBound == false)) && (stopRightBg == true)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
keylock = true;
keyhold = true;
freeze = false;
c = 5;
power = 1;
xMove = 0;
frogXMove = 5;
yMove = -10;
movBg1.frogPos = movBg1.frogPos + 50;
frog.gotoAndPlay("jump2");
} else if (((((Key.getCode() == 87) && (keylock == false)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
keylock = true;
keyhold = true;
freeze = false;
c = 5;
power = 1;
xMove = 0;
yMove = -10;
frog.gotoAndPlay("jump3");
} else if (((((Key.getCode() == 83) && (keylock == false)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
freeze = true;
frog.gotoAndStop("freeze");
} else if ((((((Key.getCode() == 69) && (keylock == false)) && (objInMouth == true)) && (stomachFull == false)) && (frogDeath == false)) && (gamePause == false)) {
frog.head.gotoAndStop(1);
objInMouth = false;
movInfo.frogStat.gotoAndPlay("instomach");
if (fOptSound == true) {
playSound("eat.wav");
}
if ((frmObjBeEaten == 13) && (hP < 100)) {
hP = hP + 10;
movInfo.HM.meter._xscale = hP;
} else if (frmObjBeEaten == 14) {
if (hP < 100) {
hP = hP + 50;
}
if (hP > 100) {
hP = 100;
movInfo.HM.meter._xscale = hP;
} else {
movInfo.HM.meter._xscale = hP;
}
} else if (frmObjBeEaten == 15) {
if (hP < 100) {
hP = hP + 100;
}
if (hP > 100) {
hP = 100;
movInfo.HM.meter._xscale = hP;
} else {
movInfo.HM.meter._xscale = hP;
}
if (flame == false) {
movInfo.FM.meter._xscale = movInfo.FM.meter._xscale + 100;
}
}
totScore = totScore + objScore;
if (totScore >= scrTarget3) {
movBg1.stageInfo2.gotoAndStop(3);
stageOpen2 = true;
}
movInfo.score.text = totScore;
if (totQty < 200) {
totQty = totQty + objQty;
}
movInfo.SM.meter._xscale = movInfo.SM.meter._xscale + (objQty / 2);
movInfo.SM.effect._xscale = movInfo.SM.meter._xscale;
} else if ((((Key.getCode() == 65) && (keylock == false)) && (frogDeath == false)) && (gamePause == false)) {
if (leftBound == true) {
keylock = true;
gameStage = 1;
movLayer.gotoAndPlay(2);
}
} else if ((((Key.getCode() == 68) && (keylock == false)) && (frogDeath == false)) && (gamePause == false)) {
if ((rightBound == true) && (stageOpen2 == true)) {
keylock = true;
gameStage = 4;
movLayer.gotoAndPlay(2);
}
} else if ((Key.getCode() == 77) && (frogDeath == false)) {
if (gamePause == false) {
gamePause = true;
movPause.gotoAndStop(2);
cursor._visible = false;
Mouse.show();
clearInterval(defecateTimer);
if (fOptMusic == true) {
musicObject.stop();
}
} else {
gamePause = false;
movPause.gotoAndStop(1);
cursor._visible = true;
Mouse.hide();
defecateTimer = setInterval(defecation, 1000);
if (flame == true) {
flameTimer = setInterval(throwFlame, 500);
}
if (fOptMusic == true) {
playMusic(("music" + gameStage) + ".wav");
}
}
}
};
control.onKeyUp = function () {
if (Key.getCode() == 65) {
keyhold = false;
} else if (Key.getCode() == 68) {
keyhold = false;
} else if (Key.getCode() == 87) {
keyhold = false;
} else if (((((Key.getCode() == 83) && (keylock == false)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
freeze = false;
frog.gotoAndStop("standby");
}
};
Mouse.addListener(control);
Key.addListener(control);
frog.onEnterFrame = function () {
if (movBg1._x == -100) {
frogSplashFrame = "rl";
frogSplash = true;
} else if ((movBg1._x <= -150) && (movBg1._x >= -1050)) {
frogSplashFrame = "rc";
frogSplash = true;
} else if (movBg1._x == -1100) {
frogSplashFrame = "rr";
frogSplash = true;
} else {
frogSplash = false;
}
jumpTimer = jumpTimer + c;
if (jumpTimer == ((50 * power) + 5)) {
keylock = false;
c = 0;
yMove = 0;
xMove = 0;
frogXMove = 0;
jumpTimer = 0;
this.gotoAndPlay(1);
}
if (jumpTimer == (((50 * power) / 2) + 5)) {
yMove = 10;
this.gotoAndPlay(this._currentframe + 1);
}
this._y = this._y + yMove;
this._x = this._x + frogXMove;
i = 1;
while (i <= 5) {
eval ("objSpit" + i)._x = eval ("objSpit" + i)._x + xMove;
i++;
}
feces._x = feces._x + xMove;
movBg1._x = movBg1._x + xMove;
movBg2._x = movBg2._x + (xMove / 8);
movBg3._x = movBg3._x + xMove;
movBg1.frogPos = movBg1.frogPos - xMove;
if (movBg1._x == -50) {
stopLeftBg = true;
} else if (movBg1._x == -100) {
stopLeftBg = false;
}
if ((this._x == 225) && (movBg1._x == -50)) {
stopRightBg = true;
} else if ((this._x == 275) && (movBg1._x == -50)) {
stopRightBg = false;
}
if (this._x == 75) {
leftBound = true;
} else if (this._x == 125) {
leftBound = false;
}
if (movBg1._x == -1150) {
stopRightBg = true;
} else if (movBg1._x == -1100) {
stopRightBg = false;
}
if ((this._x == 325) && (movBg1._x == -1150)) {
stopLeftBg = true;
if (stageOpen2 == false) {
movBg1.stageInfo2.gotoAndStop(2);
}
} else if ((this._x == 275) && (movBg1._x == -1150)) {
stopLeftBg = false;
if (stageOpen2 == false) {
movBg1.stageInfo2.gotoAndStop(1);
}
}
if (this._x == 475) {
rightBound = true;
} else if (this._x == 425) {
rightBound = false;
}
tongue._x = this._x;
tongue._y = this._y;
cursor._x = _xmouse;
cursor._y = _ymouse;
if (((hyp <= 200) && (mouthFull == false)) && (freeze == false)) {
cursor.gotoAndStop(1);
onRange = true;
} else {
cursor.gotoAndStop(2);
onRange = false;
}
difX = _xmouse - this._x;
difY = _ymouse - this._y;
xSquared = difX * difX;
ySquared = difY * difY;
hypSquared = Number(xSquared) + Number(ySquared);
hyp = 1;
counter = 0;
while (Number(counter) < 15) {
hyp = hyp - (((hyp * hyp) - hypSquared) / (2 * hyp));
counter++;
}
if (Number(difY) < 0) {
difYMagnitude = difY * -1;
} else {
difYMagnitude = difY;
}
sine = difYMagnitude / hyp;
part1 = (Math.PI/2);
part2Squared = 1 - sine;
part2 = 1;
counter = 0;
while (Number(counter) < 15) {
part2 = part2 - (((part2 * part2) - part2Squared) / (2 * part2));
counter = Number(counter) + 1;
}
part3 = Number(Number(Number(1.5707288) + Number(-0.2121144 * sine)) + Number(0.074261 * (sine * sine))) + Number(-0.0187293 * ((sine * sine) * sine));
arcsine = part1 - (part2 * part3);
angle = arcsine / 0.01745329;
if ((Number(difX) <= 0) and (Number(difY) > 0)) {
rotate = 90 + Number(90 - angle);
} else if ((Number(difX) > 0) and (Number(difY) > 0)) {
rotate = angle;
} else if ((Number(difX) > 0) and (Number(difY) < 0)) {
rotate = -angle;
} else if ((Number(difX) <= 0) and (Number(difY) < 0)) {
rotate = -(90 + Number(90 - angle));
}
tongue._rotation = rotate;
rotateValue = rotate + 180;
if ((rotateValue >= 247.5) && (rotateValue <= 292.5)) {
anglePos = 1;
} else if ((rotateValue >= 292.5) && (rotateValue <= 337.5)) {
anglePos = 2;
} else if ((rotateValue >= 337.5) || (rotateValue <= 22.5)) {
anglePos = 3;
} else if ((rotateValue >= 22.5) && (rotateValue <= 67.5)) {
anglePos = 4;
} else if ((rotateValue >= 67.5) && (rotateValue <= 112.5)) {
anglePos = 5;
} else if ((rotateValue >= 112.5) && (rotateValue <= 157.5)) {
anglePos = 6;
} else if ((rotateValue >= 157.5) && (rotateValue <= 202.5)) {
anglePos = 7;
} else if ((rotateValue >= 202.5) && (rotateValue <= 247.5)) {
anglePos = 8;
}
};
movInfo.onEnterFrame = function () {
if (this.SM.meter._xscale > 100) {
this.SM.meter._xscale = 100;
} else if (this.SM.meter._xscale < 0) {
this.SM.meter._xscale = 0;
}
if (totQty < 0) {
totQty = 0;
} else if (totQty < 50) {
frog.body.gotoAndStop("body0");
} else if (totQty < 100) {
frog.body.gotoAndStop("body1");
} else if (totQty < 150) {
frog.body.gotoAndStop("body2");
} else if (totQty < 200) {
frog.body.gotoAndStop("body3");
} else if (totQty >= 200) {
totQty = 200;
this.SM.effect2._visible = true;
stomachFull = true;
mouthFull = true;
}
if (objInMouth == false) {
mouthFull = false;
}
if (this.HM.meter._xscale <= 0) {
this.HM.meter._xscale = 0;
clearInterval(defecateTimer);
if (flame == true) {
clearInterval(flameTimer);
}
removeMovieClip(cursor);
Mouse.show();
if (frogSplash == true) {
movSplash.gotoAndStop(frogSplashFrame);
frog.gotoAndStop("death2");
} else {
movSplash.gotoAndStop("empty");
frog.gotoAndStop("death");
}
frogDeath = true;
movPause.gotoAndStop("gameover");
} else if (this.HM.meter._xscale <= 20) {
frog.head.bump.gotoAndStop("bump3");
} else if (this.HM.meter._xscale <= 50) {
frog.head.bump.gotoAndStop("bump2");
} else if (this.HM.meter._xscale <= 80) {
frog.head.bump.gotoAndStop("bump1");
} else if (this.HM.meter._xscale <= 100) {
frog.head.bump.gotoAndStop("bump0");
}
if (this.FM.meter._xscale >= 100) {
flame = true;
if (fOptSound == true) {
playSound("magicpower.wav");
}
this.FM.meter._xscale = 0;
this.FM.effect._visible = true;
flameTimer = setInterval(throwFlame, 500);
}
};
Mouse.hide();
stop();
Frame 18
defecateTimer = setInterval(defecation, 1000);
if (totScore >= scrTarget1) {
gameLevel = 2;
}
if (totScore >= scrTarget2) {
gameLevel = 3;
}
if (totScore >= scrTarget3) {
gameLevel = 4;
}
if (totScore >= scrTarget4) {
gameLevel = 5;
}
if (totScore >= scrTarget5) {
gameLevel = 6;
}
movBg3.setMask(movMask);
frogSplash = false;
control.onMouseDown = function () {
if (((((((shoot == false) && (onRange == true)) && (frogHit == false)) && (mouthFull == false)) && (freeze == false)) && (frogDeath == false)) && (gamePause == false)) {
Mouse.hide();
shoot = true;
if (fOptSound == true) {
playSound("catch.wav");
}
if (objInMouth == false) {
movInfo.frogStat.gotoAndStop(1);
} else if (stomachFull == false) {
movInfo.frogStat.gotoAndPlay("instomach");
if ((frmObjBeEaten == 13) && (hP < 100)) {
hP = hP + 10;
movInfo.HM.meter._xscale = hP;
} else if (frmObjBeEaten == 14) {
if (hP < 100) {
hP = hP + 50;
}
if (hP > 100) {
hP = 100;
movInfo.HM.meter._xscale = hP;
} else {
movInfo.HM.meter._xscale = hP;
}
} else if (frmObjBeEaten == 15) {
if (hP < 100) {
hP = hP + 100;
}
if (hP > 100) {
hP = 100;
movInfo.HM.meter._xscale = hP;
} else {
movInfo.HM.meter._xscale = hP;
}
if (flame == false) {
movInfo.FM.meter._xscale = movInfo.FM.meter._xscale + 100;
}
}
totScore = totScore + objScore;
if (totScore >= scrTarget4) {
movBg1.stageInfo2.gotoAndStop(3);
stageOpen2 = true;
}
movInfo.score.text = totScore;
if (totQty < 200) {
totQty = totQty + objQty;
}
movInfo.SM.meter._xscale = movInfo.SM.meter._xscale + (objQty / 2);
movInfo.SM.effect._xscale = movInfo.SM.meter._xscale;
}
objInMouth = false;
tongue._visible = true;
tongue.inside._xscale = hyp * 100;
tongue.outer._x = tongue.inside._width;
frog.head.gotoAndStop("shoot");
timerShoot = setInterval(tongueIn, 100);
}
};
control.onMouseMove = function () {
if (((frogHit == false) && (frogDeath == false)) && (gamePause == false)) {
frog.eyes.gotoAndStop("watch" + anglePos);
}
};
control.onKeyDown = function () {
if (((((Key.getCode() == 32) && (keylock == false)) && (objInMouth == true)) && (frogDeath == false)) && (gamePause == false)) {
keylock = true;
freeze = false;
j++;
if (j > 5) {
j = 1;
}
attachMovie("objspit", "objSpit" + j, 10001 + j);
eval ("objSpit" + j).setMask(movLayer);
eval ("objSpit" + j)._x = frog._x;
eval ("objSpit" + j)._y = frog._y;
if (flame) {
eval ("objSpit" + j).obj.gotoAndStop("flame");
spitObj(eval ("objSpit" + j), 0);
} else {
eval ("objSpit" + j).obj.gotoAndStop(frmObjBeEaten);
spitObj(eval ("objSpit" + j), 45);
}
objInMouth = false;
movInfo.frogStat.gotoAndPlay("spitup");
objQty = 0;
frog.gotoAndStop("spit" + anglePos);
timerSpit = setInterval(spitOut, 250);
} else if (((((((Key.getCode() == 65) && (keylock == false)) && (leftBound == false)) && (stopLeftBg == false)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
keylock = true;
keyhold = true;
freeze = false;
c = 5;
power = 1;
xMove = 5;
frogXMove = 0;
yMove = -10;
frog.gotoAndPlay("jump1");
} else if (((((((Key.getCode() == 65) && (keylock == false)) && (leftBound == false)) && (stopLeftBg == true)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
keylock = true;
keyhold = true;
freeze = false;
c = 5;
power = 1;
xMove = 0;
frogXMove = -5;
yMove = -10;
movBg1.frogPos = movBg1.frogPos - 50;
frog.gotoAndPlay("jump1");
} else if (((((((Key.getCode() == 68) && (keylock == false)) && (rightBound == false)) && (stopRightBg == false)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
keylock = true;
keyhold = true;
freeze = false;
c = 5;
power = 1;
xMove = -5;
frogXMove = 0;
yMove = -10;
frog.gotoAndPlay("jump2");
} else if (((((((Key.getCode() == 68) && (keylock == false)) && (rightBound == false)) && (stopRightBg == true)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
keylock = true;
keyhold = true;
freeze = false;
c = 5;
power = 1;
xMove = 0;
frogXMove = 5;
yMove = -10;
movBg1.frogPos = movBg1.frogPos + 50;
frog.gotoAndPlay("jump2");
} else if (((((Key.getCode() == 87) && (keylock == false)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
keylock = true;
keyhold = true;
freeze = false;
c = 5;
power = 1;
xMove = 0;
yMove = -10;
frog.gotoAndPlay("jump3");
} else if (((((Key.getCode() == 83) && (keylock == false)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
freeze = true;
frog.gotoAndStop("freeze");
} else if ((((((Key.getCode() == 69) && (keylock == false)) && (objInMouth == true)) && (stomachFull == false)) && (frogDeath == false)) && (gamePause == false)) {
frog.head.gotoAndStop(1);
objInMouth = false;
movInfo.frogStat.gotoAndPlay("instomach");
if (fOptSound == true) {
playSound("eat.wav");
}
if ((frmObjBeEaten == 13) && (hP < 100)) {
hP = hP + 10;
movInfo.HM.meter._xscale = hP;
} else if (frmObjBeEaten == 14) {
if (hP < 100) {
hP = hP + 50;
}
if (hP > 100) {
hP = 100;
movInfo.HM.meter._xscale = hP;
} else {
movInfo.HM.meter._xscale = hP;
}
} else if (frmObjBeEaten == 15) {
if (hP < 100) {
hP = hP + 100;
}
if (hP > 100) {
hP = 100;
movInfo.HM.meter._xscale = hP;
} else {
movInfo.HM.meter._xscale = hP;
}
if (flame == false) {
movInfo.FM.meter._xscale = movInfo.FM.meter._xscale + 100;
}
}
totScore = totScore + objScore;
if (totScore >= scrTarget4) {
movBg1.stageInfo2.gotoAndStop(3);
stageOpen2 = true;
}
movInfo.score.text = totScore;
if (totQty < 200) {
totQty = totQty + objQty;
}
movInfo.SM.meter._xscale = movInfo.SM.meter._xscale + (objQty / 2);
movInfo.SM.effect._xscale = movInfo.SM.meter._xscale;
} else if ((((Key.getCode() == 65) && (keylock == false)) && (frogDeath == false)) && (gamePause == false)) {
if (leftBound == true) {
keylock = true;
gameStage = 3;
movLayer.gotoAndPlay(2);
}
} else if ((((Key.getCode() == 68) && (keylock == false)) && (frogDeath == false)) && (gamePause == false)) {
if ((rightBound == true) && (stageOpen2 == true)) {
keylock = true;
gameStage = 6;
movLayer.gotoAndPlay(2);
}
} else if ((Key.getCode() == 77) && (frogDeath == false)) {
if (gamePause == false) {
gamePause = true;
movPause.gotoAndStop(2);
cursor._visible = false;
Mouse.show();
clearInterval(defecateTimer);
if (fOptMusic == true) {
musicObject.stop();
}
} else {
gamePause = false;
movPause.gotoAndStop(1);
cursor._visible = true;
Mouse.hide();
defecateTimer = setInterval(defecation, 1000);
if (flame == true) {
flameTimer = setInterval(throwFlame, 500);
}
if (fOptMusic == true) {
playMusic(("music" + gameStage) + ".wav");
}
}
}
};
control.onKeyUp = function () {
if (Key.getCode() == 65) {
keyhold = false;
} else if (Key.getCode() == 68) {
keyhold = false;
} else if (Key.getCode() == 87) {
keyhold = false;
} else if (((((Key.getCode() == 83) && (keylock == false)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
freeze = false;
frog.gotoAndStop("standby");
}
};
Mouse.addListener(control);
Key.addListener(control);
frog.onEnterFrame = function () {
jumpTimer = jumpTimer + c;
if (jumpTimer == ((50 * power) + 5)) {
keylock = false;
c = 0;
yMove = 0;
xMove = 0;
frogXMove = 0;
jumpTimer = 0;
this.gotoAndPlay(1);
}
if (jumpTimer == (((50 * power) / 2) + 5)) {
yMove = 10;
this.gotoAndPlay(this._currentframe + 1);
}
this._y = this._y + yMove;
this._x = this._x + frogXMove;
i = 1;
while (i <= 5) {
eval ("objSpit" + i)._x = eval ("objSpit" + i)._x + xMove;
i++;
}
feces._x = feces._x + xMove;
movBg1._x = movBg1._x + xMove;
movBg2._x = movBg2._x + (xMove / 8);
movBg3._x = movBg3._x + xMove;
movBg1.frogPos = movBg1.frogPos - xMove;
if (movBg1._x == -50) {
stopLeftBg = true;
} else if (movBg1._x == -100) {
stopLeftBg = false;
}
if ((this._x == 225) && (movBg1._x == -50)) {
stopRightBg = true;
} else if ((this._x == 275) && (movBg1._x == -50)) {
stopRightBg = false;
}
if (this._x == 75) {
leftBound = true;
} else if (this._x == 125) {
leftBound = false;
}
if (movBg1._x == -1150) {
stopRightBg = true;
} else if (movBg1._x == -1100) {
stopRightBg = false;
}
if ((this._x == 325) && (movBg1._x == -1150)) {
stopLeftBg = true;
if (stageOpen2 == false) {
movBg1.stageInfo2.gotoAndStop(2);
}
} else if ((this._x == 275) && (movBg1._x == -1150)) {
stopLeftBg = false;
if (stageOpen2 == false) {
movBg1.stageInfo2.gotoAndStop(1);
}
}
if (this._x == 475) {
rightBound = true;
} else if (this._x == 425) {
rightBound = false;
}
tongue._x = this._x;
tongue._y = this._y;
cursor._x = _xmouse;
cursor._y = _ymouse;
if (((hyp <= 200) && (mouthFull == false)) && (freeze == false)) {
cursor.gotoAndStop(1);
onRange = true;
} else {
cursor.gotoAndStop(2);
onRange = false;
}
difX = _xmouse - this._x;
difY = _ymouse - this._y;
xSquared = difX * difX;
ySquared = difY * difY;
hypSquared = Number(xSquared) + Number(ySquared);
hyp = 1;
counter = 0;
while (Number(counter) < 15) {
hyp = hyp - (((hyp * hyp) - hypSquared) / (2 * hyp));
counter++;
}
if (Number(difY) < 0) {
difYMagnitude = difY * -1;
} else {
difYMagnitude = difY;
}
sine = difYMagnitude / hyp;
part1 = (Math.PI/2);
part2Squared = 1 - sine;
part2 = 1;
counter = 0;
while (Number(counter) < 15) {
part2 = part2 - (((part2 * part2) - part2Squared) / (2 * part2));
counter = Number(counter) + 1;
}
part3 = Number(Number(Number(1.5707288) + Number(-0.2121144 * sine)) + Number(0.074261 * (sine * sine))) + Number(-0.0187293 * ((sine * sine) * sine));
arcsine = part1 - (part2 * part3);
angle = arcsine / 0.01745329;
if ((Number(difX) <= 0) and (Number(difY) > 0)) {
rotate = 90 + Number(90 - angle);
} else if ((Number(difX) > 0) and (Number(difY) > 0)) {
rotate = angle;
} else if ((Number(difX) > 0) and (Number(difY) < 0)) {
rotate = -angle;
} else if ((Number(difX) <= 0) and (Number(difY) < 0)) {
rotate = -(90 + Number(90 - angle));
}
tongue._rotation = rotate;
rotateValue = rotate + 180;
if ((rotateValue >= 247.5) && (rotateValue <= 292.5)) {
anglePos = 1;
} else if ((rotateValue >= 292.5) && (rotateValue <= 337.5)) {
anglePos = 2;
} else if ((rotateValue >= 337.5) || (rotateValue <= 22.5)) {
anglePos = 3;
} else if ((rotateValue >= 22.5) && (rotateValue <= 67.5)) {
anglePos = 4;
} else if ((rotateValue >= 67.5) && (rotateValue <= 112.5)) {
anglePos = 5;
} else if ((rotateValue >= 112.5) && (rotateValue <= 157.5)) {
anglePos = 6;
} else if ((rotateValue >= 157.5) && (rotateValue <= 202.5)) {
anglePos = 7;
} else if ((rotateValue >= 202.5) && (rotateValue <= 247.5)) {
anglePos = 8;
}
};
movInfo.onEnterFrame = function () {
if (this.SM.meter._xscale > 100) {
this.SM.meter._xscale = 100;
} else if (this.SM.meter._xscale < 0) {
this.SM.meter._xscale = 0;
}
if (totQty < 0) {
totQty = 0;
} else if (totQty < 50) {
frog.body.gotoAndStop("body0");
} else if (totQty < 100) {
frog.body.gotoAndStop("body1");
} else if (totQty < 150) {
frog.body.gotoAndStop("body2");
} else if (totQty < 200) {
frog.body.gotoAndStop("body3");
} else if (totQty >= 200) {
totQty = 200;
this.SM.effect2._visible = true;
stomachFull = true;
mouthFull = true;
}
if (objInMouth == false) {
mouthFull = false;
}
if (this.HM.meter._xscale <= 0) {
this.HM.meter._xscale = 0;
clearInterval(defecateTimer);
if (flame == true) {
clearInterval(flameTimer);
}
removeMovieClip(cursor);
Mouse.show();
frog.gotoAndStop("death");
frogDeath = true;
movPause.gotoAndStop("gameover");
} else if (this.HM.meter._xscale <= 20) {
frog.head.bump.gotoAndStop("bump3");
} else if (this.HM.meter._xscale <= 50) {
frog.head.bump.gotoAndStop("bump2");
} else if (this.HM.meter._xscale <= 80) {
frog.head.bump.gotoAndStop("bump1");
} else if (this.HM.meter._xscale <= 100) {
frog.head.bump.gotoAndStop("bump0");
}
if (this.FM.meter._xscale >= 100) {
flame = true;
if (fOptSound == true) {
playSound("magicpower.wav");
}
this.FM.meter._xscale = 0;
this.FM.effect._visible = true;
flameTimer = setInterval(throwFlame, 500);
}
};
Mouse.hide();
stop();
Frame 19
defecateTimer = setInterval(defecation, 1000);
if (totScore >= scrTarget1) {
gameLevel = 2;
}
if (totScore >= scrTarget2) {
gameLevel = 3;
}
if (totScore >= scrTarget3) {
gameLevel = 4;
}
if (totScore >= scrTarget4) {
gameLevel = 5;
}
if (totScore >= scrTarget5) {
gameLevel = 6;
}
movBg3.setMask(movMask);
control.onMouseDown = function () {
if (((((((shoot == false) && (onRange == true)) && (frogHit == false)) && (mouthFull == false)) && (freeze == false)) && (frogDeath == false)) && (gamePause == false)) {
Mouse.hide();
shoot = true;
if (fOptSound == true) {
playSound("catch.wav");
}
if (objInMouth == false) {
movInfo.frogStat.gotoAndStop(1);
} else if (stomachFull == false) {
movInfo.frogStat.gotoAndPlay("instomach");
if ((frmObjBeEaten == 13) && (hP < 100)) {
hP = hP + 10;
movInfo.HM.meter._xscale = hP;
} else if (frmObjBeEaten == 14) {
if (hP < 100) {
hP = hP + 50;
}
if (hP > 100) {
hP = 100;
movInfo.HM.meter._xscale = hP;
} else {
movInfo.HM.meter._xscale = hP;
}
} else if (frmObjBeEaten == 15) {
if (hP < 100) {
hP = hP + 100;
}
if (hP > 100) {
hP = 100;
movInfo.HM.meter._xscale = hP;
} else {
movInfo.HM.meter._xscale = hP;
}
if (flame == false) {
movInfo.FM.meter._xscale = movInfo.FM.meter._xscale + 100;
}
}
totScore = totScore + objScore;
movInfo.score.text = totScore;
if (totQty < 200) {
totQty = totQty + objQty;
}
movInfo.SM.meter._xscale = movInfo.SM.meter._xscale + (objQty / 2);
movInfo.SM.effect._xscale = movInfo.SM.meter._xscale;
}
objInMouth = false;
tongue._visible = true;
tongue.inside._xscale = hyp * 100;
tongue.outer._x = tongue.inside._width;
frog.head.gotoAndStop("shoot");
timerShoot = setInterval(tongueIn, 100);
}
};
control.onMouseMove = function () {
if (((frogHit == false) && (frogDeath == false)) && (gamePause == false)) {
frog.eyes.gotoAndStop("watch" + anglePos);
}
};
control.onKeyDown = function () {
if (((((Key.getCode() == 32) && (keylock == false)) && (objInMouth == true)) && (frogDeath == false)) && (gamePause == false)) {
keylock = true;
freeze = false;
j++;
if (j > 5) {
j = 1;
}
attachMovie("objspit", "objSpit" + j, 10001 + j);
eval ("objSpit" + j).setMask(movLayer);
eval ("objSpit" + j)._x = frog._x;
eval ("objSpit" + j)._y = frog._y;
if (flame) {
eval ("objSpit" + j).obj.gotoAndStop("flame");
spitObj(eval ("objSpit" + j), 0);
} else {
eval ("objSpit" + j).obj.gotoAndStop(frmObjBeEaten);
spitObj(eval ("objSpit" + j), 45);
}
objInMouth = false;
movInfo.frogStat.gotoAndPlay("spitup");
objQty = 0;
frog.gotoAndStop("spit" + anglePos);
timerSpit = setInterval(spitOut, 250);
} else if (((((((Key.getCode() == 65) && (keylock == false)) && (leftBound == false)) && (stopLeftBg == false)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
keylock = true;
keyhold = true;
freeze = false;
c = 5;
power = 1;
xMove = 5;
frogXMove = 0;
yMove = -10;
frog.gotoAndPlay("jump1");
} else if (((((((Key.getCode() == 65) && (keylock == false)) && (leftBound == false)) && (stopLeftBg == true)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
keylock = true;
keyhold = true;
freeze = false;
c = 5;
power = 1;
xMove = 0;
frogXMove = -5;
yMove = -10;
movBg1.frogPos = movBg1.frogPos - 50;
frog.gotoAndPlay("jump1");
} else if (((((((Key.getCode() == 68) && (keylock == false)) && (rightBound == false)) && (stopRightBg == false)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
keylock = true;
keyhold = true;
freeze = false;
c = 5;
power = 1;
xMove = -5;
frogXMove = 0;
yMove = -10;
frog.gotoAndPlay("jump2");
} else if (((((((Key.getCode() == 68) && (keylock == false)) && (rightBound == false)) && (stopRightBg == true)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
keylock = true;
keyhold = true;
freeze = false;
c = 5;
power = 1;
xMove = 0;
frogXMove = 5;
yMove = -10;
movBg1.frogPos = movBg1.frogPos + 50;
frog.gotoAndPlay("jump2");
} else if (((((Key.getCode() == 87) && (keylock == false)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
keylock = true;
keyhold = true;
freeze = false;
c = 5;
power = 1;
xMove = 0;
yMove = -10;
frog.gotoAndPlay("jump3");
} else if (((((Key.getCode() == 83) && (keylock == false)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
freeze = true;
frog.gotoAndStop("freeze");
} else if ((((((Key.getCode() == 69) && (keylock == false)) && (objInMouth == true)) && (stomachFull == false)) && (frogDeath == false)) && (gamePause == false)) {
frog.head.gotoAndStop(1);
objInMouth = false;
movInfo.frogStat.gotoAndPlay("instomach");
if (fOptSound == true) {
playSound("eat.wav");
}
if ((frmObjBeEaten == 13) && (hP < 100)) {
hP = hP + 10;
movInfo.HM.meter._xscale = hP;
} else if (frmObjBeEaten == 14) {
if (hP < 100) {
hP = hP + 50;
}
if (hP > 100) {
hP = 100;
movInfo.HM.meter._xscale = hP;
} else {
movInfo.HM.meter._xscale = hP;
}
} else if (frmObjBeEaten == 15) {
if (hP < 100) {
hP = hP + 100;
}
if (hP > 100) {
hP = 100;
movInfo.HM.meter._xscale = hP;
} else {
movInfo.HM.meter._xscale = hP;
}
if (flame == false) {
movInfo.FM.meter._xscale = movInfo.FM.meter._xscale + 100;
}
}
totScore = totScore + objScore;
movInfo.score.text = totScore;
if (totQty < 200) {
totQty = totQty + objQty;
}
movInfo.SM.meter._xscale = movInfo.SM.meter._xscale + (objQty / 2);
movInfo.SM.effect._xscale = movInfo.SM.meter._xscale;
} else if ((((Key.getCode() == 68) && (keylock == false)) && (frogDeath == false)) && (gamePause == false)) {
if (rightBound == true) {
keylock = true;
gameStage = 2;
movLayer.gotoAndPlay(2);
}
} else if ((Key.getCode() == 77) && (frogDeath == false)) {
if (gamePause == false) {
gamePause = true;
movPause.gotoAndStop(2);
cursor._visible = false;
Mouse.show();
clearInterval(defecateTimer);
if (fOptMusic == true) {
musicObject.stop();
}
} else {
gamePause = false;
movPause.gotoAndStop(1);
cursor._visible = true;
Mouse.hide();
defecateTimer = setInterval(defecation, 1000);
if (flame == true) {
flameTimer = setInterval(throwFlame, 500);
}
if (fOptMusic == true) {
playMusic(("music" + gameStage) + ".wav");
}
}
}
};
control.onKeyUp = function () {
if (Key.getCode() == 65) {
keyhold = false;
} else if (Key.getCode() == 68) {
keyhold = false;
} else if (Key.getCode() == 87) {
keyhold = false;
} else if (((((Key.getCode() == 83) && (keylock == false)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
freeze = false;
frog.gotoAndStop("standby");
}
};
Mouse.addListener(control);
Key.addListener(control);
frog.onEnterFrame = function () {
jumpTimer = jumpTimer + c;
if (jumpTimer == ((50 * power) + 5)) {
keylock = false;
c = 0;
yMove = 0;
xMove = 0;
frogXMove = 0;
jumpTimer = 0;
this.gotoAndPlay(1);
}
if (jumpTimer == (((50 * power) / 2) + 5)) {
yMove = 10;
this.gotoAndPlay(this._currentframe + 1);
}
this._y = this._y + yMove;
this._x = this._x + frogXMove;
i = 1;
while (i <= 5) {
eval ("objSpit" + i)._x = eval ("objSpit" + i)._x + xMove;
i++;
}
feces._x = feces._x + xMove;
movBg1._x = movBg1._x + xMove;
movBg2._x = movBg2._x + (xMove / 8);
movBg3._x = movBg3._x + xMove;
movBg1.frogPos = movBg1.frogPos - xMove;
if (movBg1._x == -50) {
stopLeftBg = true;
} else if (movBg1._x == -100) {
stopLeftBg = false;
}
if ((this._x == 225) && (movBg1._x == -50)) {
stopRightBg = true;
} else if ((this._x == 275) && (movBg1._x == -50)) {
stopRightBg = false;
}
if (this._x == 75) {
leftBound = true;
} else if (this._x == 125) {
leftBound = false;
}
if (movBg1._x == -1150) {
stopRightBg = true;
} else if (movBg1._x == -1100) {
stopRightBg = false;
}
if ((this._x == 325) && (movBg1._x == -1150)) {
stopLeftBg = true;
} else if ((this._x == 275) && (movBg1._x == -1150)) {
stopLeftBg = false;
}
if (this._x == 475) {
rightBound = true;
} else if (this._x == 425) {
rightBound = false;
}
tongue._x = this._x;
tongue._y = this._y;
cursor._x = _xmouse;
cursor._y = _ymouse;
if (((hyp <= 200) && (mouthFull == false)) && (freeze == false)) {
cursor.gotoAndStop(1);
onRange = true;
} else {
cursor.gotoAndStop(2);
onRange = false;
}
difX = _xmouse - this._x;
difY = _ymouse - this._y;
xSquared = difX * difX;
ySquared = difY * difY;
hypSquared = Number(xSquared) + Number(ySquared);
hyp = 1;
counter = 0;
while (Number(counter) < 15) {
hyp = hyp - (((hyp * hyp) - hypSquared) / (2 * hyp));
counter++;
}
if (Number(difY) < 0) {
difYMagnitude = difY * -1;
} else {
difYMagnitude = difY;
}
sine = difYMagnitude / hyp;
part1 = (Math.PI/2);
part2Squared = 1 - sine;
part2 = 1;
counter = 0;
while (Number(counter) < 15) {
part2 = part2 - (((part2 * part2) - part2Squared) / (2 * part2));
counter = Number(counter) + 1;
}
part3 = Number(Number(Number(1.5707288) + Number(-0.2121144 * sine)) + Number(0.074261 * (sine * sine))) + Number(-0.0187293 * ((sine * sine) * sine));
arcsine = part1 - (part2 * part3);
angle = arcsine / 0.01745329;
if ((Number(difX) <= 0) and (Number(difY) > 0)) {
rotate = 90 + Number(90 - angle);
} else if ((Number(difX) > 0) and (Number(difY) > 0)) {
rotate = angle;
} else if ((Number(difX) > 0) and (Number(difY) < 0)) {
rotate = -angle;
} else if ((Number(difX) <= 0) and (Number(difY) < 0)) {
rotate = -(90 + Number(90 - angle));
}
tongue._rotation = rotate;
rotateValue = rotate + 180;
if ((rotateValue >= 247.5) && (rotateValue <= 292.5)) {
anglePos = 1;
} else if ((rotateValue >= 292.5) && (rotateValue <= 337.5)) {
anglePos = 2;
} else if ((rotateValue >= 337.5) || (rotateValue <= 22.5)) {
anglePos = 3;
} else if ((rotateValue >= 22.5) && (rotateValue <= 67.5)) {
anglePos = 4;
} else if ((rotateValue >= 67.5) && (rotateValue <= 112.5)) {
anglePos = 5;
} else if ((rotateValue >= 112.5) && (rotateValue <= 157.5)) {
anglePos = 6;
} else if ((rotateValue >= 157.5) && (rotateValue <= 202.5)) {
anglePos = 7;
} else if ((rotateValue >= 202.5) && (rotateValue <= 247.5)) {
anglePos = 8;
}
};
movInfo.onEnterFrame = function () {
if (this.SM.meter._xscale > 100) {
this.SM.meter._xscale = 100;
} else if (this.SM.meter._xscale < 0) {
this.SM.meter._xscale = 0;
}
if (totQty < 0) {
totQty = 0;
} else if (totQty < 50) {
frog.body.gotoAndStop("body0");
} else if (totQty < 100) {
frog.body.gotoAndStop("body1");
} else if (totQty < 150) {
frog.body.gotoAndStop("body2");
} else if (totQty < 200) {
frog.body.gotoAndStop("body3");
} else if (totQty >= 200) {
totQty = 200;
this.SM.effect2._visible = true;
stomachFull = true;
mouthFull = true;
}
if (objInMouth == false) {
mouthFull = false;
}
if (this.HM.meter._xscale <= 0) {
this.HM.meter._xscale = 0;
clearInterval(defecateTimer);
if (flame == true) {
clearInterval(flameTimer);
}
removeMovieClip(cursor);
Mouse.show();
frog.gotoAndStop("death");
frogDeath = true;
movPause.gotoAndStop("gameover");
} else if (this.HM.meter._xscale <= 20) {
frog.head.bump.gotoAndStop("bump3");
} else if (this.HM.meter._xscale <= 50) {
frog.head.bump.gotoAndStop("bump2");
} else if (this.HM.meter._xscale <= 80) {
frog.head.bump.gotoAndStop("bump1");
} else if (this.HM.meter._xscale <= 100) {
frog.head.bump.gotoAndStop("bump0");
}
if (this.FM.meter._xscale >= 100) {
flame = true;
if (fOptSound == true) {
playSound("magicpower.wav");
}
this.FM.meter._xscale = 0;
this.FM.effect._visible = true;
flameTimer = setInterval(throwFlame, 500);
}
};
Mouse.hide();
stop();
Frame 20
defecateTimer = setInterval(defecation, 1000);
if (totScore >= scrTarget1) {
gameLevel = 2;
}
if (totScore >= scrTarget2) {
gameLevel = 3;
}
if (totScore >= scrTarget3) {
gameLevel = 4;
}
if (totScore >= scrTarget4) {
gameLevel = 5;
}
if (totScore >= scrTarget5) {
gameLevel = 6;
}
movBg3.setMask(movMask);
control.onMouseDown = function () {
if (((((((shoot == false) && (onRange == true)) && (frogHit == false)) && (mouthFull == false)) && (freeze == false)) && (frogDeath == false)) && (gamePause == false)) {
Mouse.hide();
shoot = true;
if (fOptSound == true) {
playSound("catch.wav");
}
if (objInMouth == false) {
movInfo.frogStat.gotoAndStop(1);
} else if (stomachFull == false) {
movInfo.frogStat.gotoAndPlay("instomach");
if ((frmObjBeEaten == 13) && (hP < 100)) {
hP = hP + 10;
movInfo.HM.meter._xscale = hP;
} else if (frmObjBeEaten == 14) {
if (hP < 100) {
hP = hP + 50;
}
if (hP > 100) {
hP = 100;
movInfo.HM.meter._xscale = hP;
} else {
movInfo.HM.meter._xscale = hP;
}
} else if (frmObjBeEaten == 15) {
if (hP < 100) {
hP = hP + 100;
}
if (hP > 100) {
hP = 100;
movInfo.HM.meter._xscale = hP;
} else {
movInfo.HM.meter._xscale = hP;
}
if (flame == false) {
movInfo.FM.meter._xscale = movInfo.FM.meter._xscale + 100;
}
}
totScore = totScore + objScore;
movInfo.score.text = totScore;
if (totQty < 200) {
totQty = totQty + objQty;
}
movInfo.SM.meter._xscale = movInfo.SM.meter._xscale + (objQty / 2);
movInfo.SM.effect._xscale = movInfo.SM.meter._xscale;
}
objInMouth = false;
tongue._visible = true;
tongue.inside._xscale = hyp * 100;
tongue.outer._x = tongue.inside._width;
frog.head.gotoAndStop("shoot");
timerShoot = setInterval(tongueIn, 100);
}
};
control.onMouseMove = function () {
if (((frogHit == false) && (frogDeath == false)) && (gamePause == false)) {
frog.eyes.gotoAndStop("watch" + anglePos);
}
};
control.onKeyDown = function () {
if (((((Key.getCode() == 32) && (keylock == false)) && (objInMouth == true)) && (frogDeath == false)) && (gamePause == false)) {
keylock = true;
freeze = false;
j++;
if (j > 5) {
j = 1;
}
attachMovie("objspit", "objSpit" + j, 10001 + j);
eval ("objSpit" + j).setMask(movLayer);
eval ("objSpit" + j)._x = frog._x;
eval ("objSpit" + j)._y = frog._y;
if (flame) {
eval ("objSpit" + j).obj.gotoAndStop("flame");
spitObj(eval ("objSpit" + j), 0);
} else {
eval ("objSpit" + j).obj.gotoAndStop(frmObjBeEaten);
spitObj(eval ("objSpit" + j), 45);
}
objInMouth = false;
movInfo.frogStat.gotoAndPlay("spitup");
objQty = 0;
frog.gotoAndStop("spit" + anglePos);
timerSpit = setInterval(spitOut, 250);
} else if (((((((Key.getCode() == 65) && (keylock == false)) && (leftBound == false)) && (stopLeftBg == false)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
keylock = true;
keyhold = true;
freeze = false;
c = 5;
power = 1;
xMove = 5;
frogXMove = 0;
yMove = -10;
frog.gotoAndPlay("jump1");
} else if (((((((Key.getCode() == 65) && (keylock == false)) && (leftBound == false)) && (stopLeftBg == true)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
keylock = true;
keyhold = true;
freeze = false;
c = 5;
power = 1;
xMove = 0;
frogXMove = -5;
yMove = -10;
movBg1.frogPos = movBg1.frogPos - 50;
frog.gotoAndPlay("jump1");
} else if (((((((Key.getCode() == 68) && (keylock == false)) && (rightBound == false)) && (stopRightBg == false)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
keylock = true;
keyhold = true;
freeze = false;
c = 5;
power = 1;
xMove = -5;
frogXMove = 0;
yMove = -10;
frog.gotoAndPlay("jump2");
} else if (((((((Key.getCode() == 68) && (keylock == false)) && (rightBound == false)) && (stopRightBg == true)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
keylock = true;
keyhold = true;
freeze = false;
c = 5;
power = 1;
xMove = 0;
frogXMove = 5;
yMove = -10;
movBg1.frogPos = movBg1.frogPos + 50;
frog.gotoAndPlay("jump2");
} else if (((((Key.getCode() == 87) && (keylock == false)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
keylock = true;
keyhold = true;
freeze = false;
c = 5;
power = 1;
xMove = 0;
yMove = -10;
frog.gotoAndPlay("jump3");
} else if (((((Key.getCode() == 83) && (keylock == false)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
freeze = true;
frog.gotoAndStop("freeze");
} else if ((((((Key.getCode() == 69) && (keylock == false)) && (objInMouth == true)) && (stomachFull == false)) && (frogDeath == false)) && (gamePause == false)) {
frog.head.gotoAndStop(1);
objInMouth = false;
movInfo.frogStat.gotoAndPlay("instomach");
if (fOptSound == true) {
playSound("eat.wav");
}
if ((frmObjBeEaten == 13) && (hP < 100)) {
hP = hP + 10;
movInfo.HM.meter._xscale = hP;
} else if (frmObjBeEaten == 14) {
if (hP < 100) {
hP = hP + 50;
}
if (hP > 100) {
hP = 100;
movInfo.HM.meter._xscale = hP;
} else {
movInfo.HM.meter._xscale = hP;
}
} else if (frmObjBeEaten == 15) {
if (hP < 100) {
hP = hP + 100;
}
if (hP > 100) {
hP = 100;
movInfo.HM.meter._xscale = hP;
} else {
movInfo.HM.meter._xscale = hP;
}
if (flame == false) {
movInfo.FM.meter._xscale = movInfo.FM.meter._xscale + 100;
}
}
totScore = totScore + objScore;
movInfo.score.text = totScore;
if (totQty < 200) {
totQty = totQty + objQty;
}
movInfo.SM.meter._xscale = movInfo.SM.meter._xscale + (objQty / 2);
movInfo.SM.effect._xscale = movInfo.SM.meter._xscale;
} else if ((((Key.getCode() == 65) && (keylock == false)) && (frogDeath == false)) && (gamePause == false)) {
if (leftBound == true) {
keylock = true;
gameStage = 4;
movLayer.gotoAndPlay(2);
}
} else if ((Key.getCode() == 77) && (frogDeath == false)) {
if (gamePause == false) {
gamePause = true;
movPause.gotoAndStop(2);
cursor._visible = false;
Mouse.show();
clearInterval(defecateTimer);
if (fOptMusic == true) {
musicObject.stop();
}
} else {
gamePause = false;
movPause.gotoAndStop(1);
cursor._visible = true;
Mouse.hide();
defecateTimer = setInterval(defecation, 1000);
if (flame == true) {
flameTimer = setInterval(throwFlame, 500);
}
if (fOptMusic == true) {
playMusic(("music" + gameStage) + ".wav");
}
}
}
};
control.onKeyUp = function () {
if (Key.getCode() == 65) {
keyhold = false;
} else if (Key.getCode() == 68) {
keyhold = false;
} else if (Key.getCode() == 87) {
keyhold = false;
} else if (((((Key.getCode() == 83) && (keylock == false)) && (frogDeath == false)) && (gamePause == false)) && (keyhold == false)) {
freeze = false;
frog.gotoAndStop("standby");
}
};
Mouse.addListener(control);
Key.addListener(control);
frog.onEnterFrame = function () {
jumpTimer = jumpTimer + c;
if (jumpTimer == ((50 * power) + 5)) {
keylock = false;
c = 0;
yMove = 0;
xMove = 0;
frogXMove = 0;
jumpTimer = 0;
this.gotoAndPlay(1);
}
if (jumpTimer == (((50 * power) / 2) + 5)) {
yMove = 10;
this.gotoAndPlay(this._currentframe + 1);
}
this._y = this._y + yMove;
this._x = this._x + frogXMove;
i = 1;
while (i <= 5) {
eval ("objSpit" + i)._x = eval ("objSpit" + i)._x + xMove;
i++;
}
feces._x = feces._x + xMove;
movBg1._x = movBg1._x + xMove;
movBg2._x = movBg2._x + (xMove / 8);
movBg3._x = movBg3._x + xMove;
movBg1.frogPos = movBg1.frogPos - xMove;
if (movBg1._x == -50) {
stopLeftBg = true;
} else if (movBg1._x == -100) {
stopLeftBg = false;
}
if ((this._x == 225) && (movBg1._x == -50)) {
stopRightBg = true;
} else if ((this._x == 275) && (movBg1._x == -50)) {
stopRightBg = false;
}
if (this._x == 75) {
leftBound = true;
} else if (this._x == 125) {
leftBound = false;
}
if (movBg1._x == -1150) {
stopRightBg = true;
} else if (movBg1._x == -1100) {
stopRightBg = false;
}
if ((this._x == 325) && (movBg1._x == -1150)) {
stopLeftBg = true;
} else if ((this._x == 275) && (movBg1._x == -1150)) {
stopLeftBg = false;
}
if (this._x == 475) {
rightBound = true;
} else if (this._x == 425) {
rightBound = false;
}
tongue._x = this._x;
tongue._y = this._y;
cursor._x = _xmouse;
cursor._y = _ymouse;
if (((hyp <= 200) && (mouthFull == false)) && (freeze == false)) {
cursor.gotoAndStop(1);
onRange = true;
} else {
cursor.gotoAndStop(2);
onRange = false;
}
difX = _xmouse - this._x;
difY = _ymouse - this._y;
xSquared = difX * difX;
ySquared = difY * difY;
hypSquared = Number(xSquared) + Number(ySquared);
hyp = 1;
counter = 0;
while (Number(counter) < 15) {
hyp = hyp - (((hyp * hyp) - hypSquared) / (2 * hyp));
counter++;
}
if (Number(difY) < 0) {
difYMagnitude = difY * -1;
} else {
difYMagnitude = difY;
}
sine = difYMagnitude / hyp;
part1 = (Math.PI/2);
part2Squared = 1 - sine;
part2 = 1;
counter = 0;
while (Number(counter) < 15) {
part2 = part2 - (((part2 * part2) - part2Squared) / (2 * part2));
counter = Number(counter) + 1;
}
part3 = Number(Number(Number(1.5707288) + Number(-0.2121144 * sine)) + Number(0.074261 * (sine * sine))) + Number(-0.0187293 * ((sine * sine) * sine));
arcsine = part1 - (part2 * part3);
angle = arcsine / 0.01745329;
if ((Number(difX) <= 0) and (Number(difY) > 0)) {
rotate = 90 + Number(90 - angle);
} else if ((Number(difX) > 0) and (Number(difY) > 0)) {
rotate = angle;
} else if ((Number(difX) > 0) and (Number(difY) < 0)) {
rotate = -angle;
} else if ((Number(difX) <= 0) and (Number(difY) < 0)) {
rotate = -(90 + Number(90 - angle));
}
tongue._rotation = rotate;
rotateValue = rotate + 180;
if ((rotateValue >= 247.5) && (rotateValue <= 292.5)) {
anglePos = 1;
} else if ((rotateValue >= 292.5) && (rotateValue <= 337.5)) {
anglePos = 2;
} else if ((rotateValue >= 337.5) || (rotateValue <= 22.5)) {
anglePos = 3;
} else if ((rotateValue >= 22.5) && (rotateValue <= 67.5)) {
anglePos = 4;
} else if ((rotateValue >= 67.5) && (rotateValue <= 112.5)) {
anglePos = 5;
} else if ((rotateValue >= 112.5) && (rotateValue <= 157.5)) {
anglePos = 6;
} else if ((rotateValue >= 157.5) && (rotateValue <= 202.5)) {
anglePos = 7;
} else if ((rotateValue >= 202.5) && (rotateValue <= 247.5)) {
anglePos = 8;
}
};
movInfo.onEnterFrame = function () {
if (this.SM.meter._xscale > 100) {
this.SM.meter._xscale = 100;
} else if (this.SM.meter._xscale < 0) {
this.SM.meter._xscale = 0;
}
if (totQty < 0) {
totQty = 0;
} else if (totQty < 50) {
frog.body.gotoAndStop("body0");
} else if (totQty < 100) {
frog.body.gotoAndStop("body1");
} else if (totQty < 150) {
frog.body.gotoAndStop("body2");
} else if (totQty < 200) {
frog.body.gotoAndStop("body3");
} else if (totQty >= 200) {
totQty = 200;
this.SM.effect2._visible = true;
stomachFull = true;
mouthFull = true;
}
if (objInMouth == false) {
mouthFull = false;
}
if (this.HM.meter._xscale <= 0) {
this.HM.meter._xscale = 0;
clearInterval(defecateTimer);
if (flame == true) {
clearInterval(flameTimer);
}
removeMovieClip(cursor);
Mouse.show();
frog.gotoAndStop("death");
frogDeath = true;
movPause.gotoAndStop("gameover");
} else if (this.HM.meter._xscale <= 20) {
frog.head.bump.gotoAndStop("bump3");
} else if (this.HM.meter._xscale <= 50) {
frog.head.bump.gotoAndStop("bump2");
} else if (this.HM.meter._xscale <= 80) {
frog.head.bump.gotoAndStop("bump1");
} else if (this.HM.meter._xscale <= 100) {
frog.head.bump.gotoAndStop("bump0");
}
if (this.FM.meter._xscale >= 100) {
flame = true;
if (fOptSound == true) {
playSound("magicpower.wav");
}
this.FM.meter._xscale = 0;
this.FM.effect._visible = true;
flameTimer = setInterval(throwFlame, 500);
}
};
Mouse.hide();
stop();
Symbol 34 MovieClip Frame 5
if (_root.fOptSound == true) {
_root.playSound("fall.wav");
}
Symbol 34 MovieClip Frame 40
_parent.gotoAndPlay(3);
Symbol 34 MovieClip Frame 65
_parent.gotoAndPlay(3);
Symbol 35 MovieClip [coconut] Frame 1
stop();
Symbol 35 MovieClip [coconut] Frame 4
_parent.startObj5(this);
this.hit = false;
gotoAndStop (1);
Symbol 35 MovieClip [coconut] Frame 10
_parent.startObj5(this);
this.hit = false;
Symbol 38 MovieClip Frame 30
gotoAndPlay (2);
Symbol 39 MovieClip [cursor] Frame 1
stop();
Symbol 59 MovieClip [bee] Frame 1
function changeStat() {
GRA = random(2);
if (GRA == 1) {
alert._visible = true;
stat = 1;
} else {
alert._visible = false;
stat = 0;
}
}
stop();
var timerStat;
if (stat == 0) {
alert._visible = false;
} else {
alert._visible = true;
}
timerStat = setInterval(changeStat, 10000);
Symbol 59 MovieClip [bee] Frame 2
if (_root.fOptSound == true) {
_root.playSound("bee.wav");
}
Symbol 59 MovieClip [bee] Frame 5
clearInterval(timerStat);
stat = 0;
if (_root.fOptSound == true) {
_root.playSound("hitobject.wav");
}
Symbol 59 MovieClip [bee] Frame 65
gotoAndPlay ("startover");
Symbol 59 MovieClip [bee] Frame 70
clearInterval(timerStat);
stat = 0;
if (_root.fOptSound == true) {
_root.playSound("burn.wav");
}
Symbol 59 MovieClip [bee] Frame 110
this._x = _parent.setXPosition(_parent.frogPos);
this._y = random(151) + 100;
this.hit = false;
this.stayPos = random(551) + 600;
this.xTarget = random(551) + 600;
this.yTarget = random(151) + 100;
this.speed = random(6) + 2;
Symbol 69 MovieClip [fly] Frame 1
stop();
Symbol 69 MovieClip [fly] Frame 5
if (_root.fOptSound == true) {
_root.playSound("hitobject.wav");
}
Symbol 69 MovieClip [fly] Frame 65
gotoAndPlay ("startover");
Symbol 69 MovieClip [fly] Frame 70
if (_root.fOptSound == true) {
_root.playSound("burn.wav");
}
Symbol 69 MovieClip [fly] Frame 110
this._x = _parent.setXPosition(_parent.frogPos);
this._y = random(151) + 100;
this.hit = false;
this.stayPos = random(551) + 600;
this.xTarget = random(551) + 600;
this.yTarget = random(151) + 100;
this.speed = random(6) + 5;
Symbol 87 MovieClip [dragonfly] Frame 1
stop();
Symbol 87 MovieClip [dragonfly] Frame 5
if (_root.fOptSound == true) {
_root.playSound("hitobject.wav");
}
Symbol 87 MovieClip [dragonfly] Frame 65
gotoAndPlay ("startover");
Symbol 87 MovieClip [dragonfly] Frame 70
if (_root.fOptSound == true) {
_root.playSound("burn.wav");
}
Symbol 87 MovieClip [dragonfly] Frame 110
this._x = _parent.setXPosition(_parent.frogPos);
this._y = random(101) + 50;
rnd = random(3) + 1;
body.gotoAndStop(rnd);
this.frm = 1 + rnd;
this.hit = false;
this.stayPos = random(551) + 600;
this.xTarget = random(551) + 600;
this.yTarget = random(101) + 50;
this.speed = random(6) + 10;
Symbol 114 MovieClip [butterfly] Frame 1
stop();
Symbol 114 MovieClip [butterfly] Frame 5
wings._visible = false;
if (_root.fOptSound == true) {
_root.playSound("hitobject.wav");
}
Symbol 114 MovieClip [butterfly] Frame 65
gotoAndPlay ("startover");
Symbol 114 MovieClip [butterfly] Frame 70
wings._visible = false;
if (_root.fOptSound == true) {
_root.playSound("burn.wav");
}
Symbol 114 MovieClip [butterfly] Frame 110
this._x = _parent.setXPosition(_parent.frogPos);
this._y = random(151) + 100;
wings.gotoAndStop(random(6) + 1);
wings._visible = true;
this.hit = false;
this.stayPos = random(551) + 600;
this.xTarget = random(551) + 600;
this.yTarget = random(151) + 100;
this.speed = random(6) + 5;
Symbol 120 MovieClip Frame 1
stop();
Symbol 126 MovieClip Frame 1
stop();
Symbol 130 MovieClip Frame 1
stop();
Symbol 130 MovieClip Frame 4
if (_root.fOptSound == true) {
_root.playSound("hit.wav");
}
Symbol 141 MovieClip Frame 1
stop();
Symbol 153 MovieClip Frame 1
stop();
Symbol 198 MovieClip [frog] Frame 1
if (_root.fOptSound == true) {
if (_root.frogSplash == false) {
_root.playSound("down.wav");
} else {
_root.playSound("splash.wav");
}
}
if (_root.frogSplash == true) {
movSplash.gotoAndStop("sc1");
} else {
movSplash.gotoAndStop("empty");
}
Symbol 198 MovieClip [frog] Frame 2
stop();
if (_root.frogSplash == true) {
movSplash.gotoAndStop(_root.frogSplashFrame);
} else {
movSplash.gotoAndStop("empty");
}
Symbol 198 MovieClip [frog] Frame 11
if (_root.fOptSound == true) {
_root.playSound("frog.wav");
}
movSplash.gotoAndStop("empty");
Symbol 198 MovieClip [frog] Frame 12
if (_root.frogSplash == true) {
movSplash.gotoAndStop("sl");
}
Symbol 198 MovieClip [frog] Frame 13
stop();
movSplash.gotoAndStop("empty");
Symbol 198 MovieClip [frog] Frame 15
stop();
Symbol 198 MovieClip [frog] Frame 16
if (_root.fOptSound == true) {
_root.playSound("frog.wav");
}
movSplash.gotoAndStop("empty");
Symbol 198 MovieClip [frog] Frame 17
if (_root.frogSplash == true) {
movSplash.gotoAndStop("sr");
}
Symbol 198 MovieClip [frog] Frame 18
stop();
movSplash.gotoAndStop("empty");
Symbol 198 MovieClip [frog] Frame 20
stop();
Symbol 198 MovieClip [frog] Frame 21
if (_root.fOptSound == true) {
_root.playSound("frog.wav");
}
movSplash.gotoAndStop("empty");
Symbol 198 MovieClip [frog] Frame 22
if (_root.frogSplash == true) {
movSplash.gotoAndStop("sc2");
}
Symbol 198 MovieClip [frog] Frame 23
stop();
movSplash.gotoAndStop("empty");
Symbol 198 MovieClip [frog] Frame 25
stop();
Symbol 198 MovieClip [frog] Frame 26
if (_root.fOptSound == true) {
_root.playSound("freeze.wav");
}
Symbol 198 MovieClip [frog] Frame 33
if (_root.fOptSound == true) {
if (_root.flame == false) {
_root.playSound("throw.wav");
} else {
_root.playSound("fire.wav");
}
}
if (_root.frogSplash == true) {
movSplash.gotoAndStop(_root.frogSplashFrame);
} else {
movSplash.gotoAndStop("empty");
}
Symbol 198 MovieClip [frog] Frame 34
if (_root.fOptSound == true) {
if (_root.flame == false) {
_root.playSound("throw.wav");
} else {
_root.playSound("fire.wav");
}
}
Symbol 198 MovieClip [frog] Frame 35
if (_root.fOptSound == true) {
if (_root.flame == false) {
_root.playSound("throw.wav");
} else {
_root.playSound("fire.wav");
}
}
Symbol 198 MovieClip [frog] Frame 36
if (_root.fOptSound == true) {
if (_root.flame == false) {
_root.playSound("throw.wav");
} else {
_root.playSound("fire.wav");
}
}
Symbol 198 MovieClip [frog] Frame 37
if (_root.fOptSound == true) {
if (_root.flame == false) {
_root.playSound("throw.wav");
} else {
_root.playSound("fire.wav");
}
}
Symbol 198 MovieClip [frog] Frame 38
if (_root.fOptSound == true) {
if (_root.flame == false) {
_root.playSound("throw.wav");
} else {
_root.playSound("fire.wav");
}
}
Symbol 198 MovieClip [frog] Frame 39
if (_root.fOptSound == true) {
if (_root.flame == false) {
_root.playSound("throw.wav");
} else {
_root.playSound("fire.wav");
}
}
Symbol 198 MovieClip [frog] Frame 40
if (_root.fOptSound == true) {
if (_root.flame == false) {
_root.playSound("throw.wav");
} else {
_root.playSound("fire.wav");
}
}
Symbol 198 MovieClip [frog] Frame 45
if (_root.fOptMusic == true) {
_root.musicObject.stop();
}
if (_root.fOptSound == true) {
_root.playSound("gameover.wav");
}
Symbol 198 MovieClip [frog] Frame 48
if (_root.fOptMusic == true) {
_root.musicObject.stop();
}
if (_root.fOptSound == true) {
_root.playSound("gameover.wav");
}
Symbol 214 MovieClip [mosquito] Frame 1
function changeStat() {
GRA = random(2);
if (GRA == 1) {
alert._visible = true;
stat = 1;
} else {
alert._visible = false;
stat = 0;
}
}
stop();
var timerStat;
timerStat = setInterval(changeStat, 10000);
Symbol 214 MovieClip [mosquito] Frame 2
if (_root.fOptSound == true) {
_root.playSound("mosquito.wav");
}
Symbol 214 MovieClip [mosquito] Frame 5
clearInterval(timerStat);
if (_root.fOptSound == true) {
_root.playSound("hitobject.wav");
}
Symbol 214 MovieClip [mosquito] Frame 65
gotoAndPlay ("startover");
Symbol 214 MovieClip [mosquito] Frame 70
clearInterval(timerStat);
if (_root.fOptSound == true) {
_root.playSound("burn.wav");
}
Symbol 214 MovieClip [mosquito] Frame 110
this._x = _parent.setXPosition(_parent.frogPos);
this._y = random(151) + 100;
this.hit = false;
this.stayPos = random(551) + 600;
this.xTarget = random(551) + 600;
this.yTarget = random(151) + 100;
this.speed = random(6) + 2;
Symbol 234 MovieClip [ladybug] Frame 1
stop();
Symbol 234 MovieClip [ladybug] Frame 5
wings.gotoAndStop(wings._currentframe + 3);
if (_root.fOptSound == true) {
_root.playSound("hitobject.wav");
}
Symbol 234 MovieClip [ladybug] Frame 65
gotoAndPlay ("startover");
Symbol 234 MovieClip [ladybug] Frame 66
Symbol 234 MovieClip [ladybug] Frame 70
wings.gotoAndPlay(this.frm + 2);
if (_root.fOptSound == true) {
_root.playSound("burn.wav");
}
Symbol 234 MovieClip [ladybug] Frame 71
wings._visible = false;
Symbol 234 MovieClip [ladybug] Frame 110
this._x = _parent.setXPosition(_parent.frogPos);
this._y = random(151) + 100;
rnd = random(3) + 1;
wings.gotoAndStop(rnd);
this.frm = 8 + rnd;
wings._visible = true;
this.hit = false;
this.stayPos = random(551) + 600;
this.xTarget = random(551) + 600;
this.yTarget = random(151) + 100;
this.speed = random(6) + 1;
Symbol 251 MovieClip [prayingmantis] Frame 1
stop();
Symbol 251 MovieClip [prayingmantis] Frame 5
if (_root.fOptSound == true) {
_root.playSound("hitobject.wav");
}
Symbol 251 MovieClip [prayingmantis] Frame 65
gotoAndPlay ("startover");
Symbol 251 MovieClip [prayingmantis] Frame 70
if (_root.fOptSound == true) {
_root.playSound("burn.wav");
}
Symbol 251 MovieClip [prayingmantis] Frame 110
this._x = _parent.setXPosition(_parent.frogPos);
this._y = random(101) + 50;
this.hit = false;
this.stayPos = random(551) + 600;
this.xTarget = random(551) + 600;
this.yTarget = random(101) + 50;
this.speed = random(6) + 10;
Symbol 324 MovieClip [crab] Frame 1
stop();
Symbol 324 MovieClip [crab] Frame 2
this.X = 0;
Symbol 324 MovieClip [crab] Frame 3
if (this.stat == 1) {
this.X = 3;
this._xscale = 100;
} else {
this.X = -3;
this._xscale = -100;
}
gotoAndStop (1);
Symbol 324 MovieClip [crab] Frame 6
if (_root.fOptSound == true) {
_root.playSound("crab.wav");
}
Symbol 324 MovieClip [crab] Frame 10
stop();
Symbol 324 MovieClip [crab] Frame 15
if (_root.fOptSound == true) {
_root.playSound("burn.wav");
}
Symbol 324 MovieClip [crab] Frame 40
_parent.startObj3(this);
this.hit = false;
Symbol 332 MovieClip [bat] Frame 1
function changeStat() {
GRA = random(2);
if (GRA == 1) {
alert._visible = true;
stat = 1;
} else {
alert._visible = false;
stat = 0;
}
}
stop();
var timerStat;
if (stat == 0) {
alert._visible = false;
} else {
alert._visible = true;
}
timerStat = setInterval(changeStat, 10000);
Symbol 332 MovieClip [bat] Frame 2
if (_root.fOptSound == true) {
_root.playSound("bat.wav");
}
Symbol 332 MovieClip [bat] Frame 5
clearInterval(timerStat);
stat = 0;
if (_root.fOptSound == true) {
_root.playSound("burn.wav");
}
Symbol 332 MovieClip [bat] Frame 25
this._x = _parent.setXPosition(_parent.frogPos);
this._y = random(101) + 50;
this.hit = false;
this.stayPos = random(551) + 600;
this.xTarget = random(551) + 600;
this.yTarget = random(101) + 50;
this.speed = random(6) + 10;
Symbol 338 MovieClip [mushroom] Frame 1
stop();
Symbol 341 MovieClip Frame 1
stop();
Symbol 342 MovieClip [feces] Frame 1
if (_root.fOptSound == true) {
_root.playSound("feces.wav");
}
Symbol 342 MovieClip [feces] Frame 100
removeMovieClip(this);
Symbol 350 MovieClip [cavelocked] Frame 1
stop();
Symbol 353 MovieClip [forestunlocked] Frame 1
stop();
Symbol 355 MovieClip [forestlocked] Frame 1
stop();
Symbol 357 MovieClip [swampunlocked] Frame 1
stop();
Symbol 359 MovieClip [swamplocked] Frame 1
stop();
Symbol 361 MovieClip [parkunlocked2] Frame 1
stop();
Symbol 362 MovieClip [parkunlocked1] Frame 1
stop();
Symbol 366 MovieClip [courtyardlocked] Frame 1
stop();
Symbol 368 MovieClip [beachunlocked] Frame 1
stop();
Symbol 370 MovieClip [beachlocked] Frame 1
stop();
Symbol 392 MovieClip [snake] Frame 1
stop();
Symbol 392 MovieClip [snake] Frame 2
this.X = 0;
Symbol 392 MovieClip [snake] Frame 5
if (this.stat == 1) {
this.X = 3;
this._xscale = 100;
} else {
this.X = -3;
this._xscale = -100;
}
gotoAndStop (1);
Symbol 392 MovieClip [snake] Frame 7
if (_root.fOptSound == true) {
_root.playSound("snake.wav");
}
Symbol 392 MovieClip [snake] Frame 12
gotoAndStop (1);
Symbol 392 MovieClip [snake] Frame 20
if (_root.fOptSound == true) {
_root.playSound("burn.wav");
}
Symbol 392 MovieClip [snake] Frame 40
_parent.startObj3(this);
this.hit = false;
Symbol 394 MovieClip [HOP10] Frame 10
stop();
_parent.countHit--;
removeMovieClip(this);
Symbol 396 MovieClip [HOP50] Frame 10
stop();
_parent.countHit--;
removeMovieClip(this);
Symbol 424 MovieClip Frame 1
stop();
Symbol 425 MovieClip Frame 1
stop();
Symbol 426 MovieClip [objspit] Frame 1
stop();
Symbol 426 MovieClip [objspit] Frame 4
removeMovieClip(this);
Symbol 435 MovieClip [cricket] Frame 1
stop();
Symbol 435 MovieClip [cricket] Frame 5
stop();
Symbol 435 MovieClip [cricket] Frame 9
if (_root.fOptSound == true) {
_root.playSound("hitobject.wav");
}
Symbol 435 MovieClip [cricket] Frame 69
gotoAndPlay ("startover");
Symbol 435 MovieClip [cricket] Frame 74
if (_root.fOptSound == true) {
_root.playSound("burn.wav");
}
Symbol 435 MovieClip [cricket] Frame 104
_parent.startObj2(this);
this.hit = false;
this.fall = false;
Symbol 454 MovieClip Frame 1
stop();
Symbol 456 MovieClip Frame 7
stop();
Symbol 457 MovieClip Frame 7
stop();
Symbol 458 MovieClip Frame 7
stop();
Symbol 460 MovieClip Frame 7
stop();
Symbol 462 MovieClip Frame 7
stop();
Symbol 464 MovieClip Frame 7
stop();
Symbol 465 MovieClip Frame 1
stop();
Symbol 466 MovieClip Frame 1
stop();
_root.objInStomach = false;
obj1._visible = false;
obj2._visible = false;
Symbol 466 MovieClip Frame 2
obj1.gotoAndStop(_root.frmObjBeEaten);
obj1._visible = true;
obj2._visible = false;
Symbol 466 MovieClip Frame 3
stop();
_root.objInStomach = true;
obj2.gotoAndStop(_root.frmObjBeEaten);
scrFr1 = String("fr" + _root.objScore);
Symbol 466 MovieClip Frame 4
obj1._visible = false;
obj2._visible = true;
Symbol 466 MovieClip Frame 8
obj2._visible = false;
score.gotoAndStop("fr" + _root.objScore);
Symbol 466 MovieClip Frame 14
gotoAndStop (1);
Symbol 466 MovieClip Frame 17
obj1.gotoAndStop(_root.frmObjBeEaten);
obj1._visible = false;
obj2._visible = true;
Symbol 466 MovieClip Frame 20
obj1._visible = true;
Symbol 466 MovieClip Frame 21
obj2.gotoAndStop(_root.frmObjBeEaten);
obj2._visible = false;
score.gotoAndStop(scrFr1);
Symbol 466 MovieClip Frame 27
gotoAndStop ("inmouth2");
Symbol 466 MovieClip Frame 30
gotoAndStop (1);
Symbol 472 MovieClip Frame 5
stop();
this._xscale = _root.meter._xscale;
Symbol 487 MovieClip Frame 10
if (_root.fOptSound == true) {
_root.playSound("spider.wav");
}
Symbol 487 MovieClip Frame 60
_parent.gotoAndPlay(3);
Symbol 493 MovieClip [spider] Frame 1
stop();
Symbol 493 MovieClip [spider] Frame 4
_parent.startObj5(this);
this.hit = false;
gotoAndStop (1);
Symbol 493 MovieClip [spider] Frame 5
if (_root.fOptSound == true) {
_root.playSound("hitobject.wav");
}
Symbol 493 MovieClip [spider] Frame 65
gotoAndPlay ("startover");
Symbol 493 MovieClip [spider] Frame 70
if (_root.fOptSound == true) {
_root.playSound("burn.wav");
}
Symbol 493 MovieClip [spider] Frame 110
_parent.startObj5(this);
this.hit = false;
Symbol 509 MovieClip [movbg3] Frame 1
stop();
Symbol 528 MovieClip Frame 1
stop();
Symbol 569 MovieClip Frame 1
stop();
Symbol 571 MovieClip Frame 1
stop();
Symbol 573 MovieClip Frame 1
stop();
Symbol 625 MovieClip Frame 20
gotoAndPlay (1);
Symbol 626 MovieClip [movPause] Frame 1
stop();
Symbol 626 MovieClip [movPause] Frame 2
butRsme._focusrect = false;
butRsme.onPress = function () {
if (_root.fOptSound == true) {
_root.playSound("click.wav");
}
};
butRsme.onRelease = function () {
_root.gamePause = false;
gotoAndStop (1);
_root.cursor._visible = true;
Mouse.hide();
_root.defecateTimer = setInterval(_root.defecation, 1000);
if (_root.flame == true) {
_root.flameTimer = setInterval(_root.throwFlame, 500);
}
if (_root.fOptMusic == true) {
_root.playMusic(("music" + _root.gameStage) + ".wav");
}
};
butSett._focusrect = false;
butSett.onPress = function () {
if (_root.fOptSound == true) {
_root.playSound("click.wav");
}
};
butSett.onRelease = function () {
gotoAndStop ("sett");
};
butCtrl._focusrect = false;
butCtrl.onPress = function () {
if (_root.fOptSound == true) {
_root.playSound("click.wav");
}
};
butCtrl.onRelease = function () {
gotoAndStop ("ctrl");
};
butQuit._focusrect = false;
butQuit.onPress = function () {
if (_root.fOptSound == true) {
_root.playSound("click.wav");
}
};
butQuit.onRelease = function () {
if (_root.totScore > _root.recScore) {
_root.recScore = _root.totScore;
}
_root.writeData();
_root.frogDeath = true;
if (_root.fOptMusic == true) {
_root.musicObject.stop();
}
if (_root.totScore > 0) {
gotoAndPlay ("waitinput");
} else {
gotoAndPlay ("waitmenu");
}
_root.gotoAndStop("wait");
};
Symbol 626 MovieClip [movPause] Frame 3
optSound.gotoAndStop(Number(_root.fOptSound) + 1);
optMusic.gotoAndStop(Number(_root.fOptMusic) + 1);
optSound.onPress = function () {
if (this._currentframe == 2) {
_root.fOptSound = false;
} else {
_root.fOptSound = true;
}
this.gotoAndStop(Number(_root.fOptSound) + 1);
if (_root.fOptSound == true) {
_root.playSound("click.wav");
}
_root.writeData();
};
optMusic.onPress = function () {
if (this._currentframe == 2) {
_root.fOptMusic = false;
_root.musicObject.stop();
} else {
_root.fOptMusic = true;
}
this.gotoAndStop(Number(_root.fOptMusic) + 1);
if (_root.fOptSound == true) {
_root.playSound("click.wav");
}
_root.writeData();
};
butBack._focusrect = false;
butBack.onPress = function () {
if (_root.fOptSound == true) {
_root.playSound("click.wav");
}
};
butBack.onRelease = function () {
gotoAndStop ("pause");
};
Symbol 626 MovieClip [movPause] Frame 4
butPlay._focusrect = false;
butPlay.onPress = function () {
if (_root.fOptSound == true) {
_root.playSound("click.wav");
}
};
butPlay.onRelease = function () {
if (_root.totScore > _root.recScore) {
_root.recScore = _root.totScore;
}
_root.writeData();
if (_root.fOptMusic == true) {
_root.musicObject.stop();
}
gotoAndPlay ("waitplay");
_root.gotoAndStop("wait");
};
butSbmt._focusrect = false;
if (_root.totScore <= 0) {
butSbmt.enabled = false;
} else {
butSbmt.enabled = true;
}
butSbmt.onPress = function () {
if (_root.fOptSound == true) {
_root.playSound("click.wav");
}
};
butSbmt.onRelease = function () {
if (_root.totScore > _root.recScore) {
_root.recScore = _root.totScore;
}
_root.writeData();
if (_root.fOptMusic == true) {
_root.musicObject.stop();
}
gotoAndPlay ("waitinput");
_root.gotoAndStop("wait");
};
butMoreGames._focusrect = false;
butMoreGames.onPress = function () {
if (_root.fOptSound == true) {
_root.playSound("click.wav");
}
};
butMoreGames.onRelease = function () {
getURL ("http://www.funny-games.biz/main.html", "_blank");
};
Symbol 626 MovieClip [movPause] Frame 5
removeMovieClip(_root.frog);
removeMovieClip(_root.cursor);
removeMovieClip(_root.tongue);
removeMovieClip(_root.movBg3);
removeMovieClip(_root.movInfo);
_root.movBg1.removeObjects();
var i = 1;
while (i <= 5) {
removeMovieClip(eval ("_root.objSpit" + i));
i++;
}
removeMovieClip(_root.feces);
clearInterval(_root.defecateTimer);
Symbol 626 MovieClip [movPause] Frame 6
stop();
optSound.gotoAndStop(Number(_root.fOptSound) + 1);
optMusic.gotoAndStop(Number(_root.fOptMusic) + 1);
inst1.gotoAndStop(2);
inst2.gotoAndStop(1);
inst3.gotoAndStop(1);
inst2.onRollOver = function () {
this.gotoAndStop(2);
};
inst2.onRollOut = function () {
this.gotoAndStop(1);
};
inst2.onPress = function () {
if (_root.fOptSound == true) {
_root.playSound("click.wav");
}
gotoAndStop ("i2");
};
inst3.onRollOver = function () {
this.gotoAndStop(2);
};
inst3.onRollOut = function () {
this.gotoAndStop(1);
};
inst3.onPress = function () {
if (_root.fOptSound == true) {
_root.playSound("click.wav");
}
gotoAndStop ("i3");
};
butSkip.onPress = function () {
if (_root.fOptSound == true) {
_root.playSound("click.wav");
}
gotoAndPlay ("go");
};
Symbol 626 MovieClip [movPause] Frame 7
optSound.gotoAndStop(Number(_root.fOptSound) + 1);
optMusic.gotoAndStop(Number(_root.fOptMusic) + 1);
inst1.gotoAndStop(1);
inst2.gotoAndStop(2);
inst3.gotoAndStop(1);
inst1.onRollOver = function () {
this.gotoAndStop(2);
};
inst1.onRollOut = function () {
this.gotoAndStop(1);
};
inst1.onPress = function () {
if (_root.fOptSound == true) {
_root.playSound("click.wav");
}
gotoAndStop ("i1");
};
inst3.onRollOver = function () {
this.gotoAndStop(2);
};
inst3.onRollOut = function () {
this.gotoAndStop(1);
};
inst3.onPress = function () {
if (_root.fOptSound == true) {
_root.playSound("click.wav");
}
gotoAndStop ("i3");
};
butSkip.onPress = function () {
if (_root.fOptSound == true) {
_root.playSound("click.wav");
}
gotoAndPlay ("go");
};
Symbol 626 MovieClip [movPause] Frame 8
optSound.gotoAndStop(Number(_root.fOptSound) + 1);
optMusic.gotoAndStop(Number(_root.fOptMusic) + 1);
inst1.gotoAndStop(1);
inst2.gotoAndStop(1);
inst3.gotoAndStop(2);
inst1.onRollOver = function () {
this.gotoAndStop(2);
};
inst1.onRollOut = function () {
this.gotoAndStop(1);
};
inst1.onPress = function () {
if (_root.fOptSound == true) {
_root.playSound("click.wav");
}
gotoAndStop ("i1");
};
inst2.onRollOver = function () {
this.gotoAndStop(2);
};
inst2.onRollOut = function () {
this.gotoAndStop(1);
};
inst2.onPress = function () {
if (_root.fOptSound == true) {
_root.playSound("click.wav");
}
gotoAndStop ("i2");
};
butSkip.onPress = function () {
if (_root.fOptSound == true) {
_root.playSound("click.wav");
}
gotoAndPlay ("go");
};
Symbol 626 MovieClip [movPause] Frame 24
_root.gotoAndStop("play");
gotoAndStop (1);
Symbol 626 MovieClip [movPause] Frame 25
removeMovieClip(_root.frog);
removeMovieClip(_root.cursor);
removeMovieClip(_root.tongue);
removeMovieClip(_root.movBg3);
removeMovieClip(_root.movInfo);
_root.movBg1.removeObjects();
var i = 1;
while (i <= 5) {
removeMovieClip(eval ("_root.objSpit" + i));
i++;
}
removeMovieClip(_root.feces);
clearInterval(_root.defecateTimer);
Symbol 626 MovieClip [movPause] Frame 39
_root.gotoAndStop("menu");
if (_root.fOptMusic == true) {
_root.playMusic("music0.wav");
}
gotoAndStop (1);
Symbol 626 MovieClip [movPause] Frame 40
removeMovieClip(_root.frog);
removeMovieClip(_root.cursor);
removeMovieClip(_root.tongue);
removeMovieClip(_root.movBg3);
removeMovieClip(_root.movInfo);
_root.movBg1.removeObjects();
var i = 1;
while (i <= 5) {
removeMovieClip(eval ("_root.objSpit" + i));
i++;
}
removeMovieClip(_root.feces);
clearInterval(_root.defecateTimer);
Symbol 626 MovieClip [movPause] Frame 55
_root.gotoAndStop("inputname");
if (_root.fOptMusic == true) {
_root.playMusic("music0.wav");
}
gotoAndStop (1);
Symbol 662 MovieClip Frame 87
stop();
Symbol 666 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
setProperty(bar, _xscale , PercentLoaded);
} else {
gotoAndStop ("loaded");
}
Symbol 666 MovieClip Frame 2
gotoAndPlay (1);
Symbol 666 MovieClip Frame 3
_root.play();
Symbol 669 MovieClip Frame 20
gotoAndPlay (2);
Symbol 671 Button
on (release) {
gotoAndPlay ("loadvar");
}
Symbol 680 MovieClip Frame 1
var totalSize;
var downloadSize;
var percent;
totalSize = Math.round(_root.getBytesTotal() / 1024);
movLoader.onEnterFrame = function () {
percent = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
this.info_percent.text = ("loading " + percent) + " %";
this.bar._xscale = percent;
downloadSize = Math.round(_root.getBytesLoaded() / 1024);
if (downloadSize == totalSize) {
_root.gotoAndPlay("loadvar");
}
};
Symbol 736 MovieClip Frame 1
stop();
butBackToMenu._focusrect = false;
butBackToMenu.onPress = function () {
if (_root.fOptSound == true) {
_root.playSound("click.wav");
}
};
butBackToMenu.onRelease = function () {
_root.gotoAndStop("menu");
};
butPrev.onRelease = function () {
};
butNext._focusrect = false;
butNext.onPress = function () {
if (_root.fOptSound == true) {
_root.playSound("click.wav");
}
};
butNext.onRelease = function () {
nextFrame();
};
butNext.enabled = true;
butPrev.enabled = false;
butPrev._alpha = 50;
Symbol 736 MovieClip Frame 2
butBackToMenu._focusrect = false;
butBackToMenu.onPress = function () {
if (_root.fOptSound == true) {
_root.playSound("click.wav");
}
};
butBackToMenu.onRelease = function () {
_root.gotoAndStop("menu");
};
butPrev._focusrect = false;
butPrev.onPress = function () {
if (_root.fOptSound == true) {
_root.playSound("click.wav");
}
};
butPrev.onRelease = function () {
prevFrame();
};
butNext._focusrect = false;
butNext.onPress = function () {
if (_root.fOptSound == true) {
_root.playSound("click.wav");
}
};
butNext.onRelease = function () {
nextFrame();
};
butPrev.enabled = true;
butPrev._alpha = 100;
Symbol 736 MovieClip Frame 3
butBackToMenu._focusrect = false;
butBackToMenu.onPress = function () {
if (_root.fOptSound == true) {
_root.playSound("click.wav");
}
};
butBackToMenu.onRelease = function () {
_root.gotoAndStop("menu");
};
butPrev._focusrect = false;
butPrev.onPress = function () {
if (_root.fOptSound == true) {
_root.playSound("click.wav");
}
};
butPrev.onRelease = function () {
prevFrame();
};
butNext._focusrect = false;
butNext.onPress = function () {
if (_root.fOptSound == true) {
_root.playSound("click.wav");
}
};
butNext.onRelease = function () {
nextFrame();
this.enabled = false;
};
butNext.enabled = true;
butNext._alpha = 100;
Symbol 736 MovieClip Frame 4
butBackToMenu._focusrect = false;
butBackToMenu.onPress = function () {
if (_root.fOptSound == true) {
_root.playSound("click.wav");
}
};
butBackToMenu.onRelease = function () {
_root.gotoAndStop("menu");
};
butPrev._focusrect = false;
butPrev.onPress = function () {
if (_root.fOptSound == true) {
_root.playSound("click.wav");
}
};
butPrev.onRelease = function () {
prevFrame();
};
butNext.onRelease = function () {
};
butNext.enabled = false;
butNext._alpha = 50;
Symbol 748 MovieClip Frame 1
function createObjects() {
var i = 0;
while (i < nDF) {
attachMovie("dragonfly", "dragonfly" + i, 100 + i);
rnd = random(3) + 1;
eval ("dragonfly" + i).body.gotoAndStop(rnd);
eval ("dragonfly" + i).frm = 1 + rnd;
eval ("dragonfly" + i).scr = 100;
eval ("dragonfly" + i).qty = 10;
eval ("dragonfly" + i).hit = false;
startObj(eval ("dragonfly" + i), 101, 50, 10);
runObj(eval ("dragonfly" + i), 101, 50, 10, "dragonfly");
i++;
}
var i = 0;
while (i < nBF) {
attachMovie("butterfly", "butterfly" + i, 200 + i);
eval ("butterfly" + i).wings.gotoAndStop(random(6) + 1);
eval ("butterfly" + i).frm = 5;
eval ("butterfly" + i).scr = 50;
eval ("butterfly" + i).qty = 10;
eval ("butterfly" + i).hit = false;
startObj(eval ("butterfly" + i), 151, 100, 5);
runObj(eval ("butterfly" + i), 151, 100, 5, "butterfly");
i++;
}
var i = 0;
while (i < nBe) {
attachMovie("bee", "bee" + i, 300 + i);
eval ("bee" + i).frm = 8;
eval ("bee" + i).scr = -10;
eval ("bee" + i).qty = 5;
eval ("bee" + i).hit = false;
startObj(eval ("bee" + i), 151, 100, 2);
runObj(eval ("bee" + i), 151, 100, 2, "bee");
i++;
}
var i = 0;
while (i < nLB) {
attachMovie("ladybug", "ladybug" + i, 400 + i);
rnd = random(3) + 1;
eval ("ladybug" + i).wings.gotoAndStop(rnd);
eval ("ladybug" + i).frm = 8 + rnd;
eval ("ladybug" + i).scr = -10;
eval ("ladybug" + i).qty = 5;
eval ("ladybug" + i).hit = false;
startObj(eval ("ladybug" + i), 151, 100, 1);
runObj(eval ("ladybug" + i), 151, 100, 1, "ladybug");
i++;
}
var i = 0;
while (i < nPM) {
attachMovie("prayingmantis", "prayingmantis" + i, 500 + i);
eval ("prayingmantis" + i).frm = 1;
eval ("prayingmantis" + i).scr = 150;
eval ("prayingmantis" + i).qty = 10;
eval ("prayingmantis" + i).hit = false;
startObj(eval ("prayingmantis" + i), 101, 50, 10);
runObj(eval ("prayingmantis" + i), 101, 50, 10, "prayingmantis");
i++;
}
var i = 0;
while (i < nMo) {
attachMovie("mosquito", "mosquito" + i, 600 + i);
eval ("mosquito" + i).frm = 7;
eval ("mosquito" + i).scr = 10;
eval ("mosquito" + i).qty = 5;
eval ("mosquito" + i).hit = false;
startObj(eval ("mosquito" + i), 151, 100, 2);
runObj(eval ("mosquito" + i), 151, 100, 2, "mosquito");
i++;
}
var i = 0;
while (i < nMR) {
attachMovie("mushroom", "mushroom" + i, 700 + i);
eval ("mushroom" + i).frm = 13;
eval ("mushroom" + i).scr = 10;
eval ("mushroom" + i).qty = 5;
eval ("mushroom" + i)._x = (CMR[i] * 50) + 200;
eval ("mushroom" + i)._y = random(5) + 340;
runObj4(eval ("mushroom" + i));
i++;
}
var i = 0;
while (i < nCr) {
attachMovie("cricket", "cricket" + i, 800 + i);
eval ("cricket" + i).frm = 16;
eval ("cricket" + i).scr = 100;
eval ("cricket" + i).qty = 10;
eval ("cricket" + i).hit = false;
startObj2(eval ("cricket" + i));
runObj2(eval ("cricket" + i));
i++;
}
var i = 0;
while (i < nSn) {
attachMovie("snake", "snake", 900 + i);
snake.scr = 100;
snake.hit = false;
snake.alert._visible = false;
startObj3(snake);
runObj3(snake);
i++;
}
attachMovie("beachlocked", "stageInfo1", 911);
attachMovie("swamplocked", "stageInfo2", 912);
stageInfo1._x = 80;
stageInfo1._y = 320;
stageInfo2._x = 1670;
stageInfo2._y = 320;
if (_root.totScore > _root.recScore) {
_root.recScore = _root.totScore;
}
if (_root.recScore >= _root.scrTarget1) {
stageInfo1.gotoAndStop(3);
_root.stageOpen1 = true;
} else {
_root.stageOpen1 = false;
}
if (_root.recScore >= _root.scrTarget2) {
stageInfo2.gotoAndStop(3);
_root.stageOpen2 = true;
} else {
_root.stageOpen2 = false;
}
}
function removeObjects() {
var i = 0;
while (i < nDF) {
removeMovieClip(eval ("dragonfly" + i));
i++;
}
var i = 0;
while (i < nBF) {
removeMovieClip(eval ("butterfly" + i));
i++;
}
var i = 0;
while (i < nBe) {
removeMovieClip(eval ("bee" + i));
i++;
}
var i = 0;
while (i < nLB) {
removeMovieClip(eval ("ladybug" + i));
i++;
}
var i = 0;
while (i < nPM) {
removeMovieClip(eval ("prayingmantis" + i));
i++;
}
var i = 0;
while (i < nMo) {
removeMovieClip(eval ("mosquito" + i));
i++;
}
var i = 0;
while (i < nMR) {
removeMovieClip(eval ("mushroom" + i));
i++;
}
var i = 0;
while (i < nCr) {
removeMovieClip(eval ("cricket" + i));
i++;
}
var i = 0;
while (i < nSn) {
removeMovieClip(snake);
i++;
}
removeMovieClip(stageInfo1);
removeMovieClip(stageInfo2);
}
function setXPosition(area) {
var _local1;
if (area <= 575) {
_local1 = random(551) + 1700;
objElsePos = true;
} else if ((area > 575) && (area < 1175)) {
if (random(2) == 1) {
_local1 = random(551) + -500;
objElsePos = false;
} else {
_local1 = random(551) + 1700;
objElsePos = true;
}
} else if (area >= 1175) {
_local1 = random(551) + -500;
objElsePos = false;
}
return(_local1);
}
function startObj(obj, downLim, upLim, spRange) {
obj._x = setXPosition(frogPos);
obj._y = random(downLim) + upLim;
obj.stayPos = random(551) + 600;
obj.xTarget = random(551) + 600;
obj.yTarget = random(downLim) + upLim;
obj.speed = random(6) + spRange;
}
function runObj(obj, downLim, upLim, spRange, type) {
obj.attack = false;
obj.stat = 0;
obj.onEnterFrame = function () {
if (_root.gamePause == false) {
if ((((this._x >= (this.xTarget - 15)) && (this._x <= (this.xTarget + 15))) && ((this._y >= (this.yTarget - 15)) && (this._y <= (this.yTarget + 15)))) && (this.hit == false)) {
if ((type == "bee") || (type == "mosquito")) {
this.gotoAndStop(1);
this.attack = false;
}
this.speed = random(6) + spRange;
this.GR = random(10);
if (this.GR == 0) {
this.stayPos = random(551) + -500;
this.xTarget = random(551) + -500;
this.yTarget = random(downLim) + upLim;
} else if (this.GR == 1) {
this.stayPos = random(551) + 50;
this.xTarget = random(551) + 50;
this.yTarget = random(downLim) + upLim;
} else if (this.GR == 3) {
this.stayPos = random(551) + 600;
this.xTarget = random(551) + 600;
this.yTarget = random(downLim) + upLim;
} else if (this.GR == 4) {
this.stayPos = random(551) + 1150;
this.xTarget = random(551) + 1150;
this.yTarget = random(downLim) + upLim;
} else if (this.GR == 5) {
this.stayPos = random(551) + 1700;
this.xTarget = random(551) + 1700;
this.yTarget = random(downLim) + upLim;
} else {
this.xTarget = this.stayPos;
this.yTarget = random(downLim) + upLim;
}
}
if ((((((this._x >= (frogPos - 50)) && (this._x <= (frogPos + 50))) && ((type == "bee") || (type == "mosquito"))) && (this.stat == 1)) && (this.attack == false)) && (_root.frogDeath == false)) {
this.stat = 0;
clearInterval(this.timerStat);
this.attack = true;
this.gotoAndStop(2);
this.speed = 10;
this.xTarget = frogPos;
this.yTarget = 330;
}
if (this.sting.hitTest(_root.frog.hitPoint) && (_root.frogHit == false)) {
if ((type == "bee") || (type == "mosquito")) {
this.stat = 0;
this.gotoAndStop(1);
this.xTarget = random(551) + 600;
this.yTarget = random(downLim) + upLim;
_root.hP = _root.hP + -10;
_root.movInfo.HM.effect._xscale = _root.movInfo.HM.meter._xscale;
_root.movInfo.HM.meter._xscale = _root.hP;
_root.movInfo.HM.effect.play();
_root.frogHit = true;
_root.objInMouth = false;
_root.movInfo.frogStat.gotoAndStop(1);
_root.frog.eyes.gotoAndStop("hit");
_root.frog.head.gotoAndStop("hit");
_root.timerBack = setInterval(_root.back, 250);
}
}
if (this.hitPoint.hitTest(_root.tongue.outer) && (_root.shoot == true)) {
count++;
if (count == 1) {
_root.objInMouth = true;
_root.frmObjBeEaten = this.frm;
_root.objScore = this.scr;
_root.objQty = this.qty;
if ((_root.objInStomach == true) && (_root.stomachFull == false)) {
_root.movInfo.frogStat.gotoAndPlay("instomach2");
} else {
_root.movInfo.frogStat.gotoAndPlay("inmouth");
}
this.gotoAndPlay("startover");
}
}
i = 1;
while (i <= 5) {
if ((this.hitPoint.hitTest(eval ("_root.objSpit" + i).hitPoint) && (this.hit == false)) && (_root.flame == true)) {
this.hit = true;
countHit++;
_root.totScore = _root.totScore + 10;
_root.movInfo.score.text = _root.totScore;
attachMovie("HOP10", "HOP10" + countHit, 950 + countHit);
eval ("HOP10" + countHit)._x = this._x;
eval ("HOP10" + countHit)._y = this._y;
removeMovieClip(eval ("_root.objSpit" + i));
this.gotoAndPlay("burn");
this.xTarget = this._x;
this.yTarget = 340;
this.speed = 10;
this.stat = 0;
} else if ((this.hitPoint.hitTest(eval ("_root.objSpit" + i).hitPoint) && (this.hit == false)) && (_root.flame == false)) {
this.hit = true;
countHit++;
_root.totScore = _root.totScore + 10;
_root.movInfo.score.text = _root.totScore;
attachMovie("HOP10", "HOP10" + countHit, 950 + countHit);
eval ("HOP10" + countHit)._x = this._x;
eval ("HOP10" + countHit)._y = this._y;
this.gotoAndPlay("hit");
this.xTarget = this._x;
this.yTarget = 340;
this.speed = 10;
this.stat = 0;
}
i++;
}
if (this.xTarget < this._x) {
this._xscale = 100;
} else if (this.xTarget > this._x) {
this._xscale = -100;
}
this.deltaX = this._x - this.xTarget;
this.deltaY = this._y - this.yTarget;
this.rotation = (-Math.atan2(this.deltaX, this.deltaY)) / (Math.PI/180);
if (Math.sqrt((this.deltaX * this.deltaX) + (this.deltaY * this.deltaY)) > this.speed) {
this._y = this._y - (this.speed * Math.cos(this.rotation * (Math.PI/180)));
this._x = this._x + (this.speed * Math.sin(this.rotation * (Math.PI/180)));
}
}
};
}
function startObj2(obj) {
obj._x = setXPosition(frogPos);
obj._y = 310;
obj.difY = -15;
if ((obj._x >= -500) && (obj._x <= 50)) {
obj.difX = 15;
obj._xscale = -100;
} else if ((obj._x >= 1700) && (obj._x <= 2250)) {
obj.difX = -15;
obj._xscale = 100;
}
obj.vx = ((Math.cos(Math.atan2(obj.difY, obj.difX)) * vo) * 1.5) / vo;
}
function runObj2(obj) {
gravity = 0.5;
vo = random(5) + 5;
obj.fall = false;
obj.vx = ((Math.cos(Math.atan2(obj.difY, obj.difX)) * vo) * 1.5) / vo;
obj.vy = ((Math.sin(Math.atan2(obj.difY, obj.difX)) * vo) * 1.5) / vo;
obj.onEnterFrame = function () {
if ((_root.gamePause == false) && (this.fall == false)) {
this.vy = this.vy + (gravity / vo);
i = 0;
while (i < 16) {
this._x = this._x + this.vx;
this._y = this._y + this.vy;
if ((this._y > 340) && (this.hit == false)) {
GR = random(3);
if (GR == 1) {
this.difX = this.difX * -1;
this._xscale = this._xscale * -1;
}
vo = random(5) + 5;
this.vx = ((Math.cos(Math.atan2(this.difY, this.difX)) * vo) * 1.5) / vo;
this.vy = ((Math.sin(Math.atan2(this.difY, this.difX)) * vo) * 1.5) / vo;
this.gotoAndPlay(2);
} else if ((this._y > 340) && (this.hit == true)) {
this.fall = true;
}
i++;
}
if ((this._x < -550) || (this._x > 2250)) {
this.difY = -15;
this.difX = this.difX * -1;
this._xscale = this._xscale * -1;
vo = random(5) + 5;
this.vx = ((Math.cos(Math.atan2(this.difY, this.difX)) * vo) * 1.5) / vo;
this.vy = ((Math.sin(Math.atan2(this.difY, this.difX)) * vo) * 1.5) / vo;
}
i = 1;
while (i <= 5) {
if (this.hitPoint.hitTest(eval ("_root.objSpit" + i).hitPoint) && (_root.flame == true)) {
this.hit = true;
countHit++;
_root.totScore = _root.totScore + 10;
_root.movInfo.score.text = _root.totScore;
attachMovie("HOP10", "HOP10" + countHit, 950 + countHit);
eval ("HOP10" + countHit)._x = this._x;
eval ("HOP10" + countHit)._y = this._y;
removeMovieClip(eval ("_root.objSpit" + i));
this.gotoAndPlay("burn");
this.vx = 0;
this.vy = 0.5;
} else if (this.hitPoint.hitTest(eval ("_root.objSpit" + i).hitPoint) && (_root.flame == false)) {
this.hit = true;
countHit++;
_root.totScore = _root.totScore + 10;
_root.movInfo.score.text = _root.totScore;
attachMovie("HOP10", "HOP10" + countHit, 950 + countHit);
eval ("HOP10" + countHit)._x = this._x;
eval ("HOP10" + countHit)._y = this._y;
this.gotoAndPlay("hit");
this.vx = 0;
this.vy = 0.5;
}
i++;
}
}
if (this.hitPoint.hitTest(_root.tongue.outer) && (_root.shoot == true)) {
count++;
if (count == 1) {
_root.objInMouth = true;
_root.frmObjBeEaten = this.frm;
_root.objScore = this.scr;
_root.objQty = this.qty;
if ((_root.objInStomach == true) && (_root.stomachFull == false)) {
_root.movInfo.frogStat.gotoAndPlay("instomach2");
} else {
_root.movInfo.frogStat.gotoAndPlay("inmouth");
}
this.gotoAndPlay("startover");
}
}
};
}
function startObj3(obj) {
obj._x = setXPosition(frogPos);
obj._y = 310;
obj.attack = false;
if ((obj._x >= -500) && (obj._x <= 50)) {
obj.stat = 1;
obj.X = 3;
obj._xscale = 100;
} else if ((obj._x >= 1700) && (obj._x <= 2250)) {
obj.stat = 0;
obj.X = -3;
obj._xscale = -100;
}
}
function runObj3(obj) {
obj.onEnterFrame = function () {
if (_root.gamePause == false) {
if (((((((this._x >= frogPos) && (this._x <= (frogPos + 100))) && (_root.freeze == false)) && (this.attack == false)) && (this.stat == 1)) && (this.hit == false)) && (_root.frogDeath == false)) {
this.gotoAndPlay("turn");
this.stat = 0;
} else if (((((((this._x >= (frogPos - 100)) && (this._x <= frogPos)) && (_root.freeze == false)) && (this.attack == false)) && (obj.stat == 0)) && (this.hit == false)) && (_root.frogDeath == false)) {
this.gotoAndPlay("turn");
this.stat = 1;
} else if ((((((this._x >= (frogPos - 10)) && (this._x <= (frogPos + 10))) && (_root.freeze == false)) && (this.attack == false)) && (this.hit == false)) && (_root.frogDeath == false)) {
if (this.stat == 1) {
this.X = 5;
this._xscale = 100;
} else {
this.X = -5;
this._xscale = -100;
}
this.gotoAndPlay("attack");
this.attack = true;
}
if (((((this._x >= (frogPos - 100)) && (this._x <= (frogPos + 100))) && (this.attack == false)) && (this.hit == false)) && (_root.frogDeath == false)) {
this.alert._visible = true;
} else {
this.alert._visible = false;
}
if (this.weapon.hitTest(_root.frog) && (_root.frogHit == false)) {
_root.hP = _root.hP + -10;
_root.movInfo.HM.effect._xscale = _root.movInfo.HM.meter._xscale;
_root.movInfo.HM.meter._xscale = _root.hP;
_root.movInfo.HM.effect.play();
_root.frogHit = true;
_root.objInMouth = false;
_root.movInfo.frogStat.gotoAndStop(1);
_root.frog.eyes.gotoAndStop("hit");
_root.frog.head.gotoAndStop("hit");
_root.timerBack = setInterval(_root.back, 250);
}
i = 1;
while (i <= 5) {
if (this.hitPoint.hitTest(eval ("_root.objSpit" + i).hitPoint) && (_root.flame == true)) {
this.hit = true;
countHit++;
_root.totScore = _root.totScore + 50;
_root.movInfo.score.text = _root.totScore;
attachMovie("HOP50", "HOP50" + countHit, 950 + countHit);
eval ("HOP50" + countHit)._x = this._x;
eval ("HOP50" + countHit)._y = this._y - 10;
this.X = 0;
removeMovieClip(eval ("_root.objSpit" + i));
this.gotoAndPlay("burn");
}
i++;
}
if ((this._x <= -150) || (this._x >= 1800)) {
startObj3(this);
}
this._x = this._x + this.X;
}
};
}
function runObj4(obj) {
obj.onEnterFrame = function () {
if (this.hitPoint.hitTest(_root.tongue.outer) && (_root.shoot == true)) {
count++;
if (count == 1) {
_root.objInMouth = true;
_root.frmObjBeEaten = this.frm;
_root.objScore = this.scr;
_root.objQty = this.qty;
if ((_root.objInStomach == true) && (_root.stomachFull == false)) {
_root.movInfo.frogStat.gotoAndPlay("instomach2");
} else {
_root.movInfo.frogStat.gotoAndPlay("inmouth");
}
removeMovieClip(this);
}
}
};
}
var frogPos = 875;
var rnd;
var count = 0;
var objElsePos;
var countHit = 0;
var nCr;
var nPM;
var nDF;
var nBF;
var nBe;
var nLB;
var nMo;
var nSn;
var nMR;
if (_root.gameLevel == 1) {
nCr = 0;
nPM = 0;
nDF = 2;
nBF = 3;
nBe = 6;
nLB = 2;
nMo = 0;
nSn = 0;
nMR = 5;
} else if (_root.gameLevel == 2) {
nCr = 0;
nPM = 1;
nDF = 3;
nBF = 4;
nBe = 5;
nLB = 2;
nMo = 0;
nSn = 1;
nMR = 4;
} else if (_root.gameLevel == 3) {
nCr = 1;
nPM = 1;
nDF = 3;
nBF = 3;
nBe = 6;
nLB = 2;
nMo = 0;
nSn = 1;
nMR = 4;
} else if (_root.gameLevel == 4) {
nCr = 1;
nPM = 1;
nDF = 3;
nBF = 3;
nBe = 6;
nLB = 1;
nMo = 3;
nSn = 1;
nMR = 3;
} else if (_root.gameLevel == 5) {
nCr = 2;
nPM = 1;
nDF = 2;
nBF = 3;
nBe = 6;
nLB = 1;
nMo = 4;
nSn = 1;
nMR = 3;
} else {
nCr = 2;
nPM = 1;
nDF = 2;
nBF = 3;
nBe = 7;
nLB = 1;
nMo = 5;
nSn = 1;
nMR = 2;
}
var CMR = new Array();
CMR[0] = random(28);
i = 1;
while (i < nMR) {
do {
cntCMR = 0;
CMR[i] = random(28);
j = 0;
while (j < i) {
if (CMR[i] != CMR[j]) {
cntCMR = cntCMR + 1;
}
j++;
}
} while (cntCMR != i);
i++;
}
createObjects();
stop();
Symbol 749 MovieClip Frame 1
stop();
Symbol 749 MovieClip Frame 2
if (_root.fOptSound == true) {
_root.playSound("enterstage.wav");
}
_root.movBg1.removeObjects();
var i = 1;
while (i <= 5) {
removeMovieClip(eval ("_root.objSpit" + i));
i++;
}
removeMovieClip(_root.feces);
clearInterval(_root.defecateTimer);
Symbol 749 MovieClip Frame 5
if (_root.fOptMusic == true) {
_root.musicObject.stop();
}
_root.gotoAndStop("stage" + _root.gameStage);
_root.movBg3.gotoAndStop(_root.gameStage);
_root.frog._visible = false;
_root.movBg3._visible = false;
Symbol 749 MovieClip Frame 10
if (_root.fOptMusic == true) {
_root.playMusic(("music" + _root.gameStage) + ".wav");
}
_root.keylock = false;
_root.frog._visible = true;
_root.movBg3._visible = true;
if (_root.rightBound == true) {
_root.rightBound = false;
_root.movBg1.frogPos = 125;
_root.movBg1._x = -50;
_root.movBg2._x = -28.5;
_root.movBg3._x = -50;
_root.frog._x = 75;
} else if (_root.leftBound == true) {
_root.leftBound = false;
_root.movBg1.frogPos = 1625;
_root.movBg1._x = -1150;
_root.movBg2._x = -166;
_root.movBg3._x = -1150;
_root.frog._x = 475;
} else {
_root.movBg1.frogPos = 875;
_root.movBg1._x = -600;
_root.movBg2._x = -100;
_root.movBg3._x = -600;
_root.frog._x = 275;
}
Symbol 756 MovieClip Frame 1
function createObjects() {
var i = 0;
while (i < nDF) {
attachMovie("dragonfly", "dragonfly" + i, 100 + i);
rnd = random(3) + 1;
eval ("dragonfly" + i).body.gotoAndStop(rnd);
eval ("dragonfly" + i).frm = 1 + rnd;
eval ("dragonfly" + i).scr = 100;
eval ("dragonfly" + i).qty = 10;
eval ("dragonfly" + i).hit = false;
startObj(eval ("dragonfly" + i), 101, 50, 10);
runObj(eval ("dragonfly" + i), 101, 50, 10, "dragonfly");
i++;
}
var i = 0;
while (i < nBF) {
attachMovie("butterfly", "butterfly" + i, 200 + i);
eval ("butterfly" + i).wings.gotoAndStop(random(6) + 1);
eval ("butterfly" + i).frm = 5;
eval ("butterfly" + i).scr = 50;
eval ("butterfly" + i).qty = 10;
eval ("butterfly" + i).hit = false;
startObj(eval ("butterfly" + i), 151, 100, 5);
runObj(eval ("butterfly" + i), 151, 100, 5, "butterfly");
i++;
}
var i = 0;
while (i < nBe) {
attachMovie("bee", "bee" + i, 300 + i);
eval ("bee" + i).frm = 8;
eval ("bee" + i).scr = -10;
eval ("bee" + i).qty = 5;
eval ("bee" + i).hit = false;
startObj(eval ("bee" + i), 151, 100, 2);
runObj(eval ("bee" + i), 151, 100, 2, "bee");
i++;
}
var i = 0;
while (i < nLB) {
attachMovie("ladybug", "ladybug" + i, 400 + i);
rnd = random(3) + 1;
eval ("ladybug" + i).wings.gotoAndStop(rnd);
eval ("ladybug" + i).frm = 8 + rnd;
eval ("ladybug" + i).scr = -10;
eval ("ladybug" + i).qty = 5;
eval ("ladybug" + i).hit = false;
startObj(eval ("ladybug" + i), 151, 100, 1);
runObj(eval ("ladybug" + i), 151, 100, 1, "ladybug");
i++;
}
var i = 0;
while (i < nPM) {
attachMovie("prayingmantis", "prayingmantis" + i, 500 + i);
eval ("prayingmantis" + i).frm = 1;
eval ("prayingmantis" + i).scr = 150;
eval ("prayingmantis" + i).qty = 10;
eval ("prayingmantis" + i).hit = false;
startObj(eval ("prayingmantis" + i), 101, 50, 10);
runObj(eval ("prayingmantis" + i), 101, 50, 10, "prayingmantis");
i++;
}
var i = 0;
while (i < nMo) {
attachMovie("mosquito", "mosquito" + i, 600 + i);
eval ("mosquito" + i).frm = 7;
eval ("mosquito" + i).scr = 10;
eval ("mosquito" + i).qty = 5;
eval ("mosquito" + i).hit = false;
startObj(eval ("mosquito" + i), 151, 100, 2);
runObj(eval ("mosquito" + i), 151, 100, 2, "mosquito");
i++;
}
var i = 0;
while (i < nCr) {
attachMovie("cricket", "cricket" + i, 800 + i);
eval ("cricket" + i).frm = 16;
eval ("cricket" + i).scr = 100;
eval ("cricket" + i).qty = 10;
eval ("cricket" + i).hit = false;
startObj2(eval ("cricket" + i));
runObj2(eval ("cricket" + i));
i++;
}
var i = 0;
while (i < nCo) {
attachMovie("coconut", "coconut" + i, 850 + i);
eval ("coconut" + i).frm = 12;
eval ("coconut" + i).scr = -10;
eval ("coconut" + i).qty = 10;
eval ("coconut" + i).hit = false;
eval ("coconut" + i)._x = (CCo[i] * 50) + 225;
eval ("coconut" + i)._y = -20;
if (random(2) == 1) {
eval ("coconut" + i)._xscale = 100;
} else {
eval ("coconut" + i)._xscale = -100;
}
runObj5(eval ("coconut" + i));
i++;
}
var i = 0;
while (i < nCb) {
attachMovie("crab", "crab", 900 + i);
crab.scr = 100;
crab.hit = false;
crab.alert._visible = false;
startObj3(crab);
runObj3(crab);
i++;
}
attachMovie("courtyardlocked", "stageInfo1", 911);
attachMovie("parkunlocked1", "stageInfo2", 912);
stageInfo1._x = 80;
stageInfo1._y = 320;
stageInfo2._x = 1670;
stageInfo2._y = 320;
if (_root.totScore > _root.recScore) {
_root.recScore = _root.totScore;
}
if (_root.recScore >= _root.scrTarget5) {
stageInfo1.gotoAndStop(3);
_root.stageOpen1 = true;
} else {
_root.stageOpen1 = false;
}
}
function removeObjects() {
var i = 0;
while (i < nDF) {
removeMovieClip(eval ("dragonfly" + i));
i++;
}
var i = 0;
while (i < nBF) {
removeMovieClip(eval ("butterfly" + i));
i++;
}
var i = 0;
while (i < nBe) {
removeMovieClip(eval ("bee" + i));
i++;
}
var i = 0;
while (i < nLB) {
removeMovieClip(eval ("ladybug" + i));
i++;
}
var i = 0;
while (i < nPM) {
removeMovieClip(eval ("prayingmantis" + i));
i++;
}
var i = 0;
while (i < nMo) {
removeMovieClip(eval ("mosquito" + i));
i++;
}
var i = 0;
while (i < nCr) {
removeMovieClip(eval ("cricket" + i));
i++;
}
var i = 0;
while (i < nCo) {
removeMovieClip(eval ("coconut" + i));
i++;
}
var i = 0;
while (i < nCb) {
removeMovieClip(crab);
i++;
}
removeMovieClip(stageInfo1);
removeMovieClip(stageInfo2);
}
function setXPosition(area) {
var _local1;
if (area <= 575) {
_local1 = random(551) + 1700;
objElsePos = true;
} else if ((area > 575) && (area < 1175)) {
if (random(2) == 1) {
_local1 = random(551) + -500;
objElsePos = false;
} else {
_local1 = random(551) + 1700;
objElsePos = true;
}
} else if (area >= 1175) {
_local1 = random(551) + -500;
objElsePos = false;
}
return(_local1);
}
function startObj(obj, downLim, upLim, spRange) {
obj._x = setXPosition(frogPos);
obj._y = random(downLim) + upLim;
obj.stayPos = random(551) + 600;
obj.xTarget = random(551) + 600;
obj.yTarget = random(downLim) + upLim;
obj.speed = random(6) + spRange;
}
function runObj(obj, downLim, upLim, spRange, type) {
obj.attack = false;
obj.stat = 0;
obj.onEnterFrame = function () {
if (_root.gamePause == false) {
if ((((this._x >= (this.xTarget - 15)) && (this._x <= (this.xTarget + 15))) && ((this._y >= (this.yTarget - 15)) && (this._y <= (this.yTarget + 15)))) && (this.hit == false)) {
if ((type == "bee") || (type == "mosquito")) {
this.gotoAndStop(1);
this.attack = false;
}
this.speed = random(6) + spRange;
this.GR = random(10);
if (this.GR == 0) {
this.stayPos = random(551) + -500;
this.xTarget = random(551) + -500;
this.yTarget = random(downLim) + upLim;
} else if (this.GR == 1) {
this.stayPos = random(551) + 50;
this.xTarget = random(551) + 50;
this.yTarget = random(downLim) + upLim;
} else if (this.GR == 3) {
this.stayPos = random(551) + 600;
this.xTarget = random(551) + 600;
this.yTarget = random(downLim) + upLim;
} else if (this.GR == 4) {
this.stayPos = random(551) + 1150;
this.xTarget = random(551) + 1150;
this.yTarget = random(downLim) + upLim;
} else if (this.GR == 5) {
this.stayPos = random(551) + 1700;
this.xTarget = random(551) + 1700;
this.yTarget = random(downLim) + upLim;
} else {
this.xTarget = this.stayPos;
this.yTarget = random(downLim) + upLim;
}
}
if ((((((this._x >= (frogPos - 50)) && (this._x <= (frogPos + 50))) && ((type == "bee") || (type == "mosquito"))) && (this.stat == 1)) && (this.attack == false)) && (_root.frogDeath == false)) {
this.stat = 0;
clearInterval(this.timerStat);
this.attack = true;
this.gotoAndStop(2);
this.speed = 10;
this.xTarget = frogPos;
this.yTarget = 330;
}
if (this.sting.hitTest(_root.frog.hitPoint) && (_root.frogHit == false)) {
if ((type == "bee") || (type == "mosquito")) {
this.stat = 0;
this.gotoAndStop(1);
this.xTarget = random(551) + 600;
this.yTarget = random(downLim) + upLim;
_root.hP = _root.hP + -10;
_root.movInfo.HM.effect._xscale = _root.movInfo.HM.meter._xscale;
_root.movInfo.HM.meter._xscale = _root.hP;
_root.movInfo.HM.effect.play();
_root.frogHit = true;
_root.objInMouth = false;
_root.movInfo.frogStat.gotoAndStop(1);
_root.frog.eyes.gotoAndStop("hit");
_root.frog.head.gotoAndStop("hit");
_root.timerBack = setInterval(_root.back, 250);
}
}
if (this.hitPoint.hitTest(_root.tongue.outer) && (_root.shoot == true)) {
count++;
if (count == 1) {
_root.objInMouth = true;
_root.frmObjBeEaten = this.frm;
_root.objScore = this.scr;
_root.objQty = this.qty;
if ((_root.objInStomach == true) && (_root.stomachFull == false)) {
_root.movInfo.frogStat.gotoAndPlay("instomach2");
} else {
_root.movInfo.frogStat.gotoAndPlay("inmouth");
}
this.gotoAndPlay("startover");
}
}
i = 1;
while (i <= 5) {
if ((this.hitPoint.hitTest(eval ("_root.objSpit" + i).hitPoint) && (this.hit == false)) && (_root.flame == true)) {
this.hit = true;
countHit++;
_root.totScore = _root.totScore + 10;
_root.movInfo.score.text = _root.totScore;
attachMovie("HOP10", "HOP10" + countHit, 950 + countHit);
eval ("HOP10" + countHit)._x = this._x;
eval ("HOP10" + countHit)._y = this._y;
removeMovieClip(eval ("_root.objSpit" + i));
this.gotoAndPlay("burn");
this.xTarget = this._x;
this.yTarget = 340;
this.speed = 10;
this.stat = 0;
} else if ((this.hitPoint.hitTest(eval ("_root.objSpit" + i).hitPoint) && (this.hit == false)) && (_root.flame == false)) {
this.hit = true;
countHit++;
_root.totScore = _root.totScore + 10;
_root.movInfo.score.text = _root.totScore;
attachMovie("HOP10", "HOP10" + countHit, 950 + countHit);
eval ("HOP10" + countHit)._x = this._x;
eval ("HOP10" + countHit)._y = this._y;
this.gotoAndPlay("hit");
this.xTarget = this._x;
this.yTarget = 340;
this.speed = 10;
this.stat = 0;
}
i++;
}
if (this.xTarget < this._x) {
this._xscale = 100;
} else if (this.xTarget > this._x) {
this._xscale = -100;
}
this.deltaX = this._x - this.xTarget;
this.deltaY = this._y - this.yTarget;
this.rotation = (-Math.atan2(this.deltaX, this.deltaY)) / (Math.PI/180);
if (Math.sqrt((this.deltaX * this.deltaX) + (this.deltaY * this.deltaY)) > this.speed) {
this._y = this._y - (this.speed * Math.cos(this.rotation * (Math.PI/180)));
this._x = this._x + (this.speed * Math.sin(this.rotation * (Math.PI/180)));
}
}
};
}
function startObj2(obj) {
obj._x = setXPosition(frogPos);
obj._y = 310;
obj.difY = -15;
if ((obj._x >= -500) && (obj._x <= 50)) {
obj.difX = 15;
obj._xscale = -100;
} else if ((obj._x >= 1700) && (obj._x <= 2250)) {
obj.difX = -15;
obj._xscale = 100;
}
obj.vx = ((Math.cos(Math.atan2(obj.difY, obj.difX)) * vo) * 1.5) / vo;
}
function runObj2(obj) {
gravity = 0.5;
vo = random(5) + 5;
obj.fall = false;
obj.vx = ((Math.cos(Math.atan2(obj.difY, obj.difX)) * vo) * 1.5) / vo;
obj.vy = ((Math.sin(Math.atan2(obj.difY, obj.difX)) * vo) * 1.5) / vo;
obj.onEnterFrame = function () {
if ((_root.gamePause == false) && (this.fall == false)) {
this.vy = this.vy + (gravity / vo);
i = 0;
while (i < 16) {
this._x = this._x + this.vx;
this._y = this._y + this.vy;
if ((this._y > 340) && (this.hit == false)) {
GR = random(3);
if (GR == 1) {
this.difX = this.difX * -1;
this._xscale = this._xscale * -1;
}
vo = random(5) + 5;
this.vx = ((Math.cos(Math.atan2(this.difY, this.difX)) * vo) * 1.5) / vo;
this.vy = ((Math.sin(Math.atan2(this.difY, this.difX)) * vo) * 1.5) / vo;
this.gotoAndPlay(2);
} else if ((this._y > 340) && (this.hit == true)) {
this.fall = true;
}
i++;
}
if ((this._x < -550) || (this._x > 2250)) {
this.difY = -15;
this.difX = this.difX * -1;
this._xscale = this._xscale * -1;
vo = random(5) + 5;
this.vx = ((Math.cos(Math.atan2(this.difY, this.difX)) * vo) * 1.5) / vo;
this.vy = ((Math.sin(Math.atan2(this.difY, this.difX)) * vo) * 1.5) / vo;
}
i = 1;
while (i <= 5) {
if (this.hitPoint.hitTest(eval ("_root.objSpit" + i).hitPoint) && (_root.flame == true)) {
this.hit = true;
countHit++;
_root.totScore = _root.totScore + 10;
_root.movInfo.score.text = _root.totScore;
attachMovie("HOP10", "HOP10" + countHit, 950 + countHit);
eval ("HOP10" + countHit)._x = this._x;
eval ("HOP10" + countHit)._y = this._y;
removeMovieClip(eval ("_root.objSpit" + i));
this.gotoAndPlay("burn");
this.vx = 0;
this.vy = 0.5;
} else if (this.hitPoint.hitTest(eval ("_root.objSpit" + i).hitPoint) && (_root.flame == false)) {
this.hit = true;
countHit++;
_root.totScore = _root.totScore + 10;
_root.movInfo.score.text = _root.totScore;
attachMovie("HOP10", "HOP10" + countHit, 950 + countHit);
eval ("HOP10" + countHit)._x = this._x;
eval ("HOP10" + countHit)._y = this._y;
this.gotoAndPlay("hit");
this.vx = 0;
this.vy = 0.5;
}
i++;
}
}
if (this.hitPoint.hitTest(_root.tongue.outer) && (_root.shoot == true)) {
count++;
if (count == 1) {
_root.objInMouth = true;
_root.frmObjBeEaten = this.frm;
_root.objScore = this.scr;
_root.objQty = this.qty;
if ((_root.objInStomach == true) && (_root.stomachFull == false)) {
_root.movInfo.frogStat.gotoAndPlay("instomach2");
} else {
_root.movInfo.frogStat.gotoAndPlay("inmouth");
}
this.gotoAndPlay("startover");
}
}
};
}
function startObj3(obj) {
obj._x = setXPosition(frogPos);
obj._y = 310;
obj.attack = false;
if ((obj._x >= -500) && (obj._x <= 50)) {
obj.stat = 1;
obj.X = 3;
obj._xscale = 100;
} else if ((obj._x >= 1700) && (obj._x <= 2250)) {
obj.stat = 0;
obj.X = -3;
obj._xscale = -100;
}
}
function runObj3(obj) {
obj.onEnterFrame = function () {
if (_root.gamePause == false) {
if (((((((this._x >= frogPos) && (this._x <= (frogPos + 100))) && (_root.freeze == false)) && (this.attack == false)) && (this.stat == 1)) && (this.hit == false)) && (_root.frogDeath == false)) {
this.gotoAndPlay("turn");
this.stat = 0;
} else if (((((((this._x >= (frogPos - 100)) && (this._x <= frogPos)) && (_root.freeze == false)) && (this.attack == false)) && (obj.stat == 0)) && (this.hit == false)) && (_root.frogDeath == false)) {
this.gotoAndPlay("turn");
this.stat = 1;
} else if ((((((this._x >= (frogPos - 10)) && (this._x <= (frogPos + 10))) && (_root.freeze == false)) && (this.attack == false)) && (this.hit == false)) && (_root.frogDeath == false)) {
if (this.stat == 1) {
this.X = 5;
this._xscale = 100;
} else {
this.X = -5;
this._xscale = -100;
}
this.gotoAndPlay("attack");
this.attack = true;
}
if (((((this._x >= (frogPos - 100)) && (this._x <= (frogPos + 100))) && (this.attack == false)) && (this.hit == false)) && (_root.frogDeath == false)) {
this.alert._visible = true;
} else {
this.alert._visible = false;
}
if (this.weapon.hitTest(_root.frog) && (_root.frogHit == false)) {
_root.hP = _root.hP + -10;
_root.movInfo.HM.effect._xscale = _root.movInfo.HM.meter._xscale;
_root.movInfo.HM.meter._xscale = _root.hP;
_root.movInfo.HM.effect.play();
_root.frogHit = true;
_root.objInMouth = false;
_root.movInfo.frogStat.gotoAndStop(1);
_root.frog.eyes.gotoAndStop("hit");
_root.frog.head.gotoAndStop("hit");
_root.timerBack = setInterval(_root.back, 250);
}
i = 1;
while (i <= 5) {
if (this.hitPoint.hitTest(eval ("_root.objSpit" + i).hitPoint) && (_root.flame == true)) {
this.hit = true;
countHit++;
_root.totScore = _root.totScore + 50;
_root.movInfo.score.text = _root.totScore;
attachMovie("HOP50", "HOP50" + countHit, 950 + countHit);
eval ("HOP50" + countHit)._x = this._x;
eval ("HOP50" + countHit)._y = this._y - 10;
this.X = 0;
removeMovieClip(eval ("_root.objSpit" + i));
this.gotoAndPlay("burn");
}
i++;
}
if ((this._x <= -150) || (this._x >= 1800)) {
this.gotoAndStop(1);
startObj3(this);
}
this._x = this._x + this.X;
}
};
}
function runObj4(obj) {
obj.onEnterFrame = function () {
if (this.hitPoint.hitTest(_root.tongue.outer) && (_root.shoot == true)) {
count++;
if (count == 1) {
_root.objInMouth = true;
_root.frmObjBeEaten = this.frm;
_root.objScore = this.scr;
_root.objQty = this.qty;
if ((_root.objInStomach == true) && (_root.stomachFull == false)) {
_root.movInfo.frogStat.gotoAndPlay("instomach2");
} else {
_root.movInfo.frogStat.gotoAndPlay("inmouth");
}
removeMovieClip(this);
}
}
};
}
function startObj5(obj) {
i = 0;
while (i < nCo) {
do {
cntCCo = 0;
obj.GR = random(27);
j = 0;
while (j < i) {
if (obj.GR != CCo[j]) {
cntCCo = cntCCo + 1;
}
j++;
}
} while (cntCCo != i);
CCo[Number(obj._name.substr(6, 1))] = obj.GR;
i++;
}
obj._x = (obj.GR * 50) + 225;
obj._y = -20;
if (random(2) == 1) {
obj._xscale = 100;
} else {
obj._xscale = -100;
}
obj.attack = false;
obj.Y = 0;
}
function runObj5(obj) {
obj.attack = false;
obj.Y = 0;
obj.onEnterFrame = function () {
if (_root.gamePause == true) {
this.cocoAtt.stop();
}
if (_root.gamePause == false) {
this.cocoAtt.play();
if ((((this._x >= (frogPos - 20)) && (this._x <= (frogPos + 20))) && (this.attack == false)) && (_root.frogDeath == false)) {
this.attack = true;
this.gotoAndStop(2);
}
if (this.cocoAtt.hitPoint.hitTest(_root.frog.hitPoint) && (_root.frogHit == false)) {
_root.hP = _root.hP + -10;
_root.movInfo.HM.effect._xscale = _root.movInfo.HM.meter._xscale;
_root.movInfo.HM.meter._xscale = _root.hP;
_root.movInfo.HM.effect.play();
_root.frogHit = true;
this.cocoAtt.gotoAndPlay("hit");
_root.objInMouth = false;
_root.movInfo.frogStat.gotoAndStop(1);
_root.frog.eyes.gotoAndStop("hit");
_root.frog.head.gotoAndStop("hit");
_root.timerBack = setInterval(_root.back, 250);
}
}
};
}
var frogPos = 875;
var rnd;
var count = 0;
var objElsePos;
var countHit = 0;
var nCr;
var nPM;
var nDF;
var nBF;
var nBe;
var nLB;
var nMo;
var nCb;
var nCo;
if (_root.gameLevel == 1) {
nCr = 0;
nPM = 0;
nDF = 3;
nBF = 3;
nBe = 6;
nLB = 2;
nMo = 0;
nCb = 0;
nCo = 0;
} else if (_root.gameLevel == 2) {
nCr = 0;
nPM = 0;
nDF = 4;
nBF = 3;
nBe = 6;
nLB = 2;
nMo = 0;
nCb = 1;
nCo = 0;
} else if (_root.gameLevel == 3) {
nCr = 0;
nPM = 1;
nDF = 4;
nBF = 3;
nBe = 6;
nLB = 2;
nMo = 0;
nCb = 1;
nCo = 2;
} else if (_root.gameLevel == 4) {
nCr = 1;
nPM = 1;
nDF = 4;
nBF = 2;
nBe = 5;
nLB = 1;
nMo = 3;
nCb = 1;
nCo = 3;
} else if (_root.gameLevel == 5) {
nCr = 1;
nPM = 1;
nDF = 4;
nBF = 2;
nBe = 5;
nLB = 1;
nMo = 4;
nCb = 1;
nCo = 3;
} else {
nCr = 1;
nPM = 1;
nDF = 3;
nBF = 2;
nBe = 5;
nLB = 1;
nMo = 5;
nCb = 1;
nCo = 4;
}
var CCo = new Array();
CCo[0] = random(27);
i = 1;
while (i < nCo) {
do {
cntCCo = 0;
CCo[i] = random(27);
j = 0;
while (j < i) {
if (CCo[i] != CCo[j]) {
cntCCo = cntCCo + 1;
}
j++;
}
} while (cntCCo != i);
i++;
}
createObjects();
stop();
Symbol 760 MovieClip Frame 1
function createObjects() {
var i = 0;
while (i < nDF) {
attachMovie("dragonfly", "dragonfly" + i, 100 + i);
rnd = random(3) + 1;
eval ("dragonfly" + i).body.gotoAndStop(rnd);
eval ("dragonfly" + i).frm = 1 + rnd;
eval ("dragonfly" + i).scr = 100;
eval ("dragonfly" + i).qty = 10;
eval ("dragonfly" + i).hit = false;
startObj(eval ("dragonfly" + i), 101, 50, 10);
runObj(eval ("dragonfly" + i), 101, 50, 10, "dragonfly");
i++;
}
var i = 0;
while (i < nBF) {
attachMovie("butterfly", "butterfly" + i, 200 + i);
eval ("butterfly" + i).wings.gotoAndStop(random(6) + 1);
eval ("butterfly" + i).frm = 5;
eval ("butterfly" + i).scr = 50;
eval ("butterfly" + i).qty = 10;
eval ("butterfly" + i).hit = false;
startObj(eval ("butterfly" + i), 151, 100, 5);
runObj(eval ("butterfly" + i), 151, 100, 5, "butterfly");
i++;
}
var i = 0;
while (i < nBe) {
attachMovie("bee", "bee" + i, 300 + i);
eval ("bee" + i).frm = 8;
eval ("bee" + i).scr = -10;
eval ("bee" + i).qty = 5;
eval ("bee" + i).hit = false;
startObj(eval ("bee" + i), 151, 100, 2);
runObj(eval ("bee" + i), 151, 100, 2, "bee");
i++;
}
var i = 0;
while (i < nLB) {
attachMovie("ladybug", "ladybug" + i, 400 + i);
rnd = random(3) + 1;
eval ("ladybug" + i).wings.gotoAndStop(rnd);
eval ("ladybug" + i).frm = 8 + rnd;
eval ("ladybug" + i).scr = -10;
eval ("ladybug" + i).qty = 5;
eval ("ladybug" + i).hit = false;
startObj(eval ("ladybug" + i), 151, 100, 1);
runObj(eval ("ladybug" + i), 151, 100, 1, "ladybug");
i++;
}
var i = 0;
while (i < nPM) {
attachMovie("prayingmantis", "prayingmantis" + i, 500 + i);
eval ("prayingmantis" + i).frm = 1;
eval ("prayingmantis" + i).scr = 150;
eval ("prayingmantis" + i).qty = 10;
eval ("prayingmantis" + i).hit = false;
startObj(eval ("prayingmantis" + i), 101, 50, 10);
runObj(eval ("prayingmantis" + i), 101, 50, 10, "prayingmantis");
i++;
}
var i = 0;
while (i < nMo) {
attachMovie("mosquito", "mosquito" + i, 600 + i);
eval ("mosquito" + i).frm = 7;
eval ("mosquito" + i).scr = 10;
eval ("mosquito" + i).qty = 5;
eval ("mosquito" + i).hit = false;
startObj(eval ("mosquito" + i), 151, 100, 2);
runObj(eval ("mosquito" + i), 151, 100, 2, "mosquito");
i++;
}
var i = 0;
while (i < nMR) {
attachMovie("mushroom", "mushroom" + i, 700 + i);
eval ("mushroom" + i).frm = 13;
eval ("mushroom" + i).scr = 10;
eval ("mushroom" + i).qty = 5;
eval ("mushroom" + i)._x = (CMR[i] * 50) + 200;
eval ("mushroom" + i)._y = random(5) + 340;
runObj4(eval ("mushroom" + i));
i++;
}
var i = 0;
while (i < nCr) {
attachMovie("cricket", "cricket" + i, 800 + i);
eval ("cricket" + i).frm = 16;
eval ("cricket" + i).scr = 100;
eval ("cricket" + i).qty = 10;
eval ("cricket" + i).hit = false;
startObj2(eval ("cricket" + i));
runObj2(eval ("cricket" + i));
i++;
}
attachMovie("parkunlocked2", "stageInfo1", 911);
attachMovie("forestlocked", "stageInfo2", 912);
stageInfo1._x = 80;
stageInfo1._y = 320;
stageInfo2._x = 1670;
stageInfo2._y = 320;
if (_root.totScore > _root.recScore) {
_root.recScore = _root.totScore;
}
if (_root.recScore >= _root.scrTarget3) {
stageInfo2.gotoAndStop(3);
_root.stageOpen2 = true;
} else {
_root.stageOpen2 = false;
}
}
function removeObjects() {
var i = 0;
while (i < nDF) {
removeMovieClip(eval ("dragonfly" + i));
i++;
}
var i = 0;
while (i < nBF) {
removeMovieClip(eval ("butterfly" + i));
i++;
}
var i = 0;
while (i < nBe) {
removeMovieClip(eval ("bee" + i));
i++;
}
var i = 0;
while (i < nLB) {
removeMovieClip(eval ("ladybug" + i));
i++;
}
var i = 0;
while (i < nPM) {
removeMovieClip(eval ("prayingmantis" + i));
i++;
}
var i = 0;
while (i < nMo) {
removeMovieClip(eval ("mosquito" + i));
i++;
}
var i = 0;
while (i < nMR) {
removeMovieClip(eval ("mushroom" + i));
i++;
}
var i = 0;
while (i < nCr) {
removeMovieClip(eval ("cricket" + i));
i++;
}
removeMovieClip(stageInfo1);
removeMovieClip(stageInfo2);
}
function setXPosition(area) {
var _local1;
if (area <= 575) {
_local1 = random(551) + 1700;
objElsePos = true;
} else if ((area > 575) && (area < 1175)) {
if (random(2) == 1) {
_local1 = random(551) + -500;
objElsePos = false;
} else {
_local1 = random(551) + 1700;
objElsePos = true;
}
} else if (area >= 1175) {
_local1 = random(551) + -500;
objElsePos = false;
}
return(_local1);
}
function startObj(obj, downLim, upLim, spRange) {
obj._x = setXPosition(frogPos);
obj._y = random(downLim) + upLim;
obj.stayPos = random(551) + 600;
obj.xTarget = random(551) + 600;
obj.yTarget = random(downLim) + upLim;
obj.speed = random(6) + spRange;
}
function runObj(obj, downLim, upLim, spRange, type) {
obj.attack = false;
obj.stat = 0;
obj.onEnterFrame = function () {
if (_root.gamePause == false) {
if ((((this._x >= (this.xTarget - 15)) && (this._x <= (this.xTarget + 15))) && ((this._y >= (this.yTarget - 15)) && (this._y <= (this.yTarget + 15)))) && (this.hit == false)) {
if ((type == "bee") || (type == "mosquito")) {
this.gotoAndStop(1);
this.attack = false;
}
this.speed = random(6) + spRange;
this.GR = random(10);
if (this.GR == 0) {
this.stayPos = random(551) + -500;
this.xTarget = random(551) + -500;
this.yTarget = random(downLim) + upLim;
} else if (this.GR == 1) {
this.stayPos = random(551) + 50;
this.xTarget = random(551) + 50;
this.yTarget = random(downLim) + upLim;
} else if (this.GR == 3) {
this.stayPos = random(551) + 600;
this.xTarget = random(551) + 600;
this.yTarget = random(downLim) + upLim;
} else if (this.GR == 4) {
this.stayPos = random(551) + 1150;
this.xTarget = random(551) + 1150;
this.yTarget = random(downLim) + upLim;
} else if (this.GR == 5) {
this.stayPos = random(551) + 1700;
this.xTarget = random(551) + 1700;
this.yTarget = random(downLim) + upLim;
} else {
this.xTarget = this.stayPos;
this.yTarget = random(downLim) + upLim;
}
}
if ((((((this._x >= (frogPos - 50)) && (this._x <= (frogPos + 50))) && ((type == "bee") || (type == "mosquito"))) && (this.stat == 1)) && (this.attack == false)) && (_root.frogDeath == false)) {
this.stat = 0;
clearInterval(this.timerStat);
this.attack = true;
this.gotoAndStop(2);
this.speed = 10;
this.xTarget = frogPos;
this.yTarget = 330;
}
if (this.sting.hitTest(_root.frog.hitPoint) && (_root.frogHit == false)) {
if ((type == "bee") || (type == "mosquito")) {
this.stat = 0;
this.gotoAndStop(1);
this.xTarget = random(551) + 600;
this.yTarget = random(downLim) + upLim;
_root.hP = _root.hP + -10;
_root.movInfo.HM.effect._xscale = _root.movInfo.HM.meter._xscale;
_root.movInfo.HM.meter._xscale = _root.hP;
_root.movInfo.HM.effect.play();
_root.frogHit = true;
_root.objInMouth = false;
_root.movInfo.frogStat.gotoAndStop(1);
_root.frog.eyes.gotoAndStop("hit");
_root.frog.head.gotoAndStop("hit");
_root.timerBack = setInterval(_root.back, 250);
}
}
if (this.hitPoint.hitTest(_root.tongue.outer) && (_root.shoot == true)) {
count++;
if (count == 1) {
_root.objInMouth = true;
_root.frmObjBeEaten = this.frm;
_root.objScore = this.scr;
_root.objQty = this.qty;
if ((_root.objInStomach == true) && (_root.stomachFull == false)) {
_root.movInfo.frogStat.gotoAndPlay("instomach2");
} else {
_root.movInfo.frogStat.gotoAndPlay("inmouth");
}
this.gotoAndPlay("startover");
}
}
i = 1;
while (i <= 5) {
if ((this.hitPoint.hitTest(eval ("_root.objSpit" + i).hitPoint) && (this.hit == false)) && (_root.flame == true)) {
this.hit = true;
countHit++;
_root.totScore = _root.totScore + 10;
_root.movInfo.score.text = _root.totScore;
attachMovie("HOP10", "HOP10" + countHit, 950 + countHit);
eval ("HOP10" + countHit)._x = this._x;
eval ("HOP10" + countHit)._y = this._y;
removeMovieClip(eval ("_root.objSpit" + i));
this.gotoAndPlay("burn");
this.xTarget = this._x;
this.yTarget = 340;
this.speed = 10;
this.stat = 0;
} else if ((this.hitPoint.hitTest(eval ("_root.objSpit" + i).hitPoint) && (this.hit == false)) && (_root.flame == false)) {
this.hit = true;
countHit++;
_root.totScore = _root.totScore + 10;
_root.movInfo.score.text = _root.totScore;
attachMovie("HOP10", "HOP10" + countHit, 950 + countHit);
eval ("HOP10" + countHit)._x = this._x;
eval ("HOP10" + countHit)._y = this._y;
this.gotoAndPlay("hit");
this.xTarget = this._x;
this.yTarget = 340;
this.speed = 10;
this.stat = 0;
}
i++;
}
if (this.xTarget < this._x) {
this._xscale = 100;
} else if (this.xTarget > this._x) {
this._xscale = -100;
}
this.deltaX = this._x - this.xTarget;
this.deltaY = this._y - this.yTarget;
this.rotation = (-Math.atan2(this.deltaX, this.deltaY)) / (Math.PI/180);
if (Math.sqrt((this.deltaX * this.deltaX) + (this.deltaY * this.deltaY)) > this.speed) {
this._y = this._y - (this.speed * Math.cos(this.rotation * (Math.PI/180)));
this._x = this._x + (this.speed * Math.sin(this.rotation * (Math.PI/180)));
}
}
};
}
function startObj2(obj) {
obj._x = setXPosition(frogPos);
obj._y = 310;
obj.difY = -15;
if ((obj._x >= -500) && (obj._x <= 50)) {
obj.difX = 15;
obj._xscale = -100;
} else if ((obj._x >= 1700) && (obj._x <= 2250)) {
obj.difX = -15;
obj._xscale = 100;
}
obj.vx = ((Math.cos(Math.atan2(obj.difY, obj.difX)) * vo) * 1.5) / vo;
}
function runObj2(obj) {
gravity = 0.5;
vo = random(5) + 5;
obj.fall = false;
obj.vx = ((Math.cos(Math.atan2(obj.difY, obj.difX)) * vo) * 1.5) / vo;
obj.vy = ((Math.sin(Math.atan2(obj.difY, obj.difX)) * vo) * 1.5) / vo;
obj.onEnterFrame = function () {
if ((_root.gamePause == false) && (this.fall == false)) {
this.vy = this.vy + (gravity / vo);
i = 0;
while (i < 16) {
this._x = this._x + this.vx;
this._y = this._y + this.vy;
if ((this._y > 340) && (this.hit == false)) {
GR = random(3);
if (GR == 1) {
this.difX = this.difX * -1;
this._xscale = this._xscale * -1;
}
vo = random(5) + 5;
this.vx = ((Math.cos(Math.atan2(this.difY, this.difX)) * vo) * 1.5) / vo;
this.vy = ((Math.sin(Math.atan2(this.difY, this.difX)) * vo) * 1.5) / vo;
this.gotoAndPlay(2);
} else if ((this._y > 340) && (this.hit == true)) {
this.fall = true;
}
i++;
}
if ((this._x < -550) || (this._x > 2250)) {
this.difY = -15;
this.difX = this.difX * -1;
this._xscale = this._xscale * -1;
vo = random(5) + 5;
this.vx = ((Math.cos(Math.atan2(this.difY, this.difX)) * vo) * 1.5) / vo;
this.vy = ((Math.sin(Math.atan2(this.difY, this.difX)) * vo) * 1.5) / vo;
}
i = 1;
while (i <= 5) {
if (this.hitPoint.hitTest(eval ("_root.objSpit" + i).hitPoint) && (_root.flame == true)) {
this.hit = true;
countHit++;
_root.totScore = _root.totScore + 10;
_root.movInfo.score.text = _root.totScore;
attachMovie("HOP10", "HOP10" + countHit, 950 + countHit);
eval ("HOP10" + countHit)._x = this._x;
eval ("HOP10" + countHit)._y = this._y;
removeMovieClip(eval ("_root.objSpit" + i));
this.gotoAndPlay("burn");
this.vx = 0;
this.vy = 0.5;
} else if (this.hitPoint.hitTest(eval ("_root.objSpit" + i).hitPoint) && (_root.flame == false)) {
this.hit = true;
countHit++;
_root.totScore = _root.totScore + 10;
_root.movInfo.score.text = _root.totScore;
attachMovie("HOP10", "HOP10" + countHit, 950 + countHit);
eval ("HOP10" + countHit)._x = this._x;
eval ("HOP10" + countHit)._y = this._y;
this.gotoAndPlay("hit");
this.vx = 0;
this.vy = 0.5;
}
i++;
}
}
if (this.hitPoint.hitTest(_root.tongue.outer) && (_root.shoot == true)) {
count++;
if (count == 1) {
_root.objInMouth = true;
_root.frmObjBeEaten = this.frm;
_root.objScore = this.scr;
_root.objQty = this.qty;
if ((_root.objInStomach == true) && (_root.stomachFull == false)) {
_root.movInfo.frogStat.gotoAndPlay("instomach2");
} else {
_root.movInfo.frogStat.gotoAndPlay("inmouth");
}
this.gotoAndPlay("startover");
}
}
};
}
function startObj3(obj) {
obj._x = setXPosition(frogPos);
obj._y = 310;
obj.attack = false;
if ((obj._x >= -500) && (obj._x <= 50)) {
obj.stat = 1;
obj.X = 3;
obj._xscale = 100;
} else if ((obj._x >= 1700) && (obj._x <= 2250)) {
obj.stat = 0;
obj.X = -3;
obj._xscale = -100;
}
}
function runObj3(obj) {
obj.onEnterFrame = function () {
if (_root.gamePause == false) {
if (((((((this._x >= frogPos) && (this._x <= (frogPos + 100))) && (_root.freeze == false)) && (this.attack == false)) && (this.stat == 1)) && (this.hit == false)) && (_root.frogDeath == false)) {
this.gotoAndPlay("turn");
this.stat = 0;
} else if (((((((this._x >= (frogPos - 100)) && (this._x <= frogPos)) && (_root.freeze == false)) && (this.attack == false)) && (obj.stat == 0)) && (this.hit == false)) && (_root.frogDeath == false)) {
this.gotoAndPlay("turn");
this.stat = 1;
} else if ((((((this._x >= (frogPos - 10)) && (this._x <= (frogPos + 10))) && (_root.freeze == false)) && (this.attack == false)) && (this.hit == false)) && (_root.frogDeath == false)) {
if (this.stat == 1) {
this.X = 5;
} else {
this.X = -5;
}
this.gotoAndPlay("attack");
this.attack = true;
}
if (((((this._x >= (frogPos - 100)) && (this._x <= (frogPos + 100))) && (this.attack == false)) && (this.hit == false)) && (_root.frogDeath == false)) {
this.alert._visible = true;
} else {
this.alert._visible = false;
}
if (this.weapon.hitTest(_root.frog) && (_root.frogHit == false)) {
_root.hP = _root.hP + -10;
_root.movInfo.HM.effect._xscale = _root.movInfo.HM.meter._xscale;
_root.movInfo.HM.meter._xscale = _root.hP;
_root.movInfo.HM.effect.play();
_root.frogHit = true;
_root.objInMouth = false;
_root.movInfo.frogStat.gotoAndStop(1);
_root.frog.eyes.gotoAndStop("hit");
_root.frog.head.gotoAndStop("hit");
_root.timerBack = setInterval(_root.back, 250);
}
i = 1;
while (i <= 5) {
if (this.hitPoint.hitTest(eval ("_root.objSpit" + i).hitPoint) && (_root.flame == true)) {
this.hit = true;
countHit++;
_root.totScore = _root.totScore + 50;
_root.movInfo.score.text = _root.totScore;
attachMovie("HOP50", "HOP50" + countHit, 950 + countHit);
eval ("HOP50" + countHit)._x = this._x;
eval ("HOP50" + countHit)._y = this._y - 10;
this.X = 0;
removeMovieClip(eval ("_root.objSpit" + i));
this.gotoAndPlay("burn");
}
i++;
}
if ((this._x <= -150) || (this._x >= 1800)) {
startObj3(this);
}
this._x = this._x + this.X;
}
};
}
function runObj4(obj) {
obj.onEnterFrame = function () {
if (this.hitPoint.hitTest(_root.tongue.outer) && (_root.shoot == true)) {
count++;
if (count == 1) {
_root.objInMouth = true;
_root.frmObjBeEaten = this.frm;
_root.objScore = this.scr;
_root.objQty = this.qty;
if ((_root.objInStomach == true) && (_root.stomachFull == false)) {
_root.movInfo.frogStat.gotoAndPlay("instomach2");
} else {
_root.movInfo.frogStat.gotoAndPlay("inmouth");
}
removeMovieClip(this);
}
}
};
}
var frogPos = 875;
var rnd;
var count = 0;
var objElsePos;
var countHit = 0;
var nPM;
var nDF;
var nBF;
var nBe;
var nLB;
var nMo;
var nMR;
if (_root.gameLevel == 1) {
nPM = 0;
nDF = 3;
nBF = 2;
nBe = 1;
nLB = 1;
nMo = 5;
nMR = 5;
} else if (_root.gameLevel == 2) {
nPM = 0;
nDF = 3;
nBF = 2;
nBe = 2;
nLB = 1;
nMo = 6;
nMR = 4;
} else if (_root.gameLevel == 3) {
nPM = 0;
nDF = 3;
nBF = 2;
nBe = 3;
nLB = 1;
nMo = 7;
nMR = 4;
} else if (_root.gameLevel == 4) {
nPM = 1;
nDF = 3;
nBF = 2;
nBe = 4;
nLB = 1;
nMo = 8;
nMR = 3;
} else if (_root.gameLevel == 5) {
nPM = 1;
nDF = 3;
nBF = 2;
nBe = 5;
nLB = 1;
nMo = 9;
nMR = 3;
} else {
nPM = 1;
nDF = 3;
nBF = 2;
nBe = 6;
nLB = 1;
nMo = 10;
nMR = 2;
}
var CMR = new Array();
var posCMR = new Array(0, 1, 2, 24, 25, 26);
CMR[0] = posCMR[random(posCMR.length)];
i = 1;
while (i < nMR) {
do {
cntCMR = 0;
CMR[i] = posCMR[random(posCMR.length)];
j = 0;
while (j < i) {
if (CMR[i] != CMR[j]) {
cntCMR = cntCMR + 1;
}
j++;
}
} while (cntCMR != i);
i++;
}
createObjects();
stop();
Symbol 762 MovieClip Frame 1
function createObjects() {
var i = 0;
while (i < nDF) {
attachMovie("dragonfly", "dragonfly" + i, 100 + i);
rnd = random(3) + 1;
eval ("dragonfly" + i).body.gotoAndStop(rnd);
eval ("dragonfly" + i).frm = 1 + rnd;
eval ("dragonfly" + i).scr = 100;
eval ("dragonfly" + i).qty = 10;
eval ("dragonfly" + i).hit = false;
startObj(eval ("dragonfly" + i), 101, 50, 10);
runObj(eval ("dragonfly" + i), 101, 50, 10, "dragonfly");
i++;
}
var i = 0;
while (i < nBF) {
attachMovie("butterfly", "butterfly" + i, 200 + i);
eval ("butterfly" + i).wings.gotoAndStop(random(6) + 1);
eval ("butterfly" + i).frm = 5;
eval ("butterfly" + i).scr = 50;
eval ("butterfly" + i).qty = 10;
eval ("butterfly" + i).hit = false;
startObj(eval ("butterfly" + i), 151, 100, 5);
runObj(eval ("butterfly" + i), 151, 100, 5, "butterfly");
i++;
}
var i = 0;
while (i < nBe) {
attachMovie("bee", "bee" + i, 300 + i);
eval ("bee" + i).frm = 8;
eval ("bee" + i).scr = -10;
eval ("bee" + i).qty = 5;
eval ("bee" + i).hit = false;
startObj(eval ("bee" + i), 151, 100, 2);
runObj(eval ("bee" + i), 151, 100, 2, "bee");
i++;
}
var i = 0;
while (i < nPM) {
attachMovie("prayingmantis", "prayingmantis" + i, 500 + i);
eval ("prayingmantis" + i).frm = 1;
eval ("prayingmantis" + i).scr = 150;
eval ("prayingmantis" + i).qty = 10;
eval ("prayingmantis" + i).hit = false;
startObj(eval ("prayingmantis" + i), 101, 50, 10);
runObj(eval ("prayingmantis" + i), 101, 50, 10, "prayingmantis");
i++;
}
var i = 0;
while (i < nMo) {
attachMovie("mosquito", "mosquito" + i, 600 + i);
eval ("mosquito" + i).frm = 7;
eval ("mosquito" + i).scr = 10;
eval ("mosquito" + i).qty = 5;
eval ("mosquito" + i).hit = false;
startObj(eval ("mosquito" + i), 151, 100, 2);
runObj(eval ("mosquito" + i), 151, 100, 2, "mosquito");
i++;
}
var i = 0;
while (i < nMR) {
attachMovie("mushroom", "mushroom" + i, 700 + i);
eval ("mushroom" + i).frm = 14;
eval ("mushroom" + i).scr = 10;
eval ("mushroom" + i).qty = 10;
eval ("mushroom" + i).gotoAndStop(2);
eval ("mushroom" + i)._x = (CMR[i] * 50) + 200;
eval ("mushroom" + i)._y = random(5) + 340;
runObj4(eval ("mushroom" + i));
i++;
}
var i = 0;
while (i < nCr) {
attachMovie("cricket", "cricket" + i, 800 + i);
eval ("cricket" + i).frm = 16;
eval ("cricket" + i).scr = 100;
eval ("cricket" + i).qty = 10;
eval ("cricket" + i).hit = false;
startObj2(eval ("cricket" + i));
runObj2(eval ("cricket" + i));
i++;
}
var i = 0;
while (i < nSp) {
attachMovie("spider", "spider" + i, 850 + i);
eval ("spider" + i).frm = 12;
eval ("spider" + i).scr = -10;
eval ("spider" + i).qty = 10;
eval ("spider" + i).hit = false;
eval ("spider" + i)._x = (CSp[i] * 50) + 225;
eval ("spider" + i)._y = -20;
if (random(2) == 1) {
eval ("spider" + i)._xscale = 100;
} else {
eval ("spider" + i)._xscale = -100;
}
runObj5(eval ("spider" + i));
i++;
}
var i = 0;
while (i < nSn) {
attachMovie("snake", "snake", 900 + i);
snake.scr = 100;
snake.hit = false;
snake.alert._visible = false;
startObj3(snake);
runObj3(snake);
i++;
}
attachMovie("swampunlocked", "stageInfo1", 911);
attachMovie("cavelocked", "stageInfo2", 912);
stageInfo1._x = 80;
stageInfo1._y = 320;
stageInfo2._x = 1670;
stageInfo2._y = 320;
if (_root.totScore > _root.recScore) {
_root.recScore = _root.totScore;
}
if (_root.recScore >= _root.scrTarget4) {
stageInfo2.gotoAndStop(3);
_root.stageOpen2 = true;
} else {
_root.stageOpen2 = false;
}
}
function removeObjects() {
var i = 0;
while (i < nDF) {
removeMovieClip(eval ("dragonfly" + i));
i++;
}
var i = 0;
while (i < nBF) {
removeMovieClip(eval ("butterfly" + i));
i++;
}
var i = 0;
while (i < nBe) {
removeMovieClip(eval ("bee" + i));
i++;
}
var i = 0;
while (i < nPM) {
removeMovieClip(eval ("prayingmantis" + i));
i++;
}
var i = 0;
while (i < nMo) {
removeMovieClip(eval ("mosquito" + i));
i++;
}
var i = 0;
while (i < nMR) {
removeMovieClip(eval ("mushroom" + i));
i++;
}
var i = 0;
while (i < nCr) {
removeMovieClip(eval ("cricket" + i));
i++;
}
var i = 0;
while (i < nSp) {
removeMovieClip(eval ("spider" + i));
i++;
}
var i = 0;
while (i < nSn) {
removeMovieClip(snake);
i++;
}
removeMovieClip(stageInfo1);
removeMovieClip(stageInfo2);
}
function setXPosition(area) {
var _local1;
if (area <= 575) {
_local1 = random(551) + 1700;
objElsePos = true;
} else if ((area > 575) && (area < 1175)) {
if (random(2) == 1) {
_local1 = random(551) + -500;
objElsePos = false;
} else {
_local1 = random(551) + 1700;
objElsePos = true;
}
} else if (area >= 1175) {
_local1 = random(551) + -500;
objElsePos = false;
}
return(_local1);
}
function startObj(obj, downLim, upLim, spRange) {
obj._x = setXPosition(frogPos);
obj._y = random(downLim) + upLim;
obj.stayPos = random(551) + 600;
obj.xTarget = random(551) + 600;
obj.yTarget = random(downLim) + upLim;
obj.speed = random(6) + spRange;
}
function runObj(obj, downLim, upLim, spRange, type) {
obj.attack = false;
obj.stat = 0;
obj.onEnterFrame = function () {
if (_root.gamePause == false) {
if ((((this._x >= (this.xTarget - 15)) && (this._x <= (this.xTarget + 15))) && ((this._y >= (this.yTarget - 15)) && (this._y <= (this.yTarget + 15)))) && (this.hit == false)) {
if ((type == "bee") || (type == "mosquito")) {
this.gotoAndStop(1);
this.attack = false;
}
this.speed = random(6) + spRange;
this.GR = random(10);
if (this.GR == 0) {
this.stayPos = random(551) + -500;
this.xTarget = random(551) + -500;
this.yTarget = random(downLim) + upLim;
} else if (this.GR == 1) {
this.stayPos = random(551) + 50;
this.xTarget = random(551) + 50;
this.yTarget = random(downLim) + upLim;
} else if (this.GR == 3) {
this.stayPos = random(551) + 600;
this.xTarget = random(551) + 600;
this.yTarget = random(downLim) + upLim;
} else if (this.GR == 4) {
this.stayPos = random(551) + 1150;
this.xTarget = random(551) + 1150;
this.yTarget = random(downLim) + upLim;
} else if (this.GR == 5) {
this.stayPos = random(551) + 1700;
this.xTarget = random(551) + 1700;
this.yTarget = random(downLim) + upLim;
} else {
this.xTarget = this.stayPos;
this.yTarget = random(downLim) + upLim;
}
}
if ((((((this._x >= (frogPos - 50)) && (this._x <= (frogPos + 50))) && ((type == "bee") || (type == "mosquito"))) && (this.stat == 1)) && (this.attack == false)) && (_root.frogDeath == false)) {
this.stat = 0;
clearInterval(this.timerStat);
this.attack = true;
this.gotoAndStop(2);
this.speed = 10;
this.xTarget = frogPos;
this.yTarget = 330;
}
if (this.sting.hitTest(_root.frog.hitPoint) && (_root.frogHit == false)) {
if ((type == "bee") || (type == "mosquito")) {
this.stat = 0;
this.gotoAndStop(1);
this.xTarget = random(551) + 600;
this.yTarget = random(downLim) + upLim;
_root.hP = _root.hP + -10;
_root.movInfo.HM.effect._xscale = _root.movInfo.HM.meter._xscale;
_root.movInfo.HM.meter._xscale = _root.hP;
_root.movInfo.HM.effect.play();
_root.frogHit = true;
_root.objInMouth = false;
_root.movInfo.frogStat.gotoAndStop(1);
_root.frog.eyes.gotoAndStop("hit");
_root.frog.head.gotoAndStop("hit");
_root.timerBack = setInterval(_root.back, 250);
}
}
if (this.hitPoint.hitTest(_root.tongue.outer) && (_root.shoot == true)) {
count++;
if (count == 1) {
_root.objInMouth = true;
_root.frmObjBeEaten = this.frm;
_root.objScore = this.scr;
_root.objQty = this.qty;
if ((_root.objInStomach == true) && (_root.stomachFull == false)) {
_root.movInfo.frogStat.gotoAndPlay("instomach2");
} else {
_root.movInfo.frogStat.gotoAndPlay("inmouth");
}
this.gotoAndPlay("startover");
}
}
i = 1;
while (i <= 5) {
if ((this.hitPoint.hitTest(eval ("_root.objSpit" + i).hitPoint) && (this.hit == false)) && (_root.flame == true)) {
this.hit = true;
countHit++;
_root.totScore = _root.totScore + 10;
_root.movInfo.score.text = _root.totScore;
attachMovie("HOP10", "HOP10" + countHit, 950 + countHit);
eval ("HOP10" + countHit)._x = this._x;
eval ("HOP10" + countHit)._y = this._y;
removeMovieClip(eval ("_root.objSpit" + i));
this.gotoAndPlay("burn");
this.xTarget = this._x;
this.yTarget = 340;
this.speed = 10;
this.stat = 0;
} else if ((this.hitPoint.hitTest(eval ("_root.objSpit" + i).hitPoint) && (this.hit == false)) && (_root.flame == false)) {
this.hit = true;
countHit++;
_root.totScore = _root.totScore + 10;
_root.movInfo.score.text = _root.totScore;
attachMovie("HOP10", "HOP10" + countHit, 950 + countHit);
eval ("HOP10" + countHit)._x = this._x;
eval ("HOP10" + countHit)._y = this._y;
this.gotoAndPlay("hit");
this.xTarget = this._x;
this.yTarget = 340;
this.speed = 10;
this.stat = 0;
}
i++;
}
if (this.xTarget < this._x) {
this._xscale = 100;
} else if (this.xTarget > this._x) {
this._xscale = -100;
}
this.deltaX = this._x - this.xTarget;
this.deltaY = this._y - this.yTarget;
this.rotation = (-Math.atan2(this.deltaX, this.deltaY)) / (Math.PI/180);
if (Math.sqrt((this.deltaX * this.deltaX) + (this.deltaY * this.deltaY)) > this.speed) {
this._y = this._y - (this.speed * Math.cos(this.rotation * (Math.PI/180)));
this._x = this._x + (this.speed * Math.sin(this.rotation * (Math.PI/180)));
}
}
};
}
function startObj2(obj) {
obj._x = setXPosition(frogPos);
obj._y = 310;
obj.difY = -15;
if ((obj._x >= -500) && (obj._x <= 50)) {
obj.difX = 15;
obj._xscale = -100;
} else if ((obj._x >= 1700) && (obj._x <= 2250)) {
obj.difX = -15;
obj._xscale = 100;
}
obj.vx = ((Math.cos(Math.atan2(obj.difY, obj.difX)) * vo) * 1.5) / vo;
}
function runObj2(obj) {
gravity = 0.5;
vo = random(5) + 5;
obj.fall = false;
obj.vx = ((Math.cos(Math.atan2(obj.difY, obj.difX)) * vo) * 1.5) / vo;
obj.vy = ((Math.sin(Math.atan2(obj.difY, obj.difX)) * vo) * 1.5) / vo;
obj.onEnterFrame = function () {
if ((_root.gamePause == false) && (this.fall == false)) {
this.vy = this.vy + (gravity / vo);
i = 0;
while (i < 16) {
this._x = this._x + this.vx;
this._y = this._y + this.vy;
if ((this._y > 340) && (this.hit == false)) {
GR = random(3);
if (GR == 1) {
this.difX = this.difX * -1;
this._xscale = this._xscale * -1;
}
vo = random(5) + 5;
this.vx = ((Math.cos(Math.atan2(this.difY, this.difX)) * vo) * 1.5) / vo;
this.vy = ((Math.sin(Math.atan2(this.difY, this.difX)) * vo) * 1.5) / vo;
this.gotoAndPlay(2);
} else if ((this._y > 340) && (this.hit == true)) {
this.fall = true;
}
i++;
}
if ((this._x < -550) || (this._x > 2250)) {
this.difY = -15;
this.difX = this.difX * -1;
this._xscale = this._xscale * -1;
vo = random(5) + 5;
this.vx = ((Math.cos(Math.atan2(this.difY, this.difX)) * vo) * 1.5) / vo;
this.vy = ((Math.sin(Math.atan2(this.difY, this.difX)) * vo) * 1.5) / vo;
}
i = 1;
while (i <= 5) {
if (this.hitPoint.hitTest(eval ("_root.objSpit" + i).hitPoint) && (_root.flame == true)) {
this.hit = true;
countHit++;
_root.totScore = _root.totScore + 10;
_root.movInfo.score.text = _root.totScore;
attachMovie("HOP10", "HOP10" + countHit, 950 + countHit);
eval ("HOP10" + countHit)._x = this._x;
eval ("HOP10" + countHit)._y = this._y;
removeMovieClip(eval ("_root.objSpit" + i));
this.gotoAndPlay("burn");
this.vx = 0;
this.vy = 0.5;
} else if (this.hitPoint.hitTest(eval ("_root.objSpit" + i).hitPoint) && (_root.flame == false)) {
this.hit = true;
countHit++;
_root.totScore = _root.totScore + 10;
_root.movInfo.score.text = _root.totScore;
attachMovie("HOP10", "HOP10" + countHit, 950 + countHit);
eval ("HOP10" + countHit)._x = this._x;
eval ("HOP10" + countHit)._y = this._y;
this.gotoAndPlay("hit");
this.vx = 0;
this.vy = 0.5;
}
i++;
}
}
if (this.hitPoint.hitTest(_root.tongue.outer) && (_root.shoot == true)) {
count++;
if (count == 1) {
_root.objInMouth = true;
_root.frmObjBeEaten = this.frm;
_root.objScore = this.scr;
_root.objQty = this.qty;
if ((_root.objInStomach == true) && (_root.stomachFull == false)) {
_root.movInfo.frogStat.gotoAndPlay("instomach2");
} else {
_root.movInfo.frogStat.gotoAndPlay("inmouth");
}
this.gotoAndPlay("startover");
}
}
};
}
function startObj3(obj) {
obj._x = setXPosition(frogPos);
obj._y = 310;
obj.attack = false;
if ((obj._x >= -500) && (obj._x <= 50)) {
obj.stat = 1;
obj.X = 3;
obj._xscale = 100;
} else if ((obj._x >= 1700) && (obj._x <= 2250)) {
obj.stat = 0;
obj.X = -3;
obj._xscale = -100;
}
}
function runObj3(obj) {
obj.onEnterFrame = function () {
if (_root.gamePause == false) {
if (((((((this._x >= frogPos) && (this._x <= (frogPos + 100))) && (_root.freeze == false)) && (this.attack == false)) && (this.stat == 1)) && (this.hit == false)) && (_root.frogDeath == false)) {
this.gotoAndPlay("turn");
this.stat = 0;
} else if (((((((this._x >= (frogPos - 100)) && (this._x <= frogPos)) && (_root.freeze == false)) && (this.attack == false)) && (obj.stat == 0)) && (this.hit == false)) && (_root.frogDeath == false)) {
this.gotoAndPlay("turn");
this.stat = 1;
} else if ((((((this._x >= (frogPos - 10)) && (this._x <= (frogPos + 10))) && (_root.freeze == false)) && (this.attack == false)) && (this.hit == false)) && (_root.frogDeath == false)) {
if (this.stat == 1) {
this.X = 5;
this._xscale = 100;
} else {
this.X = -5;
this._xscale = -100;
}
this.gotoAndPlay("attack");
this.attack = true;
}
if (((((this._x >= (frogPos - 100)) && (this._x <= (frogPos + 100))) && (this.attack == false)) && (this.hit == false)) && (_root.frogDeath == false)) {
this.alert._visible = true;
} else {
this.alert._visible = false;
}
if (this.weapon.hitTest(_root.frog) && (_root.frogHit == false)) {
_root.hP = _root.hP + -10;
_root.movInfo.HM.effect._xscale = _root.movInfo.HM.meter._xscale;
_root.movInfo.HM.meter._xscale = _root.hP;
_root.movInfo.HM.effect.play();
_root.frogHit = true;
_root.objInMouth = false;
_root.movInfo.frogStat.gotoAndStop(1);
_root.frog.eyes.gotoAndStop("hit");
_root.frog.head.gotoAndStop("hit");
_root.timerBack = setInterval(_root.back, 250);
}
i = 1;
while (i <= 5) {
if (this.hitPoint.hitTest(eval ("_root.objSpit" + i).hitPoint) && (_root.flame == true)) {
this.hit = true;
countHit++;
_root.totScore = _root.totScore + 50;
_root.movInfo.score.text = _root.totScore;
attachMovie("HOP50", "HOP50" + countHit, 950 + countHit);
eval ("HOP50" + countHit)._x = this._x;
eval ("HOP50" + countHit)._y = this._y - 10;
this.X = 0;
removeMovieClip(eval ("_root.objSpit" + i));
this.gotoAndPlay("burn");
}
i++;
}
if ((this._x <= -150) || (this._x >= 1800)) {
startObj3(this);
}
this._x = this._x + this.X;
}
};
}
function runObj4(obj) {
obj.onEnterFrame = function () {
if (this.hitPoint.hitTest(_root.tongue.outer) && (_root.shoot == true)) {
count++;
if (count == 1) {
_root.objInMouth = true;
_root.frmObjBeEaten = this.frm;
_root.objScore = this.scr;
_root.objQty = this.qty;
if ((_root.objInStomach == true) && (_root.stomachFull == false)) {
_root.movInfo.frogStat.gotoAndPlay("instomach2");
} else {
_root.movInfo.frogStat.gotoAndPlay("inmouth");
}
removeMovieClip(this);
}
}
};
}
function startObj5(obj) {
i = 0;
while (i < nSp) {
do {
cntCSp = 0;
obj.GR = posCSp[random(posCSp.length)];
j = 0;
while (j < i) {
if (obj.GR != CSp[j]) {
cntCSp = cntCSp + 1;
}
j++;
}
} while (cntCSp != i);
CSp[Number(obj._name.substr(6, 1))] = obj.GR;
i++;
}
obj._x = (obj.GR * 50) + 225;
obj._y = -20;
if (random(2) == 1) {
obj._xscale = 100;
} else {
obj._xscale = -100;
}
obj.attack = false;
obj.Y = 0;
}
function runObj5(obj) {
obj.attack = false;
obj.Y = 0;
obj.onEnterFrame = function () {
if (_root.gamePause == true) {
this.spiderAtt.stop();
}
if (_root.gamePause == false) {
this.spiderAtt.play();
if ((((this._x >= (frogPos - 20)) && (this._x <= (frogPos + 20))) && (this.attack == false)) && (_root.frogDeath == false)) {
this.attack = true;
this.gotoAndStop(2);
}
if (this.spiderAtt.hitPoint.hitTest(_root.frog.hitPoint) && (_root.frogHit == false)) {
_root.hP = _root.hP + -10;
_root.movInfo.HM.effect._xscale = _root.movInfo.HM.meter._xscale;
_root.movInfo.HM.meter._xscale = _root.hP;
_root.movInfo.HM.effect.play();
_root.frogHit = true;
_root.objInMouth = false;
_root.movInfo.frogStat.gotoAndStop(1);
_root.frog.eyes.gotoAndStop("hit");
_root.frog.head.gotoAndStop("hit");
_root.timerBack = setInterval(_root.back, 250);
}
if (this.hitTest(_root.tongue.outer) && (_root.shoot == true)) {
count++;
if (count == 1) {
_root.objInMouth = true;
_root.frmObjBeEaten = this.frm;
_root.objScore = this.scr;
_root.objQty = this.qty;
if ((_root.objInStomach == true) && (_root.stomachFull == false)) {
_root.movInfo.frogStat.gotoAndPlay("instomach2");
} else {
_root.movInfo.frogStat.gotoAndPlay("inmouth");
}
this.gotoAndPlay("startover");
}
}
i = 1;
while (i <= 5) {
if ((this.hitTest(eval ("_root.objSpit" + i).hitPoint) && (this.hit == false)) && (_root.flame == true)) {
this.hit = true;
countHit++;
_root.totScore = _root.totScore + 10;
_root.movInfo.score.text = _root.totScore;
attachMovie("HOP10", "HOP10" + countHit, 950 + countHit);
this._y = eval ("_root.objSpit" + i)._y;
eval ("HOP10" + countHit)._x = this._x;
eval ("HOP10" + countHit)._y = this._y;
removeMovieClip(eval ("_root.objSpit" + i));
this.gotoAndPlay("burn");
this.Y = 10;
} else if ((this.hitTest(eval ("_root.objSpit" + i).hitPoint) && (this.hit == false)) && (_root.flame == false)) {
this.hit = true;
countHit++;
_root.totScore = _root.totScore + 10;
_root.movInfo.score.text = _root.totScore;
attachMovie("HOP10", "HOP10" + countHit, 950 + countHit);
this._y = eval ("_root.objSpit" + i)._y;
eval ("HOP10" + countHit)._x = this._x;
eval ("HOP10" + countHit)._y = this._y;
this.gotoAndPlay("hit");
this.Y = 10;
}
i++;
}
if (this._y > 340) {
this.Y = 0;
}
this._y = this._y + this.Y;
}
};
}
var frogPos = 875;
var rnd;
var count = 0;
var objElsePos;
var countHit = 0;
var nCr;
var nPM;
var nDF;
var nBF;
var nBe;
var nMo;
var nSn;
var nSp;
var nMR;
if (_root.gameLevel == 1) {
nCr = 0;
nPM = 0;
nDF = 2;
nBF = 2;
nBe = 3;
nMo = 5;
nSn = 0;
nSp = 0;
nMR = 4;
} else if (_root.gameLevel == 2) {
nCr = 0;
nPM = 0;
nDF = 2;
nBF = 2;
nBe = 4;
nMo = 6;
nSn = 0;
nSp = 0;
nMR = 4;
} else if (_root.gameLevel == 3) {
nCr = 0;
nPM = 0;
nDF = 2;
nBF = 2;
nBe = 4;
nMo = 7;
nSn = 0;
nSp = 3;
nMR = 3;
} else if (_root.gameLevel == 4) {
nCr = 1;
nPM = 0;
nDF = 2;
nBF = 2;
nBe = 4;
nMo = 8;
nSn = 0;
nSp = 4;
nMR = 3;
} else if (_root.gameLevel == 5) {
nCr = 1;
nPM = 1;
nDF = 2;
nBF = 2;
nBe = 4;
nMo = 9;
nSn = 1;
nSp = 4;
nMR = 2;
} else {
nCr = 1;
nPM = 1;
nDF = 2;
nBF = 2;
nBe = 4;
nMo = 10;
nSn = 1;
nSp = 5;
nMR = 2;
}
var CSp = new Array();
var posCSp = new Array(0, 1, 2, 5, 6, 7, 8, 11, 12, 13, 14, 15, 16, 19, 20, 21, 24, 25, 26);
CSp[0] = posCSp[random(posCSp.length)];
i = 1;
while (i < nSp) {
do {
cntCSp = 0;
CSp[i] = posCSp[random(posCSp.length)];
j = 0;
while (j < i) {
if (CSp[i] != CSp[j]) {
cntCSp = cntCSp + 1;
}
j++;
}
} while (cntCSp != i);
i++;
}
var CMR = new Array();
var posCMR = new Array(0, 1, 2, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 18, 19, 20, 21, 23, 24, 25, 26, 27);
CMR[0] = posCMR[random(posCMR.length)];
i = 1;
while (i < nMR) {
do {
cntCMR = 0;
CMR[i] = posCMR[random(posCMR.length)];
j = 0;
while (j < i) {
if (CMR[i] != CMR[j]) {
cntCMR = cntCMR + 1;
}
j++;
}
} while (cntCMR != i);
i++;
}
createObjects();
stop();
Symbol 764 MovieClip Frame 1
function createObjects() {
var i = 0;
while (i < nDF) {
attachMovie("dragonfly", "dragonfly" + i, 100 + i);
rnd = random(3) + 1;
eval ("dragonfly" + i).body.gotoAndStop(rnd);
eval ("dragonfly" + i).frm = 1 + rnd;
eval ("dragonfly" + i).scr = 100;
eval ("dragonfly" + i).qty = 10;
eval ("dragonfly" + i).hit = false;
startObj(eval ("dragonfly" + i), 101, 50, 10);
runObj(eval ("dragonfly" + i), 101, 50, 10, "dragonfly");
i++;
}
var i = 0;
while (i < nBF) {
attachMovie("butterfly", "butterfly" + i, 200 + i);
eval ("butterfly" + i).wings.gotoAndStop(random(6) + 1);
eval ("butterfly" + i).frm = 5;
eval ("butterfly" + i).scr = 50;
eval ("butterfly" + i).qty = 10;
eval ("butterfly" + i).hit = false;
startObj(eval ("butterfly" + i), 151, 100, 5);
runObj(eval ("butterfly" + i), 151, 100, 5, "butterfly");
i++;
}
var i = 0;
while (i < nBe) {
attachMovie("bee", "bee" + i, 300 + i);
eval ("bee" + i).frm = 8;
eval ("bee" + i).scr = -10;
eval ("bee" + i).qty = 5;
eval ("bee" + i).hit = false;
startObj(eval ("bee" + i), 151, 100, 2);
runObj(eval ("bee" + i), 151, 100, 2, "bee");
i++;
}
var i = 0;
while (i < nFl) {
attachMovie("fly", "fly" + i, 400 + i);
eval ("fly" + i).frm = 6;
eval ("fly" + i).scr = 10;
eval ("fly" + i).qty = 5;
eval ("fly" + i).hit = false;
startObj(eval ("fly" + i), 151, 100, 2);
runObj(eval ("fly" + i), 151, 100, 2, "fly");
i++;
}
var i = 0;
while (i < nPM) {
attachMovie("prayingmantis", "prayingmantis" + i, 500 + i);
eval ("prayingmantis" + i).frm = 1;
eval ("prayingmantis" + i).scr = 150;
eval ("prayingmantis" + i).qty = 10;
eval ("prayingmantis" + i).hit = false;
startObj(eval ("prayingmantis" + i), 101, 50, 10);
runObj(eval ("prayingmantis" + i), 101, 50, 10, "prayingmantis");
i++;
}
var i = 0;
while (i < nMo) {
attachMovie("mosquito", "mosquito" + i, 600 + i);
eval ("mosquito" + i).frm = 7;
eval ("mosquito" + i).scr = 10;
eval ("mosquito" + i).qty = 5;
eval ("mosquito" + i).hit = false;
startObj(eval ("mosquito" + i), 151, 100, 2);
runObj(eval ("mosquito" + i), 151, 100, 2, "mosquito");
i++;
}
var i = 0;
while (i < nMR) {
attachMovie("mushroom", "mushroom" + i, 700 + i);
eval ("mushroom" + i).frm = 14;
eval ("mushroom" + i).scr = 10;
eval ("mushroom" + i).qty = 10;
eval ("mushroom" + i).gotoAndStop(2);
eval ("mushroom" + i)._x = (CMR[i] * 50) + 100;
eval ("mushroom" + i)._y = random(5) + 340;
runObj4(eval ("mushroom" + i));
i++;
}
var i = 0;
while (i < nCr) {
attachMovie("cricket", "cricket" + i, 800 + i);
eval ("cricket" + i).frm = 16;
eval ("cricket" + i).scr = 100;
eval ("cricket" + i).qty = 10;
eval ("cricket" + i).hit = false;
startObj2(eval ("cricket" + i));
runObj2(eval ("cricket" + i));
i++;
}
var i = 0;
while (i < nSp) {
attachMovie("spider", "spider" + i, 850 + i);
eval ("spider" + i).frm = 12;
eval ("spider" + i).scr = -10;
eval ("spider" + i).qty = 10;
eval ("spider" + i).hit = false;
eval ("spider" + i)._x = (CSp[i] * 50) + 125;
eval ("spider" + i)._y = -20;
if (random(2) == 1) {
eval ("spider" + i)._xscale = 100;
} else {
eval ("spider" + i)._xscale = -100;
}
runObj5(eval ("spider" + i));
i++;
}
attachMovie("beachunlocked", "stageInfo2", 912);
stageInfo2._x = 1670;
stageInfo2._y = 320;
}
function removeObjects() {
var i = 0;
while (i < nDF) {
removeMovieClip(eval ("dragonfly" + i));
i++;
}
var i = 0;
while (i < nBF) {
removeMovieClip(eval ("butterfly" + i));
i++;
}
var i = 0;
while (i < nBe) {
removeMovieClip(eval ("bee" + i));
i++;
}
var i = 0;
while (i < nFl) {
removeMovieClip(eval ("fly" + i));
i++;
}
var i = 0;
while (i < nPM) {
removeMovieClip(eval ("prayingmantis" + i));
i++;
}
var i = 0;
while (i < nMo) {
removeMovieClip(eval ("mosquito" + i));
i++;
}
var i = 0;
while (i < nMR) {
removeMovieClip(eval ("mushroom" + i));
i++;
}
var i = 0;
while (i < nCr) {
removeMovieClip(eval ("cricket" + i));
i++;
}
var i = 0;
while (i < nSp) {
removeMovieClip(eval ("spider" + i));
i++;
}
removeMovieClip(stageInfo2);
}
function setXPosition(area) {
var _local1;
if (area <= 575) {
_local1 = random(551) + 1700;
objElsePos = true;
} else if ((area > 575) && (area < 1175)) {
if (random(2) == 1) {
_local1 = random(551) + -500;
objElsePos = false;
} else {
_local1 = random(551) + 1700;
objElsePos = true;
}
} else if (area >= 1175) {
_local1 = random(551) + -500;
objElsePos = false;
}
return(_local1);
}
function startObj(obj, downLim, upLim, spRange) {
obj._x = setXPosition(frogPos);
obj._y = random(downLim) + upLim;
obj.stayPos = random(551) + 600;
obj.xTarget = random(551) + 600;
obj.yTarget = random(downLim) + upLim;
obj.speed = random(6) + spRange;
}
function runObj(obj, downLim, upLim, spRange, type) {
obj.attack = false;
obj.stat = 0;
obj.onEnterFrame = function () {
if (_root.gamePause == false) {
if ((((this._x >= (this.xTarget - 15)) && (this._x <= (this.xTarget + 15))) && ((this._y >= (this.yTarget - 15)) && (this._y <= (this.yTarget + 15)))) && (this.hit == false)) {
if ((type == "bee") || (type == "mosquito")) {
this.gotoAndStop(1);
this.attack = false;
}
this.speed = random(6) + spRange;
this.GR = random(10);
if (this.GR == 0) {
this.stayPos = random(551) + -500;
this.xTarget = random(551) + -500;
this.yTarget = random(downLim) + upLim;
} else if (this.GR == 1) {
this.stayPos = random(551) + 50;
this.xTarget = random(551) + 50;
this.yTarget = random(downLim) + upLim;
} else if (this.GR == 3) {
this.stayPos = random(551) + 600;
this.xTarget = random(551) + 600;
this.yTarget = random(downLim) + upLim;
} else if (this.GR == 4) {
this.stayPos = random(551) + 1150;
this.xTarget = random(551) + 1150;
this.yTarget = random(downLim) + upLim;
} else if (this.GR == 5) {
this.stayPos = random(551) + 1700;
this.xTarget = random(551) + 1700;
this.yTarget = random(downLim) + upLim;
} else {
this.xTarget = this.stayPos;
this.yTarget = random(downLim) + upLim;
}
}
if ((((((this._x >= (frogPos - 50)) && (this._x <= (frogPos + 50))) && ((type == "bee") || (type == "mosquito"))) && (this.stat == 1)) && (this.attack == false)) && (_root.frogDeath == false)) {
this.stat = 0;
clearInterval(this.timerStat);
this.attack = true;
this.gotoAndStop(2);
this.speed = 10;
this.xTarget = frogPos;
this.yTarget = 330;
}
if (this.sting.hitTest(_root.frog.hitPoint) && (_root.frogHit == false)) {
if ((type == "bee") || (type == "mosquito")) {
this.stat = 0;
this.gotoAndStop(1);
this.xTarget = random(551) + 600;
this.yTarget = random(downLim) + upLim;
_root.hP = _root.hP + -10;
_root.movInfo.HM.effect._xscale = _root.movInfo.HM.meter._xscale;
_root.movInfo.HM.meter._xscale = _root.hP;
_root.movInfo.HM.effect.play();
_root.frogHit = true;
_root.objInMouth = false;
_root.movInfo.frogStat.gotoAndStop(1);
_root.frog.eyes.gotoAndStop("hit");
_root.frog.head.gotoAndStop("hit");
_root.timerBack = setInterval(_root.back, 250);
}
}
if (this.hitPoint.hitTest(_root.tongue.outer) && (_root.shoot == true)) {
count++;
if (count == 1) {
_root.objInMouth = true;
_root.frmObjBeEaten = this.frm;
_root.objScore = this.scr;
_root.objQty = this.qty;
if ((_root.objInStomach == true) && (_root.stomachFull == false)) {
_root.movInfo.frogStat.gotoAndPlay("instomach2");
} else {
_root.movInfo.frogStat.gotoAndPlay("inmouth");
}
this.gotoAndPlay("startover");
}
}
i = 1;
while (i <= 5) {
if ((this.hitPoint.hitTest(eval ("_root.objSpit" + i).hitPoint) && (this.hit == false)) && (_root.flame == true)) {
this.hit = true;
countHit++;
_root.totScore = _root.totScore + 10;
_root.movInfo.score.text = _root.totScore;
attachMovie("HOP10", "HOP10" + countHit, 950 + countHit);
eval ("HOP10" + countHit)._x = this._x;
eval ("HOP10" + countHit)._y = this._y;
removeMovieClip(eval ("_root.objSpit" + i));
this.gotoAndPlay("burn");
this.xTarget = this._x;
this.yTarget = 340;
this.speed = 10;
this.stat = 0;
} else if ((this.hitPoint.hitTest(eval ("_root.objSpit" + i).hitPoint) && (this.hit == false)) && (_root.flame == false)) {
this.hit = true;
countHit++;
_root.totScore = _root.totScore + 10;
_root.movInfo.score.text = _root.totScore;
attachMovie("HOP10", "HOP10" + countHit, 950 + countHit);
eval ("HOP10" + countHit)._x = this._x;
eval ("HOP10" + countHit)._y = this._y;
this.gotoAndPlay("hit");
this.xTarget = this._x;
this.yTarget = 340;
this.speed = 10;
this.stat = 0;
}
i++;
}
if (this.xTarget < this._x) {
this._xscale = 100;
} else if (this.xTarget > this._x) {
this._xscale = -100;
}
this.deltaX = this._x - this.xTarget;
this.deltaY = this._y - this.yTarget;
this.rotation = (-Math.atan2(this.deltaX, this.deltaY)) / (Math.PI/180);
if (Math.sqrt((this.deltaX * this.deltaX) + (this.deltaY * this.deltaY)) > this.speed) {
this._y = this._y - (this.speed * Math.cos(this.rotation * (Math.PI/180)));
this._x = this._x + (this.speed * Math.sin(this.rotation * (Math.PI/180)));
}
}
};
}
function startObj2(obj) {
obj._x = setXPosition(frogPos);
obj._y = 310;
obj.difY = -15;
if ((obj._x >= -500) && (obj._x <= 50)) {
obj.difX = 15;
obj._xscale = -100;
} else if ((obj._x >= 1700) && (obj._x <= 2250)) {
obj.difX = -15;
obj._xscale = 100;
}
obj.vx = ((Math.cos(Math.atan2(obj.difY, obj.difX)) * vo) * 1.5) / vo;
}
function runObj2(obj) {
gravity = 0.5;
vo = random(5) + 5;
obj.fall = false;
obj.vx = ((Math.cos(Math.atan2(obj.difY, obj.difX)) * vo) * 1.5) / vo;
obj.vy = ((Math.sin(Math.atan2(obj.difY, obj.difX)) * vo) * 1.5) / vo;
obj.onEnterFrame = function () {
if ((_root.gamePause == false) && (this.fall == false)) {
this.vy = this.vy + (gravity / vo);
i = 0;
while (i < 16) {
this._x = this._x + this.vx;
this._y = this._y + this.vy;
if ((this._y > 340) && (this.hit == false)) {
GR = random(3);
if (GR == 1) {
this.difX = this.difX * -1;
this._xscale = this._xscale * -1;
}
vo = random(5) + 5;
this.vx = ((Math.cos(Math.atan2(this.difY, this.difX)) * vo) * 1.5) / vo;
this.vy = ((Math.sin(Math.atan2(this.difY, this.difX)) * vo) * 1.5) / vo;
this.gotoAndPlay(2);
} else if ((this._y > 340) && (this.hit == true)) {
this.fall = true;
}
i++;
}
if ((this._x < -550) || (this._x > 2250)) {
this.difY = -15;
this.difX = this.difX * -1;
this._xscale = this._xscale * -1;
vo = random(5) + 5;
this.vx = ((Math.cos(Math.atan2(this.difY, this.difX)) * vo) * 1.5) / vo;
this.vy = ((Math.sin(Math.atan2(this.difY, this.difX)) * vo) * 1.5) / vo;
}
i = 1;
while (i <= 5) {
if (this.hitPoint.hitTest(eval ("_root.objSpit" + i).hitPoint) && (_root.flame == true)) {
this.hit = true;
countHit++;
_root.totScore = _root.totScore + 10;
_root.movInfo.score.text = _root.totScore;
attachMovie("HOP10", "HOP10" + countHit, 950 + countHit);
eval ("HOP10" + countHit)._x = this._x;
eval ("HOP10" + countHit)._y = this._y;
removeMovieClip(eval ("_root.objSpit" + i));
this.gotoAndPlay("burn");
this.vx = 0;
this.vy = 0.5;
} else if (this.hitPoint.hitTest(eval ("_root.objSpit" + i).hitPoint) && (_root.flame == false)) {
this.hit = true;
countHit++;
_root.totScore = _root.totScore + 10;
_root.movInfo.score.text = _root.totScore;
attachMovie("HOP10", "HOP10" + countHit, 950 + countHit);
eval ("HOP10" + countHit)._x = this._x;
eval ("HOP10" + countHit)._y = this._y;
this.gotoAndPlay("hit");
this.vx = 0;
this.vy = 0.5;
}
i++;
}
}
if (this.hitPoint.hitTest(_root.tongue.outer) && (_root.shoot == true)) {
count++;
if (count == 1) {
_root.objInMouth = true;
_root.frmObjBeEaten = this.frm;
_root.objScore = this.scr;
_root.objQty = this.qty;
if ((_root.objInStomach == true) && (_root.stomachFull == false)) {
_root.movInfo.frogStat.gotoAndPlay("instomach2");
} else {
_root.movInfo.frogStat.gotoAndPlay("inmouth");
}
this.gotoAndPlay("startover");
}
}
};
}
function startObj3(obj) {
obj._x = setXPosition(frogPos);
obj._y = 310;
obj.attack = false;
if ((obj._x >= -500) && (obj._x <= 50)) {
obj.stat = 1;
obj.X = 3;
obj._xscale = 100;
} else if ((obj._x >= 1700) && (obj._x <= 2250)) {
obj.stat = 0;
obj.X = -3;
obj._xscale = -100;
}
}
function runObj3(obj) {
obj.onEnterFrame = function () {
if (_root.gamePause == false) {
if (((((((this._x >= frogPos) && (this._x <= (frogPos + 100))) && (_root.freeze == false)) && (this.attack == false)) && (this.stat == 1)) && (this.hit == false)) && (_root.frogDeath == false)) {
this.gotoAndPlay("turn");
this.stat = 0;
} else if (((((((this._x >= (frogPos - 100)) && (this._x <= frogPos)) && (_root.freeze == false)) && (this.attack == false)) && (obj.stat == 0)) && (this.hit == false)) && (_root.frogDeath == false)) {
this.gotoAndPlay("turn");
this.stat = 1;
} else if ((((((this._x >= (frogPos - 10)) && (this._x <= (frogPos + 10))) && (_root.freeze == false)) && (this.attack == false)) && (this.hit == false)) && (_root.frogDeath == false)) {
if (this.stat == 1) {
this.X = 5;
} else {
this.X = -5;
}
this.gotoAndPlay("attack");
this.attack = true;
}
if (((((this._x >= (frogPos - 100)) && (this._x <= (frogPos + 100))) && (this.attack == false)) && (this.hit == false)) && (_root.frogDeath == false)) {
this.alert._visible = true;
} else {
this.alert._visible = false;
}
if (this.weapon.hitTest(_root.frog) && (_root.frogHit == false)) {
_root.hP = _root.hP + -10;
_root.movInfo.HM.effect._xscale = _root.movInfo.HM.meter._xscale;
_root.movInfo.HM.meter._xscale = _root.hP;
_root.movInfo.HM.effect.play();
_root.frogHit = true;
_root.objInMouth = false;
_root.movInfo.frogStat.gotoAndStop(1);
_root.frog.eyes.gotoAndStop("hit");
_root.frog.head.gotoAndStop("hit");
_root.timerBack = setInterval(_root.back, 250);
}
i = 1;
while (i <= 5) {
if (this.hitPoint.hitTest(eval ("_root.objSpit" + i).hitPoint) && (_root.flame == true)) {
this.hit = true;
countHit++;
_root.totScore = _root.totScore + 50;
_root.movInfo.score.text = _root.totScore;
attachMovie("HOP50", "HOP50" + countHit, 950 + countHit);
eval ("HOP50" + countHit)._x = this._x;
eval ("HOP50" + countHit)._y = this._y - 10;
this.X = 0;
removeMovieClip(eval ("_root.objSpit" + i));
this.gotoAndPlay("burn");
}
i++;
}
if ((this._x <= -150) || (this._x >= 1800)) {
startObj3(this);
}
this._x = this._x + this.X;
}
};
}
function runObj4(obj) {
obj.onEnterFrame = function () {
if (this.hitPoint.hitTest(_root.tongue.outer) && (_root.shoot == true)) {
count++;
if (count == 1) {
_root.objInMouth = true;
_root.frmObjBeEaten = this.frm;
_root.objScore = this.scr;
_root.objQty = this.qty;
if ((_root.objInStomach == true) && (_root.stomachFull == false)) {
_root.movInfo.frogStat.gotoAndPlay("instomach2");
} else {
_root.movInfo.frogStat.gotoAndPlay("inmouth");
}
removeMovieClip(this);
}
}
};
}
function startObj5(obj) {
i = 0;
while (i < nSp) {
do {
cntCSp = 0;
obj.GR = posCSp[random(posCSp.length)];
j = 0;
while (j < i) {
if (obj.GR != CSp[j]) {
cntCSp = cntCSp + 1;
}
j++;
}
} while (cntCSp != i);
CSp[Number(obj._name.substr(6, 1))] = obj.GR;
i++;
}
obj._x = (obj.GR * 50) + 125;
obj._y = -20;
if (random(2) == 1) {
obj._xscale = 100;
} else {
obj._xscale = -100;
}
obj.attack = false;
obj.Y = 0;
}
function runObj5(obj) {
obj.attack = false;
obj.Y = 0;
obj.onEnterFrame = function () {
if (_root.gamePause == true) {
this.spiderAtt.stop();
}
if (_root.gamePause == false) {
this.spiderAtt.play();
if ((((this._x >= (frogPos - 20)) && (this._x <= (frogPos + 20))) && (this.attack == false)) && (_root.frogDeath == false)) {
this.attack = true;
this.gotoAndStop(2);
}
if (this.spiderAtt.hitPoint.hitTest(_root.frog.hitPoint) && (_root.frogHit == false)) {
_root.hP = _root.hP + -10;
_root.movInfo.HM.effect._xscale = _root.movInfo.HM.meter._xscale;
_root.movInfo.HM.meter._xscale = _root.hP;
_root.movInfo.HM.effect.play();
_root.frogHit = true;
_root.objInMouth = false;
_root.movInfo.frogStat.gotoAndStop(1);
_root.frog.eyes.gotoAndStop("hit");
_root.frog.head.gotoAndStop("hit");
_root.timerBack = setInterval(_root.back, 250);
}
if (this.hitTest(_root.tongue.outer) && (_root.shoot == true)) {
count++;
if (count == 1) {
_root.objInMouth = true;
_root.frmObjBeEaten = this.frm;
_root.objScore = this.scr;
_root.objQty = this.qty;
if ((_root.objInStomach == true) && (_root.stomachFull == false)) {
_root.movInfo.frogStat.gotoAndPlay("instomach2");
} else {
_root.movInfo.frogStat.gotoAndPlay("inmouth");
}
this.gotoAndPlay("startover");
}
}
i = 1;
while (i <= 5) {
if ((this.hitTest(eval ("_root.objSpit" + i).hitPoint) && (this.hit == false)) && (_root.flame == true)) {
this.hit = true;
countHit++;
_root.totScore = _root.totScore + 10;
_root.movInfo.score.text = _root.totScore;
attachMovie("HOP10", "HOP10" + countHit, 950 + countHit);
this._y = eval ("_root.objSpit" + i)._y;
eval ("HOP10" + countHit)._x = this._x;
eval ("HOP10" + countHit)._y = this._y;
removeMovieClip(eval ("_root.objSpit" + i));
this.gotoAndPlay("burn");
this.Y = 10;
} else if ((this.hitTest(eval ("_root.objSpit" + i).hitPoint) && (this.hit == false)) && (_root.flame == false)) {
this.hit = true;
countHit++;
_root.totScore = _root.totScore + 10;
_root.movInfo.score.text = _root.totScore;
attachMovie("HOP10", "HOP10" + countHit, 950 + countHit);
this._y = eval ("_root.objSpit" + i)._y;
eval ("HOP10" + countHit)._x = this._x;
eval ("HOP10" + countHit)._y = this._y;
this.gotoAndPlay("hit");
this.Y = 10;
}
i++;
}
if (this._y > 340) {
this.Y = 0;
}
this._y = this._y + this.Y;
}
};
}
var frogPos = 875;
var rnd;
var count = 0;
var objElsePos;
var countHit = 0;
var nCr;
var nPM;
var nDF;
var nBF;
var nBe;
var nMo;
var nSp;
var nMR;
var nFl;
if (_root.gameLevel == 1) {
nCr = 0;
nPM = 0;
nDF = 2;
nBF = 2;
nBe = 3;
nMo = 3;
nFl = 3;
nSp = 1;
nMR = 3;
} else if (_root.gameLevel == 2) {
nCr = 0;
nPM = 0;
nDF = 2;
nBF = 2;
nBe = 4;
nMo = 3;
nFl = 4;
nSp = 1;
nMR = 3;
} else if (_root.gameLevel == 3) {
nCr = 1;
nPM = 0;
nDF = 2;
nBF = 2;
nBe = 4;
nMo = 3;
nFl = 4;
nSp = 1;
nMR = 2;
} else if (_root.gameLevel == 4) {
nCr = 0;
nPM = 0;
nDF = 2;
nBF = 2;
nBe = 4;
nMo = 4;
nFl = 4;
nSp = 1;
nMR = 2;
} else if (_root.gameLevel == 5) {
nCr = 1;
nPM = 0;
nDF = 2;
nBF = 2;
nBe = 5;
nMo = 4;
nFl = 4;
nSp = 1;
nMR = 1;
} else {
nCr = 1;
nPM = 1;
nDF = 2;
nBF = 2;
nBe = 6;
nMo = 4;
nFl = 4;
nSp = 1;
nMR = 1;
}
var CSp = new Array();
var posCSp = new Array(0, 1, 2, 3, 4);
CSp[0] = posCSp[random(posCSp.length)];
i = 1;
while (i < nSp) {
do {
cntCSp = 0;
CSp[i] = posCSp[random(posCSp.length)];
j = 0;
while (j < i) {
if (CSp[i] != CSp[j]) {
cntCSp = cntCSp + 1;
}
j++;
}
} while (cntCSp != i);
i++;
}
var CMR = new Array();
var posCMR = new Array(0, 1, 2, 3, 4);
CMR[0] = posCMR[random(posCMR.length)];
i = 1;
while (i < nMR) {
do {
cntCMR = 0;
CMR[i] = posCMR[random(posCMR.length)];
j = 0;
while (j < i) {
if (CMR[i] != CMR[j]) {
cntCMR = cntCMR + 1;
}
j++;
}
} while (cntCMR != i);
i++;
}
createObjects();
stop();
Symbol 766 MovieClip Frame 1
function createObjects() {
var i = 0;
while (i < nBa) {
attachMovie("bat", "bat" + i, 300 + i);
eval ("bat" + i).hit = false;
startObj(eval ("bat" + i), 101, 50, 10);
runObj(eval ("bat" + i), 101, 50, 10, "bat");
i++;
}
var i = 0;
while (i < nMo) {
attachMovie("mosquito", "mosquito" + i, 600 + i);
eval ("mosquito" + i).frm = 7;
eval ("mosquito" + i).scr = 10;
eval ("mosquito" + i).qty = 5;
eval ("mosquito" + i).hit = false;
startObj(eval ("mosquito" + i), 151, 100, 2);
runObj(eval ("mosquito" + i), 151, 100, 2, "mosquito");
i++;
}
var i = 0;
while (i < nMR) {
attachMovie("mushroom", "mushroom" + i, 700 + i);
eval ("mushroom" + i).frm = 15;
eval ("mushroom" + i).scr = 50;
eval ("mushroom" + i).qty = 10;
eval ("mushroom" + i).gotoAndStop(3);
eval ("mushroom" + i)._x = (CMR[i] * 50) + 200;
eval ("mushroom" + i)._y = random(5) + 340;
runObj4(eval ("mushroom" + i));
i++;
}
var i = 0;
while (i < nCr) {
attachMovie("cricket", "cricket" + i, 800 + i);
eval ("cricket" + i).frm = 16;
eval ("cricket" + i).scr = 100;
eval ("cricket" + i).qty = 10;
eval ("cricket" + i).hit = false;
startObj2(eval ("cricket" + i));
runObj2(eval ("cricket" + i));
i++;
}
var i = 0;
while (i < nSp) {
attachMovie("spider", "spider" + i, 850 + i);
eval ("spider" + i).frm = 12;
eval ("spider" + i).scr = -10;
eval ("spider" + i).qty = 10;
eval ("spider" + i).hit = false;
eval ("spider" + i)._x = (CSp[i] * 50) + 225;
eval ("spider" + i)._y = -20;
if (random(2) == 1) {
eval ("spider" + i)._xscale = 100;
} else {
eval ("spider" + i)._xscale = -100;
}
runObj5(eval ("spider" + i));
i++;
}
var i = 0;
while (i < nSn) {
attachMovie("snake", "snake", 900 + i);
snake.scr = 100;
snake.hit = false;
snake.alert._visible = false;
startObj3(snake);
runObj3(snake);
i++;
}
attachMovie("forestunlocked", "stageInfo1", 911);
stageInfo1._x = 80;
stageInfo1._y = 320;
}
function removeObjects() {
var i = 0;
while (i < nBa) {
removeMovieClip(eval ("bat" + i));
i++;
}
var i = 0;
while (i < nMo) {
removeMovieClip(eval ("mosquito" + i));
i++;
}
var i = 0;
while (i < nMR) {
removeMovieClip(eval ("mushroom" + i));
i++;
}
var i = 0;
while (i < nCr) {
removeMovieClip(eval ("cricket" + i));
i++;
}
var i = 0;
while (i < nSp) {
removeMovieClip(eval ("spider" + i));
i++;
}
var i = 0;
while (i < nSn) {
removeMovieClip(snake);
i++;
}
removeMovieClip(stageInfo1);
}
function setXPosition(area) {
var _local1;
if (area <= 575) {
_local1 = random(551) + 1700;
objElsePos = true;
} else if ((area > 575) && (area < 1175)) {
if (random(2) == 1) {
_local1 = random(551) + -500;
objElsePos = false;
} else {
_local1 = random(551) + 1700;
objElsePos = true;
}
} else if (area >= 1175) {
_local1 = random(551) + -500;
objElsePos = false;
}
return(_local1);
}
function startObj(obj, downLim, upLim, spRange) {
obj._x = setXPosition(frogPos);
obj._y = random(downLim) + upLim;
obj.stayPos = random(551) + 600;
obj.xTarget = random(551) + 600;
obj.yTarget = random(downLim) + upLim;
obj.speed = random(6) + spRange;
}
function runObj(obj, downLim, upLim, spRange, type) {
obj.attack = false;
obj.stat = 0;
obj.onEnterFrame = function () {
if (_root.gamePause == false) {
if ((((this._x >= (this.xTarget - 20)) && (this._x <= (this.xTarget + 20))) && ((this._y >= (this.yTarget - 20)) && (this._y <= (this.yTarget + 20)))) && (this.hit == false)) {
if ((type == "bat") || (type == "mosquito")) {
this.gotoAndStop(1);
this.attack = false;
}
this.speed = random(6) + spRange;
this.GR = random(10);
if (this.GR == 0) {
this.stayPos = random(551) + -500;
this.xTarget = random(551) + -500;
this.yTarget = random(downLim) + upLim;
} else if (this.GR == 1) {
this.stayPos = random(551) + 50;
this.xTarget = random(551) + 50;
this.yTarget = random(downLim) + upLim;
} else if (this.GR == 3) {
this.stayPos = random(551) + 600;
this.xTarget = random(551) + 600;
this.yTarget = random(downLim) + upLim;
} else if (this.GR == 4) {
this.stayPos = random(551) + 1150;
this.xTarget = random(551) + 1150;
this.yTarget = random(downLim) + upLim;
} else if (this.GR == 5) {
this.stayPos = random(551) + 1700;
this.xTarget = random(551) + 1700;
this.yTarget = random(downLim) + upLim;
} else {
this.xTarget = this.stayPos;
this.yTarget = random(downLim) + upLim;
}
}
if (((((((this._x >= (frogPos - 50)) && (this._x <= (frogPos + 50))) && (type == "bat")) && (this.stat == 1)) && (this.attack == false)) && (_root.frogDeath == false)) && (_root.freeze == false)) {
this.stat = 0;
clearInterval(this.timerStat);
this.attack = true;
this.gotoAndStop(2);
this.speed = 20;
this.xTarget = frogPos;
this.yTarget = 330;
} else if ((((((this._x >= (frogPos - 50)) && (this._x <= (frogPos + 50))) && (type == "mosquito")) && (this.stat == 1)) && (this.attack == false)) && (_root.frogDeath == false)) {
this.stat = 0;
clearInterval(this.timerStat);
this.attack = true;
this.gotoAndStop(2);
this.speed = 10;
this.xTarget = frogPos;
this.yTarget = 330;
}
if (this.sting.hitTest(_root.frog.hitPoint) && (_root.frogHit == false)) {
if ((type == "bat") || (type == "mosquito")) {
this.stat = 0;
this.gotoAndStop(1);
this.xTarget = random(551) + 600;
this.yTarget = random(downLim) + upLim;
_root.hP = _root.hP + -10;
_root.movInfo.HM.effect._xscale = _root.movInfo.HM.meter._xscale;
_root.movInfo.HM.meter._xscale = _root.hP;
_root.movInfo.HM.effect.play();
_root.frogHit = true;
_root.objInMouth = false;
_root.movInfo.frogStat.gotoAndStop(1);
_root.frog.eyes.gotoAndStop("hit");
_root.frog.head.gotoAndStop("hit");
_root.timerBack = setInterval(_root.back, 250);
}
}
if ((this.hitPoint.hitTest(_root.tongue.outer) && (_root.shoot == true)) && (type != "bat")) {
count++;
if (count == 1) {
_root.objInMouth = true;
_root.frmObjBeEaten = this.frm;
_root.objScore = this.scr;
_root.objQty = this.qty;
if ((_root.objInStomach == true) && (_root.stomachFull == false)) {
_root.movInfo.frogStat.gotoAndPlay("instomach2");
} else {
_root.movInfo.frogStat.gotoAndPlay("inmouth");
}
this.gotoAndPlay("startover");
}
}
i = 1;
while (i <= 5) {
if ((this.hitPoint.hitTest(eval ("_root.objSpit" + i).hitPoint) && (this.hit == false)) && (_root.flame == true)) {
this.hit = true;
countHit++;
_root.totScore = _root.totScore + 10;
_root.movInfo.score.text = _root.totScore;
attachMovie("HOP10", "HOP10" + countHit, 950 + countHit);
eval ("HOP10" + countHit)._x = this._x;
eval ("HOP10" + countHit)._y = this._y;
removeMovieClip(eval ("_root.objSpit" + i));
this.gotoAndPlay("burn");
this.xTarget = this._x;
this.yTarget = 340;
this.speed = 10;
this.stat = 0;
} else if (((this.hitPoint.hitTest(eval ("_root.objSpit" + i).hitPoint) && (this.hit == false)) && (_root.flame == false)) && (type != "bat")) {
this.hit = true;
countHit++;
_root.totScore = _root.totScore + 10;
_root.movInfo.score.text = _root.totScore;
attachMovie("HOP10", "HOP10" + countHit, 950 + countHit);
eval ("HOP10" + countHit)._x = this._x;
eval ("HOP10" + countHit)._y = this._y;
this.gotoAndPlay("hit");
this.xTarget = this._x;
this.yTarget = 340;
this.speed = 10;
this.stat = 0;
}
i++;
}
if (this.xTarget < this._x) {
this._xscale = 100;
} else if (this.xTarget > this._x) {
this._xscale = -100;
}
this.deltaX = this._x - this.xTarget;
this.deltaY = this._y - this.yTarget;
this.rotation = (-Math.atan2(this.deltaX, this.deltaY)) / (Math.PI/180);
if (Math.sqrt((this.deltaX * this.deltaX) + (this.deltaY * this.deltaY)) > this.speed) {
this._y = this._y - (this.speed * Math.cos(this.rotation * (Math.PI/180)));
this._x = this._x + (this.speed * Math.sin(this.rotation * (Math.PI/180)));
}
}
};
}
function startObj2(obj) {
obj._x = setXPosition(frogPos);
obj._y = 310;
obj.difY = -15;
if ((obj._x >= -500) && (obj._x <= 50)) {
obj.difX = 15;
obj._xscale = -100;
} else if ((obj._x >= 1700) && (obj._x <= 2250)) {
obj.difX = -15;
obj._xscale = 100;
}
obj.vx = ((Math.cos(Math.atan2(obj.difY, obj.difX)) * vo) * 1.5) / vo;
}
function runObj2(obj) {
gravity = 0.5;
vo = random(5) + 5;
obj.fall = false;
obj.vx = ((Math.cos(Math.atan2(obj.difY, obj.difX)) * vo) * 1.5) / vo;
obj.vy = ((Math.sin(Math.atan2(obj.difY, obj.difX)) * vo) * 1.5) / vo;
obj.onEnterFrame = function () {
if ((_root.gamePause == false) && (this.fall == false)) {
this.vy = this.vy + (gravity / vo);
i = 0;
while (i < 16) {
this._x = this._x + this.vx;
this._y = this._y + this.vy;
if ((this._y > 340) && (this.hit == false)) {
GR = random(3);
if (GR == 1) {
this.difX = this.difX * -1;
this._xscale = this._xscale * -1;
}
vo = random(5) + 5;
this.vx = ((Math.cos(Math.atan2(this.difY, this.difX)) * vo) * 1.5) / vo;
this.vy = ((Math.sin(Math.atan2(this.difY, this.difX)) * vo) * 1.5) / vo;
this.gotoAndPlay(2);
} else if ((this._y > 340) && (this.hit == true)) {
this.fall = true;
}
i++;
}
if ((this._x < -550) || (this._x > 2250)) {
this.difY = -15;
this.difX = this.difX * -1;
this._xscale = this._xscale * -1;
vo = random(5) + 5;
this.vx = ((Math.cos(Math.atan2(this.difY, this.difX)) * vo) * 1.5) / vo;
this.vy = ((Math.sin(Math.atan2(this.difY, this.difX)) * vo) * 1.5) / vo;
}
i = 1;
while (i <= 5) {
if (this.hitPoint.hitTest(eval ("_root.objSpit" + i).hitPoint) && (_root.flame == true)) {
this.hit = true;
countHit++;
_root.totScore = _root.totScore + 10;
_root.movInfo.score.text = _root.totScore;
attachMovie("HOP10", "HOP10" + countHit, 950 + countHit);
eval ("HOP10" + countHit)._x = this._x;
eval ("HOP10" + countHit)._y = this._y;
removeMovieClip(eval ("_root.objSpit" + i));
this.gotoAndPlay("burn");
this.vx = 0;
this.vy = 0.5;
} else if (this.hitPoint.hitTest(eval ("_root.objSpit" + i).hitPoint) && (_root.flame == false)) {
this.hit = true;
countHit++;
_root.totScore = _root.totScore + 10;
_root.movInfo.score.text = _root.totScore;
attachMovie("HOP10", "HOP10" + countHit, 950 + countHit);
eval ("HOP10" + countHit)._x = this._x;
eval ("HOP10" + countHit)._y = this._y;
this.gotoAndPlay("hit");
this.vx = 0;
this.vy = 0.5;
}
i++;
}
}
if (this.hitPoint.hitTest(_root.tongue.outer) && (_root.shoot == true)) {
count++;
if (count == 1) {
_root.objInMouth = true;
_root.frmObjBeEaten = this.frm;
_root.objScore = this.scr;
_root.objQty = this.qty;
if ((_root.objInStomach == true) && (_root.stomachFull == false)) {
_root.movInfo.frogStat.gotoAndPlay("instomach2");
} else {
_root.movInfo.frogStat.gotoAndPlay("inmouth");
}
this.gotoAndPlay("startover");
}
}
};
}
function startObj3(obj) {
obj._x = setXPosition(frogPos);
obj._y = 310;
obj.attack = false;
if ((obj._x >= -500) && (obj._x <= 50)) {
obj.stat = 1;
obj.X = 3;
obj._xscale = 100;
} else if ((obj._x >= 1700) && (obj._x <= 2250)) {
obj.stat = 0;
obj.X = -3;
obj._xscale = -100;
}
}
function runObj3(obj) {
obj.onEnterFrame = function () {
if (_root.gamePause == false) {
if (((((((this._x >= frogPos) && (this._x <= (frogPos + 100))) && (_root.freeze == false)) && (this.attack == false)) && (this.stat == 1)) && (this.hit == false)) && (_root.frogDeath == false)) {
this.gotoAndPlay("turn");
this.stat = 0;
} else if (((((((this._x >= (frogPos - 100)) && (this._x <= frogPos)) && (_root.freeze == false)) && (this.attack == false)) && (obj.stat == 0)) && (this.hit == false)) && (_root.frogDeath == false)) {
this.gotoAndPlay("turn");
this.stat = 1;
} else if ((((((this._x >= (frogPos - 10)) && (this._x <= (frogPos + 10))) && (_root.freeze == false)) && (this.attack == false)) && (this.hit == false)) && (_root.frogDeath == false)) {
if (this.stat == 1) {
this.X = 5;
this._xscale = 100;
} else {
this.X = -5;
this._xscale = -100;
}
this.gotoAndPlay("attack");
this.attack = true;
}
if (((((this._x >= (frogPos - 100)) && (this._x <= (frogPos + 100))) && (this.attack == false)) && (this.hit == false)) && (_root.frogDeath == false)) {
this.alert._visible = true;
} else {
this.alert._visible = false;
}
if (this.weapon.hitTest(_root.frog) && (_root.frogHit == false)) {
_root.hP = _root.hP + -10;
_root.movInfo.HM.effect._xscale = _root.movInfo.HM.meter._xscale;
_root.movInfo.HM.meter._xscale = _root.hP;
_root.movInfo.HM.effect.play();
_root.frogHit = true;
_root.objInMouth = false;
_root.movInfo.frogStat.gotoAndStop(1);
_root.frog.eyes.gotoAndStop("hit");
_root.frog.head.gotoAndStop("hit");
_root.timerBack = setInterval(_root.back, 250);
}
i = 1;
while (i <= 5) {
if (this.hitPoint.hitTest(eval ("_root.objSpit" + i).hitPoint) && (_root.flame == true)) {
this.hit = true;
countHit++;
_root.totScore = _root.totScore + 50;
_root.movInfo.score.text = _root.totScore;
attachMovie("HOP50", "HOP50" + countHit, 950 + countHit);
eval ("HOP50" + countHit)._x = this._x;
eval ("HOP50" + countHit)._y = this._y - 10;
this.X = 0;
removeMovieClip(eval ("_root.objSpit" + i));
this.gotoAndPlay("burn");
}
i++;
}
if ((this._x <= -150) || (this._x >= 1800)) {
startObj3(snake);
}
this._x = this._x + this.X;
}
};
}
function runObj4(obj) {
obj.onEnterFrame = function () {
if (this.hitPoint.hitTest(_root.tongue.outer) && (_root.shoot == true)) {
count++;
if (count == 1) {
_root.objInMouth = true;
_root.frmObjBeEaten = this.frm;
_root.objScore = this.scr;
_root.objQty = this.qty;
if ((_root.objInStomach == true) && (_root.stomachFull == false)) {
_root.movInfo.frogStat.gotoAndPlay("instomach2");
} else {
_root.movInfo.frogStat.gotoAndPlay("inmouth");
}
removeMovieClip(this);
}
}
};
}
function startObj5(obj) {
i = 0;
while (i < nSp) {
do {
cntCSp = 0;
obj.GR = random(27);
j = 0;
while (j < i) {
if (obj.GR != CSp[j]) {
cntCSp = cntCSp + 1;
}
j++;
}
} while (cntCSp != i);
CSp[Number(obj._name.substr(6, 1))] = obj.GR;
i++;
}
obj._x = (obj.GR * 50) + 225;
obj._y = -20;
if (random(2) == 1) {
obj._xscale = 100;
} else {
obj._xscale = -100;
}
obj.attack = false;
obj.Y = 0;
}
function runObj5(obj) {
obj.attack = false;
obj.Y = 0;
obj.onEnterFrame = function () {
if (_root.gamePause == true) {
this.spiderAtt.stop();
}
if (_root.gamePause == false) {
this.spiderAtt.play();
if ((((this._x >= (frogPos - 20)) && (this._x <= (frogPos + 20))) && (this.attack == false)) && (_root.frogDeath == false)) {
this.attack = true;
this.gotoAndStop(2);
}
if (this.spiderAtt.hitPoint.hitTest(_root.frog.hitPoint) && (_root.frogHit == false)) {
_root.hP = _root.hP + -10;
_root.movInfo.HM.effect._xscale = _root.movInfo.HM.meter._xscale;
_root.movInfo.HM.meter._xscale = _root.hP;
_root.movInfo.HM.effect.play();
_root.frogHit = true;
_root.objInMouth = false;
_root.movInfo.frogStat.gotoAndStop(1);
_root.frog.eyes.gotoAndStop("hit");
_root.frog.head.gotoAndStop("hit");
_root.timerBack = setInterval(_root.back, 250);
}
if (this.hitTest(_root.tongue.outer) && (_root.shoot == true)) {
count++;
if (count == 1) {
_root.objInMouth = true;
_root.frmObjBeEaten = this.frm;
_root.objScore = this.scr;
_root.objQty = this.qty;
if ((_root.objInStomach == true) && (_root.stomachFull == false)) {
_root.movInfo.frogStat.gotoAndPlay("instomach2");
} else {
_root.movInfo.frogStat.gotoAndPlay("inmouth");
}
this.gotoAndPlay("startover");
}
}
i = 1;
while (i <= 5) {
if ((this.hitTest(eval ("_root.objSpit" + i).hitPoint) && (this.hit == false)) && (_root.flame == true)) {
this.hit = true;
countHit++;
_root.totScore = _root.totScore + 10;
_root.movInfo.score.text = _root.totScore;
attachMovie("HOP10", "HOP10" + countHit, 950 + countHit);
this._y = eval ("_root.objSpit" + i)._y;
eval ("HOP10" + countHit)._x = this._x;
eval ("HOP10" + countHit)._y = this._y;
removeMovieClip(eval ("_root.objSpit" + i));
this.gotoAndPlay("burn");
this.Y = 10;
} else if ((this.hitTest(eval ("_root.objSpit" + i).hitPoint) && (this.hit == false)) && (_root.flame == false)) {
this.hit = true;
countHit++;
_root.totScore = _root.totScore + 10;
_root.movInfo.score.text = _root.totScore;
attachMovie("HOP10", "HOP10" + countHit, 950 + countHit);
this._y = eval ("_root.objSpit" + i)._y;
eval ("HOP10" + countHit)._x = this._x;
eval ("HOP10" + countHit)._y = this._y;
this.gotoAndPlay("hit");
this.Y = 10;
}
i++;
}
if (this._y > 340) {
this.Y = 0;
}
this._y = this._y + this.Y;
}
};
}
var frogPos = 875;
var rnd;
var count = 0;
var objElsePos;
var countHit = 0;
var nCr;
var nBa;
var nMo;
var nSp;
var nSn;
var nMR;
if (_root.gameLevel == 1) {
nCr = 1;
nBa = 2;
nMo = 8;
nSp = 3;
nSn = 1;
nMR = 5;
} else if (_root.gameLevel == 2) {
nCr = 1;
nBa = 2;
nMo = 8;
nSp = 3;
nSn = 1;
nMR = 5;
} else if (_root.gameLevel == 3) {
nCr = 1;
nBa = 2;
nMo = 10;
nSp = 3;
nSn = 1;
nMR = 5;
} else if (_root.gameLevel == 4) {
nCr = 1;
nBa = 2;
nMo = 10;
nSp = 4;
nSn = 1;
nMR = 5;
} else if (_root.gameLevel == 5) {
nCr = 1;
nBa = 3;
nMo = 12;
nSp = 4;
nSn = 1;
nMR = 5;
} else {
nCr = 1;
nBa = 3;
nMo = 12;
nSp = 4;
nSn = 1;
nMR = 5;
}
var CSp = new Array();
CSp[0] = random(27);
i = 1;
while (i < nSp) {
do {
cntCSp = 0;
CSp[i] = random(27);
j = 0;
while (j < i) {
if (CSp[i] != CSp[j]) {
cntCSp = cntCSp + 1;
}
j++;
}
} while (cntCSp != i);
i++;
}
var CMR = new Array();
CMR[0] = random(28);
i = 1;
while (i < nMR) {
do {
cntCMR = 0;
CMR[i] = random(28);
j = 0;
while (j < i) {
if (CMR[i] != CMR[j]) {
cntCMR = cntCMR + 1;
}
j++;
}
} while (cntCMR != i);
i++;
}
createObjects();
stop();