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;
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);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
stop();
NewgroundsAPI.connectMovie(893);
Stage.showMenu = false;
timer = 0;
adPadding = 0;
_root.onEnterFrame = function () {
adPadding++;
percent = Math.min(adPadding * 0.5, 100 * (_root.getBytesLoaded() / _root.getBytesTotal()));
loadBar.gotoAndStop(Math.round(percent));
if (percent == 100) {
timer++;
if (timer < 10) {
loadBar.onEnterFrame = function () {
loadBar._xscale = loadBar._xscale + ((125 - loadBar._xscale) / 5);
loadBar._yscale = loadBar._xscale;
};
} else if (timer == 10) {
loadBar.onEnterFrame = function () {
loadBar._xscale = loadBar._xscale - (loadBar._xscale / 5);
loadBar._yscale = loadBar._xscale;
loadBar._alpha = loadBar._alpha - (loadBar._alpha / 5);
ad._alpha = loadBar._alpha;
title._alpha = loadBar._alpha;
if (loadBar._xscale < 1) {
_root.play();
}
};
}
}
};
checkurl = new String(_root._url).slice(0, 19);
compurl = new String(_root._url).slice(0, 5);
__com_mochibot__("403d6714", this, 10301, true);
bgCover2.alphaPlus = 1;
bgCover2._alpha = 0;
bgCover2.onEnterFrame = function () {
this._alpha = this._alpha + this.alphaPlus;
if (this._alpha < 0) {
this.alphaPlus = 1;
this._alpha = 0;
} else if (this._alpha > 100) {
this.alphaPlus = -1;
this._alpha = 100;
}
};
Frame 2
stop();
music = new Sound(music);
music.attachSound("music");
root = new Sound(_root);
hover = new Sound(hover);
hover.attachSound("hover");
hover.setVolume(200);
hit = new Sound(hit);
hit.attachSound("hit");
hit.setVolume(25);
correct = new Sound();
correct.attachSound("correct");
levelup = new Sound(levelup);
levelup.attachSound("levelup");
levelup.setVolume(50);
wrong = new Sound(wrong);
wrong.attachSound("wrong");
wrong.setVolume(400);
menuFlash = new Sound();
menuFlash.attachSound("menuFlash");
counter = 0;
intro.onEnterFrame = function () {
counter++;
this.gotoAndStop(Math.ceil((counter / 30) * 12));
};
_root.onEnterFrame = function () {
if (_root.musicV < 20) {
_root.musicV = _root.musicV + 0.1;
}
_root.music.setVolume(musicV);
if (Key.isDown(77) && (mdown == false)) {
if (root.getVolume() == 100) {
root.setVolume(0);
} else {
root.setVolume(100);
}
}
if (Key.isDown(77)) {
mdown = true;
} else {
mdown = false;
}
if ((!pkey) && (Key.isDown(80))) {
if ((level > 0) && (level < 50)) {
paus = !paus;
}
pkey = true;
}
if (!Key.isDown(80)) {
pkey = false;
}
if (paus) {
pauseScreen.gotoAndPlay(2);
i = 0;
while (i < circleArray.length) {
circleArray[i].cover.gotoAndPlay(2);
i++;
}
}
};
Frame 3
function __rankz_send__(par1, par2, par3, par4) {
par227 = new LoadVars();
par228 = new LoadVars();
par227.flashkey = par2;
par227.SU0249 = par1;
par227.bmFtZTE = ab3.rankz.Armor_Bot_30_En_AS1.Encode(par3);
par227.c2NvcmUx = ab3.rankz.Armor_Bot_30_En_AS1.Encode(par4 + "j%e%a%n%s");
par227.flashkey = par227.flashkey.split("=").join("");
par227.SU0249 = par227.SU0249.split("=").join("");
par228.onLoad = function (success) {
if (success) {
trace(par228.msg);
} else {
trace(par228.loaded);
}
};
par227.sendAndLoad("http://rankz.armorbot.com/submit/", par228, "POST");
}
function MenuSet() {
i = 1;
while (i < 51) {
x = 0;
while (x == 0) {
if (i < 10) {
x = random(34) + 1;
} else if (i < 20) {
x = random(52) + 34;
} else if (i < 28) {
x = random(26) + 87;
} else if (i < 40) {
x = random(86) + 1;
} else if (i < 51) {
x = random(26) + 87;
}
if (i < 30) {
k = 0;
while (k < iconOrder.length) {
if (iconOrder[k] == x) {
x = 0;
}
k++;
}
} else {
k = 30;
while (k < iconOrder.length) {
if (iconOrder[k] == x) {
x = 0;
}
k++;
}
}
}
iconOrder.push(x);
i++;
}
i = 0;
while (i < 4) {
t = _root.attachMovie("menuCircle", "menuCircle" + i, i + 100);
t._x = xCenter;
t._y = yCenter;
t.xpoint = xCenter + (Math.cos((Math.PI/2) * i) * radius);
t.ypoint = yCenter + (Math.sin((Math.PI/2) * i) * radius);
t._xscale = (t._yscale = 0);
t.num = i;
t.onEnterFrame = menuItem;
i++;
}
}
function menuItem() {
this._x = this._x + ((this.xpoint - this._x) / 5);
this._y = this._y + ((this.ypoint - this._y) / 5);
this._xscale = this._xscale + ((100 - this._xscale) / 5);
this._yscale = this._xscale;
if (this.hitTest(_root._xmouse, _root._ymouse, true) && ((Math.abs(this._x - this.xpoint) + Math.abs(this._y - this.ypoint)) < 5)) {
hover.start();
if (this.num == 0) {
menuDisplay.text = "Highscore Table";
menuDisplay.text2 = "";
} else if (this.num == 1) {
menuDisplay.text2 = "Play more games at\nBigFishGames.com";
menuDisplay.text = "";
} else if (this.num == 2) {
menuDisplay.text = "Credits";
menuDisplay.text2 = "";
} else if (this.num == 3) {
menuDisplay.text = "Begin";
menuDisplay.text2 = "";
}
menuDisplay.onEnterFrame = function () {
this._xscale = this._xscale + ((100 - this._xscale) / 5);
this._yscale = this._xscale;
this._alpha = this._alpha + ((100 - this._alpha) / 20);
};
this.onMouseDown = function () {
hit.start();
this._xscale = (this._yscale = 110);
if (this.num == 0) {
getURL ("http://rankz.armorbot.com/unique/", "_blank");
} else if (this.num == 1) {
getURL ("http://www.bigfishgames.com/online-games/?src=uniqueflashgame&afcode=af494c79d99d", "_blank");
} else if (this.num == 2) {
tipHolder.tip = "Concept, Design, Art, Programming\nStephen Colie\n\nMusic -- DarkSide555";
tipHolder.onEnterFrame = tipHolderGo;
hTimer = 100;
} else if (this.num == 3) {
hTimer = 1;
tipHolder.onEnterFrame = tipHolderGo;
this.xpoint = xCenter;
this.ypoint = yCenter;
this.onEnterFrame = menuBegin;
delete this.onMouseDown;
menuDisplay.onEnterFrame = function () {
this._xscale = this._xscale - (this._xscale / 4);
this._yscale = this._xscale;
this._alpha = this._alpha - (this._alpha / 2);
};
menuCircle0.onEnterFrame = menuFade;
menuCircle1.onEnterFrame = menuFade;
menuCircle2.onEnterFrame = menuFade;
}
};
this.onEnterFrame = function () {
this._xscale = this._xscale + ((150 - this._xscale) / 5);
this._yscale = this._xscale;
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
delete this.onMouseDown;
this.onEnterFrame = menuItem;
menuDisplay.onEnterFrame = function () {
this._xscale = this._xscale - (this._xscale / 4);
this._yscale = this._xscale;
this._alpha = this._alpha - (this._alpha / 2);
};
}
};
}
}
function menuBegin() {
if (!paus) {
TextAlphaCheck();
ScoreSet();
gTimer++;
this._x = this._x + ((this.xpoint - this._x) / 5);
this._y = this._y + ((this.ypoint - this._y) / 5);
this._xscale = this._xscale + ((100 - this._xscale) / 5);
this._yscale = this._xscale;
if (gTimer == -400) {
if (box.data.played == undefined) {
box.data.played = true;
hTimer = 400;
tipHolder.tip = "Complete each level by choosing the circle with the unique icon. Complete each level as fast as possible and with the least mistakes to earn points. P to pause and M to mute. Get ready.";
tipHolder.onEnterFrame = tipHolderGo;
} else {
gTimer = 0;
}
}
if ((gTimer == 1) && (level != 0)) {
timeBonus = Math.round((Math.max(timer / 40, 0) * level) * 34);
mistakeMinus = Math.ceil(mistakes * (200 + (level * 30.43)));
realScore = realScore + (timeBonus - mistakeMinus);
textAlphaPlus = 5;
timeBonusD = "+ " + timeBonus;
mistakeMinusD = "- " + mistakeMinus;
}
if (gTimer == 30) {
mistakes = 0;
timer = 200;
removeCircles();
level++;
if (level == 51) {
finalScore = realScore;
} else {
this.level = level;
levelup.start();
}
} else if (gTimer == 60) {
if (level < 28) {
createLevel(5 + Math.floor(level / 3));
} else if (level < 51) {
createLevel(5 + Math.floor((level - 25) / 1.5));
} else if (level == 51) {
i = 0;
while (i < 3) {
t = _root.attachMovie("menuCircle", "endCircle" + i, i + 1);
t._x = xCenter;
t._y = yCenter;
t.xpoint = xCenter + (Math.cos(Math.PI + (4.71238898038469 * i)) * (radius + 20));
t.ypoint = yCenter + (Math.sin(Math.PI + (4.71238898038469 * i)) * (radius + 20));
t._xscale = (t._yscale = 0);
t.num = i;
t.onEnterFrame = endItem;
i++;
}
this.onEnterFrame = menuFade;
}
if (level == 1) {
tipHolder.tip = "We'll start out easy, with some simple shapes.";
hTimer = 150;
tipHolder.onEnterFrame = tipHolderGo;
} else if (level == 5) {
tipHolder.tip = "Different colors.";
tipHolder.onEnterFrame = tipHolderGo;
} else if (level == 10) {
tipHolder.tip = "Switching from basic shapes to letters.";
tipHolder.onEnterFrame = tipHolderGo;
} else if (level == 15) {
tipHolder.tip = "Alternating colors, concentrate.";
tipHolder.onEnterFrame = tipHolderGo;
} else if (level == 20) {
tipHolder.tip = "Moving on to random symbols, these are the hardest icons you'll deal with.";
tipHolder.onEnterFrame = tipHolderGo;
} else if (level == 28) {
tipHolder.tip = "Reverting back before the next surprise.";
tipHolder.onEnterFrame = tipHolderGo;
} else if (level == 33) {
tipHolder.tip = "Rotating circles, choose carefully.";
tipHolder.onEnterFrame = tipHolderGo;
} else if (level == 40) {
tipHolder.tip = "Back to random symbols.";
tipHolder.onEnterFrame = tipHolderGo;
}
}
}
}
function TextAlphaCheck() {
if (timeBonusText._alpha < 0) {
timeBonusText._alpha = 0;
}
if (mistakeText._alpha < 0) {
mistakeText._alpha = 0;
}
if (finalScoreText._alpha < 0) {
finalScoreText._alpha = 0;
}
if ((finalScore > 0) && (finalScoreText._alpha < 100)) {
finalScoreText._alpha = finalScoreText._alpha + 5;
}
if (timeBonus > 0) {
timeBonusText._alpha = timeBonusText._alpha + textAlphaPlus;
}
if (mistakeMinus > 0) {
mistakeText._alpha = mistakeText._alpha + textAlphaPlus;
}
if ((timeBonusText._alpha > 120) || (mistakeText._alpha > 120)) {
textAlphaPlus = -5;
}
}
function tipHolderGo() {
if (!paus) {
hTimer--;
if (tipHolder._alpha < 100) {
tipHolder._alpha = tipHolder._alpha + Math.max(3, (100 - tipHolder._alpha) / 20);
} else {
tipHolder._alpha = 100;
}
if (hTimer == 0) {
hTimer = 200;
tipHolder.onEnterFrame = function () {
if (tipHolder._alpha > 0) {
tipHolder._alpha = tipHolder._alpha - Math.min(3, tipHolder._alpha / 3);
} else {
tipHolder._alpha = 0;
}
};
}
}
}
function menuFade() {
this._xscale = this._xscale - (this._xscale / 10);
this._yscale = this._xscale;
this._alpha = this._alpha - (this._alpha / 3);
if (this._alpha < 1) {
if (this._name == "endCircle1") {
_root.play();
}
this.removeMovieClip();
}
}
function removeCircles() {
i = 0;
while (i < circleArray.length) {
circleArray[i].removeMovieClip();
i++;
}
circleArray = new Array();
}
function createLevel(n) {
if (level < 5) {
frame = 1;
} else {
frame = random(7) + 1;
}
diff = random(n);
if (level < 28) {
cRadius = 50 + (2 * (level - 5));
} else {
cRadius = 50 + (4 * (level - 28));
}
i = 0;
while (i < n) {
t = _root.attachMovie("circle", "circle" + i, i + 50);
t.angle = 4.71238898038469 + (((Math.PI*2) / n) * i);
t.xpoint = xCenter + (Math.cos(t.angle) * cRadius);
t.ypoint = yCenter + (Math.sin(t.angle) * cRadius);
t._x = xCenter;
t._y = yCenter;
t.gotoAndStop(frame);
if (i == diff) {
t.diff.gotoAndStop(iconOrder[level - 1]);
t.icon._alpha = 0;
t.diff = true;
} else {
t.icon.gotoAndStop(iconOrder[level - 1]);
t.diff._alpha = 0;
t.diff = false;
}
circleArray.push(t);
t.hovered = false;
t.colorTimer = 0;
t.onEnterFrame = circleMove;
i++;
}
}
function circleMove() {
if (!paus) {
if (this.diff && (this.correct._currentframe == 1)) {
timer--;
time = Math.max(0, Math.ceil(timer / 40));
}
if (level >= 15) {
this.colorTimer = this.colorTimer + (0.5 + ((level - 15) / 20));
if (this.colorTimer > 40) {
this.gotoAndStop((this._currentframe * (this._currentframe < 7)) + 1);
this.colorTimer = 0;
}
}
if (this._name == ("circle" + (circleArray.length - 1))) {
if ((Math.sqrt(Math.pow(this._x - this.xpoint, 2) + Math.pow(this._y - this.ypoint, 2)) < 0.5) && (this.wrong._currentframe == 1)) {
rotate = true;
}
}
if (((level >= 33) && (rotate == true)) && (this.wrong._currentframe == 1)) {
this._x = xCenter + (Math.cos(this.angle) * cRadius);
this._y = yCenter + (Math.sin(this.angle) * cRadius);
this.angle = this.angle + (0.005 + ((level - 33) / 500));
this.xpoint = this._x;
this.ypoint = this._y;
} else {
this._x = this._x + ((this.xpoint - this._x) / 5);
this._y = this._y + ((this.ypoint - this._y) / 5);
}
if ((this.hitTest(_root._xmouse, _root._ymouse, true) && (this.wrong._currentframe == 1)) && ((Math.abs(this._x - this.xpoint) + Math.abs(this._y - this.ypoint)) < 1)) {
if (!this.hovered) {
hover.start();
}
this.hovered = true;
this._xscale = this._xscale + ((150 - this._xscale) / 5);
this._yscale = this._xscale;
i = 0;
while (i < circleArray.length) {
if (this.getDepth() < circleArray[i].getDepth()) {
this.swapDepths(circleArray[i]);
}
i++;
}
this.onMouseDown = function () {
if (!this.diff) {
this._xscale = (this._yscale = 110);
this.xpoint = xCenter;
this.ypoint = yCenter;
this.wrong.play();
wrong.start();
mistakes++;
} else if (this.diff) {
rotate = false;
delete this.onMouseDown;
i = 0;
while (i < circleArray.length) {
if (this != circleArray[i]) {
circleArray[i].xpoint = xCenter;
circleArray[i].ypoint = yCenter;
}
circleArray[i].wrong.gotoAndStop(11);
i++;
}
this.correct.play();
correct.start();
this.onEnterFrame = function () {
if (!paus) {
if (this.correct._currentframe < 25) {
this.correct.play();
}
this._x = this._x + ((this.xpoint - this._x) / 5);
this._y = this._y + ((this.ypoint - this._y) / 5);
this._xscale = this._xscale + ((100 - this._xscale) / 10);
this._yscale = this._xscale;
if (this.correct._currentframe == 24) {
this.xpoint = xCenter;
this.ypoint = yCenter;
gTimer = 0;
}
} else {
this.correct.stop();
}
};
}
};
} else {
this.hovered = false;
delete this.onMouseDown;
this._xscale = this._xscale + ((100 - this._xscale) / 5);
this._yscale = this._xscale;
}
}
}
function ScoreSet() {
if ((scoreText._alpha < 100) && (finalScore == 0)) {
scoreText._alpha = scoreText._alpha + 5;
timeText._alpha = timeText._alpha + 5;
} else if ((scoreText._alpha > 0) && (finalScore != 0)) {
scoreText._alpha = scoreText._alpha - 5;
timeText._alpha = timeText._alpha - 5;
nameText._alpha = nameText._alpha + 5;
nameText._x = 0;
}
if (Math.abs(realScore - score) < 15) {
score = realScore;
}
if (score < realScore) {
score = score + Math.max(13, Math.round((realScore - score) / 10));
} else if (score > realScore) {
score = score + Math.min(-13, Math.round((realScore - score) / 10));
}
}
function endItem() {
this._x = this._x + ((this.xpoint - this._x) / 5);
this._y = this._y + ((this.ypoint - this._y) / 5);
this._xscale = this._xscale + ((100 - this._xscale) / 5);
this._yscale = this._xscale;
if (this.hitTest(_root._xmouse, _root._ymouse, true) && ((Math.abs(this._x - this.xpoint) + Math.abs(this._y - this.ypoint)) < 5)) {
hover.start();
if (this.num == 0) {
menuDisplay.text = "Submit";
menuDisplay.text2 = "";
} else if (this.num == 1) {
menuDisplay.text2 = "";
menuDisplay.text = "Menu";
} else if (this.num == 2) {
menuDisplay.text2 = "Play more games at\nBigFishGames.com";
menuDisplay.text = "";
}
menuDisplay.onEnterFrame = function () {
this._xscale = this._xscale + ((100 - this._xscale) / 5);
this._yscale = this._xscale;
this._alpha = this._alpha + ((100 - this._alpha) / 20);
};
this.onMouseDown = function () {
hit.start();
this._xscale = (this._yscale = 110);
if (this.num == 0) {
if (name != "name") {
bXlnYW1lX25hbWVfdmFyaWFibGU = name;
bXlnYW1lX3Njb3JlX3ZhcmlhYmxl = realScore;
__rankz_send__("MjYwN2olZSVhJW4lcw==", "cnFjWHBnR2E=", bXlnYW1lX25hbWVfdmFyaWFibGU, bXlnYW1lX3Njb3JlX3ZhcmlhYmxl);
this.onEnterFrame = menuFade;
menuDisplay.onEnterFrame = function () {
this._xscale = this._xscale - (this._xscale / 4);
this._yscale = this._xscale;
this._alpha = this._alpha - (this._alpha / 2);
};
} else {
nameBlink.play();
}
} else if (this.num == 1) {
this.onEnterFrame = menuFade;
endCircle0.onEnterFrame = menuFade;
endCircle2.onEnterFrame = menuFade;
} else if (this.num == 2) {
getURL ("http://www.bigfishgames.com/online-games/?src=uniqueflashgame&afcode=af494c79d99d", "_blank");
}
};
this.onEnterFrame = function () {
this._xscale = this._xscale + ((150 - this._xscale) / 5);
this._yscale = this._xscale;
if (!this.hitTest(_root._xmouse, _root._ymouse, true)) {
delete this.onMouseDown;
this.onEnterFrame = endItem;
menuDisplay.onEnterFrame = function () {
this._xscale = this._xscale - (this._xscale / 4);
this._yscale = this._xscale;
this._alpha = this._alpha - (this._alpha / 2);
};
}
};
}
}
stop();
menuFlash.start();
var box = SharedObject.getLocal("Unique3");
var radius = 100;
var xCenter = (Stage.width / 2);
var yCenter = (Stage.height / 2);
menuDisplay._xscale = (menuDisplay._yscale = 0);
menuDisplay._alpha = 0;
visit._alpha = 0;
gTimer = -402;
hTimer = 200;
level = 0;
iconOrder = new Array();
circleArray = new Array();
tipHolder._alpha = 0;
rotate = false;
timeText._alpha = 0;
scoreText._alpha = 0;
mistakeText._alpha = 0;
timeBonusText._alpha = 0;
finalScoreText._alpha = 0;
nameText._alpha = 0;
nameText._x = -500;
var timeBonus = 0;
var mistakes = 0;
mistakeMinus = 0;
score = 0;
realScore = 0;
finalScore = 0;
timer = 200;
time = 0;
textAlphaPlus = 5;
name = "name";
mdown = false;
music.start(0, 9999);
musicV = 0;
MenuSet();
paus = false;
pkey = false;
pauseScreen.swapDepths(99999);
visit.onEnterFrame = function () {
if ((level > 0) && (level < 51)) {
if (this._alpha < 50) {
this._alpha = this._alpha + 4;
} else {
this._alpha = 50;
}
} else if (this._alpha > 0) {
this._alpha = this._alpha - 4;
} else {
this._alpha = 0;
}
if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
};
visit.onMouseDown = function () {
if (((level > 0) && (level < 51)) && (this.hitTest(_root._xmouse, _ymouse, true))) {
getURL ("http://www.bigfishgames.com/online-games/?src=uniqueflashgame&afcode=af494c79d99d", "_blank");
}
};
Frame 5
gotoAndStop (3);
Symbol 18 MovieClip Frame 1
function startAd(ngad_url) {
trace("opening " + ngad_url);
System.security.allowDomain("70.87.128.99");
System.security.allowInsecureDomain("70.87.128.99");
System.security.allowDomain("ads.shizmoo.com");
System.security.allowInsecureDomain("ads.shizmoo.com");
System.security.allowDomain("www.cpmstar.com");
System.security.allowInsecureDomain("www.cpmstar.com");
System.security.allowDomain("server.cpmstar.com");
System.security.allowInsecureDomain("server.cpmstar.com");
var ngads_redirect = new XML();
ngads_redirect.ignoreWhite = true;
ngads_redirect.onLoad = function (success) {
trace("[NEWGROUNDS FLASH ADS] :: You may get a 'Security Sandbox Violation' ... this is normal, do not freak out!");
if (success) {
ng_ad.loadMovie(ngads_redirect.toString(), "GET");
}
};
ngads_redirect.load(ngad_url);
}
if (NewgroundsAPI.getAdURL()) {
startAd(NewgroundsAPI.getAdURL());
}
NewgroundsAPI.onAdsApproved = function (ad_url) {
startAd(ad_url);
};
stop();
Symbol 277 MovieClip [__Packages.NewgroundsAPI] Frame 0
class NewgroundsAPI
{
static var tracker_id, host, version, debug, error_format, header_format, normal_format, link_format;
function NewgroundsAPI () {
}
static function connectMovie(id) {
if (!id) {
SendError("Missing required 'id' parameter in NewgroundsAPI.connectMovie(id:Number)");
} else if (!tracker_id) {
SendMessage("Connecting to API gateway...");
tracker_id = id;
host = _url.split("/")[2].toLowerCase();
if (host.length < 1) {
host = "localhost";
}
var _local2 = new Object();
SendEvent(MOVIE_VIEWS);
}
}
static function setMovieVersion(movie_version) {
if (!movie_version) {
SendError("Missing required 'version' in NewgroundsAPI.setMovieVersion(version:String)");
} else {
version = movie_version;
}
}
static function debugMode() {
debug = true;
}
static function addCustomEvent(stat_id, stat_name) {
if (!stat_id) {
SendError("Missing required 'id' parameter in NewgroundsAPI.AddCustomEvent(id:Number, event_name:String)");
} else if (!stat_name) {
SendError("Missing required 'event_name' parameter in NewgroundsAPI.AddCustomEvent(id:Number, event_name:String)");
} else {
custom_events[stat_name] = CUSTOM_STATS + stat_id;
SendMessage("Created custom event: " + stat_name);
}
}
static function addCustomLink(stat_id, stat_name) {
if (!stat_id) {
SendError("Missing required 'id' parameter in NewgroundsAPI.AddCustomLink(id:Number, link_name:String)");
} else if (!stat_name) {
SendError("Missing required 'link_name' parameter in NewgroundsAPI.AddCustomLink(id:Number, link_name:String)");
} else {
custom_links[stat_name] = CUSTOM_STATS + stat_id;
SendMessage((("Created custom link " + stat_id) + ": ") + stat_name);
}
}
static function loadMySite() {
SendLink(AUTHOR_SITE);
}
static function loadNewgrounds(special) {
if (special) {
var _local1 = {page:special};
}
SendLink(NEWGROUNDS, _local1);
}
static function logCustomEvent(event_name) {
if (!event_name) {
SendError("Missing required 'event_name' parameter in NewgroundsAPI.logCustomEvent(event_name:String)");
} else if (!custom_events[event_name]) {
SendError("Attempted to log undefined custom event: " + event_name);
} else {
SendEvent(custom_events[event_name]);
}
}
static function loadCustomLink(link_name) {
if (!link_name) {
SendError("Missing required 'link_name' parameter in NewgroundsAPI.loadCustomLink(link_name:String)");
} else if (!custom_links[link_name]) {
SendError("Attempted to open undefined custom link: " + link_name);
} else {
SendLink(custom_links[link_name]);
}
}
static function getAdURL() {
return(movie_options.ad_url);
}
static function getMovieURL() {
if (movie_options.movie_url) {
return(movie_options.movie_url);
}
return("Newgrounds.com");
}
static function getNewVersionURL() {
return((((((GATEWAY_URL + "?&id=") + tracker_id) + "&host=") + escape(host)) + "&stat=") + NEW_VERSION);
}
static function SendEvent(id) {
SendStat(id, false);
}
static function SendLink(id, extra) {
SendStat(id, true, extra);
}
static function ReadGatewayData(params) {
for (var _local2 in params) {
params[_local2] = unescape(params[_local2]);
movie_options[_local2] = params[_local2];
}
if (params.settings_loaded) {
SendMessage("You have successfully connected to the Newgrounds API gateway!");
SendMessage(("Movie Identified as '" + movie_options.movie_name) + "'");
if (movie_options.message) {
SendMessage(movie_options.message);
}
if (movie_options.ad_url) {
SendMessage("Your movie has been approved to run Flash Ads");
onAdsApproved(movie_options.ad_url);
}
if (movie_options.movie_version and (movie_options.movie_version.toString() != version.toString())) {
SendMessage("WARNING: The movie version configured in your API settings does not match this movie's version!");
onNewVersionAvailable(movie_options.movie_version, getMovieURL(), getNewVersionURL());
}
if (movie_options.deny_host) {
SendMessage("You have blocked 'localHost' in your API settings.");
SendMessage("If you wish to test your movie you will need to remove this block.");
onDenyHost(host, getMovieURL(), getNewVersionURL());
}
if (movie_options.request_portal_url == 1) {
var _local4 = (((GATEWAY_URL + "?&id=") + tracker_id) + "&portal_url=") + escape(_url);
var _local3 = new XML();
_local3.ignoreWhite = true;
_local3.load(_local4);
}
} else if (!movie_options.settings_loaded) {
SendError("Could not establish connection to the API gateway.");
}
}
static function SendStat(stat_id, open_in_browser, extra) {
if (!tracker_id) {
SendError("API calls cannot be made without a valid movie id.");
SendError("Did you remember to add the \"NewgroundsAPI.connectMovie()\" code?");
} else {
var _local7 = (((((GATEWAY_URL + "?&id=") + tracker_id) + "&host=") + escape(host)) + "&stat=") + stat_id;
for (var _local9 in extra) {
_local7 = _local7 + ((("&" + escape(_local9)) + "=") + escape(extra[_local9]));
}
trace(_local7);
if (debug) {
_local7 = _local7 + "&debug=1";
}
if (open_in_browser) {
getURL (_local7, "_blank");
} else {
var _local10 = new XML();
_local10.ignoreWhite = true;
_local10.onLoad = function (success) {
var _local6 = new Object();
var _local3 = 0;
while (_local3 < this.firstChild.childNodes.length) {
var _local4 = this.firstChild.childNodes[_local3];
var _local5 = _local4.nodeName;
var _local2 = _local4.attributes.value;
if (_local2 == Number(_local2)) {
_local2 = Number(_local2);
}
_local6[_local5] = _local2;
_local3++;
}
NewgroundsAPI.ReadGatewayData(_local6);
};
_local10.load(_local7);
}
}
}
static function SendError(msg) {
trace("[NEWGROUNDS API ERROR] :: " + msg);
}
static function SendMessage(msg) {
trace("[NEWGROUNDS API] :: " + msg);
}
static function InitTextFormats() {
if (!error_format) {
error_format = new TextFormat();
error_format.font = "Arial Black";
error_format.size = 48;
error_format.color = 16711680 /* 0xFF0000 */;
}
if (!header_format) {
header_format = new TextFormat();
header_format.font = "Arial Black";
header_format.size = 24;
header_format.color = 16777215 /* 0xFFFFFF */;
}
if (!normal_format) {
normal_format = new TextFormat();
normal_format.font = "Arial";
normal_format.bold = true;
normal_format.size = 12;
normal_format.color = 16777215 /* 0xFFFFFF */;
}
if (!link_format) {
link_format = new TextFormat();
link_format.color = 16776960 /* 0xFFFF00 */;
link_format.underline = true;
}
}
static function onNewVersionAvailable(version, movie_url, redirect_url) {
InitTextFormats();
var _local2 = new Object();
_local2.x = Stage.width / 2;
_local2.y = Stage.height / 2;
_root.createEmptyMovieClip("NGAPI_new_version_overlay", _root.getNextHighestDepth());
_root.NGAPI_new_version_overlay.lineStyle(1, 0, 100);
_root.NGAPI_new_version_overlay.beginFill(0, 70);
_root.NGAPI_new_version_overlay.moveTo(-10, -10);
_root.NGAPI_new_version_overlay.lineTo(-10, 1000);
_root.NGAPI_new_version_overlay.lineTo(1000, 1000);
_root.NGAPI_new_version_overlay.lineTo(1000, -10);
_root.NGAPI_new_version_overlay.lineTo(-10, -10);
_root.NGAPI_new_version_overlay.endFill();
_root.NGAPI_new_version_overlay.lineStyle(10, 0, 100);
_root.NGAPI_new_version_overlay.beginFill(51);
_root.NGAPI_new_version_overlay.moveTo(_local2.x - 240, _local2.y - 120);
_root.NGAPI_new_version_overlay.lineTo(_local2.x + 240, _local2.y - 120);
_root.NGAPI_new_version_overlay.lineTo(_local2.x + 240, _local2.y + 80);
_root.NGAPI_new_version_overlay.lineTo(_local2.x - 240, _local2.y + 80);
_root.NGAPI_new_version_overlay.lineTo(_local2.x - 240, _local2.y - 120);
_root.NGAPI_new_version_overlay.endFill();
_root.NGAPI_new_version_overlay.createEmptyMovieClip("exit", 1000);
_root.NGAPI_new_version_overlay.exit.lineStyle(2, 39423, 100);
_root.NGAPI_new_version_overlay.exit.beginFill(0, 50);
_root.NGAPI_new_version_overlay.exit.moveTo(_local2.x + 210, _local2.y - 110);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 230, _local2.y - 110);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 230, _local2.y - 90);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 210, _local2.y - 90);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 210, _local2.y - 110);
_root.NGAPI_new_version_overlay.exit.endFill();
_root.NGAPI_new_version_overlay.exit.moveTo(_local2.x + 214, _local2.y - 106);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 226, _local2.y - 94);
_root.NGAPI_new_version_overlay.exit.moveTo(_local2.x + 226, _local2.y - 106);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 214, _local2.y - 94);
_root.NGAPI_new_version_overlay.exit.onMouseUp = function () {
if (_root.NGAPI_new_version_overlay.exit.hitTest(_root._xmouse, _root._ymouse)) {
_root.NGAPI_new_version_overlay.removeMovieClip();
}
};
var _local3 = (("Version " + version) + " is now available at:") + newline;
var _local5 = _local3.length;
_local3 = _local3 + movie_url;
var _local4 = _local3.length;
_root.NGAPI_new_version_overlay.createTextField("mouseblocker", 99, -10, -10, 1000, 1000);
_root.NGAPI_new_version_overlay.createTextField("newversion", 100, _local2.x - 210, _local2.y - 90, 400, 80);
_root.NGAPI_new_version_overlay.newversion.text = "New Version Available!";
_root.NGAPI_new_version_overlay.newversion.setTextFormat(header_format);
_root.NGAPI_new_version_overlay.createTextField("message", 101, (Stage.width - 400) / 2, Stage.height / 2, 400, 40);
_root.NGAPI_new_version_overlay.message.text = _local3;
_root.NGAPI_new_version_overlay.message.multiline = true;
_root.NGAPI_new_version_overlay.message.wordWrap = true;
_root.NGAPI_new_version_overlay.message.html = true;
_root.NGAPI_new_version_overlay.message.setTextFormat(normal_format);
link_format.url = redirect_url;
_root.NGAPI_new_version_overlay.message.setTextFormat(_local5, _local4, link_format);
}
static function onDenyHost(hostname, movie_url, redirect_url) {
InitTextFormats();
_root.createEmptyMovieClip("NGAPI_deny_host_overlay", _root.getNextHighestDepth());
_root.NGAPI_deny_host_overlay.lineStyle(20, 0, 100);
_root.NGAPI_deny_host_overlay.beginFill(6684672);
_root.NGAPI_deny_host_overlay.moveTo(0, 0);
_root.NGAPI_deny_host_overlay.lineTo(Stage.width, 0);
_root.NGAPI_deny_host_overlay.lineTo(Stage.width, Stage.height);
_root.NGAPI_deny_host_overlay.lineTo(0, Stage.height);
_root.NGAPI_deny_host_overlay.lineTo(0, 0);
_root.NGAPI_deny_host_overlay.endFill();
var _local2 = ("This movie has not been approved for use on " + hostname) + ".";
_local2 = _local2 + "\r\rFor an aproved copy, please visit:\r";
var _local4 = _local2.length;
_local2 = _local2 + movie_url;
var _local3 = _local2.length;
_root.NGAPI_deny_host_overlay.createTextField("mousekill", 100, 0, 0, Stage.width, Stage.height);
_root.NGAPI_deny_host_overlay.createTextField("error", 101, (Stage.width - 400) / 2, (Stage.height / 2) - 100, 400, 200);
_root.NGAPI_deny_host_overlay.error.text = "ERROR!";
_root.NGAPI_deny_host_overlay.error.setTextFormat(error_format);
_root.NGAPI_deny_host_overlay.createTextField("message", 102, (Stage.width - 400) / 2, Stage.height / 2, 400, 200);
_root.NGAPI_deny_host_overlay.message.text = _local2;
_root.NGAPI_deny_host_overlay.message.multiline = true;
_root.NGAPI_deny_host_overlay.message.wordWrap = true;
_root.NGAPI_deny_host_overlay.message.html = true;
_root.NGAPI_deny_host_overlay.message.setTextFormat(normal_format);
link_format.url = redirect_url;
_root.NGAPI_deny_host_overlay.message.setTextFormat(_local4, _local3, link_format);
}
static function isInstalled() {
return(true);
}
static function onAdsApproved(ad_url) {
}
static var movie_options = new Object();
static var custom_events = new Object();
static var custom_links = new Object();
static var MOVIE_VIEWS = 1;
static var AUTHOR_SITE = 2;
static var NEWGROUNDS = 3;
static var NEW_VERSION = 4;
static var CUSTOM_STATS = 50;
static var GATEWAY_URL = "http://www.ngads.com/gateway.php";
}
Symbol 278 MovieClip [__Packages.ab3.rankz.Armor_Bot_30_En_AS1] Frame 0
class ab3.rankz.Armor_Bot_30_En_AS1 extends Object
{
static var _CharsReverseLookup;
var _Armor_Bot_30_En_AS1Str, _Armor_Bot_30_En_AS1Count;
function Armor_Bot_30_En_AS1 () {
super();
}
static function Encode(str) {
var _local1 = new ab3.rankz.Armor_Bot_30_En_AS1();
return(_local1.encodeArmor_Bot_30_En_AS1(str));
}
static function Decode(str) {
var _local1 = new ab3.rankz.Armor_Bot_30_En_AS1();
return(_local1.decodeArmor_Bot_30_En_AS1(str));
}
static function StringReplaceAll(source, find, replacement) {
return(source.split(find).join(replacement));
}
static function InitReverseChars() {
_CharsReverseLookup = new Array();
var _local1 = 0;
while (_local1 < _Chars.length) {
_CharsReverseLookup[_Chars[_local1]] = _local1;
_local1++;
}
return(true);
}
static function UrlDecode(str) {
str = StringReplaceAll(str, "\\", " ");
str = unescape(str);
return(str);
}
static function UrlEncode(str) {
str = escape(str);
str = StringReplaceAll(str, "\\", "%2B");
str = StringReplaceAll(str, "%20", "+");
return(str);
}
function setArmor_Bot_30_En_AS1Str(str) {
_Armor_Bot_30_En_AS1Str = str;
_Armor_Bot_30_En_AS1Count = 0;
}
function readArmor_Bot_30_En_AS1() {
if (!_Armor_Bot_30_En_AS1Str) {
return(_EndOfInput);
}
if (_Armor_Bot_30_En_AS1Count >= _Armor_Bot_30_En_AS1Str.length) {
return(_EndOfInput);
}
var _local2 = _Armor_Bot_30_En_AS1Str.charCodeAt(_Armor_Bot_30_En_AS1Count) & 255;
_Armor_Bot_30_En_AS1Count++;
return(_local2);
}
function encodeArmor_Bot_30_En_AS1(str) {
setArmor_Bot_30_En_AS1Str(str);
var _local3 = "";
var _local2 = new Array(3);
var _local5 = 0;
var _local4 = false;
while ((!_local4) && (((_local2[0] = readArmor_Bot_30_En_AS1())) != _EndOfInput)) {
_local2[1] = readArmor_Bot_30_En_AS1();
_local2[2] = readArmor_Bot_30_En_AS1();
_local3 = _local3 + _Chars[_local2[0] >> 2];
if (_local2[1] != _EndOfInput) {
_local3 = _local3 + _Chars[((_local2[0] << 4) & 48) | (_local2[1] >> 4)];
if (_local2[2] != _EndOfInput) {
_local3 = _local3 + _Chars[((_local2[1] << 2) & 60) | (_local2[2] >> 6)];
_local3 = _local3 + _Chars[_local2[2] & 63];
} else {
_local3 = _local3 + _Chars[(_local2[1] << 2) & 60];
_local3 = _local3 + "=";
_local4 = true;
}
} else {
_local3 = _local3 + _Chars[(_local2[0] << 4) & 48];
_local3 = _local3 + "=";
_local3 = _local3 + "=";
_local4 = true;
}
_local5 = _local5 + 4;
if (_local5 >= 76) {
_local3 = _local3 + newline;
_local5 = 0;
}
}
return(_local3);
}
function readReverseArmor_Bot_30_En_AS1() {
if (!_Armor_Bot_30_En_AS1Str) {
return(_EndOfInput);
}
while (true) {
if (_Armor_Bot_30_En_AS1Count >= _Armor_Bot_30_En_AS1Str.length) {
return(_EndOfInput);
}
var _local2 = _Armor_Bot_30_En_AS1Str.charAt(_Armor_Bot_30_En_AS1Count);
_Armor_Bot_30_En_AS1Count++;
if (_CharsReverseLookup[_local2]) {
return(_CharsReverseLookup[_local2]);
}
if (_local2 == "A") {
return(0);
}
}
}
function ntos(n) {
var _local1 = n.toString(16);
if (_local1.length == 1) {
_local1 = "0" + _local1;
}
_local1 = "%" + _local1;
return(unescape(_local1));
}
function decodeArmor_Bot_30_En_AS1(str) {
setArmor_Bot_30_En_AS1Str(str);
var _local3 = "";
var _local2 = new Array(4);
var _local4 = false;
while (((!_local4) && (((_local2[0] = readReverseArmor_Bot_30_En_AS1())) != _EndOfInput)) && (((_local2[1] = readReverseArmor_Bot_30_En_AS1())) != _EndOfInput)) {
_local2[2] = readReverseArmor_Bot_30_En_AS1();
_local2[3] = readReverseArmor_Bot_30_En_AS1();
_local3 = _local3 + ntos(((_local2[0] << 2) & 255) | (_local2[1] >> 4));
if (_local2[2] != _EndOfInput) {
_local3 = _local3 + ntos(((_local2[1] << 4) & 255) | (_local2[2] >> 2));
if (_local2[3] != _EndOfInput) {
_local3 = _local3 + ntos(((_local2[2] << 6) & 255) | _local2[3]);
} else {
_local4 = true;
}
} else {
_local4 = true;
}
}
return(_local3);
}
function toHex(n) {
var _local4 = "";
var _local3 = true;
var _local1 = 32;
while (_local1 > 0) {
_local1 = _local1 - 4;
var _local2 = (n >> _local1) & 15;
if ((!_local3) || (_local2 != 0)) {
_local3 = false;
_local4 = _local4 + _Digits[_local2];
}
}
return(((_local4 == "") ? "0" : (_local4)));
}
function pad(str, len, pad) {
var _local2 = str;
var _local1 = str.length;
while (_local1 < len) {
_local2 = pad + _local2;
_local1++;
}
return(_local2);
}
function encodeHex(str) {
var _local4 = "";
var _local2 = 0;
while (_local2 < str.length) {
_local4 = _local4 + pad(toHex(str.charCodeAt(_local2) & 255), 2, "0");
_local2++;
}
return(_local4);
}
function decodeHex(str) {
var _local5 = "";
var _local3 = "";
var _local2 = 0;
while (_local2 < str.length) {
_local3 = _local3 + str.charAt(_local2);
if (_local3.length == 2) {
_local5 = _local5 + ntos(parseInt("0x" + _local3));
_local3 = "";
}
_local2++;
}
return(_local5);
}
static var _EndOfInput = -1;
static var _Chars = new Array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "+", "/");
static var _CharsReverseLookupInited = InitReverseChars();
static var _Digits = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f");
}
Symbol 189 MovieClip Frame 1
stop();
Symbol 189 MovieClip Frame 11
stop();
Symbol 193 MovieClip Frame 1
stop();
Symbol 193 MovieClip Frame 25
stop();
Symbol 194 MovieClip Frame 1
stop();
Symbol 244 MovieClip Frame 1
Stage.showMenu = false;
hit_mc.onPress = function () {
getURL ("http://www.bigfishgames.com/online-games/?afcode=af494c79d99d&src=uniqueflashgame", _blank);
};
Symbol 244 MovieClip Frame 102
stop();
_root.gotoAndStop(3);
Symbol 268 MovieClip Frame 1
stop();
Symbol 272 MovieClip Frame 1
stop();
Symbol 276 MovieClip Frame 1
stop();