Frame 1
_global.mcClickId = 423;
kv_v = {c:320, a:0, da:["distralytics.com", "distralytics.co.uk"]};
kv_v.i = 0;
while (kv_v.i < kv_v.da.length) {
System.security.allowDomain(kv_v.da[kv_v.i], (kv_v.c + ".c.") + kv_v.da[kv_v.i], "*." + kv_v.da[kv_v.i]);
kv_v.i++;
}
kv_v.lc = function () {
var _local1 = ((("http://" + kv_v.c) + ".c.") + kv_v.da[kv_v.a % kv_v.da.length]) + kv_v.lurl;
System.security.allowDomain(_local1);
kv_v.l_mcl.loadClip(_local1, kv_v.t_mc);
};
kv_v.d = (_root.ori_dom ? (_root.ori_dom) : (((_root._url.split("/")[0].indexOf("http") == -1) ? "Local" : (_root._url.split("/")[2].split("?")[0]))));
kv_v.fpv = getVersion().split(" ")[1].split(",")[0];
kv_v.lurl = "/control/tracking/tracker.swf?r=" + Math.floor(Math.random() * 10000);
kv_v.t_mc = createEmptyMovieClip("kv_tracker", -16734);
kv_v.l_mcl = new MovieClipLoader();
kv_v.mcl_l = {onLoadError:function () {
kv_v.a++;
kv_v.lc();
}, onLoadStart:function (m) {
System.security.allowDomain(m._url);
}};
kv_v.l_mcl.addListener(kv_v.mcl_l);
kv_v.lc();
_global.masterDomain = "swarm.killerviral.com";
_global.assetsURL = "http://swarm.killerviral.com/tinymania/ninjaBalance/";
_global.isMaster = _root._url.indexOf(_global.masterDomain) >= 0;
_global.domain = ((_root._url.split("/")[0].indexOf("http") == -1) ? "Local" : (_root._url.split("/")[2].split("?")[0]));
_global.playerVersion = Number(getVersion().substr(getVersion().indexOf(" ") + 1).split(",")[0]);
_global.movieVersion = (_root.getSWFVersion ? (_root.getSWFVersion()) : 8);
_global.ori_dom = (_root.ori_dom ? (_root.ori_dom) : (domain));
System.security.allowDomain(_global.masterDomain);
var game_version = 3;
if (!testMode) {
stop();
if (playerVersion < 8) {
trace("player version too old - load error swf");
loadMovie (_global.assetsURL + "error.swf", _root);
} else if (isMaster) {
trace("is master - skip version checking");
play();
} else {
trace("check version...");
var vc_lv = new LoadVars();
vc_lv.onLoad = function (success) {
clearInterval(tOIntId);
delete tOIntId;
if (success) {
if (Number(vc_lv.v) > game_version) {
trace("version checking succeeded - not the latest version");
loadMovie ((_global.assetsURL + "game.swf?ori_dom=") + ori_dom, _root);
} else {
trace("version checking succeeded - latest version");
play();
}
} else {
trace("version checking failed");
play();
}
delete vc_lv;
};
tOIntId = setInterval(timeout, 2000);
vc_lv.load(_global.assetsURL + "v.php");
}
}
Frame 3
stop();
Instance of Symbol 34 MovieClip in Frame 3
onClipEvent (enterFrame) {
if (Key.isDown(13)) {
_parent.gotoAndStop("playGame");
}
}
Frame 4
stop();
Frame 5
gotoAndStop ("start");
Symbol 17 MovieClip Frame 100
gotoAndPlay (1);
Instance of Symbol 10 MovieClip in Symbol 18 MovieClip Frame 1
onClipEvent (load) {
this._visible = 0;
}
Symbol 18 MovieClip Frame 10
function onEnterFrame() {
var _local2 = _root.getBytesLoaded() / _root.getBytesTotal();
if (getTimer() >= (startTime + 100)) {
animDone = true;
}
if ((Math.ceil(bar._width) >= width) && (animDone)) {
trace("loaded!");
stopSparks = true;
delete onEnterFrame;
gotoAndPlay ("out");
} else {
setProgress(_local2);
}
}
function fadeOut() {
setProgress(progress);
this._alpha = this._alpha - 5;
if (this._alpha <= -50) {
this._visible = false;
_parent.play();
}
}
function makeSpark() {
}
function sparkControl() {
if (!stopSparks) {
this._y = this._y + this.grav;
this._x = this._x + this.wind;
this.grav = this.grav * gravity;
this._alpha = this._alpha - this.grav;
this._rotation = this._rotation + this.spin;
if (this._alpha <= 0) {
this.removeMovieClip();
}
} else {
this.removeMovieClip();
}
}
function setProgress(p) {
bar._width = ((bar._width * 2) + (p * width)) / 3;
if (progress != 1) {
makeSpark();
}
}
width = 200;
i = 0;
gravity = 1.3;
animDone = true;
startTime = getTimer();
if (this._name == "loader_mc") {
myName = _global.language.loadingAssets;
} else {
myName = _global.language.initLevel;
}
setProgress(0);
Symbol 18 MovieClip Frame 22
stop();
Symbol 18 MovieClip Frame 28
_parent.play();
Symbol 30 Button
on (release) {
getURL ("http://www.tinymania.com", "_blank");
_root.kvClick(_global.mcClickId);
}
Symbol 42 MovieClip Frame 1
if (!master) {
_global.soundBodge = this;
master = {};
_global.sndman = new SoundManager(_root.createEmptyMovieClip("snd_mc", _root.getNextHighestDepth()));
_global.master = master;
yesSound = _global.sndman.newSound("yesSound");
yes1Sound = _global.sndman.newSound("yes1Sound");
yes2Sound = _global.sndman.newSound("yes2Sound");
yes3Sound = _global.sndman.newSound("yes3Sound");
noSound = _global.sndman.newSound("noSound");
timeupSound = _global.sndman.newSound("timeupSound");
clickSound = _global.sndman.newSound("clickSound");
lostSound = _global.sndman.newSound("lostSound");
wonSound = _global.sndman.newSound("wonSound");
master.playSound = function (s) {
trace((("playing " + s) + "Sound ") + this[s + "Sound"]);
_global.sndman.playAndRemove(s + "Sound");
};
}
stop();
Symbol 46 Button
on (release) {
getURL ("http://www.tinymania.com", "_blank");
_root.kvClick(_global.mcClickId);
}
Symbol 64 MovieClip Frame 9
gotoAndPlay (1);
Symbol 67 MovieClip Frame 1
stop();
Symbol 67 MovieClip Frame 15
stop();
Symbol 68 MovieClip Frame 1
function endGame(m) {
if (!endGameOnce) {
endGameOnce = true;
if (!m) {
m = "gameover";
master.playSound("lost");
} else {
master.playSound("won");
}
clown.gameOver = true;
finalScore = Math.floor((clown.frameCount / clown.timeTotal) * 100);
trace(finalScore + "%");
_parent.endGameBlackOut(finalScore, m);
}
}
if (!playOnce) {
playOnce = true;
_global.gameWorld = this;
}
Instance of Symbol 65 MovieClip "clown" in Symbol 68 MovieClip Frame 1
onClipEvent (load) {
function timeInit() {
frameCount = 0;
timeTotal = 30;
timeTotal = timeTotal * 25;
}
function timeControl() {
if (!gameOver) {
frameCount++;
timeLeft = (timeTotal - frameCount) / 25;
if (timeLeft < 0) {
trace("TIME UP!");
gameWorld.endGame("youwin");
} else {
displayTime = timeLeft;
}
}
}
function playDeathAnim() {
if (!playOnce) {
deathDampMod = 0.1;
if (_rotation > 0) {
gameWorld.deathAnimRight.gotoAndPlay("fall");
} else {
gameWorld.deathAnimLeft.gotoAndPlay("fall");
}
_visible = false;
playOnce = true;
gameWorld.endGame();
}
}
cRun = 0;
acc = 1.2;
bAngle = 0;
gMod = 0.05;
ramp = 1;
rampMod = 1.0005;
f = 0.9;
rotMod = 20;
rotModTgt = 30;
b = _parent.ball;
pBR = b._rotation;
cr = _parent.crowd;
crOX = _parent.crowd._x;
r = _parent.ring;
rOX = _parent.ring._x;
deathDamp = 1;
deathDampMod = 1;
timeInit();
}
onClipEvent (enterFrame) {
timeControl();
ramp = ramp * rampMod;
bAngle = bAngle + (0.05 * ramp);
if (bAngle > (Math.PI*2)) {
bAngle = 0;
rotModTgt = (frameCount / timeTotal) * 150;
}
deathDamp = deathDamp * deathDampMod;
rotMod = rotMod + (((rotModTgt * deathDamp) - rotMod) / 20);
bRS = Math.sin(bAngle);
prevBRS = Math.abs(bRS);
bRot = bRS * rotMod;
b._rotation = bRot;
if (Key.isDown(37)) {
cRun = cRun + acc;
}
if (Key.isDown(39)) {
cRun = cRun - acc;
} else {
cRun = cRun * f;
}
if (cRun > 0) {
this._xscale = 100;
} else {
this._xscale = -100;
}
bMove = _parent.ball._rotation - pBR;
simGrav = this._rotation * gMod;
this._rotation = this._rotation + ((bMove - cRun) + simGrav);
pBR = b._rotation;
cr._x = crOX - (bRot * 0.05);
r._x = rOX - (bRot * 0.125);
if (Math.abs(_rotation) >= 80) {
playDeathAnim();
}
}
Symbol 74 Button
on (release) {
getURL ("http://www.tinymania.com/", "_blank");
_root.kvClick(_global.mcClickId);
}
Symbol 78 MovieClip Frame 1
stop();
Symbol 78 MovieClip Frame 8
stop();
Symbol 85 Button
on (release) {
play();
}
Symbol 86 Button
on (release) {
getURL ("http://www.tinymania.com/", "_blank");
_root.kvClick(_global.mcClickId);
}
Symbol 88 Button
on (release) {
getURL ("http://www.tinymania.com", "_blank");
_root.kvClick(420);
}
Symbol 89 MovieClip Frame 1
function endGameBlackOut(s, m) {
scorePercentage = s;
if (!playOnce) {
playOnce = true;
playWhat = "start";
if (m) {
endGameMessage.gotoAndStop(m);
} else {
endGameMessage.gotoAndStop("blank");
playWhat = "skip";
}
gotoAndPlay(playWhat);
}
}
_parent.endGameBlackOut = endGameBlackOut;
stop();
Symbol 89 MovieClip Frame 15
scoreDisplay.text = ("You scored " + _parent.game.finalScore) + "%!";
scoreDisplayShadow.text = scoreDisplay.text;
stop();
Symbol 89 MovieClip Frame 25
master.endGame(scorePercentage);
_parent.gotoAndStop("reset");
stop();