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);
}
function gotoMySite() {
getURL ("http://www.clockworkmonster.com", "_blank");
}
function clic() {
f1Snd = new Sound();
f1Snd.attachSound("Btn2");
f1Snd.setVolume(30);
f1Snd.start(0.04, 1);
}
function clic2() {
f2Snd = new Sound();
f2Snd.attachSound("Btn1");
f2Snd.start(0.02, 1);
}
stop();
this._lockroot = true;
var leng = 1;
var scoreSubmitter = (new unitescore.CUniteScoreAS2());
__com_mochibot__("c9ec1e9f", this, 10301, true);
var _mochiads_game_id = "50cf973395ac252b";
mochi.as2.MochiServices.connect("50cf973395ac252b");
var loadTime = false;
playBtn._visible = false;
var CPMStarPoolID = 8179;
var CPMStarSubPoolID = 3;
System.security.allowDomain("server.cpmstar.com");
adBox.loadMovie((("http://server.cpmstar.com/adviewas2.swf?poolid=" + CPMStarPoolID) + "&subpoolid=") + CPMStarSubPoolID);
onEnterFrame = function () {
already_loaded = _root.getBytesLoaded() / _root.getBytesTotal();
if ((already_loaded == 1) && (loadTime)) {
clearInterval(nInterval);
delete onEnterFrame;
playBtn._visible = true;
preloader_mc._visible = false;
}
};
playBtn.onRelease = function () {
removeMovieClip(adBox);
clearInterval(nInterval);
_root.gotoAndStop(2);
};
var copyrightNotice = new ContextMenuItem("\u00A9 2009 Javier L\u00E1zaro", gotoMySite);
copyrightNotice.separatorBefore = true;
var mySiteLink = new ContextMenuItem("ClockworkMonster Game Design", gotoMySite);
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
myMenu.customItems.push(mySiteLink, copyrightNotice);
_root.menu = myMenu;
Instance of Symbol 261 MovieClip [CWMIntro] in Frame 1
on (release) {
getURL ("http://www.clockworkmonster.com", "_blank");
}
Frame 2
function ftimer() {
loadTime = true;
}
_root.stop();
var loadTime = false;
var nTimerInterval = setInterval(ftimer, 4500);
onEnterFrame = function () {
already_loaded = _root.getBytesLoaded() / _root.getBytesTotal();
preloader_mc.value = already_loaded;
if ((already_loaded == 1) & loadTime) {
delete onEnterFrame;
delete eval (ftimer());
_root.gotoAndStop("MenuEng");
loadTime = false;
}
};
Instance of Symbol 274 MovieClip in Frame 2
on (release) {
_root.getURL("http://www.frosmo.com", "_blank");
}
Frame 5
function fFart2() {
}
function fFart1() {
f2Snd.start(0.02, 1);
}
stop();
var leng = 1;
if (((((((_root._url.indexOf("mindjolt.com") > -1) or (_root._url.indexOf("gamegarage.co.uk") > -1)) or (_root._url.indexOf("surpassarcade") > -1)) or (_root._url.indexOf("gamebrew") > -1)) or (_root._url.indexOf("thisarcade.com") > -1)) or (_root._url.indexOf("thegamehomepage") > -1)) or (_root._url.indexOf("pepere") > -1)) {
scoBtn._visible = false;
}
this.createEmptyMovieClip("F1", 41);
this.createEmptyMovieClip("F2", 42);
f1Snd = new Sound(F1);
f1Snd.attachSound("Btn2");
f1Snd.setVolume(50);
f2Snd = new Sound(F2);
f2Snd.attachSound("Btn1");
playBtn.onRollOver = function () {
fFart2();
f1Snd.start(0.02, 1);
};
playBtn.onPress = function () {
_root.gotoAndStop("Game");
fFart1();
};
AddSite.onRollOver = function () {
fFart2();
f1Snd.start(0.02, 1);
};
AddSite.onRelease = function () {
fFart1();
getURL ("http://flashgamedistribution.com/game/Night_Balloons/", "_blank");
};
scoBtn.onRollOver = function () {
fFart2();
f1Snd.start(0.02, 1);
};
scoBtn.onPress = function () {
_root.gotoAndStop("Scores");
fFart1();
};
morBtn.onRollOver = function () {
fFart2();
f1Snd.start(0.02, 1);
};
morBtn.onRelease = function () {
fFart1();
getURL ("http://www.frosmo.com", "_blank");
};
rusianBtn.onRollOver = function () {
fFart2();
};
rusianBtn.onRelease = function () {
fFart1();
_root.leng = 2;
_root.gotoAndStop("MenuRus");
};
chineseBtn.onRollOver = function () {
fFart2();
};
chineseBtn.onRelease = function () {
fFart1();
_root.leng = 3;
_root.gotoAndStop("MenuChi");
};
JaviBtn.onRollOver = function () {
fFart2();
};
JaviBtn.onRelease = function () {
fFart1();
getURL ("http://www.clockworkmonster.com", "_blank");
};
HFXBtn.onRollOver = function () {
fFart2();
};
HFXBtn.onRelease = function () {
fFart1();
getURL ("http://halcyonicfalconx.newgrounds.com/", "_blank");
};
BogdanBtn.onRollOver = function () {
fFart2();
};
BogdanBtn.onRelease = function () {
fFart1();
getURL ("http://flashgameart.com/user/FGA_Bogdan/", "_blank");
};
Instance of Symbol 688 MovieClip in Frame 5
on (release) {
getURL ("http://www.frosmo.com", "_blank");
}
Frame 6
function fFart2() {
f1Snd = new Sound(F1);
f1Snd.attachSound("Btn2");
f1Snd.setVolume(50);
f1Snd.start(0.02, 1);
}
function fFart1() {
f2Snd = new Sound(F2);
f2Snd.attachSound("Btn1");
f2Snd.start(0.02, 1);
}
stop();
var leng = 2;
if (((((((_root._url.indexOf("mindjolt.com") > -1) or (_root._url.indexOf("gamegarage.co.uk") > -1)) or (_root._url.indexOf("surpassarcade") > -1)) or (_root._url.indexOf("gamebrew") > -1)) or (_root._url.indexOf("thisarcade.com") > -1)) or (_root._url.indexOf("thegamehomepage") > -1)) or (_root._url.indexOf("pepere") > -1)) {
scoBtn._visible = false;
}
this.createEmptyMovieClip("F1", 41);
this.createEmptyMovieClip("F2", 42);
playBtn.onRollOver = function () {
fFart2();
};
playBtn.onPress = function () {
_root.gotoAndStop("Game");
fFart1();
};
AddSite.onRollOver = function () {
fFart2();
};
AddSite.onRelease = function () {
fFart1();
getURL ("http://www.mochimedia.com/games/21-balloons_v1/", "_blank");
getURL ("http://cdn.mochiads.com/c/g/21-balloons_v1.zip", "_blank");
};
scoBtn.onRollOver = function () {
fFart2();
};
scoBtn.onPress = function () {
_root.gotoAndStop("ScoresRus");
fFart1();
};
JaviBtn.onRollOver = function () {
fFart2();
};
JaviBtn.onRelease = function () {
fFart1();
getURL ("http://www.clockworkmonster.com", "_blank");
};
HFXBtn.onRollOver = function () {
fFart2();
};
HFXBtn.onRelease = function () {
fFart1();
getURL ("http://halcyonicfalconx.newgrounds.com/", "_blank");
};
BogdanBtn.onRollOver = function () {
fFart2();
};
BogdanBtn.onRelease = function () {
fFart1();
getURL ("http://flashgameart.com/user/FGA_Bogdan/", "_blank");
};
morBtn.onRollOver = function () {
fFart2();
};
morBtn.onRelease = function () {
fFart1();
getURL ("http://www.frosmo.com", "_blank");
};
englishBtn.onRollOver = function () {
fFart2();
};
englishBtn.onRelease = function () {
fFart1();
_root.gotoAndStop("MenuEng");
};
chineseBtn.onRollOver = function () {
fFart2();
};
chineseBtn.onRelease = function () {
fFart1();
_root.gotoAndStop("MenuChi");
};
Instance of Symbol 688 MovieClip in Frame 6
on (release) {
getURL ("http://www.frosmo.com", "_blank");
}
Frame 7
function fFart2() {
f1Snd = new Sound(F1);
f1Snd.attachSound("Btn2");
f1Snd.setVolume(50);
f1Snd.start(0.02, 1);
}
function fFart1() {
f2Snd = new Sound(F2);
f2Snd.attachSound("Btn1");
f2Snd.start(0.02, 1);
}
stop();
var leng = 3;
if (((((((_root._url.indexOf("mindjolt.com") > -1) or (_root._url.indexOf("gamegarage.co.uk") > -1)) or (_root._url.indexOf("surpassarcade") > -1)) or (_root._url.indexOf("gamebrew") > -1)) or (_root._url.indexOf("thisarcade.com") > -1)) or (_root._url.indexOf("thegamehomepage") > -1)) or (_root._url.indexOf("pepere") > -1)) {
scoBtn._visible = false;
}
this.createEmptyMovieClip("F1", 41);
this.createEmptyMovieClip("F2", 42);
playBtn.onRollOver = function () {
fFart2();
};
playBtn.onPress = function () {
_root.gotoAndStop("Game");
fFart1();
};
AddSite.onRollOver = function () {
fFart2();
};
AddSite.onRelease = function () {
fFart1();
getURL ("http://www.mochimedia.com/games/21-balloons_v1/", "_blank");
getURL ("http://cdn.mochiads.com/c/g/21-balloons_v1.zip", "_blank");
};
scoBtn.onRollOver = function () {
fFart2();
};
scoBtn.onPress = function () {
_root.gotoAndStop("ScoresChi");
fFart1();
};
morBtn.onRollOver = function () {
fFart2();
};
morBtn.onRelease = function () {
fFart1();
getURL ("http://www.frosmo.com", "_blank");
};
JaviBtn.onRollOver = function () {
fFart2();
};
JaviBtn.onRelease = function () {
fFart1();
getURL ("http://www.clockworkmonster.com", "_blank");
};
HFXBtn.onRollOver = function () {
fFart2();
};
HFXBtn.onRelease = function () {
fFart1();
getURL ("http://halcyonicfalconx.newgrounds.com/", "_blank");
};
BogdanBtn.onRollOver = function () {
fFart2();
};
BogdanBtn.onRelease = function () {
fFart1();
getURL ("http://flashgameart.com/user/FGA_Bogdan/", "_blank");
};
englishBtn.onRollOver = function () {
fFart2();
};
englishBtn.onRelease = function () {
fFart1();
_root.gotoAndStop("MenuEng");
};
rusianBtn.onRollOver = function () {
fFart2();
};
rusianBtn.onRelease = function () {
fFart1();
_root.gotoAndStop("MenuRus");
};
Instance of Symbol 688 MovieClip in Frame 7
on (release) {
getURL ("http://www.frosmo.com", "_blank");
}
Frame 8
function fcounter() {
if (!gamePause) {
timer--;
}
}
function placeItems() {
_root.attachMovie("pod", "pod", 9200, {_x:320, _y:450});
_root.attachMovie("base", "base", 8500, {_x:320, _y:460});
_root.attachMovie("Bg0", "Bg", 1);
_root.createEmptyMovieClip("rod", 8999);
_root.createEmptyMovieClip("nhilo", 2);
_root.createEmptyMovieClip("insMc", 9100);
_root.attachMovie("Score", "Score", 9500, {_x:5, _y:449});
placeBear();
if (leng < 2) {
Score.gotoAndStop("Eng");
} else {
Score.gotoAndStop("Rus");
if (leng == 3) {
Score.gotoAndStop("Chi");
}
}
Score.noMusicBtn._visible = false;
Score.noSfxBtn._visible = false;
Score.PauseBtn.onPress = function () {
if (!gameOver) {
if (transition < 1) {
if (!initScreen) {
if (!gamePause) {
gamePause = true;
musicSnd.stop();
attachMovie("insPause", "insPause", 9600, {_x:320, _y:240});
if (leng < 2) {
insPause.gotoAndStop("Eng");
} else {
insPause.gotoAndStop("Rus");
if (leng == 3) {
insPause.gotoAndStop("Chi");
}
}
} else {
gamePause = false;
if (sound) {
musicSnd.start(0.02, 9999);
}
removeMovieClip("insPause");
}
}
}
}
};
Score.musicBtn.onPress = function () {
sound = false;
musicSnd.stop();
Score.musicBtn._visible = false;
Score.noMusicBtn._visible = true;
};
Score.noMusicBtn.onPress = function () {
sound = true;
if (!gamePause) {
if (!gameOver) {
musicSnd.start(0.02, 9999);
}
}
Score.noMusicBtn._visible = false;
Score.musicBtn._visible = true;
};
Score.sfxBtn.onPress = function () {
sfx = false;
Score.sfxBtn._visible = false;
Score.noSfxBtn._visible = true;
};
Score.noSfxBtn.onPress = function () {
sfx = true;
Score.noSfxBtn._visible = false;
Score.sfxBtn._visible = true;
};
if (sfx) {
Score.noSfxBtn._visible = false;
Score.sfxBtn._visible = true;
} else {
Score.sfxBtn._visible = false;
Score.noSfxBtn._visible = true;
}
if (sound) {
Score.noMusicBtn._visible = false;
Score.MusicBtn._visible = true;
} else {
Score.MusicBtn._visible = false;
Score.noMusicBtn._visible = true;
}
}
function placeBear() {
if (gcatched >= gtarget) {
gcolor = random(4) + 1;
_root.attachMovie("oso" + gcolor, palo, 1000, {_x:690, _y:430});
} else {
gcolor = random(4) + 1;
_root.attachMovie("oso" + gcolor, palo, 1000, {_x:370, _y:430});
}
}
function fdead() {
if (sfx) {
if (gameLvl > 15) {
bravoSnd.start(0.02, 1);
}
}
cleaning = true;
gamePause = true;
gameOver = true;
musicSnd.stop();
pod.removeMovieClip();
rod.removeMovieClip();
base.removeMovieClip();
ins.removeMovieClip();
palo.removeMovieClip();
Score.removeMovieClip();
_root.attachMovie("oso" + gcolor, palo, 1000, {_x:690, _y:430});
_root.attachMovie("PlayAgain", "PlayAgain", 9000, {_x:289, _y:246});
if (gameLvl > 15) {
_root.attachMovie("BgFinal", "PlayAgain", 9000, {_x:317, _y:225});
}
if (leng < 2) {
PlayAgain.gotoAndStop("Eng");
} else {
PlayAgain.gotoAndStop("Rus");
if (leng == 3) {
PlayAgain.gotoAndStop("Chi");
}
}
PlayAgain.PlayAgainBtn.onRollOver = function () {
if (sfx) {
clic();
}
};
PlayAgain.PlayAgainBtn.onPress = function () {
if (sfx) {
clic2();
}
PlayAgain.removeMovieClip();
fclear();
reset();
nextLvl();
if (sound) {
musicSnd.start(0.02, 999);
}
};
PlayAgain.BackMenuBtn.onRollOver = function () {
if (sfx) {
clic();
}
};
PlayAgain.BackMenuBtn.onPress = function () {
if (sfx) {
clic2();
}
fclear();
musicSnd.stop();
if (leng < 2) {
_root.gotoAndStop("MenuEng");
} else {
_root.gotoAndStop("MenuRus");
if (leng == 3) {
_root.gotoAndStop("MenuChi");
}
}
};
PlayAgain.SubmitBtn.onRollOver = function () {
if (sfx) {
clic();
}
};
PlayAgain.SubmitBtn.onPress = function () {
if (sfx) {
clic2();
}
fclear();
musicSnd.stop();
if (leng < 2) {
_root.gotoAndStop("GameOver");
} else {
_root.gotoAndStop("GameOverRus");
if (leng == 3) {
_root.gotoAndStop("GameOverChi");
}
}
};
PlayAgain.MoreGamesBtn.onRollOver = function () {
if (sfx) {
clic();
}
};
PlayAgain.MoreGamesBtn.onRelease = function () {
if (sfx) {
clic2();
}
getURL ("http://www.frosmo.com", "_blank");
};
if (((((((((((_root._url.indexOf("games-garden.com") or (_root._url.indexOf("bubblebox.com") > -1)) or (_root._url.indexOf("jeuxgratuits.net") > -1)) or (_root._url.indexOf("nonoba") > -1)) or (_root._url.indexOf("gr8games") > -1)) or (_root._url.indexOf("e-gierki") > -1)) or (_root._url.indexOf("hallpass.com") > -1)) or (_root._url.indexOf("gamegarage.co.uk") > -1)) or (_root._url.indexOf("surpassarcade") > -1)) or (_root._url.indexOf("gamebrew") > -1)) or (_root._url.indexOf("thisarcade.com") > -1)) or (_root._url.indexOf("pepere") > -1)) {
PlayAgain.SubmitBtn._visible = false;
}
if (!sent) {
sent = true;
scoreSubmitter.sendScore(score);
}
}
function nextLvl() {
placeItems();
initScreen = true;
gamePause = true;
gameLvl++;
switch (gameLvl) {
case 1 :
_root.attachMovie("initIns", "insLvl", 9000, {_x:320, _y:220});
gtarget = 4;
wind = 0;
butterfly = 0;
if (sound) {
musicSnd.start(0.02, 999);
}
break;
case 2 :
_root.attachMovie("initIns2", "insLvl", 9000, {_x:320, _y:220});
gtarget = 5;
wind = 0;
butterfly = 0;
break;
case 3 :
_root.attachMovie("initIns5", "insLvl", 9000, {_x:320, _y:220});
gtarget = 6;
wind = 0;
butterfly = 0;
break;
case 4 :
_root.attachMovie("initIns3", "insLvl", 9000, {_x:320, _y:220});
gtarget = 6;
wind = 1;
butterfly = 0;
break;
case 5 :
_root.attachMovie("initIns4", "insLvl", 9000, {_x:320, _y:220});
gtarget = 7;
wind = -1;
butterfly = 1;
break;
case 6 :
_root.attachMovie("initIns6", "insLvl", 9000, {_x:320, _y:200});
gtarget = 7;
wind = -2;
butterfly = 1;
break;
case 7 :
_root.attachMovie("initIns7", "insLvl", 9000, {_x:320, _y:200});
gtarget = 8;
wind = 0;
butterfly = 2;
break;
case 8 :
_root.attachMovie("insLvl", "insLvl", 9000, {_x:320, _y:200});
gtarget = 9;
wind = 1;
butterfly = 2;
break;
case 9 :
_root.attachMovie("insLvl", "insLvl", 9000, {_x:320, _y:200});
gtarget = 10;
wind = 0;
butterfly = 3;
break;
case 10 :
_root.attachMovie("insLvl", "insLvl", 9000, {_x:320, _y:200});
gtarget = 11;
wind = 1;
butterfly = 3;
break;
case 11 :
_root.attachMovie("insLvl", "insLvl", 9000, {_x:320, _y:200});
gtarget = 12;
wind = 2;
butterfly = 3;
break;
case 12 :
_root.attachMovie("insLvl", "insLvl", 9000, {_x:320, _y:200});
gtarget = 13;
wind = -3;
butterfly = 3;
break;
case 13 :
_root.attachMovie("insLvl", "insLvl", 9000, {_x:320, _y:200});
gtarget = 14;
wind = 1;
butterfly = 4;
break;
case 14 :
_root.attachMovie("initIns11", "insLvl", 9000, {_x:320, _y:200});
gtarget = 15;
wind = -3;
butterfly = 4;
break;
case 15 :
_root.attachMovie("initIns12", "insLvl", 9000, {_x:320, _y:200});
gtarget = 16;
wind = 3;
butterfly = 5;
break;
case 16 :
fclear();
fdead();
score = score;
ready = false;
}
if (leng < 2) {
insLvl.gotoAndStop("Eng");
} else {
insLvl.gotoAndStop("Rus");
if (leng == 3) {
insLvl.gotoAndStop("Chi");
}
}
if (gameLvl < 16) {
pod_status = "rotate";
pod.pArrow._visible = true;
setGlobos();
if (gameLvl > 1) {
fbonusg();
setBf();
}
gcatched = 0;
gperfect = 0;
gleft = gtarget - gcatched;
lifeG = 0;
bg++;
bg = bg % 3;
pod._y = 450;
pod._x = 320;
timer = 99 + gameLvl;
score = score;
lives = lives;
ready = false;
_root.attachMovie("Bg" + bg, "Bg", 1);
Bg.cacheAsBitmap = true;
placeBear();
osoOut = _root.attachMovie("oso" + gcolor, osoOut, 2000, {_x:690, _y:420});
}
}
function fclear() {
PlayAgain.removeMovieClip();
Score.removeMovieClip();
insLvl.removeMovieClip();
insMc.removeMovieClip();
Bg.removeMovieClip();
pod.removeMovieClip();
rod.removeMovieClip();
ins.removeMovieClip();
palo.removeMovieClip();
base.removeMovieClip();
osoOut.removeMovieClip();
Bfly.removeMovieClip();
Globo.removeMovieClip();
pArrow.removeMovieClip();
removeMovieClip("hilo");
}
function reset() {
score = 0;
pscore = 0;
lives = 3;
bg = 3;
lifeG = 0;
timer = 99;
gameLvl = 0;
gamePause = false;
gameOver = false;
cleaning = false;
ready = false;
sent = false;
pod._y = 450;
pod._x = 320;
pod_status = "rotate";
pod.pArrow._visible = true;
pod.gotoAndStop(1);
if (leng < 2) {
insLvl.gotoAndStop("Eng");
} else {
insLvl.gotoAndStop("Rus");
if (leng == 3) {
insLvl.gotoAndStop("Chi");
}
}
}
function onEnterFrame() {
if (!gamePause) {
if (ready) {
if (osoOut._x < 690) {
osoOut._x = osoOut._x + 5;
osoOut._y = osoOut._y - 1;
} else {
if (gameLvl > 1) {
if (bonusGlobo < 1) {
if (gameLvl < 16) {
fbonusg();
}
}
}
if (transition < 1) {
if (gcatched >= gtarget) {
Score.removeMovieClip();
if (gperfect == gtarget) {
score = score + 30000;
_root.attachMovie("perfect2", "endLvl", 9000, {_x:0, _y:0});
if (sfx) {
bonusSnd.start(0.03, 1);
}
} else {
_root.attachMovie("endLvl2", "endLvl", 9000, {_x:0, _y:0});
}
if (leng < 2) {
endLvl.gotoAndStop("Eng");
} else {
endLvl.gotoAndStop("Rus");
if (leng == 3) {
endLvl.gotoAndStop("Chi");
}
}
timeBonus = timer * 200;
score = score + timeBonus;
score = score;
initScreen = true;
gamePause = true;
transition = 1;
}
}
}
}
ins._alpha = ins._alpha - 2;
ins._y--;
if (ins._alpha < 10) {
ins.removeMovieClip();
}
insLvl._alpha = insLvl._alpha - 8;
if (insLvl._alpha < 1) {
insLvl.removeMovieClip();
initScreen = false;
transition = 0;
}
endLvl._alpha = endLvl._alpha - 8;
if (endLvl._alpha < 1) {
endLvl.removeMovieClip();
nextLvl();
}
switch (pod_status) {
case "rotate" :
pod._rotation = pod._rotation + rotation_dir;
if ((pod._rotation > 80) or (pod._rotation < -80)) {
rotation_dir = rotation_dir * -1;
}
break;
case "shoot" :
pod._x = pod._x - (10 * cos);
pod._y = pod._y - (10 * sin);
if (((pod._y < 10) or (pod._x < 10)) or (pod._x > 630)) {
pod_status = "rewind";
pod.gotoAndStop(1);
if (sfx) {
carreteSnd.start(0, 1);
}
}
rod.clear();
rod.lineStyle(4, 0);
rod.moveTo(320, 450);
rod.lineTo(pod._x, pod._y);
break;
case "rewind" :
pod._x = pod._x + (12 * cos);
pod._y = pod._y + (12 * sin);
if (pod._y > 451) {
pod._y = 450;
pod._x = 320;
rod.clear();
pod_status = "rotate";
carreteSnd.stop();
pod.gotoAndStop(1);
pod.pArrow._visible = true;
if (lives < 1) {
fdead();
}
}
rod.clear();
rod.lineStyle(4, 0);
rod.moveTo(320, 450);
rod.lineTo(pod._x, pod._y);
}
}
}
function setBf() {
x = 1;
while (x <= butterfly) {
Bfly = _root.attachMovie("bfly", ("bfly_" + x) + 8300, x + 8300, {_x:559, _y:random(330) + 30});
var _local3 = 0;
_local3 = random(2);
if (_local3 < 1) {
Bfly.gotoAndStop("bf1");
} else {
Bfly.gotoAndStop("bf2");
}
if (_root.gameLvl == 3) {
Bfly.gotoAndStop("bf1");
}
Bfly.blam = 0;
_local3 = random(2);
if (_local3 < 1) {
Bfly.spd = random(3) + 2;
} else {
Bfly.spd = random(3) - 4;
Bfly._xscale = -100;
}
Bfly.onEnterFrame = function () {
if (!gamePause) {
var _local3 = 0;
_local3 = random(27);
if (_local3 < 1) {
this._y = this._y + (random(6) + 2);
}
if (_local3 > 24) {
this._y = this._y - (random(6) + 2);
}
this._x = this._x + this.spd;
if (this.blam < 1) {
if (this._x > 660) {
this._x = -18;
this._y = random(330) + 30;
}
if (this._x < -20) {
this._x = 658;
this._y = random(330) + 30;
}
if ((pod_status == "shoot") and this.hitTest(pod.dummy)) {
this.blam = 1;
this.gotoAndPlay("dead");
pod_status = "rewind";
lives--;
if (lives <= 0) {
lives = 0;
}
_root.ins = _root.insMc.attachMovie("insMalus", "insMalus", 9100, {_x:320, _y:420});
if (sfx) {
hitSnd.start(0.03, 1);
carreteSnd.start(0, 1);
}
}
} else {
this._alpha = this._alpha - 1;
if (this._alpha < 80) {
removeMovieClip(this);
delete eval (onEnterFrame(this));
}
}
} else if (cleaning) {
removeMovieClip(this);
delete eval (this.onEnterFrame());
}
};
x++;
}
}
function setGlobos() {
x = 1;
while (x <= globos) {
var col = 1;
var _local4 = 1;
Globo = _root.attachMovie("target", ("target_" + x) + 2, x + 2, {_x:random(630) + 5, _y:random(310) + 20});
Globo._rotation = wind * 2;
Globo.cacheAsBitmap = true;
Globo.picked = false;
Globo.blam = 0;
Globo.col = random(4) + 1;
Globo.hil = random(5) + 1;
Globo.globo.gotoAndStop(Globo.col);
Globo.hilo.gotoAndStop(Globo.hil);
Globo.onEnterFrame = function () {
if (!gamePause) {
if (!this.picked) {
var _local3 = 0;
_local3 = random(50);
if (_local3 < 1) {
this._y++;
}
if (_local3 > 68) {
this._y--;
}
this._x = this._x + wind;
if (this.blam < 1) {
if (this._x > 650) {
this._x = -10;
this._y = random(330) + 20;
}
if (this._x < -12) {
this._x = 648;
this._y = random(330) + 20;
}
if ((pod_status == "shoot") and this.globo.hitTest(pod.dummy)) {
this.blam = 1;
this.globo.gotoAndPlay(7);
this.hilo._visible = false;
pod_status = "rewind";
lives--;
if (lives < 0) {
lives = 0;
}
_root.ins = _root.insMc.attachMovie("insMalus", "insMalus", 9100, {_x:320, _y:420});
if (sfx) {
popSnd.start(0.03, 1);
ohnoSnd.start(0, 1);
carreteSnd.start(0, 1);
}
}
if (this.blam < 1) {
if ((pod_status == "shoot") and this.hilo.hitTest(pod.dummy)) {
pod_status = "rewind";
ready = true;
pod.gotoAndStop(2);
mult = Math.floor(530 - pod._y) / 100;
_root.ins = _root.insMc.attachMovie("insMult", "insX", 9100, {_x:320, _y:240});
if (sfx) {
bonusSnd.start(0.03, 1);
}
this.hilo._visible = false;
this._rotation = (pod._rotation / 5) + (wind * 2);
this._x = this._x + Math.floor(pod._rotation / 5);
xdif = this._x - pod._x;
ydif = this._y - pod._y;
this.picked = true;
_root.attachMovie("hilo", "hilo", 8800, {_x:pod._x - (18 * cos), _y:pod._y - (18 * sin)});
_root.hilo._height = 30;
if (sfx) {
carreteSnd.start(0, 1);
}
}
}
} else {
this._alpha = this._alpha - 2;
if (this._alpha < 70) {
removeMovieClip(this);
delete eval (onEnterFrame(this));
}
}
} else {
hilox = pod._x - (18 * cos);
hiloy = pod._y - (18 * sin);
this._x = pod._x + xdif;
this._y = pod._y + ydif;
nhilo.clear();
nhilo.lineStyle(1, 16777215);
nhilo.moveTo(this._x, this._y);
nhilo.lineTo(hilox, hiloy);
hilo._x = hilox;
hilo._y = hiloy;
if ((pod._y > 439) and this.picked) {
if (this.col == gcolor) {
_root.ins = _root.insMc.attachMovie("ins2000", "ins10", 9100, {_x:320, _y:400});
pscore = 2000 * mult;
gperfect++;
if (sfx) {
bonusSnd.start(0.03, 1);
}
} else {
_root.ins = _root.insMc.attachMovie("insScore", "insScore", 9100, {_x:320, _y:420});
pscore = 1000 * mult;
if (sfx) {
dingSnd.start(0.03, 1);
}
}
if (leng < 2) {
_root.ins.gotoAndStop("Eng");
} else {
_root.ins.gotoAndStop("Rus");
if (leng == 3) {
_root.ins.gotoAndStop("Chi");
}
}
gcatched++;
gleft = gtarget - gcatched;
pod._y = 450;
pod._x = 320;
rod.clear();
pod_status = "rotate";
pod.pArrow._visible = true;
pod.gotoAndStop(1);
carreteSnd.stop();
score = score + pscore;
this.hilo._visible = true;
removeMovieClip("hilo");
nhilo.clear();
osoOut = _root.attachMovie("oso" + gcolor, osoOut, 2000, {_x:420, _y:420});
osoOut.attachMovie("globo" + this.col, globo, 1999, {_x:0, _y:-35});
osoOut.gotoAndPlay("Out");
osoOut.osoOut.swapDepths(globo);
removeMovieClip(this);
delete eval (onEnterFrame(this));
placeBear();
if (gameLvl > 1) {
if (bonusGlobo < 1) {
if (gameLvl < 16) {
fbonusg();
}
}
}
}
}
} else if (cleaning) {
removeMovieClip(this);
delete eval (this.onEnterFrame());
osoOut.removeMovieClip();
palo.removeMovieClip();
removeMovieClip("hilo");
nhilo.clear();
}
};
x++;
}
}
function fbonusg() {
bonusGlobo = 1;
var _local3 = 6;
if ((lifeG < 1) and (gameLvl > 2)) {
_local3 = random(3);
if (_local3 < 1) {
_local3 = 6;
lifeG = 1;
} else {
_local3 = 5;
}
if (gameLvl == 3) {
_local3 = 6;
lifeG = 1;
}
} else {
_local3 = 5;
}
var spd = 0;
if (wind < 0) {
Globo = _root.attachMovie("target", "bTarget", 500, {_x:650, _y:random(275) + 60});
spd = 2;
} else {
Globo = _root.attachMovie("target", "bTarget", 500, {_x:-20, _y:random(275) + 60});
spd = -2;
}
Globo.spd = spd;
Globo._rotation = spd * 2;
Globo.cacheAsBitmap = true;
Globo.picked = false;
Globo.blam = 0;
Globo.mult = 1;
Globo.col = _local3;
Globo.hil = random(5) + 1;
Globo.globo.gotoAndStop(Globo.col);
Globo.hilo.gotoAndStop(Globo.hil);
Globo.onEnterFrame = function () {
if (!gamePause) {
if (!this.picked) {
var _local3 = 0;
_local3 = random(50);
if (_local3 < 1) {
this._y++;
}
if (_local3 > 68) {
this._y--;
}
this._x = this._x + this.spd;
if (this.blam < 1) {
if (this._x > 650) {
this._x = -10;
}
if (this._x < -20) {
this._x = 648;
}
if ((pod_status == "shoot") and this.globo.hitTest(pod.dummy)) {
this.blam = 1;
this.globo.gotoAndPlay(7);
this.hilo._visible = false;
pod_status = "rewind";
lives--;
if (lives < 0) {
lives = 0;
}
_root.ins = _root.insMc.attachMovie("insMalus", "insMalus", 9100, {_x:320, _y:420});
if (sfx) {
popSnd.start(0.03, 1);
ohnoSnd.start(0, 1);
carreteSnd.start(0, 1);
}
}
if (this.blam < 1) {
if ((pod_status == "shoot") and this.hilo.hitTest(pod.dummy)) {
pod_status = "rewind";
ready = true;
pod.gotoAndStop(2);
if (sfx) {
carreteSnd.start(0, 1);
}
if (this.col > 5) {
mult = Math.floor((530 - pod._y) / 200) + 1;
_root.ins = _root.insMc.attachMovie(("ins" + mult) + "x", "insX", 9100, {_x:320, _y:240});
} else {
mult = Math.floor(530 - pod._y) / 100;
_root.ins = _root.insMc.attachMovie("insMult", "insX", 9100, {_x:320, _y:240});
}
if (sfx) {
bonusSnd.start(0.03, 1);
}
this.hilo._visible = false;
this._rotation = (pod._rotation / 5) + (wind * 2);
this._x = this._x + Math.floor(pod._rotation / 5);
xdif = this._x - pod._x;
ydif = this._y - pod._y;
this.picked = true;
_root.attachMovie("hilo", "hilo", 8800, {_x:pod._x - (18 * cos), _y:pod._y - (18 * sin)});
_root.hilo._height = 30;
}
}
} else {
this._alpha = this._alpha - 2;
if (this._alpha < 70) {
removeMovieClip(this);
delete eval (onEnterFrame(this));
fbonusg();
}
}
} else {
hilox = pod._x - (18 * cos);
hiloy = pod._y - (18 * sin);
this._x = pod._x + xdif;
this._y = pod._y + ydif;
nhilo.clear();
nhilo.lineStyle(1, 16777215);
nhilo.moveTo(this._x, this._y);
nhilo.lineTo(hilox, hiloy);
hilo._x = hilox;
hilo._y = hiloy;
if ((pod._y > 439) and this.picked) {
if (this.col == 5) {
_root.ins = _root.insMc.attachMovie("insBonus", "ins10", 9100, {_x:320, _y:400});
pscore = 3000 * mult;
gperfect++;
} else {
_root.ins = _root.insMc.attachMovie("insBonusL" + mult, "ins10", 9100, {_x:320, _y:400});
lives = lives + mult;
gperfect++;
this.col = 6;
}
if (sfx) {
bonusSnd.start(0.03, 1);
}
if (leng < 2) {
_root.ins.gotoAndStop("Eng");
} else {
_root.ins.gotoAndStop("Rus");
if (leng == 3) {
_root.ins.gotoAndStop("Chi");
}
}
gcatched++;
gleft = gtarget - gcatched;
pod._y = 450;
pod._x = 320;
rod.clear();
pod_status = "rotate";
pod.pArrow._visible = true;
pod.gotoAndStop(1);
carreteSnd.stop();
score = score + pscore;
bonusGlobo = 0;
this.hilo._visible = true;
removeMovieClip("hilo");
nhilo.clear();
osoOut = _root.attachMovie("oso" + gcolor, osoOut, 2000, {_x:420, _y:420});
osoOut.attachMovie("globo" + this.col, globo, 1999, {_x:0, _y:-35});
osoOut.gotoAndPlay("Out");
osoOut.osoOut.swapDepths(globo);
this.picked = false;
removeMovieClip(this);
delete eval (onEnterFrame(this));
}
}
} else if (cleaning) {
this._x = 680;
removeMovieClip("hilo");
nhilo.clear();
palo.removeMovieClip();
removeMovieClip(this);
delete eval (this.onEnterFrame());
osoOut.removeMovieClip();
}
};
}
function onMouseDown() {
if (!gamePause) {
if ((_xmouse > 522) && (_ymouse > 444)) {
} else if (pod_status == "rotate") {
if (gcatched < gtarget) {
dir = (pod._rotation + 90) * 0.0174532925;
sin = Math.sin(dir);
cos = Math.cos(dir);
pod.pArrow._visible = false;
pod_status = "shoot";
if (sfx) {
boingSnd.start(0.04, 1);
}
}
}
}
if (initScreen) {
initScreen = false;
gamePause = false;
}
}
var globos = 22;
var sin = 0;
var cos = 0;
var dir = 0;
var wind = 0;
var rotation_dir = 2;
var pod_status = "rotate";
var ready = true;
var xdif = 0;
var ydif = 0;
var score = 0;
var pscore = 0;
var bg = 3;
var gcatched = 0;
var gperfect = 0;
var gtarget = 2;
var gleft = 0;
var butterfly = 0;
var gcolor = 3;
var bonusGlobo = 0;
var gameLvl = 0;
var lives = 3;
var lifeG = 0;
var transition = 0;
var timer = 99;
var timeBonus = 0;
var podHeight = 0;
var mult = 0;
var sound = true;
var sfx = true;
var initScreen = true;
var gameOver = false;
var gamePause = false;
var cleaning = false;
var sent = false;
this.createEmptyMovieClip("SFX1", 31);
this.createEmptyMovieClip("SFX2", 32);
this.createEmptyMovieClip("SFX3", 33);
this.createEmptyMovieClip("SFX4", 34);
this.createEmptyMovieClip("SFX5", 35);
this.createEmptyMovieClip("SFX6", 36);
this.createEmptyMovieClip("SFX7", 37);
this.createEmptyMovieClip("SFX8", 38);
this.createEmptyMovieClip("SFX9", 39);
this.createEmptyMovieClip("Music", 40);
var bonusSnd = new Sound(SFX1);
bonusSnd.attachSound("bonus2");
var popSnd = new Sound(SFX2);
popSnd.attachSound("pop0");
var dingSnd = new Sound(SFX4);
dingSnd.attachSound("Ding5");
var hitSnd = new Sound(SFX6);
hitSnd.attachSound("meathit");
var bravoSnd = new Sound(SFX7);
bravoSnd.attachSound("bravo1");
var carreteSnd = new Sound(SFX8);
carreteSnd.attachSound("carrete2");
var boingSnd = new Sound(SFX9);
boingSnd.attachSound("BOING3");
var musicSnd = new Sound(Music);
musicSnd.attachSound("NBMain");
musicSnd.setVolume(50);
var nTimeInt = setInterval(fcounter, 1000);
nextLvl();
Frame 9
function fFart2() {
f1Snd = new Sound();
f1Snd.attachSound("Btn2");
f1Snd.setVolume(30);
f1Snd.start(0.02, 1);
}
function fFart1() {
f2Snd = new Sound();
f2Snd.attachSound("Btn1");
f2Snd.start(0.02, 1);
}
stop();
var o = {n:[8, 3, 8, 3, 10, 15, 3, 1, 3, 11, 12, 5, 10, 5, 7, 5], f:function (i, s) {
if (s.length == 16) {
return(s);
}
return(this.f(i + 1, s + this.n[i].toString(16)));
}};
var boardID = o.f(0, "");
mochi.as2.MochiScores.showLeaderboard({boardID:boardID, res:"810x500", denyFriends:true, onClose:function () {
_root.gotoAndStop("MenuEng");
}});
this.createEmptyMovieClip("F1", 41);
this.createEmptyMovieClip("F2", 42);
morBtn.onRollOver = function () {
fFart2();
};
morBtn.onRelease = function () {
fFart1();
getURL ("http://www.frosmo.com", "_blank");
};
BackMenuBtn.onRelease = function () {
mochi.as2.MochiScores.closeLeaderboard();
_root.gotoAndStop("MenuEng");
};
Frame 10
function fFart2() {
f1Snd = new Sound();
f1Snd.attachSound("Btn2");
f1Snd.setVolume(30);
f1Snd.start(0.02, 1);
}
function fFart1() {
f2Snd = new Sound();
f2Snd.attachSound("Btn1");
f2Snd.start(0.02, 1);
}
stop();
var o = {n:[8, 3, 8, 3, 10, 15, 3, 1, 3, 11, 12, 5, 10, 5, 7, 5], f:function (i, s) {
if (s.length == 16) {
return(s);
}
return(this.f(i + 1, s + this.n[i].toString(16)));
}};
var boardID = o.f(0, "");
mochi.as2.MochiScores.showLeaderboard({boardID:boardID, res:"810x500", denyFriends:true, onClose:function () {
_root.gotoAndStop("MenuRus");
}});
this.createEmptyMovieClip("F1", 41);
this.createEmptyMovieClip("F2", 42);
morBtn.onRollOver = function () {
fFart2();
};
morBtn.onRelease = function () {
fFart1();
getURL ("http://www.frosmo.com", "_blank");
};
Frame 11
function fFart2() {
f1Snd = new Sound();
f1Snd.attachSound("Btn2");
f1Snd.setVolume(30);
f1Snd.start(0.02, 1);
}
function fFart1() {
f2Snd = new Sound();
f2Snd.attachSound("Btn1");
f2Snd.start(0.02, 1);
}
stop();
var o = {n:[8, 3, 8, 3, 10, 15, 3, 1, 3, 11, 12, 5, 10, 5, 7, 5], f:function (i, s) {
if (s.length == 16) {
return(s);
}
return(this.f(i + 1, s + this.n[i].toString(16)));
}};
var boardID = o.f(0, "");
mochi.as2.MochiScores.showLeaderboard({boardID:boardID, res:"810x500", denyFriends:true, onClose:function () {
_root.gotoAndStop("MenuChi");
}});
this.createEmptyMovieClip("F1", 41);
this.createEmptyMovieClip("F2", 42);
morBtn.onRollOver = function () {
fFart2();
};
morBtn.onRelease = function () {
fFart1();
getURL ("http://www.frosmo.com", "_blank");
};
Frame 12
function fFart2() {
f1Snd = new Sound();
f1Snd.attachSound("Btn2");
f1Snd.setVolume(30);
f1Snd.start(0.02, 1);
}
function fFart1() {
f2Snd = new Sound();
f2Snd.attachSound("Btn1");
f2Snd.start(0.02, 1);
}
stop();
var o = {n:[8, 3, 8, 3, 10, 15, 3, 1, 3, 11, 12, 5, 10, 5, 7, 5], f:function (i, s) {
if (s.length == 16) {
return(s);
}
return(this.f(i + 1, s + this.n[i].toString(16)));
}};
var boardID = o.f(0, "");
mochi.as2.MochiScores.showLeaderboard({boardID:boardID, score:score, res:"810x500", denyFriends:true, onClose:function () {
_root.gotoAndStop("MenuEng");
}});
this.createEmptyMovieClip("F1", 41);
this.createEmptyMovieClip("F2", 42);
morBtn.onRollOver = function () {
fFart2();
};
morBtn.onRelease = function () {
fFart1();
getURL ("http://www.frosmo.com", "_blank");
};
BackMenuBtn.onRelease = function () {
mochi.as2.MochiScores.closeLeaderboard();
_root.gotoAndStop("MenuEng");
};
Frame 13
function fFart2() {
f1Snd = new Sound();
f1Snd.attachSound("Btn2");
f1Snd.setVolume(30);
f1Snd.start(0.02, 1);
}
function fFart1() {
f2Snd = new Sound();
f2Snd.attachSound("Btn1");
f2Snd.start(0.02, 1);
}
stop();
var o = {n:[8, 3, 8, 3, 10, 15, 3, 1, 3, 11, 12, 5, 10, 5, 7, 5], f:function (i, s) {
if (s.length == 16) {
return(s);
}
return(this.f(i + 1, s + this.n[i].toString(16)));
}};
var boardID = o.f(0, "");
mochi.as2.MochiScores.showLeaderboard({boardID:boardID, score:score, res:"810x500", denyFriends:true, onClose:function () {
_root.gotoAndStop("MenuRus");
}});
this.createEmptyMovieClip("F1", 41);
this.createEmptyMovieClip("F2", 42);
morBtn.onRollOver = function () {
fFart2();
};
morBtn.onRelease = function () {
fFart1();
getURL ("http://www.frosmo.com", "_blank");
};
Frame 14
function fFart2() {
f1Snd = new Sound();
f1Snd.attachSound("Btn2");
f1Snd.setVolume(30);
f1Snd.start(0.02, 1);
}
function fFart1() {
f2Snd = new Sound();
f2Snd.attachSound("Btn1");
f2Snd.start(0.02, 1);
}
stop();
var o = {n:[8, 3, 8, 3, 10, 15, 3, 1, 3, 11, 12, 5, 10, 5, 7, 5], f:function (i, s) {
if (s.length == 16) {
return(s);
}
return(this.f(i + 1, s + this.n[i].toString(16)));
}};
var boardID = o.f(0, "");
mochi.as2.MochiScores.showLeaderboard({boardID:boardID, score:score, res:"810x500", denyFriends:true, onClose:function () {
_root.gotoAndStop("MenuChi");
}});
this.createEmptyMovieClip("F1", 41);
this.createEmptyMovieClip("F2", 42);
morBtn.onRollOver = function () {
fFart2();
};
morBtn.onRelease = function () {
fFart1();
getURL ("http://www.frosmo.com", "_blank");
};
Frame 15
stop();
Instance of Symbol 261 MovieClip [CWMIntro] in Frame 15
on (release) {
getURL ("http://www.clockworkmonster.com", "_blank");
}
Symbol 57 MovieClip [hilo] Frame 1
stop();
Symbol 57 MovieClip [hilo] Frame 2
stop();
Symbol 57 MovieClip [hilo] Frame 3
stop();
Symbol 57 MovieClip [hilo] Frame 4
stop();
Symbol 57 MovieClip [hilo] Frame 5
stop();
Symbol 86 MovieClip [baloonExplode] Frame 12
stop();
Symbol 87 MovieClip [globo] Frame 1
stop();
Symbol 87 MovieClip [globo] Frame 2
stop();
Symbol 87 MovieClip [globo] Frame 3
stop();
Symbol 87 MovieClip [globo] Frame 4
stop();
Symbol 87 MovieClip [globo] Frame 5
stop();
Symbol 87 MovieClip [globo] Frame 6
stop();
Symbol 87 MovieClip [globo] Frame 7
stop();
Symbol 95 MovieClip [pod] Frame 1
stop();
Symbol 95 MovieClip [pod] Frame 2
stop();
Symbol 190 MovieClip [BgFinal] Frame 1
stop();
Symbol 190 MovieClip [BgFinal] Frame 2
stop();
Symbol 190 MovieClip [BgFinal] Frame 3
stop();
Symbol 223 MovieClip [initIns6] Frame 1
stop();
Symbol 223 MovieClip [initIns6] Frame 2
stop();
Symbol 223 MovieClip [initIns6] Frame 3
stop();
Symbol 254 MovieClip [Score] Frame 1
stop();
Symbol 254 MovieClip [Score] Frame 2
stop();
Symbol 254 MovieClip [Score] Frame 3
stop();
Symbol 271 MovieClip Frame 390
_root.loadTime = true;
stop();
Symbol 809 MovieClip [__Packages.unitescore.CUniteScoreAS2] Frame 0
class unitescore.CUniteScoreAS2
{
var DEBUGFIELD, url, urlOrig, mochiadsGameID, mochiadsBoardID, sendLocalConnection, scoreGUI, pendingScore, interval;
function CUniteScoreAS2 (debugField, urlDebug, paramsDebug) {
if (debugField != undefined) {
DEBUGFIELD = debugField;
}
if (DEBUGFIELD) {
DEBUGFIELD.text = DEBUGFIELD.text + newline;
}
_root.cunitescoreInstance = this;
_root._lockroot = true;
_root._cuniscoreContext = this;
url = urlDebug || (_root._url);
urlOrig = url;
url = url.toLowerCase();
if (paramsDebug) {
if (DEBUGFIELD) {
DEBUGFIELD.text = DEBUGFIELD.text + "CUniteScoreAS2 paramsDebug, debug swf url parameters : \n";
}
for (var _local4 in paramsDebug) {
if (DEBUGFIELD) {
DEBUGFIELD.text = DEBUGFIELD.text + ((((" property(" + _local4) + ") = ") + paramsDebug[_local4]) + newline);
}
_root[_local4] = paramsDebug[_local4];
}
}
if (DEBUGFIELD) {
DEBUGFIELD.text = DEBUGFIELD.text + (("CUniteScoreAS2 url=" + urlOrig) + newline);
}
init();
}
function setMainScoreCategory(category) {
mainScoreCategory = category;
}
function initMochiAdsLeaderboard(gameid, boardid) {
mochiadsGameID = gameid;
mochiadsBoardID = boardid;
unitescore.mochi.MochiServices.connect(mochiadsGameID);
}
function sendScore(score, category) {
category = category || (mainScoreCategory);
var _local8;
if (DEBUGFIELD) {
DEBUGFIELD.text = DEBUGFIELD.text + (((("CUniteScoreAS2 sendScore url=" + url) + " category=") + category) + newline);
}
if (url.indexOf("nonoba.com") > -1) {
var _local7;
_local7 = ((category == mainScoreCategory) ? "totalscores" : (category.split(" ").join("").split("-").join("").toLowerCase()));
unitescore.nonoba.NonobaAPI.SubmitScore(_local7, score, null);
} else if (url.indexOf("kongregate.com") > -1) {
if (DEBUGFIELD) {
DEBUGFIELD.text = DEBUGFIELD.text + (("CUniteScoreAS2 _root.kongregateScores=" + _root.kongregateScores) + newline);
}
_root.kongregateScores.setMode(category);
_root.kongregateScores.submit(score);
} else if (url.indexOf("surpassarcade.com") > -1) {
if (category == mainScoreCategory) {
sendLocalConnection.send("spapi", "sendScore", score);
} else {
sendLocalConnection.send("spapi", "sendScore", score, category);
}
} else if ((url.indexOf("mindjolt") > -1) || (url.indexOf("thisarcade.com") > -1)) {
if (category == mainScoreCategory) {
sendLocalConnection.send(_root.com_mindjolt_api, "submitScore", score);
} else {
sendLocalConnection.send(_root.com_mindjolt_api, "submitScore", score, category);
}
} else if (url.indexOf("gamebrew.com") > -1) {
if (category == mainScoreCategory) {
sendLocalConnection.send("gbapi", "scoreSubmit", score);
}
} else if (url.indexOf("hallpass.com") > -1) {
_root.HPScoreService.postScore(score, category);
} else if (url.indexOf("gamegarage.co.uk") > -1) {
if (((_root.gamegarageApiPath != undefined) && (_root.game_id != undefined)) && (category == mainScoreCategory)) {
_root.unitescorePendingScore = score;
_root.unitescoreSendScoreMethod = gamegarageSendScore;
if (scoreGUI != undefined) {
gamegarageSendScore();
} else {
var _local6 = "";
if (_root.user_id != undefined) {
_local6 = "&user_id=" + _root.user_id;
}
loadScoreGUI(((_root.gamegarageApiPath + "?game_id=") + _root.game_id) + _local6, 550, 400, scoreGUIComplete);
}
}
} else if (url.indexOf("pepere.org") > -1) {
if (category == mainScoreCategory) {
sendLocalConnection.send("pepereRcvApi" + _root.pepereGameID, "sendScore", score);
}
} else if (url.indexOf("xpogames.com") > -1) {
if (category == mainScoreCategory) {
getURL (("javascript:setScore(" + score) + "); void(0);", "_self");
getURL ("javascript:endGame(); void(0);", "_self");
}
} else if (url.indexOf("jeuxgratuits.net") > -1) {
flash.external.ExternalInterface.call("flashScoreService", score, category);
} else if ((url.indexOf("gr8games.eu") > -1) || (url.indexOf("e-gierki.com") > -1)) {
if (DEBUGFIELD) {
DEBUGFIELD.text = DEBUGFIELD.text + (("CUniteScoreAS2 _root.gr8games_api=" + _root.gr8games_api) + newline);
}
if (category == mainScoreCategory) {
sendLocalConnection.send(_root.gr8games_api, "submitScore", score);
} else {
sendLocalConnection.send(_root.gr8games_api, "submitScore", score, category);
}
} else if (((_root.bubbleboxApiPath != undefined) && (_root.bubbleboxGameID != undefined)) && (url.indexOf("bubblebox.com") > -1)) {
if (category == mainScoreCategory) {
_root.unitescorePendingScore = score;
_root.unitescoreSendScoreMethod = bubbleboxSendScore;
if (scoreGUI != undefined) {
bubbleboxSendScore();
} else {
loadScoreGUI((_root.bubbleboxApiPath + "?bubbleboxGameID=") + _root.bubbleboxGameID, 400, 200, scoreGUIComplete);
}
}
} else if (url.indexOf("z-fox.com") > -1) {
if (category == mainScoreCategory) {
_root.sendScore(score);
}
} else if ((url.indexOf("games-garden.com") > -1) && (_root.isUser == "1")) {
if (category == mainScoreCategory) {
_root.gscore = score;
getURL ("index.php?act=Arcade&do=newscore", (DEBUGFIELD ? "_blank" : "_self"), "POST");
}
} else if (_root.ipb_compatible == true) {
if (DEBUGFIELD) {
DEBUGFIELD.text = DEBUGFIELD.text + "\nCUniteScoreAS2 IPB score submit\n";
}
pendingScore = score;
var _local5 = new LoadVars();
_local5.onLoad = function (success) {
if (_root.cunitescoreInstance.DEBUGFIELD) {
_root.cunitescoreInstance.DEBUGFIELD.text = _root.cunitescoreInstance.DEBUGFIELD.text + (((((((("\nCUniteScoreAS2 IPB cheatFight, success=" + success) + " this.savescore=") + this.savescore) + " this.randchar=") + this.randchar) + " this.randchar2=") + this.randchar2) + newline);
}
if (success) {
if (this.savescore == 1) {
var _local3 = new LoadVars();
_local3.arcadegid = _root.ibpro_gameid;
_local3.gscore = _root.cunitescoreInstance.pendingScore;
_local3.gname = _root.cunitescoreInstance.getIPBgname();
_local3.enscore = (_root.cunitescoreInstance.pendingScore * this.randchar) ^ this.randchar2;
if (_root.cunitescoreInstance.DEBUGFIELD) {
_root.cunitescoreInstance.DEBUGFIELD.text = _root.cunitescoreInstance.DEBUGFIELD.text + (((((((((("\nCUniteScoreAS2 IPB do=savescore, success=" + success) + " sendlv.arcadegid=") + _local3.arcadegid) + " sendlv.gscore=") + _local3.gscore) + " sendlv.gname=") + _local3.gname) + " sendlv.enscore=") + _local3.enscore) + newline);
}
_local3.send("index.php?autocom=arcade&do=savescore", (_root.cunitescoreInstance.DEBUGFIELD ? "_blank" : "_self"), "POST");
}
}
};
_local8 = new LoadVars();
_local8.sendAndLoad("index.php?autocom=arcade&do=verifyscore", _local5, "POST");
} else if ((mochiadsGameID != undefined) && (mochiadsBoardID != undefined)) {
if (category == mainScoreCategory) {
unitescore.mochi.MochiScores.showLeaderboard({boardID:mochiadsBoardID, score:score});
}
}
}
function loadScoreGUI(apiPath, w, h, completeCallback) {
scoreGUI = _root.createEmptyMovieClip("scoreGUI_mc", 10336);
scoreGUI._x = (Stage.width / 2) - (w / 2);
scoreGUI._y = (Stage.height / 2) - (h / 2);
var _local4 = new MovieClipLoader();
var _local3 = new Object();
_local3.onLoadError = function (target_mc, errorCode) {
trace("load error " + errorCode);
};
_local3.onLoadInit = completeCallback;
_local4.addListener(_local3);
_local4.loadClip(apiPath, scoreGUI);
}
function getIPBgname() {
var _local4 = "";
var _local3 = "";
var _local8 = urlOrig.indexOf(".swf");
var _local5;
if (_local8 > -1) {
_local5 = urlOrig.substr(0, _local8 + 4);
} else {
_local5 = urlOrig;
}
var _local7 = _local5.lastIndexOf("\\") + 1;
if ((_local7 == -1) || (_local7 == 0)) {
_local7 = _local5.lastIndexOf("/") + 1;
}
var _local2 = _local7;
var _local6 = _local5.length;
while (_local2 < _local6) {
_local3 = _local5.charAt(_local2);
if (_local3 == ".") {
break;
}
_local4 = _local4 + _local3;
_local2++;
}
return(_local4);
}
function init() {
sendLocalConnection = new LocalConnection();
sendLocalConnection.onStatus = function (info) {
trace((("localConnection " + info.level) + " ") + info);
};
var _local3;
if (url.indexOf("kongregate.com") > -1) {
if (DEBUGFIELD) {
DEBUGFIELD.text = DEBUGFIELD.text + (("CUniteScoreAS2 _root.kongregateServices=" + _root.kongregateServices) + newline);
}
_root.kongregateServices.connect();
if (DEBUGFIELD) {
DEBUGFIELD.text = DEBUGFIELD.text + "CUniteScoreAS2 _root.kongregateServices.connect()\n";
}
} else if (url.indexOf("gamegarage.co.uk") > -1) {
if ((_root.game_id != undefined) && (_root.user_id != undefined)) {
_local3 = new LoadVars();
_local3.game_id = _root.game_id;
_local3.user_id = _root.user_id;
_local3.sendAndLoad("http://www.gamegarage.co.uk/scripts/tracking.php", _local3, "POST");
}
} else if ((urlOrig.indexOf("/arcade/") > -1) || (urlOrig.indexOf("/Games/") > -1)) {
_local3 = new LoadVars();
_local3.onLoad = function (success) {
if (_root.cunitescoreInstance.DEBUGFIELD) {
_root.cunitescoreInstance.DEBUGFIELD.text = _root.cunitescoreInstance.DEBUGFIELD.text + (((("CUniteScoreAS2 IPB init, success=" + success) + " this.scoreVar=") + this.scoreVar) + newline);
}
if (success) {
_root.ipb_scoreVar = this.scoreVar;
_root.ipb_compatible = true;
}
};
var _local4 = getIPBgname();
var _local5 = ((("arcade/gamedata/" + _local4) + "/") + _local4) + ".txt";
if (DEBUGFIELD) {
DEBUGFIELD.text = DEBUGFIELD.text + (((("CUniteScoreAS2 IPB init, ipb_gname=" + _local4) + " loading ") + _local5) + newline);
}
_local3.load(_local5);
}
}
function scoreGUIComplete(target_mc) {
this=_root._cuniscoreContext;//parameter overwritten
_root._cuniscoreContext;
trace((((("scoreGUIComplete(" + target_mc) + ") _root.unitescoreSendScoreMethodD=") + _root.unitescoreSendScoreMethod) + " _root.unitescorePendingScore=") + _root.unitescorePendingScore);
interval = setInterval(_root.unitescoreSendScoreMethod, 500);
}
function bubbleboxSendScore() {
this=_root._cuniscoreContext;//parameter overwritten
_root._cuniscoreContext;
clearInterval(interval);
sendLocalConnection.send("bubbleboxRcvApi" + _root.bubbleboxGameID, "sendScore", _root.unitescorePendingScore);
}
function gamegarageSendScore() {
this=_root._cuniscoreContext;//parameter overwritten
_root._cuniscoreContext;
clearInterval(interval);
sendLocalConnection.send("gamegarageRcvApi" + _root.game_id, "sendScore", _root.unitescorePendingScore);
}
var mainScoreCategory = "";
}
Symbol 810 MovieClip [__Packages.unitescore.mochi.MochiServices] Frame 0
class unitescore.mochi.MochiServices
{
static var _id, _container, _clip, _sendChannelName, _rcvChannelName, __get__comChannelName, onError, _listenChannel, _rcvChannel, _loader, _loaderListener, _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("1.34");
}
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";
_rcvChannelName = val;
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
unitescore.mochi.MochiServices.onError = onError;
} else if (unitescore.mochi.MochiServices.onError == undefined) {
unitescore.mochi.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();
_rcvChannel.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 _local2 = "_mochiservices_com_" + id;
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
allowDomains(_gatewayURL);
_clip = clip.createEmptyMovieClip(_local2, 10336, false);
_loader = new MovieClipLoader();
if (_loaderListener.waitInterval != null) {
clearInterval(_loaderListener.waitInterval);
}
_loaderListener = {};
_loaderListener.onLoadError = function (target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
unitescore.mochi.MochiServices.disconnect();
unitescore.mochi.MochiServices.onError.apply(null, [errorCode]);
};
_loaderListener.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_loaderListener.startTime = getTimer();
_loaderListener.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
unitescore.mochi.MochiServices.disconnect();
unitescore.mochi.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_loaderListener.waitInterval = setInterval(_loaderListener, "wait", 1000);
_loader.addListener(_loaderListener);
_loader.loadClip(_gatewayURL, _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
_rcvChannel = new LocalConnection();
_rcvChannel.allowDomain = function (d) {
return(true);
};
_rcvChannel.allowInsecureDomain = _rcvChannel.allowDomain;
_rcvChannel._nextcallbackID = 0;
_rcvChannel._callbacks = {};
listen();
return(_clip);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
unitescore.mochi.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
unitescore.mochi.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_clip, version:getVersion()});
_rcvChannel.onStatus = function (infoObject) {
unitescore.mochi.MochiServices.onStatus(infoObject);
};
_rcvChannel.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];
};
_rcvChannel.onError = function () {
unitescore.mochi.MochiServices.onError.apply(null, ["IOError"]);
};
_rcvChannel.connect(_rcvChannelName);
trace("connected!");
_connecting = false;
_connected = true;
_listenChannel.close();
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 = _rcvChannel._callbacks[_local1.callbackID];
}
delete _rcvChannel._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:_rcvChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
onError.apply(null, ["NotConnected"]);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
}
_rcvChannel._callbacks[_rcvChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_rcvChannel._nextcallbackID++;
}
static var _gatewayURL = "http://www.mochiads.com/static/lib/services/services.swf";
static var _listenChannelName = "__mochiservices";
static var _connecting = false;
static var _connected = false;
}
Symbol 811 MovieClip [__Packages.unitescore.nonoba.NonobaAPI] Frame 0
class unitescore.nonoba.NonobaAPI
{
static var api;
function NonobaAPI () {
throw new Error("ERROR!: You cannot create an instance of the NonobaAPI class!");
}
static function GetShopItemKeys(callback) {
if (!isInited) {
Init();
}
if (failed) {
if (callback) {
callback(ERROR, null);
}
return(undefined);
}
if (api && (api.ShowShop)) {
api.GetShopItemKeys(callback);
} else {
cachedRequests.push(function () {
unitescore.nonoba.NonobaAPI.GetShopItemKeys(callback);
});
}
}
static function HasShopItem(item, callback) {
if (!isInited) {
Init();
}
if (failed) {
if (callback) {
callback(ERROR, false, null);
}
return(undefined);
}
if (api && (api.ShowShop)) {
api.HasShopItem(item, callback);
} else {
cachedRequests.push(function () {
unitescore.nonoba.NonobaAPI.HasShopItem(item, callback);
});
}
}
static function ShowShop(item, callback) {
if (!isInited) {
Init();
}
if (failed) {
if (callback) {
callback(ERROR);
}
return(undefined);
}
if (api && (api.ShowShop)) {
api.ShowShop(item, callback);
} else {
cachedRequests.push(function () {
unitescore.nonoba.NonobaAPI.ShowShop(item, callback);
});
}
}
static function Login(callback) {
if (!isInited) {
Init();
}
if (failed) {
if (callback) {
callback(ERROR);
}
return(undefined);
}
if (api && (api.Login)) {
api.Login(callback);
} else {
cachedRequests.push(function () {
unitescore.nonoba.NonobaAPI.Login(callback);
});
}
}
static function SubmitScore(key, score, callback) {
if (!isInited) {
Init();
}
if (failed) {
if (callback) {
callback(ERROR);
}
return(undefined);
}
if (api && (api.SubmitScore)) {
api.SubmitScore(key, score, callback);
} else {
cachedRequests.push(function () {
unitescore.nonoba.NonobaAPI.SubmitScore(key, score, callback);
});
}
}
static function AwardAchievement(key, callback) {
if (!isInited) {
Init();
}
if (failed) {
if (callback) {
callback(ERROR, 0);
}
return(undefined);
}
if (api && (api.AwardAchievement)) {
api.AwardAchievement(key, callback);
} else {
cachedRequests.push(function () {
unitescore.nonoba.NonobaAPI.AwardAchievement(key, callback);
});
}
}
static function SetUserData(key, value, callback) {
if (!isInited) {
Init();
}
if (failed) {
if (callback) {
callback(ERROR);
}
return(undefined);
}
if (api && (api.SetUserData)) {
api.SetUserData(key, value, callback);
} else {
cachedRequests.push(function () {
unitescore.nonoba.NonobaAPI.SetUserData(key, value, callback);
});
}
}
static function GetUserData(key, callback) {
if (!isInited) {
Init();
}
if (failed) {
if (callback) {
callback(ERROR, "");
}
return(undefined);
}
if (api && (api.GetUserData)) {
api.GetUserData(key, callback);
} else {
cachedRequests.push(function () {
unitescore.nonoba.NonobaAPI.GetUserData(key, callback);
});
}
}
static function GetUsername(callback) {
if (!isInited) {
Init();
}
if (failed) {
if (callback) {
callback(ERROR, "");
}
return(undefined);
}
if (api && (api.GetUsername)) {
api.GetUsername(callback);
} else {
cachedRequests.push(function () {
unitescore.nonoba.NonobaAPI.GetUsername(callback);
});
}
}
static function Init(container) {
function emptyCache() {
var _local1 = 0;
while (_local1 < unitescore.nonoba.NonobaAPI.cachedRequests.length) {
unitescore.nonoba.NonobaAPI.cachedRequests[_local1]();
_local1++;
}
unitescore.nonoba.NonobaAPI.cachedRequests = [];
}
if (isInited) {
throw new Error("NonobaAPI can not be re-initialized!");
}
isInited = true;
var _local3 = _root.nonoba$apicodeas2;
if (!_local3) {
failed = true;
emptyCache();
}
System.security.allowDomain("*");
container = container || _root;
api = container.createEmptyMovieClip("___NonobaAPI__loader", container.getNextHighestDepth());
var _local5 = new MovieClipLoader();
_local5.addListener({onLoadComplete:function () {
var loadTimer = setInterval(mx.utils.Delegate.create(unitescore.nonoba.NonobaAPI, function () {
if (!(unitescore.nonoba.NonobaAPI.api.SubmitScore === undefined)) {
clearInterval(loadTimer);
emptyCache();
}
}), 500);
}, onLoadError:function () {
unitescore.nonoba.NonobaAPI.failed = true;
emptyCache();
}});
_local5.loadClip(_local3, api);
}
static var SUCCESS = "SUCCESS";
static var NOT_LOGGED_IN = "user not logged in";
static var ERROR = "error";
static var isInited = false;
static var loading = false;
static var cachedRequests = [];
static var failed = false;
}
Symbol 812 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 813 MovieClip [__Packages.unitescore.mochi.MochiScores] Frame 0
class unitescore.mochi.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
unitescore.mochi.MochiScores.boardID = boardID;
unitescore.mochi.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function showLeaderboard(options) {
if (options.clip != null) {
if ((options.clip != unitescore.mochi.MochiServices.__get__clip()) || (unitescore.mochi.MochiServices.__get__childClip()._target == undefined)) {
unitescore.mochi.MochiServices.disconnect();
unitescore.mochi.MochiServices.connect(unitescore.mochi.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 (typeof(options.score) == "object") {
if (options.score.text != undefined) {
options.score = options.score.text;
}
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
unitescore.mochi.MochiServices.__get__clip().stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
unitescore.mochi.MochiServices.__get__clip().play();
};
}
if (options.onError != null) {
onError = options.onError;
} else {
onError = onClose;
}
if (options.boardID == null) {
if (boardID != null) {
options.boardID = boardID;
}
}
unitescore.mochi.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose);
}
static function closeLeaderboard() {
unitescore.mochi.MochiServices.send("scores_closeLeaderboard");
}
static function getPlayerInfo(callbackObj, callbackMethod) {
unitescore.mochi.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
static function submit(score, name, callbackObj, callbackMethod) {
unitescore.mochi.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
unitescore.mochi.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 814 MovieClip [__Packages.mochi.as2.MochiServices] Frame 0
class mochi.as2.MochiServices
{
static var _id, _container, _clip, _sendChannelName, __get__comChannelName, onError, _listenChannel, _loader, _loaderListener, _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.0");
}
static function allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
if ((!_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 _local3 = "_mochiservices_com_" + id;
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
if (urlOptions().servicesURL != undefined) {
_servicesURL = urlOptions().servicesURL;
}
allowDomains(_servicesURL);
_clip = clip.createEmptyMovieClip(_local3, 10336, false);
_listenChannelName = _listenChannelName + ((Math.floor(new Date().getTime()) + "_") + Math.floor(Math.random() * 99999));
listen();
_loader = new MovieClipLoader();
if (_loaderListener.waitInterval != null) {
clearInterval(_loaderListener.waitInterval);
}
_loaderListener = {};
_loaderListener.onLoadError = function (target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
mochi.as2.MochiServices.disconnect();
mochi.as2.MochiServices.onError.apply(null, [errorCode]);
};
_loaderListener.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_loaderListener.startTime = getTimer();
_loaderListener.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.as2.MochiServices.disconnect();
mochi.as2.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_loaderListener.waitInterval = setInterval(_loaderListener, "wait", 1000);
_loader.addListener(_loaderListener);
_loader.loadClip((((_servicesURL + "?listenLC=") + _listenChannelName) + "&mochiad_options=") + escape(_root.mochiad_options), _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
return(_clip);
}
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, clip:_clip, 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.onError = function () {
mochi.as2.MochiServices.onError.apply(null, ["IOError"]);
};
trace("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)) {
onError.apply(null, ["NotConnected"]);
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 = {};
if (_root.mochiad_options) {
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 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://x.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 var _servicesURL = "http://www.mochiads.com/static/lib/services/services.swf";
static var _listenChannelName = "__ms_";
static var _connecting = false;
static var _connected = false;
static var netup = true;
static var netupAttempted = false;
}
Symbol 815 MovieClip [__Packages.mochi.as2.MochiScores] Frame 0
class mochi.as2.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.as2.MochiScores.boardID = boardID;
mochi.as2.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function showLeaderboard(options) {
if ((options.clip == null) || (options.clip == undefined)) {
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();
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;
}
}
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 816 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 278 MovieClip [insPause] Frame 1
stop();
Symbol 278 MovieClip [insPause] Frame 2
stop();
Symbol 278 MovieClip [insPause] Frame 3
stop();
Symbol 314 MovieClip [PlayAgain] Frame 1
stop();
Symbol 314 MovieClip [PlayAgain] Frame 2
stop();
Symbol 314 MovieClip [PlayAgain] Frame 3
stop();
Symbol 324 MovieClip Frame 1
stop();
Symbol 348 MovieClip [bfly] Frame 1
stop();
Symbol 348 MovieClip [bfly] Frame 19
stop();
Symbol 348 MovieClip [bfly] Frame 60
stop();
Symbol 352 MovieClip [insBonusL1] Frame 1
stop();
Symbol 352 MovieClip [insBonusL1] Frame 2
stop();
Symbol 358 MovieClip [insMalus] Frame 1
stop();
Symbol 358 MovieClip [insMalus] Frame 2
stop();
Symbol 362 MovieClip [insBonusL3] Frame 1
stop();
Symbol 362 MovieClip [insBonusL3] Frame 2
stop();
Symbol 366 MovieClip [insBonusL2] Frame 1
stop();
Symbol 366 MovieClip [insBonusL2] Frame 2
stop();
Symbol 414 MovieClip [oso1] Frame 21
stop();
Symbol 414 MovieClip [oso1] Frame 22
stop();
Symbol 434 MovieClip [oso2] Frame 21
stop();
Symbol 434 MovieClip [oso2] Frame 22
stop();
Symbol 448 MovieClip [oso3] Frame 21
stop();
Symbol 448 MovieClip [oso3] Frame 22
stop();
Symbol 451 MovieClip [oso4] Frame 21
stop();
Symbol 451 MovieClip [oso4] Frame 22
stop();
Symbol 478 MovieClip [initIns] Frame 1
stop();
Symbol 478 MovieClip [initIns] Frame 2
stop();
Symbol 478 MovieClip [initIns] Frame 3
stop();
Symbol 494 MovieClip [initIns2] Frame 1
stop();
Symbol 494 MovieClip [initIns2] Frame 2
stop();
Symbol 494 MovieClip [initIns2] Frame 3
stop();
Symbol 509 MovieClip [initIns3] Frame 1
stop();
Symbol 509 MovieClip [initIns3] Frame 2
stop();
Symbol 509 MovieClip [initIns3] Frame 3
stop();
Symbol 523 MovieClip [initIns4] Frame 1
stop();
Symbol 523 MovieClip [initIns4] Frame 2
stop();
Symbol 523 MovieClip [initIns4] Frame 3
stop();
Symbol 539 MovieClip [initIns5] Frame 1
stop();
Symbol 539 MovieClip [initIns5] Frame 2
stop();
Symbol 539 MovieClip [initIns5] Frame 3
stop();
Symbol 554 MovieClip [initIns7] Frame 1
stop();
Symbol 554 MovieClip [initIns7] Frame 2
stop();
Symbol 554 MovieClip [initIns7] Frame 3
stop();
Symbol 567 MovieClip [initIns11] Frame 1
stop();
Symbol 567 MovieClip [initIns11] Frame 2
stop();
Symbol 567 MovieClip [initIns11] Frame 3
stop();
Symbol 580 MovieClip [initIns12] Frame 1
stop();
Symbol 580 MovieClip [initIns12] Frame 2
stop();
Symbol 580 MovieClip [initIns12] Frame 3
stop();
Symbol 592 MovieClip [ins2000] Frame 1
stop();
Symbol 592 MovieClip [ins2000] Frame 2
stop();
Symbol 592 MovieClip [ins2000] Frame 3
stop();
Symbol 599 MovieClip [insBonus] Frame 1
stop();
Symbol 599 MovieClip [insBonus] Frame 2
stop();
Symbol 599 MovieClip [insBonus] Frame 3
stop();
Symbol 606 MovieClip [insLvl] Frame 1
stop();
Symbol 606 MovieClip [insLvl] Frame 2
stop();
Symbol 606 MovieClip [insLvl] Frame 3
stop();
Symbol 633 MovieClip [perfect2] Frame 1
stop();
Symbol 633 MovieClip [perfect2] Frame 2
stop();
Symbol 633 MovieClip [perfect2] Frame 3
stop();
Symbol 650 MovieClip [endLvl2] Frame 1
stop();
Symbol 650 MovieClip [endLvl2] Frame 2
stop();
Symbol 650 MovieClip [endLvl2] Frame 3
stop();
Symbol 804 Button
on (release) {
getURL ("http://www.frosmo.com", "_blank");
}