Frame 1
function makeBtns() {
trace((("~~ " + this.mcC2P) + " : ") + this._parent.mcC2P);
mcPrerollLogo = this.attachMovie("mc_preroll_logo", "mc_preroll_logo", this.getNextHighestDepth());
mcPrerollPlay = this.attachMovie("mc_preroll_play", "mc_preroll_play", this.getNextHighestDepth());
mcPrerollLogo._x = (Stage.width / 2) - (mcPrerollLogo._width / 2);
mcPrerollLogo._y = (Stage.width / 3.5) - (mcPrerollLogo._height / 2);
mcPrerollPlay._x = (Stage.width / 2) - (mcPrerollPlay._width / 2);
mcPrerollPlay._y = mcPrerollLogo._y + 50;
mcPrerollLogo.onRollOver = btnOver;
mcPrerollPlay.onRollOver = btnOver;
mcPrerollLogo.onRollOut = btnOut;
mcPrerollPlay.onRollOut = btnOut;
}
function btnOver() {
this.gotoAndStop("on");
}
function btnOut() {
this.gotoAndStop("off");
}
function playItAgainSam() {
trace((((("!@ " + netStream) + " :: ") + _bXSet) + " : ") + _bXSet);
if (_bXSet && (_bXSet)) {
netStream.pause();
}
}
function checkBytesLoaded(netStream) {
var _local4 = this.createTextField("loaded_txt", this.getNextHighestDepth(), 40, 20, 160, 22);
var _local2 = Math.round((netStream.bytesLoaded / netStream.bytesTotal) * 100);
_local4.text = ((((Math.round(netStream.bytesLoaded / 1000) + " of ") + Math.round(netStream.bytesTotal / 1000)) + " KB loaded (") + _local2) + "%)";
trace((("^^^ " + _local2) + " : ") + _local4.text);
progressBar_mc.bar_mc._xscale = _local2;
if (_local2 >= 100) {
netStream.pause(true);
clearInterval(loaded_interval);
}
}
function iGotGame() {
preloader_mc = this.attachMovie("preloader", "preloader_mc", this.getNextHighestDepth());
preloader_mc._x = 170;
preloader_mc._y = 280;
trace("bababooey!");
var _local4 = new MovieClipLoader();
var _local5 = this.createEmptyMovieClip("mcGame", this.getNextHighestDepth());
var _local2 = new Object();
_local5._lockroot = true;
_local4.addListener(_local2);
var _local8 = ("http://i.cdn.turner.com/adultswim/games2/game-files/" + gameName) + "/syndicated/";
_local4.loadClip((((("http://i.cdn.turner.com/adultswim/games2/game-files/" + gameName) + "/syndicated/game.swf?strBase=") + _local8) + "&strDomain=") + my_lc.domain(), _local5);
_local2.onLoadStart = function (target_mc) {
preloader_mc.totalWidth = preloader_mc.percentbar_mc._width;
preloader_mc.percentbar_mc._width = 0;
var _local1 = my_mcl.getProgress(target_mc);
var _local3 = Math.round(_local1.bytesTotal / 1024);
var _local4 = Math.round(_local1.bytesLoaded / 1024);
var _local2 = "0";
preloader_mc.kTotalReadout_txt.text = _local3.toString() + "k";
preloader_mc.kLoadedReadout_txt.text = _local4.toString() + "k";
preloader_mc.percentReadout_txt.text = _local2.toString() + "%";
trace(((((">> starting preload: " + preloader_mc.kTotalReadout_txt.text) + " : ") + preloader_mc.kLoadedReadout_txt.text) + " :: ") + preloader_mc.percentReadout_txt.text);
};
_local2.onLoadProgress = function (target_mc, loadedBytes, totalBytes) {
var _local6 = loadedBytes / totalBytes;
preloader_mc.percentbar_mc._width = preloader_mc.totalWidth * _local6;
var _local4 = Math.round(loadedBytes / 1024);
var _local2 = Math.round(totalBytes / 1024);
var _local1 = Math.round((loadedBytes / totalBytes) * 100);
preloader_mc.kLoadedReadout_txt.text = _local4.toString() + "k";
preloader_mc.kTotalReadout_txt.text = _local2.toString() + "k";
preloader_mc.percentReadout_txt.text = _local1.toString() + "%";
trace(((((">>> preloading: " + preloader_mc.kTotalReadout_txt.text) + " : ") + preloader_mc.kLoadedReadout_txt.text) + " :: ") + preloader_mc.percentReadout_txt.text);
};
_local2.onLoadComplete = function (target_mc) {
var _local1 = my_mcl.getProgress(target_mc);
var _local3 = Math.round(_local1.bytesLoaded / 1024);
var _local2 = Math.round(_local1.bytesTotal / 1024);
var _local5 = Math.round((_local1.bytesLoaded / _local1.bytesTotal) * 100);
preloader_mc.kLoadedReadout_txt.text = _local3 + "k";
preloader_mc.kTotalReadout_txt.text = _local2 + "k";
preloader_mc.percentReadout_txt.text = "done";
trace("finish === " + my_mcl.getProgress(target_mc).bytesTotal);
preloader_mc.unloadMovie();
};
_local2.onLoadError = function (target_mc, errorCode) {
preloader_mc.unloadMovie();
failureReport_txt.text = ("Something broke! Email this code: '" + errorCode) + "' to games@adultswim.com";
};
_local2.onLoadInit = function (thisMc) {
thisMc.strDomain = my_lc.domain();
trace((("~~~ " + thisMc.strDomain) + " : ") + my_lc.domain());
};
}
var my_lc = new LocalConnection();
var gameName = "vivacaligula";
_global._gameName = gameName;
trace("!!game " + my_lc.domain());
var preloader_mc;
mcBG._x = (mcBG._y = 0);
mcBG._width = Stage.width;
mcBG._height = Stage.height;
var mouseListener = new Object();
Mouse.addListener(mouseListener);
Mouse.show();
mouseListener.onMouseDown = function () {
switch (true) {
case mcPrerollLogo.hitTest(_root._xmouse, _root._ymouse, true) :
getURL (("http://games.adultswim.com?cid=GAME_Ext_caligula_" + my_lc.domain()) + "_preroll_end", "_blank");
break;
case mcPrerollPlay.hitTest(_root._xmouse, _root._ymouse, true) :
Mouse.removeListener(mouseListener);
removeMovieClip(mcASG);
removeMovieClip(mcPrerollLogo);
removeMovieClip(mcPrerollPlay);
iGotGame();
break;
default :
getURL (("http://games.adultswim.com?cid=GAME_Ext_caligula_" + my_lc.domain()) + "_preroll", "_blank");
}
};
var mcASG = this.createEmptyMovieClip("mc", this.getNextHighestDepth());
mcASG._x = -50;
mcASG._y = -50;
mcASG.onRollOver = function () {
trace("@@");
};
var mcPx = mcASG.attachMovie("mcPx", "mcPx", this.getNextHighestDepth());
mcPx._width = Stage.width * 1.25;
mcPx._height = Stage.height * 1.25;
System.security.allowDomain("i.adultswim.com");
System.security.allowInsecureDomain("i.adultswim.com");
System.security.allowDomain("staging3.adultswim.com");
System.security.allowInsecureDomain("staging3.adultswim.com");
System.security.allowDomain("www.adultswim.com");
System.security.allowInsecureDomain("www.adultswim.com");
System.security.allowDomain("games.adultswim.com");
System.security.allowInsecureDomain("games.adultswim.com");
System.security.allowDomain("i.cdn.turner.com");
System.security.allowInsecureDomain("i.cdn.turner.com");
stop();
var _oVid = new Object();
var _bXSet = false;
var _bYSet = false;
_oVid.x = logo_video._x;
_oVid.y = logo_video._y;
_oVid.w = logo_video._width;
_oVid.h = logo_video._height;
var loaded_interval;
var netConn = new NetConnection();
netConn.connect(null);
var netStream = new NetStream(netConn);
netStream.bytesLoaded;
logo_video.attachVideo(netStream);
netStream.setBufferTime(2);
netStream.onMetaData = function (infoObject) {
for (var _local2 in infoObject) {
trace((_local2 + " = ") + infoObject[_local2]);
}
netStream.pause();
switch (logo_video._width) {
case infoObject.width :
_bXSet = true;
break;
default :
logo_video._width = infoObject.width;
logo_video._x = (Stage.width - infoObject.width) / 2;
_bXSet = true;
}
switch (logo_video._height) {
case infoObject.height :
_bYSet = true;
break;
default :
logo_video._height = infoObject.height;
logo_video._y = (Stage.height - infoObject.height) / 2;
_bYSet = true;
}
playItAgainSam();
};
netStream.onStatus = function (infoObject) {
for (var _local2 in infoObject) {
trace((("\t" + _local2) + ":\t") + infoObject[_local2]);
}
trace("");
switch (infoObject[_local2]) {
case "NetStream.Play.Stop" :
makeBtns();
break;
default :
}
};
trace((((((logo_video._width + " : ") + _oVid.w) + " :: ") + logo_video._height) + " : ") + _oVid.h);
netStream.play("http://i.cdn.turner.com/adultswim/games/game/tools/swf/wsg-700x500.flv");
Symbol 12 MovieClip [mc_preroll_play] Frame 1
stop();
Symbol 12 MovieClip [mc_preroll_play] Frame 2
stop();
Symbol 17 MovieClip [mc_preroll_logo] Frame 1
stop();
Symbol 17 MovieClip [mc_preroll_logo] Frame 2
stop();
Symbol 30 MovieClip [mcCopyLink] Frame 1
stop();
Symbol 30 MovieClip [mcCopyLink] Frame 2
stop();