Frame 1
function my_delayedFunction() {
play();
trace("delay done");
}
stop();
setTimeout(my_delayedFunction, 5000, "fivesecond delay");
Frame 37
stop();
Frame 42
stop();
Frame 43
function initGame() {
score = 0;
scoreCounter(0);
lives = 5;
lives_dt.text = 5;
level = 1;
level_dt.text = level;
clear_percent = 0;
initLevel();
_root.sound_tema.gotoAndStop(2);
}
function saveCutingPoint() {
cuting_points[cuting_index] = new Object();
cuting_points[cuting_index].x = cuter_x;
cuting_points[cuting_index].y = cuter_y;
cuting_index++;
}
function moveCuter() {
if (!cuter_flag) {
if (field_array[cuter_x + cuter_x_direction][cuter_y + cuter_y_direction] == 3) {
cuter_x = cuter_x + cuter_x_direction;
cuter_y = cuter_y + cuter_y_direction;
} else if (field_array[cuter_x + cuter_x_direction][cuter_y + cuter_y_direction] == 1) {
cuter_last_pos_x = cuter_x;
cuter_last_pos_y = cuter_y;
cuting_points = new Array();
cuting_index = 0;
cuter_flag = true;
sound_pila_flag = false;
}
} else if ((cuter_x_direction != 0) || (cuter_y_direction != 0)) {
if (field_array[cuter_x + cuter_x_direction][cuter_y + cuter_y_direction] == 1) {
playPilaSound();
cuter_x = cuter_x + cuter_x_direction;
cuter_y = cuter_y + cuter_y_direction;
saveCutingPoint();
field_array[cuter_x][cuter_y] = 2;
field[(("square" + cuter_x) + "_") + cuter_y].nextFrame();
} else if (field_array[cuter_x + cuter_x_direction][cuter_y + cuter_y_direction] == 3) {
if (field_array[cuter_x][cuter_y] == 2) {
cuter_x = cuter_x + cuter_x_direction;
cuter_y = cuter_y + cuter_y_direction;
saveCutingPoint();
deleteCutingField();
} else {
cuter_flag = false;
}
} else if (field_array[cuter_x + cuter_x_direction][cuter_y + cuter_y_direction] == 2) {
dieCuter();
}
}
this.cuter._x = X0 + (cuter_x * SCALE);
this.cuter._y = Y0 + (cuter_y * SCALE);
}
function stopPilaSound() {
sound_pila.stop();
sound_pila_flag = false;
}
function playPilaSound() {
if (!sound_pila_flag) {
sound_pila.start(0, 99);
sound_pila_flag = true;
}
}
function globalVolume(vol_level) {
sound_pila.volume(vol_level);
}
function stopCuter() {
cuter_x_direction = 0;
cuter_y_direction = 0;
}
function dieCuter() {
stopPilaSound();
var _local1 = 0;
while (_local1 < cuting_points.length) {
field_array[cuting_points[_local1].x][cuting_points[_local1].y] = 1;
field[(("square" + cuting_points[_local1].x) + "_") + cuting_points[_local1].y].gotoAndStop(1);
_local1++;
}
cuter_x = cuter_last_pos_x;
cuter_y = cuter_last_pos_y;
livesCounter();
cuter_flag = false;
stopCuter();
}
function stack(any_value) {
if (any_value != undefined) {
stack_array[stack_index] = any_value;
stack_index++;
} else {
stack_index--;
return(stack_array[stack_index]);
}
}
function deleteCutingField() {
var _local3 = this;
var _local2 = _root;
stopPilaSound();
var _l3 = new Array();
var _local1 = 0;
while (_local1 < cuting_points.length) {
field_array[cuting_points[_local1].x][cuting_points[_local1].y] = 3;
field[(("square" + cuting_points[_local1].x) + "_") + cuting_points[_local1].y].gotoAndStop(3);
_local1++;
}
percentClearCalculator(cuting_points.length);
stopCuter();
findCutingSection();
restoreFillArray();
cuter_flag = false;
if (clear_percent >= complete_percent) {
delete _local3.onEnterFrame;
_local3.nextLevel._visible = true;
_local3.nextLevel.current_level_dt.text = level;
level++;
if (level == 6) {
_local2.nextLevel.play();
level--;
}
_local2.sound_do.gotoAndPlay(2);
_local2.sound_tema.gotoAndPlay(3);
}
}
function fillSection(old_num, new_num) {
var _local1 = new Object();
var _l5 = false;
var _local3 = 1;
while (_local3 < (H_MAX_CELLS - 1)) {
var _local2 = 1;
while (_local2 < (V_MAX_CELLS - 1)) {
if (field_array[_local3][_local2] == old_num) {
_local1.x = _local3;
_local1.y = _local2;
_l5 = true;
break;
}
_local2++;
}
_local3++;
}
if (!_l5) {
return(false);
}
stack(_local1);
while (stack_index > 0) {
_local1 = stack();
field_array[_local1.x][_local1.y] = new_num;
if (field_array[_local1.x + 1][_local1.y] == old_num) {
temp_object2 = new Object();
temp_object2.x = _local1.x + 1;
temp_object2.y = _local1.y;
stack(temp_object2);
}
if (field_array[_local1.x - 1][_local1.y] == old_num) {
temp_object2 = new Object();
temp_object2.x = _local1.x - 1;
temp_object2.y = _local1.y;
stack(temp_object2);
}
if (field_array[_local1.x][_local1.y + 1] == old_num) {
temp_object2 = new Object();
temp_object2.x = _local1.x;
temp_object2.y = _local1.y + 1;
stack(temp_object2);
}
if (field_array[_local1.x][_local1.y - 1] == old_num) {
temp_object2 = new Object();
temp_object2.x = _local1.x;
temp_object2.y = _local1.y - 1;
stack(temp_object2);
}
}
return(true);
}
function saveFillArray() {
var _local2 = 1;
while (_local2 < (H_MAX_CELLS - 1)) {
var _local1 = 1;
while (_local1 < (V_MAX_CELLS - 1)) {
if (field_array[_local2][_local1] == 4) {
field_array[_local2][_local1] = 5;
}
_local1++;
}
_local2++;
}
}
function percentClearCalculator(cleared) {
clear_counter = clear_counter + cleared;
clear_percent = int((clear_counter / CELLS_COUNT) * 100);
percent_dt.text = clear_percent + "%";
}
function scoreCounter(bonus_num) {
var _local2;
score = score + bonus_num;
score_dt.text = score;
_local2 = score_dt.text.length;
score_dt.text = "";
var _local1 = 0;
while (_local1 < (8 - _local2)) {
score_dt.text = score_dt.text + "0";
_local1++;
}
score_dt.text = score_dt.text + score;
}
function livesCounter() {
var _local1 = _root;
lives--;
if (lives >= 1) {
_local1.sound_live.play();
}
lives_dt.text = lives;
if (lives <= 0) {
delete this.onEnterFrame;
this.gameOverWindow._visible = true;
_local1.sound_tema.gotoAndPlay(3);
_local1.sound_fal.gotoAndPlay(2);
}
}
function clearFillArray() {
var _local3 = 0;
var _local2 = 1;
while (_local2 < (H_MAX_CELLS - 1)) {
var _local1 = 1;
while (_local1 < (V_MAX_CELLS - 1)) {
if (field_array[_local2][_local1] == 4) {
field_array[_local2][_local1] = 3;
field[(("square" + _local2) + "_") + _local1].gotoAndStop(3);
_local3++;
scoreCounter(10);
}
_local1++;
}
_local2++;
}
percentClearCalculator(_local3);
}
function restoreFillArray() {
var _local2 = 1;
while (_local2 < (H_MAX_CELLS - 1)) {
var _local1 = 1;
while (_local1 < (V_MAX_CELLS - 1)) {
if (field_array[_local2][_local1] == 5) {
field_array[_local2][_local1] = 1;
}
_local1++;
}
_local2++;
}
}
function findCutingSection() {
var _local2 = this;
if (fillSection(1, 4)) {
var _local1 = 1;
while (_local2["ball" + _local1] != undefined) {
if (field_array[_local2["ball" + _local1].x_array][_local2["ball" + _local1].y_array] == 4) {
saveFillArray();
findCutingSection();
break;
}
_local1++;
}
clearFillArray();
findCutingSection();
}
}
function moveBall(self_mc) {
var _local1 = self_mc;
if ((_local1._x == _local1.next_pixel_x) && (_local1._y == _local1.next_pixel_y)) {
moveToNextCell(_local1);
} else {
_local1._x = _local1._x + (_local1.x_direction * BALL_SPEED);
_local1._y = _local1._y + (_local1.y_direction * BALL_SPEED);
}
}
function moveToNextCell(self_mc) {
var _local1 = self_mc;
if (field_array[_local1.x_array + _local1.x_direction][_local1.y_array + _local1.y_direction] == 2) {
dieCuter();
}
if (field_array[_local1.x_array + _local1.x_direction][_local1.y_array] != 1) {
_local1.x_direction = _local1.x_direction * -1;
}
if (field_array[_local1.x_array][_local1.y_array + _local1.y_direction] != 1) {
_local1.y_direction = _local1.y_direction * -1;
}
if ((field_array[_local1.x_array][_local1.y_array + _local1.y_direction] == 1) && (field_array[_local1.x_array + _local1.x_direction][_local1.y_array] == 1)) {
if (field_array[_local1.x_array + _local1.x_direction][_local1.y_array + _local1.y_direction] != 1) {
_local1.x_direction = _local1.x_direction * -1;
_local1.y_direction = _local1.y_direction * -1;
}
}
_local1.x_array = _local1.x_array + _local1.x_direction;
_local1.y_array = _local1.y_array + _local1.y_direction;
_local1.next_pixel_x = X0 + (_local1.x_array * SCALE);
_local1.next_pixel_y = Y0 + (_local1.y_array * SCALE);
}
function initLevel() {
var _loc2 = this;
cuter_x = 0;
cuter_y = 0;
cuting_index = 0;
stack_index = 0;
layer_index = 100;
field_array = new Array();
stack_array = new Array();
cuting_points = new Array();
clear_counter = 0;
percent_dt.text = "0%";
level_dt.text = level;
stopCuter();
_loc2.nextLevel._visible = false;
_loc2.gameOverWindow._visible = false;
gotoAndStop("level" + level);
var _local3 = 0;
while (_local3 < H_MAX_CELLS) {
field_array[_local3] = new Array();
var _local1 = 0;
while (_local1 < V_MAX_CELLS) {
if ((_local1 == 0) || (_local1 == (V_MAX_CELLS - 1))) {
field_array[_local3][_local1] = 3;
} else if ((_local3 == 0) || (_local3 == (H_MAX_CELLS - 1))) {
field_array[_local3][_local1] = 3;
} else {
field_array[_local3][_local1] = 1;
_loc2.field.attachMovie("lib_square", (("square" + _local3) + "_") + _local1, layer_index++);
_loc2.field[(("square" + _local3) + "_") + _local1]._x = X0 + (_local3 * SCALE);
_loc2.field[(("square" + _local3) + "_") + _local1]._y = Y0 + (_local1 * SCALE);
}
_local1++;
}
_local3++;
}
_local3 = 1;
var _local2;
while (_loc2["ball" + _local3] != undefined) {
_loc2["ball" + _local3].x_array = random(H_MAX_CELLS - 2) + 1;
_loc2["ball" + _local3].y_array = random(V_MAX_CELLS - 2) + 1;
_local2 = random(2);
if (_local2 == 0) {
_local2 = -1;
}
_loc2["ball" + _local3].x_direction = _local2;
_local2 = random(2);
if (_local2 == 0) {
_local2 = -1;
}
_loc2["ball" + _local3].y_direction = _local2;
_loc2["ball" + _local3]._x = X0 + (_loc2["ball" + _local3].x_array * SCALE);
_loc2["ball" + _local3]._y = Y0 + (_loc2["ball" + _local3].y_array * SCALE);
_loc2["ball" + _local3].next_pixel_x = _loc2["ball" + _local3]._x;
_loc2["ball" + _local3].next_pixel_y = _loc2["ball" + _local3]._y;
_loc2["ball" + _local3].step_counter = 0;
_local3++;
}
delete _loc2.onEnterFrame;
_loc2.onEnterFrame = function () {
var _local2 = this;
moveCuter();
var _local1 = 1;
while (_local2["ball" + _local1] != undefined) {
moveBall(_local2["ball" + _local1]);
_local1++;
}
};
}
var complete_percent = 80;
Sound.prototype.volume = function (volume_level) {
if (volume_level != undefined) {
this.setVolume(volume_level);
} else {
return(this.getVolume());
}
};
var H_MAX_CELLS = 36;
var V_MAX_CELLS = 52;
var CELLS_COUNT = ((H_MAX_CELLS - 0) * (V_MAX_CELLS - 0));
var X0 = 76;
var Y0 = 41;
var SCALE = 10;
var BALL_SPEED = 10;
var STEP_COUNT = (SCALE / BALL_SPEED);
var layer_index;
var cuter_flag = false;
var cuter_x_direction;
var cuter_y_direction;
var cuter_x;
var cuter_y;
var cuting_index;
var cuter_last_pos_x;
var cuter_last_pos_y;
var stack_index = 0;
var score;
var lives;
var level;
var clear_counter;
var clear_percent;
var general_volume = 100;
var mute_flag = false;
var control_listener = new Object();
var control_flag = false;
var field_array = new Array();
var cuting_points = new Array();
var stack_array = new Array();
var sound_pila_flag = false;
var sound_pila = new Sound(this.cuter);
sound_pila.attachSound("pila_snd");
control_listener.onKeyDown = function () {
if (!control_flag) {
if (Key.isDown(39)) {
cuter_x_direction = 1;
cuter_y_direction = 0;
} else if (Key.isDown(37)) {
cuter_x_direction = -1;
cuter_y_direction = 0;
} else if (Key.isDown(38)) {
cuter_x_direction = 0;
cuter_y_direction = -1;
} else if (Key.isDown(40)) {
cuter_x_direction = 0;
cuter_y_direction = 1;
} else if (Key.isDown(32)) {
cuter_x_direction = 0;
cuter_y_direction = 0;
} else if (Key.isDown(Key.getCode(77))) {
if (!mute_flag) {
globalVolume(0);
mute_flag = true;
} else {
globalVolume(general_volume);
mute_flag = false;
}
}
}
control_flag = true;
};
control_listener.onKeyUp = function () {
control_flag = false;
};
Key.addListener(control_listener);
initGame();
stop();
Frame 47
complete_percent = 80;
clear_percent = 0;
_root.sound_tema.gotoAndStop(2);
Frame 52
complete_percent = 80;
clear_percent = 0;
_root.sound_tema.gotoAndStop(2);
Frame 57
complete_percent = 80;
clear_percent = 0;
_root.sound_tema.gotoAndStop(2);
Frame 62
complete_percent = 80;
clear_percent = 0;
_root.sound_tema.gotoAndStop(2);
Symbol 2 MovieClip [lib_square] Frame 1
stop();
Symbol 6 Button
on (release) {
getURL ("http://www.hornygamer.com", "_blank");
}
Symbol 9 Button
on (release) {
getURL ("http://www.hornygamer.com", "_blank");
}
Symbol 12 Button
on (release) {
getURL ("http://www.hornygamer.com", "_blank");
}
Symbol 15 Button
on (release) {
getURL ("http://www.hornygamer.com", "_blank");
}
Symbol 33 Button
on (release) {
getURL ("javascript:self.close()");
}
Symbol 38 MovieClip Frame 1
stop();
Symbol 48 MovieClip Frame 1
var percents = 0;
startTimer = getTimer;
Symbol 48 MovieClip Frame 2
clock = elapsed;
total = _root.getBytesTotal();
loaded = _root.getBytesLoaded();
left = total - loaded;
elapsed = int((getTimer() - starttimer) / 1000);
elapsedm = int(elapsed / 60);
elapseds = int(elapsed - (elapsedm * 60));
elapsedd = (((("?????? ???????: " + elapsedm) + " ???.") + " ") + elapseds) + " ???.";
if (elapsed != clock) {
bps = int(loaded / elapsed);
bpsd = bps + " bps";
}
leftt = int(left / bps);
leftm = int(leftt / 60);
lefts = int(leftt - (leftm * 60));
leftd = (((("????????: " + leftm) + " m") + " ") + lefts) + " s";
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
percents = percents + 5;
if (percents > 100) {
percents = 100;
}
} else {
percents = Math.floor((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
}
gauge.gotoAndStop(percents + 1);
label = percents;
Symbol 48 MovieClip Frame 3
if (percents < 100) {
gotoAndPlay (2);
} else {
_visible = false;
_root.gotoAndPlay("play");
stop();
}
Symbol 51 MovieClip Frame 29
stop();
Symbol 57 Button
on (release) {
play();
}
Symbol 89 MovieClip Frame 1
stop();
Symbol 89 MovieClip Frame 2
stop();
Symbol 89 MovieClip Frame 3
stop();
Symbol 91 MovieClip Frame 1
l.l.gotoAndStop(int(random(4) + 1));
l.gotoAndPlay(int(random(l._totalFrames + 1)));
_xscale = ((_parent["l" + n]._xscale + random(20)) - 10);
_x = ((_parent["l" + n]._x + random(10)) - 5);
Symbol 91 MovieClip Frame 231
t = random(10);
Symbol 91 MovieClip Frame 232
t--;
if (t < 1) {
gotoAndPlay (1);
}
Symbol 91 MovieClip Frame 233
gotoAndPlay(_currentframe - 1);
Symbol 92 MovieClip Frame 1
i = 0;
while (i < max) {
if (i) {
duplicateMovieClip ("l0", "l" + i, i);
}
this["l" + i].gotoAndPlay(int(random(l0._totalFrames + 1)));
this["l" + i].l.gotoAndPlay(int(random(l0.l._totalFrames + 1)));
this["l" + i].l.l.gotoAndStop(int(random(4) + 1));
this["l" + i].n = i;
i++;
}
stop();
l0.n = max - 1;
Symbol 93 MovieClip Frame 1
stop();
Instance of Symbol 92 MovieClip in Symbol 93 MovieClip Frame 1
//component parameters
onClipEvent (initialize) {
h = 300;
w = 400;
max = 30;
}
//component parameters
onClipEvent (initialize) {
h = 300;
w = 400;
max = 30;
}
Symbol 97 MovieClip Frame 46
stop();
Symbol 97 MovieClip Frame 150
stop();
_root.nextLevel.play();
Symbol 97 MovieClip Frame 271
stop();
_root.nextLevel.play();
Symbol 97 MovieClip Frame 385
stop();
_root.nextLevel.play();
Symbol 97 MovieClip Frame 484
stop();
_root.nextLevel.play();
Symbol 98 MovieClip Frame 1
_root.sound_tema.gotoAndStop(2);
Symbol 98 MovieClip Frame 40
stop();
Symbol 98 MovieClip Frame 41
_root.sound_tema.gotoAndStop(1);
Symbol 98 MovieClip Frame 71
_root.sound_up.gotoAndPlay(2);
Symbol 98 MovieClip Frame 185
stop();
_root.play();
Symbol 101 Button
on (release) {
_root.sound_tema.gotoAndStop(1);
nextFrame();
}
Symbol 105 Button
on (release) {
_root.sound_tema.play();
prevFrame();
}
Symbol 106 MovieClip Frame 1
stop();
Symbol 106 MovieClip Frame 2
stop();
Symbol 109 MovieClip Frame 1
stop();
Symbol 111 MovieClip Frame 1
stop();
Symbol 113 MovieClip Frame 1
stop();
Symbol 115 MovieClip Frame 1
stop();
Symbol 117 MovieClip Frame 1
stop();
Symbol 117 MovieClip Frame 2
stop();
Symbol 133 Button
on (release) {
_root.nextLevel.gotoAndStop(1);
_parent.initGame();
_root.sound_tema.gotoAndStop(2);
}
Symbol 137 Button
on (release) {
play();
}
Symbol 150 Button
on (release) {
_parent.initGame();
gotoAndStop (1);
}
Symbol 154 MovieClip Frame 1
stop();
Symbol 154 MovieClip Frame 2
stop();
_root.nextLevel.stakan.gotoAndPlay(47);
_root.sound_tema.gotoAndStop(1);
_root.sound_up.gotoAndPlay(2);
Symbol 154 MovieClip Frame 29
_parent.initLevel();
Symbol 154 MovieClip Frame 30
stop();
Symbol 154 MovieClip Frame 31
stop();
_root.nextLevel.stakan.gotoAndPlay(151);
_root.sound_tema.gotoAndStop(1);
_root.sound_up.gotoAndPlay(2);
Symbol 154 MovieClip Frame 58
_parent.initLevel();
Symbol 154 MovieClip Frame 59
stop();
Symbol 154 MovieClip Frame 60
stop();
_root.nextLevel.stakan.gotoAndPlay(272);
_root.sound_tema.gotoAndStop(1);
_root.sound_up.gotoAndPlay(2);
Symbol 154 MovieClip Frame 87
_parent.initLevel();
Symbol 154 MovieClip Frame 88
stop();
Symbol 154 MovieClip Frame 89
stop();
_root.nextLevel.stakan.gotoAndPlay(386);
_root.sound_tema.gotoAndStop(1);
_root.sound_up.gotoAndPlay(2);
Symbol 154 MovieClip Frame 116
_parent.initLevel();
Symbol 154 MovieClip Frame 117
stop();
Symbol 154 MovieClip Frame 369
stop();