Frame 1
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
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 == "kongregate.com") {
kongapi = true;
kongregate.services.connect();
}
kongsend = function (kng1, kng2) {
trace((kng1 + "=") + kng2);
kongregate.stats.submit(kng1, kng2);
};
__com_mochibot__("00d834e3", this, 10301, true);
Frame 2
function itemHandler1() {
getURL (sponsorurl, "_blank");
}
function itemHandler2() {
getURL (walkurl, "_blank");
}
function itemHandler3() {
getURL ("http://www.silengames.com", "_blank");
}
function itemHandler4() {
getURL (hosturl, "_blank");
}
_global.sponsorurl = "http://www.kongregate.com/?gamereferral=prizma-puzzle-challenges";
_global.morelevelsurl = "http://www.kongregate.com/?gamereferral=prizma-puzzle-challenges";
_global.walkurl = "http://www.kongregate.com/pages/prizma-puzzle-challenges-walkthrough?gamereferral=prizma-puzzle-challenges";
_global.pp1url = "http://www.kongregate.com/games/SilenGames/prizma-puzzle?gamereferral=prizma-puzzle-challenges";
_global.pp2url = "http://www.kongregate.com/games/SilenGames/prizma-puzzle-2?gamereferral=prizma-puzzle-challenges";
_global.pp3url = "http://www.kongregate.com/games/mofunzone/prizma-puzzle-3?gamereferral=prizma-puzzle-challenges";
_global.hosturl = "http://www.kongregate.com/games_for_your_site?gamereferral=prizma-puzzle-challenges";
percentDone = 0;
lvl = 0;
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
myMenu.customItems.push(new ContextMenuItem("Play More Games", itemHandler1));
myMenu.customItems.push(new ContextMenuItem("Video Walkthrough", itemHandler2));
myMenu.customItems.push(new ContextMenuItem("Developer Site", itemHandler3));
myMenu.customItems.push(new ContextMenuItem("Host This Game", itemHandler4));
_root.menu = myMenu;
level0 = "000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
level1 = "000000000000000000000000000000000000120000000000000000050500000000000000110500000000000000000000000000000000000000000000000000000000";
level2 = "000000000005000000000000000002010001011200000000000001050100000000000000010100010200000000001100010501000000000000000000000000000000";
level3 = "000000000000000000000000000005010100000000000000110000058101000000000000000901000512000000000000000002000000000000000000000000000000";
level4 = "000000000012000000000000000082010001020000000005010001050100010500000001020100010901000000000000011101000000000000000000000000000000";
level5 = "000000000012000000000000000013010001130000000000000000000000000000000000040000000900000000000511058205000000000000000000000000000000";
level6 = "000000190000000200000000010500000000000513000000000016121800000000001700001400200000010000001102000000150500000000000000000000000000";
level7 = "000000050000000500000000020100010201000102000000018101000109010000000201000105010001120000000109010001810100000000000001110100000000";
level8 = "000000000000000000000000000000000112010000000000002501030001060000000021212525010000000000003100210000000000000000000000000000000000";
level9 = "000000000012000000000000000001010601000000000003010807492981010200000001006981810505000000000000011105000000000000000000000000000000";
level10 = "001201020102010100000001020001010101050201000102010181450000010609010101050000812100000000000201010700001100000000000009000000000000";
level11 = "000000000001000000000000000001050012000000000001030000000000120100000010000000000105000000000000110105000000000000000000000000000000";
level12 = "001200001009120000120000000510000000140500001002000000010000000912120000018100001000001000118100000300000512000000000012001000000000";
level13 = "001200000020000000100000002000090500020100000000180502010100811100000020000205010281000000121800091800000110000000000000000000000000";
level14 = "000112011282120112010001130113818181130113010000000081118100000000000000000000000000000000091709170517091709000510021002100210021005";
level15 = "001220000014000012140000000007000012000001000005021041310000050610000002074100000005011000120000001612000016000000180000000000120000";
level16 = "001205010000001500120000130209000001080201000000010021118500000000000100064100610701170000120219010000010212000000000000000000050000";
level17 = "000012021902000007090012020000120001090000101302120012820000050100000001090000858100005008090000050100008111000000100000007000000000";
level18 = "000901101202120701010000656100141302021208010061610000001415020212000110810500000014101200118101104141454109010000000000000000000000";
level19 = "000000095000050100000000120200000200000801000000180201120106000030000120000102014121120070000705000561810000000000120012001000110000";
level20 = "001209810981098109120001010101090509010101011808811081068110810716008103814181618103810017090521212921210509170212812181118121811202";
level21 = "000000000000000000000000000000000000120000000000000000090101000000000000008181890000000000000000110000000000000000000000000000000000";
level22 = "000000000001890100000000001204090000008901000001090009810000000189890100000000018101000000008901000101001100000000000081000000000000";
level23 = "000000000081000100000000000009010002010901000001010001120100028100000002810100010901000000110100020101000000000000000000000000000000";
level24 = "000000000081000000000000000089890081810000000089890000090202898900898911001209090200890900008989000002818900000000000089818100000000";
level25 = "001181810981098109120081818181818189898181098181818181818189898209818181818181818989810981828989898989898982090909820982098209820909";
level26 = "000000001202000000000000000000130013000000000000001301130113000000000000010001000100000000001300130013001300000011010101010101010000";
level27 = "000000130013001300000000130100010001000413001100000000000000000012000000000000000000010017010001000100011700000000170017001700000000";
level28 = "001200012000002001000000010100002001000001132000000201000001020000002001000001200000010100000001200000010111000000190000000100000000";
level29 = "000220000014000014010020000000000100000000140020000116121819001600000000001401200000000018020000001100000002160000180000000000160000";
level30 = "001319021919191320200018021816181514021316021716201117121917201317021820191514131719141717161416131718150214171916161502191402151817";
level31 = "000000000000000000000000000002070100011200000000060100210101000000000000416101000207000000001100000008000000000000000000000000000000";
level32 = "000000000000000000000000001101006161480000000000006161414122270600000061484221211201000000000000270601000000000000000000000000000000";
level33 = "000000000061000000000000000006010001070000000061010003120300014100000001080300032101000000000000014101001100000000000000000000000000";
level34 = "000101010111010101010000000101010101010100000000000021212100000000000361616100414141030000000108000700060100000000000012001200000000";
level35 = "000000414107126100120000414261416161410861004141614261414261610612616141614162614141212121216161612141212200001100210021002100000000";
level36 = "000000000012000000000000000002010000011200000010010000010100001200000000010100000201000000110100001001000000000000000000000000000000";
level37 = "000000100000001000000000100000091200000912000000091200000012000000118100000012000002100000008181000002100000000000000012000000000000";
level38 = "000000000006000000000000000002122130410000000008122130515261700800000030415261700212000000000000700712000000000000000000000000000000";
level39 = "000000120012001200120000100909092121414112000010092122424161611200001028414161628681120000114110671081108400000000000000000000000000";
level40 = "000000120870071200000000120210617261100212000950415281918112011009091241108132811001120900000212213021120200000000000007120600000000";
zoneneed = new Array();
zoneneed[2] = 5;
zoneneed[3] = 10;
zoneneed[4] = 30;
zoneneed[5] = 15;
zoneneed[6] = 20;
zoneneed[7] = 40;
zoneneed[8] = 50;
gachi = new Array();
gachitxt = new Array();
gachi[0] = [100, 1000, 5000, 10000, 20000, 30000, 40000];
gachitxt[0] = ["Gain", "points"];
gachi[1] = [3, 10, 20, 30, 40, 50, 60];
gachitxt[1] = ["Find", "stars"];
gachi[2] = [1, 50, 100, 200, 400, 800, 1200];
gachitxt[2] = ["Charge", "elements"];
gachi[3] = [5, 10, 15, 20, 25, 30, 35];
gachitxt[3] = ["Get a combo x", ""];
gachi[4] = [1];
gachitxt[4] = ["Complete the first level", ""];
gachi[5] = [1];
gachitxt[5] = ["Complete Green Zone", ""];
gachi[6] = [1];
gachitxt[6] = ["Complete Yellow Zone", ""];
gachi[7] = [1];
gachitxt[7] = ["Complete Red Zone", ""];
gachi[8] = [1];
gachitxt[8] = ["Complete Black Zone", ""];
gachi[9] = [1];
gachitxt[9] = ["Complete Crystal Challenge", ""];
gachi[10] = [1];
gachitxt[10] = ["Complete Cannon Challenge", ""];
gachi[11] = [1];
gachitxt[11] = ["Complete Barrier Challenge", ""];
gachi[12] = [1];
gachitxt[12] = ["Complete Teleport Challenge", ""];
atxt = new Array();
i = 0;
while (i < gachi.length) {
atxt[i] = new Array();
j = 0;
while (j < gachi[i].length) {
if (gachi[i].length == 1) {
atxt[i][j] = gachitxt[i][0];
} else {
atxt[i][j] = (((gachitxt[i][0] + " ") + gachi[i][j]) + " ") + gachitxt[i][1];
}
j++;
}
i++;
}
totalscore = 0;
var my_so = SharedObject.getLocal("prizma_4", "/");
lvlrec = new Array();
lvlmedal = new Array();
stat = new Array();
i = 0;
while (i < gachi.length) {
stat[i] = 0;
trace((i + "-") + stat[i]);
i++;
}
if (my_so.data.lvlrec[0] == undefined) {
my_so.data.lvlrec = new Array();
my_so.data.lvlrec[0] = 0;
my_so.data.lvlmedal = new Array();
my_so.data.lvlmedal[0] = 0;
my_so.data.lvlmedal[1] = -1;
my_so.data.lvlmedal[6] = -1;
my_so.data.lvlmedal[11] = -1;
my_so.data.lvlmedal[16] = -1;
my_so.data.lvlmedal[21] = -1;
my_so.data.lvlmedal[26] = -1;
my_so.data.lvlmedal[31] = -1;
my_so.data.lvlmedal[36] = -1;
my_so.data.inform = 2;
my_so.data.music = 2;
i = 0;
while (i < gachi.length) {
j = 0;
while (j < gachi[i].length) {
my_so.data[("gachi" + i) + j] = gachi[i][j];
j++;
}
my_so.data["stat" + i] = stat[i];
i++;
}
}
inform = my_so.data.inform;
music = my_so.data.music;
if (music == 1) {
new Sound().setVolume(0);
}
i = 1;
while (i < 41) {
lvlmedal[i] = my_so.data.lvlmedal[i];
lvlrec[i] = my_so.data.lvlrec[i];
if (lvlrec[i] != undefined) {
totalscore = totalscore + lvlrec[i];
}
i++;
}
i = 0;
while (i < 13) {
j = 0;
while (j < 8) {
if (my_so.data[("gachi" + i) + j] != undefined) {
gachi[i][j] = my_so.data[("gachi" + i) + j];
} else {
break;
}
j++;
}
stat[i] = my_so.data["stat" + i];
i++;
}
_global.saveStat = function () {
trace("SAVE STAT...");
i = 0;
while (i < gachi.length) {
j = 0;
while (j < gachi[i].length) {
my_so.data[("gachi" + i) + j] = gachi[i][j];
j++;
}
my_so.data["stat" + i] = stat[i];
trace((gachitxt[i][0] + "---") + my_so.data["stat" + i]);
i++;
}
trace("SAVE STAT END...");
my_so.data.inform = inform;
my_so.data.music = music;
my_so.flush();
};
_global.addStat = function (type, amount) {
stat[type] = stat[type] + amount;
testGachi(type);
};
_global.setStat = function (type, amount) {
trace("-----------" + stat[type]);
if (amount > stat[type]) {
stat[type] = amount;
}
trace("-----------" + amount);
testGachi(type);
};
_global.testGachi = function (type) {
trace((("stat" + type) + "=") + stat[type]);
j = 0;
while (j < gachi[type].length) {
if (gachi[type][j] != -1) {
if (stat[type] >= gachi[type][j]) {
if (gachi[type].length == 1) {
gachilogo.desc = gachitxt[type][0];
} else {
gachilogo.desc = (((gachitxt[type][0] + " ") + gachi[type][j]) + " ") + gachitxt[type][1];
}
gachilogo.img.gotoAndStop(type + 1);
gachilogo.img.img.gotoAndStop(j + 1);
gachilogo.img.img2.gotoAndStop(j + 1);
gachilogo.gotoAndPlay(2);
gachi[type][j] = -1;
}
}
j++;
}
};
Frame 3
stop();
onEnterFrame = function () {
totalBytes = Math.round(_root.getBytesTotal() / 1024);
loadedBytes = Math.round(_root.getBytesLoaded() / 1024);
if (percentDone < Math.round((loadedBytes / totalBytes) * 100)) {
percentDone = percentDone + 0.5;
}
preloaderBar._xscale = percentDone;
preloaderEff._x = 45 + (percentDone * 5.5);
loadingperc.text = Math.round(percentDone) + "%";
if (percentDone >= 100) {
_root.gotoAndPlay(5);
}
};
Frame 5
onEnterFrame = null;
Frame 7
stop();
Frame 8
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();
menu_screen.tar = "main";
my_lvl = 40;
var play_atom = new Sound(_root);
play_atom.attachSound("snd_atom");
var play_cry = new Sound(_root);
play_cry.attachSound("snd_cry");
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_lasera1 = new Sound(_root);
play_lasera1.attachSound("snd_laser1a");
var play_lasera2 = new Sound(_root);
play_lasera2.attachSound("snd_laser2a");
var play_lasera3 = new Sound(_root);
play_lasera3.attachSound("snd_laser3a");
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);
curinfo._visible = false;
showscore._visible = false;
tesla._visible = false;
select._visible = false;
fly._visible = false;
fly.stop();
star._visible = false;
marker.select._visible = false;
curinfo.swapDepths(100001);
gachilogo.swapDepths(99999);
combotxt.swapDepths(99998);
menu_screen.swapDepths(99997);
win_screen.swapDepths(99996);
level_screen.swapDepths(99995);
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;
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;
floor_eff._visible = true;
} else {
begin = 0;
showscore._visible = true;
curinfo._visible = true;
curinfo.gotoAndStop(1);
inter.atom._visible = false;
if (_root.lvl > 3) {
floor_eff._visible = true;
} else {
floor_eff._visible = false;
}
back.img.gotoAndStop(Math.ceil(_root.lvl / 5));
}
step = 5;
stepmax = 5;
stars = 0;
atoms = 0;
if (lvl < 21) {
inter.stars._visible = true;
inter.stars.s1.gotoAndStop(1);
inter.stars.s2.gotoAndStop(1);
inter.stars.s3.gotoAndStop(1);
} else {
inter.stars._visible = false;
}
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;
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;
if (x == 0) {
x = 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(195, 333, 3, "Start", "Click here to start");
createTutor(295, 248, 4, "Star", "Collect stars to open new levels");
break;
case 2 :
createTutor(196, 142, 2, "Charger", "Increase your move count");
createTutor(65, 455, 2, "Energy Amount", "1 move takes 1 energy unit");
break;
case 3 :
createTutor(343, 174, 2, "Breaker", "Collect it to break crystals");
createTutor(244, 281, 3, "Crystal", "Use breaker to remove it");
break;
case 4 :
createTutor(650, 30, 3, "Combo", "Speed up to get more scores");
break;
case 5 :
createTutor(496, 30, 3, "Helper", "Click here to hide hints");
break;
case 8 :
createTutor(244, 367, 4, "Switch", "Move here to open barrier");
break;
case 11 :
createTutor(343, 100, 2, "Teleport", "Move to any Start elements");
}
};
_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);
}
};
createBreak = function (x, y, w, h, count) {
i = count;
while (i--) {
fly_count++;
obj = this.attachMovie("crybreak", "crybreak" + 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 () {
if (Math.random() < 0.5) {
this["play_laser" + Math.min(3, combo)].start();
} else {
this["play_lasera" + Math.min(3, combo)].start();
}
addStat(2, 1);
addscore_count = addscore_count + 1;
combo_count = 45;
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) {
setStat(3, combo);
combo = combo + 1;
}
};
playCombo = function () {
if (combo > 2) {
_root.combotxt.title = combo - 1;
_root.combotxt.gotoAndPlay(2);
}
};
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) {
curinfo._visible = false;
if (begin != -1) {
levelClear();
begin = -1;
switch (die) {
case 0 :
setStat(3, combo);
playCombo();
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) {
if (_root["tar" + i].bar1._currentframe == 4) {
if (atoms == 0) {
_root["tar" + i] = undefined;
}
} else {
_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.bar1._visible == true) {
if (target.bar1._currentframe == 4) {
if (atoms > 0) {
atoms--;
if (atoms == 0) {
curinfo.gotoAndStop(1);
inter.atom._visible = false;
}
target.bar1._visible = (target.bar2._visible = false);
z = _root.attachMovie("eff_bar", "eff_bar", _root.getNextHighestDepth());
z.img.gotoAndStop(2);
z._x = obj._x;
z._y = obj._y;
_root.createBreak(target._x - 25, target._y - 30, 50, 50, 15);
playSound("play_cry");
}
}
}
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 5 :
stars = stars + 1;
inter.stars["s" + stars].play();
_root.createStar(target._x - 25, target._y - 30, 50, 50, 15);
break;
case 6 :
case 7 :
case 8 :
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 9 :
atoms = atoms + 1;
curinfo.gotoAndStop(2);
inter.atom._visible = true;
_root.createStar(target._x - 25, target._y - 30, 50, 50, 15);
playSound("play_atom");
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) {
curinfo._x = _xmouse;
curinfo._y = _ymouse;
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 (combo_count > 0) {
combo_count = combo_count - 1;
} else {
playCombo();
combo = 1;
}
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 (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 19 MovieClip [tutor4] Frame 1
gotoAndPlay(Math.floor(Math.random() * 10));
Symbol 19 MovieClip [tutor4] Frame 21
name.text = nam;
Symbol 19 MovieClip [tutor4] Frame 29
desc.text = des;
Symbol 19 MovieClip [tutor4] Frame 35
stop();
Symbol 22 MovieClip [tutor3] Frame 1
gotoAndPlay(Math.floor(Math.random() * 10));
Symbol 22 MovieClip [tutor3] Frame 21
name.text = nam;
Symbol 22 MovieClip [tutor3] Frame 29
desc.text = des;
Symbol 22 MovieClip [tutor3] Frame 35
stop();
Symbol 25 MovieClip [tutor2] Frame 1
gotoAndPlay(Math.floor(Math.random() * 10));
Symbol 25 MovieClip [tutor2] Frame 21
name.text = nam;
Symbol 25 MovieClip [tutor2] Frame 29
desc.text = des;
Symbol 25 MovieClip [tutor2] Frame 35
stop();
Symbol 28 MovieClip [tutor1] Frame 1
gotoAndPlay(Math.floor(Math.random() * 10));
Symbol 28 MovieClip [tutor1] Frame 21
name.text = nam;
Symbol 28 MovieClip [tutor1] Frame 29
desc.text = des;
Symbol 28 MovieClip [tutor1] Frame 35
stop();
Symbol 33 MovieClip Frame 1
stop();
Symbol 38 MovieClip Frame 2
stop();
Symbol 45 MovieClip Frame 1
stop();
Symbol 47 MovieClip Frame 1
stop();
Symbol 47 MovieClip Frame 11
stop();
Symbol 62 MovieClip Frame 1
stop();
Symbol 67 MovieClip Frame 2
stop();
Symbol 72 MovieClip Frame 2
stop();
Symbol 77 MovieClip Frame 2
stop();
Symbol 82 MovieClip Frame 2
stop();
Symbol 88 MovieClip Frame 2
stop();
Symbol 95 MovieClip Frame 2
stop();
Symbol 100 MovieClip Frame 2
stop();
Symbol 105 MovieClip Frame 2
stop();
Symbol 110 MovieClip Frame 2
stop();
Symbol 115 MovieClip Frame 2
stop();
Symbol 120 MovieClip Frame 2
stop();
Symbol 125 MovieClip Frame 2
stop();
Symbol 130 MovieClip Frame 2
stop();
Symbol 135 MovieClip Frame 2
stop();
Symbol 140 MovieClip Frame 2
stop();
Symbol 145 MovieClip Frame 2
stop();
Symbol 150 MovieClip Frame 2
stop();
Symbol 154 MovieClip [eff_line] Frame 9
this.removeMovieClip();
Symbol 154 MovieClip [eff_line] Frame 18
this.removeMovieClip();
Symbol 157 MovieClip [text_addscore] Frame 20
this.removeMovieClip();
Symbol 159 MovieClip Frame 1
onEnterFrame = function () {
if (_alpha < 100) {
_alpha = (_alpha + 10);
}
};
Symbol 166 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 171 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 175 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 179 MovieClip [star] Frame 1
spd = Math.random() + 0.5;
alp = Math.ceil((Math.random() * 2) + 2);
onEnterFrame = function () {
_y = (_y - spd);
_alpha = (_alpha - alp);
if (_alpha < 1) {
this.removeMovieClip();
}
};
Symbol 186 MovieClip [fly] Frame 31
this.removeMovieClip();
Symbol 191 MovieClip [crybreak] Frame 1
gotoAndStop(1 + random(4));
vspeed = 0;
speed = 4 + random(6);
if (random(10) < 5) {
dir = 90 + random(30);
rot = -5 - random(5);
} else {
dir = 60 + random(30);
rot = 5 + random(5);
}
timer = 15 + random(15);
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 196 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 198 MovieClip Frame 1
stop();
Symbol 199 MovieClip [eff_bar] Frame 15
this.removeMovieClip();
Symbol 204 MovieClip Frame 1
onEnterFrame = function () {
_yscale = (80 + (Math.random() * 20));
_xscale = (80 + (Math.random() * 20));
};
Symbol 206 MovieClip Frame 1
onEnterFrame = function () {
_alpha = (90 + (Math.random() * 20));
};
Symbol 210 Button
on (rollOver) {
_root.play_on.start();
}
on (release) {
getURL (sponsorurl, "_blank");
_root.play_pre.start();
}
Symbol 213 MovieClip Frame 1
onEnterFrame = function () {
_rotation = (_rotation + 1);
_yscale = (250 + (Math.random() * 100));
_xscale = (250 + (Math.random() * 100));
};
Symbol 218 MovieClip Frame 1
stop();
Symbol 219 MovieClip Frame 89
gotoAndPlay(1 + random(40));
Symbol 228 Button
on (release) {
getURL (pp1url, "_blank");
}
Symbol 233 Button
on (release) {
getURL (pp2url, "_blank");
}
Symbol 238 Button
on (release) {
getURL (pp3url, "_blank");
}
Symbol 243 Button
on (release) {
getURL ("http://kongregate.com/", "_blank");
}
Symbol 269 MovieClip Frame 90
_root.gotoAndStop(8);
Symbol 273 MovieClip Frame 1
stop();
Symbol 276 MovieClip Frame 1
stop();
Symbol 277 MovieClip Frame 1
onEnterFrame = function () {
_rotation = (_rotation + 1);
_yscale = (80 + (Math.random() * 40));
_xscale = (80 + (Math.random() * 40));
};
Symbol 280 MovieClip Frame 21
gotoAndPlay(22 + random(65));
Symbol 280 MovieClip Frame 90
xx = Math.round(Math.random() * 6);
yy = Math.round(Math.random() * 6);
_x = (45 + (xx * 100));
_y = (50 + (yy * 75.5));
Symbol 281 MovieClip Frame 1
onEnterFrame = function () {
_rotation = (_rotation + 1);
_alpha = (100 + (Math.random() * 20));
if (_xscale > 125) {
_yscale = (_yscale - 25);
_xscale = (_yscale - 25);
}
};
Symbol 296 MovieClip Frame 1
stop();
Symbol 296 MovieClip Frame 12
stop();
Symbol 305 Button
on (rollOver) {
_root.play_on.start();
}
on (release) {
getURL (walkurl, "_blank");
_root.play_pre.start();
}
Symbol 311 Button
on (rollOver) {
playSound("mouseon");
}
Symbol 319 MovieClip Frame 1
stop();
Symbol 320 MovieClip Frame 1
ib1.gotoAndStop(_root.inform);
ib2.gotoAndStop(_root.music);
ib3.gotoAndStop(2);
ib4.gotoAndStop(2);
ib1.ico.gotoAndStop(1);
ib2.ico.gotoAndStop(2);
ib3.ico.gotoAndStop(3);
ib4.ico.gotoAndStop(4);
ib1.desc.text = "HINTS";
ib2.desc.text = "SOUND";
ib3.desc.text = "REPLAY";
ib4.desc.text = "QUIT";
ib1.desc._visible = false;
ib2.desc._visible = false;
ib3.desc._visible = false;
ib4.desc._visible = false;
ib1.but.onRollOver = function () {
ib1.desc._visible = true;
};
ib1.but.onRollOut = function () {
ib1.desc._visible = false;
};
ib2.but.onRollOver = function () {
ib2.desc._visible = true;
};
ib2.but.onRollOut = function () {
ib2.desc._visible = false;
};
ib3.but.onRollOver = function () {
ib3.desc._visible = true;
};
ib3.but.onRollOut = function () {
ib3.desc._visible = false;
};
ib4.but.onRollOver = function () {
ib4.desc._visible = true;
};
ib4.but.onRollOut = function () {
ib4.desc._visible = false;
};
ib1.but.onPress = function () {
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;
}
}
ib1.gotoAndStop(_root.inform);
};
ib2.but.onPress = function () {
if (_root.music == 2) {
_root.music = 1;
new Sound().setVolume(0);
} else {
_root.music = 2;
new Sound().setVolume(100);
}
ib2.gotoAndStop(_root.music);
};
ib3.but.onPress = function () {
if (_root.begin > -1) {
_root.endLevel(1);
_root.begin = -1;
}
ib3.desc._visible = false;
};
ib4.but.onPress = function () {
if (_root.begin > -1) {
_root.menu_screen.gotoAndPlay(2);
_root.menu_screen.tar = "select";
_root.begin = -1;
_root.lvl = 0;
}
_root.curinfo._visible = false;
ib4.desc._visible = false;
};
Symbol 324 MovieClip Frame 1
stop();
Symbol 336 MovieClip Frame 1
_visible = false;
stop();
Symbol 336 MovieClip Frame 3
_visible = true;
Symbol 336 MovieClip Frame 40
_root.back.gotoAndStop(1);
_root.loadLevel(_root["level" + _root.lvl]);
Symbol 339 MovieClip Frame 1
onEnterFrame = function () {
_alpha = (90 + (Math.random() * 20));
};
Symbol 348 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 355 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 362 Button
on (release) {
if (_root.begin == -2) {
_root.win_screen.tablo.play();
_root.begin = -1;
_root.win_screen.play();
_root.menu_type = 1;
}
}
Symbol 370 Button
on (release) {
if (_root.music == 2) {
_root.music = 1;
new Sound().setVolume(0);
} else {
_root.music = 2;
new Sound().setVolume(100);
}
}
Symbol 372 MovieClip Frame 1
onEnterFrame = function () {
gotoAndStop(_root.music);
};
Symbol 380 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 381 MovieClip Frame 1
onEnterFrame = function () {
gotoAndStop(_root.inform);
};
Symbol 388 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 395 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 396 MovieClip Frame 1
stop();
Symbol 424 MovieClip Frame 1
stop();
Symbol 424 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 424 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 424 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 424 MovieClip Frame 27
stop();
Symbol 427 MovieClip Frame 1
_visible = false;
stop();
Symbol 427 MovieClip Frame 2
_visible = true;
Symbol 427 MovieClip Frame 9
_root.back.gotoAndStop(2);
_root.levelClear();
Symbol 427 MovieClip Frame 10
if (_root.lvl == 40) {
text_win.text = "Game Complete!";
} else {
text_win.text = "Level Complete";
}
Symbol 427 MovieClip Frame 23
if (_root.lvl == 40) {
buttons.gotoAndStop(2);
} else {
buttons.gotoAndStop(1);
}
Symbol 427 MovieClip Frame 43
stop();
tablo.play();
_root.begin = -2;
Symbol 427 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 428 MovieClip Frame 70
gotoAndPlay(1 + random(40));
Symbol 433 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" :
openMenu("credit");
break;
case "but3" :
_root.begin = -2;
getURL (sponsorurl, "_blank");
break;
case "but4" :
_root.begin = -2;
getURL (pp1url, "_blank");
break;
case "but5" :
_root.begin = -2;
getURL (pp2url, "_blank");
break;
case "but6" :
_root.begin = -2;
getURL (pp3url, "_blank");
}
break;
case "score" :
switch (_name) {
case "but1" :
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" :
switch (_name) {
case "but1" :
openMenu("achi");
break;
case "but2" :
openMenu("main");
}
break;
case "achi" :
openMenu("select");
break;
case "credit" :
case "walk" :
openMenu("main");
break;
case "help" :
switch (_name) {
case "but1" :
_root.menu_screen.play();
break;
case "but2" :
_root.begin = -2;
getURL (sponsorurl, "_blank");
}
}
_root.play_pre.start();
}
}
Symbol 437 MovieClip Frame 1
stop();
Symbol 437 MovieClip Frame 8
stop();
Symbol 445 Button
on (rollOver) {
_root.play_on.start();
}
on (release) {
getURL ("http://www.silengames.com", "_blank");
_root.play_pre.start();
}
Symbol 474 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 477 MovieClip Frame 1
stop();
Symbol 495 MovieClip Frame 1
stop();
Symbol 506 MovieClip Frame 1
stop();
Symbol 506 MovieClip Frame 12
stop();
Symbol 515 MovieClip Frame 1
rectxt._visible = false;
addtxt._visible = false;
totaladd = 0;
meter.eff._visible = true;
medal = 0;
timer = 8;
score = _root.score;
totalscore = _root.totalscore;
if (_root.lvl < 21) {
meter._visible = true;
} else {
meter._visible = false;
}
i = 1;
while (i <= 3) {
if (_root.lvlmedal[_root.lvl] >= i) {
meter["star" + i].gotoAndStop("on");
}
i++;
}
if (_root.lvlmedal[_root.lvl] < _root.stars) {
_root.lvlmedal[_root.lvl] = _root.stars;
_root.my_so.data.lvlmedal[_root.lvl] = _root.stars;
}
if (_root.lvlmedal[_root.lvl + 1] == undefined) {
_root.lvlmedal[_root.lvl + 1] = -1;
_root.my_so.data.lvlmedal[_root.lvl + 1] = -1;
}
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.totalscore = totalscore + totaladd;
setStat(0, _root.totalscore);
if (_root.lvl == 1) {
setStat(4, 1);
}
z = 0;
i = 1;
while (i <= 5) {
if (_root.lvlmedal[i] >= 0) {
z++;
}
i++;
}
if (z == 5) {
setStat(5, 1);
}
z = 0;
i = 6;
while (i <= 10) {
if (_root.lvlmedal[i] >= 0) {
z++;
}
i++;
}
if (z == 5) {
setStat(6, 1);
}
z = 0;
i = 11;
while (i <= 15) {
if (_root.lvlmedal[i] >= 0) {
z++;
}
i++;
}
if (z == 5) {
setStat(7, 1);
}
z = 0;
i = 16;
while (i <= 20) {
if (_root.lvlmedal[i] >= 0) {
z++;
}
i++;
}
if (z == 5) {
setStat(8, 1);
}
z = 0;
i = 21;
while (i <= 25) {
if (_root.lvlmedal[i] >= 0) {
z++;
}
i++;
}
if (z == 5) {
setStat(9, 1);
}
z = 0;
i = 26;
while (i <= 30) {
if (_root.lvlmedal[i] >= 0) {
z++;
}
i++;
}
if (z == 5) {
setStat(10, 1);
}
z = 0;
i = 31;
while (i <= 35) {
if (_root.lvlmedal[i] >= 0) {
z++;
}
i++;
}
if (z == 5) {
setStat(11, 1);
}
z = 0;
i = 36;
while (i <= 40) {
if (_root.lvlmedal[i] >= 0) {
z++;
}
i++;
}
if (z == 5) {
setStat(12, 1);
}
saveStat();
scorex.text = score;
totalscorex.text = _root.totalscore;
onEnterFrame = function () {
if (timer > 0) {
timer--;
} else if (medal < _root.stars) {
medal++;
timer = 15;
meter["star" + medal].gotoAndPlay(2);
if (medal == 3) {
_root.play_medal.start();
} else {
_root.play_record.start();
}
}
};
if (_root.kongapi == true) {
i = 0;
while (i < 4) {
_root.kongsend("stat" + i, _root.stat[i]);
i++;
}
}
Symbol 604 MovieClip Frame 1
stop();
Symbol 614 Button
on (rollOver) {
_root.play_on.start();
}
on (release) {
getURL ("http://www.silengames.com", "_blank");
_root.play_pre.start();
}
Symbol 623 MovieClip Frame 1
stop();
Symbol 624 MovieClip Frame 1
cur.gotoAndStop(1);
e1.gotoAndStop(2);
e2.gotoAndStop(2);
e3.gotoAndStop(2);
e4.gotoAndStop(2);
e5.gotoAndStop(2);
Symbol 624 MovieClip Frame 20
cur.gotoAndStop(2);
e1.gotoAndStop(1);
Symbol 624 MovieClip Frame 34
e2.gotoAndStop(1);
Symbol 624 MovieClip Frame 44
e5.gotoAndStop(1);
Symbol 624 MovieClip Frame 50
cur.gotoAndStop(1);
Symbol 628 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 628 MovieClip Frame 2
stop();
but1.img.title = "START GAME";
but2.img.title = "CREDITS";
but3.img.title = "PLAY MORE GAMES";
but4.img.title = "PRIZMA PUZZLE 1";
but5.img.title = "PRIZMA PUZZLE 2";
but6.img.title = "PRIZMA PUZZLE 3";
Symbol 628 MovieClip Frame 3
but2.img.title = "Back to Menu";
lock2.need = _root.zoneneed[2];
lock3.need = _root.zoneneed[3];
lock4.need = _root.zoneneed[4];
lock5.need = _root.zoneneed[5];
lock6.need = _root.zoneneed[6];
lock7.need = _root.zoneneed[7];
lock8.need = _root.zoneneed[8];
stat_lvl = 0;
stat_star = 0;
gachis = 0;
i = 1;
while (i < 41) {
z = this["lvl" + i];
z.id = i;
z.rec = _root.lvlrec[i];
if (_root.lvlmedal[i] != undefined) {
z.gotoAndStop(_root.lvlmedal[i] + 3);
if (_root.lvlmedal[i] > -1) {
stat_lvl++;
stat_star = stat_star + _root.lvlmedal[i];
}
}
i++;
}
setStat(1, stat_star);
i = 0;
while (i < _root.gachi.length) {
j = 0;
while (j < _root.gachi[i].length) {
if (_root.gachi[i][j] == -1) {
gachis++;
}
j++;
}
i++;
}
but1.img.title = ("AWARDS " + gachis) + "/37";
zone = 0;
i = 1;
while (i < 41) {
zone = Math.ceil(i / 5);
if (zone > 0) {
if (stat_star < _root.zoneneed[zone]) {
this["lvl" + i]._visible = false;
} else {
this["lvl" + i]._visible = true;
}
}
i++;
}
i = 2;
while (i < 9) {
if (stat_star < _root.zoneneed[i]) {
this["lock" + i]._visible = true;
} else {
this["lock" + i]._visible = false;
}
i++;
}
Symbol 628 MovieClip Frame 4
but1.img.title = "CONTINUE";
but2.img.title = "REPLAY LEVEL";
but4.img.title = "SELECT LEVEL";
but5.img.title = "MORE GAMES";
title = ("LEVEL " + _root.lvl) + " RESULTS";
Symbol 628 MovieClip Frame 5
but1.img.title = "SELECT LEVEL";
i = 0;
while (i < _root.gachi.length) {
j = 0;
while (j < _root.gachi[i].length) {
z = this[("but" + i) + j];
z.title = _root.atxt[i][j];
if (_root.gachi[i][j] == -1) {
z.gotoAndStop(i + 2);
z.img.gotoAndStop(j + 1);
} else {
z.gotoAndStop(1);
}
j++;
}
i++;
}
Symbol 628 MovieClip Frame 6
but1.img.title = "SUBMIT SCORE";
but2.img.title = "BACK TO MENU";
Symbol 628 MovieClip Frame 7
but1.img.title = "BACK TO MENU";
Symbol 628 MovieClip Frame 8
but1.img.title = "BACK TO MENU";
Symbol 628 MovieClip Frame 9
but1.img.title = "CONTINUE";
but2.img.title = "MORE GAMES";
Symbol 629 MovieClip Frame 1
stop();
Symbol 631 MovieClip Frame 1
_visible = false;
stop();
Symbol 631 MovieClip Frame 2
_visible = true;
_root.showscore._visible = false;
play();
Symbol 631 MovieClip Frame 9
_root.back.gotoAndStop(2);
_root.levelClear();
_root.menu_type = 0;
Symbol 631 MovieClip Frame 10
if (_root.lvl > 0) {
title.txt.gotoAndStop(2);
}
Symbol 631 MovieClip Frame 20
ib2.gotoAndStop(_root.music);
ib2.ico.gotoAndStop(2);
ib2.desc.text = "SOUND";
ib2.desc._visible = false;
ib2.but.onRollOver = function () {
ib2.desc._visible = true;
};
ib2.but.onRollOut = function () {
ib2.desc._visible = false;
};
ib2.but.onPress = function () {
if (_root.music == 2) {
_root.music = 1;
new Sound().setVolume(0);
} else {
_root.music = 2;
new Sound().setVolume(100);
}
ib2.gotoAndStop(_root.music);
};
Symbol 631 MovieClip Frame 31
_root.menu_type = _root.begin_type;
Symbol 631 MovieClip Frame 40
openMenu(tar);
Symbol 631 MovieClip Frame 44
stop();
_root.begin = -2;
Symbol 631 MovieClip Frame 45
openMenu("close");
Symbol 631 MovieClip Frame 56
_root.level_screen.text_level.text = String("Level " + _root.lvl);
_root.level_screen.gotoAndPlay(2);
Symbol 631 MovieClip Frame 68
_root.back.gotoAndStop(1);
Symbol 635 MovieClip Frame 1
stop();
Symbol 644 MovieClip Frame 1
stop();
Symbol 648 MovieClip Frame 1
stop();
_visible = false;
Symbol 648 MovieClip Frame 2
_visible = true;
Symbol 648 MovieClip Frame 11