Frame 1
function OnLoadGame() {
_root.attachMovie("nc_life", "onc_life", 950);
_root.o_lif = onc_life;
_root.o_lif._width = Math.floor(_root.o_lif._width / 2);
_root.o_lif._height = Math.floor(_root.o_lif._height / 2);
_root.o_lif._x = 30;
_root.o_lif._y = 100;
_root.attachMovie("backgrnd_upgrd", "e1backgrnd_upgrd", 50);
_root.o_bgr[0] = e1backgrnd_upgrd;
_root.o_bgr[0]._x = 275;
_root.o_bgr[0]._y = -50;
_root.attachMovie("backgrnd_dngrd", "e1backgrnd_dngrd", 51);
_root.o_bgr[1] = e1backgrnd_dngrd;
_root.o_bgr[1]._x = 275;
_root.o_bgr[1]._y = 650;
_root.attachMovie("ic_menu", "no_menu", 1800);
_root.o_mnu = _root.no_menu;
_root.o_mnu._x = 277;
_root.o_mnu._y = 173;
_root.o_mnu.gotoAndStop(2);
_root.attachMovie("ic_pza", "no_pza", 800);
_root.o_pza = _root.no_pza;
_root.o_pza._width = 90;
_root.o_pza._height = 100;
_root.o_pza._x = 175;
_root.o_pza._y = 255;
var t = 0;
while (t < 2) {
_root.attachMovie("pflash", "pflash" + t, 420 + t);
_root.o_fls[t] = eval ("_root.pflash" + t);
_root.o_fls[t]._width = 50;
_root.o_fls[t]._height = 100;
_root.o_fls[t]._x = 50;
_root.o_fls[t]._y = 50;
_root.o_fls[t].gotoAndStop(22);
t++;
}
var t = 0;
while (t < 5) {
_root.attachMovie("cloud", "pcloud" + t, 127 + t);
_root.o_cld[t] = eval ("_root.pcloud" + t);
_root.o_cld[t]._x = Math.floor(Math.random() * 50) + (t * 110);
_root.o_cld[t]._y = 50 - Math.floor(Math.random() * 250);
t++;
}
_root.attachMovie("Score_txt", "nScore_txt", 1700);
_root.o_scr = _root.nScore_txt;
_root.o_scr._x = 480;
_root.o_scr._y = 45;
_root.attachMovie("Score_bs", "nScore_bs", 1701);
_root.o_bs = _root.nScore_bs;
_root.o_bs._x = 85;
_root.o_bs._y = 370;
_root.attachMovie("ramka", "nramka", 2000);
_root.nramka._x = -348;
_root.nramka._y = -332;
_root.attachMovie("key_m", "nkey_m", 1900);
_root.nkey_m._x = 490;
_root.nkey_m._y = 370;
var u = 0;
while (u < 5) {
_root.attachMovie("eg1", "oeg1" + u, 900 + u);
_root.o_egs[u] = eval ("oeg1" + u);
_root.o_egs[u]._x = 575;
_root.o_egs[u]._y = 300;
_root.o_egs[u].gotoAndStop(1);
_root.o_egs[u]._visible = false;
u++;
}
var vt = new Number();
var i = 0;
while (i < 24) {
var j = 0;
while (j < 7) {
_root.attachMovie("ic_elm", ("no_elm" + (i * 7)) + j, 300 - ((i * 7) + j));
_root.o_elm[(i * 7) + j] = eval (("_root.no_elm" + (i * 7)) + j);
_root.o_elm[(i * 7) + j]._x = j * 100;
_root.o_elm[(i * 7) + j]._y = -300 + (i * 50);
vt = Math.floor(Math.random() * 3) + 1;
_root.o_elm[(i * 7) + j].gotoAndStop(vt);
if (i == 12) {
var t = (Math.floor(Math.random() * 3) + 1);
if (t == 2) {
t = 4;
} else {
t = 8;
}
_root.o_elm[(i * 7) + j].gotoAndStop(t);
}
_root.mas_tn[j][i].textura = vt;
if (i < 12) {
_root.o_elm[(i * 7) + j]._visible = false;
_root.mas_tn[j][i].vsb = false;
}
j++;
}
i++;
}
}
function OnTimer() {
if (!_root.o_mnu._visible) {
if (_root.c_pza.st_stop && (_root.c_pza.contin_go == false)) {
return(undefined);
}
y++;
if (y == 100) {
_root.c_game.dif_game++;
y = 0;
var _local3 = 100;
if (_root.c_game.dif_game > 1) {
_local3 = _local3 - Math.round((1 - (1 / _root.c_game.dif_game)) * 100);
}
if (_local3 < 1) {
_local3 = 1;
}
if (_local3 > 3) {
_root.MAX_DX_MOVE = 8;
}
if (_local3 > 7) {
_root.MAX_DX_MOVE = 7;
}
if (_local3 <= 3) {
_root.MAX_DX_MOVE = 9;
}
}
var _local8 = [];
(_local8[0] = new Boolean());
(_local8[1] = new Boolean());
var _local14 = 0;
var _local15 = 0;
_local14 = Math.abs(Math.floor((_root.o_elm[0]._y - (_root.o_pza._y + DX_HEIGTH_PZA)) / 50));
var _local9 = (_root.c_game.now_pza_id + 1) - 1;
if (_local9 > 6) {
_local9 = _local9 - 7;
}
_local8[0] = _local9 + (7 * (_local14 - 1));
_local8[1] = _local9 + (7 * (_local14 - 2));
var _local12 = [];
(_local12[0] = new Boolean());
(nel2[1] = new Boolean());
_local12[0] = _root.o_elm[_local8[0]]._visible;
_local12[1] = _root.o_elm[_local8[1]]._visible;
var _local2 = 0;
while (_local2 < 2) {
if (_local12[_local2]) {
if (_root.o_elm[_local8[_local2]]._x < 190) {
_local12[_local2] = true;
} else {
_local12[_local2] = false;
}
}
_local2++;
}
if ((!_local12[0]) && (!_local12[1])) {
if (!_root.c_pza.collison) {
MoveGridGame(_root.DX_MOVE, 0);
AddSpeedMovePza();
}
if (((_root.o_pza.ecol == true) && (_root.c_pza.id_y >= 12)) || (_root.c_pza.contin_go)) {
_root.o_pza.r_anim = false;
_root.o_pza.ecol = false;
_root.c_pza.collison = false;
MoveGridGame(_root.DX_MOVE, 0);
if (_root.c_pza.contin_go) {
_root.c_pza.st_stop = false;
}
_root.c_pza.contin_go = false;
AddSpeedMovePza();
}
} else if (_root.o_pza.st != "collision") {
GKeyUp(32);
if (!_root.c_pza.collison) {
_root.c_pza.lifes--;
_root.o_lif.gotoAndStop(COUNT_LIFES - _root.c_pza.lifes);
var _local3 = 0;
while (_local3 < 2) {
if (_local12[_local3]) {
_root.o_fls[_local3]._x = _root.o_elm[_local8[_local3]]._x + 14;
_root.o_fls[_local3]._y = _root.o_elm[_local8[_local3]]._y - 25;
_root.o_fls[_local3].gotoAndPlay(1);
}
_local3++;
}
}
var _local16 = "collision" + (Math.floor(Math.random() * 2) + 1);
_root.o_pza.gotoAndPlay(_local16);
_root.c_pza.collison = true;
_root.DX_MOVE = _root.MIN_DX_MOVE;
}
_local2 = 0;
while (_local2 < 5) {
if (_root.egs_use[_local2] == true) {
if (Math.abs(_root.o_egs[_local2]._x - _root.o_pza._x) < 40) {
if (Math.abs(_root.o_egs[_local2]._y - _root.o_pza._y) < 50) {
_root.egs_use[_local2] = false;
var _local4 = _root.o_egs[_local2]._currentframe;
if (_local4 >= 140) {
_local4 = 140;
} else {
_local4 = 0;
}
if ((_root.o_egs[_local2]._currentframe - _local4) <= (COUNT_EGG * 13)) {
if ((_root.DX_MOVE - 1) >= _root.MIN_DX_MOVE) {
_root.DX_MOVE--;
}
if (_local4 == 0) {
_root.c_pza.count_eggs++;
} else {
_root.c_pza.count_eggs = _root.c_pza.count_eggs + 10;
}
_root.o_scr.vscr = _root.c_pza.count_eggs;
_root.o_egs[_local2].gotoAndPlay(120);
} else {
if ((_root.c_pza.lifes + 1) < COUNT_LIFES) {
_root.c_pza.lifes++;
_root.o_lif.gotoAndStop(COUNT_LIFES - _root.c_pza.lifes);
}
_root.o_egs[_local2].gotoAndPlay(120);
}
}
}
}
_local2++;
}
if (_root.o_elm[_root.c_game.id_chng]._x < -130) {
var _local5 = 0;
while (_local5 < 24) {
_root.o_elm[(_local5 * 7) + _root.c_game.id_chng]._x = _root.o_elm[(_local5 * 7) + _root.c_game.id_chng]._x + 700;
_local5++;
}
_root.c_game.id_chng++;
if (_root.c_game.id_chng > 6) {
_root.c_game.id_chng = 0;
}
_root.c_pgrd.count_nowground--;
_root.c_pgrd.last_step++;
_root.SetNextColumnGrid();
}
if ((_root.c_game.st_calc_jump != -1) && (_root.c_pza.falled == false)) {
_root.c_game.st_calc_jump = -1;
}
if ((_root.c_pza.falled == false) && (_root.nowkcode == 32)) {
_root.nowkcode = -1;
}
if (_root.c_game.st_calc_jump == -1) {
var _local6 = 0;
var _local7 = 0;
_local14 = 0;
_local15 = 0;
_local14 = Math.abs(Math.floor((_root.o_elm[0]._y - (_root.o_pza._y + DX_HEIGTH_PZA)) / 50));
_local6 = _root.c_game.now_pza_id - 1;
_local7 = _root.c_game.now_pza_id;
if (_local6 < 0) {
_local6 = _local6 + 7;
}
_local7 = _local7 + (7 * _local14);
_local6 = _local6 + (7 * _local14);
var _local11 = 0;
_local11 = Math.floor(50 * (((_root.o_elm[_local14]._y - (_root.o_pza._y + DX_HEIGTH_PZA)) / 50) - Math.floor((_root.o_elm[_local14]._y - (_root.o_pza._y + DX_HEIGTH_PZA)) / 50)));
if (_root.c_pza.id_y < 0) {
_root.c_pza.id_y = 0;
}
var _local10 = _root.c_pza.val_dy[_root.c_pza.id_y];
_root.c_pza.id_y--;
if (_local11 == 0) {
_local12 = new Boolean();
_local12 = _root.o_elm[_local7]._visible;
if (_local12 && (_root.o_elm[_local7]._x > 184)) {
_local12 = false;
}
var _local17 = (!_root.o_elm[_local6]._visible) && (_root.c_pza.collison);
if (((!_root.o_elm[_local6]._visible) && (!_local12)) || (_local17)) {
MoveGridGame(0, -_local10);
if (!_root.c_pza.collison) {
_root.o_pza.gotoAndStop("fall" + _root.o_pza.lj);
}
_root.c_pza.falled = false;
} else {
_root.c_pza.id_y = 0;
if ((_root.o_pza.st != "go_left") && (!_root.c_pza.collison)) {
_root.o_pza.gotoAndPlay("go_left");
}
_root.c_pza.falled = true;
}
} else if (_local11 >= _local10) {
MoveGridGame(0, -_local10);
if (!_root.c_pza.collison) {
_root.o_pza.gotoAndStop("fall" + _root.o_pza.lj);
}
_root.c_pza.falled = false;
} else {
_local12 = new Boolean();
_local12 = _root.o_elm[_local7]._visible;
if (_local12 && (_root.o_elm[_local7]._x > 184)) {
_local12 = false;
}
if ((!_root.o_elm[_local6]._visible) && (!_local12)) {
MoveGridGame(0, -_local10);
_root.c_pza.falled = false;
} else {
MoveGridGame(0, -_local11);
_root.c_pza.id_y = 0;
_root.c_pza.falled = true;
}
}
}
var _local13 = _root.c_game.id_chng + 2;
if (_local13 > 6) {
_local13 = _local13 - 7;
}
if ((_local13 == _root.c_game.now_pza_id) && (_root.o_elm[_root.c_game.id_chng]._x < -32)) {
_root.c_game.now_pza_id++;
if (_root.c_game.now_pza_id > 6) {
_root.c_game.now_pza_id = 0;
}
}
if (_root.nowkcode == 32) {
if (_root.c_pza.id_y < 23) {
if ((_root.o_pza._currentframe != 24) && (_root.o_pza._currentframe != 26)) {
_root.o_pza.gotoAndStop("jump" + (Math.floor(Math.random() * 2) + 1));
}
_local14 = 0;
_local14 = Math.abs(Math.floor((_root.o_elm[0]._y - (_root.o_pza._y + DX_HEIGTH_PZA)) / 50));
_local8 = _root.c_game.now_pza_id - 1;
if (_local8 < 0) {
_local8 = _local8 + 7;
}
_local8 = _local8 + (7 * (_local14 - 3));
_local12 = new Boolean();
_local12 = _root.o_elm[_local8]._visible;
if (!_local12) {
_root.c_pza.id_y++;
_root.c_game.st_calc_jump++;
MoveGridGame(0, _root.c_pza.val_dy[_root.c_pza.id_y]);
}
if ((_root.c_pza.id_y == 23) || (_local12)) {
asd = "upKey" + Math.floor(Math.random() * 30);
GKeyUp(32);
_root.c_pza.id_y = 16;
_root.c_game.st_calc_jump = -1;
_root.c_pza.falled = false;
_root.nowkcode = -1;
}
}
}
}
}
function MouseClickP(x, y) {
}
function GKeyPressed(kcode) {
if (kcode != 32) {
return(undefined);
}
if ((_root._xmouse > 461) && (_root._ymouse > 347)) {
return(undefined);
}
if ((_root.o_pza.st == "collision") && (_root.o_pza.ecol == false)) {
return(undefined);
}
if (_root.c_pza.st_stop) {
if (_root.o_pza.ecol == true) {
_root.c_pza.st_stop = false;
_root.o_pza.ecol = true;
}
}
if (_root.c_pza.falled) {
if (kcode == 32) {
_root.nowkcode = 32;
} else {
_root.nowkcode = -1;
}
}
}
function GKeyUp(kcode) {
if (kcode != 32) {
return(undefined);
}
if (_root.o_pza.r_anim) {
return(undefined);
}
if (_root.o_pza.ecol == true) {
return(undefined);
}
if (kcode == 32) {
if (_root.c_pza.falled) {
_root.c_pza.id_y = 16;
_root.c_game.st_calc_jump = -1;
}
}
_root.nowkcode = -1;
}
function SetRandPlanks() {
var _local2 = [];
var _local5 = 0;
while (_local5 < 2) {
_local2[_local5] = new Number();
_local5++;
}
var _local4 = 0;
while (_local4 < 3) {
do {
_local2[0] = Math.floor(Math.random() * 5);
} while (_local2[0] == 0);
do {
_local2[1] = Math.floor(Math.random() * 5);
} while ((_local2[1] == 0) || (Math.abs(_local2[0] - _local2[1]) <= 1));
var _local3 = 0;
while (_local3 < 2) {
_root.o_brd[(10 * _local4) + _local3]._x = (_local2[_local3] * 64) * CS;
_local3++;
}
_local4++;
}
}
function SetNextColumnGrid() {
var _local8 = _root.c_pgrd.count_nowground;
var _local2 = _root.c_game.id_chng - 1;
if (_local2 < 0) {
_local2 = 6;
}
if (_local8 <= 0) {
var _local6 = 0;
while (_local6 < 12) {
_root.mas_tn[_local2][_local6].vsb = false;
_root.mas_tn[_local2][_local6 + 12].vsb = true;
_local6++;
}
if (_root.c_pgrd.pza_on_up_ground) {
_local8 = Math.abs(_local8);
var _local18 = 0;
if ((_local8 == 4) && (_root.c_pgrd.count_nowground == -4)) {
_local8 = 3;
}
if (_root.c_pgrd.count_nowground < -4) {
_local8--;
}
if ((_local8 == 3) || (_local8 == 4)) {
_local18 = -1;
}
_local6 = (_local8 - 2) + _local18;
while (_local6 < (_local8 + 1)) {
if ((12 + _local6) >= 12) {
_root.mas_tn[_local2][12 + _local6].vsb = false;
}
_local6++;
}
if (_root.c_pgrd.count_nowground == -5) {
var _local23 = 0;
while (_local23 < 11) {
_root.mas_tn[_local2][_local23].vsb = true;
_root.mas_tn[_local2][_local23].texture = 7;
_local23++;
}
_root.mas_tn[_local2][11].vsb = true;
_root.mas_tn[_local2][11].texture = 5;
}
_root.c_pgrd.now_iy = (12 + _local8) + 1;
_root.c_pgrd.last_step = 0;
if (_root.c_pgrd.count_nowground < -4) {
_root.c_pgrd.SetCountGrnd();
_root.c_pgrd.next_dy = -1;
_root.c_pgrd.pza_on_up_ground = false;
_root.c_pgrd.now_iy = 17;
}
} else {
_local8 = Math.abs(Math.floor(_local8 / 2));
_local8 = 2 - _local8;
_local6 = _local8 + 2;
while (_local6 > (_local8 - 2)) {
if ((12 + _local6) >= 12) {
_root.mas_tn[_local2][12 + _local6].vsb = false;
}
_local6--;
}
_root.c_pgrd.now_iy = 17 - (2 - _local8);
_root.c_pgrd.last_step = 0;
if (_root.c_pgrd.count_nowground < -8) {
_root.c_pgrd.SetCountGrnd();
_root.c_pgrd.pza_on_up_ground = true;
_root.c_pgrd.next_dy = -1;
_root.c_pgrd.now_iy = 12;
var _local5;
_local6 = 0;
while (_local6 < 12) {
var _local3 = 0;
while (_local3 < 3) {
_local5 = _local2 + _local3;
if ((_local2 + _local3) > 6) {
_local5 = _local5 - 7;
}
_root.mas_tn[_local5][_local6].vsb = false;
_root.mas_tn[_local5][_local6 + 12].vsb = true;
_local3++;
}
_local6++;
}
}
}
} else if (!_root.c_pgrd.pza_on_up_ground) {
var _local17 = Math.floor(Math.random() * 2);
var _local6 = 0;
while (_local6 < 12) {
if (_local17 == 1) {
_root.mas_tn[_local2][_local6].vsb = true;
_root.mas_tn[_local2][_local6].texture = 7;
} else {
_root.mas_tn[_local2][_local6].vsb = false;
}
_root.mas_tn[_local2][_local6 + 12].vsb = true;
_local6++;
}
if (_local17 == 1) {
_root.mas_tn[_local2][11].vsb = true;
_root.mas_tn[_local2][11].texture = 5;
} else {
_root.mas_tn[_local2][11].vsb = false;
}
var _local4 = Math.floor(Math.random() * 10);
var _local11 = new Number();
_local11 = Math.floor(Math.random() * 2) + 1;
var _local7 = 100;
if (_root.c_game.dif_game > 1) {
_local7 = _local7 - Math.round((1 - (1 / _root.c_game.dif_game)) * 100);
}
if (_local7 < 7) {
_local11 = Math.floor(Math.random() * 2) + 1;
_local4 = RndValue([5, 8, 9, 4, 6, 7], 6);
} else if (_local7 < 3) {
_local11 = Math.floor(Math.random() * 3) + 1;
_local4 = RndValue([5, 8, 9, 4, 6, 7], 6);
if (_local11 > 2) {
_local11 = 2;
}
}
var _local22 = _root.c_pgrd.count_nowground;
var _local19 = 17;
_local19 = 16;
if (_local22 <= 5) {
if ((_root.c_pgrd.now_iy - _local19) > 0) {
_local11 = 2;
_local4 = 6;
if ((_root.c_pgrd.now_iy - _local11) < _local19) {
_local11 = 1;
}
} else if ((_local19 - _root.c_pgrd.now_iy) > 0) {
_local11 = 2;
_local4 = 8;
if ((_root.c_pgrd.now_iy + _local11) > _local19) {
_local11 = 1;
}
} else if ((_local19 - _root.c_pgrd.now_iy) == 0) {
_local11 = 0;
_local4 = 2;
}
}
var _local20 = new Boolean();
var _local21 = new Boolean();
_local20 = true;
_local21 = true;
if (_local22 > 5) {
if ((((_local4 == 5) || (_local4 == 8)) || (_local4 == 9)) && (((_root.c_pgrd.now_iy + _root.c_pgrd.next_dy) + _local11) >= 22)) {
_local21 = false;
_local4 = 6;
}
if ((((_local4 == 4) || (_local4 == 6)) || (_local4 == 7)) && (((_root.c_pgrd.now_iy + _root.c_pgrd.next_dy) - _local11) <= 15)) {
_local20 = false;
_local4 = 8;
}
}
if (_root.c_pgrd.next_dy != 0) {
_local21 = false;
_local20 = false;
}
if (_local20) {
if (((_local4 == 4) || (_local4 == 6)) || (_local4 == 7)) {
_local11 = -_local11;
}
}
if ((_local4 < 4) || ((_local20 == false) && (_local21 == false))) {
_local11 = 0;
}
_local7 = _local11;
_local11 = _root.c_pgrd.next_dy;
_root.c_pgrd.next_dy = _local7;
var _local15 = 0;
var _local16 = 0;
if (_root.c_pgrd.next_dy == -2) {
_local15 = 1;
}
if (_local11 == 2) {
_local16 = 1;
}
if (_local11 < 0) {
_root.c_pgrd.now_iy = _root.c_pgrd.now_iy + _local11;
var _local14 = (_root.c_pgrd.now_iy - 12) - 1;
_local6 = _local14 - 2;
while (_local6 < (_local14 + 2)) {
if ((12 + _local6) >= 12) {
_root.mas_tn[_local2][12 + _local6].vsb = false;
}
_local6++;
}
SetEgs(_root.o_elm[_local2 + (7 * ((12 + _local14) + 2))]._y - 12);
_root.c_pgrd.last_step = 0;
}
if (_local11 > 0) {
_root.c_pgrd.now_iy = _root.c_pgrd.now_iy + _local11;
var _local14 = (_root.c_pgrd.now_iy - 12) - 1;
_local6 = (_local14 - 2) - _local16;
while (_local6 < (_local14 + 2)) {
if ((12 + _local6) >= 12) {
_root.mas_tn[_local2][12 + _local6].vsb = false;
}
_local6++;
}
SetEgs(_root.o_elm[_local2 + (7 * ((12 + _local14) + 2))]._y - 12);
_root.c_pgrd.last_step = 0;
}
if (_local11 == 0) {
var _local14 = (_root.c_pgrd.now_iy - 12) - 1;
_local6 = (_local14 - 2) - _local15;
while (_local6 < (_local14 + 2)) {
if ((12 + _local6) >= 12) {
_root.mas_tn[_local2][12 + _local6].vsb = false;
}
_local6++;
}
SetEgs(_root.o_elm[_local2 + (7 * ((12 + _local14) + 2))]._y - 12);
}
_root.c_pgrd.last_dx = _local11;
} else {
var _local24 = _root.c_pgrd.last_step;
if (_local24 > 2) {
var _local5 = 0;
var _local6 = 0;
while (_local6 < 12) {
var _local3 = 0;
while (_local3 < 3) {
_local5 = _local2 + _local3;
if ((_local2 + _local3) > 6) {
_local5 = _local5 - 7;
}
_root.mas_tn[_local5][_local6].vsb = false;
_root.mas_tn[_local5][_local6 + 12].vsb = true;
_local3++;
}
_local6++;
}
var _local9 = [0, 0, 0, 0, 2, 1, 3, 4];
var _local7 = 100;
if (_root.c_game.dif_game > 1) {
_local7 = _local7 - Math.round((1 - (1 / _root.c_game.dif_game)) * 100);
}
if (_local7 > 2) {
_local7 = Math.floor(Math.random() * _local7) + 1;
}
if (_local7 > 2) {
_local7 = 0;
} else if (_local7 == 2) {
_local7 = Math.floor(Math.random() * 2) + 1;
} else {
_local7 = 2;
}
var _local4 = new Number();
do {
if (_local7 != 0) {
do {
_local4 = Math.floor(Math.random() * 7) + 1;
} while (Math.abs(_local9[_root.c_pgrd.last_type_elm] - _local9[_local4]) != _local7);
} else {
_local4 = Math.floor(Math.random() * 7) + 1;
}
} while (((_root.c_pgrd.last_type_elm == 3) && (_local4 == 3)) || (Math.abs(_local9[_root.c_pgrd.last_type_elm] - _local9[_local4]) > 2));
if (_root.c_pgrd.count_nowground < 4) {
_local4 = 0;
}
var _local12 = _local2 + 1;
if (_local12 > 6) {
_local12 = _local12 - 7;
}
var _local10 = _local2 + 2;
if (_local10 > 6) {
_local10 = _local10 - 7;
}
_local7 = 0;
while (_local7 < 9) {
_root.mas_tn[_local2][3 + _local7].vsb = false;
_root.mas_tn[_local12][3 + _local7].vsb = false;
_root.mas_tn[_local10][3 + _local7].vsb = false;
_local7++;
}
if (_local4 == 1) {
_root.mas_tn[_local2][11].vsb = true;
_root.mas_tn[_local2][11].texture = 5;
var _local23 = Math.floor(Math.random() * 6) + 1;
if (_local23 > 4) {
_root.mas_tn[_local12][11].vsb = true;
_root.mas_tn[_local12][11].texture = 5;
}
} else if (_local4 == 2) {
_root.mas_tn[_local2][10].vsb = true;
_root.mas_tn[_local2][10].texture = 7;
_root.mas_tn[_local2][11].vsb = true;
_root.mas_tn[_local2][11].texture = 5;
var _local23 = Math.floor(Math.random() * 6) + 1;
if (_local23 > 4) {
_root.mas_tn[_local12][11].vsb = true;
_root.mas_tn[_local12][11].texture = 5;
}
} else if (_local4 == 3) {
} else if (_local4 == 4) {
_root.mas_tn[_local2][10].vsb = true;
_root.mas_tn[_local2][10].texture = 6;
_root.mas_tn[_local12][10].vsb = true;
_root.mas_tn[_local12][10].texture = 6;
_root.mas_tn[_local10][10].vsb = true;
_root.mas_tn[_local10][10].texture = 6;
_root.mas_tn[_local2][11].vsb = true;
_root.mas_tn[_local2][11].texture = 5;
_root.mas_tn[_local10][11].vsb = true;
_root.mas_tn[_local10][11].texture = 5;
} else if (_local4 == 5) {
_root.mas_tn[_local2][11].vsb = true;
_root.mas_tn[_local2][11].texture = 6;
_root.mas_tn[_local12][11].vsb = true;
_root.mas_tn[_local12][11].texture = 6;
_root.mas_tn[_local10][11].vsb = true;
_root.mas_tn[_local10][11].texture = 6;
} else if (_local4 == 6) {
_root.mas_tn[_local2][9].vsb = true;
_root.mas_tn[_local2][9].texture = 6;
_root.mas_tn[_local12][9].vsb = true;
_root.mas_tn[_local12][9].texture = 6;
_root.mas_tn[_local10][9].vsb = true;
_root.mas_tn[_local10][9].texture = 6;
_root.mas_tn[_local2][11].vsb = true;
_root.mas_tn[_local2][11].texture = 5;
_root.mas_tn[_local10][11].vsb = true;
_root.mas_tn[_local10][11].texture = 5;
_root.mas_tn[_local2][10].vsb = true;
_root.mas_tn[_local2][10].texture = 7;
_root.mas_tn[_local10][10].vsb = true;
_root.mas_tn[_local10][10].texture = 7;
var _local23 = Math.floor(Math.random() * 3) + 1;
if (_local23 == 1) {
_root.mas_tn[_local10][8].vsb = true;
_root.mas_tn[_local10][8].texture = RndValue([6, 7], 2);
}
} else if (_local4 == 7) {
_root.mas_tn[_local2][8].vsb = true;
_root.mas_tn[_local2][8].texture = 6;
_root.mas_tn[_local12][8].vsb = true;
_root.mas_tn[_local12][8].texture = 6;
_root.mas_tn[_local10][8].vsb = true;
_root.mas_tn[_local10][8].texture = 6;
_root.mas_tn[_local2][11].vsb = true;
_root.mas_tn[_local2][11].texture = 5;
_root.mas_tn[_local10][11].vsb = true;
_root.mas_tn[_local10][11].texture = 5;
_root.mas_tn[_local2][10].vsb = true;
_root.mas_tn[_local2][10].texture = 7;
_root.mas_tn[_local10][10].vsb = true;
_root.mas_tn[_local10][10].texture = 7;
_root.mas_tn[_local2][9].vsb = true;
_root.mas_tn[_local2][9].texture = 7;
_root.mas_tn[_local10][9].vsb = true;
_root.mas_tn[_local10][9].texture = 7;
var _local23 = Math.floor(Math.random() * 3) + 1;
if (_local23 == 1) {
_root.mas_tn[_local10][7].vsb = true;
_root.mas_tn[_local10][7].texture = RndValue([6, 7], 2);
}
}
_root.c_pgrd.last_type_elm = _local4;
_root.c_pgrd.last_step = 0;
}
var _local13 = 6;
do {
_local13++;
if (_root.mas_tn[_local2][_local13].vsb == true) {
break;
}
} while (_local13 < 12);
SetEgs(_root.o_elm[_local2 + (7 * _local13)]._y - 15);
_root.c_pgrd.now_iy = 12;
}
_root.SetStateForElmGrid(_local2);
}
function SetStateForElmGrid(prm) {
if (prm != -1) {
var _local2 = 0;
while (_local2 < 24) {
if (_root.mas_tn[prm][_local2].vsb != _root.o_elm[prm + (7 * _local2)]._visible) {
_root.o_elm[prm + (7 * _local2)]._visible = _root.mas_tn[prm][_local2].vsb;
}
if (_root.mas_tn[prm][_local2].vsb) {
if (_local2 > 12) {
_root.o_elm[prm + (7 * _local2)].gotoAndStop(Math.floor(Math.random() * 3) + 1);
} else if (_local2 == 12) {
var _local4 = Math.floor(Math.random() * 3) + 1;
if (_local4 == 2) {
_local4 = 4;
} else {
_local4 = 8;
}
_root.o_elm[prm + (7 * _local2)].gotoAndStop(_local4);
} else {
_root.o_elm[prm + (7 * _local2)].gotoAndStop(_root.mas_tn[prm][_local2].texture);
}
}
_local2++;
}
}
}
function SetEgs(y) {
var _local4 = -1;
var _local6 = 15 + Math.round(_root.c_pza.count_eggs / 10);
if (_local6 > 20) {
_local6 = 20;
}
var _local5 = Math.floor(Math.random() * _local6);
if (_local5 < 6) {
_local4 = Math.floor(Math.random() * COUNT_EGG) + 1;
}
_local5 = Math.floor(Math.random() * (90 + (_root.c_pza.count_eggs * 2)));
if (_local5 < 5) {
_local4 = COUNT_EGG + 1;
}
if (_local4 != -1) {
var _local7 = 200;
if (!_root.c_pgrd.pza_on_up_ground) {
_local7 = 150;
}
var _local2 = -1;
do {
_local2++;
if (_local2 > 4) {
break;
}
} while (_root.o_egs[_local2]._visible);
if (_local2 <= 4) {
_root.egs_use[_local2] = true;
_root.o_egs[_local2]._y = y - Math.floor(Math.random() * _local7);
_root.o_egs[_local2]._x = (590 + Math.floor(Math.random() * 55)) + 1;
var _local3 = Math.floor(Math.random() * 10);
if (_local3 == 1) {
_local3 = 140;
} else {
_local3 = 0;
}
_root.o_egs[_local2].gotoAndStop((((_local4 - 1) * 13) + (Math.floor(Math.random() * 13) + 1)) + _local3);
_root.o_egs[_local2]._visible = true;
}
}
}
function MoveGridGame(dx, dy) {
var _local5 = 0;
while (_local5 < 24) {
var _local2 = 0;
while (_local2 < 7) {
_root.o_elm[(_local5 * 7) + _local2]._x = _root.o_elm[(_local5 * 7) + _local2]._x - dx;
_root.o_elm[(_local5 * 7) + _local2]._y = _root.o_elm[(_local5 * 7) + _local2]._y + dy;
_local2++;
}
_local5++;
}
var _local3 = 0;
while (_local3 < 5) {
if (_root.o_egs[_local3]._visible) {
_root.o_egs[_local3]._x = _root.o_egs[_local3]._x - dx;
}
_root.o_egs[_local3]._y = _root.o_egs[_local3]._y + dy;
if (_root.o_egs[_local3]._x < -50) {
_root.egs_use[_local3] = false;
_root.o_egs[_local3]._visible = false;
}
_local3++;
}
var _local4 = 0;
while (_local4 < 5) {
if (dx > 0) {
_root.o_cld[_local4]._x = _root.o_cld[_local4]._x - 1;
} else {
_root.o_cld[_local4]._x = _root.o_cld[_local4]._x - dx;
}
_root.o_cld[_local4]._y = _root.o_cld[_local4]._y + dy;
if (_root.o_cld[_local4]._x < -150) {
_root.o_cld[_local4]._x = 650;
_root.o_cld[_local4]._y = (_root.o_elm[84]._y - 240) - Math.floor(Math.random() * 350);
}
_local4++;
}
_root.o_bgr[0]._y = _root.o_bgr[0]._y + dy;
_root.o_bgr[1]._y = _root.o_bgr[1]._y + dy;
}
function AddSpeedMovePza() {
_root.c_game.count_dxdx++;
if (_root.c_game.count_dxdx > 27) {
_root.c_game.count_dxdx = 0;
if ((_root.DX_MOVE + 1) <= _root.MAX_DX_MOVE) {
_root.DX_MOVE++;
}
}
}
function SetStart() {
_root.o_bgr[0]._x = 275;
_root.o_bgr[0]._y = -50;
_root.o_bgr[1]._x = 275;
_root.o_bgr[1]._y = 650;
_root.o_pza.gotoAndPlay(2);
_root.o_lif.gotoAndStop(1);
_root.o_scr.vscr = 0;
var _local5 = 0;
while (_local5 < 5) {
_root.o_egs[_local5]._x = 575;
_root.o_egs[_local5]._y = 300;
_root.o_egs[_local5].gotoAndStop(Math.floor(Math.random() * 2) + 1);
_root.o_egs[_local5]._visible = false;
_local5++;
}
var _local2 = 0;
while (_local2 < 7) {
var _local3 = 0;
while (_local3 < 24) {
_root.mas_tn[_local2][_local3].SetDef();
_local3++;
}
_local2++;
}
_root.c_game.SetDef();
_root.c_pgrd.SetDef();
_root.c_pza.SetDef();
var _local6 = new Number();
_local2 = 0;
while (_local2 < 24) {
var _local3 = 0;
while (_local3 < 7) {
_root.o_elm[(_local2 * 7) + _local3]._x = _local3 * 100;
_root.o_elm[(_local2 * 7) + _local3]._y = -300 + (_local2 * 50);
if (_local2 > 11) {
_root.o_elm[(_local2 * 7) + _local3]._visible = true;
}
_local6 = Math.floor(Math.random() * 3) + 1;
_root.o_elm[(_local2 * 7) + _local3].gotoAndStop(_local6);
if (_local2 == 12) {
var _local4 = Math.floor(Math.random() * 3) + 1;
if (_local4 == 2) {
_local4 = 4;
} else {
_local4 = 8;
}
_root.o_elm[(_local2 * 7) + _local3].gotoAndStop(_local4);
}
_root.mas_tn[_local3][_local2].textura = _local6;
if (_local2 < 12) {
_root.o_elm[(_local2 * 7) + _local3]._visible = false;
_root.mas_tn[_local3][_local2].vsb = false;
}
_local3++;
}
_local2++;
}
_root.MAX_DX_MOVE = 6;
_root.DX_MOVE = 4;
ar_mv = [0, 1, 2];
nowkcode = -1;
_root.o_pza.r_anim = false;
_root.o_pza.ecol = false;
_root.egs_use = [false, false, false, false, false];
}
function RndValue(ms, cnt) {
var _local1 = Math.floor(Math.random() * cnt);
return(ms[_local1]);
}
function Collision() {
var _local2 = [];
(_local2[0] = new Boolean());
(_local2[1] = new Boolean());
var _local5 = 0;
var _local6 = 0;
_local5 = Math.abs(Math.floor((_root.o_elm[0]._y - (_root.o_pza._y + DX_HEIGTH_PZA)) / 50));
var _local4 = (_root.c_game.now_pza_id + 1) - 1;
if (_local4 > 6) {
_local4 = _local4 - 7;
}
_local2[0] = _local4 + (7 * (_local5 - 1));
_local2[1] = _local4 + (7 * (_local5 - 2));
var _local3 = [];
(_local3[0] = new Boolean());
(nel2[1] = new Boolean());
_local3[0] = _root.o_elm[_local2[0]]._visible;
_local3[1] = _root.o_elm[_local2[1]]._visible;
return(_local3[0] || (_local3[1]));
}
function GoMenu() {
if (_root.o_mnu._visible) {
return(undefined);
}
_root.o_mnu._visible = true;
_root.o_pza.stop();
_root.o_mnu.gotoAndStop(4);
}
function CalcURLLink() {
if (_root.o_bs.vscrb == 0) {
return(undefined);
}
var _local7 = new String();
_local7 = "";
_local7 = _root.o_bs.vscrb;
_local7 = _local7 + "\t";
_local7 = _local7 + "0";
_local7 = _local7 + "\t";
_local7 = _local7 + _root.o_scr.vnm;
_local7 = _local7 + "\tbun\tweb";
var _local17 = [100, 26, 220, 87, 44, 63, 77, 119, 231, 110];
var _local15 = 0;
var _local14 = 0;
var _local11 = _local7.length;
var _local2 = 0;
while (_local2 < _local11) {
_local15 = _local15 + _local7.charCodeAt(_local2);
_local14 = _local14 + (_local7.charCodeAt(_local2) ^ 175);
_local2++;
}
_local15 = _local15 % 256;
_local14 = _local14 % 256;
var _local12 = [];
_local12[0] = String.fromCharCode(_local15);
_local12[1] = String.fromCharCode(_local14);
_local2 = 0;
while (_local2 < _local11) {
_local12[2 + _local2] = _local7.charAt(_local2);
_local2++;
}
var _local16 = new String();
_local16[0] = 0;
var _local13 = 193;
var _local8 = new String();
_local8 = "";
_local11 = _local11 + 2;
_local2 = 0;
while (_local2 < _local11) {
var _local9 = ord(_local12[_local2]);
var _local6 = _local9 ^ _local13;
_local6 = _local6 ^ _local17[_local2 % 10];
_local8 = "" + _local6;
var _local4 = new String();
_local4 = _local8;
var _local10 = _local4.length;
var _local5 = new String();
_local5 = "";
var _local3 = 0;
while (_local3 < (3 - _local10)) {
_local5 = _local5 + "0";
_local3++;
}
_local8 = (("" + _local5) + "") + _local4;
_local4 = _local8;
_local16 = _local16 + _local4;
_local13 = _local9;
_local2++;
}
var _local18 = "http://absolutist.com/cgi-bin/gameres.pl?g=bun&e=" + _local16;
getURL (_local18, "_self");
}
var link1 = "http://absolutist.com/?r=BUNNY";
var DX_HEIGTH_PZA = 45;
var MIN_DX_MOVE = 4;
var MAX_DX_MOVE = 6;
var DX_MOVE = 4;
var COUNT_LIFES = 6;
var COUNT_EGG = 8;
var ar_mv = new Array(0, 1, 2);
var nowkcode = -1;
var o_pza;
var o_mnu;
var o_elm = [];
var o_bgr = [];
var o_lif;
var o_bs;
var o_cld = [];
var c_game = new CGame();
var c_pza = new CPza();
var c_pgrd = new CPGrid();
var o_egs = [];
var egs_use = [false, false, false, false, false];
var o_scr;
var o_fls = [];
var mas_tn = [];
var i = 0;
while (i < 7) {
_root.mas_tn[i] = [];
var j = 0;
while (j < 24) {
_root.mas_tn[i][j] = new CElm();
j++;
}
i++;
}
OnLoadGame();
var y = 0;
Instance of Symbol 135 MovieClip in Frame 1
onClipEvent (mouseDown) {
_root.GKeyPressed(32);
}
onClipEvent (keyDown) {
if (Key.getCode() == 80) {
_root.GoMenu();
return(undefined);
}
_root.GKeyPressed(Key.getCode());
}
onClipEvent (keyUp) {
_root.GKeyUp(Key.getCode());
}
onClipEvent (mouseUp) {
_root.GKeyUp(32);
}
Frame 2
OnTimer();
Frame 3
gotoAndPlay (2);
Symbol 14 Button
on (release) {
if (this.stgame) {
this.stgame = false;
_root.o_mnu._visible = false;
} else {
_root.o_mnu.gotoAndStop(4);
}
}
Symbol 35 Button
on (release) {
if (_root.o_scr.vscr > _root.o_bs.vscrb) {
_root.o_bs.vscrb = _root.o_scr.vscr;
}
_root.o_mnu._visible = false;
_root.o_mnu.gotoAndStop(2);
_root.SetStart();
}
Symbol 46 Button
on (release) {
gotoAndStop (5);
}
Symbol 50 Button
on (release) {
getURL (_root.link1, "blank");
}
Symbol 54 Button
on (release) {
_root.CalcURLLink();
}
Symbol 58 Button
on (release) {
_root.o_mnu.gotoAndStop(2);
}
Symbol 63 Button
on (release) {
_root.o_mnu._visible = false;
_root.o_pza.play();
}
Symbol 69 Button
on (release) {
_root.SetStart();
_root.o_pza.play();
_root.o_mnu._visible = false;
if (this.vname != "") {
_root.o_scr.vnm = this.vname;
} else {
_root.o_scr.vnm = "RABBIT";
}
}
Symbol 71 MovieClip [ic_menu] Frame 1
var stgame = true;
Symbol 90 MovieClip [ic_pza] Frame 1
var st = "stop";
var ecol = new Boolean();
ecol = false;
var r_anim = new Boolean();
this.r_anim = false;
var lj = 1;
Symbol 90 MovieClip [ic_pza] Frame 2
this.st = "go_left";
Symbol 90 MovieClip [ic_pza] Frame 23
gotoAndPlay ("go_left");
Symbol 90 MovieClip [ic_pza] Frame 24
this.st = "jump";
this.lj = 1;
Symbol 90 MovieClip [ic_pza] Frame 26
this.st = "jump";
this.lj = 2;
Symbol 90 MovieClip [ic_pza] Frame 28
this.st = "fall";
Symbol 90 MovieClip [ic_pza] Frame 30
this.st = "fall";
Symbol 90 MovieClip [ic_pza] Frame 32
this.st = "collision";
this.r_anim = true;
Symbol 90 MovieClip [ic_pza] Frame 94
if (_root.c_pza.lifes == 0) {
_root.o_mnu._visible = true;
stop();
_root.o_mnu.gotoAndStop(3);
_root.o_mnu.fscr = _root.c_pza.score;
_root.o_mnu.fceggs = _root.c_pza.count_eggs;
} else {
_root.c_pza.st_stop = true;
if (_root.Collision()) {
_root.MoveGridGame(-25, 0);
} else {
_root.c_pza.contin_go = true;
}
}
Symbol 90 MovieClip [ic_pza] Frame 117
stop();
this.ecol = true;
this.r_anim = false;
Symbol 90 MovieClip [ic_pza] Frame 118
this.st = "collision";
this.r_anim = true;
Symbol 90 MovieClip [ic_pza] Frame 168
if (_root.c_pza.lifes == 0) {
_root.o_mnu._visible = true;
stop();
_root.o_mnu.gotoAndStop(3);
_root.o_mnu.fscr = _root.c_pza.score;
_root.o_mnu.fceggs = _root.c_pza.count_eggs;
} else {
_root.c_pza.st_stop = true;
if (_root.Collision()) {
_root.MoveGridGame(-25, 0);
} else {
_root.c_pza.contin_go = true;
}
}
Symbol 90 MovieClip [ic_pza] Frame 191
stop();
this.ecol = true;
this.r_anim = false;
Symbol 98 MovieClip [ic_elm] Frame 1
stop();
Symbol 119 MovieClip [eg1] Frame 1
var sdf = new Number();
Symbol 119 MovieClip [eg1] Frame 137
_visible = false;
_x = 700;
stop();
Symbol 120 MovieClip [nc_life] Frame 1
stop();
Symbol 130 Button [btn_mhelp]
on (release) {
_root.GoMenu();
}
Symbol 132 MovieClip [pflash] Frame 22
stop();
Symbol 136 MovieClip [__Packages.CElm] Frame 0
class CElm
{
var texture, vsb;
function CElm () {
texture = 1;
vsb = true;
}
function SetDef() {
texture = 1;
vsb = true;
}
}
Symbol 137 MovieClip [__Packages.CGame] Frame 0
class CGame
{
var id_chng, st_calc_jump, now_pza_id, now_pza_y;
function CGame () {
id_chng = 0;
st_calc_jump = -1;
now_pza_id = 2;
now_pza_y = -1;
count_dxdx = 0;
dif_game = 0;
}
function SetDef() {
id_chng = 0;
st_calc_jump = -1;
now_pza_id = 2;
now_pza_y = -1;
count_dxdx = 0;
dif_game = 0;
}
var count_dxdx = 0;
var dif_game = 0;
}
Symbol 138 MovieClip [__Packages.CPza] Frame 0
class CPza
{
var id_y, falled, collison, lifes, score, count_eggs, st_stop, contin_go;
function CPza () {
id_y = 0;
falled = true;
collison = false;
lifes = COUNT_LIFES - 1;
score = 0;
count_eggs = 0;
st_stop = false;
contin_go = false;
}
function SetDef() {
id_y = 0;
falled = true;
collison = false;
lifes = COUNT_LIFES - 1;
score = 0;
count_eggs = 0;
st_stop = false;
contin_go = false;
}
var COUNT_LIFES = 6;
var val_dy = [15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 5, 4, 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, 1];
}
Symbol 139 MovieClip [__Packages.CPGrid] Frame 0
class CPGrid
{
var last_step, count_nowground, pza_on_up_ground, now_iy, next_dy, dir_last_step, last_type_elm, last_dx;
function CPGrid () {
last_step = 7;
count_nowground = (Math.floor(Math.random() * 35) * 3) + 40;
pza_on_up_ground = true;
now_iy = 12;
next_dy = 0;
dir_last_step = 0;
last_type_elm = 1;
last_dx = 0;
}
function SetCountGrnd() {
count_nowground = (Math.floor(Math.random() * 35) * 3) + 40;
}
function SetDef() {
last_step = 7;
count_nowground = (Math.floor(Math.random() * 30) * 3) + 40;
pza_on_up_ground = true;
now_iy = 12;
next_dy = 0;
dir_last_step = 0;
last_type_elm = 1;
last_dx = 0;
}
}