Frame 1
_global.masterurl = "http://vaioware.sitedone.com";
_global.assetsurl = "http://swarm.killerviral.com/vaioware";
_global.dev = false;
function timeout() {
if (!lv_lv.loaded) {
vc_lv.onLoad = null;
delete vc_lv;
trace("loadvars cancelled");
play();
}
clearInterval(tOIntId);
delete tOIntId;
}
stop();
System.security.allowDomain(_global.assetsurl, _global.masterurl);
var my_cm = new ContextMenu();
my_cm.hideBuiltInItems();
this.menu = my_cm;
var isMaster = (_root._url.indexOf(_global.assetsurl) >= 0);
var domain = ((_root._url.split("/")[0].indexOf("http") == -1) ? "Local" : (_root._url.split("/")[2].split("?")[0]));
var playerVersion = Number(getVersion().substr(getVersion().indexOf(" ") + 1).split(",")[0]);
var movieVersion = (_root.getSWFVersion ? (_root.getSWFVersion()) : 6);
var ori_dom = (_root.ori_dom ? (_root.ori_dom) : (domain));
var game_version = 1;
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.masterurl + "/vars/v.php");
}
Frame 2
tabIndex = 1;
stop();
loading_text_mc.stop();
preloader.onEnterFrame = function () {
var _local3 = _root.getBytesLoaded() / _root.getBytesTotal();
if (_local3 == 1) {
play();
} else {
preloader.onProgress(_root.getBytesLoaded(), _root.getBytesTotal());
this._parent.loading_text_mc.gotoAndStop(Math.ceil(_local3 * this._parent.loading_text_mc._totalframes));
}
};
Frame 3
function over() {
_root.pointer_mc.gotoAndStop("over");
}
function out() {
_root.pointer_mc.gotoAndStop("out");
}
Mouse.hide();
Mouse.addListener(pointer_mc);
pointer_mc.onMouseUp = function () {
this.pointer_mc.gotoAndStop("out");
};
pointer_mc.onMouseMove = function () {
this._x = _xmouse;
this._y = _ymouse;
Mouse.hide();
updateAfterEvent();
};
bg.onRollOver = out;
bg.onRollOut = over;
stop();
Frame 4
_global.lang = {eng:{}};
lang.eng.conn_err = "Unable to connect to server - retrying: ";
lang.eng.conn_fail = "Unable to connect to server - max. retries";
lang.eng.load_err = "Unable to connect to server - retrying:";
lang.eng.load_failed = "Unable to connect to server - max. retries";
lang.eng.memberNotFound = "Member not found";
function updatePentagon(mc) {
if (mc) {
var _local2 = mc;
} else {
gui_mc.pentagon.gotoAndPlay("anim");
var _local2 = gui_mc.pentagon.mc;
}
var _local5 = _local2.outline;
var _local1 = {white:0, green:0, black:0, pink:0};
best = 0;
var _local6 = 0;
while (_local6 < games.length) {
_local1[games[_local6].colour] = ((_local1[games[_local6].colour] > games[_local6].bestScore) ? (_local1[games[_local6].colour]) : (games[_local6].bestScore));
best = ((best > games[_local6].bestScore) ? (best) : (games[_local6].bestScore));
_local6++;
}
var _local4 = 0;
for (_local6 in _local1) {
_local4 = ((_local1[_local6] == 0) ? 50 : (_local1[_local6]));
best = ((best > _local4) ? (best) : (_local4));
}
best = best / 100;
_local2.center.clear();
_local2.center.beginFill(16711680, 100);
_local5.clear();
_local5.lineStyle(0, 16777215);
var _local3 = (((_local1.white > 0) ? (_local1.white) : 50) / 100) / best;
_local2.center.moveTo(_local2.center.white._x * _local3, _local2.center.white._y * _local3);
_local5.moveTo(_local2.center.white._x * _local3, _local2.center.white._y * _local3);
for (_local6 in _local1) {
_local3 = (((_local1[_local6] > 0) ? (_local1[_local6]) : 50) / 100) / best;
_local2.center.lineTo(_local2.center[_local6]._x * _local3, _local2.center[_local6]._y * _local3);
_local5.lineTo(_local2.center[_local6]._x * _local3, _local2.center[_local6]._y * _local3);
}
_local3 = (((_local1.white > 0) ? (_local1.white) : 50) / 100) / best;
_local2.center.lineTo(_local2.center.white._x * _local3, _local2.center.white._y * _local3);
_local5.lineTo(_local2.center.white._x * _local3, _local2.center.white._y * _local3);
_local2.center.endFill();
}
function beginGame() {
gui_mc.loader._visible = false;
gamesPlayed++;
game._x = 0;
game._y = 0;
trace("starting variant: " + games[gameNumber]);
yesSnd = Rand.value("yes1", "yes2", "yes3");
game.startGame(games[gameNumber].variant);
playSound("music", 9999999);
}
function endGame(score) {
if (isNaN(score)) {
score = 1;
}
score = Math.round(((score > 100) ? 100 : (((score < 1) ? 1 : (score)))));
scores_lv.score = Math.round(score);
scores_lv.sid = _global.sid;
scores_lv.mid = _global.mid;
games[gameNumber].score(score);
updatePentagon();
scores_lv.gid = games[gameNumber].gid;
isScoresLoaded = false;
tries = 0;
scores_lv.sendAndLoad(_global.masterurl + "/vars/submitscore.php", scores_lv, "POST");
load_mcl.unloadClip(game);
if ((++gameNumber) == games.length) {
gameNumber = 0;
}
game = loading;
if (loaded == true) {
loading = loadGame((gameNumber + 1) % games.length);
}
scoreFrame = "star" + Math.ceil(score / 20);
gui_mc.screenGui_mc.gotoAndStop("gameEnd");
gui_mc.screenGui_mc.stars_mc.gotoAndStop(scoreFrame);
gui_mc.screenGui_mc.finalScore_s_txt.text = (gui_mc.screenGui_mc.finalScore_txt.text = ("+" + score) + "%");
}
function sendSelection(choice, variant) {
fs_lv.gid = games[gameNumber].gid;
fs_lv.choice = choice;
fs_lv.variant = variant;
tries = 0;
fs_lv.sendAndLoad(_global.masterurl + "/vars/freespirit.php", fs_lv, "POST");
}
scores_lv = new LoadVars();
fs_lv = new LoadVars();
scores_lv.sid = _global.sid;
scores_lv.onLoad = function (success) {
if (success) {
if (tries > 0) {
gui_mc.error_mc.gotoAndPlay("close");
}
isScoresLoaded = true;
gui_mc.score_mc.score = Math.round(this.osumlive);
gui_mc.live_pct = Math.round((this.osumlive / this.obest) * 100);
gui_mc.ever_pct = this.oever;
keepAlive();
} else {
isScoresLoaded = true;
}
};
fs_lv.onLoad = function (success) {
if (success) {
if (tries > 0) {
gui_mc.error_mc.gotoAndPlay("close");
}
if (this.result != "none") {
var _local5 = this.result.split(",");
var _local6 = [];
var _local4;
var _local3 = 0;
while (_local3 < _local5.length) {
_local4 = _local5[_local3].split(":");
_local6[_local4[0]] = _local4[1];
_local3++;
}
game.returnedScores = _local6;
} else {
game.returnedScores = "none";
}
} else {
if (tries == 0) {
}
if ((tries++) < 3) {
fs_lv.sendAndLoad(_global.masterurl + "/vars/freespirit.php", fs_lv, "POST");
} else {
game.returnedScores = "none";
}
}
};
function startGames() {
ghost_played = false;
gamesPlayed = 0;
game = (loading = loadGame(0));
}
function loadGame(gameNumber) {
trace("loading: " + gameNumber);
gui_mc.loader._visible = false;
var _local2 = game_cont.createEmptyMovieClip("game" + gameNumber, gameNumber);
_local2._x = 0;
_local2._y = 320;
load_tries = 0;
loadingNum = gameNumber;
load_mcl.loadClip(((_global.assetsurl + "/games/") + games[gameNumber].path) + (_global.dev ? ("?r=" + Math.random()) : ""), _local2);
loaded = false;
return(_local2);
}
function saveMember(mid, username) {
_global.mid = mid;
_global.save_so.data.mid = mid;
_global.save_so.data.username = username;
_global.save_so.flush();
_root.gui_mc.scoreBox.pn.text = username;
}
function countdown() {
gui_mc.loader._visible = false;
if ((((gamesPlayed % 10) == 0) && (gamesPlayed != 0)) && (!nextLevel)) {
nextLevel = true;
gui_mc.screenGui_mc.stars_mc.mc.gotoAndStop(1);
gui_mc.screenGui_mc.eol_mc.gotoAndPlay("in");
gui_mc.pentagon2_mc.gotoAndPlay("anim");
var _local3 = {bestScore:-1};
var _local2 = 0;
while (_local2 < games.length) {
if (games[_local2].bestScore > _local3.bestScore) {
_local3 = games[_local2];
}
_local2++;
}
gui_mc.screenGui_mc.eol_mc.laptop_mc.gotoAndStop(_local3.colour);
} else {
nextLevel = false;
if (!ghost_played) {
gui_mc.ghost_mc.play();
ghost_played = true;
}
gui_mc.screenGui_mc.gotoAndStop("gameStart");
gui_mc.bg.play();
if (games[gameNumber].initAnim) {
_root.gui_mc.screenGui_mc[games[gameNumber].initAnim].gotoAndPlay("play");
}
}
}
function playSound(snd, loops) {
loops = (isNaN(loops) ? 0 : (loops));
if (((snd == "won") || (snd == "lost")) || (snd == "timeup")) {
music_snd.remove();
}
if (snd == "yes") {
_global.sndMan.playAndRemove(yesSnd, 0, loops);
} else if (snd == "signUp") {
music_snd = _global.sndMan.playAndRemove("startMusic", 9999999, loops);
music_snd.setVolume(40);
} else if ((snd == "music") || (snd == "startMusic")) {
music_snd = _global.sndMan.playAndRemove(snd, 0, loops);
if (snd == "music") {
music_snd.setVolume(40);
musicFader.f = 0;
}
} else {
_global.sndMan.playAndRemove(snd, 0, loops);
}
}
function fader() {
var _local3 = _root.music_snd.getVolume();
var _local4 = _local3 + this.f;
if (_local4 < 0) {
_local4 = 0;
}
music_snd.setVolume(_local4);
if (this.f < 0) {
if (_local3 <= this.volTarget) {
this.f = 0;
} else if (_local3 <= 0) {
_root.music_snd.remove();
}
} else if (_local3 >= this.volTarget) {
this.f = 0;
} else if (_local3 >= 100) {
this.f = 0;
}
}
function fadeMusic(f, volTarget) {
if (!f) {
f = -1;
}
if (!volTarget) {
volTarget = 0;
}
if (!musicFader) {
mc = createEmptyMovieClip("musicFader", this.getNextHighestDepth());
mc.onEnterFrame = fader;
} else {
mc = musicFader;
}
mc.f = f;
mc.volTarget = volTarget;
}
function onLoadInit(loadedGame) {
loaded = true;
if (load_tries > 0) {
gui_mc.error_mc.gotoAndPlay("close");
}
if (loadedGame == game) {
countdown();
loading = loadGame(gameNumber + 1);
}
}
function onLoadProgress(t, bytesLoaded, bytesTotal) {
if (t == game) {
gui_mc.loader.onProgress(bytesLoaded, bytesTotal);
}
}
function onLoadError() {
if (load_tries == 0) {
gui_mc.error_mc.gotoAndPlay("open");
} else if ((load_tries++) < 3) {
gui_mc.error_mc.mc.error_txt.text = _global.lang.eng.load_err + load_tries;
load_mcl.loadClip(((_global.assetsurl + "/games/") + games[loadingNum].path) + (_global.dev ? ("?r=" + Math.random()) : ""), loading);
} else {
gui_mc.error_mc.mc.error_txt.text = _global.lang.eng.load_fail;
}
}
function isGameLoaded(g) {
var _local1 = load_mcl.getProgress(g);
if (_local1.bytesLoaded == _local1.bytesTotal) {
return(true);
}
return(false);
}
function continueLoop(targ, curLoop, targLoop, keepLooping, isScores, isLoaded) {
if ((((curLoop >= targLoop) && (!keepLooping)) && (isScores)) && (isLoaded)) {
countdown();
return(undefined);
}
if (((curLoop >= targLoop) && (!keepLooping)) && (isScores)) {
gui_mc.loader._visible = true;
} else {
gui_mc.loader._visible = false;
}
targ.gotoAndPlay("loop");
}
function restart() {
_root.gotoAndStop("start");
}
function each(obj) {
var _local2 = "";
for (var _local3 in obj) {
_local2 = _local2 + (((_local3 + ": ") + obj[_local3]) + ",\n");
}
return(_local2);
}
var load_mcl = new MovieClipLoader();
load_mcl.addListener(this);
var loading;
var game;
var gameNumber = 0;
_global.t = function () {
trace(arguments);
};
function startGame(username) {
if (_global.mid) {
send_lv.mid = _global.mid;
} else {
send_lv.username = username;
_global.save_so.data.anon_username = username;
_global.save_so.flush();
}
gui_mc.scoreBox.pn.text = (_global.username = username);
tries = 0;
send_lv.sendAndLoad(_global.masterurl + "/vars/start.php", sess_lv, "POST");
}
function loginAndStartGame(email) {
send_lv.email = email;
send_lv.sendAndLoad(_global.masterurl + "/vars/start.php", sess_lv, "POST");
}
function keepAlive() {
send_lv.sendAndLoad(_global.masterurl + "/vars/keepalive.php", arguments.callee.ka_lv, "POST");
}
function onKeepAlive(success) {
if (success) {
var _local6 = 4;
var _local3 = gui_mc.scoreBox;
var _local9 = Number(this.position);
var _local8 = this.livebest;
if (this.above != "none") {
var _local7 = this.above.split(",");
_local7.reverse();
} else {
var _local7 = [];
}
var _local5;
if ((_local6 - _local7.length) != 0) {
var _local4 = 0;
while (_local4 < (_local6 - _local7.length)) {
_local3[("a" + (_local4 + 1)) + "s"].text = "";
_local3[("a" + (_local4 + 1)) + "n"].text = "";
_local3[("a" + (_local4 + 1)) + "p"].text = "";
_local4++;
}
} else {
var _local4 = 0;
}
var _local2 = 0;
while (_local2 < _local7.length) {
_local5 = _local7[_local2].split(":");
_local3[("a" + ((_local2 + _local4) + 1)) + "s"].text = _local9 - (_local6 - (_local2 + _local4));
_local3[("a" + ((_local2 + _local4) + 1)) + "n"].text = _local5[0];
_local3[("a" + ((_local2 + _local4) + 1)) + "p"].text = Math.round((_local5[1] / _local8) * 100);
_local2++;
}
_local3.ps.text = _local9;
_local3.pp.text = Math.round((this.score / _local8) * 100);
if (this.below != "none") {
var _local10 = this.below.split(",");
} else {
var _local10 = [];
}
_local2 = 0;
while (_local2 < _local10.length) {
_local5 = _local10[_local2].split(":");
_local3[("b" + (_local2 + 1)) + "s"].text = (_local9 + _local2) + 1;
_local3[("b" + (_local2 + 1)) + "n"].text = _local5[0];
_local3[("b" + (_local2 + 1)) + "p"].text = Math.round((_local5[1] / _local8) * 100);
_local2++;
}
var _local4 = _local2;
while (_local4 < _local6) {
_local3[("b" + (_local2 + 1)) + "s"].text = "";
_local3[("b" + (_local2 + 1)) + "n"].text = "";
_local3[("b" + (_local2 + 1)) + "p"].text = "";
_local4++;
}
gui_mc.online = this.online;
if (this.score > 0) {
gui_mc.live_pct = Math.round((this.score / _local8) * 100);
}
}
}
function startKeepAlive() {
ka_int = setInterval(keepAlive, 15000);
keepAlive();
}
function gameList(green, pink, black, white) {
green = Rand.arrSort(green);
pink = Rand.arrSort(pink);
black = Rand.arrSort(black);
white = Rand.arrSort(white);
var _local2 = Rand.arrSort([green, pink, black, white]);
var _local5 = ((green.length + pink.length) + black.length) + white.length;
var _local1 = -1;
var _local4 = [];
var _local3 = 0;
while (_local3 < _local5) {
do {
_local1 = (_local1 + 1) % _local2.length;
} while (!_local2[_local1].length);
_local4[_local3] = new GameInfo(_local2[_local1].pop());
_local3++;
}
return(_local4);
}
function gameReady() {
startGames();
updatePentagon();
}
_global.save_so = SharedObject.getLocal("save");
_global.mid = (_global.save_so.data.mid ? (_global.save_so.data.mid) : 0);
_global.sndMan = new SoundManager(this.createEmptyMovieClip("snd_cont", this.getNExtHighestDepth()));
send_lv = new LoadVars();
sess_lv = new LoadVars();
keepAlive.ka_lv = (update_lv = new LoadVars());
var games;
sess_lv.onLoad = function (success) {
if (success) {
if (tries > 0) {
gui_mc.error_mc.gotoAndPlay("close");
}
if (this.status != "failed") {
results_lv.sid = (send_lv.sid = (_global.sid = this.sid));
if (this.mid) {
saveMember(this.mid, this.username);
}
delete send_lv.username;
games = gameList(this.green.split(","), this.pink.split(","), this.black.split(","), this.white.split(","));
t(each(games));
startKeepAlive();
gameReady();
} else {
gui_mc.screenGui_mc.start_mc.feedback_txt.text = _global.lang.eng[this.error];
gui_mc.screenGui_mc.start_mc.comm_mc.gotoAndStop("hide");
gui_mc.screenGui_mc.start_mc.start_mc.gotoAndPlay("btn");
delete this.status;
}
} else {
t("connection error");
if (tries == 0) {
gui_mc.error_mc.gotoAndPlay("open");
}
if ((tries++) < 3) {
gui_mc.error_mc.mc.error_txt.text = _global.lang.eng.conn_err + tries;
send_lv.sendAndLoad(_global.masterurl + "/vars/start.php", sess_lv, "POST");
} else {
gui_mc.error_mc.mc.error_txt.text = _global.lang.eng.conn_fail;
}
}
};
update_lv.onLoad = onKeepAlive;
vaioEvent_mc.onMouseDown = function () {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
_root.kvEvent(18, 29);
}
};
kvEvent_mc.onMouseDown = function () {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
_root.kvEvent(19, 29);
}
};
stop();
Frame 13
if (_global.mid) {
gui_mc.screenGui_mc.start_mc.gotoAndStop("returning");
gui_mc.screenGui_mc.start_mc.username_txt.text = _global.save_so.data.username;
}
gui_mc.mute_btn.onRelease = function () {
_global.sndMan.mute = !_global.sndMan.mute;
this.play();
};
stop();
Frame 26
stop();
Symbol 13 MovieClip Frame 1
function onProgress(c, t) {
bar._width = (c / t) * width;
}
width = bar._width;
Symbol 24 MovieClip Frame 1
this._visible = false;
kv_v = {c:29, td:"kempt.kvcensus.com"};
System.security.allowDomain(kv_v.td);
kv_v.c_so = SharedObject.getLocal(kv_v.c, "/");
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 = ((((((((((("http://" + kv_v.td) + "/tracker.php") + "?c=") + kv_v.c) + "&r=") + Math.floor(Math.random() * 10000000000)) + "&d=") + kv_v.d) + "&u=") + (kv_v.c_so.data.u ? "1" : "")) + "&p=") + kv_v.fpv;
kv_v.c_so.data.u = true;
kv_v.c_so.flush();
kv_v.t_mc = this.createEmptyMovieClip("kv_tracker", 0);
kv_v.l_mcl = new MovieClipLoader();
if (kv_v.l_mcl.loadClip) {
kv_v.l_mcl.loadClip(kv_v.lurl, kv_v.t_mc);
} else {
loadMovie (kv_v.lurl, kv_v.t_mc);
}
Symbol 44 MovieClip Frame 1
stop();
Symbol 50 MovieClip Frame 171
_parent.play();
Symbol 54 MovieClip Frame 1
stop();
Symbol 54 MovieClip Frame 2
stop();
Symbol 396 MovieClip [__Packages.Rand] Frame 0
class Rand
{
function Rand () {
}
static function midBias(min, max, i, p) {
min = (isNaN(min) ? 0 : (min));
max = (isNaN(max) ? 1 : (max));
i = (isNaN(i) ? 2 : (i + 1));
var _local3 = 0;
var _local1 = 0;
while (_local1 < i) {
_local3 = _local3 + ((v() * (max - min)) + min);
_local1++;
}
_local3 = _local3 / i;
if (p != undefined) {
p = 1 / Math.pow(10, p);
var _local7 = _local3 % p;
if (_local7 <= (p / 2)) {
_local3 = _local3 - _local7;
} else {
_local3 = _local3 + (p - _local7);
}
}
return(_local3);
}
static function minBias(min, max, i, p) {
min = (isNaN(min) ? 0 : (min));
max = (isNaN(max) ? 1 : (max));
i = (isNaN(i) ? 1 : (i));
var _local1 = ((1 - Math.pow(v(), 1 / (i + 1))) * (max - min)) + min;
if (p != undefined) {
p = 1 / Math.pow(10, p);
var _local3 = _local1 % p;
if (_local3 <= (p / 2)) {
_local1 = _local1 - _local3;
} else {
_local1 = _local1 + (p - _local3);
}
}
return(_local1);
}
static function maxBias(min, max, i, p) {
min = (isNaN(min) ? 0 : (min));
max = (isNaN(max) ? 1 : (max));
i = (isNaN(i) ? 1 : (i));
var _local1 = (Math.pow(v(), 1 / (i + 1)) * (max - min)) + min;
if (p != undefined) {
p = 1 / Math.pow(10, p);
var _local3 = _local1 % p;
if (_local3 <= (p / 2)) {
_local1 = _local1 - _local3;
} else {
_local1 = _local1 + (p - _local3);
}
}
return(_local1);
}
static function value() {
if (arguments.length > 0) {
var _local2 = v() * arguments.length;
_local2 = _local2 - (_local2 % 1);
return(arguments[_local2]);
}
}
static function get number() {
return(v());
}
static function random(min, max, p) {
min = (isNaN(min) ? 0 : (min));
max = (isNaN(max) ? 1 : (max));
if (!isNaN(p)) {
p = 1 / Math.pow(10, p);
max = max + p;
} else {
}
var _local3 = (v() * (max - min)) + min;
if (p) {
_local3 = _local3 - (_local3 % p);
}
return(_local3);
}
static function arrSort(arr) {
var _local1 = [].concat(arr);
var _local4;
var _local3;
var _local2 = 0;
while (_local2 < _local1.length) {
_local3 = Math.floor(v() * _local1.length);
_local4 = _local1[_local2];
_local1[_local2] = _local1[_local3];
_local1[_local3] = _local4;
_local2++;
}
return(_local1);
}
static var v = Math.random;
}
Symbol 397 MovieClip [__Packages.GameInfo] Frame 0
class GameInfo
{
var name, path, gid, colour, initAnim, variant;
function GameInfo (str) {
var _local2 = str.split(":");
name = _local2[0];
path = _local2[1];
gid = Number(_local2[2]);
colour = _local2[3];
initAnim = _local2[4];
variant = _local2[5];
}
function score(n) {
n = ((n > 100) ? 100 : (((n < 1) ? 1 : (n))));
bestScore = ((n > bestScore) ? (n) : (bestScore));
}
function toString() {
return(((((((((((("{ name: " + name) + ", colour: ") + colour) + ", path: ") + path) + ", gid: ") + gid) + ", best: ") + bestScore) + ", variant: ") + variant) + " }");
}
var bestScore = 0;
}
Symbol 398 MovieClip [__Packages.SoundManager] Frame 0
class SoundManager extends Sound
{
var sounds, mc_holder, broadcastMessage;
function SoundManager (hld_mc) {
super();
sounds = new Object();
mc_holder = (hld_mc ? (hld_mc) : _root);
AsBroadcaster.initialize(this);
}
function playAndRemove(snd_id, offset, loops) {
if (!muted) {
offset = (isNaN(offset) ? 0 : (offset));
loops = (isNaN(loops) ? 0 : (loops));
var _local2 = newSound(snd_id);
_local2.start(offset, loops);
_local2.onSoundComplete = _local2.remove;
return(_local2);
}
}
function clearAllSounds() {
for (var _local2 in sounds) {
sounds[_local2].remove();
}
}
function newSound(id) {
var _local3 = mc_holder.getNextHighestDepth();
var _local4 = mc_holder.createEmptyMovieClip("sh_mc" + _local3, _local3);
var _local2 = new Snd(_local4, this);
if (id != undefined) {
_local2.attachSound(id);
}
sounds[_local3] = _local2;
return(_local2);
}
function deleteSound(snd) {
snd.remove();
}
function setVolume(vol) {
if (muted) {
curVol = vol;
} else {
super.setVolume(vol);
}
}
function get mute() {
return(muted);
}
function set mute(b) {
muted = b;
broadcastMessage("mute", b);
//return(mute);
}
var muted = false;
var curVol = 100;
var tgtVol = 100;
}
Symbol 399 MovieClip [__Packages.Snd] Frame 0
class Snd extends Sound
{
var target, manager, setPan, stop;
function Snd (targ, sndman) {
super(targ);
target = (targ ? (targ) : _root);
manager = sndman;
manager.addListener(this);
if (manager.muted) {
curVol = getVolume();
setVolume(0);
}
}
function mute(b) {
isMuted = b;
if (b) {
curVol = getVolume();
super.setVolume(0);
} else {
super.setVolume(curVol);
}
}
function getVolume() {
if (isMuted) {
return(curVol);
}
return(super.getVolume());
}
function setVolume(n) {
if (!isMuted) {
super.setVolume(n);
}
curVol = n;
}
function positionSound(a, d, f, t) {
if (d < f) {
t = (isNaN(t) ? 100 : (((t > 100) ? 100 : (((t < 0) ? 0 : (t))))));
d = ((d < 1) ? 1 : (d));
var _local4 = 1 / ((d / f) * 100);
setVolume(Math.ceil(_local4 * t));
setPan((-Math.sin(a)) * 100);
} else {
setVolume(0);
}
}
function positionSoundLinear(a, d, f, t) {
if (d < f) {
t = (isNaN(t) ? 100 : (((t > 100) ? 100 : (((t < 0) ? 0 : (t))))));
setVolume(((f - d) / f) * t);
setPan((-Math.sin(a)) * 100);
} else {
setVolume(0);
}
}
function remove() {
manager.removeListener(this);
stop();
delete manager.sounds[target.getDepth()];
target.removeMovieClip();
}
function toString() {
return(("(target=" + target) + ")");
}
var isMuted = false;
var curVol = 100;
}
Symbol 76 MovieClip Frame 1
stop();
Symbol 76 MovieClip Frame 5
stop();
Symbol 92 Button
on (release) {
getURL ("http://kempt.kvcensus.com/redir.php?urlId=215", "_blank");
}
on (rollOver) {
_root.over();
}
on (rollOut) {
_root.out();
}
Symbol 95 Button
on (release) {
getURL ("http://kempt.kvcensus.com/redir.php?urlId=210", "_blank");
}
on (rollOver) {
_root.over();
}
on (rollOut) {
_root.out();
}
Symbol 108 Button
on (release) {
_parent.startPageDone = true;
_parent._parent.fadeMusic(-5, 40);
_parent.gotoAndPlay("close");
_global.playSound("yes");
}
on (rollOver) {
_root.over();
}
on (rollOut) {
_root.out();
}
Symbol 115 Button
on (release) {
getURL ("http://kempt.kvcensus.com/redir.php?urlId=211", "_blank");
}
on (rollOver) {
_root.over();
}
on (rollOut) {
_root.out();
}
Symbol 122 Button
on (release) {
getURL ("http://kempt.kvcensus.com/redir.php?urlId=213", "_blank");
}
on (rollOver) {
_root.over();
}
on (rollOut) {
_root.out();
}
Symbol 141 MovieClip Frame 2
Symbol 141 MovieClip Frame 3
if (!_parent.startPageDone) {
_parent._parent.playSound("colourChange");
}
Symbol 141 MovieClip Frame 64
if (!_parent.startPageDone) {
_parent._parent.playSound("colourChange");
}
Symbol 141 MovieClip Frame 126
if (!_parent.startPageDone) {
_parent._parent.playSound("colourChange");
}
Symbol 141 MovieClip Frame 189
if (!_parent.startPageDone) {
_parent._parent.playSound("colourChange");
}
Symbol 141 MovieClip Frame 251
gotoAndPlay ("green");
Symbol 142 MovieClip Frame 1
startPageDone = false;
Symbol 142 MovieClip Frame 2
_parent.playSound("startMusic", 9999999);
Instance of Symbol 141 MovieClip in Symbol 142 MovieClip Frame 152
onClipEvent (load) {
gotoAndPlay ("black");
}
Symbol 142 MovieClip Frame 159
stop();
Symbol 142 MovieClip Frame 188
_parent.gotoAndPlay("gui");
Symbol 149 MovieClip Frame 6
stop();
Symbol 155 Button
on (release) {
getURL ("http://kempt.kvcensus.com/redir.php?urlId=211", "_blank");
}
on (rollOver) {
_root.over();
}
on (rollOut) {
_root.out();
}
Symbol 168 Button
on (release) {
getURL ("http://kempt.kvcensus.com/redir.php?urlId=210", "_blank");
}
on (rollOver) {
_root.over();
}
on (rollOut) {
_root.out();
}
Symbol 169 MovieClip Frame 1
stop();
Symbol 169 MovieClip Frame 2
stop();
_root.playSound("colourChange");
Symbol 169 MovieClip Frame 7
stop();
_root.playSound("colourChange");
Symbol 169 MovieClip Frame 12
stop();
_root.playSound("colourChange");
Symbol 169 MovieClip Frame 17
stop();
_root.playSound("colourChange");
Symbol 173 MovieClip Frame 1
bg_cols.gotoAndStop(_root.games[_root.gameNumber].colour);
Symbol 173 MovieClip Frame 5
stop();
Symbol 213 MovieClip Frame 1
function onEnterFrame() {
var _local1 = getTimer();
times.push(_local1 - lastTime);
lastTime = _local1;
if (times.length > numTimes) {
times.shift();
}
if (((f++) % updateFrequency) == 0) {
var _local2 = avg(times);
output_txt.text = Math.round(1000 / _local2) + " fps";
}
}
function avg(a) {
var _local3 = 0;
var _local1 = 0;
while (_local1 < a.length) {
_local3 = _local3 + a[_local1];
_local1++;
}
return(_local3 / a.length);
}
var numTimes = 10;
var updateFrequency = 25;
var times = [];
var lastTime = getTimer();
var f = 0;
Symbol 223 MovieClip Frame 15
stop();
Symbol 223 MovieClip Frame 22
stop();
Symbol 228 Button
on (rollOver) {
_root.over();
}
on (rollOut) {
_root.out();
}
on (release) {
_root.playSound("yes1");
}
Symbol 229 Button
on (rollOver) {
_root.over();
}
on (rollOut) {
_root.out();
}
on (release) {
_root.playSound("yes1");
}
Symbol 230 Button
on (rollOver) {
_root.over();
}
on (rollOut) {
_root.out();
}
on (release) {
_root.playSound("yes1");
}
Symbol 231 MovieClip Frame 1
stop();
Symbol 231 MovieClip Frame 2
play();
Symbol 231 MovieClip Frame 5
stop();
Symbol 238 MovieClip Frame 1
stop();
Symbol 238 MovieClip Frame 2
play();
Symbol 238 MovieClip Frame 70
gotoAndPlay ("loop");
Symbol 245 Button
on (rollOver) {
_root.over();
}
on (rollOut) {
_root.out();
}
Symbol 251 Button
on (rollOver) {
_root.over();
}
on (rollOut) {
_root.out();
}
Symbol 263 Button
on (rollOver) {
_root.over();
}
on (rollOut) {
_root.out();
}
Symbol 265 MovieClip Frame 1
username_txt.restrict = " a-zA-Z0-9";
if (_global.save_so.data.anon_username) {
username_txt.text = _global.save_so.data.anon_username;
}
start_mc.start_btn.onRelease = function () {
if (username_txt.text.length > 0) {
_root.startGame(username_txt.text);
comm_mc.gotoAndPlay("play");
start_mc.gotoAndStop("gr");
}
};
alreadyAMember_btn.onRelease = function () {
gotoAndStop ("signIn");
};
stop();
Symbol 265 MovieClip Frame 10
notYou_btn.onRelease = function () {
_global.mid = 0;
gotoAndStop ("signup");
};
stop();
Symbol 265 MovieClip Frame 20
email_txt.restrict = "-_a-zA-Z0-9@.";
start_mc.start_btn.onRelease = function () {
if (email_txt.text.length > 0) {
_root.loginAndStartGame(email_txt.text);
comm_mc.gotoAndPlay();
start_mc.gotoAndStop("gr");
}
};
cancel_btn.onRelease = function () {
gotoAndStop ("signup");
};
Symbol 271 Button
on (release) {
_parent.gotoAndPlay("close");
}
on (rollOver) {
_root.over();
}
on (rollOut) {
_root.out();
}
Symbol 289 Button
on (rollOver) {
_root.over();
}
on (rollOut) {
_root.out();
}
Symbol 291 MovieClip Frame 1
challenge_lv = new LoadVars();
send_btn.onRelease = function () {
challenge_lv.yourName = yourName_txt.text;
challenge_lv.yourEmail = yourEmail_txt.text;
challenge_lv.friendsName = friendsName_txt.text;
challenge_lv.friendsEmail = friendsEmail_txt.text;
challenge_lv.sendAndLoad(_global.masterurl + "/vars/challenge.php", challenge_lv, "POST");
feedback_txt.text = "Sending challenge...";
};
challenge_lv.onLoad = function (success) {
if (success) {
if (this.status == "success") {
feedback_txt.text = "Challenge sent!";
} else {
feedback_txt.text = "Error";
}
} else {
feedback_txt.text = "Server error";
}
};
stop();
Symbol 295 Button
on (release) {
_parent.gotoAndPlay("open");
}
on (rollOver) {
_root.over();
}
on (rollOut) {
_root.out();
}
Symbol 296 MovieClip Frame 1
stop();
Symbol 296 MovieClip Frame 7
stop();
Symbol 297 MovieClip Frame 1
stop();
Symbol 297 MovieClip Frame 2
challengeMenu.gotoAndPlay("open");
Symbol 297 MovieClip Frame 10
stop();
Symbol 297 MovieClip Frame 18
challengeMenu.gotoAndPlay("close");
Symbol 300 MovieClip Frame 1
stop();
Symbol 300 MovieClip Frame 2
play();
Symbol 303 MovieClip Frame 1
stop();
Symbol 303 MovieClip Frame 2
play();
Symbol 305 MovieClip Frame 25
stop();
Symbol 306 MovieClip Frame 1
stop();
Symbol 306 MovieClip Frame 2
play();
Symbol 320 MovieClip Frame 1
_root.fadeMusic(-5);
Symbol 320 MovieClip Frame 21
_root.playSound("beep");
Symbol 320 MovieClip Frame 28
_root.playSound("beep");
Symbol 320 MovieClip Frame 35
_root.playSound("beep");
Symbol 320 MovieClip Frame 41
_root.music_snd.remove();
_root.beginGame();
stop();
Symbol 325 Button
on (rollOver) {
_root.over();
}
on (rollOut) {
_root.out();
}
Symbol 329 MovieClip Frame 8
_root.playSound("star");
Symbol 329 MovieClip Frame 12
_root.playSound("star");
Symbol 329 MovieClip Frame 17
_root.playSound("star");
Symbol 329 MovieClip Frame 22
_root.playSound("star");
Symbol 329 MovieClip Frame 27
_root.playSound("star");
_root.playSound("crowd5");
Symbol 329 MovieClip Frame 78
stop();
Symbol 330 MovieClip Frame 1
keepLooping = false;
numLoops = 0;
Symbol 330 MovieClip Frame 51
_root.continueLoop(this, numLoops++, 2, keepLooping, _root.isScoresLoaded, _root.isGameLoaded(_root.game));
Symbol 331 MovieClip Frame 1
_root.playSound("crowd4");
Symbol 331 MovieClip Frame 2
_root.playSound("star");
Symbol 331 MovieClip Frame 6
_root.playSound("star");
Symbol 331 MovieClip Frame 11
_root.playSound("star");
Symbol 331 MovieClip Frame 15
_root.playSound("star");
Symbol 331 MovieClip Frame 75
stop();
Symbol 332 MovieClip Frame 1
keepLooping = false;
numLoops = 0;
Symbol 332 MovieClip Frame 37
_root.continueLoop(this, numLoops++, 2, keepLooping, _root.isScoresLoaded, _root.isGameLoaded(_root.game));
Symbol 333 MovieClip Frame 2
_root.playSound("star");
Symbol 333 MovieClip Frame 12
_root.playSound("star");
Symbol 333 MovieClip Frame 27
_root.playSound("crowd3");
Symbol 333 MovieClip Frame 28
_root.playSound("star");
Symbol 333 MovieClip Frame 121
stop();
Symbol 334 MovieClip Frame 1
keepLooping = false;
numLoops = 0;
Symbol 334 MovieClip Frame 56
_root.continueLoop(this, numLoops++, 1, keepLooping, _root.isScoresLoaded, _root.isGameLoaded(_root.game));
Symbol 335 MovieClip Frame 1
_root.playSound("star");
Symbol 335 MovieClip Frame 31
_root.playSound("star");
Symbol 335 MovieClip Frame 49
_root.playSound("crowd2");
Symbol 335 MovieClip Frame 113
stop();
Symbol 336 MovieClip Frame 1
keepLooping = false;
numLoops = 0;
Symbol 336 MovieClip Frame 135
_root.continueLoop(this, numLoops++, 0, keepLooping, _root.isScoresLoaded, _root.isGameLoaded(_root.game));
Symbol 337 MovieClip Frame 1
_root.playSound("star");
Symbol 337 MovieClip Frame 27
_root.playSound("crowd1");
Symbol 337 MovieClip Frame 78
stop();
Symbol 338 MovieClip Frame 1
keepLooping = false;
numLoops = 0;
Symbol 338 MovieClip Frame 64
_root.continueLoop(this, numLoops++, 1, keepLooping, _root.isScoresLoaded, _root.isGameLoaded(_root.game));
Symbol 339 MovieClip Frame 1
stop();
Symbol 339 MovieClip Frame 6
stop();
Symbol 339 MovieClip Frame 11
stop();
Symbol 339 MovieClip Frame 16
stop();
Symbol 339 MovieClip Frame 21
stop();
Symbol 347 Button
on (release) {
getURL ("http://kempt.kvcensus.com/redir.php?urlId=214", "_blank");
}
Symbol 348 MovieClip Frame 1
stop();
Symbol 348 MovieClip Frame 6
stop();
Symbol 348 MovieClip Frame 11
stop();
Symbol 348 MovieClip Frame 16
stop();
Symbol 353 MovieClip Frame 1
stop();
Symbol 353 MovieClip Frame 2
play();
Symbol 353 MovieClip Frame 35
stop();
Instance of Symbol 231 MovieClip in Symbol 353 MovieClip Frame 35
on (release) {
_parent.gotoAndPlay("out");
_root.playSound("yes1");
_root.gui_mc.pentagon2_mc.gotoAndPlay("out");
}
Symbol 353 MovieClip Frame 36
play();
Symbol 353 MovieClip Frame 60
_root.countdown();
Symbol 362 Button
on (rollOver) {
_root.over();
}
on (rollOut) {
_root.out();
}
Symbol 367 MovieClip Frame 1
function onRelease() {
play();
_value = !_value;
}
stop();
Symbol 367 MovieClip Frame 2
stop();
Symbol 368 MovieClip Frame 1
save_lv = new LoadVars();
save_lv.sid = _global.sid;
username_txt.text = _global.username;
save_btn.onRelease = function () {
save_lv.username = username_txt.text;
save_lv.email = email_txt.text;
save_lv.optIn1st = Number(optIn1st_mc._value);
save_lv.optIn3rd = Number(optIn3rd_mc._value);
save_lv.sendAndLoad(_global.masterurl + "/vars/create.php", save_lv, "POST");
feedback_txt.text = "Saving game...";
};
save_lv.onLoad = function (success) {
if (success) {
if (this.status == "success") {
_root.saveMember(this.mid, this.username);
feedback_txt.text = "Game Saved!";
_parent._parent.gotoAndPlay("close");
} else {
feedback_txt.text = "Error: " + this.error;
trace(this.query);
}
} else {
feedback_txt.text = "Server error";
}
};
stop();
Symbol 370 Button
on (release) {
_parent.gotoAndPlay("open");
}
on (rollOver) {
_root.over();
}
on (rollOut) {
_root.out();
}
Symbol 371 MovieClip Frame 1
stop();
Symbol 371 MovieClip Frame 7
stop();
Symbol 372 MovieClip Frame 1
stop();
Symbol 372 MovieClip Frame 2
challengeMenu.gotoAndPlay("open");
_parent.stars_mc.mc.keepLooping = true;
Symbol 372 MovieClip Frame 5
this._parent._parent.pentagon2_mc._visible = false;
Symbol 372 MovieClip Frame 10
stop();
Symbol 372 MovieClip Frame 16
this._parent._parent.pentagon2_mc._visible = true;
Symbol 372 MovieClip Frame 18
challengeMenu.gotoAndPlay("close");
_parent.stars_mc.mc.keepLooping = false;
Symbol 373 MovieClip Frame 1
stop();
Symbol 373 MovieClip Frame 10
stop();
Symbol 373 MovieClip Frame 20
if (_global.mid) {
save_mc._visible = false;
} else {
save_mc._visible = true;
}
home_btn.onRelease = function () {
_root.music_snd.remove();
_root.restart();
};
_root.music_snd.remove();
_root.playSound("startMusic", 99999);
_root.music_snd.setVolume(1);
_root.fadeMusic(3, 40);
stop();
Symbol 373 MovieClip Frame 30
stop();
Symbol 377 MovieClip Frame 1
stop();
Symbol 377 MovieClip Frame 2
if (!_global.hasBeenMuted) {
_root.kvEvent(20, 29);
_global.hasBeenMuted = true;
}
stop();
Symbol 384 MovieClip Frame 1
stop();
Symbol 384 MovieClip Frame 2
play();
Symbol 384 MovieClip Frame 11
stop();
Symbol 384 MovieClip Frame 12
play();
Symbol 391 MovieClip Frame 1
stop();
Symbol 391 MovieClip Frame 40
stop();
Symbol 392 MovieClip Frame 1
stop();
Symbol 392 MovieClip Frame 9
_root.updatePentagon(mc);
Symbol 392 MovieClip Frame 15
stop();
Symbol 392 MovieClip Frame 43
stop();
Symbol 394 MovieClip Frame 1
loader._visible = false;
Instance of Symbol 377 MovieClip "mute_btn" in Symbol 394 MovieClip Frame 1
on (rollOver) {
_root.over();
}
on (rollOut) {
_root.out();
}