Frame 1
function goTo1() {
getURL (sponsorurl, "_blank");
}
_global.sponsorurl = "http://armor.ag/MoreGames";
_global.faceurl = "http://www.facebook.com/ArmorGames";
_global.hosturl = "http://armor.ag/MoreGames";
_global.devurl = "http://www.silengames.com";
var newMenu = new ContextMenu();
newMenu.hideBuiltInItems();
newMenu.customItems.push(new ContextMenuItem("Play More Games", goTo1));
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 != "armorgames.com") && (domain != "silengames.com")) {
stop();
_root._y = -480;
}
kongapi = false;
kongsend = function (kng1, kng2) {
trace((kng1 + "=") + kng2);
if (kongapi == true) {
kongregate.stats.submit(kng1, kng2);
}
};
Frame 2
stop();
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;
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 + 1;
percentTxt.text = Math.floor(percentDone) + "%";
}
fish._x = 40 + (percentDone * 7);
if (percentDone >= 100) {
onEnterFrame = null;
gotoAndStop (3);
}
};
Frame 3
stop();
var my_so = SharedObject.getLocal("icygifts2", "/");
alllvl = 45;
currmap = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1];
map = new Array();
map[0] = [1, 3, 3, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4];
map[1] = [0.8, 10, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2];
map[2] = [0.9, 14, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2];
map[3] = [0.8, 4, 4, 0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2];
map[4] = [1, 0, 8, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3];
map[5] = [0.9, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3];
map[6] = [0.6, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3];
map[7] = [0.9, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3];
map[8] = [0.9, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3];
map[9] = [1, 0, 0, 4, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4];
map[10] = [1, 10, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4];
map[11] = [0.6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 4];
map[12] = [1, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5];
map[13] = [0.8, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3];
map[14] = [1, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4];
map[15] = [1, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 3];
map[16] = [1.3, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8];
map[17] = [0.9, 10, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 7];
map[18] = [1.1, 0, 0, 8, 0, 0, 4, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 8];
map[19] = [0.6, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3];
map[20] = [1, 3, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 4];
map[21] = [1.5, 15, 0, 0, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 5];
map[22] = [1.2, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 6];
map[23] = [1.5, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 9];
map[24] = [1, 0, 0, 6, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 7];
map[25] = [1.2, 3, 3, 3, 0, 2, 0, 0, 4, 0, 1, 0, 0, 0, 0, 0, 2, 9];
map[26] = [1, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 5];
map[27] = [0.6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 5];
map[28] = [1.1, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6];
map[29] = [1.3, 5, 5, 5, 0, 4, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 8];
map[30] = [1.2, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 6];
map[31] = [1.5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 0, 9];
map[32] = [1, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 1, 6];
map[33] = [1.5, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 3, 0, 0, 0, 0, 9];
map[34] = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 12, 0, 0, 0, 0, 0, 9];
map[35] = [1, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 8];
map[36] = [1, 5, 5, 5, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 6];
map[37] = [0.7, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 1, 9];
map[38] = [1.2, 0, 0, 20, 0, 0, 4, 2, 0, 4, 0, 2, 0, 0, 0, 0, 1, 9];
map[39] = [1.3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 0, 0, 0, 0, 6];
map[40] = [1.2, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 9];
map[41] = [2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 9];
map[42] = [1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 9];
map[43] = [1.8, 50, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 2, 0, 3, 9];
map[44] = [1.3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0, 0, 18];
map[45] = [1.6, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 1, 9];
Instance of Symbol 669 MovieClip in Frame 3
on (release) {
getURL (sponsorurl, "_blank");
}
Frame 4
stop();
Instance of Symbol 680 MovieClip in Frame 4
on (release) {
getURL (devurl, "_blank");
}
Frame 5
gachi = new Array();
gachitxt = new Array();
newachi = new Array();
setGachi = function () {
gachi[0] = [100];
gachitxt[0] = ["Blow up", "Bombs"];
gachi[1] = [100, 300, 800];
gachitxt[1] = ["Break", "Ice Floes"];
gachi[2] = [250, 750, 1500];
gachitxt[2] = ["Collect", "Gifts"];
gachi[3] = [30, 100, 300];
gachitxt[3] = ["Use", "Mines"];
gachi[4] = [1, 20, 53];
gachitxt[4] = ["Get", "Upgrades"];
gachi[5] = [30, 150];
gachitxt[5] = ["Get", "Combo"];
gachi[6] = [5, 15, 45];
gachitxt[6] = ["Complete", "Level"];
gachi[7] = [3, 50, 135];
gachitxt[7] = ["Get", "Stars"];
gachi[8] = [25000, 250000];
gachitxt[8] = ["Earn", "Points"];
gachi[9] = [10, 100, 250];
gachitxt[9] = ["Catch", "Coins"];
gachi[10] = [1, 50];
gachitxt[10] = ["Free", "Santas"];
gachi[11] = [1, 10, 30];
gachitxt[11] = ["Win", "Slot Games"];
gachi[12] = [1, 5, 20];
gachitxt[12] = ["Use", "Power ups"];
gachi[13] = [34];
gachitxt[13] = ["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++;
}
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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
my_so.data.powerup = [undefined, 0, 0, 0, 0];
my_so.data.money = 0;
my_so.data.pearls = 0;
my_so.data.totalgenscore = 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;
totalgenscore = my_so.data.totalgenscore;
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];
i++;
}
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.data.totalgenscore = totalgenscore;
my_so.data.powerup = powerup;
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 == 13) & (j == 0)) {
pearls = pearls + 10;
} else {
pearls = pearls + (j + 1);
}
}
}
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(13, gachis);
};
upgr = new Array();
upgr[1] = [20, "SHELLS", "Increase amount of shells"];
upgr[2] = [20, "TNT", "Increase explosion radius of TNT"];
upgr[3] = [30, "ROCKETS", "Increase amount of rockets"];
upgr[4] = [30, "ACID", "Increase radius of acid spot"];
upgr[5] = [40, "TORPEDO", "Increase duration of torpedo attack"];
upgr[6] = [40, "TESLA", "Increase amount of targets of tesla"];
upgr[7] = [50, "FIREBALL", "Increase lifetime of fireball"];
upgr[8] = [50, "LASER", "Increase lifetime of laser beam"];
upgr[9] = [60, "WAVE", "Increase size of the wave"];
upgr[10] = [60, "SPIKES", "Increase lifetime of spikes"];
upgr[11] = [70, "MINES", "Increase amount of mines"];
upgr[12] = [20, "BOMB RADIUS", "Increase explosion radius of the initial bomb"];
upgr[13] = [30, "FLOE RADIUS", "Increase explosion radius of floes"];
upgr[14] = [10, "GIFT MAGNET", "Increase gifts collecting radius"];
upgr[15] = [20, "LUCK", "Increase your chance to win on slot machine"];
upgr[16] = [3, "MORE FLOES", "Add more floes to the field (single use)"];
upgr[17] = [3, "MORE MINES", "Add more mines to the field (single use)"];
upgr[18] = [5, "NUKE IT!", "Nuke everything on the field (single use)"];
upgr[19] = [5, "+1 BOMB", "Add one initial bomb (single use)"];
powerdesc = [undefined, "More Floes", "More Mines", "Nuke It!", "+1 Bomb"];
upgrok = new Array();
upgrok = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
j = 4;
while (j <= 14) {
i = 1;
while (i <= alllvl) {
if (map[i][j] > 0) {
upgrok[j - 3] = i;
break;
}
i++;
}
j++;
}
trace(upgrok.toString() + "----------");
upgr[0] = my_so.data.upgr;
powerup = my_so.data.powerup;
trace(upgr[0]);
gotoAndStop ("functions");
Frame 15
unitAttach = new Array();
unitAttach[1] = 1;
unitAttach[2] = 3;
unitAttach[3] = 7;
autoslot = false;
generator = false;
newgen = false;
congrateff = 0;
currskin = 0;
oxlimit = 80;
mouseClick = false;
bankUnit = new Array();
bankGift = new Array();
lvl = 0;
maxupgr = 6;
matimer = 0;
artiradius = 50;
mineradius = 60;
pulseradius = 70;
createLevel = function () {
if (generator == true) {
if (newgen == true) {
getGenerator();
newgen = false;
}
} else {
currmap = map[lvl];
}
resmulti = currmap[0];
unitspeed = 2 * resmulti;
explorad = 60 + (20 * upgr[0][12]);
breakrad = 40 + (10 * upgr[0][13]);
magnet = 50 + (50 * upgr[0][14]);
slotchance = 5 + upgr[0][15];
hulkcount = 2 + upgr[0][1];
tntradius = 90 + (30 * upgr[0][2]);
pulsecount = 2 + upgr[0][3];
toxiclife = 80 + (30 * upgr[0][4]);
artilife = 25 + (10 * upgr[0][5]);
cryshot = 2 + upgr[0][6];
surrlife = 2 + upgr[0][7];
laserlife = 60 + (30 * upgr[0][8]);
sonicrise = 60 + (30 * upgr[0][9]);
spikelife = 50 + (30 * upgr[0][10]);
minecount = 3 + (2 * upgr[0][11]);
closeMenu();
clearLevel();
initBomb();
if (lvl == 0) {
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 {
showInterMoreGames();
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;
}
}
cursor.img._xscale = (cursor.img._yscale = explorad / resmulti);
inter.sub.gotoAndStop(1);
clickCount = 1;
score = 0;
coins = 0;
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;
artitimer = 0;
_global.resx = 640 * resmulti;
_global.resy = 480 * resmulti;
levelmap._xscale = (levelmap._yscale = 100 / resmulti);
createWave();
createSub();
createChest();
};
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 () {
if (lvl > 0) {
half.gotoAndPlay(2);
}
flawless = false;
win = 0;
towin = undefined;
wavePerc = 0;
unitHave = 0;
unitNeed = 1;
inter.wavePerc.text = "0%";
inter.sub.gotoAndStop(1);
j = 1;
while (j < 17) {
i = 0;
while (i < currmap[j]) {
createUnit(j, 0);
i++;
}
j++;
}
testBomb();
i = 0;
while (i < bankUnit.length) {
if (bankUnit[i].type < 4) {
unitNeed = unitNeed + unitAttach[bankUnit[i].type];
} else {
unitNeed++;
}
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._x = Math.round(320 * resmulti);
obj._y = Math.round(240 * resmulti);
obj.type = "boss";
obj.spdx = 1;
obj.life = currmap[17];
bankUnit.push(obj);
if (lvl == 1) {
obj.hint._visible = true;
} else {
obj.hint._visible = false;
}
};
coinPos = new Array();
coinPos[1] = new Array();
coinPos[2] = new Array();
coinPos[3] = new Array();
coinPos[4] = new Array();
coinPos[5] = new Array();
coinPos[1][0] = [[5, 5]];
coinPos[2][0] = [[3, 5], [7, 5]];
coinPos[2][1] = [[5, 3], [5, 7]];
coinPos[3][0] = [[5, 2], [2, 7], [8, 7]];
coinPos[3][1] = [[5, 8], [2, 3], [8, 3]];
coinPos[3][2] = [[2, 5], [5, 5], [8, 5]];
coinPos[4][0] = [[5, 2], [5, 8], [2, 5], [8, 5]];
coinPos[4][1] = [[2, 2], [2, 8], [8, 2], [8, 8]];
coinPos[4][2] = [[2, 3], [4, 7], [6, 3], [8, 7]];
coinPos[4][3] = [[5, 2], [2, 8], [5, 6], [8, 8]];
coinPos[5][0] = [[5, 1], [1, 4], [9, 4], [2, 9], [8, 9]];
createChest = function () {
type = Math.min(5, Math.max(1, Math.round(3 * resmulti)));
pos = random(coinPos[type].length);
num = coinPos[type][pos].length;
while (num--) {
objCount++;
chestNeed++;
obj = levelmap.attachMovie("chest", "chest", levelmap.getNextHighestDepth());
obj._x = Math.round((coinPos[type][pos][num][0] * 64) * resmulti);
obj._y = Math.round((coinPos[type][pos][num][1] * 48) * resmulti);
obj.type = type;
bankUnit.push(obj);
}
};
getGenerator = function () {
currmap = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1];
g_diff = (lvl * 0.1) + diff;
g_res = Math.min(1.7, Math.max(0.7, random(diff * 10) / 10));
currmap[0] = g_res;
g_rest1 = 0.5 + g_res;
g_rest2 = Math.round(g_rest1 * g_rest1);
g_pnt = 10 + Math.round((50 / g_diff) * g_rest2);
g_clc = choose(0, 0, g_rest2, random(g_rest2 / 2), random(g_rest2));
currmap[16] = g_clc;
currmap[17] = Math.max(1, Math.min(Math.round((g_pnt / 8) + (g_diff / 2)), Math.min(9, Math.floor(diff + (lvl / 6)))));
g_pnt = g_pnt - (g_clc * 5);
g_bub = choose(0, g_pnt, random(g_pnt));
g_bom = choose(0, 0, 4 + random(11));
if (g_bub > 0) {
g_big = choose(0, g_bub, random(g_bub));
g_med = choose(0, g_bub, random(g_bub));
g_pnt = g_pnt - g_med;
currmap[2] = Math.round(g_med / 3);
g_pnt = g_pnt - g_big;
currmap[3] = Math.round(g_big / 7);
g_bub = g_bub - g_med;
g_bub = g_bub - g_big;
g_pnt = g_pnt - g_bub;
currmap[1] = g_bub;
if (g_bub == g_pnt) {
currmap[16] = currmap[16] + Math.round(random((g_res - 0.5) * 5));
}
}
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();
unitHave++;
if (ob.type < 4) {
addStat(1, 1);
} 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;
}
}
j = 0;
while (j < bankUnit.length) {
if (bankUnit[j] == ob) {
bankUnit.splice(j, 1);
break;
}
j++;
}
if (ob.type > 3) {
quake = 2;
}
score = score + 10;
switch (ob.type) {
case 1 :
createGift(ob._x, ob._y);
castBreak(ob._x, ob._y, breakrad);
playSoundLim("die1", "die2", "die3");
if (oxcount < oxlimit) {
createPart(ob._x, ob._y, 100, "hulk1", levelmap, 3);
}
break;
case 2 :
createGift(ob._x, ob._y);
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);
}
break;
case 3 :
createGift(ob._x, ob._y);
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);
}
break;
case 4 :
castBreak(ob._x, ob._y, breakrad);
createPart(ob._x, ob._y, 100, "bullet", levelmap, hulkcount);
playSound("bullet");
break;
case 5 :
castBreak(ob._x, ob._y, tntradius);
createPart(ob._x, ob._y, tntradius, "explo1", levelmap, 1);
playSound("explo");
break;
case 6 :
castBreak(ob._x, ob._y, breakrad);
createPart(ob._x, ob._y, 100, "pulse", levelmap, pulsecount);
playSound("rocket");
break;
case 7 :
castBreak(ob._x, ob._y, breakrad);
createPart(ob._x, ob._y, 100, "toxic", levelmap, 1);
playSound("toxic");
break;
case 8 :
castBreak(ob._x, ob._y, breakrad);
artitimer = artitimer + artilife;
playSound("torpedo");
trace(artitimer);
break;
case 9 :
castBreak(ob._x, ob._y, breakrad);
createPart(ob._x, ob._y, 100, "light", levelmap, cryshot);
createPart(ob._x, ob._y, 100, "light2", levelmap, 1);
playSound("tesla");
j = 0;
while (j < bankUnit.length) {
if (bankUnit[j].type == 9) {
if (bankUnit[j].kill < 6) {
bankUnit[j].kill = 9;
}
}
j++;
}
break;
case 10 :
castBreak(ob._x, ob._y, breakrad);
createPart(ob._x, ob._y, 100, "surr", levelmap, 1);
playSound("fireball");
break;
case 11 :
castBreak(ob._x, ob._y, breakrad);
createPart(ob._x, 0, 100, "laser", levelmap, 1);
playSound("laser");
break;
case 12 :
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 13 :
castBreak(ob._x, ob._y, breakrad);
if (spiketimer == 0) {
spikes.gotoAndPlay("on");
}
spiketimer = spiketimer + spikelife;
playSound("portal");
break;
case 14 :
castBreak(ob._x, ob._y, breakrad);
createPart(ob._x, ob._y, 100, "mine", levelmap, minecount);
playSound("mines");
break;
case 15 :
j = 0;
while (j < bankUnit.length) {
killUnit(bankUnit[j]);
if ((bankUnit[j].type < 4) || (bankUnit[j].type == "boss")) {
bankUnit[j].kill = 1;
} else {
bankUnit[j].kill = 10 + random(10);
}
j++;
}
flashobj.gotoAndPlay(2);
playSound("nuke");
quake = 10;
break;
case 16 :
castBreak(ob._x, ob._y, breakrad);
if (paused == false) {
clickCount++;
cursor._visible = true;
}
playSound("pickup");
}
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);
obj._rotation = (-direct) - 90;
}
if (type == "mine") {
obj._x = (((resx / (count + 1)) * j) + 20) - random(40);
obj._y = 0;
}
j++;
}
};
createGift = function (xx, yy) {
giftCount++;
obj = levelmap.attachMovie("gift" + currskin, "gift" + giftCount, levelmap.getNextHighestDepth());
obj._x = xx;
obj._y = yy;
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;
interback._visible = false;
};
openMenu = function (info) {
opt.tar = info;
opt.close = true;
opt.ads1.gotoAndStop(1);
opt.ads2.gotoAndStop(2);
if (info == "exit") {
gumtitle.gotoAndStop(1);
interback._visible = false;
} else {
if ((((info == "win") || (info == "def")) || (info == "upgr")) || (info == "congrat")) {
if (gumtitle._currentframe != 1) {
gumtitle.gotoAndPlay("off");
}
} else if (gumtitle._currentframe == 1) {
gumtitle.gotoAndPlay(2);
}
interback._visible = true;
}
};
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 () {
return(true);
};
initUpgr = function (type) {
_root.money = _root.money + 0;
_root.pearls = _root.pearls + 0;
i = 1;
while (i < 20) {
z = opt["u" + i];
if (type == true) {
z.timer = 10 - Math.round((z._x + z._y) / 40);
z._visible = false;
}
z.title = upgr[i][1];
z.desc._visible = false;
z.lvl = upgr[0][i];
if (i > 11) {
maxupgr = 6;
} else if (stat[13] > 34) {
maxupgr = 6;
} else {
maxupgr = 4;
}
if (upgrok[i] > maxlvl) {
z.gotoAndStop(6);
z.desc.txt.text = ("Complete Level " + upgrok[i]) + " to Unlock it";
} else if (i > 15) {
z.gotoAndStop(2);
z.price.gotoAndStop(2);
z.cost = Math.round(upgr[i][0]);
z.desc.txt.text = (upgr[i][2] + " Have: ") + powerup[i - 15];
} else {
if (upgr[0][i] == maxupgr) {
z.gotoAndStop(5);
}
z.price.gotoAndStop(1);
z.cost = Math.round((upgr[i][0] * upgr[0][i]) * (upgr[0][i] / 2));
z.desc.txt.text = upgr[i][2];
}
if (z._currentframe < 5) {
z.id = i;
if (z.price._currentframe == 1) {
if (z.cost > _root.money) {
z.gotoAndStop(3);
} else {
z.gotoAndStop(1);
}
} else {
z.star._visible = false;
if (z.cost > _root.pearls) {
z.gotoAndStop(4);
} else {
z.gotoAndStop(2);
}
}
}
if (maxupgr == 6) {
z.star.gotoAndStop(z.lvl);
} else {
z.star.gotoAndStop(z.lvl + 10);
}
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);
upgr[0][z.id]++;
setStat(4, getUpgrDone());
kongsend("stat4", stat[4]);
my_so.data.upgr = upgr[0];
} else {
pearls = Math.round(pearls - z.cost);
powerup[z.id - 15]++;
}
saveStat();
initUpgr();
};
getUpgrDone = function () {
z = 0;
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];
z._visible = true;
z.timer = 0;
z.desc.text = _root.atxt[i][j];
z.desc._visible = false;
z.ii = i;
z.jj = j;
z.gotoAndStop(1);
if (_root.gachi[i][j] == -1) {
z.img.gotoAndStop(j + 1);
z.img.img.gotoAndStop(i + 1);
z.img.perctxt._visible = false;
} else {
if ((i == 13) & (j == 0)) {
z.img.gotoAndStop(5);
} else {
z.img.gotoAndStop(4);
}
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.timer = 10 + (newachi.length * 15);
z._visible = false;
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_chest2 = new Sound(_root);
snd_chest2.attachSound("vchest2");
var snd_chest3 = new Sound(_root);
snd_chest3.attachSound("vchest3");
var snd_mine = new Sound(_root);
snd_mine.attachSound("vmine");
var snd_subfailed = new Sound(_root);
snd_subfailed.attachSound("subfailed");
var snd_santa = new Sound(_root);
snd_santa.attachSound("santa");
var snd_rockexplo = new Sound(_root);
snd_rockexplo.attachSound("rockexplo");
var snd_fireball = new Sound(_root);
snd_fireball.attachSound("sfireball");
var snd_mines = new Sound(_root);
snd_mines.attachSound("smines");
var snd_rocket = new Sound(_root);
snd_rocket.attachSound("srocket");
var snd_torpedo = new Sound(_root);
snd_torpedo.attachSound("storpedo");
var snd_nuke = new Sound(_root);
snd_nuke.attachSound("snuke");
var snd_coin = new Sound(_root);
snd_coin.attachSound("scoin");
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);
};
spikeTest = function (obj) {
if (_root.spiketimer > 0) {
killUnit(obj);
}
};
initBomb = function () {
i = 1;
while (i <= 4) {
z = inv.inv["b" + i];
z.costtxt.text = "x" + powerup[i];
if (powerup[i] > 0) {
z.gotoAndStop(1);
} else {
z.gotoAndStop("lock");
}
i++;
}
};
testBomb = function (num) {
i = 1;
while (i <= 4) {
z = inv.inv["b" + i];
if (z._currentframe < 21) {
if (powerup[i] > 0) {
if (i == num) {
z.gotoAndPlay("click");
} else {
z.gotoAndStop(1);
}
} else {
z.gotoAndStop("lock");
}
z.costtxt.text = "x" + powerup[i];
}
i++;
}
};
doPower = function (num) {
addStat(12, 1);
powerup[num]--;
switch (num) {
case 1 :
count = 2 + Math.round(4 * resmulti);
unitNeed = unitNeed + count;
while (count--) {
createUnit(1, 0);
}
break;
case 2 :
count = 1 + Math.round(2 * resmulti);
unitNeed = unitNeed + count;
while (count--) {
createUnit(11 + random(3), 0);
}
break;
case 3 :
j = 0;
while (j < bankUnit.length) {
killUnit(bankUnit[j]);
if ((bankUnit[j].type < 4) || (bankUnit[j].type == "boss")) {
bankUnit[j].kill = 1;
} else {
bankUnit[j].kill = 10 + random(10);
}
j++;
}
flashobj.gotoAndPlay(2);
playSound("nuke");
quake = 10;
break;
case 4 :
clickCount++;
if (paused != false) {
break;
}
cursor._visible = true;
}
testBomb(num);
};
launchMachine = function () {
slotchance = 5 + upgr[0][15];
pearls--;
playSound("subrandom");
machine.img.s1.gotoAndPlay(6);
machine.img.s2.gotoAndPlay(8);
machine.img.s3.gotoAndPlay(12);
if (autoslot == true) {
matimer = 9;
} else {
matimer = 30;
}
maslots = 3;
matarg = [undefined, 0, 0, 0];
if (random(20) > slotchance) {
slotwin = 0;
matarg[1] = 1 + random(8);
matarg[2] = 1 + random(8);
matarg[3] = 1 + random(8);
if ((matarg[1] == matarg[2]) && (matarg[1] == matarg[3])) {
slotwin = matarg[1];
}
} else {
slotwin = 1 + random(8);
matarg[1] = slotwin;
matarg[2] = slotwin;
matarg[3] = slotwin;
}
};
prizeEffect = function (num) {
i = 1;
while (i <= 3) {
machine.img["s" + i].eff.gotoAndPlay(2);
i++;
}
prize.gotoAndPlay(2);
prize.img.gotoAndStop(num);
};
testMachine = function () {
if (slotwin == 0) {
playSound("subfailed");
} else {
addStat(11, 1);
switch (slotwin) {
case 1 :
case 2 :
case 3 :
case 4 :
powerup[slotwin]++;
prizeEffect(slotwin);
trace(powerup.toString());
break;
case 5 :
money = money + 10;
prizeEffect(5);
prize.img.txt.text = "+10";
break;
case 6 :
money = money + 25;
prizeEffect(5);
prize.img.txt.text = "+25";
break;
case 7 :
money = money + 50;
prizeEffect(5);
prize.img.txt.text = "+50";
break;
case 8 :
pearls = pearls + 3;
prizeEffect(6);
prize.img.txt.text = "+3";
}
}
if (pearls == 0) {
opt.bb1._visible = false;
opt.bb2._visible = false;
opt.bb3._visible = false;
opt.extxt._visible = false;
opt.allcoins._visible = false;
}
saveStat();
if (opt._currentframe == 130) {
if (autoslot == true) {
if (pearls > 0) {
launchMachine();
}
}
}
};
showMoreGames = function () {
opt.bmore._visible = true;
opt.bmore.title = "Play More Games";
opt.bmore.but.onRelease = function () {
getURL (sponsorurl, "_blank");
};
opt.bscore._visible = true;
opt.bscore.title = "Like Us!";
opt.bscore.but.onRelease = function () {
getURL (faceurl, "_blank");
};
};
showInterMoreGames = function () {
if (kongapi || (maxlvl < 8)) {
inter.bmore._visible = false;
inter.bscore._visible = false;
} else {
inter.bmore._visible = true;
inter.bmore.title = "MORE GAMES";
inter.bmore.but.onPress = function () {
_root.mouseClick = true;
getURL (sponsorurl, "_blank");
};
}
};
gotoAndPlay ("controller");
Frame 25
trans.gotoAndPlay(6);
onEnterFrame = function () {
coineff._x = _xmouse;
coineff._y = _ymouse;
if (paused == false) {
if (inv._currentframe == 1) {
inv.gotoAndPlay("on");
}
if (_ymouse > 400) {
inv._alpha = 100;
} else {
inv._alpha = 50;
}
} else if (inv._currentframe == 14) {
inv.gotoAndPlay("off");
}
if (quake > 0) {
if ((quake % 1) == 0) {
levelmap._y = quake;
} else {
levelmap._y = -quake;
}
quake = quake - 0.5;
}
if (matimer > 0) {
matimer--;
if (autoslot == true) {
if ((matimer % 3) == 1) {
machine.img["s" + maslots].gotoAndStop(matarg[maslots]);
maslots--;
}
} else if ((matimer % 10) == 1) {
machine.img["s" + maslots].gotoAndStop(matarg[maslots]);
maslots--;
playSound("subselect");
if (matimer != 1) {
playSound("subrandom");
}
}
if (matimer == 0) {
testMachine();
}
}
if (spiketimer > 0) {
if (bankUnit.length > 0) {
addDelay();
spiketimer--;
} else {
spiketimer = 0;
}
if (spiketimer == 0) {
spikes.gotoAndPlay("off");
}
}
if (artitimer > 0) {
if (bankUnit.length > 0) {
addDelay();
artitimer--;
if ((artitimer % 5) == 0) {
createPart(random(resx - 100), 0, 100, "arti", levelmap, 1);
}
} else {
artitimer = 0;
}
}
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) {
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(mousex, mousey, zz._x, zz._y) < magnet) {
zz.kill = true;
zz.gotoAndStop(2);
}
}
}
i++;
}
if (combotimer > 0) {
combotimer--;
} else {
setStat(5, combocount);
if (maxcombo < combocount) {
maxcombo = combocount;
}
combocount = 0;
}
if (lvlDelay > 0) {
lvlDelay--;
} else {
if (clickCount == 0) {
if (win == 1) {
towin = true;
} else {
towin = false;
}
} else if (unitHave == unitNeed) {
towin = true;
}
if (towin != undefined) {
paused = true;
cursor._visible = false;
if (towin) {
if (generator == true) {
openMenu("win2");
} else {
openMenu("win");
}
} else if (generator == true) {
openMenu("def2");
} else {
openMenu("def");
}
}
}
}
if (congrateff > 0) {
if (congrateff > 1) {
congrateff--;
} else {
congrateff = 15;
createPart(150 + random(340), 150 + random(180), 100 + random(60), "star2", _root, 12);
}
}
};
onMouseUp = function () {
if (paused == false) {
if (cursor._visible == true) {
if (clickCount > 0) {
if (mouseClick == false) {
addDelay();
addStat(0, 1);
clickCount--;
if (clickCount == 0) {
cursor._visible = false;
}
playSound("explo");
castBreak(_xmouse * resmulti, _ymouse * resmulti, explorad);
createPart(_xmouse * resmulti, _ymouse * resmulti, explorad, "explo1", levelmap, 1);
}
}
}
}
mouseClick = false;
};
var keyListener = new Object();
Key.addListener(keyListener);
keyListener.onKeyDown = function () {
if (_root.editor == true) {
if (Key.isDown(37)) {
if (_root.curredit.count > 0) {
_root.curredit.count--;
if (_root.curredit.count == 0) {
_root.curredit.counttxt._visible = false;
_root.curredit._alpha = 50;
} else {
_root.curredit.counttxt.text = _root.curredit.count;
_root.curredit.counttxt._visible = true;
_root.curredit._alpha = 100;
}
} else {
_root.curredit.counttxt._visible = false;
_root.curredit._alpha = 50;
}
}
if (Key.isDown(39)) {
_root.curredit.count++;
_root.curredit.counttxt.text = _root.curredit.count;
_root.curredit.counttxt._visible = true;
_root.curredit._alpha = 100;
}
}
};
gotoAndStop ("game");
Frame 35
stop();
playSound("santa");
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 58 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 66 MovieClip [surr] Frame 1
rad = 30;
life = _root.surrlife;
bordx = resx - rad;
bordy = resy - rad;
dir = random(360);
x = Math.round(lengthdir_x(20, dir));
y = Math.round(lengthdir_y(20, dir));
img._rotation = -dir;
timer = 4;
onEnterFrame = function () {
if (_root.paused == false) {
_x = (_x + x);
_y = (_y + y);
if (timer) {
timer--;
} else {
timer = 4;
if (_root.oxcount < _root.oxlimit) {
_root.createPart(_x, _y, 100, "ox", _root.levelmap, 1);
}
}
if (_x > bordx) {
x = x * -1;
_xscale = (_xscale * -1);
_x = bordx;
life--;
}
if (_x < rad) {
x = x * -1;
_xscale = (_xscale * -1);
_x = rad;
life--;
}
if (_y > bordy) {
y = y * -1;
trace(_yscale);
_yscale = (_yscale * -1);
trace(_yscale);
_y = bordy;
life--;
}
if (_y < rad) {
y = y * -1;
_yscale = (_yscale * -1);
_y = rad;
life--;
}
if (life < 1) {
playSound("rockexplo");
_root.castBreak(_x, _y, _root.mineradius);
_root.createPart(_x, _y, 150, "explom", _root.levelmap, 1);
this.removeMovieClip();
}
if (_root.unitHave != _root.unitNeed) {
_root.addDelay();
}
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 73 MovieClip [starcol] Frame 12
this.removeMovieClip();
Symbol 77 MovieClip [star2] Frame 1
speed = (_xscale / 10) + random(_xscale / 10);
timer = 15 + random(10);
rot = choose(2, -2);
dir = random(360);
onEnterFrame = function () {
_rotation = (_rotation + rot);
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 {
this.removeMovieClip();
}
};
gotoAndStop(1 + random(3));
Symbol 79 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 83 MovieClip [sonic] Frame 1
_yscale = 5;
_xscale = 5;
rad = 2.5;
step = 4;
onEnterFrame = function () {
if (_root.paused == false) {
_x = (_x + (info * 15));
if (_yscale < _root.sonicrise) {
_yscale = (_yscale + 5);
_xscale = (_xscale + (5 * info));
rad = rad + 2.5;
}
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 102 MovieClip [smokepart] Frame 1
_xscale = (_xscale * choose(1, -1));
_yscale = (_yscale * choose(1, -1));
Symbol 102 MovieClip [smokepart] Frame 10
this.removeMovieClip();
Symbol 146 MovieClip [pulse] Frame 1
x = 60 + random(resx - 120);
y = 60 + random(resy - 120);
dir = point_direction(_x, _y, x, y);
step = 20 + random(20);
imgadd = 21 / step;
halfstep = Math.round(step / 2);
speed = point_distance(_x, _y, x, y) / step;
_rotation = dir;
timer = 2;
images = 0;
img.gotoAndStop(1);
onEnterFrame = function () {
if (_root.paused == false) {
images = images + imgadd;
img.gotoAndStop(Math.round(images));
step--;
if (timer) {
timer--;
} else {
_root.createPart(_x, _y, _xscale, "smokepart", _root.levelmap, 1);
timer = 2;
}
if (_root.unitHave != _root.unitNeed) {
_root.addDelay();
}
if (step) {
_x = (_x + lengthdir_x(speed, dir));
_y = (_y - lengthdir_y(speed, dir));
} else {
playSound("rockexplo");
_root.castBreak(x, y, _root.pulseradius);
_root.createPart(x, y, 150, "explom", _root.levelmap, 1);
this.removeMovieClip();
}
} else {
this.removeMovieClip();
}
};
Symbol 148 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 151 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 151 MovieClip [ox] Frame 40
gotoAndPlay (2);
Symbol 154 MovieClip [mine] Frame 1
rad = 25;
spd = 10 + random(15);
cacheAsBitmap = true;
onEnterFrame = function () {
if (_root.paused == false) {
_y = (_y + spd);
if (spd > 3) {
spd--;
if ((spd % 4) == 0) {
if (_root.oxcount < _root.oxlimit) {
_root.createPart(_x, _y, 100, "ox", _root.levelmap, 1);
}
}
}
if (_root.unitHave != _root.unitNeed) {
_root.addDelay();
}
if (_y > (resy + 20)) {
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) {
playSound("rockexplo");
_root.castBreak(_x, _y, _root.mineradius);
_root.createPart(_x, _y, 150, "explom", _root.levelmap, 1);
this.removeMovieClip();
}
}
i++;
}
} else {
this.removeMovieClip();
}
};
Symbol 161 MovieClip [light2] Frame 10
this.removeMovieClip();
Symbol 167 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 167 MovieClip [light] Frame 11
this.removeMovieClip();
Symbol 173 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 184 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 189 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 196 MovieClip [explo2] Frame 13
this.removeMovieClip();
Symbol 217 MovieClip [explo1] Frame 19
this.removeMovieClip();
Symbol 242 MovieClip [explom] Frame 13
this.removeMovieClip();
Symbol 249 MovieClip [explo] Frame 13
this.removeMovieClip();
Symbol 269 MovieClip [dedswim] Frame 1
timer = 10;
onEnterFrame = function () {
_y = (_y - 4);
if (_y < -60) {
this.removeMovieClip();
}
if (timer == 0) {
timer = 10;
if (_root.oxcount < _root.oxlimit) {
_root.createPart(_x, _y - 50, 100, "ox", _root.levelmap, 1);
}
} else {
timer--;
}
};
Symbol 273 MovieClip [star3] Frame 1
speed = (_xscale / 15) + random(_xscale / 15);
timer = 15 + random(10);
dir = random(360);
onEnterFrame = function () {
if (speed > 2) {
_x = (_x + lengthdir_x(speed, dir));
_y = (_y + lengthdir_y(speed, dir));
speed = speed - 0.5;
}
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
_yscale = (_yscale - 8);
_xscale = (_yscale - 8);
}
} else {
this.removeMovieClip();
}
};
gotoAndStop(1 + random(3));
Symbol 276 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 299 MovieClip [boom] Frame 12
this.removeMovieClip();
Symbol 315 MovieClip [arti] Frame 1
rad = 20;
x = 1;
y = 5;
timer = 3;
onEnterFrame = function () {
if (_root.paused == false) {
_x = (_x + x);
_y = (_y + y);
if (timer) {
timer--;
} else {
x = x + 0.2;
y = y + 1;
timer = 3;
if (_root.oxcount < _root.oxlimit) {
_root.createPart(_x - 10, _y - 37, 100, "ox", _root.levelmap, 1);
}
}
if (_root.unitHave != _root.unitNeed) {
_root.addDelay();
}
if (_y > (resy + 40)) {
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) {
playSound("rockexplo");
_root.castBreak(_x, _y, _root.artiradius);
_root.createPart(_x, _y, 150, "explom", _root.levelmap, 1);
this.removeMovieClip();
}
}
i++;
}
} else {
this.removeMovieClip();
}
};
Symbol 370 MovieClip Frame 1
if (_root.opt._currentframe == 12) {
gotoAndStop(_parent._parent._currentframe);
} else {
gotoAndStop(_parent._parent._currentframe - 3);
}
Symbol 372 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);
y = lengthdir_y(_root.unitspeed, dir);
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 372 MovieClip [unit] Frame 2
rad = 25;
Symbol 372 MovieClip [unit] Frame 3
rad = 30;
Symbol 372 MovieClip [unit] Frame 4
rad = 25;
Symbol 372 MovieClip [unit] Frame 5
rad = 25;
Symbol 372 MovieClip [unit] Frame 6
rad = 25;
Symbol 372 MovieClip [unit] Frame 7
rad = 25;
Symbol 372 MovieClip [unit] Frame 8
rad = 25;
Symbol 372 MovieClip [unit] Frame 9
rad = 25;
Symbol 372 MovieClip [unit] Frame 10
rad = 25;
Symbol 372 MovieClip [unit] Frame 11
rad = 25;
Symbol 372 MovieClip [unit] Frame 12
rad = 25;
Symbol 372 MovieClip [unit] Frame 13
rad = 25;
Symbol 372 MovieClip [unit] Frame 14
rad = 25;
Symbol 372 MovieClip [unit] Frame 15
rad = 30;
Symbol 372 MovieClip [unit] Frame 16
rad = 30;
Symbol 398 MovieClip [submar] Frame 1
stop();
giftcount = life * 3;
img._xscale = (img._yscale = 100 + (10 * life));
rad = img._xscale / 2;
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 = 10 + random(10);
kill = undefined;
timer = 15;
onEnterFrame = function () {
if (timer == 0) {
timer = 15;
if (_root.oxcount < _root.oxlimit) {
_root.createPart(_x, _y - 50, 100, "ox", _root.levelmap, 1);
}
} else {
timer--;
}
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 (_y < rad) {
y = y * -1;
_y = rad;
_root.spikeTest(this);
}
if (kill > 0) {
x = x * 0.9;
y = y * 0.9;
if (kill == 1) {
life--;
_root.addDelay();
_root.castBreak(_x, _y, rad + 30);
playSound("chest", "chest2", "chest3");
_root.createPart(_x, _y, 100, "hulk1", _root.levelmap, 8);
if (life > 0) {
dir = random(360);
x = lengthdir_x(_root.unitspeed, dir) * choose(1, -1);
y = lengthdir_y(_root.unitspeed, -dir) * choose(1, -1);
kill = undefined;
spdx = 3;
img.gotoAndStop(1);
img._xscale = (img._yscale = 100 + (10 * life));
rad = img._xscale / 2;
bordx = resx - rad;
bordy = resy - rad;
} else {
addStat(10, 1);
_root.unitNeed--;
_root.addDelay();
_root.subHave++;
_root.win = 1;
_root.inter.sub.gotoAndPlay(2);
_root.createPart(_x, _y, 100, "dedswim", _root.levelmap, 1);
_root.createPart(_x, _y, 60, "explo1", _root.levelmap, 1);
playSound("star");
playSound("santa");
while (giftcount--) {
_root.createGift(_x, _y);
}
_root.dieItem(this);
}
} else {
kill--;
}
}
};
Symbol 401 MovieClip [scoreobj] Frame 35
this.removeMovieClip();
Symbol 402 MovieClip [mineobj] 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 402 MovieClip [mineobj] Frame 12
stop();
Symbol 409 MovieClip Frame 1
gotoAndStop(1 + random(5));
_y = (-random(10));
_xscale = choose(100, -100);
Symbol 413 MovieClip Frame 1
gotoAndStop(_parent.num);
Symbol 414 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 414 MovieClip [gift5] Frame 2
img.img.stop();
Symbol 436 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 436 MovieClip [gift4] Frame 2
img.stop();
Symbol 486 MovieClip Frame 1
gotoAndStop(_parent.num);
Symbol 487 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 487 MovieClip [gift3] Frame 2
img.stop();
Symbol 505 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 505 MovieClip [gift2] Frame 2
img.stop();
Symbol 539 MovieClip Frame 1
gotoAndStop(_parent.num);
Symbol 540 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 540 MovieClip [gift1] Frame 2
img.img.stop();
Symbol 578 MovieClip Frame 1
gotoAndStop(_parent.num);
Symbol 579 MovieClip [gift0] Frame 1
stop();
_root.giftNeed++;
rad = 15;
vspeed = (-10 - random(30)) / 10;
hspeed = (5 + random(15)) / choose(10, -10);
bordx = resx - rad;
bordy = resy + rad;
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 > bordy) {
_root.dieGift(this);
}
if ((_x > bordx) || (_x < rad)) {
hspeed = hspeed * -1;
}
} else if (_root.paused == false) {
if (delay == 15) {
_root.coineff.gotoAndPlay(2);
playSoundLim("coin1", "coin2", "coin3", "coin4");
addStat(2, 1);
_root.giftHave++;
_root.levelmap.player.img.gotoAndPlay(11);
_root.dieGift(this);
} else {
delay++;
}
dist = point_distance(_x, _y, _root.mousex, _root.mousey);
if (dist < rad) {
_root.coineff.gotoAndPlay(2);
playSoundLim("coin1", "coin2", "coin3", "coin4");
addStat(2, 1);
_root.giftHave++;
_root.levelmap.player.img.gotoAndPlay(11);
_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 579 MovieClip [gift0] Frame 2
img.img.stop();
Symbol 611 MovieClip [chest] Frame 1
stop();
rad = 20;
killtime = 1;
kill = undefined;
onEnterFrame = function () {
if (kill > 0) {
addStat(9, 1);
_root.coins++;
_root.chestHave++;
_root.createPart(_x, _y, 80 + random(40), "star3", _root.levelmap, 8);
_root.createPart(_x, _y, 100, "starcol", _root.levelmap, 1);
playSound("coin");
_root.dieItem(this);
}
};
Symbol 625 MovieClip Frame 1
stop();
Symbol 633 MovieClip Frame 1
stop();
Symbol 638 MovieClip Frame 1
stop();
Symbol 640 MovieClip Frame 1
stop();
Symbol 648 MovieClip Frame 1
stop();
timer = 30 + random(30);
onEnterFrame = function () {
if (timer) {
timer--;
} else {
gotoAndPlay (2);
onEnterFrame = null;
}
};
Symbol 658 Button
on (release) {
getURL (sponsorurl, "_blank");
}
Symbol 669 MovieClip Frame 1
_root.stop();
gotoAndPlay (2);
Symbol 669 MovieClip Frame 225
_root.nextFrame();
Symbol 680 MovieClip Frame 86
_root.gotoAndStop(5);
Symbol 687 MovieClip Frame 1
stop();
Symbol 687 MovieClip Frame 9
stop();
Symbol 696 MovieClip Frame 1
stop();
Symbol 696 MovieClip Frame 16
playSound("portalout");
Symbol 696 MovieClip Frame 24
stop();
Symbol 711 MovieClip Frame 1
stop();
Symbol 712 MovieClip Frame 1
stop();
Symbol 712 MovieClip Frame 21
gotoAndPlay ("play");
Symbol 714 MovieClip Frame 1
stop();
_visible = false;
Symbol 714 MovieClip Frame 2
_visible = true;
Symbol 714 MovieClip Frame 43
gotoAndPlay ("idle");
Symbol 719 MovieClip Frame 1
onEnterFrame = function () {
_x = _root._xmouse;
_y = _root._ymouse;
_root.hint._visible = _visible;
};
Symbol 725 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 729 Button
on (rollOver) {
playSound("mouseon");
}
Symbol 737 MovieClip Frame 1
stop();
Symbol 744 MovieClip Frame 1
stop();
Symbol 744 MovieClip Frame 29
stop();
Symbol 750 Button
on (rollOver) {
playSound("mouseon");
}
on (release) {
playSound("click");
}
Symbol 758 MovieClip Frame 1
_root.showMoreGames();
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 771 MovieClip Frame 1
stop();
Symbol 771 MovieClip Frame 3
lvltext.text = _root.lvl;
Symbol 772 MovieClip Frame 1
stop();
Symbol 772 MovieClip Frame 2
play();
if (_root.flawless == true) {
img.gotoAndStop(2);
} else {
img.gotoAndStop(3);
}
Symbol 777 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 787 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 794 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 799 MovieClip Frame 1
onEnterFrame = function () {
if (timer > 0) {
timer--;
} else if (_xscale < 100) {
_xscale = (_xscale + 20);
_yscale = _xscale;
_alpha = _xscale;
}
};
Symbol 811 Button
on (rollOver) {
playSound("mouseon");
}
on (release) {
playSound("click");
}
Symbol 816 Button
on (rollOver) {
playSound("mouseon");
}
on (release) {
playSound("click");
}
Symbol 823 MovieClip Frame 1
stop();
b1.title = "ENDLESS MODE";
b1.but.onRelease = function () {
playSound("click");
};
Symbol 823 MovieClip Frame 2
b1.title = "ENDLESS MODE";
b1.but.onRelease = function () {
_root.openMenu("hard");
};
Symbol 827 Button
on (rollOver) {
playSound("mouseon");
}
on (release) {
playSound("click");
}
Symbol 834 MovieClip Frame 1
stop();
Symbol 851 Button
on (rollOut) {
desc._visible = false;
}
on (rollOver) {
desc._visible = true;
playSound("mouseon");
}
on (press) {
_root.doUpgr(this);
}
Symbol 866 MovieClip Frame 1
stop();
Symbol 885 MovieClip Frame 1
stop();
Symbol 888 MovieClip Frame 1
stop();
Symbol 890 Button
on (rollOut) {
desc._visible = false;
}
on (rollOver) {
desc._visible = true;
playSound("mouseon");
}
on (press) {
_root.doUpgr(this);
}
Symbol 898 MovieClip Frame 1
onEnterFrame = function () {
if (_visible == false) {
if (timer > 0) {
timer--;
} else {
_visible = true;
_alpha = 0;
_yscale = 0;
_xscale = 0;
}
} else if (_xscale < 100) {
_alpha = (_alpha + alpha);
_xscale = (_xscale + 20);
_yscale = _xscale;
}
};
alpha = 20;
_alpha = 100;
Symbol 898 MovieClip Frame 2
alpha = 20;
_alpha = 100;
Symbol 898 MovieClip Frame 3
alpha = 10;
_alpha = 50;
Symbol 898 MovieClip Frame 4
alpha = 10;
_alpha = 50;
Symbol 898 MovieClip Frame 5
alpha = 20;
_alpha = 100;
Symbol 898 MovieClip Frame 6
alpha = 10;
_alpha = 50;
Symbol 911 Button
on (rollOver) {
desc._visible = true;
}
on (rollOut) {
desc._visible = false;
}
Symbol 928 MovieClip Frame 1
stop();
Symbol 932 MovieClip Frame 1
stop();
timer = random(90);
onEnterFrame = function () {
if (timer > 0) {
timer--;
} else {
timer = 60 + random(60);
gotoAndPlay (2);
}
};
Symbol 935 MovieClip Frame 4
stop();
Symbol 935 MovieClip Frame 5
stop();
Symbol 937 MovieClip Frame 1
stop();
desc._visible = false;
onEnterFrame = function () {
if (timer > 0) {
timer--;
if (timer == 1) {
_visible = true;
playSound("star");
img.gotoAndStop(jj + 1);
img.img.gotoAndStop(ii + 1);
gotoAndPlay (2);
if (ii == 13) {
_root.addpearl = _root.addpearl + 10;
} else {
_root.addpearl = _root.addpearl + (jj + 1);
}
_root.prize.gotoAndPlay(2);
_root.prize.img.gotoAndStop(6);
_root.prize.img.txt.text = "+" + _root.addpearl;
_root.createPart(_x + 320, _y + 240, 60 + random(21), "star2", _root, 6);
}
}
};
Symbol 941 MovieClip Frame 1
onEnterFrame = function () {
if (_xscale > 100) {
_yscale = (_yscale - 3);
_xscale = (_yscale - 3);
}
};
Symbol 946 MovieClip Frame 1
stop();
Symbol 953 MovieClip Frame 1
stop();
Symbol 956 MovieClip Frame 1
stop();
Symbol 956 MovieClip Frame 2
img.gotoAndStop(_parent.id);
Symbol 957 MovieClip Frame 1
stop();
img.gotoAndStop(id);
onEnterFrame = function () {
if (timer > 0) {
timer--;
if (timer == 1) {
_alpha = 100;
gotoAndPlay (3);
playSound("star");
if ((id == 3) && (_parent.starcount == 3)) {
playSound("holy");
}
_root.createPart(_x + 320, _y + 240, 120 + random(40), "star2", _root, 12);
}
}
if (efftimer) {
efftimer--;
if (efftimer == 1) {
eff.gotoAndPlay(2);
efftimer = 60;
}
}
};
Symbol 957 MovieClip Frame 2
img.gotoAndStop(id);
Symbol 957 MovieClip Frame 3
img.gotoAndStop(id);
Symbol 957 MovieClip Frame 10
gotoAndStop (2);
Symbol 963 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (timer > 0) {
timer--;
if (timer == 1) {
gotoAndPlay (2);
playSound("pickup");
}
}
};
Symbol 963 MovieClip Frame 12
stop();
Symbol 978 Button
on (rollOver) {
playSound("mouseon");
}
on (release) {
playSound("click");
}
Symbol 984 Button
on (rollOver) {
playSound("mouseon");
}
on (release) {
playSound("click");
getURL (devurl, "_blank");
}
Symbol 992 Button
on (rollOver) {
_root.play_on.start();
}
on (release) {
getURL ("http://www.silengames.com", "_blank");
_root.play_pre.start();
}
Symbol 1033 MovieClip Frame 1
rad = 20;
stop();
img.gotoAndStop(1);
Symbol 1033 MovieClip Frame 2
rad = 25;
Symbol 1033 MovieClip Frame 3
rad = 30;
Symbol 1033 MovieClip Frame 4
rad = 25;
Symbol 1033 MovieClip Frame 5
rad = 25;
Symbol 1033 MovieClip Frame 6
rad = 25;
Symbol 1033 MovieClip Frame 7
rad = 25;
Symbol 1033 MovieClip Frame 8
rad = 25;
Symbol 1033 MovieClip Frame 9
rad = 25;
Symbol 1033 MovieClip Frame 10
rad = 25;
Symbol 1033 MovieClip Frame 11
rad = 25;
Symbol 1033 MovieClip Frame 12
rad = 25;
Symbol 1033 MovieClip Frame 13
rad = 25;
Symbol 1033 MovieClip Frame 14
rad = 25;
Symbol 1033 MovieClip Frame 15
rad = 30;
Symbol 1033 MovieClip Frame 16
rad = 30;
Instance of Symbol 1033 MovieClip "img" in Symbol 1035 MovieClip Frame 1
on (rollOver) {
_root.curredit = _parent;
trace(_root.curredit);
}
on (rollOut) {
_root.curredit = undefined;
trace(_root.curredit);
}
Symbol 1042 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(180, -130, 100, "star", this, 1);
} else {
timer--;
if (timer == 10) {
_root.createPart(-250, -125, 100, "star", this, 1);
}
}
}
};
Symbol 1042 MovieClip Frame 2
getGachiCount();
totalscore.text = _root.totalscore;
if (_root.maxlvl > _root.alllvl) {
sh.gotoAndStop(2);
} else {
sh.gotoAndStop(1);
}
_root.showMoreGames();
b1.title = "Upgrade Shop";
b2.title = ("Awards " + _root.gachis) + "/35";
b5.title = "Back to Menu";
b6.title = "Endless Mode";
b7.title = "Level Editor";
b1.but.onRelease = function () {
menuback = "select";
_root.openMenu("upgr");
};
b2.but.onRelease = function () {
menuback = "select";
_root.openMenu("achi");
};
b4.but.onRelease = function () {
getURL (scoreurl, "_blank");
};
b5.but.onRelease = function () {
_root.openMenu("main");
};
b7.but.onRelease = function () {
_root.openMenu("edit");
};
n1.but.onRelease = function () {
page--;
showLevels();
};
n2.but.onRelease = function () {
page++;
showLevels();
};
stat_star = _root.stat[7];
stat_lvl = _root.stat[6];
if (_root.lvl == 0) {
page = Math.min(3, Math.ceil(_root.maxlvl / 15));
} else {
page = Math.min(3, Math.ceil(_root.lvl / 15));
}
showLevels = function () {
pageimg.gotoAndStop(page);
n1._visible = true;
n2._visible = true;
if (page == 1) {
n1._visible = false;
}
if (page == 3) {
n2._visible = false;
}
j = 1;
while (j <= 15) {
z = this["l" + j];
z._xscale = 0;
z.timer = j;
i = ((page - 1) * 15) + j;
z.id = i;
if (i > _root.maxlvl) {
z.gotoAndStop(4);
} else if (i == _root.maxlvl) {
z.gotoAndStop(1);
} else {
levelstars = (_root.lvlmedal[i][1] + _root.lvlmedal[i][2]) + _root.lvlmedal[i][3];
if (levelstars == 3) {
z.gotoAndStop(3);
} else {
z.gotoAndStop(2);
}
k = 1;
while (k < 4) {
if (_root.lvlmedal[i][k] == 1) {
z["s" + k].gotoAndStop(2);
} else {
z["s" + k].gotoAndStop(1);
}
k++;
}
}
if (_root.lvlrec[i] != undefined) {
z.rec.txt.text = _root.lvlrec[i];
z.rec._visible = false;
}
j++;
}
};
showLevels();
if (_root.kongapi == true) {
i = 0;
while (i < 14) {
_root.kongsend("stat" + i, _root.stat[i]);
i++;
}
}
Symbol 1042 MovieClip Frame 12
getGachiCount();
_root.initUpgr(true);
playSound("menuon");
if (_root.stat[11] < 1) {
hintbonus._visible = true;
} else {
hintbonus._visible = false;
}
if ((_root.stat[4] == 53) && (_root.stat[13] < 35)) {
moreupgr._visible = true;
} else {
moreupgr._visible = false;
}
_root.showMoreGames();
switch (menuback) {
case "exit" :
b1.title = "CONTINUE";
break;
case "main" :
b1.title = "MAIN MENU";
break;
case "select" :
b1.title = "SELECT LEVEL";
}
b3.title = "SLOT GAME";
b1.but.onRelease = function () {
if (menuback == "exit") {
_root.lvl++;
_root.trans.gotoAndPlay(2);
} else {
_root.openMenu(menuback);
}
};
b3.but.onRelease = function () {
_root.openMenu("slot");
};
Symbol 1042 MovieClip Frame 22
getGachiCount();
_root.initAchi();
switch (menuback) {
case "exit" :
b1.title = "CONTINUE";
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 1042 MovieClip Frame 32
playSound("win");
_root.flashobj.gotoAndStop(1);
leveltxt.text = ("LEVEL " + _root.lvl) + " CLEARED!";
s1.txt.text = "FREE SANTA";
s2.txt.text = "GET ALL COINS";
s3.txt.text = "BURN EVERY THING";
i = 1;
while (i < 4) {
zz = this["s" + i];
zz.id = i;
zz.gotoAndStop(_root.lvlmedal[_root.lvl][i] + 1);
zz.timer = 0;
zz.img.gotoAndStop(id);
if (_root.lvlmedal[_root.lvl][i] == 0) {
zz.txt._visible = true;
zz._alpha = 100;
} else {
zz.txt._visible = false;
zz._alpha = 30;
}
i++;
}
stars = [0, 0, 0, 0];
starcount = 0;
if (_root.subHave == _root.subNeed) {
starcount++;
stars[1] = 1;
s1.timer = (15 * starcount) + 15;
}
if (_root.chestHave == _root.chestNeed) {
starcount++;
stars[2] = 1;
s2.timer = (15 * starcount) + 15;
}
if (_root.unitHave == _root.unitNeed) {
starcount++;
stars[3] = 1;
s3.timer = (15 * starcount) + 15;
}
s1.efftimer = (15 * starcount) + 20;
s2.efftimer = (15 * starcount) + 25;
s3.efftimer = (15 * starcount) + 30;
bonus1 = starcount * 1500;
bonus2 = _root.score;
bonus3 = _root.clickCount * 1000;
bonus4 = _root.maxcombo * 20;
levelscore = 0;
levelscore = levelscore + (((bonus1 + bonus2) + bonus3) + bonus4);
scoretxt.text = levelscore;
recvase.gotoAndStop(1);
recvase.timer = 0;
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;
recvase.timer = (15 * starcount) + 30;
}
_root.totalscore = _root.totalscore + totaladd;
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.pearls = _root.pearls + _root.chestHave;
_root.money = _root.money + _root.giftHave;
if (_root.kongapi == true) {
i = 0;
while (i < 14) {
_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();
_root.showMoreGames();
b1.title = "CONTINUE";
b2.title = "Replay Level";
b3.title = "Select Level";
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");
};
b6.but.onRelease = function () {
getURL (hosturl, "_blank");
};
Symbol 1042 MovieClip Frame 42
leveltxt.text = ("LEVEL " + _root.lvl) + " CLEARED!";
unitNeed.text = "/" + _root.unitNeed;
giftNeed.text = "/" + _root.giftNeed;
unitHave.text = _root.unitHave;
giftHave.text = _root.giftHave;
bonus1 = _root.clickCount * 1000;
bonus2 = _root.maxcombo * 20;
_root.score = _root.score + (bonus1 + bonus2);
clickleft.text = bonus1;
maxcombo.text = bonus2;
trace(Math.round((_root.score * _root.diff) * _root.diff));
levelgenscore.text = Math.round((_root.score * _root.diff) * _root.diff);
trace(Math.round((_root.score * _root.diff) * _root.diff));
playSound("win");
_root.showMoreGames();
b11.title = "CONTINUE";
b2.title = "Submit Score";
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 () {
};
b3.but.onRelease = function () {
getURL (sponsorurl, "_blank");
};
b4.but.onRelease = function () {
_root.openMenu("main");
};
recvase.gotoAndStop(1);
recvase.timer = 0;
_root.genscore = _root.genscore + Math.round((_root.score * _root.diff) * _root.diff);
genscore.text = _root.genscore;
_root.pearls = _root.pearls + _root.chestHave;
_root.money = _root.money + _root.giftHave;
if (_root.genscore > _root.totalgenscore) {
_root.totalgenscore = _root.genscore;
recvase.timer = 30;
_root.kongsend("genscore", _root.genscore);
_root.kongsend("genlvl", _root.lvl);
}
saveStat();
Symbol 1042 MovieClip Frame 52
playSound("def");
_root.flashobj.gotoAndStop(1);
leveltxt.text = ("LEVEL " + _root.lvl) + " FAILED!";
_root.pearls = _root.pearls + _root.chestHave;
_root.money = _root.money + _root.giftHave;
if (((_root.pearls >= 10) && (_root.lvl == _root.maxlvl)) && (_root.lvl != _root.alllvl)) {
bpass._visible = true;
tpass._visible = true;
} else {
bpass._visible = false;
tpass._visible = false;
}
if ((_root.lvl != _root.alllvl) && (_root.lvl < _root.maxlvl)) {
bpass._visible = true;
}
_root.showMoreGames();
b1.title = "TRY AGAIN";
b2.title = "Walkthrough";
b3.title = "Level Select";
b4.title = "Upgrade Shop";
b6.title = "Download Game";
bpass.title = "Pass Level";
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");
};
bpass.but.onRelease = function () {
if (_root.lvl == _root.maxlvl) {
_root.pearls = _root.pearls - 10;
_root.maxlvl++;
_root.my_so.data.maxlvl = _root.maxlvl;
saveStat();
}
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);
}
};
saveStat();
Symbol 1042 MovieClip Frame 62
playSound("def");
genscore.text = _root.genscore;
if (_root.pearls >= 10) {
bpass._visible = true;
tpass._visible = true;
} else {
bpass._visible = false;
tpass._visible = false;
}
_root.showMoreGames();
b1.title = "TRY AGAIN";
b3.title = "Main Menu";
bpass.title = "PASS LEVEL";
b1.but.onRelease = function () {
_root.trans.gotoAndPlay(2);
};
b2.but.onRelease = function () {
getURL (sponsorurl, "_blank");
};
b3.but.onRelease = function () {
_root.openMenu("main");
};
bpass.but.onRelease = function () {
_root.pearls = _root.pearls - 10;
_root.newgen = true;
if (_root.testUpgr() == true) {
menuback = "exit";
_root.openMenu("upgr");
} else {
_root.lvl++;
_root.trans.gotoAndPlay(2);
}
saveStat();
};
Symbol 1042 MovieClip Frame 72
playSound("menuon");
_root.showMoreGames();
b1.title = "PLAY GAME";
b2.title = "Play Icy Gifts 1";
b3.title = "Credits";
b5.title = "Clear Save";
b6.title = "Download Game";
b1.but.onRelease = function () {
_root.openMenu("select");
};
b2.but.onRelease = function () {
getURL (giftsurl, "_blank");
};
b3.but.onRelease = function () {
_root.openMenu("credit");
};
b5.but.onRelease = function () {
_root.openMenu("clear");
};
b6.but.onRelease = function () {
getURL (hosturl, "_blank");
};
Symbol 1042 MovieClip Frame 82
playSound("menuon");
b1.title = "MAIN MENU";
b1.but.onRelease = function () {
_root.openMenu("main");
};
Symbol 1042 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 1042 MovieClip Frame 102
b1.title = "CLEAR!";
b2.title = "Cancel";
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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
_root.powerup = [undefined, 0, 0, 0, 0];
_root.money = 0;
_root.pearls = 0;
_root.totalscore = 0;
_root.totalgenscore = 0;
_root.my_so.data.maxlvl = 1;
_root.my_so.data.upgr = [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
_root.my_so.data.powerup = [undefined, 0, 0, 0, 0];
_root.my_so.data.money = 0;
_root.my_so.data.pearls = 0;
_root.my_so.data.totalgenscore = 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 1042 MovieClip Frame 112
playSound("menuon");
_root.showMoreGames();
b1.title = "EASY";
b2.title = "NORMAL";
b3.title = "HARD";
b4.title = "Back";
b1.but.onRelease = function () {
_root.lvl = 1;
_root.diff = 1;
_root.genscore = 0;
_root.generator = (_root.newgen = true);
if (_root.trans._currentframe == 1) {
_root.trans.gotoAndPlay(2);
}
};
b2.but.onRelease = function () {
_root.lvl = 1;
_root.diff = 1.5;
_root.genscore = 0;
_root.generator = (_root.newgen = true);
if (_root.trans._currentframe == 1) {
_root.trans.gotoAndPlay(2);
}
};
b3.but.onRelease = function () {
_root.lvl = 1;
_root.diff = 2;
_root.genscore = 0;
_root.generator = (_root.newgen = true);
if (_root.trans._currentframe == 1) {
_root.trans.gotoAndPlay(2);
}
};
b4.but.onRelease = function () {
_root.openMenu("select");
};
Symbol 1042 MovieClip Frame 122
playSound("menuon");
_root.congrateff = 30;
if (_root.my_so.data.shmode != true) {
_root.my_so.data.shmode = true;
}
_root.showMoreGames();
b1.title = "CONTINUE";
b2.title = "Main Menu";
b1.but.onRelease = function () {
_root.congrateff = 0;
if (_root.newachi.length > 0) {
menuback = "select";
_root.openMenu("achi");
} else {
_root.openMenu("select");
}
};
b2.but.onRelease = function () {
_root.congrateff = 0;
_root.openMenu("main");
};
b3.but.onRelease = function () {
getURL (sponsorurl, "_blank");
};
Symbol 1042 MovieClip Frame 130
_root.machine.gotoAndPlay("on");
playSound("menuon");
if (_root.pearls > 0) {
bb1._visible = true;
bb2._visible = true;
bb3._visible = true;
extxt._visible = true;
allcoins._visible = true;
} else {
bb1._visible = false;
bb2._visible = false;
bb3._visible = false;
extxt._visible = false;
allcoins._visible = false;
}
if (_root.autoslot) {
allcoins.gotoAndStop(1);
} else {
allcoins.gotoAndStop(2);
}
bb1.title = "START GAME!";
bb2.title = "Exchange";
bb3.title = ". Use All Coins";
b3.title = "Cancel";
bb1.but.onRelease = function () {
if (_root.matimer == 0) {
_root.launchMachine();
}
};
bb2.but.onRelease = function () {
if (_root.pearls > 0) {
playSound("shop");
_root.prize.gotoAndPlay(2);
_root.prize.img.gotoAndStop(5);
if (_root.autoslot) {
_root.money = _root.money + (5 * _root.pearls);
_root.prize.img.txt.text = "+" + (5 * _root.pearls);
_root.pearls = 0;
} else {
_root.pearls--;
_root.money = _root.money + 5;
_root.prize.img.txt.text = "+5";
}
if (_root.pearls == 0) {
bb1._visible = false;
bb2._visible = false;
bb3._visible = false;
extxt._visible = false;
allcoins._visible = false;
}
saveStat();
}
};
bb3.but.onRelease = function () {
if (_root.autoslot) {
_root.autoslot = false;
allcoins.gotoAndStop(2);
} else {
_root.autoslot = true;
allcoins.gotoAndStop(1);
}
};
b3.but.onRelease = function () {
_root.machine.gotoAndPlay("off");
_root.openMenu("upgr");
};
Symbol 1042 MovieClip Frame 139
playSound("menuon");
_root.editor = true;
b1.title = "Save Maps";
b2.title = "Next";
b3.title = "Cancel";
b1.but.onRelease = function () {
saveEditor();
};
b2.but.onRelease = function () {
if (lvlm == 40) {
lvlm = 0;
} else {
lvlm = lvlm + 10;
}
initEditor();
};
b3.but.onRelease = function () {
_root.editor = false;
_root.openMenu("select");
};
lvlm = 0;
initEditor = function () {
i = 1;
while (i <= 10) {
ii = this["e" + i];
currlvl = i + lvlm;
ii.lvl.text = currlvl;
ii.res.text = _root.map[currlvl][0];
ii.life.text = _root.map[currlvl][17];
j = 1;
while (j <= 16) {
jj = ii["b" + j];
jj.count = _root.map[currlvl][j];
if (jj.count == 0) {
jj.counttxt._visible = false;
jj._alpha = 50;
} else {
jj.counttxt._visible = true;
jj.counttxt.text = jj.count;
jj._alpha = 100;
}
jj.img.gotoAndStop(j);
jj.img._width = (jj.img._height = 36);
j++;
}
i++;
}
};
initEditor();
saveEditor = function () {
i = 1;
while (i <= 10) {
ii = this["e" + i];
_root.map[i + lvlm][0] = ii.res.text;
j = 1;
while (j <= 16) {
jj = ii["b" + j];
_root.map[i + lvlm][j] = jj.count;
j++;
}
_root.map[i + lvlm][17] = ii.life.text;
_root.my_so.data["map" + i] = _root.map[i];
trace(((("map[" + (i + lvlm)) + "] = [") + _root.map[i + lvlm]) + "];");
i++;
}
_root.my_so.flush();
};
Symbol 1065 MovieClip Frame 1
stop();
Symbol 1066 MovieClip Frame 1
_visible = false;
stop();
Symbol 1066 MovieClip Frame 2
_visible = true;
playSound("sparkle1");
Symbol 1070 MovieClip Frame 1
stop();
Symbol 1070 MovieClip Frame 2
play();
Symbol 1073 Button
on (rollOver) {
playSound("mouseon");
gotoAndPlay ("over");
}
on (rollOut) {
gotoAndPlay ("out");
}
on (press) {
_root.mouseClick = true;
_root.nobombs = false;
if (_root.paused == false) {
_root.doPower(id);
playSound("pickup");
}
}
Symbol 1074 MovieClip Frame 1
stop();
Symbol 1078 Button
on (press) {
_root.mouseClick = true;
}
Symbol 1079 MovieClip Frame 1
stop();
Symbol 1079 MovieClip Frame 6
stop();
Symbol 1079 MovieClip Frame 11
gotoAndStop (1);
Symbol 1079 MovieClip Frame 12
play();
Symbol 1079 MovieClip Frame 19
gotoAndStop (6);
Symbol 1081 MovieClip Frame 1
i = 1;
while (i <= 4) {
z = this["b" + i];
z.icon.gotoAndStop(i);
z.id = i;
z.desc = _root.powerdesc[i];
i++;
}
Symbol 1082 MovieClip Frame 1
stop();
_visible = false;
Symbol 1082 MovieClip Frame 7
_visible = true;
Symbol 1082 MovieClip Frame 14
stop();
Symbol 1086 MovieClip Frame 1
stop();
Symbol 1086 MovieClip Frame 5
_root.paused = true;
Symbol 1086 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 1090 MovieClip Frame 1
stop();
Symbol 1095 MovieClip Frame 1
stop();
_visible = false;
Symbol 1095 MovieClip Frame 2
_visible = true;
playSound("achi2");
Symbol 1095 MovieClip Frame 11
playSound("holy");
Symbol 1097 MovieClip Frame 1
stop();