Section 1
//BuggyUpgrade (game.profile.BuggyUpgrade)
package game.profile {
import uk.co.inbox.language.*;
public class BuggyUpgrade {
private var _points:Number;
private var _extraData:Object;
private var _description:String;
private var _typeId:int;// = 0
private var _upgradeId:int;// = 0
private var _ship:String;// = "ship_basic"
private var _buggyId:int;// = 0
private var _name:String;
public static const UPGRADE_LIST:Array = [{id:UPGRADE_EXTENDED_MOVE1, type:TYPE_EXTENDED_MOVE, name:LangStrings.upgradeExtendedMovement1, description:LangStrings.upgradeExtendedMovementDescr1, ship:"ship_extra", points:3, extraData:{extraRange:1}}, {id:UPGRADE_EXTENDED_MINE1, type:TYPE_EXTENDED_MINE, name:LangStrings.upgradeExtendedMining1, description:LangStrings.upgradeExtendedMiningDescr1, ship:"ship_mine", points:5, extraData:{extraRange:1}}, {id:UPGRADE_EXTENDED_PICKUPS1, type:TYPE_EXTENDED_PICKUPS, name:LangStrings.upgradeExtendedPickups1, description:LangStrings.upgradeExtendedPickupsDescr1, ship:"ship_move", points:1, extraData:{extraTurn:1}}, {id:UPGRADE_EXTENDED_MISSILE1, type:TYPE_EXTENDED_MISSILE, name:LangStrings.upgradeExtendedMissile1, description:LangStrings.upgradeExtendedMissileDescr1, ship:"ship_missle", points:6, extraData:{extraRange:1}}, {id:UPGRADE_EXTENDED_KAMIKAZE1, type:TYPE_EXTENDED_KAMIKAZE, name:LangStrings.upgradeExtendedKamikaze1, description:LangStrings.upgradeExtendedKamikazeDescr1, ship:"ship_kami", points:4, extraData:{extraRange:1}}, {id:UPGRADE_EXTENDED_LASER1, type:TYPE_EXTENDED_LASER, name:LangStrings.upgradeExtendedLaser1, description:LangStrings.upgradeExtendedLaserDescr1, ship:"ship_laser", points:2, extraData:{extraDir:1}}];
public static const UPGRADE_EXTENDED_ARM_RANGE1:int = 9;
public static const UPGRADE_NONE:int = 0;
public static const TYPE_NONE:int = 0;
public static const UPGRADE_EXTENDED_MOVE2:int = 2;
public static const DEFAULT_SHIP:String = "ship_basic";
public static const TYPE_EXTENDED_SHIELD:int = 11;
public static const UPGRADE_EXTENDED_MOVE1:int = 1;
public static const UPGRADE_EXTENDED_MISSILE1:int = 5;
public static const UPGRADE_EXTENDED_MISSILE2:int = 6;
public static const UPGRADE_EXTENDED_ARM_RANGE2:int = 10;
public static const TYPE_EXTENDED_PICKUPS:int = 7;
public static const UPGRADE_EXTENDED_KAMIKAZE1:int = 13;
public static const UPGRADE_EXTENDED_KAMIKAZE2:int = 14;
public static const UPGRADE_EXTENDED_SHIELD1:int = 11;
public static const UPGRADE_EXTENDED_SHIELD2:int = 12;
public static const TYPE_EXTENDED_LASER:int = 15;
public static const TYPE_EXTENDED_MOVE:int = 1;
public static const TYPE_EXTENDED_MINE:int = 3;
public static const UPGRADE_EXTENDED_MINE2:int = 4;
public static const UPGRADE_EXTENDED_MINE1:int = 3;
public static const TYPE_EXTENDED_MISSILE:int = 5;
public static const UPGRADE_EXTENDED_LASER1:int = 15;
public static const TYPE_EXTENDED_KAMIKAZE:int = 13;
public static const TYPE_EXTENDED_ARM_RANGE:int = 9;
public static const UPGRADE_EXTENDED_PICKUPS1:int = 7;
public static const UPGRADE_EXTENDED_PICKUPS2:int = 8;
public function BuggyUpgrade(_arg1:int, _arg2:int){
var _local3:int;
_buggyId = 0;
_upgradeId = UPGRADE_NONE;
_typeId = TYPE_NONE;
_ship = DEFAULT_SHIP;
_extraData = {};
super();
_buggyId = _arg1;
_upgradeId = _arg2;
_local3 = 0;
while (_local3 < UPGRADE_LIST.length) {
if (UPGRADE_LIST[_local3].id == _upgradeId){
_name = UPGRADE_LIST[_local3].name;
_typeId = UPGRADE_LIST[_local3].type;
_description = UPGRADE_LIST[_local3].description;
_points = UPGRADE_LIST[_local3].points;
_ship = UPGRADE_LIST[_local3].ship;
_extraData = UPGRADE_LIST[_local3].extraData;
};
_local3++;
};
}
public function get ship():String{
return (_ship);
}
public function get name():String{
return (_name);
}
public function get upgradeId():int{
return (_upgradeId);
}
public function get extraData():Object{
return (_extraData);
}
public function get buggyId():int{
return (_buggyId);
}
public function get points():int{
return (_points);
}
public function get typeId():int{
return (_typeId);
}
public function get description():String{
return (_description);
}
public static function get orderedUpgradeList():Array{
var _local1:Array;
var _local2:Array;
var _local3:int;
_local1 = [];
_local2 = UPGRADE_LIST.sortOn("points", Array.NUMERIC);
_local3 = 0;
while (_local3 < _local2.length) {
_local1.push(new BuggyUpgrade(-1, _local2[_local3].id));
_local3++;
};
return (_local1);
}
public static function getUpgradeById(_arg1:int):BuggyUpgrade{
return (new BuggyUpgrade(-1, _arg1));
}
}
}//package game.profile
Section 2
//CountryRankingEntry (game.profile.CountryRankingEntry)
package game.profile {
public class CountryRankingEntry {
private var _money:Number;
private var _id:int;
private var _code:String;
private var _won:int;
private var _name:String;
private var _played:int;
private var _players:int;
public function CountryRankingEntry(_arg1:int, _arg2:String, _arg3:String, _arg4:Number, _arg5:int, _arg6:int, _arg7:int){
_id = _arg1;
_name = _arg2;
_code = _arg3;
_money = _arg4;
_played = _arg5;
_won = _arg6;
_players = _arg7;
}
public function get money():Number{
return (_money);
}
public function get name():String{
return (_name);
}
public function get played():int{
return (_played);
}
public function get won():int{
return (_won);
}
public function get id():int{
return (_id);
}
public function get code():String{
return (_code);
}
public function get players():int{
return (_players);
}
}
}//package game.profile
Section 3
//GlobalRankingEntry (game.profile.GlobalRankingEntry)
package game.profile {
public class GlobalRankingEntry {
private var _age:int;
private var _money:Number;
private var _country:String;
private var _won:int;
private var _gender:String;
private var _name:String;
private var _played:int;
private var _id:int;
public function GlobalRankingEntry(_arg1:int, _arg2:String, _arg3:String, _arg4:Number, _arg5:int, _arg6:int, _arg7:int, _arg8:String){
_id = _arg1;
_name = _arg2;
_country = _arg3;
_money = _arg4;
_played = _arg5;
_won = _arg6;
_age = _arg7;
_gender = _arg8;
}
public function get money():Number{
return (_money);
}
public function get name():String{
return (_name);
}
public function get gender():String{
return (_gender);
}
public function get played():int{
return (_played);
}
public function get country():String{
return (_country);
}
public function get id():int{
return (_id);
}
public function get won():int{
return (_won);
}
public function get age():int{
return (_age);
}
}
}//package game.profile
Section 4
//Level (game.profile.Level)
package game.profile {
import uk.co.inbox.language.*;
import uk.co.inbox.utils.*;
public class Level {
private var _points:Number;// = 0
private var _minimumMoney:Number;// = 0
private var _id:int;// = 0
public function Level(_arg1:int, _arg2:Number, _arg3:Number){
_id = 0;
_minimumMoney = 0;
_points = 0;
super();
_id = _arg1;
_minimumMoney = _arg2;
_points = _arg3;
}
public function get points():Number{
return (_points);
}
public function get minimumMoneyLabel():String{
return (MathTools.formatNumber(_minimumMoney, ","));
}
public function get titleId():String{
return (LangStrings[("levelTitle" + _id)]);
}
public function get minimumMoney():Number{
return (_minimumMoney);
}
public function get id():int{
return (_id);
}
}
}//package game.profile
Section 5
//Levels (game.profile.Levels)
package game.profile {
public class Levels {
private static var levelList:Array = [];
public static function setLevelList(_arg1:String):void{
var _local2:Array;
var _local3:int;
var _local4:Array;
var _local5:Level;
levelList = [];
_local2 = _arg1.split(",");
_local3 = 0;
while (_local3 < _local2.length) {
_local4 = _local2[_local3].split("*");
_local5 = new Level((_local3 + 1), _local4[0], Number(_local4[1]));
levelList.push(_local5);
_local3++;
};
}
public static function getCurrentLevel(_arg1:Number):Level{
var _local2:int;
var _local3:Boolean;
var _local4:Level;
_local2 = 0;
_local3 = false;
while (((!(_local3)) && ((_local2 < levelList.length)))) {
_local4 = levelList[_local2];
if (_local4.minimumMoney > _arg1){
return (levelList[(_local2 - 1)]);
};
_local2++;
};
if (levelList.length > 0){
return (levelList[(levelList.length - 1)]);
};
return (new Level(0, 0, 0));
}
public static function setDefaultLevelList():void{
}
public static function getNextLevel(_arg1:Number):Level{
var _local2:int;
var _local3:Boolean;
var _local4:Level;
_local2 = 0;
_local3 = false;
while (((!(_local3)) && ((_local2 < levelList.length)))) {
_local4 = levelList[_local2];
if (_local4.minimumMoney > _arg1){
return (levelList[_local2]);
};
_local2++;
};
if (levelList.length > 0){
if (_arg1 > 0){
return (null);
};
return (levelList[(levelList.length - 1)]);
//unresolved jump
};
return (new Level(0, 0, 0));
}
}
}//package game.profile
Section 6
//Match (game.profile.Match)
package game.profile {
public class Match {
private var _datePlayed:Date;
private var _moves:String;
private var _heliumTotal:Number;
private var _pos:int;
private var _gameVersion:String;// = ""
private var _areaName:String;
private var _moneyEarned:Number;
private var _heliumDepleted:Number;
private var _heliumDistribution:String;// = ""
private var _moonscape:Number;
private var _moneySpent:Number;
private var _heliumDensity:Number;
private var _id:int;
public function Match(_arg1:int, _arg2:int=0, _arg3:String="", _arg4:Date=null, _arg5:Number=0, _arg6:Number=0){
_heliumDistribution = "";
_gameVersion = "";
super();
_id = _arg1;
_pos = _arg2;
_datePlayed = _arg4;
_areaName = _arg3;
_moneySpent = _arg5;
_moneyEarned = _arg6;
}
public function get moves():String{
return (_moves);
}
public function get gameVersion():String{
return (_gameVersion);
}
public function get datePlayedStr():String{
return (((((((_datePlayed.fullYear + "-") + (((_datePlayed.month + 1) < 10)) ? ("0" + (_datePlayed.month + 1)) : (_datePlayed.month + 1)) + "-") + ((_datePlayed.date < 10)) ? ("0" + _datePlayed.date) : _datePlayed.date) + " ") + _datePlayed.toTimeString().slice(0, 8)));
}
public function get pos():int{
return (_pos);
}
public function get id():int{
return (_id);
}
public function get moneyEarned():Number{
return (_moneyEarned);
}
public function populateData(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:String, _arg6:Number, _arg7:String, _arg8:String):void{
trace("Match.populateData");
trace((" $areaName:" + _arg1));
trace((" $heliumDensity:" + _arg2));
trace((" $heliumTotal:" + _arg3));
trace((" $heliumDepleted:" + _arg4));
trace((" $moves:" + _arg5));
trace((" $moonscape:" + _arg6));
trace((" $heliumDistribution:" + _arg7));
trace((" $gameVersion:" + _arg8));
_areaName = _arg1;
_heliumDensity = _arg2;
_heliumTotal = _arg3;
_heliumDepleted = _arg4;
_moves = _arg5;
_moonscape = _arg6;
_heliumDistribution = _arg7;
_gameVersion = _arg8;
}
public function get moneySpent():Number{
return (_moneySpent);
}
public function get datePlayed():Date{
return (_datePlayed);
}
public function get heliumDistribution():String{
return (_heliumDistribution);
}
public function get posStr():String{
switch (_pos){
case 1:
return ("positionFirst");
case 2:
return ("positionSecond");
case 3:
return ("positionThird");
case 4:
return ("positionFourth");
default:
return ("positionBlank");
};
}
public function get areaName():String{
return (_areaName);
}
}
}//package game.profile
Section 7
//MatchManager (game.profile.MatchManager)
package game.profile {
public class MatchManager {
private static var _matchList:Array = [];
public static function getMatchById(_arg1:int):Match{
var _local2:int;
var _local3:Match;
_local2 = 0;
while (_local2 < _matchList.length) {
_local3 = _matchList[_local2];
if (_local3.id == _arg1){
return (_local3);
};
_local2++;
};
return (null);
}
public static function populateMatchData(_arg1:int, _arg2:String, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:String, _arg7:Number, _arg8:String, _arg9:String):void{
var _local10:int;
var _local11:Match;
var _local12:Match;
_local10 = 0;
while (_local10 < _matchList.length) {
_local12 = _matchList[_local10];
if (_local12.id == _arg1){
_local12.populateData(_arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9);
return;
};
_local10++;
};
_local11 = new Match(_arg1);
_local11.populateData(_arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9);
_matchList.push(_local11);
}
}
}//package game.profile
Section 8
//Profile (game.profile.Profile)
package game.profile {
import flash.events.*;
import uk.co.inbox.tracking.*;
import uk.co.inbox.utils.*;
import game.*;
public class Profile extends EventDispatcher {
public static const LOG_OUT:String = "logOut";
public static const UPDATED:String = "updated";
public static const GUEST_PASS:String = "D1sc_guest";
public static const LEVEL_DOWN:int = -1;
public static const UPDATING:String = "updating";
public static const LEVEL_UP:int = 1;
public static const MAX_USERNAME_LENGTH:int = 14;
private static var _guestName:String = "";
private static var _rank:int;
private static var _levelChange:int = 0;
private static var _isGuest:Boolean = true;
private static var _matchList:Array = [];
private static var _email:String = "";
protected static var disp:EventDispatcher;
private static var _username:String = "";
private static var _age:int;
private static var _money:Number = 0;
private static var _buggyPreviousUpgradeDataList:Array = [];
private static var _country:String;
private static var _won:int;
private static var _gender:String = "";
private static var _userId:int = -1;
private static var _played:int;
private static var _buggyUpgradeList:Array = [];
public static function checkBuggyUpgradeExists(_arg1:int):Boolean{
var _local2:int;
var _local3:BuggyUpgrade;
_local2 = 0;
while (_local2 < _buggyUpgradeList.length) {
_local3 = _buggyUpgradeList[_local2];
if (_local3.buggyId == _arg1){
return (true);
};
_local2++;
};
return (false);
}
public static function getBuggyUpgradeListById(_arg1:int):Array{
var _local2:Array;
var _local3:int;
var _local4:BuggyUpgrade;
_local2 = [];
_local3 = 0;
while (_local3 < _buggyUpgradeList.length) {
_local4 = _buggyUpgradeList[_local3];
if (_local4.buggyId == _arg1){
_local2.push(_local4);
};
_local3++;
};
return (_local2);
}
public static function get age():int{
return (_age);
}
public static function logout():void{
_userId = -1;
_username = "";
_isGuest = true;
InboxTag.callTag(InboxTagData.LOG_OUT);
dispatchEvent(new Event(LOG_OUT));
dispatchEvent(new Event(UPDATED));
}
public static function init():void{
_username = CustomSharedObject.get("profileUsername", "");
_guestName = CustomSharedObject.get("profileGuestName", "");
}
public static function get isLoggedIn():Boolean{
return (((!((_userId == -1))) && (!(_isGuest))));
}
public static function get currentLevel():Level{
return (Levels.getCurrentLevel(_money));
}
public static function get buggyUpgradeList():Array{
return (_buggyUpgradeList.slice());
}
public static function get upgradePoints():Number{
return (Levels.getCurrentLevel(_money).points);
}
public static function populateMatchesPlayed(_arg1:Array):void{
_matchList = _arg1.slice();
}
public static function get country():String{
return (_country);
}
public static function get buggyUpgradeStr():String{
var _local1:String;
var _local2:int;
var _local3:BuggyUpgrade;
_local1 = "";
_local2 = 0;
while (_local2 < _buggyUpgradeList.length) {
_local3 = _buggyUpgradeList[_local2];
_local1 = (_local1 + (((_local3.buggyId + ",") + _local3.upgradeId) + "|"));
_local2++;
};
if (_local1.length > 0){
_local1 = _local1.slice(0, -1);
};
return (_local1);
}
public static function incrementPlayed(_arg1:Number, _arg2:Boolean=false):void{
var _local3:int;
var _local4:int;
_local3 = currentLevel.id;
_money = (_money + _arg1);
if (_money < 0){
_money = 0;
};
_played++;
if (_arg2){
_won++;
};
_local4 = currentLevel.id;
_levelChange = 0;
trace((((" newLevel:" + _local4) + ", oldLevel:") + _local3));
if (_local4 > _local3){
_levelChange = LEVEL_UP;
} else {
if (_local4 < _local3){
_levelChange = LEVEL_DOWN;
};
};
dispatchEvent(new Event(UPDATED));
}
public static function get email():String{
return (_email);
}
public static function get guestName():String{
return (_guestName);
}
public static function set username(_arg1:String):void{
_username = _arg1.slice(0, MAX_USERNAME_LENGTH);
CustomSharedObject.set({profileUsername:_username});
}
public static function get availablePoints():Number{
var _local1:Number;
var _local2:int;
var _local3:BuggyUpgrade;
_local1 = 0;
_local2 = 0;
while (_local2 < _buggyUpgradeList.length) {
_local3 = _buggyUpgradeList[_local2];
_local1 = (_local1 + _local3.points);
_local2++;
};
return ((upgradePoints - _local1));
}
public static function get rank():Number{
return (_rank);
}
public static function get won():int{
return (_won);
}
public static function setGuestName(_arg1:String):void{
_guestName = _arg1;
CustomSharedObject.set({profileGuestName:_guestName});
}
public static function update(_arg1:int, _arg2:Number):void{
_rank = _arg1;
_money = _arg2;
dispatchEvent(new Event(UPDATED));
}
public static function get money():Number{
return (_money);
}
public static function get gender():String{
return (_gender);
}
public static function get nextLevel():Level{
return (Levels.getNextLevel(_money));
}
public static function get played():int{
return (_played);
}
public static function get levelChange():int{
return (_levelChange);
}
public static function updating():void{
dispatchEvent(new Event(UPDATING));
}
public static function setBuggyUpgrade(_arg1:int, _arg2:int):void{
var _local3:Boolean;
var _local4:int;
var _local5:BuggyUpgrade;
_local3 = false;
_local4 = 0;
while (_local4 < _buggyUpgradeList.length) {
_local5 = _buggyUpgradeList[_local4];
if (_local5.buggyId == _arg1){
_buggyUpgradeList[_local4] = new BuggyUpgrade(_arg1, _arg2);
break;
};
_local4++;
};
if (!_local3){
_buggyUpgradeList.push(new BuggyUpgrade(_arg1, _arg2));
};
}
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 get username():String{
return (_username);
}
public static function dispatchEvent(... _args):void{
if (disp == null){
return;
};
disp.dispatchEvent.apply(null, _args);
}
public static function populate(_arg1:int, _arg2:String, _arg3:String, _arg4:String, _arg5:int, _arg6:String, _arg7:String, _arg8:Number, _arg9:int, _arg10:int, _arg11:int):void{
var _local12:Array;
var _local13:int;
var _local14:Array;
var _local15:BuggyUpgrade;
_isGuest = false;
_userId = _arg1;
username = _arg2;
_email = _arg3;
_country = _arg4;
_age = _arg5;
_gender = _arg6;
_buggyUpgradeList = [];
if (_arg7 != ""){
_local12 = _arg7.split("|");
_local13 = 0;
while (_local13 < _local12.length) {
_local14 = _local12[_local13].split(",");
_local15 = new BuggyUpgrade(int(_local14[0]), int(_local14[1]));
_buggyUpgradeList.push(_local15);
_local13++;
};
};
_money = _arg8;
_played = _arg9;
_won = _arg10;
_rank = _arg11;
dispatchEvent(new Event(UPDATED));
DataCapture.getMyProfile();
}
public static function get matchList():Array{
return (_matchList.slice());
}
public static function checkBuggyUpgradeByBuggy(_arg1:int, _arg2:int):Boolean{
var _local3:Boolean;
var _local4:int;
var _local5:BuggyUpgrade;
_local3 = false;
_local4 = 0;
while (_local4 < _buggyUpgradeList.length) {
_local5 = _buggyUpgradeList[_local4];
if (_local5.buggyId == _arg1){
if (_local5.upgradeId == _arg2){
_local3 = true;
break;
};
};
_local4++;
};
return (_local3);
}
public static function removeBuggyUpgrade(_arg1:int, _arg2:int):void{
var _local3:Boolean;
var _local4:int;
var _local5:BuggyUpgrade;
_local3 = false;
_local4 = 0;
while (_local4 < _buggyUpgradeList.length) {
_local5 = _buggyUpgradeList[_local4];
if (_local5.buggyId == _arg1){
if (_local5.upgradeId == _arg2){
_buggyUpgradeList.splice(_local4, 1);
return;
};
};
_local4++;
};
}
public static function removeAllUpgrades():void{
_buggyUpgradeList = [];
}
public static function populateAsGuest(_arg1:int, _arg2:String):void{
_isGuest = true;
_userId = 0;
username = _arg2;
dispatchEvent(new Event(UPDATED));
}
public static function get userId():int{
return (_userId);
}
}
}//package game.profile
Section 9
//Rankings (game.profile.Rankings)
package game.profile {
public class Rankings {
private static var _globalLastUpdated:Date;
public static var isGlobalChanged:Boolean = false;
private static var _totalPlayers:int = 0;
private static var _countryRankingsList:Array = [];
private static var _countryLastUpdated:Date;
private static var _globalRankingsList:Array = [];
public static function set countryLastUpdated(_arg1:Date):void{
_countryLastUpdated = _arg1;
}
public static function set countryRankingsList(_arg1:Array):void{
_countryRankingsList = _arg1.slice();
}
public static function set globalRankingsList(_arg1:Array):void{
_globalRankingsList = _arg1.slice();
}
public static function get globalLastUpdated():Date{
return (_globalLastUpdated);
}
public static function get totalPlayers():int{
return (_totalPlayers);
}
public static function get countryRankingsList():Array{
return (_countryRankingsList.slice());
}
public static function set globalLastUpdated(_arg1:Date):void{
isGlobalChanged = !((_globalLastUpdated == _arg1));
_globalLastUpdated = _arg1;
}
public static function set totalPlayers(_arg1:int):void{
_totalPlayers = _arg1;
}
public static function get countryLastUpdated():Date{
return (_countryLastUpdated);
}
public static function get globalRankingsList():Array{
return (_globalRankingsList.slice());
}
}
}//package game.profile
Section 10
//DataCapture (game.DataCapture)
package game {
import flash.events.*;
import game.profile.*;
import flash.utils.*;
import uk.co.inbox.language.*;
import uk.co.inbox.utils.*;
import nl.demonsters.debugger.*;
import flash.net.*;
public class DataCapture extends EventDispatcher {
public static const MYPROFILE_SUCCESS:String = "myProfileSuccess";
public static const COUNTRYRANKINGS_SUCCESS:String = "countryRankingsSuccess";
public static const REGISTER_FIELD_EMAIL:String = "email";
public static const UPDATEPROFILE_SUCCESS:String = "updateProfileSuccess";
public static const REGISTER_SUCCESS:String = "registerSuccess";
public static const MOONSTATE_FAILURE:String = "moonStateFailure";
public static const GLOBALRANKINGS_SUCCESS:String = "globalRankingsSuccess";
public static const GAMESPLAYED_SUCCESS:String = "gamesPlayedSuccess";
public static const GAMEINFO_SUCCESS:String = "gameInfoSuccess";
public static const LOGIN_FAILURE:String = "loginFailure";
public static const COUNTRYRANKINGS_FAILURE:String = "countryRankingsFailure";
public static const MYPROFILE_FAILURE:String = "myProfileFailure";
public static const MOONSTATE_SUCCESS:String = "moonStateSuccess";
public static const COUNTRY_LIST:Array = [{code:"FR", name:"FRANCE"}, {code:"DE", name:"GERMANY"}, {code:"IT", name:"ITALY"}, {code:"ES", name:"SPAIN"}, {code:"GB", name:"UNITED KINGDOM"}, {code:"US", name:"UNITED STATES"}, {code:"AF", name:"AFGHANISTAN"}, {code:"AL", name:"ALBANIA"}, {code:"DZ", name:"ALGERIA"}, {code:"AS", name:"AMERICAN SAMOA"}, {code:"AD", name:"ANDORRA"}, {code:"AI", name:"ANGUILLA"}, {code:"AG", name:"ANTIGUA AND BARBUDA"}, {code:"AR", name:"ARGENTINA"}, {code:"AM", name:"ARMENIA"}, {code:"AW", name:"ARUBA"}, {code:"AU", name:"AUSTRALIA"}, {code:"AT", name:"AUSTRIA"}, {code:"AZ", name:"AZERBAIJAN"}, {code:"BS", name:"BAHAMAS"}, {code:"BH", name:"BAHRAIN"}, {code:"BD", name:"BANGLADESH"}, {code:"BB", name:"BARBADOS"}, {code:"BY", name:"BELARUS"}, {code:"BE", name:"BELGIUM"}, {code:"BZ", name:"BELIZE"}, {code:"BJ", name:"BENIN"}, {code:"BM", name:"BERMUDA"}, {code:"BT", name:"BHUTAN"}, {code:"BO", name:"BOLIVIA"}, {code:"BA", name:"BOSNIA AND HERZEGOVINA"}, {code:"BW", name:"BOTSWANA"}, {code:"BR", name:"BRAZIL"}, {code:"IO", name:"BRITISH INDIAN OCEAN TERRITORY"}, {code:"BN", name:"BRUNEI DARUSSALAM"}, {code:"BG", name:"BULGARIA"}, {code:"BF", name:"BURKINA FASO"}, {code:"BI", name:"BURUNDI"}, {code:"KH", name:"CAMBODIA"}, {code:"CM", name:"CAMEROON"}, {code:"CA", name:"CANADA"}, {code:"CV", name:"CAPE VERDE"}, {code:"KY", name:"CAYMAN ISLANDS"}, {code:"CF", name:"CENTRAL AFRICAN REPUBLIC"}, {code:"TD", name:"CHAD"}, {code:"CL", name:"CHILE"}, {code:"CN", name:"CHINA"}, {code:"CX", name:"CHRISTMAS ISLAND"}, {code:"CO", name:"COLOMBIA"}, {code:"KM", name:"COMOROS"}, {code:"CK", name:"COOK ISLANDS"}, {code:"CR", name:"COSTA RICA"}, {code:"CI", name:"COTE D IVOIRE"}, {code:"HR", name:"CROATIA"}, {code:"CU", name:"CUBA"}, {code:"CY", name:"CYPRUS"}, {code:"CZ", name:"CZECH REPUBLIC"}, {code:"DK", name:"DENMARK"}, {code:"DJ", name:"DJIBOUTI"}, {code:"DM", name:"DOMINICA"}, {code:"DO", name:"DOMINICAN REPUBLIC"}, {code:"TP", name:"EAST TIMOR"}, {code:"EC", name:"ECUADOR"}, {code:"EG", name:"EGYPT"}, {code:"SV", name:"EL SALVADOR"}, {code:"GQ", name:"EQUATORIAL GUINEA"}, {code:"ER", name:"ERITREA"}, {code:"EE", name:"ESTONIA"}, {code:"ET", name:"ETHIOPIA"}, {code:"FK", name:"FALKLAND ISLANDS (MALVINAS)"}, {code:"FO", name:"FAROE ISLANDS"}, {code:"FJ", name:"FIJI"}, {code:"FI", name:"FINLAND"}, {code:"GF", name:"FRENCH GUIANA"}, {code:"PF", name:"FRENCH POLYNESIA"}, {code:"TF", name:"FRENCH SOUTHERN TERRITORIES"}, {code:"GA", name:"GABON"}, {code:"GM", name:"GAMBIA"}, {code:"GE", name:"GEORGIA"}, {code:"GH", name:"GHANA"}, {code:"GI", name:"GIBRALTAR"}, {code:"GR", name:"GREECE"}, {code:"GL", name:"GREENLAND"}, {code:"GD", name:"GRENADA"}, {code:"GP", name:"GUADELOUPE"}, {code:"GU", name:"GUAM"}, {code:"GT", name:"GUATEMALA"}, {code:"GN", name:"GUINEA"}, {code:"GW", name:"GUINEA-BISSAU"}, {code:"GY", name:"GUYANA"}, {code:"HT", name:"HAITI"}, {code:"VA", name:"HOLY SEE (VATICAN CITY STATE)"}, {code:"HN", name:"HONDURAS"}, {code:"HK", name:"HONG KONG"}, {code:"HU", name:"HUNGARY"}, {code:"IS", name:"ICELAND"}, {code:"IN", name:"INDIA"}, {code:"ID", name:"INDONESIA"}, {code:"IR", name:"IRAN, ISLAMIC REPUBLIC OF"}, {code:"IQ", name:"IRAQ"}, {code:"IE", name:"IRELAND"}, {code:"IL", name:"ISRAEL"}, {code:"JM", name:"JAMAICA"}, {code:"JP", name:"JAPAN"}, {code:"JO", name:"JORDAN"}, {code:"KZ", name:"KAZAKSTAN"}, {code:"KE", name:"KENYA"}, {code:"KI", name:"KIRIBATI"}, {code:"KP", name:"KOREA DEMOCRATIC PEOPLES REPUBLIC OF"}, {code:"KR", name:"KOREA REPUBLIC OF"}, {code:"KW", name:"KUWAIT"}, {code:"KG", name:"KYRGYZSTAN"}, {code:"LA", name:"LAO PEOPLES DEMOCRATIC REPUBLIC"}, {code:"LV", name:"LATVIA"}, {code:"LB", name:"LEBANON"}, {code:"LR", name:"LIBERIA"}, {code:"LY", name:"LIBYAN ARAB JAMAHIRIYA"}, {code:"LI", name:"LIECHTENSTEIN"}, {code:"LT", name:"LITHUANIA"}, {code:"LU", name:"LUXEMBOURG"}, {code:"MO", name:"MACAU"}, {code:"MK", name:"MACEDONIA, THE FORMER YUGOSLAV REPUBLIC OF"}, {code:"MG", name:"MADAGASCAR"}, {code:"MW", name:"MALAWI"}, {code:"MY", name:"MALAYSIA"}, {code:"MV", name:"MALDIVES"}, {code:"ML", name:"MALI"}, {code:"MT", name:"MALTA"}, {code:"MH", name:"MARSHALL ISLANDS"}, {code:"MQ", name:"MARTINIQUE"}, {code:"MR", name:"MAURITANIA"}, {code:"MU", name:"MAURITIUS"}, {code:"YT", name:"MAYOTTE"}, {code:"MX", name:"MEXICO"}, {code:"FM", name:"MICRONESIA, FEDERATED STATES OF"}, {code:"MD", name:"MOLDOVA, REPUBLIC OF"}, {code:"MC", name:"MONACO"}, {code:"MN", name:"MONGOLIA"}, {code:"MS", name:"MONTSERRAT"}, {code:"MA", name:"MOROCCO"}, {code:"MZ", name:"MOZAMBIQUE"}, {code:"MM", name:"MYANMAR"}, {code:"NA", name:"NAMIBIA"}, {code:"NR", name:"NAURU"}, {code:"NP", name:"NEPAL"}, {code:"NL", name:"NETHERLANDS"}, {code:"AN", name:"NETHERLANDS ANTILLES"}, {code:"NC", name:"NEW CALEDONIA"}, {code:"NZ", name:"NEW ZEALAND"}, {code:"NI", name:"NICARAGUA"}, {code:"NE", name:"NIGER"}, {code:"NG", name:"NIGERIA"}, {code:"NU", name:"NIUE"}, {code:"NF", name:"NORFOLK ISLAND"}, {code:"MP", name:"NORTHERN MARIANA ISLANDS"}, {code:"NO", name:"NORWAY"}, {code:"OM", name:"OMAN"}, {code:"PK", name:"PAKISTAN"}, {code:"PW", name:"PALAU"}, {code:"PS", name:"PALESTINIAN TERRITORY, OCCUPIED"}, {code:"PA", name:"PANAMA"}, {code:"PG", name:"PAPUA NEW GUINEA"}, {code:"PY", name:"PARAGUAY"}, {code:"PE", name:"PERU"}, {code:"PH", name:"PHILIPPINES"}, {code:"PN", name:"PITCAIRN"}, {code:"PL", name:"POLAND"}, {code:"PT", name:"PORTUGAL"}, {code:"PR", name:"PUERTO RICO"}, {code:"QA", name:"QATAR"}, {code:"RO", name:"ROMANIA"}, {code:"RU", name:"RUSSIAN FEDERATION"}, {code:"RW", name:"RWANDA"}, {code:"SH", name:"SAINT HELENA"}, {code:"KN", name:"SAINT KITTS AND NEVIS"}, {code:"LC", name:"SAINT LUCIA"}, {code:"VC", name:"SAINT VINCENT AND THE GRENADINES"}, {code:"WS", name:"SAMOA"}, {code:"SM", name:"SAN MARINO"}, {code:"ST", name:"SAO TOME AND PRINCIPE"}, {code:"SA", name:"SAUDI ARABIA"}, {code:"SN", name:"SENEGAL"}, {code:"SC", name:"SEYCHELLES"}, {code:"SL", name:"SIERRA LEONE"}, {code:"SG", name:"SINGAPORE"}, {code:"SK", name:"SLOVAKIA"}, {code:"SI", name:"SLOVENIA"}, {code:"SB", name:"SOLOMON ISLANDS"}, {code:"SO", name:"SOMALIA"}, {code:"ZA", name:"SOUTH AFRICA"}, {code:"GS", name:"SOUTH GEORGIA AND THE SOUTH SANDWICH ISLANDS"}, {code:"LK", name:"SRI LANKA"}, {code:"SD", name:"SUDAN"}, {code:"SR", name:"SURINAME"}, {code:"SZ", name:"SWAZILAND"}, {code:"SE", name:"SWEDEN"}, {code:"CH", name:"SWITZERLAND"}, {code:"SY", name:"SYRIAN ARAB REPUBLIC"}, {code:"TW", name:"TAIWAN"}, {code:"TJ", name:"TAJIKISTAN"}, {code:"TZ", name:"TANZANIA, UNITED REPUBLIC OF"}, {code:"TH", name:"THAILAND"}, {code:"TG", name:"TOGO"}, {code:"TO", name:"TONGA"}, {code:"TT", name:"TRINIDAD AND TOBAGO"}, {code:"TN", name:"TUNISIA"}, {code:"TR", name:"TURKEY"}, {code:"TM", name:"TURKMENISTAN"}, {code:"TC", name:"TURKS AND CAICOS ISLANDS"}, {code:"UG", name:"UGANDA"}, {code:"UA", name:"UKRAINE"}, {code:"AE", name:"UNITED ARAB EMIRATES"}, {code:"UM", name:"UNITED STATES MINOR OUTLYING ISLANDS"}, {code:"UY", name:"URUGUAY"}, {code:"UZ", name:"UZBEKISTAN"}, {code:"VU", name:"VANUATU"}, {code:"VE", name:"VENEZUELA"}, {code:"VN", name:"VIETNAM"}, {code:"VG", name:"VIRGIN ISLANDS, BRITISH"}, {code:"VI", name:"VIRGIN ISLANDS, U.S."}, {code:"YE", name:"YEMEN"}, {code:"ZM", name:"ZAMBIA"}, {code:"ZW", name:"ZIMBABWE"}];
public static const UPDATEPROFILE_FAILURE:String = "updateProfileFailure";
public static const REGISTER_FAILURE:String = "registerFailure";
public static const GLOBALRANKINGS_FAILURE:String = "globalRankingsFailure";
public static const GAMESPLAYED_FAILURE:String = "gamesPlayedFailure";
public static const AGE_START:int = 14;
public static const REGISTER_FIELD_NAME:String = "name";
public static const LOGIN_SUCCESS:String = "loginSuccess";
public static const AGE_FINISH:int = 70;
public static const GAMEINFO_FAILURE:String = "gameInfoFailure";
private static var isGamesPlayedLoaded:Boolean = false;
private static var gamesPlayedLoader:URLLoader;
public static var returnMessageId:String;
private static var gameInfoXML:XML;
private static var isUpdateProfileLoaded:Boolean = false;
private static var isRegisterLoaded:Boolean = false;
private static var isLoginLoaded:Boolean = false;
public static var countryList:Array = [];
private static var updateProfileXML:XML;
private static var registerTimer:Timer;
private static var loginTimer:Timer;
private static var gameInfoTimer:Timer;
private static var registerXML:XML;
private static var MINIMUM_LOAD_TIME:Number = 1000;
private static var gamesPlayedXML:XML;
private static var updateProfileTimer:Timer;
public static var returnMessageField:String;
private static var isDebugMode:Boolean = false;
private static var registerLoader:URLLoader;
protected static var disp:EventDispatcher;
private static var isGameInfoLoaded:Boolean = false;
private static var gamesPlayedTimer:Timer;
private static var updateProfileLoader:URLLoader;
private static var loginLoader:URLLoader;
private static var loginXML:XML;
private static var gameInfoLoader:URLLoader;
private static function returnGameInfoSuccess(_arg1:Event):void{
var _local2:URLLoader;
trace("returnGameInfoSuccess");
isGameInfoLoaded = true;
gameInfoLoader.removeEventListener(Event.COMPLETE, returnGameInfoSuccess);
gameInfoLoader.removeEventListener(IOErrorEvent.IO_ERROR, returnGameInfoFailure);
_local2 = URLLoader(_arg1.target);
gameInfoXML = XML(_local2.data);
trace((" gameInfoXML:" + gameInfoXML));
if (gameInfoTimer.currentCount == 1){
processGameInfoSuccess();
};
}
public static function getTicker():void{
var _local1:URLRequest;
var _local2:URLVariables;
var _local3:Date;
var _local4:URLLoader;
_local1 = new URLRequest(Settings.get("countryRankingsXML"));
_local2 = new URLVariables();
_local3 = new Date();
_local2.rnd = _local3.getTime();
_local1.data = _local2;
_local1.method = URLRequestMethod.GET;
_local4 = new URLLoader(_local1);
_local4.addEventListener(Event.COMPLETE, returnTickerSuccess, false, 0, true);
}
private static function onGamesPlayedTimerComplete(_arg1:TimerEvent):void{
if (isGamesPlayedLoaded){
processGamesPlayedSuccess();
};
}
private static function returnGlobalRankingsSuccess(_arg1:Event):void{
var _local2:URLLoader;
var _local3:XML;
var _local4:Array;
var _local5:int;
var _local6:XML;
_local2 = URLLoader(_arg1.target);
_local3 = XML(_local2.data);
_local4 = [];
_local5 = 1;
for each (_local6 in _local3.*) {
_local4.push(new GlobalRankingEntry(_local5, _local6.screenname, _local6.country, Number(_local6.money), int(_local6.played), int(_local6.won), int(_local6.age), _local6.gender));
};
Rankings.globalLastUpdated = new Date(Number((_local3.@timestamp + "000")));
Rankings.totalPlayers = Number(_local3.@totalplayers);
Rankings.globalRankingsList = _local4;
dispatchEvent(new Event(GLOBALRANKINGS_SUCCESS));
}
private static function returnUpdateProfileFailure(_arg1:IOErrorEvent=null):void{
updateProfileLoader.removeEventListener(Event.COMPLETE, returnUpdateProfileSuccess);
updateProfileLoader.removeEventListener(IOErrorEvent.IO_ERROR, returnUpdateProfileFailure);
returnMessageId = getText(LangStrings.profileUpdateErrorGeneral);
dispatchEvent(new Event(UPDATEPROFILE_FAILURE));
}
private static function onRegisterTimerComplete(_arg1:TimerEvent):void{
if (isRegisterLoaded){
processRegisterSuccess();
};
}
private static function onUpdateProfileTimerComplete(_arg1:TimerEvent):void{
if (isUpdateProfileLoaded){
processUpdateProfileSuccess();
};
}
private static function onGameInfoTimerComplete(_arg1:TimerEvent):void{
if (isGameInfoLoaded){
processGameInfoSuccess();
};
}
private static function returnCountryRankingsSuccess(_arg1:Event):void{
var _local2:URLLoader;
var _local3:XML;
var _local4:Array;
var _local5:int;
var _local6:XML;
debugTrace("returnCountryRankingsSuccess");
_local2 = URLLoader(_arg1.target);
_local3 = XML(_local2.data);
_local4 = [];
_local5 = 1;
for each (_local6 in _local3.*) {
debugTrace(("countryInfo:" + _local6));
_local4.push(new CountryRankingEntry(_local5, getCountryNameByCode(_local6.country), _local6.country, _local6.totalmoney, _local6.totalplayed, _local6.totalwon, _local6.totalplayers));
};
Rankings.countryLastUpdated = new Date(Number((_local3.@timestamp + "000")));
Rankings.countryRankingsList = _local4;
dispatchEvent(new Event(COUNTRYRANKINGS_SUCCESS));
}
private static function returnMoonStateSuccess(_arg1:Event):void{
var _local2:URLLoader;
var _local3:XML;
var _local4:Number;
debugTrace("returnMoonStateSuccess");
_local2 = URLLoader(_arg1.target);
_local3 = XML(_local2.data);
_local4 = ((_local3.areas_played / _local3.total_areas) * 100);
trace((" perDepleted:" + _local4));
Settings.set({percentHeliumDepleted:MathTools.roundDecimal(_local4, 4)});
dispatchEvent(new Event(MOONSTATE_SUCCESS));
}
private static function returnRegisterFailure(_arg1:IOErrorEvent):void{
registerLoader.removeEventListener(Event.COMPLETE, returnRegisterSuccess);
registerLoader.removeEventListener(IOErrorEvent.IO_ERROR, returnRegisterFailure);
returnMessageId = getText(LangStrings.registerErrorGeneral);
dispatchEvent(new Event(REGISTER_FAILURE));
}
private static function returnLoginFailure(_arg1:IOErrorEvent):void{
loginLoader.removeEventListener(Event.COMPLETE, returnLoginSuccess);
loginLoader.removeEventListener(IOErrorEvent.IO_ERROR, returnLoginFailure);
returnMessageId = getText(LangStrings.loginErrorGeneral);
dispatchEvent(new Event(LOGIN_FAILURE));
}
public static function getGameInfo(_arg1:int):void{
var _local2:URLRequest;
var _local3:URLVariables;
var _local4:Date;
trace("getGameInfo");
_local2 = new URLRequest(Settings.get("getGameInfoURL"));
_local3 = new URLVariables();
_local4 = new Date();
_local3.rnd = _local4.getTime();
_local3.area = _arg1;
_local2.data = _local3;
_local2.method = URLRequestMethod.POST;
isGameInfoLoaded = false;
gameInfoLoader = new URLLoader();
gameInfoLoader.addEventListener(Event.COMPLETE, returnGameInfoSuccess, false, 0, true);
gameInfoLoader.addEventListener(IOErrorEvent.IO_ERROR, returnGameInfoFailure, false, 0, true);
if (gameInfoTimer == null){
gameInfoTimer = new Timer(MINIMUM_LOAD_TIME, 1);
gameInfoTimer.addEventListener(TimerEvent.TIMER_COMPLETE, onGameInfoTimerComplete, false, 0, true);
};
gameInfoTimer.reset();
gameInfoTimer.start();
gameInfoLoader.load(_local2);
}
private static function returnMyProfileSuccess(_arg1:Event):void{
var _local2:URLLoader;
var _local3:XML;
trace("returnMyProfileSuccess");
_local2 = URLLoader(_arg1.target);
_local3 = XML(_local2.data);
Profile.update(int(_local3.global_rank), Number(_local3.money));
dispatchEvent(new Event(MYPROFILE_SUCCESS));
}
private static function processGamesPlayedSuccess():void{
var _local1:Array;
var _local2:int;
var _local3:XML;
_local1 = [];
_local2 = 1;
for each (_local3 in gamesPlayedXML.*) {
_local1.push(new Match(int(_local3.area_id), int(_local3.position), _local3.fullname, new Date(Number((_local3.date_played + "000"))), Number(_local3.money_spent), Number(_local3.money_earned)));
};
Profile.populateMatchesPlayed(_local1);
dispatchEvent(new Event(GAMESPLAYED_SUCCESS));
}
public static function dispatchEvent(... _args):void{
if (disp == null){
return;
};
disp.dispatchEvent.apply(null, _args);
}
private static function returnGamesPlayedFailure(_arg1:IOErrorEvent):void{
debugTrace("returnGamesPlayedFailure");
gamesPlayedLoader.removeEventListener(Event.COMPLETE, returnGamesPlayedSuccess);
gamesPlayedLoader.removeEventListener(IOErrorEvent.IO_ERROR, returnGamesPlayedFailure);
returnMessageId = getText(LangStrings.profileGamesPlayedErrorGeneral);
dispatchEvent(new Event(GAMESPLAYED_FAILURE));
}
private static function returnTickerSuccess(_arg1:Event):void{
}
public static function addEventListener(... _args):void{
if (disp == null){
disp = new EventDispatcher();
};
disp.addEventListener.apply(null, _args);
}
public static function removeEventListener(... _args):void{
if (disp == null){
return;
};
disp.removeEventListener.apply(null, _args);
}
private static function processUpdateProfileSuccess():void{
var _local1:String;
trace(("processUpdateProfileSuccess - xml:" + updateProfileXML));
_local1 = updateProfileXML.final_result;
trace((" finalResult:" + _local1));
if (updateProfileXML == "SUCCESS"){
dispatchEvent(new Event(UPDATEPROFILE_SUCCESS));
} else {
returnMessageField = "";
dispatchEvent(new Event(UPDATEPROFILE_FAILURE));
};
}
private static function returnGameInfoFailure(_arg1:IOErrorEvent):void{
trace("returnGameInfoFailure");
gameInfoLoader.removeEventListener(Event.COMPLETE, returnGameInfoSuccess);
gameInfoLoader.removeEventListener(IOErrorEvent.IO_ERROR, returnGameInfoFailure);
returnMessageId = getText(LangStrings.gameInfoErrorGeneral);
dispatchEvent(new Event(GAMEINFO_FAILURE));
}
private static function returnGlobalRankingsFailure(_arg1:IOErrorEvent):void{
returnMessageId = getText(LangStrings.profileGamesPlayedErrorGeneral);
dispatchEvent(new Event(GLOBALRANKINGS_FAILURE));
}
public static function login(_arg1:String, _arg2:String, _arg3:String, _arg4:Boolean=false):void{
var _local5:String;
var _local6:URLRequest;
var _local7:URLVariables;
var _local8:Date;
_local5 = "";
if (Settings.get("isLocal")){
_local5 = Settings.get("scriptPath");
} else {
_local5 = getText(LangStrings.localScriptPath);
};
trace((((("login - $isRemember:" + _arg4) + ", url:") + _local5) + Settings.get("loginURL")));
trace((" $language:" + _arg3));
_local6 = new URLRequest((_local5 + Settings.get("loginURL")));
_local7 = new URLVariables();
_local8 = new Date();
_local7.rnd = _local8.getTime();
switch (_arg3){
case "en":
_local7.language = "GB";
break;
default:
_local7.language = _arg3.toUpperCase();
};
_local7.email = _arg1;
_local7.password = _arg2;
if (_arg4){
CustomSharedObject.set({user:_arg1, pass:_arg2, isLogging:true, isValid:false});
};
_local6.data = _local7;
_local6.method = URLRequestMethod.POST;
isLoginLoaded = false;
loginLoader = new URLLoader();
loginLoader.addEventListener(Event.COMPLETE, returnLoginSuccess, false, 0, true);
loginLoader.addEventListener(IOErrorEvent.IO_ERROR, returnLoginFailure, false, 0, true);
if (loginTimer == null){
loginTimer = new Timer(MINIMUM_LOAD_TIME, 1);
loginTimer.addEventListener(TimerEvent.TIMER_COMPLETE, onLoginTimerComplete, false, 0, true);
};
loginTimer.reset();
loginTimer.start();
loginLoader.load(_local6);
}
private static function processRegisterSuccess():void{
var _local1:String;
_local1 = registerXML.final_result;
debugTrace((" finalResult:" + _local1));
if (_local1 == "SUCCESS"){
Profile.populate(registerXML.user_id, registerXML.screenname, registerXML.email, registerXML.country, int(registerXML.age), registerXML.gender, "", int(registerXML.money), int(registerXML.played), int(registerXML.won), int(registerXML.global_rank));
dispatchEvent(new Event(REGISTER_SUCCESS));
} else {
returnMessageField = "";
if (registerXML.game_result == "DUPLICATE SCREENNAME"){
returnMessageField = REGISTER_FIELD_NAME;
returnMessageId = LangStrings.registerErrorNameTaken;
} else {
if (registerXML.game_result == "DUPLICATE EMAIL"){
returnMessageField = REGISTER_FIELD_EMAIL;
returnMessageId = LangStrings.registerErrorEmailTaken;
} else {
if (registerXML.discovery_result_type == "FAIL"){
returnMessageId = LangStrings.registerErrorEmailTaken;
} else {
if (registerXML.game_result == "FAIL"){
returnMessageId = LangStrings.registerErrorGeneral;
};
};
};
};
dispatchEvent(new Event(REGISTER_FAILURE));
};
}
public static function getMoonState():void{
var _local1:URLRequest;
var _local2:URLVariables;
var _local3:Date;
var _local4:URLLoader;
debugTrace("getCountryRankings");
_local1 = new URLRequest(Settings.get("moonBodyXML"));
_local2 = new URLVariables();
_local3 = new Date();
_local2.rnd = _local3.getTime();
_local1.data = _local2;
_local1.method = URLRequestMethod.GET;
_local4 = new URLLoader(_local1);
_local4.addEventListener(Event.COMPLETE, returnMoonStateSuccess, false, 0, true);
_local4.addEventListener(IOErrorEvent.IO_ERROR, returnMoonStateFailure, false, 0, true);
}
private static function processLoginSuccess():void{
var _local1:String;
debugTrace("processLoginSuccess");
_local1 = loginXML.final_result;
if (_local1 == "SUCCESS"){
Profile.populate(loginXML.user_id, loginXML.screenname, loginXML.email, loginXML.country, int(loginXML.age), loginXML.gender, loginXML.bot_data, int(loginXML.money), int(loginXML.played), int(loginXML.won), int(loginXML.global_rank));
dispatchEvent(new Event(LOGIN_SUCCESS));
} else {
returnMessageField = "";
if (loginXML.game_result == "FAIL"){
returnMessageId = getText(LangStrings.loginErrorWrong);
} else {
if (loginXML.discovery_result_type == "FAIL"){
returnMessageId = loginXML.discovery_message;
} else {
returnMessageId = getText(LangStrings.loginErrorWrong);
};
};
dispatchEvent(new Event(LOGIN_FAILURE));
};
}
public static function getCountryRankings():void{
var _local1:URLRequest;
var _local2:URLVariables;
var _local3:Date;
var _local4:URLLoader;
debugTrace("getCountryRankings");
_local1 = new URLRequest(Settings.get("countryRankingsXML"));
_local2 = new URLVariables();
_local3 = new Date();
_local2.rnd = _local3.getTime();
_local1.data = _local2;
_local1.method = URLRequestMethod.GET;
_local4 = new URLLoader(_local1);
_local4.addEventListener(Event.COMPLETE, returnCountryRankingsSuccess, false, 0, true);
_local4.addEventListener(IOErrorEvent.IO_ERROR, returnCountryRankingsFailure, false, 0, true);
}
private static function returnRegisterSuccess(_arg1:Event):void{
registerLoader.removeEventListener(Event.COMPLETE, returnRegisterSuccess);
registerLoader.removeEventListener(IOErrorEvent.IO_ERROR, returnRegisterFailure);
debugTrace(("returnRegisterSuccess - xml:" + registerLoader.data));
registerXML = XML(registerLoader.data);
isRegisterLoaded = true;
if (registerTimer.currentCount == 1){
processRegisterSuccess();
};
}
public static function logout():void{
CustomSharedObject.set({user:"", pass:"", isLogging:false, isValid:false});
}
private static function returnUpdateProfileSuccess(_arg1:Event):void{
var _local2:URLLoader;
updateProfileLoader.removeEventListener(Event.COMPLETE, returnUpdateProfileSuccess);
updateProfileLoader.removeEventListener(IOErrorEvent.IO_ERROR, returnUpdateProfileFailure);
_local2 = URLLoader(_arg1.target);
updateProfileXML = XML(_local2.data);
isUpdateProfileLoaded = true;
if (updateProfileTimer.currentCount == 1){
processUpdateProfileSuccess();
};
}
public static function playMoreGames():void{
var _local1:String;
_local1 = Settings.get("playMoreLink", "");
if (Profile.isLoggedIn){
_local1 = _local1.split("<age>").join(Profile.age);
_local1 = _local1.split("<gender>").join(Profile.gender);
};
navigateToURL(new URLRequest(_local1));
}
public static function register(_arg1:String, _arg2:String, _arg3:String, _arg4:int, _arg5:String, _arg6:String, _arg7:String, _arg8:int, _arg9:int):void{
var _local10:URLRequest;
var _local11:URLVariables;
var _local12:Date;
debugTrace("register");
_local10 = new URLRequest((getText(LangStrings.localScriptPath) + Settings.get("registrationURL")));
_local11 = new URLVariables();
_local12 = new Date();
_local11.rnd = _local12.getTime();
_local11.screenname = _arg1;
switch (_arg2){
case "en":
_local11.language = "GB";
break;
default:
_local11.language = _arg2.toUpperCase();
};
_local11.country = _arg3;
_local11.age = _arg4;
_local11.gender = _arg5;
_local11.email = _arg6;
_local11.password = _arg7;
_local11.discoveryoptin = _arg8;
_local11.gamenetoptin = _arg9;
_local10.data = _local11;
_local10.method = URLRequestMethod.POST;
isRegisterLoaded = false;
registerLoader = new URLLoader();
registerLoader.addEventListener(Event.COMPLETE, returnRegisterSuccess, false, 0, true);
registerLoader.addEventListener(IOErrorEvent.IO_ERROR, returnRegisterFailure, false, 0, true);
if (registerTimer == null){
registerTimer = new Timer(MINIMUM_LOAD_TIME, 1);
registerTimer.addEventListener(TimerEvent.TIMER_COMPLETE, onRegisterTimerComplete, false, 0, true);
};
registerTimer.reset();
registerTimer.start();
registerLoader.load(_local10);
}
public static function updateProfile(_arg1:int, _arg2:String, _arg3:String, _arg4:int, _arg5:String, _arg6:String):void{
var _local7:URLRequest;
var _local8:URLVariables;
var _local9:Date;
debugTrace("updateProfile");
_local7 = new URLRequest(Settings.get("updateProfileURL"));
_local8 = new URLVariables();
_local9 = new Date();
_local8.rnd = _local9.getTime();
_local8.user = _arg1;
_local8.username = _arg2;
_local8.country = _arg3;
_local8.age = _arg4;
_local8.gender = _arg5;
_local8.bot_data = _arg6;
_local7.data = _local8;
_local7.method = URLRequestMethod.POST;
isUpdateProfileLoaded = false;
updateProfileLoader = new URLLoader();
updateProfileLoader.addEventListener(Event.COMPLETE, returnUpdateProfileSuccess, false, 0, true);
updateProfileLoader.addEventListener(IOErrorEvent.IO_ERROR, returnUpdateProfileFailure, false, 0, true);
if (updateProfileTimer == null){
updateProfileTimer = new Timer(MINIMUM_LOAD_TIME, 1);
updateProfileTimer.addEventListener(TimerEvent.TIMER_COMPLETE, onUpdateProfileTimerComplete, false, 0, true);
};
updateProfileTimer.reset();
updateProfileTimer.start();
updateProfileLoader.load(_local7);
}
private static function debugTrace(_arg1):void{
if (isDebugMode){
trace(("DataCapture - " + _arg1));
MonsterDebugger.trace("DataCapture", _arg1);
};
}
public static function getMyProfile():void{
var _local1:URLRequest;
var _local2:URLVariables;
var _local3:Date;
var _local4:URLLoader;
trace("getMyProfile");
if (Profile.isLoggedIn){
Profile.updating();
_local1 = new URLRequest(Settings.get("getMyProfileURL"));
_local2 = new URLVariables();
_local3 = new Date();
_local2.rnd = _local3.getTime();
_local2.user = Profile.userId;
_local2.username = Profile.username;
_local1.data = _local2;
_local1.method = URLRequestMethod.POST;
_local4 = new URLLoader();
_local4.addEventListener(Event.COMPLETE, returnMyProfileSuccess, false, 0, true);
_local4.addEventListener(IOErrorEvent.IO_ERROR, returnMyProfileFailure, false, 0, true);
_local4.load(_local1);
};
}
private static function returnLoginSuccess(_arg1:Event):void{
var _local2:URLLoader;
var _local3:URLVariables;
loginLoader.removeEventListener(Event.COMPLETE, returnLoginSuccess);
loginLoader.removeEventListener(IOErrorEvent.IO_ERROR, returnLoginFailure);
_local2 = URLLoader(_arg1.target);
_local3 = new URLVariables(_local2.data);
if (CustomSharedObject.get("isLogging")){
CustomSharedObject.set({isLogging:false, isValid:true});
};
loginXML = XML(_local2.data);
isLoginLoaded = true;
if (loginTimer.currentCount == 1){
processLoginSuccess();
};
}
private static function processGameInfoSuccess():void{
MatchManager.populateMatchData(gameInfoXML.area_id, gameInfoXML.fullname, gameInfoXML.helium_density, gameInfoXML.helium_total, gameInfoXML.helium_depleted, gameInfoXML.moves, gameInfoXML.moonscape, gameInfoXML.helium_distribution, gameInfoXML.game_version);
dispatchEvent(new Event(GAMEINFO_SUCCESS));
}
private static function returnMyProfileFailure(_arg1:IOErrorEvent):void{
trace(("returnMyProfileFailure - e:" + _arg1));
returnMessageId = getText(LangStrings.profileUpdateErrorGeneral);
dispatchEvent(new Event(MYPROFILE_FAILURE));
}
private static function returnMoonStateFailure(_arg1:IOErrorEvent):void{
debugTrace("returnMoonStateFailure");
dispatchEvent(new Event(MOONSTATE_FAILURE));
}
public static function getGamesPlayed(_arg1:int, _arg2:String):void{
var _local3:URLRequest;
var _local4:URLVariables;
var _local5:Date;
debugTrace("login");
_local3 = new URLRequest(Settings.get("getGamesPlayedURL"));
_local4 = new URLVariables();
_local5 = new Date();
_local4.rnd = _local5.getTime();
_local4.user = _arg1;
_local4.username = _arg2;
_local3.data = _local4;
_local3.method = URLRequestMethod.POST;
gamesPlayedLoader = new URLLoader();
gamesPlayedLoader.addEventListener(Event.COMPLETE, returnGamesPlayedSuccess, false, 0, true);
gamesPlayedLoader.addEventListener(IOErrorEvent.IO_ERROR, returnGamesPlayedFailure, false, 0, true);
if (gamesPlayedTimer == null){
gamesPlayedTimer = new Timer(MINIMUM_LOAD_TIME, 1);
gamesPlayedTimer.addEventListener(TimerEvent.TIMER_COMPLETE, onGamesPlayedTimerComplete, false, 0, true);
};
gamesPlayedTimer.reset();
gamesPlayedTimer.start();
gamesPlayedLoader.load(_local3);
}
private static function returnGamesPlayedSuccess(_arg1:Event):void{
var _local2:URLLoader;
debugTrace("returnGamesPlayedSuccess");
gamesPlayedLoader.removeEventListener(Event.COMPLETE, returnGamesPlayedSuccess);
gamesPlayedLoader.removeEventListener(IOErrorEvent.IO_ERROR, returnGamesPlayedFailure);
_local2 = URLLoader(_arg1.target);
gamesPlayedXML = XML(_local2.data);
trace((" gamesPlayedXML:" + gamesPlayedXML));
isGamesPlayedLoaded = true;
if (gamesPlayedTimer.currentCount == 1){
processGamesPlayedSuccess();
};
}
private static function returnCountryRankingsFailure(_arg1:IOErrorEvent):void{
debugTrace("returnCountryRankingsFailure");
returnMessageId = getText(LangStrings.profileGamesPlayedErrorGeneral);
dispatchEvent(new Event(COUNTRYRANKINGS_FAILURE));
}
public static function getCountryNameByCode(_arg1:String):String{
var _local2:int;
_local2 = 0;
while (_local2 < COUNTRY_LIST.length) {
if (COUNTRY_LIST[_local2].code == _arg1){
return (COUNTRY_LIST[_local2].name);
};
_local2++;
};
return ("");
}
private static function onLoginTimerComplete(_arg1:TimerEvent):void{
if (isLoginLoaded){
processLoginSuccess();
};
}
public static function getGlobalRankings():void{
var _local1:URLRequest;
var _local2:URLVariables;
var _local3:Date;
var _local4:URLLoader;
debugTrace("getGlobalRankings");
_local1 = new URLRequest(Settings.get("globalRankingsXML"));
_local2 = new URLVariables();
_local3 = new Date();
_local2.rnd = _local3.getTime();
_local1.data = _local2;
_local1.method = URLRequestMethod.GET;
_local4 = new URLLoader(_local1);
_local4.addEventListener(Event.COMPLETE, returnGlobalRankingsSuccess, false, 0, true);
_local4.addEventListener(IOErrorEvent.IO_ERROR, returnGlobalRankingsFailure, false, 0, true);
}
}
}//package game
Section 11
//TweenLite (gs.TweenLite)
package gs {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.geom.*;
public class TweenLite {
public var delay:Number;
protected var _hasUpdate:Boolean;
public var started:Boolean;
protected var _subTweens:Array;
public var initted:Boolean;
public var active:Boolean;
public var startTime:Number;
public var target:Object;
public var duration:Number;
protected var _hst:Boolean;
protected var _isDisplayObject:Boolean;
public var gc:Boolean;
public var vars:Object;
public var ease:Function;
public var tweens:Array;
protected var _specialVars:Object;
public var combinedTimeScale:Number;
public var initTime:Number;
private static var _timer:Timer = new Timer(2000);
private static var _classInitted:Boolean;
public static var defaultEase:Function = TweenLite.easeOut;
public static var version:Number = 9.29;
public static var masterList:Dictionary = new Dictionary(false);
public static var currentTime:uint;
public static var overwriteManager:Object;
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
public static var timingSprite:Sprite = new Sprite();
public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){
var _local4:int;
super();
if (_arg1 == null){
return;
};
if (!_classInitted){
currentTime = getTimer();
timingSprite.addEventListener(Event.ENTER_FRAME, updateAll, false, 0, true);
if (overwriteManager == null){
overwriteManager = {mode:1, enabled:false};
};
_timer.addEventListener("timer", killGarbage, false, 0, true);
_timer.start();
_classInitted = true;
};
this.vars = _arg3;
this.duration = ((_arg2) || (0.001));
this.delay = ((_arg3.delay) || (0));
this.combinedTimeScale = ((_arg3.timeScale) || (1));
this.active = Boolean((((_arg2 == 0)) && ((this.delay == 0))));
this.target = _arg1;
_isDisplayObject = Boolean((_arg1 is DisplayObject));
if (!(this.vars.ease is Function)){
this.vars.ease = defaultEase;
};
if (this.vars.easeParams != null){
this.vars.proxiedEase = this.vars.ease;
this.vars.ease = easeProxy;
};
this.ease = this.vars.ease;
if (!isNaN(Number(this.vars.autoAlpha))){
this.vars.alpha = Number(this.vars.autoAlpha);
this.vars.visible = Boolean((this.vars.alpha > 0));
};
_specialVars = ((this.vars.isTV)==true) ? this.vars.exposedProps : this.vars;
this.tweens = [];
_subTweens = [];
_hst = (this.initted = false);
this.initTime = currentTime;
this.startTime = (this.initTime + (this.delay * 1000));
_local4 = ((((_arg3.overwrite == undefined)) || (((!(overwriteManager.enabled)) && ((_arg3.overwrite > 1)))))) ? overwriteManager.mode : int(_arg3.overwrite);
if ((((masterList[_arg1] == undefined)) || (((!((_arg1 == null))) && ((_local4 == 1)))))){
masterList[_arg1] = [];
};
masterList[_arg1].push(this);
if ((((((this.vars.runBackwards == true)) && (!((this.vars.renderOnStart == true))))) || (this.active))){
initTweenVals();
if (this.active){
render((this.startTime + 1));
} else {
render(this.startTime);
};
if (((((!((_specialVars.visible == null))) && ((this.vars.runBackwards == true)))) && (_isDisplayObject))){
this.target.visible = _specialVars.visible;
};
};
}
public function set enabled(_arg1:Boolean):void{
var _local2:Array;
var _local3:Boolean;
var _local4:int;
if (_arg1){
if (masterList[this.target] == undefined){
masterList[this.target] = [this];
} else {
_local2 = masterList[this.target];
_local4 = (_local2.length - 1);
while (_local4 > -1) {
if (_local2[_local4] == this){
_local3 = true;
break;
};
_local4--;
};
if (!_local3){
masterList[this.target].push(this);
};
};
};
this.gc = (_arg1) ? false : true;
if (this.gc){
this.active = false;
} else {
this.active = this.started;
};
}
public function render(_arg1:uint):void{
var _local2:Number;
var _local3:Number;
var _local4:Object;
var _local5:int;
_local2 = ((_arg1 - this.startTime) * 0.001);
if (_local2 >= this.duration){
_local2 = this.duration;
_local3 = ((((this.ease == this.vars.ease)) || ((this.duration == 0.001)))) ? 1 : 0;
} else {
_local3 = this.ease(_local2, 0, 1, this.duration);
};
_local5 = (this.tweens.length - 1);
while (_local5 > -1) {
_local4 = this.tweens[_local5];
_local4[0][_local4[1]] = (_local4[2] + (_local3 * _local4[3]));
_local5--;
};
if (_hst){
_local5 = (_subTweens.length - 1);
while (_local5 > -1) {
_subTweens[_local5].proxy(_subTweens[_local5], _local2);
_local5--;
};
};
if (_hasUpdate){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
if (_local2 == this.duration){
complete(true);
};
}
public function activate():void{
this.started = (this.active = true);
if (!this.initted){
initTweenVals();
};
if (this.vars.onStart != null){
this.vars.onStart.apply(null, this.vars.onStartParams);
};
if (this.duration == 0.001){
this.startTime = (this.startTime - 1);
};
}
public function clear():void{
this.tweens = [];
_subTweens = [];
this.vars = {};
_hst = (_hasUpdate = false);
}
protected function addSubTween(_arg1:String, _arg2:Function, _arg3:Object, _arg4:Object, _arg5:Object=null):void{
var _local6:String;
_subTweens[_subTweens.length] = {name:_arg1, proxy:_arg2, target:_arg3, info:_arg5};
for (_local6 in _arg4) {
if (typeof(_arg4[_local6]) == "number"){
this.tweens[this.tweens.length] = [_arg3, _local6, _arg3[_local6], (_arg4[_local6] - _arg3[_local6]), _arg1];
} else {
this.tweens[this.tweens.length] = [_arg3, _local6, _arg3[_local6], Number(_arg4[_local6]), _arg1];
};
};
_hst = true;
}
public function initTweenVals(_arg1:Boolean=false, _arg2:String=""):void{
var _local3:String;
var _local4:int;
var _local5:Array;
var _local6:ColorTransform;
var _local7:ColorTransform;
var _local8:Object;
if (((!(_arg1)) && (overwriteManager.enabled))){
overwriteManager.manageOverwrites(this, masterList[this.target]);
};
if ((this.target is Array)){
_local5 = ((this.vars.endArray) || ([]));
_local4 = 0;
while (_local4 < _local5.length) {
if (((!((this.target[_local4] == _local5[_local4]))) && (!((this.target[_local4] == undefined))))){
this.tweens[this.tweens.length] = [this.target, _local4.toString(), this.target[_local4], (_local5[_local4] - this.target[_local4]), _local4.toString()];
};
_local4++;
};
} else {
if (((((!((typeof(_specialVars.tint) == "undefined"))) || ((this.vars.removeTint == true)))) && (_isDisplayObject))){
_local6 = this.target.transform.colorTransform;
_local7 = new ColorTransform();
if (_specialVars.alpha != undefined){
_local7.alphaMultiplier = _specialVars.alpha;
delete _specialVars.alpha;
} else {
_local7.alphaMultiplier = this.target.alpha;
};
if (((!((this.vars.removeTint == true))) && (((((!((_specialVars.tint == null))) && (!((_specialVars.tint == ""))))) || ((_specialVars.tint == 0)))))){
_local7.color = _specialVars.tint;
};
addSubTween("tint", tintProxy, {progress:0}, {progress:1}, {target:this.target, color:_local6, endColor:_local7});
};
if (((!((_specialVars.frame == null))) && (_isDisplayObject))){
addSubTween("frame", frameProxy, {frame:this.target.currentFrame}, {frame:_specialVars.frame}, {target:this.target});
};
if (((!(isNaN(this.vars.volume))) && (this.target.hasOwnProperty("soundTransform")))){
addSubTween("volume", volumeProxy, this.target.soundTransform, {volume:this.vars.volume}, {target:this.target});
};
if (((!((_specialVars.visible == null))) && (_isDisplayObject))){
addSubTween("visible", visibleProxy, {}, {}, {tween:this});
};
for (_local3 in _specialVars) {
if ((((((((((((((((((((((((((((((((((((((_local3 == "ease")) || ((_local3 == "delay")))) || ((_local3 == "overwrite")))) || ((_local3 == "onComplete")))) || ((_local3 == "onCompleteParams")))) || ((_local3 == "runBackwards")))) || ((_local3 == "visible")))) || ((_local3 == "autoOverwrite")))) || ((_local3 == "persist")))) || ((_local3 == "onUpdate")))) || ((_local3 == "onUpdateParams")))) || ((_local3 == "autoAlpha")))) || ((((_local3 == "timeScale")) && (!((this.target is TweenLite))))))) || ((_local3 == "onStart")))) || ((_local3 == "onStartParams")))) || ((_local3 == "renderOnStart")))) || ((_local3 == "proxiedEase")))) || ((_local3 == "easeParams")))) || (((_arg1) && (!((_arg2.indexOf(((" " + _local3) + " ")) == -1))))))){
} else {
if (((!(((_isDisplayObject) && ((((((_local3 == "tint")) || ((_local3 == "removeTint")))) || ((_local3 == "frame"))))))) && (!((((_local3 == "volume")) && (this.target.hasOwnProperty("soundTransform"))))))){
if (typeof(_specialVars[_local3]) == "number"){
this.tweens[this.tweens.length] = [this.target, _local3, this.target[_local3], (_specialVars[_local3] - this.target[_local3]), _local3];
} else {
this.tweens[this.tweens.length] = [this.target, _local3, this.target[_local3], Number(_specialVars[_local3]), _local3];
};
};
};
};
};
if (this.vars.runBackwards == true){
_local4 = (this.tweens.length - 1);
while (_local4 > -1) {
_local8 = this.tweens[_local4];
_local8[2] = (_local8[2] + _local8[3]);
_local8[3] = (_local8[3] * -1);
_local4--;
};
};
if (this.vars.onUpdate != null){
_hasUpdate = true;
};
this.initted = true;
}
protected function easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams)));
}
public function killVars(_arg1:Object):void{
if (overwriteManager.enabled){
overwriteManager.killVars(_arg1, this.vars, this.tweens, _subTweens, []);
};
}
public function get enabled():Boolean{
return ((this.gc) ? false : true);
}
public function complete(_arg1:Boolean=false):void{
if (!_arg1){
if (!this.initted){
initTweenVals();
};
this.startTime = (currentTime - ((this.duration * 1000) / this.combinedTimeScale));
render(currentTime);
return;
};
if (this.vars.persist != true){
this.enabled = false;
};
if (this.vars.onComplete != null){
this.vars.onComplete.apply(null, this.vars.onCompleteParams);
};
}
public static function frameProxy(_arg1:Object, _arg2:Number=0):void{
_arg1.info.target.gotoAndStop(Math.round(_arg1.target.frame));
}
public static function removeTween(_arg1:TweenLite, _arg2:Boolean=true):void{
if (_arg1 != null){
if (_arg2){
_arg1.clear();
};
_arg1.enabled = false;
};
}
public static function visibleProxy(_arg1:Object, _arg2:Number):void{
var _local3:TweenLite;
_local3 = _arg1.info.tween;
if (_local3.duration == _arg2){
if (((!((_local3.vars.runBackwards == true))) && ((_local3.ease == _local3.vars.ease)))){
_local3.target.visible = _local3.vars.visible;
};
} else {
if (_local3.target.visible != true){
_local3.target.visible = true;
};
};
}
public static function killTweensOf(_arg1:Object=null, _arg2:Boolean=false):void{
var _local3:Array;
var _local4:int;
var _local5:TweenLite;
if (((!((_arg1 == null))) && (!((masterList[_arg1] == undefined))))){
_local3 = masterList[_arg1];
_local4 = (_local3.length - 1);
while (_local4 > -1) {
_local5 = _local3[_local4];
if (((_arg2) && (!(_local5.gc)))){
_local5.complete(false);
};
_local5.clear();
_local4--;
};
delete masterList[_arg1];
};
}
public static function updateAll(_arg1:Event=null):void{
var _local2:uint;
var _local3:Dictionary;
var _local4:Array;
var _local5:int;
var _local6:TweenLite;
_local2 = (currentTime = getTimer());
_local3 = masterList;
for each (_local4 in _local3) {
_local5 = (_local4.length - 1);
while (_local5 > -1) {
_local6 = _local4[_local5];
if (_local6 == null){
} else {
if (_local6.active){
_local6.render(_local2);
} else {
if (_local6.gc){
_local4.splice(_local5, 1);
} else {
if (_local2 >= _local6.startTime){
_local6.activate();
_local6.render(_local2);
};
};
};
};
_local5--;
};
};
}
public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null):TweenLite{
return (new TweenLite(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, overwrite:0}));
}
public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
_arg3.runBackwards = true;
return (new TweenLite(_arg1, _arg2, _arg3));
}
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
public static function tintProxy(_arg1:Object, _arg2:Number=0):void{
var _local3:Number;
var _local4:Number;
var _local5:Object;
var _local6:Object;
_local3 = _arg1.target.progress;
_local4 = (1 - _local3);
_local5 = _arg1.info.color;
_local6 = _arg1.info.endColor;
_arg1.info.target.transform.colorTransform = new ColorTransform(((_local5.redMultiplier * _local4) + (_local6.redMultiplier * _local3)), ((_local5.greenMultiplier * _local4) + (_local6.greenMultiplier * _local3)), ((_local5.blueMultiplier * _local4) + (_local6.blueMultiplier * _local3)), ((_local5.alphaMultiplier * _local4) + (_local6.alphaMultiplier * _local3)), ((_local5.redOffset * _local4) + (_local6.redOffset * _local3)), ((_local5.greenOffset * _local4) + (_local6.greenOffset * _local3)), ((_local5.blueOffset * _local4) + (_local6.blueOffset * _local3)), ((_local5.alphaOffset * _local4) + (_local6.alphaOffset * _local3)));
}
public static function volumeProxy(_arg1:Object, _arg2:Number=0):void{
_arg1.info.target.soundTransform = _arg1.target;
}
protected static function killGarbage(_arg1:TimerEvent):void{
var _local2:Dictionary;
var _local3:Object;
var _local4:Array;
_local2 = masterList;
for (_local3 in _local2) {
if (_local2[_local3].length == 0){
delete _local2[_local3];
};
};
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
return (new TweenLite(_arg1, _arg2, _arg3));
}
}
}//package gs
Section 12
//MonsterDebugger (nl.demonsters.debugger.MonsterDebugger)
package nl.demonsters.debugger {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import flash.geom.*;
public class MonsterDebugger {
private const TYPE_VECTOR:String = "Vector";
private const TYPE_BOOLEAN:String = "Boolean";
private const COMMAND_GET_DISPLAYOBJECT:String = "GET_DISPLAYOBJECT";
private const ICON_ROOT:String = "iconRoot";
private const COMMAND_GET_OBJECT:String = "GET_OBJECT";
private const TYPE_XMLLIST:String = "XMLList";
private const COMMAND_TRACE:String = "TRACE";
private const TYPE_DISPLAYOBJECT:String = "DisplayObject";
private const TYPE_XMLVALUE:String = "XMLValue";
private const COMMAND_NOTFOUND:String = "NOTFOUND";
private const COMMAND_MONITOR:String = "MONITOR";
private const ACCESS_METHOD:String = "method";
private const ACCESS_CONSTANT:String = "constant";
private const HIGHLIGHT_BORDER:int = 4;
private const TYPE_FUNCTION:String = "Function";
private const TYPE_UINT:String = "uint";
private const TYPE_INT:String = "int";
private const MAX_PACKAGE_BYTES:int = 40000;
private const LINE_IN:String = "_debuggerBlue";
private const TYPE_XMLATTRIBUTE:String = "XMLAttribute";
private const COMMAND_SNAPSHOT:String = "SNAPSHOT";
private const ALLOWED_DOMAIN:String = "*";
private const ICON_VARIABLE_READONLY:String = "iconVariableReadonly";
private const ICON_DEFAULT:String = "iconDefault";
private const LINE_OUT:String = "_debuggerRed";
private const COMMAND_BASE:String = "BASE";
private const COMMAND_SHOW_HIGHLIGHT:String = "SHOW_HIGHLIGHT";
private const COMMAND_HIDE_HIGHLIGHT:String = "HIDE_HIGHLIGHT";
private const TYPE_BYTEARRAY:String = "ByteArray";
private const ICON_VARIABLE_WRITEONLY:String = "iconVariableWriteonly";
private const COMMAND_GET_PROPERTIES:String = "GET_PROPERTIES";
private const TYPE_XML:String = "XML";
private const TYPE_XMLNODE:String = "XMLNode";
private const COMMAND_ROOT:String = "ROOT";
private const TYPE_WARNING:String = "Warning";
private const TYPE_VOID:String = "void";
private const PERMISSION_WRITEONLY:String = "writeonly";
private const PERMISSION_READWRITE:String = "readwrite";
private const ICON_VARIABLE:String = "iconVariable";
private const TYPE_BITMAPDATA:String = "BitmapData";
private const TYPE_METHOD:String = "MethodClosure";
private const ICON_XMLATTRIBUTE:String = "iconXMLAttribute";
private const COMMAND_HELLO:String = "HELLO";
private const COMMAND_GET_FUNCTIONS:String = "GET_FUNCTIONS";
private const PERMISSION_READONLY:String = "readonly";
private const ICON_XMLNODE:String = "iconXMLNode";
private const COMMAND_CLEAR_TRACES:String = "CLEAR_TRACES";
private const VERSION:Number = 2.04;
private const TYPE_STRING:String = "String";
private const ACCESS_ACCESSOR:String = "accessor";
private const ICON_XMLVALUE:String = "iconXMLValue";
private const COMMAND_SET_PROPERTY:String = "SET_PROPERTY";
private const COMMAND_CALL_METHOD:String = "CALL_METHOD";
private const TYPE_BITMAP:String = "Bitmap";
private const ICON_FUNCTION:String = "iconFunction";
private const HIGHLIGHT_COLOR:uint = 0xFFFF00;
private const COMMAND_INSPECT:String = "INSPECT";
private const ICON_WARNING:String = "iconWarning";
private const TYPE_OBJECT:String = "Object";
private const TYPE_NUMBER:String = "Number";
private const TYPE_ARRAY:String = "Array";
private const ACCESS_VARIABLE:String = "variable";
public var _enabled:Boolean;// = true
private var lineIn:LocalConnection;
private var monitorTime:uint;
private var monitor:Timer;
private var monitorFrames:uint;
private var lineOut:LocalConnection;
private var highlight:Sprite;// = null
private var monitorSprite:Sprite;
private var root:Object;// = null
public static const COLOR_WARNING:uint = 0xFF3300;
public static const COLOR_NORMAL:uint = 0x111111;
public static const COLOR_ERROR:uint = 0xFF0000;
private static var instance:MonsterDebugger = null;
public function MonsterDebugger(_arg1:Object=null){
var target = _arg1;
root = null;
highlight = null;
_enabled = true;
super();
if (instance == null){
instance = this;
lineOut = new LocalConnection();
lineOut.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
lineOut.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
lineOut.addEventListener(StatusEvent.STATUS, statusHandler);
lineIn = new LocalConnection();
lineIn.addEventListener(AsyncErrorEvent.ASYNC_ERROR, asyncErrorHandler);
lineIn.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
lineIn.addEventListener(StatusEvent.STATUS, statusHandler);
lineIn.allowDomain(ALLOWED_DOMAIN);
lineIn.client = this;
monitorTime = getTimer();
monitorFrames = 0;
monitorSprite = new Sprite();
monitorSprite.addEventListener(Event.ENTER_FRAME, enterFrameHandler);
monitor = new Timer(500);
monitor.addEventListener(TimerEvent.TIMER, monitorHandler);
monitor.start();
try {
lineIn.connect(LINE_IN);
} catch(error:ArgumentError) {
};
};
if (target != MonsterDebugger.singletonCheck){
instance.root = target;
instance.send({text:COMMAND_HELLO, version:VERSION});
};
}
private function asyncErrorHandler(_arg1:AsyncErrorEvent):void{
}
private function enterFrameHandler(_arg1:Event):void{
if (enabled){
monitorFrames++;
};
}
private function htmlEscape(_arg1:String):String{
var _local2:XML;
if (_arg1){
while (_arg1.indexOf("'") != -1) {
_arg1 = _arg1.replace("'", "'");
};
while (_arg1.indexOf("\"") != -1) {
_arg1 = _arg1.replace("\"", """);
};
_local2 = new XML((("<a>" + ??esc_xelem
) + "</a>"));
return (_local2.toXMLString().replace(/(^<a>)|(<\/a>$)|(^<a\/>$)/g, ""));
//unresolved jump
};
return ("");
}
private function createNode(_arg1:String, _arg2:Object=null, _arg3:Boolean=false):String{
var _local4:String;
var _local5:*;
_local4 = "";
_local4 = (_local4 + ("<" + _arg1));
if (_arg2){
for (_local5 in _arg2) {
_local4 = (_local4 + ((((" " + _local5) + "='") + _arg2[_local5]) + "'"));
};
};
if (_arg3){
_local4 = (_local4 + (("></" + _arg1) + ">"));
} else {
_local4 = (_local4 + ">");
};
return (_local4);
}
private function htmlUnescape(_arg1:String):String{
var _local2:XML;
if (_arg1){
_local2 = <a/>
;
_local2.replace(0, _arg1);
return (String(_local2));
};
return ("");
}
private function traceInternal(_arg1:Object, _arg2, _arg3:uint=0x111111, _arg4:Boolean=false, _arg5:int=4):void{
var _local6:XML;
if (enabled){
_local6 = XML(parseObject(_arg2, "", _arg4, 1, _arg5));
send({text:COMMAND_TRACE, date:new Date(), target:String(_arg1), xml:_local6, color:_arg3});
};
}
private function getObject(_arg1:String="", _arg2:int=0){
var object:*;
var splitted:Array;
var i:int;
var index:Number;
var target = _arg1;
var parent = _arg2;
object = instance.root;
if (target != ""){
splitted = target.split(".");
i = 0;
while (i < (splitted.length - parent)) {
if (splitted[i] != ""){
try {
if (splitted[i] == "children()"){
object = object.children();
} else {
if (splitted[i].indexOf("getChildAt(") == 0){
index = splitted[i].substring(11, splitted[i].indexOf(")", 11));
object = DisplayObjectContainer(object).getChildAt(index);
} else {
object = object[splitted[i]];
};
};
} catch(error:ReferenceError) {
send({text:COMMAND_NOTFOUND, target:target});
break;
};
};
i = (i + 1);
};
};
return (object);
}
private function printObject(_arg1, _arg2:String):String{
var _local3:String;
_local3 = "";
if (_arg2 == TYPE_BYTEARRAY){
_local3 = (_arg1["length"] + " bytes");
} else {
_local3 = htmlEscape(String(_arg1));
};
return (_local3);
}
private function clearTracesInternal():void{
if (enabled){
send({text:COMMAND_CLEAR_TRACES});
};
}
private function parseXML(_arg1, _arg2:String="", _arg3:int=1, _arg4:int=-1):String{
var _local5:String;
var _local6:int;
var _local7:String;
_local5 = "";
_local6 = 0;
if ((((_arg4 == -1)) || ((_arg3 <= _arg4)))){
if (_arg2.indexOf("@") != -1){
_local5 = (_local5 + createNode("node", {icon:ICON_XMLATTRIBUTE, label:_arg1, name:"", type:TYPE_XMLATTRIBUTE, value:_arg1, target:_arg2, access:ACCESS_VARIABLE, permission:PERMISSION_READWRITE}, true));
} else {
if (_arg1.name() == null){
_local5 = (_local5 + createNode("node", {icon:ICON_XMLVALUE, label:((("(" + TYPE_XMLVALUE) + ") = ") + printObject(_arg1, TYPE_XMLVALUE)), name:"", type:TYPE_XMLVALUE, value:printObject(_arg1, TYPE_XMLVALUE), target:_arg2, access:ACCESS_VARIABLE, permission:PERMISSION_READWRITE}, true));
} else {
if (_arg1.hasSimpleContent()){
_local5 = (_local5 + createNode("node", {icon:ICON_XMLNODE, label:(((_arg1.name() + " (") + TYPE_XMLNODE) + ")"), name:_arg1.name(), type:TYPE_XMLNODE, value:"", target:_arg2, access:ACCESS_VARIABLE, permission:PERMISSION_READWRITE}));
if (_arg1 != ""){
_local5 = (_local5 + createNode("node", {icon:ICON_XMLVALUE, label:((("(" + TYPE_XMLVALUE) + ") = ") + printObject(_arg1, TYPE_XMLVALUE)), name:"", type:TYPE_XMLVALUE, value:printObject(_arg1, TYPE_XMLVALUE), target:_arg2, access:ACCESS_VARIABLE, permission:PERMISSION_READWRITE}, true));
};
_local6 = 0;
while (_local6 < _arg1.attributes().length()) {
_local5 = (_local5 + createNode("node", {icon:ICON_XMLATTRIBUTE, label:((((("@" + _arg1.attributes()[_local6].name()) + " (") + TYPE_XMLATTRIBUTE) + ") = ") + _arg1.attributes()[_local6]), name:"", type:TYPE_XMLATTRIBUTE, value:_arg1.attributes()[_local6], target:(((_arg2 + ".") + "@") + _arg1.attributes()[_local6].name()), access:ACCESS_VARIABLE, permission:PERMISSION_READWRITE}, true));
_local6++;
};
_local5 = (_local5 + createNode("/node"));
} else {
_local5 = (_local5 + createNode("node", {icon:ICON_XMLNODE, label:(((_arg1.name() + " (") + TYPE_XMLNODE) + ")"), name:_arg1.name(), type:TYPE_XMLNODE, value:"", target:_arg2, access:ACCESS_VARIABLE, permission:PERMISSION_READWRITE}));
_local6 = 0;
while (_local6 < _arg1.attributes().length()) {
_local5 = (_local5 + createNode("node", {icon:ICON_XMLATTRIBUTE, label:((((("@" + _arg1.attributes()[_local6].name()) + " (") + TYPE_XMLATTRIBUTE) + ") = ") + _arg1.attributes()[_local6]), name:"", type:TYPE_XMLATTRIBUTE, value:_arg1.attributes()[_local6], target:(((_arg2 + ".") + "@") + _arg1.attributes()[_local6].name()), access:ACCESS_VARIABLE, permission:PERMISSION_READWRITE}, true));
_local6++;
};
_local6 = 0;
while (_local6 < _arg1.children().length()) {
_local7 = ((((_arg2 + ".") + "children()") + ".") + _local6);
_local5 = (_local5 + parseXML(_arg1.children()[_local6], _local7, (_arg3 + 1), _arg4));
_local6++;
};
_local5 = (_local5 + createNode("/node"));
};
};
};
};
return (_local5);
}
private function send(_arg1:Object):void{
var item:ByteArray;
var dataPackages:Array;
var i:int;
var bytesAvailable:int;
var offset:int;
var total:int;
var length:int;
var tmp:ByteArray;
var data = _arg1;
if (enabled){
item = new ByteArray();
item.writeObject(data);
item.compress();
dataPackages = new Array();
i = 0;
if (item.length > MAX_PACKAGE_BYTES){
bytesAvailable = item.length;
offset = 0;
total = Math.ceil((item.length / MAX_PACKAGE_BYTES));
i = 0;
while (i < total) {
length = bytesAvailable;
if (length > MAX_PACKAGE_BYTES){
length = MAX_PACKAGE_BYTES;
};
tmp = new ByteArray();
tmp.writeBytes(item, offset, length);
dataPackages.push({total:total, nr:(i + 1), bytes:tmp});
bytesAvailable = (bytesAvailable - length);
offset = (offset + length);
i = (i + 1);
};
} else {
dataPackages.push({total:1, nr:1, bytes:item});
};
i = 0;
while (i < dataPackages.length) {
try {
lineOut.send(LINE_OUT, "onReceivedData", dataPackages[i]);
} catch(error:Error) {
break;
};
i = (i + 1);
};
};
}
private function securityErrorHandler(_arg1:SecurityErrorEvent):void{
}
private function monitorHandler(_arg1:TimerEvent):void{
var _local2:uint;
var _local3:uint;
var _local4:uint;
var _local5:uint;
if (enabled){
_local2 = System.totalMemory;
_local3 = getTimer();
_local4 = (_local3 - monitorTime);
_local5 = ((monitorFrames / _local4) * 1000);
monitorFrames = 0;
monitorTime = _local3;
send({text:COMMAND_MONITOR, memory:_local2, fps:_local5, time:_local3, date:new Date()});
};
}
private function isDisplayObject(_arg1):Boolean{
return ((((_arg1 is DisplayObject)) || ((_arg1 is DisplayObjectContainer))));
}
private function snapshotInternal(_arg1:DisplayObject, _arg2:uint=0x111111):void{
var _local3:BitmapData;
var _local4:ByteArray;
if (enabled){
_local3 = new BitmapData(_arg1.width, _arg1.height);
_local3.draw(_arg1);
_local4 = _local3.getPixels(new Rectangle(0, 0, _arg1.width, _arg1.height));
send({text:COMMAND_SNAPSHOT, date:new Date(), target:String(_arg1), bytes:_local4, width:_arg1.width, height:_arg1.height, color:_arg2});
_local3.dispose();
_local4 = null;
};
}
public function onReceivedData(_arg1:ByteArray):void{
var object:*;
var method:Function;
var xml:XML;
var command:Object;
var bounds:Rectangle;
var data = _arg1;
if (enabled){
data.uncompress();
command = data.readObject();
switch (command["text"]){
case COMMAND_HELLO:
send({text:COMMAND_HELLO, version:VERSION});
break;
case COMMAND_ROOT:
object = getObject("", 0);
if (object != null){
xml = XML(parseObject(object, "", command["functions"], 1, 2));
send({text:COMMAND_ROOT, xml:xml});
if (isDisplayObject(object)){
xml = XML(parseDisplayObject(object, "", command["functions"], 1, 2));
send({text:COMMAND_BASE, xml:xml});
};
};
break;
case COMMAND_GET_OBJECT:
object = getObject(command["target"], 0);
if (object != null){
xml = XML(parseObject(object, command["target"], command["functions"], 1, 2));
send({text:COMMAND_GET_OBJECT, xml:xml});
};
break;
case COMMAND_GET_DISPLAYOBJECT:
object = getObject(command["target"], 0);
if (object != null){
if (isDisplayObject(object)){
xml = XML(parseDisplayObject(object, command["target"], command["functions"], 1, 2));
send({text:COMMAND_GET_DISPLAYOBJECT, xml:xml});
};
};
break;
case COMMAND_GET_PROPERTIES:
object = getObject(command["target"], 0);
if (object != null){
xml = XML(parseObject(object, command["target"], false, 1, 1));
send({text:COMMAND_GET_PROPERTIES, xml:xml});
};
break;
case COMMAND_GET_FUNCTIONS:
object = getObject(command["target"], 0);
if (object != null){
xml = XML(getFunctions(object, command["target"]));
send({text:COMMAND_GET_FUNCTIONS, xml:xml});
};
break;
case COMMAND_SET_PROPERTY:
object = getObject(command["target"], 1);
if (object != null){
try {
object[command["name"]] = command["value"];
send({text:COMMAND_SET_PROPERTY, value:object[command["name"]]});
} catch(error1:Error) {
send({text:COMMAND_NOTFOUND, target:command["target"]});
break;
};
};
break;
case COMMAND_CALL_METHOD:
method = getObject(command["target"], 0);
if (method != null){
if (command["returnType"] == TYPE_VOID){
method.apply(this, command["arguments"]);
} else {
object = method.apply(this, command["arguments"]);
xml = XML(parseObject(object, "", false, 1, 4));
send({text:COMMAND_CALL_METHOD, id:command["id"], xml:xml});
};
};
break;
case COMMAND_SHOW_HIGHLIGHT:
if (highlight != null){
try {
highlight.parent.removeChild(highlight);
highlight = null;
} catch(error2:Error) {
};
};
object = getObject(command["target"], 0);
if (((isDisplayObject(object)) && (isDisplayObject(object["parent"])))){
bounds = object.getBounds(object["parent"]);
highlight = new Sprite();
highlight.x = 0;
highlight.y = 0;
highlight.graphics.beginFill(0, 0);
highlight.graphics.lineStyle(HIGHLIGHT_BORDER, HIGHLIGHT_COLOR);
highlight.graphics.drawRect(bounds.x, bounds.y, bounds.width, bounds.height);
highlight.graphics.endFill();
highlight.mouseChildren = false;
highlight.mouseEnabled = false;
try {
object["parent"].addChild(highlight);
} catch(error3:Error) {
highlight = null;
};
};
break;
case COMMAND_HIDE_HIGHLIGHT:
if (highlight != null){
try {
highlight.parent.removeChild(highlight);
highlight = null;
} catch(error4:Error) {
};
};
break;
};
};
}
private function parseDisplayObject(_arg1, _arg2:String="", _arg3:Boolean=false, _arg4:int=1, _arg5:int=4):String{
var xml:String;
var childs:Array;
var child:DisplayObject;
var childType:String;
var childIcon:String;
var childName:String;
var childTarget:String;
var childChildren:String;
var i:int;
var n:int;
var ojectName:String;
var msg:String;
var object = _arg1;
var target = _arg2;
var functions = _arg3;
var currentDepth = _arg4;
var maxDepth = _arg5;
xml = "";
childType = "";
childIcon = "";
childName = "";
childTarget = "";
childChildren = "";
i = 0;
n = 0;
if ((((maxDepth == -1)) || ((currentDepth <= maxDepth)))){
if (currentDepth == 1){
xml = (xml + createNode("root"));
};
try {
if (currentDepth == 1){
ojectName = DisplayObject(object).name;
if ((((ojectName == null)) || ((ojectName == "null")))){
ojectName = "DisplayObject";
};
xml = (xml + createNode("node", {icon:ICON_ROOT, label:(("(" + ojectName) + ")"), target:target}));
};
childs = new Array();
i = 0;
while (i < DisplayObjectContainer(object).numChildren) {
childs.push(DisplayObjectContainer(object).getChildAt(i));
i = (i + 1);
};
i = 0;
while (i < childs.length) {
child = childs[i];
childName = describeType(child).@name;
childType = parseType(childName);
childTarget = ((((target + ".") + "getChildAt(") + i) + ")");
childIcon = ((child is DisplayObjectContainer)) ? ICON_ROOT : ICON_VARIABLE;
childChildren = ((child is DisplayObjectContainer)) ? String(DisplayObjectContainer(child).numChildren) : "";
xml = (xml + createNode("node", {icon:childIcon, label:((((child.name + " (") + childType) + ") ") + childChildren), name:child.name, type:childType, value:printObject(child, childType), target:childTarget, access:ACCESS_VARIABLE, permission:PERMISSION_READWRITE}));
try {
xml = (xml + parseDisplayObject(child, childTarget, functions, (currentDepth + 1), maxDepth));
} catch(error13:Error) {
xml = (xml + createNode("node", {icon:ICON_WARNING, type:TYPE_WARNING, label:"Unreadable", name:"Unreadable"}, true));
};
xml = (xml + createNode("/node"));
i = (i + 1);
};
if (currentDepth == 1){
xml = (xml + createNode("/node"));
};
} catch(error14:Error) {
msg = "";
msg = (msg + createNode("root"));
msg = (msg + createNode("node", {icon:ICON_WARNING, type:TYPE_WARNING, label:"Not found", name:"Not found"}, true));
msg = (msg + createNode("/root"));
send({text:COMMAND_NOTFOUND, target:target, xml:XML(msg)});
};
if (currentDepth == 1){
xml = (xml + createNode("/root"));
};
};
return (xml);
}
private function parseType(_arg1:String):String{
var _local2:String;
_local2 = _arg1;
if (_arg1.lastIndexOf("::") != -1){
_local2 = _arg1.substring((_arg1.lastIndexOf("::") + 2), _arg1.length);
};
if (_local2.lastIndexOf(".") != -1){
_local2 = _local2.substring(0, _local2.lastIndexOf("."));
};
if (_local2 == TYPE_METHOD){
_local2 = TYPE_FUNCTION;
};
return (htmlEscape(_local2));
}
private function parseObject(_arg1, _arg2:String="", _arg3:Boolean=false, _arg4:int=1, _arg5:int=4):String{
var xml:String;
var childType:String;
var childName:String;
var childTarget:String;
var description:XML;
var type:String;
var base:String;
var isXML:Boolean;
var isXMLString:XML;
var i:int;
var n:int;
var keys:Array;
var key:*;
var properties:Array;
var prop:*;
var variables:XMLList;
var accessors:XMLList;
var constants:XMLList;
var methods:XMLList;
var variablesArr:Array;
var methodsArr:Array;
var double:Boolean;
var permission:String;
var icon:String;
var returnType:String;
var parameters:XMLList;
var args:Array;
var msg:String;
var object = _arg1;
var target = _arg2;
var functions = _arg3;
var currentDepth = _arg4;
var maxDepth = _arg5;
xml = "";
childType = "";
childName = "";
childTarget = "";
description = new XML();
type = "";
base = "";
isXML = false;
i = 0;
n = 0;
if ((((maxDepth == -1)) || ((currentDepth <= maxDepth)))){
if (currentDepth == 1){
xml = (xml + createNode("root"));
};
try {
description = describeType(object);
type = parseType(description.@name);
base = parseType(description.@base);
if (((functions) && ((base == TYPE_FUNCTION)))){
xml = (xml + createNode("node", {icon:ICON_FUNCTION, label:"(Function)", name:"", type:TYPE_FUNCTION, value:"", target:target, access:ACCESS_VARIABLE, permission:PERMISSION_READWRITE}, true));
} else {
if ((((type == TYPE_ARRAY)) || ((type == TYPE_VECTOR)))){
if (currentDepth == 1){
xml = (xml + createNode("node", {icon:ICON_ROOT, label:(("(" + type) + ")"), target:target}));
};
xml = (xml + createNode("node", {icon:ICON_VARIABLE, label:(((("length" + " (") + TYPE_UINT) + ") = ") + object["length"]), name:"length", type:TYPE_UINT, value:object["length"], target:((target + ".") + "length"), access:ACCESS_VARIABLE, permission:PERMISSION_READONLY}, true));
keys = new Array();
for (key in object) {
keys.push(key);
};
keys.sort();
i = 0;
while (i < keys.length) {
childType = parseType(describeType(object[keys[i]]).@name);
childTarget = ((target + ".") + String(keys[i]));
if ((((((((((((childType == TYPE_STRING)) || ((childType == TYPE_BOOLEAN)))) || ((childType == TYPE_NUMBER)))) || ((childType == TYPE_INT)))) || ((childType == TYPE_UINT)))) || ((childType == TYPE_FUNCTION)))){
isXML = false;
isXMLString = new XML();
if (childType == TYPE_STRING){
try {
isXMLString = new XML(object[keys[i]]);
if (((!(isXMLString.hasSimpleContent())) && ((isXMLString.children().length() > 0)))){
isXML = true;
};
} catch(error1:TypeError) {
};
};
try {
if (!isXML){
xml = (xml + createNode("node", {icon:ICON_VARIABLE, label:((((("[" + keys[i]) + "] (") + childType) + ") = ") + printObject(object[keys[i]], childType)), name:(("[" + keys[i]) + "]"), type:childType, value:printObject(object[keys[i]], childType), target:childTarget, access:ACCESS_VARIABLE, permission:PERMISSION_READWRITE}, true));
} else {
xml = (xml + createNode("node", {icon:ICON_VARIABLE, label:(((("[" + keys[i]) + "] (") + childType) + ")"), name:(("[" + keys[i]) + "]"), type:childType, value:"", target:childTarget, access:ACCESS_VARIABLE, permission:PERMISSION_READWRITE}, false));
xml = (xml + parseXML(isXMLString, ((childTarget + ".") + "cildren()"), currentDepth, maxDepth));
xml = (xml + createNode("/node"));
};
} catch(error2:Error) {
};
} else {
xml = (xml + createNode("node", {icon:ICON_VARIABLE, label:(((("[" + keys[i]) + "] (") + childType) + ")"), name:(("[" + keys[i]) + "]"), type:childType, value:"", target:childTarget, access:ACCESS_VARIABLE, permission:PERMISSION_READWRITE}));
try {
xml = (xml + parseObject(object[keys[i]], childTarget, functions, (currentDepth + 1), maxDepth));
} catch(error3:Error) {
xml = (xml + createNode("node", {icon:ICON_WARNING, type:TYPE_WARNING, label:"Unreadable", name:"Unreadable"}, true));
};
xml = (xml + createNode("/node"));
};
i = (i + 1);
};
if (currentDepth == 1){
xml = (xml + createNode("/node"));
};
} else {
if (type == TYPE_OBJECT){
if (currentDepth == 1){
xml = (xml + createNode("node", {icon:ICON_ROOT, label:(("(" + type) + ")"), target:target}));
};
properties = new Array();
for (prop in object) {
properties.push(prop);
};
properties.sort();
i = 0;
while (i < properties.length) {
childType = parseType(describeType(object[properties[i]]).@name);
childTarget = ((target + ".") + properties[i]);
if ((((((((((((childType == TYPE_STRING)) || ((childType == TYPE_BOOLEAN)))) || ((childType == TYPE_NUMBER)))) || ((childType == TYPE_INT)))) || ((childType == TYPE_UINT)))) || ((childType == TYPE_FUNCTION)))){
isXML = false;
isXMLString = new XML();
if (childType == TYPE_STRING){
try {
isXMLString = new XML(object[properties[i]]);
if (((!(isXMLString.hasSimpleContent())) && ((isXMLString.children().length() > 0)))){
isXML = true;
};
} catch(error4:TypeError) {
};
};
try {
if (!isXML){
xml = (xml + createNode("node", {icon:ICON_VARIABLE, label:((((properties[i] + " (") + childType) + ") = ") + printObject(object[properties[i]], childType)), name:properties[i], type:childType, value:printObject(object[properties[i]], childType), target:childTarget, access:ACCESS_VARIABLE, permission:PERMISSION_READWRITE}, true));
} else {
xml = (xml + createNode("node", {icon:ICON_VARIABLE, label:(((properties[i] + " (") + childType) + ")"), name:properties[i], type:childType, value:"", target:childTarget, access:ACCESS_VARIABLE, permission:PERMISSION_READWRITE}, false));
xml = (xml + parseXML(isXMLString, ((childTarget + ".") + "cildren()"), currentDepth, maxDepth));
xml = (xml + createNode("/node"));
};
} catch(error5:Error) {
};
} else {
xml = (xml + createNode("node", {icon:ICON_VARIABLE, label:(((properties[i] + " (") + childType) + ")"), name:properties[i], type:childType, value:"", target:childTarget, access:ACCESS_VARIABLE, permission:PERMISSION_READWRITE}));
try {
xml = (xml + parseObject(object[properties[i]], childTarget, functions, (currentDepth + 1), maxDepth));
} catch(error6:Error) {
xml = (xml + createNode("node", {icon:ICON_WARNING, type:TYPE_WARNING, label:"Unreadable", name:"Unreadable"}, true));
};
xml = (xml + createNode("/node"));
};
i = (i + 1);
};
if (currentDepth == 1){
xml = (xml + createNode("/node"));
};
} else {
if (type == TYPE_XML){
if (currentDepth == 1){
xml = (xml + createNode("node", {icon:ICON_ROOT, label:(("(" + type) + ")"), target:target}));
};
xml = (xml + parseXML(object, ((target + ".") + "cildren()"), currentDepth, maxDepth));
if (currentDepth == 1){
xml = (xml + createNode("/node"));
};
} else {
if (type == TYPE_XMLLIST){
if (currentDepth == 1){
xml = (xml + createNode("node", {icon:ICON_ROOT, label:(("(" + type) + ")"), target:target}));
};
xml = (xml + createNode("node", {icon:ICON_VARIABLE, label:(((("length" + " (") + TYPE_UINT) + ") = ") + object.length()), name:"length", type:TYPE_UINT, value:object.length(), target:((target + ".") + "length"), access:ACCESS_VARIABLE, permission:PERMISSION_READONLY}, true));
i = 0;
while (i < object.length()) {
xml = (xml + parseXML(object[i], (((target + ".") + String(i)) + ".children()"), currentDepth, maxDepth));
i = (i + 1);
};
if (currentDepth == 1){
xml = (xml + createNode("/node"));
};
} else {
if ((((((((((type == TYPE_STRING)) || ((type == TYPE_BOOLEAN)))) || ((type == TYPE_NUMBER)))) || ((type == TYPE_INT)))) || ((type == TYPE_UINT)))){
isXML = false;
isXMLString = new XML();
if (type == TYPE_STRING){
try {
isXMLString = new XML(object);
if (((!(isXMLString.hasSimpleContent())) && ((isXMLString.children().length() > 0)))){
isXML = true;
};
} catch(error7:TypeError) {
};
};
try {
if (!isXML){
xml = (xml + createNode("node", {icon:ICON_VARIABLE, label:((("(" + type) + ") = ") + printObject(object, type)), name:"", type:type, value:printObject(object, type), target:target, access:ACCESS_VARIABLE, permission:PERMISSION_READWRITE}, true));
} else {
xml = (xml + createNode("node", {icon:ICON_VARIABLE, label:(("(" + type) + ")"), name:"", type:type, value:"", target:target, access:ACCESS_VARIABLE, permission:PERMISSION_READWRITE}, false));
xml = (xml + parseXML(isXMLString, ((target + ".") + "cildren()"), currentDepth, maxDepth));
xml = (xml + createNode("/node"));
};
} catch(error8:Error) {
};
} else {
if (currentDepth == 1){
xml = (xml + createNode("node", {icon:ICON_ROOT, label:(("(" + type) + ")"), target:target}));
};
variables = description..variable;
accessors = description..accessor;
constants = description..constant;
methods = description..method;
variablesArr = new Array();
methodsArr = new Array();
double = false;
permission = "";
icon = "";
double = false;
i = 0;
while (i < variables.length()) {
n = 0;
while (n < variablesArr.length) {
if (variablesArr[n].name == variables[i].@name){
double = true;
break;
};
n = (n + 1);
};
if (!double){
variablesArr.push({name:variables[i].@name, xml:variables[i], access:ACCESS_VARIABLE});
};
i = (i + 1);
};
double = false;
i = 0;
while (i < accessors.length()) {
n = 0;
while (n < variablesArr.length) {
if (variablesArr[n].name == accessors[i].@name){
double = true;
break;
};
n = (n + 1);
};
if (!double){
variablesArr.push({name:accessors[i].@name, xml:accessors[i], access:ACCESS_ACCESSOR});
};
i = (i + 1);
};
double = false;
i = 0;
while (i < constants.length()) {
n = 0;
while (n < variablesArr.length) {
if (variablesArr[n].name == constants[i].@name){
double = true;
break;
};
n = (n + 1);
};
if (!double){
variablesArr.push({name:constants[i].@name, xml:constants[i], access:ACCESS_CONSTANT});
};
i = (i + 1);
};
double = false;
i = 0;
while (i < methods.length()) {
n = 0;
while (n < methodsArr.length) {
if (methodsArr[n].name == methods[i].@name){
double = true;
break;
};
n = (n + 1);
};
if (!double){
methodsArr.push({name:methods[i].@name, xml:methods[i], access:ACCESS_METHOD});
};
i = (i + 1);
};
variablesArr.sortOn("name");
methodsArr.sortOn("name");
i = 0;
while (i < variablesArr.length) {
childType = parseType(variablesArr[i].xml.@type);
childName = variablesArr[i].xml.@name;
childTarget = ((target + ".") + childName);
permission = PERMISSION_READWRITE;
icon = ICON_VARIABLE;
if (variablesArr[i].access == ACCESS_CONSTANT){
permission = PERMISSION_READONLY;
icon = ICON_VARIABLE_READONLY;
};
if (variablesArr[i].xml.@access == PERMISSION_READONLY){
permission = PERMISSION_READONLY;
icon = ICON_VARIABLE_READONLY;
};
if (variablesArr[i].xml.@access == PERMISSION_WRITEONLY){
permission = PERMISSION_WRITEONLY;
icon = ICON_VARIABLE_WRITEONLY;
};
if (permission != PERMISSION_WRITEONLY){
if ((((((((((((childType == TYPE_STRING)) || ((childType == TYPE_BOOLEAN)))) || ((childType == TYPE_NUMBER)))) || ((childType == TYPE_INT)))) || ((childType == TYPE_UINT)))) || ((childType == TYPE_FUNCTION)))){
isXML = false;
isXMLString = new XML();
if (childType == TYPE_STRING){
try {
isXMLString = new XML(object[childName]);
if (((!(isXMLString.hasSimpleContent())) && ((isXMLString.children().length() > 0)))){
isXML = true;
};
} catch(error9:TypeError) {
};
};
try {
if (!isXML){
xml = (xml + createNode("node", {icon:icon, label:((((childName + " (") + childType) + ") = ") + printObject(object[childName], childType)), name:childName, type:childType, value:printObject(object[childName], childType), target:childTarget, access:variablesArr[i].access, permission:permission}, true));
} else {
xml = (xml + createNode("node", {icon:icon, label:(((childName + " (") + childType) + ")"), name:childName, type:childType, value:"", target:childTarget, access:variablesArr[i].access, permission:permission}, false));
xml = (xml + parseXML(isXMLString, ((childTarget + ".") + "cildren()"), currentDepth, maxDepth));
xml = (xml + createNode("/node"));
};
} catch(error10:Error) {
};
} else {
xml = (xml + createNode("node", {icon:icon, label:(((childName + " (") + childType) + ")"), name:childName, type:childType, target:childTarget, access:variablesArr[i].access, permission:permission}));
try {
xml = (xml + parseObject(object[childName], childTarget, functions, (currentDepth + 1), maxDepth));
} catch(error11:Error) {
xml = (xml + createNode("node", {icon:ICON_WARNING, type:TYPE_WARNING, label:"Unreadable", name:"Unreadable"}, true));
};
xml = (xml + createNode("/node"));
};
};
i = (i + 1);
};
if (functions){
i = 0;
while (i < methodsArr.length) {
childType = TYPE_FUNCTION;
childName = methodsArr[i].xml.@name;
childTarget = ((target + ".") + childName);
returnType = parseType(methodsArr[i].xml.@returnType);
parameters = methodsArr[i].xml..parameter;
args = new Array();
n = 0;
while (n < parameters.length()) {
args.push(parseType(parameters[n].@type));
n = (n + 1);
};
xml = (xml + createNode("node", {icon:ICON_FUNCTION, label:((((childName + "(") + args.join(", ")) + "):") + returnType), args:args.join(", "), name:childName, type:TYPE_FUNCTION, access:variablesArr[i].access, returnType:returnType, target:childTarget}, true));
i = (i + 1);
};
};
if (currentDepth == 1){
xml = (xml + createNode("/node"));
};
};
};
};
};
};
};
} catch(error12:Error) {
msg = "";
msg = (msg + createNode("root"));
msg = (msg + createNode("node", {icon:ICON_WARNING, type:TYPE_WARNING, label:"Not found", name:"Not found"}, true));
msg = (msg + createNode("/root"));
send({text:COMMAND_NOTFOUND, target:target, xml:XML(msg)});
};
if (currentDepth == 1){
xml = (xml + createNode("/root"));
};
};
return (xml);
}
private function getFunctions(_arg1, _arg2:String=""):String{
var xml:String;
var description:XML;
var type:String;
var childType:String;
var childName:String;
var childTarget:String;
var methods:XMLList;
var methodsArr:Array;
var returnType:String;
var parameters:XMLList;
var args:Array;
var argsString:String;
var optional:Boolean;
var double:Boolean;
var i:int;
var n:int;
var msg:String;
var object = _arg1;
var target = _arg2;
xml = "";
xml = (xml + createNode("root"));
try {
description = describeType(object);
type = parseType(description.@name);
childType = "";
childName = "";
childTarget = "";
methods = description..method;
methodsArr = new Array();
optional = false;
double = false;
i = 0;
n = 0;
xml = (xml + createNode("node", {icon:ICON_DEFAULT, label:(("(" + type) + ")"), target:target}));
i = 0;
while (i < methods.length()) {
n = 0;
while (n < methodsArr.length) {
if (methodsArr[n].name == methods[i].@name){
double = true;
break;
};
n = (n + 1);
};
if (!double){
methodsArr.push({name:methods[i].@name, xml:methods[i], access:ACCESS_METHOD});
};
i = (i + 1);
};
methodsArr.sortOn("name");
i = 0;
while (i < methodsArr.length) {
childType = TYPE_FUNCTION;
childName = methodsArr[i].xml.@name;
childTarget = ((target + ".") + childName);
returnType = parseType(methodsArr[i].xml.@returnType);
parameters = methodsArr[i].xml..parameter;
args = new Array();
argsString = "";
optional = false;
n = 0;
while (n < parameters.length()) {
if ((((parameters[n].@optional == "true")) && (!(optional)))){
optional = true;
args.push("[");
};
args.push(parseType(parameters[n].@type));
n = (n + 1);
};
if (optional){
args.push("]");
};
argsString = args.join(", ");
argsString = argsString.replace("[, ", "[");
argsString = argsString.replace(", ]", "]");
xml = (xml + createNode("node", {icon:ICON_FUNCTION, label:((((childName + "(") + argsString) + "):") + returnType), args:argsString, name:childName, type:TYPE_FUNCTION, access:ACCESS_METHOD, returnType:returnType, target:childTarget}));
n = 0;
while (n < parameters.length()) {
xml = (xml + createNode("parameter", {type:parseType(parameters[n].@type), index:parameters[n].@index, optional:parameters[n].@optional}, true));
n = (n + 1);
};
xml = (xml + createNode("/node"));
i = (i + 1);
};
xml = (xml + createNode("/node"));
} catch(error:Error) {
msg = "";
msg = (msg + createNode("root"));
msg = (msg + createNode("node", {icon:ICON_WARNING, type:TYPE_WARNING, label:"Not found", name:"Not found"}, true));
msg = (msg + createNode("/root"));
send({text:COMMAND_NOTFOUND, target:target, xml:XML(msg)});
};
xml = (xml + createNode("/root"));
return (xml);
}
private function statusHandler(_arg1:StatusEvent):void{
}
public static function get enabled():Boolean{
if (instance == null){
instance = new MonsterDebugger(null);
};
return (instance._enabled);
}
public static function snapshot(_arg1:DisplayObject, _arg2:uint=0x111111):void{
if (instance == null){
instance = new MonsterDebugger(MonsterDebugger.singletonCheck);
};
if (MonsterDebugger.enabled){
instance.snapshotInternal(_arg1, _arg2);
};
}
public static function trace(_arg1:Object, _arg2, _arg3:uint=0x111111, _arg4:Boolean=false, _arg5:int=4):void{
if (instance == null){
instance = new MonsterDebugger(MonsterDebugger.singletonCheck);
};
if (MonsterDebugger.enabled){
instance.traceInternal(_arg1, _arg2, _arg3, _arg4, _arg5);
};
}
public static function set enabled(_arg1:Boolean):void{
if (instance == null){
instance = new MonsterDebugger(null);
};
instance._enabled = _arg1;
}
public static function inspect(_arg1:Object):void{
var _local2:*;
var _local3:XML;
if (((!((instance == null))) && (!((_arg1 == null))))){
instance.root = _arg1;
_local2 = instance.getObject("", 0);
if (_local2 != null){
_local3 = XML(instance.parseObject(_local2, "", false, 1, 2));
instance.send({text:instance.COMMAND_INSPECT, xml:_local3});
if (instance.isDisplayObject(_local2)){
_local3 = XML(instance.parseDisplayObject(_local2, "", false, 1, 2));
instance.send({text:instance.COMMAND_BASE, xml:_local3});
};
};
};
}
public static function clearTraces():void{
if (instance == null){
instance = new MonsterDebugger(MonsterDebugger.singletonCheck);
};
if (MonsterDebugger.enabled){
instance.clearTracesInternal();
};
}
private static function singletonCheck():void{
}
}
}//package nl.demonsters.debugger
Section 13
//InboxDebugger (uk.co.inbox.debug.InboxDebugger)
package uk.co.inbox.debug {
public class InboxDebugger {
private static const connectionName:String = "_connectionDebugger";
private static const methodName:String = "outPut";
private static var sendoutput:Boolean = true;
public static function set output(_arg1:Boolean):void{
}
static function send(_arg1:String="", _arg2:int=0):void{
}
}
}//package uk.co.inbox.debug
Section 14
//outPut (uk.co.inbox.debug.outPut)
package uk.co.inbox.debug {
public function outPut(_arg1:String="", _arg2:int=0):void{
trace(_arg1);
InboxDebugger.send(_arg1, _arg2);
}
}//package uk.co.inbox.debug
Section 15
//getText (uk.co.inbox.language.getText)
package uk.co.inbox.language {
public function getText(_arg1:String):String{
return (LangContent.getText(_arg1));
}
}//package uk.co.inbox.language
Section 16
//LangContent (uk.co.inbox.language.LangContent)
package uk.co.inbox.language {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import uk.co.inbox.tracking.*;
import uk.co.inbox.utils.*;
import uk.co.inbox.debug.*;
import flash.net.*;
import flash.system.*;
public class LangContent extends EventDispatcher {
public static const LOADED:String = "loaded";
public static const STATE_LOADED:String = "loaded";
public static const STATE_SUCCESS:String = "success";
public static const CHANGE:String = "change";
private static const keyStateList:Array = new Array(222);
public static const STATE_FAILED:String = "failed";
public static const STATE_LOADING:String = "loading";
private static const EXCEL_GENERATOR_SCRIPT:String = "http://www.inbox.co.uk/languages/create_excel3.php";
private static var errorCharacter:String = "!";
private static var currentLang:String = "en";
private static var _langList:Array = [];
private static var isDebugMode:Boolean = false;
private static var _status:String;
private static var isTestMode:Boolean = false;
protected static var disp:EventDispatcher;
private static var myStage:Stage;
private static var defaultLang:String = "en";
private static var myLangUI:LangUI;
private static var isInit:Boolean = false;
private static var myLangStrings:LangStrings;
private static var langContentList:Array = [];
private static var isInitLoad:Boolean = true;
private static var isErrorToDefaultLang:Boolean = false;
private static var firstLoadCount:int;
public static function init(_arg1:Stage=null, _arg2:String="", _arg3:Boolean=true):void{
var _local4:String;
var _local5:Boolean;
var _local6:int;
var _local7:String;
if (!isInit){
isInit = true;
debugTrace("initialise");
debugTrace((" $forceLang:" + _arg2));
myStage = _arg1;
myLangStrings = new LangStrings();
_langList = myLangStrings.getLangList();
isTestMode = _arg3;
if (myStage != null){
myStage.addEventListener(KeyboardEvent.KEY_DOWN, keyPress, false, 0, true);
myStage.addEventListener(KeyboardEvent.KEY_UP, keyRelease, false, 0, true);
};
if (isTestMode){
currentLang = defaultLang;
_status = STATE_SUCCESS;
isInitLoad = false;
dispatchEvent(new Event(LOADED));
} else {
if (((!((CustomSharedObject.get("myLang", "none") == "none"))) && (!(Settings.get("isLocal"))))){
_local7 = CustomSharedObject.get("myLang");
} else {
if (_arg2 != null){
_local7 = _arg2;
} else {
_local7 = Capabilities.language.slice(0, 2);
};
};
_local4 = "";
_local5 = false;
_local6 = 0;
while (((!(_local5)) && ((_local6 < _langList.length)))) {
trace((((" _langList[i].code:" + _langList[_local6].code) + ", sniffLang:") + _local7));
if (_langList[_local6].code == _local7){
_local5 = true;
_local4 = _local7;
} else {
_local6++;
};
};
debugTrace((" isFoundValidLanguage:" + _local5));
debugTrace((" initLang:" + _local4));
debugTrace((" sniffLang:" + _local7));
if (!_local5){
_local4 = defaultLang;
};
if (_local4 == defaultLang){
firstLoadCount = 1;
} else {
firstLoadCount = 0;
loadLang(defaultLang);
};
if (Settings.get("isLocal")){
isErrorToDefaultLang = true;
};
currentLang = _local4;
CustomSharedObject.set({myLang:currentLang});
loadLang(currentLang);
};
} else {
dispatchEvent(new Event(LOADED));
};
}
public static function get status():String{
return (_status);
}
private static function removeUI():void{
myStage.removeChild(myLangUI);
}
public static function checkValidText(_arg1:String):Boolean{
return (!((myLangStrings.getData(_arg1, currentLang) == null)));
}
private static function keyPress(_arg1:KeyboardEvent):void{
keyStateList[_arg1.keyCode] = 1;
if (keyStateList[71] == 1){
if (keyStateList[76] == 1){
if (keyStateList[69] == 1){
toggleUI();
};
};
};
}
private static function keyRelease(_arg1:KeyboardEvent):void{
keyStateList[_arg1.keyCode] = -1;
}
public static function get langList():Array{
return (_langList.slice());
}
public static function get text():LangStrings{
return (myLangStrings);
}
public static function returnSuccess(_arg1:Event):void{
var _local2:URLLoader;
debugTrace("- returnSuccess");
_local2 = URLLoader(_arg1.target);
parseLang(_local2.data, currentLang);
_status = STATE_LOADED;
firstLoadCount++;
if (isInitLoad){
if (firstLoadCount == 2){
dispatchEvent(new Event(LOADED));
isInitLoad = false;
};
} else {
dispatchEvent(new Event(CHANGE));
};
}
private static function debugTrace(_arg1, _arg2:Boolean=false):void{
if (((isDebugMode) || (_arg2))){
outPut(("LangContent - " + _arg1));
};
}
public static function returnFailure(_arg1:IOErrorEvent):void{
debugTrace(("returnFailure - event:" + _arg1));
_status = STATE_FAILED;
currentLang = defaultLang;
if (isInitLoad){
isInitLoad = false;
dispatchEvent(new Event(LOADED));
} else {
dispatchEvent(new Event(CHANGE));
};
isInitLoad = false;
}
public static function getText(_arg1:String):String{
var _local2:String;
debugTrace(("LangContent - getText - currentLang:" + currentLang));
_local2 = myLangStrings.getData(_arg1, currentLang);
debugTrace((" retText:" + _local2));
if (_local2 == null){
debugTrace((" Error - text Id not found:" + _arg1));
if (isErrorToDefaultLang){
_local2 = myLangStrings.getData(_arg1, defaultLang);
if (_local2 == null){
if (_arg1 == ""){
_local2 = "";
} else {
_local2 = (errorCharacter + _arg1);
};
};
} else {
if (_arg1 == ""){
_local2 = "";
} else {
_local2 = (errorCharacter + _arg1);
};
};
};
return (Validation.trimText(_local2));
}
public static function get isMultiLang():Boolean{
if (_langList.length <= 1){
return (false);
};
return (true);
}
private static function parseLang(_arg1:String, _arg2:String):void{
var _local3:Array;
var _local4:Object;
var _local5:String;
var _local6:Array;
_local3 = _arg1.split("&");
langContentList[_arg2] = _arg1;
_local4 = {};
for (_local5 in _local3) {
_local6 = _local3[_local5].split("=");
_local4[_local6[0]] = unescape(_local6[1]);
};
myLangStrings.updateStrings(_local4, _arg2);
}
public static function changeLang(_arg1:String):void{
CustomSharedObject.set({myLang:_arg1});
InboxTag.callTag(InboxTagData.CHANGE_LANGUAGE, _arg1, currentLang);
currentLang = _arg1;
loadLang(currentLang);
}
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);
}
private static function onExportComplete(_arg1:Event):void{
var _local2:URLLoader;
var _local3:URLVariables;
debugTrace(("onExportComplete: " + _arg1.target.data));
_local2 = URLLoader(_arg1.target);
trace(("loader1.data: " + _local2.data));
if (_local2.data.slice(-1) == "&"){
_local2.data = _local2.data.slice(0, (_local2.data.length - 1));
};
if (_local2.data.slice(0, 1) == "&"){
_local2.data = _local2.data.slice(1, _local2.data.length);
};
trace(("loader2.data:" + _local2.data));
_local3 = new URLVariables(_local2.data);
myLangUI.promptExportComplete(_local3.excelurl);
}
public static function addEventListener(... _args):void{
if (disp == null){
disp = new EventDispatcher();
};
disp.addEventListener.apply(null, _args);
}
private static function showUI():void{
myLangUI = new LangUI();
myLangUI.addEventListener(LangUI.EXPORT, onExport, false, 0, true);
myStage.addChild(myLangUI);
myLangUI.startIntro();
}
private static function getStringList():Array{
return (myLangStrings.getDefaultStrings());
}
private static function onExportError(_arg1:Event):void{
debugTrace(("onExportError: " + _arg1));
}
public static function set status(_arg1:String):void{
_status = _arg1;
}
public static function get lang():String{
return (currentLang);
}
private static function onExport(_arg1:Event):void{
var _local2:URLRequest;
var _local3:URLVariables;
var _local4:Date;
var _local5:String;
var _local6:int;
var _local7:Array;
var _local8:String;
var _local9:String;
var _local10:int;
var _local11:URLLoader;
debugTrace("onExport");
_local2 = new URLRequest(EXCEL_GENERATOR_SCRIPT);
_local3 = new URLVariables();
_local4 = new Date();
_local3.rnd = _local4.getTime();
_local3.projectid = Settings.get("projectId");
_local5 = "";
_local6 = 0;
while (_local6 < _langList.length) {
_local5 = (_local5 + (_langList[_local6].code + "|"));
_local6++;
};
_local5 = _local5.slice(0, -1);
_local3.langcodelist = _local5;
_local7 = getStringList();
debugTrace((" strList:" + _local7));
_local8 = "";
_local9 = "";
_local10 = (_local7.length - 1);
while (_local10 >= 0) {
_local8 = (_local8 + (escapeMultiByte(_local7[_local10].name) + "|"));
_local9 = (_local9 + (escapeMultiByte(_local7[_local10].content) + "|"));
_local10--;
};
_local8 = _local8.slice(0, -1);
_local9 = _local9.slice(0, -1);
_local3.idlist = _local8;
_local3.contentlist = _local9;
_local2.data = _local3;
_local2.method = URLRequestMethod.POST;
_local11 = new URLLoader(_local2);
_local11.addEventListener(IOErrorEvent.IO_ERROR, onExportError, false, 0, true);
_local11.addEventListener(Event.COMPLETE, onExportComplete, false, 0, true);
}
private static function loadLang(_arg1:String):void{
var req:URLRequest;
var vars:URLVariables;
var langVars:URLLoader;
var langToLoad = _arg1;
debugTrace("loadLang");
debugTrace((" langToLoad:" + langToLoad));
langContentList[currentLang] = {};
_status = STATE_LOADING;
if (Settings.get("isLocal")){
req = new URLRequest((("langs/" + langToLoad) + ".txt"));
} else {
req = new URLRequest((((Settings.get("flashFilesPath") + "langs/") + langToLoad) + ".txt"));
};
vars = new URLVariables();
try {
langVars = new URLLoader(req);
} catch(e:Error) {
returnFailure(null);
};
langVars.addEventListener(Event.COMPLETE, returnSuccess);
langVars.addEventListener(IOErrorEvent.IO_ERROR, returnFailure);
}
private static function toggleUI():void{
if (myLangUI == null){
showUI();
} else {
if (myStage.contains(myLangUI)){
removeUI();
} else {
showUI();
};
};
}
}
}//package uk.co.inbox.language
Section 17
//LangStrings (uk.co.inbox.language.LangStrings)
package uk.co.inbox.language {
import game.profile.*;
import flash.utils.*;
import uk.co.inbox.utils.*;
import uk.co.inbox.debug.*;
public dynamic class LangStrings {
private const LANGUAGES_LIST:Array;
private var isDebugMode:Boolean;// = true
private var dataObj:Object;
private var defaultLang:String;// = "en"
private var defaultList:Array;
public static var chatPlayerLeft:String = "<player> has left the game";
public static var replayLoadingTitle:String = "Replay mode";
public static var loginClose:String = "Close";
public static var day4:String = "Thursday";
public static var day5:String = "Friday";
public static var day6:String = "Saturday";
public static var day0:String = "Sunday";
public static var day1:String = "Monday";
public static var gameTip7p:String = "You need a direct hit to kill an enemy with a missile";
public static var day3:String = "Wednesday";
public static var replayLoadingLoading:String = "Scanning";
public static var day2:String = "Tuesday";
public static var upgradeExtendedPickups1:String = "Extra Bonus Turn I";
public static var upgradeExtendedPickups2:String = "Extra Bonus Turn II";
public static var moonZoomOut:String = "zoom out";
public static var upgradeExtendedLaserDescr1:String = "Fires an additional laser in the opposite direction";
public static var academyTab1:String = "Helium-3 story";
public static var academyTab2:String = "Training zone";
public static var academyTab3:String = "Discovery moon videos";
public static var levelUpgradedTitle:String = "Level increased";
public static var strategySaving:String = "Saving";
public static var gameTip6p:String = "Careful! Kamikaze kills yourself and enemies within one square";
public static var mpDisabledTitle:String = "Connection failed";
public static var tutorial2_Bubble1:String = "Click your X-TRAC vehicle to select it";
public static var tutorial2_Bubble2:String = "Select MINE from the action menu";
public static var tutorial2_Bubble3:String = "Darker blue squares have more Helium-3 in them. Click the square highlighted by the arrow to mine there";
public static var gameOverSpLoggedInTitleLose:String = "Unlucky, you came <gamePos>";
public static var profileWarningTitle2:String = "Access denied";
public static var strategyNoThanks:String = "No thanks";
public static var optionPrepareSuperLaser:String = "Arm super laser";
public static var connectingBody:String = "Authorising your accreditation";
public static var tutorial1_objective:String = "MOVING YOUR X-TRAC VEHICLE";
public static var profileMatchesLoadError:String = "Sorry, couldn't load games";
public static var month11:String = "December";
public static var month10:String = "November";
public static var waiting2Update:String = "Update";
public static var upgradeExtendedShield1:String = "Extra";
public static var gameHolderTitle:String = "Initialising";
public static var connectionFailed:String = "Connection failed";
public static var video3_2:String = "Competition between rival mining companies is fierce.";
public static var video3_3:String = "Zonal disputes, claim-stealing, sabotage and attacks from mercenaries are hazards that must be faced.";
public static var gameOverSpLoggedInTitleWin:String = "Well done, you came <gamePos>";
public static var video3_6:String = "Defence of your claim is not only your choice it's your constitutional right.";
public static var video3_1:String = "At $4 million per kilo, Helium-3 is the most valuable natural resource in the universe.";
public static var video3_4:String = "The 2033 Heston Proclamation granted miners the right to bear arms in defence of their claim.";
public static var upgradeExtendedMiningDescr1:String = "Increases your mine preparation range by one square";
public static var upgradeExtendedMiningDescr2:String = "Increases your mine preparation range by two squares";
public static var moonTheMoon:String = "The Moon";
public static var splashPlayGame:String = "Play Game";
public static var video3_5:String = "Your X-TRAC vehicle is fitted with twin GR80 Pulse Laser Cannons.";
public static var loginSubmit:String = "Log in";
public static var registerSelectYourCountry:String = "Select your country";
public static var profileGamesPlayedErrorGeneral:String = "Sorry, couldn't load your games";
public static var rankingLevel:String = "Level";
public static var profileGlobalRank:String = "Global rank";
public static var academyGame:String = "Basic training:<br>- Moving<br>- Mining<br>- Weapons";
public static var validationEnterName:String = "Please enter a name";
public static var strategyUpgradeRemove:String = "Remove";
public static var strategySaveChanges:String = "Save changes";
public static var tutorial1_BubbleFail:String = "You need to move to the highlighted square. Try again";
public static var optionPrepareSuperMissile:String = "Arm super missile";
public static var lunarCoordinates:String = "Lunar coordinates";
public static var optionPrepareSuperDeflect:String = "Super Deflect";
public static var loginRegister:String = "Register";
public static var upgradeExtendedShieldDescr1:String = "Shield can take two hits";
public static var moonUnmined:String = "n/a (Unmined)";
public static var loginRemember:String = "Remember me on this computer";
public static var tutorial3_1_short:String = "Well done, you can now move and mine. Now learn how to fire weapons and defend your X-TRAC vehicles.";
public static var video1_1:String = "The predicted energy crash has become a reality.";
public static var video1_2:String = "Reserves of fossil fuels have reached critical levels...";
public static var video1_8:String = "Worth $4 million per kilo, competition between rival mining companies will become fierce.";
public static var video1_5:String = "But the exploitation of a new energy source found on the moon's surface will change everything!";
public static var video1_6:String = "Blown across the galaxy by solar winds and embedded into the lunar surface,";
public static var video1_7:String = "Helium-3 is the most valuable natural resource in the universe.";
public static var registerErrorNameTaken:String = "Sorry, name taken";
public static var tutorial1_Bubble1:String = "Click your X-TRAC vehicle to select it";
public static var tutorial1_Bubble3:String = "Click the square highlighted by the arrow to move there";
public static var tutorial1_Bubble2:String = "Select MOVE from the action menu";
public static var video1_3:String = "Renewable energy sources cannot cope with the increased demand for power.";
public static var closeVideo:String = "Close Video";
public static var videoBuffering:String = "Buffering";
public static var upgradeExtendedMovement1:String = "Extra Range I";
public static var upgradeExtendedMovement2:String = "Extra Range II";
public static var video1_9:String = "But if you can defend your claim...";
public static var levelUpgradedTitle2:String = "Well done!";
public static var video1_4:String = "The planet is in danger of grinding to a halt.";
public static var registerTitle:String = "Register";
public static var waitingForXPlayers:String = "Waiting for <numPlayersWaiting> players";
public static var registerVerifying:String = "Verifying details...";
public static var rankingRank:String = "Rank";
public static var moonWinnerName:String = "Winner's name";
public static var validationEnterPassword:String = "Please enter your password";
public static var registerSuccessBody:String = "Congratulations! You're now a member of International Moon Mining Authority";
public static var moreDiscoveryGames:String = "More Discovery Games";
public static var resultNoMatch:String = "<field>s don't match";
public static var profile:String = "Profile";
public static var positionBlank:String = "-";
public static var notRegistered:String = "Not registered";
public static var profileWatchGame:String = "Watch";
public static var pickupMiningSpeed:String = "Mining Speed x2";
public static var moonSector:String = "sector";
public static var learnMoreAt:String = "Learn more at";
public static var shareIntro:String = "Send a replay of this game to your friends:";
public static var waiting2Title:String = "Assigning contractors";
public static var chatTerminatedMsgTime:String = "Time has elapsed.";
public static var gameTime:String = "Game time";
public static var registerBody1:String = "Enter your details below to register your mining organisation";
public static var optionPrepareMissile:String = "Arm missile";
public static var gameOverSpLoggedInBody2TopLevel:String = "You've reached the top level!";
public static var totalMoonDepletion:String = "Total moon depletion";
public static var chatDisabled:String = "Chat disabled";
public static var optionPrepareDeflect:String = "Deflect";
public static var profileWarningBody:String = "Register now for all the profile benefits";
public static var error:String = "Error";
public static var gameTip2:String = "Mine on the blue squares to earn money";
public static var gameTip3:String = "You can move two of your bots on each turn";
public static var gameTip4:String = "Protect your bot from attack by enabling a shield";
public static var gameTip1:String = "The player with the most money wins the game";
public static var gameInfoClose:String = "Close";
public static var chatMessageDontFlood:String = "No flooding, please wait";
public static var academyHelpIntro:String = "Did you skip the academy?<br><br>Don't know whats going on in the game?<br><br>Are you always the first to die?<br><br>Can't work out how to fire a missile?<br><br>Browse our topics to find the help you need";
public static var profileUnregistered:String = "Unregistered";
public static var profileMatchesTotal:String = "Total";
public static var tutorial3_title:String = "Weapons training";
public static var profileTitle:String = "Profile";
public static var tutorial_title:String = "Welcome to the academy";
public static var registerOptin2Link:String = "http://www.discoverychannel.co.uk/web/terms-and-conditions/";
public static var exploreIntroTitle:String = "Explore";
public static var infoGameTurnsTitle:String = "Game turns";
public static var tutorial2_1_short:String = "Well done, you've completed the first exercise. Now learn how to mine Helium-3 from the moon's surface.";
public static var rankingEarned:String = "Earned";
public static var gameTips:String = "Tips";
public static var levelTitle10:String = "Legend";
public static var playerMenuTitle:String = "Bot <id> Action Menu";
public static var serverConnecting:String = "Connecting to multiplayer server";
public static var difficultyEasy:String = "Easy";
public static var registerPassword:String = "Password";
public static var upgradeExtendedMissile1:String = "Extra Missile Range I";
public static var upgradeExtendedMissile2:String = "Extra Missile Range II";
public static var chatGameInitFrom:String = "Game initiated";
public static var infoList:String = "<GameTurns,Moving,Mining,Lasers,Missiles,Shield>";
public static var gameOverMpLoggedInBody2TopLevel:String = "You've reached the top level!";
public static var pickupTurns:String = "turns";
public static var loginForgottenPassword:String = "Forgotten password?";
public static var moonAnonymous:String = "Anonymous";
public static var chatTypeMessageHere:String = "Type message here";
public static var gameOverMpNotLoggedInTitle:String = "You need to register your player to save your earnings";
public static var strategyDescription:String = "You have <x>/<y> points available to use to upgrade your bots";
public static var rankingCountry:String = "Country";
public static var pickupInvisibility:String = "Invisibility";
public static var explore:String = "Explore";
public static var upgradeExtendedLaser1:String = "Extra Laser Direction I";
public static var registeredButtons:String = "<singlePlayer,multiPlayer,visitDiscovery>";
public static var rankingPlayed:String = "Played";
public static var profileUpdateErrorGeneral:String = "Sorry, couldn't update your profile";
public static var tutorialComplete:String = "COMPLETE";
public static var registeredBody2TopLevel:String = "You've reached the top level!";
public static var rankingPlayer:String = "Player";
public static var gameGameOverContinue:String = "Continue";
public static var exploreIntroBody1:String = "The race to extract Helium-3 from the moon's surface is on. With one million tonnes available and a surface area of 37 million km², the search is wide.";
public static var defaultLoggedInButtons:String = "<singlePlayer,multiPlayer,visitDiscovery>";
public static var exploreIntroBody2:String = "Explore the 3D interactive moon and discover played games, view game stats and track the depletion of Helium-3 as mining proliferates across the moon.<br><br>At $4m per kilo the stakes are high and your mission is essential. But with Earth already ravaged the ecology of the moon is in the balance.";
public static var pickupSuperMove:String = "Super Move";
public static var registerEmail:String = "Email";
public static var registerRepeatPassword:String = "Repeat Password";
public static var chatServerMessage:String = "Server message";
public static var quitGame:String = "Quit game";
public static var couldntLoadFile:String = "Sorry, couldn't load file. Please refresh or try again later";
public static var preloadFloorRender:String = "Rendering moonscape";
public static var gameOverMpNotLoggedInBody2:String = "Registered players can save their progress and earn money";
public static var pickupSuperKamikaze:String = "Super Kamikaze";
public static var gameOverMpNotLoggedInBody1:String = "You haven't yet registered your mining organisation";
public static var positionFirst:String = "1st";
public static var gameOverMpNotLoggedInBody5:String = "Join the race for Helium-3 and play for your country";
public static var tutorial3_1:String = "But you have competition to mine the Helium-3.~ Destroy one of the opposing vehicles with your missile.";
public static var gameOverMpNotLoggedInBody3:String = "Registered players can also level up and get weapons upgrades";
public static var difficultyMedium:String = "Medium";
public static var mpDisabledTitle2:String = "Mining unavailable";
public static var botInfo:String = "He-3: $<helium>, upgrades: <upgrades>, pickups: <pickups>";
public static var optionPrepareLaser:String = "Arm laser";
public static var rankingCountries:String = "Countries";
public static var validationTooShort:String = "Too short";
public static var gameOverMpNotLoggedInBody4:String = "Register now, or continue playing as an unregistered user";
public static var waitingCancel:String = "Cancel";
public static var replayThisIs:String = "This is a replay";
public static var totalHelium3:String = "Total Helium-3";
public static var gameOverSpNotLoggedInTitlePos2:String = "Well done, you finished second";
public static var gameOverSpNotLoggedInTitlePos4:String = "Hard luck, you finished last";
public static var tutorial1_1_short:String = "Welcome to the moon. Your first task is to learn how to manoeuvre your fleet of X-TRAC vehicles.";
public static var gameOverSpNotLoggedInTitlePos1:String = "Congratulations, you finished first!";
public static var gameOverSpNotLoggedInTitlePos3:String = "Unlucky, you finished third";
public static var soundOn:String = "Sound on";
public static var tutorial2_objective:String = "MINING FOR HELIUM-3";
public static var language:String = "Language";
public static var tutorialIncomplete:String = "INCOMPLETE";
public static var registerAge:String = "Age";
public static var loginEnterYourName:String = "Enter your details below:";
public static var strategy:String = "Upgrades";
public static var academyHelpIntroTitle:String = "Game help";
public static var registerCountry:String = "Country";
public static var enableChat:String = "Enable chat";
public static var gameOverMpNotLoggedInTitlePos1:String = "Congratulations, you finished first!";
public static var tutorial1_1:String = "Welcome to the moon.~ Your first task is to learn how to manoeuvre your fleet of X-TRAC vehicles.~ Click on the vehicle and instruct it to move to the highlighted square.";
public static var gameOverMpNotLoggedInTitlePos3:String = "Unlucky, you finished third";
public static var gameOverMpNotLoggedInTitlePos4:String = "Hard luck, you finished last";
public static var graduationTitle:String = "Well done, you have completed the academy";
public static var gameOverMpNotLoggedInTitlePos2:String = "Well done, you finished second";
public static var defaultLoggedInTitle:String = "Welcome back to the Helium-3 game, <profileName>";
public static var rankingBank:String = "Bank";
public static var strategyUpgradeLocked:String = "Locked";
public static var levelDegradedBody:String = "You have been demoted to the rank of <newRank>! You have lost one of your upgrade points and your upgrades have been reset";
public static var waitingData:String = "Waiting for players";
public static var playMoreGames:String = "Play more games";
public static var upgradeExtendedMissileDescr1:String = "Increases your missile range by one square";
public static var upgradeExtendedMissileDescr2:String = "Increases your missile range by two squares";
public static var gameOverResult:String = "Earnings";
public static var chatGameInit:String = "Bonus pot
1st place: <bonus1>
2nd place: <bonus2>";
public static var tutorial1_title:String = "Moving training";
public static var waitingFor1Player:String = "Waiting for 1 player";
public static var loginErrorGeneral:String = "Sorry, couldn't log you in at this time. Please try again later.";
public static var pickupMissileBooster1:String = "Missile Impact Range +1";
public static var pickupMissileBooster2:String = "Missile Impact Range +2";
public static var tutorial3_BubbleFail:String = "You missed the enemy. Try again to complete this mission";
public static var gameOverSpLoggedInButtons:String = "<singlePlayer,multiPlayer,visitDiscovery>";
public static var gameOverBonus:String = "Bonus";
public static var registerSubtitle:String = "Your details";
public static var waiting2TitleSingleLoaded:String = "Choose level";
public static var botInfoNone:String = "None";
public static var replayLoadingFailed:String = "Sorry, couldn't load replay id: <areaname>";
public static var moonSectorsOpen:String = "Sectors open";
public static var graduationBody1:String = "You have now been granted your mining licence";
public static var graduationBody2:String = "You can now register your mining organisation with ILEP";
public static var graduationBody3:String = "Registered players can save their progress and earn money";
public static var graduationBody4:String = "Registered players can also level up and get weapons upgrades";
public static var graduationBody5:String = "Join the race for Helium-3 and play for your country";
public static var defaultLoggedInBody1:String = "You have <profileMoney>";
public static var defaultLoggedInBody2:String = "You need <profileNextLevelMoney> to reach level <profileNextLevel>";
public static var defaultLoggedInBody3:String = "Your global rank is <profileGlobalRank>";
public static var defaultLoggedInBody4:String = "The moon is currently <moonDepletedPercentage>% depleted";
public static var defaultLoggedInBody5:String = "Play multiplayer games to earn money";
public static var defaultNotLoggedInButtons:String = "<singlePlayer,multiPlayer,register,visitDiscovery>";
public static var registerErrorGeneral:String = "Sory, couldn't register you at this time. Please try again later.";
public static var gameOverMpLoggedInTitleWin:String = "Well done, <profileName>, you earned $<gameGain> + $<gameBonus> bonus";
public static var replayURL:String = "test url";
public static var infoLasersBody:String = "Firing a laser takes two turns. It will destroy anyone in the selected line of fire.<br><br>The first turn is used to arm your weapon.<br><br>On the second turn you can target and fire along a line.";
public static var waitingTitle:String = "Waiting for contractors";
public static var upgradeExtendedArmRange1:String = "Extra Arming Range I";
public static var chatTerminatedMsgWin:String = "<player> wins!";
public static var moonHeliumDepleted:String = "Helium-3 depleted";
public static var registerPlayerName:String = "Player name";
public static var gameOverSpLoggedInTitle:String = "Game debrief";
public static var graduationButtons:String = "<singlePlayer,multiPlayer,register,visitDiscovery>";
public static var moonClickArea:String = "Click area to view the replay of this game";
public static var ranking:String = "Ranking";
public static var academyDiscoVideoPanel1:String = "Moon Resources";
public static var academyDiscoVideoPanel2:String = "Moon prospecting";
public static var infoMissilesTitle:String = "Missiles";
public static var academyDiscoVideoPanel3:String = "Helium-3 fusion";
public static var profileNotSaved:String = "Sorry, couldn't save";
public static var profilesGamesLoading:String = "Loading game history";
public static var academyDiscoVideoLink1:String = "http://discoveryint1.edgeboss.net/download/discoveryint1/global/games/helium3/video/dmax/scitrek_helium3fusion.flv";
public static var academyDiscoVideoLink2:String = "http://discoveryint1.edgeboss.net/download/discoveryint1/global/games/helium3/video/dmax/scitrek_moonprospecting.flv";
public static var academyDiscoVideoLink3:String = "http://discoveryint1.edgeboss.net/download/discoveryint1/global/games/helium3/video/dmax/scitrek_resources.flv";
public static var academyHelp:String = "All you need to know:<br>- FAQ's<br>- Tactics<br>- Tips";
public static var profileMatchStats:String = "Matches - played: <p>, won: <w>, win%: <wp>%";
public static var connectionListBody:String = "Sorry, your connection has been lost";
public static var profileWarningTitle:String = "Register now";
public static var skipAcademy:String = "Skip Academy";
public static var loginTitle:String = "Login";
public static var optionFireEMF:String = "Fire EMF";
public static var profileStats:String = "Stats";
public static var infoGameTurnsBody:String = " - Each player moves in turn and can action up to TWO bots per turn.<br><br>Use the player list to see when your turn is coming.<br><br>Click on your bots to set, cancel or change their actions.<br><br>The action bar at the bottom of the screen can be used to cancel your actions.";
public static var academyVideoPanel1:String = "Earth in crisis";
public static var academyVideoPanel2:String = "Mining the moon";
public static var upgradeExtendedKamikazeDescr1:String = "Increases the damage range of your kamikaze by one square";
public static var rankingWon:String = "Won";
public static var gameGameOverWatchReplay:String = "Watch replay";
public static var optionPrepareEMF:String = "Arm EMF";
public static var academyVideoPanel3:String = "Defending your He-3";
public static var registerOptin1:String = "I am over 13 years of age";
public static var registerOptin2:String = "I have read and agreed to the <font color='#FFFFFF'><a href='event:<termsLink>'>terms and conditions</a></font>";
public static var registerOptin3:String = "I would like to receive the Discovery newsletter";
public static var defaultNotLoggedInTitle:String = "Welcome to the Helium-3 game";
public static var resultInvalidEmail:String = "Invalid email";
public static var positionFourth:String = "4th";
public static var visitDiscovery:String = "Visit Discovery";
public static var gameOverSpLoggedInBody3:String = "Your global rank is <profileGlobalRank>";
public static var profileNextLevel:String = "Next level";
public static var gameOverSpLoggedInBody5:String = "Play multiplayer games to earn money";
public static var rankingPlayers:String = "Players";
public static var upgradeExtendedMining1:String = "Extra Mine Range I";
public static var upgradeExtendedMining2:String = "Extra Mine Range II";
public static var registerOptin4:String = "Send me more games from Gamenet";
public static var gameOverSpLoggedInBody4:String = "The moon is currently <moonDepletedPercentage>% depleted";
public static var upgradeExtendedMovementDescr2:String = "Increases your movement range by two squares";
public static var upgradeExtendedMovementDescr1:String = "Increases your movement range by one square";
public static var gameOverSpLoggedInBody2:String = "You need <profileNextLevelMoney> to reach level <profileNextLevel>";
public static var loginErrorWrong:String = "Sorry, details not found";
public static var gameOverSpLoggedInBody1:String = "You have <profileMoney>";
public static var splashLoading:String = "Loading";
public static var botInfoInstr:String = "Rollover bot for data";
public static var optionPrepareShield:String = "Shield";
public static var optionFireKamikaze:String = "Kamikaze";
public static var discoveryGamesURL:String = "http://www.discoverychannel.co.uk";
public static var points:String = "Points";
public static var chatTerminatedMsgHelium:String = "<player> cannot be caught.";
public static var chatTerminatedMsgPlayers:String = "All miners have left.";
public static var registeredTitle:String = "Welcome to the Helium-3 game, <profileName>";
public static var optionSuperMove:String = "Super Move";
public static var video2_1:String = "Helium-3 was first discovered during the Apollo missions of the 1970's.";
public static var pickupDamage:String = "Damage x2";
public static var video2_4:String = "The International Lunar Exploration Program (ILEP) was formed with a single goal: ";
public static var video2_5:String = "to exploit the one million tonnes of Helium-3 that lie beneath the lunar surface.";
public static var video2_7:String = "unprecedented levels of co-operation between rival space agencies.";
public static var video2_8:String = "With the planet's very future at stake, past grievances had to be put aside... ";
public static var video2_2:String = "It is emitted as a by-product of the sun's nuclear reactions and blown across the galaxy by solar winds.";
public static var video2_6:String = "Setting up the infrastructure required for large scale mining on the moon called for...";
public static var optionFireSuperMissile:String = "Super missile";
public static var defaultNotLoggedInBody2:String = "Registered players can save their progress and earn money";
public static var defaultNotLoggedInBody3:String = "Registered players can also level up and get weapons upgrades";
public static var playerMenuCannotAction:String = "Action can't be made until you cancel another bot's action first.";
public static var defaultNotLoggedInBody5:String = "Join the race for Helium-3 and play for your country";
public static var infoMovingTitle:String = "Moving";
public static var defaultNotLoggedInBody1:String = "You haven't yet registered your mining organisation";
public static var defaultNotLoggedInBody4:String = "Register now, or continue playing as an unregistered user";
public static var academyVideo2:String = "Three short movies to help you save mankind.";
public static var loginPassword:String = "Password";
public static var academyVideo1:String = "The Earth is in crisis and the moon provides your only chance of survival.";
public static var levelUpgradedBody:String = "You have been promoted to the rank of <newRank>! You have earned an additional point to use on upgrading your bots";
public static var video2_9:String = "- for the time being at least.";
public static var waiting2StakeClaimed:String = "Stake claimed";
public static var video2_3:String = "Lacking Earth's protective magnetic field, the lunar soil has absorbed Helium-3 for millions of years.";
public static var notAvailable:String = "N/A";
public static var optionFireLaser:String = "Fire laser";
public static var serverConnectionLost:String = "Lost connection with server";
public static var singlePlayer:String = "Single player";
public static var shareTwitterBody:String = "Check this out";
public static var infoMiningBody:String = "To win the game you need to mine more Helium-3 than the other players.<br><br>The blue squares on the playing grid represent levels of Helium-3 in the moon's surface. Each square contains a maximum of 10kg of Helium-3.<br><br>When a bot mines it will extract up to 1 kg of Helium-3 from the adjacent 8 squares and up to 2kg from the square it is on.<br><br>Click the bot that you want to mine with.<br><br>Select MINE from the bot menu.<br><br>Click the available square that you want to mine in.";
public static var discoveryShowURL:String = "DiscoveryChannel.co.uk";
public static var localScriptPath:String = "http://helium3game.discoverychannel.co.uk/scripts/";
public static var training3Play:String = "Final mission";
public static var pickupRestoreHealth:String = "Restore Health";
public static var registeredBody3:String = "Your global rank is <profileGlobalRank>";
public static var registeredBody5:String = "Play multiplayer games to earn money";
public static var registeredBody1:String = "You have <profileMoney>";
public static var profileUpdateProfile:String = "Update profile";
public static var emptyName:String = "Please enter a name";
public static var optionSuperMine:String = "Super Mine";
public static var multiPlayer:String = "Multiplayer";
public static var levelTitle1:String = "Novice";
public static var levelTitle2:String = "Apprentice";
public static var levelTitle3:String = "Entrepreneur";
public static var levelTitle4:String = "Chief";
public static var levelTitle5:String = "Director";
public static var levelTitle6:String = "President";
public static var optionFireSuperKamikaze:String = "Super Kamikaze";
public static var levelTitle8:String = "Magnate";
public static var playMultiplayer:String = "Multiplayer";
public static var registeredBody4:String = "The moon is currently <moonDepletedPercentage>% depleted";
public static var levelTitle7:String = "Tycoon";
public static var registeredBody2:String = "You need <profileNextLevelMoney> to reach level <profileNextLevel>";
public static var logout:String = "Log out";
public static var levelTitle9:String = "Mogul";
public static var registerErrorEmailTaken:String = "Sorry, email in use";
public static var me:String = "Me <url>";
public static var discoveryURL:String = "http://www.discoverychannel.co.uk";
public static var levelUpgradedUpgradeNow:String = "Upgrade bots";
public static var rankingLoadFailed:String = "Sorry, couldn't load rankings";
public static var pickupInvisibilityShort:String = "INVS";
public static var gameInfoErrorGeneral:String = "Couldn't load game";
public static var month1:String = "February";
public static var loginEmail:String = "Email/Username";
public static var month4:String = "May";
public static var month5:String = "June";
public static var chatTimeLeftFrom:String = "Temporal Alert!";
public static var academyHelpPanel:String = "Help";
public static var month8:String = "September";
public static var month2:String = "March";
public static var month3:String = "April";
public static var month6:String = "July";
public static var positionThird:String = "3nd";
public static var month0:String = "January";
public static var month9:String = "October";
public static var month7:String = "August";
public static var bot:String = "Bot";
public static var pickupSuperMissile:String = "Super Missile";
public static var pickupSuperDeflect:String = "Super Deflect";
public static var profilePlayed:String = "Played";
public static var gameOverMpLoggedInTitleLose:String = "Unlucky, <profileName>, you lost $<gameGain>";
public static var soundOff:String = "Sound off";
public static var moonTimePlayed:String = "Date";
public static var chatTerminatedFrom:String = "Game terminated!";
public static var optionMove:String = "Move";
public static var training2Play:String = "Next mission";
public static var gameOverEarned:String = "Helium-3";
public static var profileSaving:String = "Saving profile";
public static var academyHelpTitle:String = "Gameplay guide";
public static var strategyUpgradeEnable:String = "Enable";
public static var tutorial3_objective:String = "FIRING YOUR WEAPONS";
public static var gameOverTitle:String = "Game over";
public static var profileMatchesEarnings:String = "Earnings";
public static var profileMatchesDate:String = "Date played";
public static var destroyed:String = "Destroyed";
public static var serverConnectionFailed:String = "Couldn't connect you to the game server. Please check your connection or try again later";
public static var profileWon:String = "Won";
public static var gameOverSpNotLoggedInButtons:String = "<singlePlayer,multiPlayer,register,visitDiscovery>";
public static var shareEmailBody:String = "Check this out";
public static var skipVideo:String = "Skip Video";
public static var optionPrepareMine:String = "Prepare mine";
public static var moonAreasPlayed:String = "Areas played";
public static var levelDegradedTitle2:String = "Bad luck";
public static var infoMiningTitle:String = "Mining";
public static var introTicker1:String = "Brought to you by <font color='#FFFFFF'><a href='event:<discoveryURL>'><discoveryShowURL></a></font>";
public static var introTicker2:String = "Game Design and Development by <font color='#FFFFFF'><a href="event:http://www.inboxdmg.com">InboxDMG</a></font>";
public static var introTicker3:String = "Game Seeding by <font color='#FFFFFF'><a href="event:http://www.viralnet.com">Viralnet</a></font> and <font color='#FFFFFF'><a href="event:http://www.gamenet.com">Gamenet.com</a></font>";
public static var introTicker4:String = "Special thanks to <font color='#FFFFFF'><a href="event:<currentSponsorURL>"><currentSponsor></a></font>";
public static var waiting2Cancel:String = "Cancel";
public static var disableChat:String = "Disable chat";
public static var exploreIntroGo:String = "Explore the moon";
public static var optionFireMissile:String = "Launch missile";
public static var infoMovingBody:String = "Use the MOVE action to travel the furthest distance.<br><br>1. Click the bot you want to move.<br><br>2. Select MOVE from the bot menu.<br><br>3. Click the available sqaure you want to move to.";
public static var optionMine:String = "Mine";
public static var training1Play:String = "First mission";
public static var profileSaved:String = "Profile Saved!";
public static var tutorial2_BubbleFail:String = "You need to mine some Helium-3 from the blue squares. Try again";
public static var gameInfoTitle:String = "Game help";
public static var cancel:String = "Cancel";
public static var rankingUpdatedEvery:String = "Updated every <time> minutes";
public static var connectingTitle:String = "Initialising localisation";
public static var registerRegister:String = "Register";
public static var tutorial_header:String = "Training mission";
public static var playSinglePlayer:String = "Single player";
public static var splashLoadingIntro:String = "Loading intro";
public static var infoLasersTitle:String = "Lasers";
public static var register:String = "Register";
public static var academyDiscoVideo1:String = "Moon Resources: Discovering the moon's makeup and analysing Helium-3.";
public static var academyDiscoVideo2:String = "Moon prospecting: The challenges of mining the moon.";
public static var levelDegradedTitle:String = "Level decreased";
public static var gameOverMpLoggedInTitle:String = "Game debrief";
public static var profileMatchesPos:String = "Pos";
public static var strategyTitle:String = "Upgrades";
public static var academyDiscoVideo3:String = "Helium-3 fusion: Breaking down the element and how power is generated.";
public static var connecting:String = "Connecting";
public static var optionFireSuperLaser:String = "Fire super laser";
public static var waiting2Subtitle:String = "Scanning area";
public static var registerSex:String = "Sex";
public static var tutorialSuccess:String = "You have completed the academy. You can now Register your player to compete online or play as a guest.";
public static var upgradeExtendedArmRangeDescr1:String = "Can move one extra square when arming a weapon";
public static var rankingRegion:String = "Country";
public static var academyTitle:String = "Academy";
public static var exploreIntroSubtitle:String = "Explore 3D moon";
public static var resultTooShort:String = "Minimum <minChars> chars";
public static var infoShieldTitle:String = "Shield";
public static var academy:String = "Academy";
public static var tutorial2_title:String = "Mining training";
public static var profileMatchesArea:String = "Area";
public static var positionSecond:String = "2nd";
public static var quitReplay:String = "Quit replay";
public static var connectionListTitle:String = "Lost server connection to the moon";
public static var infoMissilesBody:String = "Firing a missile takes two turns. It will destroy the player on the targeted square.<br><br>The first turn is used to arm your weapon.<br><br>On the second turn you can target and fire to a square.";
public static var gameHolderLoading:String = "Loading";
public static var gameOverMpLoggedInBody1:String = "You have <profileMoney>";
public static var gameOverMpLoggedInBody3:String = "Your global rank is <profileGlobalRank>";
public static var gameOverMpLoggedInBody4:String = "The moon is currently <moonDepletedPercentage>% depleted";
public static var gameOverMpLoggedInBody5:String = "Play multiplayer games to earn money";
public static var gameOverMpLoggedInBody2:String = "You need <profileNextLevelMoney> to reach level <profileNextLevel>";
public static var pickupInvincibility:String = "Invincibility";
public static var rankingLastUpdated:String = "Last updated";
public static var upgradeExtendedPickupsDescr1:String = "Bonuses last one more turn";
public static var upgradeExtendedPickupsDescr2:String = "Bonuses last two more turns";
public static var moonArea:String = "area";
public static var rankingOverall:String = "Overall";
public static var upgradeExtendedKamikaze1:String = "Extra Kamikaze Range I";
public static var progressPanel1:String = "01 - Moving";
public static var progressPanel2:String = "02 - Mining";
public static var progressPanel3:String = "03 - Weapons";
public static var progressPanel4:String = "04 - Play game";
public static var resultEmpty:String = "Enter <field>";
public static var gameOverSpNotLoggedInTitle:String = "You need to register your player to save your earnings";
public static var difficultyHard:String = "Hard";
public static var waiting2NoContractor:String = "No contractor";
public static var tutorial2_1:String = "Your mission is to mine the most Helium-3. This is represented by the blue squares.~ Practice now by instructing your vehicle to mine on any blue square.";
public static var registerMale:String = "M";
public static var defaultLoggedInBody2TopLevel:String = "You've reached the top level!";
public static var tutorial3_Bubble1:String = "Firing a weapon takes two turns. First, click your X-TRAC vehicle to select it";
public static var tutorial3_Bubble2:String = "Select ARM MISSILE from the action menu";
public static var tutorial3_Bubble3:String = "You can move your X-TRAC vehicle as you arm your missile. Click the highlighted square closer to the enemy vehicle";
public static var tutorial3_Bubble4:String = "Now click your X-TRAC vehicle again to select it";
public static var tutorial3_Bubble5:String = "Select LAUNCH MISSILE from the action menu";
public static var tutorial3_Bubble6:String = "Click on the enemy vehicle to fire your armed missile";
public static var profileYourLevel:String = "Your level";
public static var login:String = "Login";
public static var shareEmailSubject:String = "Play Helium-3 game";
public static var moonTotalPlayers:String = "Total players";
public static var pickupMiningSpeedShort:String = "MIN";
public static var loginVerifying:String = "Verifying";
public static var profileBank:String = "Bank";
public static var gameTip2p:String = "You need to mine on a blue square to earn money";
public static var mpDisabledBody:String = "Connection to the moon is currently undergoing maintenance. Please check back shortly.";
public static var levelDegradedUpgradeNow:String = "Adjust bots";
public static var waiting2TitleSingle2:String = "Artificial intelligence";
public static var playMoreGames2:String = "More Gamenet Games";
public static var profileScreenName:String = "Screen name";
public static var moonRegionInfo:String = "Region info";
public static var academyGamePanel:String = "Training Game";
public static var academyHelpSelect:String = "Topics";
public static var pickupSuperLaser:String = "Super Laser";
public static var gameTip3p:String = "Remember, you can move two of your bots on each turn";
public static var infoPrompt:String = "Select a topic:";
public static var gameOverEntryFee:String = "Entry fee";
public static var gameOverSpNotLoggedInBody4:String = "Register now, or continue playing as an unregistered user";
public static var gameOverSpNotLoggedInBody5:String = "Join the race for Helium-3 and play for your country";
public static var gameOverSpNotLoggedInBody1:String = "You haven't yet registered your mining organisation";
public static var optionCancelMove:String = "Cancel move";
public static var gameOverSpNotLoggedInBody3:String = "Registered players can also level up and get weapons upgrades";
public static var gameTip4p:String = "You can protect yourself from attack by enabling a shield";
public static var gameOverSpNotLoggedInBody2:String = "Registered players can save their progress and earn money";
public static var registerFemale:String = "F";
public static var waitingForMorePlayers:String = "Waiting for more players";
public static var gameOverMpLoggedInButtons:String = "<singlePlayer,multiPlayer,visitDiscovery>";
public static var profileMatchesFee:String = "Fee";
public static var rankingPage:String = "Page";
public static var video1_10:String = "you could make your fortune...";
public static var gameTip5p:String = "You can't shoot an unactivated enemy bot";
public static var gameOverMpNotLoggedInButtons:String = "<singlePlayer,multiPlayer,register,visitDiscovery>";
public static var chatTimeLeftMsg:String = "<numSeconds> seconds remaining...";
public static var infoShieldBody:String = "Activating the shield will protect your bot from a direct hit.<br><br>The shield will stay activated until you select another action.<br><br>Other players cannot see that you have activated your shield.<br><br>Once your bot has been hit the shield is removed.";
public static var waiting2TitleSingle:String = "Generating intelligence";
public function LangStrings(){
var _local1:XMLList;
var _local2:Array;
var _local3:int;
var _local4:int;
LANGUAGES_LIST = [{name:"English", code:"en"}, {name:"Español", code:"es"}, {name:"Deutsch", code:"de"}, {name:"Português", code:"pt"}];
defaultLang = "en";
dataObj = {};
defaultList = [];
isDebugMode = true;
super();
dataObj[defaultLang] = {};
_local1 = describeType(LangStrings)..variable;
_local2 = [];
while (_local3 < _local1.length()) {
_local2.push({name:_local1[_local3].@name, content:LangStrings[_local1[_local3].@name]});
_local3++;
};
_local2.sortOn("name", Array.DESCENDING);
_local4 = 0;
while (_local4 < _local2.length) {
defaultList.push({name:_local2[_local4].name, content:_local2[_local4].content});
dataObj[defaultLang][_local2[_local4].name] = _local2[_local4].content;
LangStrings[_local2[_local4].name] = _local2[_local4].name;
_local4++;
};
}
public function getData(_arg1:String, _arg2:String):String{
if (dataObj[_arg2] != undefined){
if (dataObj[_arg2][_arg1] != undefined){
return (findAndReplace(dataObj[_arg2][_arg1]));
};
return (null);
//unresolved jump
};
return (null);
}
public function getLangList():Array{
return (LANGUAGES_LIST.slice());
}
private function debugTrace(_arg1):void{
if (isDebugMode){
outPut(("LangStrings - " + _arg1));
};
}
private function findAndReplace(_arg1:String):String{
_arg1 = ((_arg1.indexOf("<profileName>"))!=-1) ? _arg1.split("<profileName>").join(Profile.username) : _arg1;
_arg1 = ((_arg1.indexOf("<profileMoney>"))!=-1) ? _arg1.split("<profileMoney>").join(("$" + MathTools.formatNumber(Profile.money))) : _arg1;
_arg1 = ((_arg1.indexOf("<profileNextLevelMoney>"))!=-1) ? _arg1.split("<profileNextLevelMoney>").join(((Profile.nextLevel)!=null) ? ("$" + Profile.nextLevel.minimumMoneyLabel) : "") : _arg1;
_arg1 = ((_arg1.indexOf("<profileNextLevel>"))!=-1) ? _arg1.split("<profileNextLevel>").join(((Profile.nextLevel)!=null) ? Profile.nextLevel.id : "-") : _arg1;
_arg1 = ((_arg1.indexOf("<profileGlobalRank>"))!=-1) ? _arg1.split("<profileGlobalRank>").join(Profile.rank) : _arg1;
_arg1 = ((_arg1.indexOf("<moonDepletedPercentage>"))!=-1) ? _arg1.split("<moonDepletedPercentage>").join(Settings.get("percentHeliumDepleted")) : _arg1;
return (_arg1);
}
public function getDefaultStrings():Array{
return (defaultList.slice());
}
public function updateStrings(_arg1:Object, _arg2:String):void{
dataObj[_arg2] = _arg1;
}
}
}//package uk.co.inbox.language
Section 18
//LangUI (uk.co.inbox.language.LangUI)
package uk.co.inbox.language {
import flash.display.*;
import flash.events.*;
import gs.*;
import flash.net.*;
import flash.text.*;
import flash.filters.*;
public class LangUI extends Sprite {
private const HEIGHT:Number = 40;
private const WIDTH:Number = 500;
private const LEFT_INDENT:Number = 10;
private var exportBut:Sprite;
private var holder:Sprite;
private var exportField:TextField;
public static const EXPORT:String = "export";
public function LangUI():void{
var _local1:GlowFilter;
super();
holder = new Sprite();
addChild(holder);
drawContent();
holder.y = -24;
_local1 = new GlowFilter(0x333333, 1, 4, 4, 2, 2);
filters = [_local1];
}
public function startIntro():void{
TweenLite.to(holder, 0.4, {y:-10});
}
private function onClickLink(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest(_arg1.target.text);
navigateToURL(_local2);
}
public function promptExportComplete(_arg1:String):void{
var _local2:TextFormat;
_local2 = new TextFormat();
_local2.align = "center";
_local2.underline = true;
_local2.color = 0xFFCC00;
_local2.font = "Verdana";
_local2.size = 10;
exportField.mouseEnabled = true;
exportField.selectable = true;
exportField.text = _arg1;
exportField.setTextFormat(_local2);
exportField.addEventListener(MouseEvent.CLICK, onClickLink, false, 0, true);
}
private function drawContent():void{
var glow:GlowFilter;
var textFormat:TextFormat;
var exportLabel:TextField;
var _local2 = holder.graphics;
with (_local2) {
lineStyle();
beginFill(0x999999, 1);
drawRoundRect(LEFT_INDENT, 0, WIDTH, HEIGHT, 20);
endFill();
};
exportBut = new Sprite();
glow = new GlowFilter(0x333333, 1, 2, 2, 2, 2);
exportBut.filters = [glow];
holder.addChild(exportBut);
_local2 = exportBut.graphics;
with (_local2) {
lineStyle();
beginFill(0xFFCC00, 1);
drawRoundRect(16, 14, 80, 20, 10);
endFill();
};
textFormat = new TextFormat();
textFormat.align = "center";
textFormat.color = 0x333333;
textFormat.font = "Verdana";
textFormat.bold = true;
textFormat.size = 10;
exportLabel = new TextField();
exportLabel.mouseEnabled = false;
exportLabel.text = "EXPORT";
exportLabel.setTextFormat(textFormat);
exportLabel.width = 80;
exportLabel.x = 16;
exportLabel.y = 16;
exportBut.addChild(exportLabel);
exportBut.buttonMode = true;
exportBut.addEventListener(MouseEvent.CLICK, onClickExport, false, 0, true);
exportField = new TextField();
exportField.width = (WIDTH - LEFT_INDENT);
exportField.x = LEFT_INDENT;
exportField.y = 16;
exportField.text = "";
exportField.mouseEnabled = false;
holder.addChild(exportField);
}
private function onClickExport(_arg1:MouseEvent):void{
exportBut.removeEventListener(MouseEvent.CLICK, onClickExport, false);
holder.removeChild(exportBut);
dispatchEvent(new Event(EXPORT));
}
}
}//package uk.co.inbox.language
Section 19
//InboxTag (uk.co.inbox.tracking.InboxTag)
package uk.co.inbox.tracking {
import flash.display.*;
import flash.events.*;
import uk.co.inbox.language.*;
import uk.co.inbox.utils.*;
import uk.co.inbox.debug.*;
import flash.net.*;
import flash.system.*;
public class InboxTag {
private static var timeOut:int = 600;
private static var tagHolder:Sprite;
private static var maxTagDepth:int = 10;
private static var curTagDepth:int = initTagDepth;
private static var isDebugMode:Boolean = true;
private static var initTagDepth:int = 1;
private static var isInit:Boolean = false;
private static var tagPath:String = "http://www.inboxtag.com/";
private static function onTagLoaded(_arg1:Event):void{
trace("onTagLoaded");
}
public static function callTag(_arg1:int, _arg2:String="", _arg3:String="", _arg4:String="", _arg5:String="", _arg6:String="", _arg7:Number=0, _arg8:Number=0, _arg9:Number=0, _arg10:int=0, _arg11:int=-1):void{
var _local13:int;
var _local14:Loader;
var _local15:URLRequest;
var _local16:URLVariables;
if (!isInit){
debugTrace("callTag error. Check that InboxTag.init() has been called");
} else {
if (Settings.get("isTrackingOn", true)){
if (LangContent.isMultiLang){
_arg6 = LangContent.lang;
};
debugTrace("callTag start---------------------");
debugTrace((((" ID:" + _arg1) + " - ") + InboxTagData.getTagNameById(_arg1)));
_local13 = 1;
while (_local13 <= 5) {
if (arguments[_local13] != undefined){
debugTrace((((" p" + _local13) + "=") + arguments[_local13]));
};
_local13++;
};
_local13 = 1;
while (_local13 <= 3) {
if (arguments[(_local13 + 5)] != undefined){
debugTrace((((" i" + _local13) + "=") + arguments[(_local13 + 5)]));
};
_local13++;
};
debugTrace("callTag end---------------------------------");
_local14 = new Loader();
_local15 = new URLRequest((tagPath + "tag.swf"));
_local16 = new URLVariables();
_local16.js = "yes";
_local16.isFlashCall = true;
_local16.ti = timeOut;
_local16.cl = InboxTagData.clientId;
_local16.pg = _arg1;
if (_arg10 != 0){
_local16.sc = _arg10;
};
_local13 = 1;
while (_local13 <= 5) {
if (arguments[_local13] != undefined){
_local16[("p" + _local13)] = arguments[_local13];
};
_local13++;
};
_local13 = 1;
while (_local13 <= 3) {
if (arguments[(_local13 + 5)] != undefined){
_local16[("i" + _local13)] = arguments[(_local13 + 5)];
};
_local13++;
};
_local16.rnd = new Date().getTime();
_local15.data = _local16;
_local14.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, onTagProgress, false, 0, true);
_local14.contentLoaderInfo.addEventListener(Event.COMPLETE, onTagLoaded, false, 0, true);
_local14.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onTagError, false, 0, true);
_local14.load(_local15);
tagHolder.addChild(_local14);
};
};
}
private static function onTagError(_arg1:IOErrorEvent):void{
trace("onTagError");
}
private static function onTagProgress(_arg1:ProgressEvent):void{
trace("onTagProgress");
}
public static function callViralChart():void{
var _local1:URLRequest;
var _local2:Loader;
_local1 = new URLRequest((("http://www.viralchart.com/tracker.php?media=" + Settings.get("viralChartId")) + "&f=F"));
_local2 = new Loader();
_local2.load(_local1);
}
private static function debugTrace(_arg1):void{
if (isDebugMode){
outPut(("InboxTag - " + _arg1));
};
}
public static function init(_arg1:Stage):void{
Security.allowDomain(tagPath);
if (!isInit){
tagHolder = new Sprite();
_arg1.addChild(tagHolder);
};
isInit = true;
}
private static function onTagSocketData(_arg1:ProgressEvent):void{
trace("onTagSocketData");
}
}
}//package uk.co.inbox.tracking
Section 20
//InboxTagData (uk.co.inbox.tracking.InboxTagData)
package uk.co.inbox.tracking {
import flash.utils.*;
public class InboxTagData {
public static const CLICK_DISCOVERY_LINK:int = 3595;
public static const PLAY_MULTIPLAYER_GAME:int = 3594;
public static const INIT_FLASH_LOAD:int = 3578;
public static const PLAY_SINGLE_PLAYER_GAME:int = 3593;
public static const CHANGE_LANGUAGE:int = 3627;
public static const ENTER_GAME:int = 3580;
public static const LOG_OUT:int = 3600;
public static const PROFILE_VIEW:int = 3591;
public static const CLICK_SINGLE_PLAYER:int = 3635;
public static const REGISTER:int = 3587;
public static const RANKINGS_VIEW:int = 3590;
public static const FIXED_LIST:Array = [3578, 3580, 3586, 3587, 3593, 3594, 3597, 3595];
public static const DRAW_FLOOR_TIME:int = 3636;
public static const SUBMIT_SCORE:int = 0;
public static const CLICK_ACADEMY_GAME_1:int = 3651;
public static const CLICK_ACADEMY_GAME_2:int = 3652;
public static const CLICK_ACADEMY_GAME_3:int = 3653;
public static const CLICK_SHARE_LINK:int = 3626;
public static const AD_IMPRESSION:int = 3658;
public static const VIEW_REPLAY_GAME:int = 3597;
public static const LOAD_ACADEMY_GAME:int = 3581;
public static const ACADEMY_VIEW:int = 3588;
public static const REGISTER_VIEW:int = 3599;
public static const SKIP_ACADEMY_GAME:int = 3582;
public static const LOGIN:int = 3586;
public static const CLICK_PLAY_MORE_GAMES:int = 3630;
public static const GUEST_NAME_SUBMIT:int = 3649;
public static const COMPLETE_ACADEMY:int = 3654;
public static const WATCH_VIDEO:int = 3631;
public static const CLICK_MULTIPLAYER_CANCEL:int = 3637;
public static const CREATE_LEAGUE:int = 0;
public static const END_MULTIPLAYER_GAME:int = 3647;
public static const ACADEMY1_GAME_CLICK2:int = 3655;
public static const ACADEMY1_GAME_CLICK3:int = 3655;
public static const ACADEMY1_GAME_CLICK1:int = 3655;
public static const PLAY_ACADEMY_GAME_3:int = 3585;
public static const GUEST_NAME_REQUEST:int = 3648;
public static const SKIP_INTRO_VIDEO:int = 3596;
public static const PLAY_ACADEMY_GAME_2:int = 0x0E00;
public static const JOIN_LEAGUE:int = 0;
public static const STRATEGY_VIEW:int = 3592;
public static const CLICK_MULTIPLAYER:int = 3634;
public static const LOGIN_VIEW:int = 0x0E0E;
public static const EXPLORE_VIEW:int = 3589;
public static const PLAY_ACADEMY_GAME_1:int = 3583;
private static var _clientId:int = 183;
public static function getTagNameById(_arg1:int):String{
var _local2:XMLList;
var _local3:int;
_local2 = describeType(InboxTagData)..constant;
while (_local3 < _local2.length()) {
if (InboxTagData[_local2[_local3].@name] == _arg1){
return (_local2[_local3].@name);
};
_local3++;
};
return ("");
}
public static function get clientId():int{
return (_clientId);
}
}
}//package uk.co.inbox.tracking
Section 21
//CustomSharedObject (uk.co.inbox.utils.CustomSharedObject)
package uk.co.inbox.utils {
import uk.co.inbox.debug.*;
import flash.net.*;
public class CustomSharedObject {
public static var data:Object;
private static var isDebugMode:Boolean = true;
private static var so:SharedObject;
public static function wipe(_arg1:Object):void{
var i:String;
var $obj = _arg1;
try {
for (i in $obj) {
delete so.data[i];
};
so.flush();
data = so.data;
} catch(e:Error) {
debugTrace("wipe() - Error: CustomSharedObject not init()ed");
};
}
public static function set(_arg1:Object):void{
var i:String;
var $obj = _arg1;
try {
for (i in $obj) {
so.data[i] = $obj[i];
};
so.flush();
data = so.data;
} catch(e:Error) {
debugTrace("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:String;
for (_local2 in _arg1) {
so.data[_local2] = _arg1[_local2];
};
so.flush();
data = so.data;
}
public static function deleteData(_arg1:Object):void{
var _local2:String;
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) {
debugTrace("get() - Error: CustomSharedObject not init()ed");
return (null);
};
}
private static function debugTrace(_arg1):void{
if (isDebugMode){
outPut(("CustomSharedObject - " + _arg1));
};
}
}
}//package uk.co.inbox.utils
Section 22
//MathTools (uk.co.inbox.utils.MathTools)
package uk.co.inbox.utils {
public class MathTools {
public static function formatNumber(_arg1:Number, _arg2:String=","):String{
var _local3:String;
var _local4:Array;
var _local5:String;
var _local6:int;
_local3 = String(_arg1);
_local4 = [];
while (_local3.length > 3) {
_local4.push(_local3.slice((_local3.length - 3), _local3.length));
_local3 = _local3.slice(0, (_local3.length - 3));
};
_local4.push(_local3);
_local5 = "";
_local6 = 0;
while (_local6 < _local4.length) {
if (_local6 != (_local4.length - 1)){
_local5 = ((_arg2 + _local4[_local6]) + _local5);
} else {
_local5 = (_local4[_local6] + _local5);
};
_local6++;
};
return (_local5);
}
public static function roundDecimal(_arg1:Number, _arg2:Number):Number{
return ((Math.round((_arg1 * Math.pow(10, _arg2))) / Math.pow(10, _arg2)));
}
public static function formatTime(_arg1:int, _arg2:Boolean=false, _arg3:Boolean=true):String{
var _local4:Number;
var _local5:int;
var _local6:Number;
var _local7:int;
_local4 = (_arg1 % 1000);
_local5 = Math.floor((_arg1 / 1000));
_local6 = (_local5 % 60);
_local7 = Math.floor((_local5 / 60));
return (((((((_arg2) ? ((_local7 < 10)) ? "0" : "" : "" + _local7) + ":") + (_arg2) ? ((_local6 < 10)) ? "0" : "" : "") + _local6) + (_arg3) ? ((":" + (_arg2) ? ((_local4 < 100)) ? "0" : "" : "") + _local4) : ""));
}
public static function generateID(_arg1:int):String{
var _local2:int;
var _local3:String;
var _local4:int;
var _local5:int;
var _local6:int;
_local2 = 65;
_local3 = "";
_local4 = 0;
while (_local4 < _arg1) {
_local5 = Math.floor((Math.random() * 36));
if (_local5 < 10){
_local3 = (_local3 + _local5);
} else {
_local6 = (Math.floor((Math.random() * 26)) + _local2);
_local3 = (_local3 + String.fromCharCode(_local6));
};
_local4++;
};
return (_local3);
}
public static function genRandomNum(_arg1:Number, _arg2:Number):Number{
return ((Math.floor((Math.random() * (_arg2 - _arg1))) + _arg1));
}
public static function encryptScore(_arg1:Number=0):String{
var _local2:String;
var _local3:Number;
var _local4:int;
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));
}
}
}//package uk.co.inbox.utils
Section 23
//Settings (uk.co.inbox.utils.Settings)
package uk.co.inbox.utils {
import flash.display.*;
import flash.system.*;
public class Settings {
private static var isInit:Boolean = false;
private static var propertyData:Object = {};
public static function init(_arg1:LoaderInfo):void{
var _local2:Object;
if (!isInit){
isInit = true;
_local2 = {};
_local2.projectId = 3;
_local2.gameVersion = "0_2_0";
_local2.gameName = "discoveryHelium3Game";
_local2.gamePath = "http://www.helium3game.com/";
_local2.replayPath = "http://helium3game.discoverychannel.co.uk/replay/";
_local2.cgiPath = "http://www.hyperblastgame.com/cgi-bin/hyperblastgame/";
_local2.gamenetURL = "http://www.gamenet.com/";
_local2.forgottenPasswordURL = "http://login.discoverychannel.co.uk/ua-fe/reset-step-1.shtml";
_local2.scriptPath = "scripts/";
_local2.liveScriptPath = "http://helium3game.discoverychannel.co.uk/scripts/";
_local2.xmlPath = "xml/";
_local2.liveXMLPath = "http://helium3game.discoverychannel.co.uk/xml/";
_local2.adPath = "ads/";
_local2.liveAdPath = "ads/";
_local2.liveVideoPath = "videos/";
propertyData.maxHeliumPerArea = 400;
_local2.inboxURL = "http://www.inboxgames.co.uk/";
_local2.viralnetURL = "http://www.viralnet.com/";
_local2.viralChartId = "757";
_local2.isLocal = ((_arg1.url.slice(0, 4) == "file")) ? true : false;
_local2.isForcedLogin = false;
_local2.sfsVersion = "";
_local2.gameTitle = "Discovery Moon Miner";
_local2.isShell = false;
if (_local2.isLocal){
_local2.flashFilesPath = "";
_local2.soundFilesPath = "";
} else {
_local2.flashFilesPath = "http://helium3game.discoverychannel.co.uk/game/";
_local2.soundFilesPath = "http://helium3game.discoverychannel.co.uk/game/";
};
_local2.flashVars = _arg1.parameters;
_local2.versionNumber = ((_arg1.parameters.game_version == undefined)) ? "1.0.0" : _arg1.parameters.game_version;
_local2.paperWorlds = (_local2.flashFilesPath + "world/");
_local2.paperTextures = (_local2.flashFilesPath + "world/textures/");
_local2.percentHeliumDepleted = 0;
set(_local2);
Security.allowDomain("http://discoveryint1.edgeboss.net");
Security.allowDomain("http://helium3game.discoverychannel.co.uk");
};
}
public static function getAllProps():Object{
return (propertyData);
}
public static function get(_arg1:String, _arg2=null){
if (propertyData[_arg1] == null){
if (_arg2 == null){
throw (new Error((("Settings property:" + _arg1) + " not found")));
};
propertyData[_arg1] = _arg2;
return (_arg2);
//unresolved jump
};
return (propertyData[_arg1]);
}
public static function set(_arg1:Object):void{
var _local2:String;
for (_local2 in _arg1) {
propertyData[_local2] = _arg1[_local2];
};
}
public static function refresh():void{
propertyData.registrationURL = "register.php";
propertyData.loginURL = "login.php";
propertyData.updateProfileURL = (propertyData.scriptPath + "updateprofile.php");
propertyData.getGamesPlayedURL = (propertyData.scriptPath + "getusergames.php");
propertyData.getGameInfoURL = (propertyData.scriptPath + "getareadetail.php");
propertyData.getAreaIdURL = (propertyData.scriptPath + "getareaid.php");
propertyData.getMyProfileURL = (propertyData.scriptPath + "getuserprofile.php");
propertyData.globalRankingsXML = (propertyData.xmlPath + "globalrankings.xml");
propertyData.countryRankingsXML = (propertyData.xmlPath + "countryrankings.xml");
propertyData.moonBodyXML = (propertyData.xmlPath + "themoon_body.xml");
propertyData.moonRegionXML = (propertyData.xmlPath + "themoon_region_.xml");
propertyData.getAreasXML = (propertyData.scriptPath + "getareas.php");
propertyData.tickerXML = (propertyData.xmlPath + "news.xml");
}
}
}//package uk.co.inbox.utils
Section 24
//Validation (uk.co.inbox.utils.Validation)
package uk.co.inbox.utils {
public class Validation {
public static const RESULT_SUCCESS:String = "resultSuccess";
public static const RESULT_TOO_LONG:String = "resultTooLong";
public static const RESULT_EMPTY:String = "resultEmpty";
public static const RESULT_TOO_SHORT:String = "resultTooShort";
public static const RESULT_NO_MATCH:String = "resultNoMatch";
public static const RESULT_INVALID_EMAIL:String = "resultInvalidEmail";
public static const RESULT_INVALID:String = "resultInvalid";
public static function validateText(_arg1:String, _arg2:Number=0):String{
if (_arg1.length < _arg2){
if (_arg1.length == 0){
return (RESULT_EMPTY);
};
return (RESULT_TOO_SHORT);
//unresolved jump
};
return (RESULT_SUCCESS);
}
public static function validateEmail(_arg1:String):String{
var _local2:String;
var _local3:Boolean;
var _local4:int;
var _local5:String;
var _local6:int;
var _local7:int;
var _local8:String;
var _local9:int;
_local2 = _arg1.toLowerCase();
_local3 = true;
_local4 = _local2.indexOf("@");
_local5 = _local2.substring(0, _local4);
_local6 = (_local2.length - 1);
_local7 = _local2.lastIndexOf(".");
_local8 = _local2.substring((_local4 + 1), _local7);
_local9 = (_local6 - (_local7 + 1));
if (_local4 == -1){
_local3 = false;
};
if (_local4 != _local2.lastIndexOf("@")){
_local3 = false;
};
if (xCheckSUVC(_local5) != true){
_local3 = false;
};
if (_local5.length < 1){
_local3 = false;
};
if (xCheckSUVC(_local8) != true){
_local3 = false;
};
if (_local8.length < 2){
_local3 = false;
};
if (xCheckSUVC(_local2.substr((_local7 + 1), _local6)) != true){
_local3 = false;
};
if ((((_local9 < 1)) || ((_local9 > 3)))){
_local3 = false;
};
if (_local3){
return (RESULT_SUCCESS);
};
return (RESULT_INVALID_EMAIL);
}
public static function trimText(_arg1:String):String{
var _local2:int;
_local2 = 0;
while ((((((_arg1.charCodeAt(_local2) == 32)) || ((_arg1.charCodeAt(_local2) == 10)))) || ((_arg1.charCodeAt(_local2) == 13)))) {
_arg1 = _arg1.slice(1, _arg1.length);
};
_local2 = (_arg1.length - 1);
while ((((((_arg1.charCodeAt(_local2) == 32)) || ((_arg1.charCodeAt(_local2) == 10)))) || ((_arg1.charCodeAt(_local2) == 13)))) {
_arg1 = _arg1.slice(0, (_arg1.length - 1));
_local2 = (_arg1.length - 1);
};
return (_arg1);
}
public static function validatePassword(_arg1:String, _arg2:String, _arg3:Number=0):String{
if (_arg1.length < _arg3){
return (RESULT_TOO_SHORT);
};
if (_arg1 != _arg2){
return (RESULT_NO_MATCH);
};
return (RESULT_SUCCESS);
}
public static function validatePostcode(_arg1:String=null):String{
var _local2:String;
if ((((_arg1.length == 0)) || ((_arg1 == null)))){
return (RESULT_EMPTY);
};
_local2 = _arg1.split(" ").join("");
if (_local2.length > 7){
return (RESULT_TOO_LONG);
};
if (_local2.length < 5){
return (RESULT_TOO_SHORT);
};
if (!isNaN(Number(_local2.substr(0, 1)))){
return (RESULT_INVALID);
};
if (!isNaN(Number(_local2.substr(-1, 1)))){
return (RESULT_INVALID);
};
if (!isNaN(Number(_local2.substr(-2, 1)))){
return (RESULT_INVALID);
};
if (isNaN(Number(_local2.substr(-3, 1)))){
return (RESULT_INVALID);
};
if (isNaN(Number(_local2.substr(-4, 1)))){
return (RESULT_INVALID);
};
return (RESULT_SUCCESS);
}
private static function xCheckSUVC(_arg1:String):Boolean{
var _local2:Boolean;
var _local3:Array;
var _local4:int;
_local2 = true;
_local3 = new Array("!", "£", "$", "%", "^", "&", "*", "+", "=", "?", ":", ";", "'", "\t", " ", "\"", "~", "#", "/");
_local4 = 0;
while (_local4 <= (_local3.length - 1)) {
if (_arg1.indexOf(_local3[_local4], 0) != -1){
_local2 = false;
break;
};
_local4++;
};
return (_local2);
}
}
}//package uk.co.inbox.utils
Section 25
//MainTimeline (wrapper_fla.MainTimeline)
package wrapper_fla {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import uk.co.inbox.tracking.*;
import flash.net.*;
import flash.text.*;
import flash.system.*;
import flash.geom.*;
import flash.filters.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.media.*;
import flash.ui.*;
public dynamic class MainTimeline extends MovieClip {
public var i:String;
public var url:URLRequest;
public var variables:URLVariables;
public var gameLoader:Loader;
public var flashVarsObject:Object;
public function MainTimeline(){
addFrameScript(0, frame1);
}
function frame1(){
InboxTag.init(stage);
InboxTag.callTag(3678, loaderInfo.url);
Security.allowDomain("*");
url = new URLRequest("http://helium3game.discoverychannel.co.uk/game/shell.swf");
variables = new URLVariables();
flashVarsObject = loaderInfo.parameters;
for (i in flashVarsObject) {
variables[i] = flashVarsObject[i];
};
url.data = variables;
gameLoader = new Loader();
gameLoader.load(url);
addChild(gameLoader);
}
}
}//package wrapper_fla