Frame 1
stop();
Stage.showMenu = false;
this.onEnterFrame = function () {
var _local1 = this;
sofar = _local1.getBytesLoaded();
total = _local1.getBytesTotal();
Bar._width = int((sofar / total) * 100);
if (sofar == total) {
delete _local1.onEnterFrame;
play();
}
};
Frame 25
gotoAndPlay (26);
Frame 27
stop();
Frame 31
stop();
Frame 32
function getNetDebugVersion() {
return(1);
}
function NetDebugConfig() {
}
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]);
}
}
}
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);
}
function getRealDefaultNetDebugConfig() {
var _local1 = new NetDebugConfig();
_local1.m_debug = true;
_local1.client = new 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 NetDebugConfig();
_local1.realtime_server.m_debug = true;
_local1.realtime_server.trace = true;
_local1.app_server = new 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);
}
function NetDebugEvent() {
}
function NetDebugErrorEvent(dataobj) {
var _local1 = this;
_local1.init();
_local1.EventType = "NetDebugError";
_local1.Error = dataobj;
}
function NetDebugTraceEvent(traceobj) {
var _local1 = this;
_local1.init();
_local1.EventType = "Trace";
_local1.Trace = traceobj;
}
function NetDebugTraceNetServicesEvent(w, s, n, m) {
var _local1 = this;
_local1.init();
_local1.EventType = "NetServicesTrace";
_local1.Trace = m;
_local1.Who = w;
_local1.Severity = s;
_local1.Number = n;
}
function NetDebugNCEvent() {
}
function NetDebugResultEvent(resultobj) {
var _local1 = this;
_local1.init();
_local1.EventType = "Result";
_local1.Result = resultobj;
}
function NetDebugStatusEvent(statusobj) {
var _local1 = this;
_local1.init();
_local1.EventType = "Status";
_local1.Status = statusobj;
}
function NetDebugConnectEvent(args) {
var _local1 = this;
var _local2 = args;
_local1.init();
_local1.EventType = "Connect";
_local1.ConnectString = _local2[0];
if (_local2[1] != null) {
_local1.UserName = _local2[1];
}
if (_local2[2] != null) {
_local1.Password = _local2[2];
}
}
function NetDebugCallEvent(args) {
var _local2 = this;
var _local3 = args;
_local2.init();
_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++;
}
}
function NetDebugCloseEvent() {
this.init();
this.EventType = "Close";
}
function NetDebugAddHeaderEvent(args) {
var _local1 = this;
var _local2 = args;
_local1.init();
_local1.EventType = "AddHeader";
_local1.HeaderName = _local2[0];
_local1.MustUnderstand = _local2[1];
if (_local2[2] != null) {
_local1.HeaderObject = _local2[2];
}
}
function NetDebugRtmpLogEvent(infoobj) {
var _local1 = this;
_local1.initDate();
_local1.EventType = "Trace";
_local1.Source = "Flash Communication Server";
_local1.Info = infoobj;
_local1.Trace = infoobj.description;
}
function NetDebugDuplicateNCDErrorEvent() {
var _local1 = this;
_local1.initDate();
_local1.EventType = "Error";
_local1.Source = "NCD";
_local1.Message = "NCD_ALREADY_RUNNING";
}
function NetDebugFailedSendErrorEvent(ev) {
var _local1 = this;
_local1.initDate();
_local1.EventType = "Error";
_local1.Source = "NCD";
_local1.OriginalEvent = ev;
_local1.Message = "NCD_FAILED_TO_SEND_EVENT";
}
function NetDebugInfoErrorEvent(infoobj, mes) {
var _local1 = this;
_local1.initDate();
_local1.EventType = "Error";
_local1.Source = "NCD";
_local1.Info = infoobj;
if (mes != null) {
_local1.Message = mes;
}
}
function NetDebugReceiveCallEvent(mName, args) {
var _local1 = this;
_local1.init();
_local1.EventType = "ReceivedCall";
_local1.MethodName = mName;
_local1.Parameters = args;
}
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.m_Protocol = _local3;
} else {
_local1.m_Protocol = _local2[0].substr(0, 5);
}
} else {
_local1.m_Protocol = "http";
}
_local1.sendClientEvent(new NetDebugConnectEvent(_local2));
if (_local1.isRealTime()) {
_local1.m_ConnectString = _local2[0];
getNetDebug().sendCommand(new StartRTMPTraceCommand(_local2[0]));
var ret = _local1.realconnect.apply(_local1, _local2);
_local1.realcall("@getClientID", new RTMPClientIDResponse(_local2[0], _local1));
return(ret);
}
return(_local1.realconnect.apply(_local1, _local2));
}
function netDebugProxyCall() {
var _local1 = this;
var _local2 = arguments;
_local1.attachDebug();
_local1.sendClientEvent(new NetDebugCallEvent(_local2));
_local1.addNetDebugHeader();
if (_local1.m_Config.app_server) {
_local2[1] = new NetDebugResponseProxy(_local1, _local2[1]);
return(_local1.realcall.apply(_local1, _local2));
}
return(_local1.realcall.apply(_local1, _local2));
}
function netDebugProxyClose() {
var _local1 = this;
_local1.attachDebug();
_local1.sendClientEvent(new NetDebugCloseEvent());
if (_local1.isRealTime()) {
getNetDebug().sendCommand(new StopRTMPTraceCommand(_local1.m_ConnectString, _local1.m_ClientId));
}
var _local2 = _local1.realclose();
getNetDebug().removeNetConnection(_local1);
return(_local2);
}
function netDebugProxyAddHeader() {
var _local1 = this;
_local1.attachDebug();
_local1.sendClientEvent(new NetDebugAddHeaderEvent(arguments));
return(_local1.realaddHeader.apply(_local1, arguments));
}
function RTMPClientIDResponse(cs, nc) {
this.m_ConnectString = cs;
this.m_NC = nc;
}
function NetDebugResponseProxy(source, original) {
this.m_SourceNC = source;
this.m_OriginalNR = original;
}
function GlobalLocalConnection(iscontroller, receiver, domainname) {
var _local2 = this;
var _local3 = _global;
_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 NetDebugDuplicateNCDErrorEvent());
}
}
}
}
}
function LocalCommand() {
}
function UpdateNetDebugConfigCommand(dataobj) {
this.init("updateConfig", dataobj);
}
function GetConfigCommand() {
this.init("getConfig", null);
}
function StartRTMPTraceCommand(cs) {
var _local1 = new Object();
_local1.connectstring = cs;
_local1.url = _root._url;
this.init("startRealTimeTrace", _local1);
}
function AddRTMPClientCommand(cs, cid) {
var _local1 = new Object();
_local1.connectstring = cs;
_local1.url = _root._url;
_local1.clientid = cid;
this.init("addRealTimeClient", _local1);
}
function StopRTMPTraceCommand(cs, cid) {
var _local1 = new Object();
_local1.connectstring = cs;
_local1.url = _root._url;
_local1.clientid = cid;
this.init("stopRealTimeTrace", _local1);
}
function NetDebug() {
var _local1 = this;
_local1.m_ncs = new Array();
_local1.m_Config = getDefaultNetDebugConfig();
_local1.m_glc = new GlobalLocalConnection(false, _local1);
_local1.m_glc.sendCommand(new GetConfigCommand());
_local1.m_NextNewId = 0;
}
function getNetDebug() {
return(_global.netDebugInstance);
}
function inserths_Result(result) {
_root.inserthsresult = result;
}
function initVars() {
pacDir = 3;
pacPos = 0;
if (level >= 4) {
pacX = 16;
pacY = 22;
} else {
pacX = 16;
pacY = 23;
}
nextX = pacX - 1;
nextY = pacY;
nextPacDir = 3;
ghKill = 100;
ghBlue = 0;
numEyes = 0;
Pacman.gotoAndStop(1);
pacStep = 4;
pacPosMax = 2;
pauseCount = 0;
if (newLev || (newGame)) {
newLev = false;
newGame = false;
pillCount = 0;
m = eval ("m" + level);
var i = -1;
while (i < 29) {
Maze.attachMovie("Empty", i, i + 1);
i++;
}
pos = 0;
var j = 0;
while (j < 31) {
var i = 0;
while (i < 28) {
Maze[i][j] = m.charAt(pos++);
pill = false;
if (Maze[i][j] == ".") {
pill = true;
Maze[i].attachMovie("Pill", "P" + j, pos);
}
if (Maze[i][j] == "O") {
pill = true;
Maze[i].attachMovie("Power", "P" + j, pos);
}
if (pill) {
pillCount++;
with (Maze[i]["P" + j]) {
_x = OFFX + (12 * i);
_y = OFFY + (12 * j);
}
}
i++;
}
j++;
}
}
with (Pacman) {
_x = OFFX + (12 * pacX);
_y = OFFY + (12 * pacY);
}
tellTarget (Ghost[1]) {
ghPos = 1;
ghOldDir = -1;
ghDir = 3;
ghX = 13;
ghY = 11;
ghNX = ghX - 1;
_y = (_root.OFFY + 132);
};
tellTarget (Ghost[2]) {
ghOldDir = -1;
ghDir = 0;
ghX = 13;
};
tellTarget (Ghost[3]) {
ghOldDir = -1;
ghDir = 2;
ghX = 11;
};
tellTarget (Ghost[4]) {
ghOldDir = -1;
ghDir = 2;
ghX = 15;
};
g = 1;
while (g < 5) {
tellTarget (Ghost[g]) {
if (this.g > 1) {
ghPos = 0;
ghY = 14;
ghNX = ghX;
_y = (_root.OFFY + 174);
}
_x = ((_root.OFFX + (12 * ghX)) + 6);
gotoAndStop (1);
gNum = 0;
ghNY = ghY;
ghStep = 4;
ghPosMax = 2;
ghFast = true;
ghBlinking = false;
ShapeVisible = true;
ShapeHitVisible = true;
};
g++;
}
}
function setPacMove(d, lastDir) {
var _local1 = d;
var _local2 = lastDir;
if (_local1 == 0) {
nextX = pacX;
nextY = pacY - 1;
if (_local1 != _local2) {
if (ghBlue == 0) {
Pacman.gotoAndPlay("up");
} else {
Pacman.gotoAndPlay("angryup");
}
}
} else if (_local1 == 1) {
nextX = pacX + 1;
nextY = pacY;
if (_local1 != _local2) {
Pacman._xscale = -100;
if (ghBlue == 0) {
Pacman.gotoAndPlay("run");
} else {
Pacman.gotoAndPlay("angryrun");
}
}
} else if (_local1 == 2) {
nextX = pacX;
nextY = pacY + 1;
if (_local1 != _local2) {
if (ghBlue == 0) {
Pacman.gotoAndPlay("down");
} else {
Pacman.gotoAndPlay("angrydown");
}
}
} else if (_local1 == 3) {
nextX = pacX - 1;
nextY = pacY;
if (_local1 != _local2) {
Pacman._xscale = 100;
if (ghBlue == 0) {
Pacman.gotoAndPlay("run");
} else {
Pacman.gotoAndPlay("angryrun");
}
}
}
}
function setGhMove(d, g) {
with (Ghost[g]) {
if (d == 0) {
ghNX = ghX;
ghNY = ghY - 1;
} else if (d == 1) {
ghNX = ghX + 1;
ghNY = ghY;
} else if (d == 2) {
ghNX = ghX;
ghNY = ghY + 1;
} else if (d == 3) {
ghNX = ghX - 1;
ghNY = ghY;
}
}
}
function startBGSnd() {
var _local1 = _root;
tellTarget ("BGSnd") {
if (_local1.ghBlue > 2) {
if (_local1.numEyes) {
_local1.BGM.gotoAndPlay("loop");
} else {
_local1.BGM.gotoAndPlay("loopFast");
}
}
};
}
_global.RsDataProviderClass = function () {
this.init();
};
RsDataProviderClass.prototype.init = function () {
var _local1 = this;
_local1.items = new Array();
_local1.uniqueID = 0;
_local1.views = new Array();
mx.events.EventDispatcher.initialize(_local1);
};
RsDataProviderClass.prototype.addView = function (viewRef) {
this.views.push(viewRef);
var _local1 = {eventName:"updateAll"};
viewRef.modelChanged(_local1);
};
RsDataProviderClass.prototype.addItemAt = function (index, value) {
var _local1 = index;
var _local2 = this;
if (!_local2.checkLocal()) {
} else if (_local1 < 0) {
} else {
if (_local1 < _local2.length) {
_local2.items.splice(_local1, 0, "tmp");
}
_local2.items[_local1] = new Object();
if (typeof(value) == "object") {
_local2.items[_local1] = value;
}
_local2.items[_local1].__ID__ = _local2.uniqueID++;
var _local3 = {eventName:"addItems", firstItem:_local1, lastItem:_local1};
_local2.updateViews(_local3);
}
};
RsDataProviderClass.prototype.addItem = function (value) {
var _local1 = this;
if (!_local1.checkLocal()) {
} else {
_local1.addItemAt(_local1.length, value);
}
};
RsDataProviderClass.prototype.removeItemAt = function (index) {
var _local1 = index;
var _local2 = this;
if (!_local2.checkLocal()) {
} else if ((_local1 < 0) || (_local1 >= _local2.length)) {
} else {
var tmpItm = _local2.items[_local1];
_local2.items.splice(_local1, 1);
var _local3 = {eventName:"deleteItems", firstItem:_local1, lastItem:_local1};
_local2.updateViews(_local3);
return(tmpItm);
}
return(undefined);
};
RsDataProviderClass.prototype.removeAll = function () {
var _local1 = this;
if (!_local1.checkLocal()) {
} else {
_local1.items = new Array();
_local1.updateViews({eventName:"removeItems", firstItem:0, lastItem:_local1.length - 1});
}
};
RsDataProviderClass.prototype.replaceItemAt = function (index, itemObj) {
var _local1 = index;
var _local2 = this;
if (!_local2.checkLocal()) {
} else if ((_local1 < 0) || (_local1 >= _local2.length)) {
} else {
var _local3 = _local2.getItemID(_local1);
_local2.items[_local1] = itemObj;
_local2.items[_local1].__ID__ = _local3;
_local2.updateViews({eventName:"updateItems", firstItem:_local1, lastItem:_local1});
}
};
RsDataProviderClass.prototype.getLength = function () {
return(this.items.length);
};
RsDataProviderClass.prototype.addProperty("length", RsDataProviderClass.prototype.getLength, null);
RsDataProviderClass.prototype.getItemAt = function (index) {
return(this.items[index]);
};
RsDataProviderClass.prototype.getItemID = function (index) {
return(this.items[index].__ID__);
};
RsDataProviderClass.prototype.sortItems = function (compareFunc, order) {
var _local1 = this;
if (!_local1.checkLocal()) {
} else {
_local1.items.sort(compareFunc);
if (order == "DESC") {
_local1.items.reverse();
}
_local1.updateViews({eventName:"sort"});
}
};
RsDataProviderClass.prototype.sortItemsBy = function (fieldName, order) {
var _local1 = this;
if (!_local1.checkLocal()) {
} else {
_local1.items.sortOn(fieldName);
if (order == "DESC") {
_local1.items.reverse();
}
_local1.updateViews({eventName:"sort", fieldName:fieldName, order:order});
}
};
RsDataProviderClass.prototype.updateViews = function (eventObj) {
var _local2 = eventObj;
_local2.type = "modelChanged";
this.dispatchEvent(_local2);
var _local3 = this.views.length;
if (_local3 > 0) {
switch (_local2.eventName) {
case "addItems" :
_local2.event = "addRows";
break;
case "updateItems" :
_local2.event = "updateRows";
break;
case "removeItems" :
_local2.event = "deleteRows";
}
_local2.firstRow = _local2.firstItem;
_local2.lastRow = _local2.lastItem;
var _local1 = 0;
while (_local1 < _local3) {
this.views[_local1].modelChanged(_local2);
_local1++;
}
}
};
_global.RecordSet = function (columnNames) {
var _local1 = this;
if (_local1.mTitles != null) {
_local1.views = new Array();
} else {
_local1.init();
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) {
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 {
NetServices.trace("RecordSet", "warning", 102, "Missing some records, but there's no RecordSet id");
}
}
_local1.serverinfo = null;
}
}
};
RecordSet.prototype = new RsDataProviderClass();
Object.registerClass("RecordSet", RecordSet);
RecordSet.prototype._setParentService = function (service) {
this.gateway_conn = service.nc;
};
RecordSet.prototype.getRecordSetService = function () {
var _local1 = this;
if (_local1.mRecordSetService == null) {
if (_local1.gateway_conn == null) {
_local1.gateway_conn = 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) {
NetServices.trace("RecordSet", "warning", 101, "Failed to create RecordSet service");
_local1.mRecordSetService = 0;
}
}
return(_local1.mRecordSetService);
};
RecordSet.prototype.getColumnNames = function () {
return(this.mTitles);
};
RecordSet.prototype.getLength = function () {
var _local1 = this;
if (_local1.mRecordSetID != null) {
return(_local1.mTotalCount);
}
return(_local1.items.length);
};
RecordSet.prototype.addProperty("length", RecordSet.prototype.getLength, null);
RecordSet.prototype.getItemAt = function (index) {
var _local1 = index;
var _local2 = this;
if ((_local1 < 0) || (_local1 >= _local2.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);
};
RecordSet.prototype.setField = function (index, fieldName, value) {
var _local1 = index;
var _local2 = this;
if (!_local2.checkLocal()) {
} else if ((_local1 < 0) || (_local1 >= _local2.length)) {
} else {
_local2.items[_local1][fieldName] = value;
_local2.updateViews({eventName:"updateItems", firstItem:_local1, lastItem:_local1});
}
};
RecordSet.prototype.filter = function (filterFunction, context) {
if (!this.checkLocal()) {
} else {
var _local3 = new RecordSet(this.mTitles);
var rcount = this.length;
var _local2 = 0;
while (_local2 < rcount) {
var _local1 = this.getItemAt(_local2);
if (((_local1 != null) && (_local1 != 1)) && (filterFunction(_local1, context))) {
_local3.addItem(_local1);
}
_local2++;
}
return(_local3);
}
return(undefined);
};
RecordSet.prototype.sort = function (compareFunc) {
var _local1 = this;
if (!_local1.checkLocal()) {
} else {
_local1.items.sort(compareFunc);
_local1.updateViews({eventName:"sort"});
}
};
RecordSet.prototype.isLocal = function () {
return(this.mRecordSetID == null);
};
RecordSet.prototype.isFullyPopulated = function () {
return(this.isLocal());
};
RecordSet.prototype.getNumberAvailable = function () {
var _local1 = this;
if (_local1.isLocal()) {
return(_local1.length);
}
return(_local1.mRecordsAvailable);
};
RecordSet.prototype.setDeliveryMode = function (mode, pagesize, numPrefetchPages) {
var _local1 = this;
var _local2 = pagesize;
var _local3 = mode;
_local1.mDeliveryMode = _local3;
_local1.stopFetchAll();
if (_local3 == "ondemand") {
} else {
if (_local2 == null) {
_local2 = _local1.views[0].getRowCount();
if (_local2 == null) {
_local2 = 25;
}
}
if (_local3 == "page") {
if (numPrefetchPages == null) {
numPrefetchPages = 0;
}
_local1.mPageSize = _local2;
_local1.mNumPrefetchPages = numPrefetchPages;
} else if (_local3 == "fetchall") {
_local1.stopFetchAll();
_local1.startFetchAll(_local2);
} else {
NetServices.trace("RecordSet", "warning", 107, "SetDeliveryMode: unknown mode string");
}
}
};
RecordSet.prototype.getRecords_Result = function (info) {
var _local1 = this;
var _local2 = info;
_local1.setData(_local2.Cursor - 1, _local2.Page);
_local1.mOutstandingRecordCount = _local1.mOutstandingRecordCount - _local2.Page.length;
_local1.updateViews({eventName:"updateItems", firstItem:_local2.Cursor - 1, lastItem:((_local2.Cursor - 1) + _local2.Page.length) - 1});
if ((_local1.mRecordsAvailable == _local1.mTotalCount) && (!_local1.mAllNotified)) {
_local1.updateViews({eventName:"allRows"});
_local1.mRecordSetService.release();
_local1.mAllNotified = true;
_local1.mRecordSetID = null;
_local1.mRecordSetService = null;
}
};
RecordSet.prototype.release_Result = function () {
};
RecordSet.prototype.arrayToObject = function (anArray) {
if (this.mTitles == null) {
NetServices.trace("RecordSet", "warning", 105, "getItem: titles are not available");
return(null);
}
var _local3 = new Object();
var alen = anArray.length;
var _local1 = 0;
while (_local1 < alen) {
var _local2 = this.mTitles[_local1];
if (_local2 == null) {
_local2 = ("column" + _local1) + 1;
}
_local3[_local2] = anArray[_local1];
_local1++;
}
return(_local3);
};
RecordSet.prototype.setData = function (start, dataArray) {
var _local1 = this;
var datalen = dataArray.length;
var _local2 = 0;
while (_local2 < datalen) {
var _local3 = _local2 + start;
var rec = _local1.items[_local3];
if ((rec != null) && (rec != 1)) {
NetServices.trace("RecordSet", "warning", 106, "Already got record # " + recordIndex);
} else {
_local1.mRecordsAvailable = _local1.mRecordsAvailable + 1;
}
_local1.items[_local3] = _local1.arrayToObject(dataArray[_local2]);
_local1.items[_local3].__ID__ = _local1.uniqueID++;
_local2++;
}
};
RecordSet.prototype.requestOneRecord = function (index) {
var _local1 = this;
var _local2 = index;
if (_local1.items[_local2] == null) {
_local1.getRecordSetService().getRecords(_local1.mRecordSetID, _local2 + 1, 1);
_local1.mOutstandingRecordCount++;
_local1.items[_local2] = 1;
_local1.updateViews({eventName:"fetchRows", firstItem:_local2, lastItem:_local2});
}
};
RecordSet.prototype.requestRecord = function (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.requestRecordRange(_local2, _local3);
}
};
RecordSet.prototype.requestRecordRange = function (index, lastIndex) {
var _local1 = index;
var _local2 = this;
var highestRequested = -1;
if (_local1 < 0) {
_local1 = 0;
}
if (lastIndex >= _local2.length) {
lastIndex = _local2.length - 1;
}
while (_local1 <= lastIndex) {
while ((_local1 <= lastIndex) && (_local2.items[_local1] != null)) {
_local1++;
}
var _local3 = _local1;
while ((_local1 <= lastIndex) && (_local2.items[_local1] == null)) {
_local2.mOutstandingRecordCount++;
_local2.items[_local1] = 1;
_local1++;
}
var last = (_local1 - 1);
if (_local3 <= last) {
_local2.getRecordSetService().getRecords(_local2.mRecordSetID, _local3 + 1, (last - _local3) + 1);
highestRequested = last;
_local2.updateViews({eventName:"fetchRows", firstItem:_local3, lastItem:last});
}
}
return(highestRequested);
};
RecordSet.prototype.startFetchAll = function (pagesize) {
var _local1 = this;
_local1.mDataFetcher.disable();
_local1.mDataFetcher = new RsDataFetcher(_local1, pagesize);
};
RecordSet.prototype.stopFetchAll = function () {
this.mDataFetcher.disable();
this.mDataFetcher = null;
};
RecordSet.prototype.checkLocal = function () {
if (this.isLocal()) {
return(true);
}
NetServices.trace("RecordSet", "warning", 108, "Operation not allowed on partial recordset");
return(false);
};
_global.RsDataFetcher = function (recordSet, increment) {
var _local1 = this;
_local1.mRecordSet = recordSet;
_local1.mRecordSet.addView(_local1);
_local1.mIncrement = increment;
_local1.mNextRecord = 0;
_local1.mEnabled = true;
_local1.doNext();
};
RsDataFetcher.prototype.disable = function () {
var _local1 = this;
_local1.mEnabled = false;
_local1.mRecordSet.removeView(_local1);
};
RsDataFetcher.prototype.doNext = function () {
var _local1 = this;
if (!_local1.mEnabled) {
} else {
do {
if (_local1.mNextRecord >= _local1.mRecordSet.length) {
return;
}
_local1.mHighestRequested = _local1.mRecordSet.requestRecordRange(_local1.mNextRecord, (_local1.mNextRecord + _local1.mIncrement) - 1);
_local1.mNextRecord = _local1.mNextRecord + _local1.mIncrement;
} while (_local1.mHighestRequested <= 0);
}
};
RsDataFetcher.prototype.modelChanged = function (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();
}
};
_global.NetServiceProxyResponder = function (service, methodName) {
this.service = service;
this.methodName = methodName;
};
NetServiceProxyResponder.prototype.onResult = function (result) {
var _local3 = result;
var _local1 = this.service.client;
_local3._setParentService(this.service);
var _local2 = this.methodName + "_Result";
if (typeof(_local1[_local2]) == "function") {
_local1[_local2](_local3);
} else if (typeof(_local1.onResult) == "function") {
_local1.onResult(_local3);
} else {
NetServices.trace("NetServices", "info", 1, (_local2 + " was received from server: ") + _local3);
}
};
NetServiceProxyResponder.prototype.onStatus = function (result) {
var _local1 = result;
var _local2 = this.service.client;
var _local3 = this.methodName + "_Status";
if (typeof(_local2[_local3]) == "function") {
_local2[_local3](_local1);
} else if (typeof(_local2.onStatus) == "function") {
_local2.onStatus(_local1);
} else if (typeof(_root.onStatus) == "function") {
_root.onStatus(_local1);
} else if (typeof(_global.System.onStatus) == "function") {
_global.System.onStatus(_local1);
} else {
NetServices.trace("NetServices", "info", 2, (((_local3 + " was received from server: <") + _local1.level) + "> ") + _local1.description);
}
};
_global.NetServiceProxy = function (nc, serviceName, client) {
var _local1 = this;
if (nc != null) {
_local1.nc = nc;
_local1.serviceName = serviceName;
_local1.client = client;
}
};
NetServiceProxy.prototype._setParentService = function (service) {
this.nc = service.nc;
this.client = service.client;
};
NetServiceProxy.prototype.__resolve = function (methodName) {
var _local1 = this;
var _local2 = arguments;
var _local3 = function () {
var _local1 = this;
var _local2 = arguments;
if (_local1.client != null) {
_local2.unshift(new NetServiceProxyResponder(_local1, methodName));
} else if (typeof(_local2[0].onResult) != "function") {
NetServices.trace("NetServices", "warning", 3, "There is no defaultResponder, but no responder was given in call to " + methodName);
_local2.unshift(new NetServiceProxyResponder(_local1, methodName));
}
_local2.unshift((_local1.serviceName + ".") + methodName);
return(_local1.nc.call.apply(_local1.nc, _local2));
};
return(_local3);
};
Object.registerClass("NetServiceProxy", NetServiceProxy);
NetConnection.prototype.getService = function (serviceName, client) {
var _local1 = new NetServiceProxy(this, serviceName, client);
return(_local1);
};
NetConnection.prototype.setCredentials = function (userid, password) {
this.addHeader("Credentials", false, {userid:userid, password:password});
};
NetConnection.prototype.RequestPersistentHeader = function (info) {
var _local1 = info;
this.addHeader(_local1.name, _local1.mustUnderstand, _local1.data);
};
NetConnection.prototype.AppendToGatewayUrl = function (urlSuffix) {
var _local1 = this;
_local1.__urlSuffix = urlSuffix;
if (_local1.__originalUrl == null) {
_local1.__originalUrl = _local1.uri;
}
var _local2 = _local1.__originalUrl + urlSuffix;
_local1.connect(_local2);
};
NetConnection.prototype.ReplaceGatewayUrl = function (newUrl) {
this.connect(newUrl);
};
NetConnection.prototype.clone = function () {
var _local1 = new NetConnection();
_local1.connect(this.uri);
return(_local1);
};
if (_global.NetServices == null) {
_global.NetServices = new Object();
NetServices.gatewayUrl = gatewayUrl;
}
NetServices.setDefaultGatewayUrl = function (url) {
NetServices.defaultGatewayUrl = url;
};
NetServices.setGatewayUrl = function (url) {
NetServices.gatewayUrl = url;
};
NetServices.createGatewayConnection = function (url) {
var _local1 = url;
if (_local1 == undefined) {
_local1 = NetServices.gatewayUrl;
if (_local1 == undefined) {
_local1 = NetServices.defaultGatewayUrl;
}
}
if (_local1 == undefined) {
NetServices.trace("NetServices", "warning", 4, "createGatewayConnection - gateway url is undefined");
return(null);
}
var _local2 = new NetConnection();
_local2.connect(_local1);
return(_local2);
};
NetServices.getHostUrl = function () {
var _local2 = _root;
if (!NetServices.isHttpUrl(_local2._url)) {
return(null);
}
var _local1 = _local2._url.indexOf("/", 8);
if (_local1 < 0) {
return(null);
}
return(_local2._url.substring(0, _local1));
};
NetServices.isHttpUrl = function (url) {
return((url.indexOf("http://") == 0) || (url.indexOf("https://") == 0));
};
NetServices.trace = function (who, severity, number, message) {
var _local1 = (((((who + " ") + severity) + " ") + number) + ": ") + message;
NetDebug.traceNetServices(who, severity, number, message);
};
NetServices.getVersion = function () {
return(1);
};
_global.copyProperties = function (to, from) {
var _local1 = from;
var _local2 = to;
for (var _local3 in _local1) {
if ((_local3 == "__proto__") || (_local3 == "function")) {
continue;
}
if (typeof(_local1[_local3]) == "object") {
if (_local2[_local3] == undefined) {
_local2[_local3] = new _local1[_local3].__proto__.constructor();
}
copyProperties(_local2[_local3], _local1[_local3]);
} else {
_local2[_local3] = _local1[_local3];
}
}
};
_global.copyObject = function (obj) {
var _local2 = obj;
if (typeof(_local2) == "object") {
var _local1 = new _local2.__proto__.constructor();
copyProperties(_local1, _local2);
return(_local1);
}
return(_local2);
};
_global.objectToStringTree = function (obj, openstr, typesepstr, valuesepstr, closestr) {
var _local1 = new StringLineAdder(obj, new TreeLineRenderer(((openstr == null) ? "{" : (openstr)), ((typesepstr == null) ? ":" : (typesepstr)), ((valuesepstr == null) ? ", " : (valuesepstr)), ((closestr == null) ? "}" : (closestr))));
return(_local1.getString());
};
_global.objectToListboxTree = function (listbox, obj, openstr, typesepstr, valuesepstr, closestr) {
new ListLineAdder(listbox, obj, new TreeLineRenderer(((openstr == null) ? "{" : (openstr)), ((typesepstr == null) ? ":" : (typesepstr)), ((valuesepstr == null) ? ", " : (valuesepstr)), ((closestr == null) ? "}" : (closestr))));
};
_global.StringLineAdder = function (obj, renderer) {
var _local1 = this;
_local1.linerenderer = renderer;
_local1.output = "";
nestedObjectDump(0, null, obj, _local1);
};
StringLineAdder.prototype.getString = function () {
return(this.output);
};
StringLineAdder.prototype.addLine = function (level, objname, objtype, objvalue, objnum) {
var _local1 = this.linerenderer.getLine(level, objname, objtype, objvalue, objnum);
if (_local1 != null) {
this.output = this.output + (_local1 + newline);
}
return(true);
};
_global.ListLineAdder = function (listbox, obj, renderer) {
var _local1 = this;
_local1.linerenderer = renderer;
_local1.output_lb = listbox;
nestedObjectDump(0, null, obj, _local1);
};
ListLineAdder.prototype.addLine = function (level, objname, objtype, objvalue, objnum) {
var _local1 = this.linerenderer.getLine(level, objname, objtype, objvalue, objnum);
if (_local1 != null) {
this.output_lb.addItem(_local1);
}
return(true);
};
_global.TreeLineRenderer = function (pre, typedelim, valuedelim, post) {
this.init(pre, typedelim, valuedelim, post);
};
TreeLineRenderer.prototype.init = function (pre, typedelim, valuedelim, post) {
var _local1 = this;
_local1.prechar = pre;
_local1.typechar = typedelim;
_local1.valuechar = valuedelim;
_local1.postchar = post;
};
TreeLineRenderer.prototype.getLine = function (level, objname, objtype, objvalue, objnum) {
var _local3 = this;
var _local2 = "";
var _local1 = 0;
while (_local1 < level) {
_local2 = _local2 + "\t";
_local1++;
}
var valuedelim = _local3.valuechar;
if ((objname != null) && (objtype != "object")) {
_local2 = _local2 + (((_local3.prechar + objtype) + _local3.typechar) + objname);
} else if (objtype == "object") {
if (typeof(objvalue) == "number") {
_local2 = _local2 + (((_local3.prechar + objtype) + _local3.typechar) + objname);
_local2 = _local2 + ((valuedelim + "object#") + objvalue);
objvalue = null;
} else {
_local2 = _local2 + (((((_local3.prechar + objtype) + "#") + objnum) + _local3.typechar) + objname);
}
} else {
_local2 = _local2 + (_local3.prechar + objtype);
valuedelim = _local3.typechar;
}
if (objvalue != null) {
_local2 = _local2 + (valuedelim + objvalue);
}
_local2 = _local2 + _local3.postchar;
return(_local2);
};
_global.nestedObjectDump = function (level, objname, obj, lineadder) {
var _local1 = obj;
if (level == 0) {
nestedObjectDump.callcount++;
nestedObjectDump.objcount = -1;
}
if (_local1 == null) {
return(lineadder.addLine(level, objname, "undefined"));
}
if (typeof(_local1) == "function") {
return(lineadder.addLine(level, objname, "function"));
}
if (typeof(_local1) == "object") {
if ((_local1.__nestedObjectDump_id != undefined) && (_local1.__nestedObjectDump_ref == nestedObjectDump.callcount)) {
return(lineadder.addLine(level, objname, "object", _local1.__nestedObjectDump_id));
}
nestedObjectDump.objcount++;
if (lineadder.addLine(level, objname, "object", null, nestedObjectDump.objcount) == nestedObjectDump.skip) {
return(nestedObjectDump.proceed);
}
_local1.__nestedObjectDump_id = nestedObjectDump.objcount;
_local1.__nestedObjectDump_ref = nestedObjectDump.callcount;
var props = new Array();
var _local3 = new Array();
for (var prop in _local1) {
if (((prop == "__proto__") || (prop == "__nestedObjectDump_id")) || (prop == "__nestedObjectDump_ref")) {
continue;
}
if (typeof(_local1[prop]) == "object") {
_local3.push(prop);
} else {
props.push(prop);
}
}
if ((_local3.length == 0) && (props.length == 0)) {
if ((typeof(_local1.toString) == "function") && (_local1.toString() != "")) {
return(lineadder.addLine(level + 1, null, "string", _local1.toString()));
}
if (lineadder.noProps != undefined) {
lineadder.noProps(level + 1);
return(nestedObjectDump.proceed);
}
}
props.sort();
_local3.sort();
var bret = true;
var plen = props.length;
var _local2 = 0;
while (_local2 < plen) {
if (nestedObjectDump(level + 1, props[_local2], _local1[props[_local2]], lineadder) == nestedObjectDump.stop) {
bret = false;
break;
}
_local2++;
}
if (bret) {
var olen = _local3.length;
_local2 = 0;
while (_local2 < olen) {
if (!nestedObjectDump(level + 1, _local3[_local2], _local1[_local3[_local2]], lineadder)) {
bret = false;
}
_local2++;
}
}
return(nestedObjectDump.proceed);
}
return(lineadder.addLine(level, objname, typeof(_local1), _local1));
};
nestedObjectDump.proceed = 1;
nestedObjectDump.skip = 2;
nestedObjectDump.stop = 3;
nestedObjectDump.callcount = 0;
nestedObjectDump.objcount = 0;
Object.registerClass("NetDebugConfig", NetDebugConfig);
NetDebugEvent.prototype.init = function () {
var _local1 = this;
_local1.EventType = "DebugEvent";
_local1.Source = "Client";
_local1.MovieUrl = unescape(_root._url);
_local1.initDate();
};
NetDebugEvent.prototype.initDate = function () {
var _local1 = new Date();
this.Date = _local1;
this.Time = _local1.getTime();
};
NetDebugErrorEvent.prototype = new NetDebugEvent();
NetDebugTraceEvent.prototype = new NetDebugEvent();
NetDebugTraceNetServicesEvent.prototype = new NetDebugEvent();
NetDebugNCEvent.prototype = new NetDebugEvent();
NetDebugResultEvent.prototype = new NetDebugNCEvent();
NetDebugStatusEvent.prototype = new NetDebugNCEvent();
NetDebugConnectEvent.prototype = new NetDebugNCEvent();
NetDebugCallEvent.prototype = new NetDebugNCEvent();
NetDebugCloseEvent.prototype = new NetDebugNCEvent();
NetDebugAddHeaderEvent.prototype = new NetDebugNCEvent();
NetDebugRtmpLogEvent.prototype = new NetDebugNCEvent();
NetDebugDuplicateNCDErrorEvent.prototype = new NetDebugNCEvent();
NetDebugFailedSendErrorEvent.prototype = new NetDebugNCEvent();
NetDebugInfoErrorEvent.prototype = new NetDebugNCEvent();
NetDebugResultEvent.prototype = new NetDebugNCEvent();
_global.StripNCDEventToMinmal = function (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);
};
NetConnection.prototype.attachDebug = function () {
var _local1 = this;
if (!_local1.m_Attached) {
_local1.m_Attached = true;
_local1.m_HeaderAdded = false;
_local1.m_Config = new NetDebugConfig();
copyProperties(_local1.m_Config, getNetDebug().m_Config);
_local1.m_Protocol = "none";
_local1.m_Id = getNetDebug().addNetConnection(_local1);
}
};
NetConnection.prototype.sendDebugEvent = function (eventobj) {
var _local1 = eventobj;
_local1.Protocol = this.m_Protocol;
_local1.DebugId = this.m_Id;
return(getNetDebug().onEvent(_local1));
};
NetConnection.prototype.sendServerEvent = function (eventobj) {
eventobj.MovieUrl = unescape(_root._url);
if (!this.sendDebugEvent(eventobj)) {
}
};
NetConnection.prototype.sendClientEvent = function (eventobj) {
var _local1 = this;
if (_local1.m_Config.m_debug && (_local1.m_Config.client.m_debug)) {
if ((_local1.m_Config.client.http && (_local1.m_Protocol == "http")) || (_local1.m_Config.client.rtmp && (_local1.m_Protocol.substr(0, 4) == "rtmp"))) {
if (!_local1.sendDebugEvent(eventobj)) {
}
}
}
};
NetConnection.prototype.addNetDebugHeader = function () {
var _local1 = this;
if (!_local1.m_HeaderAdded) {
_local1.m_HeaderAdded = true;
if ((_local1.m_Config.m_debug && (_local1.m_Config.app_server.m_debug)) && (_local1.m_Protocol == "http")) {
_local1.realaddHeader("amf_server_debug", true, _local1.m_Config.app_server);
} else {
_local1.realaddHeader("amf_server_debug", true, undefined);
}
}
};
NetConnection.prototype.updateConfig = function (config) {
var _local1 = this;
_local1.attachDebug();
copyProperties(_local1.m_Config, config);
_local1.m_HeaderAdded = false;
};
NetConnection.prototype.isRealTime = function () {
return(this.m_Protocol.substr(0, 4) == "rtmp");
};
NetConnection.prototype.setupRecordset = function () {
var _local1 = this;
_local1.attachDebug();
_local1.m_Config.client.http = _local1.m_Config.client.recordset;
};
NetConnection.prototype.setDebugId = function (id) {
this.attachDebug();
this.m_Id = id;
};
NetConnection.prototype.getDebugId = function () {
this.attachDebug();
return(this.m_Id);
};
NetConnection.prototype.trace = function (traceobj) {
var _local1 = this;
_local1.attachDebug();
if ((_local1.m_Config.m_debug && (_local1.m_Config.client.m_debug)) && (_local1.m_Config.client.trace)) {
_local1.sendDebugEvent(new NetDebugTraceEvent(traceobj));
}
};
NetConnection.prototype.getDebugConfig = function () {
this.attachDebug();
return(this.m_Config);
};
if (!NetConnection.prototype.netDebugProxyFunctions) {
NetConnection.prototype.netDebugProxyFunctions = true;
NetConnection.prototype.realconnect = NetConnection.prototype.connect;
NetConnection.prototype.realcall = NetConnection.prototype.call;
NetConnection.prototype.realclose = NetConnection.prototype.close;
NetConnection.prototype.realaddHeader = NetConnection.prototype.addHeader;
NetConnection.prototype.connect = netDebugProxyConnect;
NetConnection.prototype.call = netDebugProxyCall;
NetConnection.prototype.close = netDebugProxyClose;
NetConnection.prototype.addHeader = netDebugProxyAddHeader;
}
RTMPClientIDResponse.prototype.onResult = function (cid) {
this.m_NC.m_ClientId = cid;
getNetDebug().sendCommand(new AddRTMPClientCommand(this.m_ConnectString, cid));
};
NetDebugResponseProxy.prototype.onDebugEvents = function (debugevents) {
var _local3 = debugevents;
var _local2 = _local3.length;
var _local1 = 0;
while (_local1 < _local2) {
this.m_SourceNC.sendServerEvent(_local3[_local1]);
_local1++;
}
};
NetDebugResponseProxy.prototype.onResult = function (resultobj) {
this.m_SourceNC.sendClientEvent(new NetDebugResultEvent(resultobj));
this.m_OriginalNR.onResult(resultobj);
};
NetDebugResponseProxy.prototype.onStatus = function (statusobj) {
var _local1 = this;
var _local2 = statusobj;
_local1.m_SourceNC.sendClientEvent(new NetDebugStatusEvent(_local2));
if (_local1.m_OriginalNR.onStatus != undefined) {
_local1.m_OriginalNR.onStatus(_local2);
} else {
_global.System.onStatus(_local2);
}
};
NetDebugResponseProxy.prototype.__resolve = function (name) {
this.m_SourceNC.sendClientEvent(new NetDebugReceiveCallEvent(name, arguments));
this.m_OriginalNR[name].apply(arguments);
};
GlobalLocalConnection.prototype.setDomainName = function (domainname) {
var _local1 = domainname;
if ((_local1 != null) && (_local1 != "")) {
this.sendPrefix = _local1 + ":";
} else {
this.sendPrefix = "";
}
};
GlobalLocalConnection.prototype.send = function (dataobj) {
return(this.sendRaw("onData", dataobj));
};
GlobalLocalConnection.prototype.sendCommand = function (commandobj) {
return(this.sendRaw("onCommand", commandobj));
};
GlobalLocalConnection.prototype.sendRaw = function (functionname, obj) {
var _local2 = this;
var _local3 = true;
var snlen = _local2.sendnames.length;
var _local1 = 0;
while (_local1 < snlen) {
_local3 = _local3 & _global.g_NetDebugLocalConnection.send(_local2.sendPrefix + _local2.sendnames[_local1], functionname, obj);
_local1++;
}
return(_local3);
};
LocalCommand.prototype.init = function (commandname, dataobj) {
this.command = commandname;
this.data = dataobj;
};
UpdateNetDebugConfigCommand.prototype = new LocalCommand();
GetConfigCommand.prototype = new LocalCommand();
StartRTMPTraceCommand.prototype = new LocalCommand();
AddRTMPClientCommand.prototype = new LocalCommand();
StopRTMPTraceCommand.prototype = new LocalCommand();
NetDebug.prototype.addNetConnection = function (nc) {
this.m_ncs.push(nc);
return(this.m_NextNewId++);
};
NetDebug.prototype.removeNetConnection = function (nc) {
var _local2 = this;
var _local3 = _local2.m_ncs.length;
var _local1 = 0;
while (_local1 < _local3) {
if (nc == _local2.m_ncs[_local1]) {
_local2.m_ncs.splice(_local1, 1);
return;
}
_local1++;
}
};
NetDebug.prototype.sendDebugEvent = function (eventobj) {
if (!this.m_glc.send(eventobj)) {
this.m_glc.send(new NetDebugFailedSendErrorEvent(StripNCDEventToMinmal(eventobj)));
return(false);
}
return(true);
};
NetDebug.prototype.sendCommand = function (commandobj) {
return(this.m_glc.sendCommand(commandobj));
};
NetDebug.prototype.requestNewConfig = function () {
return(this.sendCommand(new GetConfigCommand()));
};
NetDebug.prototype.updateConfig = function (config) {
var _local2 = this;
copyProperties(_local2.m_Config, config);
var _local3 = _local2.m_ncs.length;
var _local1 = 0;
while (_local1 < _local3) {
if (_local2.m_ncs[_local1] != null) {
_local2.m_ncs[_local1].updateConfig(config);
}
_local1++;
}
};
NetDebug.prototype.sendStatus = function (statusobj) {
var _local1 = this;
if (_local1.m_Config.m_debug && (_local1.m_Config.client.m_debug)) {
return(_local1.m_glc.send(new NetDebugStatusEvent(statusobj)));
}
return(undefined);
};
NetDebug.prototype.onEvent = function (eventobj) {
return(this.sendDebugEvent(eventobj));
};
NetDebug.prototype.onEventError = function (errorobj) {
return(this.sendDebugEvent(new NetDebugErrorEvent(errorobj)));
};
NetDebug.prototype.onReceiveCommand = function (commandobj) {
this[commandobj.command](commandobj.data);
};
NetDebug.prototype.onReceiveError = function (errorobj) {
this.sendDebugEvent(new NetDebugErrorEvent(errorobj));
};
NetDebug.prototype.traceNetServices = function (who, severity, number, message) {
var _local1 = this;
if ((_local1.m_Config.m_debug && (_local1.m_Config.client.m_debug)) && (_local1.m_Config.client.trace)) {
if (!_local1.sendDebugEvent(new NetDebugTraceNetServicesEvent(who, severity, number, message))) {
}
}
};
NetDebug.prototype.trace = function (traceobj) {
var _local1 = this;
if ((_local1.m_Config.m_debug && (_local1.m_Config.client.m_debug)) && (_local1.m_Config.client.trace)) {
if (!_local1.sendDebugEvent(new NetDebugTraceEvent(traceobj))) {
}
}
};
if (_global.netDebugInstance == undefined) {
_global.netDebugInstance = new NetDebug();
}
NetDebug.trace = function (obj) {
getNetDebug().trace(obj);
};
NetDebug.traceNetServices = function (who, severity, number, message) {
getNetDebug().traceNetServices(who, severity, number, message);
};
NetDebug.getVersion = function () {
return(getNetDebugVersion());
};
NetDebug.globalOnStatus = function (statusobj) {
getNetDebug().sendStatus(statusobj);
};
if (_global.System.onStatus == undefined) {
_global.System.onStatus = NetDebug.globalOnStatus;
}
_global.DataGlue = function (dataProvider) {
this.dataProvider = dataProvider;
};
_global.DataGlue.bindFormatStrings = function (dataConsumer, dataProvider, labelString, dataString) {
var _local1 = new DataGlue(dataProvider);
_local1.labelString = labelString;
_local1.dataString = dataString;
_local1.getItemAt = _global.DataGlue.getItemAt_FormatString;
dataConsumer.setDataProvider(_local1);
};
_global.DataGlue.bindFormatFunction = function (dataConsumer, dataProvider, formatFunction) {
var _local1 = new DataGlue(dataProvider);
_local1.formatFunction = formatFunction;
_local1.getItemAt = _global.DataGlue.getItemAt_FormatFunction;
dataConsumer.setDataProvider(_local1);
};
_global.DataGlue.prototype.addView = function (viewRef) {
return(this.dataProvider.addView(viewRef));
};
_global.DataGlue.prototype.getLength = function () {
return(this.dataProvider.length);
};
_global.DataGlue.prototype.format = function (formatString, record) {
var _local2 = formatString.split("#");
var _local3 = "";
var tlen = _local2.length;
var _local1 = 0;
while (_local1 < tlen) {
_local3 = _local3 + _local2[_local1];
_local3 = _local3 + ((_local2[_local1 + 1] == "") ? "#" : (record[_local2[_local1 + 1]]));
_local1 = _local1 + 2;
}
return(_local3);
};
_global.DataGlue.getItemAt_FormatString = function (index) {
var _local2 = this;
var _local1 = _local2.dataProvider.getItemAt(index);
if ((_local1 == "in progress") || (_local1 == undefined)) {
return(_local1);
}
return({label:_local2.format(_local2.labelString, _local1), data:((_local2.dataString == null) ? (_local1) : (_local2.format(_local2.dataString, _local1)))});
};
_global.DataGlue.getItemAt_FormatFunction = function (index) {
var _local1 = this.dataProvider.getItemAt(index);
if ((_local1 == "in progress") || (_local1 == undefined)) {
return(_local1);
}
return(this.formatFunction(_local1));
};
_global.DataGlue.prototype.getItemID = function (index) {
return(this.dataProvider.getItemID(index));
};
_global.DataGlue.prototype.addItemAt = function (index, value) {
return(this.dataProvider.addItemAt(index, value));
};
_global.DataGlue.prototype.addItem = function (value) {
return(this.dataProvider.addItem(value));
};
_global.DataGlue.prototype.removeItemAt = function (index) {
return(this.dataProvider.removeItemAt(index));
};
_global.DataGlue.prototype.removeAll = function () {
return(this.dataProvider.removeAll());
};
_global.DataGlue.prototype.replaceItemAt = function (index, itemObj) {
return(this.dataProvider.replaceItemAt(index, itemObj));
};
_global.DataGlue.prototype.sortItemsBy = function (fieldName, order) {
return(this.dataProvider.sortItemsBy(fieldName, order));
};
_global.DataGlue.prototype.sortItems = function (compareFunc, order) {
return(this.dataProvider.sortItems(compareFunc, order));
};
isGatewayOpen = null;
if (isGatewayOpen == null) {
isGatewayOpen = true;
NetServices.setDefaultGatewayUrl("http://www.egamingzone.com/flashservices/gateway");
gatewayConnection = NetServices.createGatewayConnection();
inserthscfc = gatewayConnection.getService("cfc.inserths", this);
}
_quality = "medium";
OFFX = 18;
OFFY = 18;
score = 0;
lastScore = 0;
_root.HUD.score.score = 0;
lives = 3;
level = 0;
leveltxt = 0;
fruitNum = 1;
notMute = true;
newLev = true;
newGame = true;
newLife = false;
quttting = false;
quit = false;
Snd.ChSnd = true;
Pacman.Hit._visible = false;
pillCount = 0;
ghPause = 40;
ghBVal = 220;
ghMove = new Array(4);
ghChoice = new Array(4);
ghBest = new Array(4);
var g = 1;
while (g < 5) {
Ghost.attachMovie("Ghost", g, g);
Ghost.attachMovie("GhKill", "K" + g, g + 4);
Ghost["K" + g].kval = "";
g++;
}
var i = 1;
while (i < 5) {
_root["Life" + i].gotoAndStop(1);
if (i >= lives) {
_root.HUD.score["Life" + i]._visible = false;
}
i++;
}
m = "";
m1 = "#############################..........................##.####.#####.##.#####.####.##O####.#####.##.#####.####O##.####.#####.##.#####.####.##..........................##.####.##.########.##.####.##.####.##.########.##.####.##......##..........##......#######.##.########.##.############.##.########.##.############.##..........##.############.##.########.##.############.##.# # # ##.##.######L.........# # # ##.........R######.##.### ####.##.############.##.########.##.############.##..........##.############.##.########.##.############.##.########.##.#######..........................##.####.#####.##.#####.####.##.####.#####.##.#####.####.##O..##.......##.......##..O####.##.##.########.##.##.######.##.##.########.##.##.####......##....##....##......##.##########.##.##########.##.##########.##.##########.##..........................#############################";
m2 = "#############################O .......########....... O## #######.########.####### ##.#######.########.#######.##.#######.########.#######.##.####................####.##.####.##.########.##.####.##.####.##.########.##.####.##.####.##....##....##.####.##.####.#####.##.#####.####.##.####.#####.##.#####.####.##.####.##..........##.####.##.####.##.########.##.####.##.####.##.# # # ##.##.####.#L.........# # # ##.........R#.####.##.### ####.##.####.##.####.##.########.##.####.##.####.##..........##.####.##.####.##.########.##.####.##.####.##.########.##.####.##............##............##.####.#####.##.#####.####.##.####.#####.##.#####.####.##.####.##..... ....##.####.##.####.##.########.##.####.##.####.##.########.##.####.##......##....##....##......##.##########.##.##########.## ##########.##.########## ##O ...................... O#############################";
m3 = "#############################..........................##.####.#####.##.#####.####.##O####.#####.##.#####.####O##.####.#####.##.#####.####.##..........................##.####.##.########.##.####.##.####.##.########.##.####.##......##..........##......#######.##.########.##.############.##.########.##.############.##..........##.############.##.########.##.############.##.# # # ##.##.######L.........# # # ##.........R#.####.##.### ####.##.####.##.####.##.########.##.####.##.####.##..........##.####.##.####.##.########.##.####.##.####.##.########.##.####.##............##............##.####.#####.##.#####.####.##.####.#####.##.#####.####.##.####.##..... ....##.####.##.####.##.########.##.####.##.####.##.########.##.####.##......##....##....##......##.##########.##.##########.## ##########.##.########## ##O ...................... O#############################";
m4 = "#############################O ...................... O## ##########.##.########## ##.##########.##.##########.##......##....##....##......####.##.##.########.##.##.######.##.##.########.##.##.####...##.......##.......##...##.####.#####.##.#####.####.##.####.#####.##.#####.####.##.........##.##.##.........#######.##..........##.############.##.########.##.############.##.# # # ##.##.############.##.# # # ##.##.############.##.### ####.##.######L.........########.........R######.##..........##.############.##.########.##.############.##.########.##.############.##.########.##.############.##.########.##.#######......##..........##......##.####.##.########.##.####.##.####.##.########.##.####.##..........................##.####.#####.##.#####.####.##.####.#####.##.#####.####.##.####.#####.##.#####.####.##O........................O#############################";
m5 = "#############################O ...................... O## ##########.##.########## ##.##########.##.##########.##......##....##....##......##.####.##.########.##.####.##.####.##.########.##.####.##.####.##....##....##.####.##.####.#####.##.#####.####.##.####.#####.##.#####.####.##.........##.##.##.........##.####.##..........##.####.##.####.##.########.##.####.##.####.##.# # # ##.##.####.##.####.##.# # # ##.##.####.##.####.##.### ####.##.####.#L.........########.........R#.####.##..........##.####.##.####.##.########.##.####.##.####.##..........##.####.##.####.#####.##.#####.####.##.####.#####.##.#####.####.##.####.##....##....##.####.##.####.##.########.##.####.##.####.##.########.##.####.##.####................####.##.#######.########.#######.##.#######.########.#######.## #######.########.####### ##O .......########....... O#############################";
border.duplicateMovieClip("mainBorder", 2500);
Instance of Symbol 133 MovieClip [Empty] "Maze" in Frame 32
onClipEvent (keyDown) {
with (_root) {
if (Key.getCode() == 38) {
nextPacDir = 0;
} else if (Key.getCode() == 39) {
nextPacDir = 1;
} else if (Key.getCode() == 40) {
nextPacDir = 2;
} else if (Key.getCode() == 37) {
nextPacDir = 3;
}
}
}
Instance of Symbol 370 MovieClip "HUD" in Frame 32
onClipEvent (enterFrame) {
this._xscale = (100 / _root._xscale) * 100;
this._yscale = (100 / _root._yscale) * 100;
}
Instance of Symbol 382 MovieClip "border" in Frame 32
/* no clip actions */
Frame 33
originalWidth = 360;
originalHeight = 420;
camZoom = 150;
stop();
stopAllSounds();
playing = false;
barkSound = new Sound();
barkSound.attachSound("bark");
chompSound = new Sound();
chompSound.attachSound("chomp");
chompSound.onSoundComplete = function () {
_root.BGM.gotoAndPlay("loopFast");
};
chompSound2 = new Sound();
chompSound2.attachSound("chomp");
stopped = true;
_root.BGM.gotoAndPlay("loop");
Fruit.gotoAndStop(1);
if (newLev) {
bgNum = 1;
pillEat = 0;
if (level != 5) {
level++;
leveltxt++;
} else {
level = 1;
leveltxt++;
}
_root.levels.gotoAndStop(level);
m = "m" + level;
if (ghPause > 4) {
ghPause = ghPause - 4;
}
if (ghBVal > 2) {
ghBVal = ghBVal - 10;
}
if (fruitNum < 14) {
fruitNum++;
FrLev.gotoAndStop(fruitNum);
}
initVars();
if (!newGame) {
var g = 1;
while (g < 5) {
Ghost[g]._visible = false;
g++;
}
Pacman._visible = false;
BGSnd.gotoAndPlay("NewLev");
}
}
if (newLife) {
newLife = false;
Ready._visible = true;
lives--;
if (lives > 0) {
_root.HUD.score["Life" + lives]._visible = false;
initVars();
BGSnd.gotoAndPlay("NewLife");
} else {
Pacman._visible = false;
Ready.gotoAndStop("GameOver");
}
}
if (newGame) {
BGSnd.gotoAndPlay("NewGame");
}
Frame 34
if (Math.abs(_root._xscale - camZoom) > 1) {
tempZoom = _root._xscale - ((_root._xscale - camZoom) / 4);
_root._xscale = (_root._yscale = tempZoom);
_root._x = _root._x - ((_root._x + 117) / 4);
_root._y = _root._y - ((_root._y + 186) / 4);
_root.HUD._x = _root.HUD._x - ((_root.HUD._x - 198) / 4);
_root.HUD._y = _root.HUD._y - ((_root.HUD._y - 264) / 4);
} else {
if ((_root.Pacman._x < 235) && (_root.Pacman._x > 118)) {
_root._x = ((-_root.Pacman._x) * (camZoom / 100)) + (originalWidth / 2);
_root.HUD._x = _root.Pacman._x;
} else if (_root.Pacman._x >= 235) {
_root._x = -168;
_root.HUD._x = 232;
} else {
_root._x = -3;
_root.HUD._x = 121;
}
if ((_root.Pacman._y < 264) && (_root.Pacman._y > 140)) {
_root._y = ((-_root.Pacman._y) * (camZoom / 100)) + (originalHeight / 2);
_root.HUD._y = _root.Pacman._y;
} else if (_root.Pacman._y >= 264) {
_root._y = -186;
_root.HUD._y = 264;
} else {
_root._y = -6;
_root.HUD._y = 144;
}
}
_root.HUD.score.score = score;
if (pacPos == 0) {
tempDir = pacDir;
pacDir = nextPacDir;
}
setPacMove(pacDir, tempDir);
if ((tempDir + ", ") + pacDir) {
}
if (pacPos == 0) {
P = Maze[pacX]["P" + pacY];
if (P._visible) {
pacStep = 4;
pacPosMax = 2;
if (notMute) {
tellTarget ("Snd") {
if (ChSnd) {
_root.barkSound.start();
} else {
_root.barkSound.start();
}
ChSnd = !ChSnd;
};
}
P._visible = false;
pillEat++;
if (pillEat == pillCount) {
camZoom = 100;
while (Math.abs(_root._xscale - camZoom) > 1) {
tempZoom = _root._xscale - ((_root._xscale - camZoom) / 4);
_root._xscale = (_root._yscale = tempZoom);
_root._x = _root._x - (_root._x / 4);
_root._y = _root._y - (_root._y / 4);
_root.HUD._x = _root.HUD._x - ((_root.HUD._x - 180) / 4);
_root.HUD._y = _root.HUD._y - ((_root.HUD._y - 208) / 4);
}
_root._xscale = (_root._yscale = 100);
_root._x = (_root._y = 0);
newLev = true;
_root.levelDone.play();
gotoAndStop ("Restart");
}
score = score + 10;
if (Maze[pacX][pacY] == "O") {
score = score + 40;
chompSound.start();
_root.fade.play();
if (notMute && (_root.BGM._currentframe <= 10)) {
}
ghBlue = ghBval;
ghKill = 100;
var g = 1;
while (g < 5) {
tellTarget (Ghost[g]) {
if (ShapeVisible) {
c.setRGB(13311);
ghFast = false;
e = new Color(PPEyes);
e.setRGB(16777215);
}
};
g++;
}
}
} else if ((++pauseCount) % 2) {
pacStep = 4;
pacPosMax = 2;
} else {
pacStep = 6;
pacPosMax = 1;
}
if (Maze[pacX + 1][pacY] == "L") {
pacX = 28;
nextX = 27;
Pacman._x = OFFX + 336;
} else if (Maze[pacX - 1][pacY] == "R") {
pacX = -1;
nextX = 0;
Pacman._x = OFFX - 12;
}
if ((Maze[nextX][nextY] == "#") && (ang != 1)) {
pacDir = tempDir;
setPacMove(pacDir);
}
}
if (!((pacPos == 0) && (Maze[nextX][nextY] == "#"))) {
with (Pacman) {
if (nextX < pacX) {
_x = _x - pacStep;
pacPos--;
} else if (nextX > pacX) {
_x = _x + pacStep;
pacPos++;
} else if (nextY < pacY) {
_y = _y - pacStep;
pacPos--;
} else if (nextY > pacY) {
_y = _y + pacStep;
pacPos++;
}
}
if ((pacPos < 0) || (pacPos > pacPosMax)) {
if (pacPos > pacPosMax) {
pacPos = 0;
} else if (pacPos < 0) {
pacPos = pacPosMax;
}
pacX = nextX;
pacY = nextY;
}
if (stopped) {
stopped = false;
Pacman.play();
}
} else if (!stopped) {
stopped = true;
Pacman.gotoAndStop(1);
}
tellTarget ("Fruit") {
if (_currentframe == 1) {
if (!random(600)) {
gotoAndStop(_root.fruitNum);
}
} else if (fCount) {
if (hitTest(_root.Pacman.Hit)) {
gotoAndStop ("Show");
} else {
fCount--;
}
} else {
gotoAndStop (1);
}
};
if (ghBlue) {
ghBlue--;
}
unBlue = false;
var g = 1;
while (g < 5) {
with (Ghost[g]) {
if (ghBlue && (_currentframe >= 25)) {
if ((ghBlue < 50) && (_currentframe < 53)) {
ghBlinking = true;
}
if (ghBlue == 1) {
Pacman.gotoAndPlay(Pacman._currentframe - 40);
ghFast = true;
}
}
if (ghBlue == 1) {
ghBlinking = false;
}
gTest = false;
if (ghPos == 0) {
if ((Maze[ghX + 1][ghY] == "L") && (ghDir == 3)) {
ghX = 29;
ghNX = 28;
_x = OFFX + 348;
} else if ((Maze[ghX - 1][ghY] == "R") && (ghDir == 1)) {
ghX = -2;
ghNX = -1;
_x = OFFX - 24;
} else if ((ghX > 0) && (ghX < 27)) {
var i = 0;
while (i < 4) {
ghMove[i] = 1;
i++;
}
oppDir = ((ghDir < 2) ? (ghDir + 2) : (ghDir - 2));
ghMove[oppDir] = 0;
if (Maze[ghX][ghY - 1] == "#") {
ghMove[0] = 0;
}
if (Maze[ghX + 1][ghY] == "#") {
ghMove[1] = 0;
}
if (Maze[ghX][ghY + 1] == "#") {
ghMove[2] = 0;
}
if (Maze[ghX - 1][ghY] == "#") {
ghMove[3] = 0;
}
pos = 0;
var i = 0;
while (i < 4) {
ghChoice[i] = -1;
if (ghMove[i]) {
ghChoice[pos++] = i;
}
i++;
}
bestXDir = -1;
bestYDir = -1;
if (ShapeVisible && (_currentframe < 25)) {
testX = pacX;
testY = pacY;
} else {
testX = 13;
testY = 11;
}
if (testX < ghX) {
bestXDir = 3;
} else if (testX > ghX) {
bestXDir = 1;
}
if (testY < ghY) {
bestYDir = 0;
} else if (testY > ghY) {
bestYDir = 2;
}
best = 0;
var i = 0;
while (i < pos) {
if ((ghChoice[i] == bestXDir) || (ghChoice[i] == bestYDir)) {
ghBest[best++] = ghChoice[i];
}
i++;
}
ghOldDir = ghDir;
if ((best == 0) || (ShapeVisible && (!random(3)))) {
ghDir = ghChoice[random(pos)];
} else {
ghDir = ghBest[random(best)];
}
if (ghDir != ghOldDir) {
switch (ghDir) {
case 0 :
if (ghDir != ghOldDir) {
ghOldDir = ghDir;
if ((ghFast == true) && (ShapeHitVisible == true)) {
gotoAndPlay("chaseback");
} else if (((ghFast == false) && (ShapeHitVisible == true)) && (!ghBlinking)) {
gotoAndPlay("escapeback");
} else if (ghBlinking) {
gotoAndPlay("blinkback");
} else {
gotoAndPlay("bittenback");
}
}
break;
case 2 :
if (ghDir != ghOldDir) {
ghOldDir = ghDir;
if ((ghFast == true) && (ShapeHitVisible == true)) {
gotoAndPlay("chasefront");
} else if (((ghFast == false) && (ShapeHitVisible == true)) && (!ghBlinking)) {
gotoAndPlay("escapefront");
} else if (ghBlinking) {
gotoAndPlay("blinkfront");
} else {
gotoAndPlay("bittenfront");
}
}
break;
case 3 :
if (ghDir != ghOldDir) {
if ((ghFast == true) && (ShapeHitVisible == true)) {
gotoAndPlay("chaseside");
} else if (((ghFast == false) && (ShapeHitVisible == true)) && (!ghBlinking)) {
gotoAndPlay("escapeside");
} else if (ghBlinking) {
gotoAndPlay("blinkside");
} else {
gotoAndPlay("bittenside");
}
_xscale = 100;
}
break;
case 1 :
if (ghDir == ghOldDir) {
break;
}
ghOldDir = ghDir;
if ((ghFast == true) && (ShapeHitVisible == true)) {
gotoAndPlay("chaseside");
} else if (((ghFast == false) && (ShapeHitVisible == true)) && (!ghBlinking)) {
gotoAndPlay("escapeside");
} else if (ghBlinking) {
gotoAndPlay("blinkside");
} else {
gotoAndPlay("bittenside");
}
_xscale = -100;
}
}
if (ghFast) {
ghStep = 4;
ghPosMax = 2;
} else {
ghStep = 2;
ghPosMax = 5;
}
gNum++;
if (ghX == 13) {
if ((ghY > 11) && (ghY < 15)) {
if (ShapeVisible) {
gTest = true;
ghDir = 0;
if (gNum < 4) {
_y = _y - 2;
}
} else if (ghY == 13) {
unBlue = true;
numEyes--;
ShapeVisible = true;
ShapeHitVisible = true;
}
} else if (ghY == 11) {
if ((gNum == 1) && (g == 1)) {
_x = _x - 2;
}
if (gNum == 4) {
ghPos = 2;
if (ghFast) {
_x = _x + 2;
} else {
_x = _x - 2;
}
}
if (!ShapeVisible) {
gTest = true;
ghDir = 2;
}
}
}
if ((ghY > 11) && (ghY < 15)) {
if ((ghX == 11) && (gNum == (ghPause + 2))) {
gTest = true;
ghDir = 1;
gNum = -1;
}
if ((ghX == 15) && (gNum == ((2 * ghPause) + 2))) {
gTest = true;
ghDir = 3;
gNum = -1;
}
}
}
}
setGhMove(ghDir, g);
if ((!((ghPos == 0) && (Maze[ghNX][ghNY] == "#"))) || (gTest)) {
if (ghNX < ghX) {
_x = _x - ghStep;
ghPos--;
} else if (ghNX > ghX) {
_x = _x + ghStep;
ghPos++;
} else if (ghNY < ghY) {
_y = _y - ghStep;
ghPos--;
} else if (ghNY > ghY) {
_y = _y + ghStep;
ghPos++;
}
Eyes.gotoAndStop(ghDir + 1);
if ((ghPos < 0) || (ghPos > ghPosMax)) {
if (ghPos > ghPosMax) {
ghPos = 0;
} else if (ghPos < 0) {
ghPos = ghPosMax;
}
ghX = ghNX;
ghY = ghNY;
}
}
if ((ShapeHitVisible && (Pacman.Hit.hitTest(Shape.Hit))) && (!newLev)) {
if (((_currentframe < 25) && (ghFast == true)) || (ghKill >= 1600)) {
_root.stop();
playing = false;
Pacman.gotoAndPlay("Die");
} else {
chompSound2.start();
_root.fade.gotoAndPlay("red");
ghKill = ghKill * 2;
if (ghKill > 1600) {
ghKill = ghKill * 0;
}
score = score + ghKill;
ghFast = true;
if (ghPos > ghPosMax) {
ghPos = 0;
} else if (ghPos < 0) {
ghPos = ghPosMax;
}
eatGhost = true;
if (notMute) {
Snd.gotoAndPlay("EatGhost");
}
gotoAndStop(1);
numEyes++;
ShapeVisible = false;
ShapeHitVisible = false;
with (Ghost["K" + g]) {
_visible = true;
_x = Ghost[g]._x;
_y = Ghost[g]._y;
kval = ghKill;
Ghost[g].gotoAndPlay("bitten");
}
}
}
}
g++;
}
if (ghBlue && (notMute)) {
with (BGSnd) {
if (ghBlue == 1) {
_root.BGM.gotoAndPlay("loop");
} else if (unBlue && (!numEyes)) {
_root.BGM.gotoAndStop("loopFast");
}
}
}
lastScore = score;
if (!playing) {
stop();
}
if (quit) {
gotoAndStop (33);
}
Frame 35
gotoAndPlay ("Loop");
Frame 36
camZoom = 100;
if (Math.abs(_root._xscale - camZoom) > 1) {
tempZoom = _root._xscale - ((_root._xscale - camZoom) / 4);
_root._xscale = (_root._yscale = tempZoom);
_root._x = _root._x - (_root._x / 4);
_root._y = _root._y - (_root._y / 4);
}
Frame 37
gotoAndPlay ("Over");
Symbol 127 MovieClip [Ghost] Frame 1
this._xscale = 120;
this._yscale = 120;
Symbol 127 MovieClip [Ghost] Frame 8
if (ghfast == false) {
gotoAndPlay ("escapefront");
} else {
gotoAndPlay ("chasefront");
}
Symbol 127 MovieClip [Ghost] Frame 16
if (ghfast == false) {
gotoAndPlay ("escapeback");
} else {
gotoAndPlay ("chaseback");
}
Symbol 127 MovieClip [Ghost] Frame 24
if (ghfast == false) {
gotoAndPlay ("escapeside");
} else {
gotoAndPlay ("chaseside");
}
Symbol 127 MovieClip [Ghost] Frame 32
if (ghfast == false) {
gotoAndPlay ("escapefront");
} else {
gotoAndPlay ("chasefront");
}
Symbol 127 MovieClip [Ghost] Frame 42
if (ghfast == false) {
gotoAndPlay ("escapeback");
} else {
gotoAndPlay ("chaseback");
}
Symbol 127 MovieClip [Ghost] Frame 52
if (ghfast == false) {
gotoAndPlay ("escapeside");
} else {
gotoAndPlay ("chaseside");
}
Symbol 127 MovieClip [Ghost] Frame 60
gotoAndPlay ("bittenfront");
Symbol 127 MovieClip [Ghost] Frame 68
gotoAndPlay ("bittenback");
Symbol 127 MovieClip [Ghost] Frame 78
gotoAndPlay ("bittenside");
Symbol 127 MovieClip [Ghost] Frame 90
gotoAndPlay ("bittenfront");
Symbol 127 MovieClip [Ghost] Frame 98
if (ghBlinking) {
gotoAndPlay ("blinkfront");
} else {
gotoAndPlay ("chasefront");
}
Symbol 127 MovieClip [Ghost] Frame 106
if (ghBlinking) {
gotoAndPlay ("blinkback");
} else {
gotoAndPlay ("chaseback");
}
Symbol 127 MovieClip [Ghost] Frame 114
if (ghBlinking) {
gotoAndPlay ("blinkside");
} else {
gotoAndPlay ("chaseside");
}
Symbol 129 MovieClip [Pill] Frame 1
this._xscale = 200;
this._yscale = 200;
Symbol 132 MovieClip [GhKill] Frame 1
stop();
Symbol 132 MovieClip [GhKill] Frame 2
tellTarget ("/") {
playing = false;
Pacman._visible = false;
};
play();
Symbol 132 MovieClip [GhKill] Frame 12
tellTarget ("/") {
playing = true;
Pacman._visible = true;
gotoAndPlay ("Loop");
};
Symbol 132 MovieClip [GhKill] Frame 41
kval = "";
tellTarget ("_parent") {
if (fval) {
gotoAndStop (1);
}
};
Symbol 188 Button
on (release) {
gotoAndPlay (32);
}
Symbol 199 MovieClip Frame 16
stop();
Symbol 203 Button
on (release) {
gotoAndPlay ("instructions");
}
Symbol 207 Button
on (release) {
gotoAndStop ("menu");
}
Symbol 234 MovieClip Frame 1
stop();
Symbol 234 MovieClip Frame 2
stop();
Symbol 234 MovieClip Frame 3
stop();
Symbol 234 MovieClip Frame 4
stop();
Symbol 234 MovieClip Frame 5
stop();
Symbol 243 MovieClip Frame 1
fCount = 200;
stop();
Symbol 243 MovieClip Frame 2
fval = 100;
Symbol 243 MovieClip Frame 3
fval = 300;
Symbol 243 MovieClip Frame 4
fval = 500;
Symbol 243 MovieClip Frame 5
fval = 700;
Symbol 243 MovieClip Frame 6
fval = 1000;
Symbol 243 MovieClip Frame 7
fval = 2000;
Symbol 243 MovieClip Frame 8
fval = 3000;
Symbol 243 MovieClip Frame 9
fval = 5000;
Symbol 243 MovieClip Frame 10
stop();
tellTarget ("/") {
if (notMute) {
Snd.gotoAndPlay("EatFruit");
}
};
_root.score = _root.score + fval;
F.kval = fval;
F.gotoAndPlay(2);
Symbol 356 MovieClip Frame 10
gotoAndPlay ("still");
Symbol 356 MovieClip Frame 20
gotoAndPlay ("down");
Symbol 356 MovieClip Frame 30
gotoAndPlay ("up");
Symbol 356 MovieClip Frame 40
gotoAndPlay ("run");
Symbol 356 MovieClip Frame 50
gotoAndPlay ("angrystill");
Symbol 356 MovieClip Frame 60
gotoAndPlay ("angrydown");
Symbol 356 MovieClip Frame 70
gotoAndPlay ("angryup");
Symbol 356 MovieClip Frame 80
gotoAndPlay ("angryrun");
Symbol 356 MovieClip Frame 81
_root.BGSnd.stop();
stopAllSounds();
Symbol 356 MovieClip Frame 100
tellTarget ("/") {
BGSnd.gotoAndPlay("Killed");
for (var g in Ghost) {
Ghost[g]._visible = false;
}
};
Symbol 356 MovieClip Frame 102
_rotation = 0;
Symbol 356 MovieClip Frame 120
camZoom = 100;
if (Math.abs(_root._xscale - camZoom) > 1) {
tempZoom = _root._xscale - ((_root._xscale - camZoom) / 4);
_root._xscale = (_root._yscale = tempZoom);
_root._x = _root._x - (_root._x / 4);
_root._y = _root._y - (_root._y / 4);
_root.HUD._x = _root.HUD._x - ((_root.HUD._x - 180) / 4);
_root.HUD._y = _root.HUD._y - ((_root.HUD._y - 208) / 4);
} else {
stop();
tellTarget ("/") {
newLife = true;
gotoAndPlay ("Restart");
};
}
Symbol 356 MovieClip Frame 121
gotoAndPlay(_currentframe - 1);
Symbol 356 MovieClip Frame 134
stop();
tellTarget ("/") {
newLife = true;
gotoAndPlay ("Restart");
};
Symbol 361 MovieClip Frame 5
if (_root.notMute) {
_root.BGSnd.NewLev.start();
}
Symbol 361 MovieClip Frame 33
stop();
Symbol 364 MovieClip Frame 8
camZoom = 100;
if (Math.abs(_root._xscale - camZoom) > 1) {
tempZoom = _root._xscale - ((_root._xscale - camZoom) / 4);
_root._xscale = (_root._yscale = tempZoom);
_root._x = _root._x - (_root._x / 4);
_root._y = _root._y - (_root._y / 4);
} else {
gotoAndStop(_currentframe + 2);
}
Symbol 364 MovieClip Frame 9
gotoAndPlay(_currentframe - 1);
Symbol 364 MovieClip Frame 10
stop();
_root.stop();
Symbol 365 MovieClip Frame 1
stop();
Symbol 365 MovieClip Frame 2
with (_root) {
LevMov.lval = ((leveltxt < 10) ? ("0" + leveltxt) : (leveltxt));
}
Symbol 365 MovieClip Frame 3
if (_level0.u_id == null) {
_level0.u_id = 0;
}
if (_level0.paid == null) {
_level0.paid = 0;
}
_root.inserthscfc.inserths(_level0.u_id, 2, _level0.paid, _root.score);
Symbol 371 MovieClip Frame 1
stop();
Back1 = new Sound();
Back1.attachSound("BG1b");
Back2 = new Sound();
Back2.attachSound("BG2b");
Back3 = new Sound();
Back3.attachSound("BG3b");
BlueGh = new Sound();
BlueGh.attachSound("BGGhosta");
EyesGh = new Sound();
EyesGh.attachSound("BGGhosta");
ExLife = new Sound();
ExLife.attachSound("ExLife");
NewLev = new Sound();
NewLev.attachSound("NewLeva");
Symbol 371 MovieClip Frame 2
if (!_root.notMute) {
gotoAndPlay ("NewLev");
}
Symbol 371 MovieClip Frame 31
tellTarget ("/") {
if (!newGame) {
Ready.gotoAndStop("Level");
Ready._visible = true;
var j = 0;
while (j < 31) {
var i = 0;
while (i < 28) {
Maze[i]["P" + j]._visible = true;
i++;
}
j++;
}
}
newGame = false;
};
Symbol 371 MovieClip Frame 65
tellTarget ("/") {
g = 1;
while (g < 5) {
Ghost[g]._visible = true;
g++;
}
Pacman._visible = true;
Ready.gotoAndStop(1);
};
Symbol 371 MovieClip Frame 87
tellTarget ("/") {
Ready._visible = false;
playing = true;
nextPacDir = 3;
play();
if (notMute) {
BGSnd["Back" + bgNum].start(0, 1000);
}
};
stop();
Symbol 371 MovieClip Frame 88
if (!_root.notMute) {
stop();
}
Symbol 371 MovieClip Frame 90
stop();
Symbol 374 MovieClip Frame 1
stop();
Symbol 374 MovieClip Frame 6
stop();
Symbol 374 MovieClip Frame 8
stop();
Symbol 374 MovieClip Frame 21
stop();
_root.BGSnd.EyesGh.start(0, 100);
Symbol 374 MovieClip Frame 23
stop();
Symbol 375 MovieClip Frame 1
stop();
Symbol 375 MovieClip Frame 10
gotoAndStop (1);
Symbol 375 MovieClip Frame 23
gotoAndStop (1);
Symbol 380 MovieClip Frame 1
stop();
Symbol 380 MovieClip Frame 2
stopAllSounds();
Symbol 380 MovieClip Frame 41
_root.fade.play();
_root.BGM.gotoAndPlay("loop");
gotoAndStop (1);
Symbol 383 MovieClip Frame 1
stopAllSounds();
play();
Symbol 383 MovieClip Frame 9
stop();
Symbol 383 MovieClip Frame 10
stopAllSounds();
play();
Symbol 383 MovieClip Frame 19
stop();
Symbol 383 MovieClip Frame 20
stopAllSounds();
play();
Symbol 383 MovieClip Frame 30
stop();