Frame 1
function func_url() {
getURL (sponsorurl, "_blank");
}
function create_clouds() {
_root.createEmptyMovieClip("menu_clouds", _root.getNextHighestDepth());
menu_clouds.attachMovie("o_preloader_gr", "o_mountains_3", 3);
menu_clouds.o_mountains_3._x = 320;
menu_clouds.o_mountains_3._y = 557;
menu_clouds.o_mountains_3.gotoAndStop(1);
menu_clouds.attachMovie("o_vint", "o_mountains_4", 4);
menu_clouds.o_mountains_4._x = 327;
menu_clouds.o_mountains_4._y = 365;
_root.createEmptyMovieClip("clouds_1", _root.getNextHighestDepth());
_root.createEmptyMovieClip("clouds_2", _root.getNextHighestDepth());
_root.createEmptyMovieClip("clouds_3", _root.getNextHighestDepth());
var _local2 = 0;
while (_local2 < 4) {
clouds_1.attachMovie("o_cloud", "o_cloud_" + _local2, _local2);
clouds_1["o_cloud_" + _local2]._x = 135 + (_local2 * 300);
clouds_1["o_cloud_" + _local2]._y = 45 + (_local2 * 110);
clouds_1["o_cloud_" + _local2]._xscale = 100 - (_local2 * 5);
clouds_1["o_cloud_" + _local2]._yscale = clouds_1["o_cloud_" + _local2]._xscale;
clouds_1["o_cloud_" + _local2].gotoAndStop(random(4));
_local2 = _local2 + 1;
}
clouds_1.o_cloud_2._x = 270;
clouds_1.o_cloud_2._y = 305;
clouds_1.o_cloud_3._x = 80;
clouds_1.o_cloud_3._y = 195;
clouds_2._x = 320;
_local2 = 0;
while (_local2 < 3) {
clouds_2.attachMovie("o_cloud", "o_cloud_" + _local2, _local2);
clouds_2["o_cloud_" + _local2]._x = 45 + (_local2 * 380);
clouds_2["o_cloud_" + _local2]._y = 35 + (_local2 * 80);
clouds_2["o_cloud_" + _local2]._xscale = 100 - (_local2 * 10);
clouds_2["o_cloud_" + _local2]._yscale = clouds_2["o_cloud_" + _local2]._xscale;
clouds_2["o_cloud_" + _local2].gotoAndStop(random(4));
_local2 = _local2 + 1;
}
clouds_2.o_cloud_2._x = 170;
clouds_2.o_cloud_2._y = 205;
clouds_3._x = -320;
_local2 = 0;
while (_local2 < 3) {
clouds_3.attachMovie("o_cloud", "o_cloud_" + _local2, _local2);
clouds_3["o_cloud_" + _local2]._x = 255 + (_local2 * 180);
clouds_3["o_cloud_" + _local2]._y = 75 + (_local2 * 55);
clouds_3["o_cloud_" + _local2]._xscale = 100 - (_local2 * 7);
clouds_3["o_cloud_" + _local2]._yscale = clouds_3["o_cloud_" + _local2]._xscale;
clouds_3["o_cloud_" + _local2].gotoAndStop(random(4));
_local2 = _local2 + 1;
}
clouds_3.o_cloud_2._x = 140;
clouds_3.o_cloud_2._y = 275;
menu_clouds.attachMovie("o_preloader_gr", "o_mountains_5", 5);
menu_clouds.o_mountains_5.gotoAndStop(3);
menu_clouds.o_mountains_5._x = 320;
menu_clouds.o_mountains_5._y = 240;
}
function clouds_move() {
clouds_1._x = clouds_1._x + 0.5;
clouds_2._x = clouds_2._x + 0.75;
clouds_3._x = clouds_3._x + 1;
if (clouds_1._x > 625) {
clouds_1._x = -500;
}
if (clouds_2._x > 640) {
clouds_2._x = -520;
}
if (clouds_3._x > 550) {
clouds_3._x = -500;
}
}
function visible_st(x) {
alarm_0 = alarm_0 + 1;
if (alarm_0 == x) {
preloader_all.loading1._visible = 1 - preloader_all.loading1._visible;
alarm_0 = 0;
}
}
function alpha_st(x, y) {
if (x._alpha >= 120) {
a = 1;
} else if (x._alpha <= 0) {
a = 0;
}
if (a == 0) {
x._alpha = x._alpha + y;
} else if (a == 1) {
x._alpha = x._alpha - y;
}
}
function PlaySound(x) {
if (sound_enable == 1) {
x.start();
}
}
function PlayMusic(x) {
if (music_enable == 1) {
pre_music.stop();
x.start(0, 999);
pre_music = x;
}
}
function create_panel() {
_root.createEmptyMovieClip("panel_mm", _root.getNextHighestDepth());
panel_mm.createTextField("credits1", 17, 50, 50, 300, 300);
panel_mm.credits1.text = "Authors: Nonamez, .\r inspired by Talesworth Adventure";
panel_mm.credits1.setTextFormat(format_credits);
panel_mm.credits1.setNewTextFormat(format_credits);
panel_mm.credits1.embedFonts = true;
panel_mm.credits1.selectable = false;
panel_mm.credits1._x = 175;
panel_mm.credits1._y = 440;
panel_mm.createTextField("credits2", 18, 50, 50, 300, 300);
panel_mm.credits2.text = "SilenGames";
panel_mm.credits2.setTextFormat(format_credits);
panel_mm.credits2.setNewTextFormat(format_credits);
panel_mm.credits2.embedFonts = true;
panel_mm.credits2.selectable = false;
panel_mm.credits2._x = 233;
panel_mm.credits2._y = 440;
panel_mm.attachMovie("o_panel", "o_panel_0", 300);
panel_mm.o_panel_0._x = 615;
panel_mm.o_panel_0._y = 15;
panel_mm.o_panel_0.gotoAndStop(1);
panel_mm.attachMovie("o_but_music", "o_panel_1", 301);
panel_mm.o_panel_1._x = panel_mm.o_panel_0._x - 55;
panel_mm.o_panel_1._y = panel_mm.o_panel_0._y - 11;
if (music_enable == 0) {
panel_mm.o_panel_1.gotoAndStop(3);
panel_mm.o_panel_1.curr = 3;
} else if (music_enable == 1) {
panel_mm.o_panel_1.gotoAndStop(1);
panel_mm.o_panel_1.curr = 1;
}
panel_mm.attachMovie("o_but_sound", "o_panel_2", 302);
panel_mm.o_panel_2._x = panel_mm.o_panel_0._x - 80;
panel_mm.o_panel_2._y = panel_mm.o_panel_0._y - 10;
if (sound_enable == 0) {
panel_mm.o_panel_2.gotoAndStop(3);
panel_mm.o_panel_2.curr = 3;
} else if (sound_enable == 1) {
panel_mm.o_panel_2.gotoAndStop(1);
panel_mm.o_panel_2.curr = 1;
}
}
_global.sponsorurl = "http://www.armorgames.com/";
_global.walkurl = "http://armorgames.com/guide/save-the-princess-and-ninja-painter-walk-through";
urlStart = _url.indexOf("://") + 3;
urlEnd = _url.indexOf("/", urlStart);
domain = _url.substring(urlStart, urlEnd);
LastDot = domain.lastIndexOf(".") - 1;
domEnd = domain.lastIndexOf(".", LastDot) + 1;
domain = domain.substring(domEnd, domain.length);
if (domain != "armorgames.com") {
_root._y = -500;
stop();
}
stop();
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
_root.menu = myMenu;
var myMenuItem1 = new ContextMenuItem("More games", func_url, true);
myMenu.customItems.push(myMenuItem1);
var s_flourish = new Sound();
s_flourish.attachSound("s_flourish");
var s_click = new Sound();
s_click.attachSound("click_1");
var fl_played = 0;
var achieve_played = 0;
var try_number = 0;
var cur_try = 0;
var sound_enable = 1;
var music_enable = 1;
var tool_after_restart = 0;
var sData_so = SharedObject.getLocal("sData", "/");
var distance = 0;
var angleInDegrees = 0;
var color = 1465255;
var alpha = 1;
var blurX = 2;
var blurY = 2;
var strength = 5;
var quality = 3;
var inner = false;
var knockout = false;
var hideObject = false;
var format_credits = new TextFormat();
format_credits.font = "Berlin Sans FB 1";
format_credits.color = 9014946 /* 0x898EA2 */;
format_credits.size = 15;
format_credits.bold = false;
format_credits.align = "center";
var go_menuu = 0;
var current_loaded = 0;
var all_loaded = _root.getBytesTotal();
var alarm_0 = 0;
var format_preload = new TextFormat();
format_preload.font = "Luvable";
format_preload.color = 15790320 /* 0xF0F0F0 */;
format_preload.size = 18;
if (sData_so.data.sound_enable != undefined) {
sound_enable = sData_so.data.sound_enable;
}
if (sData_so.data.music_enable != undefined) {
music_enable = sData_so.data.music_enable;
}
var a = 1;
create_clouds();
_root.createEmptyMovieClip("preloader_all", _root.getNextHighestDepth());
_root.createEmptyMovieClip("make_black_2", this.getNextHighestDepth());
make_black_2.aaa = 0;
make_black_2.beginFill(723723);
make_black_2.moveTo(0, 0);
make_black_2.lineTo(640, 0);
make_black_2.lineTo(640, 480);
make_black_2.lineTo(0, 480);
make_black_2.lineTo(0, 0);
make_black_2.endFill();
make_black_2._alpha = 0;
make_black_2._visible = 1;
preloader_all.attachMovie("o_progress_bar", "o_preloader_1", 1);
preloader_all.o_preloader_1.gotoAndStop(1);
preloader_all.o_preloader_1._x = 158;
preloader_all.o_preloader_1._y = 433;
preloader_all.attachMovie("o_progress_bar", "o_preloader_4", 4);
preloader_all.o_preloader_4.gotoAndStop(3);
preloader_all.o_preloader_4._x = 158;
preloader_all.o_preloader_4._y = 433;
preloader_all.attachMovie("o_progress_bar", "o_preloader_2", 2);
preloader_all.o_preloader_2.gotoAndStop(2);
preloader_all.o_preloader_2._x = 171;
preloader_all.o_preloader_2._y = 433;
preloader_all.o_preloader_2._xscale = 0;
preloader_all.attachMovie("o_preloader_gr", "o_preloader_3", 3);
preloader_all.o_preloader_3.gotoAndStop(2);
preloader_all.o_preloader_3._x = 323;
preloader_all.o_preloader_3._y = 208;
preloader_all.createTextField("loading1", 5, 50, 50, 400, 400);
preloader_all.loading1.setTextFormat(format_preload);
preloader_all.loading1.setNewTextFormat(format_preload);
preloader_all.loading1.text = "Please wait, loading " + Math.round((100 * current_loaded) / all_loaded);
preloader_all.loading1.selectable = false;
preloader_all.loading1.embedFonts = true;
preloader_all.loading1._x = 206;
preloader_all.loading1._y = 439;
preloader_all.attachMovie("but_sponsor_logo_1", "o_sponsor_logo_1", 10);
preloader_all.o_sponsor_logo_1.gotoAndStop(1);
preloader_all.o_sponsor_logo_1._x = 50;
preloader_all.o_sponsor_logo_1._y = 42;
onEnterFrame = function () {
clouds_move();
current_loaded = _root.getBytesLoaded();
preloader_all.o_preloader_2._xscale = (100 * current_loaded) / all_loaded;
if (preloader_all.o_preloader_2._xscale < 100) {
preloader_all.loading1.text = ("Please wait, loading.. " + Math.round((100 * current_loaded) / all_loaded)) + " %";
} else if (preloader_all.o_preloader_2._xscale >= 100) {
if (fl_played == 0) {
PlaySound(s_flourish);
fl_played = 1;
}
preloader_all.loading1.text = "Click here to play";
preloader_all.loading1._x = 240;
alpha_st(preloader_all.loading1, 4);
}
preloader_all.loading1.filters = [new flash.filters.DropShadowFilter(distance, angleInDegrees, color, alpha, blurX, blurY, strength, quality, inner, knockout, hideObject)];
if (go_menuu == 1) {
if (make_black_2._alpha < 85) {
make_black_2._alpha = make_black_2._alpha + 15;
} else if ((make_black_2._alpha >= 85) and (make_black_2.aaa == 0)) {
make_black_2.aaa = 1;
setTimeout(function () {
make_black_2.removeMovieClip();
square_mc_3.removeMovieClip();
levels_2.removeMovieClip();
levels.removeMovieClip();
_root.menu_clouds.removeMovieClip();
_root.clouds_1.removeMovieClip();
_root.clouds_2.removeMovieClip();
_root.clouds_3.removeMovieClip();
gotoAndStop (2);
}, 200);
}
}
};
preloader_all.o_preloader_2.onRelease = function () {
if (preloader_all.o_preloader_2._xscale == 100) {
PlaySound(s_click);
armorpreloader.play();
preloader_all.removeMovieClip();
}
};
preloader_all.o_sponsor_logo_1.onRelease = function () {
getURL (sponsorurl, "_blank");
};
Frame 2
function Play_xscale(x, y) {
if ((x._xscale < 100) and (y == 0)) {
x._xscale = x._xscale + 10;
x._yscale = x._xscale;
x._rotation = x._rotation + 45;
} else if ((x._xscale >= 100) and (y == 0)) {
main_menu_xscale = 2;
levels_xscale = 2;
}
}
function rePlay_xscale(x, y, z) {
if ((x._xscale > 0) and (y == 1)) {
x._xscale = x._xscale - 10;
x._yscale = x._xscale;
x._rotation = x._rotation + 45;
} else if ((x._xscale <= 0) and (y == 1)) {
main_menu_xscale = 2;
gotoAndStop(z);
}
}
stop();
_root.panel_mm.removeMovieClip();
var main_menu_xscale = 0;
var go_to_level = 0;
var go_to_achieve = 0;
var open_levels = 1;
var return_to_levels = 0;
var stars_count = 0;
var hero_speed = 0;
var stars = new Array();
stars = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
var cake_count = 0;
var purple_count = 0;
var ach_count = 0;
var p_xspeed = 0;
var p_yspeed = 0;
var achiev_array = new Array();
achiev_array = [[0, "Genius", "Pass first level", 1], [0, "Princess lover", "Save 5 princesses", 5], [0, "Maybe enought?", "Save 15 princesses", 15], [0, "Philanderer", "Save 20 princesses", 20], [0, "Lucky number", "Get 7 stars", 7], [0, "Hang on the ceiling", "Get 14 stars", 14], [0, "Stargazer", "Get 21 stars", 21], [0, "Green suits you", "Kiss cursed princess", 1], [0, "Fat prince", "Eat 50 cakes", 50], [0, "Da KING", "Get all achievements", 9]];
if (sData_so.data.hero_speed != undefined) {
hero_speed = sData_so.data.hero_speed;
}
if (hero_speed == 0) {
p_xspeed = 4;
p_yspeed = 3;
} else if (hero_speed == 1) {
p_xspeed = 13;
p_yspeed = 7;
}
if (sData_so.data.achiev_array != undefined) {
achiev_array = sData_so.data.achiev_array;
}
if (sData_so.data.stars != undefined) {
stars = sData_so.data.stars;
}
if (sData_so.data.levels != undefined) {
open_levels = sData_so.data.levels + 1;
}
if (sData_so.data.cake_count != undefined) {
cake_count = sData_so.data.cake_count;
}
if (sData_so.data.purple_count != undefined) {
purple_count = sData_so.data.purple_count;
}
var cur_level_number = 0;
var starz = new Sound();
starz.attachSound("s_starz");
var s_menu_back = new Sound();
s_menu_back.attachSound("s_menu_back");
var s_click = new Sound();
s_click.attachSound("click_1");
var s_bul = new Sound();
s_bul.attachSound("s_bul");
var magic = new Sound();
magic.attachSound("magic");
var s_bubles = new Sound();
s_bubles.attachSound("s_bubles");
var s_door = new Sound();
s_door.attachSound("s_door");
var s_snowball = new Sound();
s_snowball.attachSound("s_snowball");
var s_teleport = new Sound();
s_teleport.attachSound("s_teleport");
var s_yohoho = new Sound();
s_yohoho.attachSound("s_yohoho");
var s_eat = new Sound();
s_eat.attachSound("s_eat");
var s_flourish = new Sound();
s_flourish.attachSound("s_flourish");
var s_magic_boom = new Sound();
s_magic_boom.attachSound("s_magic_boom");
var s_pain = new Sound();
s_pain.attachSound("s_pain");
var music_back = new Sound();
music_back.attachSound("music_back");
var s_fail = new Sound();
s_fail.attachSound("s_fail");
create_clouds();
_root.createEmptyMovieClip("main_menu", _root.getNextHighestDepth());
main_menu.attachMovie("o_after_level_menu", "o_after_level_menu1", 1);
main_menu.o_after_level_menu1.gotoAndStop(1);
main_menu.o_after_level_menu1._xscale = 120;
main_menu.o_after_level_menu1._yscale = 120;
main_menu._y = 240;
main_menu._x = 320;
main_menu.attachMovie("o_main_menu_logo", "o_after_level_menu2", 2);
main_menu.o_after_level_menu2._x = 0;
main_menu.o_after_level_menu2._y = -93;
main_menu.attachMovie("but_main_menu_start_game", "o_after_level_menu3", 3);
main_menu.o_after_level_menu3._x = 0;
main_menu.o_after_level_menu3._y = -10;
main_menu.attachMovie("but_main_menu_achievements", "o_after_level_menu4", 4);
main_menu.o_after_level_menu4._x = 0;
main_menu.o_after_level_menu4._y = 38;
main_menu.attachMovie("but_main_menu_walkthrough", "o_after_level_menu5", 5);
main_menu.o_after_level_menu5._x = 0;
main_menu.o_after_level_menu5._y = 88;
main_menu.attachMovie("but_main_menu_moregames", "o_after_level_menu6", 6);
main_menu.o_after_level_menu6._x = 0;
main_menu.o_after_level_menu6._y = 133;
main_menu.attachMovie("but_main_menu_facebook", "o_after_level_menu7", 7);
main_menu.o_after_level_menu7._x = -140;
main_menu.o_after_level_menu7._y = 180;
main_menu.attachMovie("but_main_menu_twitter", "o_after_level_menu8", 8);
main_menu.o_after_level_menu8._x = 140;
main_menu.o_after_level_menu8._y = 180;
main_menu._visible = 0;
main_menu._rotation = -90;
create_panel();
_root.createEmptyMovieClip("make_black_2", this.getNextHighestDepth());
make_black_2.aaa = 0;
make_black_2.beginFill(723723);
make_black_2.moveTo(0, 0);
make_black_2.lineTo(640, 0);
make_black_2.lineTo(640, 480);
make_black_2.lineTo(0, 480);
make_black_2.lineTo(0, 0);
make_black_2.endFill();
make_black_2._alpha = 0;
make_black_2._visible = 1;
_root.createEmptyMovieClip("square_mc_3", this.getNextHighestDepth());
square_mc_3.beginFill(723723);
square_mc_3.moveTo(0, 0);
square_mc_3.lineTo(640, 0);
square_mc_3.lineTo(640, 480);
square_mc_3.lineTo(0, 480);
square_mc_3.lineTo(0, 0);
square_mc_3.endFill();
square_mc_3._alpha = 80;
square_mc_3._visible = 1;
square_mc_3.bbb = 0;
setTimeout(function () {
main_menu._xscale = 0;
main_menu._yscale = 0;
PlayMusic(s_menu_back);
}, 1000);
onEnterFrame = function () {
if (square_mc_3._alpha > 0) {
square_mc_3._alpha = square_mc_3._alpha - 15;
}
if ((square_mc_3._alpha <= 0) and (square_mc_3.bbb == 0)) {
square_mc_3.bbb = 1;
}
if (go_to_level == 1) {
if (make_black_2._alpha < 85) {
make_black_2._alpha = make_black_2._alpha + 15;
} else if ((make_black_2._alpha >= 85) and (make_black_2.aaa == 0)) {
make_black_2.aaa = 1;
setTimeout(function () {
square_mc_3.removeMovieClip();
make_black_2.removeMovieClip();
main_menu.removeMovieClip();
gotoAndStop(_currentframe + 1);
}, 200);
}
}
if (go_to_achieve == 1) {
if (make_black_2._alpha < 85) {
make_black_2._alpha = make_black_2._alpha + 15;
} else if ((make_black_2._alpha >= 85) and (make_black_2.aaa == 0)) {
make_black_2.aaa = 1;
setTimeout(function () {
square_mc_3.removeMovieClip();
make_black_2.removeMovieClip();
main_menu.removeMovieClip();
gotoAndStop(_currentframe + 7);
}, 200);
}
}
clouds_move();
setTimeout(function () {
main_menu._visible = 1;
Play_xscale(main_menu, main_menu_xscale);
}, 1000);
main_menu.o_after_level_menu3.onRelease = function () {
go_to_level = 1;
main_menu_xscale = 1;
PlaySound(s_click);
};
main_menu.o_after_level_menu4.onRelease = function () {
go_to_achieve = 1;
main_menu_xscale = 1;
PlaySound(s_click);
};
main_menu.o_after_level_menu5.onRelease = function () {
getURL (walkurl, "_blank");
PlaySound(s_click);
};
main_menu.o_after_level_menu6.onRelease = function () {
getURL (sponsorurl, "_blank");
PlaySound(s_click);
};
main_menu.o_after_level_menu7.onRelease = function () {
getURL ("http://www.facebook.com/ArmorGames", "_blank");
PlaySound(s_click);
};
main_menu.o_after_level_menu8.onRelease = function () {
getURL ("http://twitter.com/armorgames", "_blank");
PlaySound(s_click);
};
};
main_menu.o_after_level_menu3.onRollOver = function () {
PlaySound(s_bul);
};
main_menu.o_after_level_menu4.onRollOver = function () {
PlaySound(s_bul);
};
main_menu.o_after_level_menu5.onRollOver = function () {
PlaySound(s_bul);
};
main_menu.o_after_level_menu6.onRollOver = function () {
PlaySound(s_bul);
};
main_menu.o_after_level_menu7.onRollOver = function () {
PlaySound(s_bul);
};
main_menu.o_after_level_menu8.onRollOver = function () {
PlaySound(s_bul);
};
panel_mm.o_panel_1.onRelease = function () {
if (music_enable == 1) {
music_back.stop();
music_enable = 0;
sData_so.data.music_enable = 0;
sData_so.flush();
panel_mm.o_panel_1.gotoAndStop(3);
panel_mm.o_panel_1.curr = 3;
} else if (music_enable == 0) {
music_enable = 1;
sData_so.data.music_enable = 1;
sData_so.flush();
PlayMusic(s_menu_back);
panel_mm.o_panel_1.gotoAndStop(1);
panel_mm.o_panel_1.curr = 1;
}
};
panel_mm.o_panel_2.onRelease = function () {
if (sound_enable == 1) {
sound_enable = 0;
sData_so.data.sound_enable = 0;
sData_so.flush();
panel_mm.o_panel_2.gotoAndStop(3);
panel_mm.o_panel_2.curr = 3;
} else if (sound_enable == 0) {
sound_enable = 1;
sData_so.data.sound_enable = 1;
sData_so.flush();
panel_mm.o_panel_2.gotoAndStop(1);
panel_mm.o_panel_2.curr = 1;
}
};
panel_mm.attachMovie("but_sponsor_logo_1", "o_sponsor_logo_1", panel_mm.getNextHighestDepth());
panel_mm.o_sponsor_logo_1.gotoAndStop(1);
panel_mm.o_sponsor_logo_1._x = 50;
panel_mm.o_sponsor_logo_1._y = 42;
panel_mm.o_sponsor_logo_1.onRelease = function () {
getURL (sponsorurl, "_blank");
};
Frame 3
function draw_levels() {
levels.createTextField("t_star1", 2000, 50, 50, 200, 100);
levels.t_star1.setTextFormat(format_stars);
levels.t_star1.setNewTextFormat(format_stars);
levels.t_star1.text = (("stars " + stars_count) + "/") + "21";
levels.t_star1.selectable = false;
levels.t_star1.embedFonts = true;
levels.t_star1.filters = [new flash.filters.DropShadowFilter(distance, angleInDegrees, color, alpha, blurX, blurY, strength, quality, inner, knockout, hideObject)];
levels.t_star1._x = -42;
levels.t_star1._y = 95;
levels.createTextField("t_star2", 2001, 50, 50, 200, 100);
levels.t_star2.setTextFormat(format_stars);
levels.t_star2.setNewTextFormat(format_stars);
levels.t_star2.text = (("levels " + open_levels) + "/") + "21";
levels.t_star2.selectable = false;
levels.t_star2.embedFonts = true;
levels.t_star2.filters = [new flash.filters.DropShadowFilter(distance, angleInDegrees, color, alpha, blurX, blurY, strength, quality, inner, knockout, hideObject)];
levels.t_star2._x = -42;
levels.t_star2._y = 115;
}
stop();
main_menu.removeMovieClip();
_root.panel_mm.removeMovieClip();
tool_after_restart = 0;
stars_count = 0;
var i = 0;
while (i < 42) {
if (stars[i] == 1) {
stars_count++;
}
i = i + 1;
}
var tools_stand = new Array();
var ii = 0;
while (ii < 12) {
var jj = 0;
while (jj < 12) {
tools_stand[(ii * 12) + jj] = 10;
jj = jj + 1;
}
ii = ii + 1;
}
var lvlArray = new Array();
lvlArray = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 6, 11, 1, 2, 1, 2, 1, 2, 1, 2, 1, 11, 2, 12, 26, 13, 13, 179, 13, 13, 181, 1, 5, 1, 1, 7, 1, 13, 4, 2, 1, 2, 1, 2, 1, 2, 2, 1, 2, 13, 13, 13, 13, 1, 2, 12, 2, 1, 1, 2, 1, 2, 1, 3, 13, 2, 12, 2, 1, 2, 100, 13, 13, 180, 13, 13, 13, 1, 2, 1, 11, 1, 1, 2, 1, 2, 1, 2, 1, 2, 4, 11, 27, 2, 26, 1, 5, 12, 2, 12, 2, 6, 7, 1, 2, 1, 1, 2, 8, 2, 1, 2, 1, 2, 1, 2, 1, 2], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 26, 1, 11, 1, 11, 1, 2, 1, 5, 27, 2, 2, 1, 5, 1, 2, 27, 11, 8, 11, 1, 11, 12, 100, 13, 13, 180, 13, 13, 13, 183, 1, 2, 12, 2, 2, 1, 7, 1, 12, 13, 2, 1, 2, 6, 2, 1, 1, 2, 1, 3, 1, 28, 12, 2, 1, 2, 1, 2, 2, 27, 2, 1, 2, 13, 13, 179, 13, 181, 2, 1, 4, 11, 12, 2, 1, 2, 10, 2, 1, 2, 26, 2, 2, 1, 26, 12, 2, 12, 3, 1, 2, 12, 11, 1, 1, 2, 1, 2, 1, 2, 1, 7, 1, 2, 1, 2], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 29, 30, 29, 30, 29, 30, 29, 30, 29, 30, 29, 36, 30, 33, 41, 29, 32, 33, 30, 29, 30, 40, 35, 30, 31, 30, 29, 32, 29, 13, 13, 13, 181, 30, 29, 29, 30, 29, 30, 29, 30, 179, 30, 29, 30, 29, 30, 100, 13, 13, 13, 13, 28, 13, 13, 13, 29, 30, 40, 29, 30, 29, 38, 29, 30, 29, 35, 13, 30, 33, 30, 30, 40, 30, 29, 180, 29, 32, 36, 13, 29, 39, 33, 29, 30, 31, 30, 13, 13, 13, 13, 13, 30, 33, 30, 30, 40, 30, 33, 30, 29, 35, 29, 30, 40, 32, 29, 29, 30, 29, 30, 29, 41, 29, 30, 33, 30, 29, 30], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 29, 30, 29, 30, 29, 30, 29, 30, 29, 30, 29, 29, 39, 33, 30, 29, 30, 29, 30, 29, 30, 29, 30, 30, 33, 39, 40, 13, 13, 180, 13, 20, 13, 13, 100, 40, 35, 33, 30, 13, 9, 9, 9, 13, 35, 29, 30, 32, 29, 30, 29, 179, 9, 9, 9, 13, 29, 32, 29, 29, 30, 29, 35, 13, 9, 9, 9, 13, 30, 29, 30, 30, 181, 28, 13, 14, 13, 13, 13, 13, 29, 30, 29, 29, 30, 29, 30, 29, 30, 36, 30, 29, 30, 33, 39, 39, 29, 37, 29, 39, 29, 30, 29, 35, 31, 39, 29, 29, 30, 29, 30, 33, 39, 29, 30, 29, 30, 29, 30], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 2, 1, 2, 12, 2, 12, 2, 27, 2, 1, 12, 2, 1, 2, 12, 2, 27, 2, 12, 2, 12, 2, 26, 100, 2, 3, 2, 13, 179, 13, 13, 12, 2, 27, 1, 13, 1, 5, 1, 13, 9, 9, 13, 2, 27, 2, 7, 13, 28, 13, 13, 17, 9, 9, 13, 12, 2, 27, 1, 2, 3, 13, 8, 13, 9, 9, 13, 2, 12, 2, 2, 12, 2, 13, 2, 13, 180, 13, 13, 27, 2, 27, 27, 2, 27, 13, 1, 2, 1, 2, 1, 2, 12, 2, 2, 12, 2, 13, 13, 181, 2, 27, 2, 12, 2, 27, 1, 2, 1, 2, 1, 2, 12, 2, 12, 2, 27, 2], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 27, 11, 27, 2, 1, 1, 1, 1, 1, 2, 100, 20, 183, 1, 1, 26, 1, 1, 11, 2, 1, 1, 1, 13, 1, 2, 26, 1, 1, 2, 1, 27, 1, 11, 2, 13, 13, 13, 183, 6, 181, 13, 13, 2, 1, 1, 12, 183, 3, 13, 1, 2, 1, 1, 13, 1, 1, 11, 2, 1, 2, 13, 179, 13, 183, 26, 15, 13, 180, 1, 1, 2, 1, 183, 5, 13, 1, 2, 13, 3, 1, 27, 2, 1, 2, 1, 26, 13, 13, 13, 19, 183, 2, 1, 12, 26, 12, 2, 1, 183, 10, 2, 13, 2, 12, 2, 2, 1, 2, 1, 11, 1, 2, 1, 2, 1, 2, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 30, 29, 30, 32, 30, 29, 30, 29, 30, 29, 30, 35, 29, 30, 33, 32, 29, 13, 179, 41, 29, 32, 29, 33, 30, 36, 30, 13, 13, 17, 30, 29, 32, 40, 30, 39, 33, 30, 29, 13, 29, 13, 29, 35, 29, 30, 29, 29, 39, 40, 30, 13, 37, 15, 13, 13, 13, 13, 30, 30, 29, 30, 29, 13, 29, 13, 29, 30, 29, 180, 29, 100, 13, 13, 30, 21, 13, 16, 13, 181, 30, 29, 30, 30, 29, 13, 29, 13, 29, 30, 29, 30, 29, 37, 33, 33, 30, 13, 13, 13, 30, 29, 39, 36, 30, 40, 32, 35, 40, 41, 29, 30, 29, 39, 29, 30, 33, 39, 29], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 29, 30, 29, 30, 29, 30, 29, 30, 29, 30, 29, 29, 39, 33, 30, 29, 100, 29, 30, 40, 39, 29, 30, 39, 29, 35, 29, 39, 13, 37, 29, 30, 29, 30, 29, 29, 30, 29, 30, 29, 13, 29, 39, 29, 30, 40, 30, 30, 181, 28, 107, 13, 17, 30, 29, 32, 33, 30, 29, 29, 30, 29, 30, 29, 13, 29, 108, 13, 179, 29, 30, 30, 29, 30, 29, 39, 13, 35, 29, 30, 13, 30, 33, 29, 39, 32, 30, 29, 13, 13, 180, 13, 19, 29, 30, 39, 33, 30, 40, 30, 29, 30, 30, 30, 30, 29, 30, 29, 30, 29, 30, 36, 30, 39, 29, 30, 29, 30, 29], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 29, 30, 29, 30, 29, 30, 29, 30, 29, 30, 29, 29, 32, 33, 30, 29, 30, 31, 30, 29, 100, 29, 30, 37, 29, 39, 29, 30, 33, 30, 29, 35, 13, 32, 29, 29, 13, 113, 115, 18, 13, 116, 20, 13, 16, 13, 30, 30, 13, 30, 29, 13, 36, 30, 13, 30, 29, 114, 29, 29, 181, 29, 30, 13, 30, 33, 179, 33, 30, 13, 30, 32, 29, 30, 36, 13, 33, 39, 13, 30, 40, 180, 29, 31, 39, 29, 30, 13, 30, 31, 15, 13, 116, 13, 30, 30, 33, 114, 13, 14, 116, 13, 13, 30, 38, 30, 33, 29, 30, 29, 35, 29, 30, 29, 30, 29, 30, 40, 30], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 2, 11, 2, 1, 100, 1, 2, 11, 27, 1, 2, 2, 27, 11, 1, 1, 15, 13, 13, 1, 1, 154, 1, 4, 11, 1, 13, 13, 17, 8, 179, 10, 2, 13, 2, 2, 1, 3, 13, 2, 13, 10, 13, 1, 1, 13, 1, 10, 2, 1, 15, 13, 16, 1, 13, 181, 13, 13, 10, 2, 1, 1, 13, 1, 1, 4, 1, 2, 7, 2, 1, 11, 152, 13, 13, 1, 2, 1, 2, 1, 2, 27, 2, 1, 1, 2, 1, 1, 154, 13, 180, 13, 152, 3, 11, 1, 27, 11, 2, 6, 2, 1, 2, 1, 2, 1, 2], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 11, 1, 2, 1, 2, 1, 26, 1, 2, 1, 1, 27, 1, 11, 1, 100, 27, 2, 1, 11, 1, 11, 11, 1, 26, 13, 13, 14, 13, 13, 11, 1, 26, 1, 1, 11, 1, 13, 1, 2, 1, 13, 1, 11, 1, 11, 26, 1, 11, 13, 13, 156, 13, 13, 26, 1, 27, 1, 1, 27, 1, 2, 10, 2, 1, 2, 1, 11, 1, 11, 11, 1, 26, 13, 13, 156, 180, 13, 11, 1, 26, 1, 1, 11, 1, 183, 1, 2, 1, 13, 1, 11, 1, 11, 11, 1, 11, 13, 13, 181, 13, 179, 11, 1, 11, 1, 1, 26, 1, 2, 8, 2, 1, 2, 1, 27, 1, 11], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 29, 30, 29, 30, 29, 30, 29, 30, 29, 30, 29, 29, 39, 33, 30, 29, 32, 29, 30, 29, 30, 29, 39, 32, 40, 30, 36, 32, 29, 181, 13, 13, 13, 32, 29, 29, 13, 180, 13, 29, 37, 29, 35, 29, 13, 33, 41, 30, 13, 35, 15, 13, 13, 30, 13, 183, 13, 30, 29, 100, 17, 29, 13, 29, 21, 102, 17, 29, 101, 39, 30, 30, 13, 41, 13, 34, 13, 30, 13, 37, 13, 30, 33, 29, 13, 20, 13, 29, 13, 179, 13, 29, 154, 29, 39, 32, 29, 154, 29, 30, 29, 30, 29, 39, 29, 32, 29, 29, 39, 29, 32, 40, 30, 38, 32, 29, 41, 29, 30], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 11, 27, 2, 1, 11, 1, 2, 1, 2, 1, 1, 9, 9, 9, 9, 26, 12, 2, 1, 2, 27, 2, 11, 9, 9, 9, 9, 2, 1, 13, 179, 104, 2, 12, 27, 2, 8, 2, 12, 104, 1, 13, 1, 2, 1, 2, 104, 20, 13, 13, 2, 13, 7, 21, 13, 18, 13, 181, 1, 13, 10, 15, 13, 13, 1, 13, 10, 13, 1, 2, 2, 102, 2, 13, 2, 10, 2, 13, 2, 180, 2, 1, 183, 16, 18, 14, 103, 13, 13, 16, 101, 19, 12, 2, 2, 2, 100, 1, 2, 1, 2, 1, 2, 183, 2, 27, 1, 2, 1, 2, 8, 2, 27, 2, 12, 2, 1, 2], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 33, 30, 29, 30, 29, 30, 29, 30, 29, 30, 29, 33, 13, 13, 20, 13, 20, 13, 20, 13, 13, 40, 30, 30, 13, 30, 13, 30, 13, 30, 13, 35, 13, 39, 40, 29, 13, 33, 179, 29, 13, 29, 13, 29, 13, 36, 30, 100, 17, 35, 13, 30, 13, 39, 180, 30, 15, 182, 29, 36, 13, 29, 13, 40, 183, 29, 13, 29, 13, 29, 30, 30, 13, 30, 181, 30, 13, 30, 13, 30, 13, 35, 29, 29, 13, 13, 14, 13, 16, 13, 14, 13, 13, 29, 30, 30, 29, 30, 29, 30, 29, 30, 29, 30, 29, 30, 33, 33, 30, 33, 30, 38, 30, 40, 30, 29, 30, 40, 30], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 29, 30, 29, 30, 29, 30, 29, 30, 29, 32, 29, 30, 30, 100, 184, 13, 20, 13, 18, 13, 13, 185, 30, 29, 29, 37, 29, 30, 13, 35, 13, 30, 184, 30, 33, 30, 39, 29, 32, 40, 13, 13, 13, 29, 15, 13, 13, 40, 29, 181, 13, 32, 29, 30, 29, 32, 13, 37, 179, 30, 30, 29, 13, 29, 13, 180, 13, 40, 21, 13, 13, 40, 33, 41, 13, 30, 13, 36, 13, 30, 13, 30, 29, 41, 39, 185, 13, 13, 16, 13, 14, 184, 13, 29, 32, 29, 29, 30, 29, 30, 29, 30, 29, 30, 185, 30, 40, 39, 30, 29, 39, 29, 39, 31, 41, 29, 30, 33, 30, 29], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 29, 39, 29, 156, 29, 30, 29, 30, 29, 30, 29, 40, 35, 40, 30, 14, 180, 184, 18, 105, 13, 13, 185, 30, 29, 30, 33, 30, 29, 30, 13, 30, 29, 13, 29, 33, 156, 13, 13, 40, 106, 29, 13, 13, 35, 154, 30, 30, 29, 35, 13, 30, 13, 37, 29, 30, 29, 30, 40, 29, 30, 13, 16, 18, 14, 13, 30, 29, 30, 33, 30, 30, 154, 17, 29, 13, 29, 15, 13, 18, 105, 105, 29, 40, 30, 13, 13, 13, 13, 13, 30, 13, 30, 181, 30, 30, 33, 30, 29, 100, 36, 30, 40, 13, 179, 13, 33, 40, 30, 40, 30, 29, 30, 33, 30, 29, 30, 40, 30], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 13, 13, 13, 1, 26, 12, 182, 13, 13, 1, 2, 2, 13, 2, 27, 2, 12, 2, 13, 3, 180, 2, 12, 100, 102, 13, 13, 107, 20, 101, 13, 13, 13, 12, 26, 2, 13, 9, 13, 9, 13, 9, 101, 2, 1, 2, 12, 27, 13, 9, 108, 9, 13, 9, 179, 12, 2, 1, 2, 12, 13, 9, 13, 13, 17, 9, 21, 13, 13, 181, 1, 27, 13, 9, 9, 9, 13, 9, 13, 1, 2, 1, 26, 2, 13, 13, 13, 13, 14, 13, 13, 2, 26, 12, 1, 12, 26, 2, 8, 2, 1, 7, 1, 27, 1, 2, 12], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 12, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 11, 27, 13, 108, 13, 2, 13, 158, 13, 11, 1, 11, 27, 11, 13, 1, 13, 11, 104, 2, 180, 13, 154, 1, 11, 1, 14, 18, 13, 2, 1, 2, 1, 2, 1, 2, 1, 179, 2, 13, 2, 27, 13, 156, 13, 27, 13, 100, 1, 13, 156, 13, 11, 11, 13, 2, 13, 3, 13, 2, 2, 4, 2, 1, 2, 1, 13, 20, 16, 18, 13, 1, 11, 154, 13, 107, 103, 2, 1, 107, 1, 13, 1, 27, 27, 1, 2, 1, 13, 181, 2, 13, 158, 13, 11, 11, 5, 11, 1, 11, 1, 2, 11, 2, 1, 6, 27, 2], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 12, 1, 2, 12, 2, 1, 27, 1, 2, 1, 1, 13, 13, 18, 13, 13, 13, 18, 105, 107, 13, 2, 27, 13, 1, 13, 2, 1, 2, 13, 2, 1, 13, 1, 1, 13, 13, 13, 1, 27, 1, 13, 1, 104, 180, 2, 11, 108, 2, 13, 12, 7, 12, 13, 2, 1, 2, 27, 1, 13, 13, 19, 1, 183, 18, 16, 13, 20, 183, 2, 2, 105, 183, 103, 2, 1, 13, 8, 2, 13, 2, 1, 1, 2, 1, 13, 1, 2, 106, 2, 1, 100, 1, 12, 181, 13, 13, 16, 13, 179, 2, 12, 2, 1, 2, 1, 1, 2, 1, 2, 1, 2, 1, 2, 27, 2, 12, 2], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 2, 100, 2, 12, 26, 11, 2, 27, 11, 1, 2, 1, 27, 21, 13, 114, 18, 114, 18, 13, 113, 13, 181, 2, 2, 13, 3, 1, 13, 1, 107, 1, 2, 1, 2, 12, 183, 14, 13, 13, 17, 2, 13, 2, 12, 2, 27, 26, 2, 1, 2, 1, 15, 179, 13, 13, 13, 183, 2, 12, 1, 180, 107, 20, 13, 2, 13, 2, 1, 2, 1, 2, 26, 1, 2, 13, 2, 1, 15, 13, 108, 1, 2, 12, 12, 26, 1, 15, 13, 13, 13, 2, 1, 2, 12, 26, 2, 12, 11, 183, 2, 1, 2, 1, 2, 12, 26, 1], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 2, 100, 2, 1, 2, 1, 2, 1, 11, 27, 181, 179, 13, 14, 13, 13, 13, 13, 13, 13, 13, 26, 2, 1, 2, 1, 11, 1, 2, 4, 2, 1, 13, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 2, 13, 2, 2, 13, 2, 1, 7, 27, 2, 1, 13, 1, 13, 1, 27, 13, 1, 180, 1, 11, 27, 2, 13, 5, 13, 2, 7, 13, 3, 13, 13, 13, 13, 13, 13, 1, 13, 1, 1, 13, 1, 5, 1, 2, 1, 2, 1, 3, 13, 2, 11, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 27, 1, 26, 1, 2, 1, 2, 6, 2, 1, 2, 12, 2]];
var tools_array = new Array();
tools_array = [[0, 0, 1], [0, 1, 0], [1, 0, 2], [0, 1, 2], [2, 0, 1], [0, 7, 0], [2, 1, 2], [0, 1, 2], [1, 2, 2], [1, 1, 0], [0, 1, 1], [1, 2, 2], [0, 4, 1], [2, 1, 2], [0, 3, 2], [1, 5, 2], [0, 3, 1], [1, 3, 0], [1, 4, 1], [1, 5, 0], [0, 43, 1]];
var hints_array = new Array();
hints_array = [[319, 219, "Welcome to \"Save the princess\".\r Wicked witch cursed all the\r princesses. You must save them!"], [151, 255, "The Prince can walk only along\r the road. He will move forward\r until he reached the end of it."], [366, 241, "If he reaches the end of the\r road, he will turn left or right,\r or turn back."], [207, 235, "To ruin the curse, prince must\r take the potion, and give it to\r the princess."], [315, 71, "Try to get the star on each level\r but it isn't necessary. \rNow click 'GO' or press SPACE\r to start moving."], [418, 132, "Avoid spikes.\r If the Prince touches them\r he will die."], [312, 201, "Click pink icon or press 2 to choose\r cake, and then click on the\r marked piece of the road."], [312, 201, "If the Prince sees the cake,\r he will turn to it.\r Now press 'GO'."], [315, 160, "Also you have One-way block.\r It will block up the way after \r the Prince step on it."], [315, 160, "Now click purple icon or press 1\rto choose it and then place it\r on the road."], [261, 244, "If Prince has two available \rdirections, he will turn\r in the direction of the arrow.\r Every intersection has an arrow."], [156, 244, "Place a cake to help the Prince\r make a right choice.\r Press arrow button on panel \rto increase/decrease speed."], [517, 372, "You always have a limited\r number of cakes and blocks.\r Try to pass this level\r using two blocks."], [158, 164, "Place the first block here,\r and try to understand where\r the second one must be placed."], [158, 164, "To remove block or cake just click\r on it again. To return the Prince\r on the start press GO or SPACE\r again. "], [340, 217, "Now try to pass this level\r using only cakes."], [422, 221, "Prince must press red button to \rremove the door of the \rcorresponding color. After that \rprince will be able to see the cake."], [157, 158, "Now place a cake and press GO."], [184, 139, "Let's see how you will cope\r with two colors of doors.\rNow, no hints."], [124, 256, "Well done. Here you can see few\rteleports. Enter one of them \rand look what will happen next."], [315, 164, "Upon exiting the teleport the\r prince will continue to move\r in the same direction as he was\r moving before he had entered it."], [516, 140, "Be careful, avoid the pirate. \rHe moves along the road as the\r Prince and can also press \rthe buttons and one-way blocks."], [156, 62, "This button is a magic trap. \rAfter the prince will push her,\r snowball will fly in his side.\r Avoid snowballs."]];
if (return_to_levels == 1) {
create_clouds();
PlayMusic(s_menu_back);
return_to_levels = 0;
}
_root.createEmptyMovieClip("levels", _root.getNextHighestDepth());
_root.createEmptyMovieClip("levels_2", _root.getNextHighestDepth());
create_panel();
_root.createEmptyMovieClip("make_black_2", this.getNextHighestDepth());
var format_stars = new TextFormat();
format_stars.font = "Luvable";
format_stars.color = 7715025 /* 0x75B8D1 */;
format_stars.size = 18;
var distance = 0;
var angleInDegrees = 0;
var color = 15463162;
var alpha = 1;
var blurX = 2;
var blurY = 2;
var strength = 5;
var quality = 3;
var inner = false;
var knockout = false;
var hideObject = false;
if (open_levels > 21) {
open_levels = 21;
}
draw_levels();
var level_depth = 0;
var tool_a1 = 0;
var tool_a2 = 0;
var back_a = 0;
var type_page = 0;
var lvlArray1 = new Array();
var been_restart = 0;
var go_level = 0;
var levels_done = 0;
var sizee = 7;
var format = new TextFormat();
levels.attachMovie("but_level_main_menu", "o_after_level_menu1", 1);
levels.o_after_level_menu1._x = 260;
levels.o_after_level_menu1._y = -80;
levels.attachMovie("but_level_walk", "o_after_level_menu2", 2);
levels.o_after_level_menu2._x = 275;
levels.o_after_level_menu2._y = -20;
levels.attachMovie("but_level_ach", "o_after_level_menu3", 3);
levels.o_after_level_menu3._x = 275;
levels.o_after_level_menu3._y = 37;
levels.attachMovie("but_level_more", "o_after_level_menu4", 4);
levels.o_after_level_menu4._x = 269;
levels.o_after_level_menu4._y = 94;
levels.attachMovie("o_after_level_menu", "o_after_level_menu11", 11);
levels.o_after_level_menu11.gotoAndStop(1);
levels.o_after_level_menu11._rotation = -270;
levels.o_after_level_menu11._xscale = 130;
levels.o_after_level_menu11._yscale = 130;
levels.attachMovie("o_main_menu_logo", "o_after_level_menu12", 12);
levels.o_after_level_menu12.gotoAndStop(2);
levels.o_after_level_menu12._x = 5;
levels.o_after_level_menu12._y = -123;
levels.attachMovie("o_main_menu_logo", "o_after_level_menu13", 13);
levels.o_after_level_menu13.gotoAndStop(3);
levels.o_after_level_menu13._x = 65;
levels.o_after_level_menu13._y = 120;
levels.o_after_level_menu13._xscale = 90;
levels.o_after_level_menu13._yscale = 90;
levels.o_after_level_menu13._visible = false;
levels.o_after_level_menu13.onRollOver = function () {
levels.o_after_level_menu13._xscale = 100;
levels.o_after_level_menu13._yscale = 100;
};
levels.o_after_level_menu13.onRollOut = function () {
levels.o_after_level_menu13._xscale = 90;
levels.o_after_level_menu13._yscale = 90;
};
levels.o_after_level_menu1.onRollOver = function () {
PlaySound(s_bul);
};
levels.o_after_level_menu2.onRollOver = function () {
PlaySound(s_bul);
};
levels.o_after_level_menu3.onRollOver = function () {
PlaySound(s_bul);
};
levels.o_after_level_menu4.onRollOver = function () {
PlaySound(s_bul);
};
levels.o_after_level_menu2.onRelease = function () {
getURL (walkurl, "_blank");
PlaySound(s_click);
};
levels.o_after_level_menu4.onRelease = function () {
getURL (sponsorurl, "_blank");
PlaySound(s_click);
};
levels.o_after_level_menu13.onRelease = function () {
PlaySound(s_click);
if (type_page == 0) {
level_depth = levels_2.getDepth();
levels_done = 0;
type_page = 1;
levels.o_after_level_menu13.gotoAndStop(4);
levels_2.removeMovieClip();
_root.createEmptyMovieClip("levels_2", level_depth);
levels_2._x = levels._x + 8;
levels_2._y = levels._y - 200;
if (((levels._visible == 1) and (levels._xscale >= 100)) and (levels_done == 0)) {
var _local3 = 3;
while (_local3 < 6) {
var _local2 = 1;
while (_local2 <= 7) {
levels_2.attachMovie("o_level", ("o_level" + (_local3 * sizee)) + _local2, (5 + (_local3 * sizee)) + _local2);
levels_2[("o_level" + (_local3 * sizee)) + _local2]._x = -203 + (_local2 * 50);
levels_2[("o_level" + (_local3 * sizee)) + _local2]._y = -50 + (_local3 * 60);
levels_2[("o_level" + (_local3 * sizee)) + _local2]._alpha = -((((_local3 * sizee) + _local2) - 21) * 4);
levels_2[("o_level" + (_local3 * sizee)) + _local2].i = _local3;
levels_2[("o_level" + (_local3 * sizee)) + _local2].j = _local2;
levels_2[("o_level" + (_local3 * sizee)) + _local2].gotoAndStop(2);
if (((_local3 * sizee) + _local2) <= open_levels) {
levels_2[("o_level" + (_local3 * sizee)) + _local2].gotoAndStop(1);
levels_2.createTextField(("t_level" + (_local3 * sizee)) + _local2, (1000 + (_local3 * sizee)) + _local2, 50, 50, 200, 100);
levels_2[("t_level" + (_local3 * sizee)) + _local2].setTextFormat(format);
levels_2[("t_level" + (_local3 * sizee)) + _local2].setNewTextFormat(format);
levels_2[("t_level" + (_local3 * sizee)) + _local2].text = (_local3 * sizee) + _local2;
levels_2[("t_level" + (_local3 * sizee)) + _local2].selectable = false;
levels_2[("t_level" + (_local3 * sizee)) + _local2].embedFonts = true;
levels_2[("t_level" + (_local3 * sizee)) + _local2]._x = (-203 + (_local2 * 50)) - 14;
levels_2[("t_level" + (_local3 * sizee)) + _local2]._y = (-50 + (_local3 * 60)) - 15;
levels_2[("t_level" + (_local3 * sizee)) + _local2]._alpha = -((((_local3 * sizee) + _local2) - 21) * 4);
}
_local2 = _local2 + 1;
}
_local3 = _local3 + 1;
}
levels_done = 1;
}
} else if (type_page == 1) {
level_depth = levels_2.getDepth();
type_page = 0;
levels.o_after_level_menu13.gotoAndStop(3);
levels_done = 0;
levels_2.removeMovieClip();
_root.createEmptyMovieClip("levels_2", level_depth);
levels_2._x = levels._x + 8;
levels_2._y = levels._y - 20;
if (((levels._visible == 1) and (levels._xscale >= 100)) and (levels_done == 0)) {
var _local3 = 0;
while (_local3 < 3) {
var _local2 = 1;
while (_local2 <= 7) {
levels_2.attachMovie("o_level", ("o_level" + (_local3 * sizee)) + _local2, (5 + (_local3 * sizee)) + _local2);
levels_2[("o_level" + (_local3 * sizee)) + _local2]._x = -203 + (_local2 * 50);
levels_2[("o_level" + (_local3 * sizee)) + _local2]._y = -50 + (_local3 * 60);
levels_2[("o_level" + (_local3 * sizee)) + _local2]._alpha = -(((_local3 * sizee) + _local2) * 4);
levels_2[("o_level" + (_local3 * sizee)) + _local2].i = _local3;
levels_2[("o_level" + (_local3 * sizee)) + _local2].j = _local2;
levels_2[("o_level" + (_local3 * sizee)) + _local2].gotoAndStop(2);
if (((_local3 * sizee) + _local2) <= open_levels) {
levels_2[("o_level" + (_local3 * sizee)) + _local2].gotoAndStop(1);
levels_2.createTextField(("t_level" + (_local3 * sizee)) + _local2, (1000 + (_local3 * sizee)) + _local2, 50, 50, 200, 100);
levels_2[("t_level" + (_local3 * sizee)) + _local2].setTextFormat(format);
levels_2[("t_level" + (_local3 * sizee)) + _local2].setNewTextFormat(format);
levels_2[("t_level" + (_local3 * sizee)) + _local2].text = (_local3 * sizee) + _local2;
levels_2[("t_level" + (_local3 * sizee)) + _local2].selectable = false;
levels_2[("t_level" + (_local3 * sizee)) + _local2].embedFonts = true;
if (((_local3 * sizee) + _local2) == 1) {
levels_2[("t_level" + (_local3 * sizee)) + _local2]._x = (-203 + (_local2 * 50)) - 5;
levels_2[("t_level" + (_local3 * sizee)) + _local2]._y = (-50 + (_local3 * 60)) - 15;
levels_2[("t_level" + (_local3 * sizee)) + _local2]._alpha = -(((_local3 * sizee) + _local2) * 4);
} else if ((((_local3 * sizee) + _local2) > 1) and (((_local3 * sizee) + _local2) < 10)) {
levels_2[("t_level" + (_local3 * sizee)) + _local2]._x = (-203 + (_local2 * 50)) - 9;
levels_2[("t_level" + (_local3 * sizee)) + _local2]._y = (-50 + (_local3 * 60)) - 15;
levels_2[("t_level" + (_local3 * sizee)) + _local2]._alpha = -(((_local3 * sizee) + _local2) * 4);
} else if (((((_local3 * sizee) + _local2) >= 10) and (((_local3 * sizee) + _local2) != 11)) and (((_local3 * sizee) + _local2) != 20)) {
levels_2[("t_level" + (_local3 * sizee)) + _local2]._x = (-203 + (_local2 * 50)) - 12;
levels_2[("t_level" + (_local3 * sizee)) + _local2]._y = (-50 + (_local3 * 60)) - 15;
levels_2[("t_level" + (_local3 * sizee)) + _local2]._alpha = -(((_local3 * sizee) + _local2) * 4);
} else if (((_local3 * sizee) + _local2) == 11) {
levels_2[("t_level" + (_local3 * sizee)) + _local2]._x = (-203 + (_local2 * 50)) - 8;
levels_2[("t_level" + (_local3 * sizee)) + _local2]._y = (-50 + (_local3 * 60)) - 15;
levels_2[("t_level" + (_local3 * sizee)) + _local2]._alpha = -(((_local3 * sizee) + _local2) * 4);
} else if (((_local3 * sizee) + _local2) == 20) {
levels_2[("t_level" + (_local3 * sizee)) + _local2]._x = (-203 + (_local2 * 50)) - 16;
levels_2[("t_level" + (_local3 * sizee)) + _local2]._y = (-50 + (_local3 * 60)) - 15;
levels_2[("t_level" + (_local3 * sizee)) + _local2]._alpha = -(((_local3 * sizee) + _local2) * 4);
}
}
_local2 = _local2 + 1;
}
_local3 = _local3 + 1;
}
levels_done = 1;
}
}
};
levels._y = 220;
levels._x = 280;
levels._visible = 1;
levels_2._x = levels._x + 8;
levels_2._y = levels._y - 20;
make_black_2.aaa = 0;
make_black_2.beginFill(723723);
make_black_2.moveTo(0, 0);
make_black_2.lineTo(640, 0);
make_black_2.lineTo(640, 480);
make_black_2.lineTo(0, 480);
make_black_2.lineTo(0, 0);
make_black_2.endFill();
make_black_2._alpha = 0;
make_black_2._visible = 1;
_root.createEmptyMovieClip("square_mc_3", this.getNextHighestDepth());
square_mc_3.beginFill(723723);
square_mc_3.moveTo(0, 0);
square_mc_3.lineTo(640, 0);
square_mc_3.lineTo(640, 480);
square_mc_3.lineTo(0, 480);
square_mc_3.lineTo(0, 0);
square_mc_3.endFill();
square_mc_3._alpha = 80;
square_mc_3._visible = 1;
square_mc_3.bbb = 0;
format.font = "Luvable";
format.color = 16777215 /* 0xFFFFFF */;
format.size = 25;
levels.o_after_level_menu1.onRelease = function () {
PlaySound(s_click);
go_level = 2;
};
levels.o_after_level_menu3.onRelease = function () {
PlaySound(s_click);
go_level = 3;
};
onEnterFrame = function () {
if (square_mc_3._alpha > 0) {
square_mc_3._alpha = square_mc_3._alpha - 15;
}
if ((square_mc_3._alpha <= 0) and (square_mc_3.bbb == 0)) {
square_mc_3.bbb = 1;
}
clouds_move();
if (go_level == 1) {
if (make_black_2._alpha < 85) {
make_black_2._alpha = make_black_2._alpha + 15;
} else if ((make_black_2._alpha >= 85) and (make_black_2.aaa == 0)) {
make_black_2.aaa = 1;
setTimeout(function () {
square_mc_3.removeMovieClip();
make_black_2.removeMovieClip();
gotoAndStop(_currentframe + 1);
}, 200);
}
} else if (go_level == 2) {
if (make_black_2._alpha < 85) {
make_black_2._alpha = make_black_2._alpha + 15;
} else if ((make_black_2._alpha >= 85) and (make_black_2.aaa == 0)) {
make_black_2.aaa = 1;
setTimeout(function () {
make_black_2.removeMovieClip();
square_mc_3.removeMovieClip();
levels_2.removeMovieClip();
levels.removeMovieClip();
_root.menu_clouds.removeMovieClip();
_root.clouds_1.removeMovieClip();
_root.clouds_2.removeMovieClip();
_root.clouds_3.removeMovieClip();
gotoAndStop(_root._currentframe - 1);
}, 200);
}
} else if (go_level == 3) {
if (make_black_2._alpha < 85) {
make_black_2._alpha = make_black_2._alpha + 15;
} else if ((make_black_2._alpha >= 85) and (make_black_2.aaa == 0)) {
make_black_2.aaa = 1;
setTimeout(function () {
make_black_2.removeMovieClip();
square_mc_3.removeMovieClip();
levels_2.removeMovieClip();
levels.removeMovieClip();
_root.clouds_1.removeMovieClip();
gotoAndStop(_currentframe + 6);
}, 200);
}
}
if (((levels._visible == 1) and (levels._xscale >= 100)) and (levels_done == 0)) {
var _local3 = 0;
while (_local3 < 3) {
var _local2 = 1;
while (_local2 <= 7) {
levels_2.attachMovie("o_level", ("o_level" + (_local3 * sizee)) + _local2, (5 + (_local3 * sizee)) + _local2);
levels_2[("o_level" + (_local3 * sizee)) + _local2]._x = -203 + (_local2 * 50);
levels_2[("o_level" + (_local3 * sizee)) + _local2]._y = -50 + (_local3 * 60);
levels_2[("o_level" + (_local3 * sizee)) + _local2]._alpha = -(((_local3 * sizee) + _local2) * 4);
levels_2[("o_level" + (_local3 * sizee)) + _local2].i = _local3;
levels_2[("o_level" + (_local3 * sizee)) + _local2].j = _local2;
levels_2[("o_level" + (_local3 * sizee)) + _local2].gotoAndStop(2);
if (((_local3 * sizee) + _local2) <= open_levels) {
levels_2[("o_level" + (_local3 * sizee)) + _local2].gotoAndStop(1);
levels_2.createTextField(("t_level" + (_local3 * sizee)) + _local2, (1000 + (_local3 * sizee)) + _local2, 50, 50, 200, 100);
levels_2[("t_level" + (_local3 * sizee)) + _local2].setTextFormat(format);
levels_2[("t_level" + (_local3 * sizee)) + _local2].setNewTextFormat(format);
levels_2[("t_level" + (_local3 * sizee)) + _local2].text = (_local3 * sizee) + _local2;
levels_2[("t_level" + (_local3 * sizee)) + _local2].selectable = false;
levels_2[("t_level" + (_local3 * sizee)) + _local2].embedFonts = true;
if (((_local3 * sizee) + _local2) == 1) {
levels_2[("t_level" + (_local3 * sizee)) + _local2]._x = (-203 + (_local2 * 50)) - 5;
levels_2[("t_level" + (_local3 * sizee)) + _local2]._y = (-50 + (_local3 * 60)) - 15;
levels_2[("t_level" + (_local3 * sizee)) + _local2]._alpha = -(((_local3 * sizee) + _local2) * 4);
} else if ((((_local3 * sizee) + _local2) > 1) and (((_local3 * sizee) + _local2) < 10)) {
levels_2[("t_level" + (_local3 * sizee)) + _local2]._x = (-203 + (_local2 * 50)) - 9;
levels_2[("t_level" + (_local3 * sizee)) + _local2]._y = (-50 + (_local3 * 60)) - 15;
levels_2[("t_level" + (_local3 * sizee)) + _local2]._alpha = -(((_local3 * sizee) + _local2) * 4);
} else if (((((_local3 * sizee) + _local2) >= 10) and (((_local3 * sizee) + _local2) != 11)) and (((_local3 * sizee) + _local2) != 20)) {
levels_2[("t_level" + (_local3 * sizee)) + _local2]._x = (-203 + (_local2 * 50)) - 12;
levels_2[("t_level" + (_local3 * sizee)) + _local2]._y = (-50 + (_local3 * 60)) - 15;
levels_2[("t_level" + (_local3 * sizee)) + _local2]._alpha = -(((_local3 * sizee) + _local2) * 4);
} else if (((_local3 * sizee) + _local2) == 11) {
levels_2[("t_level" + (_local3 * sizee)) + _local2]._x = (-203 + (_local2 * 50)) - 8;
levels_2[("t_level" + (_local3 * sizee)) + _local2]._y = (-50 + (_local3 * 60)) - 15;
levels_2[("t_level" + (_local3 * sizee)) + _local2]._alpha = -(((_local3 * sizee) + _local2) * 4);
} else if (((_local3 * sizee) + _local2) == 20) {
levels_2[("t_level" + (_local3 * sizee)) + _local2]._x = (-203 + (_local2 * 50)) - 16;
levels_2[("t_level" + (_local3 * sizee)) + _local2]._y = (-50 + (_local3 * 60)) - 15;
levels_2[("t_level" + (_local3 * sizee)) + _local2]._alpha = -(((_local3 * sizee) + _local2) * 4);
}
}
_local2 = _local2 + 1;
}
_local3 = _local3 + 1;
}
levels_done = 1;
}
};
panel_mm.o_panel_1.onRelease = function () {
if (music_enable == 1) {
music_back.stop();
music_enable = 0;
sData_so.data.music_enable = 0;
sData_so.flush();
panel_mm.o_panel_1.gotoAndStop(3);
panel_mm.o_panel_1.curr = 3;
} else if (music_enable == 0) {
music_enable = 1;
sData_so.data.music_enable = 1;
sData_so.flush();
PlayMusic(s_menu_back);
panel_mm.o_panel_1.gotoAndStop(1);
panel_mm.o_panel_1.curr = 1;
}
};
panel_mm.o_panel_2.onRelease = function () {
if (sound_enable == 1) {
sound_enable = 0;
sData_so.data.sound_enable = 0;
sData_so.flush();
panel_mm.o_panel_2.gotoAndStop(3);
panel_mm.o_panel_2.curr = 3;
} else if (sound_enable == 0) {
sound_enable = 1;
sData_so.data.sound_enable = 1;
sData_so.flush();
panel_mm.o_panel_2.gotoAndStop(1);
panel_mm.o_panel_2.curr = 1;
}
};
panel_mm.attachMovie("but_sponsor_logo_1", "o_sponsor_logo_1", panel_mm.getNextHighestDepth());
panel_mm.o_sponsor_logo_1.gotoAndStop(1);
panel_mm.o_sponsor_logo_1._x = 50;
panel_mm.o_sponsor_logo_1._y = 42;
panel_mm.o_sponsor_logo_1.onRelease = function () {
getURL (sponsorurl, "_blank");
};
Frame 4
function add_achieve(x) {
ach_queue[ach_queue_number] = x;
ach_queue_number++;
up_dn = 0;
}
function show_achieve(x) {
if (ach_queue_cur < ach_queue_number) {
if (ach_stars == 0) {
var _local1 = 0;
while (_local1 < 9) {
achieve_hint.attachMovie("o_up_star", "o_up_star" + _local1, 5001 + _local1);
achieve_hint["o_up_star" + _local1]._x = (achieve_hint.o_achieve_hint_1._x - 109) + (24 * _local1);
achieve_hint["o_up_star" + _local1]._y = achieve_hint.o_achieve_hint_1._y - 30;
_local1 = _local1 + 1;
}
ach_stars = 1;
}
textt1 = ach_queue[ach_queue_cur];
achieve_hint.t_ach1.text = achiev_array[textt1][1];
achieve_hint.t_ach2.text = achiev_array[textt1][2];
achieve_hint.o_achieve_hint_1.onEnterFrame = function () {
if (achieve_hint.o_achieve_hint_1._y >= 533) {
ach_done = 1;
achieve_hint.o_achieve_hint_1._y = 440 + achieve_hint.o_achieve_hint_1._height;
ach_done = 0;
ach_queue_cur++;
up_dn = 0;
ach_stars = 0;
}
if (ach_done == 0) {
if ((achieve_hint.o_achieve_hint_1._y == 527) and (up_dn == 0)) {
up_dn = 1;
} else if ((achieve_hint.o_achieve_hint_1._y <= 440) and (up_dn == 1)) {
achieve_hint.o_achieve_hint_1._y = 440;
setTimeout(function () {
if (up_dn == 1) {
up_dn = 0;
}
}, 1500);
}
if (up_dn == 1) {
achieve_hint.o_achieve_hint_1._y = achieve_hint.o_achieve_hint_1._y - x;
achieve_hint.t_ach1._x = achieve_hint.o_achieve_hint_1._x - 38;
achieve_hint.t_ach1._y = achieve_hint.o_achieve_hint_1._y - 20;
achieve_hint.t_ach2._x = achieve_hint.o_achieve_hint_1._x - 38;
achieve_hint.t_ach2._y = achieve_hint.o_achieve_hint_1._y;
} else if (up_dn == 0) {
achieve_hint.o_achieve_hint_1._y = achieve_hint.o_achieve_hint_1._y + x;
achieve_hint.t_ach1._x = achieve_hint.o_achieve_hint_1._x - 38;
achieve_hint.t_ach1._y = achieve_hint.o_achieve_hint_1._y - 20;
achieve_hint.t_ach2._x = achieve_hint.o_achieve_hint_1._x - 38;
achieve_hint.t_ach2._y = achieve_hint.o_achieve_hint_1._y;
}
}
};
} else if (ach_queue_cur == ach_queue_number) {
up_dn = 0;
}
}
function stand_block() {
i = cell_i + 1;
j = cell_j;
k = ((i - 2) * size) + j;
PlaySound(magic);
way_obj[(i * size) + j] = 7;
tools_stand[(i * size) + j] = 1;
tiles.attachMovie("o_obj", "o_noexit_" + noexit_number, (10 * k) + 3);
tiles["o_noexit_" + noexit_number]._x = 2 + (53 * j);
tiles["o_noexit_" + noexit_number]._y = ((-dx) + (41 * i)) - 50;
tiles["o_noexit_" + noexit_number].gotoAndStop(13);
tiles["o_noexit_" + noexit_number].number = noexit_number;
tiles["o_noexit_" + noexit_number].coord = k;
tiles.attachMovie("o_shadow", "o_shadow2_" + (3 * noexit_number), (10 * ((((i - 2) * size) + j) - 1)) + 1);
tiles["o_shadow2_" + (3 * noexit_number)].gotoAndStop(2);
tiles["o_shadow2_" + (3 * noexit_number)]._x = 2 + (53 * (j - 1));
tiles["o_shadow2_" + (3 * noexit_number)]._y = ((-dx) + (41 * i)) - 50;
tiles["o_shadow2_" + (3 * noexit_number)]._visible = 0;
tiles.attachMovie("o_shadow", ("o_shadow2_" + (3 * noexit_number)) + 1, (10 * ((((i - 2) * size) + j) + 1)) + 1);
tiles[("o_shadow2_" + (3 * noexit_number)) + 1].gotoAndStop(3);
tiles[("o_shadow2_" + (3 * noexit_number)) + 1]._x = 2 + (53 * (j + 1));
tiles[("o_shadow2_" + (3 * noexit_number)) + 1]._y = ((-dx) + (41 * i)) - 50;
tiles[("o_shadow2_" + (3 * noexit_number)) + 1]._visible = 0;
tiles.attachMovie("o_shadow", ("o_shadow2_" + (3 * noexit_number)) + 2, (10 * ((((i + 1) - 2) * size) + j)) + 1);
tiles[("o_shadow2_" + (3 * noexit_number)) + 2].gotoAndStop(1);
tiles[("o_shadow2_" + (3 * noexit_number)) + 2]._x = 2 + (53 * j);
tiles[("o_shadow2_" + (3 * noexit_number)) + 2]._y = ((-dx) + (41 * (i + 1))) - 50;
tiles[("o_shadow2_" + (3 * noexit_number)) + 2]._visible = 0;
trace(tiles["o_noexit_" + noexit_number].getDepth());
noexit_number++;
tool_noexit_count--;
inter.inter_text_1.text = tool_noexit_count;
if (tool_noexit_count == 1) {
inter.inter_text_1._x = inter.o_inter_0._x + 44;
} else {
inter.inter_text_1._x = inter.o_inter_0._x + 40;
}
if ((tool_noexit_count == 0) and (tool_come_count > 0)) {
tool_number = 2;
inter.o_inter_2.gotoAndStop(2);
inter.o_inter_2.curr = 2;
inter.o_inter_1.gotoAndStop(1);
inter.o_inter_1.curr = 1;
} else if ((tool_noexit_count == 0) and (tool_come_count == 0)) {
inter.o_inter_1.gotoAndStop(1);
inter.o_inter_1.curr = 1;
inter.o_inter_2.gotoAndStop(1);
inter.o_inter_2.curr = 1;
}
}
function stand_cake() {
i = cell_i + 1;
j = cell_j;
k = ((i - 2) * size) + j;
PlaySound(magic);
tools_stand[(i * size) + j] = 2;
way_obj[(i * size) + j] = 8;
tiles.attachMovie("o_wood_princess", "o_comehere_" + (2 * comehere_number), (10 * k) + 7);
tiles["o_comehere_" + (2 * comehere_number)].gotoAndStop(1);
tiles["o_comehere_" + (2 * comehere_number)]._x = 2 + (53 * j);
tiles["o_comehere_" + (2 * comehere_number)]._y = ((-dx) + (41 * i)) - 78;
tiles["o_comehere_" + (2 * comehere_number)].coord = k;
tiles.attachMovie("o_key_shadow", "o_comehere_" + ((2 * comehere_number) + 1), (10 * k) + 6);
tiles["o_comehere_" + ((2 * comehere_number) + 1)].gotoAndStop(1);
tiles["o_comehere_" + ((2 * comehere_number) + 1)]._x = (2 + (53 * j)) + 27;
tiles["o_comehere_" + ((2 * comehere_number) + 1)]._y = ((-dx) + (41 * i)) + 23;
tiles["o_comehere_" + ((2 * comehere_number) + 1)]._xscale = 130;
tiles["o_comehere_" + ((2 * comehere_number) + 1)]._yscale = 130;
comehere_number++;
tool_come_count--;
inter.inter_text_2.text = tool_come_count;
if (tool_come_count == 1) {
inter.inter_text_2._x = inter.o_inter_0._x + 98;
} else {
inter.inter_text_2._x = inter.o_inter_0._x + 94;
}
if ((tool_come_count == 0) and (tool_noexit_count > 0)) {
tool_number = 1;
inter.o_inter_1.gotoAndStop(2);
inter.o_inter_1.curr = 2;
inter.o_inter_2.gotoAndStop(1);
inter.o_inter_2.curr = 1;
} else if ((tool_noexit_count == 0) and (tool_come_count == 0)) {
inter.o_inter_1.gotoAndStop(1);
inter.o_inter_1.curr = 1;
inter.o_inter_2.gotoAndStop(1);
inter.o_inter_2.curr = 1;
}
}
function change_noexit(x) {
tiles["o_noexit_" + x].gotoAndStop(14);
tiles["o_shadow2_" + (3 * x)]._visible = 1;
tiles[("o_shadow2_" + (3 * x)) + 1]._visible = 1;
tiles[("o_shadow2_" + (3 * x)) + 2]._visible = 1;
PlaySound(s_click);
}
function kill_prince() {
go = 0;
tiles.o_prince_12.gotoAndStop(1);
PlaySound(s_magic_boom);
boom(tiles.o_prince_3._x + 15, tiles.o_prince_3._y - 40);
tiles.o_prince_2._visible = 0;
tiles.o_prince_3._visible = 0;
tiles["o_!_1"].removeMovieClip();
}
function tool_aft_srt() {
tool_number = tool_after_restart;
if (tool_number == 1) {
inter.o_inter_1.gotoAndStop(2);
inter.o_inter_1.curr = 2;
inter.o_inter_2.gotoAndStop(1);
inter.o_inter_2.curr = 1;
} else if (tool_number == 2) {
inter.o_inter_2.gotoAndStop(2);
inter.o_inter_2.curr = 2;
inter.o_inter_1.gotoAndStop(1);
inter.o_inter_1.curr = 1;
}
}
function show_light(x) {
x.a = 0;
x._alpha = 0;
x.onEnterFrame = function () {
if (x._alpha >= 80) {
x.a = 1;
} else if (x._alpha < 0) {
x.removeMovieClip();
}
if (x.a == 0) {
x._alpha = x._alpha + 5;
} else if (x.a == 1) {
x._alpha = x._alpha - 5;
}
if (x._alpha > 0) {
x._rotation = x._rotation + 15;
}
};
}
function get_hint() {
hints.hint1._x = hints_array[hints_count][0];
hints.hint1._y = hints_array[hints_count][1];
hints.t_hint1._x = hints_array[hints_count][0] - 99;
hints.t_hint1._y = hints_array[hints_count][1] - 50;
hints.t_hint1.text = hints_array[hints_count][2];
hints.t_hint2._x = hints.hint1._x - 35;
hints.t_hint2._y = hints.hint1._y + 14;
hints.hint1.a = 0;
}
function boom(x, y) {
var _local1 = 0;
while (_local1 < 9) {
tiles.attachMovie("o_boom_part", "o_boom_part" + (2 + _local1), 5001 + _local1);
tiles["o_boom_part" + (2 + _local1)]._x = (x - (Math.random() * 25)) + (Math.random() * 50);
tiles["o_boom_part" + (2 + _local1)]._y = (y - (Math.random() * 25)) + (Math.random() * 50);
_local1 = _local1 + 1;
}
}
function bubles(x, y) {
var _local1 = 0;
while (_local1 < 6) {
tiles.attachMovie("o_buble", "o_buble" + _local1, 5001 + _local1);
tiles["o_buble" + _local1]._x = (x - (Math.random() * 20)) + (Math.random() * 40);
tiles["o_buble" + _local1]._y = (y - (Math.random() * 10)) + (Math.random() * 20);
_local1 = _local1 + 1;
}
}
function starss(x, y) {
var _local1 = 0;
while (_local1 < 12) {
tiles.attachMovie("o_little_star", "o_little_star" + _local1, 5001 + _local1);
tiles["o_little_star" + _local1]._x = (x - (Math.random() * 20)) + (Math.random() * 40);
tiles["o_little_star" + _local1]._y = (y - (Math.random() * 10)) + (Math.random() * 20);
tiles["o_little_star" + _local1].dir = 15 + (30 * _local1);
_local1 = _local1 + 1;
}
}
function starss2(x, y) {
var _local1 = 0;
while (_local1 < 12) {
tiles.attachMovie("o_little_star", "o_little_star" + _local1, 6001 + _local1);
tiles["o_little_star" + _local1]._x = ((x - (Math.random() * 20)) + (Math.random() * 40)) + (Math.cos((Math.PI * (15 + (30 * _local1))) / 180) * 140);
tiles["o_little_star" + _local1]._y = ((y - (Math.random() * 10)) + (Math.random() * 20)) + (Math.sin((Math.PI * (15 + (30 * _local1))) / 180) * 140);
tiles["o_little_star" + _local1].dir = (15 + (30 * _local1)) + 180;
_local1 = _local1 + 1;
}
}
function starss3(x, y) {
var _local1 = 0;
while (_local1 < 4) {
tiles.attachMovie("o_little_star", "o_little_star" + _local1, 5001 + _local1);
tiles["o_little_star" + _local1].gotoAndStop(2);
tiles["o_little_star" + _local1]._x = x + (Math.cos((Math.PI * (15 + (60 * _local1))) / 180) * ((10 + (Math.random() * 20)) - (Math.random() * 10)));
tiles["o_little_star" + _local1]._y = (y + (Math.sin((Math.PI * (15 + (60 * _local1))) / 180) * ((10 + (Math.random() * 20)) - (Math.random() * 10)))) - 5;
tiles["o_little_star" + _local1].dir = (15 + (30 * _local1)) + 180;
_local1 = _local1 + 1;
}
}
function snowy(x, y, z) {
var _local1 = 0;
while (_local1 < 6) {
tiles.attachMovie("o_snowy", ("o_snowy" + (z * 10)) + _local1, (5000 + (100 * z)) + _local1);
tiles[("o_snowy" + (z * 10)) + _local1]._x = (x - (Math.random() * 20)) + (Math.random() * 40);
tiles[("o_snowy" + (z * 10)) + _local1]._y = (y - (Math.random() * 10)) + (Math.random() * 20);
_local1 = _local1 + 1;
}
}
function cake_p(x, y) {
var _local1 = 0;
while (_local1 < 4) {
tiles.attachMovie("o_cake_piece", "o_cake_piece_" + _local1, 5001 + _local1);
tiles["o_cake_piece_" + _local1].gotoAndStop(_local1 + 1);
tiles["o_cake_piece_" + _local1]._x = x + Math.cos((Math.PI * (15 + (60 * _local1))) / 180);
tiles["o_cake_piece_" + _local1]._y = y + Math.sin((Math.PI * (15 + (60 * _local1))) / 180);
tiles["o_cake_piece_" + _local1].dir = (30 + (40 * _local1)) + 180;
_local1 = _local1 + 1;
}
}
function show_blick(x) {
x._alpha = 90;
x.onEnterFrame = function () {
if (x._alpha >= 80) {
x.a = 1;
} else if (x._alpha <= -200) {
x.a = 0;
}
if (x.a == 0) {
x._alpha = x._alpha + 3;
} else if (x.a == 1) {
x._alpha = x._alpha - 3;
}
if (x._alpha > 0) {
x._rotation = x._rotation + 12;
}
x._x = _root.tiles.o_key_3._x + 33;
x._y = _root.tiles.o_key_3._y + 52;
};
}
function show_blick3(x) {
x._alpha = 100;
x.onEnterFrame = function () {
if (x._alpha >= 80) {
x.a = 1;
} else if (x._alpha <= -200) {
x.a = 0;
}
if (x.a == 0) {
x._alpha = x._alpha + 3;
} else if (x.a == 1) {
x._alpha = x._alpha - 3;
}
if (x._alpha > 0) {
x._rotation = x._rotation + 12;
}
};
}
function show_blick_2(x) {
x._alpha = -125;
x.onEnterFrame = function () {
if (x._alpha >= 80) {
x.a = 1;
} else if (x._alpha <= -125) {
x.a = 0;
}
if (x.a == 0) {
x._alpha = x._alpha + 3;
} else if (x.a == 1) {
x._alpha = x._alpha - 3;
}
if (x._alpha > 0) {
x._rotation = x._rotation + 12;
}
x._x = _root.tiles.o_key_1._x + 29;
x._y = _root.tiles.o_key_1._y + 57;
};
}
function Play_xxscale(x) {
if (x._xscale < 100) {
x._xscale = x._xscale + 10;
x._yscale = x._xscale;
x._rotation = x._rotation + 45;
}
}
function Play_alpha(x) {
if (x._alpha < 35) {
x._alpha = x._alpha + 2;
}
}
function move_p(x) {
if (x.side_prev != 0) {
if (((go == 1) and (((x._x + 26) % 52) == 0)) and ((x._y % 42) == 0)) {
x.h_j = Math.floor(x._x / 52);
x.h_i = Math.floor(x._y / 42);
current_cell = (x.h_i * size) + x.h_j;
right = current_cell + 1;
up = current_cell - 12;
left = current_cell - 1;
down = current_cell + 12;
if ((way[current_cell] == 2) and (x.side_prev == 4)) {
if (way[right] == 0) {
x.side_prev = 3;
} else {
x.side_prev = 1;
}
} else if ((way[current_cell] == 7) and (x.side_prev == 2)) {
if (way[right] == 0) {
x.side_prev = 3;
} else {
x.side_prev = 1;
}
} else if ((way[current_cell] == 3) and (x.side_prev == 3)) {
if (way[up] == 0) {
x.side_prev = 4;
} else {
x.side_prev = 2;
}
} else if ((way[current_cell] == 8) and (x.side_prev == 1)) {
if (way[up] == 0) {
x.side_prev = 4;
} else {
x.side_prev = 2;
}
} else if ((way[current_cell] == 4) and (x.side_prev == 4)) {
if (way[left] == 0) {
x.side_prev = 1;
} else {
x.side_prev = 3;
}
} else if ((way[current_cell] == 9) and (x.side_prev == 2)) {
if (way[left] == 0) {
x.side_prev = 1;
} else {
x.side_prev = 3;
}
} else if ((way[current_cell] == 5) and (x.side_prev == 1)) {
if (way[down] == 0) {
x.side_prev = 2;
} else {
x.side_prev = 4;
}
} else if ((way[current_cell] == 10) and (x.side_prev == 3)) {
if (way[down] == 0) {
x.side_prev = 2;
} else {
x.side_prev = 4;
}
}
if (x.side_prev == 1) {
if ((way[right] >= 1) and (way[right] != undefined)) {
x.x_next = x._x + 52;
x.side = 1;
} else if ((((way[right] == 0) or (way[right] == undefined)) and (way[up] >= 1)) and ((way[down] == 0) or (way[down] == undefined))) {
x.y_next = x._y - 42;
x.side = 2;
} else if ((((way[right] == 0) or (way[right] == undefined)) and (way[down] >= 1)) and (way[up] == 0)) {
x.y_next = x._y + 42;
x.side = 4;
} else if (((way[right] == 0) or (way[right] == undefined)) and (way[left] >= 1)) {
x.x_next = x._x - 52;
x.side = 3;
}
} else if (x.side_prev == 2) {
if (way[up] >= 1) {
x.y_next = x._y - 42;
x.side = 2;
} else if (((way[up] == 0) and (way[left] >= 1)) and (way[right] == 0)) {
x.x_next = x._x - 52;
x.side = 3;
} else if (((way[up] == 0) and (way[right] >= 1)) and (way[left] == 0)) {
x.x_next = x._x + 52;
x.side = 1;
} else if (((way[up] == 0) and (way[down] >= 1)) and (way[up] == 0)) {
x.y_next = x._y + 42;
x.side = 4;
}
} else if (x.side_prev == 3) {
if (((way[left] >= 1) and (way[left] < 200)) and (way[left] != undefined)) {
x.x_next = x._x - 52;
x.side = 3;
} else if ((((way[left] == 0) or (way[left] == undefined)) and (way[up] >= 1)) and ((way[down] == 0) or (way[down] == undefined))) {
x.y_next = x._y - 42;
x.side = 2;
} else if ((((way[left] == 0) or (way[left] == undefined)) and (way[down] >= 1)) and (way[up] == 0)) {
x.y_next = x._y + 42;
x.side = 4;
} else if (((way[left] == 0) or (way[left] == undefined)) and (way[right] >= 1)) {
x.x_next = x._x + 52;
x.side = 1;
}
} else if (x.side_prev == 4) {
if ((way[down] >= 1) and (way[down] != undefined)) {
x.y_next = x._y + 42;
x.side = 4;
} else if ((((way[down] == 0) or (way[down] == undefined)) and (way[left] >= 1)) and ((way[right] == 0) or (way[right] == undefined))) {
x.x_next = x._x - 52;
x.side = 3;
} else if ((((way[down] == 0) or (way[down] == undefined)) and (way[right] >= 1)) and (way[left] == 0)) {
x.x_next = x._x + 52;
x.side = 1;
} else if ((((way[down] == 0) or (way[down] == undefined)) and (way[up] >= 1)) and (way[down] == 0)) {
x.y_next = x._y - 42;
x.side = 2;
}
}
}
}
if (x.side != 0) {
if (x.side == 1) {
if (x._x < x.x_next) {
x._x = x._x + p_xspeed;
if (x == tiles.o_prince_1) {
current_cell = (x.h_i * size) + x.h_j;
depth = (10 * (current_cell - 23)) + 4;
tiles.o_prince_2.swapDepths(depth);
tiles.o_prince_3.swapDepths(depth + 1);
tiles.o_prince_2._xscale = 100;
tiles.o_prince_3._xscale = 100;
} else if (x == tiles.o_prince_11) {
current_cell = (x.h_i * size) + x.h_j;
depth = (10 * (current_cell - 23)) + 4;
tiles.o_prince_12.swapDepths(depth);
tiles.o_prince_13.swapDepths(depth + 1);
tiles.o_prince_12._xscale = 100;
tiles.o_prince_13._xscale = 100;
}
}
} else if (x.side == 2) {
if (x._y > x.y_next) {
x._y = x._y - p_yspeed;
if (x == tiles.o_prince_1) {
current_cell = (x.h_i * size) + x.h_j;
depth = (10 * (current_cell - 24)) + 4;
tiles.o_prince_2.swapDepths(depth);
tiles.o_prince_3.swapDepths(depth + 1);
} else if (x == tiles.o_prince_11) {
current_cell = (x.h_i * size) + x.h_j;
depth = (10 * (current_cell - 23)) + 4;
tiles.o_prince_12.swapDepths(depth);
tiles.o_prince_13.swapDepths(depth + 1);
tiles.o_prince_12._xscale = 100;
tiles.o_prince_13._xscale = 100;
}
}
} else if (x.side == 3) {
if (x._x > x.x_next) {
x._x = x._x - p_xspeed;
if (x == tiles.o_prince_1) {
current_cell = (x.h_i * size) + x.h_j;
depth = (10 * (current_cell - 23)) + 4;
tiles.o_prince_2.swapDepths(depth);
tiles.o_prince_3.swapDepths(depth + 1);
tiles.o_prince_2._xscale = -100;
tiles.o_prince_3._xscale = -100;
} else if (x == tiles.o_prince_11) {
current_cell = (x.h_i * size) + x.h_j;
depth = (10 * (current_cell - 23)) + 4;
tiles.o_prince_12.swapDepths(depth);
tiles.o_prince_13.swapDepths(depth + 1);
tiles.o_prince_12._xscale = 100;
tiles.o_prince_13._xscale = 100;
}
}
} else if (x.side == 4) {
if (x._y < x.y_next) {
x._y = x._y + p_yspeed;
if (x == tiles.o_prince_1) {
current_cell = (x.h_i * size) + x.h_j;
depth = (10 * (current_cell - 12)) + 4;
tiles.o_prince_2.swapDepths(depth);
tiles.o_prince_3.swapDepths(depth + 1);
} else if (x == tiles.o_prince_11) {
current_cell = (x.h_i * size) + x.h_j;
depth = (10 * current_cell) + 4;
tiles.o_prince_12.swapDepths(depth);
tiles.o_prince_13.swapDepths(depth + 1);
tiles.o_prince_12._xscale = 100;
tiles.o_prince_13._xscale = 100;
}
}
}
}
x.side_prev = x.side;
h_j = Math.floor(x._x / 52);
h_i = Math.floor(x._y / 42);
side = x.side;
side_prev = x.side_prev;
if (x == tiles.o_prince_1) {
hero_j = h_j;
hero_i = h_i;
}
if (tiles.o_prince_4.hitTest(tiles.o_prince_14) and (go == 1)) {
PlaySound(s_yohoho);
kill_prince();
inter.o_inter_21.removeMovieClip();
inter.o_inter_20.removeMovieClip();
cur_try = try_number;
setTimeout(function () {
if (cur_try == try_number) {
after_level._xscale = 0;
after_level._yscale = 0;
after_level.o_after_level_menu7._visible = 1;
after_level.o_after_level_menu5.gotoAndStop(5);
after_level.o_after_level_menu5._y = -194;
after_level.o_after_level_menu5._x = -144;
after_level.o_after_level_menu5._visible = 1;
panel.o_panel_4._visible = 0;
panel.o_panel_3._visible = 0;
after_level._visible = 1;
square_mc._alpha = 0;
square_mc._visible = 1;
music_back.stop();
go = 3;
PlaySound(s_fail);
}
}, 1000);
}
}
function move_one_side(x) {
if (x.side_prev != 0) {
if (((x.go == 1) and (((x._x + 26) % 52) == 0)) and ((x._y % 42) == 0)) {
x.h_j = Math.floor(x._x / 52);
x.h_i = Math.floor(x._y / 42);
current_cell = (x.h_i * size) + x.h_j;
right = current_cell + 1;
up = current_cell - 12;
left = current_cell - 1;
down = current_cell + 12;
if (x.side_prev == 1) {
if (way[right] >= 1) {
x.x_next = x._x + 52;
x.side = 1;
}
} else if (x.side_prev == 2) {
if (way[up] >= 1) {
x.y_next = x._y - 42;
x.side = 2;
}
} else if (x.side_prev == 3) {
if (way[left] >= 1) {
x.x_next = x._x - 52;
x.side = 3;
}
} else if (x.side_prev == 4) {
if (way[down] >= 1) {
x.y_next = x._y + 42;
x.side = 4;
}
}
}
}
if (x.side != 0) {
if (x.side == 1) {
if (x._x < x.x_next) {
x._x = x._x + p_xspeed;
current_cell = (x.h_i * size) + x.h_j;
tiles[("o_iceball_" + x.number) + 1].swapDepths((10 * (current_cell - 23)) + 8);
} else if (x._x >= x.x_next) {
snowy(x._x, x._y - 25, x.number);
tiles[("o_iceball_" + x.number) + 2].removeMovieClip();
tiles[("o_iceball_" + x.number) + 1].removeMovieClip();
tiles["o_iceball_" + x.number].removeMovieClip();
}
} else if (x.side == 2) {
if (x._y > x.y_next) {
x._y = x._y - p_yspeed;
current_cell = (x.h_i * size) + x.h_j;
tiles[("o_iceball_" + x.number) + 1].swapDepths((10 * (current_cell - 12)) + 8);
} else if (x._y <= x.y_next) {
snowy(x._x, x._y - 25, x.number);
tiles[("o_iceball_" + x.number) + 2].removeMovieClip();
tiles[("o_iceball_" + x.number) + 1].removeMovieClip();
tiles["o_iceball_" + x.number].removeMovieClip();
}
} else if (x.side == 3) {
if (x._x > x.x_next) {
x._x = x._x - p_xspeed;
current_cell = (x.h_i * size) + x.h_j;
tiles[("o_iceball_" + x.number) + 1].swapDepths((10 * (current_cell - 23)) + 8);
} else if (x._x <= x.x_next) {
snowy(x._x, x._y - 25, x.number);
tiles[("o_iceball_" + x.number) + 2].removeMovieClip();
tiles[("o_iceball_" + x.number) + 1].removeMovieClip();
tiles["o_iceball_" + x.number].removeMovieClip();
}
} else if (x.side == 4) {
if (x._y < x.y_next) {
x._y = x._y + p_yspeed;
current_cell = (x.h_i * size) + x.h_j;
tiles[("o_iceball_" + x.number) + 1].swapDepths((10 * (current_cell - 12)) + 8);
} else if (x._y >= x.y_next) {
snowy(x._x, x._y - 25, x.number);
tiles[("o_iceball_" + x.number) + 2].removeMovieClip();
tiles[("o_iceball_" + x.number) + 1].removeMovieClip();
tiles["o_iceball_" + x.number].removeMovieClip();
}
}
}
if (tiles[("o_iceball_" + x.number) + 2].hitTest(tiles.o_prince_4) and (go == 1)) {
kill_prince();
cur_try = try_number;
inter.o_inter_21.removeMovieClip();
inter.o_inter_20.removeMovieClip();
setTimeout(function () {
if (cur_try == try_number) {
after_level._xscale = 0;
after_level._yscale = 0;
after_level.o_after_level_menu7._visible = 1;
after_level.o_after_level_menu5._y = -194;
after_level.o_after_level_menu5._x = -144;
after_level.o_after_level_menu5.gotoAndStop(4);
after_level.o_after_level_menu5._visible = 1;
panel.o_panel_4._visible = 0;
panel.o_panel_3._visible = 0;
after_level._visible = 1;
square_mc._alpha = 0;
square_mc._visible = 1;
music_back.stop();
go = 3;
PlaySound(s_fail);
}
}, 1000);
tiles[("o_iceball_" + x.number) + 2].removeMovieClip();
tiles[("o_iceball_" + x.number) + 1].removeMovieClip();
tiles["o_iceball_" + x.number].removeMovieClip();
}
if (tiles[("o_iceball_" + x.number) + 2].hitTest(tiles.o_prince_14) and (go == 1)) {
snowy(x._x, x._y - 25, x.number);
boom(tiles.o_prince_13._x + 15, tiles.o_prince_13._y - 40);
tiles.o_prince_14.removeMovieClip();
tiles.o_prince_13.removeMovieClip();
tiles.o_prince_12.removeMovieClip();
tiles.o_prince_11.removeMovieClip();
tiles[("o_iceball_" + x.number) + 2].removeMovieClip();
tiles[("o_iceball_" + x.number) + 1].removeMovieClip();
tiles["o_iceball_" + x.number].removeMovieClip();
}
}
var distance = 0;
var angleInDegrees = 0;
var color = 15463162;
var alpha = 1;
var blurX = 2;
var blurY = 2;
var strength = 5;
var quality = 3;
var inner = false;
var knockout = false;
var hideObject = false;
var format_stars3 = new TextFormat();
format_stars3.font = "Luvable";
format_stars3.color = 5019888 /* 0x4C98F0 */;
format_stars3.size = 18;
var format_hint_arr = new TextFormat();
format_hint_arr.font = "Luvable";
format_hint_arr.color = 5019888 /* 0x4C98F0 */;
format_hint_arr.size = 14;
format_hint_arr.align = "center";
stop();
var ach_done = 0;
var up_dn = 0;
var ach_queue = new Array();
ach_queue = [-1, -1, -1, -1, -1];
var ach_queue_number = 0;
var ach_queue_cur = 0;
var ach_stars = 0;
var wave_count = 0;
var bfly_count = 0;
var blck_count = 0;
try_number++;
_root.levels_2.removeMovieClip();
_root.levels.removeMovieClip();
_root.menu_clouds.removeMovieClip();
_root.clouds_1.removeMovieClip();
_root.clouds_2.removeMovieClip();
_root.clouds_3.removeMovieClip();
_root.hints.removeMovieClip();
_root.achiev_menu.removeMovieClip();
_root.panel_mm.removeMovieClip();
var format_inter = new TextFormat();
format_inter.font = "Luvable";
format_inter.color = 16777215 /* 0xFFFFFF */;
format_inter.size = 25;
var tool_come_count = 0;
var tool_noexit_count = 0;
var back_count = 0;
var in_cell_now = 0;
var no_exit_curr = 0;
var hints_count = 0;
tool_noexit_count = tool_a1;
tool_come_count = tool_a2;
back_count = back_a;
var backBuffer = (new flash.display.BitmapData(this._width, this._height, false));
var tiles_bmp = (new flash.display.BitmapData(this._width, this._height, true, 0));
var size = 12;
var tool_number = 0;
var go = 0;
var cellcount = 0;
var ice_button_number = 0;
var current_cell = 0;
var iceball_number = 0;
var key = 0;
var cellcell = 0;
var right = 0;
var up = 0;
var left = 0;
var down = 0;
var h_i = 0;
var h_j = 0;
var hero_i = 0;
var hero_j = 0;
var x_next = 0;
var y_next = 0;
var side = 0;
var side_prev = 1;
var hero_side = 0;
var hero_side_prev = 1;
var doors = 0;
var btn_number = 0;
var noexit_number = 0;
var comehere_number = 0;
var teleports = 0;
var got_star = 0;
var cell_number = 0;
var cell_i = 0;
var cell_j = 0;
var k = 0;
var kk = 0;
var dx = 10;
var depth = 0;
var way = new Array();
var way_obj = new Array();
var was_in = new Array();
var space_pressed = 0;
var one_pressed = 0;
var two_pressed = 0;
var r_pressed = 0;
var keyListener = new Object();
keyListener.onKeyDown = function () {
if ((Key.getCode() == 32) and (space_pressed == 0)) {
if (go == 0) {
go = 1;
space_pressed = 1;
side_prev = 1;
go = 1;
tiles.o_prince_2.gotoAndPlay(2);
tiles.o_prince_12.gotoAndPlay(2);
inter.o_inter_3.gotoAndStop(3);
inter.o_inter_3.curr = 3;
inter.o_inter_22._visible = 0;
inter.o_inter_23._visible = 0;
inter.o_inter_2._visible = 0;
inter.o_inter_1._visible = 0;
inter.inter_text_2._visible = 0;
inter.inter_text_1._visible = 0;
inter.o_inter_20._visible = 0;
inter.o_inter_21._visible = 0;
} else if (go == 1) {
space_pressed = 1;
backBuffer.draw(clouds);
backBuffer.draw(tiles_back);
backBuffer.draw(tiles);
snow.removeMovieClip();
inter.removeMovieClip();
clouds.removeMovieClip();
tiles_back.removeMovieClip();
tiles.removeMovieClip();
panel.removeMovieClip();
after_level.removeMovieClip();
square_mc.removeMovieClip();
square_mc_2.removeMovieClip();
hints.removeMovieClip();
achieve_hint.removeMovieClip();
been_restart = 1;
screen.attachBitmap(backBuffer, _root.getNextHighestDepth());
gotoAndPlay(_currentframe + 1);
}
} else if ((Key.getCode() == 49) and (one_pressed == 0)) {
up_dn = 0;
if (tool_noexit_count != 0) {
PlaySound(s_click);
tool_number = 1;
inter.o_inter_1.gotoAndStop(2);
inter.o_inter_1.curr = 2;
inter.o_inter_2.gotoAndStop(1);
inter.o_inter_2.curr = 1;
}
one_pressed = 1;
} else if ((Key.getCode() == 50) and (two_pressed == 0)) {
if (tool_come_count != 0) {
PlaySound(s_click);
tool_number = 2;
inter.o_inter_2.gotoAndStop(2);
inter.o_inter_2.curr = 2;
inter.o_inter_1.gotoAndStop(1);
inter.o_inter_1.curr = 1;
}
two_pressed = 1;
} else if ((Key.getCode() == 82) and (r_pressed == 0)) {
backBuffer.draw(clouds);
backBuffer.draw(tiles_back);
backBuffer.draw(tiles);
snow.removeMovieClip();
inter.removeMovieClip();
clouds.removeMovieClip();
tiles_back.removeMovieClip();
tiles.removeMovieClip();
panel.removeMovieClip();
after_level.removeMovieClip();
square_mc.removeMovieClip();
square_mc_2.removeMovieClip();
hints.removeMovieClip();
achieve_hint.removeMovieClip();
been_restart = 1;
screen.attachBitmap(backBuffer, _root.getNextHighestDepth());
gotoAndPlay(_currentframe + 1);
r_pressed = 1;
}
};
keyListener.onKeyUp = function () {
if ((Key.getCode() == 32) and (space_pressed == 1)) {
space_pressed = 0;
} else if ((Key.getCode() == 49) and (one_pressed == 1)) {
one_pressed = 0;
} else if ((Key.getCode() == 50) and (two_pressed == 1)) {
two_pressed = 0;
}
};
Key.addListener(keyListener);
var format_achieve = new TextFormat();
format_achieve.font = "Berlin Sans FB 1";
format_achieve.color = 4605510 /* 0x464646 */;
format_achieve.size = 15;
format_achieve.bold = true;
format_achieve.align = "center";
var format_achieve_2 = new TextFormat();
format_achieve_2.font = "Berlin Sans FB 1";
format_achieve_2.color = 4605510 /* 0x464646 */;
format_achieve_2.size = 13;
format_achieve_2.bold = false;
format_achieve_2.align = "center";
init = function () {
width = 640;
height = 480;
max_snowsize = 7;
snowflakes = 75;
i = 0;
while (i < snowflakes) {
St = snow.attachMovie("o_snow", "snow" + i, 6000 + i);
St._alpha = 20 + (Math.random() * 60);
St._rotation = Math.random() * 360;
St._x = (-(width / 2)) + (Math.random() * (1.5 * width));
St._y = (-(height / 2)) + (Math.random() * (1.5 * height));
St._xscale = (t._yscale = 50 + (Math.random() * (max_snowsize * 10)));
St.k = 1 + (Math.random() * 2);
St.wind = -1.5 + (Math.random() * 4.2);
St.onEnterFrame = mover;
i++;
}
};
mover = function () {
this._y = this._y + this.k;
this._x = this._x + this.wind;
if (this._y > (height + 10)) {
this._y = -20;
}
if (this._x > (width + 20)) {
this._x = (-(width / 2)) + (Math.random() * (1.5 * width));
this._y = -20;
} else if (this._x < -20) {
this._x = (-(width / 2)) + (Math.random() * (1.5 * width));
this._y = -20;
}
};
_root.createEmptyMovieClip("screen", _root.getNextHighestDepth());
_root.createEmptyMovieClip("clouds", _root.getNextHighestDepth());
clouds.attachMovie("o_backgrounds", "o_backgrounds_0", 0);
clouds.attachMovie("o_cloud", "o_cloud_0", 1);
clouds.attachMovie("o_cloud", "o_cloud_1", 2);
clouds.attachMovie("o_cloud", "o_cloud_2", 3);
clouds.attachMovie("o_mountains", "o_mountains_3", 4);
clouds.attachMovie("o_vint", "o_mountains_4", 5);
clouds.o_mountains_3._x = 320;
clouds.o_mountains_3._y = 225;
clouds.o_cloud_0.gotoAndStop(1);
clouds.o_cloud_1.gotoAndStop(2);
clouds.o_cloud_2.gotoAndStop(3);
clouds.o_cloud_0._y = 40;
clouds.o_cloud_0._x = 40;
clouds.o_cloud_1._y = 50;
clouds.o_cloud_1._x = 240;
clouds.o_cloud_2._y = 30;
clouds.o_cloud_2._x = 540;
if (back_count == 0) {
clouds.o_mountains_4._visible = 1;
clouds.o_mountains_3.gotoAndStop(1);
clouds.o_backgrounds_0.gotoAndStop(1);
} else if (back_count == 1) {
clouds.o_mountains_4._visible = 0;
clouds.o_mountains_3.gotoAndStop(3);
clouds.o_backgrounds_0.gotoAndStop(2);
clouds.o_cloud_1._y = 35;
clouds.o_cloud_0._y = 25;
} else if (back_count == 2) {
clouds.o_mountains_4._visible = 0;
clouds.o_mountains_3.gotoAndStop(4);
clouds.o_backgrounds_0.gotoAndStop(3);
clouds.o_cloud_1._y = 35;
clouds.o_cloud_0._y = 25;
}
clouds.o_mountains_4._x = 327;
clouds.o_mountains_4._y = 33;
_root.createEmptyMovieClip("tiles_back", _root.getNextHighestDepth());
_root.createEmptyMovieClip("tiles_2", _root.getNextHighestDepth());
_root.createEmptyMovieClip("tiles", _root.getNextHighestDepth());
_root.createEmptyMovieClip("snow", _root.getNextHighestDepth());
_root.createEmptyMovieClip("hints", _root.getNextHighestDepth());
if (((((cur_level_number >= 0) and (cur_level_number < 11)) and (cur_level_number != 6)) or (cur_level_number == 13)) or (cur_level_number == 14)) {
if ((cur_level_number == 1) and (been_restart == 0)) {
hints_count = 5;
}
if ((cur_level_number == 2) and (been_restart == 0)) {
hints_count = 8;
}
if ((cur_level_number == 3) and (been_restart == 0)) {
hints_count = 10;
}
if ((cur_level_number == 4) and (been_restart == 0)) {
hints_count = 12;
}
if ((cur_level_number == 5) and (been_restart == 0)) {
hints_count = 15;
}
if ((cur_level_number == 7) and (been_restart == 0)) {
hints_count = 16;
}
if ((cur_level_number == 8) and (been_restart == 0)) {
hints_count = 18;
}
if ((cur_level_number == 9) and (been_restart == 0)) {
hints_count = 19;
}
if ((cur_level_number == 10) and (been_restart == 0)) {
hints_count = 20;
}
if ((cur_level_number == 13) and (been_restart == 0)) {
hints_count = 21;
}
if ((cur_level_number == 14) and (been_restart == 0)) {
hints_count = 22;
}
hints.attachMovie("o_hint_arrow", "hint5", 5);
hints.hint5._visible = 0;
hints.hint5._x = 680;
hints.hint5._y = 435;
hints.attachMovie("o_hint_message", "hint1", 1);
hints.hint1._alpha = 70;
var format_hints = new TextFormat();
format_hints.font = "Luvable";
format_hints.color = 16777215 /* 0xFFFFFF */;
format_hints.size = 18;
format_hints.bold = false;
var format_hints_2 = new TextFormat();
format_hints_2.font = "Berlin Sans FB 1";
format_hints_2.color = 4605510 /* 0x464646 */;
format_hints_2.size = 14;
format_hints_2.bold = true;
hints.attachMovie("o_hint_!", "hint!1", 26);
hints["hint!1"]._x = 2;
hints["hint!1"]._y = -5;
hints.createTextField("t_hint5", 25, 200, 200, 600, 600);
hints.t_hint5._xscale = 100;
hints.t_hint5._yscale = 100;
if (cur_level_number == 0) {
hints.t_hint5.text = "click 'GO' or press SPACE to start moving.\rThe Prince can walk only along the road.\rTake the potion, and give it to the princess.";
} else if (cur_level_number == 1) {
hints.t_hint5.text = "avoid spikes, if Prince touches them he will die.\ruse cakes to change prince's direction.\rtry to get the star, but it isn't necessary.";
} else if (cur_level_number == 2) {
hints.t_hint5.text = "Also you have One-way block.\rIt will block up the way\rafter the Prince step on it.";
} else if (cur_level_number == 3) {
hints.t_hint5.text = "If Prince has two available directions,\rhe will turn in the direction of the arrow.\rif you want you can increase/decrease speed.";
} else if (cur_level_number == 4) {
hints.t_hint5.text = "Try to pass this level using two blocks.\rTo remove block from the road just click\ron it again.To restart press 'GO' or SPACE again. ";
} else if (cur_level_number == 5) {
hints.t_hint5.text = " \rNow try to pass this level using only cakes.";
} else if (cur_level_number == 7) {
hints.t_hint5.text = "Prince must press red button to remove\rthe door of the corresponding color.\rAfter that prince will be able to see the cake.";
} else if (cur_level_number == 8) {
hints.t_hint5.text = "Let's see how you will cope with\rtwo colors of doors. \rNow no hints.";
} else if (cur_level_number == 9) {
hints.t_hint5.text = "Here you can see few teleports.\rEnter one of them and look \rwhat will happen next.";
} else if (cur_level_number == 10) {
hints.t_hint5.text = "Upon exiting the teleport the prince will \rcontinue to move in the same direction as \rhe was moving before he had entered it.";
} else if (cur_level_number == 13) {
hints.t_hint5.text = "avoid the pirate. He moves along the\rroad as the Prince and can also press \rthe buttons and one-way blocks.";
} else if (cur_level_number == 14) {
hints.t_hint5.text = "This button is a magic trap. After the prince\r will push her, snowball will fly in his side.\r Avoid snowballs or they will kill prince.";
} else {
hints.t_hint5._visible = 0;
hints["hint!1"]._visible = 0;
}
hints.t_hint5.setTextFormat(format_hints);
hints.t_hint5.setNewTextFormat(format_hints);
hints.t_hint5.embedFonts = true;
hints.t_hint5._x = 75;
hints.t_hint5._y = 0;
hints.t_hint5.filters = [new flash.filters.DropShadowFilter(distance, angleInDegrees, 1797318, alpha, blurX, blurY, strength, quality, inner, knockout, hideObject)];
hints.t_hint5.selectable = false;
hints.createTextField("t_hint1", 2, 50, 50, 200, 200);
hints.t_hint1._xscale = 0;
hints.t_hint1._yscale = 0;
hints.t_hint1.text = "Welcome to the game \r bla-bla-bla";
hints.t_hint1.setTextFormat(format_hints);
hints.t_hint1.setNewTextFormat(format_hints);
hints.t_hint1.embedFonts = true;
hints.t_hint1._x = hints_array[hints_count][0] - 99;
hints.t_hint1._y = hints_array[hints_count][1] - 50;
hints.hint1._xscale = 80;
hints.hint1._yscale = 80;
hints.t_hint1.selectable = false;
hints.hint1._x = hints_array[hints_count][0];
hints.hint1._y = hints_array[hints_count][1];
hints.t_hint1.text = hints_array[hints_count][2];
hints.createTextField("t_hint2", 3, 50, 50, 200, 100);
hints.t_hint2.text = "click to close";
hints.t_hint2.setTextFormat(format_hints_2);
hints.t_hint2.setNewTextFormat(format_hints_2);
hints.t_hint2._x = hints.hint1._x - 35;
hints.t_hint2._y = hints.hint1._y + 14;
hints.t_hint2.selectable = false;
hints.t_hint2.embedFonts = true;
hints.createTextField("t_hint3", 40, 100, 100, 70, 70);
hints.t_hint3.text = "click to \rstart \rmoving";
hints.t_hint3.setTextFormat(format_hint_arr);
hints.t_hint3.setNewTextFormat(format_hint_arr);
hints.t_hint3._x = 680;
hints.t_hint3._y = hints.hint5._y - 34;
hints.t_hint3.selectable = false;
hints.t_hint3.embedFonts = true;
hints.t_hint3.filters = [new flash.filters.DropShadowFilter(distance, angleInDegrees, color, alpha, blurX, blurY, strength, quality, inner, knockout, hideObject)];
if ((hints_count == 0) and (cur_level_number != 0)) {
hints.hint1._visible = 0;
hints.t_hint1._visible = 0;
hints.t_hint2._visible = 0;
hints.hint5._visible = 1;
} else if ((hints_count == 0) and (cur_level_number == 0)) {
hints.hint5._x = 609;
if (been_restart == 1) {
hints.hint1._visible = 0;
hints.t_hint1._visible = 0;
hints.t_hint2._visible = 0;
hints.hint5._visible = 1;
}
}
hints.hint1._visible = 0;
hints.t_hint1._visible = 0;
hints.t_hint2._visible = 0;
hints.hint5._visible = 1;
if (cur_level_number == 0) {
hints.hint5._x = 609;
} else if (cur_level_number == 1) {
hints.hint5._x = 690;
} else if (cur_level_number == 2) {
hints.hint5._x = 690;
} else if (cur_level_number == 3) {
hints.hint5._x = 567;
hints.t_hint3.text = "click to\rincrease\rspeed";
}
hints_count++;
hints.hint1.onRelease = function () {
hints.hint1.a = 3;
trace((_xmouse + " ") + _ymouse);
PlaySound(s_bul);
if (cur_level_number == 0) {
if ((hints_count < 5) and (been_restart == 0)) {
get_hint();
hints_count++;
} else {
hints.t_hint1._visible = 0;
hints.t_hint2._visible = 0;
hints.hint5._visible = 1;
hints.hint5._x = 609;
}
} else if (cur_level_number == 1) {
if ((hints_count < 8) and (been_restart == 0)) {
get_hint();
hints_count++;
} else {
hints.t_hint1._visible = 0;
hints.t_hint2._visible = 0;
hints.hint5._visible = 1;
hints.hint5._x = 520;
}
}
if (cur_level_number == 2) {
if ((hints_count < 10) and (been_restart == 0)) {
get_hint();
hints_count++;
} else {
hints.t_hint1._visible = 0;
hints.t_hint2._visible = 0;
hints.hint5._visible = 1;
hints.hint5._x = 470;
}
} else if (cur_level_number == 3) {
if ((hints_count < 12) and (been_restart == 0)) {
get_hint();
hints_count++;
} else {
hints.t_hint1._visible = 0;
hints.t_hint2._visible = 0;
hints.hint5._visible = 1;
hints.hint5._x = 567;
hints.t_hint3.text = "click to\rincrease\rspeed";
}
} else if (cur_level_number == 4) {
if ((hints_count < 15) and (been_restart == 0)) {
get_hint();
hints_count++;
} else {
hints.t_hint1._visible = 0;
hints.t_hint2._visible = 0;
}
} else if (cur_level_number == 5) {
if ((hints_count < 16) and (been_restart == 0)) {
get_hint();
hints_count++;
} else {
hints.t_hint1._visible = 0;
hints.t_hint2._visible = 0;
}
} else if (cur_level_number == 7) {
if ((hints_count < 18) and (been_restart == 0)) {
get_hint();
hints_count++;
} else {
hints.t_hint1._visible = 0;
hints.t_hint2._visible = 0;
}
} else if (cur_level_number == 8) {
if ((hints_count < 19) and (been_restart == 0)) {
get_hint();
hints_count++;
} else {
hints.t_hint1._visible = 0;
hints.t_hint2._visible = 0;
}
} else if (cur_level_number == 9) {
if ((hints_count < 20) and (been_restart == 0)) {
get_hint();
hints_count++;
} else {
hints.t_hint1._visible = 0;
hints.t_hint2._visible = 0;
}
} else if (cur_level_number == 10) {
if ((hints_count < 21) and (been_restart == 0)) {
get_hint();
hints_count++;
} else {
hints.t_hint1._visible = 0;
hints.t_hint2._visible = 0;
}
} else if (cur_level_number == 13) {
if ((hints_count < 22) and (been_restart == 0)) {
get_hint();
hints_count++;
} else {
hints.t_hint1._visible = 0;
hints.t_hint2._visible = 0;
}
} else if (cur_level_number == 14) {
if ((hints_count < 23) and (been_restart == 0)) {
get_hint();
hints_count++;
} else {
hints.t_hint1._visible = 0;
hints.t_hint2._visible = 0;
}
}
};
}
_root.createEmptyMovieClip("square_mc", this.getNextHighestDepth());
square_mc.beginFill(0);
square_mc.moveTo(0, 0);
square_mc.lineTo(640, 0);
square_mc.lineTo(640, 480);
square_mc.lineTo(0, 480);
square_mc.lineTo(0, 0);
square_mc.endFill();
square_mc._alpha = 100;
square_mc._visible = 0;
_root.createEmptyMovieClip("after_level", _root.getNextHighestDepth());
after_level.attachMovie("o_after_level_menu", "o_after_level_menu1", 6000);
after_level.o_after_level_menu1.gotoAndStop(1);
after_level.attachMovie("but_after_level_next", "o_after_level_menu2", 6001);
after_level.o_after_level_menu2._y = 65;
after_level.o_after_level_menu2._visible = 0;
after_level.attachMovie("but_after_level_games", "o_after_level_menu3", 6002);
after_level.o_after_level_menu3._y = 109;
after_level.o_after_level_menu3._x = 60;
after_level.attachMovie("but_after_level_menu", "o_after_level_menu4", 6003);
after_level.o_after_level_menu4._y = 109;
after_level.o_after_level_menu4._x = -60;
after_level.attachMovie("but_after_level_retry", "o_after_level_menu7", 6006);
after_level.o_after_level_menu7._y = 65;
after_level.o_after_level_menu7._visible = 0;
after_level.attachMovie("o_after_level_menu", "o_after_level_menu5", 6004);
after_level.o_after_level_menu5._y = -184;
after_level.o_after_level_menu5._x = -150;
after_level.o_after_level_menu5.gotoAndStop(2);
after_level.o_after_level_menu5._visible = 0;
after_level._x = 320;
after_level._y = 210;
after_level._rotation = -90;
after_level._visible = 0;
_root.createEmptyMovieClip("achieve_hint", this.getNextHighestDepth());
achieve_hint.attachMovie("o_achieve_hint", "o_achieve_hint_1", 6000);
achieve_hint.o_achieve_hint_1._x = 320;
achieve_hint.o_achieve_hint_1._y = 440 + achieve_hint.o_achieve_hint_1._height;
achieve_hint.createTextField("t_ach1", 60001, 50, 50, 125, 125);
achieve_hint.t_ach1.text = "Welcome to the game \r bla-bla-bla";
achieve_hint.t_ach1.setTextFormat(format_achieve);
achieve_hint.t_ach1.setNewTextFormat(format_achieve);
achieve_hint.t_ach1._x = achieve_hint.o_achieve_hint_1._x - 40;
achieve_hint.t_ach1._y = achieve_hint.o_achieve_hint_1._y - 20;
achieve_hint.t_ach1.selectable = false;
achieve_hint.t_ach1.embedFonts = true;
achieve_hint.createTextField("t_ach2", 60002, 50, 50, 125, 125);
achieve_hint.t_ach2.text = "Welcome to the game \r bla-bla-bla";
achieve_hint.t_ach2.setTextFormat(format_achieve_2);
achieve_hint.t_ach2.setNewTextFormat(format_achieve_2);
achieve_hint.t_ach2._x = achieve_hint.o_achieve_hint_1._x - 40;
achieve_hint.t_ach2._y = achieve_hint.o_achieve_hint_1._y;
achieve_hint.t_ach2.selectable = false;
achieve_hint.t_ach2.embedFonts = true;
tiles.attachMovie("o_prince", "o_prince_1", 544);
tiles.attachMovie("o_!", "o_!_1", 7000);
tiles.attachMovie("o_prince_f", "o_prince_2", 3546);
tiles.attachMovie("o_prince_b", "o_prince_3", 3547);
tiles.attachMovie("o_cell_mask", "o_prince_4", 3545);
tiles["o_!_1"]._visible = 0;
tiles.o_prince_1.was_in = 0;
tiles.o_prince_1._visible = 0;
tiles.o_prince_2._visible = 1;
tiles.o_prince_3._visible = 1;
tiles.o_prince_4._visible = 0;
tiles.o_prince_1.side_prev = 4;
tiles.o_prince_1.side = 4;
if (cur_level_number == 20) {
var i = 0;
while (i < size) {
var j = 0;
while (j < size) {
if ((lvlArray1[(i * size) + j] == 13) and (((i * size) + j) != 38)) {
tools_stand[(i * size) + j] = 2;
}
j = j + 1;
}
i = i + 1;
}
}
var i = 0;
while (i < size) {
var j = 0;
while (j < size) {
way[(i * size) + j] = 0;
was_in[(i * size) + j] = 0;
way_obj[(i * size) + j] = 0;
if ((lvlArray1[(i * size) + j] != 0) and (lvlArray1[(i * size) + j] < 100)) {
if (lvlArray1[(i * size) + j] == 13) {
way[(i * size) + j] = 1;
if (tools_stand[(i * size) + j] == 10) {
tools_stand[(i * size) + j] = 0;
}
} else if (lvlArray1[(i * size) + j] == 14) {
way[(i * size) + j] = 2;
if (tools_stand[(i * size) + j] == 10) {
tools_stand[(i * size) + j] = 0;
}
} else if (lvlArray1[(i * size) + j] == 15) {
way[(i * size) + j] = 3;
if (tools_stand[(i * size) + j] == 10) {
tools_stand[(i * size) + j] = 0;
}
} else if (lvlArray1[(i * size) + j] == 16) {
way[(i * size) + j] = 4;
if (tools_stand[(i * size) + j] == 10) {
tools_stand[(i * size) + j] = 0;
}
} else if (lvlArray1[(i * size) + j] == 17) {
way[(i * size) + j] = 5;
if (tools_stand[(i * size) + j] == 10) {
tools_stand[(i * size) + j] = 0;
}
} else if (lvlArray1[(i * size) + j] == 18) {
way[(i * size) + j] = 7;
if (tools_stand[(i * size) + j] == 10) {
tools_stand[(i * size) + j] = 0;
}
} else if (lvlArray1[(i * size) + j] == 19) {
way[(i * size) + j] = 8;
if (tools_stand[(i * size) + j] == 10) {
tools_stand[(i * size) + j] = 0;
}
} else if (lvlArray1[(i * size) + j] == 20) {
way[(i * size) + j] = 9;
if (tools_stand[(i * size) + j] == 10) {
tools_stand[(i * size) + j] = 0;
}
} else if (lvlArray1[(i * size) + j] == 21) {
way[(i * size) + j] = 10;
if (tools_stand[(i * size) + j] == 10) {
tools_stand[(i * size) + j] = 0;
}
} else if (lvlArray1[(i * size) + j] == 28) {
way[(i * size) + j] = 1;
if (tools_stand[(i * size) + j] == 10) {
tools_stand[(i * size) + j] = 0;
}
} else {
way[(i * size) + j] = 0;
}
if ((((((((((((lvlArray1[(i * size) + j] == 11) or (lvlArray1[(i * size) + j] == 12)) or (lvlArray1[(i * size) + j] == 26)) or (lvlArray1[(i * size) + j] == 27)) or (lvlArray1[(i * size) + j] == 31)) or (lvlArray1[(i * size) + j] == 32)) or (lvlArray1[(i * size) + j] == 33)) or (lvlArray1[(i * size) + j] == 34)) or (lvlArray1[(i * size) + j] == 39)) or (lvlArray1[(i * size) + j] == 40)) or (lvlArray1[(i * size) + j] == 41)) or ((lvlArray1[(i * size) + j] > 13) and (lvlArray1[(i * size) + j] <= 21))) {
if ((lvlArray1[(i * size) + j] == 11) or (lvlArray1[(i * size) + j] == 26)) {
tiles_2.attachMovie("o_tiles", "o_tiles_" + k, 10 * k);
tiles_2["o_tiles_" + k].gotoAndStop(2);
tiles_2["o_tiles_" + k]._x = 2 + (53 * j);
tiles_2["o_tiles_" + k]._y = ((-dx) + (41 * i)) - 50;
} else if ((lvlArray1[(i * size) + j] == 12) or (lvlArray1[(i * size) + j] == 27)) {
tiles_2.attachMovie("o_tiles", "o_tiles_" + k, 10 * k);
tiles_2["o_tiles_" + k].gotoAndStop(1);
tiles_2["o_tiles_" + k]._x = 2 + (53 * j);
tiles_2["o_tiles_" + k]._y = ((-dx) + (41 * i)) - 50;
} else if (((lvlArray1[(i * size) + j] == 31) or (lvlArray1[(i * size) + j] == 33)) or (lvlArray1[(i * size) + j] == 40)) {
tiles_2.attachMovie("o_tiles", "o_tiles_" + k, 10 * k);
tiles_2["o_tiles_" + k].gotoAndStop(29);
tiles_2["o_tiles_" + k]._x = 2 + (53 * j);
tiles_2["o_tiles_" + k]._y = ((-dx) + (41 * i)) - 50;
} else if (((lvlArray1[(i * size) + j] == 32) or (lvlArray1[(i * size) + j] == 34)) or (lvlArray1[(i * size) + j] == 39)) {
tiles_2.attachMovie("o_tiles", "o_tiles_" + k, 10 * k);
tiles_2["o_tiles_" + k].gotoAndStop(30);
tiles_2["o_tiles_" + k]._x = 2 + (53 * j);
tiles_2["o_tiles_" + k]._y = ((-dx) + (41 * i)) - 50;
}
kk = ((i - 2) * size) + j;
tiles.attachMovie("o_tiles", "o_tiles_" + k, 10 * kk);
tiles["o_tiles_" + k].gotoAndStop(lvlArray1[(i * size) + j]);
tiles["o_tiles_" + k]._x = 2 + (53 * j);
tiles["o_tiles_" + k]._y = ((-dx) + (41 * i)) - 50;
if (lvlArray1[(i * size) + j] == 41) {
tiles.attachMovie("o_blick", "o_blck_" + blck_count, (10 * kk) + 7);
tiles["o_blck_" + blck_count].gotoAndStop(1);
tiles["o_blck_" + blck_count]._x = (2 + (53 * j)) + 18;
tiles["o_blck_" + blck_count]._y = ((-dx) + (41 * i)) - 18;
blck_count++;
}
k++;
} else if (lvlArray1[(i * size) + j] == 9) {
tiles_2.attachMovie("o_tiles", "o_tiles_" + k, 10 * k);
tiles_2["o_tiles_" + k].gotoAndStop(9);
tiles_2["o_tiles_" + k]._x = 2 + (53 * j);
tiles_2["o_tiles_" + k]._y = ((-dx) + (41 * i)) - 50;
tiles.attachMovie("o_wave", "o_wave_" + wave_count, (10 * k) + 7);
tiles["o_wave_" + wave_count].gotoAndPlay(Math.round(Math.random() * 35));
tiles["o_wave_" + wave_count]._alpha = 30;
tiles["o_wave_" + wave_count]._x = ((2 + (53 * j)) + 25) + (Math.random() * 15);
tiles["o_wave_" + wave_count]._y = ((-dx) + (41 * i)) + 30;
tiles["o_wave_" + wave_count]._i = i;
tiles["o_wave_" + wave_count]._j = j;
wave_count = wave_count + 1;
k++;
} else {
tiles_2.attachMovie("o_tiles", "o_tiles_" + k, 10 * k);
tiles_2["o_tiles_" + k].gotoAndStop(lvlArray1[(i * size) + j]);
tiles_2["o_tiles_" + k]._x = 2 + (53 * j);
tiles_2["o_tiles_" + k]._y = ((-dx) + (41 * i)) - 50;
k++;
}
} else if (lvlArray1[(i * size) + j] == 100) {
way[(i * size) + j] = 1;
tiles.o_prince_1._x = (0 + (52 * j)) + 26;
tiles.o_prince_1._y = 0 + (i * 42);
tiles_2.attachMovie("o_tiles", "o_tiles_" + k, 10 * k);
tiles_2["o_tiles_" + k].gotoAndStop(13);
tiles_2["o_tiles_" + k]._x = 2 + (53 * j);
tiles_2["o_tiles_" + k]._y = ((-dx) + (41 * i)) - 50;
k++;
} else if ((((lvlArray1[(i * size) + j] == 101) or (lvlArray1[(i * size) + j] == 103)) or (lvlArray1[(i * size) + j] == 105)) or (lvlArray1[(i * size) + j] == 107)) {
kk = ((i - 2) * size) + j;
way[(i * size) + j] = 0;
tiles.attachMovie("o_tiles", "o_tiles_" + k, 10 * kk);
tiles["o_tiles_" + k].gotoAndStop(21 + ((lvlArray1[(i * size) + j] - 99) / 2));
tiles["o_tiles_" + k]._x = 2 + (53 * j);
tiles["o_tiles_" + k]._y = ((-dx) + (41 * i)) - 50;
tiles.attachMovie("o_obj", "o_doors_" + doors, (10 * kk) + 3);
tiles["o_doors_" + doors]._x = 2 + (53 * j);
tiles["o_doors_" + doors]._y = ((-dx) + (41 * i)) - 65;
tiles["o_doors_" + doors].tp = (lvlArray1[(i * size) + j] - 99) / 2;
tiles["o_doors_" + doors].gotoAndStop(1 + ((tiles["o_doors_" + doors].tp - 1) * 3));
tiles["o_doors_" + doors].cell = (i * size) + j;
tiles.attachMovie("o_shadow", "o_shadow_" + (3 * doors), (10 * ((((i - 2) * size) + j) - 1)) + 1);
tiles["o_shadow_" + (3 * doors)].gotoAndStop(2);
tiles["o_shadow_" + (3 * doors)]._x = 2 + (53 * (j - 1));
tiles["o_shadow_" + (3 * doors)]._y = ((-dx) + (41 * i)) - 50;
tiles.attachMovie("o_shadow", ("o_shadow_" + (3 * doors)) + 1, (10 * ((((i - 2) * size) + j) + 1)) + 1);
tiles[("o_shadow_" + (3 * doors)) + 1].gotoAndStop(3);
tiles[("o_shadow_" + (3 * doors)) + 1]._x = 2 + (53 * (j + 1));
tiles[("o_shadow_" + (3 * doors)) + 1]._y = ((-dx) + (41 * i)) - 50;
tiles.attachMovie("o_shadow", ("o_shadow_" + (3 * doors)) + 2, (10 * ((((i + 1) - 2) * size) + j)) + 1);
tiles[("o_shadow_" + (3 * doors)) + 2].gotoAndStop(1);
tiles[("o_shadow_" + (3 * doors)) + 2]._x = 2 + (53 * j);
tiles[("o_shadow_" + (3 * doors)) + 2]._y = ((-dx) + (41 * (i + 1))) - 50;
k++;
doors++;
} else if ((((lvlArray1[(i * size) + j] == 109) or (lvlArray1[(i * size) + j] == 111)) or (lvlArray1[(i * size) + j] == 113)) or (lvlArray1[(i * size) + j] == 115)) {
kk = ((i - 2) * size) + j;
way[(i * size) + j] = 1;
tiles.attachMovie("o_tiles", "o_tiles_" + k, 10 * kk);
tiles["o_tiles_" + k].gotoAndStop(21 + ((lvlArray1[(i * size) + j] - 107) / 2));
tiles["o_tiles_" + k]._x = 2 + (53 * j);
tiles["o_tiles_" + k]._y = ((-dx) + (41 * i)) - 50;
tiles.attachMovie("o_obj", "o_doors_" + doors, (10 * kk) + 3);
tiles["o_doors_" + doors]._x = 2 + (53 * j);
tiles["o_doors_" + doors]._y = ((-dx) + (41 * i)) - 65;
tiles["o_doors_" + doors].tp = (lvlArray1[(i * size) + j] - 107) / 2;
tiles["o_doors_" + doors].gotoAndStop(1 + ((tiles["o_doors_" + doors].tp - 1) * 3));
tiles["o_doors_" + doors].cell = (i * size) + j;
tiles["o_doors_" + doors]._visible = 0;
tiles.attachMovie("o_shadow", "o_shadow_" + (3 * doors), (10 * ((((i - 2) * size) + j) - 1)) + 1);
tiles["o_shadow_" + (3 * doors)].gotoAndStop(2);
tiles["o_shadow_" + (3 * doors)]._x = 2 + (53 * (j - 1));
tiles["o_shadow_" + (3 * doors)]._y = ((-dx) + (41 * i)) - 50;
tiles["o_shadow_" + (3 * doors)]._visible = 0;
tiles.attachMovie("o_shadow", ("o_shadow_" + (3 * doors)) + 1, (10 * ((((i - 2) * size) + j) + 1)) + 1);
tiles[("o_shadow_" + (3 * doors)) + 1].gotoAndStop(3);
tiles[("o_shadow_" + (3 * doors)) + 1]._x = 2 + (53 * (j + 1));
tiles[("o_shadow_" + (3 * doors)) + 1]._y = ((-dx) + (41 * i)) - 50;
tiles[("o_shadow_" + (3 * doors)) + 1]._visible = 0;
tiles.attachMovie("o_shadow", ("o_shadow_" + (3 * doors)) + 2, (10 * ((((i + 1) - 2) * size) + j)) + 1);
tiles[("o_shadow_" + (3 * doors)) + 2].gotoAndStop(1);
tiles[("o_shadow_" + (3 * doors)) + 2]._x = 2 + (53 * j);
tiles[("o_shadow_" + (3 * doors)) + 2]._y = ((-dx) + (41 * (i + 1))) - 50;
tiles[("o_shadow_" + (3 * doors)) + 2]._visible = 0;
k++;
doors++;
} else if ((((lvlArray1[(i * size) + j] == 102) or (lvlArray1[(i * size) + j] == 104)) or (lvlArray1[(i * size) + j] == 106)) or (lvlArray1[(i * size) + j] == 108)) {
kk = ((i - 2) * size) + j;
way[(i * size) + j] = 6;
tiles.attachMovie("o_obj", "o_button_" + btn_number, (10 * kk) + 3);
tiles["o_button_" + btn_number]._x = 2 + (53 * j);
tiles["o_button_" + btn_number]._y = ((-dx) + (41 * i)) - 50;
tiles["o_button_" + btn_number].tp = (lvlArray1[(i * size) + j] - 100) / 2;
tiles["o_button_" + btn_number].gotoAndStop(tiles["o_button_" + btn_number].tp * 3);
tiles["o_button_" + btn_number].ind = 2;
tiles["o_button_" + btn_number].coord = k;
k++;
btn_number++;
} else if ((((lvlArray1[(i * size) + j] == 110) or (lvlArray1[(i * size) + j] == 112)) or (lvlArray1[(i * size) + j] == 114)) or (lvlArray1[(i * size) + j] == 116)) {
kk = ((i - 2) * size) + j;
way[(i * size) + j] = 6;
tiles.attachMovie("o_obj", "o_button_" + btn_number, (10 * kk) + 3);
tiles["o_button_" + btn_number]._x = 2 + (53 * j);
tiles["o_button_" + btn_number]._y = ((-dx) + (41 * i)) - 50;
tiles["o_button_" + btn_number].tp = (lvlArray1[(i * size) + j] - 108) / 2;
tiles["o_button_" + btn_number].gotoAndStop((tiles["o_button_" + btn_number].tp * 3) - 1);
tiles["o_button_" + btn_number].ind = 3;
tiles["o_button_" + btn_number].coord = k;
k++;
btn_number++;
} else if ((((lvlArray1[(i * size) + j] == 152) or (lvlArray1[(i * size) + j] == 154)) or (lvlArray1[(i * size) + j] == 156)) or (lvlArray1[(i * size) + j] == 158)) {
kk = ((i - 2) * size) + j;
way[(i * size) + j] = 1;
way_obj[(i * size) + j] = lvlArray1[(i * size) + j];
tiles.attachMovie("o_obj", "o_teleport_" + teleports, (10 * kk) + 3);
tiles["o_teleport_" + teleports]._x = 2 + (53 * j);
tiles["o_teleport_" + teleports]._y = ((-dx) + (41 * i)) - 50;
tiles["o_teleport_" + teleports].tp = (lvlArray1[(i * size) + j] - 150) / 2;
tiles["o_teleport_" + teleports].gotoAndStop(18 + tiles["o_teleport_" + teleports].tp);
tiles["o_teleport_" + teleports].coord = k;
tiles["o_teleport_" + teleports].i = i;
tiles["o_teleport_" + teleports].j = j;
tiles.attachMovie("o_tel", "o_tel_" + (2 * teleports), 4000 + (2 * teleports));
tiles["o_tel_" + (2 * teleports)].gotoAndStop(tiles["o_teleport_" + teleports].tp);
tiles["o_tel_" + (2 * teleports)]._x = (2 + (53 * (j - 1))) + 80;
tiles["o_tel_" + (2 * teleports)]._y = ((-dx) + (41 * i)) - 20;
tiles.attachMovie("o_tel", ("o_tel_" + (2 * teleports)) + 1, (4000 + (2 * teleports)) + 1);
tiles[("o_tel_" + (2 * teleports)) + 1].gotoAndStop(tiles["o_teleport_" + teleports].tp);
tiles[("o_tel_" + (2 * teleports)) + 1]._x = (2 + (53 * (j - 1))) + 80;
tiles[("o_tel_" + (2 * teleports)) + 1]._y = ((-dx) + (41 * i)) - 20;
k++;
teleports++;
} else if (lvlArray1[(i * size) + j] == 180) {
way[(i * size) + j] = 1;
way_obj[(i * size) + j] = 180;
tiles_2.attachMovie("o_tiles", "o_tiles_" + k, 10 * k);
tiles_2["o_tiles_" + k].gotoAndStop(13);
tiles_2["o_tiles_" + k]._x = 2 + (53 * j);
tiles_2["o_tiles_" + k]._y = ((-dx) + (41 * i)) - 50;
kk = ((i - 2) * size) + j;
tiles.attachMovie("o_key", "o_key_1", (10 * kk) + 6);
tiles.o_key_1.gotoAndStop(1);
tiles.o_key_1._x = (2 + (53 * j)) + 2;
tiles.o_key_1._y = ((-dx) + (41 * i)) - 63;
tiles.attachMovie("o_key_shadow", "o_key_2", (10 * kk) + 5);
tiles.o_key_2.gotoAndStop(1);
tiles.o_key_2._x = (2 + (53 * j)) + 27;
tiles.o_key_2._y = ((-dx) + (41 * i)) + 18;
tiles.attachMovie("o_blick", "o_blick_2", (10 * kk) + 7);
tiles.o_blick_2._x = tiles.o_key_1._x + 3;
tiles.o_blick_2._y = tiles.o_key_1._y + 63;
k++;
} else if (lvlArray1[(i * size) + j] == 179) {
way[(i * size) + j] = 1;
tiles_2.attachMovie("o_tiles", "o_tiles_" + k, 10 * k);
tiles_2["o_tiles_" + k].gotoAndStop(13);
tiles_2["o_tiles_" + k]._x = 2 + (53 * j);
tiles_2["o_tiles_" + k]._y = ((-dx) + (41 * i)) - 50;
if (stars[cur_level_number] == 0) {
way_obj[(i * size) + j] = 179;
tiles.attachMovie("o_key", "o_key_3", (10 * k) + 6);
tiles.o_key_3.gotoAndStop(2);
tiles.o_key_3._x = (2 + (53 * j)) + 2;
tiles.o_key_3._y = ((-dx) + (41 * i)) - 63;
tiles.attachMovie("o_key_shadow", "o_key_4", (10 * k) + 5);
tiles.o_key_4.gotoAndStop(1);
tiles.o_key_4._x = (2 + (53 * j)) + 27;
tiles.o_key_4._y = ((-dx) + (41 * i)) + 18;
tiles.attachMovie("o_blick", "o_blick_1", (10 * k) + 7);
tiles.o_blick_1._x = tiles.o_key_3._x + 3;
tiles.o_blick_1._y = tiles.o_key_3._y + 63;
}
k++;
} else if (lvlArray1[(i * size) + j] == 181) {
way[(i * size) + j] = 0;
way_obj[(i * size) + j] = 181;
tiles_2.attachMovie("o_tiles", "o_tiles_" + k, 10 * k);
tiles_2["o_tiles_" + k].gotoAndStop(13);
tiles_2["o_tiles_" + k]._x = 2 + (53 * j);
tiles_2["o_tiles_" + k]._y = ((-dx) + (41 * i)) - 50;
kk = ((i - 2) * size) + j;
tiles.attachMovie("o_frog_blick", "o_finish_3", (10 * kk) + 5);
tiles.o_finish_3.gotoAndStop(1);
tiles.o_finish_3._x = (2 + (53 * j)) + 24;
tiles.o_finish_3._y = (41 * i) - 20;
tiles.attachMovie("o_princess_b", "o_finish_1", (10 * kk) + 7);
tiles.o_finish_1.gotoAndStop(2);
tiles.o_finish_1._x = 2 + (53 * j);
tiles.o_finish_1._y = (41 * i) + 9;
tiles.attachMovie("o_princess_f", "o_finish_2", (10 * kk) + 6);
tiles.o_finish_2.gotoAndStop(2);
tiles.o_finish_2._x = (2 + (53 * j)) + 26;
tiles.o_finish_2._y = 41 * i;
k++;
} else if (lvlArray1[(i * size) + j] == 182) {
way[(i * size) + j] = 1;
tiles.attachMovie("o_prince", "o_prince_11", 5989);
tiles.o_prince_11.side_prev = 4;
tiles.o_prince_11.side = 4;
tiles.o_prince_11.was_in = 0;
tiles.attachMovie("o_prince_f", "o_prince_12", 5990);
tiles.attachMovie("o_pirate_b", "o_prince_13", 5991);
tiles.attachMovie("o_cell_mask", "o_prince_14", 5988);
tiles.o_prince_11._visible = 0;
tiles.o_prince_12._visible = 1;
tiles.o_prince_13._visible = 1;
tiles.o_prince_14._visible = 0;
tiles.o_prince_11._x = (0 + (52 * j)) + 26;
tiles.o_prince_11._y = 0 + (i * 42);
tiles_2.attachMovie("o_tiles", "o_tiles_" + k, 10 * k);
tiles_2["o_tiles_" + k].gotoAndStop(13);
tiles_2["o_tiles_" + k]._x = 2 + (53 * j);
tiles_2["o_tiles_" + k]._y = ((-dx) + (41 * i)) - 50;
k++;
} else if (lvlArray1[(i * size) + j] == 183) {
way[(i * size) + j] = 1;
way_obj[(i * size) + j] = 183;
tiles.attachMovie("o_obj", "o_tiles_" + k, 10 * k);
tiles["o_tiles_" + k].gotoAndStop(15);
tiles["o_tiles_" + k]._x = 2 + (53 * j);
tiles["o_tiles_" + k]._y = ((-dx) + (41 * i)) - 50;
k++;
} else if (lvlArray1[(i * size) + j] == 184) {
way[(i * size) + j] = 1;
way_obj[(i * size) + j] = 184;
tiles.attachMovie("o_obj", "o_ice_button" + ice_button_number, 10 * k);
tiles["o_ice_button" + ice_button_number].gotoAndStop(16);
tiles["o_ice_button" + ice_button_number]._x = 2 + (53 * j);
tiles["o_ice_button" + ice_button_number]._y = ((-dx) + (41 * i)) - 50;
tiles["o_ice_button" + ice_button_number].number = ice_button_number;
tiles["o_ice_button" + ice_button_number].coord = k;
k++;
ice_button_number++;
} else if (lvlArray1[(i * size) + j] == 185) {
way[(i * size) + j] = 0;
way_obj[(i * size) + j] = 195;
tiles.attachMovie("o_obj", "o_tiles_" + k, 10 * k);
tiles["o_tiles_" + k].gotoAndStop(18);
tiles["o_tiles_" + k]._x = 2 + (53 * j);
tiles["o_tiles_" + k]._y = ((-dx) + (41 * i)) - 50;
tiles.attachMovie("o_prince", "o_iceball_" + (3 * iceball_number), (10 * k) + 7);
tiles["o_iceball_" + (3 * iceball_number)]._x = (0 + (52 * j)) + 26;
tiles["o_iceball_" + (3 * iceball_number)]._y = 0 + (i * 42);
tiles["o_iceball_" + (3 * iceball_number)]._visible = 0;
tiles["o_iceball_" + (3 * iceball_number)].coord = k;
tiles["o_iceball_" + (3 * iceball_number)].number = 3 * iceball_number;
tiles["o_iceball_" + (3 * iceball_number)].side_prev = 1;
tiles["o_iceball_" + (3 * iceball_number)].side = 0;
tiles["o_iceball_" + (3 * iceball_number)].go = 0;
tiles.attachMovie("o_iceball", ("o_iceball_" + (3 * iceball_number)) + 1, (10 * k) + 8);
tiles[("o_iceball_" + (3 * iceball_number)) + 1].go = 0;
tiles.attachMovie("o_cell_mask", ("o_iceball_" + (3 * iceball_number)) + 2, (10 * k) + 9);
tiles[("o_iceball_" + (3 * iceball_number)) + 2]._visible = 0;
k++;
iceball_number++;
}
if (tools_stand[(i * size) + j] == 1) {
tool_noexit_count--;
kk = ((i - 2) * size) + j;
way_obj[(i * size) + j] = 7;
tiles.attachMovie("o_obj", "o_noexit_" + noexit_number, (10 * kk) + 3);
tiles["o_noexit_" + noexit_number]._x = 2 + (53 * j);
tiles["o_noexit_" + noexit_number]._y = ((-dx) + (41 * i)) - 50;
tiles["o_noexit_" + noexit_number].gotoAndStop(13);
tiles["o_noexit_" + noexit_number].number = noexit_number;
tiles["o_noexit_" + noexit_number].coord = kk;
tiles.attachMovie("o_shadow", "o_shadow2_" + (3 * noexit_number), (10 * (kk - 1)) + 1);
tiles["o_shadow2_" + (3 * noexit_number)].gotoAndStop(2);
tiles["o_shadow2_" + (3 * noexit_number)]._x = 2 + (53 * (j - 1));
tiles["o_shadow2_" + (3 * noexit_number)]._y = ((-dx) + (41 * i)) - 50;
tiles["o_shadow2_" + (3 * noexit_number)]._visible = 0;
tiles.attachMovie("o_shadow", ("o_shadow2_" + (3 * noexit_number)) + 1, (10 * (kk + 1)) + 1);
tiles[("o_shadow2_" + (3 * noexit_number)) + 1].gotoAndStop(3);
tiles[("o_shadow2_" + (3 * noexit_number)) + 1]._x = 2 + (53 * (j + 1));
tiles[("o_shadow2_" + (3 * noexit_number)) + 1]._y = ((-dx) + (41 * i)) - 50;
tiles[("o_shadow2_" + (3 * noexit_number)) + 1]._visible = 0;
tiles.attachMovie("o_shadow", ("o_shadow2_" + (3 * noexit_number)) + 2, (10 * kk) + 1);
tiles[("o_shadow2_" + (3 * noexit_number)) + 2].gotoAndStop(1);
tiles[("o_shadow2_" + (3 * noexit_number)) + 2]._x = 2 + (53 * j);
tiles[("o_shadow2_" + (3 * noexit_number)) + 2]._y = ((-dx) + (41 * (i + 1))) - 50;
tiles[("o_shadow2_" + (3 * noexit_number)) + 2]._visible = 0;
noexit_number++;
} else if (tools_stand[(i * size) + j] == 2) {
tool_come_count--;
kk = ((i - 2) * size) + j;
way_obj[(i * size) + j] = 8;
tiles.attachMovie("o_wood_princess", "o_comehere_" + (2 * comehere_number), (10 * kk) + 7);
tiles["o_comehere_" + (2 * comehere_number)].gotoAndStop(1);
tiles["o_comehere_" + (2 * comehere_number)]._x = 2 + (53 * j);
tiles["o_comehere_" + (2 * comehere_number)]._y = ((-dx) + (41 * i)) - 78;
tiles["o_comehere_" + (2 * comehere_number)].coord = kk;
tiles.attachMovie("o_key_shadow", "o_comehere_" + ((2 * comehere_number) + 1), (10 * kk) + 6);
tiles["o_comehere_" + ((2 * comehere_number) + 1)].gotoAndStop(1);
tiles["o_comehere_" + ((2 * comehere_number) + 1)]._x = (2 + (53 * j)) + 27;
tiles["o_comehere_" + ((2 * comehere_number) + 1)]._y = ((-dx) + (41 * i)) + 23;
tiles["o_comehere_" + ((2 * comehere_number) + 1)]._xscale = 130;
tiles["o_comehere_" + ((2 * comehere_number) + 1)]._yscale = 130;
comehere_number++;
}
j = j + 1;
}
i = i + 1;
}
tiles_bmp.draw(tiles_2);
tiles_back.attachBitmap(tiles_bmp, _root.getNextHighestDepth());
tiles_2.removeMovieClip();
show_blick(tiles.o_blick_1);
show_blick_2(tiles.o_blick_2);
var i = 0;
while (i < blck_count) {
show_blick3(tiles["o_blck_" + i]);
i = i + 1;
}
tiles.attachMovie("o_chosen_cell", "o_chosen_cell_99", 10000);
tiles.o_chosen_cell_99._alpha = 35;
_root.createEmptyMovieClip("panel", _root.getNextHighestDepth());
panel.attachMovie("o_panel", "o_panel_0", 0);
panel.o_panel_0._x = 615;
panel.o_panel_0._y = 15;
panel.o_panel_0.gotoAndStop(1);
panel.attachMovie("o_but_music", "o_panel_1", 1);
panel.o_panel_1._x = panel.o_panel_0._x - 55;
panel.o_panel_1._y = panel.o_panel_0._y - 11;
if (music_enable == 0) {
panel.o_panel_1.gotoAndStop(3);
panel.o_panel_1.curr = 3;
} else if (music_enable == 1) {
panel.o_panel_1.curr = 1;
}
panel.attachMovie("o_but_sound", "o_panel_2", 2);
panel.o_panel_2._x = panel.o_panel_0._x - 80;
panel.o_panel_2._y = panel.o_panel_0._y - 10;
if (sound_enable == 0) {
panel.o_panel_2.gotoAndStop(3);
panel.o_panel_2.curr = 3;
} else if (sound_enable == 1) {
panel.o_panel_2.curr = 1;
}
panel.attachMovie("but_menu", "o_panel_3", 3);
panel.o_panel_3._x = panel.o_panel_0._x - 4;
panel.o_panel_3._y = panel.o_panel_0._y - 9;
panel.attachMovie("but_restart", "o_panel_4", 4);
panel.o_panel_4._x = panel.o_panel_0._x - 29;
panel.o_panel_4._y = panel.o_panel_0._y - 10;
_root.createEmptyMovieClip("inter", _root.getNextHighestDepth());
inter.attachMovie("o_inter", "o_inter_0", 0);
inter.o_inter_0._x = -30;
inter.attachMovie("inter_but_speed_1", "o_inter_22", 22);
inter.o_inter_22._x = inter.o_inter_0._x + 118;
inter.o_inter_22._y = inter.o_inter_0._y + 10;
if (hero_speed == 1) {
inter.o_inter_22._visible = 0;
}
inter.attachMovie("inter_but_speed_2", "o_inter_23", 23);
inter.o_inter_23._x = inter.o_inter_0._x + 118;
inter.o_inter_23._y = inter.o_inter_0._y + 10;
if (hero_speed == 0) {
inter.o_inter_23._visible = 0;
}
inter.o_inter_22.onRelease = function () {
if (go != 1) {
hero_speed = 1;
p_xspeed = 13;
p_yspeed = 7;
inter.o_inter_22._visible = 0;
inter.o_inter_23._visible = 1;
sData_so.data.hero_speed = hero_speed;
sData_so.flush();
}
};
inter.o_inter_23.onRelease = function () {
if (go != 1) {
hero_speed = 0;
p_xspeed = 4;
p_yspeed = 3;
inter.o_inter_22._visible = 1;
inter.o_inter_23._visible = 0;
sData_so.data.hero_speed = hero_speed;
sData_so.flush();
}
};
inter.attachMovie("o_but_inter_noexit", "o_inter_1", 1);
inter.o_inter_1._x = inter.o_inter_0._x + 11;
inter.o_inter_1.curr = 1;
inter.attachMovie("o_but_inter_come", "o_inter_2", 2);
inter.o_inter_2._x = inter.o_inter_0._x + 64;
inter.o_inter_2.curr = 1;
inter.attachMovie("o_inter_grey", "o_inter_20", 20);
inter.o_inter_20._x = inter.o_inter_0._x + 11;
inter.o_inter_20.gotoAndStop(1);
inter.o_inter_20._visible = 0;
inter.attachMovie("o_inter_grey", "o_inter_21", 21);
inter.o_inter_21._x = inter.o_inter_0._x + 64;
inter.o_inter_21.gotoAndStop(2);
inter.o_inter_21._visible = 0;
inter.attachMovie("o_inter_but_go", "o_inter_3", 3);
inter.o_inter_3._x = inter.o_inter_0._x + 146;
inter.attachMovie("but_inter_walk", "o_inter_10", 10);
inter.o_inter_10._x = -149;
inter.o_inter_10._y = 29;
inter.createTextField("inter_text_1", 4, 50, 50, 200, 100);
inter.inter_text_1.setTextFormat(format_inter);
inter.inter_text_1.setNewTextFormat(format_inter);
inter.inter_text_1.text = tool_noexit_count;
inter.inter_text_1.selectable = false;
inter.inter_text_1.embedFonts = true;
if (tool_noexit_count == 1) {
inter.inter_text_1._x = inter.o_inter_0._x + 44;
} else {
inter.inter_text_1._x = inter.o_inter_0._x + 40;
}
inter.inter_text_1._y = 5;
inter.createTextField("inter_text_2", 5, 50, 50, 200, 100);
inter.inter_text_2.setTextFormat(format_inter);
inter.inter_text_2.setNewTextFormat(format_inter);
inter.inter_text_2.text = tool_come_count;
inter.inter_text_2.selectable = false;
inter.inter_text_2.embedFonts = true;
if (tool_come_count == 1) {
inter.inter_text_2._x = inter.o_inter_0._x + 98;
} else {
inter.inter_text_2._x = inter.o_inter_0._x + 94;
}
inter.inter_text_2._y = 5;
inter.createTextField("t_star1", 15, 50, 50, 200, 100);
inter.t_star1.setTextFormat(format_stars3);
inter.t_star1.setNewTextFormat(format_stars3);
inter.t_star1.text = (("Level " + (cur_level_number + 1)) + "/") + "21";
inter.t_star1.selectable = false;
inter.t_star1.embedFonts = true;
inter.t_star1.filters = [new flash.filters.DropShadowFilter(distance, angleInDegrees, color, alpha, blurX, blurY, strength, quality, inner, knockout, hideObject)];
inter.t_star1._x = -455;
inter.t_star1._y = 18;
inter._x = 468;
inter._y = 435;
_root.createEmptyMovieClip("square_mc_2", this.getNextHighestDepth());
square_mc_2.beginFill(723723);
square_mc_2.moveTo(0, 0);
square_mc_2.lineTo(640, 0);
square_mc_2.lineTo(640, 480);
square_mc_2.lineTo(0, 480);
square_mc_2.lineTo(0, 0);
square_mc_2.endFill();
square_mc_2.bbb = 0;
square_mc_2._alpha = 80;
square_mc_2._visible = 1;
if (been_restart == 0) {
if (back_count == 0) {
PlayMusic(music_back);
} else if (back_count == 1) {
PlayMusic(s_menu_back);
} else if (back_count == 2) {
PlayMusic(music_back);
}
}
tool_aft_srt();
y0 = tiles.o_prince_3._y;
t = 0;
tt = 0;
ttt = 0;
onEnterFrame = function () {
show_achieve(4);
if (((tool_noexit_count == 0) and (inter.o_inter_20._visible == 0)) and (go == 0)) {
inter.o_inter_20._visible = 1;
} else if (((tool_noexit_count != 0) and (inter.o_inter_20._visible == 1)) and (go == 0)) {
inter.o_inter_20._visible = 0;
}
if (((tool_come_count == 0) and (inter.o_inter_21._visible == 0)) and (go == 0)) {
inter.o_inter_21._visible = 1;
} else if (((tool_come_count != 0) and (inter.o_inter_21._visible == 1)) and (go == 0)) {
inter.o_inter_21._visible = 0;
}
if ((((cur_level_number == 1) and (tool_number != 2)) and (tool_come_count != 0)) and (hints.hint5._x != 520)) {
trace(1);
hints.hint5._y = 435;
hints.hint5.y0 = 425;
hints.hint5._x = 520;
hints.t_hint3._x = hints.hint5._x - 36;
hints.t_hint3._y = hints.hint5._y - 104;
hints.t_hint3.text = "click to \rchoose \rcake";
} else if ((((cur_level_number == 1) and (tool_number == 2)) and (tool_come_count != 0)) and (hints.hint5._x != 295)) {
hints.hint5._y = 260;
hints.hint5.y0 = 260;
hints.hint5._x = 295;
hints.t_hint3._x = hints.hint5._x - 36;
hints.t_hint3._y = hints.hint5._y - 104;
hints.t_hint3.text = "click to \rplace \rcake";
} else if (((cur_level_number == 1) and (tool_come_count == 0)) and (hints.hint5._x != 609)) {
hints.hint5._y = 435;
hints.hint5.y0 = 435;
hints.hint5._x = 609;
hints.t_hint3._x = hints.hint5._x - 36;
hints.t_hint3._y = hints.hint5._y - 104;
hints.t_hint3.text = "click to \rstart \rmoving";
}
hints.t_hint3._visible = hints.hint5._visible;
hints.t_hint3._x = hints.hint5._x - 36;
hints.t_hint3._y = hints.hint5._y - 104;
if ((((cur_level_number == 2) and (tool_number != 1)) and (tool_noexit_count != 0)) and (hints.hint5._x != 470)) {
hints.hint5._y = 435;
hints.hint5.y0 = 435;
hints.hint5._x = 470;
hints.t_hint3.text = "click to \rchoose \rblock";
} else if ((((cur_level_number == 2) and (tool_number == 1)) and (tool_noexit_count != 0)) and (hints.hint5._x != 295)) {
hints.hint5._y = 220;
hints.hint5.y0 = 220;
hints.hint5._x = 295;
hints.t_hint3.text = "click to \rplace \rblock";
} else if (((cur_level_number == 2) and (tool_noexit_count == 0)) and (hints.hint5._x != 609)) {
hints.hint5._y = 435;
hints.hint5.y0 = 435;
hints.hint5._x = 609;
hints.t_hint3.text = "click to \rstart \rmoving";
}
if (cur_level_number > 3) {
hints.t_hint3._visible = 0;
hints.hint5._visible = 0;
}
if (square_mc_2._alpha > 0) {
square_mc_2._alpha = square_mc_2._alpha - 15;
} else if ((square_mc_2._alpha <= 0) and (square_mc_2.bbb == 0)) {
square_mc_2.bbb = 1;
}
clouds.o_cloud_0._x = clouds.o_cloud_0._x + 0.5;
clouds.o_cloud_1._x = clouds.o_cloud_1._x + 0.75;
clouds.o_cloud_2._x = clouds.o_cloud_2._x + 1;
tiles["o_!_1"]._x = tiles.o_prince_1._x - 20;
tiles["o_!_1"]._y = tiles.o_prince_1._y - 145;
tiles.o_prince_2._x = tiles.o_prince_1._x + 4;
tiles.o_prince_2._y = tiles.o_prince_1._y - 6;
tiles.o_prince_3._x = tiles.o_prince_1._x + 4;
tiles.o_prince_3._y = tiles.o_prince_1._y - 6;
tiles.o_prince_3._y = tiles.o_prince_3._y + (y0 + (Math.sin((t = t + 0.35)) * 0.75));
tiles.o_prince_4._x = tiles.o_prince_1._x;
tiles.o_prince_4._y = tiles.o_prince_1._y + 1;
tiles.o_prince_12._x = tiles.o_prince_11._x + 4;
tiles.o_prince_12._y = tiles.o_prince_11._y - 6;
tiles.o_prince_13._x = tiles.o_prince_11._x + 4;
tiles.o_prince_13._y = tiles.o_prince_11._y - 6;
tiles.o_prince_13._y = tiles.o_prince_13._y + (y0 + (Math.sin((ttt = ttt + 0.35)) * 0.75));
tiles.o_prince_14._x = tiles.o_prince_11._x + 2;
tiles.o_prince_14._y = tiles.o_prince_11._y + 1;
var _local2 = 0;
while (_local2 < 3) {
if (clouds["o_cloud_" + _local2]._x > 715) {
clouds["o_cloud_" + _local2]._x = -75;
}
_local2 = _local2 + 1;
}
cell_j = Math.floor(_xmouse / 53);
cell_i = Math.floor((_ymouse - 30) / 41);
tiles.o_chosen_cell_99._x = 2 + (cell_j * 53);
if (_ymouse > 88) {
tiles.o_chosen_cell_99._y = ((0 + (cell_i * 41)) - 10) - dx;
} else {
tiles.o_chosen_cell_99._y = 31 - dx;
cell_i = 1;
}
if ((((((((((lvlArray1[((cell_i + 1) * size) + cell_j] == 11) or (lvlArray1[((cell_i + 1) * size) + cell_j] == 12)) or (lvlArray1[((cell_i + 1) * size) + cell_j] == 26)) or (lvlArray1[((cell_i + 1) * size) + cell_j] == 27)) or (lvlArray1[((cell_i + 1) * size) + cell_j] == 31)) or (lvlArray1[((cell_i + 1) * size) + cell_j] == 32)) or (lvlArray1[((cell_i + 1) * size) + cell_j] == 33)) or (lvlArray1[((cell_i + 1) * size) + cell_j] == 34)) or (lvlArray1[((cell_i + 1) * size) + cell_j] == 39)) or (lvlArray1[((cell_i + 1) * size) + cell_j] == 40)) {
tiles.o_chosen_cell_99.gotoAndStop(2);
} else {
tiles.o_chosen_cell_99.gotoAndStop(1);
}
tiles.o_chosen_cell_99.swapDepths((10 * (((cell_i - 1) * size) + cell_j)) + 2);
if ((tool_number == 1) and (tools_stand[((cell_i + 1) * size) + cell_j] == 0)) {
tiles.o_chosen_cell_99.gotoAndStop(5);
} else if ((tool_number == 1) and (tools_stand[((cell_i + 1) * size) + cell_j] == 10)) {
tiles.o_chosen_cell_99.gotoAndStop(6);
} else if ((tool_number == 2) and (tools_stand[((cell_i + 1) * size) + cell_j] == 0)) {
tiles.o_chosen_cell_99.gotoAndStop(3);
} else if ((tool_number == 2) and (tools_stand[((cell_i + 1) * size) + cell_j] == 10)) {
tiles.o_chosen_cell_99.gotoAndStop(4);
}
if ((tool_number == 1) and (((tool_noexit_count == 0) or (go == 3)) or (go == 1))) {
tiles.o_chosen_cell_99.gotoAndStop(6);
} else if ((tool_number == 2) and (((tool_come_count == 0) or (go == 3)) or (go == 1))) {
tiles.o_chosen_cell_99.gotoAndStop(4);
}
if ((tool_come_count == 0) and (tool_noexit_count == 0)) {
tiles.o_chosen_cell_99.gotoAndStop(1);
if ((((((((((lvlArray1[((cell_i + 1) * size) + cell_j] == 11) or (lvlArray1[((cell_i + 1) * size) + cell_j] == 12)) or (lvlArray1[((cell_i + 1) * size) + cell_j] == 26)) or (lvlArray1[((cell_i + 1) * size) + cell_j] == 27)) or (lvlArray1[((cell_i + 1) * size) + cell_j] == 31)) or (lvlArray1[((cell_i + 1) * size) + cell_j] == 32)) or (lvlArray1[((cell_i + 1) * size) + cell_j] == 33)) or (lvlArray1[((cell_i + 1) * size) + cell_j] == 34)) or (lvlArray1[((cell_i + 1) * size) + cell_j] == 39)) or (lvlArray1[((cell_i + 1) * size) + cell_j] == 40)) {
tiles.o_chosen_cell_99.gotoAndStop(2);
}
inter.o_inter_1.curr = 1;
inter.o_inter_2.curr = 1;
}
if ((way[(hero_i * size) + hero_j] == 6) and (was_in[(hero_i * size) + hero_j] == 0)) {
btn = 0;
cell_number = ((hero_i - 2) * size) + hero_j;
var i = 0;
while (i < btn_number) {
if (tiles["o_button_" + i].coord == cell_number) {
btn = tiles["o_button_" + i];
break;
}
i = i + 1;
}
if (btn != 0) {
if (btn.ind == 2) {
var _local5 = 0;
while (_local5 < btn_number) {
if (tiles["o_button_" + _local5].tp == btn.tp) {
tiles["o_button_" + _local5].ind = 3;
tiles["o_button_" + _local5].gotoAndStop((tiles["o_button_" + _local5].tp * 3) - 1);
}
_local5 = _local5 + 1;
}
was_in[(hero_i * size) + hero_j] = 1;
PlaySound(click_1);
PlaySound(s_door);
_local2 = 0;
while (_local2 < doors) {
if (tiles["o_doors_" + _local2].tp == btn.tp) {
tiles["o_doors_" + _local2]._visible = 0;
way[tiles["o_doors_" + _local2].cell] = 1;
tiles["o_shadow_" + (3 * _local2)]._visible = 0;
tiles[("o_shadow_" + (3 * _local2)) + 1]._visible = 0;
tiles[("o_shadow_" + (3 * _local2)) + 2]._visible = 0;
}
_local2 = _local2 + 1;
}
} else if (btn.ind == 3) {
var _local5 = 0;
while (_local5 < btn_number) {
if (tiles["o_button_" + _local5].tp == btn.tp) {
tiles["o_button_" + _local5].ind = 2;
tiles["o_button_" + _local5].gotoAndStop(tiles["o_button_" + _local5].tp * 3);
}
_local5 = _local5 + 1;
}
was_in[(hero_i * size) + hero_j] = 1;
PlaySound(click_1);
PlaySound(s_door);
_local2 = 0;
while (_local2 < doors) {
if (tiles["o_doors_" + _local2].tp == btn.tp) {
tiles["o_doors_" + _local2]._visible = 1;
way[tiles["o_doors_" + _local2].cell] = 0;
tiles["o_shadow_" + (3 * _local2)]._visible = 1;
tiles[("o_shadow_" + (3 * _local2)) + 1]._visible = 1;
tiles[("o_shadow_" + (3 * _local2)) + 2]._visible = 1;
}
_local2 = _local2 + 1;
}
}
}
}
if ((way[(h_i * size) + h_j] == 6) and (was_in[(h_i * size) + h_j] == 0)) {
btn = 0;
cell_number = ((h_i - 2) * size) + h_j;
var i = 0;
while (i < btn_number) {
if (tiles["o_button_" + i].coord == cell_number) {
btn = tiles["o_button_" + i];
break;
}
i = i + 1;
}
if (btn != 0) {
if (btn.ind == 2) {
var _local5 = 0;
while (_local5 < btn_number) {
if (tiles["o_button_" + _local5].tp == btn.tp) {
tiles["o_button_" + _local5].ind = 3;
tiles["o_button_" + _local5].gotoAndStop((tiles["o_button_" + _local5].tp * 3) - 1);
}
_local5 = _local5 + 1;
}
was_in[(h_i * size) + h_j] = 1;
PlaySound(click_1);
PlaySound(s_door);
_local2 = 0;
while (_local2 < doors) {
if (tiles["o_doors_" + _local2].tp == btn.tp) {
tiles["o_doors_" + _local2]._visible = 0;
way[tiles["o_doors_" + _local2].cell] = 1;
tiles["o_shadow_" + (3 * _local2)]._visible = 0;
tiles[("o_shadow_" + (3 * _local2)) + 1]._visible = 0;
tiles[("o_shadow_" + (3 * _local2)) + 2]._visible = 0;
}
_local2 = _local2 + 1;
}
} else if (btn.ind == 3) {
var _local5 = 0;
while (_local5 < btn_number) {
if (tiles["o_button_" + _local5].tp == btn.tp) {
tiles["o_button_" + _local5].ind = 2;
tiles["o_button_" + _local5].gotoAndStop(tiles["o_button_" + _local5].tp * 3);
}
_local5 = _local5 + 1;
}
was_in[(h_i * size) + h_j] = 1;
PlaySound(click_1);
PlaySound(s_door);
_local2 = 0;
while (_local2 < doors) {
if (tiles["o_doors_" + _local2].tp == btn.tp) {
tiles["o_doors_" + _local2]._visible = 1;
way[tiles["o_doors_" + _local2].cell] = 0;
tiles["o_shadow_" + (3 * _local2)]._visible = 1;
tiles[("o_shadow_" + (3 * _local2)) + 1]._visible = 1;
tiles[("o_shadow_" + (3 * _local2)) + 2]._visible = 1;
}
_local2 = _local2 + 1;
}
}
}
}
if ((way_obj[(hero_i * size) + hero_j] == 7) and (was_in[(hero_i * size) + hero_j] == 0)) {
cell_number = ((hero_i - 2) * size) + hero_j;
if (in_cell_now == 0) {
in_cell_now = ((hero_i - 2) * size) + hero_j;
} else if (in_cell_now != 0) {
change_noexit(no_exit_curr);
way[in_cell_now + 24] = 0;
in_cell_now = 0;
no_exit_curr = 0;
in_cell_now = ((hero_i - 2) * size) + hero_j;
}
var i = 0;
while (i < noexit_number) {
if (tiles["o_noexit_" + i].coord == cell_number) {
no_exit_curr = i;
break;
}
i = i + 1;
}
cellcell = (hero_i * size) + hero_j;
was_in[(hero_i * size) + hero_j] = 1;
}
if ((way_obj[(h_i * size) + h_j] == 7) and (was_in[(h_i * size) + h_j] == 0)) {
cell_number = ((h_i - 2) * size) + h_j;
if (in_cell_now == 0) {
in_cell_now = ((h_i - 2) * size) + h_j;
} else if (in_cell_now != 0) {
change_noexit(no_exit_curr);
way[in_cell_now + 24] = 0;
in_cell_now = 0;
no_exit_curr = 0;
in_cell_now = ((h_i - 2) * size) + h_j;
}
var i = 0;
while (i < noexit_number) {
if (tiles["o_noexit_" + i].coord == cell_number) {
no_exit_curr = i;
break;
}
i = i + 1;
}
cellcell = (h_i * size) + h_j;
was_in[(h_i * size) + h_j] = 1;
}
if ((way_obj[(h_i * size) + h_j] == 183) and (was_in[(h_i * size) + h_j] == 0)) {
PlaySound(s_magic_boom);
boom(tiles.o_prince_13._x + 15, tiles.o_prince_13._y - 40);
tiles.o_prince_14.removeMovieClip();
tiles.o_prince_13.removeMovieClip();
tiles.o_prince_12.removeMovieClip();
tiles.o_prince_11.removeMovieClip();
}
if ((way_obj[(hero_i * size) + hero_j] == 183) and (was_in[(hero_i * size) + hero_j] == 0)) {
was_in[(hero_i * size) + hero_j] = 1;
kill_prince();
cur_try = try_number;
inter.o_inter_21.removeMovieClip();
inter.o_inter_20.removeMovieClip();
setTimeout(function () {
if (cur_try == try_number) {
after_level._xscale = 0;
after_level._yscale = 0;
after_level.o_after_level_menu7._visible = 1;
after_level.o_after_level_menu5._y = -184;
after_level.o_after_level_menu5._x = -144;
after_level.o_after_level_menu5.gotoAndStop(3);
after_level.o_after_level_menu5._visible = 1;
panel.o_panel_4._visible = 0;
panel.o_panel_3._visible = 0;
after_level._visible = 1;
square_mc._alpha = 0;
square_mc._visible = 1;
music_back.stop();
go = 3;
PlaySound(s_fail);
}
}, 1000);
} else if ((way_obj[(hero_i * size) + hero_j] == 184) and (was_in[(hero_i * size) + hero_j] == 0)) {
PlaySound(s_click);
PlaySound(s_snowball);
cell_number = ((hero_i - 2) * size) + hero_j;
var i = 0;
while (i < ice_button_number) {
if (tiles["o_ice_button" + i].coord == cell_number) {
tiles["o_ice_button" + i].gotoAndStop(17);
break;
}
i = i + 1;
}
cellcell = (hero_i * size) + hero_j;
was_in[(hero_i * size) + hero_j] = 1;
way_obj[(hero_i * size) + hero_j] = 0;
_local2 = 0;
while (_local2 < 12) {
if (way_obj[(hero_i * size) + _local2] == 195) {
if (_local2 < hero_j) {
trace("left");
var i = 0;
while (i < (3 * iceball_number)) {
if (tiles["o_iceball_" + i].coord == (((hero_i - 2) * size) + _local2)) {
trace("!!");
tiles["o_iceball_" + i].go = 1;
tiles[("o_iceball_" + i) + 1].go = 1;
tiles["o_iceball_" + i].side_prev = 1;
}
i = i + 3;
}
} else if (_local2 > hero_j) {
trace("right");
var i = 0;
while (i < (3 * iceball_number)) {
if (tiles["o_iceball_" + i].coord == (((hero_i - 2) * size) + _local2)) {
tiles["o_iceball_" + i].go = 1;
tiles[("o_iceball_" + i) + 1].go = 1;
tiles["o_iceball_" + i].side_prev = 3;
}
i = i + 3;
}
}
}
if (way_obj[(_local2 * size) + hero_j] == 195) {
if (_local2 < hero_i) {
trace("up");
var i = 0;
while (i < (3 * iceball_number)) {
if (tiles["o_iceball_" + i].coord == (((_local2 - 2) * size) + hero_j)) {
tiles["o_iceball_" + i].go = 1;
tiles[("o_iceball_" + i) + 1].go = 1;
tiles["o_iceball_" + i].side_prev = 4;
}
i = i + 3;
}
} else if (_local2 > hero_i) {
trace("down");
var i = 0;
while (i < (3 * iceball_number)) {
if (tiles["o_iceball_" + i].coord == (((_local2 - 2) * size) + hero_j)) {
tiles["o_iceball_" + i].go = 1;
tiles[("o_iceball_" + i) + 1].go = 1;
tiles["o_iceball_" + i].side_prev = 2;
}
i = i + 3;
}
}
}
_local2 = _local2 + 1;
}
}
if ((way_obj[(h_i * size) + h_j] == 184) and (was_in[(h_i * size) + h_j] == 0)) {
cell_number = ((h_i - 2) * size) + h_j;
var i = 0;
while (i < ice_button_number) {
if (tiles["o_ice_button" + i].coord == cell_number) {
tiles["o_ice_button" + i].gotoAndStop(17);
break;
}
i = i + 1;
}
cellcell = (h_i * size) + h_j;
was_in[(h_i * size) + h_j] = 1;
way_obj[(h_i * size) + h_j] = 0;
PlaySound(click_1);
PlaySound(s_snowball);
_local2 = 0;
while (_local2 < 12) {
if (way_obj[(h_i * size) + _local2] == 195) {
if (_local2 < h_j) {
cellcount = 0;
var _local3 = 0;
while (_local3 < Math.abs(h_j - _local2)) {
if (way[((h_i * size) + _local2) + _local3] > 0) {
cellcount = cellcount + 1;
}
_local3 = _local3 + 1;
}
if (cellcount == Math.abs((h_j - _local2) - 1)) {
trace("left");
var i = 0;
while (i < (3 * iceball_number)) {
if (tiles["o_iceball_" + i].coord == (((h_i - 2) * size) + _local2)) {
trace("!!");
tiles["o_iceball_" + i].go = 1;
tiles[("o_iceball_" + i) + 1].go = 1;
tiles["o_iceball_" + i].side_prev = 1;
}
i = i + 3;
}
}
} else if (_local2 > h_j) {
cellcount = 0;
var _local3 = 0;
while (_local3 < Math.abs(h_j - _local2)) {
if (way[((h_i * size) + h_j) + _local3] > 0) {
cellcount = cellcount + 1;
}
_local3 = _local3 + 1;
}
if (cellcount == Math.abs(h_j - _local2)) {
trace("right");
var i = 0;
while (i < (3 * iceball_number)) {
if (tiles["o_iceball_" + i].coord == (((h_i - 2) * size) + _local2)) {
tiles["o_iceball_" + i].go = 1;
tiles[("o_iceball_" + i) + 1].go = 1;
tiles["o_iceball_" + i].side_prev = 3;
}
i = i + 3;
}
}
}
}
if (way_obj[(_local2 * size) + h_j] == 195) {
if (_local2 < h_i) {
cellcount = 0;
var _local4 = 0;
while (_local4 < Math.abs(h_i - _local2)) {
if (way[((_local2 + _local4) * size) + h_j] > 0) {
cellcount = cellcount + 1;
}
_local4 = _local4 + 1;
}
if (cellcount == Math.abs((h_i - _local2) - 1)) {
trace("up");
var i = 0;
while (i < (3 * iceball_number)) {
if (tiles["o_iceball_" + i].coord == (((_local2 - 2) * size) + h_j)) {
tiles["o_iceball_" + i].go = 1;
tiles[("o_iceball_" + i) + 1].go = 1;
tiles["o_iceball_" + i].side_prev = 4;
}
i = i + 3;
}
}
} else if (_local2 > h_i) {
cellcount = 0;
var _local4 = 0;
while (_local4 < Math.abs(h_i - _local2)) {
if (way[((h_i + _local4) * size) + h_j] > 0) {
cellcount = cellcount + 1;
}
_local4 = _local4 + 1;
}
if (cellcount == Math.abs(h_i - _local2)) {
trace("down");
var i = 0;
while (i < (3 * iceball_number)) {
if (tiles["o_iceball_" + i].coord == (((_local2 - 2) * size) + h_j)) {
tiles["o_iceball_" + i].go = 1;
tiles[("o_iceball_" + i) + 1].go = 1;
tiles["o_iceball_" + i].side_prev = 2;
}
i = i + 3;
}
}
}
}
_local2 = _local2 + 1;
}
}
if (((tiles.o_prince_1.side == 1) or (tiles.o_prince_1.side == 3)) and (go == 1)) {
var i = 0;
while (i < 12) {
if (way_obj[(i * size) + hero_j] == 8) {
if (i < hero_i) {
cellcount = 0;
var _local4 = 0;
while (_local4 < Math.abs(hero_i - i)) {
if (way[((i + _local4) * size) + hero_j] > 0) {
cellcount = cellcount + 1;
}
_local4 = _local4 + 1;
}
if (cellcount == Math.abs(hero_i - i)) {
tiles["o_!_1"]._visible = 1;
setTimeout(function () {
tiles["o_!_1"]._visible = 0;
}, 100);
tiles.o_prince_1.side_prev = 2;
}
} else if (i > hero_i) {
cellcount = 0;
var _local4 = 0;
while (_local4 < Math.abs(hero_i - i)) {
if (way[((hero_i + _local4) * size) + hero_j] > 0) {
cellcount = cellcount + 1;
}
_local4 = _local4 + 1;
}
if (cellcount == Math.abs(hero_i - i)) {
tiles["o_!_1"]._visible = 1;
setTimeout(function () {
tiles["o_!_1"]._visible = 0;
}, 100);
tiles.o_prince_1.side_prev = 4;
}
}
}
i = i + 1;
}
} else if (((tiles.o_prince_1.side == 2) or (tiles.o_prince_1.side == 4)) and (go == 1)) {
_local2 = 0;
while (_local2 < 12) {
if (way_obj[(hero_i * size) + _local2] == 8) {
if (_local2 < hero_j) {
cellcount = 0;
var _local3 = 0;
while (_local3 < Math.abs(hero_j - _local2)) {
if (way[((hero_i * size) + _local2) + _local3] > 0) {
cellcount = cellcount + 1;
}
_local3 = _local3 + 1;
}
if (cellcount == Math.abs(hero_j - _local2)) {
tiles["o_!_1"]._visible = 1;
setTimeout(function () {
tiles["o_!_1"]._visible = 0;
}, 100);
tiles.o_prince_1.side_prev = 3;
}
} else if (_local2 > hero_j) {
cellcount = 0;
var _local3 = 0;
while (_local3 < Math.abs(hero_j - _local2)) {
if (way[((hero_i * size) + hero_j) + _local3] > 0) {
cellcount = cellcount + 1;
}
_local3 = _local3 + 1;
}
if (cellcount == Math.abs(hero_j - _local2)) {
tiles["o_!_1"]._visible = 1;
setTimeout(function () {
tiles["o_!_1"]._visible = 0;
}, 100);
tiles.o_prince_1.side_prev = 1;
}
}
}
_local2 = _local2 + 1;
}
}
if (way_obj[(hero_i * size) + hero_j] == 8) {
way_obj[(hero_i * size) + hero_j] = 0;
cell_number = ((hero_i - 2) * size) + hero_j;
var i = 0;
while (i < comehere_number) {
if (tiles["o_comehere_" + (2 * i)].coord == cell_number) {
cake_p(tiles["o_comehere_" + (2 * i)]._x + 28, tiles["o_comehere_" + (2 * i)]._y + 70);
PlaySound(s_eat);
tiles["o_comehere_" + (2 * i)].removeMovieClip();
tiles["o_comehere_" + ((2 * i) + 1)].removeMovieClip();
if (cake_count < 50) {
cake_count++;
sData_so.data.cake_count = cake_count;
} else if ((cake_count == 50) and (achiev_array[8][0] == 0)) {
achiev_array[8][0] = 1;
add_achieve(8);
}
sData_so.flush();
break;
}
i = i + 1;
}
} else if (((((way_obj[(hero_i * size) + hero_j] == 152) or (way_obj[(hero_i * size) + hero_j] == 154)) or (way_obj[(hero_i * size) + hero_j] == 156)) or (way_obj[(hero_i * size) + hero_j] == 158)) and (was_in[(hero_i * size) + hero_j] == 0)) {
PlaySound(s_teleport);
cell_number = ((hero_i - 2) * size) + hero_j;
curr_tp = 0;
var i = 0;
while (i < teleports) {
if (tiles["o_teleport_" + i].coord == cell_number) {
curr_tp = tiles["o_teleport_" + i].tp;
_local2 = 0;
while (_local2 < teleports) {
if ((tiles["o_teleport_" + _local2].tp == curr_tp) and (tiles["o_teleport_" + _local2].coord != cell_number)) {
tiles.o_prince_1._x = (0 + (52 * tiles["o_teleport_" + _local2].j)) + 26;
tiles.o_prince_1._y = 0 + (tiles["o_teleport_" + _local2].i * 42);
tiles.o_prince_1.side = 0;
hero_j = Math.floor(tiles.o_prince_1._x / 52);
hero_i = Math.floor(tiles.o_prince_1._y / 42);
was_in[(hero_i * size) + hero_j] = 1;
}
_local2 = _local2 + 1;
}
}
i = i + 1;
}
} else if (way_obj[(hero_i * size) + hero_j] == 179) {
way_obj[(hero_i * size) + hero_j] = 0;
starss3(tiles.o_key_3._x + 25, tiles.o_key_3._y + 63);
PlaySound(starz);
got_star = 1;
tiles.o_key_3.removeMovieClip();
tiles.o_key_4.removeMovieClip();
tiles.o_blick_1.removeMovieClip();
} else if (way_obj[(hero_i * size) + hero_j] == 180) {
way_obj[(hero_i * size) + hero_j] = 0;
key = 1;
bubles(tiles.o_key_1._x + 20, tiles.o_key_1._y + 40);
PlaySound(s_bubles);
tiles.o_key_1.removeMovieClip();
tiles.o_key_2.removeMovieClip();
tiles.o_blick_2.removeMovieClip();
} else if (((((way_obj[((hero_i * size) + hero_j) + 1] == 181) or (way_obj[((hero_i - 1) * size) + hero_j] == 181)) or (way_obj[((hero_i * size) + hero_j) - 1] == 181)) or (way_obj[((hero_i + 1) * size) + hero_j] == 181)) and (key == 0)) {
if (purple_count < 1) {
purple_count++;
sData_so.data.purple_count = purple_count;
} else if ((purple_count == 1) and (achiev_array[7][0] == 0)) {
achiev_array[7][0] = 1;
add_achieve(7);
}
sData_so.flush();
} else if (((((way_obj[((hero_i * size) + hero_j) + 1] == 181) or (way_obj[((hero_i - 1) * size) + hero_j] == 181)) or (way_obj[((hero_i * size) + hero_j) - 1] == 181)) or (way_obj[((hero_i + 1) * size) + hero_j] == 181)) and (key == 1)) {
if (way_obj[((hero_i * size) + hero_j) + 1] == 181) {
coord = ((hero_i * size) + hero_j) + 1;
} else if (way_obj[((hero_i - 1) * size) + hero_j] == 181) {
coord = ((hero_i - 1) * size) + hero_j;
} else if (way_obj[((hero_i * size) + hero_j) - 1] == 181) {
coord = ((hero_i * size) + hero_j) - 1;
} else if (way_obj[((hero_i + 1) * size) + hero_j] == 181) {
coord = ((hero_i + 1) * size) + hero_j;
}
PlaySound(s_magic_boom);
boom(tiles.o_finish_1._x + 15, tiles.o_finish_1._y - 40);
tiles.o_finish_1.gotoAndStop(1);
tiles.o_finish_2.gotoAndStop(1);
way[coord] = 1;
way_obj[coord] = 0;
go = 3;
tiles.o_prince_2.gotoAndStop(1);
tiles.o_prince_12.gotoAndPlay(1);
cur_try = try_number;
setTimeout(function () {
if (cur_try == try_number) {
tiles.o_chosen_cell_99._visible = 0;
after_level._xscale = 0;
after_level._yscale = 0;
after_level.o_after_level_menu5._y = -184;
after_level.o_after_level_menu5._x = -150;
after_level.o_after_level_menu5.gotoAndStop(2);
after_level.o_after_level_menu5._visible = 1;
if (cur_level_number != 20) {
after_level.o_after_level_menu2._visible = 1;
}
panel.o_panel_4._visible = 0;
panel.o_panel_3._visible = 0;
inter.o_inter_3._visible = 0;
inter.o_inter_0._visible = 0;
hints.hint5._visible = 0;
been_restart = 0;
after_level._visible = 1;
square_mc._alpha = 0;
square_mc._visible = 1;
PlaySound(s_flourish);
if (cur_level_number == (open_levels - 1)) {
sData_so.data.levels = _root.cur_level_number + 1;
open_levels = sData_so.data.levels + 1;
sData_so.flush();
if ((cur_level_number == 4) and (achiev_array[1][0] == 0)) {
achiev_array[1][0] = 1;
add_achieve(1);
sData_so.data.achiev_array = achiev_array;
sData_so.flush();
} else if ((cur_level_number == 14) and (achiev_array[2][0] == 0)) {
achiev_array[2][0] = 1;
add_achieve(2);
sData_so.data.achiev_array = achiev_array;
sData_so.flush();
} else if ((cur_level_number == 19) and (achiev_array[3][0] == 0)) {
achiev_array[3][0] = 1;
add_achieve(3);
sData_so.data.achiev_array = achiev_array;
sData_so.flush();
}
}
if ((cur_level_number == 0) and (achiev_array[0][0] == 0)) {
achiev_array[0][0] = 1;
add_achieve(0);
sData_so.data.achiev_array = achiev_array;
sData_so.flush();
}
if (got_star == 1) {
stars[cur_level_number] = 1;
}
stars_count = 0;
var _local2 = 0;
while (_local2 < 42) {
if (stars[_local2] == 1) {
stars_count++;
}
_local2 = _local2 + 1;
}
sData_so.data.stars = stars;
sData_so.flush();
if ((stars_count == 7) and (achiev_array[4][0] == 0)) {
add_achieve(4);
achiev_array[4][0] = 1;
sData_so.data.achiev_array = achiev_array;
sData_so.flush();
} else if ((stars_count == 14) and (achiev_array[5][0] == 0)) {
add_achieve(5);
achiev_array[5][0] = 1;
sData_so.data.achiev_array = achiev_array;
sData_so.flush();
} else if ((stars_count == 21) and (achiev_array[6][0] == 0)) {
add_achieve(6);
achiev_array[6][0] = 1;
sData_so.data.achiev_array = achiev_array;
sData_so.flush();
}
_local2 = 0;
while (_local2 < 9) {
if (achiev_array[_local2][0] == 1) {
ach_count++;
}
_local2 = _local2 + 1;
}
}
}, 1000);
}
Play_xxscale(after_level);
if (after_level._xscale >= 100) {
Play_alpha(square_mc);
}
var i = 0;
while (i < size) {
_local2 = 0;
while (_local2 < size) {
was_in[(i * size) + _local2] = 0;
_local2 = _local2 + 1;
}
i = i + 1;
}
was_in[(h_i * size) + h_j] = 1;
was_in[(hero_i * size) + hero_j] = 1;
if ((in_cell_now != 0) and (in_cell_now != (((hero_i - 2) * size) + hero_j))) {
change_noexit(no_exit_curr);
way[in_cell_now + 24] = 0;
in_cell_now = 0;
no_exit_curr = 0;
}
move_p(tiles.o_prince_1);
move_p(tiles.o_prince_11);
var i = 0;
while (i < (3 * iceball_number)) {
if (tiles["o_iceball_" + i].go == 1) {
move_one_side(tiles["o_iceball_" + i]);
}
i = i + 3;
}
inter.o_inter_3.onPress = function () {
if (inter.o_inter_3.curr == 1) {
PlaySound(s_click);
side_prev = 1;
go = 1;
tiles.o_prince_2.gotoAndPlay(2);
tiles.o_prince_12.gotoAndPlay(2);
inter.o_inter_3.gotoAndStop(3);
inter.o_inter_3.curr = 3;
inter.o_inter_22._visible = 0;
inter.o_inter_2._visible = 0;
inter.o_inter_1._visible = 0;
inter.o_inter_23._visible = 0;
inter.inter_text_2._visible = 0;
inter.inter_text_1._visible = 0;
inter.o_inter_20._visible = 0;
inter.o_inter_21._visible = 0;
} else if (inter.o_inter_3.curr == 3) {
PlaySound(s_click);
backBuffer.draw(clouds);
backBuffer.draw(tiles_back);
backBuffer.draw(tiles);
snow.removeMovieClip();
inter.removeMovieClip();
clouds.removeMovieClip();
tiles_back.removeMovieClip();
tiles.removeMovieClip();
panel.removeMovieClip();
after_level.removeMovieClip();
square_mc.removeMovieClip();
square_mc_2.removeMovieClip();
hints.removeMovieClip();
achieve_hint.removeMovieClip();
been_restart = 1;
screen.attachBitmap(backBuffer, _root.getNextHighestDepth());
gotoAndPlay(_currentframe + 1);
}
};
panel.o_panel_3.onPress = function () {
backBuffer.draw(clouds);
backBuffer.draw(tiles_back);
backBuffer.draw(tiles);
backBuffer.draw(panel);
snow.removeMovieClip();
inter.removeMovieClip();
clouds.removeMovieClip();
tiles_back.removeMovieClip();
tiles.removeMovieClip();
panel.removeMovieClip();
after_level.removeMovieClip();
square_mc.removeMovieClip();
square_mc_2.removeMovieClip();
hints.removeMovieClip();
achieve_hint.removeMovieClip();
music_back.stop();
been_restart = 0;
screen.attachBitmap(backBuffer, _root.getNextHighestDepth());
gotoAndPlay(_currentframe + 3);
};
after_level.o_after_level_menu2.onRelease = function () {
backBuffer.draw(clouds);
backBuffer.draw(tiles_back);
backBuffer.draw(tiles);
var _local4 = new flash.geom.Matrix();
_local4.tx = 320;
_local4.ty = 210;
backBuffer.draw(after_level, _local4);
var _local3 = 0;
while (_local3 < 12) {
var _local2 = 0;
while (_local2 < 12) {
tools_stand[(_local3 * 12) + _local2] = 10;
_local2 = _local2 + 1;
}
_local3 = _local3 + 1;
}
snow.removeMovieClip();
inter.removeMovieClip();
clouds.removeMovieClip();
tiles_back.removeMovieClip();
tiles.removeMovieClip();
panel.removeMovieClip();
after_level.removeMovieClip();
square_mc.removeMovieClip();
square_mc_2.removeMovieClip();
hints.removeMovieClip();
achieve_hint.removeMovieClip();
screen.attachBitmap(backBuffer, _root.getNextHighestDepth());
been_restart = 0;
gotoAndPlay(_currentframe + 2);
};
after_level.o_after_level_menu4.onRelease = function () {
backBuffer.draw(clouds);
backBuffer.draw(tiles_back);
backBuffer.draw(tiles);
snow.removeMovieClip();
inter.removeMovieClip();
clouds.removeMovieClip();
tiles_back.removeMovieClip();
tiles.removeMovieClip();
panel.removeMovieClip();
after_level.removeMovieClip();
square_mc.removeMovieClip();
square_mc_2.removeMovieClip();
hints.removeMovieClip();
achieve_hint.removeMovieClip();
music_back.stop();
been_restart = 0;
screen.attachBitmap(backBuffer, _root.getNextHighestDepth());
gotoAndPlay(_currentframe + 4);
};
panel.o_panel_4.onPress = function () {
var _local3 = 0;
while (_local3 < 12) {
var _local2 = 0;
while (_local2 < 12) {
tools_stand[(_local3 * 12) + _local2] = 10;
_local2 = _local2 + 1;
}
_local3 = _local3 + 1;
}
backBuffer.draw(clouds);
backBuffer.draw(tiles_back);
backBuffer.draw(tiles);
backBuffer.draw(panel);
snow.removeMovieClip();
inter.removeMovieClip();
clouds.removeMovieClip();
tiles_back.removeMovieClip();
tiles.removeMovieClip();
panel.removeMovieClip();
after_level.removeMovieClip();
square_mc.removeMovieClip();
square_mc_2.removeMovieClip();
hints.removeMovieClip();
achieve_hint.removeMovieClip();
been_restart = 1;
screen.attachBitmap(backBuffer, _root.getNextHighestDepth());
gotoAndPlay(_currentframe + 1);
};
after_level.o_after_level_menu7.onRelease = function () {
backBuffer.draw(clouds);
backBuffer.draw(tiles_back);
backBuffer.draw(tiles);
var _local2 = new flash.geom.Matrix();
_local2.tx = 320;
_local2.ty = 210;
backBuffer.draw(after_level, _local2);
snow.removeMovieClip();
tiles_back.removeMovieClip();
inter.removeMovieClip();
clouds.removeMovieClip();
tiles.removeMovieClip();
panel.removeMovieClip();
after_level.removeMovieClip();
square_mc.removeMovieClip();
square_mc_2.removeMovieClip();
hints.removeMovieClip();
achieve_hint.removeMovieClip();
been_restart = 0;
screen.attachBitmap(backBuffer, _root.getNextHighestDepth());
gotoAndPlay(_currentframe);
};
after_level.o_after_level_menu3.onRelease = function () {
getURL (sponsorurl, "_blank");
};
inter.o_inter_2.onPress = function () {
if (tool_come_count != 0) {
PlaySound(s_click);
tool_number = 2;
inter.o_inter_2.gotoAndStop(2);
inter.o_inter_2.curr = 2;
inter.o_inter_1.gotoAndStop(1);
inter.o_inter_1.curr = 1;
}
};
inter.o_inter_1.onPress = function () {
if (tool_noexit_count != 0) {
PlaySound(s_click);
tool_number = 1;
inter.o_inter_1.gotoAndStop(2);
inter.o_inter_1.curr = 2;
inter.o_inter_2.gotoAndStop(1);
inter.o_inter_2.curr = 1;
}
};
inter.o_inter_10.onRelease = function () {
getURL (walkurl, "_blank");
};
panel.o_panel_1.onRelease = function () {
if (music_enable == 1) {
music_back.stop();
music_enable = 0;
sData_so.data.music_enable = 0;
sData_so.flush();
panel.o_panel_1.gotoAndStop(3);
panel.o_panel_1.curr = 3;
} else if (music_enable == 0) {
music_enable = 1;
sData_so.data.music_enable = 1;
sData_so.flush();
if (back_count == 0) {
PlayMusic(music_back);
} else if (back_count == 1) {
PlayMusic(s_menu_back);
} else if (back_count == 2) {
PlayMusic(music_back);
}
panel.o_panel_1.gotoAndStop(1);
panel.o_panel_1.curr = 1;
}
};
panel.o_panel_2.onRelease = function () {
if (sound_enable == 1) {
sound_enable = 0;
sData_so.data.sound_enable = 0;
sData_so.flush();
panel.o_panel_2.gotoAndStop(3);
panel.o_panel_2.curr = 3;
} else if (sound_enable == 0) {
sound_enable = 1;
sData_so.data.sound_enable = 1;
sData_so.flush();
panel.o_panel_2.gotoAndStop(1);
panel.o_panel_2.curr = 1;
}
};
var i = 0;
while (i < (3 * iceball_number)) {
tiles[("o_iceball_" + i) + 1]._x = tiles["o_iceball_" + i]._x - 18;
tiles[("o_iceball_" + i) + 1]._y = tiles["o_iceball_" + i]._y - 70;
tiles[("o_iceball_" + i) + 1]._y = tiles[("o_iceball_" + i) + 1]._y + (Math.sin((tt = tt + 0.075)) * 4);
tiles[("o_iceball_" + i) + 2]._x = tiles["o_iceball_" + i]._x + 2;
tiles[("o_iceball_" + i) + 2]._y = tiles["o_iceball_" + i]._y - 1;
i = i + 3;
}
tiles.o_chosen_cell_99.onPress = function () {
if (go == 0) {
if (((((tool_number == 0) or (tool_number == 1)) or (tool_number == 2)) and (tools_stand[((cell_i + 1) * size) + cell_j] != 0)) and (tools_stand[((cell_i + 1) * size) + cell_j] != 10)) {
if (tools_stand[((cell_i + 1) * size) + cell_j] == 2) {
var _local1 = 0;
while (_local1 < comehere_number) {
if (tiles["o_comehere_" + (2 * _local1)].coord == (((cell_i - 1) * size) + cell_j)) {
PlaySound(s_eat);
tiles["o_comehere_" + (2 * _local1)].removeMovieClip();
tiles["o_comehere_" + ((2 * _local1) + 1)].removeMovieClip();
way_obj[((cell_i + 1) * size) + cell_j] = 0;
tool_come_count++;
inter.inter_text_2.text = tool_come_count;
if (tool_come_count == 1) {
inter.inter_text_2._x = tiles["o_iceball_" + i]._x + 98;
} else {
inter.inter_text_2._x = tiles["o_iceball_" + i]._x + 94;
}
tools_stand[((cell_i + 1) * size) + cell_j] = 0;
tool_number = 2;
inter.o_inter_2.gotoAndStop(2);
inter.o_inter_2.curr = 2;
inter.o_inter_1.gotoAndStop(1);
inter.o_inter_1.curr = 1;
break;
}
_local1 = _local1 + 1;
}
} else if (tools_stand[((cell_i + 1) * size) + cell_j] == 1) {
var _local1 = 0;
while (_local1 < noexit_number) {
if (tiles["o_noexit_" + _local1].coord == (((cell_i - 1) * size) + cell_j)) {
PlaySound(s_eat);
tiles["o_noexit_" + _local1].removeMovieClip();
tiles["o_shadow2_" + (3 * _local1)].removeMovieClip();
tiles[("o_shadow2_" + (3 * _local1)) + 1].removeMovieClip();
tiles[("o_shadow2_" + (3 * _local1)) + 2].removeMovieClip();
way_obj[((cell_i + 1) * size) + cell_j] = 0;
tool_noexit_count++;
inter.inter_text_1.text = tool_noexit_count;
if (tool_noexit_count == 1) {
inter.inter_text_1._x = tiles["o_iceball_" + i]._x + 44;
} else {
inter.inter_text_1._x = tiles["o_iceball_" + i]._x + 40;
}
tools_stand[((cell_i + 1) * size) + cell_j] = 0;
tool_number = 1;
inter.o_inter_1.gotoAndStop(2);
inter.o_inter_1.curr = 2;
inter.o_inter_2.gotoAndStop(1);
inter.o_inter_2.curr = 1;
break;
}
_local1 = _local1 + 1;
}
}
} else if (((tool_number == 1) and (tool_noexit_count > 0)) and (tools_stand[((cell_i + 1) * size) + cell_j] == 0)) {
if (((cur_level_number == 2) and (cell_i == 5)) and (cell_j == 5)) {
stand_block();
} else if (cur_level_number != 2) {
stand_block();
}
} else if (((tool_number == 2) and (tool_come_count > 0)) and (tools_stand[((cell_i + 1) * size) + cell_j] == 0)) {
if (((cur_level_number == 1) and (cell_i == 6)) and (cell_j == 5)) {
stand_cake();
} else if (cur_level_number != 1) {
stand_cake();
}
}
}
};
};
if (back_count == 2) {
init();
}
Frame 5
stop();
_root.createEmptyMovieClip("make_black", this.getNextHighestDepth());
make_black.aaa = 0;
make_black.beginFill(723723);
make_black.moveTo(0, 0);
make_black.lineTo(640, 0);
make_black.lineTo(640, 480);
make_black.lineTo(0, 480);
make_black.lineTo(0, 0);
make_black.endFill();
make_black._alpha = 0;
make_black._visible = 1;
tool_after_restart = tool_number;
onEnterFrame = function () {
if (make_black._alpha < 85) {
make_black._alpha = make_black._alpha + 15;
}
if ((make_black._alpha >= 85) and (make_black.aaa == 0)) {
make_black.aaa = 1;
setTimeout(function () {
screen.removeMovieClip();
make_black.removeMovieClip();
gotoAndStop(_currentframe - 1);
}, 200);
}
};
Frame 6
stop();
_root.createEmptyMovieClip("make_black", this.getNextHighestDepth());
make_black.aaa = 0;
make_black.beginFill(723723);
make_black.moveTo(0, 0);
make_black.lineTo(640, 0);
make_black.lineTo(640, 480);
make_black.lineTo(0, 480);
make_black.lineTo(0, 0);
make_black.endFill();
make_black._alpha = 0;
make_black._visible = 1;
onEnterFrame = function () {
if (make_black._alpha < 85) {
make_black._alpha = make_black._alpha + 15;
}
if ((make_black._alpha >= 85) and (make_black.aaa == 0)) {
make_black.aaa = 1;
setTimeout(function () {
screen.removeMovieClip();
make_black.removeMovieClip();
var _local3 = 0;
while (_local3 < 12) {
var _local2 = 0;
while (_local2 < 12) {
_root.lvlArray1[(_local3 * 12) + _local2] = _root.lvlArray[cur_level_number + 1][(_local3 * 12) + _local2];
_local2 = _local2 + 1;
}
_local3 = _local3 + 1;
}
_root.tool_a1 = _root.tools_array[cur_level_number + 1][0];
_root.tool_a2 = _root.tools_array[cur_level_number + 1][1];
_root.back_a = _root.tools_array[cur_level_number + 1][2];
if (got_star == 1) {
stars[cur_level_number] = 1;
}
_root.cur_level_number++;
_root.tool_after_restart = 0;
gotoAndStop(_currentframe - 2);
}, 200);
}
};
Frame 7
stop();
_root.createEmptyMovieClip("make_black", this.getNextHighestDepth());
make_black.aaa = 0;
make_black.beginFill(723723);
make_black.moveTo(0, 0);
make_black.lineTo(640, 0);
make_black.lineTo(640, 480);
make_black.lineTo(0, 480);
make_black.lineTo(0, 0);
make_black.endFill();
make_black._alpha = 0;
make_black._visible = 1;
onEnterFrame = function () {
if (make_black._alpha < 85) {
make_black._alpha = make_black._alpha + 15;
}
if ((make_black._alpha >= 85) and (make_black.aaa == 0)) {
make_black.aaa = 1;
setTimeout(function () {
screen.removeMovieClip();
make_black.removeMovieClip();
return_to_levels = 1;
cur_level_number = 0;
gotoAndStop(_currentframe - 4);
}, 200);
}
};
Frame 8
stop();
_root.createEmptyMovieClip("make_black", this.getNextHighestDepth());
make_black.aaa = 0;
make_black.beginFill(723723);
make_black.moveTo(0, 0);
make_black.lineTo(640, 0);
make_black.lineTo(640, 480);
make_black.lineTo(0, 480);
make_black.lineTo(0, 0);
make_black.endFill();
make_black._alpha = 0;
make_black._visible = 1;
onEnterFrame = function () {
if (make_black._alpha < 85) {
make_black._alpha = make_black._alpha + 15;
}
if ((make_black._alpha >= 85) and (make_black.aaa == 0)) {
make_black.aaa = 1;
setTimeout(function () {
screen.removeMovieClip();
make_black.removeMovieClip();
return_to_levels = 1;
if (got_star == 1) {
stars[cur_level_number] = 1;
}
_root.cur_level_number++;
_root.tool_after_restart = 0;
gotoAndStop(_currentframe - 5);
}, 200);
}
};
Frame 9
function angle_difference(x1, x2) {
return(((((x1 - x2) % 360) + 540) % 360) - 180);
}
function point_distance(x1, y1, x2, y2) {
return(Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2)));
}
function point_direction(x1, y1, x2, y2) {
return((Math.atan2(y2 - y1, x2 - x1) / Math.PI) * 180);
}
function lengthdir_x(len, dir) {
return(Math.cos((dir * Math.PI) / 180) * len);
}
function lengthdir_y(len, dir) {
return((-Math.sin((dir * Math.PI) / 180)) * len);
}
function draw_levels() {
levels.createTextField("t_star1", 2000, 50, 50, 500, 500);
levels.t_star1.setTextFormat(format_stars);
levels.t_star1.setNewTextFormat(format_stars);
levels.t_star1.text = ((((("cakes " + cake_count) + " stars ") + stars_count) + " levels") + " ") + open_levels;
levels.t_star1.selectable = false;
levels.t_star1.embedFonts = true;
levels.t_star1._x = -286;
levels.t_star1._y = 200;
}
stop();
main_menu.removeMovieClip();
_root.panel_mm.removeMovieClip();
stars_count = 0;
var i = 0;
while (i < 42) {
if (stars[i] == 1) {
stars_count++;
}
i = i + 1;
}
var distance = 0;
var angleInDegrees = 0;
var color = 15463162;
var alpha = 1;
var blurX = 2;
var blurY = 2;
var strength = 5;
var quality = 3;
var inner = false;
var knockout = false;
var hideObject = false;
if (return_to_levels == 1) {
create_clouds();
PlayMusic(s_menu_back);
return_to_levels = 0;
}
_root.createEmptyMovieClip("levels", _root.getNextHighestDepth());
_root.createEmptyMovieClip("levels_2", _root.getNextHighestDepth());
_root.createEmptyMovieClip("achiev_menu", _root.getNextHighestDepth());
create_panel();
_root.createEmptyMovieClip("make_black_2", this.getNextHighestDepth());
var rolled = 0;
var sselected = 0;
var rot = 0;
var item = 0;
var achiev_number = 10;
var menu_x = 282;
var menu_y = 180;
var menu_width = 285;
var menu_height = 80;
var button_pressed = 0;
var keyListener = new Object();
ach_count = 0;
var i = 0;
while (i < achiev_number) {
achiev_menu.attachMovie("o_achiev_point", "o_achiev_point_" + i, i);
if (achiev_array[i][0] == 0) {
achiev_menu["o_achiev_point_" + i].gotoAndStop(1);
} else if (achiev_array[i][0] == 1) {
achiev_menu["o_achiev_point_" + i].gotoAndStop(2 + i);
ach_count++;
}
achiev_menu["o_achiev_point_" + i]._x = menu_x + lengthdir_x(menu_width / 2, (rot - 90) + (i * (360 / achiev_number)));
achiev_menu["o_achiev_point_" + i]._y = menu_y + lengthdir_y(menu_height / 2, (rot - 90) + (i * (360 / achiev_number)));
achiev_menu["o_achiev_point_" + i].swapDepths(achiev_menu["o_achiev_point_" + i]._y);
achiev_menu["o_achiev_point_" + i]._xscale = Math.round((1 + (lengthdir_y(menu_height / 2, (rot - 90) + (i * (360 / achiev_number))) / (menu_height * 2))) * 100) - 25;
achiev_menu["o_achiev_point_" + i]._yscale = Math.round((1 + (lengthdir_y(menu_height / 2, (rot - 90) + (i * (360 / achiev_number))) / (menu_height * 2))) * 100) - 25;
achiev_menu["o_achiev_point_" + i].ii = i;
i = i + 1;
}
if (((ach_count / achiev_array[9][3]) * 100) == 100) {
achiev_menu.o_achiev_point_9.gotoAndStop(11);
achiev_array[9][0] = 1;
}
var format_pr = new TextFormat();
format_pr.font = "Luvable";
format_pr.color = 16777215 /* 0xFFFFFF */;
format_pr.size = 18;
format_pr.align = "center";
achiev_menu.createTextField("achieve_hint3", 3002, 50, 50, 100, 100);
achiev_menu.achieve_hint3.setTextFormat(format_pr);
achiev_menu.achieve_hint3.setNewTextFormat(format_pr);
achiev_menu.achieve_hint3.text = achiev_array[0][2] + " %";
achiev_menu.achieve_hint3.selectable = false;
achiev_menu.achieve_hint3.embedFonts = true;
achiev_menu.achieve_hint3._x = 242;
achiev_menu.achieve_hint3._y = 332;
achiev_menu.achieve_hint3.filters = [new flash.filters.DropShadowFilter(distance, angleInDegrees, 9158175, alpha, blurX, blurY, strength, quality, inner, knockout, hideObject)];
var format_stars = new TextFormat();
format_stars.font = "Luvable";
format_stars.color = 7715025 /* 0x75B8D1 */;
format_stars.size = 18;
format_stars.align = "center";
achiev_menu.createTextField("achieve_hint1", 3000, 50, 50, 200, 200);
achiev_menu.achieve_hint1.setTextFormat(format_stars);
achiev_menu.achieve_hint1.setNewTextFormat(format_stars);
achiev_menu.achieve_hint1.text = achiev_array[0][2];
achiev_menu.achieve_hint1.selectable = false;
achiev_menu.achieve_hint1.embedFonts = true;
achiev_menu.achieve_hint1._x = 185;
achiev_menu.achieve_hint1._y = 310;
achiev_menu.achieve_hint1.filters = [new flash.filters.DropShadowFilter(distance, angleInDegrees, color, alpha, blurX, blurY, strength, quality, inner, knockout, hideObject)];
var format_achieve_name = new TextFormat();
format_achieve_name.font = "Luvable";
format_achieve_name.color = 6459837 /* 0x6291BD */;
format_achieve_name.size = 24;
format_achieve_name.align = "center";
achiev_menu.createTextField("achieve_hint2", 3001, 50, 50, 250, 250);
achiev_menu.achieve_hint2.setTextFormat(format_achieve_name);
achiev_menu.achieve_hint2.setNewTextFormat(format_achieve_name);
achiev_menu.achieve_hint2.text = achiev_array[0][1];
achiev_menu.achieve_hint2.selectable = false;
achiev_menu.achieve_hint2.embedFonts = true;
achiev_menu.achieve_hint2._x = 160;
achiev_menu.achieve_hint2._y = 280;
achiev_menu.achieve_hint2.filters = [new flash.filters.DropShadowFilter(distance, angleInDegrees, color, alpha, blurX, blurY, strength, quality, inner, knockout, hideObject)];
achiev_menu.attachMovie("o_ach_pr_bar", "o_ach_pr_bar1", 101);
achiev_menu.o_ach_pr_bar1._x = 215;
achiev_menu.o_ach_pr_bar1._y = 345;
achiev_menu.attachMovie("o_ach_pr_bar", "o_ach_pr_bar2", 102);
achiev_menu.o_ach_pr_bar2._x = 221;
achiev_menu.o_ach_pr_bar2._y = 345;
achiev_menu.o_ach_pr_bar2.gotoAndStop(2);
achiev_menu.o_ach_pr_bar2._xscale = 0;
var level_depth = 0;
var tool_a1 = 0;
var tool_a2 = 0;
var back_a = 0;
var type_page = 0;
var lvlArray1 = new Array();
var been_restart = 0;
var go_level = 0;
var levels_done = 0;
var sizee = 7;
var format = new TextFormat();
levels.attachMovie("but_level_main_menu", "o_after_level_menu1", 1);
levels.o_after_level_menu1._x = 260;
levels.o_after_level_menu1._y = -80;
levels.attachMovie("but_level_walk", "o_after_level_menu2", 2);
levels.o_after_level_menu2._x = 275;
levels.o_after_level_menu2._y = -20;
levels.attachMovie("but_level_level_select", "o_after_level_menu3", 3);
levels.o_after_level_menu3._x = 275;
levels.o_after_level_menu3._y = 37;
levels.attachMovie("but_level_more", "o_after_level_menu4", 4);
levels.o_after_level_menu4._x = 269;
levels.o_after_level_menu4._y = 94;
levels.attachMovie("o_after_level_menu", "o_after_level_menu11", 11);
levels.o_after_level_menu11.gotoAndStop(1);
levels.o_after_level_menu11._rotation = -270;
levels.o_after_level_menu11._xscale = 130;
levels.o_after_level_menu11._yscale = 130;
levels.attachMovie("o_main_menu_logo", "o_after_level_menu12", 12);
levels.o_after_level_menu12.gotoAndStop(5);
levels.o_after_level_menu12._x = 2;
levels.o_after_level_menu12._y = -123;
levels.o_after_level_menu1.onRollOver = function () {
PlaySound(s_bul);
};
levels.o_after_level_menu2.onRollOver = function () {
PlaySound(s_bul);
};
levels.o_after_level_menu3.onRollOver = function () {
PlaySound(s_bul);
};
levels.o_after_level_menu4.onRollOver = function () {
PlaySound(s_bul);
};
levels.o_after_level_menu2.onRelease = function () {
getURL (walkurl, "_blank");
PlaySound(s_click);
};
levels.o_after_level_menu4.onRelease = function () {
getURL (sponsorurl, "_blank");
PlaySound(s_click);
};
levels._y = 220;
levels._x = 280;
levels._visible = 1;
levels_2._x = levels._x + 8;
levels_2._y = levels._y - 20;
make_black_2.aaa = 0;
make_black_2.beginFill(723723);
make_black_2.moveTo(0, 0);
make_black_2.lineTo(640, 0);
make_black_2.lineTo(640, 480);
make_black_2.lineTo(0, 480);
make_black_2.lineTo(0, 0);
make_black_2.endFill();
make_black_2._alpha = 0;
make_black_2._visible = 1;
_root.createEmptyMovieClip("square_mc_3", this.getNextHighestDepth());
square_mc_3.beginFill(723723);
square_mc_3.moveTo(0, 0);
square_mc_3.lineTo(640, 0);
square_mc_3.lineTo(640, 480);
square_mc_3.lineTo(0, 480);
square_mc_3.lineTo(0, 0);
square_mc_3.endFill();
square_mc_3._alpha = 80;
square_mc_3._visible = 1;
square_mc_3.bbb = 0;
format.font = "Luvable";
format.color = 16777215 /* 0xFFFFFF */;
format.size = 25;
levels.o_after_level_menu1.onRelease = function () {
PlaySound(s_click);
go_level = 2;
};
levels.o_after_level_menu3.onRelease = function () {
PlaySound(s_click);
go_level = 3;
};
onEnterFrame = function () {
if (square_mc_3._alpha > 0) {
square_mc_3._alpha = square_mc_3._alpha - 15;
}
if ((square_mc_3._alpha <= 0) and (square_mc_3.bbb == 0)) {
square_mc_3.bbb = 1;
}
clouds_move();
if (go_level == 1) {
if (make_black_2._alpha < 85) {
make_black_2._alpha = make_black_2._alpha + 15;
} else if ((make_black_2._alpha >= 85) and (make_black_2.aaa == 0)) {
make_black_2.aaa = 1;
setTimeout(function () {
square_mc_3.removeMovieClip();
make_black_2.removeMovieClip();
achiev_menu.removeMovieClip();
gotoAndStop(_currentframe - 5);
}, 200);
}
} else if (go_level == 2) {
if (make_black_2._alpha < 85) {
make_black_2._alpha = make_black_2._alpha + 15;
} else if ((make_black_2._alpha >= 85) and (make_black_2.aaa == 0)) {
make_black_2.aaa = 1;
setTimeout(function () {
make_black_2.removeMovieClip();
square_mc_3.removeMovieClip();
levels_2.removeMovieClip();
levels.removeMovieClip();
achiev_menu.removeMovieClip();
_root.menu_clouds.removeMovieClip();
_root.clouds_1.removeMovieClip();
_root.clouds_2.removeMovieClip();
_root.clouds_3.removeMovieClip();
gotoAndStop(_root._currentframe - 7);
}, 200);
}
} else if (go_level == 3) {
if (make_black_2._alpha < 85) {
make_black_2._alpha = make_black_2._alpha + 15;
} else if ((make_black_2._alpha >= 85) and (make_black_2.aaa == 0)) {
make_black_2.aaa = 1;
setTimeout(function () {
make_black_2.removeMovieClip();
square_mc_3.removeMovieClip();
levels_2.removeMovieClip();
levels.removeMovieClip();
achiev_menu.removeMovieClip();
_root.clouds_1.removeMovieClip();
gotoAndStop(_currentframe - 6);
}, 200);
}
}
rot = rot - (angle_difference(rot, sselected * (360 / achiev_number)) / 4.8);
item = (-sselected) % achiev_number;
if (item < 0) {
item = item + achiev_number;
}
achiev_menu.achieve_hint1.text = achiev_array[item][2];
achiev_menu.achieve_hint2.text = achiev_array[item][1];
var _local2 = 0;
while (_local2 < achiev_number) {
achiev_menu["o_achiev_point_" + _local2]._x = menu_x + lengthdir_x(menu_width / 2, (rot - 90) + (_local2 * (360 / achiev_number)));
achiev_menu["o_achiev_point_" + _local2]._y = menu_y + lengthdir_y(menu_height / 2, (rot - 90) + (_local2 * (360 / achiev_number)));
achiev_menu["o_achiev_point_" + _local2].swapDepths(achiev_menu["o_achiev_point_" + _local2]._y);
achiev_menu["o_achiev_point_" + _local2]._xscale = Math.round((1 + (lengthdir_y(menu_height / 2, (rot - 90) + (_local2 * (360 / achiev_number))) / (menu_height * 2))) * 100) - 25;
achiev_menu["o_achiev_point_" + _local2]._yscale = Math.round((1 + (lengthdir_y(menu_height / 2, (rot - 90) + (_local2 * (360 / achiev_number))) / (menu_height * 2))) * 100) - 25;
_local2 = _local2 + 1;
}
if (item == 0) {
if (achiev_array[0][0] == 1) {
achiev_menu.o_ach_pr_bar2._xscale = 100;
} else if (achiev_array[0][0] == 0) {
achiev_menu.o_ach_pr_bar2._xscale = 0;
}
} else if ((item > 0) and (item < 4)) {
achiev_menu.o_ach_pr_bar2._xscale = ((open_levels - 1) / achiev_array[item][3]) * 100;
if (achiev_menu.o_ach_pr_bar2._xscale > 100) {
achiev_menu.o_ach_pr_bar2._xscale = 100;
}
} else if ((item > 3) and (item < 7)) {
achiev_menu.o_ach_pr_bar2._xscale = (stars_count / achiev_array[item][3]) * 100;
if (achiev_menu.o_ach_pr_bar2._xscale > 100) {
achiev_menu.o_ach_pr_bar2._xscale = 100;
}
} else if (item == 7) {
achiev_menu.o_ach_pr_bar2._xscale = (purple_count / achiev_array[item][3]) * 100;
if (achiev_menu.o_ach_pr_bar2._xscale > 100) {
achiev_menu.o_ach_pr_bar2._xscale = 100;
}
} else if (item == 8) {
achiev_menu.o_ach_pr_bar2._xscale = (cake_count / achiev_array[item][3]) * 100;
if (achiev_menu.o_ach_pr_bar2._xscale > 100) {
achiev_menu.o_ach_pr_bar2._xscale = 100;
}
} else if (item == 9) {
trace((((("ach_count= " + ach_count) + " achiev_array[item][3]= ") + achiev_array[item][3]) + " ach_count/achiev_array[item][3]= ") + (ach_count / achiev_array[item][3]));
achiev_menu.o_ach_pr_bar2._xscale = (ach_count / achiev_array[item][3]) * 100;
if (achiev_menu.o_ach_pr_bar2._xscale > 100) {
achiev_menu.o_ach_pr_bar2._xscale = 100;
}
}
if (Math.round(achiev_menu.o_ach_pr_bar2._xscale) < 100) {
achiev_menu.achieve_hint3.text = Math.round(achiev_menu.o_ach_pr_bar2._xscale) + " %";
achiev_menu.achieve_hint3._x = 242;
} else if (Math.round(achiev_menu.o_ach_pr_bar2._xscale) >= 100) {
achiev_menu.achieve_hint3.text = "DONE!";
achiev_menu.achieve_hint3._x = 235;
}
};
keyListener.onKeyDown = function () {
if ((Key.getCode() == 37) and (button_pressed == 0)) {
button_pressed = 1;
sselected = sselected + 1;
item = (-sselected) % achiev_number;
trace(sselected);
trace(item);
} else if ((Key.getCode() == 39) and (button_pressed == 0)) {
button_pressed = 1;
sselected = sselected - 1;
item = (-sselected) % achiev_number;
trace(sselected);
trace(item);
}
};
keyListener.onKeyUp = function () {
if (button_pressed == 1) {
button_pressed = 0;
}
};
Key.addListener(keyListener);
panel_mm.o_panel_1.onRelease = function () {
if (music_enable == 1) {
music_back.stop();
music_enable = 0;
sData_so.data.music_enable = 0;
sData_so.flush();
panel_mm.o_panel_1.gotoAndStop(3);
panel_mm.o_panel_1.curr = 3;
} else if (music_enable == 0) {
music_enable = 1;
sData_so.data.music_enable = 1;
sData_so.flush();
PlayMusic(s_menu_back);
panel_mm.o_panel_1.gotoAndStop(1);
panel_mm.o_panel_1.curr = 1;
}
};
panel_mm.o_panel_2.onRelease = function () {
if (sound_enable == 1) {
sound_enable = 0;
sData_so.data.sound_enable = 0;
sData_so.flush();
panel_mm.o_panel_2.gotoAndStop(3);
panel_mm.o_panel_2.curr = 3;
} else if (sound_enable == 0) {
sound_enable = 1;
sData_so.data.sound_enable = 1;
sData_so.flush();
panel_mm.o_panel_2.gotoAndStop(1);
panel_mm.o_panel_2.curr = 1;
}
};
panel_mm.attachMovie("but_sponsor_logo_1", "o_sponsor_logo_1", panel_mm.getNextHighestDepth());
panel_mm.o_sponsor_logo_1.gotoAndStop(1);
panel_mm.o_sponsor_logo_1._x = 50;
panel_mm.o_sponsor_logo_1._y = 42;
panel_mm.o_sponsor_logo_1.onRelease = function () {
getURL (sponsorurl, "_blank");
};
Symbol 12 MovieClip [o_preloader_gr] Frame 1
stop();
Symbol 20 MovieClip [o_hint_arrow] Frame 1
y0 = _y;
if (t == undefined) {
t = Math.random() * 10;
}
onEnterFrame = function () {
_y = (y0 + (Math.sin((t = t + 0.15)) * 4));
};
Symbol 26 MovieClip [o_frog_blick] Frame 1
onEnterFrame = function () {
_rotation = (_rotation + 4);
};
Symbol 33 MovieClip [o_cake_piece] Frame 1
stop();
var qqq = 0;
speeed = 1 + (Math.random() * 4);
y0 = _y;
x0 = _x;
onEnterFrame = function () {
_y = (_y + (Math.sin((Math.PI * dir) / 180) * 4));
_rotation = (_rotation + 10);
_x = (_x + (Math.cos((Math.PI * dir) / 180) * 4));
_y = (_y + (0.1 + qqq));
qqq = qqq + 0.4;
_alpha = (_alpha - 4);
if (_alpha <= 0) {
this.removeMovieClip();
trace(1);
}
};
Symbol 38 MovieClip [o_ach_pr_bar] Frame 1
stop();
Symbol 71 MovieClip [o_vint] Frame 1
onEnterFrame = function () {
_rotation = (_rotation + 1);
};
Symbol 78 MovieClip [o_progress_bar] Frame 1
stop();
Symbol 85 MovieClip [o_cloud] Frame 1
stop();
Symbol 85 MovieClip [o_cloud] Frame 2
stop();
Symbol 85 MovieClip [o_cloud] Frame 3
stop();
Symbol 96 Button
on (press) {
getURL ("http://www.armorgames.com", "_blank");
}
Symbol 99 MovieClip Frame 1
stop();
_visible = false;
Symbol 99 MovieClip Frame 2
_visible = true;
Symbol 99 MovieClip Frame 218
_root.go_menuu = 1;
Symbol 125 MovieClip [o_achiev_point] Frame 1
onRelease = function () {
_root.sselected = _root.sselected - (ii - _root.item);
};
Symbol 143 MovieClip [o_backgrounds] Frame 1
stop();
Symbol 172 MovieClip [o_boom_part] Frame 24
this.removeMovieClip();
Symbol 175 MovieClip [o_buble] Frame 1
stop();
x0 = _x;
t = 0;
yy = Math.random() * 3;
tt = 0.15 + (Math.random() * 0.4);
choose = Math.round(Math.random());
_xscale = (70 + (Math.random() * 30));
_yscale = _xscale;
onEnterFrame = function () {
if (choose == 0) {
_x = (x0 + (Math.sin((t = t + tt)) * 4));
} else if (choose == 1) {
_x = (x0 + (Math.cos((t = t + tt)) * 4));
}
_y = (_y - yy);
_alpha = (_alpha - 1);
if (_alpha <= 0) {
this.removeMovieClip();
trace(1);
}
};
Symbol 180 MovieClip [o_but_inter_come] Frame 1
stop();
onRollOver = function () {
gotoAndStop (2);
};
onRollOut = function () {
gotoAndStop(curr);
};
Symbol 185 MovieClip [o_but_inter_noexit] Frame 1
stop();
onRollOver = function () {
gotoAndStop (2);
};
onRollOut = function () {
gotoAndStop(curr);
};
Symbol 192 MovieClip [o_but_music] Frame 1
stop();
onRollOver = function () {
gotoAndStop (2);
};
onRollOut = function () {
gotoAndStop(curr);
};
Symbol 199 MovieClip [o_but_sound] Frame 1
stop();
onRollOver = function () {
gotoAndStop (2);
};
onRollOut = function () {
gotoAndStop(curr);
};
Symbol 215 MovieClip [o_chosen_cell] Frame 1
stop();
Symbol 218 MovieClip [o_hint_message] Frame 1
var a = 0;
_xscale = 10;
_yscale = 10;
onEnterFrame = function () {
if (a == 0) {
_xscale = (_xscale + 15);
_yscale = _xscale;
}
if ((a == 0) and (_xscale >= 110)) {
a = 1;
}
if (a == 1) {
_xscale = (_xscale - 5);
_yscale = _xscale;
}
if ((a == 1) and (_xscale < 100)) {
a = 2;
}
if (a == 3) {
_xscale = (_xscale + 5);
_yscale = _xscale;
}
if ((a == 3) and (_xscale >= 115)) {
a = 4;
}
if ((a == 4) and (_xscale > 0)) {
_xscale = (_xscale - 15);
_yscale = _xscale;
}
if (_xscale < 0) {
_visible = false;
_root.hints.t_hint1._visible = false;
_root.hints.t_hint2._visible = false;
}
_root.hints.t_hint1._xscale = _xscale;
_root.hints.t_hint1._yscale = _yscale;
_root.hints.t_hint1._alpha = _xscale;
_root.hints.t_hint2._xscale = _xscale;
_root.hints.t_hint2._yscale = _yscale;
_root.hints.t_hint2._alpha = _xscale;
};
Symbol 221 MovieClip [o_iceball] Frame 1
y0 = _y;
t = 0;
onEnterFrame = function () {
if (go == 0) {
_y = (y0 + (Math.sin((t = t + 0.15)) * 4));
} else if (go == 1) {
_y = y0;
}
};
Symbol 233 MovieClip [o_inter_but_go] Frame 1
stop();
curr = 1;
onRollOver = function () {
gotoAndStop(curr + 1);
};
onRollOut = function () {
gotoAndStop(curr);
};
Symbol 238 MovieClip [o_key] Frame 1
y0 = _y;
if (t == undefined) {
t = Math.random() * 10;
}
onEnterFrame = function () {
_y = (y0 + (Math.sin((t = t + 0.15)) * 4));
};
Symbol 246 MovieClip [o_level] Frame 1
stop();
if ((_currentframe == 1) and (_root.stars[((i * _root.sizee) + j) - 1] != 2)) {
this.attachMovie("o_level_star", ("o_level_star" + (i * _root.sizee)) + j, (i * _root.sizee) + j);
this[("o_level_star" + (i * _root.sizee)) + j]._x = 13;
this[("o_level_star" + (i * _root.sizee)) + j]._y = 18;
if (_root.stars[((i * _root.sizee) + j) - 1] == 1) {
this[("o_level_star" + (i * _root.sizee)) + j].gotoAndStop(2);
}
}
onEnterFrame = function () {
if (_alpha < 100) {
_alpha = (_alpha + 5);
_root.levels_2[("t_level" + (i * _root.sizee)) + j]._alpha = _root.levels_2[("t_level" + (i * _root.sizee)) + j]._alpha + 5;
}
};
onPress = function () {
if (_currentframe == 1) {
_root.PlaySound(_root.s_click);
}
};
onRelease = function () {
if (_currentframe == 1) {
var _local3 = 0;
while (_local3 < 12) {
var _local2 = 0;
while (_local2 < 12) {
_root.lvlArray1[(_local3 * 12) + _local2] = _root.lvlArray[((i * 7) + j) - 1][(_local3 * 12) + _local2];
_local2 = _local2 + 1;
}
_local3 = _local3 + 1;
}
_root.cur_level_number = ((i * 7) + j) - 1;
_root.tool_a1 = _root.tools_array[((i * 7) + j) - 1][0];
_root.tool_a2 = _root.tools_array[((i * 7) + j) - 1][1];
_root.back_a = _root.tools_array[((i * 7) + j) - 1][2];
_root.go_level = 1;
}
};
onRollOver = function () {
if ((_currentframe == 1) and (_xscale == 100)) {
_root.PlaySound(_root.s_bul);
_xscale = 130;
_yscale = 130;
_root.levels_2[("t_level" + (i * _root.sizee)) + j]._xscale = 130;
_root.levels_2[("t_level" + (i * _root.sizee)) + j]._yscale = 130;
_root.levels_2[("t_level" + (i * _root.sizee)) + j]._x = _root.levels_2[("t_level" + (i * _root.sizee)) + j]._x - 2;
_root.levels_2[("t_level" + (i * _root.sizee)) + j]._y = _root.levels_2[("t_level" + (i * _root.sizee)) + j]._y - 4;
}
};
onRollOut = function () {
if (_currentframe == 1) {
_xscale = 100;
_yscale = 100;
_root.levels_2[("t_level" + (i * _root.sizee)) + j]._xscale = 100;
_root.levels_2[("t_level" + (i * _root.sizee)) + j]._yscale = 100;
_root.levels_2[("t_level" + (i * _root.sizee)) + j]._x = _root.levels_2[("t_level" + (i * _root.sizee)) + j]._x + 2;
_root.levels_2[("t_level" + (i * _root.sizee)) + j]._y = _root.levels_2[("t_level" + (i * _root.sizee)) + j]._y + 4;
}
};
Symbol 251 MovieClip [o_level_star] Frame 1
stop();
Symbol 254 MovieClip [o_little_star] Frame 1
stop();
speeed = 1 + (Math.random() * 4);
_alpha = 90;
y0 = _y;
x0 = _x;
onEnterFrame = function () {
_rotation = (_rotation + 10);
_alpha = (_alpha - 4);
if (_alpha <= 0) {
this.removeMovieClip();
trace(1);
}
};
Symbol 263 MovieClip [o_main_menu_logo] Frame 1
stop();
Symbol 268 MovieClip [o_mountains] Frame 1
stop();
Symbol 346 MovieClip [o_prince_f] Frame 1
stop();
Symbol 346 MovieClip [o_prince_f] Frame 9
gotoAndPlay (2);
Symbol 351 MovieClip [o_princess_b] Frame 1
stop();
y0 = _y;
t = 0;
onEnterFrame = function () {
_y = (y0 + (Math.sin((t = t + 0.35)) * 0.75));
};
Symbol 356 MovieClip [o_princess_f] Frame 1
stop();
Symbol 369 MovieClip [o_snowy] Frame 1
stop();
x0 = _x;
t = 0;
yy = 1 + (Math.random() * 3);
tt = 0.15 + (Math.random() * 0.4);
_xscale = (70 + (Math.random() * 30));
_yscale = _xscale;
onEnterFrame = function () {
_y = (_y + yy);
_alpha = (_alpha - 5);
if (_alpha <= 0) {
this.removeMovieClip();
trace(1);
}
};
Symbol 381 MovieClip [o_tel] Frame 1
stop();
x0 = _x;
y0 = _y;
tx = Math.random() * 10000;
ty = Math.random() * 10000;
onEnterFrame = function () {
_x = (x0 + (Math.sin((tx = tx + 0.2)) * 15));
_y = (y0 + (Math.sin((ty = ty + 0.3)) * 25));
};
Symbol 475 MovieClip [o_wave] Frame 19
_x = (((2 + (53 * _j)) + 12) + (Math.random() * 28));
_y = ((((-_root.dx) + (41 * _i)) + 3) + (Math.random() * 27));
Symbol 478 MovieClip [o_wood_princess] Frame 1
y0 = _y;
if (t == undefined) {
t = Math.random() * 10;
}
onEnterFrame = function () {
_y = (y0 + (Math.sin((t = t + 0.15)) * 4));
};
Symbol 563 MovieClip [o_up_star] Frame 1
stop();
speeed = 2 + (Math.random() * 4);
_alpha = 120;
y0 = _y;
x0 = _x;
onEnterFrame = function () {
_rotation = (_rotation + 10);
_y = (_y - speeed);
_alpha = (_alpha - 2);
if (_alpha <= 0) {
this.removeMovieClip();
trace(1);
}
};
Symbol 579 MovieClip Frame 1
stop();