Section 1
//SWFLoader (nl.tfe.games.swfloader.SWFLoader)
package nl.tfe.games.swfloader {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.system.*;
import flash.ui.*;
public class SWFLoader extends Sprite {
private var containerHeight:Number;
private var swfLoader:Loader;
private var locationLoader:URLLoader;
public var container:MovieClip;
public var bgGradient:MovieClip;
public var corners:MovieClip;
private var containerWidth:Number;
private static const GAME_ID:String = "hoppinpop";
public function SWFLoader(){
var _local1:String;
var _local2:String;
super();
Security.allowDomain("*");
this.containerWidth = this.container.width;
this.containerHeight = this.container.height;
this.contextMenu = new ContextMenu();
this.contextMenu.hideBuiltInItems();
this.stage.align = "TL";
this.stage.scaleMode = "noScale";
this.stage.addEventListener(Event.RESIZE, this.resizeHandler);
this.resizeHandler(null);
this.swfLoader = new Loader();
this.swfLoader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, this.loadProgressHandler);
this.swfLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, this.loadIOErrorHandler);
this.swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, this.loadCompleteHandler);
this.container.addChild(this.swfLoader);
this.swfLoader.mask = this.container.gameMask;
this.swfLoader.x = this.container.gameMask.x;
this.swfLoader.y = this.container.gameMask.y;
_local1 = this.root.loaderInfo.parameters["fvSwfUrl"];
_local2 = this.root.loaderInfo.parameters["fvLocationUrl"];
if (_local1 != null){
this.loadSwf(_local1);
} else {
if (_local2 == null){
_local2 = ((("http://games.justgreat.nl/getLocation.php?gameId=" + _slot1.GAME_ID) + "&noCache=") + new Date().getTime());
};
this.locationLoader = new URLLoader();
this.locationLoader.addEventListener(Event.COMPLETE, this.locationLoadCompleteHandler);
this.locationLoader.addEventListener(IOErrorEvent.IO_ERROR, this.locationLoaderIOErrorHandler);
this.locationLoader.load(new URLRequest(_local2));
};
}
private function loadCompleteHandler(_arg1:Event):void{
this.container.removeChild(this.container.loader);
}
private function locationLoadCompleteHandler(_arg1:Event):void{
this.loadSwf(new XML(this.locationLoader.data).game[0].@url);
}
private function locationLoaderIOErrorHandler(_arg1:IOErrorEvent):void{
trace(("locationLoaderIOErrorHandler: " + _arg1));
}
private function loadProgressHandler(_arg1:ProgressEvent):void{
this.container.loader.loaderMask.width = ((100 / _arg1.bytesTotal) * _arg1.bytesLoaded);
}
private function loadSwf(_arg1:String):void{
var _local2:String;
_arg1 = (_arg1 + ((_arg1.indexOf("?"))>0) ? "&" : "?");
for (_local2 in this.root.loaderInfo.parameters) {
if ((((_local2 == "fvLocationUrl")) || ((_local2 == "fvSwfUrl")))){
} else {
_arg1 = (_arg1 + (((_local2 + "=") + this.root.loaderInfo.parameters[_local2]) + "&"));
};
};
this.swfLoader.load(new URLRequest(_arg1));
}
private function loadIOErrorHandler(_arg1:IOErrorEvent):void{
trace(("loadIOErrorHandler: " + _arg1));
}
private function resizeHandler(_arg1:Event):void{
this.bgGradient.width = this.stage.stageWidth;
this.corners.x = (this.container.x = ((this.stage.stageWidth - this.containerWidth) / 2));
this.corners.y = (this.container.y = Math.min(Math.max(((this.stage.stageHeight - this.containerHeight) / 2), -3), 30));
this.corners.visible = (((this.stage.stageHeight > (this.containerHeight + 5))) && ((this.stage.stageWidth > (this.containerWidth + 5))));
}
}
}//package nl.tfe.games.swfloader
Section 2
//default2 (skin.ldr.progress.default2)
package skin.ldr.progress {
import flash.display.*;
public dynamic class default2 extends MovieClip {
public function default2(){
addFrameScript(15, frame16);
}
function frame16(){
this.gotoAndPlay(1);
}
}
}//package skin.ldr.progress
Section 3
//Container_2 (swfloader_fla.Container_2)
package swfloader_fla {
import flash.display.*;
public dynamic class Container_2 extends MovieClip {
public var gameMask:MovieClip;
public var loader:MovieClip;
}
}//package swfloader_fla
Section 4
//Loader_4 (swfloader_fla.Loader_4)
package swfloader_fla {
import flash.display.*;
public dynamic class Loader_4 extends MovieClip {
public var loaderMask:MovieClip;
}
}//package swfloader_fla