Section 1
//FarmLoader1 (com.goodgame.farm.FarmLoader1)
package com.goodgame.farm {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.system.*;
import flash.external.*;
public class FarmLoader1 extends Sprite {
private const platform:int = 0;
private const domain:String;
private const GAMEID:String = "3";
private const cdnCache:Boolean;
private const prefix:String;
private const isTestVersion:Boolean = false;
private const ordner:String;
private const versionsDate:String = "20100401";
private const datei:String;
private const FILENameFarm:String;
private const FILENameRefTrack:String;
private var loaderPHP:URLLoader;
public function FarmLoader1(){
var loaderPHP:Loader;
var loader:Loader;
var cache:*;
cdnCache = !(((isTestVersion) || ((platform == 2))));
domain = (cdnCache) ? "cdn" : "files";
ordner = ((isTestVersion) ? "loader-test/" : "loader/" + "farm/");
prefix = ((platform == 1)) ? "fb" : ((platform == 2)) ? "os" : ((platform == 3)) ? "osl003" : "";
datei = (prefix + "farmloader.swf");
FILENameFarm = (((("http://" + domain) + ".goodgamestudios.com/") + ordner) + datei);
FILENameRefTrack = (("http://files.goodgamestudios.com/" + (isTestVersion) ? "loader-test/" : "loader/") + "refcount.swf");
super();
var date:Date = new Date();
var swfUrl = "";
Security.allowDomain("*");
try {
swfUrl = ExternalInterface.call("function getLocation() {return document.referrer;}");
if (swfUrl.indexOf("http") == -1){
swfUrl = ExternalInterface.call("document.location.toString");
};
if (swfUrl.indexOf("http") == -1){
swfUrl = String(stage.loaderInfo.url);
};
} catch(e:Error) {
swfUrl = String(stage.loaderInfo.url);
};
cache = String(Math.floor((date.time / 1000)));
loaderPHP = new Loader();
loaderPHP.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
loaderPHP.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
loaderPHP.load(new URLRequest((((((((((((FILENameRefTrack + "?") + "gameID=") + GAMEID) + "&ref=") + swfUrl) + "&") + "vD=") + versionsDate) + "&") + "cache=") + cache)));
loader = new Loader();
addChild(loader);
cache = String(Math.floor((date.time / (((1000 * 60) * 60) * 24))));
loader.load(new URLRequest((((FILENameFarm + "?") + "cache=") + cache)));
}
function onIOError(_arg1:IOErrorEvent):void{
}
function securityErrorHandler(_arg1:SecurityErrorEvent):void{
}
}
}//package com.goodgame.farm