Section 1
//ApplicationLoader (fizzy.ApplicationLoader)
package fizzy {
import flash.events.*;
import flash.display.*;
import flash.system.*;
import flash.net.*;
public class ApplicationLoader extends Sprite implements IApplicationLoader {
private var loader:Loader;
private var initObject:Object;
public static const FIZZY_DOMAIN:String = "http://www.fizzy.com";
public static const FRAMEWORK_REMOTE_URL:String = (FIZZY_DOMAIN + "/swf/fizzy_framework.swf");
public static const FRAMEWORK_HOSTED_URL:String = (FIZZY_DOMAIN + "/swf/fizzy_framework.swf");
public static const REMOTE_DOMAIN:String = "http://www.fizzy.com";
private static var GAME_INFO:String = "exmortis_3 ";
public function ApplicationLoader(){
Security.allowDomain("*");
trace(this.stage.stageWidth, "x", this.stage.stageHeight);
this.loaderInfo.addEventListener(Event.COMPLETE, this.initialize);
}
public function initialize(_arg1:Event){
var _local4:RegExp;
var _local5:String;
var _local6:Array;
this.loaderInfo.removeEventListener(Event.COMPLETE, this.initialize);
if (_slot1.GAME_INFO.charAt(0) == "<"){
this.initObject = this.loaderInfo.parameters;
} else {
_slot1.GAME_INFO = _slot1.GAME_INFO.replace(/^\s+|\s+$/g, "");
_local4 = /^(\w+)(\:\/\/)(\/*)([^\/]+)(\/*)(.*)$/i;
_local5 = this.loaderInfo.url.replace(_local4, "$1$2$3$4");
_local6 = _slot1.GAME_INFO.split("|~|");
this.initObject = {gameName:_local6[0], gameWidth:this.loaderInfo.width, gameHeight:this.loaderInfo.height, hostDomain:_local5, user_id:0, load_seed:""};
};
var _local2:Number = Math.floor((Math.random() * 1000));
var _local3:URLRequest = new URLRequest(((this.getFrameworkURL() + "?r=") + _local2));
this.loader = new Loader();
this.loader.load(_local3);
this.loader.contentLoaderInfo.addEventListener(Event.COMPLETE, this.initializeFramework);
this.addChild(this.loader);
}
public function initializeFramework(_arg1:Event){
trace(("Game: " + this.initObject.gameName), this.initObject.gameWidth, "x", this.initObject.gameHeight);
(loader.content as Object).initialize(this.initObject);
}
public function getFrameworkURL():String{
return (_slot1.FRAMEWORK_HOSTED_URL);
}
}
}//package fizzy
Section 2
//IApplicationLoader (fizzy.IApplicationLoader)
package fizzy {
import flash.events.*;
public interface IApplicationLoader {
function initialize(_arg1:Event);
function initializeFramework(_arg1:Event);
function getFrameworkURL():String;
}
}//package fizzy