Frame 1
function goTo1() {
getURL (sponsorurl, "_blank");
}
function goTo2() {
getURL (hosturl, "_blank");
}
function goTo3() {
getURL (walkurl, "_blank");
}
function goTo4() {
getURL (devurl, "_blank");
}
function goTo5() {
getURL (giftsurl, "_blank");
}
function goTo6() {
getURL (candyurl, "_blank");
}
_global.sponsorurl = "http://www.kongregate.com/?haref=icyfishes&src=spon&cm=icyfishes";
_global.hosturl = "http://www.kongregate.com/games_for_your_site?haref=icyfishes&src=spon&cm=icyfishes";
_global.walkurl = "http://www.kongregate.com/pages/icy-fishes-walkthrough?haref=icyfishes&src=spon&cm=icyfishes";
_global.mushroomurl = "http://www.kongregate.com/games/SilenGames/mushroom-madness-3?haref=icyfishes&src=spon&cm=icyfishes";
_global.prizmaurl = "http://www.kongregate.com/games/SilenGames/prizma-puzzle-challenges?haref=icyfishes&src=spon&cm=icyfishes";
_global.grannyurl = "http://www.kongregate.com/games/SilenGames/granny-strikes-back?haref=icyfishes&src=spon&cm=icyfishes";
_global.candyurl = "http://www.kongregate.com/games/SilenGames/flying-candy?haref=icyfishes&src=spon&cm=icyfishes";
_global.giftsurl = "http://www.kongregate.com/games/SilenGames/icy-gifts?haref=icyfishes&src=spon&cm=icyfishes";
_global.beeurl = "http://www.kongregate.com/games/SilenGames/the-bee-way?haref=icyfishes&src=spon&cm=icyfishes";
_global.ninjaurl = "http://www.kongregate.com/games/SilenGames/ninja-painter?haref=icyfishes&src=spon&cm=icyfishes";
_global.devurl = "http://www.silengames.com";
var newMenu = new ContextMenu();
newMenu.hideBuiltInItems();
newMenu.customItems.push(new ContextMenuItem("Play More Games", goTo1));
newMenu.customItems.push(new ContextMenuItem("Host This Game", goTo2));
newMenu.customItems.push(new ContextMenuItem("Video Walkthrough", goTo3));
newMenu.customItems.push(new ContextMenuItem("Developer Site", goTo4, true));
newMenu.customItems.push(new ContextMenuItem("Play Icy Gifts", goTo5, true));
newMenu.customItems.push(new ContextMenuItem("Play Flying Candy", goTo6));
this.menu = newMenu;
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;
var kongregate = _global.kongregate;
kongregate.services.connect();
}
kongsend = function (kng1, kng2) {
trace((kng1 + "=") + kng2);
if (kongapi == true) {
kongregate.stats.submit(kng1, kng2);
}
};
Frame 2
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);
}
stop();
adBack.swapDepths(_root.getNextHighestDepth());
gameLogo.swapDepths(_root.getNextHighestDepth());
adBox.swapDepths(_root.getNextHighestDepth());
var CPMStarContentSpotID = "6539QCB66029C";
System.security.allowDomain("server.cpmstar.com");
if (kongapi == true) {
removeMovieClip(adBox);
adBox.removeMovieClip();
adBack.removeMovieClip();
gameLogo._xscale = 100;
gameLogo._yscale = 100;
} else {
adBox.loadMovie("http://server.cpmstar.com/adviewas2.swf?contentspotid=" + CPMStarContentSpotID);
}
bombs = "";
back.gotoAndStop(1 + random(10));
back.img.back2.gotoAndStop(1 + random(7));
back.img.back3.gotoAndStop(1 + random(7));
back.img.back4.gotoAndStop(1 + random(4));
percentDone = 0;
loadingbut.title = "PLAY GAME";
loadingbut._visible = false;
loadingbut.but.onRelease = function () {
removeMovieClip(adBox);
adBox.removeMovieClip();
adBack.removeMovieClip();
gameLogo.removeMovieClip();
onEnterFrame = null;
ads1.gotoAndStop(1);
ads2.gotoAndStop(2);
gotoAndStop (3);
};
adsin = 0;
ads1.img.img.gotoAndStop(2);
ads2.img.img.gotoAndStop(1);
onEnterFrame = function () {
totalBytes = Math.round(_root.getBytesTotal() / 1024);
loadedBytes = Math.round(_root.getBytesLoaded() / 1024);
sizeTxt.text = ((loadedBytes + "kb/") + totalBytes) + "kb";
if (percentDone < Math.round((loadedBytes / totalBytes) * 100)) {
percentDone = percentDone + 0.5;
percentTxt.text = Math.floor(percentDone) + "%";
}
fish._x = 60 + (percentDone * 5);
hand._xscale = 500 - (percentDone * 5);
if (percentDone >= 100) {
if (plr._x < 700) {
plr._x = plr._x + 5;
} else {
plr._visible = false;
}
loadingbut._visible = true;
fish._visible = false;
hand._visible = false;
sizeTxt._visible = false;
percentTxt._visible = false;
loadingTxt._visible = false;
preloaderBar._visible = false;
}
if (adsin == 0) {
if (percentDone > 20) {
adsin = 1;
ads1.timer = 10;
}
}
if (adsin == 1) {
if (percentDone > 99) {
adsin = 2;
ads2.timer = 10;
}
}
};
__com_mochibot__("783f4ab6", this, 10301, true);
Frame 3
currmap = [1, 0, 0, 0];
map = new Array();
map[0] = [1, 20, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2];
map[1] = [1, 40, 20, 10, 0, 0, 0, 0, 0, 0, 0, 0];
map[2] = [0.6, 12, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0];
map[3] = [0.8, 8, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0];
map[4] = [0.7, 30, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0];
map[5] = [0.7, 15, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0];
map[6] = [0.6, 0, 0, 3, 3, 3, 3, 0, 0, 0, 0, 0];
map[7] = [0.8, 0, 15, 0, 0, 0, 0, 5, 0, 0, 0, 0];
map[8] = [0.5, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0];
map[9] = [0.9, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 0];
map[10] = [0.9, 0, 0, 5, 5, 5, 0, 5, 0, 0, 0, 0];
map[11] = [1, 0, 2, 0, 0, 0, 0, 0, 12, 0, 0, 0];
map[12] = [1, 10, 0, 0, 0, 0, 5, 0, 10, 0, 0, 2];
map[13] = [1.5, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0];
map[14] = [1, 16, 8, 0, 0, 0, 0, 0, 0, 8, 0, 0];
map[15] = [0.8, 0, 2, 1, 0, 0, 0, 1, 0, 1, 0, 0];
map[16] = [1.2, 70, 10, 0, 0, 0, 0, 0, 0, 0, 0, 2];
map[17] = [1.3, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0];
map[18] = [1, 10, 5, 0, 0, 0, 0, 0, 0, 0, 6, 0];
map[19] = [1.6, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8];
map[20] = [1, 0, 0, 6, 6, 6, 0, 6, 6, 6, 6, 0];
map[21] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
map[22] = [1.5, 0, 0, 0, 0, 30, 0, 0, 0, 0, 0, 0];
map[23] = [1.5, 40, 0, 4, 0, 4, 8, 0, 0, 0, 0, 2];
map[24] = [1.4, 0, 40, 0, 0, 0, 0, 0, 0, 5, 0, 1];
map[25] = [1.5, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0];
map[26] = [1.6, 50, 15, 0, 5, 0, 0, 0, 5, 0, 0, 2];
map[27] = [0.5, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 1];
map[28] = [1.5, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0, 0];
map[29] = [1.7, 0, 20, 0, 0, 0, 12, 6, 0, 6, 0, 2];
map[30] = [1.2, 0, 0, 8, 8, 8, 0, 8, 8, 8, 8, 0];
map[31] = [1.5, 160, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3];
map[32] = [1.5, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0, 0];
map[33] = [1.8, 70, 0, 6, 0, 6, 14, 0, 6, 0, 0, 2];
map[34] = [0.5, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 2];
map[35] = [1.5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 30, 0];
map[36] = [1.9, 0, 30, 0, 0, 0, 16, 7, 0, 7, 7, 2];
map[37] = [1.6, 140, 20, 0, 0, 0, 0, 0, 0, 0, 0, 4];
map[38] = [1.5, 0, 0, 0, 0, 0, 30, 0, 0, 0, 0, 5];
map[39] = [2, 90, 30, 5, 5, 5, 18, 5, 5, 5, 5, 3];
map[40] = [1.4, 0, 0, 10, 10, 10, 0, 10, 10, 10, 10, 0];
Frame 4
back.gotoAndStop(1 + random(10));
back.img.back2.gotoAndStop(1 + random(7));
back.img.back3.gotoAndStop(1 + random(7));
back.img.back4.gotoAndStop(1 + random(4));
Instance of Symbol 579 MovieClip in Frame 4
on (release) {
getURL (devurl, "_blank");
}
Frame 5
gachi = new Array();
gachitxt = new Array();
newachi = new Array();
setGachi = function () {
gachi[0] = [20, 40, 60, 80, 100];
gachitxt[0] = ["Use", "Ink Mines"];
gachi[1] = [1000, 2000, 3000, 4000, 5000];
gachitxt[1] = ["Break", "Ice Floe"];
gachi[2] = [500, 1000, 1500, 2000, 2500];
gachitxt[2] = ["Collect", "Fishes"];
gachi[3] = [30, 60, 90, 120, 150];
gachitxt[3] = ["Use", "Bombs"];
gachi[4] = [1, 5, 15, 25, 35];
gachitxt[4] = ["Get", "Upgrades"];
gachi[5] = [30, 60, 90, 120, 150];
gachitxt[5] = ["Get", "Combo"];
gachi[6] = [1, 5, 9, 13, 18];
gachitxt[6] = ["Complete", "Level"];
gachi[7] = [4, 10, 22, 38, 54];
gachitxt[7] = ["Collect", "Stars"];
gachi[8] = [10000, 50000, 100000, 150000, 200000];
gachitxt[8] = ["Earn", "Points"];
gachi[9] = [10, 50, 150, 250];
gachitxt[9] = ["Catch", "Chests"];
gachi[10] = [2, 15, 30, 50];
gachitxt[10] = ["Catch", "Submarines"];
gachi[11] = [1, 5, 10];
gachitxt[11] = ["Clear", "Waves"];
gachi[12] = [56];
gachitxt[12] = ["Get", "Awards"];
};
setGachi();
atxt = new Array();
atxt2 = new Array();
i = 0;
while (i < gachi.length) {
atxt[i] = new Array();
atxt2[i] = new Array();
j = 0;
while (j < gachi[i].length) {
atxt[i][j] = (((gachitxt[i][0] + newline) + gachi[i][j]) + newline) + gachitxt[i][1];
atxt2[i][j] = (((gachitxt[i][0] + " ") + gachi[i][j]) + " ") + gachitxt[i][1];
j++;
}
i++;
}
alllvl = 18;
var my_so = SharedObject.getLocal("icy_gifts_2", "/");
if (_root.my_so.data.maxlvl > 18) {
_root.my_so.data.shmode = true;
}
lvlmedal = new Array();
lvlrec = new Array();
stat = new Array();
i = 0;
while (i < gachi.length) {
stat[i] = 0;
trace((i + "-") + stat[i]);
i++;
}
if (my_so.data.lvlmedal[0] == undefined) {
my_so.data.lvlmedal = new Array();
my_so.data.lvlmedal[0] = 0;
my_so.data.lvlrec = new Array();
i = 1;
while (i <= alllvl) {
my_so.data.lvlmedal[i] = [undefined, 0, 0, 0];
my_so.data.lvlrec[i] = 0;
i++;
}
my_so.data.sound = true;
my_so.data.music = true;
my_so.data.maxlvl = 1;
my_so.data.upgr = [0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2];
my_so.data.money = 0;
my_so.data.pearls = 0;
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++;
}
}
sound = my_so.data.sound;
music = my_so.data.music;
money = my_so.data.money;
pearls = my_so.data.pearls;
maxlvl = my_so.data.maxlvl;
superhard = my_so.data.superhard;
totalscore = 0;
if (music == false) {
ib2.gotoAndStop(2);
}
if (sound == false) {
ib1.gotoAndStop(2);
}
i = 1;
while (i <= alllvl) {
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 < gachi.length) {
j = 0;
while (j < gachi[i].length) {
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] + " ") + gachitxt[i][1]) + "---") + my_so.data["stat" + i]);
i++;
}
trace("SAVE STAT END...");
my_so.data.sound = sound;
my_so.data.music = music;
my_so.data.maxlvl = maxlvl;
my_so.data.money = money;
my_so.data.pearls = pearls;
my_so.flush();
};
_global.addStat = function (type, amount) {
stat[type] = stat[type] + amount;
testGachi(type);
};
_global.setStat = function (type, amount) {
if (amount > stat[type]) {
stat[type] = amount;
}
testGachi(type);
};
_global.testGachi = function (type) {
j = 0;
while (j < gachi[type].length) {
if (gachi[type][j] != -1) {
addgachi = false;
if (stat[type] >= gachi[type][j]) {
addgachi = true;
}
if (addgachi == true) {
gachilogo.desc = atxt2[type][j];
gachilogo.img.gotoAndStop(j + 1);
gachilogo.img.img.gotoAndStop(type + 1);
gachilogo.img.img2.gotoAndStop(type + 1);
gachilogo.gotoAndPlay(2);
gachi[type][j] = -1;
newachi.push(("a" + type) + j);
if ((type == 12) & (j == 0)) {
pearls = pearls + 10;
} else {
pearls++;
}
}
}
j++;
}
};
gachis = 0;
_global.getGachiCount = function (type) {
gachis = 0;
i = 0;
while (i < _root.gachi.length) {
j = 0;
while (j < _root.gachi[i].length) {
if (_root.gachi[i][j] == -1) {
gachis++;
}
j++;
}
i++;
}
setStat(12, gachis);
};
upgr = new Array();
upgr[1] = [0, "EXTRA WAVE", "Increase amount of waves", 3, 6, 9];
upgr[2] = [0, "EXTRA MINE", "Increase amount of ink mines", 2, 4, 6];
upgr[3] = [0, "EXTRA SPEED", "Increase speed of floes", 1, 2, 3];
upgr[4] = [90, "BOMB RADIUS", "Increase explosion radius of the initial bomb", 0, 0, 0];
upgr[5] = [100, "FLOE RADIUS", "Increase explosion radius of floes", 0, 0, 0];
upgr[6] = [80, "MINE RADIUS", "Increase explosion radius of the ink mine", 0, 0, 0];
upgr[7] = [50, "TENTACLE", "Increase fishes collecting radius", 0, 0, 0];
upgr[8] = [70, "EXTRA MONEY", "Increase amount of initial money", 0, 0, 0];
upgr[9] = [40, "SHELLS", "Increase amount of shells", 0, 0, 0];
upgr[10] = [40, "TESLA", "Increase amount of targets of the tesla", 2, 0, 0];
upgr[11] = [40, "SPARK", "Increase amount of sparks", 2, 0, 0];
upgr[12] = [60, "ACID", "Increase radius of acid spot", 5, 0, 0];
upgr[13] = [60, "LASER", "Increase lifetime of laser beam", 5, 0, 0];
upgr[14] = [80, "WAVE", "Increase size of the wave", 8, 0, 0];
upgr[15] = [80, "SPIKES", "Increase lifetime of spikes", 8, 0, 0];
upgr[16] = [0, "NUKE"];
upgr[17] = [0, "EXTRA WAVE"];
upgrok = new Array();
upgrok = [0, 0, 0, 0, 0, 1, 1, 1, 2, 2, 2, 2, 2, 1, 1, 1];
minecost = new Array();
minecost[1] = 40;
minecost[2] = 40;
minecost[3] = 40;
minecost[4] = 60;
minecost[5] = 60;
minecost[6] = 80;
minecost[7] = 80;
minecost[8] = 600;
minecost[9] = 800;
upgr[0] = my_so.data.upgr;
trace(upgr[0]);
gotoAndStop ("functions");
Frame 15
unitAttach = new Array();
unitAttach[1] = 1;
unitAttach[2] = 3;
unitAttach[3] = 7;
levelmap.player._visible = false;
generator = false;
newgen = false;
currskin = 0;
oxlimit = 50;
mouseClick = false;
bankUnit = new Array();
bankGift = new Array();
lvl = 0;
bombs = 0;
maxupgr = 6;
matimer = 0;
createLevel = function () {
if (generator == true) {
if (newgen == true) {
getGenerator();
newgen = false;
}
} else if (lvl < 10) {
hard = false;
currmap[0] = 0.6 + (lvl * 0.1);
currmap[1] = 12 + (lvl * 3);
currmap[2] = 0;
currmap[3] = 0;
if (lvl > 1) {
currmap[2] = (lvl - 1) * 2;
}
if (lvl > 2) {
currmap[3] = lvl - 2;
}
currmap[1] = currmap[1] + ((currmap[2] * unitAttach[2]) + (currmap[3] * unitAttach[3]));
if (superhard != true) {
unitTarget = -10 + (30 * lvl);
} else {
unitTarget = -10 + (50 * lvl);
}
score = 100 + (((100 * lvl) * upgr[0][8]) / 2);
} else {
hard = true;
lvlx = lvl - 9;
currmap[0] = 0.55 + (lvlx * 0.15);
currmap[1] = 0;
currmap[2] = 0;
currmap[3] = 4 + (lvlx * 2);
currmap[1] = currmap[1] + ((currmap[2] * unitAttach[2]) + (currmap[3] * unitAttach[3]));
if (superhard != true) {
unitTarget = 75 + (75 * lvlx);
} else {
unitTarget = 50 + (150 * lvlx);
}
score = 200 + (((200 * lvlx) * upgr[0][8]) / 2);
}
bombs = 0;
resmulti = currmap[0];
clickbonus = 2 + (1 * upgr[0][1]);
bombcount = upgr[0][2];
unitspeed = (1 + (0.5 * upgr[0][3])) * resmulti;
explorad = 60 + (30 * upgr[0][4]);
breakrad = 30 + (15 * upgr[0][5]);
mineradius = 50 + (25 * upgr[0][6]);
magnet = 80 + (80 * upgr[0][7]);
hulkcount = 2 * upgr[0][9];
cryshot = (2 * upgr[0][10]) - 2;
pulsecount = 2 * upgr[0][11];
toxiclife = 75 + (30 * upgr[0][12]);
laserlife = 60 + (30 * upgr[0][13]);
sonicrise = 1 + (0.5 * upgr[0][14]);
spikelife = 50 + (25 * upgr[0][15]);
closeMenu();
clearLevel();
initBomb();
if (lvl == 0) {
currmap[0] = 1;
resmulti = 1;
currmap[1] = 60;
currmap[2] = 5;
currmap[3] = 5;
paused = true;
inter._alpha = 0;
inter._visible = false;
cursor._visible = false;
back.gotoAndStop(1 + random(10));
back.img.back2.gotoAndStop(1 + random(7));
back.img.back3.gotoAndStop(1 + random(7));
back.img.back4.gotoAndStop(1 + random(4));
congrat._visible = false;
} else {
paused = false;
gumtitle.gotoAndStop(1);
inter._alpha = 100;
inter._visible = true;
cursor._visible = true;
back.gotoAndStop(((lvl * 3) % 10) + 1);
back.img.back2.gotoAndStop((lvl % 7) + 1);
back.img.back3.gotoAndStop(((lvl * 2) % 7) + 1);
back.img.back4.gotoAndStop((lvl % 4) + 1);
if ((lvl == alllvl) & (generator == false)) {
congrat._visible = true;
} else {
congrat._visible = false;
}
}
levelmap.player._visible = false;
levelmap.player.img._xscale = (levelmap.player.img._yscale = 100);
cursor.img._xscale = (cursor.img._yscale = explorad / resmulti);
inter.sub.gotoAndStop(1);
clickCount = clickbonus;
unitTargetHave = 0;
giftNeed = 0;
giftHave = 0;
chestNeed = 0;
chestHave = 0;
subNeed = 0;
subHave = 0;
lvlDelay = 40;
objCount = 0;
giftCount = 0;
oxcount = 0;
oxtimer = 15;
maxcombo = 0;
wavecount = 0;
flawless = false;
nobombs = true;
combotimer = 0;
combocount = 0;
spiketimer = 0;
_global.resx = 640 * resmulti;
_global.resy = 480 * resmulti;
levelmap._xscale = (levelmap._yscale = 100 / resmulti);
if (lvl == 1) {
levelmap.player.tutor._visible = true;
} else {
levelmap.player.tutor._visible = false;
}
createWave();
newachi.length = 0;
};
clearLevel = function () {
i = 0;
while (i < bankUnit.length) {
bankUnit[i].removeMovieClip();
i++;
}
i = 0;
while (i < bankGift.length) {
bankGift[i].removeMovieClip();
i++;
}
bankUnit.length = 0;
bankGift.length = 0;
machine.gotoAndStop(1);
};
createWave = function () {
wavecount++;
clickCount--;
if (lvl > 0) {
half.gotoAndPlay(2);
}
bombs = bombs + bombcount;
if (bombbonus == true) {
bombs = bombs + bombcount;
}
levelmap.player.img.mine.gotoAndPlay(1);
bombbonus = false;
flawless = false;
win = 0;
wavePerc = 0;
unitHave = 0;
unitNeed = 0;
inter.wavePerc.text = "0%";
inter.sub.gotoAndStop(1);
j = 3;
while (j > 0) {
while (currmap[j] > 0) {
if (currmap[1] >= unitAttach[j]) {
createUnit(j, 0);
currmap[1] = currmap[1] - unitAttach[j];
if (j > 1) {
currmap[j]--;
}
} else {
break;
}
}
j--;
}
trace("Bubble Bank = " + currmap.toString());
testBomb();
i = 0;
while (i < bankUnit.length) {
if (bankUnit[i].type < 4) {
unitNeed = unitNeed + unitAttach[bankUnit[i].type];
}
i++;
}
flashobj.gotoAndStop(1);
};
createUnit = function (type, kind, targ) {
objCount++;
obj = levelmap.attachMovie("unit", "unit" + objCount, levelmap.getNextHighestDepth());
obj.gotoAndStop(type);
obj.type = type;
bankUnit.push(obj);
switch (kind) {
case 0 :
obj._x = 30 + random(resx - 60);
obj._y = -30 - random(30);
obj.fall = 15 + random(16 * currmap[0]);
obj.spdx = 1;
break;
case 1 :
obj._x = targ._x;
obj._y = targ._y;
obj.fall = 0;
obj.spdx = 3;
break;
case 2 :
nobombs = false;
obj._x = 30 + random(resx - 60);
obj._y = 30 + random(resy - 60);
obj.fall = 0;
obj.spdx = 0;
}
};
createSub = function () {
objCount++;
subNeed++;
obj = levelmap.attachMovie("submar", "submar", levelmap.getNextHighestDepth());
obj.type = type;
bankUnit.push(obj);
};
createChest = function () {
num = Math.ceil(3 * resmulti);
while (num--) {
objCount++;
chestNeed++;
obj = levelmap.attachMovie("chest", "chest", levelmap.getNextHighestDepth());
obj.type = type;
bankUnit.push(obj);
}
};
getGenerator = function () {
currmap = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
g_diff = (lvl * 0.05) + diff;
g_res = Math.min(2, Math.max(0.5, random(diff * 10) / 10));
currmap[0] = g_res;
g_rest1 = 0.5 + g_res;
g_rest2 = Math.round(g_rest1 * g_rest1);
g_pnt = Math.round((40 / g_diff) * g_rest2);
g_clc = choose(0, 0, g_rest2, random(g_rest2), random(g_rest2));
currmap[11] = g_clc;
g_pnt = g_pnt - (g_clc * 5);
g_bub = choose(0, g_pnt, random(g_pnt));
g_bom = choose(0, 0, 3 + random(8));
if (g_bub > 0) {
g_big = choose(0, g_bub, random(g_bub));
g_pnt = g_pnt - g_big;
currmap[2] = Math.round(g_big / 3);
g_bub = g_bub - g_big;
g_pnt = g_pnt - g_bub;
currmap[1] = g_bub;
if (g_bub == g_pnt) {
currmap[11] = currmap[11] + 2;
}
}
while (g_pnt > 0) {
if (g_bom == 0) {
i = 1 + random(11);
} else {
i = g_bom;
}
currmap[i]++;
g_pnt = g_pnt - 3;
}
trace((("tracedddd = " + generator) + " - ") + newgen);
trace(currmap.toString());
};
addDelay = function (type) {
lvlDelay = 40;
};
castBreak = function (xx, yy, type) {
if (type == 40) {
createPart(xx, yy, type, "explo2", levelmap, 1);
} else {
createPart(xx, yy, type, "explo", levelmap, 1);
}
if (oxcount < oxlimit) {
createPart(xx, yy, type, "ox", levelmap, 2);
}
i = 0;
while (i < bankUnit.length) {
zz = bankUnit[i];
if ((point_distance(xx, yy, zz._x, zz._y) - zz.rad) < type) {
if (zz.kill == undefined) {
killUnit(zz);
direct = point_direction(xx, yy, zz._x, zz._y);
zz.x = lengthdir_x(8, direct);
zz.y = lengthdir_y(8, -direct);
}
}
i++;
}
};
killUnit = function (ob) {
if (ob.kill == undefined) {
playSoundLim("dam1", "dam2", "dam3");
ob.kill = ob.killtime;
ob.cacheAsBitmap = false;
ob.img.gotoAndPlay(2);
}
};
dieGift = function (ob) {
j = 0;
while (j < bankGift.length) {
if (bankGift[j] == ob) {
bankGift.splice(j, 1);
break;
}
j++;
}
ob.removeMovieClip();
};
dieItem = function (ob) {
j = 0;
while (j < bankUnit.length) {
if (bankUnit[j] == ob) {
bankUnit.splice(j, 1);
break;
}
j++;
}
ob.removeMovieClip();
};
dieUnit = function (ob) {
addDelay();
if (ob.type < 4) {
addStat(1, 1);
unitHave++;
unitTargetHave++;
wavePerc = Math.floor((unitHave / unitNeed) * 100);
inter.wavePerc.text = wavePerc + "%";
} else {
addStat(3, 1);
}
combotimer = 20;
combocount++;
if (combocount > 1) {
combotxt = combocount;
inter.combo.txt._xscale = (inter.combo.txt._yscale = 120);
}
inter.unit._xscale = (inter.unit._yscale = 130);
if (flawless == false) {
if (wavePerc >= 100) {
addStat(11, 1);
flawless = true;
half.gotoAndPlay(2);
clickCount++;
prize.gotoAndPlay(2);
prize.img.gotoAndStop(6);
}
}
j = 0;
while (j < bankUnit.length) {
if (bankUnit[j] == ob) {
bankUnit.splice(j, 1);
break;
}
j++;
}
if (ob.type > 3) {
quake = 2;
}
switch (ob.type) {
case 1 :
currmap[1]++;
createGift(ob._x, ob._y, ob.box._currentframe);
castBreak(ob._x, ob._y, breakrad);
playSoundLim("die1", "die2", "die3");
if (oxcount < oxlimit) {
createPart(ob._x, ob._y, 100, "hulk1", levelmap, 3);
}
createScore(ob._x, ob._y, 5);
break;
case 2 :
currmap[1]++;
currmap[2]++;
castBreak(ob._x, ob._y, breakrad + 10);
createUnit(1, 1, ob);
createUnit(1, 1, ob);
playSoundLim("die1", "die2", "die3");
if (oxcount < oxlimit) {
createPart(ob._x, ob._y, 100, "hulk1", levelmap, 5);
}
createScore(ob._x, ob._y, 10);
break;
case 3 :
currmap[1]++;
currmap[3]++;
castBreak(ob._x, ob._y, breakrad + 20);
createUnit(2, 1, ob);
createUnit(2, 1, ob);
playSoundLim("die1", "die2", "die3");
if (oxcount < oxlimit) {
createPart(ob._x, ob._y, 100, "hulk1", levelmap, 7);
}
createScore(ob._x, ob._y, 15);
break;
case 4 :
castBreak(ob._x, ob._y, breakrad);
createPart(ob._x, ob._y, 100, "bullet", levelmap, hulkcount);
playSound("bullet");
break;
case 5 :
createPart(ob._x, ob._y, 100, "light", levelmap, cryshot);
createPart(ob._x, ob._y, 100, "light2", levelmap, 1);
playSound("tesla");
break;
case 6 :
castBreak(ob._x, ob._y, breakrad);
createPart(ob._x, ob._y, 100, "pulse", levelmap, pulsecount);
playSound("pulse");
break;
case 7 :
createPart(ob._x, ob._y, 100, "toxic", levelmap, 1);
playSound("toxic");
break;
case 8 :
createPart(ob._x, 0, 100, "laser", levelmap, 1);
playSound("laser");
break;
case 9 :
castBreak(ob._x, ob._y, breakrad);
createPart(ob._x, ob._y, 100, "sonic", levelmap, 1, 1);
createPart(ob._x, ob._y, 100, "sonic", levelmap, 1, -1);
playSound("wave");
break;
case 10 :
castBreak(ob._x, ob._y, breakrad);
if (spiketimer == 0) {
spikes.gotoAndPlay("on");
}
spiketimer = spiketimer + spikelife;
playSound("portal");
break;
case 11 :
j = 0;
while (j < bankUnit.length) {
killUnit(bankUnit[j]);
if (bankUnit[j].type < 4) {
bankUnit[j].kill = 1;
} else {
bankUnit[j].kill = 10 + random(10);
}
j++;
}
flashobj.gotoAndPlay(2);
playSound("explo");
quake = 10;
break;
case 12 :
castBreak(ob._x, ob._y, breakrad);
clickCount++;
playSound("pickup");
prize.gotoAndPlay(2);
prize.img.gotoAndStop(6);
}
ob.removeMovieClip();
};
createPart = function (xx, yy, scale, type, depth, count, info) {
j = 1;
while (j <= count) {
obj = depth.attachMovie(type, "part", depth.getNextHighestDepth() + j);
obj._x = xx;
obj._y = yy;
obj._xscale = (obj._yscale = scale);
obj.info = info;
if (type == "bullet") {
direct = (360 / count) * j;
obj.x = lengthdir_x(12, direct + 90);
obj.y = lengthdir_y(12, direct + 90);
}
j++;
}
};
createGift = function (xx, yy, type) {
giftCount++;
obj = levelmap.attachMovie("gift" + currskin, "gift" + giftCount, levelmap.getNextHighestDepth());
obj._x = xx;
obj._y = yy;
obj.box.gotoAndStop(type);
bankGift.push(obj);
};
createScore = function (xx, yy, type) {
score = score + type;
obj = levelmap.attachMovie("scoreobj", ("score" + xx) + yy, levelmap.getNextHighestDepth());
obj._x = xx;
obj._y = yy;
obj.type = "$" + type;
};
mochipanel = false;
closeMenu = function () {
opt.tar = "exit";
opt.gotoAndStop("exit");
gumtitle.gotoAndStop(1);
mochipanel = false;
};
openMenu = function (info) {
opt.tar = info;
opt.close = true;
opt.ads1.gotoAndStop(1);
opt.ads2.gotoAndStop(2);
if (info == "exit") {
gumtitle.gotoAndStop(1);
} else if (info == "achi") {
gumtitle.gotoAndPlay("off");
} else if (gumtitle._currentframe == 1) {
gumtitle.gotoAndPlay(2);
}
};
sound_delay = 0;
_global.playSoundLim = function () {
if (sound_delay == 0) {
if (sound == true) {
_root["snd_" + arguments[random(arguments.length)]].start();
sound_delay = 2;
}
}
};
_global.playSound = function () {
if (sound == true) {
_root["snd_" + arguments[random(arguments.length)]].start();
}
};
testUpgr = function () {
if (stat[4] < 44) {
return(true);
}
};
initUpgr = function () {
_root.money = _root.money + 0;
if (vipupgr == true) {
maxupgr = 5;
} else {
maxupgr = 4;
}
i = 1;
while (i < 16) {
z = opt["u" + i];
z.title = upgr[i][1];
z.desc._visible = false;
z.lvl = upgr[0][i];
if (upgr[i][z.lvl + 2] > 0) {
z.price.gotoAndStop(2);
z.cost = Math.round(upgr[i][z.lvl + 2]);
} else {
z.price.gotoAndStop(1);
z.cost = Math.round(upgr[i][0] * upgr[0][i]);
}
if ((i > 8) & (z.lvl == 1)) {
z.zamok._visible = true;
z.desc.txt.text = ("UNLOCK " + upgr[i][1]) + " BOMB";
} else {
z.zamok._visible = false;
z.desc.txt.text = upgr[i][2];
}
if (upgr[0][i] == maxupgr) {
z.gotoAndStop(3);
}
if (z._currentframe < 3) {
z.id = i;
if (z.price._currentframe == 1) {
if (z.cost > _root.money) {
z.gotoAndStop(2);
} else {
z.gotoAndStop(1);
}
} else if (z.cost > _root.pearls) {
z.gotoAndStop(2);
} else {
z.gotoAndStop(1);
}
}
if (maxupgr == 4) {
z.star.gotoAndStop(z.lvl);
} else {
z.star.gotoAndStop(10 + z.lvl);
}
z.icon.gotoAndStop(i);
z.icon.img.gotoAndStop(1);
i++;
}
};
doUpgr = function (z) {
playSound("shop");
z.eff.gotoAndPlay(2);
if (z.price._currentframe == 1) {
money = Math.round(money - z.cost);
} else {
pearls = Math.round(pearls - z.cost);
}
upgr[0][z.id]++;
setStat(4, getUpgrDone());
kongsend("stat4", stat[4]);
my_so.data.upgr = upgr[0];
saveStat();
initUpgr();
};
getUpgrDone = function () {
z = -1;
i = 1;
while (i < 16) {
z = z + (upgr[0][i] - 1);
i++;
}
return(z);
};
initAchi = function () {
addpearl = 0;
i = 0;
while (i < _root.gachi.length) {
j = 0;
while (j < _root.gachi[i].length) {
z = opt[("a" + i) + j];
trace(z);
z.timer = 0;
z.desc.text = _root.atxt[i][j];
z.desc._visible = false;
if (_root.gachi[i][j] == -1) {
z.gotoAndStop(1);
if ((i == 12) & (j == 0)) {
z.img.gotoAndStop(6);
} else {
z.img.gotoAndStop(((i + j) % 5) + 1);
}
z.img.img.gotoAndStop("on");
z.img.perctxt._visible = false;
} else {
z.gotoAndStop(2);
if ((i == 12) & (j == 0)) {
z.img.gotoAndStop(6);
} else {
z.img.gotoAndStop(((i + j) % 5) + 1);
}
z.img.img.gotoAndStop("off");
z.img.perctxt._visible = true;
z.img.perctxt.text = Math.floor((_root.stat[i] / _root.gachi[i][j]) * 100) + "%";
}
j++;
}
i++;
}
trace("newachi=" + newachi.toString());
while (newachi.length) {
z = opt[newachi[0]];
z.gotoAndStop(1);
z.img.img.gotoAndStop("off");
z.img.pearltxt._visible = false;
z.timer = 10 + (newachi.length * 15);
newachi.splice(0, 1);
}
};
_global.lengthdir_x = function (len, dir) {
return(Math.cos((dir * Math.PI) / 180) * len);
};
_global.lengthdir_y = function (len, dir) {
return((-Math.sin((dir * Math.PI) / 180)) * len);
};
_global.point_distance = function (x1, y1, x2, y2) {
return(Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2)));
};
_global.point_direction = function (x1, y1, x2, y2) {
return((Math.atan2(y2 - y1, x2 - x1) / Math.PI) * 180);
};
_global.choose = function () {
return(arguments[random(arguments.length)]);
};
var snd_achi = new Sound(_root);
snd_achi.attachSound("achi");
var snd_achi2 = new Sound(_root);
snd_achi2.attachSound("achi2");
var snd_bullet = new Sound(_root);
snd_bullet.attachSound("sbullet");
var snd_click = new Sound(_root);
snd_click.attachSound("click");
var snd_coin1 = new Sound(_root);
snd_coin1.attachSound("coin1");
var snd_coin2 = new Sound(_root);
snd_coin2.attachSound("coin2");
var snd_coin3 = new Sound(_root);
snd_coin3.attachSound("coin3");
var snd_coin4 = new Sound(_root);
snd_coin4.attachSound("coin4");
var snd_coin1a = new Sound(_root);
snd_coin1a.attachSound("coin1a");
var snd_coin2a = new Sound(_root);
snd_coin2a.attachSound("coin2a");
var snd_coin3a = new Sound(_root);
snd_coin3a.attachSound("coin3a");
var snd_coin4a = new Sound(_root);
snd_coin4a.attachSound("coin4a");
var snd_dam1 = new Sound(_root);
snd_dam1.attachSound("dam1");
var snd_dam2 = new Sound(_root);
snd_dam2.attachSound("dam2");
var snd_dam3 = new Sound(_root);
snd_dam3.attachSound("dam3");
var snd_die1 = new Sound(_root);
snd_die1.attachSound("die1");
var snd_die2 = new Sound(_root);
snd_die2.attachSound("die2");
var snd_die3 = new Sound(_root);
snd_die3.attachSound("die3");
var snd_holy = new Sound(_root);
snd_holy.attachSound("holy");
var snd_explo = new Sound(_root);
snd_explo.attachSound("sexplo");
var snd_menuon = new Sound(_root);
snd_menuon.attachSound("menuon");
var snd_mouseon = new Sound(_root);
snd_mouseon.attachSound("mouseon");
var snd_pickup = new Sound(_root);
snd_pickup.attachSound("pickup");
var snd_shop = new Sound(_root);
snd_shop.attachSound("shop");
var snd_star = new Sound(_root);
snd_star.attachSound("sstar");
var snd_tesla = new Sound(_root);
snd_tesla.attachSound("tesla");
var snd_toxic = new Sound(_root);
snd_toxic.attachSound("stoxic");
var snd_wave = new Sound(_root);
snd_wave.attachSound("wave");
var snd_music = new Sound(_root);
snd_music.attachSound("smusic");
var snd_music2 = new Sound(_root);
snd_music2.attachSound("smusic2");
var snd_laser = new Sound(_root);
snd_laser.attachSound("slaser");
var snd_portalout = new Sound(_root);
snd_portalout.attachSound("portalout");
var snd_portal = new Sound(_root);
snd_portal.attachSound("sportal");
var snd_pulsehit = new Sound(_root);
snd_pulsehit.attachSound("pulsehit");
var snd_pulse = new Sound(_root);
snd_pulse.attachSound("spulse");
var snd_def = new Sound(_root);
snd_def.attachSound("vdef");
var snd_win = new Sound(_root);
snd_win.attachSound("vwin");
var snd_sparkle1 = new Sound(_root);
snd_sparkle1.attachSound("sparkle1");
var snd_subrandom = new Sound(_root);
snd_subrandom.attachSound("subrandom");
var snd_subselect = new Sound(_root);
snd_subselect.attachSound("subselect");
var snd_chest = new Sound(_root);
snd_chest.attachSound("vchest");
var snd_mine = new Sound(_root);
snd_mine.attachSound("vmine");
var snd_sparkle1 = new Sound(_root);
snd_sparkle1.attachSound("sparkle1");
var snd_subfailed = new Sound(_root);
snd_subfailed.attachSound("subfailed");
snd_music.onSoundComplete = function () {
if (vipmusic == true) {
snd_music2.start(0, 1);
} else {
snd_music.start(0, 1);
}
};
snd_music2.onSoundComplete = function () {
snd_music.start(0, 1);
};
initBomb = function () {
i = 1;
while (i < 10) {
z = hint["b" + i];
z.cost = minecost[i] * upgr[0][i + 8];
if (upgr[0][i + 8] > 1) {
z.gotoAndStop(1);
} else {
z.gotoAndStop("lock");
}
i++;
}
if (superhard == true) {
hint.b8.gotoAndStop("lock");
}
};
testBomb = function (num) {
i = 1;
while (i < 10) {
z = hint["b" + i];
if (z._currentframe < 21) {
if (score >= z.cost) {
if (i == num) {
z.gotoAndPlay("click");
} else {
z.gotoAndStop(1);
}
} else {
z.gotoAndStop("nomoney");
}
z.costtxt.text = "$" + z.cost;
}
i++;
}
if ((lvl == 1) & (hint.b1.cost == (minecost[1] * upgr[0][9]))) {
hint.tutor._visible = true;
} else {
hint.tutor._visible = false;
}
};
spikeTest = function (obj) {
if (_root.spiketimer > 0) {
killUnit(obj);
}
};
launchMachine = function () {
trace("MACHINE");
playSound("subrandom");
machine.gotoAndPlay("on");
machine.img.s1.gotoAndPlay(6);
machine.img.s2.gotoAndPlay(9);
machine.img.s3.gotoAndPlay(12);
matarg = [undefined, 0, 0, 0];
matarg[1] = 1 + random(5);
matarg[2] = 1 + random(5);
matarg[3] = 1 + random(5);
matimer = 30;
madelay = 0;
maslots = 3;
};
prizeEffect = function (num) {
i = 1;
while (i <= 3) {
if (machine.img["s" + i]._currentframe == num) {
machine.img["s" + i].eff.gotoAndPlay(2);
}
i++;
}
};
prizeFloe = function (num) {
trace("FLOE " + num);
prize.gotoAndPlay(2);
prize.img.gotoAndStop(1);
prize.img.txt.text = "+" + num;
madelay = 30;
while (num--) {
createUnit(1, 0);
}
};
prizeBomb = function (num) {
trace("BOMBS " + num);
prize.gotoAndPlay(2);
prize.img.gotoAndStop(2);
prize.img.txt.text = "+" + num;
madelay = 30;
while (num--) {
createUnit(4 + random(4), 0);
}
};
prizeGift = function (num) {
trace("FISHES " + num);
prize.gotoAndPlay(2);
prize.img.gotoAndStop(3);
prize.img.txt.text = "+" + num;
madelay = 30;
giftNeed = giftNeed + num;
giftHave = giftHave + num;
};
prizeMoney = function (num) {
trace("DIAMONDS " + num);
prize.gotoAndPlay(2);
prize.img.gotoAndStop(4);
prize.img.txt.text = ("+" + num) + "$";
madelay = 30;
score = score + num;
};
testMachine = function () {
madelay = 10;
maresult = [undefined, 0, 0, 0, 0, 0];
maresult[matarg[1]]++;
maresult[matarg[2]]++;
maresult[matarg[3]]++;
i = 10;
if ((maresult[1] == 2) and (maresult[5] != 1)) {
prizeFloe(5);
prizeEffect(1);
return(undefined);
}
if ((maresult[1] == 2) and (maresult[5] == 1)) {
prizeFloe(10);
prizeEffect(1);
prizeEffect(5);
return(undefined);
}
if (maresult[1] == 3) {
prizeFloe(25);
prizeEffect(1);
return(undefined);
}
if ((maresult[2] == 2) and (maresult[5] != 1)) {
prizeBomb(3);
prizeEffect(2);
return(undefined);
}
if ((maresult[2] == 2) and (maresult[5] == 1)) {
prizeBomb(6);
prizeEffect(2);
prizeEffect(5);
return(undefined);
}
if (maresult[2] == 3) {
prizeBomb(12);
prizeEffect(2);
return(undefined);
}
if ((maresult[3] == 2) and (maresult[5] != 1)) {
prizeGift(10);
prizeEffect(3);
return(undefined);
}
if ((maresult[3] == 2) and (maresult[5] == 1)) {
prizeGift(20);
prizeEffect(3);
prizeEffect(5);
return(undefined);
}
if (maresult[3] == 3) {
prizeGift(50);
prizeEffect(3);
return(undefined);
}
if ((maresult[4] == 2) and (maresult[5] != 1)) {
prizeMoney(500);
prizeEffect(4);
return(undefined);
}
if ((maresult[4] == 2) and (maresult[5] == 1)) {
prizeMoney(1000);
prizeEffect(4);
prizeEffect(5);
return(undefined);
}
if (maresult[4] == 3) {
prizeMoney(2500);
prizeEffect(4);
return(undefined);
}
if (maresult[5] == 1) {
bombbonus = true;
madelay = 30;
prizeEffect(5);
prize.gotoAndPlay(2);
prize.img.gotoAndStop(5);
prize.img.txt.text = "+" + bombcount;
return(undefined);
}
if (maresult[5] == 2) {
clickCount++;
madelay = 30;
prizeEffect(5);
prize.gotoAndPlay(2);
prize.img.gotoAndStop(6);
return(undefined);
}
if (maresult[5] == 3) {
bombbonus = true;
clickCount++;
prizeFloe(25);
prizeGift(50);
prizeBomb(12);
prizeMoney(2500);
prizeEffect(5);
prize.gotoAndPlay(2);
prize.img.gotoAndStop(7);
return(undefined);
}
playSound("subfailed");
};
gotoAndPlay ("controller");
Frame 25
trans.gotoAndPlay(6);
onEnterFrame = function () {
if (quake > 0) {
if ((quake % 1) == 0) {
levelmap._y = quake;
} else {
levelmap._y = -quake;
}
quake = quake - 0.5;
}
if (matimer > 0) {
addDelay();
matimer--;
if ((matimer % 10) == 0) {
machine.img["s" + maslots].gotoAndStop(matarg[maslots]);
maslots--;
playSound("subselect");
if (matimer == 0) {
testMachine();
} else {
playSound("subrandom");
}
}
}
if (madelay > 0) {
lvlDelay = 10;
madelay--;
if (madelay == 1) {
win = 0;
machine.gotoAndPlay("off");
}
}
if (spiketimer > 0) {
if (bankUnit.length > 0) {
addDelay();
spiketimer--;
} else {
spiketimer = 0;
}
if (spiketimer == 0) {
spikes.gotoAndPlay("off");
}
}
if (oxtimer > 0) {
oxtimer--;
} else {
createPart(10 + random(620), 485, 100, "ox", _root, 1);
oxtimer = 15 + random(15);
}
if (sound_delay > 0) {
sound_delay--;
}
if (paused == false) {
if (combotimer > 0) {
combotimer--;
} else {
setStat(5, combocount);
if (maxcombo < combocount) {
maxcombo = combocount;
}
combocount = 0;
}
if (lvlDelay > 0) {
lvlDelay--;
if (cursor._visible == false) {
if (machine._currentframe == 1) {
mousex = _xmouse * resmulti;
mousey = _ymouse * resmulti;
i = 0;
while (i < bankGift.length) {
zz = bankGift[i];
if (zz.kill == false) {
if (zz.delay == 0) {
if (point_distance(levelmap.player._x, levelmap.player._y, zz._x, zz._y) < magnet) {
zz.kill = true;
zz.gotoAndStop(2);
}
}
}
i++;
}
dist = point_distance(levelmap.player._x, levelmap.player._y, mousex, mousey);
dir = point_direction(mousex, mousey, levelmap.player._x, levelmap.player._y);
if (dist > 0) {
levelmap.player._x = levelmap.player._x - lengthdir_x(dist / 5, dir);
levelmap.player._y = levelmap.player._y + lengthdir_y(dist / 5, dir);
}
}
}
} else if (cursor._visible == false) {
if (unitTargetHave < unitTarget) {
if (clickCount == 0) {
openMenu("def");
paused = true;
cursor._visible = false;
} else if (win > 0) {
addDelay();
launchMachine();
} else {
createWave();
cursor._visible = true;
playSound("achi2");
}
} else {
openMenu("win");
paused = true;
cursor._visible = false;
}
}
}
};
onMouseUp = function () {
if (paused == false) {
if (cursor._visible == true) {
if (mouseClick == false) {
addDelay();
cursor._visible = false;
playSound("explo");
createSub();
createChest();
castBreak(_xmouse * resmulti, _ymouse * resmulti, explorad);
createPart(_xmouse * resmulti, _ymouse * resmulti, explorad, "explo1", levelmap, 1);
levelmap.player._visible = true;
levelmap.player._x = resx / 2;
levelmap.player._y = resy + 150;
}
} else if (machine._currentframe == 1) {
if (bombs > 0) {
levelmap.player.tutor._visible = false;
addDelay();
addStat(0, 1);
bombs--;
createPart(levelmap.player._x, levelmap.player._y, 100, "mine", levelmap, 1);
playSound("mine");
if (bombs == 0) {
levelmap.player.img.mine.gotoAndStop("zero");
}
} else {
levelmap.player.img.mine.gotoAndPlay("zero");
playSound("subfailed");
}
}
}
mouseClick = false;
};
gotoAndStop ("game");
Frame 35
stop();
playSound("win");
openMenu("main");
if (music == true) {
snd_music.start(0, 1);
}
ib1.ico.gotoAndStop(1);
ib2.ico.gotoAndStop(2);
ib1.desc.text = "SOUND";
ib2.desc.text = "MUSIC";
ib1.desc._visible = false;
ib2.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;
};
ib1.but.onPress = function () {
playSound("click");
_root.mouseClick = true;
if (_root.sound == true) {
_root.sound = false;
ib1.gotoAndStop(2);
} else {
_root.sound = true;
ib1.gotoAndStop(1);
}
};
ib2.but.onPress = function () {
playSound("click");
_root.mouseClick = true;
if (_root.music == true) {
_root.music = false;
snd_music.stop();
ib2.gotoAndStop(2);
} else {
_root.music = true;
snd_music.start(0, 999);
ib2.gotoAndStop(1);
}
};
Symbol 50 MovieClip [toxic] Frame 1
timer = 80;
rad = _root.toxiclife;
_yscale = 20;
_xscale = 20;
if (_root.resmulti > 1.2) {
img.stop();
}
onEnterFrame = function () {
if (_xscale < rad) {
_yscale = (_yscale + 10);
_xscale = (_yscale + 10);
}
if (_root.paused == false) {
if (timer == 0) {
this.removeMovieClip();
} else {
timer--;
if (timer < 10) {
_alpha = (timer * 10);
} else if (_root.bankUnit.length > 0) {
_root.addDelay();
} else {
timer = 9;
}
if ((timer % 3) == 0) {
i = 0;
while (i < _root.bankUnit.length) {
zz = _root.bankUnit[i];
if ((point_distance(_x, _y, zz._x, zz._y) - zz.rad) < rad) {
if (zz.kill == undefined) {
_root.killUnit(zz);
}
}
i++;
}
}
}
} else {
this.removeMovieClip();
}
};
Symbol 52 MovieClip [star] Frame 1
dir = random(360);
timer = 15;
_rotation = random(360);
onEnterFrame = function () {
_rotation = (_rotation + 10);
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
}
} else {
this.removeMovieClip();
}
};
Symbol 55 MovieClip [sonic] Frame 1
_yscale = ((rad = 15));
_xscale = ((rad = 15));
step = 4;
onEnterFrame = function () {
if (_root.paused == false) {
_x = (_x + (info * 15));
_yscale = ((rad = rad + _root.sonicrise));
_xscale = (rad * info);
if (step == 0) {
step = 3;
if (_root.unitHave != _root.unitNeed) {
_root.addDelay();
}
if ((_x > (resx + rad)) or (_x < (-rad))) {
this.removeMovieClip();
}
i = 0;
while (i < _root.bankUnit.length) {
zz = _root.bankUnit[i];
if ((point_distance(_x, _y, zz._x, zz._y) - zz.rad) < rad) {
if (zz.kill == undefined) {
_root.killUnit(zz);
}
}
i++;
}
} else {
step--;
}
} else {
this.removeMovieClip();
}
};
Symbol 61 MovieClip [pulse] Frame 1
x = 60 + random(resx - 120);
y = 60 + random(resy - 120);
dir = point_direction(_x, _y, x, y);
speed = (point_distance(_x, _y, x, y) / 20) + random(10);
img._rotation = dir;
onEnterFrame = function () {
if (_root.paused == false) {
if (_root.unitHave != _root.unitNeed) {
_root.addDelay();
}
dist = point_distance(_x, _y, x, y);
if (dist > speed) {
_x = (_x + lengthdir_x(speed, dir));
_y = (_y - lengthdir_y(speed, dir));
} else {
playSound("pulsehit");
_root.castBreak(x, y, 60);
this.removeMovieClip();
}
} else {
this.removeMovieClip();
}
};
Symbol 69 MovieClip [portal] Frame 1
count = _root.portalcount;
_yscale = 20;
_xscale = 20;
timer = 4;
onEnterFrame = function () {
if (_xscale < 100) {
_yscale = (_yscale + 10);
_xscale = (_yscale + 10);
}
if (_root.paused == false) {
if (count == 0) {
if (timer == 0) {
this.removeMovieClip();
} else {
timer--;
_alpha = (timer * 10);
}
} else if (timer == 0) {
playSound("portalout");
timer = 10;
count--;
_root.createUnit(1, 1, this);
} else {
timer--;
}
} else {
this.removeMovieClip();
}
};
Symbol 72 MovieClip [ox] Frame 1
_root.oxcount++;
vspeed = (2 + random(4)) / 3;
_yscale = (80 + random(40));
_xscale = (80 + random(40));
timer = 30 + random(20);
gotoAndPlay(2 + random(36));
_x = (_x + (5 - random(10)));
_y = (_y + (5 - random(10)));
onEnterFrame = function () {
_y = (_y - vspeed);
if (_y < -5) {
_root.oxcount--;
this.removeMovieClip();
}
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
}
} else {
_root.oxcount--;
this.removeMovieClip();
}
};
Symbol 72 MovieClip [ox] Frame 40
gotoAndPlay (2);
Symbol 79 MovieClip [light2] Frame 10
this.removeMovieClip();
Symbol 85 MovieClip [light] Frame 1
zz = _root.bankUnit[random(_root.bankUnit.length)];
dist = point_distance(_x, _y, zz._x, zz._y);
if (zz.kill == undefined) {
_root.killUnit(zz);
}
onEnterFrame = function () {
_xscale = dist;
_rotation = point_direction(_x, _y, zz._x, zz._y);
};
Symbol 85 MovieClip [light] Frame 11
this.removeMovieClip();
Symbol 90 MovieClip [laser] Frame 1
timer = _root.laserlife;
_yscale = (100 * _root.resmulti);
trace(_yscale);
onEnterFrame = function () {
if (_root.paused == false) {
if (timer == 0) {
this.removeMovieClip();
} else {
timer--;
if (timer < 10) {
_alpha = (timer * 10);
} else if (_root.bankUnit.length > 0) {
_root.addDelay();
} else {
timer = 9;
}
if ((timer % 3) == 0) {
i = 0;
while (i < _root.bankUnit.length) {
zz = _root.bankUnit[i];
if ((_x < (zz._x + zz.rad)) & (_x > (zz._x - zz.rad))) {
if (zz.kill == undefined) {
_root.killUnit(zz);
}
}
i++;
}
}
}
} else {
this.removeMovieClip();
}
};
Symbol 101 MovieClip [hulk1] Frame 1
_root.oxcount++;
speed = 10 + random(4);
timer = 10 + random(15);
dir = random(360);
gotoAndStop(2 + random(5));
onEnterFrame = function () {
_y = (_y - 1);
if (speed > 2) {
_x = (_x + lengthdir_x(speed, dir));
_y = (_y + lengthdir_y(speed, dir));
speed = speed - 1;
}
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
}
} else {
_root.oxcount--;
this.removeMovieClip();
}
};
Symbol 106 MovieClip [bone] Frame 1
speed = 12 + random(4);
timer = 10 + random(15);
dir = random(360);
gotoAndStop(2 + random(2));
if (random(10) < 5) {
_xscale = -100;
}
if (random(10) < 5) {
_yscale = -100;
}
onEnterFrame = function () {
_y = (_y + 2);
if (speed > 2) {
_x = (_x + lengthdir_x(speed / 2, dir));
_y = (_y + lengthdir_y(speed / 2, dir));
speed = speed - 1;
}
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
}
} else {
this.removeMovieClip();
}
};
Symbol 113 MovieClip [explo2] Frame 13
this.removeMovieClip();
Symbol 134 MovieClip [explo1] Frame 19
this.removeMovieClip();
Symbol 141 MovieClip [explo] Frame 13
this.removeMovieClip();
Symbol 144 MovieClip [bullet] Frame 1
rad = 15;
step = 4;
onEnterFrame = function () {
if (_root.paused == false) {
_x = (_x + x);
_y = (_y + y);
if (step == 0) {
step = 4;
if (_root.unitHave != _root.unitNeed) {
_root.addDelay();
}
if ((((_x > resx) or (_y > resy)) or (_x < 0)) or (_y < 0)) {
this.removeMovieClip();
}
i = 0;
while (i < _root.bankUnit.length) {
zz = _root.bankUnit[i];
if ((point_distance(_x, _y, zz._x, zz._y) - zz.rad) < rad) {
if (zz.kill == undefined) {
_root.killUnit(zz);
this.removeMovieClip();
}
}
i++;
}
} else {
step--;
}
} else {
this.removeMovieClip();
}
};
Symbol 167 MovieClip [boom] Frame 12
this.removeMovieClip();
Symbol 191 MovieClip Frame 1
if (_parent._parent._name == "hint") {
gotoAndStop(_parent.id);
} else if (_root.opt._currentframe == 12) {
gotoAndStop(_parent._parent._currentframe - 8);
} else {
gotoAndStop(_parent._parent._currentframe - 3);
}
Symbol 193 MovieClip [unit] Frame 1
stop();
cacheAsBitmap = true;
rad = 20;
bordx = resx - rad;
bordy = resy - rad;
img.gotoAndStop(1);
dir = random(360);
x = lengthdir_x(_root.unitspeed, dir) * choose(1, -1);
y = lengthdir_y(_root.unitspeed, -dir) * choose(1, -1);
killtime = 20 + random(20);
kill = undefined;
onEnterFrame = function () {
if (spdx == 1) {
_x = (_x + x);
_y = (_y + y);
} else {
_x = (_x + (x * spdx));
_y = (_y + (y * spdx));
if (spdx > 1) {
spdx = spdx - 0.1;
} else {
spdx = spdx + 0.1;
}
}
if (_x > bordx) {
x = x * -1;
_x = bordx;
_root.spikeTest(this);
}
if (_x < rad) {
x = x * -1;
_x = rad;
_root.spikeTest(this);
}
if (_y > bordy) {
y = y * -1;
_y = bordy;
_root.spikeTest(this);
}
if (fall > 0) {
_y = (_y + fall);
fall--;
if ((fall % 4) == 0) {
if (_root.oxcount < _root.oxlimit) {
_root.createPart(_x, _y, 100, "ox", _root.levelmap, 1);
}
}
} else if (_y < rad) {
y = y * -1;
_y = rad;
_root.spikeTest(this);
}
if (kill > 0) {
x = x * 0.9;
y = y * 0.9;
if (kill == 1) {
_root.addDelay();
_root.dieUnit(this);
} else {
kill--;
}
}
};
Symbol 193 MovieClip [unit] Frame 2
rad = 25;
Symbol 193 MovieClip [unit] Frame 3
rad = 30;
Symbol 193 MovieClip [unit] Frame 11
rad = 25;
Symbol 193 MovieClip [unit] Frame 12
rad = 25;
Symbol 227 MovieClip [submar] Frame 1
stop();
rad = 35;
bordx1 = rad;
bordx1a = -rad;
bordx2 = resx - rad;
bordx2a = resx + rad;
_y = (100 + random(resy - 200));
if (random(10) < 5) {
speed = 4 * _root.resmulti;
_x = (bordx1a + speed);
} else {
speed = -4 * _root.resmulti;
_x = (bordx2a - speed);
_xscale = -100;
}
killtime = 1;
kill = undefined;
timer = 4;
onEnterFrame = function () {
if (_root.bombs > 0) {
_root.addDelay();
}
_x = (_x + speed);
if (timer == 0) {
timer = 4;
if (_root.oxcount < _root.oxlimit) {
_root.createPart(_x, _y, 100, "ox", _root.levelmap, 1);
}
} else {
timer--;
}
if (_x < bordx1) {
_root.spikeTest(this);
if (_x < bordx1a) {
_root.dieItem(this);
}
}
if (_x > bordx2) {
_root.spikeTest(this);
if (_x > bordx2a) {
_root.dieItem(this);
}
}
if (kill > 0) {
addStat(10, 1);
_root.subHave++;
_root.win = 1;
_root.inter.sub.gotoAndPlay(2);
_root.createPart(_x, _y, 80, "explo1", _root.levelmap, 1);
_root.createScore(_x, _y, 100);
playSound("star");
_root.dieItem(this);
}
};
Symbol 231 MovieClip [scoreobj] Frame 35
this.removeMovieClip();
Symbol 237 MovieClip Frame 1
stop();
Symbol 238 MovieClip [mine] Frame 1
timer = 30;
ind = 1;
onEnterFrame = function () {
if (_root.paused == false) {
_root.addDelay();
timer--;
sec = Math.ceil(timer / 10);
if (sec == 0) {
playSound("explo");
_root.castBreak(_x, _y, _root.mineradius);
_root.createPart(_x, _y, _root.mineradius, "explo1", _root.levelmap, 1);
this.removeMovieClip();
}
ind = ind + (6 - sec);
if (ind > 30) {
ind = ind - 30;
}
img.gotoAndStop(ind);
} else {
this.removeMovieClip();
}
};
Symbol 238 MovieClip [mine] Frame 12
stop();
Symbol 245 MovieClip Frame 1
gotoAndStop(1 + random(5));
_y = (-random(10));
_xscale = choose(100, -100);
Symbol 249 MovieClip Frame 1
gotoAndStop(_parent.num);
Symbol 250 MovieClip [gift5] Frame 1
stop();
rad = 15;
vspeed = -3 - random(3);
hspeed = (15 + random(15)) / choose(10, -10);
num = 1 + random(6);
img.gotoAndStop(num);
kill = false;
delay = 10;
speed = 10;
if (_root.resmulti > 1.2) {
img.img.stop();
}
onEnterFrame = function () {
if (kill == false) {
if (delay > 0) {
delay--;
}
_root.addDelay();
_x = (_x + hspeed);
_y = (_y + vspeed);
vspeed = vspeed + 0.2;
if (_y > (resy + rad)) {
_root.dieGift(this);
}
if ((_x > (resx - rad)) || (_x < rad)) {
hspeed = hspeed * -1;
}
} else if (_root.paused == false) {
if (delay == 15) {
playSound("coin1a", "coin2a", "coin3a", "coin4a");
addStat(2, 1);
_root.giftHave++;
_root.dieGift(this);
} else {
delay++;
}
dist = point_distance(_x, _y, _root.mousex, _root.mousey);
if (dist < rad) {
playSound("coin1a", "coin2a", "coin3a", "coin4a");
addStat(2, 1);
_root.giftHave++;
_root.dieGift(this);
} else {
dir = point_direction(_root.mousex, _root.mousey, _x, _y);
_x = (_x - lengthdir_x(Math.min(dist, speed), dir));
_y = (_y + lengthdir_y(Math.min(dist, speed), dir));
_rotation = dir;
speed = speed + 5;
}
} else {
_root.giftHave++;
_root.dieGift(this);
}
};
Symbol 250 MovieClip [gift5] Frame 2
img.img.stop();
Symbol 272 MovieClip [gift4] Frame 1
stop();
rad = 15;
vspeed = -3 - random(3);
hspeed = (15 + random(15)) / choose(10, -10);
num = 1 + random(6);
kill = false;
delay = 10;
speed = 10;
if (random(10) < 5) {
_xscale = -100;
}
onEnterFrame = function () {
if (kill == false) {
if (delay > 0) {
delay--;
}
_root.addDelay();
_x = (_x + hspeed);
_y = (_y + vspeed);
vspeed = vspeed + 0.2;
if (_y > (resy + rad)) {
_root.dieGift(this);
}
if ((_x > (resx - rad)) || (_x < rad)) {
hspeed = hspeed * -1;
}
} else if (_root.paused == false) {
if (delay == 15) {
playSound("coin1a", "coin2a", "coin3a", "coin4a");
addStat(2, 1);
_root.giftHave++;
_root.dieGift(this);
} else {
delay++;
}
dist = point_distance(_x, _y, _root.mousex, _root.mousey);
if (dist < rad) {
playSound("coin1a", "coin2a", "coin3a", "coin4a");
addStat(2, 1);
_root.giftHave++;
_root.dieGift(this);
} else {
dir = point_direction(_root.mousex, _root.mousey, _x, _y);
_x = (_x - lengthdir_x(Math.min(dist, speed), dir));
_y = (_y + lengthdir_y(Math.min(dist, speed), dir));
speed = speed + 5;
}
} else {
_root.giftHave++;
_root.dieGift(this);
}
};
Symbol 272 MovieClip [gift4] Frame 2
img.stop();
Symbol 322 MovieClip Frame 1
gotoAndStop(_parent.num);
Symbol 323 MovieClip [gift3] Frame 1
stop();
rad = 15;
vspeed = -3 - random(3);
hspeed = (15 + random(15)) / choose(10, -10);
num = 1 + random(6);
kill = false;
delay = 10;
speed = 10;
if (random(10) < 5) {
_xscale = -100;
}
onEnterFrame = function () {
if (kill == false) {
if (delay > 0) {
delay--;
}
_root.addDelay();
_x = (_x + hspeed);
_y = (_y + vspeed);
vspeed = vspeed + 0.2;
if (_y > (resy + rad)) {
_root.dieGift(this);
}
if ((_x > (resx - rad)) || (_x < rad)) {
hspeed = hspeed * -1;
}
} else if (_root.paused == false) {
if (delay == 15) {
playSound("coin1a", "coin2a", "coin3a", "coin4a");
addStat(2, 1);
_root.giftHave++;
_root.dieGift(this);
} else {
delay++;
}
dist = point_distance(_x, _y, _root.mousex, _root.mousey);
if (dist < rad) {
playSound("coin1a", "coin2a", "coin3a", "coin4a");
addStat(2, 1);
_root.giftHave++;
_root.dieGift(this);
} else {
dir = point_direction(_root.mousex, _root.mousey, _x, _y);
_x = (_x - lengthdir_x(Math.min(dist, speed), dir));
_y = (_y + lengthdir_y(Math.min(dist, speed), dir));
speed = speed + 5;
}
} else {
_root.giftHave++;
_root.dieGift(this);
}
};
Symbol 323 MovieClip [gift3] Frame 2
img.stop();
Symbol 341 MovieClip [gift2] Frame 1
stop();
rad = 15;
vspeed = -3 - random(3);
hspeed = (15 + random(15)) / choose(10, -10);
num = 1 + random(6);
kill = false;
delay = 10;
speed = 10;
if (random(10) < 5) {
_xscale = -100;
}
onEnterFrame = function () {
if (kill == false) {
if (delay > 0) {
delay--;
}
_root.addDelay();
_x = (_x + hspeed);
_y = (_y + vspeed);
vspeed = vspeed + 0.2;
if (_y > (resy + rad)) {
_root.dieGift(this);
}
if ((_x > (resx - rad)) || (_x < rad)) {
hspeed = hspeed * -1;
}
} else if (_root.paused == false) {
if (delay == 15) {
playSound("coin1", "coin2", "coin3", "coin4");
addStat(2, 1);
_root.giftHave++;
_root.dieGift(this);
} else {
delay++;
}
dist = point_distance(_x, _y, _root.mousex, _root.mousey);
if (dist < rad) {
playSound("coin1", "coin2", "coin3", "coin4");
addStat(2, 1);
_root.giftHave++;
_root.dieGift(this);
} else {
dir = point_direction(_root.mousex, _root.mousey, _x, _y);
_x = (_x - lengthdir_x(Math.min(dist, speed), dir));
_y = (_y + lengthdir_y(Math.min(dist, speed), dir));
speed = speed + 5;
}
} else {
_root.giftHave++;
_root.dieGift(this);
}
};
Symbol 341 MovieClip [gift2] Frame 2
img.stop();
Symbol 375 MovieClip Frame 1
gotoAndStop(_parent.num);
Symbol 376 MovieClip [gift1] Frame 1
stop();
rad = 15;
vspeed = -4 - (random(2) * _root.resmulti);
hspeed = (15 + random(15)) / choose(10, -10);
num = 1 + random(6);
img.gotoAndStop(num);
kill = false;
delay = 10;
speed = 10;
onEnterFrame = function () {
if (kill == false) {
if (delay > 0) {
delay--;
}
_root.addDelay();
_x = (_x + hspeed);
_y = (_y + vspeed);
vspeed = vspeed + 0.1;
if (_y > (resy + rad)) {
_root.dieGift(this);
}
if ((_x > (resx - rad)) || (_x < rad)) {
hspeed = hspeed * -1;
}
} else if (_root.paused == false) {
if (delay == 15) {
playSound("coin1", "coin2", "coin3", "coin4");
_root.createScore(_root.levelmap.player._x, _root.levelmap.player._y, 100);
_root.dieGift(this);
} else {
delay++;
}
dist = point_distance(_x, _y, _root.mousex, _root.mousey);
if (dist < rad) {
playSound("coin1", "coin2", "coin3", "coin4");
_root.createScore(_root.levelmap.player._x, _root.levelmap.player._y, 100);
_root.dieGift(this);
} else {
dir = point_direction(_root.mousex, _root.mousey, _x, _y);
_x = (_x - lengthdir_x(Math.min(dist, speed), dir));
_y = (_y + lengthdir_y(Math.min(dist, speed), dir));
speed = speed + 5;
}
} else {
_root.dieGift(this);
}
};
Symbol 376 MovieClip [gift1] Frame 2
img.img.stop();
Symbol 402 MovieClip Frame 1
gotoAndStop(_parent.num);
Symbol 405 MovieClip [gift0] Frame 1
stop();
_root.giftNeed++;
rad = 18;
dir = 160 + random(41);
spd = ((10 + random(9)) / 10) * _root.resmulti;
if (_x < (resx / 2)) {
x = -lengthdir_x(spd, dir);
_xscale = 100;
} else {
x = lengthdir_x(spd, dir);
_xscale = -100;
}
y = lengthdir_y(spd, -dir) * choose(1, -1);
bordx = resx - rad;
bordy = resy - rad;
num = 1 + random(6);
img.gotoAndStop(num);
kill = false;
delay = 10;
speed = 10;
spdx = 3;
onEnterFrame = function () {
if (kill == false) {
if (delay > 0) {
delay--;
}
_root.addDelay();
_x = (_x + (x * spdx));
_y = (_y + (y * spdx));
if (spdx > 1) {
spdx = spdx - 0.2;
}
if ((_x > (resx + rad)) || (_x < (-rad))) {
_root.dieGift(this);
}
if ((_y > bordy) || (_y < rad)) {
y = y * -1;
_y = (_y + y);
}
} else if (_root.paused == false) {
if (delay == 15) {
playSound("coin1a", "coin2a", "coin3a", "coin4a");
addStat(2, 1);
_root.giftHave++;
_root.createPart(_x, _y, 100, "bone", _root.levelmap, 1);
_root.levelmap.player.img.gotoAndPlay(11);
_root.dieGift(this);
} else {
delay++;
}
dist = point_distance(_x, _y, _root.levelmap.player._x, _root.levelmap.player._y);
if (dist < rad) {
playSound("coin1a", "coin2a", "coin3a", "coin4a");
addStat(2, 1);
_root.giftHave++;
_root.createPart(_x, _y, 100, "bone", _root.levelmap, 1);
_root.levelmap.player.img.gotoAndPlay(11);
_root.dieGift(this);
} else {
dir = point_direction(_root.levelmap.player._x, _root.levelmap.player._y, _x, _y);
hand._xscale = dist - speed;
hand._rotation = dir;
_x = (_x - lengthdir_x(Math.min(dist, speed), dir));
_y = (_y + lengthdir_y(Math.min(dist, speed), dir));
speed = speed + 5;
}
} else {
_root.giftHave++;
_root.dieGift(this);
}
};
Symbol 405 MovieClip [gift0] Frame 2
img.img.stop();
img._xscale = _xscale;
_xscale = 100;
dir = point_direction(_root.levelmap.player._x, _root.levelmap.player._y, _x, _y);
hand._rotation = dir;
Symbol 433 MovieClip [chest] Frame 1
stop();
img.gotoAndPlay(1 + random(30));
rad = 28;
bordy1 = resy - rad;
bordy2 = resy + rad;
_x = (100 + random(resx - 200));
_y = (-rad);
speed = 2 * _root.resmulti;
fall = 10 + random(10 * _root.resmulti);
killtime = 1;
kill = undefined;
onEnterFrame = function () {
if (_root.bombs > 0) {
_root.addDelay();
}
_y = (_y + speed);
if (fall > 0) {
_y = (_y + fall);
fall--;
if ((fall % 4) == 0) {
if (_root.oxcount < _root.oxlimit) {
_root.createPart(_x, _y, 100, "ox", _root.levelmap, 1);
}
}
}
if (_y > bordy1) {
_root.spikeTest(this);
if (_y > bordy2) {
_root.dieItem(this);
}
}
if (kill > 0) {
addStat(9, 1);
_root.chestHave++;
_root.currskin = 1;
num = 3;
while (num--) {
_root.createGift(_x, _y, 1 + random(6));
}
_root.currskin = 0;
_root.createPart(_x, _y, 80, "explo1", _root.levelmap, 1);
_root.createScore(_x, _y, 50);
playSound("chest");
_root.dieItem(this);
}
};
Symbol 1039 MovieClip [__Packages.mochi.as2.MochiScores] Frame 0
class mochi.as2.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.as2.MochiServices.warnID(boardID, true);
mochi.as2.MochiScores.boardID = boardID;
mochi.as2.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function showLeaderboard(options) {
options.clip = mochi.as2.MochiServices.clip;
if ((options.clip != mochi.as2.MochiServices.__get__clip()) || (mochi.as2.MochiServices.__get__childClip()._target == undefined)) {
mochi.as2.MochiServices.disconnect();
trace("WARNING! This application is attempting to connect to MochiServices inside a showLeaderboard call!");
trace("make sure MochiServices.connect is called as early in the application runtime as possible.");
mochi.as2.MochiServices.connect(mochi.as2.MochiServices.__get__id(), options.clip);
}
delete options.clip;
if (options.name != null) {
if (typeof(options.name) == "object") {
if (options.name.text != undefined) {
options.name = options.name.text;
}
}
}
if (options.score != null) {
if (options.score instanceof TextField) {
if (options.score.text != undefined) {
options.score = options.score.text;
}
} else if (options.score instanceof mochi.as2.MochiDigits) {
options.score = options.score.value;
}
var _local1 = Number(options.score);
if (isNaN(_local1)) {
trace(("ERROR: Submitted score '" + options.score) + "' will be rejected, score is 'Not a Number'");
} else if ((_local1 == Number.NEGATIVE_INFINITY) || (_local1 == Number.POSITIVE_INFINITY)) {
trace(("ERROR: Submitted score '" + options.score) + "' will be rejected, score is an infinite");
} else {
if (Math.floor(_local1) != _local1) {
trace(("WARNING: Submitted score '" + options.score) + "' will be truncated");
}
options.score = _local1;
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.as2.MochiServices.__get__clip().stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
mochi.as2.MochiServices.__get__clip().play();
};
}
if (options.onError != null) {
onError = options.onError;
} else {
onError = onClose;
}
if (options.boardID == null) {
if (boardID != null) {
options.boardID = boardID;
}
}
mochi.as2.MochiServices.warnID(options.boardID, true);
trace("[MochiScores] NOTE: Security Sandbox Violation errors below are normal");
mochi.as2.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose);
}
static function closeLeaderboard() {
mochi.as2.MochiServices.send("scores_closeLeaderboard");
}
static function getPlayerInfo(callbackObj, callbackMethod) {
mochi.as2.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
static function submit(score, name, callbackObj, callbackMethod) {
score = Number(score);
if (isNaN(score)) {
trace(("ERROR: Submitted score '" + String(score)) + "' will be rejected, score is 'Not a Number'");
} else if ((score == Number.NEGATIVE_INFINITY) || (score == Number.POSITIVE_INFINITY)) {
trace(("ERROR: Submitted score '" + String(score)) + "' will be rejected, score is an infinite");
} else {
if (Math.floor(score) != score) {
trace(("WARNING: Submitted score '" + String(score)) + "' will be truncated");
}
score = Number(score);
}
mochi.as2.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
mochi.as2.MochiServices.send("scores_requestList", null, callbackObj, callbackMethod);
}
static function scoresArrayToObjects(scores) {
var _local5 = {};
var _local1;
var _local4;
var _local2;
var _local6;
for (var _local8 in scores) {
if (typeof(scores[_local8]) == "object") {
if ((scores[_local8].cols != null) && (scores[_local8].rows != null)) {
_local5[_local8] = [];
_local2 = scores[_local8];
_local4 = 0;
while (_local4 < _local2.rows.length) {
_local6 = {};
_local1 = 0;
while (_local1 < _local2.cols.length) {
_local6[_local2.cols[_local1]] = _local2.rows[_local4][_local1];
_local1++;
}
_local5[_local8].push(_local6);
_local4++;
}
} else {
_local5[_local8] = {};
for (var _local7 in scores[_local8]) {
_local5[_local8][_local7] = scores[_local8][_local7];
}
}
} else {
_local5[_local8] = scores[_local8];
}
}
return(_local5);
}
static function doClose(args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = "IOError";
}
onError.apply(null, [args.errorCode]);
} else {
onClose.apply();
}
}
}
Symbol 1040 MovieClip [__Packages.mochi.as2.MochiEventDispatcher] Frame 0
class mochi.as2.MochiEventDispatcher
{
var eventTable;
function MochiEventDispatcher () {
eventTable = {};
}
function buildDelegate(thisObject, thatObject) {
var _local2 = {thisObject:thisObject, thatObject:thatObject};
if (thatObject != undefined) {
var funct = ((typeof(thatObject) == "string") ? (thisObject[thatObject]) : (thatObject));
_local2.delegate = function (args) {
funct.call(thisObject, args);
};
} else {
_local2.delegate = thisObject;
}
return(_local2);
}
function compareDelegate(d_A, d_B) {
if ((d_A.thisObject != d_B.thisObject) || (d_A.thatObject != d_B.thatObject)) {
return(false);
}
return(true);
}
function addEventListener(event, thisObject, thatObject) {
removeEventListener(event, thisObject, thatObject);
eventTable[event].push(buildDelegate(thisObject, thatObject));
}
function removeEventListener(event, thisObject, thatObject) {
var _local3 = buildDelegate(thisObject, thatObject);
if (eventTable[event] == undefined) {
eventTable[event] = [];
return(undefined);
}
for (var _local4 in eventTable[event]) {
if (!compareDelegate(eventTable[event][_local4], _local3)) {
continue;
}
eventTable[event].splice(Number(_local4), 1);
}
}
function triggerEvent(event, args) {
if (eventTable[event] == undefined) {
return(undefined);
}
for (var _local4 in eventTable[event]) {
eventTable[event][_local4].delegate(args);
}
}
}
Symbol 1041 MovieClip [__Packages.mochi.as2.MochiServices] Frame 0
class mochi.as2.MochiServices
{
static var _id, _container, _clip, _sendChannelName, __get__comChannelName, onError, _listenChannel, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function get childClip() {
return(_clip);
}
static function getVersion() {
return("3.9.4 as2");
}
static function allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
if (onError != undefined) {
mochi.as2.MochiServices.onError = onError;
} else if (mochi.as2.MochiServices.onError == undefined) {
mochi.as2.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
warnID(id, false);
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local6 = "_mochiservices_com_" + id;
var _local5 = new MovieClipLoader();
var _local3 = {};
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
onError("NotConnected");
return(null);
}
if (urlOptions().servURL) {
_servURL = urlOptions().servURL;
}
var _local4 = _servURL + _services;
if (urlOptions().servicesURL) {
_local4 = urlOptions().servicesURL;
}
allowDomains(_local4);
_clip = clip.createEmptyMovieClip(_local6, 10336, false);
_listenChannelName = _listenChannelName + ((Math.floor(new Date().getTime()) + "_") + Math.floor(Math.random() * 99999));
listen();
if (_local3.waitInterval != null) {
clearInterval(_local3.waitInterval);
}
_local3.onLoadError = loadError;
_local3.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_local3.onLoadComplete = function (target_mc) {
target_mc.MochiServices = mochi.as2.MochiServices;
};
_local3.startTime = getTimer();
_local3.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.as2.MochiServices.disconnect();
mochi.as2.MochiServices.onError("IOError");
}
clearInterval(this.waitInterval);
}
};
_local3.waitInterval = setInterval(_local3, "wait", 1000);
_local5.addListener(_local3);
_local5.loadClip((((((_local4 + "?listenLC=") + _listenChannelName) + "&mochiad_options=") + escape(_root.mochiad_options)) + "&api_version=") + getVersion(), _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
return(_clip);
}
static function loadError(target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
disconnect();
onError(errorCode);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.as2.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel._nextcallbackID = 0;
_listenChannel._callbacks = {};
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, version:getVersion()});
_listenChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
_listenChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_listenChannel.onEvent = function (pkg) {
switch (pkg.target) {
case "services" :
mochi.as2.MochiServices.triggerEvent(pkg.event, pkg.args);
break;
case "events" :
mochi.as2.MochiEvents.triggerEvent(pkg.event, pkg.args);
break;
case "coins" :
mochi.as2.MochiCoins.triggerEvent(pkg.event, pkg.args);
break;
case "social" :
mochi.as2.MochiSocial.triggerEvent(pkg.event, pkg.args);
}
};
_listenChannel.onError = function () {
mochi.as2.MochiServices.onError("IOError");
};
trace("[SERVICES_API] connected!");
_connecting = false;
_connected = true;
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _listenChannel._callbacks[_local1.callbackID];
}
delete _listenChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError("NotConnected");
}
if ((args.options != null) && (args.options.onError != null)) {
args.options.onError("NotConnected");
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
trace("Error: MochiServices not connected. Please call MochiServices.connect(). Function: " + methodName);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
}
_listenChannel._callbacks[_listenChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_listenChannel._nextcallbackID++;
}
static function urlOptions() {
var _local5 = {};
var _local6;
if (_root._url.indexOf("mochiad_options") != -1) {
var _local2 = (_root._url.indexOf("mochiad_options") + "mochiad_options".length) + 1;
_local6 = _root._url.substr(_local2, _root._url.length);
} else if (_root.mochiad_options) {
_local6 = _root.mochiad_options;
}
if (_local6) {
var _local4 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2].split("=");
_local5[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local5);
}
static function warnID(bid, leaderboard) {
bid = bid.toLowerCase();
if (bid.length != 16) {
trace(("WARNING: " + (leaderboard ? "board" : "game")) + " ID is not the appropriate length");
return(undefined);
}
if (bid == "1e113c7239048b3f") {
if (leaderboard) {
trace("WARNING: Using testing board ID");
} else {
trace("WARNING: Using testing board ID as game ID");
}
return(undefined);
}
if (bid == "84993a1de4031cd8") {
if (leaderboard) {
trace("WARNING: Using testing game ID as board ID");
} else {
trace("WARNING: Using testing game ID");
}
return(undefined);
}
var _local1 = 0;
while (_local1 < bid.length) {
switch (bid.charAt(_local1)) {
case "0" :
case "1" :
case "2" :
case "3" :
case "4" :
case "5" :
case "6" :
case "7" :
case "8" :
case "9" :
case "a" :
case "b" :
case "c" :
case "d" :
case "e" :
case "f" :
break;
default :
trace("WARNING: Board ID contains illegal characters: " + bid);
return(undefined);
}
_local1++;
}
}
static function addLinkEvent(url, burl, btn, onClick) {
var timeout = 1500;
var t0 = getTimer();
var _local2 = new Object();
_local2.mav = getVersion();
_local2.swfv = btn.getSWFVersion() || 6;
_local2.swfurl = btn._url;
_local2.fv = System.capabilities.version;
_local2.os = System.capabilities.os;
_local2.lang = System.capabilities.language;
_local2.scres = (System.capabilities.screenResolutionX + "x") + System.capabilities.screenResolutionY;
var s = "?";
var _local3 = 0;
for (var _local6 in _local2) {
if (_local3 != 0) {
s = s + "&";
}
_local3++;
s = ((s + _local6) + "=") + escape(_local2[_local6]);
}
if (!(netupAttempted || (_connected))) {
var ping = btn.createEmptyMovieClip("ping", 777);
var _local7 = btn.createEmptyMovieClip("nettest", 778);
netupAttempted = true;
ping.loadMovie("http://link.mochiads.com/linkping.swf?t=" + getTimer());
_local7.onEnterFrame = function () {
if ((ping._totalframes > 0) && (ping._totalframes == ping._framesloaded)) {
delete this.onEnterFrame;
} else if ((getTimer() - t0) > timeout) {
delete this.onEnterFrame;
mochi.as2.MochiServices.netup = false;
}
};
}
var _local4 = btn.createEmptyMovieClip("clk", 1001);
_local4._alpha = 0;
_local4.beginFill(1044735);
_local4.moveTo(0, 0);
_local4.lineTo(0, btn._height);
_local4.lineTo(btn._width, btn._height);
_local4.lineTo(btn._width, 0);
_local4.lineTo(0, 0);
_local4.endFill();
_local4.onRelease = function () {
if (mochi.as2.MochiServices.netup) {
getURL (url + s, "_blank");
} else {
getURL (burl, "_blank");
}
if (onClick != undefined) {
onClick();
}
};
}
static function setContainer(clip) {
}
static function stayOnTop(clip) {
}
static function addEventListener(eventType, thisObject, thatObject) {
_dispatcher.addEventListener(eventType, thisObject, thatObject);
}
static function triggerEvent(eventType, args) {
_dispatcher.triggerEvent(eventType, args);
}
static function removeEventListener(eventType, thisObject, thatObject) {
_dispatcher.removeEventListener(eventType, thisObject, thatObject);
}
static var CONNECTED = "onConnected";
static var _servURL = "http://www.mochiads.com/static/lib/services/";
static var _services = "services.swf";
static var _mochiLC = "MochiLC.swf";
static var _listenChannelName = "__ms_";
static var _connecting = false;
static var _connected = false;
static var netup = true;
static var netupAttempted = false;
static var _dispatcher = new mochi.as2.MochiEventDispatcher();
}
Symbol 1042 MovieClip [__Packages.mochi.as2.MochiEvents] Frame 0
class mochi.as2.MochiEvents
{
function MochiEvents () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function getAchievements(properties) {
mochi.as2.MochiServices.send("events_getAchievements", properties);
}
static function unlockAchievement(properties) {
mochi.as2.MochiServices.send("events_unlockAchievement", properties);
}
static function startSession(achievementID) {
mochi.as2.MochiServices.send("events_beginSession", {achievementID:achievementID}, null, null);
}
static function showAwards(options) {
mochi.as2.MochiServices.send("events_showAwards", options, null, null);
}
static function setNotifications(style) {
mochi.as2.MochiServices.send("events_setNotifications", style, null, null);
}
static function addEventListener(eventType, thisObject, thatObject) {
_dispatcher.addEventListener(eventType, thisObject, thatObject);
}
static function triggerEvent(eventType, args) {
_dispatcher.triggerEvent(eventType, args);
}
static function removeEventListener(eventType, thisObject, thatObject) {
_dispatcher.removeEventListener(eventType, thisObject, thatObject);
}
static function startPlay(tag) {
if (tag == undefined) {
tag = "gameplay";
}
mochi.as2.MochiServices.send("events_setRoundID", {tag:String(tag)}, null, null);
}
static function endPlay() {
mochi.as2.MochiServices.send("events_clearRoundID", null, null, null);
}
static function trackEvent(tag, value) {
mochi.as2.MochiServices.send("events_trackEvent", {tag:tag, value:value}, null, null);
}
static var ACHIEVEMENTS_OWNED = "AchievementOwned";
static var ACHIEVEMENT_NEW = "AchievementReceived";
static var GAME_ACHIEVEMENTS = "GameAchievements";
static var ERROR = "Error";
static var IO_ERROR = "IOError";
static var IO_PENDING = "IOPending";
static var ALIGN_TOP_LEFT = "ALIGN_TL";
static var ALIGN_TOP = "ALIGN_T";
static var ALIGN_TOP_RIGHT = "ALIGN_TR";
static var ALIGN_LEFT = "ALIGN_L";
static var ALIGN_CENTER = "ALIGN_C";
static var ALIGN_RIGHT = "ALIGN_R";
static var ALIGN_BOTTOM_LEFT = "ALIGN_BL";
static var ALIGN_BOTTOM = "ALIGN_B";
static var ALIGN_BOTTOM_RIGHT = "ALIGN_BR";
static var FORMAT_SHORT = "ShortForm";
static var FORMAT_LONG = "LongForm";
static var FORMAT_NONE = "NoForm";
static var _dispatcher = new mochi.as2.MochiEventDispatcher();
}
Symbol 1043 MovieClip [__Packages.mochi.as2.MochiCoins] Frame 0
class mochi.as2.MochiCoins
{
function MochiCoins () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function showStore(options) {
mochi.as2.MochiServices.send("coins_showStore", {options:options}, null, null);
}
static function showItem(options) {
if ((options == undefined) || (typeof(options.item) != "string")) {
trace("ERROR: showItem call must pass an Object with an item key");
return(undefined);
}
mochi.as2.MochiServices.send("coins_showItem", {options:options}, null, null);
}
static function showVideo(options) {
if ((options == undefined) || (typeof(options.item) != "string")) {
trace("ERROR: showVideo call must pass an Object with an item key");
return(undefined);
}
mochi.as2.MochiServices.send("coins_showVideo", {options:options}, null, null);
}
static function getStoreItems() {
mochi.as2.MochiServices.send("coins_getStoreItems");
}
static function requestFunding(properties) {
mochi.as2.MochiServices.send("social_requestFunding", properties);
}
static function addEventListener(eventType, delegate) {
_dispatcher.addEventListener(eventType, delegate);
}
static function triggerEvent(eventType, args) {
_dispatcher.triggerEvent(eventType, args);
}
static function removeEventListener(eventType, delegate) {
_dispatcher.removeEventListener(eventType, delegate);
}
static var STORE_SHOW = "StoreShow";
static var STORE_HIDE = "StoreHide";
static var ITEM_OWNED = "ItemOwned";
static var ITEM_NEW = "ItemNew";
static var STORE_ITEMS = "StoreItems";
static var ERROR = "Error";
static var IO_ERROR = "IOError";
static var NO_USER = "NoUser";
static var _dispatcher = new mochi.as2.MochiEventDispatcher();
}
Symbol 1044 MovieClip [__Packages.mochi.as2.MochiSocial] Frame 0
class mochi.as2.MochiSocial
{
function MochiSocial () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function showLoginWidget(options) {
mochi.as2.MochiServices.setContainer();
mochi.as2.MochiServices.stayOnTop();
mochi.as2.MochiServices.send("social_showLoginWidget", {options:options});
}
static function hideLoginWidget() {
mochi.as2.MochiServices.send("social_hideLoginWidget");
}
static function requestLogin(properties) {
mochi.as2.MochiServices.send("social_requestLogin", properties);
}
static function getFriendsList(properties) {
mochi.as2.MochiServices.send("social_getFriendsList", properties);
}
static function showProfile(options) {
mochi.as2.MochiServices.setContainer();
mochi.as2.MochiServices.stayOnTop();
mochi.as2.MochiServices.send("social_showProfile", options);
}
static function postToStream(properties) {
mochi.as2.MochiServices.send("social_postToStream", properties);
}
static function inviteFriends(properties) {
mochi.as2.MochiServices.send("social_inviteFriends", properties);
}
static function requestFan(properties) {
mochi.as2.MochiServices.send("social_requestFan", properties);
}
static function saveUserProperties(properties) {
mochi.as2.MochiServices.send("social_saveUserProperties", properties);
}
static function addEventListener(eventType, delegate) {
_dispatcher.addEventListener(eventType, delegate);
}
static function triggerEvent(eventType, args) {
_dispatcher.triggerEvent(eventType, args);
}
static function removeEventListener(eventType, delegate) {
_dispatcher.removeEventListener(eventType, delegate);
}
static var LOGGED_IN = "LoggedIn";
static var LOGGED_OUT = "LoggedOut";
static var LOGIN_SHOW = "LoginShow";
static var LOGIN_HIDE = "LoginHide";
static var LOGIN_SHOWN = "LoginShown";
static var PROFILE_SHOW = "ProfileShow";
static var PROFILE_HIDE = "ProfileHide";
static var PROPERTIES_SAVED = "PropertySaved";
static var WIDGET_LOADED = "WidgetLoaded";
static var FRIEND_LIST = "FriendsList";
static var PROFILE_DATA = "ProfileData";
static var GAMEPLAY_DATA = "GameplayData";
static var ACTION_CANCELED = "onCancel";
static var ACTION_COMPLETE = "onComplete";
static var USER_INFO = "UserInfo";
static var ERROR = "Error";
static var IO_ERROR = "IOError";
static var NO_USER = "NoUser";
static var PROPERTIES_SIZE = "PropertiesSize";
static var _dispatcher = new mochi.as2.MochiEventDispatcher();
}
Symbol 1045 MovieClip [__Packages.mochi.as2.MochiDigits] Frame 0
class mochi.as2.MochiDigits
{
var Encoder, Fragment, Sibling;
function MochiDigits (digit, index) {
Encoder = 0;
setValue(digit, index);
}
function get value() {
return(Number(toString()));
}
function set value(v) {
setValue(v);
//return(value);
}
function addValue(v) {
value = value + v;
}
function setValue(digit, index) {
var _local3 = digit.toString();
if ((index == undefined) || (isNaN(index))) {
index = 0;
}
Fragment = _local3.charCodeAt(index++) ^ Encoder;
if (index < _local3.length) {
Sibling = new mochi.as2.MochiDigits(digit, index);
} else {
Sibling = null;
}
reencode();
}
function reencode() {
var _local2 = int(2147483647 * Math.random());
Fragment = Fragment ^ (_local2 ^ Encoder);
Encoder = _local2;
}
function toString() {
var _local2 = String.fromCharCode(Fragment ^ Encoder);
return(((Sibling != null) ? (_local2.concat(Sibling.toString())) : (_local2)));
}
}
Symbol 444 MovieClip Frame 1
stop();
Symbol 452 MovieClip Frame 1
stop();
Symbol 457 MovieClip Frame 1
stop();
Symbol 459 MovieClip Frame 1
stop();
Symbol 464 Button
on (rollOver) {
playSound("mouseon");
}
on (release) {
playSound("click");
getURL (sponsorurl, "_blank");
}
Symbol 475 Button
on (rollOver) {
playSound("over");
}
on (release) {
playSound("click");
getURL (lnk, "_blank");
}
Symbol 488 MovieClip Frame 1
stop();
title = "PLAY\nFlying Candy";
lnk = candyurl;
Symbol 488 MovieClip Frame 2
title = "PLAY\nIcy Gifts";
lnk = giftsurl;
Symbol 488 MovieClip Frame 3
title = "PLAY\nMushroom Madness 3";
lnk = mushroomurl;
Symbol 488 MovieClip Frame 4
title = "PLAY\nPrizma Puzzle Challenges";
lnk = prizmaurl;
Symbol 488 MovieClip Frame 5
title = "PLAY\nGranny Strikes Back";
lnk = grannyurl;
Symbol 488 MovieClip Frame 6
title = "PLAY\nThe Bee Way";
lnk = beeurl;
Symbol 488 MovieClip Frame 7
title = "PLAY\nNinja Painter";
lnk = ninjaurl;
Symbol 490 MovieClip Frame 1
stop();
_visible = false;
onEnterFrame = function () {
if (timer > 0) {
timer--;
if (timer == 1) {
gotoAndPlay ("on");
}
}
};
Symbol 490 MovieClip Frame 2
_visible = true;
Symbol 490 MovieClip Frame 35
gotoAndPlay ("idle");
Symbol 494 Button
on (rollOver) {
playSound("mouseon");
}
on (release) {
playSound("click");
}
Symbol 507 MovieClip Frame 9
gotoAndPlay (1);
Symbol 507 MovieClip Frame 22
gotoAndStop ("zero");
Symbol 543 Button
on (release) {
getURL (sponsorurl, "_blank");
}
Symbol 569 MovieClip Frame 86
_root.gotoAndStop(4);
Symbol 579 MovieClip Frame 86
_root.gotoAndStop(5);
Symbol 586 MovieClip Frame 1
spd = 5;
x = 0;
y = 0;
xpre = 0;
ypre = 0;
onEnterFrame = function () {
if (_visible == true) {
if (((_root.paused == true) || (_root.cursor._visible == true)) || (_root.machine._currentframe != 1)) {
if (_y < (resy + 200)) {
spd = spd + 3;
_y = (_y + spd);
} else {
_visible = false;
spd = 5;
}
}
x = xpre - _x;
y = _y - ypre;
img._rotation = x;
img._yscale = Math.max(80, Math.min(120, 100 + y)) + Math.min(150, _root.giftHave);
img._xscale = Math.max(80, Math.min(120, 100 - y)) + Math.min(150, _root.giftHave);
xe = lengthdir_x(Math.min(4, _root.dist / 10), _root.dir);
ye = lengthdir_y(Math.min(4, _root.dist / 10), _root.dir);
eye1._x = -6 - xe;
eye1._y = -17 + ye;
eye2._x = 9 - xe;
eye2._y = -17 + ye;
xpre = _x;
ypre = _y;
}
};
Symbol 593 MovieClip Frame 1
stop();
Symbol 593 MovieClip Frame 9
stop();
Symbol 600 MovieClip Frame 1
x1 = _x;
y1 = _y;
onEnterFrame = function () {
dist = point_distance(_x, _y, _root._xmouse - _parent._x, _root._ymouse - 480);
eyedist = dist / 20;
dir = point_direction(_root._xmouse - _parent._x, _root._ymouse - 480, _x, _y);
x2 = lengthdir_x(Math.min(10, eyedist), dir);
y2 = lengthdir_y(Math.min(10, eyedist), dir);
_x = (x1 - x2);
_y = (y1 + y2);
};
Symbol 602 MovieClip Frame 1
stop();
Symbol 602 MovieClip Frame 16
playSound("portalout");
Symbol 602 MovieClip Frame 24
stop();
Symbol 614 MovieClip Frame 1
stop();
Symbol 615 MovieClip Frame 1
stop();
Symbol 615 MovieClip Frame 15
gotoAndPlay ("play");
Symbol 617 MovieClip Frame 1
stop();
_visible = false;
Symbol 617 MovieClip Frame 2
_visible = true;
Symbol 617 MovieClip Frame 43
gotoAndPlay ("idle");
Symbol 647 MovieClip Frame 1
onEnterFrame = function () {
_x = _root._xmouse;
_y = _root._ymouse;
_root.hint._visible = _visible;
};
Symbol 653 MovieClip Frame 1
xx = txt._x;
yy = txt._y;
onEnterFrame = function () {
if (_root.combocount < 2) {
if (_alpha > 0) {
_alpha = (_alpha - 10);
} else {
_visible = false;
}
}
if (txt._xscale > 100) {
_visible = true;
_alpha = 100;
txt._xscale = (txt._yscale = txt._yscale - 2);
txt._x = ((100 - txt._xscale) / 6) + xx;
txt._y = ((100 - txt._xscale) / 8) + yy;
}
};
Symbol 657 MovieClip Frame 1
onEnterFrame = function () {
if (_xscale > 100) {
_yscale = (_yscale - 3);
_xscale = (_yscale - 3);
}
};
Symbol 668 Button
on (rollOver) {
playSound("mouseon");
}
Symbol 676 MovieClip Frame 1
stop();
Symbol 689 MovieClip Frame 1
stop();
Symbol 689 MovieClip Frame 29
stop();
Symbol 690 MovieClip Frame 1
onEnterFrame = function () {
if (_root.paused == true) {
if (_alpha > 0) {
_alpha = (_alpha - 15);
} else {
_visible = false;
}
}
};
ib3.ico.gotoAndStop(3);
ib4.ico.gotoAndStop(4);
ib3.desc.text = "REPLAY";
ib4.desc.text = "QUIT";
ib3.desc._visible = false;
ib4.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;
};
ib3.but.onPress = function () {
playSound("click");
_root.mouseClick = true;
if (_root.trans._currentframe == 1) {
_root.paused = true;
_root.trans.play();
}
};
ib4.but.onPress = function () {
playSound("click");
_root.mouseClick = true;
if (_root.trans._currentframe == 1) {
_root.paused = true;
_root.cursor._visible = false;
_root.openMenu("select");
}
};
Symbol 701 MovieClip Frame 1
stop();
Symbol 702 MovieClip Frame 1
stop();
Symbol 702 MovieClip Frame 2
play();
if (_root.flawless == true) {
img.gotoAndStop(2);
} else if (_root.wavecount == 1) {
img.gotoAndStop(3);
} else {
img.gotoAndStop(1);
img.minetxt.text = "+" + _root.bombcount;
}
Symbol 710 Button
on (rollOver) {
playSound("mouseon");
rec._visible = true;
}
on (rollOut) {
rec._visible = false;
}
on (press) {
playSound("click");
_root.lvl = id;
if (id == 1) {
_root.openMenu("hint");
} else if (_root.trans._currentframe == 1) {
_root.trans.gotoAndPlay(2);
_root.generator = false;
_root.mouseClick = true;
}
}
Symbol 720 Button
on (rollOver) {
playSound("mouseon");
rec._visible = true;
}
on (rollOut) {
rec._visible = false;
}
on (press) {
playSound("click");
_root.lvl = id;
trace(id);
if (_root.trans._currentframe == 1) {
_root.trans.gotoAndPlay(2);
_root.generator = false;
_root.mouseClick = true;
}
}
Symbol 727 Button
on (rollOver) {
playSound("mouseon");
rec._visible = true;
}
on (rollOut) {
rec._visible = false;
}
on (press) {
playSound("click");
_root.lvl = id;
trace(id);
if (_root.trans._currentframe == 1) {
_root.trans.gotoAndPlay(2);
_root.generator = false;
_root.mouseClick = true;
}
}
Symbol 749 MovieClip Frame 1
stop();
b1.title = "SUPER HARD";
b1.but.onRelease = function () {
playSound("click");
};
Symbol 749 MovieClip Frame 2
b1.title = "SUPER HARD";
b1.but.onRelease = function () {
_root.openMenu("hard");
};
Symbol 760 Button
on (rollOut) {
desc._visible = false;
}
on (rollOver) {
desc._visible = true;
playSound("mouseon");
}
on (press) {
_root.doUpgr(this);
}
Symbol 784 MovieClip Frame 1
stop();
Symbol 787 MovieClip Frame 1
stop();
Symbol 793 MovieClip Frame 1
_alpha = 100;
Symbol 793 MovieClip Frame 2
_alpha = 50;
Symbol 798 Button
on (rollOver) {
playSound("mouseon");
}
on (release) {
playSound("click");
getURL (sponsorurl, "_blank");
}
Symbol 822 MovieClip Frame 1
stop();
Symbol 822 MovieClip Frame 20
stop();
Symbol 847 MovieClip Frame 1
stop();
Symbol 847 MovieClip Frame 20
stop();
Symbol 870 MovieClip Frame 1
stop();
Symbol 870 MovieClip Frame 20
stop();
Symbol 893 MovieClip Frame 1
stop();
Symbol 893 MovieClip Frame 20
stop();
Symbol 895 Button
on (rollOver) {
desc._visible = true;
}
on (rollOut) {
desc._visible = false;
}
Symbol 897 MovieClip Frame 1
stop();
delay = 0;
onEnterFrame = function () {
if (timer > 0) {
timer--;
if (timer == 1) {
img.img.gotoAndPlay(2);
eff.gotoAndPlay(2);
if (img._currentframe == 6) {
_root.addpearl = _root.addpearl + 10;
} else {
_root.addpearl++;
}
_root.prize.gotoAndPlay(2);
_root.prize.img.gotoAndStop(8);
_root.prize.img.txt.text = "+" + _root.addpearl;
i = 8;
while (i--) {
_root.createPart(((_x + 320) - 20) + random(40), ((_y + 240) - 20) + random(40), 80 + random(21), "ox", _root, 1);
}
}
}
if (img.img._currentframe == 11) {
if (delay == 0) {
_root.createPart(0, 0, 100, "star", this, 1);
delay = 90 + random(90);
} else {
delay--;
}
}
};
Symbol 900 MovieClip Frame 1
onEnterFrame = function () {
if (_xscale > 100) {
_yscale = (_yscale - 3);
_xscale = (_yscale - 3);
}
};
Symbol 907 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (timer > 0) {
timer--;
if (timer == 1) {
gotoAndPlay (3);
playSound("star");
if (_name == "s3") {
playSound("holy");
}
}
}
};
Symbol 907 MovieClip Frame 13
gotoAndStop (2);
Symbol 950 Button
on (rollOver) {
playSound("mouseon");
}
on (release) {
playSound("click");
getURL (devurl, "_blank");
}
Symbol 953 Button
on (rollOver) {
_root.play_on.start();
}
on (release) {
getURL ("http://www.silengames.com", "_blank");
_root.play_pre.start();
}
Symbol 987 MovieClip Frame 1
stop();
timer = 0;
close = true;
tar = "exit";
gotoAndStop ("exit");
onEnterFrame = function () {
if (close == false) {
if (_xscale != 100) {
if (_xscale < 100) {
_yscale = (_yscale + 30);
_xscale = (_yscale + 30);
} else {
_yscale = (_yscale - 10);
_xscale = (_yscale - 10);
}
}
} else if (_xscale > 30) {
_yscale = (_yscale - 40);
_xscale = (_yscale - 40);
} else if (_currentframe != tar) {
close = false;
gotoAndStop(tar);
}
if (_currentframe == 72) {
if (timer == 0) {
timer = 50 + random(40);
_root.createPart(174, -100, 100, "star", this, 1);
} else {
timer--;
if (timer == 10) {
_root.createPart(-80, -200, 100, "star", this, 1);
}
}
}
};
Symbol 987 MovieClip Frame 2
getGachiCount();
totalscore.text = _root.totalscore;
if (_root.my_so.data.shmode != true) {
sh.gotoAndStop(1);
} else {
sh.gotoAndStop(2);
}
if (_root.superhard != true) {
sh._visible = true;
} else {
sh._visible = false;
}
b1.title = "Upgrade Shop";
b2.title = ("Awards " + _root.gachis) + "/57";
b3.title = "Extra Games";
b4.title = "Walkthrough";
b5.title = "Back to Menu";
b6.title = "Super Hard Mode";
b1.but.onRelease = function () {
menuback = "select";
_root.openMenu("upgr");
};
b2.but.onRelease = function () {
menuback = "select";
_root.openMenu("achi");
};
b3.but.onRelease = function () {
getURL (sponsorurl, "_blank");
};
b4.but.onRelease = function () {
getURL (walkurl, "_blank");
};
b5.but.onRelease = function () {
_root.openMenu("main");
};
stat_star = 0;
stat_lvl = 0;
i = 1;
while (i <= _root.alllvl) {
z = this["l" + i];
z.id = i;
if (i > _root.maxlvl) {
z.gotoAndStop(4);
} else if (i == _root.maxlvl) {
z.gotoAndStop(1);
} else {
stat_lvl++;
levelstars = (_root.lvlmedal[i][1] + _root.lvlmedal[i][2]) + _root.lvlmedal[i][3];
if (levelstars == 3) {
z.gotoAndStop(3);
} else {
z.gotoAndStop(2);
}
j = 1;
while (j < 4) {
if (_root.lvlmedal[i][j] == 1) {
z["s" + j].gotoAndStop(2);
} else {
z["s" + j].gotoAndStop(1);
}
j++;
}
}
stat_star = stat_star + ((_root.lvlmedal[i][1] + _root.lvlmedal[i][2]) + _root.lvlmedal[i][3]);
if (_root.lvlrec[i] != undefined) {
this["l" + i].rec.txt.text = _root.lvlrec[i];
this["l" + i].rec._visible = false;
}
i++;
}
getGachiCount();
_root.stat[12] = _root.gachis;
if (_root.kongapi == true) {
i = 0;
while (i < 8) {
_root.kongsend("stat" + i, _root.stat[i]);
i++;
}
}
Symbol 987 MovieClip Frame 12
_root.initUpgr();
playSound("menuon");
switch (menuback) {
case "exit" :
b1.title = "NEXT LEVEL";
break;
case "main" :
b1.title = "MAIN MENU";
break;
case "select" :
b1.title = "SELECT LEVEL";
}
b2.title = "Extra Games";
b1.but.onRelease = function () {
if (menuback == "exit") {
_root.lvl++;
_root.trans.gotoAndPlay(2);
} else {
_root.openMenu(menuback);
}
};
b2.but.onRelease = function () {
getURL (sponsorurl, "_blank");
};
Symbol 987 MovieClip Frame 22
getGachiCount();
_root.initAchi();
switch (menuback) {
case "exit" :
b1.title = "NEXT LEVEL";
break;
case "main" :
b1.title = "MAIN MENU";
break;
case "select" :
b1.title = "SELECT LEVEL";
}
b1.but.onRelease = function () {
if (menuback == "exit") {
if (_root.testUpgr() == true) {
menuback = "exit";
_root.openMenu("upgr");
} else {
_root.lvl++;
_root.trans.gotoAndPlay(2);
}
} else {
_root.openMenu(menuback);
}
};
Symbol 987 MovieClip Frame 32
playSound("win");
_root.flashobj.gotoAndStop(1);
if (_root.maxlvl > 2) {
ads1.img.img.gotoAndStop(1 + random(7));
do {
ads2.img.img.gotoAndStop(1 + random(7));
} while (ads1.img.img._currentframe == ads2.img.img._currentframe);
ads1.timer = 10;
ads2.timer = 20;
}
leveltxt.text = ("Level " + _root.lvl) + " Passed!";
s1.txt.text = "CATCH ALL FISHES";
s2.txt.text = "CATCH ALL SHIPS";
s3.txt.text = "CATCH ALL CHESTS";
i = 1;
while (i < 4) {
zz = this["s" + i];
zz.gotoAndStop(_root.lvlmedal[_root.lvl][i] + 1);
zz.timer = 0;
i++;
}
stars = [0, 0, 0, 0];
if (_root.giftHave == _root.giftNeed) {
stars[1] = 1;
s1.timer = 20;
}
if (_root.subHave == _root.subNeed) {
stars[2] = 1;
s2.timer = 30;
}
if (_root.chestHave == _root.chestNeed) {
stars[3] = 1;
s3.timer = 40;
}
bonus1 = ((stars[1] + stars[2]) + stars[3]) * 1500;
bonus2 = _root.score;
bonus3 = _root.clickCount * 1000;
bonus4 = _root.bombs * 250;
levelscore = 0;
levelscore = levelscore + (((bonus1 + bonus2) + bonus3) + bonus4);
starbonus.text = bonus1;
moneyleft.text = bonus2;
clickleft.text = bonus3;
mineleft.text = bonus4;
scoretxt.text = levelscore;
rectxt._visible = false;
addtxt._visible = false;
totaladd = 0;
if (_root.lvlrec[_root.lvl] == undefined) {
totaladd = levelscore;
} else if (levelscore > _root.lvlrec[_root.lvl]) {
totaladd = levelscore - _root.lvlrec[_root.lvl];
}
if (totaladd > 0) {
_root.lvlrec[_root.lvl] = levelscore;
_root.my_so.data.lvlrec[_root.lvl] = levelscore;
rectxt._visible = true;
addtxt._visible = true;
addtxt.text = "+" + totaladd;
}
_root.totalscore = _root.totalscore + totaladd;
totaltxt.text = _root.totalscore;
setStat(8, _root.totalscore);
i = 1;
while (i < 4) {
if (_root.lvlmedal[_root.lvl][i] < stars[i]) {
_root.lvlmedal[_root.lvl][i] = 1;
_root.my_so.data.lvlmedal[_root.lvl][i] = 1;
}
i++;
}
if ((_root.lvl + 1) > _root.maxlvl) {
_root.maxlvl = _root.lvl + 1;
_root.my_so.data.maxlvl = _root.lvl + 1;
}
getGachiCount();
stat_star = 0;
i = 1;
while (i <= _root.alllvl) {
stat_star = stat_star + ((_root.lvlmedal[i][1] + _root.lvlmedal[i][2]) + _root.lvlmedal[i][3]);
i++;
}
setStat(6, _root.lvl);
setStat(7, stat_star);
_root.money = _root.money + _root.giftHave;
if (_root.kongapi == true) {
i = 0;
while (i < 13) {
_root.kongsend("stat" + i, _root.stat[i]);
i++;
}
}
if (_root.lvl == _root.alllvl) {
if (_root.my_so.data.shmode != true) {
_root.my_so.data.shmode = true;
}
}
saveStat();
b1.title = "CONTINUE";
b2.title = "Replay Level";
b3.title = "Select Level";
b4.title = "Extra Games";
b6.title = "Download Game";
b1.but.onRelease = function () {
if (_root.lvl == _root.alllvl) {
_root.openMenu("congrat");
} else if (_root.newachi.length > 0) {
menuback = "exit";
_root.openMenu("achi");
} else if (_root.testUpgr() == true) {
menuback = "exit";
_root.openMenu("upgr");
} else {
_root.lvl++;
_root.trans.gotoAndPlay(2);
}
};
b2.but.onRelease = function () {
_root.trans.gotoAndPlay(2);
};
b3.but.onRelease = function () {
_root.openMenu("select");
};
b4.but.onRelease = function () {
getURL (sponsorurl, "_blank");
};
b6.but.onRelease = function () {
getURL (hosturl, "_blank");
};
Symbol 987 MovieClip Frame 42
leveltxt.text = ("Level " + _root.lvl) + " Passed!";
unitNeed.text = "/" + _root.unitNeed;
giftNeed.text = "/" + _root.giftNeed;
unitHave.text = _root.unitHave;
giftHave.text = _root.giftHave;
bonus1 = _root.clickCount * 500;
bonus2 = _root.maxcombo * 5;
_root.score = _root.score + (bonus1 + bonus2);
clickleft.text = bonus1;
maxcombo.text = bonus2;
levelscore.text = _root.score;
playSound("win");
b11.title = "CONTINUE";
b2.title = "Submit Score";
b3.title = "More Games";
b4.title = "Main Menu";
b11.but.onRelease = function () {
_root.newgen = true;
if (_root.testUpgr() == true) {
menuback = "exit";
_root.openMenu("upgr");
} else {
_root.lvl++;
_root.trans.gotoAndPlay(2);
}
};
b2.but.onRelease = function () {
var _local3 = {n:[7, 8, 1, 11, 3, 3, 2, 1, 0, 12, 12, 1, 13, 4, 14, 0], f:function (i, s) {
if (s.length == 16) {
return(s);
}
return(this.f(i + 1, s + this.n[i].toString(16)));
}};
var _local4 = _local3.f(0, "");
mochi.as2.MochiScores.showLeaderboard({boardID:_local4, score:_root.genscore});
};
b3.but.onRelease = function () {
getURL (sponsorurl, "_blank");
};
b4.but.onRelease = function () {
_root.openMenu("main");
};
_root.genscore = _root.genscore + _root.score;
genscore.text = _root.genscore;
_root.money = _root.money + _root.giftHave;
saveStat();
mochi.as2.MochiEvents.trackEvent("Generator", _root.lvl);
Symbol 987 MovieClip Frame 52
playSound("def");
_root.flashobj.gotoAndStop(1);
leveltxt.text = ("Level " + _root.lvl) + " Failed!";
b1.title = "TRY AGAIN";
b2.title = "Walkthrough";
b3.title = "Level Select";
b4.title = "Upgrade Shop";
b5.title = "Extra Games";
b6.title = "Download Game";
b1.but.onRelease = function () {
_root.trans.gotoAndPlay(2);
};
b2.but.onRelease = function () {
getURL (walkurl, "_blank");
};
b3.but.onRelease = function () {
_root.openMenu("select");
};
b4.but.onRelease = function () {
menuback = "select";
_root.openMenu("upgr");
};
b5.but.onRelease = function () {
getURL (sponsorurl, "_blank");
};
b6.but.onRelease = function () {
getURL (hosturl, "_blank");
};
_root.money = _root.money + _root.giftHave;
saveStat();
Symbol 987 MovieClip Frame 62
playSound("def");
genscore.text = _root.genscore;
b1.title = "SUBMIT SCORE";
b2.title = "More Games";
b3.title = "Main Menu";
b1.but.onRelease = function () {
var _local3 = {n:[7, 8, 1, 11, 3, 3, 2, 1, 0, 12, 12, 1, 13, 4, 14, 0], f:function (i, s) {
if (s.length == 16) {
return(s);
}
return(this.f(i + 1, s + this.n[i].toString(16)));
}};
var _local4 = _local3.f(0, "");
mochi.as2.MochiScores.showLeaderboard({boardID:_local4, score:_root.genscore});
_root.openMenu("select");
};
b2.but.onRelease = function () {
getURL (sponsorurl, "_blank");
};
b3.but.onRelease = function () {
_root.openMenu("main");
};
Symbol 987 MovieClip Frame 72
playSound("menuon");
b1.title = "PLAY GAME";
b2.title = "Walkthrough";
b3.title = "Credits";
b4.title = "Extra Games";
b5.title = "Reset Game";
b6.title = "Download Game";
b1.but.onRelease = function () {
_root.openMenu("select");
};
b2.but.onRelease = function () {
getURL (walkurl, "_blank");
};
b3.but.onRelease = function () {
_root.openMenu("credit");
};
b4.but.onRelease = function () {
getURL (sponsorurl, "_blank");
};
b5.but.onRelease = function () {
_root.openMenu("clear");
};
b6.but.onRelease = function () {
getURL (hosturl, "_blank");
};
Symbol 987 MovieClip Frame 82
playSound("menuon");
b1.title = "MAIN MENU";
b1.but.onRelease = function () {
_root.openMenu("main");
};
Symbol 987 MovieClip Frame 92
playSound("menuon");
b1.title = "CONTINUE";
b1.but.onRelease = function () {
_root.openMenu("exit");
if (_root.trans._currentframe == 1) {
_root.trans.gotoAndPlay(2);
}
};
Symbol 987 MovieClip Frame 102
b1.title = "YES!";
b2.title = "No";
b1.but.onRelease = function () {
_root.superhard = undefined;
_root.my_so.data.superhard = undefined;
_root.maxlvl = 1;
_root.upgr[0] = [0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2];
_root.money = 0;
_root.pearls = 0;
_root.totalscore = 0;
_root.my_so.data.maxlvl = 1;
_root.my_so.data.upgr = [0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2];
_root.my_so.data.money = 0;
_root.my_so.data.pearls = 0;
i = 1;
while (i <= _root.alllvl) {
_root.lvlmedal[i] = [undefined, 0, 0, 0];
_root.my_so.data.lvlmedal[i] = [undefined, 0, 0, 0];
_root.lvlrec[i] = 0;
_root.my_so.data.lvlrec[i] = 0;
i++;
}
_root.setGachi();
i = 0;
while (i < _root.gachi.length) {
_root.stat[i] = 0;
i++;
}
saveStat();
_root.openMenu("main");
};
b2.but.onRelease = function () {
_root.openMenu("main");
};
Symbol 987 MovieClip Frame 112
b1.title = "GO GO GO!";
b2.title = "No";
b1.but.onRelease = function () {
_root.superhard = true;
_root.my_so.data.superhard = true;
_root.maxlvl = 1;
_root.upgr[0] = [0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2];
_root.money = 0;
_root.pearls = 0;
_root.totalscore = 0;
_root.my_so.data.maxlvl = 1;
_root.my_so.data.upgr = [0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2];
_root.my_so.data.money = 0;
_root.my_so.data.pearls = 0;
i = 1;
while (i <= _root.alllvl) {
_root.lvlmedal[i] = [undefined, 0, 0, 0];
_root.my_so.data.lvlmedal[i] = [undefined, 0, 0, 0];
_root.lvlrec[i] = 0;
_root.my_so.data.lvlrec[i] = 0;
i++;
}
_root.setGachi();
i = 0;
while (i < _root.gachi.length) {
_root.stat[i] = 0;
i++;
}
saveStat();
_root.openMenu("select");
};
b2.but.onRelease = function () {
_root.openMenu("select");
};
Symbol 987 MovieClip Frame 122
playSound("menuon");
if (_root.superhard == true) {
shmode._visible = false;
} else {
shmode._visible = true;
}
b1.title = "Select Level";
b2.title = "Main Menu";
b3.title = "Extra Games";
b1.but.onRelease = function () {
_root.openMenu("select");
};
b2.but.onRelease = function () {
_root.openMenu("main");
};
b3.but.onRelease = function () {
getURL (sponsorurl, "_blank");
};
Symbol 990 Button
on (rollOver) {
playSound("mouseon");
gotoAndPlay ("over");
}
on (rollOut) {
gotoAndPlay ("out");
}
on (press) {
_root.mouseClick = true;
playSound("click");
_root.nobombs = false;
_root.createUnit(id + 3, 0);
_root.score = _root.score - cost;
playSound("pickup");
cost = cost + ((_root.minecost[id] * _root.upgr[0][id + 8]) / 4);
_root.testBomb(id);
}
Symbol 994 Button
on (press) {
_root.mouseClick = true;
}
Symbol 996 MovieClip Frame 1
stop();
Symbol 996 MovieClip Frame 6
stop();
Symbol 996 MovieClip Frame 11
gotoAndStop (1);
Symbol 996 MovieClip Frame 12
play();
Symbol 996 MovieClip Frame 19
gotoAndStop (6);
Symbol 1006 MovieClip Frame 1
i = 1;
while (i < 10) {
z = this["b" + i];
z.id = i;
z.desc = _root.upgr[i + 8][1];
i++;
}
Symbol 1020 MovieClip Frame 1
stop();
Symbol 1021 MovieClip Frame 1
_visible = false;
stop();
Symbol 1021 MovieClip Frame 2
_visible = true;
playSound("sparkle1");
Symbol 1025 MovieClip Frame 1
stop();
Symbol 1025 MovieClip Frame 5
_root.paused = true;
Symbol 1025 MovieClip Frame 6
_root.createLevel();
_root.ib1.desc._visible = false;
_root.ib2.desc._visible = false;
_root.ib3.desc._visible = false;
_root.ib4.desc._visible = false;
Symbol 1030 MovieClip Frame 1
stop();
Symbol 1035 MovieClip Frame 1
stop();
_visible = false;
Symbol 1035 MovieClip Frame 2
_visible = true;
playSound("achi2");
Symbol 1035 MovieClip Frame 11
playSound("holy");
Symbol 1037 MovieClip Frame 1
stop();