mirror of
https://github.com/burrow-dev/burrow-server.git
synced 2026-11-20 09:37:50 -05:00
Brought up to date with the private repository (feea4c7)
This commit is contained in:
1 parent
1aa738d692
commit
1b1df1ae48
7925 files changed
+2617237
-20
No files matched your search
@@ -0,0 +1,28 @@
|
||||
package resource
|
||||
{
|
||||
import com.sbi.loader.IResourceStackable;
|
||||
import flash.events.Event;
|
||||
|
||||
public class BaseResourceStackable implements IResourceStackable
|
||||
{
|
||||
|
||||
protected var _resourceDoneLoadingCallback:Function;
|
||||
|
||||
public function BaseResourceStackable()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public function init(param1:Function) : void
|
||||
{
|
||||
this._resourceDoneLoadingCallback = param1;
|
||||
}
|
||||
|
||||
protected function resourceLoadCompleteHandler(param1:Event) : void
|
||||
{
|
||||
this._resourceDoneLoadingCallback(this);
|
||||
this._resourceDoneLoadingCallback = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
package resource
|
||||
{
|
||||
import com.sbi.debug.DebugUtility;
|
||||
import com.sbi.loader.IResourceStackable;
|
||||
import com.sbi.loader.LoaderCache;
|
||||
import flash.events.Event;
|
||||
import flash.net.URLLoader;
|
||||
import flash.net.URLLoaderDataFormat;
|
||||
import flash.net.URLRequest;
|
||||
|
||||
public class FetchClientIPResourceStackable extends BaseResourceStackable implements IResourceStackable
|
||||
{
|
||||
|
||||
public function FetchClientIPResourceStackable()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
override public function init(param1:Function) : void
|
||||
{
|
||||
var clientIpStr:String;
|
||||
var r:URLLoader = null;
|
||||
var callback:Function = param1;
|
||||
super.init(callback);
|
||||
clientIpStr = gMainFrame.clientInfo.clientIp;
|
||||
if(clientIpStr != null && clientIpStr != "")
|
||||
{
|
||||
DebugUtility.debugTrace("FetchClientIPResourceStackable init() - clientIpStr:" + clientIpStr);
|
||||
this.saveClientIp(clientIpStr);
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
r = new URLLoader();
|
||||
r.dataFormat = URLLoaderDataFormat.TEXT;
|
||||
r.addEventListener(Event.COMPLETE,this.clientIpFetchCompleteHandler,false,0,true);
|
||||
DebugUtility.debugTrace("FetchClientIPResourceStackable init() - getClientIp url:http://" + gMainFrame.server.blueboxServerIp + ":" + gMainFrame.server.blueboxServerPort + "/witI43K/getClientIp");
|
||||
r.load(new URLRequest("http://" + gMainFrame.server.blueboxServerIp + ":" + gMainFrame.server.blueboxServerPort + "/witI43K/getClientIp"));
|
||||
}
|
||||
catch(e:Error)
|
||||
{
|
||||
DebugUtility.debugTrace("error calling getClientIp:" + e.getStackTrace());
|
||||
LoadProgress.show(true,"Error - please try again later");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function clientIpFetchCompleteHandler(param1:Event) : void
|
||||
{
|
||||
var _loc2_:String = param1.target.data;
|
||||
DebugUtility.debugTrace("my ip is:" + _loc2_);
|
||||
if(_loc2_ == "")
|
||||
{
|
||||
LoadProgress.show(true,"Error - please try again later");
|
||||
return;
|
||||
}
|
||||
gMainFrame.clientInfo.clientIp = _loc2_;
|
||||
this.saveClientIp(_loc2_);
|
||||
}
|
||||
|
||||
private function saveClientIp(param1:String) : void
|
||||
{
|
||||
LoaderCache.clientIp = param1;
|
||||
DebugUtility.debugTrace("saveClientIp - LoaderCache.clientIp:" + LoaderCache.clientIp);
|
||||
super._resourceDoneLoadingCallback(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package resource
|
||||
{
|
||||
import com.sbi.loader.IResourceStackable;
|
||||
import flash.display.MovieClip;
|
||||
import loader.MediaHelper;
|
||||
|
||||
public class LoadAvatarCarouselResourceStackable extends BaseResourceStackable implements IResourceStackable
|
||||
{
|
||||
|
||||
private var _mediaHelper:MediaHelper;
|
||||
|
||||
public function LoadAvatarCarouselResourceStackable()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
override public function init(param1:Function) : void
|
||||
{
|
||||
super.init(param1);
|
||||
this._mediaHelper = new MediaHelper();
|
||||
this._mediaHelper.init(gMainFrame.clientInfo.isCreateAccount ? 1808 : 1892,this.onAvatarCarouselLoaded);
|
||||
}
|
||||
|
||||
private function onAvatarCarouselLoaded(param1:MovieClip) : void
|
||||
{
|
||||
if(Boolean(gMainFrame.clientInfo.isCreateAccount) && MainFrame.avatarCreationLogin == null)
|
||||
{
|
||||
MainFrame.avatarCreationLogin = MovieClip(param1.getChildAt(0));
|
||||
this._mediaHelper.destroy();
|
||||
this._mediaHelper = null;
|
||||
super._resourceDoneLoadingCallback(this);
|
||||
return;
|
||||
}
|
||||
MainFrame.avatarCreationWorld = MovieClip(param1.getChildAt(0));
|
||||
this._mediaHelper.destroy();
|
||||
this._mediaHelper = null;
|
||||
super._resourceDoneLoadingCallback(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package resource
|
||||
{
|
||||
import com.sbi.loader.IResourceStackable;
|
||||
import flash.ui.Mouse;
|
||||
import gui.CursorManager;
|
||||
|
||||
public class LoadCursorResourceStackable implements IResourceStackable
|
||||
{
|
||||
|
||||
public function LoadCursorResourceStackable()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public function init(param1:Function) : void
|
||||
{
|
||||
if(Mouse["supportsNativeCursor"])
|
||||
{
|
||||
CursorManager.init();
|
||||
}
|
||||
param1(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
package resource
|
||||
{
|
||||
import flash.display.MovieClip;
|
||||
import loader.MediaHelper;
|
||||
|
||||
public class LoadIntro
|
||||
{
|
||||
|
||||
private var _mediaHelper:MediaHelper;
|
||||
|
||||
private var _callback:Function;
|
||||
|
||||
public function LoadIntro()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public function init(param1:Function) : void
|
||||
{
|
||||
this._callback = param1;
|
||||
this._mediaHelper = new MediaHelper();
|
||||
this._mediaHelper.init(1904,this.onIntroLoaded);
|
||||
}
|
||||
|
||||
private function onIntroLoaded(param1:MovieClip) : void
|
||||
{
|
||||
param1.stopMovie();
|
||||
param1.visible = false;
|
||||
this._mediaHelper.destroy();
|
||||
this._mediaHelper = null;
|
||||
this._callback(param1);
|
||||
this._callback = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user