Section 1
//InboxDebugger (uk.co.inbox.debug.InboxDebugger)
package uk.co.inbox.debug {
import flash.events.*;
import flash.net.*;
public class InboxDebugger {
private static const connectionName:String = "_connectionDebugger";
private static const methodName:String = "outPut";
private static const connection:LocalConnection = new LocalConnection();
private static var sendoutput:Boolean = true;
private static var init:Boolean = false;
private static function statevent(_arg1:StatusEvent):void{
}
static function send(_arg1:String="", _arg2:int=0):void{
var $what = _arg1;
var $level = _arg2;
if (!InboxDebugger.init){
InboxDebugger.init = true;
connection.addEventListener(StatusEvent.STATUS, statevent);
};
if (InboxDebugger.sendoutput){
try {
connection.send(connectionName, methodName, $what, $level);
} catch(e:TypeError) {
} catch(e:ArgumentError) {
} catch(e:StatusEvent) {
};
};
}
public static function set output(_arg1:Boolean):void{
sendoutput = _arg1;
}
}
}//package uk.co.inbox.debug
Section 2
//outPut (uk.co.inbox.debug.outPut)
package uk.co.inbox.debug {
public function outPut(_arg1:String="", _arg2:int=0){
InboxDebugger.send(_arg1, _arg2);
if (_arg2 != 0){
trace("----*****ERROR*****----");
};
trace(_arg1);
if (_arg2 != 0){
trace("----*****ERROR*****----");
};
}
}//package uk.co.inbox.debug
Section 3
//KeyBoardManager (uk.co.inbox.Input.KeyBoardManager)
package uk.co.inbox.Input {
import flash.events.*;
import flash.display.*;
public class KeyBoardManager {
public static const W:String = "w";
private static const keyRelations:Object = {w:12, enter:13};
public static const ENTER:String = "enter";
private static var disp:EventDispatcher;
private static var keys:Object = {};
public static function dispatchEvent(... _args):void{
if (disp == null){
return;
};
disp.dispatchEvent.apply(null, _args);
}
private static function keyPress(_arg1:KeyboardEvent):void{
if (!keys[_arg1.keyCode]){
trace(("KeyBoardManager - KeyPressed: " + _arg1.keyCode));
dispatchEvent(new KeyEvent(_arg1.keyCode, getKeyValueByCode(_arg1.keyCode), true));
};
keys[_arg1.keyCode] = true;
}
public static function removeEventListener(... _args):void{
if (disp == null){
return;
};
disp.removeEventListener.apply(null, _args);
}
private static function getKeyValueByCode(_arg1:int):String{
var _local2:*;
for (_local2 in keyRelations) {
if (keyRelations[_local2] == _arg1){
return (_local2);
};
};
return (null);
}
public static function addEventListener(... _args):void{
if (disp == null){
disp = new EventDispatcher();
};
disp.addEventListener.apply(null, _args);
}
private static function keyRelease(_arg1:KeyboardEvent):void{
if (!keys[_arg1.keyCode]){
dispatchEvent(new KeyEvent(_arg1.keyCode, getKeyValueByCode(_arg1.keyCode), false));
};
keys[_arg1.keyCode] = false;
}
public static function init(_arg1:DisplayObject):void{
addListeners(_arg1);
}
public static function isDown(_arg1:String):Boolean{
if (keyRelations[_arg1]){
return (((keys[keyRelations[_arg1]] == undefined)) ? false : keys[keyRelations[_arg1]]);
};
return (false);
}
public static function addListeners(_arg1:DisplayObject):void{
_arg1.addEventListener(KeyboardEvent.KEY_DOWN, keyPress, false, 0, true);
_arg1.addEventListener(KeyboardEvent.KEY_UP, keyRelease, false, 0, true);
}
}
}//package uk.co.inbox.Input
Section 4
//KeyEvent (uk.co.inbox.Input.KeyEvent)
package uk.co.inbox.Input {
import flash.events.*;
public class KeyEvent extends Event {
public var keyValue:String;
public var keyCode:int;
public var isdown:Boolean;
public static const keyevent:String = "KEY_EVENT_02";
public function KeyEvent(_arg1:int, _arg2:String, _arg3:Boolean){
super(keyevent);
keyCode = _arg1;
keyValue = _arg2;
isdown = _arg3;
}
}
}//package uk.co.inbox.Input
Section 5
//LanguageManager (uk.co.inbox.languages.LanguageManager)
package uk.co.inbox.languages {
import flash.events.*;
import flash.display.*;
import uk.co.inbox.*;
import uk.co.inbox.template.files.*;
import uk.co.inbox.debug.*;
import flash.net.*;
public class LanguageManager {
public static const defaultLoadedEvent:String = "DEFAULT_LAN_LOADED";
private static var languagesLoaded:Object = {};
private static var objArr:Array = new Array();
private static var currentLanguage:String = "EN";
private static var disp:EventDispatcher;
public static function updateLanguage(_arg1:String){
if (_arg1 !== currentLanguage){
if (!languagesLoaded[_arg1]){
outPut(("LanguageManager - Loading new language, code: " + _arg1));
loadLanguage(_arg1);
} else {
outPut(("LanguageManager - Switching language, code: " + _arg1));
currentLanguage = _arg1;
resetLanguage();
};
};
}
private static function lanLoaded(_arg1:Event):void{
currentLanguage = XML(_arg1.target.data).lan_code;
outPut(("LanguageManager - Loaded " + currentLanguage));
languagesLoaded[currentLanguage] = XML(_arg1.target.data);
trace(_arg1.target.data);
dispatchEvent(new Event(defaultLoadedEvent));
resetLanguage();
}
public static function dispatchEvent(... _args):void{
if (disp == null){
return;
};
disp.dispatchEvent.apply(null, _args);
}
public static function removeEventListener(... _args):void{
if (disp == null){
return;
};
disp.removeEventListener.apply(null, _args);
}
public static function addEventListener(... _args):void{
if (disp == null){
disp = new EventDispatcher();
};
disp.addEventListener.apply(null, _args);
}
public static function resetLanguage():void{
var _local1:int;
var _local2:int;
outPut("LanguageManager - Resetting all TextFields!");
_local1 = FileManager.currentFiles.length;
_local2 = 0;
while (_local2 < _local1) {
setText(FileManager.currentFiles[_local2].file);
_local2++;
};
}
public static function setText(_arg1):void{
var _local2:Array;
var _local3:int;
var _local4:String;
var _local5:String;
var _local6:int;
var _local7:*;
var _local8:String;
var _local9:*;
if (languagesLoaded[currentLanguage]){
_local2 = getTextFields(_arg1);
_local3 = _local2.length;
_local5 = "";
_local6 = 0;
while (_local6 < _local3) {
_local7 = _local2[_local6].name;
while (_local7.indexOf("__") !== -1) {
trace(_local7.indexOf("__"));
_local9 = _local7.substring(0, _local7.indexOf("__"));
_local7 = _local7.substring((_local7.indexOf("__") + 2), _local7.length);
_local5 = languagesLoaded[currentLanguage][_local9];
if (_local5){
_local4 = (_local4 + (" " + _local5));
};
trace(("fill: " + _local5));
};
_local8 = languagesLoaded[currentLanguage][_local7];
if (_local4){
_local8 = _local5;
};
if (_local8){
_local2[_local6].text = _local8;
};
_local6++;
};
};
}
public static function init():void{
outPut("LanguageManager - init");
currentLanguage = GlobalSettings.get("defaultLanguage");
loadLanguage(currentLanguage);
}
private static function crawl(_arg1:DisplayObjectContainer, _arg2:String):void{
var i:uint;
var obj:*;
var isRightType:Boolean;
var o = _arg1;
var oType = _arg2;
i = 0;
while (i < o.numChildren) {
obj = o.getChildAt(i);
isRightType = !((obj.toString().indexOf(oType) == -1));
if (isRightType){
objArr.push(obj);
};
try {
crawl(obj, oType);
} catch(e:Error) {
};
i = (i + 1);
};
}
private static function couldNotLoad(_arg1:Event):void{
outPut(((((("LanguageManager - Could not load " + GlobalSettings.get("defaultLanguage")) + " at URL: ") + GlobalSettings.get("flashFilesPath")) + GlobalSettings.get("defaultLanguage")) + ".xml"), 1);
}
public static function get current():String{
return (currentLanguage);
}
private static function getTextFields(_arg1:DisplayObjectContainer):Array{
objArr = [];
crawl(_arg1, "TextField");
return (objArr);
}
private static function loadLanguage(_arg1:String):void{
var _local2:*;
var _local3:*;
_local2 = new URLLoader();
_local3 = new URLRequest(((GlobalSettings.get("flashFilesPath") + _arg1) + ".xml"));
_local2.load(_local3);
_local2.addEventListener(Event.COMPLETE, lanLoaded);
_local2.addEventListener(IOErrorEvent.IO_ERROR, couldNotLoad);
}
}
}//package uk.co.inbox.languages
Section 6
//League (uk.co.inbox.leagues.League)
package uk.co.inbox.leagues {
import flash.events.*;
import uk.co.inbox.maths.*;
import uk.co.inbox.*;
import uk.co.inbox.debug.*;
import uk.co.inbox.tag.*;
import uk.co.inbox.tools.*;
import flash.net.*;
import flash.utils.*;
public class League extends EventDispatcher {
public static const STATUS_JOIN_ERROR:String = "joinError";
public static const GET_LEAGUE_FAILED:String = "getLeagueFailure";
public static const JOIN_LEAGUE_INIT:String = "joinLeagueInit";
public static const JOIN_LEAGUE_SUCCESS:String = "joinLeagueSuccess";
public static const STATUS_GET_ERROR:String = "getError";
public static const STATUS_CREATE_ERROR:String = "createError";
public static const STATUS_LEAGUE:String = "league";
public static const CREATE_LEAGUE_FAILED:String = "createLeagueFailure";
public static const STATUS_JOIN:String = "join";
public static const STATUS_NOLEAGUE:String = "non";
public static const STATUS_GETTING:String = "getting";
public static const CREATE_LEAGUE_INIT:String = "createLeagueInit";
public static const CREATE_LEAGUE_SUCCESS:String = "createLeagueSuccess";
public static const JOIN_LEAGUE_FAILED:String = "joinLeagueFailure";
public static const GET_LEAGUE_SUCCESS:String = "getLeagueSuccess";
private static var freqUpdateScoreLimit:Number;
private static var isDebugMode:Boolean = false;
private static var _status:String = "non";
public static var leagueId:String = "";
protected static var disp:EventDispatcher;
private static var leagueOwner:String = "";
private static var leagueName:String = "";
private static var freqUpdateScoreCount:Number = 0;
private static var myLeagueId:String;
public static function playLeague():void{
navigateToURL(new URLRequest(leagueURL), "_self");
}
public static function get currentleagueName():String{
return (leagueName);
}
private static function getLeagueSuccess(_arg1:Event){
var _local2:URLLoader;
var _local3:URLVariables;
outPut("getLeagueSuccess");
outPut((" event:" + _arg1));
_local2 = URLLoader(_arg1.target);
_local3 = new URLVariables(_local2.data);
leagueOwner = _local3.ownername;
leagueName = _local3.leaguename;
status = STATUS_LEAGUE;
dispatchEvent(new Event(GET_LEAGUE_SUCCESS));
}
public static function init(_arg1:String, _arg2:String, _arg3:String=""){
var _local4:Array;
var _local5:Boolean;
var _local6:int;
outPut("League - init");
if (_arg1 == "league"){
leagueName = _arg3;
leagueId = _arg2;
outPut((" leagueId:" + leagueId));
_local4 = CustomSharedObject.get("leagueList", []);
outPut((" tempList:" + _local4));
_local5 = false;
_local6 = 0;
while ((((_local6 < _local4.length)) && (!(_local5)))) {
outPut((((((" tempList[" + _local6) + "][0]:") + _local4[_local6][0]) + ", leagueId:") + leagueId));
if (_local4[_local6][0] == leagueId){
outPut(" found!!");
_local5 = true;
myLeagueId = _local4[_local6][1];
} else {
_local6++;
};
};
if (_local5){
status = STATUS_GETTING;
getLeague();
} else {
status = STATUS_JOIN;
};
};
}
public static function getLeague(){
var req:*;
var vars:*;
var sendVars:*;
req = new URLRequest((GlobalSettings.get("leagueCgiPath") + "getleague.cgi"));
vars = new URLVariables();
vars.rnd = new Date().getTime();
vars.unique_id = myLeagueId;
vars.campaign = GlobalSettings.get("gameName");
req.data = vars;
try {
sendVars = new URLLoader(req);
} catch(e:Error) {
getLeagueFailure(null);
};
sendVars.addEventListener(Event.COMPLETE, getLeagueSuccess);
sendVars.addEventListener(SecurityErrorEvent.SECURITY_ERROR, getLeagueFailure);
sendVars.addEventListener(IOErrorEvent.IO_ERROR, getLeagueFailure);
}
public static function get isLeague():Boolean{
return ((status == STATUS_LEAGUE));
}
private static function getLeagueFailure(_arg1){
outPut("getLeagueFailure");
outPut((" event:" + _arg1));
status = STATUS_GET_ERROR;
dispatchEvent(new Event(GET_LEAGUE_FAILED));
}
public static function get leagueStandingsURL():String{
return ((GlobalSettings.get("leagueStandingsPath") + myLeagueId));
}
private static function sendScoreSuccess(_arg1:Event):void{
outPut("sendScoreSuccess");
}
public static function viewLeague():void{
navigateToURL(new URLRequest(leagueStandingsURL), "_blank");
}
private static function createLeagueSuccess(_arg1:Event){
var _local2:URLLoader;
var _local3:URLVariables;
var _local4:Array;
outPut("League - createLeagueSuccess");
status = STATUS_LEAGUE;
_local2 = URLLoader(_arg1.target);
outPut((" loader:" + _local2));
outPut((" loader.data:" + _local2.data));
if (_local2.data.slice(-1) == "&"){
_local2.data = _local2.data.slice(0, (_local2.data.length - 1));
};
outPut((" loader.data:" + _local2.data));
_local3 = new URLVariables(_local2.data);
outPut((" vars:" + _local3));
outPut((" vars.league_id:" + _local3.league_id));
leagueId = (myLeagueId = _local3.league_id);
_local4 = CustomSharedObject.get("leagueList", []);
_local4.push([myLeagueId, myLeagueId]);
CustomSharedObject.set({leagueList:_local4});
GlobalSettings.set({leagueMode:true});
InboxTag.callTag({pg:"createLeague"});
dispatchEvent(new Event(CREATE_LEAGUE_SUCCESS));
}
private static function sendScoreFailure(_arg1:Event):void{
outPut("sendScoreFailure");
}
private static function createLeagueFailure(_arg1:Event):void{
outPut(("League - createLeagueFailure - e:" + _arg1));
status = STATUS_CREATE_ERROR;
dispatchEvent(new Event(CREATE_LEAGUE_FAILED));
}
public static function get leagueURL():String{
return (((GlobalSettings.get("gamePath") + "game/") + myLeagueId));
}
public static function cancelLeague():void{
status = STATUS_NOLEAGUE;
}
public static function addEventListener(... _args):void{
if (disp == null){
disp = new EventDispatcher();
};
disp.addEventListener.apply(null, _args);
}
public static function dispatchEvent(... _args):void{
if (disp == null){
return;
};
disp.dispatchEvent.apply(null, _args);
}
private static function joinLeagueSuccess(_arg1:Event):void{
var _local2:URLLoader;
var _local3:URLVariables;
var _local4:Array;
outPut("League - joinLeagueSuccess");
status = STATUS_LEAGUE;
_local2 = URLLoader(_arg1.target);
outPut((" loader:" + _local2));
outPut((" loader.data:" + _local2.data));
if (_local2.data.slice(-1) == "&"){
_local2.data = _local2.data.slice(0, (_local2.data.length - 1));
};
outPut((" loader.data:" + _local2.data));
_local3 = new URLVariables(_local2.data);
leagueId = (myLeagueId = _local3.unique_id);
_local4 = CustomSharedObject.get("leagueList", []);
outPut((" leagueId:" + leagueId));
outPut((" myLeagueId:" + myLeagueId));
_local4.push([leagueId, myLeagueId]);
outPut((" tempList:" + _local4));
CustomSharedObject.set({leagueList:_local4});
GlobalSettings.set({leagueMode:true});
InboxTag.callTag({pg:"joinLeague"});
dispatchEvent(new Event(JOIN_LEAGUE_SUCCESS));
}
public static function createLeague(_arg1:String, _arg2:String){
var req:*;
var vars:*;
var sendVars:*;
var playerName = _arg1;
var $leagueName = _arg2;
leagueName = $leagueName;
outPut("League - createLeague");
outPut((" playerName:" + playerName));
outPut((" leagueName:" + leagueName));
req = new URLRequest((GlobalSettings.get("leagueCgiPath") + "makeleague.cgi"));
vars = new URLVariables();
vars.rnd = new Date().getTime();
vars.leaguename = leagueName;
vars.ownername = playerName;
vars.score = 0;
vars.campaign = GlobalSettings.get("gameName");
req.data = vars;
try {
sendVars = new URLLoader(req);
} catch(e:Error) {
createLeagueFailure(null);
};
sendVars.addEventListener(Event.COMPLETE, createLeagueSuccess);
sendVars.addEventListener(SecurityErrorEvent.SECURITY_ERROR, createLeagueFailure);
sendVars.addEventListener(IOErrorEvent.IO_ERROR, createLeagueFailure);
}
private static function joinLeagueFailure(_arg1):void{
status = STATUS_JOIN_ERROR;
dispatchEvent(new Event(JOIN_LEAGUE_FAILED));
}
public static function removeEventListener(... _args):void{
if (disp == null){
return;
};
disp.removeEventListener.apply(null, _args);
}
public static function sendScore(_arg1:int, _arg2:int, _arg3:Boolean):void{
var req:*;
var vars:*;
var sendVars:*;
var score = _arg1;
var attempts = _arg2;
var isNewBestScore = _arg3;
freqUpdateScoreCount++;
outPut("League - sendScore");
outPut((" isNewBestScore:" + isNewBestScore));
if (isNewBestScore){
req = new URLRequest((GlobalSettings.get("leagueCgiPath") + "updateleague.cgi"));
vars = new URLVariables();
vars.rnd = new Date().getTime();
vars.plays = attempts;
vars.unique_id = myLeagueId;
vars.score = InMaths.encryptScore(score);
vars.campaign = GlobalSettings.get("gameName");
req.data = vars;
try {
sendVars = new URLLoader(req);
} catch(e:Error) {
sendScoreFailure(null);
};
sendVars.addEventListener(Event.COMPLETE, sendScoreSuccess);
sendVars.addEventListener(SecurityErrorEvent.SECURITY_ERROR, sendScoreFailure);
sendVars.addEventListener(IOErrorEvent.IO_ERROR, sendScoreFailure);
freqUpdateScoreCount = 0;
};
}
public static function set status(_arg1:String){
_status = _arg1;
}
public static function get status():String{
return (_status);
}
public static function joinLeague(_arg1:String):void{
var req:*;
var vars:*;
var sendVars:*;
var playerName = _arg1;
req = new URLRequest((GlobalSettings.get("leagueCgiPath") + "enterleague.cgi"));
vars = new URLVariables();
vars.rnd = new Date().getTime();
vars.league_id = leagueId;
vars.ownername = playerName;
vars.score = 0;
vars.campaign = GlobalSettings.get("gameName");
req.data = vars;
try {
sendVars = new URLLoader(req);
} catch(e:Error) {
joinLeagueFailure(null);
};
sendVars.addEventListener(Event.COMPLETE, joinLeagueSuccess);
sendVars.addEventListener(SecurityErrorEvent.SECURITY_ERROR, joinLeagueFailure);
sendVars.addEventListener(IOErrorEvent.IO_ERROR, joinLeagueFailure);
}
}
}//package uk.co.inbox.leagues
Section 7
//InMaths (uk.co.inbox.maths.InMaths)
package uk.co.inbox.maths {
public class InMaths {
public static function shortestPoint(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Boolean=false, _arg8:Boolean=false){
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
var _local15:*;
var _local16:*;
var _local17:*;
_local9 = (_arg1 - _arg3);
_local10 = (_arg2 - _arg4);
_local11 = (_arg5 - _arg3);
_local12 = (_arg6 - _arg4);
_local13 = ((_local9 * _local11) + (_local10 * _local12));
_local14 = ((_local11 * _local11) + (_local12 * _local12));
_local15 = (_local13 / _local14);
if (!_arg7){
if (_local15 < 0){
_local16 = _arg3;
_local17 = _arg4;
} else {
if (_local15 > 1){
_local16 = _arg5;
_local17 = _arg6;
} else {
_local16 = (_arg3 + (_local15 * _local11));
_local17 = (_arg4 + (_local15 * _local12));
};
};
} else {
_local16 = (_arg3 + (_local15 * _local11));
_local17 = (_arg4 + (_local15 * _local12));
};
if (!_arg8){
if ((((_local15 < 0)) || ((_local15 > 1)))){
return (false);
};
};
return ({x:_local16, y:_local17});
}
public static function encryptScore(_arg1:Number=0):String{
var _local2:String;
var _local3:Number;
var _local4:*;
var _local5:String;
_local2 = "";
_arg1 = ((_arg1 * 1000000) + 9876543210);
_local2 = _arg1.toString();
_local3 = 0;
_local4 = 1;
while (_local4 <= _local2.length) {
_local3 = ((_local3 + _local4) + int(_local2.charAt((_local4 - 1))));
_local4++;
};
_local5 = _local3.toString();
return (((_local5.length.toString() + _local2) + _local5));
}
public static function dis(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
var _local5:Number;
var _local6:Number;
_local5 = (_arg1 - _arg3);
_local6 = (_arg2 - _arg4);
return (Math.sqrt(((_local5 * _local5) + (_local6 * _local6))));
}
}
}//package uk.co.inbox.maths
Section 8
//Vector (uk.co.inbox.maths.Vector)
package uk.co.inbox.maths {
public class Vector {
public var p2:Object;
public var x:Number;// = 0
public var y:Number;// = 0
public var z:Number;// = 0
public var yV:Number;// = 0
public var xV:Number;// = 0
public function Vector(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=1, _arg5:Number=0, _arg6:Number=0):void{
var _local7:*;
x = 0;
y = 0;
z = 0;
p2 = {x:0, y:0};
xV = 0;
yV = 0;
super();
x = _arg1;
y = _arg2;
z = _arg5;
p2.x = _arg3;
p2.y = _arg4;
p2.z = _arg6;
_local7 = normalise((x - p2.x), (y - p2.y));
xV = _local7.x;
yV = _local7.y;
}
public function rotate(_arg1:Number):void{
var _local2:Number;
var _local3:Number;
_local2 = Math.cos(_arg1);
_local3 = Math.sin(_arg1);
xV = ((xV * _local2) - (yV * _local3));
xV = ((xV * _local3) + (yV * _local2));
}
public function updateEnd(_arg1:Number, _arg2:Number):void{
var _local3:*;
p2.x = _arg1;
p2.y = _arg2;
_local3 = normalise((x - p2.x), (y - p2.y));
xV = _local3.x;
yV = _local3.y;
}
private function normalise(_arg1, _arg2):Object{
var _local3:*;
_local3 = Math.sqrt(((_arg1 * _arg1) + (_arg2 * _arg2)));
if (_local3 == 0){
_local3 = 1;
};
_arg1 = (_arg1 / _local3);
_arg2 = (_arg2 / _local3);
return ({x:_arg1, y:_arg2});
}
public static function projectVector(_arg1:Vector, _arg2, _arg3){
var _local4:*;
var _local5:*;
_local4 = ((_arg1.xV * _arg2) + (_arg1.yV * _arg3));
_local5 = {};
_local5.xV = (_local4 * _arg2);
_local5.yV = (_local4 * _arg3);
return (_local5);
}
}
}//package uk.co.inbox.maths
Section 9
//Sound2D (uk.co.inbox.sound.Sound2D)
package uk.co.inbox.sound {
import flash.events.*;
import flash.display.*;
import uk.co.inbox.maths.*;
import flash.media.*;
import uk.co.inbox.debug.*;
import flash.text.*;
public class Sound2D extends MovieClip {
private var _sound:Sound;
public var masterVolume:Number;// = 1
private var lastCamPos:Vector;
private var _volume:Number;// = 1
private var _vector:Vector;
private var loops:int;// = 0
private var _channel:SoundChannel;
private var _pan:Number;// = 0
private static const hearing:int = 250;
private static const behindLoss:int = 6;
public static const doneEvent:String = "DONE_EVENT";
public function Sound2D(_arg1:Sound, _arg2:Number, _arg3:Vector=null, _arg4:Object=null):void{
_volume = 1;
_pan = 0;
masterVolume = 1;
loops = 0;
super();
masterVolume = _arg2;
lastCamPos = new Vector(0, 0, 10, 10, 10, 0);
if (_arg4){
if (_arg4.volume){
if ((((_arg4.volume is Number)) || ((_arg4.volume is int)))){
volume = _arg4.volume;
};
};
if (_arg4.loops){
if ((((_arg4.loops is Number)) || ((_arg4.loops is int)))){
loops = _arg4.loops;
};
};
};
if (_arg3 !== null){
_vector = _arg3;
} else {
_vector = new Vector(0, 0, 10, 10, 10, 0);
};
_sound = _arg1;
_channel = _sound.play(0, loops, new SoundTransform(volume, 0));
outPut(((("Sound2D - new - v:" + volume) + " l:") + loops));
processCamera(lastCamPos);
_channel.addEventListener(Event.SOUND_COMPLETE, loopDone);
}
public function get channel():SoundChannel{
return (_channel);
}
public function get volume():Number{
return (_volume);
}
public function get position():int{
return (_channel.position);
}
public function stopSound():void{
_channel.stop();
}
public function set volume(_arg1:Number):void{
_volume = _arg1;
processCamera(lastCamPos);
}
public function get vector():Vector{
return (_vector);
}
public function set position(_arg1:int):void{
}
public function processCamera(_arg1:Vector):void{
var _local2:Number;
var _local3:Number;
var _local4:Vector;
var _local5:Number;
var _local6:Number;
if (_vector !== null){
lastCamPos = _arg1;
_local2 = InMaths.dis(_arg1.x, _arg1.y, _vector.x, _vector.y);
if (_local2 == 0){
_local2 = 1;
};
_local3 = ((hearing - _local2) / _local2);
_local3 = (1 + _local3);
_local4 = new Vector(_arg1.x, _arg1.y, _vector.x, _vector.y);
_local5 = ((_arg1.xV * _local4.xV) + (_arg1.yV * _local4.yV));
_local6 = ((_arg1.xV * _local4.yV) + (_arg1.yV * -(_local4.xV)));
_local3 = (_local3 + ((_local3 * _local5) / behindLoss));
if (_local3 > 1){
_local3 = 1;
};
_local3 = (_local3 * _volume);
if (_local3 > 1){
_local3 = 1;
};
_local3 = (_local3 * masterVolume);
if (_local3 > 1){
_local3 = 1;
};
update(_local6, _local3);
};
}
public function loopDone(_arg1:Event):void{
_channel.removeEventListener(Event.SOUND_COMPLETE, loopDone);
trace("SoundDone");
dispatchEvent(new Event(doneEvent));
}
public function updateMasterVolume(_arg1:Number):void{
masterVolume = _arg1;
processCamera(lastCamPos);
}
public function moveSound(_arg1:Vector):void{
_vector = _arg1;
processCamera(lastCamPos);
}
public function update(_arg1:Number, _arg2:Number):void{
var $p = _arg1;
var $v = _arg2;
try {
_channel.soundTransform = new SoundTransform($v, $p);
} catch(e:Error) {
};
}
public function get panning():Number{
return (_pan);
}
}
}//package uk.co.inbox.sound
Section 10
//SoundManager (uk.co.inbox.sound.SoundManager)
package uk.co.inbox.sound {
import flash.events.*;
import uk.co.inbox.maths.*;
import flash.media.*;
import uk.co.inbox.template.files.*;
import uk.co.inbox.debug.*;
import uk.co.inbox.tools.*;
import flash.utils.*;
public class SoundManager {
private static var isSoundOn:Boolean = false;
private static var soundPlayerList:Array = [];
private static var isSoundPaused:Boolean = false;
private static var currentSoundList:Array = [];
private static var sounds2D:Array = [];
private static var masterVolume:Number = 1;
private static var isSoundOnDefault:Boolean = true;
private static var fadeDirection:String;
private static var fadeTimer:Timer;
private static var fadeDuration:int;
private static var fadeInitialVolume:Number;
private static var fadeStartTime:int;
private static var defaultVolume:Number = 1;
private static function fadeAllSounds(_arg1:String, _arg2:int):void{
if (fadeTimer == null){
fadeTimer = new Timer(30);
fadeTimer.addEventListener(TimerEvent.TIMER, onFadeAllSounds);
} else {
fadeTimer.stop();
};
fadeInitialVolume = volume;
fadeDirection = _arg1;
if (fadeDirection == "out"){
fadeDuration = (_arg2 * fadeInitialVolume);
} else {
fadeDuration = (_arg2 * (1 - fadeInitialVolume));
};
fadeStartTime = getTimer();
if (fadeDuration != 0){
fadeTimer.start();
};
}
public static function playSound(_arg1:String, _arg2:Number=1, _arg3:int=0, _arg4:Number=0, _arg5:Boolean=true, _arg6:Boolean=false, _arg7:Vector=null, _arg8:Boolean=false):Sound2D{
var _local9:*;
var _local10:Sound2D;
outPut(("SoundManager - playsound: " + _arg1));
_local9 = null;
_local10 = null;
while (true) {
if (_arg5){
_local9 = FileManager.searchForAsset(_arg1);
if (_local9 == false){
break;
};
_local9 = new (_local9);
} else {
_local9 = new (getDefinitionByName(_arg1));
};
_local10 = new Sound2D(_local9, masterVolume, _arg7, {loops:_arg3, volume:_arg2});
_local10.channel.addEventListener(Event.SOUND_COMPLETE, onSoundComplete);
currentSoundList.push({id:_arg1, ref:_local10, link2d:_arg6, loopsLeft:_arg3, ambiant:_arg8});
break;
};
return (_local10);
}
public static function set volume(_arg1:Number){
var _local2:SoundTransform;
var _local3:int;
_arg1 = ((_arg1 < 0)) ? 0 : _arg1;
_arg1 = ((_arg1 > 1)) ? 1 : _arg1;
masterVolume = _arg1;
outPut(("SoundManager - masterVolume:" + masterVolume));
_local2 = SoundMixer.soundTransform;
_local2.volume = masterVolume;
SoundMixer.soundTransform = _local2;
_local3 = 0;
while (_local3 < currentSoundList.length) {
currentSoundList[_local3].ref.updateMasterVolume(masterVolume);
_local3++;
};
}
private static function onSoundComplete(_arg1:Event):void{
var _local2:int;
_local2 = 0;
while (_local2 < currentSoundList.length) {
if (currentSoundList[_local2].ref.channel == _arg1.target){
_arg1.target.removeEventListener(Event.SOUND_COMPLETE, onSoundComplete);
currentSoundList.splice(_local2, 1);
break;
};
_local2++;
};
}
private static function onFadeAllSounds(_arg1:TimerEvent):void{
var _local2:int;
var _local3:Number;
_local2 = getTimer();
_local3 = ((_local2 - fadeStartTime) / fadeDuration);
volume = ((fadeDirection == "out")) ? (fadeInitialVolume - _local3) : (fadeInitialVolume + _local3);
if ((((volume <= 0)) || ((volume >= 1)))){
CustomSharedObject.set({volume:volume});
fadeTimer.stop();
};
}
public static function init():void{
outPut("SoundManager - init");
}
public static function togglePause(... _args):void{
if (isSoundPaused){
volume = 1;
isSoundPaused = false;
} else {
volume = 0;
isSoundPaused = true;
};
}
public static function stopAllSound():void{
var _local1:int;
_local1 = 0;
while (_local1 < currentSoundList.length) {
currentSoundList[_local1].ref.stopSound();
_local1++;
};
currentSoundList = new Array();
}
public static function get volume():Number{
return (masterVolume);
}
public static function toggleSound(... _args):void{
if (volume == 0){
volume = 1;
} else {
volume = 0;
};
}
public static function update2Dsounds(_arg1:Vector):void{
var _local2:int;
var _local3:int;
var _local4:Sound2D;
_local2 = currentSoundList.length;
_local3 = 0;
while (_local3 < _local2) {
if (currentSoundList[_local3].link2d){
_local4 = currentSoundList[_local3].ref;
_local4.processCamera(_arg1);
};
_local3++;
};
}
public static function isPlaying(_arg1:String):Boolean{
var _local2:int;
_local2 = 0;
while (_local2 < currentSoundList.length) {
if (currentSoundList[_local2].id == _arg1){
return (true);
};
_local2++;
};
return (false);
}
public static function fadeAllSoundsOut(_arg1:int):void{
fadeAllSounds("out", _arg1);
}
public static function fadeAllSoundsIn(_arg1:int):void{
fadeAllSounds("in", _arg1);
}
public static function stopSound(_arg1:String):void{
var _local2:int;
_local2 = 0;
while (_local2 < currentSoundList.length) {
if (currentSoundList[_local2].id == _arg1){
currentSoundList[_local2].ref.stopSound();
currentSoundList.splice(_local2, 1);
break;
};
_local2++;
};
}
}
}//package uk.co.inbox.sound
Section 11
//InboxTag (uk.co.inbox.tag.InboxTag)
package uk.co.inbox.tag {
import flash.events.*;
import flash.display.*;
import uk.co.inbox.*;
import uk.co.inbox.debug.*;
import uk.co.inbox.languages.*;
import flash.net.*;
import flash.system.*;
public class InboxTag {
private static var timeOut:int = 600;
private static var clientId:int = 0;
private static var maxTagDepth:int = 10;
private static var isDebugMode:Boolean = true;
private static var tagPath:String = "http://www.inboxtag.com/";
private static var isInit:Boolean = false;
private static var tagData:Object;
private static var tagHolder:Sprite;
private static var curTagDepth:int = initTagDepth;
private static var viralCalls:int = 0;
private static var initTagDepth:int = 1;
public static function callViralChart():void{
var _local1:URLRequest;
var _local2:Loader;
trace("********(((((((()))))))))))VIRALCHART*******************");
if (viralCalls < 1){
viralCalls++;
_local1 = new URLRequest((("http://www.viralchart.com/tracker.php?media=" + GlobalSettings.get("viralChartId")) + "&f=F"));
_local2 = new Loader();
_local2.load(_local1);
} else {
trace("********NOPE VIRALCHART*******************");
};
}
public static function init():void{
clientId = InboxTagData.clientId;
tagData = InboxTagData.tagData;
Security.allowDomain(tagPath);
isInit = true;
outPut("InboxTag - init");
}
public static function callTag(_arg1, _arg2:int=-1):void{
var _local3:*;
var _local4:*;
var _local5:Loader;
var _local6:URLRequest;
var _local7:URLVariables;
var _local8:*;
if ((((tagData == null)) || (!(isInit)))){
outPut("InboxTag - tagData is undefined. Check that InboxTag.init() has been called");
} else {
if (isNaN(_arg1.pg)){
_local3 = _arg1.pg;
_arg1.pg = tagData[_arg1.pg];
};
if (_arg1.pg != undefined){
outPut("InboxTag - start callTag---------------------");
if (_local3 != undefined){
outPut(("InboxTag - " + _local3));
};
for (_local4 in _arg1) {
outPut(((("InboxTag - " + _local4) + "=") + _arg1[_local4]));
};
outPut("InboxTag - end callTag---------------------------------");
_arg1.p5 = LanguageManager.current;
_local5 = new Loader();
_local6 = new URLRequest((tagPath + "tag.swf"));
_local7 = new URLVariables();
if (_arg2 != -1){
_local7.cl = _arg2;
} else {
_local7.cl = clientId;
};
_local7.js = "yes";
_local7.isFlashCall = true;
_local7.ti = 600;
for (_local8 in _arg1) {
_local7[_local8] = _arg1[_local8];
};
_local7.rnd = new Date().getTime();
_local6.data = _local7;
_local5.load(_local6);
} else {
outPut("InboxTag - ------InboxTag Error-----------------------------", 1);
outPut(("InboxTag - Page undefined - tagDataID:" + _local3));
outPut("InboxTag - ---------------------------------------------------");
};
};
}
}
}//package uk.co.inbox.tag
Section 12
//InboxTagData (uk.co.inbox.tag.InboxTagData)
package uk.co.inbox.tag {
public class InboxTagData {
public static const share_myspace:String = "share_myspace";
public static const share_yearbook:String = "share_yearbook";
public static const POST_IT_LOGO_CLICK:int = 3223;
public static const FIRE_WALLED:int = 3227;
public static const share_blogger:String = "share_blogger";
public static const share_wordpress:String = "share_wordpress";
public static const quickplay:String = "quickplay";
public static const register:String = "register";
public static const share_facebook:String = "share_facebook";
public static const sendToFriend:String = "sendToFriend";
public static const PLAYGAME:int = 3249;
public static const login_member:String = "login_member";
public static const share_typepad:String = "share_typepad";
public static const registernewsLetter:String = "registernewsLetter";
public static const promoClick:String = "promoClick";
public static const share_email:String = "share_email";
public static const WHY_BUY:int = 3229;
public static const login_nonmember:String = "login_nonmember";
public static const share_friendster:String = "share_friendster";
public static const LOST_PASSWORD:int = 3018;
public static const share_live:String = "share_live";
public static const share_hi:String = "share_hi";
public static const initLoadFlash:String = "initLoadFlash";
private static var _clientId:int = 160;
private static var _tagData:Object = {initLoadFlash:3011, login_member:3012, login_nonmember:3013, register:3014, quickplay:3015, sendToFriend:3016, registernewsLetter:3017, lostPassword:3018, share_email:3019, share_myspace:3020, share_facebook:3021, share_friendster:3022, share_live:3023, share_yearbook:3024, share_hi:3025, share_blogger:3026, share_wordpress:3027, share_typepad:3028, promoClick:3219};
public static function get clientId():int{
return (_clientId);
}
public static function get tagData():Object{
return (_tagData);
}
}
}//package uk.co.inbox.tag
Section 13
//FileManager (uk.co.inbox.template.files.FileManager)
package uk.co.inbox.template.files {
import uk.co.inbox.template.*;
import uk.co.inbox.sound.*;
import uk.co.inbox.*;
import uk.co.inbox.debug.*;
import uk.co.inbox.languages.*;
import uk.co.inbox.tag.*;
import uk.co.inbox.tools.*;
import uk.co.inbox.windows.*;
import uk.co.inbox.Input.*;
import uk.co.inbox.leagues.*;
public class FileManager {
public static var _currentLoaderInfo:Object = null;
public static var currentFiles:Array = [];
public static function getSwf(_arg1:String){
var _local2:int;
var _local3:String;
var _local4:int;
_local2 = currentFiles.length;
_local3 = "";
_local4 = 0;
while (_local4 < _local2) {
_local3 = (_local3 + (" " + currentFiles[_local4].name));
if (currentFiles[_local4].name == _arg1){
return (currentFiles[_local4].file);
};
_local4++;
};
outPut(((("FileManager - GetSwf - Could not find " + _arg1) + " in the file list. List contained: ") + _local3), 1);
return (false);
}
public static function set currentLoaderInfo(_arg1):void{
if (_arg1){
_currentLoaderInfo = _arg1;
};
}
public static function get currentLoaderInfo():Object{
if (!_currentLoaderInfo){
_currentLoaderInfo = null;
};
return (_currentLoaderInfo);
}
public static function addFile(_arg1:TemplateBase, _arg2:Boolean, _arg3, _arg4=null):void{
if (currentFiles.length == 0){
if (currentLoaderInfo == null){
if (!_arg1.loaderInfo){
currentLoaderInfo = {url:"", parameters:{}};
if (_arg4 !== null){
currentLoaderInfo = _arg4;
};
} else {
currentLoaderInfo = Object(_arg1.loaderInfo);
};
};
InboxTag.init();
GlobalSettings.init();
CustomSharedObject.init(GlobalSettings.get("gameName"));
SoundManager.init();
KeyBoardManager.init(_arg1);
if (GlobalSettings.get("leagueMode")){
League.init("league", GlobalSettings.get("flashVars").leagueid);
};
};
currentFiles.push({file:_arg1, vital:_arg2, name:_arg3});
outPut(((("FileManager - File Added, name: " + _arg3) + " totalFiles:") + currentFiles.length));
WindowManager.addSet(_arg3);
LanguageManager.setText(_arg1);
}
public static function searchForAsset(_arg1:String){
var _local2:int;
var _local3:*;
var _local4:int;
_local2 = currentFiles.length;
_local4 = 0;
while (_local4 < _local2) {
_local3 = currentFiles[_local4].file.getAsset(_arg1);
if (_local3 !== false){
outPut(("FileManager - Found shared asset: " + _arg1));
return (_local3);
};
_local4++;
};
outPut(("FileManager - Could not find shared asset: " + _arg1), 1);
return (false);
}
}
}//package uk.co.inbox.template.files
Section 14
//TemplateBase (uk.co.inbox.template.TemplateBase)
package uk.co.inbox.template {
import flash.display.*;
import flash.utils.*;
public class TemplateBase extends MovieClip {
protected var vital:Boolean;// = true
public function TemplateBase():void{
vital = true;
super();
}
public function getAsset(_arg1:String){
var what:Class;
var linkageId = _arg1;
try {
what = (getDefinitionByName(linkageId) as Class);
return (what);
} catch(e:ReferenceError) {
return (false);
};
}
}
}//package uk.co.inbox.template
Section 15
//CustomSharedObject (uk.co.inbox.tools.CustomSharedObject)
package uk.co.inbox.tools {
import uk.co.inbox.debug.*;
import flash.net.*;
public class CustomSharedObject {
public static var data:Object;
private static var so:SharedObject;
public static function wipe(_arg1:Object):void{
var i:*;
var $obj = _arg1;
try {
for (i in $obj) {
delete so.data[i];
};
so.flush();
data = so.data;
} catch(e:Error) {
outPut("CustonSharedObject - wipe() - Error: CustomSharedObject not init()ed");
};
}
public static function set(_arg1:Object):void{
var i:*;
var $obj = _arg1;
try {
for (i in $obj) {
so.data[i] = $obj[i];
};
so.flush();
data = so.data;
} catch(e:Error) {
outPut("CustonSharedObject - set() - Error: CustomSharedObject not init()ed");
};
}
public static function clear():void{
so.clear();
so.flush();
data = so.data;
}
public static function init(_arg1:String, _arg2:String="/"):void{
so = SharedObject.getLocal(_arg1, _arg2);
data = so.data;
}
public static function checkData(_arg1:String, _arg2=null){
if (so.data[_arg1] != undefined){
return (so.data[_arg1]);
};
if (_arg2 != null){
so.data[_arg1] = _arg2;
};
return (_arg2);
}
public static function updateData(_arg1:Object):void{
var _local2:*;
for (_local2 in _arg1) {
so.data[_local2] = _arg1[_local2];
};
so.flush();
data = so.data;
}
public static function deleteData(_arg1:Object):void{
var _local2:*;
for (_local2 in _arg1) {
delete so.data[_local2];
};
so.flush();
data = so.data;
}
public static function get(_arg1:String, _arg2=null){
var $propertyName = _arg1;
var $defaultValue = _arg2;
try {
if (so.data[$propertyName] != undefined){
return (so.data[$propertyName]);
} else {
if ($defaultValue != null){
so.data[$propertyName] = $defaultValue;
};
return ($defaultValue);
};
} catch(e:Error) {
outPut("CustonSharedObject - get() - Error: CustomSharedObject not init()ed");
return (null);
};
}
}
}//package uk.co.inbox.tools
Section 16
//WindowManager (uk.co.inbox.windows.WindowManager)
package uk.co.inbox.windows {
import flash.display.*;
import uk.co.inbox.template.files.*;
import uk.co.inbox.debug.*;
import uk.co.inbox.languages.*;
public class WindowManager {
private static var windowSets:Object = {};
public static function addWindow(_arg1, _arg2:String="Game", _arg3:String=null, _arg4:String=null):MovieClip{
if (_arg4 == null){
FileManager.getSwf(_arg2).addChild(_arg1);
} else {
FileManager.getSwf(_arg2)[_arg4].addChild(_arg1);
};
windowSets[_arg2].push({win:_arg1, cont:_arg4, name:_arg3});
outPut(("WindowManger - window added in " + _arg2));
LanguageManager.setText(_arg1);
return (_arg1);
}
public static function addSet(_arg1:String):void{
if (!windowSets[_arg1]){
windowSets[_arg1] = new Array();
outPut(("WindowManger - windowset added for " + _arg1));
};
}
public static function removeWindow(_arg1, _arg2:String="Game"):void{
var _local3:int;
var _local4:int;
_local3 = windowSets[_arg2].length;
_local4 = 0;
while (_local4 < _local3) {
if (windowSets[_arg2][_local4].win == _arg1){
if (windowSets[_arg2][_local4].cont !== null){
FileManager.getSwf(_arg2)[windowSets[_arg2][_local4].cont].removeChild(windowSets[_arg2][_local4].win);
} else {
FileManager.getSwf(_arg2).removeChild(_arg1);
};
windowSets[_arg2].splice(_local4, 1);
outPut(("WindowManger - window removed from " + _arg2));
break;
};
_local4++;
};
}
public static function removeAllWindows(_arg1:String="Game"):void{
var _local2:int;
var _local3:int;
_local2 = windowSets[_arg1].length;
_local3 = 0;
while (_local3 < _local2) {
if (windowSets[_arg1][_local3].cont !== null){
FileManager.getSwf(_arg1)[windowSets[_arg1][_local3].cont].removeChild(windowSets[_arg1][_local3].win);
} else {
FileManager.getSwf(_arg1).removeChild(windowSets[_arg1][_local3].win);
};
_local3++;
};
windowSets[_arg1] = new Array();
outPut(("WindowManger - All windows removed from " + _arg1));
}
public static function getWindow(_arg1:String, _arg2:String="Game"):MovieClip{
var _local3:int;
var _local4:int;
_local3 = windowSets[_arg2].length;
_local4 = 0;
while (_local4 < _local3) {
if (windowSets[_arg2][_local4].name !== null){
if (windowSets[_arg2][_local4].name == _arg1){
return (windowSets[_arg2][_local4].win);
};
};
_local4++;
};
outPut(("WindowManger - No current window with name: " + _arg1));
return (null);
}
}
}//package uk.co.inbox.windows
Section 17
//GlobalSettings (uk.co.inbox.GlobalSettings)
package uk.co.inbox {
import uk.co.inbox.template.files.*;
import uk.co.inbox.debug.*;
public class GlobalSettings {
private static var propertyData:Object = {};
public static function init():void{
var _local1:*;
outPut("GlobalSettings - init");
_local1 = {};
_local1.gameName = "postit";
_local1.gamePath = "http://www.post-it-game.co.uk/";
_local1.cgiPath = "http://www.hyperblastgame.com/cgi-bin/hyperblastgame/";
_local1.leagueStandingsPath = "http://www.viewstandings.com/hyperblastgame/";
_local1.leagueCgiPath = "http://www.inboxtag.com/cgi-bin/inboxtag/";
_local1.regScript = "http://www.inboxtag.com/hyperblast/alienware_reg.php";
_local1.termsLink = "http://www.hyperblastgame.com/terms.php";
_local1.viralChartId = "881";
_local1.leagueMode = (FileManager.currentLoaderInfo.parameters.leagueid) ? true : false;
_local1.isLocal = (FileManager.currentLoaderInfo.url) ? FileManager.currentLoaderInfo.url : null;
if (_local1.isLocal == null){
_local1.isLocal = FileManager.currentLoaderInfo.parameters.url;
if (!_local1.isLocal){
_local1.isLocal = "notaFileForReal";
};
};
_local1.isLocal = ((_local1.isLocal.slice(0, 4) == "file")) ? true : false;
_local1.gameTitle = "reindeerracer";
_local1.isFacebook = ((FileManager.currentLoaderInfo.parameters.fb_sig_api_key == undefined)) ? false : true;
if (_local1.isLocal){
_local1.flashFilesPath = "";
_local1.soundFilesPath = "";
} else {
_local1.flashFilesPath = (_local1.soundFilesPath = "http://cdn.cloudfiles.mosso.com/c69702/");
};
_local1.submitPath = "http://www.inboxwork.co.uk/physicseditor/demo1/submit.php";
_local1.getLevelsPath = "http://www.inboxwork.co.uk/physicseditor/demo1/getfolders.php";
_local1.levelPath = "http://www.inboxwork.co.uk/reindeerracer/";
_local1.presetPath = "http://www.inboxwork.co.uk/physicseditor/demo1/presets/";
_local1.flashVars = FileManager.currentLoaderInfo.parameters;
_local1.versionNumber = ((FileManager.currentLoaderInfo.parameters.game_version == undefined)) ? "1.0.0" : FileManager.currentLoaderInfo.parameters.game_version;
set(_local1);
}
public static function set(_arg1:Object):void{
var _local2:*;
for (_local2 in _arg1) {
propertyData[_local2] = _arg1[_local2];
};
}
public static function get(_arg1:String){
if (propertyData[_arg1] == null){
throw (new Error((("Settings property:" + _arg1) + " not found")));
};
return (propertyData[_arg1]);
}
}
}//package uk.co.inbox
Section 18
//MainTimeline (wrapper_fla.MainTimeline)
package wrapper_fla {
import flash.events.*;
import flash.display.*;
import flash.media.*;
import uk.co.inbox.*;
import uk.co.inbox.template.files.*;
import uk.co.inbox.debug.*;
import flash.net.*;
import flash.utils.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.printing.*;
import flash.text.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var re;
public var ld:Loader;
public var ubs:URLVariables;
public var context;
public function MainTimeline(){
addFrameScript(0, frame1);
}
function frame1(){
FileManager.currentLoaderInfo = loaderInfo;
GlobalSettings.init();
ld = new Loader();
Security.allowDomain("*");
context = new LoaderContext(false, ApplicationDomain.currentDomain);
re = new URLRequest((GlobalSettings.get("flashFilesPath") + "shell.swf"));
outPut((("Wrapper load url: " + GlobalSettings.get("flashFilesPath")) + "shell.swf"));
stage.scaleMode = StageScaleMode.NO_SCALE;
outPut("Wrapper - init", 1);
ubs = new URLVariables();
ubs.url = loaderInfo.url;
if (loaderInfo.parameters.leagueid){
ubs.league_id = loaderInfo.parameters.leagueid;
};
re.data = ubs;
ld.load(re, context);
ld.contentLoaderInfo.addEventListener(Event.COMPLETE, tra);
addChild(ld);
}
public function tra(_arg1:Event){
trace("W");
}
}
}//package wrapper_fla