Frame 1
mochi.as2.MochiServices.connect("8b9339de84c347e9", _root.mochiobj);
_global.sponsorurl = "http://www.andkon.com/arcade/";
_global.walkurl = "http://www.andkon.com/arcade/";
var newMenu = new ContextMenu();
newMenu.hideBuiltInItems();
newMenu.customItems.push(new ContextMenuItem("Andkon Arcade", goTo));
this.menu = newMenu;
back.gotoAndStop(1 + random(3));
back.img.back2.gotoAndStop(1 + random(8));
back.img.back3.gotoAndStop(back.img.back2._currentframe);
congrat._visible = false;
i = 1;
while (i < 20) {
_root["l" + i]._visible = false;
_root["l" + i].gotoAndPlay((i * 3) % (18 + 1));
i++;
}
percentDone = 0;
onEnterFrame = function () {
totalBytes = Math.round(_root.getBytesTotal() / 1024);
loadedBytes = Math.round(_root.getBytesLoaded() / 1024);
if (percentDone < Math.round((loadedBytes / totalBytes) * 100)) {
percentDone = percentDone + 1;
if ((percentDone % 5) == 0) {
_root["l" + (percentDone / 5)]._visible = true;
}
}
percentTxt = percentDone + "%";
if (percentDone >= 100) {
gotoAndStop("loader");
play();
}
};
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);
function goTo() {
getURL(_global.sponsorurl, "_blank");
}
function __com_mochibot__(swfid, mc, lv, trk) {
var _local13 = "__mochibot__";
var _local14 = "mochibot.com";
var _local7 = ((!_global) ? _global : (_level0._root));
if (_local7[_local13 + swfid]) {
return(_local7[_local13 + swfid]);
}
var _local8 = System.security;
var _local6 = mc._root.getSWFVersion;
var _local9 = ((!_local6) ? (mc.getSWFVersion()) : (((!_global) ? 6 : 5)));
if (_local8) {
_local8 = {};
}
var _local10 = _local8.sandboxType;
if (_local10 == "localWithFile") {
return(null);
}
_local6 = _local8.allowDomain;
if (_local6) {
_local8.allowDomain(_local14);
}
_local6 = _local8.allowInsecureDomain;
if (_local6) {
_local8.allowInsecureDomain(_local14);
}
var _local15 = ((_local9 == 5) ? (getVersion()) : (System.capabilities.version));
var _local11 = (((((((((((("http://" + _local14) + "/my/core.swf?mv=8&fv=") + _local9) + "&v=") + escape(_local15)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + ((!_local10) ? ("&sb=" + _local10) : "")) + ((!trk) ? "&t=1" : "");
lv = ((_local9 > 6) ? (mc.getNextHighestDepth()) : (((!_local7[_local13 + "level"]) ? (_local7[_local13 + "level"] + 1) : (lv))));
_local7[_local13 + "level"] = lv;
if (_local9 == 5) {
var _local12 = "_level" + lv;
if (eval (_local12)) {
getURL(_local11, "_level");
}
} else {
var _local12 = mc.createEmptyMovieClip(_local13 + swfid, lv);
_local12.loadMovie(_local11);
}
return(_local12);
}
__com_mochibot__("d0ed0727", this, 10301, true);
stop();
Instance of Symbol 380 MovieClip in Frame 1
on (release) {
getURL (sponsorurl, "_blank");
}
Frame 2
onEnterFrame = null;
currmap = [1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
map = new Array();
map[0] = [1, 20, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2];
map[1] = [0.5, 8, 0, 2, 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];
gotoAndStop ("init");
Frame 3
gachi = new Array();
gachitxt = new Array();
setGachi = function () {
gachi[0] = [1, 10, 20, 40, 70, 100, 150];
gachitxt[0] = ["Perform", "Clicks"];
gachi[1] = [20, 60, 150, 400, 800, 1500, 2500];
gachitxt[1] = ["Pop", "Bubbles"];
gachi[2] = [10, 30, 100, 400, 750, 1500, 3000];
gachitxt[2] = ["Collect", "Candies"];
gachi[3] = [3, 30, 75, 200, 350, 650, 1000];
gachitxt[3] = ["Use", "Bombs"];
gachi[4] = [1, 5, 10, 15, 25, 40, 60];
gachitxt[4] = ["Get", "Upgrades"];
gachi[5] = [15, 30, 60, 90, 120, 160, 200];
gachitxt[5] = ["Get", "Combo"];
gachi[6] = [1, 5, 10, 15, 20, 30, 40];
gachitxt[6] = ["Complete", "Level"];
gachi[7] = [5, 15, 30, 50, 70, 90, 120];
gachitxt[7] = ["Collect", "Stars"];
gachi[8] = [500, 2000, 5000, 10000, 20000, 40000, 80000];
gachitxt[8] = ["Earn", "Points"];
};
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++;
}
var my_so = SharedObject.getLocal("flying_candy", "/");
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.lvlmedal[1] = 0;
my_so.data.lvlrec = new Array();
i = 1;
while (i < 41) {
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];
my_so.data.money = 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;
maxlvl = my_so.data.maxlvl;
totalscore = 0;
if (music == false) {
ib2.gotoAndStop(2);
}
if (sound == false) {
ib1.gotoAndStop(2);
}
i = 1;
while (i < 41) {
lvlmedal[i] = my_so.data.lvlmedal[i];
lvlrec[i] = my_so.data.lvlrec[i];
if (lvlrec[i] != undefined) {
totalscore = totalscore + lvlrec[i];
}
i++;
}
i = 0;
while (i < 9) {
j = 0;
while (j < 7) {
if (my_so.data[("gachi" + i) + j] != undefined) {
gachi[i][j] = my_so.data[("gachi" + i) + j];
} else {
break;
}
j++;
}
stat[i] = my_so.data["stat" + i];
i++;
}
_global.saveStat = function () {
trace("SAVE STAT...");
i = 0;
while (i < gachi.length) {
j = 0;
while (j < gachi[i].length) {
my_so.data[("gachi" + i) + j] = gachi[i][j];
j++;
}
my_so.data["stat" + i] = stat[i];
trace((gachitxt[i][0] + "---") + my_so.data["stat" + i]);
i++;
}
trace("SAVE STAT END...");
my_so.data.sound = sound;
my_so.data.music = music;
my_so.data.maxlvl = maxlvl;
my_so.data.money = money;
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) {
if (stat[type] >= gachi[type][j]) {
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;
saveStat();
}
}
j++;
}
};
upgr = new Array();
upgr[1] = [12, "CLICK RADIUS", "Increase Click explosion radius"];
upgr[2] = [20, "BUBBLE RADIUS", "Increase explosion radius of bubbles"];
upgr[3] = [16, "BUBBLE SPEED", "Increase speed of bubbles and bombs"];
upgr[4] = [6, "CANDY MAGNET", "Increase candies collecting radius"];
upgr[5] = [16, "SHELL COUNT", "Increase amount of shells"];
upgr[6] = [8, "MINE RADIUS", "Increase explosion radius of the mine"];
upgr[7] = [14, "SPARK COUNT", "Increase amount of sparks"];
upgr[8] = [6, "PORTAL LIFETIME", "Increase amount of bubbles appearing through the portal"];
upgr[9] = [10, "ACID LIFETIME", "Increase lifetime of acid spot"];
upgr[10] = [18, "TESLA TARGETS", "Increase amount of targets of the tesla"];
upgr[11] = [12, "LASER LIFETIME", "Increase lifetime of laser beam"];
upgr[12] = [20, "WAVE RISE", "Increase size of the wave"];
upgrok = new Array();
upgrok = [0, 0, 0, 0, 0, 1, 2, 5, 6, 7, 11, 14, 18];
upgr[0] = my_so.data.upgr;
gotoAndStop ("functions");
Frame 13
generator = false;
newgen = false;
currskin = 0;
oxlimit = 50;
mouseClick = false;
bankUnit = new Array();
bankGift = new Array();
lvl = 0;
maxupgr = 6;
createLevel = function () {
if (generator == true) {
if (newgen == true) {
getGenerator();
newgen = false;
}
} else {
currmap = map[lvl];
}
resmulti = currmap[0];
explorad = 45 + (15 * upgr[0][1]);
breakrad = 35 + (10 * upgr[0][2]);
unitspeed = 1 + (0.5 * upgr[0][3]);
magnet = 50 + (25 * upgr[0][4]);
hulkcount = 2 + upgr[0][5];
mineradius = 80 + (20 * upgr[0][6]);
pulsecount = 2 + upgr[0][7];
portalcount = 4 + upgr[0][8];
toxiclife = 70 + (20 * upgr[0][9]);
cryshot = upgr[0][10];
laserlife = 50 + (15 * upgr[0][11]);
sonicrise = 0.6 + (0.25 * upgr[0][12]);
closeMenu();
clearLevel();
if (lvl == 0) {
paused = true;
inter._alpha = 0;
inter._visible = false;
cursor._visible = false;
back.gotoAndStop(1 + random(3));
back.img.back2.gotoAndStop(1 + random(8));
back.img.back3.gotoAndStop(back.img.back2._currentframe);
congrat._visible = false;
} else {
paused = false;
gumtitle.gotoAndStop(1);
inter._alpha = 100;
inter._visible = true;
cursor._visible = true;
back.gotoAndStop((lvl % 3) + 1);
back.img.back2.gotoAndStop((lvl % 8) + 1);
back.img.back3.gotoAndStop(back.img.back2._currentframe);
if ((lvl == 40) & (generator == false)) {
congrat._visible = true;
} else {
congrat._visible = false;
}
}
cursor._xscale = (cursor._yscale = explorad / resmulti);
clickCount = 1;
unitNeed = (((((((((((currmap[6] * portalcount) + currmap[1]) + currmap[2]) + currmap[3]) + currmap[4]) + currmap[5]) + currmap[6]) + currmap[7]) + currmap[8]) + currmap[9]) + currmap[10]) + currmap[11];
giftNeed = ((currmap[6] * portalcount) + (currmap[2] * 5)) + currmap[1];
unitHave = (giftHave = 0);
unitTarget = Math.ceil(unitNeed / 2);
halfTarget = false;
score = 0;
lvlDelay = 40;
objCount = 0;
giftCount = 0;
oxcount = 0;
oxtimer = 15;
maxcombo = 0;
combotimer = 0;
combocount = 0;
_global.resx = 640 * resmulti;
_global.resy = 480 * resmulti;
levelmap._xscale = (levelmap._yscale = 100 / resmulti);
j = 1;
while (j < 12) {
i = 0;
while (i < currmap[j]) {
objCount++;
obj = levelmap.attachMovie("unit", "unit" + objCount, objCount);
obj._x = 30 + random(resx - 60);
obj._y = 30 + random(resy - 60);
obj.gotoAndStop(j);
obj.type = j;
bankUnit.push(obj);
i++;
}
j++;
}
};
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;
};
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);
}
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);
}
}
i++;
}
};
killUnit = function (ob) {
playSoundLim("dam1", "dam2", "dam3");
if (ob.life == undefined) {
ob.kill = ob.killtime;
} else {
ob.life.nextFrame();
if (ob.life._currentframe == 4) {
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();
};
dieUnit = function (ob) {
addDelay();
unitHave++;
combotimer = 10;
combocount++;
if (combocount > 1) {
combotxt = combocount;
inter.combo.txt._xscale = (inter.combo.txt._yscale = 120);
}
inter.unit._xscale = (inter.unit._yscale = 120);
if (halfTarget == false) {
if (unitHave >= (unitTarget / 2)) {
halfTarget = true;
half.play();
}
} else if (unitHave >= unitTarget) {
if (back._currentframe == 1) {
}
}
j = 0;
while (j < bankUnit.length) {
if (bankUnit[j] == ob) {
bankUnit.splice(j, 1);
break;
}
j++;
}
if (ob.type < 3) {
addStat(1, 1);
} else {
addStat(3, 1);
}
switch (ob.type) {
case 1 :
createGift(ob._x, ob._y, ob.box._currentframe);
castBreak(ob._x, ob._y, breakrad);
playSoundLim("die1", "die2", "die3");
createScore(ob._x, ob._y, 10);
break;
case 2 :
createGift(ob._x, ob._y, ob.box._currentframe);
createGift(ob._x, ob._y, ob.box._currentframe);
createGift(ob._x, ob._y, ob.box._currentframe);
createGift(ob._x, ob._y, ob.box._currentframe);
createGift(ob._x, ob._y, ob.box._currentframe);
castBreak(ob._x, ob._y, breakrad + 20);
playSoundLim("die1", "die2", "die3");
createScore(ob._x, ob._y, 100);
break;
case 3 :
castBreak(ob._x, ob._y, breakrad);
createPart(ob._x, ob._y, 100, "bullet", levelmap, hulkcount);
playSound("bullet");
createScore(ob._x, ob._y, 20);
break;
case 4 :
castBreak(ob._x, ob._y, mineradius);
createPart(ob._x, ob._y, mineradius, "boom", levelmap, 1);
playSound("explo");
createScore(ob._x, ob._y, 30);
break;
case 5 :
castBreak(ob._x, ob._y, breakrad);
createPart(ob._x, ob._y, 100, "pulse", levelmap, pulsecount);
playSound("pulse");
createScore(ob._x, ob._y, 40);
break;
case 6 :
castBreak(ob._x, ob._y, breakrad);
createPart(ob._x, ob._y, 100, "portal", levelmap, 1);
playSound("portal");
createScore(ob._x, ob._y, 50);
break;
case 7 :
createPart(ob._x, ob._y, 100, "toxic", levelmap, 1);
playSound("toxic");
createScore(ob._x, ob._y, 60);
break;
case 8 :
createPart(ob._x, ob._y, 100, "light", levelmap, cryshot);
createPart(ob._x, ob._y, 100, "light2", levelmap, 1);
playSound("tesla");
createScore(ob._x, ob._y, 70);
break;
case 9 :
createPart(ob._x, 0, 100, "laser", levelmap, 1);
playSound("laser");
createScore(ob._x, ob._y, 80);
break;
case 10 :
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");
createScore(ob._x, ob._y, 90);
break;
case 11 :
castBreak(ob._x, ob._y, breakrad);
if (paused == false) {
clickCount++;
cursor._visible = true;
}
playSound("pickup");
createScore(ob._x, ob._y, 100);
}
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") {
dir = (360 / count) * j;
obj.x = lengthdir_x(12, dir + 90);
obj.y = lengthdir_y(12, dir + 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;
if (info == "exit") {
gumtitle.gotoAndStop(1);
mochipanel = false;
} else {
if (gumtitle._currentframe == 1) {
gumtitle.gotoAndPlay(2);
}
if (mochipanel == false) {
mochipanel = 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 () {
i = 1;
while (i < 13) {
if (upgr[0][i] < maxupgr) {
if (Math.round((upgr[i][0] * upgr[0][i]) * (upgr[0][i] / 2)) <= money) {
return(true);
}
}
i++;
}
};
initUpgr = function () {
_root.money = _root.money + 0;
if (vipupgr == true) {
maxupgr = 9;
} else {
maxupgr = 6;
}
i = 1;
while (i < upgr.length) {
z = opt["u" + i];
z.title = upgr[i][1];
z.desc.txt.text = upgr[i][2];
z.desc._visible = false;
z.cost = Math.round((upgr[i][0] * upgr[0][i]) * (upgr[0][i] / 2));
if (upgr[0][i] == maxupgr) {
z.gotoAndStop(4);
}
if (upgrok[i] >= maxlvl) {
z.gotoAndStop(3);
z.unlock = ("BEAT LEVEL " + upgrok[i]) + " TO UNLOCK";
}
if (z._currentframe < 3) {
z.id = i;
if (z.cost > _root.money) {
z.gotoAndStop(2);
} else {
z.gotoAndStop(1);
}
}
if (maxupgr == 6) {
z.star.gotoAndStop(upgr[0][i]);
} else {
z.star.gotoAndStop(10 + upgr[0][i]);
}
z.icon.gotoAndStop(i);
z.icon.img.gotoAndStop(1);
i++;
}
};
doUpgr = function (z) {
playSound("shop");
z.eff.gotoAndPlay(2);
money = Math.round(money - z.cost);
upgr[0][z.id]++;
setStat(4, getUpgrDone());
my_so.data.upgr = upgr[0];
saveStat();
initUpgr();
};
getUpgrDone = function () {
z = 0;
i = 1;
while (i < 13) {
z = z + (upgr[0][i] - 1);
i++;
}
return(z);
};
initAchi = function () {
i = 0;
while (i < _root.gachi.length) {
j = 0;
while (j < _root.gachi[i].length) {
z = opt[("a" + i) + j];
z.desc.text = _root.atxt[i][j];
z.desc._visible = false;
if (_root.gachi[i][j] == -1) {
z.gotoAndStop(j + 1);
z.img.gotoAndStop(i + 1);
} else {
z.gotoAndStop(8);
z.perc = Math.floor((_root.stat[i] / _root.gachi[i][j]) * 100) + "%";
}
j++;
}
i++;
}
};
_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");
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);
};
gotoAndPlay ("controller");
Frame 23
trans.gotoAndPlay(6);
onEnterFrame = function () {
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 (unitHave < unitTarget) {
if (generator == true) {
openMenu("def2");
} else {
openMenu("def");
}
paused = true;
cursor._visible = false;
} else {
if (generator == true) {
openMenu("win2");
} else {
openMenu("win");
}
paused = true;
cursor._visible = false;
}
} else if (unitHave == unitNeed) {
if (generator == true) {
openMenu("win2");
} else {
openMenu("win");
}
paused = true;
cursor._visible = false;
}
}
};
onMouseUp = function () {
if (paused == false) {
if (clickCount > 0) {
if (mouseClick == false) {
addDelay();
clickCount--;
addStat(0, 1);
if (clickCount == 0) {
cursor._visible = false;
}
playSound("explo");
castBreak(_xmouse * resmulti, _ymouse * resmulti, explorad);
createPart(_xmouse * resmulti, _ymouse * resmulti, explorad, "boom", levelmap, 1);
}
}
}
mouseClick = false;
};
gotoAndStop ("game");
Frame 33
stop();
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 44 MovieClip [toxic] Frame 1
timer = _root.toxiclife;
rad = 80;
_yscale = 20;
_xscale = 20;
if (_root.resmulti > 1.2) {
img.stop();
}
onEnterFrame = function () {
if (_xscale < 100) {
_yscale = (_yscale + 10);
_xscale = (_yscale + 10);
}
if (_root.paused == false) {
if (_root.unitHave != _root.unitNeed) {
_root.addDelay();
}
if (timer == 0) {
this.removeMovieClip();
} else {
timer--;
if (timer < 10) {
_alpha = (timer * 10);
}
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 46 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 49 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 55 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, 40);
this.removeMovieClip();
}
} else {
this.removeMovieClip();
}
};
Symbol 61 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.objCount++;
obj = _root.levelmap.attachMovie("unit", "unit" + _root.objCount, _root.levelmap.getNextHighestDepth());
obj._x = _x;
obj._y = _y;
obj.killtime = 15 + random(15);
obj.gotoAndStop(1);
obj.type = 1;
_root.bankUnit.push(obj);
} else {
timer--;
}
} else {
this.removeMovieClip();
}
};
Symbol 64 MovieClip [ox] Frame 1
_root.oxcount++;
vspeed = (1 + random(2)) / 2;
_yscale = (80 + random(40));
_xscale = (80 + random(40));
timer = 60 + random(30);
gotoAndPlay(2 + random(36));
_x = (_x + (5 - random(10)));
_y = (_y + (5 - random(10)));
onEnterFrame = function () {
_y = (_y - vspeed);
if (_y < -5) {
this.removeMovieClip();
}
if (timer > 0) {
timer--;
if (timer < 10) {
_alpha = (_alpha - 10);
}
} else {
_root.oxcount--;
this.removeMovieClip();
}
};
Symbol 64 MovieClip [ox] Frame 41
gotoAndPlay (2);
Symbol 71 MovieClip [light2] Frame 10
this.removeMovieClip();
Symbol 77 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 77 MovieClip [light] Frame 11
this.removeMovieClip();
Symbol 82 MovieClip [laser] Frame 1
timer = _root.laserlife;
_yscale = (100 * _root.resmulti);
trace(_yscale);
onEnterFrame = function () {
if (_root.paused == false) {
if (_root.unitHave != _root.unitNeed) {
_root.addDelay();
}
if (timer == 0) {
this.removeMovieClip();
} else {
timer--;
if (timer < 10) {
_alpha = (timer * 10);
}
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 93 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 100 MovieClip [explo2] Frame 13
this.removeMovieClip();
Symbol 107 MovieClip [explo] Frame 13
this.removeMovieClip();
Symbol 110 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 133 MovieClip [boom] Frame 12
this.removeMovieClip();
Symbol 141 MovieClip Frame 1
if (_parent.life._currentframe < 4) {
stop();
}
Symbol 145 MovieClip Frame 1
stop();
Symbol 160 MovieClip Frame 1
if (_root.opt._currentframe == 12) {
gotoAndStop(_parent._parent._currentframe - 4);
} else {
gotoAndStop(_parent._parent._currentframe - 2);
}
Symbol 164 MovieClip [unit] Frame 1
stop();
cacheAsBitmap = true;
img.gotoAndStop(1);
rad = 20;
x = ((random(3) / 2) + _root.unitspeed) * choose(1, -1);
y = ((random(3) / 2) + _root.unitspeed) * choose(1, -1);
killtime = 15 + random(25);
kill = undefined;
onEnterFrame = function () {
_x = (_x + x);
_y = (_y + y);
if ((_x > (resx - rad)) || (_x < rad)) {
x = x * -1;
}
if ((_y > (resy - rad)) || (_y < rad)) {
y = y * -1;
}
if (kill > 0) {
if (kill == 1) {
_root.addDelay();
_root.dieUnit(this);
} else {
kill--;
}
}
};
Symbol 164 MovieClip [unit] Frame 2
rad = 30;
Symbol 167 MovieClip [scoreobj] Frame 31
this.removeMovieClip();
Symbol 205 MovieClip Frame 1
gotoAndStop(_parent.num);
Symbol 206 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;
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 206 MovieClip [gift5] Frame 2
img.img.stop();
Symbol 228 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 228 MovieClip [gift4] Frame 2
img.stop();
Symbol 278 MovieClip Frame 1
gotoAndStop(_parent.num);
Symbol 279 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 279 MovieClip [gift3] Frame 2
img.stop();
Symbol 297 MovieClip [gift1] 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 297 MovieClip [gift1] Frame 2
img.stop();
Symbol 331 MovieClip Frame 1
gotoAndStop(_parent.num);
Symbol 332 MovieClip [gift2] 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;
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 332 MovieClip [gift2] Frame 2
img.img.stop();
Symbol 339 MovieClip Frame 1
gotoAndStop(1 + random(5));
_y = (-random(10));
_xscale = choose(100, -100);
Symbol 343 MovieClip Frame 1
gotoAndStop(_parent.num);
Symbol 344 MovieClip [gift0] 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 344 MovieClip [gift0] Frame 2
img.img.stop();
Symbol 354 MovieClip Frame 1
stop();
Symbol 363 MovieClip Frame 1
stop();
Symbol 371 MovieClip Frame 1
stop();
Symbol 673 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 674 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.3 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) {
warnID(id, false);
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.as2.MochiServices.onError = onError;
} else if (mochi.as2.MochiServices.onError == undefined) {
mochi.as2.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
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) {
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.apply(null, ["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.apply(null, [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.apply(null, ["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.apply(null, ["NotConnected"]);
}
if ((args.options != null) && (args.options.onError != null)) {
args.options.onError.apply(null, ["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 675 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 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 676 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 677 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 678 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 679 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 391 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 396 MovieClip Frame 1
stop();
Symbol 396 MovieClip Frame 16
playSound("portalout");
Symbol 396 MovieClip Frame 24
stop();
Symbol 402 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 406 MovieClip Frame 1
onEnterFrame = function () {
if (_xscale > 100) {
_yscale = (_yscale - 2);
_xscale = (_yscale - 2);
}
};
Symbol 410 Button
on (rollOver) {
playSound("mouseon");
}
Symbol 418 MovieClip Frame 1
stop();
Symbol 430 MovieClip Frame 1
stop();
onEnterFrame = function () {
gotoAndStop(Math.floor(_root.unitHave / (_root.unitNeed / 4)) + 1);
msk._xscale = (_root.unitHave / _root.unitNeed) * 100;
};
Symbol 432 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 435 MovieClip Frame 1
stop();
Symbol 435 MovieClip Frame 2
playSound("star");
Symbol 442 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 457 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 461 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 469 Button
on (rollOver) {
playSound("mouseon");
}
on (release) {
playSound("click");
}
Symbol 491 Button
on (release) {
getURL (sponsorurl, "_blank");
}
Symbol 525 Button
on (rollOut) {
desc._visible = false;
}
on (rollOver) {
desc._visible = true;
playSound("mouseon");
}
on (press) {
_root.doUpgr(this);
}
Symbol 530 MovieClip Frame 1
stop();
Symbol 543 MovieClip Frame 2
_alpha = 50;
Symbol 548 Button
on (rollOut) {
desc._visible = false;
}
on (rollOver) {
desc._visible = true;
playSound("mouseon");
}
on (press) {
_root.doUpgr(this);
}
Symbol 555 MovieClip Frame 2
_alpha = 50;
Symbol 571 Button
on (rollOver) {
desc._visible = true;
}
on (rollOut) {
desc._visible = false;
}
Symbol 591 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (timer > 0) {
timer--;
if (timer == 1) {
gotoAndPlay (3);
playSound("star");
if (_name == "s3") {
playSound("holy");
}
}
}
};
Symbol 591 MovieClip Frame 13
gotoAndStop (2);
Symbol 648 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(124, -140, 100, "star", this, 1);
} else {
timer--;
if (timer == 10) {
_root.createPart(-123, -200, 100, "star", this, 1);
}
}
}
};
Symbol 648 MovieClip Frame 2
totalscore.text = _root.totalscore;
b1.title = "Upgrade Shop";
b2.title = "Achievements";
b3.title = "Submit Score";
b4.title = "Main Menu";
b5.title = "Premium Shop";
b1.but.onRelease = function () {
menuback = "select";
_root.openMenu("upgr");
};
b2.but.onRelease = function () {
menuback = "select";
_root.openMenu("achi");
};
b3.but.onRelease = function () {
var _local3 = {n:[4, 4, 15, 15, 13, 10, 13, 4, 5, 11, 2, 3, 9, 14, 11, 9], 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.totalscore});
};
b4.but.onRelease = function () {
_root.openMenu("main");
};
b5.but.onRelease = function () {
getURL (walkurl, "_blank");
};
stat_star = 0;
stat_lvl = 0;
i = 1;
while (i < 41) {
this["l" + i].id = i;
if (_root.lvlmedal[i] == undefined) {
this["l" + i].gotoAndStop(4);
} else if (_root.lvlmedal[i] < 3) {
if (_root.lvlmedal[i] == 0) {
this["l" + i].gotoAndStop(1);
} else {
this["l" + i].gotoAndStop(2);
}
} else {
this["l" + i].gotoAndStop(3);
}
this["l" + i].star.gotoAndStop(_root.lvlmedal[i] + 1);
if (_root.lvlmedal[i] > 0) {
stat_star = stat_star + _root.lvlmedal[i];
stat_lvl++;
}
if (_root.lvlrec[i] != undefined) {
this["l" + i].rec.txt.text = _root.lvlrec[i];
this["l" + i].rec._visible = false;
}
i++;
}
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++;
}
if (_root.kongapi == true) {
i = 0;
while (i < 8) {
_root.kongsend("stat" + i, _root.stat[i]);
i++;
}
}
Symbol 648 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 = "Level Select";
}
b2.title = "Premium Shop";
b1.but.onRelease = function () {
if (menuback == "exit") {
_root.lvl++;
_root.trans.gotoAndPlay(2);
} else {
_root.openMenu(menuback);
}
};
b2.but.onRelease = function () {
mochi.as2.MochiCoins.showStore();
};
Symbol 648 MovieClip Frame 22
_root.initAchi();
playSound("menuon");
switch (menuback) {
case "exit" :
b1.title = "NEXT LEVEL";
break;
case "main" :
b1.title = "Main Menu";
break;
case "select" :
b1.title = "Level Select";
}
b1.but.onRelease = function () {
if (menuback == "exit") {
_root.lvl++;
_root.trans.gotoAndPlay(2);
} else {
_root.openMenu(menuback);
}
};
Symbol 648 MovieClip Frame 32
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 = "Andkon Arcade";
b4.title = "Replay";
b5.title = "Level Select";
b6.title = "Achievements";
b11.but.onRelease = function () {
if (_root.testUpgr() == true) {
menuback = "exit";
_root.openMenu("upgr");
} else {
_root.lvl++;
_root.trans.gotoAndPlay(2);
}
};
b2.but.onRelease = function () {
var _local3 = {n:[4, 4, 15, 15, 13, 10, 13, 4, 5, 11, 2, 3, 9, 14, 11, 9], 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.totalscore});
};
b3.but.onRelease = function () {
getURL (sponsorurl, "_blank");
};
b4.but.onRelease = function () {
_root.trans.gotoAndPlay(2);
};
b5.but.onRelease = function () {
_root.openMenu("select");
};
b6.but.onRelease = function () {
menuback = "select";
_root.openMenu("achi");
};
rectxt._visible = false;
addtxt._visible = false;
totaladd = 0;
if (_root.lvlrec[_root.lvl] == undefined) {
totaladd = _root.score;
} else if (_root.score > _root.lvlrec[_root.lvl]) {
totaladd = _root.score - _root.lvlrec[_root.lvl];
}
if (totaladd > 0) {
_root.lvlrec[_root.lvl] = _root.score;
_root.my_so.data.lvlrec[_root.lvl] = _root.score;
rectxt._visible = true;
addtxt._visible = true;
addtxt.text = "+" + totaladd;
}
_root.totalscore = _root.totalscore + totaladd;
totalscore.text = _root.totalscore;
setStat(8, _root.totalscore);
stars = 0;
perc = _root.unitHave / _root.unitNeed;
if (perc < 0.75) {
stars = 1;
} else if (perc < 1) {
stars = 2;
} else {
stars = 3;
}
i = 1;
while (i < 4) {
zz = this["s" + i];
if (i > _root.lvlmedal[_root.lvl]) {
zz.gotoAndStop(1);
} else {
zz.gotoAndStop(2);
}
if (i <= stars) {
zz.timer = 12 * i;
} else {
zz.timer = 0;
}
i++;
}
if (_root.lvlmedal[_root.lvl] < stars) {
_root.lvlmedal[_root.lvl] = stars;
_root.my_so.data.lvlmedal[_root.lvl] = stars;
}
if (_root.lvlmedal[_root.lvl + 1] == undefined) {
_root.lvlmedal[_root.lvl + 1] = 0;
_root.my_so.data.lvlmedal[_root.lvl + 1] = 0;
}
stat_star = 0;
i = 1;
while (i < 41) {
if (_root.lvlmedal[i] != undefined) {
stat_star = stat_star + _root.lvlmedal[i];
_root.maxlvl = i;
_root.my_so.data.maxlvl = _root.maxlvl;
}
i++;
}
setStat(6, _root.lvl);
setStat(7, stat_star);
_root.money = _root.money + _root.giftHave;
saveStat();
if (_root.kongapi == true) {
i = 0;
while (i < 9) {
_root.kongsend("stat" + i, _root.stat[i]);
i++;
}
}
if (_root.lvl == 40) {
b11._visible = false;
} else {
b11._visible = true;
}
mochi.as2.MochiEvents.trackEvent("Level", _root.lvl);
Symbol 648 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 648 MovieClip Frame 52
playSound("def");
leveltxt.text = ("Level " + _root.lvl) + " FAILED!";
b1.title = "TRY AGAIN";
b2.title = "Level Select";
b3.title = "Andkon Arcade";
b4.title = "Upgrade Shop";
b5.title = "Achievements";
b1.but.onRelease = function () {
_root.trans.gotoAndPlay(2);
};
b2.but.onRelease = function () {
_root.openMenu("select");
};
b3.but.onRelease = function () {
getURL (sponsorurl, "_blank");
};
b4.but.onRelease = function () {
menuback = "select";
_root.openMenu("upgr");
};
b5.but.onRelease = function () {
menuback = "select";
_root.openMenu("achi");
};
saveStat();
Symbol 648 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 648 MovieClip Frame 72
playSound("menuon");
b1.title = "START GAME";
b2.title = "Achievements";
b3.title = "Credits";
b4.title = "Andkon Arcade";
b5.title = "Reset Game";
b1.but.onRelease = function () {
_root.openMenu("select");
};
b2.but.onRelease = function () {
menuback = "main";
_root.openMenu("achi");
};
b3.but.onRelease = function () {
_root.openMenu("credit");
};
b4.but.onRelease = function () {
getURL (sponsorurl, "_blank");
};
b5.but.onRelease = function () {
_root.openMenu("clear");
};
Symbol 648 MovieClip Frame 82
playSound("menuon");
b1.title = "BACK TO MENU";
b1.but.onRelease = function () {
_root.openMenu("main");
};
Symbol 648 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 648 MovieClip Frame 102
b1.title = "YES!";
b2.title = "No";
b1.but.onRelease = function () {
_root.maxlvl = 1;
_root.upgr[0] = [0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
_root.money = 0;
_root.totalscore = 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];
_root.my_so.data.money = 0;
i = 1;
while (i < 41) {
_root.lvlmedal[i] = undefined;
_root.my_so.data.lvlmedal[i] = undefined;
_root.lvlrec[i] = 0;
_root.my_so.data.lvlrec[i] = 0;
i++;
}
_root.my_so.data.lvlmedal[0] = (_root.lvlmedal[0] = 0);
_root.my_so.data.lvlmedal[1] = (_root.lvlmedal[1] = 0);
i = 0;
while (i < 9) {
_root.stat[i] = 0;
i++;
}
_root.setGachi();
saveStat();
_root.openMenu("main");
};
b2.but.onRelease = function () {
_root.openMenu("main");
};
Symbol 648 MovieClip Frame 112
playSound("menuon");
b1.title = "Easy";
b2.title = "Meduim";
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 658 MovieClip Frame 1
stop();
Symbol 658 MovieClip Frame 5
_root.paused = true;
Symbol 658 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 662 MovieClip Frame 1
stop();
Symbol 667 MovieClip Frame 1
stop();
_visible = false;
Symbol 667 MovieClip Frame 2
_visible = true;
playSound("achi2");
Symbol 667 MovieClip Frame 11
playSound("holy");
Symbol 671 MovieClip Frame 1
onEnterFrame = function () {
_x = _root._xmouse;
_y = _root._ymouse;
_root.hint._visible = _visible;
};