Frame 1
stop();
Stage.showMenu = false;
var intPromoTier = 0;
var intScore = 0;
var intScoreSub = 0;
var strRootURL = "http://www.tamba-games.co.uk/builder";
var strServiceURL = (strRootURL + "/amfphp/gateway.php");
var objRemote = (new remoting.RemotingFunctions(strServiceURL, "GameFunctions"));
preLoad = function () {
preloader.inner_mc.gotoAndStop(Math.round((getBytesLoaded() / getBytesTotal()) * 100));
if (getBytesLoaded() == getBytesTotal()) {
clearInterval(intPreloader);
preloader.inner_mc.play();
}
};
var intPreloader = setInterval(preLoad, 40);
var globalSound = new Sound(_root);
btn_sound.onRelease = function () {
if (!soundOff) {
btn_sound.gotoAndStop(2);
globalSound.setVolume(0);
soundOff = true;
skipnext = true;
}
if (soundOff && (!skipnext)) {
btn_sound.gotoAndStop(1);
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:515, 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 = "868";
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();
var intScore = 0;
Frame 3
stop();
Frame 4
stop();
intScore = _global.totalScore;
Frame 5
stop();
Frame 6
stop();
Frame 7
stop();
Frame 8
stop();
Frame 9
stop();
Symbol 11 MovieClip Frame 1
stop();
Symbol 11 MovieClip Frame 2
stop();
Symbol 24 MovieClip Frame 1
stop();
Symbol 24 MovieClip Frame 2
stop();
Symbol 31 MovieClip Frame 1
stop();
Symbol 31 MovieClip Frame 2
stop();
Symbol 64 MovieClip [RemotingDebugClasses] Frame 1
#initclip 64
Object.registerClass("RemotingDebugClasses", mx.remoting.DebugClasses);
#endinitclip
preview._visible = false;
stop();
Symbol 109 MovieClip [RemotingClasses] Frame 1
#initclip 65
Object.registerClass("RemotingClasses", mx.remoting.ApiClasses);
#endinitclip
preview._visible = false;
stop();
Symbol 131 MovieClip Frame 160
_parent._parent.gotoAndStop(2);
stop();
Instance of Symbol 140 MovieClip in Symbol 156 MovieClip Frame 1
on (release) {
_root.gotoAndStop("game");
}
Instance of Symbol 142 MovieClip in Symbol 156 MovieClip Frame 1
on (release) {
_root.gotoAndStop("instructions");
}
Symbol 170 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (this.hitTest(_root.game.playfield_mc.grid_mc.char_mc)) {
clearInterval(_global.intTurboInterval);
_parent._parent.intCharS = 6;
_global.intTurboInterval = setInterval(_parent._parent.turboFunction, 4000);
this._visible = false;
this.gotoAndStop("active");
}
};
Symbol 170 MovieClip Frame 2
stop();
Symbol 174 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (this.hitTest(_root.game.playfield_mc.grid_mc.char_mc)) {
_parent._parent.intScore = _parent._parent.intScore + 300;
var _local4 = 1;
while (_local4 < 10) {
var _local5 = "rat" + _local4;
_root.game[_local5]._x = -300;
_local4++;
}
trace("hi");
this._visible = false;
this.gotoAndStop("active");
_root.game.grid.rat9.removeMovieClip();
_root.game.game.baddies = new Array();
_parent._parent.spawnAI = true;
_parent._parent.AI_rat_spawn.onEnterFrame = _parent._parent.startAiRat;
}
};
Instance of Symbol 159 MovieClip in Symbol 175 MovieClip Frame 1
on (release) {
_root.gotoAndStop("dummy_title");
}
Symbol 181 Button
on (release) {
if (_parent.intScoreSub == 1) {
_parent.gotoAndStop("leaderboard");
} else {
_parent.gotoAndStop("submit_score");
}
}
Symbol 183 Button
on (release) {
_parent.gotoAndStop("send_friend");
}
Symbol 185 Button
on (release) {
_parent.intScoreSub = 0;
_parent.gotoAndStop("game");
}
Symbol 187 Button
on (release) {
_parent.gotoAndStop("leaderboard");
}
Symbol 195 Button
on (release) {
_parent.gotoAndStop("gameover");
}
Symbol 197 Button
on (release) {
this.boolSubmit = true;
strUserName = user_name.text;
strUserEmail = user_email.text;
intUserIndexOfAt = strUserEmail.indexOf("@");
intUserLastIndexOfDot = strUserEmail.lastIndexOf(".");
intOptIn = 0;
if (((!strUserEmail) || (intUserIndexOfAt == -1)) || (intUserLastIndexOfDot == -1)) {
this.boolSubmit = false;
error_text.text = "Your email address is not valid";
} else if (!strUserName) {
this.boolSubmit = false;
error_text.text = "Please enter your name";
}
if (tickbox._currentframe == 2) {
intOptIn = 1;
}
if (this.boolSubmit != false) {
_parent.intScoreSub = 1;
btn_submit._visible = false;
error_text.text = "Submitting score, please wait...";
_parent.objRemote.setHighScores(strUserName, strUserEmail, _global.totalScore, intOptIn, _parent.intPromoTier);
}
}
Symbol 208 MovieClip Frame 1
stop();
Symbol 208 MovieClip Frame 2
stop();
Instance of Symbol 208 MovieClip "tickbox" in Symbol 214 MovieClip Frame 1
on (release) {
if (this._currentframe == 1) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
}
Symbol 215 Button
on (release) {
_parent.gotoAndStop("gameover");
}
Symbol 217 Button
on (release) {
function sendMail() {
trace("Send");
if (j >= (arrSend.length - 1)) {
_root.sendfriend.friend_name_1.text = "";
_root.sendfriend.friend_email_1.text = "";
_root.sendfriend.friend_name_2.text = "";
_root.sendfriend.friend_email_2.text = "";
_root.sendfriend.friend_name_3.text = "";
_root.sendfriend.friend_email_3.text = "";
_root.sendfriend.error_text.text = "Email sent! Would you like to send another?";
btn_submit._visible = true;
clearInterval(k);
boolSending = false;
}
trace(arrSend[j][1]);
_root.objRemote.sendToFriend(strUserName, strUserEmail, arrSend[j][0], arrSend[j][1], _parent.intScore);
arrDupe.push(strFriendEmail);
j++;
}
if (boolSending == true) {
return(false);
}
var intSend = 0;
var j = 0;
var k = 0;
this.boolSubmit = true;
var arrSend = [];
var arrDupe = [];
strUserName = user_name.text;
strUserEmail = user_email.text;
intUserIndexOfAt = strUserEmail.indexOf("@");
intUserLastIndexOfDot = strUserEmail.lastIndexOf(".");
if (!strUserName) {
this.boolSubmit = false;
error_text.text = "Please enter your name";
} else if (((!strUserEmail) || (intUserIndexOfAt == -1)) || (intUserLastIndexOfDot == -1)) {
this.boolSubmit = false;
error_text.text = "Your email address is not valid";
} else {
i = 1;
while (i <= 3) {
strFriendName = this["friend_name_" + i].text;
strFriendEmail = this["friend_email_" + i].text;
intFriendIndexOfAt = strFriendEmail.indexOf("@");
intFriendLastIndexOfDot = strFriendEmail.lastIndexOf(".");
if ((strFriendName != "") || (strFriendEmail != "")) {
intSend++;
if (!strFriendName) {
this.boolSubmit = false;
error_text.text = ("Friend " + i) + " has a missing name";
break;
}
if (((!strFriendEmail) || (intFriendIndexOfAt == -1)) || (intFriendLastIndexOfDot == -1)) {
this.boolSubmit = false;
error_text.text = ("Friend " + i) + " has an invalid email address";
break;
}
arrSend.push([strFriendName, strFriendEmail]);
}
i++;
}
if (intSend == 0) {
this.boolSubmit = false;
error_text.text = "Please enter your friends' details";
}
if (this.boolSubmit != false) {
btn_submit._visible = false;
error_text.text = "Sending, please wait...";
k = setInterval(sendMail, 400);
boolSending = true;
}
}
}
Symbol 248 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;
_local2.date.text = arrScores[i].date;
nextScorePos = this.scoreList_mc.scoreLine_mc._height;
i++;
}
scrolling();
}
this.scoreList_mc.scoreLine_mc._visible = false;
_parent.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();
Instance of Symbol 159 MovieClip in Symbol 248 MovieClip Frame 1
on (release) {
_root.gotoAndStop("gameover");
}
Symbol 249 MovieClip Frame 1
stop();
Symbol 249 MovieClip Frame 2
stop();
Symbol 249 MovieClip Frame 3
stop();
Symbol 249 MovieClip Frame 4
stop();
Symbol 249 MovieClip Frame 5
stop();
Symbol 249 MovieClip Frame 6
stop();
Symbol 249 MovieClip Frame 7
stop();
Symbol 249 MovieClip Frame 8
stop();
Symbol 252 Button
on (release) {
getURL ("http://www.tamba.co.uk", "_blank");
}
Symbol 255 MovieClip Frame 1
stop();
Symbol 310 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, intScore, intOptIn, intLevel) {
var _local2 = new as.md5();
var _local3 = _local2.hash((((((((("client=builder&name=" + strUserName) + "&score=") + intScore) + "&email=") + strUserEmail) + "&optin=") + intOptIn) + "&level=") + intLevel);
service.setHighScores([strUserName, strUserEmail, intScore, intOptIn, intLevel, _local3], this, setHighScoresResult);
}
function setHighScoresResult() {
_root.gotoAndStop("leaderboard");
}
function sendToFriend(strUserName, strUserEmail, strFriendName, strFriendEmail, intUserScore) {
service.sendToFriend([strUserName, strUserEmail, strFriendName, strFriendEmail, intUserScore], this, sentToFriend);
}
function getRank(intScore) {
service.getRank([intScore], this, gotRank);
}
function gotRank(objResult) {
_root.intRank = objResult.result;
}
function sentToFriend() {
_root.sendfriend.friend_name.text = "";
_root.sendfriend.friend_email.text = "";
_root.sendfriend.error_text.text = "Email sent! Would you like to send another?";
}
}
Symbol 311 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 116 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 65 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 66 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 72 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 115 MovieClip [__Packages.mx.rpc.Responder] Frame 0
interface mx.rpc.Responder{}
Symbol 114 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 113 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 112 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 71 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 95 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 79 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 88 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 312 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 313 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 111 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 314 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 119 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 315 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 316 MovieClip [__Packages.as.md5] Frame 0
class as.md5
{
function md5 (b64pad, chrsz) {
if (b64pad != undefined) {
this.b64pad = b64pad;
}
if (((chrsz != undefined) && (chrsz == 8)) || (chrsz == 16)) {
this.chrsz = chrsz;
}
}
function hash(s) {
return(hex_md5(s));
}
function hex_md5(s) {
return(binl2hex(core_md5(str2binl(s), s.length * chrsz)));
}
function b64_md5(s) {
return(binl2b64(core_md5(str2binl(s), s.length * chrsz)));
}
function str_md5(s) {
return(binl2str(core_md5(str2binl(s), s.length * chrsz)));
}
function hex_hmac_md5(key, data) {
return(binl2hex(core_hmac_md5(key, data)));
}
function b64_hmac_md5(key, data) {
return(binl2b64(core_hmac_md5(key, data)));
}
function str_hmac_md5(key, data) {
return(binl2str(core_hmac_md5(key, data)));
}
function md5_cmn(q, a, b, x, s, t) {
return(safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b));
}
function md5_ff(a, b, c, d, x, s, t) {
return(md5_cmn((b & c) | ((~b) & d), a, b, x, s, t));
}
function md5_gg(a, b, c, d, x, s, t) {
return(md5_cmn((b & d) | (c & (~d)), a, b, x, s, t));
}
function md5_hh(a, b, c, d, x, s, t) {
return(md5_cmn((b ^ c) ^ d, a, b, x, s, t));
}
function md5_ii(a, b, c, d, x, s, t) {
return(md5_cmn(c ^ (b | (~d)), a, b, x, s, t));
}
function core_md5(x, len) {
x[len >> 5] = x[len >> 5] | (128 << (len % 32));
x[(((len + 64) >>> 9) << 4) + 14] = len;
var _local5 = 1732584193 /* 0x67452301 */;
var _local4 = -271733879;
var _local3 = -1732584194;
var _local2 = 271733878 /* 0x10325476 */;
var _local6 = 0;
while (_local6 < x.length) {
var _local11 = _local5;
var _local10 = _local4;
var _local9 = _local3;
var _local8 = _local2;
_local5 = md5_ff(_local5, _local4, _local3, _local2, x[_local6 + 0], 7, -680876936);
_local2 = md5_ff(_local2, _local5, _local4, _local3, x[_local6 + 1], 12, -389564586);
_local3 = md5_ff(_local3, _local2, _local5, _local4, x[_local6 + 2], 17, 606105819);
_local4 = md5_ff(_local4, _local3, _local2, _local5, x[_local6 + 3], 22, -1044525330);
_local5 = md5_ff(_local5, _local4, _local3, _local2, x[_local6 + 4], 7, -176418897);
_local2 = md5_ff(_local2, _local5, _local4, _local3, x[_local6 + 5], 12, 1200080426);
_local3 = md5_ff(_local3, _local2, _local5, _local4, x[_local6 + 6], 17, -1473231341);
_local4 = md5_ff(_local4, _local3, _local2, _local5, x[_local6 + 7], 22, -45705983);
_local5 = md5_ff(_local5, _local4, _local3, _local2, x[_local6 + 8], 7, 1770035416);
_local2 = md5_ff(_local2, _local5, _local4, _local3, x[_local6 + 9], 12, -1958414417);
_local3 = md5_ff(_local3, _local2, _local5, _local4, x[_local6 + 10], 17, -42063);
_local4 = md5_ff(_local4, _local3, _local2, _local5, x[_local6 + 11], 22, -1990404162);
_local5 = md5_ff(_local5, _local4, _local3, _local2, x[_local6 + 12], 7, 1804603682);
_local2 = md5_ff(_local2, _local5, _local4, _local3, x[_local6 + 13], 12, -40341101);
_local3 = md5_ff(_local3, _local2, _local5, _local4, x[_local6 + 14], 17, -1502002290);
_local4 = md5_ff(_local4, _local3, _local2, _local5, x[_local6 + 15], 22, 1236535329);
_local5 = md5_gg(_local5, _local4, _local3, _local2, x[_local6 + 1], 5, -165796510);
_local2 = md5_gg(_local2, _local5, _local4, _local3, x[_local6 + 6], 9, -1069501632);
_local3 = md5_gg(_local3, _local2, _local5, _local4, x[_local6 + 11], 14, 643717713);
_local4 = md5_gg(_local4, _local3, _local2, _local5, x[_local6 + 0], 20, -373897302);
_local5 = md5_gg(_local5, _local4, _local3, _local2, x[_local6 + 5], 5, -701558691);
_local2 = md5_gg(_local2, _local5, _local4, _local3, x[_local6 + 10], 9, 38016083);
_local3 = md5_gg(_local3, _local2, _local5, _local4, x[_local6 + 15], 14, -660478335);
_local4 = md5_gg(_local4, _local3, _local2, _local5, x[_local6 + 4], 20, -405537848);
_local5 = md5_gg(_local5, _local4, _local3, _local2, x[_local6 + 9], 5, 568446438);
_local2 = md5_gg(_local2, _local5, _local4, _local3, x[_local6 + 14], 9, -1019803690);
_local3 = md5_gg(_local3, _local2, _local5, _local4, x[_local6 + 3], 14, -187363961);
_local4 = md5_gg(_local4, _local3, _local2, _local5, x[_local6 + 8], 20, 1163531501);
_local5 = md5_gg(_local5, _local4, _local3, _local2, x[_local6 + 13], 5, -1444681467);
_local2 = md5_gg(_local2, _local5, _local4, _local3, x[_local6 + 2], 9, -51403784);
_local3 = md5_gg(_local3, _local2, _local5, _local4, x[_local6 + 7], 14, 1735328473);
_local4 = md5_gg(_local4, _local3, _local2, _local5, x[_local6 + 12], 20, -1926607734);
_local5 = md5_hh(_local5, _local4, _local3, _local2, x[_local6 + 5], 4, -378558);
_local2 = md5_hh(_local2, _local5, _local4, _local3, x[_local6 + 8], 11, -2022574463);
_local3 = md5_hh(_local3, _local2, _local5, _local4, x[_local6 + 11], 16, 1839030562);
_local4 = md5_hh(_local4, _local3, _local2, _local5, x[_local6 + 14], 23, -35309556);
_local5 = md5_hh(_local5, _local4, _local3, _local2, x[_local6 + 1], 4, -1530992060);
_local2 = md5_hh(_local2, _local5, _local4, _local3, x[_local6 + 4], 11, 1272893353);
_local3 = md5_hh(_local3, _local2, _local5, _local4, x[_local6 + 7], 16, -155497632);
_local4 = md5_hh(_local4, _local3, _local2, _local5, x[_local6 + 10], 23, -1094730640);
_local5 = md5_hh(_local5, _local4, _local3, _local2, x[_local6 + 13], 4, 681279174);
_local2 = md5_hh(_local2, _local5, _local4, _local3, x[_local6 + 0], 11, -358537222);
_local3 = md5_hh(_local3, _local2, _local5, _local4, x[_local6 + 3], 16, -722521979);
_local4 = md5_hh(_local4, _local3, _local2, _local5, x[_local6 + 6], 23, 76029189);
_local5 = md5_hh(_local5, _local4, _local3, _local2, x[_local6 + 9], 4, -640364487);
_local2 = md5_hh(_local2, _local5, _local4, _local3, x[_local6 + 12], 11, -421815835);
_local3 = md5_hh(_local3, _local2, _local5, _local4, x[_local6 + 15], 16, 530742520);
_local4 = md5_hh(_local4, _local3, _local2, _local5, x[_local6 + 2], 23, -995338651);
_local5 = md5_ii(_local5, _local4, _local3, _local2, x[_local6 + 0], 6, -198630844);
_local2 = md5_ii(_local2, _local5, _local4, _local3, x[_local6 + 7], 10, 1126891415);
_local3 = md5_ii(_local3, _local2, _local5, _local4, x[_local6 + 14], 15, -1416354905);
_local4 = md5_ii(_local4, _local3, _local2, _local5, x[_local6 + 5], 21, -57434055);
_local5 = md5_ii(_local5, _local4, _local3, _local2, x[_local6 + 12], 6, 1700485571);
_local2 = md5_ii(_local2, _local5, _local4, _local3, x[_local6 + 3], 10, -1894986606);
_local3 = md5_ii(_local3, _local2, _local5, _local4, x[_local6 + 10], 15, -1051523);
_local4 = md5_ii(_local4, _local3, _local2, _local5, x[_local6 + 1], 21, -2054922799);
_local5 = md5_ii(_local5, _local4, _local3, _local2, x[_local6 + 8], 6, 1873313359);
_local2 = md5_ii(_local2, _local5, _local4, _local3, x[_local6 + 15], 10, -30611744);
_local3 = md5_ii(_local3, _local2, _local5, _local4, x[_local6 + 6], 15, -1560198380);
_local4 = md5_ii(_local4, _local3, _local2, _local5, x[_local6 + 13], 21, 1309151649);
_local5 = md5_ii(_local5, _local4, _local3, _local2, x[_local6 + 4], 6, -145523070);
_local2 = md5_ii(_local2, _local5, _local4, _local3, x[_local6 + 11], 10, -1120210379);
_local3 = md5_ii(_local3, _local2, _local5, _local4, x[_local6 + 2], 15, 718787259);
_local4 = md5_ii(_local4, _local3, _local2, _local5, x[_local6 + 9], 21, -343485551);
_local5 = safe_add(_local5, _local11);
_local4 = safe_add(_local4, _local10);
_local3 = safe_add(_local3, _local9);
_local2 = safe_add(_local2, _local8);
_local6 = _local6 + 16;
}
return(Array(_local5, _local4, _local3, _local2));
}
function core_hmac_md5(key, data) {
var _local3 = new Array(str2binl(key));
if (_local3.length > 16) {
_local3 = core_md5(_local3, key.length * chrsz);
}
var _local4 = new Array(16);
var _local5 = new Array(16);
var _local2 = 0;
while (_local2 < 16) {
_local4[_local2] = _local3[_local2] ^ 909522486;
_local5[_local2] = _local3[_local2] ^ 1549556828;
_local2++;
}
var _local6 = new Array(core_md5(_local4.concat(str2binl(data)), 512 + (data.length * chrsz)));
return(core_md5(_local5.concat(_local6), 640));
}
function safe_add(x, y) {
var _local1 = new Number((x & 65535) + (y & 65535));
var _local2 = new Number(((x >> 16) + (y >> 16)) + (_local1 >> 16));
return((_local2 << 16) | (_local1 & 65535));
}
function bit_rol(num, cnt) {
return((num << cnt) | (num >>> (32 - cnt)));
}
function str2binl(str) {
var _local4 = new Array();
var _local5 = (1 << chrsz) - 1;
var _local2 = 0;
while (_local2 < (str.length * chrsz)) {
_local4[_local2 >> 5] = _local4[_local2 >> 5] | ((str.charCodeAt(_local2 / chrsz) & _local5) << (_local2 % 32));
_local2 = _local2 + chrsz;
}
return(_local4);
}
function binl2str(bin) {
var _local4 = new String("");
var _local5 = (1 << chrsz) - 1;
var _local2 = 0;
while (_local2 < (bin.length * 32)) {
_local4 = _local4 + String.fromCharCode((bin[_local2 >> 5] >>> (_local2 % 32)) & _local5);
_local2 = _local2 + chrsz;
}
return(_local4);
}
function binl2hex(binarray) {
var _local3 = "0123456789abcdef";
var _local4 = new String("");
var _local1 = 0;
while (_local1 < (binarray.length * 4)) {
_local4 = _local4 + (_local3.charAt((binarray[_local1 >> 2] >> (((_local1 % 4) * 8) + 4)) & 15) + _local3.charAt((binarray[_local1 >> 2] >> ((_local1 % 4) * 8)) & 15));
_local1++;
}
return(_local4);
}
function binl2b64(binarray) {
var _local7 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var _local5 = new String("");
var _local3 = 0;
while (_local3 < (binarray.length * 4)) {
var _local6 = ((((binarray[_local3 >> 2] >> (8 * (_local3 % 4))) & 255) << 16) | (((binarray[(_local3 + 1) >> 2] >> (8 * ((_local3 + 1) % 4))) & 255) << 8)) | ((binarray[(_local3 + 2) >> 2] >> (8 * ((_local3 + 2) % 4))) & 255);
var _local2 = 0;
while (_local2 < 4) {
if (((_local3 * 8) + (_local2 * 6)) > (binarray.length * 32)) {
_local5 = _local5 + b64pad;
} else {
_local5 = _local5 + _local7.charAt((_local6 >> (6 * (3 - _local2))) & 63);
}
_local2++;
}
_local3 = _local3 + 3;
}
return(_local5);
}
var b64pad = new String("");
var chrsz = new Number(8);
}
Symbol 60 MovieClip [__Packages.mx.remoting.DebugClasses] Frame 0
class mx.remoting.DebugClasses extends MovieClip
{
function DebugClasses () {
super();
}
}
Symbol 67 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 68 MovieClip [__Packages.mx.data.DataRange] Frame 0
interface mx.data.DataRange{}
Symbol 69 MovieClip [__Packages.mx.data.PageableData] Frame 0
interface mx.data.PageableData{}
Symbol 70 MovieClip [__Packages.mx.data.PageableList] Frame 0
interface mx.data.PageableList{}
Symbol 73 MovieClip [__Packages.mx.utils.Iterator] Frame 0
interface mx.utils.Iterator{}
Symbol 74 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 75 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 76 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 77 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 78 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 80 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 81 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 82 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 83 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 84 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 85 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 86 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 87 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 89 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 90 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 91 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 92 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 93 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 94 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 96 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 97 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 98 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 99 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 100 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 101 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 102 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 103 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 104 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 105 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 106 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 107 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 108 MovieClip [__Packages.mx.remoting.ApiClasses] Frame 0
class mx.remoting.ApiClasses extends MovieClip
{
function ApiClasses () {
super();
}
}
Symbol 110 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 117 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 118 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 120 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 261 MovieClip Frame 1
function reconfigureTeaCups() {
var _local1 = Math.floor((Math.random() * 6) + 1);
switch (_local1) {
case 1 :
gotoAndStop("c_" + _local1);
break;
case 2 :
gotoAndStop("c_" + _local1);
break;
case 3 :
gotoAndStop("c_" + _local1);
break;
case 4 :
gotoAndStop("c_" + _local1);
break;
case 5 :
gotoAndStop("c_" + _local1);
break;
case 6 :
gotoAndStop("c_" + _local1);
break;
case 7 :
gotoAndStop("c_" + _local1);
break;
case 8 :
gotoAndStop("c_" + _local1);
break;
case 9 :
gotoAndStop("c_" + _local1);
}
}
stop();
reconfigureTeaCups();
Symbol 264 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (this.hitTest(_root.game.playfield_mc.grid_mc.char_mc)) {
clearInterval(_global.intEggInterval);
_parent._parent.intCharS = 1.6;
_global.intEggInterval = setInterval(_parent._parent.eggFunction, 4000);
this._visible = false;
this.gotoAndStop("active");
}
};
Symbol 265 MovieClip Frame 1
function reconfigureEggs() {
var _local1 = Math.floor((Math.random() * 6) + 1);
switch (_local1) {
case 1 :
gotoAndStop("e_" + _local1);
break;
case 2 :
gotoAndStop("e_" + _local1);
break;
case 3 :
gotoAndStop("e_" + _local1);
break;
case 4 :
gotoAndStop("e_" + _local1);
break;
case 5 :
gotoAndStop("e_" + _local1);
break;
case 6 :
gotoAndStop("e_" + _local1);
break;
case 7 :
gotoAndStop("e_" + _local1);
break;
case 8 :
gotoAndStop("e_" + _local1);
break;
case 9 :
gotoAndStop("e_" + _local1);
}
}
stop();
reconfigureEggs();
Symbol 268 MovieClip Frame 1
stop();
trace(this);
Instance of Symbol 267 MovieClip in Symbol 268 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.game.playfield_mc.grid_mc.char_mc.hitZone)) {
_root.game.gotoAndStop("lostlife");
}
}
Symbol 268 MovieClip Frame 2
stop();
Instance of Symbol 275 MovieClip in Symbol 278 MovieClip Frame 1
on (release) {
_parent._parent.gotoAndStop("level2");
this._parent._visible = false;
}
Symbol 280 MovieClip Frame 1
function reconfigureTeaCups() {
var _local1 = Math.floor((Math.random() * 6) + 1);
switch (_local1) {
case 1 :
gotoAndStop("c_" + _local1);
break;
case 2 :
gotoAndStop("c_" + _local1);
break;
case 3 :
gotoAndStop("c_" + _local1);
break;
case 4 :
gotoAndStop("c_" + _local1);
break;
case 5 :
gotoAndStop("c_" + _local1);
break;
case 6 :
gotoAndStop("c_" + _local1);
break;
case 7 :
gotoAndStop("c_" + _local1);
break;
case 8 :
gotoAndStop("c_" + _local1);
break;
case 9 :
gotoAndStop("c_" + _local1);
}
}
stop();
reconfigureTeaCups();
Symbol 281 MovieClip Frame 1
function reconfigureEggs() {
var _local1 = Math.floor((Math.random() * 6) + 1);
switch (_local1) {
case 1 :
gotoAndStop("e_" + _local1);
break;
case 2 :
gotoAndStop("e_" + _local1);
break;
case 3 :
gotoAndStop("e_" + _local1);
break;
case 4 :
gotoAndStop("e_" + _local1);
break;
case 5 :
gotoAndStop("e_" + _local1);
break;
case 6 :
gotoAndStop("e_" + _local1);
break;
case 7 :
gotoAndStop("e_" + _local1);
break;
case 8 :
gotoAndStop("e_" + _local1);
break;
case 9 :
gotoAndStop("e_" + _local1);
}
}
stop();
reconfigureEggs();
Instance of Symbol 275 MovieClip in Symbol 283 MovieClip Frame 1
on (release) {
_parent._parent.gotoAndStop("level3");
this._parent._visible = false;
}
Symbol 288 MovieClip Frame 1
stop();
Symbol 291 MovieClip Frame 1
stop();
Instance of Symbol 267 MovieClip in Symbol 293 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.game.playfield_mc.grid_mc.char_mc.hitZone)) {
_root.game.gotoAndStop("lostlife");
}
}
Symbol 294 MovieClip [baddy] Frame 1
stop();
trace(this);
Symbol 296 MovieClip Frame 1
function reconfigureTeaCups() {
var _local1 = Math.floor((Math.random() * 6) + 1);
switch (_local1) {
case 1 :
gotoAndStop("c_" + _local1);
break;
case 2 :
gotoAndStop("c_" + _local1);
break;
case 3 :
gotoAndStop("c_" + _local1);
break;
case 4 :
gotoAndStop("c_" + _local1);
break;
case 5 :
gotoAndStop("c_" + _local1);
break;
case 6 :
gotoAndStop("c_" + _local1);
break;
case 7 :
gotoAndStop("c_" + _local1);
break;
case 8 :
gotoAndStop("c_" + _local1);
break;
case 9 :
gotoAndStop("c_" + _local1);
}
}
stop();
reconfigureTeaCups();
Symbol 297 MovieClip Frame 1
function reconfigureEggs() {
var _local1 = Math.floor((Math.random() * 6) + 1);
switch (_local1) {
case 1 :
gotoAndStop("e_" + _local1);
break;
case 2 :
gotoAndStop("e_" + _local1);
break;
case 3 :
gotoAndStop("e_" + _local1);
break;
case 4 :
gotoAndStop("e_" + _local1);
break;
case 5 :
gotoAndStop("e_" + _local1);
break;
case 6 :
gotoAndStop("e_" + _local1);
break;
case 7 :
gotoAndStop("e_" + _local1);
break;
case 8 :
gotoAndStop("e_" + _local1);
break;
case 9 :
gotoAndStop("e_" + _local1);
}
}
stop();
reconfigureEggs();
Symbol 302 MovieClip Frame 1
stop();
Instance of Symbol 275 MovieClip in Symbol 303 MovieClip Frame 1
on (release) {
_root.gotoAndStop("gameover");
this._parent._visible = false;
}
Symbol 308 MovieClip Frame 1
_global.intLives = 3;
_global.totalScore = 0;
var intScore = 0;
sndTileComplete = new Sound();
sndTileComplete.attachSound("tile_complete");
sndRatDeath = new Sound();
sndRatDeath.attachSound("rat_death");
sndGoldernFloat = new Sound();
sndGoldernFloat.attachSound("goldern_float");
Symbol 308 MovieClip Frame 2
function nextLevel() {
intLevel++;
arrPoint = [];
buildGrid();
}
function buildGrid() {
var _local13 = objLevel.createEmptyMovieClip("grid_mc", 2);
var intR = arrLevel[intLevel].length;
var _local14 = arrLevel[intLevel][0].length;
_local13._x = (intLevelW - (_local14 * intTileW)) / 2;
_local13._y = (intLevelH - (intR * intTileH)) / 2;
var _local8 = 0;
var _local12 = 0;
var _local9 = 0;
var _local7 = 0;
while (_local7 < intR) {
var _local5 = 0;
while (_local5 < _local14) {
if (arrLevel[intLevel][_local7][_local5] == 1) {
var _local3 = _local13.attachMovie("tile_mc_level_1", (("tile_" + _local7) + "_") + _local5, _local9, {_x:_local8, _y:_local12});
_local3.filled_mc._visible = false;
_local3.intT = (_local3.intB = (_local3.intL = (_local3.intR = 0)));
_local3.onEnterFrame = function () {
if ((((this.intT == 1) && (this.intB == 1)) && (this.intL == 1)) && (this.intR == 1)) {
this.clear_mc._visible = false;
this.filled_mc._visible = true;
sndTileComplete.start();
intScore = intScore + 25;
levelProgress++;
trace(levelProgress);
checkForEndOfLevel();
var _local3 = 1;
while (_local3 < 10) {
var _local4 = "rat" + _local3;
if (this.filled_mc.hitTileZone.hitTest(_root.game[_local4])) {
sndRatDeath.start();
intScore = intScore + 300;
_root.game[_local4]._x = -300;
}
_local3++;
}
delete this.onEnterFrame;
}
if (this.hitTest(special_bonus_lvl_1._x, special_bonus_lvl_1._y, true) && (special_bonus_lvl_1.hitTest(_root.game.playfield_mc.grid_mc.char_mc))) {
this.intT = 1;
this.intB = 1;
this.intL = 1;
this.intR = 1;
objLevel.grid_mc[(("tile_" + (this.row - 1)) + "_") + this.column].intB = 1;
objLevel.grid_mc[(("tile_" + (this.row + 1)) + "_") + this.column].intT = 1;
objLevel.grid_mc[(("tile_" + this.row) + "_") + (this.column - 1)].intR = 1;
objLevel.grid_mc[(("tile_" + this.row) + "_") + (this.column + 1)].intL = 1;
this.swapDepths(19000);
this.clear_mc._visible = false;
this.filled_mc._visible = true;
special_bonus_lvl_1._visible = false;
levelProgress++;
delete this.onEnterFrame;
}
};
}
_local8 = _local8 + intTileW;
_local9++;
_local5++;
}
_local8 = 0;
_local12 = _local12 + intTileH;
_local7++;
}
objChar = _local13.attachMovie("char", "char_mc", 30000);
objChar._xscale = 165;
objChar._yscale = objChar._xscale;
objChar.onEnterFrame = moveChar;
var _local16 = arrLevelStart[intLevel][0];
var _local15 = arrLevelStart[intLevel][1];
objChar._x = _local16 * intTileW;
objChar._y = _local15 * intTileH;
objTrail = _local13.createEmptyMovieClip("line", 20000);
objTrail.lineStyle(4, 10027008, 100);
objTrail.moveTo(objChar._x, objChar._y);
intPassX = _local16;
intPassXL = _local16;
intPassY = _local15;
intPassYL = _local15;
}
function moveChar() {
var _local1 = [];
if (Key.isDown(38) && (stillAlive == true)) {
if (objChar._y > 10) {
_local1 = setSpeed(0, -1);
}
} else if (Key.isDown(40) && (stillAlive == true)) {
if (objChar._y < 255) {
_local1 = setSpeed(0, 1);
}
} else if (Key.isDown(37) && (stillAlive == true)) {
if (objChar._x > 10) {
_local1 = setSpeed(-1, 0);
}
} else if (Key.isDown(39) && (stillAlive == true)) {
if (objChar._x < 430) {
_local1 = setSpeed(1, 0);
}
} else {
_local1 = [0, 0];
}
if ((_local1[0] != 0) || (_local1[1] != 0)) {
objChar.inner_mc.play();
objChar._x = objChar._x + _local1[0];
objChar._y = objChar._y + _local1[1];
} else {
objChar.inner_mc.gotoAndStop(1);
}
}
function setSpeed(intDX, intDY) {
var _local6 = intCharS;
var _local4 = intCharS;
if (intDX != 0) {
if ((objChar._y % intTileW) > intTileLW) {
_local6 = 0;
} else {
objChar._y = intTileW * Math.round(objChar._y / intTileW);
}
if (intDX > 0) {
objChar._rotation = 180;
} else {
objChar._rotation = 0;
}
} else if (intDY != 0) {
if ((objChar._x % intTileW) > intTileLW) {
debug.text = "X:" + (objChar._x % intTileW);
_local4 = 0;
} else {
objChar._x = intTileW * Math.round(objChar._x / intTileW);
}
if (intDY > 0) {
objChar._rotation = 270;
} else {
objChar._rotation = 90;
}
}
if ((intDX > 0) || (intDY != 0)) {
var _local5 = Math.floor(objChar._x / intTileW);
var _local3 = Math.floor(objChar._y / intTileH);
if (intPassXL < _local5) {
debug.text = (("X1: Passed " + intPassXL) + "->") + _local5;
objLevel.grid_mc[(("tile_" + _local3) + "_") + intPassXL].intT = 1;
objLevel.grid_mc[(("tile_" + (_local3 - 1)) + "_") + intPassXL].intB = 1;
intPassXL = _local5;
}
}
if ((intDX < 0) || (intDY != 0)) {
var _local5 = Math.ceil(objChar._x / intTileW);
var _local3 = Math.ceil(objChar._y / intTileH);
if (intPassXL > _local5) {
objLevel.grid_mc[(("tile_" + _local3) + "_") + _local5].intT = 1;
objLevel.grid_mc[(("tile_" + (_local3 - 1)) + "_") + _local5].intB = 1;
intPassXL = _local5;
}
}
if ((intDY < 0) || (intDX != 0)) {
var _local5 = Math.ceil(objChar._x / intTileW);
var _local3 = Math.ceil(objChar._y / intTileH);
if (intPassYL > _local3) {
objLevel.grid_mc[(("tile_" + _local3) + "_") + intPassXL].intL = 1;
objLevel.grid_mc[(("tile_" + _local3) + "_") + (intPassXL - 1)].intR = 1;
intPassYL = _local3;
}
}
if ((intDY > 0) || (intDX != 0)) {
var _local5 = Math.floor(objChar._x / intTileW);
var _local3 = Math.floor(objChar._y / intTileH);
if (intPassYL < _local3) {
objLevel.grid_mc[(("tile_" + (_local3 - 1)) + "_") + _local5].intL = 1;
objLevel.grid_mc[(("tile_" + (_local3 - 1)) + "_") + (_local5 - 1)].intR = 1;
intPassYL = _local3;
}
}
objTrail.lineTo(objChar._x, objChar._y);
return([_local6 * intDX, _local4 * intDY]);
}
function turboFunction() {
trace("cleared_turbo");
clearInterval(_global.intTurboInterval);
clearInterval(_global.intEggInterval);
intCharS = 4;
}
function eggFunction() {
trace("cleared_eggy_egg_egg");
clearInterval(_global.intTurboInterval);
clearInterval(_global.intEggInterval);
intCharS = 4;
}
function updateTimer() {
if ((intMins == 0) && (intSecs == 0)) {
clearInterval(intTimerIntvl);
_root.gotoAndStop("gameover");
return(false);
}
intSecs--;
if (intSecs < 0) {
intSecs = 59;
intMins--;
}
strSecs = intSecs.toString();
strMins = intMins.toString();
if (intSecs < 10) {
strSecs = "0" + strSecs;
}
if (intMins < 10) {
strMins = "0" + strMins;
}
strTimer = (strMins + ":") + strSecs;
}
function movePoison() {
rat_poison._x = -200;
rat_poison._y = -200;
}
stop();
lives_display_txt.text = _global.intLives;
clearInterval(intTimerIntvl);
var stillAlive = true;
var intMins = 1;
var intSecs = 59;
var strMins = "";
var strSecs = "";
var strTimer = ((("0" + intMins) + ":") + intSecs);
var intTimerIntvl = 0;
level1_congrats._visible = false;
var intTTime = 0;
intTimerIntvl = setInterval(updateTimer, 1000);
_global.currentLevel = "level1";
_global.intEggInterval = 0;
_global.intTurboInterval = 0;
var intPoints = 0;
var intPointsT = 0;
var intLevel = 0;
var arrLevel = [];
var arrLevelStart = [];
var objLevel = this.playfield_mc;
var intLevelW = 592;
var intLevelH = 341;
var intTileLW = 90;
var levelComplete = 15;
var levelProgress = 0;
var objChar;
var intCharS = 4;
var objTrail;
var intPassX = 0;
var intPassXL = 0;
var intPassY = 0;
var intPassYL = 0;
var intTileW = 90;
var intTileH = 90;
arrLevel[0] = [];
arrLevel[1] = [[1, 1, 1, 1, 1], [1, 1, 1, 1, 1], [1, 1, 1, 1, 1]];
arrLevelStart[0] = [];
arrLevelStart[1] = [3, 3];
checkForEndOfLevel = function () {
if (levelProgress == levelComplete) {
var _local2 = 1;
while (_local2 < 10) {
var _local3 = "rat" + _local2;
_root.game[_local3]._visible = false;
_local2++;
}
clearInterval(intTimerIntvl);
level1_congrats._visible = true;
_root.game.playfield_mc.grid_mc.char_mc._x = -600;
}
};
nextLevel();
Object.prototype.getFps = function () {
if (signal == true) {
time = getTimer();
} else {
tempo = int(1000 / (getTimer() - time));
}
signal = !signal;
return(tempo);
};
this.onEnterFrame = function () {
debug.text = getFps();
};
top = function () {
this._x = this._x + speed;
if (this._x > 430) {
this._rotation = 0;
this.onEnterFrame = right;
}
};
right = function () {
this._y = this._y + speed;
if (this._y > 350) {
this._rotation = 90;
this.onEnterFrame = bottom;
}
};
bottom = function () {
this._x = this._x - speed;
if (this._x < 170) {
this._rotation = 180;
this.onEnterFrame = left;
}
};
left = function () {
this._y = this._y - speed;
if (this._y < 260) {
this._rotation = -90;
this.onEnterFrame = top;
}
};
top2 = function () {
this._x = this._x - speed;
if (this._x < 75) {
this._rotation = 0;
this.onEnterFrame = right2;
}
};
right2 = function () {
this._y = this._y + speed;
if (this._y > 430) {
this._rotation = -90;
this.onEnterFrame = bottom2;
}
};
bottom2 = function () {
this._x = this._x + speed;
if (this._x > 520) {
this._rotation = 180;
this.onEnterFrame = left2;
}
};
left2 = function () {
this._y = this._y - speed;
if (this._y < 165) {
this._rotation = 90;
this.onEnterFrame = top2;
}
};
speed = 4;
rat1.onEnterFrame = top;
rat2.onEnterFrame = top2;
Symbol 308 MovieClip Frame 6
function nextLevel() {
intLevel++;
arrPoint = [];
buildGrid();
}
function buildGrid() {
var _local15 = objLevel.createEmptyMovieClip("grid_mc", 2);
var intR = arrLevel[intLevel].length;
var _local16 = arrLevel[intLevel][0].length;
_local15._x = (intLevelW - (_local16 * intTileW)) / 2;
_local15._y = (intLevelH - (intR * intTileH)) / 2;
var _local10 = 0;
var _local14 = 0;
var _local11 = 0;
var _local9 = 0;
while (_local9 < intR) {
var _local8 = 0;
while (_local8 < _local16) {
if (arrLevel[intLevel][_local9][_local8] == 1) {
var _local3 = _local15.attachMovie("tile_mc_level_2", (("tile_" + _local9) + "_") + _local8, _local11, {_x:_local10, _y:_local14});
_local3.filled_mc._visible = false;
_local3.intT = (_local3.intB = (_local3.intL = (_local3.intR = 0)));
_local3.column = _local8;
_local3.row = _local9;
_local3.onEnterFrame = function () {
if ((((this.intT == 1) && (this.intB == 1)) && (this.intL == 1)) && (this.intR == 1)) {
this.clear_mc._visible = false;
this.filled_mc._visible = true;
intScore = intScore + 25;
sndTileComplete.start();
levelProgress++;
checkForEndOfLevel();
var _local3 = 1;
while (_local3 < 10) {
var _local4 = "rat" + _local3;
if (this.filled_mc.hitTileZone.hitTest(_root.game[_local4])) {
sndRatDeath.start();
intScore = intScore + 300;
_root.game[_local4]._x = -300;
}
_local3++;
}
delete this.onEnterFrame;
}
var _local6 = 1;
while (_local6 < 5) {
var _local5 = "special_bonus_" + _local6;
if (this.hitTest(_root.game[_local5]._x, _root.game[_local5]._y, true) && (_root.game[_local5].hitTest(_root.game.playfield_mc.grid_mc.char_mc))) {
var _local3 = 2;
while (_local3 < 6) {
var _local4 = "rat" + _local3;
if (this.filled_mc.hitTileZone.hitTest(_root.game[_local4])) {
sndRatDeath.start();
intScore = intScore + 300;
_root.game[_local4]._x = -300;
}
_local3++;
}
sndGoldernFloat.start();
sndTileComplete.start();
this.intT = 1;
this.intB = 1;
this.intL = 1;
this.intR = 1;
objLevel.grid_mc[(("tile_" + (this.row - 1)) + "_") + this.column].intB = 1;
objLevel.grid_mc[(("tile_" + (this.row + 1)) + "_") + this.column].intT = 1;
objLevel.grid_mc[(("tile_" + this.row) + "_") + (this.column - 1)].intR = 1;
objLevel.grid_mc[(("tile_" + this.row) + "_") + (this.column + 1)].intL = 1;
this.swapDepths(19000 + _local6);
this.clear_mc._visible = false;
this.filled_mc._visible = true;
_root.game[_local5]._visible = false;
levelProgress++;
delete this.onEnterFrame;
}
_local6++;
}
};
}
_local10 = _local10 + intTileW;
_local11++;
_local8++;
}
_local10 = 0;
_local14 = _local14 + intTileH;
_local9++;
}
objChar = _local15.attachMovie("char", "char_mc", 30000);
objChar._xscale = 140;
objChar._yscale = objChar._xscale;
objChar.onEnterFrame = moveChar;
var _local18 = arrLevelStart[intLevel][0];
var _local17 = arrLevelStart[intLevel][1];
objChar._x = _local18 * intTileW;
objChar._y = _local17 * intTileH;
objTrail = _local15.createEmptyMovieClip("line", 20000);
objTrail.lineStyle(4, 10027008, 100);
objTrail.moveTo(objChar._x, objChar._y);
intPassX = _local18;
intPassXL = _local18;
intPassY = _local17;
intPassYL = _local17;
}
function moveChar() {
var _local1 = [];
if (Key.isDown(38) && (stillAlive == true)) {
if (objChar._y > 10) {
_local1 = setSpeed(0, -1);
}
} else if (Key.isDown(40) && (stillAlive == true)) {
if (objChar._y < 269) {
_local1 = setSpeed(0, 1);
}
} else if (Key.isDown(37) && (stillAlive == true)) {
if (objChar._x > 10) {
_local1 = setSpeed(-1, 0);
}
} else if (Key.isDown(39) && (stillAlive == true)) {
if (objChar._x < 480) {
_local1 = setSpeed(1, 0);
}
} else {
_local1 = [0, 0];
}
if ((_local1[0] != 0) || (_local1[1] != 0)) {
objChar.inner_mc.play();
objChar._x = objChar._x + _local1[0];
objChar._y = objChar._y + _local1[1];
} else {
objChar.inner_mc.gotoAndStop(1);
}
}
function setSpeed(intDX, intDY) {
var _local6 = intCharS;
var _local4 = intCharS;
if (intDX != 0) {
if ((objChar._y % intTileW) > intTileLW) {
_local6 = 0;
} else {
objChar._y = intTileW * Math.round(objChar._y / intTileW);
}
if (intDX > 0) {
objChar._rotation = 180;
} else {
objChar._rotation = 0;
}
} else if (intDY != 0) {
if ((objChar._x % intTileW) > intTileLW) {
debug.text = "X:" + (objChar._x % intTileW);
_local4 = 0;
} else {
objChar._x = intTileW * Math.round(objChar._x / intTileW);
}
if (intDY > 0) {
objChar._rotation = 270;
} else {
objChar._rotation = 90;
}
}
if ((intDX > 0) || (intDY != 0)) {
var _local5 = Math.floor(objChar._x / intTileW);
var _local3 = Math.floor(objChar._y / intTileH);
if (intPassXL < _local5) {
debug.text = (("X1: Passed " + intPassXL) + "->") + _local5;
objLevel.grid_mc[(("tile_" + _local3) + "_") + intPassXL].intT = 1;
objLevel.grid_mc[(("tile_" + (_local3 - 1)) + "_") + intPassXL].intB = 1;
intPassXL = _local5;
}
}
if ((intDX < 0) || (intDY != 0)) {
var _local5 = Math.ceil(objChar._x / intTileW);
var _local3 = Math.ceil(objChar._y / intTileH);
if (intPassXL > _local5) {
objLevel.grid_mc[(("tile_" + _local3) + "_") + _local5].intT = 1;
objLevel.grid_mc[(("tile_" + (_local3 - 1)) + "_") + _local5].intB = 1;
intPassXL = _local5;
}
}
if ((intDY < 0) || (intDX != 0)) {
var _local5 = Math.ceil(objChar._x / intTileW);
var _local3 = Math.ceil(objChar._y / intTileH);
if (intPassYL > _local3) {
objLevel.grid_mc[(("tile_" + _local3) + "_") + intPassXL].intL = 1;
objLevel.grid_mc[(("tile_" + _local3) + "_") + (intPassXL - 1)].intR = 1;
intPassYL = _local3;
}
}
if ((intDY > 0) || (intDX != 0)) {
var _local5 = Math.floor(objChar._x / intTileW);
var _local3 = Math.floor(objChar._y / intTileH);
if (intPassYL < _local3) {
objLevel.grid_mc[(("tile_" + (_local3 - 1)) + "_") + _local5].intL = 1;
objLevel.grid_mc[(("tile_" + (_local3 - 1)) + "_") + (_local5 - 1)].intR = 1;
intPassYL = _local3;
}
}
objTrail.lineTo(objChar._x, objChar._y);
return([_local6 * intDX, _local4 * intDY]);
}
function turboFunction() {
clearInterval(_global.intTurboInterval);
clearInterval(_global.intEggInterval);
intCharS = 4;
}
function eggFunction() {
clearInterval(_global.intTurboInterval);
clearInterval(_global.intEggInterval);
intCharS = 4;
}
stop();
level2_congrats._visible = false;
lives_display_txt.text = _global.intLives;
clearInterval(intTimerIntvl);
stillAlive = true;
eggs_mc.gotoAndStop(1);
tea_bonus_mc.gotoAndStop(1);
var intMins = 3;
var intSecs = 59;
var strMins = "";
var strSecs = "";
var strTimer = ((("0" + intMins) + ":") + intSecs);
var intTimerIntvl = 0;
var intTTime = 0;
intTimerIntvl = setInterval(updateTimer, 1000);
_global.currentLevel = "level2";
_global.intEggInterval = 0;
_global.intTurboInterval = 0;
var intPoints = 0;
var intPointsT = 0;
var intLevel = 0;
var arrLevel = [];
var arrLevelStart = [];
var objLevel = this.playfield_mc;
var intLevelW = 592;
var intLevelH = 341;
var intTileLW = 70;
var levelComplete = 28;
var levelProgress = 0;
var objChar;
var intCharS = 4;
var objTrail;
var intPassX = 0;
var intPassXL = 0;
var intPassY = 0;
var intPassYL = 0;
var intTileW = 70;
var intTileH = 70;
arrLevel[0] = [];
arrLevel[1] = [[1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]];
arrLevelStart[0] = [];
arrLevelStart[1] = [3, 3];
checkForEndOfLevel = function () {
if (levelProgress == levelComplete) {
var _local2 = 1;
while (_local2 < 10) {
var _local3 = "rat" + _local2;
_root.game[_local3]._visible = false;
_local2++;
}
clearInterval(intTimerIntvl);
level2_congrats._visible = true;
_root.game.playfield_mc.grid_mc.char_mc._x = -600;
}
};
nextLevel();
Object.prototype.getFps = function () {
if (signal == true) {
time = getTimer();
} else {
tempo = int(1000 / (getTimer() - time));
}
signal = !signal;
return(tempo);
};
this.onEnterFrame = function () {
debug.text = getFps();
};
top = function () {
this._x = this._x + speed;
if (this._x > 263) {
this._rotation = 0;
this.onEnterFrame = right;
}
};
right = function () {
this._y = this._y + speed;
if (this._y > 440) {
this._rotation = 90;
this.onEnterFrame = bottom;
}
};
bottom = function () {
this._x = this._x - speed;
if (this._x < 55) {
this._rotation = 180;
this.onEnterFrame = left;
}
};
left = function () {
this._y = this._y - speed;
if (this._y < 165) {
this._rotation = -90;
this.onEnterFrame = top;
}
};
top2 = function () {
this._x = this._x - speed;
if (this._x < 338) {
this._rotation = 0;
this.onEnterFrame = right2;
}
};
right2 = function () {
this._y = this._y + speed;
if (this._y > 440) {
this._rotation = -90;
this.onEnterFrame = bottom2;
}
};
bottom2 = function () {
this._x = this._x + speed;
if (this._x > 540) {
this._rotation = 180;
this.onEnterFrame = left2;
}
};
left2 = function () {
this._y = this._y - speed;
if (this._y < 165) {
this._rotation = 90;
this.onEnterFrame = top2;
}
};
speed = 4;
top3 = function () {
this._x = this._x + speed;
if (this._x > 470) {
this._rotation = 0;
this.onEnterFrame = right3;
}
};
right3 = function () {
this._y = this._y + speed;
if (this._y > 370) {
this._rotation = 90;
this.onEnterFrame = bottom3;
}
};
bottom3 = function () {
this._x = this._x - speed;
if (this._x < 130) {
this._rotation = 180;
this.onEnterFrame = left3;
}
};
left3 = function () {
this._y = this._y - speed;
if (this._y < 240) {
this._rotation = -90;
this.onEnterFrame = top3;
}
};
rat4.onEnterFrame = top3;
rat5.onEnterFrame = top2;
rat3.onEnterFrame = right;
Symbol 308 MovieClip Frame 11
function nextLevel() {
intLevel++;
arrPoint = [];
buildGrid();
}
function buildGrid() {
var _local16 = objLevel.createEmptyMovieClip("grid_mc", 2);
var intR = arrLevel[intLevel].length;
var _local17 = arrLevel[intLevel][0].length;
_local16._x = (intLevelW - (_local17 * intTileW)) / 2;
_local16._y = (intLevelH - (intR * intTileH)) / 2;
var _local11 = 0;
var _local15 = 0;
var _local12 = 0;
var _local10 = 0;
while (_local10 < intR) {
var _local9 = 0;
while (_local9 < _local17) {
if (arrLevel[intLevel][_local10][_local9] == 1) {
var _local3 = _local16.attachMovie("tile", (("tile_" + _local10) + "_") + _local9, _local12, {_x:_local11, _y:_local15});
_local3.filled_mc._visible = false;
_local3.intT = (_local3.intB = (_local3.intL = (_local3.intR = 0)));
_local3.column = _local9;
_local3.row = _local10;
_local3.onEnterFrame = function () {
if ((((this.intT == 1) && (this.intB == 1)) && (this.intL == 1)) && (this.intR == 1)) {
this.clear_mc._visible = false;
this.filled_mc._visible = true;
sndTileComplete.start();
intScore = intScore + 25;
levelProgress++;
trace(levelProgress);
checkForEndOfLevel();
var _local4 = 1;
while (_local4 < 10) {
var _local5 = "rat" + _local4;
if (this.filled_mc.hitTileZone.hitTest(_root.game[_local5])) {
sndRatDeath.start();
intScore = intScore + 300;
_root.game[_local5]._x = -300;
}
var _local3 = 9;
while (_local3 < 10) {
var _local6 = "rat" + _local3;
if (this.filled_mc.hitTileZone.hitTest(_root.game.grid[_local6])) {
_root.game.grid[_local6].removeMovieClip();
_root.game.game.baddies = new Array();
spawnAI = true;
AI_rat_spawn.onEnterFrame = startAiRat;
}
_local3++;
}
_local4++;
}
delete this.onEnterFrame;
}
var _local3 = 1;
while (_local3 < 5) {
var _local7 = "special_bonus_" + _local3;
if (this.hitTest(_root.game[_local7]._x, _root.game[_local7]._y, true) && (_root.game[_local7].hitTest(_root.game.playfield_mc.grid_mc.char_mc))) {
var _local4 = 5;
while (_local4 < 9) {
var _local5 = "rat" + _local4;
if (this.filled_mc.hitTileZone.hitTest(_root.game[_local5])) {
sndRatDeath.start();
intScore = intScore + 300;
_root.game[_local5]._x = -300;
}
_local4++;
}
_local3 = 9;
while (_local3 < 10) {
var _local6 = "rat" + _local3;
if (this.filled_mc.hitTileZone.hitTest(_root.game.grid[_local6])) {
_root.game.grid[_local6].removeMovieClip();
_root.game.game.baddies = new Array();
spawnAI = true;
AI_rat_spawn.onEnterFrame = startAiRat;
}
_local3++;
}
sndGoldernFloat.start();
sndTileComplete.start();
this.intT = 1;
this.intB = 1;
this.intL = 1;
this.intR = 1;
objLevel.grid_mc[(("tile_" + (this.row - 1)) + "_") + this.column].intB = 1;
objLevel.grid_mc[(("tile_" + (this.row + 1)) + "_") + this.column].intT = 1;
objLevel.grid_mc[(("tile_" + this.row) + "_") + (this.column - 1)].intR = 1;
objLevel.grid_mc[(("tile_" + this.row) + "_") + (this.column + 1)].intL = 1;
this.swapDepths(22000 + tileLevelCounter);
tileLevelCounter++;
this.clear_mc._visible = false;
this.filled_mc._visible = true;
_root.game[_local7]._visible = false;
levelProgress++;
delete this.onEnterFrame;
}
_local3++;
}
};
}
_local11 = _local11 + intTileW;
_local12++;
_local9++;
}
_local11 = 0;
_local15 = _local15 + intTileH;
_local10++;
}
objChar = _local16.attachMovie("char", "char_mc", 30000);
objChar.onEnterFrame = moveChar;
var _local19 = arrLevelStart[intLevel][0];
var _local18 = arrLevelStart[intLevel][1];
objChar._x = _local19 * intTileW;
objChar._y = _local18 * intTileH;
objTrail = _local16.createEmptyMovieClip("line", 20000);
objTrail.lineStyle(4, 10027008, 100);
objTrail.moveTo(objChar._x, objChar._y);
intPassX = _local19;
intPassXL = _local19;
intPassY = _local18;
intPassYL = _local18;
}
function moveChar() {
var _local1 = [];
if (Key.isDown(38) && (stillAlive == true)) {
if (objChar._y > 10) {
_local1 = setSpeed(0, -1);
}
} else if (Key.isDown(40) && (stillAlive == true)) {
if (objChar._y < 239) {
_local1 = setSpeed(0, 1);
}
} else if (Key.isDown(37) && (stillAlive == true)) {
if (objChar._x > 10) {
_local1 = setSpeed(-1, 0);
}
} else if (Key.isDown(39) && (stillAlive == true)) {
if (objChar._x < 400) {
_local1 = setSpeed(1, 0);
}
} else {
_local1 = [0, 0];
}
if ((_local1[0] != 0) || (_local1[1] != 0)) {
objChar.inner_mc.play();
objChar._x = objChar._x + _local1[0];
objChar._y = objChar._y + _local1[1];
} else {
objChar.inner_mc.gotoAndStop(1);
}
}
function setSpeed(intDX, intDY) {
var _local6 = intCharS;
var _local4 = intCharS;
if (intDX != 0) {
if ((objChar._y % intTileW) > intTileLW) {
_local6 = 0;
} else {
objChar._y = intTileW * Math.round(objChar._y / intTileW);
}
if (intDX > 0) {
objChar._rotation = 180;
} else {
objChar._rotation = 0;
}
} else if (intDY != 0) {
if ((objChar._x % intTileW) > intTileLW) {
debug.text = "X:" + (objChar._x % intTileW);
_local4 = 0;
} else {
objChar._x = intTileW * Math.round(objChar._x / intTileW);
}
if (intDY > 0) {
objChar._rotation = 270;
} else {
objChar._rotation = 90;
}
}
if ((intDX > 0) || (intDY != 0)) {
var _local5 = Math.floor(objChar._x / intTileW);
var _local3 = Math.floor(objChar._y / intTileH);
if (intPassXL < _local5) {
debug.text = (("X1: Passed " + intPassXL) + "->") + _local5;
objLevel.grid_mc[(("tile_" + _local3) + "_") + intPassXL].intT = 1;
objLevel.grid_mc[(("tile_" + (_local3 - 1)) + "_") + intPassXL].intB = 1;
intPassXL = _local5;
}
}
if ((intDX < 0) || (intDY != 0)) {
var _local5 = Math.ceil(objChar._x / intTileW);
var _local3 = Math.ceil(objChar._y / intTileH);
if (intPassXL > _local5) {
objLevel.grid_mc[(("tile_" + _local3) + "_") + _local5].intT = 1;
objLevel.grid_mc[(("tile_" + (_local3 - 1)) + "_") + _local5].intB = 1;
intPassXL = _local5;
}
}
if ((intDY < 0) || (intDX != 0)) {
var _local5 = Math.ceil(objChar._x / intTileW);
var _local3 = Math.ceil(objChar._y / intTileH);
if (intPassYL > _local3) {
objLevel.grid_mc[(("tile_" + _local3) + "_") + intPassXL].intL = 1;
objLevel.grid_mc[(("tile_" + _local3) + "_") + (intPassXL - 1)].intR = 1;
intPassYL = _local3;
}
}
if ((intDY > 0) || (intDX != 0)) {
var _local5 = Math.floor(objChar._x / intTileW);
var _local3 = Math.floor(objChar._y / intTileH);
if (intPassYL < _local3) {
objLevel.grid_mc[(("tile_" + (_local3 - 1)) + "_") + _local5].intL = 1;
objLevel.grid_mc[(("tile_" + (_local3 - 1)) + "_") + (_local5 - 1)].intR = 1;
intPassYL = _local3;
}
}
objTrail.lineTo(objChar._x, objChar._y);
return([_local6 * intDX, _local4 * intDY]);
}
function turboFunction() {
clearInterval(_global.intTurboInterval);
clearInterval(_global.intEggInterval);
intCharS = 4;
}
function eggFunction() {
clearInterval(_global.intTurboInterval);
clearInterval(_global.intEggInterval);
intCharS = 4;
}
function skillLevelFunction() {
level3_congrats._visible = true;
if (_global.totalScore < 1000) {
_parent.intPromoTier = 3;
_level0.game.level3_congrats.inner_message.gotoAndStop(1);
}
if ((_global.totalScore > 1000) && (_global.totalScore < 6000)) {
_parent.intPromoTier = 2;
_level0.game.level3_congrats.inner_message.gotoAndStop(2);
}
if (_global.totalScore >= 6000) {
_parent.intPromoTier = 1;
_level0.game.level3_congrats.inner_message.gotoAndStop(3);
}
}
stop();
var tileLevelCounter = 10;
level3_congrats._visible = false;
lives_display_txt.text = _global.intLives;
var j = 1;
while (j < 5) {
var nm2 = ("special_bonus_" + j);
_root.game[nm2]._visible = true;
j++;
}
stillAlive = true;
clearInterval(intTimerIntvl);
var spawnAI = false;
eggs_mc.gotoAndStop(1);
tea_bonus_mc.gotoAndStop(1);
var intMins = 4;
var intSecs = 59;
var strMins = "";
var strSecs = "";
var strTimer = ((("0" + intMins) + ":") + intSecs);
var intTimerIntvl = 0;
var intTTime = 0;
intTimerIntvl = setInterval(updateTimer, 1000);
_global.currentLevel = "level3";
_global.intEggInterval = 0;
_global.intTurboInterval = 0;
var intPoints = 0;
var intPointsT = 0;
var intLevel = 0;
var arrLevel = [];
var arrLevelStart = [];
var objLevel = this.playfield_mc;
var intLevelW = 592;
var intLevelH = 341;
var intTileLW = 50;
var levelComplete = 60;
var levelProgress = 0;
var objChar;
var intCharS = 4;
var objTrail;
var intPassX = 0;
var intPassXL = 0;
var intPassY = 0;
var intPassYL = 0;
var intTileW = 41.5;
var intTileH = 41.5;
arrLevel[0] = [];
arrLevel[1] = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1]];
arrLevelStart[0] = [];
arrLevelStart[1] = [3, 3];
checkForEndOfLevel = function () {
if (levelProgress == levelComplete) {
_global.totalScore = intScore;
_root.game.grid.rat9.removeMovieClip();
var _local3 = 1;
while (_local3 < 10) {
var _local4 = "rat" + _local3;
_root.game[_local4]._visible = true;
_local3++;
}
clearInterval(intTimerIntvl);
skillLevelFunction();
_root.game.playfield_mc.grid_mc.char_mc._x = -600;
}
};
nextLevel();
Object.prototype.getFps = function () {
if (signal == true) {
time = getTimer();
} else {
tempo = int(1000 / (getTimer() - time));
}
signal = !signal;
return(tempo);
};
this.onEnterFrame = function () {
debug.text = getFps();
};
top = function () {
this._x = this._x + speed;
if (this._x > 465) {
this._rotation = 0;
this.onEnterFrame = right;
}
};
right = function () {
this._y = this._y + speed;
if (this._y > 380) {
this._rotation = 90;
this.onEnterFrame = bottom;
}
};
bottom = function () {
this._x = this._x - speed;
if (this._x < 140) {
this._rotation = 180;
this.onEnterFrame = left;
}
};
left = function () {
this._y = this._y - speed;
if (this._y < 220) {
this._rotation = -90;
this.onEnterFrame = top;
}
};
top2 = function () {
this._x = this._x - speed;
if (this._x < 95) {
this._rotation = 180;
this.onEnterFrame = right2;
}
};
right2 = function () {
this._y = this._y + speed;
if (this._y > 425) {
this._rotation = 90;
this.onEnterFrame = bottom2;
}
};
bottom2 = function () {
this._x = this._x + speed;
if (this._x > 503) {
this._rotation = 0;
this.onEnterFrame = left2;
}
};
left2 = function () {
this._y = this._y - speed;
if (this._y < 180) {
this._rotation = -90;
this.onEnterFrame = top2;
}
};
top3 = function () {
this._x = this._x + speed3;
if (this._x > 420) {
this._rotation = 0;
this.onEnterFrame = right3;
}
};
right3 = function () {
this._y = this._y + speed3;
if (this._y > 340) {
this._rotation = 90;
this.onEnterFrame = bottom3;
}
};
bottom3 = function () {
this._x = this._x - speed3;
if (this._x < 180) {
this._rotation = 180;
this.onEnterFrame = left3;
}
};
left3 = function () {
this._y = this._y - speed3;
if (this._y < 260) {
this._rotation = -90;
this.onEnterFrame = top3;
}
};
startAiRat = function () {
if (spawnAI == true) {
this._visible = true;
this._x = this._x + speed3;
if (this._x > 90) {
this.visible = false;
addBaddy(1, 1);
this._x = -300;
spawnAI = false;
}
}
};
speed3 = 3;
rat6.onEnterFrame = right;
rat7.onEnterFrame = top2;
rat8.onEnterFrame = top3;
function createGrid() {
var _local2 = 1;
while (_local2 <= game.maxx) {
var _local1 = 1;
while (_local1 <= game.maxy) {
if (_local1 == 1) {
game.tiles[_local2] = [];
}
var _local3 = (("cell" + _local2) + "_") + _local1;
var _local4 = game.path.attachMovie("tile_ai", _local3, ++game.depth);
_local4._x = (_local2 - 1) * game.cellWidth;
_local4._y = (_local1 - 1) * game.cellWidth;
game.tiles[_local2][_local1] = {x:_local2, y:_local2, type:"floor", clip:_local4, empty:true};
_local1++;
}
_local2++;
}
}
function setTempPositions() {
game.char.tempx = game.char.x;
game.char.tempy = game.char.y;
var _local2 = 0;
while (_local2 < game.baddies.length) {
var _local1 = game.baddies[_local2];
_local1.tempx = _local1.x + _local1.xmov;
_local1.tempy = _local1.y + _local1.ymov;
_local2++;
}
}
function placeBaddies() {
var _local2 = 0;
while (_local2 < game.baddies.length) {
var _local1 = game.baddies[_local2];
_local1.x = _local1.tempx;
_local1.y = _local1.tempy;
_local1.clip._x = _local1.x;
_local1.clip._y = _local1.y;
_local2++;
}
}
function captureKeys() {
var _local1 = false;
if (Key.isDown(39)) {
game.char.tempx = game.char.tempx + game.char.speed;
game.char.direction = "right";
game.char.clip.gotoAndStop("right");
_local1 = true;
} else if (Key.isDown(37)) {
game.char.tempx = game.char.tempx - game.char.speed;
game.char.direction = "left";
game.char.clip.gotoAndStop("left");
_local1 = true;
}
if (Key.isDown(40)) {
game.char.tempy = game.char.tempy + game.char.speed;
game.char.clip.gotoAndStop("down");
game.char.direction = "down";
_local1 = true;
} else if (Key.isDown(38)) {
game.char.tempy = game.char.tempy - game.char.speed;
game.char.direction = "up";
game.char.clip.gotoAndStop("up");
_local1 = true;
}
if (!_local1) {
game.char.clip.char.gotoAndStop(1);
} else {
game.char.clip.char.play();
}
}
function filter() {
if ((game.char.tempx + (game.char.width / 2)) > (game.maxx * game.cellWidth)) {
game.char.tempx = (game.maxx * game.cellWidth) - (game.char.width / 2);
} else if ((game.char.tempx - (game.char.width / 2)) < 0) {
game.char.tempx = game.char.width / 2;
}
if ((game.char.tempy + (game.char.width / 2)) > (game.maxy * game.cellWidth)) {
game.char.tempy = (game.maxy * game.cellWidth) - (game.char.width / 2);
} else if ((game.char.tempy - (game.char.width / 2)) < 0) {
game.char.tempy = game.char.width / 2;
}
}
function placeChar() {
game.char.x = game.char.tempx;
game.char.y = game.char.tempy;
game.char.clip._x = game.char.x;
game.char.clip._y = game.char.y;
}
function changeObject(x, y, type) {
var _local1 = game.tiles[x][y];
_local1.type = type;
_local1.empty = false;
_local1.clip.objects.gotoAndStop(type);
}
function addBaddy(x, y) {
x = (x * game.cellWidth) - (game.cellWidth / 2);
y = (y * game.cellWidth) - (game.cellWidth / 2);
var _local5 = 2;
var _local11 = random(4) + 1;
var _local9 = 0;
var _local12 = 0;
var _local6 = 25;
if (_local11 == 1) {
_local9 = _local5;
_local11 = "right";
} else if (_local11 == 2) {
_local12 = _local5;
_local11 = "down";
} else if (_local11 == 3) {
_local9 = -_local5;
_local11 = "left";
} else if (_local11 == 4) {
_local12 = -_local5;
_local11 = "up";
}
var _local1 = "rat" + (game.baddies.length + 9);
var _local3 = game.path.attachMovie("baddy", _local1, ++game.depth);
_local3._x = x;
_local3._y = y;
_local3.gotoAndStop(_local11);
var _local2 = {x:x, y:y, clip:_local3, speed:_local5, dir:_local11, xmov:_local9, ymov:_local12, width:_local6, time:0, maxtime:50};
game.baddies.push(_local2);
}
function detectObstacles() {
var _local2 = Math.ceil(game.char.x / game.cellWidth);
var _local1 = Math.ceil(game.char.y / game.cellWidth);
game.char.cell_x = _local2;
game.char.cell_y = _local1;
var _local6 = game.tiles[_local2][_local1];
var _local4 = Math.ceil(game.char.tempx / game.cellWidth);
var _local5 = Math.ceil(game.char.tempy / game.cellWidth);
var _local3 = game.tiles[_local4][_local5];
if (!_local3.empty) {
game.char.tempx = game.char.x;
game.char.tempy = game.char.y;
}
}
function baddyAI() {
var _local6 = 0;
while (_local6 < game.baddies.length) {
var _local1 = game.baddies[_local6];
_local1.time++;
var _local14 = Math.ceil(_local1.x / game.cellWidth);
var _local12 = Math.ceil(_local1.y / game.cellWidth);
var _local16 = game.tiles[_local14][_local12];
var _local10 = Math.ceil(_local1.tempx / game.cellWidth);
var _local11 = Math.ceil(_local1.tempy / game.cellWidth);
var _local9 = game.tiles[_local10][_local11];
if ((!_local9.empty) || (_local1.time == _local1.maxtime)) {
_local1.time = 0;
_local1.maxtime = 10 + random(30);
_local1.tempx = _local1.x;
_local1.tempy = _local1.y;
var _local15 = _local1.dir;
var _local4 = 0;
var _local5 = 0;
var _local7 = Math.abs(_local1.speed);
var _local2 = (game.char.x - _local1.x) / Math.abs(game.char.x - _local1.x);
var _local3 = (game.char.y - _local1.y) / Math.abs(game.char.y - _local1.y);
if ((_local2 == _local3) || (_local2 == (-_local3))) {
var _local13 = random(2);
if (_local13 == 0) {
_local2 = 0;
} else {
_local3 = 0;
}
}
if (_local2 != 0) {
_local5 = 0;
_local4 = _local2 * _local7;
if (_local4 > 0) {
var _local8 = "right";
} else {
var _local8 = "left";
}
} else if (_local3 != 0) {
_local4 = 0;
_local5 = _local3 * _local7;
if (_local5 > 0) {
var _local8 = "down";
} else {
var _local8 = "up";
}
}
_local1.dir = _local8;
_local1.clip.gotoAndStop(_local8);
_local1.xmov = _local4;
_local1.ymov = _local5;
}
_local6++;
}
}
var game = {};
game.tiles = new Array();
game.path = grid;
game.maxx = 10;
game.maxy = 6;
game.depth = 1000;
game.cellWidth = 41.5;
game.char = new Object();
game.char.startx = 2;
game.char.starty = 2;
game.char.x = (game.cellWidth * game.char.startx) - (game.cellWidth / 2);
game.char.y = (game.cellWidth * game.char.starty) - (game.cellWidth / 2);
game.char.speed = 5;
game.char.width = 20;
game.char.clip = grid.character;
game.char.clip.swapDepths(100000);
game.baddies = new Array();
createGrid();
_root.onEnterFrame = function () {
setTempPositions();
captureKeys();
filter();
baddyAI();
detectObstacles();
placeBaddies();
placeChar();
};
addBaddy(1, 1);
stop();
Symbol 308 MovieClip Frame 17
function resumePlay() {
eggs_mc.gotoAndStop(1);
tea_bonus_mc.gotoAndStop(1);
clearInterval(intlostLife);
gotoAndStop(_global.currentLevel);
}
function displayskillLevelFunction() {
level3_congrats._visible = true;
if (_global.totalScore < 1000) {
_parent.intPromoTier = 3;
_level0.game.level3_congrats.inner_message.gotoAndStop(1);
}
if ((_global.totalScore > 1000) && (_global.totalScore < 6000)) {
_parent.intPromoTier = 2;
_level0.game.level3_congrats.inner_message.gotoAndStop(2);
}
if (_global.totalScore >= 6000) {
_parent.intPromoTier = 1;
_level0.game.level3_congrats.inner_message.gotoAndStop(3);
}
}
stop();
_global.intLives--;
var intlostLife = 0;
intlostLife = setInterval(resumePlay, 3000);
level3_congrats._visible = false;
intScore = Math.round(intScore / 2);
_global.totalScore = intScore;
stillAlive = false;
clearInterval(intTimerIntvl);
_root.game.grid.rat9.removeMovieClip();
if (_global.intLives < 1) {
clearInterval(intlostLife);
trace("gameOver");
displayskillLevelFunction();
}