Frame 1
function tvc_tracker(url, media_id, format) {
tvc_lv = new LoadVars();
tvc_lv.media = media_id;
tvc_lv.f = format;
return(tvc_lv.sendAndLoad(url, tvc_lv, "get"));
}
stop();
kv_v = {c:370, a:0, da:["distralytics.com", "distralytics.co.uk"]};
kv_v.i = 0;
while (kv_v.i < kv_v.da.length) {
System.security.allowDomain(kv_v.da[kv_v.i], (kv_v.c + ".c.") + kv_v.da[kv_v.i], "*." + kv_v.da[kv_v.i]);
kv_v.i++;
}
kv_v.lc = function () {
var _local1 = ((("http://" + kv_v.c) + ".c.") + kv_v.da[kv_v.a % kv_v.da.length]) + kv_v.lurl;
System.security.allowDomain(_local1);
kv_v.l_mcl.loadClip(_local1, kv_v.t_mc);
};
kv_v.d = (_root.ori_dom ? (_root.ori_dom) : (((_root._url.split("/")[0].indexOf("http") == -1) ? "Local" : (_root._url.split("/")[2].split("?")[0]))));
kv_v.fpv = getVersion().split(" ")[1].split(",")[0];
kv_v.lurl = "/control/tracking/tracker.swf?r=" + Math.floor(Math.random() * 10000);
kv_v.t_mc = createEmptyMovieClip("kv_tracker", -16734);
kv_v.l_mcl = new MovieClipLoader();
kv_v.mcl_l = {onLoadError:function () {
kv_v.a++;
kv_v.lc();
}, onLoadStart:function (m) {
System.security.allowDomain(m._url);
}};
kv_v.l_mcl.addListener(kv_v.mcl_l);
kv_v.lc();
_root.tvc_media = "782";
System.security.allowDomain(_parent.url);
strUrl = ((url != null) ? (url) : "http://www.viralchart.com");
if ((_root.tvc_media != null) && (_root.tvc_media != "")) {
_root.tvc_media = (tvc_tracker(strUrl + "/tracker.php", _root.tvc_media, "F") ? null : (_root.tvc_media));
}
stop();
_lockroot = true;
var intScore = 0;
var intMusic = 1;
var strRootURL = "http://www.tamba-games.co.uk/internetworld";
var strServiceURL = (_root.strRootURL + "/amfphp/gateway.php");
var objRemote = (new remoting.RemotingFunctions(_root.strServiceURL, "GameFunctions"));
var intBytesLoaded = 0;
var intBytesTotal = getBytesTotal();
var intManX = 0;
var intTitle = 0;
preLoad = function () {
intBytesLoaded = getBytesLoaded();
if (intBytesLoaded >= intBytesTotal) {
clearInterval(intPreloader);
gotoAndStop ("title");
}
intPctDone = Math.ceil((intBytesLoaded / intBytesTotal) * 100);
if ((intPctDone % 5) == 0) {
if (typeof(preloader["man_" + intPctDone]) == "undefined") {
var _local1 = preloader.temp_man.duplicateMovieClip("man_" + intPctDone, intPctDone * 1000);
_local1._x = preloader.temp_man._x + intManX;
_local1._y = preloader.temp_man._y;
intManX = intManX + 15;
}
}
preloader.text._y = preloader.text._y - 2;
};
var intPreloader = setInterval(preLoad, 40);
var globalSound = new Sound(_root);
toggleSound = function () {
if (!soundOff) {
globalSound.setVolume(0);
soundOff = true;
skipnext = true;
}
if (soundOff && (!skipnext)) {
globalSound.setVolume(100);
soundOff = false;
}
skipnext = false;
};
Frame 2
stop();
Frame 3
stop();
Frame 4
stop();
Frame 5
stop();
Frame 6
stop();
Frame 7
stop();
Frame 8
stop();
Frame 9
stop();
Frame 10
gotoAndStop ("game");
Frame 11
stop();
Symbol 10 MovieClip [RemotingDebugClasses] Frame 1
#initclip 63
Object.registerClass("RemotingDebugClasses", mx.remoting.DebugClasses);
#endinitclip
preview._visible = false;
stop();
Symbol 55 MovieClip [RemotingClasses] Frame 1
#initclip 64
Object.registerClass("RemotingClasses", mx.remoting.ApiClasses);
#endinitclip
preview._visible = false;
stop();
Symbol 74 Button
on (release) {
getURL ("http://www.internetworld.co.uk/register/", "_blank");
}
Symbol 552 MovieClip [__Packages.remoting.RemotingFunctions] Frame 0
class remoting.RemotingFunctions
{
var gatewayUrl, serviceName, service, serial;
function RemotingFunctions (gatewayUrl, serviceName) {
this.gatewayUrl = gatewayUrl;
this.serviceName = serviceName;
service = new remoting.RemotingService(gatewayUrl, serviceName, remoting.RemotingService.NO_RETRY);
serial = new it.sephiroth.Serializer();
}
function getHighScores(intMax) {
service.getHighScores([intMax], this, gotHighScores);
}
function gotHighScores(objResult) {
_root.leaderboard.showHighScores(_root.objRemote.serial.unserialize(objResult.__get__result()));
}
function setHighScores(strUserName, strCompany, strUserEmail, strTel, strPostcode, strClub, intPoints, intWeapon) {
service.setHighScores([strUserName, strCompany, strUserEmail, strTel, strPostcode, strClub, intPoints, intWeapon], this, setHighScoresResult);
}
function setHighScoresResult() {
_root.gotoAndStop("leaderboard");
}
function sendToFriend(strUserName, strUserEmail, strFriendName, strFriendEmail, intUserScore) {
service.sendToFriend([strUserName, strUserEmail, strFriendName, strFriendEmail, intUserScore], this, sentToFriend);
}
function getRank(intScore) {
service.getRank([intScore], this, gotRank);
}
function gotRank(objResult) {
_root.intRank = objResult.result;
}
function sentToFriend() {
_root.sendfriend.friend_name.text = "";
_root.sendfriend.friend_email.text = "";
_root.sendfriend.error_text.text = "Email sent! Would you like to send another?";
}
}
Symbol 553 MovieClip [__Packages.remoting.RemotingService] Frame 0
class remoting.RemotingService
{
var gatewayUrl, serviceName, defaultSettings, service, dispatchEvent;
function RemotingService (gatewayUrl, serviceName, defaultSettings) {
mx.events.EventDispatcher.initialize(this);
this.gatewayUrl = gatewayUrl;
this.serviceName = serviceName;
this.defaultSettings = defaultSettings;
init();
}
function init() {
mx.remoting.debug.NetDebug.initialize();
service = new mx.remoting.Service(gatewayUrl, null, serviceName);
}
function setCredentials(user, pass) {
service.__get__connection().setCredentials(user, pass);
}
function __resolve(p_methodName) {
if ((p_methodName.indexOf("Handler") != -1) || (p_methodName.indexOf("__q_") != -1)) {
return(null);
}
var _local2 = new remoting.RemotingMethod(service, p_methodName, defaultSettings);
_local2.addEventListener("busy", mx.utils.Delegate.create(this, handleBusy));
_local2.addEventListener("result", mx.utils.Delegate.create(this, handleResult));
_local2.addEventListener("fault", mx.utils.Delegate.create(this, handleFault));
_local2.addEventListener("timeout", mx.utils.Delegate.create(this, handleTimeout));
_local2.addEventListener("call", mx.utils.Delegate.create(this, handleCall));
this[p_methodName] = mx.utils.Delegate.create(_local2, _local2.exec);
return(this[p_methodName]);
}
function handleBusy(eventObj) {
hasBeenBusy = true;
dispatchEvent({type:"busy", target:this});
}
function handleResult(eventObj) {
removePendingCall();
dispatchEvent({type:"result", target:this, result:eventObj.result, args:eventObj.args, methodName:eventObj.methodName});
}
function handleTimeout(eventObj) {
removePendingCall();
dispatchEvent({type:"timeout", target:this, args:eventObj.args, methodName:eventObj.methodName});
}
function handleFault(eventObj) {
removePendingCall();
if (eventObj.fault.faultcode == "AMFPHP_AUTH_MISMATCH") {
dispatchEvent({type:"authFault", target:this, fault:eventObj.fault, methodName:eventObj.methodName, args:eventObj.args});
} else {
dispatchEvent({type:"fault", target:this, fault:eventObj.fault, methodName:eventObj.methodName, args:eventObj.args});
}
}
function handleCall(eventObj) {
pendingCalls = pendingCalls + 1;
}
function removePendingCall() {
pendingCalls = pendingCalls - 1;
if ((pendingCalls == 0) && (hasBeenBusy)) {
hasBeenBusy = false;
dispatchEvent({type:"clear", target:this});
}
}
static var NO_RETRY = {maxAttempts:1, timeout:20000};
static var BUSY_TIME = 750;
var pendingCalls = 0;
var hasBeenBusy = false;
}
Symbol 62 MovieClip [__Packages.mx.remoting.Service] Frame 0
class mx.remoting.Service extends Object
{
var __conn, __serviceName, __responder;
function Service (gatewayURI, logger, serviceName, conn, resp) {
var _local1 = this;
var _local2 = conn;
var _local3 = gatewayURI;
super();
_local1.log = logger;
_local1.log.logInfo("Creating Service for " + serviceName, mx.services.Log.VERBOSE);
if ((_local3 == "") && (_local2 == null)) {
_local3 = mx.remoting.NetServices.gatewayUrl;
}
_local3 = mx.remoting.NetServices.getHttpUrl(_local3);
if (_local2 == null) {
_local2 = mx.remoting.NetServices.getConnection(_local3);
if (_local2 == null) {
_local1.log.logInfo("Creating gateway connection for " + _local3, mx.services.Log.VERBOSE);
_local2 = mx.remoting.NetServices.createGatewayConnection(_local3, logger);
}
}
_local1.__conn = _local2;
_local2.updateConfig();
_local1._allowRes = true;
_local1.__serviceName = serviceName;
_local1.__responder = resp;
_local1.log.logInfo("Successfully created Service", mx.services.Log.VERBOSE);
}
function get connection() {
return(__conn);
}
function __resolve(methodName) {
var _local2 = this;
if (_local2._allowRes) {
var _local1 = _local2.__makeOpFunc(methodName);
_local2[methodName] = _local1;
return(_local1);
}
return(null);
}
function __makeOpFunc(name) {
var op = (new mx.remoting.Operation(name, this));
var _local1 = function () {
op.invoke(arguments);
return(op.send());
};
_local1.send = function () {
return(op.createThenSend());
};
_local1.setResponder = function (resp) {
op.responder = resp;
};
_local1.getRequest = function () {
return(op.request);
};
_local1.setRequest = function (val) {
op.request = val;
};
_local1.addProperty("request", _local1.getRequest, _local1.setRequest);
_local1.operation = op;
return(_local1);
}
function get name() {
return(__serviceName);
}
function get responder() {
return(__responder);
}
static var version = "1.2.0.124";
var _allowRes = false;
}
Symbol 11 MovieClip [__Packages.mx.services.Log] Frame 0
class mx.services.Log
{
var level, name;
function Log (logLevel, name) {
level = ((logLevel == undefined) ? (BRIEF) : (logLevel));
this.name = ((name == undefined) ? "" : (name));
}
function logInfo(msg, level) {
if (level == undefined) {
level = BRIEF;
}
if (level <= this.level) {
if (level == DEBUG) {
onLog((((getDateString() + " [DEBUG] ") + name) + ": ") + msg);
} else {
onLog((((getDateString() + " [INFO] ") + name) + ": ") + msg);
}
}
}
function logDebug(msg) {
logInfo(msg, DEBUG);
}
function getDateString() {
var _local1 = new Date();
return(((((((((_local1.getMonth() + 1) + "/") + _local1.getDate()) + " ") + _local1.getHours()) + ":") + _local1.getMinutes()) + ":") + _local1.getSeconds());
}
function onLog(message) {
trace(message);
}
static var NONE = -1;
static var BRIEF = 0;
static var VERBOSE = 1;
static var DEBUG = 2;
}
Symbol 12 MovieClip [__Packages.mx.remoting.Connection] Frame 0
class mx.remoting.Connection extends NetConnection
{
var uri;
function Connection () {
super();
}
function getService(serviceName, client) {
var _local1 = new mx.remoting.NetServiceProxy(this, serviceName, client);
return(_local1);
}
function setCredentials(userId, password) {
addHeader("Credentials", false, {userid:userId, password:password});
}
function clone() {
var _local1 = new mx.remoting.Connection();
_local1.connect(uri);
return(_local1);
}
function getDebugId() {
return(null);
}
function getDebugConfig() {
return(null);
}
function setDebugId(id) {
}
function call() {
super.call.apply(super, arguments);
}
function close() {
super.close();
}
function connect(url) {
return(super.connect(url));
}
function addHeader(name, mustUnderstand, obj) {
super.addHeader(name, mustUnderstand, obj);
}
function trace(traceObj) {
}
function AppendToGatewayUrl(urlSuffix) {
var _local1 = this;
_local1.__urlSuffix = urlSuffix;
if (_local1.__originalUrl == null) {
_local1.__originalUrl = _local1.uri;
}
var _local2 = _local1.__originalUrl + urlSuffix;
_local1.connect(_local2);
}
function ReplaceGatewayUrl(newUrl) {
connect(newUrl);
}
function RequestPersistentHeader(info) {
var _local1 = info;
addHeader(_local1.name, _local1.mustUnderstand, _local1.data);
}
static var version = "1.2.0.124";
}
Symbol 18 MovieClip [__Packages.mx.remoting.NetServiceProxy] Frame 0
class mx.remoting.NetServiceProxy extends Object
{
var nc, client;
function NetServiceProxy (netC, servName, cli) {
var _local1 = this;
super();
if (netC != null) {
_local1.nc = netC;
_local1.serviceName = servName;
_local1.client = cli;
}
_local1._allowRes = true;
}
function _setParentService(service) {
nc = service.nc;
client = service.client;
}
function __resolve(methodName) {
var _local1 = this;
var _local2 = arguments;
if (_local1._allowRes) {
var _local3 = function () {
var _local1 = this;
var _local2 = arguments;
if (_local1.client != null) {
_local2.unshift(new mx.remoting.NetServiceProxyResponder(_local1, methodName));
} else if (typeof(_local2[0].onResult) != "function") {
mx.remoting.NetServices.trace("NetServices", "warning", 3, "There is no defaultResponder, and no responder was given in call to " + methodName);
_local2.unshift(new mx.remoting.NetServiceProxyResponder(_local1, methodName));
}
if (typeof(_local1.serviceName) == "function") {
_local1.serviceName = _local1.servicename;
}
_local2.unshift((_local1.serviceName + ".") + methodName);
return(_local1.nc.call.apply(_local1.nc, _local2));
};
return(_local3);
}
return(null);
}
static function registerNetServiceProxy() {
Object.registerClass("NetServiceProxy", mx.remoting.NetServiceProxy);
return(true);
}
static var init = registerNetServiceProxy();
var _allowRes = false;
}
Symbol 61 MovieClip [__Packages.mx.rpc.Responder] Frame 0
interface mx.rpc.Responder{}
Symbol 60 MovieClip [__Packages.mx.rpc.FaultEvent] Frame 0
class mx.rpc.FaultEvent extends Object
{
var __fault;
function FaultEvent (f) {
super();
__fault = f;
}
function get fault() {
return(__fault);
}
}
Symbol 59 MovieClip [__Packages.mx.rpc.Fault] Frame 0
class mx.rpc.Fault extends Object
{
var __faultcode, __faultstring, __detail, __type;
function Fault (code, msg, detail, type) {
var _local1 = this;
super();
_local1.__faultcode = code;
_local1.__faultstring = msg;
_local1.__detail = detail;
_local1.__type = type;
}
function get faultcode() {
return(__faultcode);
}
function get faultstring() {
return(__faultstring);
}
function get detail() {
return(__detail);
}
function get description() {
var _local2 = this;
if (_local2.__description == null) {
if (_local2.__faultstring.indexOf(":") > -1) {
_local2.__description = _local2.__faultstring.substring(_local2.__faultstring.indexOf(":") + 1);
var _local1 = 0;
while (_local2.__description.indexOf(" ", _local1) == _local1) {
_local1++;
}
if (_local1 > 0) {
_local2.__description = _local2.__description.substring(_local1);
}
} else {
_local2.__description = _local2.__faultstring;
}
}
return(_local2.__description);
}
function get type() {
return(__type);
}
}
Symbol 58 MovieClip [__Packages.mx.rpc.ResultEvent] Frame 0
class mx.rpc.ResultEvent extends Object
{
var __result;
function ResultEvent (res) {
super();
__result = res;
}
function get result() {
return(__result);
}
}
Symbol 17 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 41 MovieClip [__Packages.mx.remoting.debug.NetDebug] Frame 0
class mx.remoting.debug.NetDebug extends Object
{
static var ndSingleton;
var _ncs, _nextNewId, _glc, _config;
function NetDebug () {
var _local1 = this;
super();
_local1._ncs = new Array();
_local1._config = mx.remoting.debug.NetDebugConfig.getDefaultNetDebugConfig(false);
_local1._glc = new mx.remoting.debug.GlobalLocalConnection(false, _local1);
_local1._glc.sendCommand(new mx.remoting.debug.commands.GetConfig());
_local1._nextNewId = 0;
if (_global.System.onStatus == undefined) {
_global.System.onStatus = globalOnStatus;
}
mx.remoting.NetServices.traceNetServices = traceNetServices;
}
function addNetConnection(nc) {
_ncs.push(nc);
return(_nextNewId++);
}
function requestNewConfig() {
return(sendCommand(new mx.remoting.debug.commands.GetConfig()));
}
function removeNetConnection(nc) {
var _local2 = this;
var _local3 = _local2._ncs.length;
var _local1 = 0;
while (_local1 < _local3) {
if (nc == _local2._ncs[_local1]) {
_local2._ncs.splice(_local1, 1);
return;
}
_local1++;
}
}
function sendDebugEvent(eventobj) {
if (!_glc.send(eventobj)) {
_glc.send(new mx.remoting.debug.events.NetDebugFailedSendError(stripNCDEventToMinmal(eventobj)));
return(false);
}
return(true);
}
function sendCommand(commandobj) {
return(_glc.sendCommand(commandobj));
}
function updateConfig(config) {
var _local2 = this;
mx.utils.ObjectCopy.copyProperties(_local2._config, config);
var _local3 = _local2._ncs.length;
var _local1 = 0;
while (_local1 < _local3) {
if (_local2._ncs[_local1] != null) {
_local2._ncs[_local1].updateConfig(config);
}
_local1++;
}
}
function sendStatus(statusobj) {
var _local1 = this;
if (_local1._config.m_debug && (_local1._config.client.m_debug)) {
return(_local1._glc.send(new mx.remoting.debug.events.NetDebugStatus(statusobj)));
}
return(undefined);
}
function onEvent(eventObj) {
return(sendDebugEvent(eventObj));
}
function onEventError(errorObj) {
return(sendDebugEvent(new mx.remoting.debug.events.NetDebugError(errorObj)));
}
function onReceiveCommand(commandobj) {
this[commandobj.command](commandobj.data);
}
function onReceiveError(errorobj) {
sendDebugEvent(new mx.remoting.debug.events.NetDebugError(errorobj));
}
function getConfig() {
return(_config);
}
static function getNetDebug() {
return(ndSingleton);
}
static function trace(obj) {
getNetDebug()._trace(obj);
}
static function traceNetServices(who, severity, number, message) {
getNetDebug()._traceNetServices(who, severity, number, message);
}
static function globalOnStatus(statusobj) {
getNetDebug().sendStatus(statusobj);
}
static function initialize() {
if (ndSingleton == null) {
ndSingleton = new mx.remoting.debug.NetDebug();
mx.remoting.debug.ConnectionMixin.initialize();
}
return(true);
}
static function stripNCDEventToMinmal(ev) {
var _local1 = ev;
var _local2 = new Object();
if (_local1.eventType != null) {
_local2.eventType = _local1.eventType;
}
if (_local1.source != null) {
_local2.source = _local1.source;
}
if (_local1.movieUrl != null) {
_local2.movieUrl = _local1.movieUrl;
}
if (_local1.date != null) {
_local2.date = _local1.date;
}
if (_local1.time != null) {
_local2.time = _local1.time;
}
if (_local1.protocol != null) {
_local2.protocol = _local1.protocol;
}
if (_local1.debugId != null) {
_local2.debugId = _local1.debugId;
}
return(_local2);
}
function _traceNetServices(who, severity, number, message) {
var _local1 = this;
if ((_local1._config.m_debug && (_local1._config.client.m_debug)) && (_local1._config.client.trace)) {
if (!_local1.sendDebugEvent(new mx.remoting.debug.events.NetDebugTraceNetServices(who, severity, number, message))) {
}
}
}
function _trace(traceobj) {
var _local1 = this;
if ((_local1._config.m_debug && (_local1._config.client.m_debug)) && (_local1._config.client.trace)) {
if (!_local1.sendDebugEvent(new mx.remoting.debug.events.NetDebugTrace(traceobj))) {
}
}
}
static var version = "1.2.0.124";
}
Symbol 25 MovieClip [__Packages.mx.remoting.debug.NetDebugConfig] Frame 0
class mx.remoting.debug.NetDebugConfig extends Object
{
function NetDebugConfig () {
super();
Object.registerClass("NetDebugConfig", mx.remoting.debug.NetDebugConfig);
}
static function getNetDebugVersion() {
return(1);
}
static function attachNetDebugConfigFunctions(ndc) {
var _local1 = ndc;
_local1.setDebug = function (setval) {
this.m_debug = setval;
};
_local1.getDebug = function () {
return(this.m_debug);
};
for (var _local2 in _local1) {
if (typeof(_local1[_local2]) == "object") {
attachNetDebugConfigFunctions(_local1[_local2]);
}
}
return(null);
}
static function getDefaultNetDebugConfig(isController) {
var _local1 = _global;
if (_local1.netDebugConfigSO == undefined) {
var _local2 = "TestMovie_Config_Info";
if (isController) {
_local2 = "Controller_Config_Info";
}
_local1.netDebugConfigSO = SharedObject.getLocal(_local2);
}
if (_local1.netDebugConfigSO.data.config == undefined) {
_local1.netDebugConfigSO.data.config = getRealDefaultNetDebugConfig();
}
_local1.netDebugConfigSO.flush();
return(_local1.netDebugConfigSO.data.config);
}
static function getRealDefaultNetDebugConfig() {
var _local1 = new mx.remoting.debug.NetDebugConfig();
_local1.m_debug = true;
_local1.client = new mx.remoting.debug.NetDebugConfig();
_local1.client.m_debug = true;
_local1.client.trace = true;
_local1.client.recordset = true;
_local1.client.http = true;
_local1.client.rtmp = true;
_local1.realtime_server = new mx.remoting.debug.NetDebugConfig();
_local1.realtime_server.m_debug = true;
_local1.realtime_server.trace = true;
_local1.app_server = new mx.remoting.debug.NetDebugConfig();
_local1.app_server.m_debug = true;
_local1.app_server.trace = true;
_local1.app_server.error = true;
_local1.app_server.recordset = true;
_local1.app_server.httpheaders = false;
_local1.app_server.amf = false;
_local1.app_server.amfheaders = false;
_local1.app_server.coldfusion = true;
return(_local1);
}
}
Symbol 34 MovieClip [__Packages.mx.remoting.debug.GlobalLocalConnection] Frame 0
class mx.remoting.debug.GlobalLocalConnection extends Object
{
var sendPrefix;
function GlobalLocalConnection (isController, receiver, domainName) {
var _local2 = this;
var _local3 = _global;
super();
_local2.maxConnections = 10;
var sToMovie = "_NetDebugLocalToDebugMovie";
var sToController = "_NetDebugLocalToController";
var connectname = null;
if (isController) {
connectname = sToController;
_local2.sendNames = new Array();
_local2.sendNames.push(sToMovie);
var _local1 = 0;
while (_local1 < _local2.maxConnections) {
_local2.sendNames.push(sToMovie + _local1);
_local1++;
}
_local2.maxConnections = 0;
} else {
connectname = sToMovie;
_local2.sendNames = new Array();
_local2.sendNames.push(sToController);
}
_local2.setDomainName(domainName);
if (_local3.g_NetDebugLocalConnection == undefined) {
_local3.g_NetDebugLocalConnection = new LocalConnection();
_local3.g_NetDebugLocalConnection.allowDomain = function () {
return(true);
};
}
if (receiver != null) {
_local3.g_NetDebugLocalConnection.m_Receiver = receiver;
_local3.g_NetDebugLocalConnection.onData = function (dataobj) {
_global.g_NetDebugLocalConnection.m_Receiver.onReceive(dataobj);
};
_local3.g_NetDebugLocalConnection.onCommand = function (commandobj) {
_global.g_NetDebugLocalConnection.m_Receiver.onReceiveCommand(commandobj);
};
if (!_local3.g_NetDebugLocalConnection.connect(connectname)) {
var connected = false;
var _local1 = 0;
while (_local1 < _local2.maxConnections) {
if (_local3.g_NetDebugLocalConnection.connect(connectname + _local1)) {
connected = true;
break;
}
_local1++;
}
if (!connected) {
if (isController) {
receiver.onReceiveError(new mx.remoting.debug.events.NetDebugDuplicateNCDError());
}
}
}
}
}
function setDomainName(domainName) {
var _local1 = domainName;
if ((_local1 != null) && (_local1 != "")) {
sendPrefix = _local1 + ":";
} else {
sendPrefix = "";
}
}
function send(dataobj) {
return(sendRaw("onData", dataobj));
}
function sendCommand(commandObj) {
return(sendRaw("onCommand", commandObj));
}
function sendRaw(functionName, obj) {
var _local3 = this;
var _local2 = true;
var snlen = _local3.sendNames.length;
var _local1 = 0;
while (_local1 < snlen) {
_local2 = Boolean(_local2 & _global.g_NetDebugLocalConnection.send(_local3.sendPrefix + _local3.sendNames[_local1], functionName, obj));
_local1++;
}
return(_local2);
}
}
Symbol 554 MovieClip [__Packages.remoting.RemotingMethod] Frame 0
class remoting.RemotingMethod
{
var service, methodName, defaultSettings, dispatchEvent;
function RemotingMethod (service, methodName, defaultSettings) {
mx.events.EventDispatcher.initialize(this);
this.service = service;
this.methodName = methodName;
this.defaultSettings = defaultSettings;
}
function exec() {
var _local4 = null;
if (arguments.length == 5) {
_local4 = arguments.pop();
}
if (_local4 == null) {
_local4 = defaultSettings;
}
var _local6 = arguments.slice(0, 4);
var _local3 = new remoting.RemotingCall(service, methodName, _local6[0], _local6[1], _local6[2], _local6[3], _local4);
_local3.exec();
dispatchEvent({target:this, type:"call", args:_local3.args, methodName:methodName});
_local3.faultHandler = mx.utils.Delegate.create(this, onFault);
_local3.resultHandler = mx.utils.Delegate.create(this, onResult);
_local3.busyHandler = mx.utils.Delegate.create(this, onBusy);
_local3.timeoutHandler = mx.utils.Delegate.create(this, onTimeout);
}
function onFault(rc, fault) {
dispatchEvent({target:this, type:"fault", args:rc.args, methodName:methodName, fault:fault.__get__fault()});
}
function onResult(rc, result) {
dispatchEvent({target:this, type:"result", args:rc.args, methodName:methodName, result:result.__get__result()});
}
function onBusy() {
dispatchEvent({target:this, type:"busy"});
}
function onTimeout(rc) {
dispatchEvent({target:this, type:"timeout", methodName:methodName, args:rc.args});
}
}
Symbol 555 MovieClip [__Packages.remoting.RemotingCall] Frame 0
class remoting.RemotingCall
{
var service, methodName, args, resultCb, faultCb, meta, pc, busyInt, timeoutInt, busyHandler, resultHandler, faultHandler, timeoutHandler;
function RemotingCall (service, methodName, args, scope, resultCb, faultCb, meta) {
this.service = service;
this.methodName = methodName;
this.args = args;
this.resultCb = mx.utils.Delegate.create(scope, resultCb);
this.faultCb = mx.utils.Delegate.create(scope, faultCb);
this.meta = meta;
if (meta.timeout != null) {
timeout = meta.timeout;
}
if (meta.maxAttempts != null) {
maxAttempts = meta.maxAttempts;
}
}
function exec() {
pc = service[methodName].apply(this, args);
pc.__set__responder(new mx.rpc.RelayResponder(this, "onResult", "onFault"));
if (attempt == 0) {
busyInt = setInterval(mx.utils.Delegate.create(this, onBusy), remoting.RemotingService.BUSY_TIME);
timeoutInt = setInterval(mx.utils.Delegate.create(this, onTimeout), timeout);
}
attempt++;
}
function onBusy(re) {
clearInterval(busyInt);
busyHandler();
}
function onResult(re) {
if (!completed) {
clearInterval(timeoutInt);
clearInterval(busyInt);
resultHandler(this, re);
resultCb.apply(this, [re, args]);
completed = true;
}
}
function onFault(fe) {
if (!completed) {
clearInterval(timeoutInt);
clearInterval(busyInt);
faultCb.apply(this, [fe, args]);
faultHandler(this, fe);
completed = true;
}
}
function onTimeout() {
clearInterval(busyInt);
if (attempt >= maxAttempts) {
clearInterval(timeoutInt);
var _local2 = new mx.rpc.FaultEvent(new mx.rpc.Fault("TIMEOUT", methodName + " timed out", "", ""));
faultCb.apply(this, [_local2, args]);
timeoutHandler(this);
} else {
exec();
}
}
var attempt = 0;
var timeout = 5000;
var maxAttempts = 3;
var completed = false;
}
Symbol 57 MovieClip [__Packages.mx.remoting.PendingCall] Frame 0
class mx.remoting.PendingCall extends Object
{
var __service, __methodName, __responder;
function PendingCall (srv, methodName) {
super();
__service = srv;
__methodName = methodName;
}
function get responder() {
return(__responder);
}
function set responder(res) {
__responder = res;
//return(responder);
}
function onResult(result) {
var _local1 = result;
var _local2 = this;
_local1.serviceName = ((typeof(_local1.serviceName) == "function") ? (_local1.servicename) : (_local1.serviceName));
if (_local1 != null) {
if (_local1 instanceof mx.remoting.NetServiceProxy) {
var serv = (new mx.remoting.Service(null, null, _local1.serviceName, _local2.__service.__get__connection(), _local2.__service.__get__responder()));
_local1 = serv;
} else if (_local1 instanceof mx.remoting.RecordSet) {
var _local3 = new mx.remoting.NetServiceProxy(_local2.__service.__get__connection());
_local1._setParentService(_local3);
_local1.logger = _local2.__service.log;
}
}
if (_local2.__responder != null) {
_local2.__responder.onResult(new mx.rpc.ResultEvent(_local1));
}
if (_local2.__service.log != null) {
_local2.__service.log.logInfo((((_local2.__service.__get__name() + ".") + _local2.__methodName) + "() returned ") + mx.data.binding.ObjectDumper.toString(_local1));
}
}
function onStatus(status) {
var _local1 = this;
var _local2 = status;
if (_local1.__responder != null) {
_local1.__responder.onFault(new mx.rpc.FaultEvent(new mx.rpc.Fault(_local2.code, _local2.description, _local2.details, _local2.type)));
}
if (_local1.__service.log != null) {
_local1.__service.log.logDebug("Service invocation failed.");
_local1.__service.log.logDebug((((_local1.__service.__get__name() + ".") + _local1.__methodName) + "() returned ") + mx.data.binding.ObjectDumper.toString(_local2));
}
}
function get methodName() {
return(__methodName);
}
static var inited = mx.remoting.NetServiceProxy.registerNetServiceProxy();
}
Symbol 556 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 65 MovieClip [__Packages.mx.rpc.RelayResponder] Frame 0
class mx.rpc.RelayResponder extends Object
{
var __onFault, __obj, __onResult;
function RelayResponder (resp, resultFunc, faultFunc) {
var _local1 = this;
super();
_local1.__obj = resp;
_local1.__onFault = faultFunc;
_local1.__onResult = resultFunc;
}
function onFault(fault) {
__obj[__onFault](fault);
}
function onResult(result) {
__obj[__onResult](result);
}
}
Symbol 557 MovieClip [__Packages.it.sephiroth.Serializer] Frame 0
class it.sephiroth.Serializer
{
var buffer;
function Serializer () {
}
function serialize(what) {
var _local2 = new String("");
_local2 = serialize_internal("", what);
return(_local2);
}
function serialize_internal(buf, struct_c) {
if (((!isNaN(struct_c)) && (struct_c.__proto__ != Boolean.prototype)) && (struct_c.__proto__ != Date.prototype)) {
var _local2 = new Number(struct_c);
} else {
var _local2 = struct_c;
}
switch (_local2.__proto__) {
case Boolean.prototype :
buf = ((buf + "b:") + int(_local2)) + ";";
break;
case null :
case undefined :
buf = buf + "N;";
break;
case Number.prototype :
if (_local2 >= 1E15) {
buf = ((buf + "d:") + _local2) + ";";
} else if ((_local2 % 1) == 0) {
buf = ((buf + "i:") + _local2) + ";";
} else {
buf = ((buf + "d:") + _local2) + ";";
}
break;
case String.prototype :
buf = ((((buf + "s:") + calcLength(_local2)) + ":\"") + _local2) + "\";";
break;
case Date.prototype :
buf = ((((buf + "s:") + length(_local2)) + ":\"") + _local2) + "\";";
break;
case Object.prototype :
var _local4 = 0;
var _local5 = new String("");
buf = buf + "O:8:\"stdClass\":";
for (var _local6 in _local2) {
_local5 = _local5 + (serialize_internal("", _local6) + serialize_internal("", _local2[_local6]));
_local4 = _local4 + 1;
}
buf = (((buf + _local4) + ":{") + _local5) + "}";
break;
case Array.prototype :
_local4 = 0;
_local5 = new String("");
buf = buf + "a:";
for (var _local6 in _local2) {
_local5 = _local5 + (serialize_internal("", _local6) + serialize_internal("", _local2[_local6]));
_local4 = _local4 + 1;
}
buf = (((buf + _local4) + ":{") + _local5) + "}";
break;
default :
buf = buf + "i:0;";
}
return(buf);
}
function calcLength(struct) {
var _local1;
var _local3 = 0;
var _local4 = struct.length;
var _local2 = 0;
while (_local2 < _local4) {
_local1 = ord(struct.charAt(_local2));
if (_local1 < 128) {
_local3 = _local3 + 1;
} else if (_local1 < 1024) {
_local3 = _local3 + 2;
} else if (_local1 < 32768) {
_local3 = _local3 + 3;
} else if (_local1 < 2097152) {
_local3 = _local3 + 4;
}
_local2++;
}
return(_local3);
}
function unserialize(what) {
buffer = what;
return(unserialize_internal(what));
}
function unserialize_internal(obj) {
var _local3 = obj.charAt(0);
var _local2;
switch (_local3) {
case "d" :
_local2 = parse_double();
break;
case "i" :
_local2 = parse_int();
break;
case "b" :
_local2 = parse_boolean();
break;
case "s" :
_local2 = parse_string();
break;
case "a" :
_local2 = parse_array();
break;
case "O" :
_local2 = parse_object();
break;
case "N" :
}
if (_local2[0] != -1) {
buffer = buffer.substr(buffer.indexOf(";", (_local2[0] + length(_local3)) + length(_local2[0].toString())) + 1);
}
return(_local2[1]);
}
function parse_array() {
var _local3 = 0;
var _local5 = getArrayLength();
var _local4 = new Array();
while (_local3 < _local5) {
var _local2 = getNext();
_local4[_local2[0]] = _local2[1];
_local3++;
}
buffer = buffer.substr(1);
return(new Array(-1, _local4));
}
function parse_object() {
var _local6 = parse_string();
buffer = buffer.substr(buffer.indexOf(":", _local6[0]));
var _local7 = _local6[1];
var _local3 = 0;
var _local5 = getObjectLength();
var _local4 = new Object();
while (_local3 < _local5) {
var _local2 = getNext();
_local4[_local2[0]] = _local2[1];
_local3++;
}
buffer = buffer.substr(1);
return(new Array(-1, _local4));
}
function parse_string() {
var _local2 = getStringLenght();
var _local3 = getCStringLenght();
if (_local2 eq _local3) {
var _local4 = buffer.substr(length(_local2) + 4, _local2).toString();
} else {
var _local4 = buffer.substr(length(_local2) + 4, _local3).toString();
}
return(new Array(_local3, _local4));
}
function parse_boolean() {
var _local2 = getLength();
var _local3 = ((_local2 < 1) ? false : true);
return(new Array(length(_local2.toString()), _local3));
}
function parse_double() {
var _local2 = getFloatLength();
var _local3 = _local2;
return(new Array(length(_local2.toString()), _local3));
}
function parse_int() {
var _local2 = getLength();
var _local3 = _local2;
return(new Array(length(_local2.toString()), _local3));
}
function getStringLenght(str) {
var _local2 = parseInt(buffer.substr(2, buffer.indexOf(":", 3) - 2));
return(_local2);
}
function getCStringLenght(str) {
var _local6 = parseInt(buffer.substr(2, buffer.indexOf(":", 3) - 2));
var _local2;
var _local3 = _local6;
var _local4;
var _local5 = buffer;
_local4 = 4 + _local6.toString().length;
_local2 = 0;
while (_local2 < _local3) {
if (_local5.charCodeAt(_local2 + _local4) > 128) {
_local3 = _local3 - 1;
}
_local2++;
}
return(_local3);
}
function getLength() {
var _local2 = parseInt(buffer.substr(2, buffer.indexOf(";", 3) - 2));
return(_local2);
}
function getFloatLength() {
var _local2 = parseFloat(buffer.substr(2, buffer.indexOf(";", 3) - 2));
return(_local2);
}
function getArrayLength() {
var _local2 = parseInt(buffer.substr(2, (buffer.indexOf(":", 2) - buffer.indexOf(":", 1)) + 1));
buffer = buffer.substr(buffer.indexOf(":", 2) + 2);
return(_local2);
}
function getObjectLength() {
var _local2 = parseInt(buffer.substr(1, buffer.indexOf(":", 1)));
buffer = buffer.substr(buffer.indexOf(":", 1) + 2);
return(_local2);
}
function getNext(str) {
var _local2 = unserialize_internal(buffer);
var _local3 = unserialize_internal(buffer);
return(new Array(_local2, _local3));
}
static var className = "it.sephiroth.Serializer";
static var classVersion = "2.1.6";
var instanceName = "Serializer";
}
Symbol 6 MovieClip [__Packages.mx.remoting.DebugClasses] Frame 0
class mx.remoting.DebugClasses extends MovieClip
{
function DebugClasses () {
super();
}
}
Symbol 13 MovieClip [__Packages.mx.remoting.NetServices] Frame 0
class mx.remoting.NetServices extends Object
{
static var defaultGatewayUrl, logger, traceNetServices;
function NetServices () {
super();
}
static function setDefaultGatewayUrl(url) {
defaultGatewayUrl = url;
}
static function setGatewayUrl(url) {
gatewayUrl = url;
}
static function createGatewayConnection(url, infoLogger) {
var _local1 = url;
logger = infoLogger;
if (_local1 == undefined) {
_local1 = gatewayUrl;
if (_local1 == undefined) {
_local1 = defaultGatewayUrl;
}
}
if (_local1 == undefined) {
trace("NetServices", "warning", 4, "createGatewayConnection - gatewayUrl is undefined");
logger.logInfo(("NetServices: createGatewayConnection - gateway url <" + _local1) + "> is undefined", mx.services.Log.DEBUG);
return(null);
}
var _local2 = new mx.remoting.Connection();
_local2.connect(_local1);
__sharedConnections[_local1] = _local2;
return(_local2);
}
static function getConnection(uri) {
return(__sharedConnections[uri]);
}
static function getHostUrl() {
var _local2 = _root;
if (!isHttpUrl(_local2._url)) {
trace("NetServices", "warning", 4, "createGatewayConnection - gatewayUrl is invalid");
return(null);
}
var _local1 = _local2._url.indexOf("/", 8);
if (_local1 < 0) {
trace("NetServices", "warning", 4, "createGatewayConnection - gatewayUrl is invalid");
return(null);
}
return(_local2._url.substring(0, _local1));
}
static function isHttpUrl(url) {
return((url.indexOf("http://") == 0) || (url.indexOf("https://") == 0));
}
static function getHttpUrl(url) {
var _local1 = url;
if (!isHttpUrl(_local1)) {
_local1 = getHostUrl() + _local1;
}
return(_local1);
}
static function trace(who, severity, number, message) {
traceNetServices(who, severity, number, message);
}
static var version = "1.2.0.124";
static var gatewayUrl = _root.gatewayUrl;
static var __sharedConnections = new Array();
}
Symbol 14 MovieClip [__Packages.mx.data.DataRange] Frame 0
interface mx.data.DataRange{}
Symbol 15 MovieClip [__Packages.mx.data.PageableData] Frame 0
interface mx.data.PageableData{}
Symbol 16 MovieClip [__Packages.mx.data.PageableList] Frame 0
interface mx.data.PageableList{}
Symbol 19 MovieClip [__Packages.mx.utils.Iterator] Frame 0
interface mx.utils.Iterator{}
Symbol 20 MovieClip [__Packages.mx.remoting.RecordSet] Frame 0
class mx.remoting.RecordSet extends Object
{
var mTitles, _items, mRecordSetID, dispatchEvent, gateway_conn, mDataFetcher;
function RecordSet (columnNames) {
var _local1 = this;
super();
mx.events.EventDispatcher.initialize(_local1);
_local1._items = new Array();
_local1.uniqueID = 0;
if (_local1.mTitles != null) {
} else {
if (_local1.serverInfo == null) {
if (_local1.serverinfo != null) {
_local1.serverInfo = _local1.serverinfo;
}
}
if (_local1.serverInfo == null) {
_local1.mTitles = columnNames;
} else if (_local1.serverInfo.version != 1) {
mx.remoting.NetServices.trace("RecordSet", "warning", 100, "Received incompatible RecordSet version from server");
} else {
_local1.mTitles = _local1.serverInfo.columnNames;
_local1.mRecordsAvailable = 0;
_local1.setData(((_local1.serverInfo.cursor == null) ? 0 : (_local1.serverInfo.cursor - 1)), _local1.serverInfo.initialData);
if (_local1.serverInfo.initialData.length != _local1.serverInfo.totalCount) {
_local1.mRecordSetID = _local1.serverInfo.id;
if (_local1.mRecordSetID != null) {
_local1.serviceName = ((_local1.serverInfo.serviceName == null) ? "RecordSet" : (_local1.serverInfo.serviceName));
_local1.mTotalCount = _local1.serverInfo.totalCount;
_local1.mDeliveryMode = "ondemand";
_local1.mAllNotified = false;
_local1.mOutstandingRecordCount = 0;
} else {
mx.remoting.NetServices.trace("RecordSet", "warning", 102, "Missing some records, but there's no RecordSet id");
}
}
_local1.serverInfo = null;
}
}
}
function addItem(item) {
addItemAt(length, item);
}
function addItemAt(index, item) {
var _local1 = index;
var _local2 = this;
var _local3 = true;
if ((_local1 < _local2.__get__length()) && (_local1 >= 0)) {
_local2.items.splice(_local1, 0, item);
} else if (_local1 == _local2.__get__length()) {
_local2.items[_local1] = item;
} else {
_local3 = false;
mx.remoting.NetServices.trace("Cannot add an item outside the bounds of the RecordSet");
return;
}
if (_local3) {
item.__ID__ = _local2.uniqueID++;
}
_local2.updateViews("addItems", _local1, _local1);
}
function addEventListener(event, listener) {
}
function clear() {
var _local1 = this;
if (_local1.checkLocal()) {
} else {
var _local2 = _local1.items.length;
_local1.items.splice(0);
_local1.uniqueID = 0;
_local1.updateViews("removeItems", 0, _local2);
}
}
function contains(itmToCheck) {
var _local2 = itmToCheck;
if (isObjectEmpty(_local2)) {
return(false);
}
var itemAtIndex;
var _local3;
var _local1 = 0;
while (_local1 < items.length) {
itemAtIndex = items[_local1];
_local3 = true;
for (var t in _local2) {
if (_local2[t] != itemAtIndex[t]) {
_local3 = false;
break;
}
}
if (_local3) {
return(true);
}
_local1++;
}
return(false);
}
function getColumnNames() {
return(mTitles);
}
function get columnNames() {
return(getColumnNames());
}
function getLocalLength() {
return(items.length);
}
function getLength() {
var _local1 = this;
if (_local1.mRecordSetID != null) {
return(_local1.mTotalCount);
}
return(_local1.items.length);
}
function getIterator() {
var _local1 = new mx.remoting.RecordSetIterator(this);
return(_local1);
}
function get length() {
return(getLength());
}
function getItemAt(index) {
var _local1 = index;
var _local2 = this;
if ((_local1 < 0) || (_local1 >= _local2.__get__length())) {
return(null);
}
if (_local2.mRecordSetID == null) {
return(_local2.items[_local1]);
}
_local2.requestRecord(_local1);
var _local3 = _local2.items[_local1];
if (_local3 == 1) {
return("in progress");
}
return(_local3);
}
function getItemID(index) {
return(items[index].__ID__);
}
function get items() {
return(_items);
}
function initialize(info) {
}
function filter(filterFunction, context) {
if (checkLocal()) {
} else {
var _local3 = new mx.remoting.RecordSet(mTitles);
var rcount = length;
var _local2 = 0;
while (_local2 < rcount) {
var _local1 = getItemAt(_local2);
if (((_local1 != null) && (_local1 != 1)) && (filterFunction(_local1, context))) {
_local3.addItem(_local1);
}
_local2++;
}
return(_local3);
}
return(undefined);
}
function sortItems(compareFunc, optionFlags) {
var _local1 = this;
if (_local1.checkLocal()) {
} else {
_local1.items.sort(compareFunc, optionFlags);
_local1.updateViews("sort");
}
}
function sortItemsBy(fieldNames, order, optionFlags) {
var _local1 = this;
if (_local1.checkLocal()) {
} else {
if (typeof(order) == "string") {
_local1.items.sortOn(fieldNames);
if (order.toUpperCase() == "DESC") {
_local1.items.reverse();
}
} else {
_local1.items.sortOn(fieldNames, optionFlags);
}
_local1.updateViews("sort");
}
}
function sort(compareFunc) {
var _local1 = this;
if (_local1.checkLocal()) {
} else {
_local1.items.sort(compareFunc);
_local1.updateViews("sort");
}
}
function isEmpty() {
return(items.length == 0);
}
function isLocal() {
return(mRecordSetID == null);
}
function isFullyPopulated() {
return(isLocal());
}
function getRemoteLength() {
var _local1 = this;
if (_local1.isLocal()) {
return(_local1.mRecordsAvailable);
}
return(_local1.mTotalCount);
}
function getNumberAvailable() {
var _local1 = this;
if (_local1.isLocal()) {
return(_local1.getLength());
}
return(_local1.mRecordsAvailable);
}
function replaceItemAt(index, item) {
var _local1 = index;
var _local2 = this;
if ((_local1 >= 0) && (_local1 <= _local2.__get__length())) {
var _local3 = _local2.getItemID(_local1);
_local2.items[_local1] = item;
_local2.items[_local1].__ID__ = _local3;
_local2.updateViews("updateItems", _local1, _local1);
}
}
function removeAll() {
clear();
}
function removeItemAt(index) {
var _local1 = index;
var _local2 = this;
var _local3 = _local2._items[_local1];
_local2._items.splice(_local1, 1);
var rItems = [_local2._items[_local1]];
var rIDs = [_local2.getItemID(_local1)];
_local2.dispatchEvent({type:"modelChanged", eventName:"removeItems", firstItem:_local1, lastItem:_local1, removedItems:rItems, removedIDs:rIDs});
return(_local3);
}
function removeEventListener(event, listener) {
}
function requestRange(range) {
var _local1 = range.getStart();
var _local2 = range.getEnd();
return(internalRequestRange(_local1, _local2));
}
function setDeliveryMode(mode, pagesize, numPrefetchPages) {
var _local1 = this;
var _local2 = pagesize;
var _local3 = numPrefetchPages;
_local1.mDeliveryMode = mode.toLowerCase();
_local1.stopFetchAll();
if ((_local2 == null) || (_local2 <= 0)) {
_local2 = 25;
}
switch (_local1.mDeliveryMode) {
case "ondemand" :
return;
case "page" :
if (_local3 == null) {
_local3 = 0;
}
_local1.mPageSize = _local2;
_local1.mNumPrefetchPages = _local3;
return;
case "fetchall" :
_local1.stopFetchAll();
_local1.startFetchAll(_local2);
return;
default :
mx.remoting.NetServices.trace("RecordSet", "warning", 107, "SetDeliveryMode: unknown mode string");
}
}
function editField(index, fieldName, value) {
changeFieldValue(index, fieldName, value);
}
function getEditingData(index, fieldName) {
return(items[index][fieldName]);
}
function setField(index, fieldName, value) {
changeFieldValue(index, fieldName, value);
}
function changeFieldValue(index, fieldName, value) {
var _local1 = index;
var _local2 = this;
if (_local2.checkLocal()) {
} else if ((_local1 < 0) || (_local1 >= _local2.getLength())) {
} else {
_local2.items[_local1][fieldName] = value;
_local2.updateViews("updateItems", _local1, _local1);
}
}
function isObjectEmpty(objToCheck) {
var _local2 = objToCheck;
var _local1 = true;
for (var _local3 in _local2) {
_local1 = false;
return(_local1);
}
return(_local1);
}
function arrayToObject(anArray) {
if (mTitles == null) {
mx.remoting.NetServices.trace("RecordSet", "warning", 105, "getItem: titles are not available");
return(null);
}
var _local3 = new Object();
var alen = anArray.length;
var _local2;
var _local1 = 0;
while (_local1 < alen) {
_local2 = mTitles[_local1];
if (_local2 == null) {
_local2 = ("column" + _local1) + 1;
}
_local3[_local2] = anArray[_local1];
_local1++;
}
return(_local3);
}
function checkLocal() {
if (isLocal()) {
return(false);
}
mx.remoting.NetServices.trace("RecordSet", "warning", 108, "Operation not allowed on partial recordset");
return(true);
}
function getRecordSetService() {
var _local1 = this;
if (_local1.mRecordSetService == null) {
if (_local1.gateway_conn == null) {
_local1.gateway_conn = mx.remoting.NetServices.createGatewayConnection();
} else if (_global.netDebugInstance != undefined) {
_local1.gateway_conn = _local1.gateway_conn.clone();
}
if (_global.netDebugInstance != undefined) {
_local1.gateway_conn.setupRecordSet();
_local1.gateway_conn.setDebugId("RecordSet " + _local1.mRecordSetID);
}
_local1.mRecordSetService = _local1.gateway_conn.getService(_local1.serviceName, _local1);
if (_local1.mRecordSetService == null) {
mx.remoting.NetServices.trace("RecordSet", "warning", 101, "Failed to create RecordSet service");
_local1.mRecordSetService = null;
}
}
return(_local1.mRecordSetService);
}
function internalRequestRange(index, lastIndex) {
var _local1 = index;
var _local2 = this;
var highestRequested = -1;
if (_local1 < 0) {
_local1 = 0;
}
if (lastIndex >= _local2.getRemoteLength()) {
lastIndex = _local2.getRemoteLength() - 1;
}
var _local3;
var last;
while (_local1 <= lastIndex) {
while ((_local1 <= lastIndex) && (_local2.items[_local1] != null)) {
_local1++;
}
_local3 = _local1;
while ((_local1 <= lastIndex) && (_local2.items[_local1] == null)) {
_local2.mOutstandingRecordCount++;
_local2.items[_local1] = 1;
_local1++;
}
last = _local1 - 1;
if (_local3 <= last) {
_local2.logger.logInfo((((" Fetching records from index [" + _local3) + "] to index [") + last) + "]");
_local2.getRecordSetService().getRecords(_local2.mRecordSetID, _local3 + 1, (last - _local3) + 1);
highestRequested = last;
_local2.updateViews("fetchRows", _local3, last);
}
}
return(highestRequested);
}
function removeItems(index, len) {
var _local3 = index;
var _local2 = new Array();
var _local1 = 0;
while (_local1 < len) {
_local2.push(getItemID(_local3 + _local1));
_local1++;
}
var oldItems = items.splice(_local3, len);
dispatchEvent({type:"modelChanged", eventName:"removeItems", firstItem:_local3, lastItem:(_local3 + len) - 1, removedItems:oldItems, removedIDs:_local2});
}
function getRecords_Result(info) {
var _local1 = this;
var _local2 = info;
_local1.setData(_local2.Cursor - 1, _local2.Page);
_local1.mOutstandingRecordCount = _local1.mOutstandingRecordCount - _local2.Page.length;
_local1.updateViews("updateItems", _local2.Cursor - 1, ((_local2.Cursor - 1) + _local2.Page.length) - 1);
if ((_local1.mRecordsAvailable == _local1.mTotalCount) && (!_local1.mAllNotified)) {
_local1.updateViews("allRows");
_local1.mRecordSetService.release();
_local1.mAllNotified = true;
_local1.mRecordSetID = null;
_local1.mRecordSetService = null;
}
}
function release_Result() {
}
function requestOneRecord(index) {
var _local1 = this;
var _local2 = index;
if (_local1.items[_local2] == null) {
if (_local1.mDeliveryMode == "ondemand") {
_local1.logger.logInfo((" INFO: Fetching Record [" + _local2) + "]");
}
_local1.getRecordSetService().getRecords(_local1.mRecordSetID, _local2 + 1, 1);
_local1.mOutstandingRecordCount++;
_local1.items[_local2] = 1;
_local1.updateViews("fetchRows", _local2, _local2);
}
}
function requestRecord(index) {
var _local1 = this;
if (_local1.mDeliveryMode != "page") {
_local1.requestOneRecord(index);
} else {
var _local2 = int(index / _local1.mPageSize) * _local1.mPageSize;
var _local3 = (_local2 + (_local1.mPageSize * (_local1.mNumPrefetchPages + 1))) - 1;
_local1.internalRequestRange(_local2, _local3);
}
}
function _setParentService(service) {
gateway_conn = service.nc;
}
function setData(start, dataArray) {
var _local1 = this;
var datalen = dataArray.length;
var _local3;
var rec;
var _local2 = 0;
while (_local2 < datalen) {
_local3 = _local2 + start;
rec = _local1.items[_local3];
if ((rec != null) && (rec != 1)) {
mx.remoting.NetServices.trace("RecordSet", "warning", 106, "Already got record # " + _local3);
} else {
_local1.mRecordsAvailable = _local1.mRecordsAvailable + 1;
}
_local1.items[_local3] = _local1.arrayToObject(dataArray[_local2]);
_local1.items[_local3].__ID__ = _local1.uniqueID++;
_local2++;
}
}
function startFetchAll(pagesize) {
var _local1 = this;
if (_local1.mDataFetcher != null) {
_local1.mDataFetcher.disable();
}
_local1.mDataFetcher = new mx.remoting.RsDataFetcher(_local1, pagesize);
}
function stopFetchAll() {
mDataFetcher.disable();
mDataFetcher = null;
}
function updateViews(event, first, last) {
dispatchEvent({type:"modelChanged", eventName:event, firstItem:first, lastItem:last});
}
static function registerRecordSet() {
Object.registerClass("RecordSet", mx.remoting.RecordSet);
return(true);
}
static var version = "1.2.0.124";
static var init = registerRecordSet();
}
Symbol 21 MovieClip [__Packages.mx.remoting.RecordSetIterator] Frame 0
class mx.remoting.RecordSetIterator
{
var _recordSet, _cursor;
function RecordSetIterator (rec) {
_recordSet = rec;
_cursor = 0;
}
function hasNext() {
return(_cursor < _recordSet.getLength());
}
function next() {
return(_recordSet.getItemAt(_cursor++));
}
static var version = "1.2.0.124";
}
Symbol 22 MovieClip [__Packages.mx.remoting.RsDataRange] Frame 0
class mx.remoting.RsDataRange extends Object
{
var _start, _end;
function RsDataRange (s, e) {
super();
_start = s;
_end = e;
}
function getStart() {
return(_start);
}
function getEnd() {
return(_end);
}
function setEnd(e) {
_end = e;
}
function setStart(s) {
_start = s;
}
}
Symbol 23 MovieClip [__Packages.mx.remoting.RsDataFetcher] Frame 0
class mx.remoting.RsDataFetcher extends Object
{
var mEnabled;
function RsDataFetcher (pgRS, increment) {
var _local1 = this;
super();
_local1.mRecordSet = pgRS;
_local1.mRecordSet.addEventListener("modelChanged", _local1);
_local1.mIncrement = increment;
_local1.mNextRecord = 0;
_local1.mEnabled = true;
_local1.doNext();
}
function disable() {
mEnabled = false;
}
function doNext() {
var _local1 = this;
if (_local1.mEnabled) {
do {
if (_local1.mNextRecord >= _local1.mRecordSet.getRemoteLength()) {
return;
}
var _local2 = new mx.remoting.RsDataRange(_local1.mNextRecord, (_local1.mNextRecord + _local1.mIncrement) - 1);
_local1.mHighestRequested = _local1.mRecordSet.requestRange(_local2);
_local1.mNextRecord = _local1.mNextRecord + _local1.mIncrement;
} while (_local1.mHighestRequested <= 0);
}
}
function modelChanged(eventObj) {
var _local1 = this;
var _local2 = eventObj;
if (((_local2.eventName == "updateItems") && (_local2.firstItem <= _local1.mHighestRequested)) && (_local2.lastItem >= _local1.mHighestRequested)) {
_local1.doNext();
}
if (_local2.eventName == "allRows") {
_local1.disable();
}
}
}
Symbol 24 MovieClip [__Packages.mx.remoting.NetServiceProxyResponder] Frame 0
class mx.remoting.NetServiceProxyResponder extends Object
{
var service, methodName;
function NetServiceProxyResponder (serv, method) {
super();
service = serv;
methodName = method;
}
function onResult(result) {
var _local2 = result;
var _local1 = service.client;
if ((_local2 instanceof mx.remoting.NetServiceProxy) || (_local2 instanceof mx.remoting.RecordSet)) {
_local2._setParentService(service);
}
var _local3 = methodName + "_Result";
if (typeof(_local1[_local3]) == "function") {
_local1[_local3].apply(_local1, [_local2]);
} else if (typeof(_local1.onResult) == "function") {
_local1.onResult(_local2);
} else {
mx.remoting.NetServices.trace("NetServices", "info", 1, (_local3 + " was received from server: ") + _local2);
}
}
function onStatus(result) {
var _local2 = result;
var _local1 = service.client;
var _local3 = methodName + "_Status";
if (typeof(_local1[_local3]) == "function") {
_local1[_local3].apply(_local1, [_local2]);
} else if (typeof(_local1.onStatus) == "function") {
_local1.onStatus(_local2);
} else if (typeof(_root.onStatus) == "function") {
_root.onStatus(_local2);
} else if (typeof(_global.System.onStatus) == "function") {
_global.System.onStatus(_local2);
} else {
mx.remoting.NetServices.trace("NetServices", "info", 2, (((_local3 + " was received from server: <") + _local2.level) + "> ") + _local2.description);
}
}
}
Symbol 26 MovieClip [__Packages.mx.utils.ObjectCopy] Frame 0
class mx.utils.ObjectCopy
{
function ObjectCopy () {
}
static function copy(refObj) {
var _local1 = new Function(refObj.__proto__.constructor)();
copyProperties(_local1, refObj);
return(_local1);
}
static function copyProperties(dstObj, srcObj) {
var _local2 = srcObj;
var to;
for (var i in _local2) {
to = typeof(_local2[i]);
if (to != "function") {
if (to == "object") {
if (_local2[i] instanceof Array) {
var p = new Array();
var _local3 = _local2[i];
var _local1 = 0;
while (_local1 < _local3.length) {
p[_local1] = _local3[_local1];
_local1++;
}
dstObj[i] = p;
} else if (_local2[i] instanceof String) {
dstObj[i] = new String(_local2[i]);
} else if (_local2[i] instanceof Number) {
dstObj[i] = new Number(_local2[i]);
} else if (_local2[i] instanceof Boolean) {
dstObj[i] = new Boolean(_local2[i]);
} else {
dstObj[i] = copy(_local2[i]);
}
} else {
dstObj[i] = _local2[i];
}
}
}
}
}
Symbol 27 MovieClip [__Packages.mx.remoting.debug.events.NetDebug] Frame 0
class mx.remoting.debug.events.NetDebug extends Object
{
var date, time;
function NetDebug () {
super();
init();
}
function init() {
var _local1 = this;
_local1.eventType = "DebugEvent";
_local1.source = "Client";
_local1.movieUrl = unescape(_root._url);
_local1.initDate();
}
function initDate() {
var _local1 = new Date();
date = _local1;
time = _local1.getTime();
}
}
Symbol 28 MovieClip [__Packages.mx.remoting.debug.events.NetDebugNetConnection] Frame 0
class mx.remoting.debug.events.NetDebugNetConnection extends mx.remoting.debug.events.NetDebug
{
function NetDebugNetConnection () {
super();
}
}
Symbol 29 MovieClip [__Packages.mx.remoting.debug.events.NetDebugConnect] Frame 0
class mx.remoting.debug.events.NetDebugConnect extends mx.remoting.debug.events.NetDebugNetConnection
{
function NetDebugConnect (args) {
var _local1 = args;
var _local2 = this;
super();
_local2.eventType = "Connect";
_local2.connectString = _local1[0];
if (_local1[1] != null) {
_local2.userName = _local1[1];
}
if (_local1[2] != null) {
_local2.password = _local1[2];
}
}
}
Symbol 30 MovieClip [__Packages.mx.remoting.debug.commands.Local] Frame 0
class mx.remoting.debug.commands.Local extends Object
{
var command, data;
function Local () {
super();
}
function init(commandname, dataobj) {
command = commandname;
data = dataobj;
}
}
Symbol 31 MovieClip [__Packages.mx.remoting.debug.commands.StartRTMPTrace] Frame 0
class mx.remoting.debug.commands.StartRTMPTrace extends mx.remoting.debug.commands.Local
{
var init;
function StartRTMPTrace (cs) {
super();
var _local1 = new Object();
_local1.connectstring = cs;
_local1.url = _root._url;
init("startRealTimeTrace", _local1);
}
}
Symbol 32 MovieClip [__Packages.mx.remoting.debug.ConnectionMixin] Frame 0
class mx.remoting.debug.ConnectionMixin extends Object
{
var _protocol, _id, _config;
function ConnectionMixin () {
super();
}
static function initialize() {
var _local1 = mx.remoting.Connection.prototype;
var _local2 = mx.remoting.debug.ConnectionMixin.prototype;
if (!_local1.netDebugProxyFunctions) {
_local1.netDebugProxyFunctions = true;
_local1.realConnect = _local1.connect;
_local1.realCall = _local1.call;
_local1.realClose = _local1.close;
_local1.realAddHeader = _local1.addHeader;
_local1.connect = _local2.netDebugProxyConnect;
_local1.call = _local2.netDebugProxyCall;
_local1.close = _local2.netDebugProxyClose;
_local1.addHeader = _local2.netDebugProxyAddHeader;
_local1.attachDebug = _local2.attachDebug;
_local1.sendDebugEvent = _local2.sendDebugEvent;
_local1.sendServerEvent = _local2.sendServerEvent;
_local1.sendClientEvent = _local2.sendClientEvent;
_local1.addNetDebugHeader = _local2.addNetDebugHeader;
_local1.updateConfig = _local2.updateConfig;
_local1.getNetDebug = _local2.getNetDebug;
_local1.isRealTime = _local2.isRealTime;
_local1.setupRecordSet = _local2.setupRecordSet;
_local1.setDebugId = _local2.setDebugId;
_local1.getDebugId = _local2.getDebugId;
_local1.getDebugConfig = _local2.getDebugConfig;
_local1.trace = _local2.trace;
return(true);
}
return(false);
}
function attachDebug() {
var _local1 = this;
if (!_attached) {
_attached = true;
_local1._headerAdded = false;
_local1._configured = false;
_local1._config = new mx.remoting.debug.NetDebugConfig();
mx.utils.ObjectCopy.copyProperties(_local1._config, _local1.getNetDebug().getConfig());
_local1._protocol = "none";
_local1._id = String(_local1.getNetDebug().addNetConnection(_local1));
}
}
function sendDebugEvent(eventobj) {
var _local1 = this;
var _local2 = eventobj;
_local2.protocol = _local1._protocol;
_local2.debugId = _local1._id;
return(_local1.getNetDebug().onEvent(_local2));
}
function sendServerEvent(eventobj) {
eventobj.movieUrl = unescape(_root._url);
if (!sendDebugEvent(eventobj)) {
}
}
function sendClientEvent(eventobj) {
var _local1 = this;
if (_local1._config.m_debug && (_local1._config.client.m_debug)) {
if ((_local1._config.client.http && (_local1._protocol == "http")) || (_local1._config.client.rtmp && (_local1._protocol.substr(0, 4) == "rtmp"))) {
if (!_local1.sendDebugEvent(eventobj)) {
}
}
}
}
function addNetDebugHeader() {
var _local1 = this;
if (!_local1._headerAdded) {
_local1._headerAdded = true;
if ((_local1._config.m_debug && (_local1._config.app_server.m_debug)) && (_local1._protocol == "http")) {
_local1.realAddHeader("amf_server_debug", true, _local1._config.app_server);
} else {
_local1.realAddHeader("amf_server_debug", true, undefined);
}
}
}
function updateConfig(config) {
var _local1 = this;
var _local2 = config;
_local1.attachDebug();
if ((_local2 == null) && (!_local1._configured)) {
_local1._configured = true;
_local2 = mx.remoting.debug.NetDebugConfig.getRealDefaultNetDebugConfig();
}
mx.utils.ObjectCopy.copyProperties(_local1._config, _local2);
_local1._headerAdded = false;
}
function isRealTime() {
return(_protocol.substr(0, 4) == "rtmp");
}
function setupRecordSet() {
var _local1 = this;
_local1.attachDebug();
_local1._config.client.http = _local1._config.client.recordset;
}
function netDebugProxyConnect() {
var _local1 = this;
var _local2 = arguments;
_local1.attachDebug();
var _local3 = _local2[0].substr(0, 4);
if ((_local3 == "http") || (_local3.substr(0, 4) == "rtmp")) {
if (_local2[0].charAt(4) == ":") {
_local1._protocol = _local3;
} else {
_local1._protocol = _local2[0].substr(0, 5);
}
} else {
_local1._protocol = "http";
}
_local1.sendClientEvent(new mx.remoting.debug.events.NetDebugConnect(_local2));
if (_local1.isRealTime()) {
_local1._connectString = _local2[0];
_local1.getNetDebug().sendCommand(new mx.remoting.debug.commands.StartRTMPTrace(_local2[0]));
var ret = _local1.realConnect.apply(_local1, _local2);
_local1.realCall("@getClientID", new mx.remoting.RTMPClientIDResponse(_local2[0], _local1));
return(ret);
}
return(Boolean(_local1.realConnect.apply(_local1, _local2)));
}
function netDebugProxyCall() {
var _local1 = this;
var _local2 = arguments;
_local1.attachDebug();
_local1.sendClientEvent(new mx.remoting.debug.events.NetDebugCall(_local2));
_local1.addNetDebugHeader();
if (_local1._config.app_server) {
_local2[1] = new mx.remoting.debug.NetDebugResponseProxy(_local1, _local2[1]);
return(Boolean(_local1.realCall.apply(_local1, _local2)));
}
return(Boolean(_local1.realCall.apply(_local1, _local2)));
}
function netDebugProxyClose() {
var _local1 = this;
_local1.attachDebug();
_local1.sendClientEvent(new mx.remoting.debug.events.NetDebugClose());
if (_local1.isRealTime()) {
_local1.getNetDebug().sendCommand(new mx.remoting.debug.commands.StopRTMPTrace(_local1._connectString, _local1._clientId));
}
var _local2 = _local1.realClose();
_local1.getNetDebug().removeNetConnection(_local1);
return(_local2);
}
function netDebugProxyAddHeader() {
var _local1 = this;
_local1.attachDebug();
_local1.sendClientEvent(new mx.remoting.debug.events.NetDebugAddHeader(arguments));
return(Boolean(_local1.realAddHeader.apply(_local1, arguments)));
}
function setDebugId(id) {
attachDebug();
_id = id;
}
function getDebugId() {
attachDebug();
return(_id);
}
function trace(traceobj) {
var _local1 = this;
_local1.attachDebug();
if ((_local1._config.m_debug && (_local1._config.client.m_debug)) && (_local1._config.client.trace)) {
_local1.sendDebugEvent(new mx.remoting.debug.events.NetDebugTrace(traceobj));
}
}
function getDebugConfig() {
attachDebug();
return(_config);
}
function getNetDebug() {
return(mx.remoting.debug.NetDebug.getNetDebug());
}
static var _attached = false;
}
Symbol 33 MovieClip [__Packages.mx.remoting.debug.events.NetDebugDuplicateNCDError] Frame 0
class mx.remoting.debug.events.NetDebugDuplicateNCDError extends mx.remoting.debug.events.NetDebugNetConnection
{
function NetDebugDuplicateNCDError () {
var _local1 = this;
super();
_local1.eventType = "Error";
_local1.source = "NCD";
_local1.message = "NCD_ALREADY_RUNNING";
}
}
Symbol 35 MovieClip [__Packages.mx.remoting.debug.commands.GetConfig] Frame 0
class mx.remoting.debug.commands.GetConfig extends mx.remoting.debug.commands.Local
{
var init;
function GetConfig () {
super();
}
function GetConfigCommand() {
super();
init("getConfig", null);
}
}
Symbol 36 MovieClip [__Packages.mx.remoting.debug.events.NetDebugFailedSendError] Frame 0
class mx.remoting.debug.events.NetDebugFailedSendError extends mx.remoting.debug.events.NetDebugNetConnection
{
function NetDebugFailedSendError (ev) {
var _local1 = this;
super();
_local1.eventType = "Error";
_local1.source = "NCD";
_local1.originalEvent = ev;
_local1.message = "NCD_FAILED_TO_SEND_EVENT";
}
}
Symbol 37 MovieClip [__Packages.mx.remoting.debug.events.NetDebugStatus] Frame 0
class mx.remoting.debug.events.NetDebugStatus extends mx.remoting.debug.events.NetDebugNetConnection
{
var eventType, status;
function NetDebugStatus (statusobj) {
super();
eventType = "Status";
status = statusobj;
}
}
Symbol 38 MovieClip [__Packages.mx.remoting.debug.events.NetDebugError] Frame 0
class mx.remoting.debug.events.NetDebugError extends mx.remoting.debug.events.NetDebug
{
var eventType, error;
function NetDebugError (dataobj) {
super();
eventType = "NetDebugError";
error = dataobj;
}
}
Symbol 39 MovieClip [__Packages.mx.remoting.debug.events.NetDebugTraceNetServices] Frame 0
class mx.remoting.debug.events.NetDebugTraceNetServices extends mx.remoting.debug.events.NetDebug
{
function NetDebugTraceNetServices (w, s, n, m) {
var _local1 = this;
super();
_local1.eventType = "NetServicesTrace";
_local1.trace = m;
_local1.who = w;
_local1.severity = s;
_local1.number = n;
}
}
Symbol 40 MovieClip [__Packages.mx.remoting.debug.events.NetDebugTrace] Frame 0
class mx.remoting.debug.events.NetDebugTrace extends mx.remoting.debug.events.NetDebug
{
var eventType, trace;
function NetDebugTrace (traceobj) {
super();
eventType = "Trace";
trace = traceobj;
}
}
Symbol 42 MovieClip [__Packages.mx.remoting.debug.commands.AddRTMPClient] Frame 0
class mx.remoting.debug.commands.AddRTMPClient extends mx.remoting.debug.commands.Local
{
var init;
function AddRTMPClient (cs, cid) {
super();
var _local1 = new Object();
_local1.connectstring = cs;
_local1.url = _root._url;
_local1.clientid = cid;
init("addRealTimeClient", _local1);
}
}
Symbol 43 MovieClip [__Packages.mx.remoting.RTMPClientIDResponse] Frame 0
class mx.remoting.RTMPClientIDResponse extends Object
{
var _connectString, _nc;
function RTMPClientIDResponse (cs, nc) {
super();
_connectString = cs;
_nc = nc;
}
function onResult(cid) {
_nc._clientId = cid;
mx.remoting.debug.NetDebug.getNetDebug().sendCommand(new mx.remoting.debug.commands.AddRTMPClient(_connectString, cid));
}
}
Symbol 44 MovieClip [__Packages.mx.remoting.debug.events.NetDebugCall] Frame 0
class mx.remoting.debug.events.NetDebugCall extends mx.remoting.debug.events.NetDebugNetConnection
{
function NetDebugCall (args) {
var _local2 = this;
var _local3 = args;
super();
_local2.eventType = "Call";
_local2.methodName = _local3[0];
_local2.parameters = new Array();
var alen = _local3.length;
var _local1 = 2;
while (_local1 < alen) {
_local2.parameters[_local1 - 2] = _local3[_local1];
_local1++;
}
}
}
Symbol 45 MovieClip [__Packages.mx.remoting.debug.events.NetDebugResult] Frame 0
class mx.remoting.debug.events.NetDebugResult extends mx.remoting.debug.events.NetDebugNetConnection
{
var eventType, result;
function NetDebugResult (resultobj) {
super();
eventType = "Result";
result = resultobj;
}
}
Symbol 46 MovieClip [__Packages.mx.remoting.debug.events.NetDebugReceiveCall] Frame 0
class mx.remoting.debug.events.NetDebugReceiveCall extends mx.remoting.debug.events.NetDebugNetConnection
{
function NetDebugReceiveCall (mName, args) {
var _local1 = this;
super();
_local1.eventType = "ReceivedCall";
_local1.methodName = mName;
_local1.parameters = args;
}
}
Symbol 47 MovieClip [__Packages.mx.remoting.debug.NetDebugResponseProxy] Frame 0
class mx.remoting.debug.NetDebugResponseProxy extends Object
{
var _sourceNC, _originalNR;
function NetDebugResponseProxy (source, original) {
super();
_sourceNC = source;
_originalNR = original;
}
function onDebugEvents(debugevents) {
var _local3 = debugevents;
var _local2 = _local3.length;
var _local1 = 0;
while (_local1 < _local2) {
_sourceNC.sendServerEvent(_local3[_local1]);
_local1++;
}
}
function onResult(resultobj) {
_sourceNC.sendClientEvent(new mx.remoting.debug.events.NetDebugResult(resultobj));
_originalNR.onResult(resultobj);
}
function onStatus(statusobj) {
var _local1 = this;
var _local2 = statusobj;
_local1._sourceNC.sendClientEvent(new mx.remoting.debug.events.NetDebugStatus(_local2));
if (_local1._originalNR.onStatus != undefined) {
_local1._originalNR.onStatus(_local2);
} else {
_global.System.onStatus(_local2);
}
}
function __resolve(name) {
var _local1 = name;
trace("NetDebugResponseProxy.__resolve name: " + _local1);
_sourceNC.sendClientEvent(new mx.remoting.debug.events.NetDebugReceiveCall(_local1, arguments));
_originalNR[_local1].apply(arguments);
return(null);
}
}
Symbol 48 MovieClip [__Packages.mx.remoting.debug.events.NetDebugClose] Frame 0
class mx.remoting.debug.events.NetDebugClose extends mx.remoting.debug.events.NetDebugNetConnection
{
var eventType;
function NetDebugClose () {
super();
eventType = "Close";
}
}
Symbol 49 MovieClip [__Packages.mx.remoting.debug.commands.StopRTMPTrace] Frame 0
class mx.remoting.debug.commands.StopRTMPTrace extends mx.remoting.debug.commands.Local
{
var init;
function StopRTMPTrace () {
super();
}
function StopRTMPTraceCommand(cs, cid) {
var _local1 = new Object();
_local1.connectstring = cs;
_local1.url = _root._url;
_local1.clientid = cid;
init("stopRealTimeTrace", _local1);
}
}
Symbol 50 MovieClip [__Packages.mx.remoting.debug.events.NetDebugAddHeader] Frame 0
class mx.remoting.debug.events.NetDebugAddHeader extends mx.remoting.debug.events.NetDebugNetConnection
{
function NetDebugAddHeader (args) {
var _local1 = this;
var _local2 = args;
super();
_local1.eventType = "AddHeader";
_local1.headerName = _local2[0];
_local1.mustUnderstand = _local2[1];
if (_local2[2] != null) {
_local1.headerObject = _local2[2];
}
}
}
Symbol 51 MovieClip [__Packages.mx.remoting.debug.events.NetDebugInfoError] Frame 0
class mx.remoting.debug.events.NetDebugInfoError extends mx.remoting.debug.events.NetDebugNetConnection
{
function NetDebugInfoError (infoobj, mes) {
var _local1 = this;
super();
_local1.eventType = "Error";
_local1.source = "NCD";
_local1.info = infoobj;
if (mes != null) {
_local1.message = mes;
}
}
}
Symbol 52 MovieClip [__Packages.mx.remoting.debug.events.NetDebugRtmpLog] Frame 0
class mx.remoting.debug.events.NetDebugRtmpLog extends mx.remoting.debug.events.NetDebugNetConnection
{
function NetDebugRtmpLog (infoobj) {
var _local1 = this;
super();
_local1.eventType = "Trace";
_local1.source = "Flash Communication Server";
_local1.info = infoobj;
_local1.trace = infoobj.description;
}
}
Symbol 53 MovieClip [__Packages.mx.remoting.debug.commands.UpdateNetDebugConfig] Frame 0
class mx.remoting.debug.commands.UpdateNetDebugConfig extends mx.remoting.debug.commands.Local
{
var init;
function UpdateNetDebugConfig () {
super();
}
function UpdateNetDebugCommand(dataobj) {
super();
init("updateConfig", dataobj);
}
}
Symbol 54 MovieClip [__Packages.mx.remoting.ApiClasses] Frame 0
class mx.remoting.ApiClasses extends MovieClip
{
function ApiClasses () {
super();
}
}
Symbol 56 MovieClip [__Packages.mx.remoting.DataGlue] Frame 0
class mx.remoting.DataGlue extends Object
{
var __dataProv, __labelStr, __dataStr, formatFunction;
function DataGlue (dp) {
super();
__dataProv = dp;
}
function get dataProvider() {
return(__dataProv);
}
function get labelString() {
return(__labelStr);
}
function set labelString(val) {
__labelStr = val;
//return(labelString);
}
function get dataString() {
return(__dataStr);
}
function set dataString(val) {
__dataStr = val;
//return(dataString);
}
static function bindFormatStrings(dataConsumer, dp, labelStr, dataStr) {
var _local1 = new mx.remoting.DataGlue(dp);
_local1.__set__labelString(labelStr);
_local1.__set__dataString(dataStr);
_local1.getItemAt = mx.remoting.DataGlue.prototype.getItemAt_FormatString;
dataConsumer.dataProvider = _local1;
}
static function bindFormatFunction(dataConsumer, dp, formatFunc) {
var _local1 = new mx.remoting.DataGlue(dp);
_local1.formatFunction = formatFunc;
_local1.getItemAt = mx.remoting.DataGlue.prototype.getItemAt_FormatFunction;
dataConsumer.setDataProvider(_local1);
}
function addEventListener(eventName, listener) {
dataProvider.addEventListener(eventName, listener);
}
function get length() {
return(getLength());
}
function getLength() {
return(dataProvider.length);
}
function format(formatString, item) {
var _local3 = formatString.split("#");
var result = "";
var tlen = _local3.length;
var _local2;
var _local1 = 0;
while (_local1 < tlen) {
result = result + _local3[_local1];
_local2 = _local3[_local1 + 1];
if (_local2 != undefined) {
result = result + item[_local2];
}
_local1 = _local1 + 2;
}
return(result);
}
function getItemAt_FormatString(index) {
var _local2 = this;
var _local1 = _local2.dataProvider.getItemAt(index);
if ((_local1 == "in progress") || (_local1 == undefined)) {
return(_local1);
}
return({label:_local2.format(_local2.__get__labelString(), _local1), data:((_local2.__get__dataString() == null) ? (_local1) : (_local2.format(_local2.__get__dataString(), _local1)))});
}
function getItemAt_FormatFunction(index) {
var _local1 = dataProvider.getItemAt(index);
if ((_local1 == "in progress") || (_local1 == undefined)) {
return(_local1);
}
return(formatFunction(_local1));
}
function getItemID(index) {
return(dataProvider.getItemID(index));
}
function addItemAt(index, value) {
dataProvider.addItemAt(index, value);
}
function addItem(value) {
dataProvider.addItem(value);
}
function removeItemAt(index) {
dataProvider.removeItemAt(index);
}
function removeAll() {
dataProvider.removeAll();
}
function replaceItemAt(index, itemObj) {
dataProvider.replaceItemAt(index, itemObj);
}
function sortItemsBy(fieldNames, optionFlags) {
dataProvider.sortItemsBy(fieldNames, optionFlags);
}
function sortItems(compareFunc, optionFlags) {
dataProvider.sortItems(compareFunc, optionFlags);
}
static var version = "1.2.0.124";
}
Symbol 63 MovieClip [__Packages.mx.remoting.Operation] Frame 0
class mx.remoting.Operation
{
var __arguments, __responder, __request, __methodName;
function Operation (methodName, parent) {
var _local1 = this;
_local1.__service = parent;
_local1.__responder = parent.responder;
_local1.__methodName = methodName;
_local1.__invokationName = (_local1.__service.__get__name() + ".") + methodName;
_local1.__request = new Object();
_local1.__arguments = new Array();
}
function createThenSend(Void) {
createArguments();
return(send());
}
function send(Void) {
var _local1 = this;
_local1.__service.log.logInfo((("Invoking " + _local1.__methodName) + " on ") + _local1.__service.__get__name());
var _local3 = new mx.remoting.PendingCall(_local1.__service, _local1.__methodName);
_local3.__set__responder(_local1.__responder);
var _local2 = null;
if (_local1.__arguments == null) {
_local2 = new Array();
} else {
_local2 = _local1.__arguments.concat();
}
_local1.__invokationName = (_local1.__service.__get__name() + ".") + _local1.__methodName;
_local2.unshift(_local1.__invokationName, _local3);
_local1.__service.connection.call.apply(_local1.__service.__get__connection(), _local2);
return(_local3);
}
function invoke(a) {
__arguments = a;
}
function get responder() {
return(__responder);
}
function set responder(r) {
__responder = r;
//return(responder);
}
function get request() {
return(__request);
}
function set request(r) {
__request = r;
//return(request);
}
function get name() {
return(__methodName);
}
function createArguments() {
var _local1 = this;
if (_local1.__request != null) {
_local1.__arguments = new Array();
for (var _local2 in _local1.__request) {
if (_local2 != "arguments") {
_local1.__arguments.unshift(_local1.__request[_local2]);
}
}
}
}
}
Symbol 64 MovieClip [__Packages.mx.data.binding.ObjectDumper] Frame 0
class mx.data.binding.ObjectDumper
{
var inProgress;
function ObjectDumper () {
inProgress = new Array();
}
static function toString(obj, showFunctions, showUndefined, showXMLstructures, maxLineLength, indent) {
var _local1 = indent;
var _local2 = maxLineLength;
var _local3 = new mx.data.binding.ObjectDumper();
if (_local2 == undefined) {
_local2 = 100;
}
if (_local1 == undefined) {
_local1 = 0;
}
return(_local3.realToString(obj, showFunctions, showUndefined, showXMLstructures, _local2, _local1));
}
function realToString(obj, showFunctions, showUndefined, showXMLstructures, maxLineLength, indent) {
var _local1 = obj;
var x = 0;
while (x < inProgress.length) {
if (inProgress[x] == _local1) {
return("***");
}
x++;
}
inProgress.push(_local1);
indent++;
var t = typeof(_local1);
var result;
if ((_local1 instanceof XMLNode) && (showXMLstructures != true)) {
result = _local1.toString();
} else if (_local1 instanceof Date) {
result = _local1.toString();
} else if (t == "object") {
var _local3 = new Array();
if (_local1 instanceof Array) {
result = "[";
var i = 0;
while (i < _local1.length) {
_local3.push(i);
i++;
}
} else {
result = "{";
for (var i in _local1) {
_local3.push(i);
}
_local3.sort();
}
var sep = "";
var _local2 = 0;
while (_local2 < _local3.length) {
var val = _local1[_local3[_local2]];
var show = true;
if (typeof(val) == "function") {
show = showFunctions == true;
}
if (typeof(val) == "undefined") {
show = showUndefined == true;
}
if (show) {
result = result + sep;
if (!(_local1 instanceof Array)) {
result = result + (_local3[_local2] + ": ");
}
result = result + realToString(val, showFunctions, showUndefined, showXMLstructures, maxLineLength, indent);
sep = ", `";
}
_local2++;
}
if (_local1 instanceof Array) {
result = result + "]";
} else {
result = result + "}";
}
} else if (t == "function") {
result = "function";
} else if (t == "string") {
result = ("\"" + _local1) + "\"";
} else {
result = String(_local1);
}
if (result == "undefined") {
result = "-";
}
inProgress.pop();
return(replaceAll(result, "`", ((result.length < maxLineLength) ? "" : (newline + doIndent(indent)))));
}
static function replaceAll(str, from, to) {
var _local3 = str.split(from);
var result = "";
var _local2 = "";
var _local1 = 0;
while (_local1 < _local3.length) {
result = result + (_local2 + _local3[_local1]);
_local2 = to;
_local1++;
}
return(result);
}
function doIndent(indent) {
var _local3 = indent;
var _local2 = "";
var _local1 = 0;
while (_local1 < _local3) {
_local2 = _local2 + " ";
_local1++;
}
return(_local2);
}
}
Symbol 66 MovieClip [__Packages.mx.rpc.DefaultResponder] Frame 0
class mx.rpc.DefaultResponder
{
var __target;
function DefaultResponder (t) {
target = (t);
}
function get target() {
return(__target);
}
function set target(t) {
__target = t;
//return(target);
}
function onResult(event) {
trace("RPC Result: " + event.__get__result());
}
function onFault(event) {
trace("RPC Fault: " + event.fault.faultstring);
}
}
Symbol 87 Button
on (release) {
getURL ("http://www.internetworld.co.uk/register/", "_blank");
}
Symbol 90 Button
on (release) {
getURL ("http://www.tamba.co.uk", "_blank");
}
Symbol 94 Button
on (release) {
_root.gotoAndStop("game");
}
Symbol 97 Button
on (release) {
_root.gotoAndStop("instructions");
}
Symbol 100 Button
on (release) {
getURL ("http://www.internetworld.co.uk/register/", "_blank");
}
Symbol 158 MovieClip Frame 1
stop();
Symbol 254 MovieClip Frame 1
stop();
Symbol 266 MovieClip Frame 1
stop();
Symbol 338 MovieClip Frame 1
stop();
Symbol 339 MovieClip Frame 1
stop();
bubble._visible = false;
Symbol 344 MovieClip Frame 1
stop();
Symbol 348 MovieClip Frame 1
this._visible = false;
stop();
Symbol 348 MovieClip Frame 2
this._visible = true;
Symbol 348 MovieClip Frame 84
_root.game.outro.gotoAndPlay(2);
stop();
Symbol 356 MovieClip Frame 1
stop();
Symbol 356 MovieClip Frame 34
_root.game.makePerson();
Symbol 356 MovieClip Frame 120
gotoAndStop (1);
Symbol 364 MovieClip Frame 1
stop();
Symbol 364 MovieClip Frame 2
String.prototype.replace = function (pattern, replacement) {
return(this.split(pattern).join(replacement));
};
if (_parent.intCurrentTip > (_parent.arrTips.length - 1)) {
_parent.intCurrentTip = 0;
}
this.inner.tip_text.text = _parent.arrTips[_parent.intCurrentTip].toString().replace("'", "'");
Symbol 364 MovieClip Frame 180
_parent.intCurrentTip++;
gotoAndPlay (2);
Symbol 375 Button
on (release) {
getURL ("http://www.tamba.co.uk", "_blank");
}
Symbol 383 MovieClip Frame 1
stop();
Instance of Symbol 383 MovieClip "m_1" in Symbol 384 MovieClip Frame 1
on (release) {
_root.intMusic = 1;
_root.game.playMusic(1);
_parent.m_1.gotoAndStop(2);
_parent.m_2.gotoAndStop(1);
_parent.m_3.gotoAndStop(1);
}
on (press) {
this.gotoAndStop(3);
}
Instance of Symbol 383 MovieClip "m_2" in Symbol 384 MovieClip Frame 1
on (release) {
_root.intMusic = 2;
_root.game.playMusic(2);
_parent.m_1.gotoAndStop(1);
_parent.m_2.gotoAndStop(2);
_parent.m_3.gotoAndStop(1);
}
on (press) {
this.gotoAndStop(3);
}
Instance of Symbol 383 MovieClip "m_3" in Symbol 384 MovieClip Frame 1
on (release) {
_root.intMusic = 3;
_root.game.playMusic(3);
_parent.m_1.gotoAndStop(1);
_parent.m_2.gotoAndStop(1);
_parent.m_3.gotoAndStop(2);
}
on (press) {
this.gotoAndStop(3);
}
Symbol 397 Button
on (release) {
_root.toggleSound();
}
Symbol 407 MovieClip Frame 1
this._visible = false;
stop();
Symbol 407 MovieClip Frame 2
this._visible = true;
Symbol 407 MovieClip Frame 135
stop();
_root.game.newDay();
Symbol 415 MovieClip Frame 1
stop();
Symbol 415 MovieClip Frame 76
_root.game.startGame();
stop();
Symbol 417 MovieClip Frame 1
this._visible = false;
Symbol 445 MovieClip Frame 1
stop();
Symbol 445 MovieClip Frame 2
stop();
Symbol 450 MovieClip Frame 1
stop();
Symbol 456 MovieClip Frame 1
stop();
Symbol 458 MovieClip Frame 1
MovieClip.prototype.drawWedge = function (x, y, startAngle, arc, radius, yRadius) {
if (arguments.length < 5) {
return(undefined);
}
this.moveTo(x, y);
if (yRadius == undefined) {
yRadius = radius;
}
var _local20;
var _local3;
var _local4;
var _local6;
var _local15;
var _local19;
var _local18;
var _local14;
var _local12;
var _local13;
var _local11;
if (Math.abs(arc) > 360) {
arc = 360;
}
_local15 = Math.ceil(Math.abs(arc) / 45);
_local20 = arc / _local15;
_local3 = (-(_local20 / 180)) * Math.PI;
_local4 = (-(startAngle / 180)) * Math.PI;
if (_local15 > 0) {
_local19 = x + (Math.cos((startAngle / 180) * Math.PI) * radius);
_local18 = y + (Math.sin(((-startAngle) / 180) * Math.PI) * yRadius);
this.lineTo(_local19, _local18);
var _local5 = 0;
while (_local5 < _local15) {
_local4 = _local4 + _local3;
_local6 = _local4 - (_local3 / 2);
_local14 = x + (Math.cos(_local4) * radius);
_local12 = y + (Math.sin(_local4) * yRadius);
_local13 = x + (Math.cos(_local6) * (radius / Math.cos(_local3 / 2)));
_local11 = y + (Math.sin(_local6) * (yRadius / Math.cos(_local3 / 2)));
this.curveTo(_local13, _local11, _local14, _local12);
_local5++;
}
this.lineTo(x, y);
}
};
claw._visible = false;
claw.char._visible = false;
hud.jukebox["m_" + _root.intMusic].gotoAndStop(2);
_root.intScore = 0;
var boolEndDay = false;
var intMaxPeople = 7;
var boolPaused = false;
var intMyScore = 0;
var intTimeMax = 90;
var intTimeCount = intTimeMax;
var intNumPeople = 0;
var boolCarrying = false;
var intAverageHappiness = 0;
var intCountdown;
var intEditMode = 0;
var intDay = 0;
var decSpeedX = 0;
var decSpeedY = 0;
var decDiffX = (760 - expo.bg._width);
var decDiffY = (469 - expo.bg._height);
var intScrollArea = 40;
var intStageWidth = 760;
var intStageHeight = 469;
var arrMap = [];
var intNumRows = 20;
var intNumCols = 19;
var objCarry;
var arrEntryPoint = [[348, 732], [500, 605]];
var arrEntrySeek = [[6, 18], [11, 18]];
var arrHair = [[183, 123, 57], [183, 123, 57], [183, 123, 57], [0, 0, 0]];
var arrSkin = [[252, 242, 185], [252, 242, 185], [252, 242, 185], [255, 204, 51]];
var arrArea;
arrArea[0] = "Space";
arrArea[1] = "Wall";
arrArea[2] = "Email Marketing";
arrArea[3] = "Online Advertising";
arrArea[4] = "Analytics and Reporting";
arrArea[5] = "Enterprise Content";
arrArea[6] = "Ecommerce and Payment";
arrArea[7] = "Toilet";
arrArea[8] = "Theatre";
arrArea[9] = "SEO";
arrArea[10] = "Connectivity and Hosting";
arrArea[11] = "Coffee";
expo.grid.temp_person._visible = false;
expo.grid.tile._visible = false;
expo.grid2.temp_person._visible = false;
expo.grid2.tile._visible = false;
arrMap.push([0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 8, 8, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
arrMap.push([0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 8, 8, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
arrMap.push([0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 8, 8, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
arrMap.push([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
arrMap.push([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
arrMap.push([1, 1, 1, 1, 9, 9, 9, 10, 10, 10, 1, 1, 11, 11, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
arrMap.push([1, 1, 1, 9, 9, 9, 9, 10, 10, 10, 1, 11, 11, 11, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
arrMap.push([1, 1, 1, 9, 9, 9, 9, 10, 10, 10, 1, 11, 11, 11, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
arrMap.push([1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
arrMap.push([1, 1, 1, 0, 2, 2, 2, 3, 3, 3, 3, 0, 0, 0, 6, 6, 6, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
arrMap.push([1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 0, 0, 0, 6, 6, 6, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
arrMap.push([1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
arrMap.push([1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 7, 7, 7, 7, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
arrMap.push([1, 1, 1, 0, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 7, 7, 7, 7, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
arrMap.push([1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 7, 7, 7, 7, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
arrMap.push([1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 7, 7, 7, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
arrMap.push([1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
arrMap.push([1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
arrMap.push([3, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]);
randNum = function (intLow, intHigh) {
return(Math.round(Math.random() * (intHigh - intLow)) + intLow);
};
clearAllIntervals = function () {
var _local1 = setInterval(play, 1000);
while (_local1 > 0) {
clearInterval(_local1);
_local1--;
}
};
Array.prototype.checkTile = function (arrCoords) {
if ((arrCoords[0] >= 0) && (arrCoords[1] >= 0)) {
if (arrCoords[1] < 19) {
if (arrMap[arrCoords[1]][arrCoords[0]] == 0) {
var _local3 = this.length;
this[_local3] = arrCoords;
}
}
}
return(this);
};
buildGrid = function () {
var _local5 = 750;
var _local6 = 390;
var _local7 = "";
var _local4 = 1;
while (_local4 <= 2) {
if (_local4 == 2) {
_local7 = "2";
}
var _local3 = expo["grid" + _local7];
var x = 0;
while (x < intNumCols) {
var y = 0;
while (y < intNumRows) {
if (arrMap[x][y] != 155) {
var _local2 = _local3.tile.duplicateMovieClip((("tile_" + y) + "_") + x, _local3.getNextHighestDepth());
_local2._x = (38.75 * (x + y)) - _local5;
_local2._y = (19.375 * (x - y)) + _local6;
_local2.x = x;
_local2.y = y;
_local2.num.text = (y + ",") + x;
if (intEditMode == 1) {
_local2.onRelease = function () {
arrMap[this.x][this.y]++;
if (arrMap[this.x][this.y] > 11) {
arrMap[this.x][this.y] = 0;
}
evalGrid();
};
_local2._alpha = 80;
}
}
y++;
}
x++;
}
_local4++;
}
evalGrid();
};
evalGrid = function () {
var _local2 = 0;
while (_local2 <= intNumCols) {
var _local1 = 0;
while (_local1 <= intNumRows) {
var _local4 = expo.grid[(("tile_" + _local1) + "_") + _local2];
_local4.gotoAndStop(arrMap[_local2][_local1] + 1);
var _local3 = [];
_local3.checkTile([_local1, _local2 + 1]);
_local3.checkTile([_local1, _local2 - 1]);
_local3.checkTile([_local1 - 1, _local2]);
_local3.checkTile([_local1 + 1, _local2]);
_local3.checkTile([_local1 + 1, _local2 + 1]);
_local3.checkTile([_local1 - 1, _local2 - 1]);
_local4.arrTile = _local3;
_local1++;
}
_local2++;
}
};
exportGrid = function () {
debug.text = "";
var _local1 = 0;
while (_local1 < arrMap.length) {
debug.text = debug.text + (("arrMap.push([" + arrMap[_local1]) + "])\n");
_local1++;
}
};
buildGrid();
MovieClip.prototype.chooseArea = function () {
var _local2 = randNum(2, 11);
if (_local2 == this.intLastArea) {
this.chooseArea();
return(false);
}
this.intArea = _local2;
this.intLastArea = _local2;
this.bubble.gotoAndStop(_local2);
this.bubble._visible = true;
this.activateGrab();
};
MovieClip.prototype.activateGrab = function () {
this.inner.onPress = dragPerson;
this.inner.onRelease = dropPerson;
this.inner.onReleaseOutside = dropPerson;
};
MovieClip.prototype.disableGrab = function () {
delete this.inner.onPress;
delete this.inner.onRelease;
delete this.inner.onReleaseOutside;
};
MovieClip.prototype.anglePerson = function (intStartX, intStartY, intTargetX, intTargetY) {
if ((intTargetY == intStartY) && (intTargetX == (intStartX + 1))) {
this.inner.gotoAndStop("e");
}
if ((intTargetY == intStartY) && (intTargetX == (intStartX - 1))) {
this.inner.gotoAndStop("w");
}
if ((intTargetY == (intStartY - 1)) && (intTargetX == intStartX)) {
this.inner.gotoAndStop("n");
}
if ((intTargetY == (intStartY + 1)) && (intTargetX == intStartX)) {
this.inner.gotoAndStop("s");
}
if ((intTargetY == (intStartY + 1)) && (intTargetX == (intStartX + 1))) {
this.inner.gotoAndStop("se");
}
if ((intTargetY == (intStartY + 1)) && (intTargetX == (intStartX - 1))) {
this.inner.gotoAndStop("sw");
}
if ((intTargetY == (intStartY - 1)) && (intTargetX == (intStartX + 1))) {
this.inner.gotoAndStop("ne");
}
if ((intTargetY == (intStartY - 1)) && (intTargetX == (intStartX - 1))) {
this.inner.gotoAndStop("nw");
}
if (this.intGender == 3) {
var _local8 = new Color(this.inner.inner.shirt);
var _local6 = new Color(this.inner.inner.hair);
var _local7 = new Color(this.inner.inner.skin);
} else {
var _local8 = new Color(this.inner.shirt);
var _local6 = new Color(this.inner.hair);
var _local7 = new Color(this.inner.skin);
}
_local8.setTint(this.intRed, this.intGreen, this.intBlue, 70);
_local6.setTint(arrHair[this.intEthnic][0], arrHair[this.intEthnic][1], arrHair[this.intEthnic][2], 100);
_local7.setTint(arrSkin[this.intEthnic][0], arrSkin[this.intEthnic][1], arrSkin[this.intEthnic][2], 100);
};
MovieClip.prototype.chooseTile = function () {
var _local2 = expo.grid[(("tile_" + this.intTileX) + "_") + this.intTileY];
if (arrMap[this.intTileY][this.intTileX] > 1) {
trace("I'm on a stand." + arrMap[this.intTileY][this.intTileX]);
if ((arrMap[this.intTileY][this.intTileX] >= 5) && (arrMap[this.intTileY][this.intTileX] <= 7)) {
trace("It is facing west.");
intNewTileX = this.intTileX - 1;
intNewTileY = this.intTileY;
} else {
trace("It is facing south.");
intNewTileX = this.intTileX;
intNewTileY = this.intTileY + 1;
}
} else {
this._alpha = 100;
var _local3 = randNum(0, _local2.arrTile.length - 1);
var intNewTileX = _local2.arrTile[_local3][0];
var intNewTileY = _local2.arrTile[_local3][1];
}
this.seekTile(intNewTileX, intNewTileY);
};
MovieClip.prototype.seekTile = function (intTileX, intTileY) {
this.anglePerson(this.intTileX, this.intTileY, intTileX, intTileY);
var _local5 = this.decSpeed;
var _local7 = getTileCoords(intTileX, intTileY);
var _local4 = _local7[0];
var _local3 = _local7[1];
var _local2 = {p0:{x:this._x, y:this._y}, p1:{x:_local4, y:_local3}};
_local2.vx = _local2.p1.x - _local2.p0.x;
_local2.vy = _local2.p1.y - _local2.p0.y;
var _local6 = Math.atan2(_local2.vy, _local2.vx);
var _local9 = Math.cos(_local6) * 1.1;
var _local8 = Math.sin(_local6) * 1.1;
this.intStartX = this._x;
this.intStartY = this._y;
this.intTargetX = _local4;
this.intTargetY = _local3;
this.intTileX = intTileX;
this.intTileY = intTileY;
this.xmov = _local5 * _local9;
this.ymov = _local5 * _local8;
this.onEnterFrame = movePerson;
};
getTileCoords = function (intTileX, intTileY) {
var _local3 = expo.grid[(("tile_" + intTileX) + "_") + intTileY]._x + (expo.grid[(("tile_" + intTileX) + "_") + intTileY]._width / 2);
var _local4 = expo.grid[(("tile_" + intTileX) + "_") + intTileY]._y + (expo.grid[(("tile_" + intTileX) + "_") + intTileY]._height / 2);
return([_local3, _local4]);
};
movePerson = function () {
if (boolPaused == true) {
return(false);
}
if (this.intArea > 0) {
this.decHappiness = this.decHappiness - 0.1;
if (this.decHappiness < 0) {
this.decHappiness = 0;
}
}
if (this.intFrames < 300) {
this.intFrames++;
}
if ((this.intArea < 1) && (this.intFrames > 200)) {
this.chooseArea();
}
averageHappiness();
this._x = this._x + this.xmov;
this._y = this._y + this.ymov;
this.swapDepths(this._y);
if (((this.intTargetX <= this.intStartX) && ((this._x + this.xmov) <= this.intTargetX)) || ((this.intTargetX >= this.intStartX) && ((this._x + this.xmov) >= this.intTargetX))) {
this.xmov = 0;
this.ymov = 0;
this._alpha = 100;
this.chooseTile();
}
};
dragPerson = function () {
if (boolCarrying == false) {
boolCarrying = true;
this._parent._alpha = 0;
claw.char.gotoAndStop(this._parent.intGender);
var _local4 = new Color(claw.char.shirt);
var _local2 = new Color(claw.char.hair);
var _local3 = new Color(claw.char.skin);
_local4.setTint(this._parent.intRed, this._parent.intGreen, this._parent.intBlue, 70);
_local2.setTint(arrHair[this._parent.intEthnic][0], arrHair[this._parent.intEthnic][1], arrHair[this._parent.intEthnic][2], 100);
_local3.setTint(arrSkin[this._parent.intEthnic][0], arrSkin[this._parent.intEthnic][1], arrSkin[this._parent.intEthnic][2], 100);
claw.char._visible = true;
startDrag (this._parent);
objCarry = this._parent;
delete this._parent.onEnterFrame;
}
};
dropPerson = function () {
boolCarrying = false;
objCarry = undefined;
claw._x = -2000;
this._parent._alpha = 100;
claw.char._visible = false;
stopDrag();
debug.text = debug.text + (this._parent._droptarget + newline);
if (this._parent._droptarget.indexOf("tile_") > -1) {
var _local3 = this._parent._droptarget.split("/");
var _local2 = _local3[_local3.length - 1].split("_");
if (arrMap[_local2[2]][_local2[1]] == this._parent.intArea) {
sfx.gotoAndStop(1);
if (this._parent.intGender == 3) {
sfx.gotoAndStop("f_thanks");
} else {
sfx.gotoAndStop("m_thanks");
}
if ((arrMap[_local2[2]][_local2[1]] == 7) || (arrMap[_local2[2]][_local2[1]] == 11)) {
this._parent._visible = false;
}
if ((arrMap[_local2[2]][_local2[1]] >= 5) && (arrMap[_local2[2]][_local2[1]] <= 7)) {
this._parent.inner.gotoAndStop("e");
} else if (arrMap[_local2[2]][_local2[1]] > 0) {
this._parent.inner.gotoAndStop("n");
}
if (this._parent.intGender == 3) {
var _local7 = new Color(this._parent.inner.inner.shirt);
var _local5 = new Color(this._parent.inner.inner.hair);
var _local6 = new Color(this._parent.inner.inner.skin);
} else {
var _local7 = new Color(this._parent.inner.shirt);
var _local5 = new Color(this._parent.inner.hair);
var _local6 = new Color(this._parent.inner.skin);
}
_local7.setTint(this._parent.intRed, this._parent.intGreen, this._parent.intBlue, 70);
_local5.setTint(arrHair[this._parent.intEthnic][0], arrHair[this._parent.intEthnic][1], arrHair[this._parent.intEthnic][2], 100);
_local6.setTint(arrSkin[this._parent.intEthnic][0], arrSkin[this._parent.intEthnic][1], arrSkin[this._parent.intEthnic][2], 100);
this._parent._alpha = 60;
this._parent.intArea = 0;
this._parent.decHappiness = this._parent.decHappiness + 70;
intMyScore = intMyScore + intAverageHappiness;
hud.score_text.text = intMyScore;
if (this._parent.decHappiness > 100) {
this._parent.decHappiness = 100;
}
this._parent.disableGrab();
this._parent.intStartTime = getTimer();
this._parent.bubble._visible = false;
this._parent.intTileX = parseInt(_local2[1]);
this._parent.intTileY = parseInt(_local2[2]);
this._parent.onEnterFrame = viewStand;
} else {
this._parent._alpha = 60;
if (arrMap[_local2[2]][_local2[1]] != 0) {
sfx.gotoAndStop(1);
if (this._parent.intGender == 3) {
sfx.gotoAndStop("f_nothere");
} else {
sfx.gotoAndStop("m_nothere");
}
}
this._parent.intTileX = parseInt(_local2[1]) - 1;
this._parent.intTileY = parseInt(_local2[2]);
if (typeof(arrMap[this._parent.intTileY][this._parent.intTileX]) == "undefined") {
trace("huh???????????");
this._parent.intTileX = this._parent.intTileX + 1;
}
this._parent.chooseTile();
}
} else {
trace(((("Off map: " + this._parent._droptarget) + "(") + this._parent.intTileX) + ")");
var _local4 = getTileCoords(this._parent.intTileX, this._parent.intTileY);
this._parent._x = _local4[0];
this._parent._y = _local4[1];
this._parent.seekTile(this._parent.intTileX, this._parent.intTileY);
}
claw._x = _xmouse;
return(false);
};
viewStand = function () {
if (boolPaused == true) {
return(false);
}
if ((getTimer() - this.intStartTime) > 5500) {
this.intFrames = 180;
this._visible = true;
if (this.intGender == 3) {
this.inner.inner.feet.play();
} else {
this.inner.feet.play();
}
this.chooseTile();
} else if (this.intGender == 3) {
this.inner.inner.feet.stop();
} else {
this.inner.feet.stop();
}
};
averageHappiness = function () {
var _local2 = 0;
var _local1 = 1;
while (_local1 <= intNumPeople) {
_local2 = _local2 + expo.grid["person_" + _local1].decHappiness;
_local1++;
}
intAverageHappiness = Math.round(_local2 / intNumPeople);
hud.arrow._rotation = 180 * (intAverageHappiness / 100);
};
makePerson = function () {
if (boolPaused == true) {
return(false);
}
if (intNumPeople >= intMaxPeople) {
return(false);
}
intNumPeople++;
var _local1 = expo.grid.temp_person.duplicateMovieClip("person_" + intNumPeople, intNumPeople + 1000);
var _local2 = randNum(0, 1);
_local1._x = arrEntryPoint[_local2][0];
_local1._y = arrEntryPoint[_local2][1];
_local1.intGender = randNum(1, 3);
_local1.gotoAndStop(_local1.intGender);
_local1.intID = intNumPeople;
_local1.intRed = randNum(0, 255);
_local1.intGreen = randNum(0, 255);
_local1.intBlue = randNum(0, 255);
_local1.intEthnic = randNum(0, 3);
_local1.decSpeed = intDay;
_local1.decHappiness = 50;
_local1.intArea = 0;
_local1.intFrames = 100;
_local1.intTileX = 0;
_local1.intTileY = 0;
_local1.boolLeave = false;
_local1.inner.gotoAndStop("n");
var _local3 = arrEntrySeek[_local2][0];
if (randNum(1, 2) == 2) {
_local3--;
}
_local1.seekTile(_local3, arrEntrySeek[_local2][1]);
clearInterval(intMakePerson);
intMakePerson = setInterval(showVehicle, randNum(5000, 12000));
};
showVehicle = function () {
if (boolPaused == true) {
return(false);
}
if (intNumPeople >= intMaxPeople) {
return(false);
}
expo.vehicle.gotoAndPlay(2);
};
Color.prototype.setTint = function (r, g, b, amount) {
var _local4 = 100 - amount;
var _local2 = new Object();
_local2.ra = (_local2.ga = (_local2.ba = _local4));
var _local3 = amount / 100;
_local2.rb = r * _local3;
_local2.gb = g * _local3;
_local2.bb = b * _local3;
this.setTransform(_local2);
};
scrollScreen = function () {
if (_ymouse > 477) {
Mouse.show();
claw._visible = false;
boolMouseShow = true;
}
if ((_ymouse < 477) && (boolMouseShow == true)) {
Mouse.hide();
claw._visible = true;
boolMouseShow = false;
}
if (Key.isDown(32)) {
boolSpace = true;
}
if ((boolSpace == true) && (!Key.isDown(32))) {
if (boolCarrying != true) {
if (boolPaused == true) {
boolPaused = false;
pause._visible = false;
if (expo.vehicle._currentframe > 1) {
expo.vehicle.play();
}
} else {
if (expo.vehicle._currentframe > 1) {
expo.vehicle.stop();
}
pause._visible = true;
boolPaused = true;
}
var _local2 = 0;
while (_local2 <= intNumPeople) {
var _local1 = expo.grid["person_" + _local2];
if (_local1.intGender == 3) {
if (boolPaused == true) {
_local1.inner.inner.feet.stop();
} else {
_local1.inner.inner.feet.play();
}
} else if (boolPaused == true) {
_local1.inner.feet.stop();
} else {
_local1.inner.feet.play();
}
_local2++;
}
}
boolSpace = false;
}
if (Key.isDown(17)) {
boolCtrl = true;
}
if ((boolCtrl == true) && (!Key.isDown(17))) {
boolCtrl = false;
}
if (boolPaused == true) {
return(false);
}
boolCarry = true;
if ((_xmouse < intScrollArea) || (_xmouse > (intStageWidth - intScrollArea))) {
decSpeedX = (-(_xmouse - (intStageWidth / 2))) * 0.03;
} else {
decSpeedX = 0;
}
if ((_ymouse < intScrollArea) || (_ymouse > ((intStageHeight - intScrollArea) - 35))) {
decSpeedY = (-(_ymouse - (intStageHeight / 2))) * 0.03;
} else {
decSpeedY = 0;
}
expo._x = expo._x + decSpeedX;
expo._y = expo._y + decSpeedY;
if (expo._x > 0) {
expo._x = 0;
boolCarry = false;
} else if (expo._x < decDiffX) {
expo._x = decDiffX;
boolCarry = false;
}
if (expo._y > 0) {
expo._y = 0;
boolCarry = false;
} else if (expo._y < decDiffY) {
expo._y = decDiffY;
boolCarry = false;
}
if (boolCarry != false) {
objCarry._x = objCarry._x + (-decSpeedX);
objCarry._y = objCarry._y + (-decSpeedY);
}
claw._x = _xmouse;
claw._y = _ymouse;
};
countDown = function () {
if (boolPaused == true) {
return(false);
}
intTimeCount--;
drawWedge();
};
drawWedge = function () {
if (intTimeCount > 0) {
hud.clock_mc.clear();
var _local1 = -(365 - (365 * (intTimeCount / intTimeMax)));
hud.clock_mc.beginFill(16777215, 100);
hud.clock_mc.drawWedge(0, 0, 90, _local1, 18.5);
hud.clock_mc.endFill();
} else {
hud.clock_mc.beginFill(16777215, 100);
hud.clock_mc.drawWedge(0, 0, 0, 365, 18.5);
hud.clock_mc.endFill();
endDay();
}
};
var intIntroInterval = 0;
setupIntro = function () {
expo._x = 0;
expo._y = -66;
expo.roof._alpha = 100;
expo.roof._visible = true;
expo._xscale = (expo._yscale = 62);
intIntroInterval = setInterval(startIntro, 2000);
};
startIntro = function () {
clearInterval(intIntroInterval);
_root.game.onEnterFrame = playIntro1;
};
playIntro1 = function () {
expo.roof._alpha = expo.roof._alpha - 4;
if (expo.roof._alpha < -20) {
expo.roof._visible = false;
this.onEnterFrame = playIntro2;
}
};
playIntro2 = function () {
expo._xscale = (expo._yscale = expo._yscale + 2);
if (expo._xscale > 100) {
expo._xscale = (expo._yscale = 100);
playSound("open");
intro.gotoAndPlay(2);
delete this.onEnterFrame;
} else {
expo._x = expo._x - 24.7;
expo._y = expo._y - 17;
}
};
var intMakePerson = 0;
startGame = function () {
Mouse.hide();
claw._x = _xmouse;
claw._y = _ymouse;
claw._visible = true;
intro._y = -1000;
this.onEnterFrame = scrollScreen;
if (intEditMode != 1) {
intMakePerson = setInterval(showVehicle, 2000);
intCountdown = setInterval(countDown, 1000);
}
};
onMouseDown = function () {
claw.gotoAndStop(2);
};
onMouseUp = function () {
claw.gotoAndStop(1);
};
newDay = function () {
boolEndDay = false;
expo.outro.gotoAndStop(1);
outro.gotoAndStop(1);
intro._y = 171.8;
intro._visible = true;
hud.arrow._rotation = 90;
delete this.onEnterFrame;
clearAllIntervals();
intNumPeople = 0;
hud.clock_mc.clear();
intDay++;
if (intDay > 3) {
gameOver();
}
intro.inner.gotoAndStop(intDay);
intTimeCount = intTimeMax;
intAverageHappiness = 0;
boolCarrying = false;
setupIntro();
};
endDay = function () {
boolEndDay = true;
delete this.onEnterFrame;
clearAllIntervals();
Mouse.show();
claw.char._visible = false;
claw._visible = false;
var _local2 = 0;
while (_local2 <= 30) {
delete expo.grid["person_" + _local2].onEnterFrame;
expo.grid["person_" + _local2].removeMovieClip();
removeMovieClip(expo.grid["person_" + _local2]);
expo.grid["person_" + _local2].removeMovieClip();
_local2++;
}
intMaxPeople = intMaxPeople + 3;
expo.outro.gotoAndPlay(2);
};
gameOver = function () {
_root.intScore = intMyScore;
_root.gotoAndStop("gameover");
};
newDay();
System.useCodepage = true;
var arrTips = [];
var xmlTips = new XML();
xmlTips.ignoreWhite = true;
xmlTips.load(_root.strRootURL + "/tips.xml");
var intCurrentTip = 0;
xmlTips.onLoad = function (success) {
if (success) {
var _local2 = xmlTips.firstChild.childNodes;
var _local1 = 0;
while (_local1 < _local2.length) {
arrTips.push(_local2[_local1].firstChild);
_local1++;
}
tips.gotoAndPlay(2);
}
};
playSound = function (strName) {
var _local2 = new Sound(_root);
_local2.attachSound(strName);
_local2.start();
};
playMusic = function (strName) {
var _local2 = new Sound(_root);
_local2.stop();
_local2.attachSound("music_" + strName);
_local2.start(0, 9999);
};
playMusic(_root.intMusic);
Symbol 464 Button
on (release) {
_root.gotoAndStop("credits");
}
Symbol 472 Button
on (release) {
_root.gotoAndStop("new_game");
}
Symbol 475 Button
on (release) {
if (_root.boolScoreSub != true) {
_root.gotoAndStop("submit_score");
} else {
_root.gotoAndStop("leaderboard");
}
}
Symbol 478 Button
on (release) {
_root.gotoAndStop("leaderboard");
}
Symbol 481 Button
on (release) {
_root.gotoAndStop("send_friend");
}
Symbol 483 Button
on (release) {
getURL ("http://www.internetworld.co.uk/register/", "_blank");
}
Symbol 489 Button
on (release) {
_root.gotoAndStop("gameover");
}
Symbol 492 Button
on (release) {
this.boolSubmit = true;
strUserName = user_name.text;
strUserEmail = user_email.text;
strUserCompany = user_company.text;
intUserIndexOfAt = strUserEmail.indexOf("@");
intUserLastIndexOfDot = strUserEmail.lastIndexOf(".");
if (((!strUserEmail) || (intUserIndexOfAt == -1)) || (intUserLastIndexOfDot == -1)) {
this.boolSubmit = false;
error_text.text = "Your email address is not valid";
} else if (!strUserName) {
this.boolSubmit = false;
error_text.text = "Please enter your name";
}
if (this.boolSubmit != false) {
error_text.text = "Submitting score, please wait...";
_root.boolScoreSub = true;
_root.objRemote.setHighScores(strUserName, strUserCompany, strUserEmail, _root.intScore);
}
}
Symbol 531 MovieClip Frame 1
function showHighScores(arrScores) {
i = 0;
while (i <= (arrScores.length - 1)) {
var _local5 = i + 10000;
var _local4 = ("scoreLine" + (i + 1)) + "_mc";
duplicateMovieClip (scoreList_mc.scoreLine_mc, _local4, _local5);
var _local2 = scoreList_mc[("scoreLine" + (i + 1)) + "_mc"];
_local2._y = 26 * i;
_local2.pos.text = i + 1;
_local2.playerName.text = arrScores[i].name;
_local2.score.text = "\u00A3" + arrScores[i].score;
_local2.playerCompany.text = arrScores[i].company;
nextScorePos = this.scoreList_mc.scoreLine_mc._height;
i++;
}
scrolling();
}
function formatNumberWithCommas(num) {
var _local1 = num + "";
if (_local1.length < 4) {
return(_local1);
}
return((formatNumberWithCommas(_local1.slice(0, -3)) + ",") + _local1.slice(-3));
}
this.scoreList_mc.scoreLine_mc._visible = false;
_root.objRemote.getHighScores(50);
scrolling = function () {
objContent = scoreList_mc;
var _local5 = scrollTrack._height;
var _local2 = objContent._height;
var _local4 = scrollFace._height;
var _local3 = maskedView._height;
var initPosition = ((scrollFace._y = scrollTrack._y));
var initContentPos = objContent._y;
var finalContentPos = ((_local3 - _local2) + initContentPos);
var left = scrollTrack._x;
var top = scrollTrack._y;
var right = scrollTrack._x;
var bottom = ((scrollTrack._height - _local4) + scrollTrack._y);
var dy = 0;
var speed = 10;
var moveVal = ((_local2 - _local3) / (_local5 - _local4));
scrollFace.onPress = function () {
var _local2 = this._y;
startDrag (this, false, left + 1, top, right, bottom);
this.onMouseMove = function () {
scrollFace._x = scrollTrack._x + 1;
dy = Math.abs(initPosition - this._y);
objContent._y = Math.round(((dy * -1) * moveVal) + initContentPos);
};
};
scrollFace.onMouseUp = function () {
stopDrag();
scrollFace._x = left;
delete this.onMouseMove;
};
btnUp.onPress = function () {
this.onEnterFrame = function () {
if ((objContent._y + speed) < maskedView._y) {
if (scrollFace._y <= top) {
scrollFace._y = top;
} else {
scrollFace._y = scrollFace._y - (speed / moveVal);
}
objContent._y = objContent._y + speed;
} else {
scrollFace._y = top;
objContent._y = maskedView._y;
delete this.onEnterFrame;
}
};
};
btnUp.onDragOut = function () {
delete this.onEnterFrame;
};
btnUp.onRelease = function () {
delete this.onEnterFrame;
};
btnDown.onPress = function () {
this.onEnterFrame = function () {
if ((objContent._y - speed) > finalContentPos) {
if (scrollFace._y >= bottom) {
scrollFace._y = bottom;
} else {
scrollFace._y = scrollFace._y + (speed / moveVal);
}
objContent._y = objContent._y - speed;
} else {
scrollFace._y = bottom;
objContent._y = finalContentPos;
delete this.onEnterFrame;
}
};
};
btnDown.onRelease = function () {
delete this.onEnterFrame;
};
btnDown.onDragOut = function () {
delete this.onEnterFrame;
};
if (_local2 < _local3) {
scrollFace._visible = false;
scrollTrack._visible = false;
btnUp._visible = false;
btnDown._visible = false;
} else {
scrollFace._visible = true;
scrollTrack._visible = true;
btnUp._visible = true;
btnDown._visible = true;
}
scrollTrack.onPress = function () {
scrollFace._y = _ymouse;
if (scrollFace._y < (btnUp._y + btnUp._height)) {
scrollFace._y = btnUp._y + btnUp._height;
} else if ((scrollFace._y + scrollFace._height) > btnDown._y) {
scrollFace._y = btnDown._y - scrollFace._height;
}
dy = Math.abs(initPosition - scrollFace._y);
objContent._y = Math.round(((dy * -1) * moveVal) + initContentPos);
};
};
scrolling();
Symbol 543 Button
on (release) {
this.boolSubmit = true;
strUserName = user_name.text;
strUserEmail = user_email.text;
intUserIndexOfAt = strUserEmail.indexOf("@");
intUserLastIndexOfDot = strUserEmail.lastIndexOf(".");
strFriendName = friend_name.text;
strFriendEmail = friend_email.text;
intFriendIndexOfAt = strFriendEmail.indexOf("@");
intFriendLastIndexOfDot = strFriendEmail.lastIndexOf(".");
if (((!strUserEmail) || (intUserIndexOfAt == -1)) || (intUserLastIndexOfDot == -1)) {
this.boolSubmit = false;
error_text.text = "Your email address is not valid";
} else if (!strUserName) {
this.boolSubmit = false;
error_text.text = "Please enter your name";
} else if (((!strFriendEmail) || (intFriendIndexOfAt == -1)) || (intFriendLastIndexOfDot == -1)) {
this.boolSubmit = false;
error_text.text = "Your friend's email address is not valid";
} else if (!strFriendName) {
this.boolSubmit = false;
error_text.text = "Please enter your friend's name";
}
if (this.boolSubmit != false) {
error_text.text = "Sending, please wait...";
_root.objRemote.sendToFriend(strUserName, strUserEmail, strFriendName, strFriendEmail, _root.intScore);
}
}
Symbol 551 MovieClip Frame 1
onEnterFrame = function () {
credits._y = credits._y - 0.5;
if (credits._y < -135) {
credits._y = 435;
}
};