Frame 1
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
var _mochiads_game_id = "3edf019149ae9546";
mochi.as2.MochiAd.showPreGameAd({id:"3edf019149ae9546", res:"700x500"});
__com_mochibot__("af1eb9b9", this, 10301, true);
Frame 2
function goTo() {
getURL (_global.sponsorurl);
}
_global.sponsorurl = "http://www.games1.com/?utm_medium=brandedgames_external&utm_campaign=icy-gifts&utm_source=host&utm_content=ingame";
var newMenu = new ContextMenu();
newMenu.hideBuiltInItems();
newMenu.customItems.push(new ContextMenuItem("Play More Games", goTo));
this.menu = newMenu;
stop();
Frame 3
back.img.gotoAndStop(1 + random(10));
back.img.img.back2.gotoAndStop(1 + random(7));
back.img.img.back3.gotoAndStop(1 + random(7));
congrat._visible = false;
map = new Array();
map[0] = [1, 40, 2, 2, 2, 2, 2, 2];
map[1] = [0.5, 9, 1, 0, 0, 0, 0, 0];
map[2] = [0.6, 15, 0, 3, 0, 0, 0, 0];
map[3] = [0.6, 2, 6, 0, 0, 0, 0, 0];
map[4] = [0.7, 12, 2, 2, 0, 0, 0, 0];
map[5] = [0.7, 20, 0, 0, 3, 0, 0, 0];
map[6] = [0.8, 0, 5, 5, 5, 0, 0, 0];
map[7] = [0.7, 50, 0, 0, 0, 0, 0, 0];
map[8] = [1, 3, 0, 0, 0, 10, 0, 0];
map[9] = [0.8, 15, 1, 1, 1, 1, 0, 0];
map[10] = [1, 20, 0, 0, 0, 0, 0, 3];
map[11] = [0.8, 5, 0, 0, 10, 0, 0, 0];
map[12] = [0.9, 30, 2, 2, 2, 2, 0, 1];
map[13] = [1, 10, 0, 10, 0, 0, 0, 0];
map[14] = [1.2, 20, 0, 0, 6, 6, 0, 0];
map[15] = [1, 20, 2, 2, 2, 2, 0, 0];
map[16] = [1, 15, 0, 0, 0, 0, 5, 0];
map[17] = [1.5, 10, 0, 0, 0, 0, 0, 5];
map[18] = [1.2, 25, 0, 0, 0, 4, 4, 0];
map[19] = [0.5, 1, 1, 1, 1, 1, 1, 0];
map[20] = [1.3, 0, 30, 0, 0, 0, 0, 0];
map[21] = [1, 100, 0, 0, 0, 0, 0, 2];
map[22] = [1.5, 0, 0, 30, 0, 0, 0, 0];
map[23] = [1.4, 80, 4, 4, 4, 0, 0, 2];
map[24] = [0.5, 4, 0, 0, 0, 0, 0, 0];
map[25] = [1.5, 0, 0, 0, 30, 0, 0, 1];
map[26] = [1.6, 100, 0, 5, 5, 5, 0, 2];
map[27] = [1.2, 150, 0, 0, 0, 0, 0, 3];
map[28] = [1.5, 0, 0, 0, 0, 30, 0, 0];
map[29] = [1.7, 120, 0, 0, 6, 6, 6, 2];
map[30] = [0.8, 2, 0, 1, 0, 0, 0, 0];
map[31] = [1.5, 0, 0, 0, 0, 0, 30, 0];
map[32] = [1.8, 150, 7, 7, 7, 0, 0, 3];
map[33] = [1.3, 200, 0, 0, 0, 0, 0, 4];
map[34] = [1.5, 10, 0, 0, 0, 0, 0, 10];
map[35] = [1.8, 180, 6, 6, 6, 6, 6, 3];
map[36] = [1.2, 0, 10, 10, 10, 10, 10, 0];
gachi = new Array();
gachitxt = new Array();
gachi[0] = [1, 10, 25, 50, 80, 120];
gachitxt[0] = ["", "Explosive Click"];
gachi[1] = [20, 60, 150, 500, 1000, 2500];
gachitxt[1] = ["Break", "Ice Floe"];
gachi[2] = [10, 30, 100, 400, 750, 2000];
gachitxt[2] = ["Collect", "Gifts"];
gachi[3] = [3, 30, 75, 250, 450, 750];
gachitxt[3] = ["Use", "Bombs"];
gachi[4] = [1, 5, 10, 15, 25, 35];
gachitxt[4] = ["Get", "Upgrades"];
gachi[5] = [15, 30, 60, 100, 150];
gachitxt[5] = ["Get a combo x", ""];
gachi[6] = [1, 5, 12, 23, 36];
gachitxt[6] = ["Complete", "Level"];
gachi[7] = [5, 15, 35, 65, 108];
gachitxt[7] = ["Get", "Stars"];
atxt = new Array();
i = 0;
while (i < gachi.length) {
atxt[i] = new Array();
j = 0;
while (j < gachi[i].length) {
atxt[i][j] = (((gachitxt[i][0] + " ") + gachi[i][j]) + " ") + gachitxt[i][1];
j++;
}
i++;
}
var my_so = SharedObject.getLocal("icy_gift_saves", "/");
lvlmedal = 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.sound = true;
my_so.data.music = true;
my_so.data.maxlvl = 1;
my_so.data.upgr = [0, 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;
if (music == false) {
ib2.gotoAndStop(2);
}
if (sound == false) {
ib1.gotoAndStop(2);
}
i = 1;
while (i < 37) {
lvlmedal[i] = my_so.data.lvlmedal[i];
i++;
}
i = 0;
while (i < 8) {
j = 0;
while (j < 6) {
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 = atxt[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] = [6, "GIFT MAGNET", "Increase gifts collecting radius"];
upgr[3] = [8, "MINE RADIUS", "Increase explosion radius of the mine"];
upgr[4] = [16, "SHELL COUNT", "Increase amount of shells"];
upgr[5] = [8, "ACID LIFETIME", "Increase lifetime of acid spot"];
upgr[6] = [20, "TESLA TARGETS", "Increase amount of targets of the tesla"];
upgr[7] = [10, "WAVE RISE", "Increase size of the wave"];
upgrok = new Array();
upgrok = [0, 0, 0, 0, 2, 5, 8, 16];
upgr[0] = my_so.data.upgr;
gotoAndStop ("functions");
Frame 13
oxlimit = 50;
bankUnit = new Array();
bankGift = new Array();
lvl = 0;
createLevel = function () {
resmulti = map[lvl][0];
explorad = 50 + (10 * upgr[0][1]);
magnet = 50 + (20 * upgr[0][2]);
mineradius = 85 + (15 * upgr[0][3]);
hulkcount = 2 + upgr[0][4];
toxiclife = 70 + (20 * upgr[0][5]);
cryshot = upgr[0][6];
sonicrise = 0.6 + (0.25 * upgr[0][7]);
closeMenu();
clearLevel();
if (lvl == 0) {
paused = true;
inter._alpha = 0;
inter._visible = false;
cursor._visible = false;
back.gotoAndPlay(3);
back.img.gotoAndStop(1 + random(10));
back.img.img.back2.gotoAndStop(1 + random(7));
back.img.img.back3.gotoAndStop(1 + random(7));
congrat._visible = false;
} else {
paused = false;
inter._alpha = 100;
inter._visible = true;
cursor._visible = true;
back.gotoAndStop(1);
back.img.gotoAndStop((lvl % 10) + 1);
back.img.img.back2.gotoAndStop((lvl % 7) + 1);
back.img.img.back3.gotoAndStop(((lvl * 2) % 7) + 1);
if ((lvl % 2) == 0) {
back.img.img.back2._xscale = 100;
} else {
back.img.img.back2._xscale = -100;
}
if ((lvl % 3) == 0) {
back.img.img.back3._xscale = 100;
} else {
back.img.img.back3._xscale = -100;
}
if (lvl == 36) {
congrat._visible = true;
} else {
congrat._visible = false;
}
}
cursor._xscale = (cursor._yscale = explorad / resmulti);
mouseClick = false;
clickCount = 1;
unitNeed = (((((map[lvl][1] + map[lvl][2]) + map[lvl][3]) + map[lvl][4]) + map[lvl][5]) + map[lvl][6]) + map[lvl][7];
giftNeed = map[lvl][1];
unitHave = (giftHave = 0);
unitTarget = Math.ceil(unitNeed / 2);
halfTarget = false;
lvlDelay = 30;
objCount = 0;
giftCount = 0;
oxcount = 0;
oxtimer = 15;
maxcombo = 0;
combotimer = 0;
combocount = 0;
_global.resx = 700 * resmulti;
_global.resy = 500 * resmulti;
levelmap._xscale = (levelmap._yscale = 100 / resmulti);
j = 1;
while (j < 8) {
i = 0;
while (i < map[lvl][j]) {
objCount++;
obj = levelmap.attachMovie("unit", "unit" + objCount, objCount);
obj.killtime = 15 + random(15);
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;
};
addDelay = function (type) {
lvlDelay = 30;
};
castBreak = function (xx, yy, type) {
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);
}
}
i++;
}
};
killUnit = function (ob) {
playSound("dam1", "dam2", "dam3");
ob.img.gotoAndPlay(2);
ob.kill = ob.killtime;
};
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++;
addStat(1, 1);
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) {
back.play();
}
}
j = 0;
while (j < bankUnit.length) {
if (bankUnit[j] == ob) {
bankUnit.splice(j, 1);
break;
}
j++;
}
if (oxcount < oxlimit) {
createPart(ob._x, ob._y, 100, "hulk1", levelmap, 4);
}
if (ob.type != 1) {
addStat(3, 1);
}
switch (ob.type) {
case 1 :
createGift(ob._x, ob._y, ob.box._currentframe);
castBreak(ob._x, ob._y, 60);
playSound("die1", "die2", "die3");
break;
case 2 :
castBreak(ob._x, ob._y, mineradius);
createPart(ob._x, ob._y, mineradius, "boom", levelmap, 1);
playSound("explo");
break;
case 3 :
castBreak(ob._x, ob._y, 60);
createPart(ob._x, ob._y, 100, "bullet", levelmap, hulkcount);
playSound("bullet");
break;
case 4 :
createPart(ob._x, ob._y, 100, "toxic", levelmap, 1);
playSound("toxic");
break;
case 5 :
createPart(ob._x, ob._y, 100, "light", levelmap, cryshot);
createPart(ob._x, ob._y, 100, "light2", levelmap, 1);
playSound("tesla");
break;
case 6 :
castBreak(ob._x, ob._y, 60);
createPart(ob._x, ob._y, 100, "sonic", levelmap, 1, 1);
createPart(ob._x, ob._y, 100, "sonic", levelmap, 1, -1);
playSound("wave");
break;
case 7 :
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") {
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", "gift" + giftCount, levelmap.getNextHighestDepth());
obj._x = xx;
obj._y = yy;
obj.box.gotoAndStop(type);
bankGift.push(obj);
};
closeMenu = function () {
opt1.tar = "exit";
opt1.gotoAndStop("exit");
opt2.tar = "exit";
opt2.gotoAndStop("exit");
opt3.tar = "exit";
opt3.gotoAndStop("exit");
};
openMenu = function (type, info) {
_root["opt" + type].tar = info;
_root["opt" + type].close = true;
};
_global.playSound = function () {
if (sound == true) {
_root["snd_" + arguments[random(arguments.length)]].start();
}
};
testUpgr = function () {
i = 1;
while (i < 8) {
if (Math.round((upgr[i][0] * upgr[0][i]) * (upgr[0][i] / 2)) <= money) {
return(true);
}
i++;
}
};
initUpgr = function () {
i = 1;
while (i < 8) {
z = opt1["u" + i];
z.title = upgr[i][1];
z.desc = upgr[i][2];
z.cost = Math.round((upgr[i][0] * upgr[0][i]) * (upgr[0][i] / 2));
if (upgr[0][i] == 6) {
z.gotoAndStop(4);
}
if (upgrok[i] >= maxlvl) {
z.gotoAndStop(3);
z.unlock = ("GET TO LEVEL " + upgrok[i]) + " TO UNLOCK";
}
if (z._currentframe < 3) {
z.id = i;
if (z.cost > _root.money) {
z.gotoAndStop(2);
} else {
z.gotoAndStop(1);
}
}
z.star.gotoAndStop(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();
initAchi();
};
getUpgrDone = function () {
z = 0;
i = 1;
while (i < 8) {
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 = opt3[("a" + i) + j];
z.title = _root.atxt[i][j];
if (_root.gachi[i][j] == -1) {
z.gotoAndStop(j + 1);
z.img.gotoAndStop(i + 1);
} else {
z.gotoAndStop(7);
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_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");
gotoAndPlay ("controller");
Frame 23
trans.gotoAndPlay(6);
onEnterFrame = function () {
if (oxtimer > 0) {
oxtimer--;
} else {
createPart(10 + random(680), 505, 100, "ox", _root, 1);
oxtimer = 15 + random(15);
}
if (paused == false) {
mousex = _xmouse * resmulti;
mousey = _ymouse * resmulti;
i = 0;
while (i < bankGift.length) {
zz = bankGift[i];
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 (back._currentframe == 1) {
openMenu(2, "def");
paused = true;
cursor._visible = false;
} else {
openMenu(2, "win");
paused = true;
cursor._visible = false;
}
} else if (unitHave == unitNeed) {
openMenu(2, "win");
paused = true;
cursor._visible = false;
}
}
};
onMouseUp = function () {
trace(oxcount);
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(1, "exit");
openMenu(2, "main");
openMenu(3, "exit");
if (music == true) {
snd_music.start(0, 999);
}
ib1.ico.gotoAndStop(1);
ib2.ico.gotoAndStop(2);
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 33 MovieClip [toxic] Frame 1
timer = _root.toxiclife;
rad = 80;
_yscale = 20;
_xscale = 20;
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 35 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 38 MovieClip [sonic] Frame 1
_yscale = ((rad = 15));
_xscale = ((rad = 15));
onEnterFrame = function () {
if (_root.paused == false) {
if (_root.unitHave != _root.unitNeed) {
_root.addDelay();
}
_x = (_x + (info * 10));
_yscale = ((rad = rad + _root.sonicrise));
_xscale = (rad * info);
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 {
this.removeMovieClip();
}
};
Symbol 41 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 41 MovieClip [ox] Frame 41
gotoAndPlay (2);
Symbol 48 MovieClip [light2] Frame 10
this.removeMovieClip();
Symbol 54 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 54 MovieClip [light] Frame 11
this.removeMovieClip();
Symbol 65 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 70 MovieClip [explo] Frame 13
this.removeMovieClip();
Symbol 73 MovieClip [bullet] Frame 1
rad = 15;
onEnterFrame = function () {
if (_root.paused == false) {
if (_root.unitHave != _root.unitNeed) {
_root.addDelay();
}
_x = (_x + x);
_y = (_y + y);
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 {
this.removeMovieClip();
}
};
Symbol 96 MovieClip [boom] Frame 12
this.removeMovieClip();
Symbol 112 MovieClip Frame 1
if (_root.opt1._currentframe == 12) {
gotoAndStop(_parent._parent._currentframe - 2);
} else {
gotoAndStop(_parent._parent._currentframe - 1);
}
Symbol 114 MovieClip [unit] Frame 1
stop();
cacheAsBitmap = true;
img.gotoAndStop(1);
rad = 20;
x = (random(3) + 1) * choose(1, -1);
y = (random(3) + 1) * choose(1, -1);
_x = (rad + random(resx - (rad * 2)));
_y = (rad + random(resy - (rad * 2)));
kill = undefined;
onEnterFrame = function () {
_x = (_x + x);
_y = (_y + y);
if ((_x > (resx - rad)) or (_x < rad)) {
x = x * -1;
}
if ((_y > (resy - rad)) or (_y < rad)) {
y = y * -1;
}
if (kill > 0) {
if (kill == 1) {
_root.dieUnit(this);
} else {
kill--;
_root.addDelay();
}
}
};
Symbol 118 MovieClip [scoreobj] Frame 31
this.removeMovieClip();
Symbol 156 MovieClip Frame 1
gotoAndStop(_parent.num);
Symbol 157 MovieClip [gift] Frame 1
stop();
rad = 15;
x = (random(3) + 1) * choose(1, -1);
y = (random(3) + 1) * choose(1, -1);
num = 1 + random(5);
img.gotoAndStop(num);
kill = false;
onEnterFrame = function () {
_y = (_y + 1);
if (_y > (resy + rad)) {
_root.dieGift(this);
}
if (_root.paused == false) {
if (kill == true) {
dist = point_distance(_x, _y, _root.mousex, _root.mousey);
if (dist < rad) {
_root.createPart(_root._xmouse, _root._ymouse, 100, "scoreobj", _root, 1);
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(25, dir));
_y = (_y + lengthdir_y(25, dir));
}
}
} else if (kill == true) {
_root.giftHave++;
_root.dieGift(this);
}
};
Symbol 615 MovieClip [__Packages.mochi.as2.MochiAd] Frame 0
class mochi.as2.MochiAd
{
function MochiAd () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function showPreGameAd(options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}, ad_progress:function (percent) {
}};
options = _parseOptions(options, _local27);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def") {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local24 = 11000;
var _local19 = options.ad_timeout;
if (options.skip) {
_local19 = 0;
}
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local15 = _getRes(options);
var _local5 = _local15[0];
var _local14 = _local15[1];
mc._x = _local5 * 0.5;
mc._y = _local14 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local5 * -0.5;
chk._y = _local14 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
if (options.no_progress_bar) {
_local7._visible = false;
delete options.no_progress_bar;
} else {
_local7._x = 10;
_local7._y = _local14 - 20;
}
var _local23 = options.color;
delete options.color;
var _local21 = options.background;
delete options.background;
var _local25 = options.outline;
delete options.outline;
var _local6 = _local7.createEmptyMovieClip("_outline", 1);
_local6.beginFill(_local21);
_local6.moveTo(0, 0);
_local6.lineTo(_local5 - 20, 0);
_local6.lineTo(_local5 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
_local6.endFill();
var _local4 = _local7.createEmptyMovieClip("_inside", 2);
_local4.beginFill(_local23);
_local4.moveTo(0, 0);
_local4.lineTo(_local5 - 20, 0);
_local4.lineTo(_local5 - 20, 10);
_local4.lineTo(0, 10);
_local4.lineTo(0, 0);
_local4.endFill();
_local4._xscale = 0;
var _local8 = _local7.createEmptyMovieClip("_outline", 3);
_local8.lineStyle(0, _local25, 100);
_local8.moveTo(0, 0);
_local8.lineTo(_local5 - 20, 0);
_local8.lineTo(_local5 - 20, 10);
_local8.lineTo(0, 10);
_local8.lineTo(0, 0);
chk.ad_msec = _local24;
chk.ad_timeout = _local19;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
mochi.as2.MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
var sendHostProgress = false;
mc.lc.sendHostLoadProgress = function (lc_name) {
sendHostProgress = true;
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local10 = this._parent._parent;
var _local3 = _local10;
while ((!_local3.getBytesTotal()) && (_local3)) {
_local3 = _local3._parent;
}
if (!_local3) {
_local3 = _root;
}
var _local13 = this._parent._mochiad_ctr;
var _local7 = getTimer() - this.started;
var _local5 = false;
var _local6 = _local3.getBytesTotal();
var _local9 = _local3.getBytesLoaded();
var _local4 = (100 * _local9) / _local6;
var _local12 = (100 * _local7) / chk.ad_msec;
var _local11 = this._mochiad_bar._inside;
var _local15 = Math.min(100, Math.min(_local4 || 0, _local12));
_local15 = Math.max(this.last_pcnt, _local15);
this.last_pcnt = _local15;
_local11._xscale = _local15;
options.ad_progress(_local15);
if (sendHostProgress) {
mochi.as2.MochiAd.containerNotify(clip, {id:"hostLoadPcnt", pcnt:_local4}, clip._mochiad._containerLCName);
if (_local4 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var _local8 = _local13.getBytesTotal();
if ((_local8 > 0) || (typeof(_local8) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if ((_local7 > chk.ad_timeout) && (_local4 == 100)) {
options.ad_failed();
_local5 = true;
}
}
if (_local7 > chk.ad_msec) {
_local5 = true;
}
if (((_local6 > 0) && (_local9 >= _local6)) && (_local5)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showClickAwayAd(options) {
var _local10 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function () {
}, ad_finished:function () {
}, ad_loaded:function (width, height) {
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local10);
var clip = options.clip;
var _local9 = options.ad_timeout;
delete options.ad_timeout;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var _local3 = clip._mochiad;
_local3.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local11 = _local5[0];
var _local8 = _local5[1];
_local3._x = _local11 * 0.5;
_local3._y = _local8 * 0.5;
var chk = _local3.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_timeout = _local9;
chk.started = getTimer();
chk.showing = false;
_local3.lc.adLoaded = options.ad_loaded;
_local3.lc.adSkipped = options.ad_skipped;
_local3.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
_local3.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
var _local21 = false;
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
_local2 = true;
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local2) {
delete this.onEnterFrame;
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
mochi.as2.MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
mc.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showPreloaderAd(options) {
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
showPreGameAd(options);
}
static function showTimedAd(options) {
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
showInterLevelAd(options);
}
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 load(options) {
var _local12 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local12);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local6 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local6._mochiad_loaded) {
return(null);
}
var _local11 = options.depth;
delete options.depth;
var mc = _local6.createEmptyMovieClip("_mochiad", _local11);
var _local10 = _getRes(options);
options.res = (_local10[0] + "x") + _local10[1];
options.server = options.server + options.id;
delete options.id;
_local6._mochiad_loaded = true;
if (_local6._url.indexOf("http") != 0) {
trace("[MochiAd] NOTE: Security Sandbox Violation errors below are normal");
}
var _local4 = mc.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local9 = _local4.server;
delete _local4.server;
var _local13 = _allowDomains(_local9);
mc.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
mochi.as2.MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new Object();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = mc;
_local5.name = _local8;
_local5.hostname = _local13;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
mc.lc = _local5;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
_local4.lc = _local8;
_local4.st = getTimer();
if (!options.skip) {
_local4.loadMovie(_local9 + ".swf", "POST");
}
return(mc);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
containerNotify(clip, {id:"unload"}, clip._mochiad._containerLCName);
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
if (_local4.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(_local4);
}
static function rpc(clip, callbackID, arg) {
switch (arg.id) {
case "setValue" :
setValue(clip, arg.objectName, arg.value);
break;
case "getValue" :
var _local4 = getValue(clip, arg.objectName);
containerRpcResult(clip, callbackID, _local4, clip._mochiad._containerLCName);
break;
case "runMethod" :
var _local3 = runMethod(clip, arg.method, arg.args);
containerRpcResult(clip, callbackID, _local3, clip._mochiad._containerLCName);
break;
default :
trace("[mochiads rpc] unknown rpc id: " + arg.id);
}
}
static function setValue(base, objectName, value) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
base[_local2[_local1]] = value;
}
static function getValue(base, objectName) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
return(base[_local2[_local1]]);
}
static function runMethod(base, methodName, argsArray) {
var _local2 = methodName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
if (typeof(base[_local2[_local1]]) == "function") {
return(base[_local2[_local1]].apply(base, argsArray));
}
return(undefined);
}
static function containerNotify(clip, args, lcName) {
var _local1 = clip._mochiad._mochiad_ctr.ad.app;
if (_local1.notify) {
_local1.notify(args);
} else {
new LocalConnection().send(lcName, "notify", args);
}
}
static function containerRpcResult(clip, callbackID, val, lcName) {
var _local1 = clip._mochiad._mochiad_ctr.ad.app;
if (_local1.rpcResult) {
_local1.rpcResult(callbackID, val);
} else {
new LocalConnection().send(lcName, "rpcResult", callbackID, val);
}
}
}
Symbol 616 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 617 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.2 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 618 MovieClip [__Packages.mochi.as2.MochiEvents] Frame 0
class mochi.as2.MochiEvents
{
function MochiEvents () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function startSession(achievementID) {
mochi.as2.MochiServices.send("events_beginSession", {achievementID:achievementID}, null, null);
}
static function setNotifications(clip, style) {
var _local2 = {};
for (var _local3 in style) {
_local2[_local3] = style[_local3];
}
_local2.clip = clip;
mochi.as2.MochiServices.send("events_setNotifications", _local2, 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 ACHIEVEMENT_RECEIVED = "AchievementReceived";
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 _dispatcher = new mochi.as2.MochiEventDispatcher();
}
Symbol 619 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 620 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 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 171 MovieClip Frame 1
function init() {
var _local1 = Stage.scaleMode;
Stage.scaleMode = "exactFit";
w = Stage.width;
h = Stage.height;
Stage.scaleMode = _local1;
recalcParentMatrix();
cameraStep();
onEnterFrame = cameraStep;
onUnload = resetStage;
}
function recalcParentMatrix() {
mc = _parent;
if (level) {
var _local5 = level - 1;
} else {
var _local5 = 1000;
}
while (((_local5--) && (mc)) && (mc != _root)) {
var _local4 = new flash.geom.Transform(mc);
if (!parentM) {
parentM = _local4.matrix;
} else {
parentM.concat(_local4.matrix);
}
mc = mc._parent;
}
cameraTrans = new flash.geom.Transform(this);
topLevelTrans = new flash.geom.Transform(mc);
resetM = topLevelTrans.matrix;
resetTopLevelColor = topLevelTrans.colorTransform;
}
function cameraStep() {
topLevelTrans.colorTransform = cameraTrans.colorTransform;
curM = cameraTrans.matrix;
if (parentM) {
curM.concat(parentM);
}
curM.invert();
curM.translate(w / 2, h / 2);
topLevelTrans.matrix = curM;
}
function resetStage() {
topLevelTrans.matrix = resetM;
topLevelTrans.colorTransform = resetTopLevelColor;
}
var level = 0;
cameraFrame._visible = false;
init();
Symbol 382 MovieClip Frame 1
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 + 2;
loadingbar._xscale = percentDone;
}
if (percentDone >= 100) {
_parent.play();
}
};
Symbol 392 Button
on (press) {
_root.play();
}
Instance of Symbol 159 MovieClip in Symbol 393 MovieClip Frame 26
on (release) {
getURL (sponsorurl, "_blank");
}
Symbol 393 MovieClip Frame 275
stop();
Symbol 393 MovieClip Frame 281
stop();
Symbol 402 MovieClip Frame 1
stop();
Symbol 410 MovieClip Frame 1
stop();
Symbol 415 MovieClip Frame 1
stop();
Symbol 415 MovieClip Frame 2
playSound("achi");
Symbol 415 MovieClip Frame 20
stop();
Symbol 427 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 432 MovieClip Frame 1
onEnterFrame = function () {
if (_xscale > 100) {
_yscale = (_yscale - 2);
_xscale = (_yscale - 2);
}
};
Symbol 436 Button
on (rollOver) {
playSound("mouseon");
}
Symbol 443 MovieClip Frame 1
stop();
Symbol 444 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.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(1, "b_upgr");
_root.openMenu(2, "select");
_root.openMenu(3, "b_achi");
}
};
Symbol 446 MovieClip Frame 1
stop();
Symbol 446 MovieClip Frame 2
playSound("star");
Symbol 452 Button
on (rollOver) {
playSound("mouseon");
}
on (release) {
playSound("click");
_root.lvl = id;
if (id == 1) {
_root.openMenu(2, "hint");
} else if (_root.trans._currentframe == 1) {
_root.trans.gotoAndPlay(2);
}
}
Symbol 463 Button
on (rollOver) {
playSound("mouseon");
}
on (release) {
playSound("click");
_root.lvl = id;
trace(id);
if (_root.trans._currentframe == 1) {
_root.trans.gotoAndPlay(2);
}
}
Symbol 465 Button
on (rollOver) {
playSound("mouseon");
}
on (release) {
playSound("click");
_root.lvl = id;
trace(id);
if (_root.trans._currentframe == 1) {
_root.trans.gotoAndPlay(2);
}
}
Symbol 470 Button
on (rollOver) {
playSound("mouseon");
}
on (release) {
playSound("click");
}
Symbol 493 Button
on (rollOver) {
playSound("mouseon");
}
on (release) {
_root.doUpgr(this);
}
Symbol 500 MovieClip Frame 1
stop();
Symbol 511 MovieClip Frame 2
_alpha = 50;
Symbol 546 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (timer > 0) {
timer--;
if (timer == 1) {
gotoAndPlay (3);
playSound("star");
if (_name == "s3") {
playSound("holy");
}
}
}
};
Symbol 546 MovieClip Frame 13
gotoAndStop (2);
Symbol 562 Button
on (release) {
getURL (sponsorurl, "_blank");
}
Symbol 568 Button
on (rollOver) {
_root.play_on.start();
}
on (release) {
getURL ("http://www.silengames.com", "_blank");
_root.play_pre.start();
}
Symbol 590 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 == 52) {
if (timer == 0) {
timer = 50 + random(40);
_root.createPart(248, -136, 100, "star", this, 1);
} else {
timer--;
if (timer == 10) {
_root.createPart(-250, -170, 100, "star", this, 1);
}
}
}
};
Symbol 590 MovieClip Frame 2
b1.title = "Back to Menu";
b2.title = "More Games";
b1.but.onRelease = function () {
_root.openMenu(2, "main");
};
b2.but.onRelease = function () {
getURL (sponsorurl, "_blank");
};
_root.openMenu(1, "upgr");
_root.openMenu(3, "achi");
i = 1;
while (i < 37) {
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);
i++;
}
Symbol 590 MovieClip Frame 12
_root.initUpgr();
playSound("menuon");
Symbol 590 MovieClip Frame 22
_root.initAchi();
playSound("menuon");
Symbol 590 MovieClip Frame 32
playSound("menuon");
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.maxlvl = _root.lvl + 1;
_root.my_so.data.maxlvl = _root.maxlvl;
_root.lvlmedal[_root.maxlvl] = 0;
_root.my_so.data.lvlmedal[_root.maxlvl] = 0;
}
stat_star = 0;
i = 1;
while (i < 37) {
if (_root.lvlmedal[i] != undefined) {
stat_star = stat_star + _root.lvlmedal[i];
}
i++;
}
setStat(6, _root.lvl);
setStat(7, stat_star);
_root.money = _root.money + _root.giftHave;
saveStat();
_root.openMenu(1, "upgr");
_root.openMenu(3, "achi");
if (_root.lvl == 36) {
b1._visible = false;
} else {
b1._visible = true;
}
b1.title = "NEXT LEVEL";
b2.title = "Replay";
b3.title = "Level Select";
b4.title = "More Games";
b1.but.onRelease = function () {
_root.lvl++;
_root.trans.gotoAndPlay(2);
};
b2.but.onRelease = function () {
_root.trans.gotoAndPlay(2);
};
b3.but.onRelease = function () {
_root.openMenu(2, "select");
};
b4.but.onRelease = function () {
getURL (sponsorurl, "_blank");
};
trace("maxlvl " + _root.maxlvl);
Symbol 590 MovieClip Frame 42
playSound("menuon");
_root.openMenu(1, "upgr");
_root.openMenu(3, "achi");
b1.title = "REPLAY";
b2.title = "Level Select";
b3.title = "More Games";
b1.but.onRelease = function () {
_root.trans.gotoAndPlay(2);
};
b2.but.onRelease = function () {
_root.openMenu(2, "select");
};
b3.but.onRelease = function () {
getURL (sponsorurl, "_blank");
};
_root.money = _root.money + _root.giftHave;
saveStat();
Symbol 590 MovieClip Frame 52
playSound("menuon");
_root.openMenu(1, "b_upgr");
_root.openMenu(3, "b_achi");
b1.title = "START GAME";
b2.title = "Credits";
b3.title = "More Games";
b1.but.onRelease = function () {
_root.openMenu(2, "select");
};
b2.but.onRelease = function () {
_root.openMenu(2, "credit");
};
b3.but.onRelease = function () {
getURL (sponsorurl, "_blank");
};
Symbol 590 MovieClip Frame 62
playSound("menuon");
b1.title = "BACK TO MENU";
b1.but.onRelease = function () {
_root.openMenu(1, "exit");
_root.openMenu(2, "main");
_root.openMenu(3, "exit");
};
Symbol 590 MovieClip Frame 72
playSound("menuon");
_root.openMenu(1, "exit");
_root.openMenu(3, "exit");
b1.title = "CONTINUE";
b1.but.onRelease = function () {
_root.openMenu(2, "exit");
if (_root.trans._currentframe == 1) {
_root.trans.gotoAndPlay(2);
}
};
Symbol 590 MovieClip Frame 82
b1.title = " UPGRADE SHOP";
b1.but.onRelease = function () {
_root.openMenu(1, "upgr");
};
Symbol 590 MovieClip Frame 92
b1.title = " ACHIEVEMENTS";
b1.but.onRelease = function () {
_root.openMenu(3, "achi");
};
Symbol 600 MovieClip Frame 1
stop();
Symbol 600 MovieClip Frame 6
_root.createLevel();
Symbol 604 MovieClip Frame 1
stop();
Symbol 609 MovieClip Frame 1
stop();
_visible = false;
Symbol 609 MovieClip Frame 2
_visible = true;
playSound("achi2");
Symbol 609 MovieClip Frame 11
playSound("holy");
Symbol 613 MovieClip Frame 1
onEnterFrame = function () {
_x = _root._xmouse;
_y = _root._ymouse;
_root.hint._visible = _visible;
};