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0, 0, 9, 9, 0, 9, 0, 9, 0, 9, 0, 9, 9, 9, 0, 9, 0, 9, 0, 9, 0, 9, 9, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 9, 9, 0, 9, 0, 9, 0, 9, 9, 9, 0, 9, 9, 9, 0, 9, 0, 9, 0, 9, 9, 0, 0, 0, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0, 0, 0, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9];
level7 = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 10, 10, 0, 10, 10, 0, 10, 0, 0, 0, 0, 0, 0, 0, 10, 0, 10, 10, 0, 10, 10, 0, 10, 10, 0, 0, 0, 10, 0, 10, 0, 10, 0, 0, 0, 10, 10, 0, 10, 10, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 10, 10, 0, 10, 10, 0, 10, 0, 10, 10, 10, 10, 10, 0, 10, 0, 10, 10, 0, 10, 10, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 10, 10, 0, 10, 10, 0, 0, 0, 0, 10, 0, 10, 0, 0, 0, 0, 10, 10, 0, 10, 10, 0, 10, 10, 0, 10, 10, 0, 10, 0, 10, 0, 10, 10, 0, 10, 10, 0, 10, 10, 0, 0, 0, 0, 10, 10, 0, 0, 0, 0, 0, 10, 10, 0, 0, 0, 0, 10, 10, 0, 10, 10, 0, 10, 10, 0, 10, 0, 10, 0, 10, 10, 0, 10, 10, 0, 10, 10, 0, 10, 10, 0, 0, 0, 0, 10, 0, 10, 0, 0, 0, 0, 10, 10, 0, 10, 10, 0, 0, 0, 0, 10, 0, 0, 3, 2, 2, 2, 0, 10, 0, 0, 0, 0, 10, 10, 0, 10, 10, 0, 10, 0, 10, 10, 10, 10, 10, 0, 10, 0, 10, 10, 0, 10, 10, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 10, 10, 0, 10, 10, 0, 0, 0, 10, 10, 10, 10, 10, 0, 0, 0, 10, 10, 0, 10, 10, 0, 10, 10, 0, 10, 0, 0, 0, 0, 0, 0, 0, 10, 0, 10, 10, 0, 10, 10, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 0, 0, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10];
level4 = [11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 0, 0, 0, 11, 0, 0, 11, 11, 11, 11, 11, 0, 0, 11, 0, 0, 0, 11, 11, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 11, 11, 0, 11, 0, 11, 0, 11, 0, 11, 0, 11, 0, 11, 0, 11, 0, 11, 0, 11, 11, 0, 11, 0, 11, 0, 11, 0, 11, 0, 11, 0, 11, 0, 11, 0, 11, 0, 11, 11, 0, 11, 0, 11, 0, 0, 0, 11, 0, 11, 0, 0, 0, 11, 0, 11, 0, 11, 11, 0, 11, 0, 11, 11, 11, 11, 11, 0, 11, 11, 11, 11, 11, 0, 11, 0, 11, 11, 0, 11, 0, 11, 0, 0, 0, 11, 0, 11, 0, 0, 0, 11, 0, 11, 0, 11, 11, 0, 11, 0, 11, 0, 11, 0, 11, 0, 11, 0, 11, 0, 11, 0, 11, 0, 11, 11, 0, 11, 0, 11, 0, 0, 0, 11, 0, 11, 0, 0, 0, 11, 0, 11, 0, 11, 11, 0, 11, 0, 0, 0, 11, 0, 0, 0, 0, 0, 11, 0, 0, 0, 11, 0, 11, 11, 0, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 0, 11, 11, 0, 11, 0, 0, 0, 0, 0, 3, 2, 2, 2, 0, 0, 0, 0, 11, 0, 11, 11, 0, 11, 0, 11, 0, 11, 11, 0, 11, 0, 11, 11, 0, 11, 0, 11, 0, 11, 11, 0, 11, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 11, 0, 11, 11, 0, 11, 0, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 0, 11, 0, 11, 11, 0, 11, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 11, 0, 11, 11, 0, 0, 0, 0, 0, 11, 0, 0, 11, 0, 0, 11, 0, 0, 0, 0, 0, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11];
level2 = [12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 12, 12, 12, 12, 12, 0, 12, 12, 12, 0, 12, 12, 12, 12, 12, 0, 12, 12, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 12, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 12, 0, 12, 0, 0, 0, 12, 0, 12, 0, 12, 0, 12, 0, 0, 0, 12, 0, 12, 12, 0, 12, 12, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 12, 12, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 0, 12, 12, 12, 0, 12, 0, 12, 0, 12, 0, 12, 12, 12, 0, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 12, 12, 12, 12, 12, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 12, 12, 0, 12, 12, 12, 12, 12, 0, 3, 2, 2, 2, 12, 12, 12, 12, 12, 0, 12, 12, 0, 0, 0, 0, 0, 12, 0, 12, 12, 12, 0, 12, 0, 0, 0, 0, 0, 12, 12, 0, 12, 12, 12, 0, 12, 0, 0, 0, 0, 0, 12, 0, 12, 12, 12, 0, 12, 12, 0, 0, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 0, 0, 12, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 0, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12];
level5 = [13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 0, 0, 13, 13, 0, 0, 13, 0, 0, 13, 13, 0, 0, 13, 13, 13, 13, 13, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 13, 13, 13, 0, 0, 13, 0, 0, 13, 13, 0, 13, 0, 13, 13, 0, 0, 13, 0, 0, 13, 13, 0, 0, 0, 13, 0, 0, 13, 0, 13, 0, 13, 0, 0, 13, 0, 0, 0, 13, 13, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 13, 13, 13, 0, 13, 0, 0, 13, 0, 0, 13, 0, 0, 13, 0, 0, 13, 0, 13, 13, 13, 13, 0, 13, 13, 0, 0, 13, 0, 0, 0, 13, 0, 0, 13, 13, 0, 13, 13, 13, 0, 0, 0, 0, 0, 0, 0, 13, 0, 13, 0, 0, 0, 0, 0, 0, 0, 13, 13, 0, 13, 13, 13, 13, 13, 0, 0, 0, 0, 0, 13, 13, 13, 13, 13, 0, 13, 13, 0, 0, 0, 0, 0, 0, 0, 13, 13, 13, 0, 0, 0, 0, 0, 0, 0, 13, 13, 13, 0, 13, 13, 0, 0, 13, 13, 13, 13, 13, 0, 0, 13, 13, 0, 13, 13, 13, 13, 0, 13, 0, 0, 13, 0, 3, 2, 2, 2, 13, 0, 0, 13, 0, 13, 13, 13, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 0, 0, 0, 13, 13, 13, 0, 0, 0, 13, 0, 0, 13, 0, 13, 0, 13, 0, 0, 13, 0, 0, 0, 13, 13, 0, 0, 13, 0, 0, 13, 13, 0, 13, 0, 13, 13, 0, 0, 13, 0, 0, 13, 13, 13, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0, 0, 0, 0, 0, 13, 13, 13, 13, 13, 0, 0, 13, 13, 0, 0, 13, 0, 0, 13, 13, 0, 0, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13];
function load_level(number) {
removeMovieClip("EndLev");
first_flag = true;
timer_flag = false;
numb = number % max_level;
rotation = -90;
if (numb == 0) {
numb = max_level;
}
i = 0;
while (i < 361) {
current_level[i] = eval ("level" + numb)[i];
i++;
}
boax = [8, 9, 10, 11, 12, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1];
boay = [12, 12, 12, 12, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1];
boalength = 4;
to_collect = 10 + (number * 10);
i = 0;
while (i < to_collect) {
do {
tempx = random(19);
tempy = random(19);
} while (field(tempx, tempy) != 0);
set_field(tempx, tempy, 100 + level);
i++;
}
dx = 0;
dy = 0;
last_pressed = 0;
collected = 0;
}
function field(fx, fy) {
if ((((fx < 0) || (19 < fx)) || (fy < 0)) || (19 < fy)) {
return(0);
}
return(current_level[(19 * fy) + fx]);
}
function set_field(fx, fy, fvalue) {
current_level[(19 * fy) + fx] = fvalue;
}
function draw_field() {
i = 0;
while (i < 19) {
j = 0;
while (j < 19) {
removeMovieClip((("x" + i) + "y") + j);
j++;
}
i++;
}
i = 0;
while (i < 19) {
j = 0;
while (j < 19) {
if (0 < field(i, j)) {
attachMovie("image" + field(i, j), (("x" + i) + "y") + j, (666 + i) + (19 * j));
tellTarget ((("x" + i) + "y") + j) {
_width = 20;
_height = 20;
_x = (20 + (20 * _parent.i));
_y = (20 + (20 * _parent.j));
};
}
j++;
}
i++;
}
tellTarget ((("x" + boax[0]) + "y") + boay[0]) {
_rotation = _parent.rotation;
};
}
function move_boa(dx, dy) {
x = boax[0];
y = boay[0];
if ((dx != 0) || (dy != 0)) {
sux_flag = false;
}
if (field(x + dx, y + dy) == 0) {
removeMovieClip((("x" + x) + "y") + y);
removeMovieClip((("x" + boax[boalength - 1]) + "y") + boay[boalength - 1]);
attachMovie("image3", (("x" + (x + dx)) + "y") + (y + dy), (666 + (x + dx)) + (19 * (y + dy)));
tellTarget ((("x" + (x + dx)) + "y") + (y + dy)) {
_width = 20;
_height = 20;
_x = (20 + (20 * (_parent.x + _parent.dx)));
_y = (20 + (20 * (_parent.y + _parent.dy)));
_rotation = _parent.rotation;
};
attachMovie("image2", (("x" + x) + "y") + y, (666 + x) + (19 * y));
tellTarget ((("x" + x) + "y") + y) {
_width = 20;
_height = 20;
_x = (20 + (20 * _parent.x));
_y = (20 + (20 * _parent.y));
};
set_field(x + dx, y + dy, 3);
set_field(x, y, 2);
set_field(boax[boalength - 1], boay[boalength - 1], 0);
i = boalength - 1;
while (0 < i) {
boax[i] = boax[i - 1];
boay[i] = boay[i - 1];
i--;
}
boax[0] = x + dx;
boay[0] = y + dy;
} else if (100 < field(x + dx, y + dy)) {
removeMovieClip((("x" + x) + "y") + y);
removeMovieClip((("x" + (x + dx)) + "y") + (y + dy));
attachMovie("image3", (("x" + (x + dx)) + "y") + (y + dy), (666 + (x + dx)) + (19 * (y + dy)));
tellTarget ((("x" + (x + dx)) + "y") + (y + dy)) {
_width = 20;
_height = 20;
_x = (20 + (20 * (_parent.x + _parent.dx)));
_y = (20 + (20 * (_parent.y + _parent.dy)));
_rotation = _parent.rotation;
};
attachMovie("image2", (("x" + x) + "y") + y, (666 + x) + (19 * y));
tellTarget ((("x" + x) + "y") + y) {
_width = 20;
_height = 20;
_x = (20 + (20 * _parent.x));
_y = (20 + (20 * _parent.y));
};
set_field(x + dx, y + dy, 3);
set_field(x, y, 2);
boalength++;
i = boalength - 1;
while (0 < i) {
boax[i] = boax[i - 1];
boay[i] = boay[i - 1];
i--;
}
boax[0] = x + dx;
boay[0] = y + dy;
tellTarget ((("x" + boax[0]) + "y") + boay[0]) {
gotoAndPlay (2);
stop();
};
sux_flag = true;
if (sound_flag) {
Sound1.start();
}
score = score + 10;
level_score = level_score + 10;
collected++;
if (collected >= to_collect) {
if (sound_flag) {
Sound2.start();
}
remove_flag = true;
dx = 0;
dy = 0;
last_pressed = 0;
go_flag = false;
time_bonus = int((level * 100) / help_time) * 100;
score = score + time_bonus;
scores = score;
attachMovie("EndLevel", "EndLev", 9999);
tellTarget ("EndLev") {
_x = 275;
_y = 200;
LevelScoretext = _parent.level_score;
SpeadBonusText = _parent.time_bonus;
TailBonusText = _parent.tail_bonus;
TotalScoreText = _parent.score;
};
}
} else if (field(x + dx, y + dy) == 2) {
if (((x + dx) != boax[1]) || ((y + dy) != boay[1])) {
if (((x + dx) == boax[boalength - 1]) && ((y + dy) == boay[boalength - 1])) {
removeMovieClip((("x" + x) + "y") + y);
removeMovieClip((("x" + (x + dx)) + "y") + (y + dy));
attachMovie("image3", (("x" + (x + dx)) + "y") + (y + dy), (666 + (x + dx)) + (19 * (y + dy)));
tellTarget ((("x" + (x + dx)) + "y") + (y + dy)) {
_width = 20;
_height = 20;
_x = (20 + (20 * (_parent.x + _parent.dx)));
_y = (20 + (20 * (_parent.y + _parent.dy)));
_rotation = _parent.rotation;
};
attachMovie("image2", (("x" + x) + "y") + y, (666 + x) + (19 * y));
tellTarget ((("x" + x) + "y") + y) {
_width = 20;
_height = 20;
_x = (20 + (20 * _parent.x));
_y = (20 + (20 * _parent.y));
};
set_field(x + dx, y + dy, 3);
set_field(x, y, 2);
boalength--;
removeMovieClip((("x" + boax[boalength - 1]) + "y") + boay[boalength - 1]);
set_field(boax[boalength - 1], boay[boalength - 1], 0);
i = boalength - 1;
while (0 < i) {
boax[i] = boax[i - 1];
boay[i] = boay[i - 1];
i--;
}
boax[0] = x + dx;
boay[0] = y + dy;
score = score + 500;
tail_bonus = tail_bonus + 500;
tellTarget ((("x" + boax[0]) + "y") + boay[0]) {
gotoAndPlay (2);
};
if (sound_flag) {
Sound1.start();
}
} else if (!first_flag) {
tellTarget ((("x" + boax[0]) + "y") + boay[0]) {
gotoAndPlay (3);
};
if (sound_flag) {
Sound3.start();
}
life--;
if (life >= 0) {
dx = 0;
dy = 0;
last_pressed = 0;
load_level(level);
sux_flag = true;
draw_field();
tellTarget ((("x" + boax[0]) + "y") + boay[0]) {
gotoAndPlay (3);
stop();
};
gotoAndPlay (5);
} else {
if (sound_flag) {
Sound4.start();
}
gotoAndPlay (7);
}
}
}
}
if (((100 < field(x + (2 * dx), y + (2 * dy))) || (100 < field(x + (3 * dx), y + (3 * dy)))) && ((dx != 0) || (dy != 0))) {
tellTarget ((("x" + boax[0]) + "y") + boay[0]) {
gotoAndPlay (2);
stop();
};
} else {
tellTarget ((("x" + boax[0]) + "y") + boay[0]) {
gotoAndPlay (1);
stop();
};
}
}
function Delay(time) {
timer1 = getTimer();
timer2 = getTimer();
while ((timer2 - timer1) < time) {
timer2 = getTimer();
}
}
function Crypto(st) {
return(St);
}
fscommand ("showmenu", false);
removeMovieClip("gms");
levels_apples = [20, 30, 40, 50, 60, 70];
current_level = new Array(361);
boax = [8, 9, 10, 11, 12, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1];
boay = [12, 12, 12, 12, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1];
boalength = 4;
first_time = 0;
to_collect = 0;
collected = 0;
counter = 0;
go_flag = false;
remove_flag = false;
timer_flag = false;
last_pressed = 0;
max_level = 5;
level = 1;
life = 3;
score = 0;
tail_bonus = 0;
time_bonus = 0;
level_score = 0;
dx = 0;
dy = 0;
rotation = -90;
sux_flag = false;
Sound1 = new Sound();
Sound1.attachSound("sound1");
Sound2 = new Sound();
Sound2.attachSound("sound2");
Sound3 = new Sound();
Sound3.attachSound("sound3");
Sound4 = new Sound();
Sound4.attachSound("sound4");
Sound5 = new Sound();
Sound5.attachSound("sound5");
load_level(level);
draw_field();
tellTarget ((("x" + boax[0]) + "y") + boay[0]) {
_rotation = 270;
};
if (sound_flag) {
Sound5.start();
}
HtmlMask = [15, 114, 125, 100, 45, 134, 145, 20, 170, 14];
Instance of Symbol 97 MovieClip in Frame 5
onClipEvent (keyDown) {
if (_parent.remove_flag) {
_parent.removeMovieClip("EndLev");
_parent.remove_flag = false;
_parent.go_flag = true;
_parent.gotoAndPlay(5);
} else {
if (!_parent.timer_flag) {
_parent.timer_flag = true;
_parent.first_time = getTimer();
}
if ((Key.getCode() == Key.UP) && (_parent.dy != 1)) {
_parent.last_pressed = 1;
_parent.first_flag = false;
} else if ((Key.getCode() == Key.DOWN) && (_parent.dy != -1)) {
_parent.last_pressed = 2;
_parent.first_flag = false;
} else if (((Key.getCode() == Key.RIGHT) && (_parent.dx != -1)) && (!_parent.first_flag)) {
_parent.last_pressed = 3;
} else if ((Key.getCode() == Key.LEFT) && (_parent.dx != 1)) {
_parent.last_pressed = 4;
_parent.first_flag = false;
}
}
}
Frame 6
if (sux_flag) {
tellTarget ((("x" + boax[0]) + "y") + boay[0]) {
gotoAndPlay (2);
stop();
};
sux_flag = false;
}
scores = score;
levels = level;
lives = life;
to_eats = to_collect - collected;
if (timer_flag) {
help_time = int((getTimer() - first_time) / 1000);
times = int(help_time / 60) + ":";
if (times.length == 2) {
times = "0" + times;
}
if (String(help_time % 60).length == 1) {
times = times + "0";
}
times = times + (help_time % 60);
} else {
first_time - getTimer();
times = "00:00";
}
if (remove_flag) {
stop();
}
if (go_flag) {
go_flag = false;
if (level < max_level) {
level++;
dx = 0;
dy = 0;
last_pressed = 0;
tail_bonus = 0;
time_bonus = 0;
level_score = 0;
load_level(level);
draw_field();
tellTarget ((("x" + boax[0]) + "y") + boay[0]) {
_rotation = 270;
};
} else {
gotoAndPlay (7);
}
}
x = boax[0];
y = boay[0];
if (counter == 2) {
if ((last_pressed == 1) && ((field(x, y - 1) < 4) || (100 < field(x, y - 1)))) {
dx = 0;
dy = -1;
last_pressed = 0;
rotation = 0;
} else if ((last_pressed == 2) && ((field(x, y + 1) < 4) || (100 < field(x, y + 1)))) {
dx = 0;
dy = 1;
last_pressed = 0;
rotation = 180;
} else if ((last_pressed == 3) && ((field(x + 1, y) < 4) || (100 < field(x + 1, y)))) {
dx = 1;
dy = 0;
last_pressed = 0;
rotation = 90;
} else if ((last_pressed == 4) && ((field(x - 1, y) < 4) || (100 < field(x - 1, y)))) {
dx = -1;
dy = 0;
last_pressed = 0;
rotation = 270;
}
x = boax[0];
y = boay[0];
if (((((((x + dx) != boax[boalength - 1]) || ((y + dy) != boay[boalength - 1])) && ((0 < field(x + 1, y)) && (field(x + 1, y) < 99))) && ((0 < field(x - 1, y)) && (field(x - 1, y) < 99))) && ((0 < field(x, y + 1)) && (field(x, y + 1) < 99))) && ((0 < field(x, y - 1)) && (field(x, y - 1) < 99))) {
tellTarget ((("x" + boax[0]) + "y") + boay[0]) {
gotoAndPlay (3);
};
if (sound_flag) {
Sound3.start();
}
life--;
if (life >= 0) {
dx = 0;
dy = 0;
last_pressed = 0;
load_level(level);
sux_flag = true;
draw_field();
tellTarget ((("x" + boax[0]) + "y") + boay[0]) {
gotoAndPlay (3);
stop();
};
gotoAndPlay (5);
} else {
if (sound_flag) {
Sound4.start();
}
gotoAndPlay (7);
}
}
move_boa(dx, dy);
counter = 0;
} else {
counter++;
}
if (!remove_flag) {
gotoAndPlay (5);
} else {
stop();
}
Frame 7
draw_field();
removeMovieClip("EndLev");
if (life < 0) {
attachMovie("GameOverSymbol", "gms", 999);
tellTarget ((("x" + boax[0]) + "y") + boay[0]) {
gotoAndPlay (3);
};
} else {
attachMovie("WinSymbol", "gms", 999);
tellTarget ((("x" + boax[0]) + "y") + boay[0]) {
gotoAndPlay (2);
};
}
tellTarget ("gms") {
_x = 275;
_y = 200;
};
stop();
Frame 8
removeMovieClip("gms");
attachMovie("BGame", "gms", 999);
tellTarget ("gms") {
_x = 275;
_y = 200;
};
stop();
Symbol 30 MovieClip [image3] Frame 1
stop();
Symbol 30 MovieClip [image3] Frame 2
stop();
Symbol 30 MovieClip [image3] Frame 3
stop();
Symbol 62 Button
on (release) {
_parent.gotoAndPlay(8);
}
Symbol 65 Button
on (release) {
_parent.gotoAndPlay(8);
}
Symbol 71 Button
on (release) {
_parent.gotoAndPlay(4);
}
Symbol 73 Button
on (release) {
_parent.gotoAndPlay(4);
}
Symbol 79 Button
on (release) {
var stSend = ((((((((_root.score + "\t") + 0) + "\t") + stName) + "\t") + "boa") + "\t") + "web");
getURL ("http://absolutist.com/cgi-bin/gameres.pl?g=boa&e=" + _root.Crypto(stSend), "blank");
_parent.gotoAndPlay(4);
}
Symbol 101 Button
on (release) {
gotoAndPlay (4);
}
Symbol 112 Button
on (release) {
sound_flag = !sound_flag;
if (sound_flag) {
soundout = "Sound On";
} else {
soundout = "Sound Off";
}
}
Symbol 118 Button
on (release) {
var s = "^jjf0%%WXiebkj_ij$Yec";
var sd = "";
var i = 0;
while (i < s.length) {
sd = sd + String.fromCharCode(s.charCodeAt(i) + 10);
i++;
}
sd = sd + "/?r=sboa";
getURL (sd, "blank");
}
Symbol 125 Button
on (release) {
var s = "^jjf0%%WXiebkj_ij$Yec";
var sd = "";
var i = 0;
while (i < s.length) {
sd = sd + String.fromCharCode(s.charCodeAt(i) + 10);
i++;
}
sd = sd + "/?r=sboa";
getURL (sd, "blank");
}