Frame 1
_root.girlmc.removeMovieClip();
Frame 2
stop();
_root.girlmc.removeMovieClip();
_root.combo_msg._visible = false;
var AppName = "pest";
var hasLoaded = true;
var bolehMain = false;
_quality = "MEDIUM";
stopAllSounds();
Frame 6
function SpawnerLoop() {
if (PestArray[idxPest] != null) {
if (getTimer() > (_root.timeLevelStart + PestArray[idxPest])) {
var _local2 = 3;
if (PestArray[idxPest + 2] < 4) {
_local2 = Math.floor(PestArray[idxPest + 2] / 2);
}
switch (PestArray[idxPest + 1]) {
case 0 :
attachMovie("mouseMove", "pest" + JumPest, getValidDepth(100 + (JumPest * 3)));
_root["pest" + JumPest].Spawn(PestArray[idxPest + 3], PestArray[idxPest + 2], _local2);
break;
case 1 :
attachMovie("mouseJump", "pest" + JumPest, getValidDepth(100 + (JumPest * 3)));
_root["pest" + JumPest].Spawn(PestArray[idxPest + 3], PestArray[idxPest + 2], _local2);
break;
case 2 :
attachMovie("laba2turun", "pest" + JumPest, getValidDepth(100 + (JumPest * 3)));
_root["pest" + JumPest].Spawn(PestArray[idxPest + 3], PestArray[idxPest + 2], 0);
break;
case 3 :
attachMovie("laba2swing", "pest" + JumPest, getValidDepth(100 + (JumPest * 3)));
_root["pest" + JumPest].Spawn(PestArray[idxPest + 3], PestArray[idxPest + 2], 0);
}
JumPest++;
idxPest = idxPest + 4;
}
}
}
function CheckHitAll() {
var _local2 = 0;
while (_local2 < JumPest) {
if (_root["pest" + _local2] != undefined) {
if (_root.girlmc.HitBox.hitTest(_root["pest" + _local2].BBox) && (_root["pest" + _local2].state != 1)) {
_root["pest" + _local2].Crushed();
addPoint(CalculateScore(100), _root["pest" + _local2]._x, _root["pest" + _local2]._y);
}
if ((((Player.state == "MovDown") || ((Player.state == "MovUp") && (Player.scoreBuffer > 0))) && (_root.girlmc.StompBox.hitTest(_root["pest" + _local2].BBox))) && (_root["pest" + _local2].state != 1)) {
_root["pest" + _local2].Crushed();
Player.Jump(true);
addPoint(CalculateScore(50), _root["pest" + _local2]._x, _root["pest" + _local2]._y);
}
if (((!_root.Player.blinkingLock) && (_root.Player.state != "Hit")) && (_root.girlmc.BodyBox.hitTest(_root["pest" + _local2].BBox))) {
_root.Player.Hit();
}
}
_local2++;
}
}
function UpdateAllPest() {
masihada = false;
var _local2 = 0;
while (_local2 < JumPest) {
if (_root["pest" + _local2] != undefined) {
_root["pest" + _local2].UpdateFrame();
masihada = true;
}
_local2++;
}
if ((((!masihada) && (PestArray[idxPest] == null)) && (JumPest > 0)) && (Player.life > 0)) {
currLevel++;
Player.Win();
if (currLevel < 10) {
_root.gotoAndPlay("startLevel");
} else {
_root.gotoAndPlay("finishLevel");
}
}
}
function deleteALL() {
var _local2 = 0;
while (_local2 < JumPest) {
if (_root["pest" + _local2] != undefined) {
_root["pest" + _local2].removeMovieClip();
}
_local2++;
}
_root.pointPlayer_mc.removeMovieClip();
}
function InitLevel(level) {
var _local3 = 0;
var _local5 = 0;
var _local6 = 0;
while (LevelData[level][_local3] != undefined) {
j = 0;
while (j < LevelData[level][_local3].count) {
PestArray[_local5] = (LevelData[level][_local3].tSpawn * 1000) + (j * LevelData[level][_local3].tSpawnSpace);
PestArray[_local5 + 1] = LevelData[level][_local3].tipe;
PestArray[_local5 + 2] = LevelData[level][_local3].idxSpawnPlace;
PestArray[_local5 + 3] = LevelData[level][_local3].speed;
_local5 = _local5 + 4;
_local6++;
j++;
}
_local3++;
}
PestArray[_local5] = null;
var _local7;
var _local1;
_local7 = 0;
while (_local7 < _local6) {
_local1 = 0;
while (_local1 < ((_local6 - _local7) - 1)) {
if (PestArray[_local1 * 4] > PestArray[(_local1 + 1) * 4]) {
var _local2;
_local2 = PestArray[_local1 * 4];
PestArray[_local1 * 4] = PestArray[(_local1 + 1) * 4];
PestArray[(_local1 + 1) * 4] = _local2;
_local2 = PestArray[(_local1 * 4) + 1];
PestArray[(_local1 * 4) + 1] = PestArray[((_local1 + 1) * 4) + 1];
PestArray[((_local1 + 1) * 4) + 1] = _local2;
_local2 = PestArray[(_local1 * 4) + 2];
PestArray[(_local1 * 4) + 2] = PestArray[((_local1 + 1) * 4) + 2];
PestArray[((_local1 + 1) * 4) + 2] = _local2;
_local2 = PestArray[(_local1 * 4) + 3];
PestArray[(_local1 * 4) + 3] = PestArray[((_local1 + 1) * 4) + 3];
PestArray[((_local1 + 1) * 4) + 3] = _local2;
}
_local1++;
}
_local7++;
}
}
function getValidDepth(newDepth) {
var _local2 = newDepth;
while (_root.getInstanceAtDepth(_local2) != undefined) {
_local2++;
}
return(_local2);
}
function LeapingBonus() {
_root.msgLeapBonus_mc._visible = true;
_root.msgLeapBonus_mc.play();
_root.playerScore = _root.playerScore + 1000;
_root.UpdatePoint();
}
function validate(str) {
var _local1 = str;
var _local2 = "";
var _local3 = _local1.length % 3;
_local2 = _local1.substring(0, _local3);
_local1 = _local1.substring(_local3, _local1.length);
while (_local1.length > 0) {
if (_local2.length != 0) {
_local2 = _local2 + ",";
}
_local2 = _local2 + _local1.substring(0, 3);
_local1 = _local1.substring(3, _local1.length);
}
return(_local2);
}
function UpdatePoint() {
_root.pointPlayer_mc.textbg.text = validate(_root.playerScore.toString(10));
_root.pointPlayer_mc.textfg.text = validate(_root.playerScore.toString(10));
}
function GameOver() {
_root.gotoAndStop("gameover");
}
function UpdateLifeIcon() {
i = 1;
while (i <= (5 - Player.life)) {
_root["lifeicon" + i]._visible = false;
i++;
}
}
function UpdateLifeIconAdd() {
i = 5;
while (i >= (5 - Player.life)) {
_root["lifeicon" + i]._visible = true;
i--;
}
}
function CalculateScore(scr) {
scoreNow = Player.scoreBuffer + scr;
if (Player.scoreBuffer > 0) {
_root.combo_msg._visible = true;
_root.combo_msg.bg._visible = true;
_root.combo_msg.fg._visible = true;
Player.comboBuffer++;
_root.combo_msg.bg.text = Player.comboBuffer + 1;
_root.combo_msg.fg.text = Player.comboBuffer + 1;
if (((Player.comboBuffer + 1) % 10) == 0) {
_root.msgComboBonus_mc._visible = true;
_root.msgComboBonus_mc.play();
_root.playerScore = _root.playerScore + 5000;
_root.UpdatePoint();
}
}
Player.scoreBuffer = scoreNow;
return(scoreNow);
}
function addPoint(point_, x_, y_) {
_root.playerScore = _root.playerScore + point_;
if (_root.playerScore < 0) {
_root.playerScore = 0;
}
_root.attachMovie("point", "point" + random(200), 100000 + random(4000), {point:point_, x:x_, y:y_});
_root.UpdatePoint();
}
function InitSound(nameInst) {
soundArr[nameInst] = new Sound();
soundArr[nameInst].attachSound(nameInst);
}
function DeleteAllSound() {
i = 0;
while (i < soundArr.length) {
delete soundArr[i];
i++;
}
}
function PlaySound(nameInst, noloop) {
if (_root.bolehsound) {
soundArr[nameInst].start(0, noloop);
}
}
function StopSound(nameInst) {
soundArr[nameInst].stop();
}
function SetSoundVolume(nameInst, vol) {
soundArr[nameInst].setVolume(vol);
}
var PestArray;
var Player;
var lastSpace = false;
delete Player;
Player = new CGirl();
var playerScore = 0;
var lifeLost = 0;
var JumMouseActive = 0;
var JumSpiderActive = 0;
var currLevel = 0;
var JumPest = 0;
var idxPest = 0;
var timeLevelStart = 0;
var LastMouseCreated = 0;
var LastSpiderCreated = 0;
var JumPest = 0;
var JumMouse = 0;
var JumSpider = 0;
var MOUSEHORZ = 0;
var MOUSEJUMP = 1;
var SPIDERDOWN = 2;
var SPIDERSWING = 3;
var LevelData = new Array();
LevelData[0] = new Array();
LevelData[0][0] = new CSpawnData(2, 2000, MOUSEHORZ, 0, 0, 4);
LevelData[0][1] = new CSpawnData(8, 2000, MOUSEHORZ, 0, 3, 4);
LevelData[0][2] = new CSpawnData(16, 3500, MOUSEJUMP, 0, 1, 4);
LevelData[0][3] = new CSpawnData(20, 3500, MOUSEJUMP, 0, 2, 4);
LevelData[0][4] = new CSpawnData(42, 3000, MOUSEHORZ, 1, 0, 5);
LevelData[0][5] = new CSpawnData(45, 3000, MOUSEHORZ, 1, 3, 5);
LevelData[0][6] = new CSpawnData(35, 20000, SPIDERDOWN, 0, 0, 1);
LevelData[0][7] = new CSpawnData(47, 20000, SPIDERDOWN, 0, 1, 1);
LevelData[0][8] = new CSpawnData(35, 20000, SPIDERDOWN, 0, 2, 1);
LevelData[0][9] = new CSpawnData(47, 20000, SPIDERDOWN, 0, 3, 1);
LevelData[0][10] = new CSpawnData(35, 20000, SPIDERDOWN, 0, 4, 1);
LevelData[0][11] = new CSpawnData(47, 20000, SPIDERDOWN, 0, 5, 1);
LevelData[0][12] = new CSpawnData(35, 20000, SPIDERDOWN, 0, 6, 1);
LevelData[1] = new Array();
LevelData[1][0] = new CSpawnData(2, 1500, MOUSEHORZ, 0, 0, 10);
LevelData[1][1] = new CSpawnData(5, 1500, MOUSEHORZ, 0, 3, 10);
LevelData[1][2] = new CSpawnData(22, 3500, MOUSEJUMP, 1, 2, 14);
LevelData[1][3] = new CSpawnData(23, 3500, MOUSEJUMP, 1, 1, 14);
LevelData[1][4] = new CSpawnData(25, 3500, MOUSEJUMP, 1, 0, 12);
LevelData[1][5] = new CSpawnData(27, 3500, MOUSEJUMP, 1, 3, 12);
LevelData[1][6] = new CSpawnData(50, 2000, MOUSEHORZ, 1, 0, 8);
LevelData[1][7] = new CSpawnData(51, 2000, MOUSEHORZ, 1, 3, 8);
LevelData[2] = new Array();
LevelData[2][0] = new CSpawnData(2, 8000, SPIDERDOWN, 1, 0, 3);
LevelData[2][1] = new CSpawnData(3, 8000, SPIDERDOWN, 1, 1, 3);
LevelData[2][2] = new CSpawnData(4, 8000, SPIDERDOWN, 1, 2, 3);
LevelData[2][3] = new CSpawnData(5, 8000, SPIDERDOWN, 1, 3, 3);
LevelData[2][4] = new CSpawnData(6, 8000, SPIDERDOWN, 1, 4, 3);
LevelData[2][5] = new CSpawnData(7, 8000, SPIDERDOWN, 1, 5, 3);
LevelData[2][6] = new CSpawnData(8, 8000, SPIDERDOWN, 1, 6, 3);
LevelData[2][7] = new CSpawnData(26, 8000, SPIDERDOWN, 1, 6, 3);
LevelData[2][8] = new CSpawnData(27, 8000, SPIDERDOWN, 1, 5, 3);
LevelData[2][9] = new CSpawnData(28, 8000, SPIDERDOWN, 1, 4, 3);
LevelData[2][10] = new CSpawnData(29, 8000, SPIDERDOWN, 1, 3, 3);
LevelData[2][11] = new CSpawnData(30, 8000, SPIDERDOWN, 1, 2, 3);
LevelData[2][12] = new CSpawnData(31, 8000, SPIDERDOWN, 1, 1, 3);
LevelData[2][13] = new CSpawnData(32, 8000, SPIDERDOWN, 1, 0, 3);
LevelData[2][14] = new CSpawnData(50, 800, MOUSEHORZ, 2, 0, 5);
LevelData[2][15] = new CSpawnData(55, 800, MOUSEHORZ, 2, 3, 5);
LevelData[2][16] = new CSpawnData(10, 2000, MOUSEHORZ, 2, 0, 10);
LevelData[2][17] = new CSpawnData(30, 2000, MOUSEHORZ, 2, 3, 10);
LevelData[3] = new Array();
LevelData[3][0] = new CSpawnData(9, 700, MOUSEJUMP, 2, 3, 10);
LevelData[3][1] = new CSpawnData(2, 700, MOUSEJUMP, 2, 0, 10);
LevelData[3][2] = new CSpawnData(16, 700, MOUSEJUMP, 2, 1, 10);
LevelData[3][3] = new CSpawnData(23, 700, MOUSEJUMP, 2, 2, 10);
LevelData[3][4] = new CSpawnData(30, 500, MOUSEHORZ, 3, 0, 10);
LevelData[3][5] = new CSpawnData(33, 500, MOUSEHORZ, 3, 3, 10);
LevelData[3][6] = new CSpawnData(40, 8000, SPIDERDOWN, 2, 0, 3);
LevelData[3][7] = new CSpawnData(43, 8000, SPIDERDOWN, 2, 1, 3);
LevelData[3][8] = new CSpawnData(40, 8000, SPIDERDOWN, 2, 2, 3);
LevelData[3][9] = new CSpawnData(43, 8000, SPIDERDOWN, 2, 3, 3);
LevelData[3][10] = new CSpawnData(40, 8000, SPIDERDOWN, 2, 4, 3);
LevelData[3][11] = new CSpawnData(43, 8000, SPIDERDOWN, 2, 5, 3);
LevelData[3][12] = new CSpawnData(40, 8000, SPIDERDOWN, 2, 6, 3);
LevelData[4] = new Array();
LevelData[4][0] = new CSpawnData(2, 300, MOUSEHORZ, 3, 0, 6);
LevelData[4][1] = new CSpawnData(4, 300, MOUSEHORZ, 3, 3, 6);
LevelData[4][2] = new CSpawnData(6, 250, MOUSEHORZ, 3, 0, 8);
LevelData[4][3] = new CSpawnData(8, 250, MOUSEHORZ, 3, 3, 10);
LevelData[4][4] = new CSpawnData(12, 8000, SPIDERDOWN, 3, 0, 3);
LevelData[4][5] = new CSpawnData(12, 8000, SPIDERDOWN, 3, 1, 3);
LevelData[4][6] = new CSpawnData(12, 8000, SPIDERDOWN, 3, 2, 3);
LevelData[4][7] = new CSpawnData(15, 4000, SPIDERDOWN, 3, 3, 5);
LevelData[4][8] = new CSpawnData(16, 8000, SPIDERDOWN, 2, 4, 3);
LevelData[4][9] = new CSpawnData(16, 8000, SPIDERDOWN, 2, 5, 3);
LevelData[4][10] = new CSpawnData(16, 8000, SPIDERDOWN, 2, 6, 3);
LevelData[4][11] = new CSpawnData(37, 800, MOUSEJUMP, 3, 1, 10);
LevelData[4][12] = new CSpawnData(38, 800, MOUSEJUMP, 3, 2, 10);
LevelData[4][13] = new CSpawnData(45, 700, MOUSEJUMP, 3, 0, 10);
LevelData[4][14] = new CSpawnData(46, 700, MOUSEJUMP, 3, 3, 10);
LevelData[4][15] = new CSpawnData(59.5, 150, MOUSEHORZ, 6, 0, 2);
LevelData[4][16] = new CSpawnData(59.5, 150, MOUSEHORZ, 6, 3, 2);
LevelData[5] = new Array();
LevelData[5][0] = new CSpawnData(2, 17000, SPIDERDOWN, 3, 0, 3);
LevelData[5][1] = new CSpawnData(4.5, 17000, SPIDERDOWN, 3, 1, 3);
LevelData[5][2] = new CSpawnData(7, 17000, SPIDERDOWN, 3, 2, 3);
LevelData[5][3] = new CSpawnData(9.5, 17000, SPIDERDOWN, 3, 3, 3);
LevelData[5][4] = new CSpawnData(12, 17000, SPIDERDOWN, 3, 4, 3);
LevelData[5][5] = new CSpawnData(14.5, 17000, SPIDERDOWN, 3, 5, 3);
LevelData[5][6] = new CSpawnData(17, 17000, SPIDERDOWN, 3, 6, 3);
LevelData[5][7] = new CSpawnData(2, 17000, SPIDERDOWN, 3, 6, 3);
LevelData[5][8] = new CSpawnData(4.5, 17000, SPIDERDOWN, 3, 5, 3);
LevelData[5][9] = new CSpawnData(7, 17000, SPIDERDOWN, 3, 4, 3);
LevelData[5][10] = new CSpawnData(9.5, 17000, SPIDERDOWN, 3, 3, 3);
LevelData[5][11] = new CSpawnData(12, 17000, SPIDERDOWN, 3, 2, 3);
LevelData[5][12] = new CSpawnData(14.5, 17000, SPIDERDOWN, 3, 1, 3);
LevelData[5][13] = new CSpawnData(17, 17000, SPIDERDOWN, 3, 0, 3);
LevelData[5][14] = new CSpawnData(55, 4000, SPIDERDOWN, 3, 6, 3);
LevelData[5][15] = new CSpawnData(55.2, 4000, SPIDERDOWN, 3, 5, 3);
LevelData[5][16] = new CSpawnData(55, 4000, SPIDERDOWN, 3, 4, 3);
LevelData[5][17] = new CSpawnData(55.2, 4000, SPIDERDOWN, 3, 3, 3);
LevelData[5][18] = new CSpawnData(55, 4000, SPIDERDOWN, 3, 2, 3);
LevelData[5][19] = new CSpawnData(55.2, 4000, SPIDERDOWN, 3, 1, 3);
LevelData[5][20] = new CSpawnData(55, 4000, SPIDERDOWN, 3, 0, 3);
LevelData[5][21] = new CSpawnData(4, 1600, MOUSEHORZ, 4, 0, 30);
LevelData[5][22] = new CSpawnData(5, 1600, MOUSEHORZ, 4, 3, 30);
LevelData[6] = new Array();
LevelData[6][0] = new CSpawnData(2, 600, MOUSEJUMP, 4, 2, 10);
LevelData[6][1] = new CSpawnData(10, 600, MOUSEJUMP, 4, 1, 10);
LevelData[6][2] = new CSpawnData(17, 300, MOUSEJUMP, 4, 3, 20);
LevelData[6][3] = new CSpawnData(25, 300, MOUSEJUMP, 4, 0, 20);
LevelData[6][4] = new CSpawnData(36, 2000, SPIDERDOWN, 4, 0, 5);
LevelData[6][5] = new CSpawnData(36, 2000, SPIDERDOWN, 4, 1, 5);
LevelData[6][6] = new CSpawnData(36, 2000, SPIDERDOWN, 4, 2, 5);
LevelData[6][7] = new CSpawnData(36, 2000, SPIDERDOWN, 4, 3, 5);
LevelData[6][8] = new CSpawnData(36, 2000, SPIDERDOWN, 4, 4, 5);
LevelData[6][9] = new CSpawnData(36, 2000, SPIDERDOWN, 4, 5, 5);
LevelData[6][10] = new CSpawnData(36, 2000, SPIDERDOWN, 4, 6, 5);
LevelData[6][11] = new CSpawnData(47, 200, MOUSEHORZ, 4, 0, 3);
LevelData[6][12] = new CSpawnData(49, 200, MOUSEHORZ, 4, 3, 3);
LevelData[6][12] = new CSpawnData(51, 200, MOUSEHORZ, 4, 0, 3);
LevelData[6][13] = new CSpawnData(53, 200, MOUSEHORZ, 4, 3, 3);
LevelData[6][14] = new CSpawnData(55, 200, MOUSEHORZ, 4, 0, 4);
LevelData[6][15] = new CSpawnData(57, 200, MOUSEHORZ, 4, 3, 4);
LevelData[6][16] = new CSpawnData(59, 200, MOUSEHORZ, 4, 0, 4);
LevelData[6][17] = new CSpawnData(61, 200, MOUSEHORZ, 4, 3, 4);
LevelData[6][18] = new CSpawnData(63, 200, MOUSEHORZ, 4, 0, 5);
LevelData[6][19] = new CSpawnData(65, 200, MOUSEHORZ, 4, 3, 5);
LevelData[6][20] = new CSpawnData(67, 200, MOUSEHORZ, 4, 0, 5);
LevelData[6][21] = new CSpawnData(69, 200, MOUSEHORZ, 4, 3, 5);
LevelData[7] = new Array();
LevelData[7][0] = new CSpawnData(4, 6000, SPIDERDOWN, 4, 0, 3);
LevelData[7][1] = new CSpawnData(4, 6000, SPIDERDOWN, 4, 1, 3);
LevelData[7][2] = new CSpawnData(3, 6000, SPIDERDOWN, 4, 2, 3);
LevelData[7][3] = new CSpawnData(3, 6000, SPIDERDOWN, 4, 3, 3);
LevelData[7][4] = new CSpawnData(2, 6000, SPIDERDOWN, 4, 4, 3);
LevelData[7][5] = new CSpawnData(2, 6000, SPIDERDOWN, 4, 5, 3);
LevelData[7][6] = new CSpawnData(2, 6000, SPIDERDOWN, 4, 6, 3);
LevelData[7][7] = new CSpawnData(18, 300, MOUSEJUMP, 5, 2, 3);
LevelData[7][8] = new CSpawnData(22, 300, MOUSEJUMP, 5, 1, 3);
LevelData[7][9] = new CSpawnData(26, 300, MOUSEJUMP, 5, 2, 3);
LevelData[7][10] = new CSpawnData(29, 300, MOUSEJUMP, 5, 1, 3);
LevelData[7][11] = new CSpawnData(33, 200, MOUSEJUMP, 5, 2, 4);
LevelData[7][12] = new CSpawnData(36, 200, MOUSEJUMP, 5, 1, 4);
LevelData[7][13] = new CSpawnData(39, 200, MOUSEJUMP, 5, 2, 4);
LevelData[7][14] = new CSpawnData(42, 200, MOUSEJUMP, 5, 1, 4);
LevelData[7][15] = new CSpawnData(45, 150, MOUSEJUMP, 5, 2, 5);
LevelData[7][16] = new CSpawnData(47, 150, MOUSEJUMP, 5, 1, 5);
LevelData[7][17] = new CSpawnData(49, 150, MOUSEJUMP, 5, 2, 5);
LevelData[7][18] = new CSpawnData(51, 150, MOUSEJUMP, 5, 1, 5);
LevelData[7][19] = new CSpawnData(55, 200, MOUSEHORZ, 4, 0, 6);
LevelData[7][20] = new CSpawnData(57, 200, MOUSEHORZ, 4, 3, 6);
LevelData[7][21] = new CSpawnData(59, 200, MOUSEHORZ, 4, 0, 6);
LevelData[7][22] = new CSpawnData(61, 200, MOUSEHORZ, 4, 3, 6);
LevelData[7][23] = new CSpawnData(63, 200, MOUSEHORZ, 4, 0, 10);
LevelData[7][24] = new CSpawnData(65, 200, MOUSEHORZ, 4, 3, 10);
LevelData[7][25] = new CSpawnData(67, 200, MOUSEHORZ, 4, 0, 10);
LevelData[7][26] = new CSpawnData(69, 200, MOUSEHORZ, 4, 3, 10);
LevelData[8] = new Array();
LevelData[8][0] = new CSpawnData(2, 400, MOUSEJUMP, 5, 2, 20);
LevelData[8][1] = new CSpawnData(2.4, 400, MOUSEJUMP, 5, 1, 20);
LevelData[8][2] = new CSpawnData(13, 300, MOUSEHORZ, 4, 0, 10);
LevelData[8][3] = new CSpawnData(13, 300, MOUSEHORZ, 4, 3, 10);
LevelData[8][4] = new CSpawnData(17, 300, MOUSEHORZ, 4, 0, 15);
LevelData[8][5] = new CSpawnData(17.3, 300, MOUSEHORZ, 4, 3, 15);
LevelData[8][6] = new CSpawnData(22, 1200, MOUSEJUMP, 5, 0, 20);
LevelData[8][7] = new CSpawnData(22.4, 1200, MOUSEJUMP, 5, 3, 20);
LevelData[8][8] = new CSpawnData(23, 6000, SPIDERDOWN, 4, 0, 6);
LevelData[8][9] = new CSpawnData(24, 6000, SPIDERDOWN, 4, 1, 6);
LevelData[8][10] = new CSpawnData(25, 6000, SPIDERDOWN, 4, 2, 6);
LevelData[8][11] = new CSpawnData(26, 4000, SPIDERDOWN, 4, 3, 8);
LevelData[8][12] = new CSpawnData(25, 6000, SPIDERDOWN, 4, 4, 6);
LevelData[8][13] = new CSpawnData(24, 6000, SPIDERDOWN, 4, 5, 6);
LevelData[8][14] = new CSpawnData(23, 6000, SPIDERDOWN, 4, 6, 6);
LevelData[8][15] = new CSpawnData(57, 100, MOUSEHORZ, 5, 0, 15);
LevelData[8][16] = new CSpawnData(61.3, 100, MOUSEHORZ, 5, 3, 15);
LevelData[9] = new Array();
LevelData[9][0] = new CSpawnData(4, 4000, SPIDERDOWN, 5, 6, 9);
LevelData[9][1] = new CSpawnData(4.5, 4000, SPIDERDOWN, 5, 5, 9);
LevelData[9][2] = new CSpawnData(4, 4000, SPIDERDOWN, 5, 4, 9);
LevelData[9][3] = new CSpawnData(4.5, 4000, SPIDERDOWN, 5, 3, 9);
LevelData[9][4] = new CSpawnData(4, 4000, SPIDERDOWN, 5, 2, 9);
LevelData[9][5] = new CSpawnData(4.5, 4000, SPIDERDOWN, 5, 1, 9);
LevelData[9][6] = new CSpawnData(4, 4000, SPIDERDOWN, 5, 0, 9);
LevelData[9][7] = new CSpawnData(12, 300, MOUSEHORZ, 5, 0, 15);
LevelData[9][8] = new CSpawnData(19, 300, MOUSEHORZ, 5, 3, 15);
LevelData[9][9] = new CSpawnData(26, 300, MOUSEHORZ, 5, 0, 15);
LevelData[9][10] = new CSpawnData(33, 300, MOUSEHORZ, 5, 3, 15);
LevelData[9][11] = new CSpawnData(41, 5500, SPIDERDOWN, 5, 0, 6);
LevelData[9][12] = new CSpawnData(42, 5500, SPIDERDOWN, 5, 1, 6);
LevelData[9][13] = new CSpawnData(43, 5500, SPIDERDOWN, 5, 2, 6);
LevelData[9][14] = new CSpawnData(44, 5500, SPIDERDOWN, 5, 3, 6);
LevelData[9][15] = new CSpawnData(45, 5500, SPIDERDOWN, 5, 4, 6);
LevelData[9][16] = new CSpawnData(46, 5500, SPIDERDOWN, 5, 5, 6);
LevelData[9][17] = new CSpawnData(47, 5500, SPIDERDOWN, 5, 6, 6);
LevelData[9][18] = new CSpawnData(48, 300, MOUSEJUMP, 5, 2, 12);
LevelData[9][19] = new CSpawnData(50, 300, MOUSEJUMP, 5, 1, 12);
LevelData[9][20] = new CSpawnData(53, 300, MOUSEJUMP, 5, 2, 6);
LevelData[9][21] = new CSpawnData(55, 300, MOUSEJUMP, 5, 1, 6);
LevelData[9][22] = new CSpawnData(58, 300, MOUSEHORZ, 5, 0, 10);
LevelData[9][23] = new CSpawnData(60, 300, MOUSEHORZ, 5, 3, 10);
LevelData[9][20] = new CSpawnData(63, 300, MOUSEJUMP, 5, 2, 4);
LevelData[9][21] = new CSpawnData(65, 300, MOUSEJUMP, 5, 1, 4);
LevelData[9][22] = new CSpawnData(66, 300, MOUSEHORZ, 5, 0, 5);
LevelData[9][23] = new CSpawnData(67, 300, MOUSEHORZ, 5, 3, 5);
LevelData[9][24] = new CSpawnData(69, 300, MOUSEJUMP, 5, 2, 4);
LevelData[9][25] = new CSpawnData(70, 300, MOUSEJUMP, 5, 1, 4);
LevelData[9][26] = new CSpawnData(73, 300, MOUSEHORZ, 5, 0, 5);
LevelData[9][27] = new CSpawnData(74, 300, MOUSEHORZ, 5, 3, 5);
var soundArr;
var bolehsound = true;
soundArr = new Array();
InitSound("boink");
InitSound("thud");
InitSound("swish");
InitSound("gantilevel");
InitSound("kena");
attachMovie("Score", "pointPlayer_mc", 100000);
pointPlayer_mc._x = 195;
pointPlayer_mc._y = 48;
Frame 7
delete PestArray;
PestArray = new Array();
var second = 0;
JumPest = 0;
idxPest = 0;
timeLevelStart = getTimer();
InitLevel(currLevel);
if (!_root.bolehsound) {
stopAllSounds();
}
combo_msg._visible = false;
msgComboBonus_mc._visible = false;
msgLeapBonus_mc._visible = false;
_root.msgLevel_mc._visible = true;
PlaySound("gantilevel", 1);
_root.msgLevel_mc.msg.fg.text = currLevel + 1;
_root.msgLevel_mc.msg1.fg.text = currLevel + 1;
attachMovie("combo", "combo_msg", 100100);
combo_msg._visible = false;
combo_msg._x = 100;
combo_msg._y = 100;
combo_msg._xscale = 60;
combo_msg._yscale = 60;
Frame 8
_root.msgLevel_mc.play();
stop();
UpdateLifeIcon();
timeBef = getTimer();
var fps = 0;
onEnterFrame = function () {
if (msgLeapBonus._visible) {
msgLeapBonus.play();
}
second = Math.floor((getTimer() - timeLevelStart) / 1000);
fps = Math.round(1000 / (getTimer() - timeBef));
timeBef = getTimer();
if (Player.state != "Hit") {
if (Key.isDown(32) && (!lastSpace)) {
Player.Punch();
PlaySound("swish", 1);
lastSpace = true;
}
if (!Key.isDown(32)) {
lastSpace = false;
}
if (Key.isDown(40)) {
Player.Duck();
}
if (Key.isDown(37)) {
Player.MoveLeft();
}
if (Key.isDown(39)) {
Player.MoveRight();
}
if (Key.isDown(38)) {
Player.Jump(false);
}
if ((((!Key.isDown(39)) && (!Key.isDown(37))) && (!Key.isDown(40))) && (!Key.isDown(32))) {
Player.Idle();
lastSpace = false;
}
}
Player.UpdateFrame();
SpawnerLoop();
UpdateAllPest();
CheckHitAll();
UpdatePoint();
};
Frame 9
stop();
Player.Died();
delete LevelData;
onEnterFrame = function () {
Player.UpdateFrame();
UpdateAllPest();
};
onData = function () {
highscore_mc.gotoAndPlay("highscore");
_root.girlmc.swapDepths(_root.highscore_mc);
};
Instance of Symbol 237 MovieClip "highscore_mc" in Frame 9
onClipEvent (data) {
this.swapDepths(_root.girlmc);
this.gotoAndPlay("highscore");
}
Frame 10
stop();
delete LevelData;
onEnterFrame = function () {
Player.UpdateFrame();
};
onData = function () {
highscore_mc.gotoAndPlay("highscore");
_root.girlmc.swapDepths(_root.highscore_mc);
};
Symbol 14 MovieClip [point] Frame 1
var point;
var x;
var y;
text1.textbg.text = point.toString(10);
text1.textfg.text = point.toString(10);
this._x = x;
this._y = y;
Symbol 14 MovieClip [point] Frame 16
this.removeMovieClip();
Symbol 25 MovieClip [mouseMove] Frame 1
#initclip 10
Object.registerClass("mouseMove", CMouseMove);
#endinitclip
stop();
Symbol 25 MovieClip [mouseMove] Frame 5
stop();
Symbol 25 MovieClip [mouseMove] Frame 10
_root.PlaySound("thud");
gotoAndPlay (11);
Symbol 25 MovieClip [mouseMove] Frame 25
_root[this._name].removeMovieClip();
Symbol 25 MovieClip [mouseMove] Frame 26
_root.PlaySound("thud");
gotoAndPlay (27);
Symbol 25 MovieClip [mouseMove] Frame 41
_root[this._name].removeMovieClip();
Symbol 29 MovieClip [mouseJump] Frame 1
#initclip 8
Object.registerClass("mouseJump", CMouseJump);
#endinitclip
stop();
Symbol 29 MovieClip [mouseJump] Frame 6
stop();
Symbol 29 MovieClip [mouseJump] Frame 11
stop();
Symbol 29 MovieClip [mouseJump] Frame 16
stop();
Symbol 29 MovieClip [mouseJump] Frame 21
stop();
Symbol 29 MovieClip [mouseJump] Frame 26
stop();
Symbol 29 MovieClip [mouseJump] Frame 31
_root.PlaySound("thud");
gotoAndPlay (32);
Symbol 29 MovieClip [mouseJump] Frame 46
_root[this._name].removeMovieClip();
Symbol 29 MovieClip [mouseJump] Frame 47
_root.PlaySound("thud");
gotoAndPlay (48);
Symbol 29 MovieClip [mouseJump] Frame 62
_root[this._name].removeMovieClip();
Symbol 36 MovieClip Frame 15
_root.Player.StartBlinking();
Symbol 54 MovieClip [girl] Frame 1
stop();
Symbol 54 MovieClip [girl] Frame 5
stop();
Symbol 54 MovieClip [girl] Frame 10
stop();
Symbol 54 MovieClip [girl] Frame 16
stop();
Symbol 54 MovieClip [girl] Frame 21
stop();
Symbol 54 MovieClip [girl] Frame 30
stop();
_root.Player.animLock = false;
Symbol 54 MovieClip [girl] Frame 31
stop();
Symbol 54 MovieClip [girl] Frame 44
stop();
Symbol 54 MovieClip [girl] Frame 54
stop();
_root.Player.animLock = false;
Symbol 54 MovieClip [girl] Frame 55
stop();
Symbol 54 MovieClip [girl] Frame 104
stop();
_root.Player.animLock = false;
Symbol 54 MovieClip [girl] Frame 105
stop();
Symbol 54 MovieClip [girl] Frame 109
stop();
Symbol 54 MovieClip [girl] Frame 114
stop();
Symbol 54 MovieClip [girl] Frame 120
stop();
Symbol 54 MovieClip [girl] Frame 125
stop();
Symbol 54 MovieClip [girl] Frame 134
stop();
_root.Player.animLock = false;
Symbol 54 MovieClip [girl] Frame 135
stop();
Symbol 54 MovieClip [girl] Frame 149
stop();
Symbol 54 MovieClip [girl] Frame 159
stop();
_root.Player.animLock = false;
Symbol 54 MovieClip [girl] Frame 160
stop();
Symbol 54 MovieClip [girl] Frame 198
stop();
_root.Player.animLock = false;
Symbol 59 MovieClip [laba2turun] Frame 1
#initclip 9
Object.registerClass("laba2turun", CSpiderDown);
#endinitclip
stop();
Symbol 59 MovieClip [laba2turun] Frame 5
_root.PlaySound("thud");
gotoAndPlay (6);
Symbol 59 MovieClip [laba2turun] Frame 17
_root[this._name].removeMovieClip();
Symbol 66 MovieClip [msgLevel] Frame 1
stop();
Symbol 66 MovieClip [msgLevel] Frame 45
_root[this._name]._visible = false;
Symbol 76 Button
on (release) {
_root.play();
}
Symbol 77 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
setProperty(bar, _xscale , PercentLoaded);
} else {
gotoAndStop ("loaded");
}
Symbol 77 MovieClip Frame 2
gotoAndPlay (1);
Symbol 86 Button
on (release) {
getURL ("http://www.iplayallday.com", "_blank");
}
Symbol 248 MovieClip [__Packages.CMouse] Frame 0
class CMouse extends MovieClip
{
var _x, _y, state, dirX, gotoAndPlay;
function CMouse () {
super();
}
function SetPlace(worldX, worldY) {
_x = worldX;
_y = worldY;
}
function Crushed() {
state = 1;
if (dirX == 0) {
gotoAndPlay("splatleft");
} else {
gotoAndPlay("splatright");
}
}
function Spawn(_speed, _spawnplace, _dirX) {
state = 0;
speed = _speed;
dirX = _dirX;
switch (_spawnplace) {
case 0 :
SetPlace(0, 385);
gotoAndPlay("walkleft");
break;
case 1 :
SetPlace(91, 315);
gotoAndPlay("walkleft");
break;
case 2 :
SetPlace(592, 320);
gotoAndPlay("walkright");
break;
case 3 :
SetPlace(700, 385);
gotoAndPlay("walkright");
break;
case 4 :
SetPlace(0, 0);
}
}
var speed = 0;
var bActive = true;
}
Symbol 249 MovieClip [__Packages.CMouseJump] Frame 0
class CMouseJump extends CMouse
{
var state, gotoAndPlay, dirX, speed, _y, _x, removeMovieClip;
function CMouseJump () {
super();
}
function ChangeState(newState) {
state = newState;
if (state == 0) {
gotoAndPlay("walk" + dirX);
timeLastJump = getTimer();
} else if (state == 2) {
gotoAndPlay("jump" + dirX);
countUp = 0;
} else if (state == 3) {
gotoAndPlay("down" + dirX);
countDown = countUp;
}
}
function UpdateFrame() {
if (state == 0) {
if (getTimer() > (timeLastJump + ((5 - speed) * 500))) {
ChangeState(2);
}
} else {
if (state == 2) {
_y = _y - (dy - countUp);
countUp = countUp + 0.8;
if (countUp > 10) {
ChangeState(3);
}
if (dirX == 0) {
_x = _x + 6;
} else {
_x = _x - 6;
}
}
if (state == 3) {
_y = _y + (dy - countDown);
countDown = countDown - 0.8;
if (_y > 385) {
ChangeState(0);
_y = 385;
}
if (dirX == 0) {
_x = _x + 6;
} else {
_x = _x - 6;
}
}
}
if (((_x > 800) || (_x < 0)) && (state == 0)) {
removeMovieClip();
}
}
var timeLastJump = 0;
var countUp = 0;
var countDown = 0;
var dy = 20;
var animLock = false;
}
Symbol 250 MovieClip [__Packages.CSpider] Frame 0
class CSpider extends MovieClip
{
var _x, _y, state, gotoAndPlay, origX, origY, createEmptyMovieClip, getDepth;
function CSpider () {
super();
}
function SetPlace(worldX, worldY) {
_x = worldX;
_y = worldY;
}
function Crushed() {
state = 1;
gotoAndPlay("Splat");
}
function Spawn(_speed, _spawnplace, _dirX) {
state = 0;
speed = _speed;
origX = 55 + (90 * _spawnplace);
origY = -30;
SetPlace(origX, origY);
gotoAndPlay("biasa");
createEmptyMovieClip("web", _root.getValidDepth(getDepth()) + 1);
}
var speed = 0;
var bActive = true;
}
Symbol 251 MovieClip [__Packages.CSpiderDown] Frame 0
class CSpiderDown extends CSpider
{
var state, _y, speed, origY, removeMovieClip, web;
function CSpiderDown () {
super();
}
function UpdateFrame() {
if (state == 0) {
_y = _y + ((speed + 1) * 1.5);
} else if (state == 2) {
_y = _y - ((speed + 1) * 1.5);
}
if ((_y > (310 - random(40))) && (state == 0)) {
state = 2;
}
if ((state == 2) && (_y < origY)) {
removeMovieClip();
}
web.clear();
web.lineStyle(1, 11184810, 100);
web.moveTo(0, origY - _y);
web.lineTo(0, 5);
}
}
Symbol 252 MovieClip [__Packages.CMouseMove] Frame 0
class CMouseMove extends CMouse
{
var state, dirX, _x, speed, removeMovieClip;
function CMouseMove () {
super();
}
function UpdateFrame() {
if (state == 0) {
if (dirX == 0) {
_x = _x + ((speed + 1) * 2);
} else {
_x = _x - ((speed + 1) * 2);
}
if (((_x > 800) || (_x < -80)) && (state == 0)) {
removeMovieClip();
}
}
}
}
Symbol 253 MovieClip [__Packages.CGirl] Frame 0
class CGirl
{
var jumpLock, punchLock, animLock, posX, posY, dx, dy, dir, statebef, state, countUp, countDown;
function CGirl () {
jumpLock = false;
punchLock = false;
animLock = false;
posX = 200;
posY = 380;
dx = 6;
dy = 20;
dir = "left";
_root.attachMovie("girl", "girlmc", 10);
_root.girlmc._x = posX;
_root.girlmc._y = posY;
}
function Hit() {
if (dir == "left") {
_root.girlmc.gotoAndPlay("hit_left");
} else {
_root.girlmc.gotoAndPlay("hit_right");
}
statebef = state;
state = "Hit";
_root.PlaySound("kena", 1);
}
function Win() {
if (dir == "left") {
_root.girlmc.gotoAndPlay("win_left");
} else {
_root.girlmc.gotoAndPlay("win_right");
}
animLock = true;
}
function Died() {
if (dir == "left") {
_root.girlmc.gotoAndPlay("losing_left");
} else {
_root.girlmc.gotoAndPlay("losing_right");
}
animLock = true;
}
function MoveLeft() {
if (((((state != "MovL") && (!jumpLock)) && (!Key.isDown(40))) && (!punchLock)) && (!animLock)) {
_root.girlmc.gotoAndPlay("walk_left");
state = "MovL";
}
dir = "left";
if (state != "Duck") {
_root.girlmc._x = _root.girlmc._x - dx;
}
if (_root.girlmc._x < 50) {
_root.girlmc._x = 50;
}
}
function MoveRight() {
if (((((state != "MovR") && (!jumpLock)) && (!Key.isDown(40))) && (!punchLock)) && (!animLock)) {
_root.girlmc.gotoAndPlay("walk_right");
state = "MovR";
}
dir = "right";
if (state != "Duck") {
_root.girlmc._x = _root.girlmc._x + dx;
}
if (_root.girlmc._x > 650) {
_root.girlmc._x = 650;
}
}
function Idle() {
if ((((((state == "MovL") || (state == "MovR")) || (state == "Duck")) || (state == "Hit")) && (!animLock)) && (life > 0)) {
_root.girlmc.gotoAndPlay("stand_" + dir);
state = "Idle";
_root.combo_msg._visible = false;
scoreBuffer = 0;
comboBuffer = 0;
}
}
function StartBlinking() {
life--;
_root.UpdateLifeIcon();
if (life <= 0) {
_root.gotoAndStop("gameover");
if (_root.girlmc._y < 380) {
state = "MovDown";
animLock = true;
}
} else {
timeStartBlinking = getTimer();
blinkingLock = true;
state = statebef;
}
}
function Duck() {
if (((!jumpLock) && (!animLock)) && (!punchLock)) {
_root.girlmc.gotoAndPlay("duck_" + dir);
state = "Duck";
}
}
function Jump(bypass) {
if (!bypass) {
if (!jumpLock) {
jumpLock = true;
state = "MovUp";
countUp = 0;
_root.PlaySound("boink", 1);
}
} else {
jumpLock = true;
state = "MovUp";
countUp = 0;
_root.PlaySound("boink", 1);
}
}
function Punch() {
if (!punchLock) {
if (!jumpLock) {
_root.girlmc.gotoAndPlay("lowpunch_" + dir);
punchLock = true;
animLock = true;
} else {
_root.girlmc.gotoAndPlay("punchair_" + dir);
punchLock = true;
animLock = true;
}
}
}
function UpdateFrame() {
if (!jumpLock) {
if (_root.girlmc._y < 380) {
var _local3 = _root.girlmc.StompBox.hitTest(_root.TableBox);
if (!_local3) {
jumpLock = true;
state = "MovDown";
}
}
}
if (blinkingLock) {
_root.girlmc._visible = !_root.girlmc._visible;
if (getTimer() > (timeStartBlinking + 1000)) {
blinkingLock = false;
_root.girlmc._visible = true;
}
}
if (jumpLock) {
if (state == "MovUp") {
_root.girlmc._y = _root.girlmc._y - (dy - countUp);
if (!animLock) {
_root.girlmc.gotoAndPlay("jump_" + dir);
}
countUp = countUp + 1;
if (countUp > 11) {
state = "MovDown";
countDown = countUp;
if (_root.girlmc._y < -40) {
_root.LeapingBonus();
}
}
}
if (state == "MovDown") {
_root.girlmc._y = _root.girlmc._y + (dy - countDown);
countDown = countDown - 1;
if (!animLock) {
_root.girlmc.gotoAndPlay("down_" + dir);
}
if (_root.girlmc._y > 380) {
state = "Duck";
_root.girlmc._y = 380;
punchLock = false;
animLock = false;
Idle();
jumpLock = false;
}
if (_root.girlmc.StompBox.hitTest(_root.TableBox)) {
state = "Duck";
_root.girlmc._y = 320;
punchLock = false;
animLock = false;
Idle();
jumpLock = false;
}
}
}
if (punchLock) {
if (!animLock) {
if (!jumpLock) {
punchLock = false;
state = "Duck";
Idle();
}
punchLock = false;
}
}
}
var blinkingLock = false;
var interval = 50;
var life = 5;
var scoreBuffer = 0;
var comboBuffer = 0;
var lastKeyInputTime = 0;
var timeStartBlinking = 0;
}
Symbol 254 MovieClip [__Packages.CSpawnData] Frame 0
class CSpawnData
{
var tSpawn, tSpawnSpace, tipe, speed, idxSpawnPlace, count;
function CSpawnData (t, tsp, tp, speed_, idx, cnt) {
tSpawn = t;
tSpawnSpace = tsp;
tipe = tp;
speed = speed_;
idxSpawnPlace = idx;
count = cnt;
}
}
Symbol 100 Button
on (release) {
_root.play();
}
Symbol 103 Button
on (release) {
_root.helpmc._visible = !_root.helpmc._visible;
}
Symbol 110 Button
on (release) {
gotoAndStop (2);
_root._quality = "HIGH";
_parent.lores.gotoAndStop(1);
_parent.midres.gotoAndStop(1);
}
Symbol 111 MovieClip Frame 1
stop();
Symbol 113 Button
on (release) {
gotoAndStop (2);
_root._quality = "MEDIUM";
_parent.highres.gotoAndStop(1);
_parent.lores.gotoAndStop(1);
}
Symbol 115 MovieClip Frame 1
stop();
Symbol 117 Button
on (release) {
gotoAndStop (2);
_root._quality = "LOW";
_parent.highres.gotoAndStop(1);
_parent.midres.gotoAndStop(1);
}
Symbol 119 MovieClip Frame 1
stop();
Symbol 133 MovieClip Frame 1
this._visible = false;
Symbol 162 MovieClip Frame 1
stop();
Symbol 162 MovieClip Frame 45
_root[this._name]._visible = false;
Symbol 165 MovieClip Frame 1
stop();
Symbol 165 MovieClip Frame 45
this._visible = false;
Symbol 170 Button
on (release) {
gotoAndStop (5);
}
Symbol 175 Button
on (release) {
gotoAndStop (1);
}
Symbol 176 MovieClip Frame 1
stop();
_root.bolehsound = true;
Symbol 176 MovieClip Frame 5
_root.bolehsound = false;
stopAllSounds();
Symbol 179 MovieClip Frame 45
stop();
Symbol 186 Button
on (release) {
_root.deleteALL();
_root.gotoAndPlay(2);
_root.highscore_mc.removeMovieClip();
}
Symbol 187 MovieClip Frame 1
Selection.setFocus("_root.highscore_mc.panel.namaHighScore");
Symbol 236 Button
on (release) {
_root.deleteALL();
_root.gotoAndPlay(1);
_root.highscore_mc.removeMovieClip();
}
Symbol 237 MovieClip Frame 68
stop();
stopAllSounds();
Symbol 237 MovieClip Frame 99
gotoAndPlay ("waitloop");
Symbol 237 MovieClip Frame 110
stop();
Symbol 247 MovieClip Frame 45
stop();