Frame 1
percentDone = 0;
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 = -480;
_root.gotoAndStop(1);
}
Frame 2
function itemHandler1(obj, item) {
getURL (sponsorurl, "_blank");
}
_global.sponsorurl = "http://armorgames.com/";
_global.morelevelsurl = "http://armorgames.com/";
_global.walkurl = "http://www.youtube.com/watch?v=S-Qtgwx5fAQ";
percentDone = 0;
lvl = 0;
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
item1 = new ContextMenuItem("Play More Games!", itemHandler1);
_root.menu = myMenu;
level0 = "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
level0a = "";
level1 = "000000000000000000000000000000000000000000000000000601011200000000000000310100000000000000000000000000000000000000000000000000000000";
level1a = "Silen";
level1s = 135;
level2 = "000000000012000000000000000006010000011200000010010000210100001200000000010100000301000000001100001001000000000000000000000000000000";
level2a = "Silen";
level2s = 850;
level3 = "000000000000000000000000011201000102010000000201000121010001080000000006000001610100000000000000020100019100000000000000000900000000";
level3a = "Silen";
level3s = 1045;
level4 = "000000140000140100000013010000011400001201000000020100000102000014010100001401000001140000110101000014010000000000000001000000150000";
level4a = "Silen";
level4s = 555;
level5 = "000000120000000000120000000002010200010100000010011101010102001200000001010201010201110100001101000001010100000000000001010100000000";
level5a = "Mikozoid";
level5s = 2400;
level5s = 700;
level6 = "001200190000000100120000010208010000070213000000000041112100010000001701096100810600010000120201000001150212000000000000000000000000";
level6a = "Mikozoid";
level6s = 1000;
level7 = "000001060019001415010018000000010000011213001700000000020100010000002100000118000000000021112121001600000003000000210101010100150000";
level7a = "Mikozoid";
level7s = 450;
level8 = "000000000012000000000000000042061000120000000011011012620710001200000001110110122208100000000000011101101200000000000000000100000000";
level8a = "Mikozoid";
level8s = 1250;
level9 = "000781000001151200000010000009020012000012000000100000211200126313000000614200000101000000118100001006000001010000000000000070080000";
level9a = "Mikozoid";
level9s = 2000;
level10 = "000100130200130100120013000200001800000114001000170101030000000000120100010101000000011600112000000001010102010000010101000000000000";
level10a = "Mikozoid";
level10s = 2150;
level11 = "000009010801070106000000010103010101030101000101014101120141010100014141218111812141410061016141412141614161000000010141014101010000";
level11a = "CRYSTALL_m";
level11s = 1750;
level12 = "000106140000120100000001000000000301000012000121161101000000001101010123004141005000000001011816001541000000000000010107010200000000";
level12a = "CRYSTALL_m";
level12s = 2450;
level13 = "000000000033010000000000200611001100111600000000000102120201000000000000110201021100000000001000000016010100000000000000120100000000";
level13a = "Wertolet";
level13s = 1460;
level14 = "000000121204000000000000121204040101010000000010040101010167460100090100000129880101210006101201000001000061410000081007000011810000";
level14a = "LERO";
level14s = 2475;
level15 = "000112011201120112010001060106010601060106002134343621343436243400010121013601210136010001010114010101010101000000161101010101010000";
level15a = "LERO";
level15s = 765;
level16 = "000012230000112112060010004120000001017555101709000041810000017295410154030052011810201600041000161820140832170000011212002007100000";
level16a = "Artem";
level16s = 4015;
level17 = "001300151107150311010000110018100001000011120000030000001011211206002000032008000000110002811814001561511811160000011211091600180000";
level17a = "Artem";
level17s = 3280;
level18 = "002012000020000014120000090000120000070000001000710000009110030100100831000000510603000000180000121800000000000000120000000012160000";
level18a = "EvGenius";
level18s = 1185;
level19 = "001101061203121001070001097212021320000181001202021920000000010100121020000000014110010001080121010110010201100000000000000000110000";
level19a = "Hale32bit";
level19s = 2930;
level20 = "008210000006000171000012000002010101011201160001010101025101010900070101710201010101000001031001010102000061970000010008000032410000";
level20a = "CRYSTALL_m";
level20s = 4710;
level21 = "000000000000130612000000000000000300000027001301000101121213010000000002121201010001170019510000021800010001000000320000000000150000";
level21a = "IHERO21";
level21s = 1405;
level22 = "001900020001130100000001010001010000010101000020010101000120000011010100000102000000021712011801010101140000000000010101030000000000";
level22a = "CRYSTALL_m";
level22s = 1650;
level23 = "005232020701000103010071010100000141003001030102000101100101000000120001010601010100000000120100000100000101000000000050000101080000";
level23a = "CRYSTALL_m";
level23s = 3700;
level24 = "000000190000000600000000010100010200001048101301001212120201000000000002021212124121570027100000016181216291000000691000007500910000";
level24a = "IHERO21";
level24s = 2290;
level25 = "000000008802200000000000000016001710180010001802001512311219000267090000141213122000001400000000000200104600000000000016000000000000";
level25a = "IHERO21";
level25s = 945;
level26 = "000000010101000000110000041300010001030117000000005101120012011300000000170012100200000000040007010101010001000000191001010101010000";
level26a = "Alastor G";
level26s = 1130;
level27 = "001200000000081000000000070200005857581181000000100039213778761269000000180000780006100000120200000000010012000000000018010100020000";
level27a = "Wertolet";
level27s = 1420;
level28 = "000111101202001811100011160015001512021218110000190000002013120301001800001601160000150611010001480700183902110000039169810211010000";
level28a = "Wertolet";
level28s = 3200;
level29 = "000101010101106101070001110101230101128101000101010112060101015100100141030101611201010008018112011121010101000000010101100901030000";
level29a = "Mikozoid";
level29s = 3325;
level30 = "000810150419100700000013000901120106001300000092520111015292000000002072011101721400000002100000110000100200000000010211020100000000";
level30a = "Alastor G";
level30s = 655;
level31 = "000000111112111100000000111112120612121111000011121209201012121100000011111212121111000012040000110011000081110000040310000012210000";
level31a = "CurlySue";
level31s = 4300;
level32 = "001200181900120100010000140200520800000110091300122000000210000000920300000018010100000000010110000000006631000000070000000000000000";
level32a = "Wertolet";
level32s = 1745;
level33 = "000000011201001100000000010700000261410012007000180101120106210000001220000103010000300001040050000000080100000000010000010100000000";
level33a = "Silen";
level33s = 2225;
level34 = "000000000001120100000000000021010861010102000001020750112109106100120190016101410102011200000101620121210110000000000001120101060000";
level34a = "Hale32bit";
level34s = 1495;
level35 = "001110100000000102010008020001010013000015000039009600180013030700125912741100000000061200010000001800001615000000010117000209010000";
level35a = "Raidho";
level35s = 2140;
level36 = "000014000001150000000013000001010001211614000001011811121116000401001301211100110217000020000219151900001517000000000206010102170000";
level36a = "Raidho";
level36s = 2210;
level37 = "000101001551000000000013000011190002111200000081010000090101420100000001010017150101000711121100010342000000000000000000001800000000";
level37a = "Raidho";
level37s = 2145;
level38 = "001202131101120106120008131900021120001411811300132000000011000015111016000000001610171018020158001800100912020000071202782018360000";
level38a = "Wertolet";
level38s = 2035;
level39 = "000000010110000902120000011202160131010001010108200201021602910600000151012001010214010101120007711020011200000000020000000100000000";
level39a = "Wertolet";
level39s = 3870;
level40 = "006972012000140001080070010700000118120016109100000014120201191401061000161601200000010112011901010400360271720000011601312110630000";
level40a = "Kornao";
level40s = 3875;
levelCompile = function () {
z = "";
i = 0;
while (i < 6) {
j = 0;
while (j < 11) {
obj = back[("tesla" + i) + j];
if (obj._visible == true) {
x = obj._currentframe;
if (obj.bar1._visible) {
x = x + (obj.bar1._currentframe * 20);
} else if (x < 10) {
x = "0" + x;
}
} else {
x = "00";
}
z = z + x;
j = j + 1;
}
i = i + 1;
}
return(z);
};
Frame 3
totalBytes = Math.round(_root.getBytesTotal() / 1024);
loadedBytes = Math.round(_root.getBytesLoaded() / 1024);
if (percentDone < Math.round((loadedBytes / totalBytes) * 100)) {
percentDone = percentDone + 1;
}
preloaderBar._xscale = percentDone;
preloaderEff._x = percentDone * 6.4;
if (percentDone >= 100) {
_root.gotoAndPlay(5);
}
Frame 4
gotoAndPlay (3);
Frame 10
function stepCoord(dif) {
switch (dif) {
case 0 :
xx = 100;
yy = 0;
break;
case 1 :
xx = 50;
yy = -38;
break;
case 2 :
xx = 0;
yy = -75;
break;
case 3 :
xx = -50;
yy = -38;
break;
case 4 :
xx = -100;
yy = 0;
break;
case 5 :
xx = -50;
yy = 38;
break;
case 6 :
xx = 0;
yy = 75;
break;
case 7 :
xx = 50;
yy = 38;
}
}
stop();
totalscore = 0;
var my_so = SharedObject.getLocal("prizma_2", "/");
lvlrec = new Array();
if (my_so.data.lvlrec[0] == undefined) {
my_so.data.lvlrec = new Array();
my_so.data.lvlrec[0] = 0;
}
lvlmedal = new Array();
if (my_so.data.lvlmedal[0] == undefined) {
my_so.data.lvlmedal = new Array();
my_so.data.lvlmedal[0] = 0;
my_so.data.lvlmedal[1] = 0;
my_so.data.lvlmedal[11] = 0;
my_so.data.lvlmedal[21] = 0;
}
i = 1;
while (i < 41) {
if (my_so.data.lvlmedal[i] > 3) {
my_so.data.lvlmedal[i] = 3;
}
lvlmedal[i] = my_so.data.lvlmedal[i];
lvlrec[i] = my_so.data.lvlrec[i];
if (lvlrec[i] != undefined) {
totalscore = totalscore + lvlrec[i];
}
i++;
}
menu_screen.tar = "main";
my_lvl = 40;
var play_laser1 = new Sound(_root);
play_laser1.attachSound("snd_laser1");
var play_laser2 = new Sound(_root);
play_laser2.attachSound("snd_laser2");
var play_laser3 = new Sound(_root);
play_laser3.attachSound("snd_laser3");
var play_powerdown = new Sound(_root);
play_powerdown.attachSound("snd_powerdown");
var play_on = new Sound(_root);
play_on.attachSound("snd_on");
var play_pre = new Sound(_root);
play_pre.attachSound("snd_pre");
var play_record = new Sound(_root);
play_record.attachSound("snd_record");
var play_medal = new Sound(_root);
play_medal.attachSound("snd_medal");
var play_score = new Sound(_root);
play_score.attachSound("snd_score");
var play_music = new Sound(_root);
play_music.attachSound("snd_mus");
play_music.start(0, 999);
showscore._visible = false;
tesla._visible = false;
select._visible = false;
fly._visible = false;
fly.stop();
star._visible = false;
marker.select._visible = false;
menu_screen.swapDepths(99999);
win_screen.swapDepths(99998);
level_screen.swapDepths(99997);
inter.swapDepths(99990);
select.swapDepths(10000);
marker.swapDepths(9999);
eff.swapDepths(9998);
back.gotoAndStop(2);
menu_screen.gotoAndPlay(2);
inter._y = 540;
begin = 0;
edit = false;
camp = true;
menu_type = 0;
begin_type = 0;
help = true;
bonus = 0;
medal = 0;
lvl = 0;
aim = 0;
inform = 2;
music = 2;
step = 5;
stepmax = 5;
minute = 0;
sec = 0;
sec_str = "00";
msec = 0;
score = 0;
need_score = 0;
global_score = 0;
plus = 0;
obj = 0;
fly = 0;
xx = 0;
yy = 0;
ii = 0;
target = 0;
targ = 0;
targ_cur = 0;
targ_cur_last = 0;
targ_true = false;
tar1 = 0;
tar2 = 0;
tar3 = 0;
tar4 = 0;
addscore_count = 0;
fly_count = 0;
tutor_count = 0;
eff_count = 0;
i = 0;
while (i < 6) {
j = 0;
while (j < 11) {
map[j] = 0;
j = j + 1;
}
i = i + 1;
}
i = 0;
while (i < 6) {
j = 0;
while (j < 11) {
if ((j % 2) == 0) {
plus = 0;
} else {
plus = 50;
}
obj = back.attachMovie("tesla", ("tesla" + i) + j, (j * 10) + i);
obj._x = (plus + 45) + (i * 100);
obj._y = 50 + (j * 38);
obj.posx = i;
obj.posy = j;
obj.x = i;
obj.y = j;
obj.stop();
obj._visible = false;
j = j + 1;
}
i = i + 1;
}
loadLevel = function () {
inter._y = 540;
aim = 0;
trace(lvl);
if (lvl == 0) {
begin = -1;
} else {
begin = 0;
showscore._visible = true;
}
step = 5;
stepmax = 5;
score = 0;
record = 0;
combo = 1;
addscore_count = 0;
fly_count = 0;
tutor_count = 0;
eff_count = 0;
combo_count = 0;
minute = 0;
sec = 0;
sec_str = "0:00";
msec = 0;
need_min = Math.floor(_root[("level" + lvl) + "timer"] / 60);
need_sec = _root[("level" + lvl) + "timer"] % 60;
need_str = (need_min + ":") + need_sec;
need_score = _root[("level" + lvl) + "score"];
levelname = (("Level " + lvl) + " by ") + _root[("level" + lvl) + "a"];
k = 0;
map = _root["level" + lvl];
i = 0;
while (i < 6) {
j = 0;
while (j < 11) {
obj = back[("tesla" + i) + j];
obj.type = Number(map.substr(k, 2));
k = k + 2;
if (obj.type > 20) {
x = obj.type % 20;
y = (obj.type - x) / 20;
obj.type = x;
obj.bar1._visible = (obj.bar2._visible = true);
obj.bar1.gotoAndStop(y);
obj.bar2.gotoAndStop(y);
} else {
obj.bar1._visible = (obj.bar2._visible = false);
}
obj.gotoAndStop(obj.type);
obj.inform.gotoAndStop(obj.type);
obj.ramka.gotoAndStop(1);
if (obj.type == 0) {
obj._visible = false;
} else {
obj._visible = true;
if (inform == 1) {
obj.inform._visible = false;
}
}
if ((obj.type > 5) and (obj.type < 10)) {
obj.img.gotoAndStop(obj.type - 4);
} else {
obj.img.gotoAndStop(2);
}
if (((obj.type > 9) and (obj.type < 13)) and (edit == false)) {
z = _root.attachMovie("nexus", ("nexus" + i) + j, _root.getNextHighestDepth());
z._x = obj._x;
z._y = obj._y - 7;
if (obj.type == 10) {
z._visible = false;
}
if (obj.type == 11) {
aim = aim + 1;
z._visible = false;
}
if (obj.type == 12) {
if (obj.bar1._visible == false) {
z._visible = true;
} else {
z._visible = false;
}
}
}
j = j + 1;
}
i = i + 1;
}
switch (lvl) {
case 1 :
createTutor(245, 288, 3, "Start", "Click here to start");
createTutor(295, 130, 2, "Switch", "Move here to open Finish");
break;
case 2 :
createTutor(396, 326, 4, "Charger", "Increase your move count");
createTutor(296, 64, 2, "Teleport", "Move to any Start elements");
break;
case 3 :
createTutor(34, 403, 4, "Helper", "Click here to hide hints");
createTutor(650, 25, 3, "Rewards", "Speed up to get more scores");
break;
case 99 :
createTutor(0, -5, 4, "Alt. controls", "Hold left button and move mouse cursor");
}
};
_global.playSound = function (info) {
_root[info].start();
};
_global.openMenu = function (info) {
menu_screen.tablo.img.close = true;
menu_screen.tablo.img.tar = info;
};
lengthdir_x = function (len, dir) {
return(Math.cos((dir * Math.PI) / 180) * len);
};
lengthdir_y = function (len, dir) {
return((-Math.sin((dir * Math.PI) / 180)) * len);
};
collisionPoint = function (x, y) {
i = 0;
while (i < 6) {
j = 0;
while (j < 11) {
obj = back[("tesla" + i) + j];
if (x > (obj._x - 25)) {
if (x < (obj._x + 25)) {
if (y > (obj._y - 19)) {
if (y < (obj._y + 19)) {
if (target.type == -1) {
if (obj.type < 1) {
obj = undefined;
}
}
return(obj);
}
}
}
}
j = j + 1;
}
i = i + 1;
}
};
createEff = function (x1, y1, x2, y2) {
eff.lineStyle(10, 7208956, 10);
eff.moveTo(x1 - ((x1 - x2) / 5), (y1 - ((y1 - y2) / 5)) - 20);
eff.lineTo(x2 - ((x2 - x1) / 5), (y2 - ((y2 - y1) / 5)) - 20);
eff.lineStyle(6, 12058617, 30);
eff.moveTo(x1 - ((x1 - x2) / 10), (y1 - ((y1 - y2) / 10)) - 20);
eff.lineTo(x2 - ((x2 - x1) / 10), (y2 - ((y2 - y1) / 10)) - 20);
eff.lineStyle(3, 16777215, 60);
eff.moveTo(x1, y1 - 20);
eff.lineTo(x2, y2 - 20);
eff_count++;
obj = eff.attachMovie("eff_bitmap", "eff" + eff_count, eff.getNextHighestDepth());
obj._x = x1;
obj._y = y1 - 20;
obj._rotation = Math.random() * 360;
};
createFly = function (x, y, count) {
i = count;
stepCoord(Math.floor(marker.select._rotation / 45));
xx = xx / count;
yy = yy / count;
while (i--) {
fly_count++;
obj = this.attachMovie("fly", "fly" + fly_count, 11000 + fly_count);
obj._x = x;
obj._y = y;
obj._rotation = Math.random() * 360;
}
};
createStar = function (x, y, w, h, count) {
i = count;
while (i--) {
fly_count++;
obj = this.attachMovie("star", "star" + fly_count, 110000 + fly_count);
obj._x = x + (Math.random() * w);
obj._y = y + (Math.random() * h);
obj.gotoAndPlay(Math.random() * 15);
}
};
createTutor = function (x, y, typ, nam, des) {
tutor_count++;
obj = this.attachMovie("tutor" + typ, "tutor" + tutor_count, 99990 + tutor_count);
obj._x = x;
obj._y = y;
obj.nam = nam;
obj.des = des;
};
addScore = function () {
this["play_laser" + Math.min(3, combo)].start();
addscore_count = addscore_count + 1;
combo_count = 60;
score = score + ((5 * combo) + 5);
obj = _root.attachMovie("text_addscore", "text_addscore_" + addscore_count, 10000 + addscore_count);
obj.txt.text = String("+" + ((5 * combo) + 5));
obj._x = target._x;
obj._y = target._y;
if (target.type < 13) {
combo = combo + 1;
}
};
levelClear = function () {
eff.clear();
i = 0;
while (i < 6) {
j = 0;
while (j < 11) {
obj = _root.back[("tesla" + i) + j];
obj._visible = false;
if ((obj._currentframe > 9) and (obj._currentframe < 13)) {
_root[("nexus" + obj.x) + obj.y].removeMovieClip();
}
j = j + 1;
}
i = i + 1;
}
if (eff_count > 0) {
i = 1;
while (i <= eff_count) {
obj = _root.eff["eff" + i];
obj.removeMovieClip();
i = i + 1;
}
eff_count = 0;
}
if (tutor_count > 0) {
i = 1;
while (i <= tutor_count) {
obj = _root["tutor" + i];
obj.removeMovieClip();
i = i + 1;
}
tutor_count = 0;
}
marker._visible = false;
select._visible = false;
};
endLevel = function (die) {
if (begin != -1) {
levelClear();
begin = -1;
switch (die) {
case 0 :
fly_count = 0;
menu_screen.tar = "score";
menu_screen.gotoAndPlay(2);
break;
case 1 :
level_screen.text_level.text = String("Level " + lvl);
level_screen.gotoAndPlay(2);
break;
case 2 :
level_screen.text_level.text = String("Not Enough Energy");
level_screen.gotoAndPlay(3);
play_powerdown.start();
break;
case 3 :
level_screen.text_level.text = String("No Moves Left");
level_screen.gotoAndPlay(3);
play_powerdown.start();
break;
case 4 :
level_screen.text_level.text = String("Editor Mode");
level_screen.gotoAndPlay(3);
edit = true;
break;
case 5 :
level_screen.text_level.text = String("Tester Mode");
level_screen.gotoAndPlay(3);
edit = false;
lvl = 0;
level0 = editor.map;
}
}
};
heroPos = function () {
herox = target.posx;
heroy = target.posy;
marker._x = target._x;
marker._y = target._y;
marker.select._visible = false;
};
targetSet = function () {
heroPos();
tar1 = collisionPoint(marker._x + 50, marker._y - 38);
tar2 = collisionPoint(marker._x - 50, marker._y - 38);
tar3 = collisionPoint(marker._x - 50, marker._y + 38);
tar4 = collisionPoint(marker._x + 50, marker._y + 38);
i = 1;
while (i < 5) {
if (_root["tar" + i].bar1._visible == true) {
_root["tar" + i] = undefined;
}
i++;
}
if ((((tar1 == undefined) and (tar2 == undefined)) and (tar3 == undefined)) and (tar4 == undefined)) {
endLevel(3);
}
marker.t1._alpha = (marker.t2._alpha = (marker.t3._alpha = (marker.t4._alpha = 0)));
if (tar1 == undefined) {
marker.t1._visible = false;
} else {
marker.t1._visible = true;
}
if (tar2 == undefined) {
marker.t2._visible = false;
} else {
marker.t2._visible = true;
}
if (tar3 == undefined) {
marker.t3._visible = false;
} else {
marker.t3._visible = true;
}
if (tar4 == undefined) {
marker.t4._visible = false;
} else {
marker.t4._visible = true;
}
};
changeTesla = function () {
marker.effect._xscale = (marker.effect._yscale = 250);
createEff(marker._x, marker._y, target._x, target._y);
addScore();
if (target.type == 11) {
aim = aim - 1;
}
if (aim == 0) {
endLevel(0);
}
step = step - 1;
switch (target.type) {
case 2 :
step = step + 5;
inter.text_step._yscale = 150;
break;
case 3 :
step = step + 10;
inter.text_step._yscale = 150;
break;
case 4 :
step = step + 15;
inter.text_step._yscale = 150;
break;
case 6 :
case 7 :
case 8 :
case 9 :
i = 0;
while (i < 6) {
j = 0;
while (j < 11) {
obj = _root.back[("tesla" + i) + j];
if (obj.bar1._visible == true) {
if (obj.bar1._currentframe == (target.img._currentframe - 1)) {
obj.bar1._visible = (obj.bar2._visible = false);
z = _root.attachMovie("eff_bar", "eff_bar", _root.getNextHighestDepth());
z._x = obj._x;
z._y = obj._y;
}
}
j = j + 1;
}
i = i + 1;
}
break;
case 10 :
begin = 0;
target.ramka.gotoAndPlay(12);
i = 0;
while (i < 6) {
j = 0;
while (j < 11) {
obj = _root.back[("tesla" + i) + j];
if (obj.type == 11) {
_root[("nexus" + obj.x) + obj.y]._visible = false;
}
if (obj.type == 12) {
if (obj.bar1._visible == false) {
_root[("nexus" + obj.x) + obj.y]._visible = true;
}
}
j = j + 1;
}
i = i + 1;
}
eff_count++;
obj = eff.attachMovie("eff_bitmap", "eff" + eff_count, eff.getNextHighestDepth());
obj._x = target._x;
obj._y = target._y - 20;
obj._rotation = Math.random() * 360;
obj = _root.attachMovie("eff_line", "eff_line" + eff_count, _root.getNextHighestDepth());
obj._x = target._x;
obj._y = target._y - 20;
obj.gotoAndPlay("up");
break;
case 11 :
_root[("nexus" + target.x) + target.y]._visible = false;
}
if (step < 1) {
endLevel(2);
}
eff._alpha = Math.min(120, 70 + (10 * step));
marker.select._alpha = Math.min(120, 70 + (10 * step));
if ((target._currentframe > 12) and (step > 0)) {
stepCoord(target._currentframe - 13);
ii = 0;
if (true) {
ii = ii + 1;
targ = collisionPoint(target._x + (ii * xx), target._y + (ii * yy));
if (targ != undefined) {
if (targ.type != 0) {
if ((targ.type < 0) or (obj.bar1._visible == true)) {
endLevel(3);
// unexpected jump
}
createEff(target._x, target._y, targ._x, targ._y);
target.type = -2;
target.img.gotoAndStop(1);
target = targ;
heroPos();
changeTesla();
// unexpected jump
}
// unexpected jump
}
endLevel(3);
}
} else {
target.type = -1;
target.img.gotoAndStop(1);
target.inform.gotoAndStop(1);
if (target._currentframe != 10) {
targetSet();
} else {
x = 0;
i = 0;
while (i < 6) {
j = 0;
while (j < 11) {
z = back[("tesla" + i) + j];
if (z.type == 12) {
if (z.bar1._visible == false) {
x = 1;
break;
}
}
j = j + 1;
}
i = i + 1;
}
if (x == 0) {
endLevel(3);
}
}
}
};
onEnterFrame = function () {
if (edit == false) {
if (begin > -1) {
targ_cur = collisionPoint(_xmouse, _ymouse);
if ((((targ_cur == tar1) or (targ_cur == tar2)) or (targ_cur == tar3)) or (targ_cur == tar4)) {
targ_true = true;
} else {
targ_true = false;
}
if (begin == 0) {
marker._visible = false;
select._visible = false;
if (targ_cur.bar1._visible == false) {
if (targ_cur.type == 12) {
select._visible = true;
select._x = _root._xmouse;
select._y = _root._ymouse;
select.light._x = (select.bord._x = targ_cur._x - _root._xmouse);
select.light._y = (select.bord._y = targ_cur._y - _root._ymouse);
select.light.gotoAndStop(targ_cur.type);
select.bord.gotoAndStop(targ_cur.type);
}
}
}
if (begin == 1) {
marker.select._visible = false;
select._visible = false;
if (targ_cur != undefined) {
if (targ_true == true) {
marker.select._xscale = Math.sqrt(Math.pow(marker._x - _xmouse, 2) + Math.pow((marker._y - 20) - _ymouse, 2));
marker.select._rotation = (Math.atan2(_ymouse - (marker._y - 20), _xmouse - marker._x) / Math.PI) * 180;
marker.select._visible = true;
select._visible = true;
select._x = _root._xmouse;
select._y = _root._ymouse;
select.light._x = (select.bord._x = targ_cur._x - _root._xmouse);
select.light._y = (select.bord._y = targ_cur._y - _root._ymouse);
select.light.gotoAndStop(targ_cur.type);
select.bord.gotoAndStop(targ_cur.type);
if ((msec % 5) == 0) {
createFly(_root._xmouse, _root._ymouse, 1);
}
}
}
if (combo_count > 0) {
combo_count = combo_count - 1;
} else {
combo = 1;
}
if (msec == 30) {
msec = 1;
if (sec == 59) {
minute = minute + 1;
sec = 0;
sec_str = "00";
} else {
sec = sec + 1;
if (sec < 10) {
sec_str = (minute + ":0") + sec;
} else {
sec_str = (minute + ":") + sec;
}
}
} else {
msec = msec + 1;
}
}
if (inter._y > 480) {
inter._y = inter._y - 5;
}
if (inter.text_step._yscale > 100) {
inter.text_step._yscale = inter.text_step._yscale - 10;
}
} else if (inter._y < 540) {
inter._y = inter._y + 5;
}
if (mousePressed == true) {
if (begin == 0) {
target = collisionPoint(_root._xmouse, _root._ymouse);
if (target != undefined) {
if (target.type == 12) {
if (targ_cur.bar1._visible == false) {
i = 0;
while (i < 6) {
j = 0;
while (j < 11) {
obj = back[("tesla" + i) + j];
if (obj.type == 11) {
_root[("nexus" + obj.x) + obj.y]._visible = true;
}
if (obj.type == 12) {
_root[("nexus" + obj.x) + obj.y]._visible = false;
}
j = j + 1;
}
i = i + 1;
}
marker.effect._xscale = (marker.effect._yscale = 250);
target.img.gotoAndStop(1);
target.type = -1;
begin = 1;
addScore();
targetSet();
marker._visible = true;
obj = _root.attachMovie("eff_line", "eff_line" + eff_count, _root.getNextHighestDepth());
obj._x = target._x;
obj._y = target._y - 20;
obj.gotoAndPlay("down");
}
}
}
} else if (begin == 1) {
target = collisionPoint(_root._xmouse, _root._ymouse);
if (target != undefined) {
if (target.type > 0) {
if ((((target == tar1) || (target == tar2)) || (target == tar3)) || (target == tar4)) {
changeTesla();
}
}
}
}
}
} else {
targ_cur = collisionPoint(_xmouse, _ymouse);
if (targ_cur_last != targ_cur) {
targ_cur_last.ramka.gotoAndPlay(12);
targ_cur.ramka.gotoAndPlay(2);
}
targ_cur_last = targ_cur;
if (mousePressed == true) {
mousePressed = false;
if (inter.cursor > 0) {
z = ("" + targ_cur.x) + targ_cur.y;
if ((((((z != "00") and (z != "010")) and (z != "50")) and (z != "51")) and (z != "59")) and (z != "510")) {
targ_cur._visible = true;
targ_frame = targ_cur._currentframe;
switch (inter.cursor) {
case 1 :
targ_cur.gotoAndStop(12);
break;
case 2 :
targ_cur.gotoAndStop(1);
break;
case 3 :
if ((targ_frame < 2) or (targ_frame > 3)) {
targ_cur.gotoAndStop(2);
} else {
targ_cur.nextFrame();
}
break;
case 4 :
targ_frame = targ_cur.bar1._currentframe;
if (targ_cur.bar1._visible == true) {
if (targ_frame == 4) {
targ_cur.bar1._visible = false;
targ_cur.bar2._visible = false;
} else {
targ_cur.bar1.nextFrame();
targ_cur.bar2.nextFrame();
}
} else {
targ_cur.bar1._visible = true;
targ_cur.bar2._visible = true;
targ_cur.bar1.gotoAndStop(1);
targ_cur.bar1.gotoAndStop(1);
}
break;
case 5 :
if ((targ_frame < 6) or (targ_frame > 8)) {
targ_cur.gotoAndStop(6);
targ_cur.img.gotoAndStop(2);
} else {
targ_cur.nextFrame();
targ_cur.img.gotoAndStop(targ_cur._currentframe - 4);
}
break;
case 6 :
targ_cur.gotoAndStop(10);
break;
case 7 :
if ((targ_frame < 13) or (targ_frame > 19)) {
targ_cur.gotoAndStop(13);
} else {
targ_cur.nextFrame();
}
break;
case 8 :
targ_cur.gotoAndStop(11);
break;
case 9 :
targ_cur.gotoAndStop(1);
targ_cur._visible = false;
targ_cur.bar1._visible = false;
targ_cur.bar2._visible = false;
}
targ_cur.inform.gotoAndStop(targ_cur._currentframe);
}
}
}
if (inter._y > 480) {
inter._y = inter._y - 5;
}
}
};
onMouseDown = function () {
mousePressed = true;
};
onMouseUp = function () {
mousePressed = false;
};
loadLevel();
Symbol 15 MovieClip [tutor4] Frame 1
gotoAndPlay(Math.floor(Math.random() * 10));
Symbol 15 MovieClip [tutor4] Frame 21
name.text = nam;
Symbol 15 MovieClip [tutor4] Frame 29
desc.text = des;
Symbol 15 MovieClip [tutor4] Frame 35
stop();
Symbol 18 MovieClip [tutor3] Frame 1
gotoAndPlay(Math.floor(Math.random() * 10));
Symbol 18 MovieClip [tutor3] Frame 21
name.text = nam;
Symbol 18 MovieClip [tutor3] Frame 29
desc.text = des;
Symbol 18 MovieClip [tutor3] Frame 35
stop();
Symbol 21 MovieClip [tutor2] Frame 1
gotoAndPlay(Math.floor(Math.random() * 10));
Symbol 21 MovieClip [tutor2] Frame 21
name.text = nam;
Symbol 21 MovieClip [tutor2] Frame 29
desc.text = des;
Symbol 21 MovieClip [tutor2] Frame 35
stop();
Symbol 24 MovieClip [tutor1] Frame 1
gotoAndPlay(Math.floor(Math.random() * 10));
Symbol 24 MovieClip [tutor1] Frame 21
name.text = nam;
Symbol 24 MovieClip [tutor1] Frame 29
desc.text = des;
Symbol 24 MovieClip [tutor1] Frame 35
stop();
Symbol 29 MovieClip Frame 1
stop();
Symbol 34 MovieClip Frame 2
stop();
Symbol 39 MovieClip Frame 1
stop();
Symbol 41 MovieClip Frame 1
stop();
Symbol 41 MovieClip Frame 11
stop();
Symbol 54 MovieClip Frame 1
stop();
Symbol 59 MovieClip Frame 2
stop();
Symbol 64 MovieClip Frame 2
stop();
Symbol 69 MovieClip Frame 2
stop();
Symbol 75 MovieClip Frame 2
stop();
Symbol 82 MovieClip Frame 2
stop();
Symbol 87 MovieClip Frame 2
stop();
Symbol 92 MovieClip Frame 2
stop();
Symbol 97 MovieClip Frame 2
stop();
Symbol 102 MovieClip Frame 2
stop();
Symbol 107 MovieClip Frame 2
stop();
Symbol 112 MovieClip Frame 2
stop();
Symbol 117 MovieClip Frame 2
stop();
Symbol 122 MovieClip Frame 2
stop();
Symbol 127 MovieClip Frame 2
stop();
Symbol 132 MovieClip Frame 2
stop();
Symbol 136 MovieClip [eff_line] Frame 9
this.removeMovieClip();
Symbol 136 MovieClip [eff_line] Frame 18
this.removeMovieClip();
Symbol 139 MovieClip [text_addscore] Frame 20
this.removeMovieClip();
Symbol 141 MovieClip Frame 1
onEnterFrame = function () {
if (_alpha < 100) {
_alpha = (_alpha + 10);
}
};
Symbol 148 Button
on (release) {
if (_root.begin == -2) {
_root.menu_screen.tablo.play();
_root.menu_screen.play();
_root.begin = -1;
_root.menu_type = 0;
_root.lvl = numb;
}
}
Symbol 153 Button
on (release) {
if (_root.begin == -2) {
_root.menu_screen.tablo.play();
_root.menu_screen.play();
_root.begin = -1;
_root.menu_type = 0;
_root.lvl = numb;
}
}
Symbol 157 Button
on (release) {
if (_root.begin == -2) {
_root.menu_screen.tablo.play();
_root.menu_screen.play();
_root.begin = -1;
_root.menu_type = 0;
_root.lvl = numb;
}
}
Symbol 161 MovieClip [star] Frame 1
rot = Math.ceil((Math.random() * 6) - 3);
alp = Math.ceil((Math.random() * 3) + 3);
onEnterFrame = function () {
_y = (_y - (Math.random() * 1));
_rotation = (_rotation + rot);
_alpha = (_alpha - alp);
if (_alpha < 1) {
this.removeMovieClip();
}
};
Symbol 166 MovieClip [fly] Frame 31
this.removeMovieClip();
Symbol 171 MovieClip [eff_glass] Frame 1
dir = 45 + random(90);
vspeed = 0;
speed = 5 + random(9);
rot = 40 - random(80);
timer = 20 + random(20);
_rotation = random(360);
onEnterFrame = function () {
_rotation = (_rotation + rot);
_x = (_x + _root.lengthdir_x(speed, dir));
_y = (_y + (_root.lengthdir_y(speed, dir) + vspeed));
vspeed = vspeed + 0.5;
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
}
} else {
this.removeMovieClip();
}
};
Symbol 174 MovieClip [eff_bar] Frame 15
this.removeMovieClip();
Symbol 181 MovieClip Frame 1
onEnterFrame = function () {
_yscale = (80 + (Math.random() * 20));
_xscale = (80 + (Math.random() * 20));
};
Symbol 183 MovieClip Frame 1
onEnterFrame = function () {
_alpha = (90 + (Math.random() * 20));
};
Symbol 192 Button
on (rollOver) {
playSound("over");
}
on (release) {
playSound("click");
getURL ("http://armorgames.com/", "_blank");
}
Symbol 199 Button
on (press) {
getURL ("http://www.armorgames.com", "_blank");
}
Symbol 202 MovieClip Frame 1
_root.stop();
gotoAndPlay (2);
Symbol 202 MovieClip Frame 218
_root.play();
Symbol 206 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (_root.lvl != 0) {
x = Math.ceil(_root.lvl / 10);
if (x != _currentframe) {
gotoAndStop(x);
}
}
};
Symbol 209 MovieClip Frame 1
stop();
Symbol 210 MovieClip Frame 1
onEnterFrame = function () {
_rotation = (_rotation + 1);
_yscale = (80 + (Math.random() * 40));
_xscale = (80 + (Math.random() * 40));
};
Symbol 213 MovieClip Frame 30
onEnterFrame = function () {
if (_currentframe == 30) {
xx = Math.round(Math.random() * 7);
yy = Math.round(Math.random() * 6);
_x = (45 + (xx * 100));
_y = (50 + (yy * 75.5));
}
};
Symbol 214 MovieClip Frame 1
onEnterFrame = function () {
_rotation = (_rotation + 1);
_alpha = (100 + (Math.random() * 20));
if (_xscale > 125) {
_yscale = (_yscale - 25);
_xscale = (_yscale - 25);
}
};
Symbol 225 Button
on (release) {
if (_root.music == 2) {
_root.music = 1;
new Sound().setVolume(0);
} else {
_root.music = 2;
new Sound().setVolume(100);
}
}
Symbol 227 MovieClip Frame 1
onEnterFrame = function () {
gotoAndStop(_root.music);
};
Symbol 235 Button
on (release) {
if (_root.inform == 2) {
_root.inform = 1;
i = 0;
while (i < 6) {
j = 0;
while (j < 11) {
obj = _root.back[("tesla" + i) + j];
obj.inform._visible = false;
j = j + 1;
}
i = i + 1;
}
} else {
_root.inform = 2;
i = 0;
while (i < 6) {
j = 0;
while (j < 11) {
obj = _root.back[("tesla" + i) + j];
obj.inform._visible = true;
j = j + 1;
}
i = i + 1;
}
}
}
Symbol 236 MovieClip Frame 1
onEnterFrame = function () {
gotoAndStop(_root.inform);
};
Symbol 249 Button
on (release) {
if (_root.begin > -1) {
_root.menu_screen.gotoAndPlay(2);
_root.menu_screen.tar = "main";
_root.begin = -1;
_root.lvl = 0;
}
}
Symbol 256 Button
on (release) {
if (_root.begin > -1) {
_root.endLevel(1);
_root.begin = -1;
}
}
Symbol 273 MovieClip Frame 1
_visible = false;
stop();
Symbol 273 MovieClip Frame 3
_visible = true;
Symbol 273 MovieClip Frame 40
_root.back.gotoAndStop(1);
_root.loadLevel(_root["level" + _root.lvl]);
Symbol 276 MovieClip Frame 1
onEnterFrame = function () {
_rotation = (_rotation + 1);
_yscale = (250 + (Math.random() * 100));
_xscale = (250 + (Math.random() * 100));
};
Symbol 287 Button
on (release) {
if (_root.begin == -2) {
_root.totalscore = _root.totalscore + (_root.score + _root.bonus);
_root.win_screen.tablo.play();
_root.begin = -1;
_root.win_screen.play();
_root.menu_type = 2;
}
}
Symbol 294 Button
on (release) {
if (_root.begin == -2) {
_root.win_screen.tablo.play();
_root.begin = -1;
_root.win_screen.play();
_root.menu_type = 3;
_root.begin_type = 1;
}
}
Symbol 295 Button
on (release) {
if (_root.begin == -2) {
_root.win_screen.tablo.play();
_root.begin = -1;
_root.win_screen.play();
_root.menu_type = 1;
}
}
Symbol 302 Button
on (release) {
if (_root.begin == -2) {
_root.totalscore = _root.totalscore + (_root.score + _root.bonus);
_root.win_screen.tablo.play();
_root.begin = -1;
_root.win_screen.play();
_root.menu_type = 3;
_root.begin_type = 1;
}
}
Symbol 303 Button
on (release) {
if (_root.begin == -2) {
_root.win_screen.tablo.play();
_root.begin = -1;
_root.win_screen.play();
_root.menu_type = 2;
_root.begin_type = 2;
}
}
Symbol 304 MovieClip Frame 1
stop();
Symbol 332 MovieClip Frame 1
stop();
Symbol 332 MovieClip Frame 2
if (_root.score < _root.need_score) {
text1.rec.gotoAndStop(1);
} else {
text1.rec.gotoAndStop(2);
_root.createStar(320 - (text1.rec._width / 2), 400 + text1._y, text1.rec._width, text1.rec._height, 10);
_root.play_laser1.start();
}
text1.txt.text = _root.score;
Symbol 332 MovieClip Frame 12
_root.bonus = 0;
have = ((_root.minute * 1800) + (_root.sec * 30)) + _root.msec;
need = (_root.need_min * 1800) + (_root.need_sec * 30);
if (have < need) {
_root.bonus = Math.round((need - have) / 5);
}
if (need < have) {
text2.rec.gotoAndStop(1);
} else {
text2.rec.gotoAndStop(2);
_root.createStar(320 - (text2.rec._width / 2), 400 + text2._y, text2.rec._width, text2.rec._height, 10);
_root.play_laser2.start();
}
text2.txt.text = _root.bonus;
Symbol 332 MovieClip Frame 22
_root.medal = (text1.rec._currentframe + text2.rec._currentframe) - 1;
text3.rec.gotoAndStop(_root.medal);
if (_root.medal > 1) {
_root.createStar(320 - (text3.rec._width / 2), 400 + text3._y, text3.rec._width, text3.rec._height, 20);
_root.play_laser3.start();
}
text3.txt.text = (_root.totalscore + _root.score) + _root.bonus;
Symbol 332 MovieClip Frame 27
stop();
Symbol 335 MovieClip Frame 1
_visible = false;
stop();
Symbol 335 MovieClip Frame 2
_visible = true;
Symbol 335 MovieClip Frame 9
_root.back.gotoAndStop(2);
_root.levelClear();
Symbol 335 MovieClip Frame 10
if (_root.lvl == 40) {
text_win.text = "Game Complete!";
} else {
text_win.text = "Level Complete";
}
Symbol 335 MovieClip Frame 23
if (_root.lvl == 40) {
buttons.gotoAndStop(2);
} else {
buttons.gotoAndStop(1);
}
Symbol 335 MovieClip Frame 43
stop();
tablo.play();
_root.begin = -2;
Symbol 335 MovieClip Frame 60
if (_root.lvl >= _root.my_lvl) {
_root.my_lvl = _root.lvl + 1;
_root.my_so.data.my_lvl = _root.my_lvl;
_root.my_so.flush();
}
if (_root.lvlmedal[_root.lvl] < _root.medal) {
_root.lvlmedal[_root.lvl] = _root.medal;
_root.my_so.data.lvlmedal[_root.lvl] = _root.medal;
_root.my_so.flush();
}
switch (_root.menu_type) {
case 1 :
_root.level_screen.text_level.text = String("Level " + _root.lvl);
_root.level_screen.gotoAndPlay(2);
break;
case 2 :
_root.lvl = _root.lvl + 1;
if (_root.lvl == 41) {
_root.lvl = 1;
_root.menu_screen.gotoAndPlay(2);
} else {
_root.level_screen.text_level.text = String("Level " + _root.lvl);
_root.level_screen.gotoAndPlay(2);
}
break;
case 3 :
_root.menu_screen.gotoAndPlay(2);
}
Symbol 343 MovieClip Frame 1
stop();
if (_root.lvl > 0) {
if (_root.lvl == 40) {
gotoAndStop (3);
} else {
gotoAndStop (2);
}
}
Symbol 346 Button
on (rollOver) {
gotoAndPlay ("on");
}
on (rollOut) {
gotoAndPlay ("off");
}
on (release) {
if (_root.begin == -2) {
gotoAndPlay (1);
_root.begin = -1;
switch (_parent.tar) {
case "main" :
switch (_name) {
case "but1" :
openMenu("select");
break;
case "but2" :
_root.begin = -2;
getURL (walkurl, "_blank");
break;
case "but3" :
openMenu("credit");
break;
case "but4" :
_root.begin = -2;
getURL (sponsorurl, "_blank");
break;
case "but5" :
_root.begin = -2;
getURL ("http://twitter.com/armorgames", "_blank");
break;
case "but6" :
_root.begin = -2;
getURL ("http://www.facebook.com/pages/Armor-Games/19522089061", "_blank");
}
break;
case "score" :
switch (_name) {
case "but1" :
if (_root.lvl == 40) {
openMenu("main");
} else {
openMenu("select");
}
_root.lvl = 0;
break;
case "but2" :
_root.menu_screen.play();
break;
case "but3" :
if (_root.lvl == 40) {
openMenu("main");
} else {
_root.submitScore();
}
_root.lvl = 0;
break;
case "but4" :
openMenu("select");
break;
case "but5" :
_root.begin = -2;
getURL (sponsorurl, "_blank");
}
break;
case "submit" :
switch (_name) {
case "but1" :
_root.submitScore();
break;
case "but2" :
openMenu("main");
}
break;
case "select" :
case "achi" :
case "credit" :
case "walk" :
openMenu("main");
break;
case "help" :
_root.menu_screen.play();
}
_root.play_pre.start();
}
}
Symbol 350 MovieClip Frame 1
stop();
Symbol 350 MovieClip Frame 8
stop();
Symbol 361 Button
on (release) {
if (_root.begin == -2) {
_root.begin = -1;
_root.lvl = id;
if (_root.help == true) {
_root.help = false;
openMenu("help");
} else {
_root.menu_screen.play();
}
}
}
Symbol 368 MovieClip Frame 1
stop();
Symbol 391 MovieClip Frame 1
stop();
Symbol 391 MovieClip Frame 12
stop();
Symbol 400 MovieClip Frame 1
rectxt._visible = false;
addtxt._visible = false;
totaladd = 0;
meter.eff._visible = true;
medal = 0;
snd_timer = 0;
score = _root.score;
totalscore = _root.totalscore;
score_add = 0;
half = _root[("level" + _root.lvl) + "s"] / 2;
step = 200 / _root[("level" + _root.lvl) + "s"];
plus = (Math.round(score / 1000) * 5) + 5;
i = 0;
while (i < 3) {
if (_root.lvlmedal[_root.lvl] > i) {
meter["star" + i].gotoAndStop("on");
}
i++;
}
medal_have = Math.min(3, Math.ceil((score + 1) / half));
if (_root.lvlmedal[_root.lvl] < medal_have) {
_root.lvlmedal[_root.lvl] = medal_have;
_root.my_so.data.lvlmedal[_root.lvl] = medal_have;
}
trace("have=" + medal_have);
trace(_root.lvlmedal.toString());
if (_root.lvlmedal[_root.lvl + 1] == undefined) {
_root.lvlmedal[_root.lvl + 1] = 0;
_root.my_so.data.lvlmedal[_root.lvl + 1] = 0;
}
if (_root.lvlrec[_root.lvl] == undefined) {
totaladd = score;
} else if (score > _root.lvlrec[_root.lvl]) {
totaladd = score - _root.lvlrec[_root.lvl];
}
if (totaladd > 0) {
_root.lvlrec[_root.lvl] = score;
_root.my_so.data.lvlrec[_root.lvl] = score;
rectxt._visible = true;
addtxt._visible = true;
addtxt.text = ("(+" + totaladd) + ")";
}
_root.my_so.flush();
scorex.text = score;
_root.totalscore = totalscore + totaladd;
totalscorex.text = _root.totalscore;
_root.kongregate.stats.submit("totalscore", _root.totalscore);
rectxt._x = (scorex._x + scorex.textWidth) + 10;
addtxt._x = (totalscorex._x + totalscorex.textWidth) + 10;
onEnterFrame = function () {
if (score > 0) {
if (score > plus) {
totalscore = totalscore + plus;
meter.eff._x = meter.eff._x + (step * plus);
score = score - plus;
score_add = score_add + plus;
} else {
totalscore = totalscore + score;
meter.eff._x = meter.eff._x + (step * score);
score_add = score_add + score;
score = 0;
}
if (snd_timer == 0) {
_root.play_score.start();
snd_timer = 2;
} else {
snd_timer--;
}
}
if (medal < 3) {
meter.eff._x = step * score_add;
if (score_add >= (half * medal)) {
meter["star" + medal].gotoAndPlay(2);
if (medal < 2) {
_root.play_record.start();
} else {
_root.play_medal.start();
}
medal++;
}
} else if (medal == 3) {
meter.eff._visible = false;
meter.eff._x = 0;
medal = 4;
}
};
Symbol 419 MovieClip Frame 1
stop();
Symbol 420 MovieClip Frame 1
cur.gotoAndStop(1);
e1.gotoAndStop(2);
e2.gotoAndStop(2);
e3.gotoAndStop(2);
e4.gotoAndStop(2);
e5.gotoAndStop(2);
Symbol 420 MovieClip Frame 20
cur.gotoAndStop(2);
e1.gotoAndStop(1);
Symbol 420 MovieClip Frame 34
e2.gotoAndStop(1);
Symbol 420 MovieClip Frame 44
e3.gotoAndStop(1);
Symbol 420 MovieClip Frame 54
e4.gotoAndStop(1);
Symbol 420 MovieClip Frame 64
e5.gotoAndStop(1);
Symbol 420 MovieClip Frame 70
cur.gotoAndStop(1);
Symbol 423 MovieClip Frame 1
close = false;
_alpha = 0;
tar = "close";
gotoAndStop(tar);
onEnterFrame = function () {
if (close == false) {
if (_alpha < 100) {
_alpha = (_alpha + 10);
} else if (_alpha != 100) {
_alpha = 100;
}
} else if (_alpha > 0) {
_alpha = (_alpha - 10);
} else {
_alpha = 0;
close = false;
gotoAndStop(tar);
_root.begin = -2;
}
};
Symbol 423 MovieClip Frame 2
stop();
but1.img.title = "START GAME";
but2.img.title = "Walkthrough";
but3.img.title = "Credits";
but4.img.title = "Play More Games";
but5.img.title = "Follow us on Twitter";
but6.img.title = "Facebook";
Symbol 423 MovieClip Frame 3
but1.img.title = "Main Menu";
stat_lvl = 0;
stat_star = 0;
i = 1;
while (i < 41) {
z = this["lvl" + i];
z.id = i;
if (_root.lvlmedal[i] != undefined) {
z.gotoAndStop(_root.lvlmedal[i] + 2);
if (_root.lvlmedal[i] > 0) {
stat_lvl++;
}
stat_star = stat_star + _root.lvlmedal[i];
}
i++;
}
if (stat_star < 50) {
unlock._visible = true;
} else {
unlock._visible = false;
if (_root.lvlmedal[31] == undefined) {
_root.lvlmedal[31] = 0;
lvl31.gotoAndStop(2);
}
}
Symbol 423 MovieClip Frame 4
if (_root.lvl == 40) {
but1.img.title = "BACK TO MENU";
} else {
but1.img.title = "CONTINUE";
}
but2.img.title = "Restart";
but4.img.title = "Level Select";
but5.img.title = "Play More Games";
title = ("LEVEL " + _root.lvl) + " RESULTS";
Symbol 423 MovieClip Frame 5
but1.img.title = "Main Menu";
Symbol 423 MovieClip Frame 6
but1.img.title = "SUBMIT SCORE";
but2.img.title = "Main Menu";
Symbol 423 MovieClip Frame 7
but1.img.title = "Main Menu";
Symbol 423 MovieClip Frame 8
but1.img.title = "Main Menu";
Symbol 423 MovieClip Frame 9
but1.img.title = "Continue";
Symbol 425 MovieClip Frame 1
_visible = false;
stop();
Symbol 425 MovieClip Frame 2
_visible = true;
_root.showscore._visible = false;
play();
Symbol 425 MovieClip Frame 9
_root.back.gotoAndStop(2);
_root.levelClear();
_root.menu_type = 0;
Symbol 425 MovieClip Frame 31
_root.menu_type = _root.begin_type;
Symbol 425 MovieClip Frame 44
stop();
_root.begin = -2;
openMenu(tar);
Symbol 425 MovieClip Frame 56
_root.level_screen.text_level.text = String("Level " + _root.lvl);
_root.level_screen.gotoAndPlay(2);
Symbol 425 MovieClip Frame 68
_root.back.gotoAndStop(1);
Symbol 430 MovieClip Frame 1
stop();
_alpha = 0;
needload = false;
onEnterFrame = function () {
if (action != undefined) {
gotoAndStop(action);
switch (action) {
case "LOAD" :
needload = true;
case "SAVE" :
if (_alpha < 100) {
_alpha = (_alpha + 10);
}
break;
case "DONE" :
if (needload == true) {
_root.loadLevel(map);
needload = false;
}
case "NO" :
if (_alpha <= 0) {
break;
}
_alpha = (_alpha - 5);
}
if (_alpha < 1) {
action = undefined;
needload = false;
gotoAndStop (1);
}
}
};