Frame 1
stop();
var intScore = 0;
var intPlayed = 0;
var intSubmit = 0;
var strRootURL = "http://www.tamba-games.co.uk/cruk";
var strServiceURL = (_root.strRootURL + "/amfphp/gateway.php");
var objRemote = (new remoting.RemotingFunctions(_root.strServiceURL, "GameFunctions"));
preLoad = function () {
preloader.load_pct.text = Math.round((getBytesLoaded() / getBytesTotal()) * 100) + "%";
if (getBytesLoaded() == getBytesTotal()) {
clearInterval(intPreloader);
gotoAndStop ("title");
}
};
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;
};
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"));
}
kv_v = {c:394, 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 = "793";
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));
}
Frame 2
stop();
Frame 3
stop();
Frame 4
stop();
Frame 5
stop();
intPlayed = 1;
intSubmit = 0;
Frame 6
stop();
Frame 7
submit.hud.attachBitmap(_root.objHUD, 8000);
trace(_root.objHUD);
stop();
Frame 8
stop();
Frame 9
stop();
Symbol 5 MovieClip Frame 1
stop();
Symbol 6 MovieClip [pa] Frame 20
this.removeMovieClip();
Symbol 11 MovieClip [RemotingDebugClasses] Frame 1
#initclip 63
Object.registerClass("RemotingDebugClasses", mx.remoting.DebugClasses);
#endinitclip
preview._visible = false;
stop();
Symbol 56 MovieClip [RemotingClasses] Frame 1
#initclip 64
Object.registerClass("RemotingClasses", mx.remoting.ApiClasses);
#endinitclip
preview._visible = false;
stop();
Instance of Symbol 74 MovieClip in Symbol 75 MovieClip Frame 1
on (release) {
getURL ("http://www.cancerresearchuk.org", "_blank");
}
Instance of Symbol 77 MovieClip in Symbol 78 MovieClip Frame 1
on (release) {
getURL ("http://www.raceforlife.org/?utm_source=warmup&utm_medium=game", "_blank");
}
Symbol 379 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, strUserEmail, intPoints, intDCP) {
service.setHighScores([strUserName, strUserEmail, intPoints, intDCP], this, setHighScoresResult);
}
function setHighScoresResult() {
_root.gotoAndStop("leaderboard");
}
function sendToFriend(strUserName, strUserEmail, strFriendName, strFriendEmail, intUserScore, intDCP) {
service.sendToFriend([strUserName, strUserEmail, strFriendName, strFriendEmail, intUserScore, intDCP], 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.tickbox.gotoAndStop(1);
_root.sendfriend.error_text.text = "Email sent! Send another?";
}
}
Symbol 380 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 63 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 12 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 13 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 19 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 62 MovieClip [__Packages.mx.rpc.Responder] Frame 0
interface mx.rpc.Responder{}
Symbol 61 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 60 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 59 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 18 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 42 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 26 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 35 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 381 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 382 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 58 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 383 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 66 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 384 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 7 MovieClip [__Packages.mx.remoting.DebugClasses] Frame 0
class mx.remoting.DebugClasses extends MovieClip
{
function DebugClasses () {
super();
}
}
Symbol 14 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 15 MovieClip [__Packages.mx.data.DataRange] Frame 0
interface mx.data.DataRange{}
Symbol 16 MovieClip [__Packages.mx.data.PageableData] Frame 0
interface mx.data.PageableData{}
Symbol 17 MovieClip [__Packages.mx.data.PageableList] Frame 0
interface mx.data.PageableList{}
Symbol 20 MovieClip [__Packages.mx.utils.Iterator] Frame 0
interface mx.utils.Iterator{}
Symbol 21 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 22 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 23 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 24 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 25 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 27 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 28 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 29 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 30 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 31 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 32 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 33 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 34 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 36 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 37 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 38 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 39 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 40 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 41 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 43 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 44 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 45 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 46 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 47 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 48 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 49 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 50 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 51 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 52 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 53 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 54 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 55 MovieClip [__Packages.mx.remoting.ApiClasses] Frame 0
class mx.remoting.ApiClasses extends MovieClip
{
function ApiClasses () {
super();
}
}
Symbol 57 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 64 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 65 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 67 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 81 Button
on (release) {
getURL ("http://www.tamba.co.uk", "_blank");
}
Symbol 88 Button
on (release) {
_root.gotoAndStop("game");
}
Symbol 91 Button
on (release) {
_root.gotoAndStop("instructions");
}
Symbol 141 MovieClip Frame 1
stop();
Symbol 142 MovieClip Frame 1
var intMoveDancer = 0;
moveDancer = function () {
dancer.inner.nextFrame();
};
dancerMove = function () {
clearInterval(intMoveDancer);
dancer.gotoAndStop(Math.round(Math.random() * 11) + 1);
dancer.inner.gotoAndStop(1);
var _local1 = 1000 / dancer.inner._totalframes;
intMoveDancer = setInterval(moveDancer, _local1);
};
var intDance = setInterval(dancerMove, 2000);
Symbol 145 Button
on (release) {
getURL ("http://www.raceforlife.org/?utm_source=warmup&utm_medium=game", "_blank");
}
Symbol 154 Button
on (release) {
trace(_root.intPlayed);
if (_root.intPlayed == 1) {
_root.gotoAndStop("gameover");
} else {
_root.gotoAndStop("title");
}
}
Symbol 157 Button
on (release) {
_root.gotoAndStop("game");
}
Symbol 170 MovieClip Frame 1
stop();
Symbol 212 MovieClip Frame 1
stop();
Symbol 256 MovieClip Frame 1
stop();
Symbol 264 MovieClip Frame 1
stop();
Symbol 264 MovieClip Frame 30
this.removeMovieClip();
Symbol 275 MovieClip Frame 1
Symbol 275 MovieClip Frame 117
stop();
_parent.boolRunGame = true;
Symbol 290 MovieClip Frame 1
var intMultiplier = 1;
var intPerfectPoints = 25;
var intAlmostPoints = 15;
var intPoints = 0;
var intSpeed = 8;
var intArrow = 0;
var intPerfect = 0;
var intAlmost = 0;
var intMissed = 0;
var intCombos = 0;
var intLaunches = 0;
var intTimeStart = getTimer();
var intTimeRestart = intTimeStart;
var intThresholdLow = (arrow_0._y - 30);
var intThresholdHigh = (arrow_0._y + 40);
var intMaxSec = 60;
var intMaxMSec = ((1000 * intMaxSec) + intTimeStart);
var intBPM = 55;
var decBPS = (intBPM / 60);
var decPauseLength = (1000 / decBPS);
var arrKeys = ["UP", "RIGHT", "DOWN", "LEFT"];
var arrDuo = [[0, 0], [2, 2], [3, 3], [1, 1], [0, 3], [0, 1], [0, 2], [2, 3], [2, 1], [3, 1]];
var arrDuoText = ["up", "down", "left", "right", "upleft", "upright", "updown", "downleft", "downright", "rightleft"];
var arrDuoEasy = [0, 3];
var arrDuoHard = [4, 8];
var arrCurrDuo = arrDuoEasy;
var boolSpaceDown = false;
var boolKeysDown = false;
var boolKey1 = false;
var boolKey2 = false;
var intMoveDancer = 0;
var intMoveDancers = 0;
var strKeyCombo = "";
clearInterval(intMoveDancer);
clearInterval(intMoveDancers);
arrow_lane.temp_arrow._visible = false;
hud.timer.bar._width = 0;
music.gotoAndStop(2);
music.gotoAndStop(1);
var boolRunGame = false;
var intNumDancers = 6;
var intCheck = 0;
dancer_1.intID = 1;
dancer_2.intID = 2;
dancer_3.intID = 3;
dancer_4.intID = 4;
dancer_5.intID = 5;
dancer_6.intID = 6;
dancer_1.head.gotoAndStop(dancer_1.intID);
dancer_2.head.gotoAndStop(dancer_2.intID);
dancer_3.head.gotoAndStop(dancer_3.intID);
dancer_4.head.gotoAndStop(dancer_4.intID);
dancer_5.head.gotoAndStop(dancer_5.intID);
dancer_6.head.gotoAndStop(dancer_6.intID);
chooseArrow = function () {
intLaunches++;
if (intLaunches > 1) {
}
if ((intLaunches % 5) == 0) {
arrCurrDuo = arrDuoHard;
} else {
arrCurrDuo = arrDuoEasy;
}
var _local2 = randNum(arrCurrDuo[0], arrCurrDuo[1]);
var _local1 = arrDuo[_local2];
launchArrow(_local1[0], _local1[1], 0);
launchArrow(_local1[1], _local1[0], 1);
};
launchArrow = function (intDir, intDirAlt, intNum) {
var _local2 = arrow_lane.temp_arrow.duplicateMovieClip("move_arrow_" + intArrow, intArrow);
_local2.arrDir = [intDir, intDirAlt];
_local2._y = (_local2.intStartY = 0);
_local2._alpha = 0;
_local2.intNum = intNum;
_local2.intTimeStart = getTimer();
_local2._x = this["arrow_" + intDir]._x;
_local2._rotation = 90 * intDir;
_local2.onEnterFrame = moveArrow;
intArrow++;
};
moveArrow = function () {
if (Key.isDown(38) && (Key.isDown(40))) {
dancerMove("UPDOWN");
} else if (Key.isDown(38) && (Key.isDown(37))) {
dancerMove("UPLEFT");
} else if (Key.isDown(38) && (Key.isDown(39))) {
dancerMove("UPRIGHT");
} else if (Key.isDown(40) && (Key.isDown(37))) {
dancerMove("DOWNLEFT");
} else if (Key.isDown(40) && (Key.isDown(39))) {
dancerMove("DOWNRIGHT");
} else if (Key.isDown(37) && (Key.isDown(39))) {
dancerMove("RIGHTLEFT");
} else if (Key.isDown(39)) {
dancerMove("RIGHTRIGHT");
} else if (Key.isDown(37)) {
dancerMove("LEFTLEFT");
} else if (Key.isDown(38)) {
dancerMove("UPUP");
} else if (Key.isDown(40)) {
dancerMove("DOWNDOWN");
}
var _local4 = this.intStartY + (((getTimer() - this.intTimeStart) / 10) * decBPS);
var _local7 = _local4 - this._y;
this._y = _local4;
if (this._alpha < 80) {
this._alpha = this._alpha + 1;
}
if (this._y > 520) {
if (this.boolHit != true) {
intCombos = 0;
intMissed = intMissed + 0.5;
}
this.removeMovieClip();
}
if (this._y < arrow_0._y) {
if (this._y > intThresholdLow) {
_root.game["arrow_" + this.arrDir[0]].glow._alpha = ((this._y - intThresholdLow) / (arrow_0._y - intThresholdLow)) * 100;
}
} else if (this._y > arrow_0._y) {
_root.game["arrow_" + this.arrDir[0]].glow._alpha = _root.game["arrow_" + this.arrDir[0]].glow._alpha - 10;
}
if (this.boolHit != true) {
if (Key.isDown(Key[arrKeys[this.arrDir[0]]])) {
if (Key.isDown(Key[arrKeys[this.arrDir[1]]])) {
if ((this._y >= intThresholdLow) && (this._y <= intThresholdHigh)) {
this.boolKeyDown = true;
}
}
}
if ((((this.intNum == 0) && (this._y >= intThresholdLow)) && (this._y <= intThresholdHigh)) && (this.boolCrowd != true)) {
dancersMove(arrKeys[this.arrDir[0]] + arrKeys[this.arrDir[1]]);
this.boolCrowd = true;
}
if ((this.boolKeyDown == true) && (!Key.isDown(Key[arrKeys[this.arrDir[0]]]))) {
if ((this.boolKeyDown == true) && (!Key.isDown(Key[arrKeys[this.arrDir[1]]]))) {
var _local6 = Math.abs(arrow_0._y - this._y);
if (this.intNum == 0) {
var _local3 = arrow_lane.temp_arrow.duplicateMovieClip((("success_arrow_" + intArrow) + "_") + this.arrDir[0], intArrow + 1000);
_local3._rotation = 90 * this.arrDir[0];
_local3._x = _root.game["arrow_" + this.arrDir[0]]._x;
_local3._y = _root.game["arrow_" + this.arrDir[0]]._y;
_local3.onEnterFrame = successArrow;
}
intCheck++;
if ((intCheck % 2) == 0) {
if (_local6 <= 8) {
var _local5 = _root.game.attachMovie("pa", "pa_" + getTimer(), _root.game.getNextHighestDepth(), {_x:155, _y:252});
intCombos++;
intPerfect++;
intPoints = intPoints + (intPerfectPoints * intCombos);
_local5.logo.gotoAndStop(1);
} else {
intCombos = 0;
intAlmost++;
intPoints = intPoints + (intAlmostPoints * intMultiplier);
}
}
this.boolHit = true;
this._alpha = 0;
}
}
}
};
successArrow = function () {
this._xscale = (this._yscale = this._yscale + 5);
this._alpha = this._alpha - 3;
if (this._alpha <= 0) {
this._xscale = (this._yscale = 1);
this._visible = false;
delete this.onEnterFrame;
}
};
moveDancer = function () {
i = 0;
while (i <= intNumDancers) {
var _local2 = _root.game["dancer_" + i];
_local2.inner.head.gotoAndStop(_local2.intID);
_local2.inner.nextFrame();
_local2.inner.head.gotoAndStop(_local2.intID);
if (_local2.inner._currentframe == _local2.inner._totalframes) {
boolDancing = false;
}
i++;
}
};
var boolDancing = false;
dancerMove = function (strMove) {
if (boolDancing != true) {
clearInterval(intMoveDancer);
i = 0;
while (i <= intNumDancers) {
var _local2 = _root.game["dancer_" + i];
_local2.gotoAndStop(strMove);
_local2.inner.head.gotoAndStop(_local2.intID);
_local2.inner.gotoAndStop(1);
i++;
}
var _local4 = 1000 / dancer_0.inner._totalframes;
intMoveDancer = setInterval(moveDancer, _local4);
}
};
gameOver = function () {
boolRunGame = false;
clearInterval(intMoveDancer);
clearInterval(intMoveDancers);
_root.intScore = intPoints;
var _local2 = new flash.display.BitmapData(hud._width + 50, hud._height, true, 16777215);
_local2.draw(hud);
_root.objHUD = _local2;
_root.gotoAndStop("gameover");
};
onEnterFrame = function () {
if (boolRunGame == false) {
return(false);
}
var _local1 = getTimer();
hud.timer.bar._width = hud.timer.bg._width * ((_local1 - intTimeRestart) / (intMaxMSec - intTimeRestart));
if (_local1 > intMaxMSec) {
gameOver();
}
if ((_local1 - intTimeStart) > decPauseLength) {
chooseArrow();
intTimeStart = getTimer();
}
if (Key.isDown(32)) {
boolSpaceDown = true;
}
if ((boolSpaceDown == true) && (!Key.isDown(32))) {
boolSpaceDown = false;
}
};
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--;
}
};
Instance of Symbol 292 MovieClip in Symbol 293 MovieClip Frame 1
on (release) {
getURL ("http://www.raceforlife.org/?utm_source=warmup&utm_medium=game", "_blank");
}
Symbol 297 Button
on (release) {
_root.toggleSound();
}
Symbol 307 Button
on (release) {
if (_root.intSubmit == 1) {
_root.gotoAndPlay("leaderboard");
} else {
_root.gotoAndPlay("submit_score");
}
}
Symbol 311 Button
on (release) {
_root.gotoAndPlay("game");
}
Symbol 314 Button
on (release) {
_root.gotoAndPlay("leaderboard");
}
Symbol 317 Button
on (release) {
_root.gotoAndPlay("send_friend");
}
Symbol 321 Button
on (release) {
_root.gotoAndPlay("instructions");
}
Symbol 323 Button
on (release) {
_root.gotoAndStop("gameover");
}
Symbol 326 Button
on (release) {
this.boolSubmit = true;
strUserName = user_name.text;
strUserEmail = user_email.text;
intUserIndexOfAt = strUserEmail.indexOf("@");
intUserLastIndexOfDot = strUserEmail.lastIndexOf(".");
intDCP = 0;
if (((!strUserEmail) || (intUserIndexOfAt == -1)) || (intUserLastIndexOfDot == -1)) {
this.boolSubmit = false;
error_text.text = "Your email address\nis not valid";
} else if (!strUserName) {
this.boolSubmit = false;
error_text.text = "Please enter\nyour name";
}
if (tickbox._currentframe == 2) {
intDCP = 1;
}
if (this.boolSubmit != false) {
_root.intSubmit = 1;
error_text.text = "Submitting score, please wait...";
_root.objRemote.setHighScores(strUserName, strUserEmail, _root.intScore, intDCP);
}
}
Symbol 339 MovieClip Frame 1
stop();
Symbol 339 MovieClip Frame 2
stop();
Instance of Symbol 339 MovieClip "tickbox" in Symbol 342 MovieClip Frame 1
on (release) {
if (this._currentframe == 1) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Symbol 363 Button
on (release) {
_root.gotoAndStop("send_friend");
}
Symbol 364 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 = arrScores[i].score;
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(20);
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 367 Button
on (release) {
this.boolSubmit = true;
intDCP = 0;
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 (tickbox._currentframe == 2) {
intDCP = 1;
}
if (this.boolSubmit != false) {
error_text.text = "Sending, please wait...";
_root.objRemote.sendToFriend(strUserName, strUserEmail, strFriendName, strFriendEmail, _root.intScore, intDCP);
}
}
Instance of Symbol 339 MovieClip "tickbox" in Symbol 378 MovieClip Frame 1
on (release) {
if (this._currentframe == 1) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}