Frame 1
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 getDirection(faceing) {
if (faceing == "right") {
return(-1);
}
return(1);
}
function hitcheck(myname, dir) {
targ = eval (myname);
targX = targ._x;
targY = targ._y + _root.hero_groundClearance;
targY2 = targY - 2;
ymv = targ.ymv;
xmv = targ.xmv;
xdist = xmv * (-dir);
dist = 0;
stopped = false;
if (ymv >= 0) {
y = 0;
while (y <= ymv) {
if (_root.ground.floor.hitTest(targX, targY + y, true) == true) {
dist = y;
if (targ.keyDuck == false) {
if (targ.action == "jumpattack") {
targ.attack = false;
}
if (targ.jump == true) {
targ.action = "land";
}
} else if (targ.jump == true) {
targ.action = "duck";
}
stopped = true;
break;
}
y++;
}
targY2 = targY2 + dist;
if (_root.ground.floor.hitTest(targX, targY2, true) == true) {
intersect = true;
y = 0;
while (intersect == true) {
if (_root.ground.floor.hitTest(targX, targY2 - y, true) == false) {
dist = dist - y;
stopped = true;
intersect = false;
break;
}
y++;
}
}
}
if (stopped == false) {
if (ymv < _root.hero_maxfall) {
dist = ymv + _root.hero_fallspeed;
} else {
dist = _root.hero_maxfall;
}
targ.ymv = dist;
} else {
targ.ymv = 0;
}
yon = true;
moveall(0, dist, targ);
if (Math.abs(xmv) > 0) {
if (xmv >= 0) {
xdir = 1;
} else {
xdir = -1;
}
x = 0;
while (x < Math.abs(xmv)) {
if (_root.ground.floor.hitTest(targX + (((-dir) * (15 + x)) * xdir), targY, true) == true) {
xdist = x * (-dir);
break;
}
x++;
}
}
moveall(xdist, 0, targ);
}
function moveall(xmv, ymv) {
Move1 = 0;
Move2 = 0;
Cymv = ymv;
Bxmv = xmv;
targ = eval (targ);
targX = targ._x;
targY = targ._y;
BLim = botLim._y;
TLim = topLim._y;
RLim = RightLim._x;
LLim = LeftLim._x;
if ((targY > TLim) and (targY < BLim)) {
if ((targY + ymv) < TLim) {
dt = TLim - targY;
Cymv = ymv - dt;
Bymv = dt;
} else if ((targY + ymv) > BLim) {
dt = BLim - targY;
Cymv = ymv - dt;
Bymv = dt;
} else {
Bymv = ymv;
Cymv = 0;
}
} else if (((targY + ymv) > TLim) and (targY < TLim)) {
dt = TLim - targY;
Cymv = dt;
Bymv = ymv - dt;
} else if (((targY + ymv) < BLim) and (targY > BLim)) {
dt = BLim - targY;
Cymv = dt;
Bymv = ymv - dt;
} else {
Bymv = 0;
Cymv = ymv;
}
if ((targX > LLim) and (targX < RLim)) {
if ((targX + xmv) < LLim) {
dt = LLim - targX;
Cxmv = xmv - dt;
Bxmv = dt;
} else if ((targX + xmv) > RLim) {
dt = RLim - targX;
Cxmv = xmv - dt;
Bxmv = dt;
} else {
Bxmv = xmv;
Cxmv = 0;
}
} else if (((targX + xmv) > LLim) and (targX < LLim)) {
dt = LLim - targX;
Cxmv = dt;
Bxmv = xmv - dt;
} else if (((targX + xmv) < RLim) and (targX > RLim)) {
dt = RLim - targX;
Cxmv = dt;
Bxmv = xmv - dt;
} else {
Bxmv = 0;
Cxmv = xmv;
}
_root.BGxmv = -Bxmv;
if (yon == true) {
yon = false;
_root.BGymv = -Bymv;
}
targ._x = targ._x + Cxmv;
targ._y = targ._y + Cymv;
}
function En_hitcheck(enname) {
targ = eval ("_root.ground." + enname);
point = new Object();
point.x = targ._x;
point.y = targ._y;
_root.ground.localToGlobal(point);
targX = point.x;
targY = point.y;
targY2 = targY - 2;
ymv = targ.ymv;
dist = 0;
stopped = false;
if (ymv >= 0) {
y = 0;
while (y <= ymv) {
if (_root.ground.floor.hitTest(targX, targY + y, true) == true) {
dist = y;
stopped = true;
break;
}
y++;
}
targY2 = targY2 + dist;
if (_root.ground.floor.hitTest(targX, targY2, true) == true) {
intersect = true;
y = 0;
while (intersect == true) {
if (_root.ground.floor.hitTest(targX, targY2 - y, true) == false) {
dist = dist - y;
stopped = true;
intersect = false;
break;
}
y++;
}
}
}
if (stopped == false) {
if (ymv < _root.hero_maxfall) {
dist = ymv + _root.hero_fallspeed;
} else {
dist = _root.hero_maxfall;
}
targ.ymv = dist;
} else {
targ.ymv = 0;
}
return(dist);
}
_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;
trace(_local1);
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";
stopAllSounds();
stageW = 550;
stageH = 400;
paused = false;
oldface = 1;
testbox = "//START//";
_root.ShowHitZones = false;
_root.jumpOnHeads = false;
Frame 2
loadMovieNum ("flash/games/level0.swf", 10);
_root.level = "level01a";
hero_maxfall = 40;
hero_fallspeed = 5;
hero_groundClearance = 25;
hero_shot1Speed = 50;
hero_life = 100;
hero_lives = _level10.hero_lives;
trace("load mod= " + _level10.mod);
if (((hero_lives == "") or (hero_lives == undefined)) or (hero_lives == null)) {
hero_lives = 3;
score = 0;
mod = 0;
trace("init mod= " + _root.mod);
} else {
score = _level10.score;
_root.mod = _level10.mod;
trace("init mod= " + _root.mod);
}
if (mod > 0) {
hero_maxtoggle = 5;
hero_startState = 1;
stop();
_root.transition.target = "interlevel";
_root.transition.gotoAndPlay("fade");
} else {
hero_maxtoggle = 1;
hero_startState = 1;
}
enemy1Life = 9;
enemy1HitPower = 15 + mod;
enemy1ShotPower = 15 + mod;
enemy1PointsAwarded = 15;
enemy2Life = 5;
enemy2HitPower = 15 + mod;
enemy2ShotPower = 15 + mod;
enemy2PointsAwarded = 10;
enemy3Life = 25;
enemy3HitPower = 25 + mod;
enemy3ShotPower = 25 + mod;
enemy3PointsAwarded = 25;
_root.BossLife = 100 + mod;
_root.BossPower = 25 + mod;
_root.BossPointsAwarded = 250;
stop();
Frame 3
stop();
Frame 11
stop();
Frame 20
stop();
Frame 21
stopAllSounds();
playB._visible = false;
Instance of Symbol 85 MovieClip "map" in Frame 21
onClipEvent (enterFrame) {
gotoAndStop(_root.level);
}
Instance of Symbol 96 MovieClip in Frame 21
onClipEvent (load) {
_alpha = 0;
_parent.map._alpha = 60;
cnt = 0;
gotoAndStop(_root.level);
}
onClipEvent (enterFrame) {
cnt = cnt + 1;
if ((cnt > 24) and (cnt < 74)) {
_alpha = (_alpha + 2);
_parent.map._alpha = _parent.map._alpha - 1;
} else if (cnt > 74) {
if (_parent.map._alpha > 0) {
_parent.map._alpha = _parent.map._alpha - 1;
}
_parent.map._alpha = 0;
_alpha = 100;
_parent.playB._visible = true;
}
}
Frame 27
stop();
Frame 30
stopAllSounds();
Frame 37
if (_level0.u_id == null) {
_level0.u_id = 0;
}
if (_level0.paid == null) {
_level0.paid = 0;
}
_root.inserthscfc.inserths(_level0.u_id, 7, _level0.paid, _root.score);
stop();
Frame 38
stopAllSounds();
Frame 45
stop();
Frame 53
stop();
Frame 57
stopAllSounds();
_root.totemon = false;
_root.level = "level01a";
_root.nextLevel = "level01b";
_root.levelNum = 1;
_root.timeLimit = 60;
_root.timeLimit = _root.timeLimit * 15;
Frame 59
stop();
Instance of Symbol 107 MovieClip "bg" in Frame 59
onClipEvent (enterFrame) {
_y = (_y + (_root.BGymv * 0.5));
_x = (_x + (_root.BGxmv * 0.5));
}
Instance of Symbol 318 MovieClip "ground" in Frame 59
onClipEvent (load) {
orgX = bg._x;
orgY = bg._y;
shake = false;
scnt = 5;
dir = 1;
}
onClipEvent (enterFrame) {
if (shake == true) {
dir = dir * -1;
if (scnt < 1) {
scnt = 5;
bg._x = orgX;
bg._y = orgY;
dir = 1;
shake = false;
} else {
bg._x = bg._x + ((scnt * 1.5) * dir);
bg._y = bg._y + ((scnt * 1.5) * (-dir));
}
if (dir > 0) {
scnt = scnt - 1;
}
}
_y = (_y + _root.BGymv);
_x = (_x + _root.BGxmv);
_root.foreground._y = _root.foreground._y + _root.BGymv;
_root.foreground._x = _root.foreground._x + _root.BGxmv;
}
Instance of Symbol 320 MovieClip "botLim" in Frame 59
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
_y = (_y + _root.BGymv);
}
Instance of Symbol 322 MovieClip "topLim" in Frame 59
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
_y = (_y + _root.BGymv);
}
Instance of Symbol 320 MovieClip "LeftLim" in Frame 59
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
_x = (_x + _root.BGxmv);
}
Instance of Symbol 320 MovieClip "RightLim" in Frame 59
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
_x = (_x + _root.BGxmv);
}
Instance of Symbol 330 MovieClip "effects" in Frame 59
onClipEvent (load) {
function flashBG() {
fcnt = 0;
flash = true;
}
flash = false;
fcnt = 0;
BGColor = new Color(_root.bg);
ForeColor = new Color(_root.ground);
HeroColor = new Color(_root.hero);
black = {ra:"100", rb:"-50", ga:"100", gb:"-50", ba:"100", bb:"-50", aa:"100", ab:"100"};
white2 = {ra:"100", rb:"255", ga:"100", gb:"255", ba:"100", bb:"255", aa:"100", ab:"75"};
white3 = {ra:"100", rb:"150", ga:"100", gb:"150", ba:"100", bb:"150", aa:"100", ab:"50"};
none = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
}
onClipEvent (enterFrame) {
if (flash == true) {
fcnt = fcnt + 1;
switch (fcnt) {
case 1 :
gotoAndPlay ("thunder");
BGColor.setTransform(black);
break;
case 2 :
BGColor.setTransform(white3);
HeroColor.setTransform(white3);
break;
case 3 :
BGColor.setTransform(black);
ForeColor.setTransform(white3);
HeroColor.setTransform(white2);
HeroState = _root.hero._currentframe;
if (HeroState < _root.hero_MaxToggle) {
HeroState = HeroState + 1;
} else {
HeroState = 1;
}
_root.hero.MyState = HeroState;
_root.hero.gotoAndStop(HeroState);
break;
case 4 :
BGColor.setTransform(white2);
ForeColor.setTransform(black);
HeroColor.setTransform(white3);
break;
case 5 :
BGColor.setTransform(none);
ForeColor.setTransform(none);
HeroColor.setTransform(none);
fcnt = 0;
flash = false;
}
}
}
Instance of Symbol 955 MovieClip "hero" in Frame 59
onClipEvent (load) {
function setDefaults() {
stand = false;
run = false;
duck = false;
jump = false;
attack = false;
hurt = false;
die = false;
turn = false;
land = false;
sattack = false;
diefall = false;
scnt = 0;
diecnt = 0;
keySAttack = false;
keyAttack = false;
keyRight = false;
keyLeft = false;
keyJump = false;
keyDuck = false;
keyZ = false;
keyJump = true;
ymv = -45;
jump = true;
action = "jump";
}
function hit(hitX, hitS) {
var _local1 = _root;
var _local2 = hitS;
trace((("Hitx= " + hitX) + " // hitS= ") + _local2);
if (((hurt == false) and (die == false)) and (sattack == false)) {
_local1.hero_life = _local1.hero_life - (_local2 * _local1.hero_hitOffset);
if (hitX < _x) {
xmv = (_local2 * _local1.hero_hitOffset) * -0.5;
faceing = "left";
} else {
xmv = (_local2 * _local1.hero_hitOffset) * -0.5;
faceing = "right";
}
if (_local1.hero_life > 0) {
hurt = true;
Action = "hurt";
} else {
_local1.hero_life = 0;
if (_local1.hero_lives > 0) {
_local1.hero_lives = _local1.hero_lives - 1;
}
die = true;
action = "die";
xmv = 0;
}
}
}
xsorg = _xscale;
faceing = "right";
MyState = _root.hero_startState;
gotoAndStop(MyState);
xmv = 0;
ymv = 0;
setDefaults();
}
onClipEvent (keyDown) {
if (_root.paused == false) {
if ((hurt == false) and (die == false)) {
if (((((Key.getCode() == 67) and (sattack == false)) and (jump == false)) and (SAttackOn == true)) and (_root.hero_life > 10)) {
_root.hero_life = _root.hero_life - 8;
sattack = true;
scnt = 0;
}
if ((((Key.getCode() == 32) and (keyAttack == false)) and (attack == false)) and (sattack == false)) {
keyAttack = true;
attack = true;
}
if (((Key.getCode() == 39) and (keyRight == false)) and (sattack == false)) {
keyRight = true;
faceing = "right";
}
if (((Key.getCode() == 37) and (keyLeft == false)) and (sattack == false)) {
keyLeft = true;
faceing = "left";
}
if (((((Key.getCode() == 38) and (keyJump == false)) and (jump == false)) and (action != "fall")) and (sattack == false)) {
keyJump = true;
ymv = -_root.hero_jumpHeight;
}
if (((Key.getCode() == 40) and (keyDuck == false)) and (sattack == false)) {
keyDuck = true;
}
if (((Key.getCode() == 90) and (keyZ == false)) and (sattack == false)) {
_root.effects.flashBG();
}
}
}
}
onClipEvent (keyUp) {
if (Key.getCode() == 32) {
keyAttack = false;
}
if (Key.getCode() == 39) {
keyRight = false;
}
if (Key.getCode() == 37) {
keyLeft = false;
}
if (Key.getCode() == 40) {
keyDuck = false;
}
if (Key.getCode() == 38) {
keyJump = false;
}
if (Key.getCode() == 90) {
keyZ = false;
}
}
onClipEvent (enterFrame) {
if (_root.paused == false) {
dir = _root.getDirection(faceing);
_xscale = (xsorg * (dir * -1));
if ((hurt == false) and (die == false)) {
if (ymv > 15) {
jump = true;
action = "fall";
}
if ((keyJump == true) and (jump == false)) {
jump = true;
action = "jump";
}
if ((hurt == false) and (die == false)) {
if (sattack == false) {
if (((keyRight == true) or (keyLeft == true)) and ((keyDuck == false) or ((keyDuck == true) and (jump == true)))) {
if (((attack == true) and ((MyState == 4) or (MyState == 5))) and (jump == false)) {
xmv = 0;
} else {
xmv = _root.hero_runSpeed;
}
if ((jump != true) and (attack != true)) {
action = "run";
}
} else if (((keyDuck == true) and (action != "fall")) and (action != "jump")) {
xmv = 0;
action = "duck";
} else {
xmv = 0;
if (jump != true) {
action = "stand";
}
}
if (attack == true) {
if (jump == true) {
if (action != "land") {
action = "jumpattack";
}
} else {
action = "attack";
}
}
} else {
action = "sattack";
scnt = scnt + 1;
switch (MyState) {
case 2 :
if (scnt < 4) {
xmv = 0;
} else if (scnt < 10) {
xmv = 25;
} else if (scnt < 14) {
xmv = 5;
} else {
sattack = false;
}
break;
case 3 :
if (scnt < 2) {
xmv = 0;
ymv = 0;
} else if ((scnt > 6) and (scnt < 8)) {
_root.ground.shake = true;
} else if (scnt > 11) {
sattack = false;
}
break;
case 4 :
if (scnt < 2) {
xmv = 0;
ymv = 0;
} else if (scnt > 15) {
sattack = false;
}
break;
case 5 :
if (scnt < 2) {
xmv = 0;
ymv = 0;
} else if ((scnt > 6) and (scnt < 8)) {
_root.ground.shake = true;
} else {
if (scnt <= 24) {
break;
}
sattack = false;
}
}
}
}
} else if (die == true) {
if (diefall == true) {
action = "diefall";
} else {
action = "die";
}
diecnt = diecnt + 1;
if (diecnt > 20) {
diecnt = 0;
if (_root.hero_lives > 0) {
_root.transition.target = _root.level;
_root.transition.gotoAndPlay("fade");
} else {
_root.transition.target = "loseScreen";
_root.transition.gotoAndPlay("fade");
}
}
xmv = 0;
} else {
trace("you got hurt from switch-case");
action = "hurt";
}
if (_root.ground.diezone.hitTest(_x, _y + _root.hero_groundClearance, true)) {
hit(20, 200);
}
movements.gotoAndStop(action + "_right");
_root.hitcheck(_name, dir);
if ((die == true) or (hurt == true)) {
if (Math.abs.xmv > 1) {
xmv = xmv * 0.5;
}
}
} else {
movements.gotoAndStop("stand_right");
_root.BGymv = 0;
_root.BGxmv = 0;
}
}
Frame 65
stopAllSounds();
_root.totemOn = false;
_root.level = "level01b";
_root.levelNum = 1;
_root.timeLimit = 90;
_root.timeLimit = _root.timeLimit * 15;
Frame 67
stop();
Instance of Symbol 989 MovieClip "bg" in Frame 67
onClipEvent (enterFrame) {
_y = (_y + (_root.BGymv * 0.5));
_x = (_x + (_root.BGxmv * 0.5));
}
Instance of Symbol 1047 MovieClip "ground" in Frame 67
onClipEvent (load) {
orgX = bg._x;
orgY = bg._y;
shake = false;
scnt = 5;
dir = 1;
}
onClipEvent (enterFrame) {
if (shake == true) {
dir = dir * -1;
if (scnt < 1) {
scnt = 5;
bg._x = orgX;
bg._y = orgY;
dir = 1;
shake = false;
} else {
bg._x = bg._x + ((scnt * 1.5) * dir);
bg._y = bg._y + ((scnt * 1.5) * (-dir));
}
if (dir > 0) {
scnt = scnt - 1;
}
}
_y = (_y + _root.BGymv);
_x = (_x + _root.BGxmv);
_root.foreground._y = _root.foreground._y + _root.BGymv;
_root.foreground._x = _root.foreground._x + _root.BGxmv;
}
Instance of Symbol 320 MovieClip "botLim" in Frame 67
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
_y = (_y + _root.BGymv);
}
Instance of Symbol 322 MovieClip "topLim" in Frame 67
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
_y = (_y + _root.BGymv);
}
Instance of Symbol 320 MovieClip "LeftLim" in Frame 67
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
_x = (_x + _root.BGxmv);
}
Instance of Symbol 320 MovieClip "RightLim" in Frame 67
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
_x = (_x + _root.BGxmv);
}
Instance of Symbol 330 MovieClip "effects" in Frame 67
onClipEvent (load) {
function flashBG() {
fcnt = 0;
flash = true;
}
flash = false;
fcnt = 0;
BGColor = new Color(_root.bg);
ForeColor = new Color(_root.ground);
HeroColor = new Color(_root.hero);
black = {ra:"100", rb:"-50", ga:"100", gb:"-50", ba:"100", bb:"-50", aa:"100", ab:"100"};
white2 = {ra:"100", rb:"255", ga:"100", gb:"255", ba:"100", bb:"255", aa:"100", ab:"75"};
white3 = {ra:"100", rb:"150", ga:"100", gb:"150", ba:"100", bb:"150", aa:"100", ab:"50"};
none = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
}
onClipEvent (enterFrame) {
if (flash == true) {
fcnt = fcnt + 1;
switch (fcnt) {
case 1 :
gotoAndPlay ("thunder");
BGColor.setTransform(black);
break;
case 2 :
BGColor.setTransform(white3);
HeroColor.setTransform(white3);
break;
case 3 :
BGColor.setTransform(black);
ForeColor.setTransform(white3);
HeroColor.setTransform(white2);
HeroState = _root.hero._currentframe;
if (HeroState < _root.hero_MaxToggle) {
HeroState = HeroState + 1;
} else {
HeroState = 1;
}
_root.hero.MyState = HeroState;
_root.hero.gotoAndStop(HeroState);
break;
case 4 :
BGColor.setTransform(white2);
ForeColor.setTransform(black);
HeroColor.setTransform(white3);
break;
case 5 :
BGColor.setTransform(none);
ForeColor.setTransform(none);
HeroColor.setTransform(none);
fcnt = 0;
flash = false;
}
}
}
Instance of Symbol 955 MovieClip "hero" in Frame 67
onClipEvent (load) {
function setDefaults() {
action = "stand";
stand = true;
run = false;
duck = false;
jump = false;
attack = false;
hurt = false;
die = false;
turn = false;
land = false;
sattack = false;
diefall = false;
scnt = 0;
diecnt = 0;
keySAttack = false;
keyAttack = false;
keyRight = false;
keyLeft = false;
keyJump = false;
keyDuck = false;
keyZ = false;
}
function hit(hitX, hitS) {
var _local1 = _root;
var _local2 = hitS;
trace((("Hitx= " + hitX) + " // hitS= ") + _local2);
if (((hurt == false) and (die == false)) and (sattack == false)) {
_local1.hero_life = _local1.hero_life - (_local2 * _local1.hero_hitOffset);
if (hitX < _x) {
xmv = (_local2 * _local1.hero_hitOffset) * -0.5;
faceing = "left";
} else {
xmv = (_local2 * _local1.hero_hitOffset) * -0.5;
faceing = "right";
}
if (_local1.hero_life > 0) {
hurt = true;
Action = "hurt";
} else {
_local1.hero_life = 0;
if (_local1.hero_lives > 0) {
_local1.hero_lives = _local1.hero_lives - 1;
}
die = true;
action = "die";
xmv = 0;
}
}
}
xsorg = _xscale;
faceing = "right";
MyState = _root.hero_startState;
gotoAndStop(MyState);
xmv = 0;
ymv = 0;
setDefaults();
}
onClipEvent (keyDown) {
if (_root.paused == false) {
if ((hurt == false) and (die == false)) {
if (((((Key.getCode() == 67) and (sattack == false)) and (jump == false)) and (SAttackOn == true)) and (_root.hero_life > 10)) {
_root.hero_life = _root.hero_life - 8;
sattack = true;
scnt = 0;
}
if ((((Key.getCode() == 32) and (keyAttack == false)) and (attack == false)) and (sattack == false)) {
keyAttack = true;
attack = true;
}
if (((Key.getCode() == 39) and (keyRight == false)) and (sattack == false)) {
keyRight = true;
faceing = "right";
}
if (((Key.getCode() == 37) and (keyLeft == false)) and (sattack == false)) {
keyLeft = true;
faceing = "left";
}
if (((((Key.getCode() == 38) and (keyJump == false)) and (jump == false)) and (action != "fall")) and (sattack == false)) {
keyJump = true;
ymv = -_root.hero_jumpHeight;
}
if (((Key.getCode() == 40) and (keyDuck == false)) and (sattack == false)) {
keyDuck = true;
}
if (((Key.getCode() == 90) and (keyZ == false)) and (sattack == false)) {
_root.effects.flashBG();
}
}
}
}
onClipEvent (keyUp) {
if (Key.getCode() == 32) {
keyAttack = false;
}
if (Key.getCode() == 39) {
keyRight = false;
}
if (Key.getCode() == 37) {
keyLeft = false;
}
if (Key.getCode() == 40) {
keyDuck = false;
}
if (Key.getCode() == 38) {
keyJump = false;
}
if (Key.getCode() == 90) {
keyZ = false;
}
}
onClipEvent (enterFrame) {
if (_root.paused == false) {
dir = _root.getDirection(faceing);
_xscale = (xsorg * (dir * -1));
if ((hurt == false) and (die == false)) {
if (ymv > 15) {
jump = true;
action = "fall";
}
if ((keyJump == true) and (jump == false)) {
jump = true;
action = "jump";
}
if ((hurt == false) and (die == false)) {
if (sattack == false) {
if (((keyRight == true) or (keyLeft == true)) and ((keyDuck == false) or ((keyDuck == true) and (jump == true)))) {
if (((attack == true) and ((MyState == 4) or (MyState == 5))) and (jump == false)) {
xmv = 0;
} else {
xmv = _root.hero_runSpeed;
}
if ((jump != true) and (attack != true)) {
action = "run";
}
} else if (((keyDuck == true) and (action != "fall")) and (action != "jump")) {
xmv = 0;
action = "duck";
} else {
xmv = 0;
if (jump != true) {
action = "stand";
}
}
if (attack == true) {
if (jump == true) {
if (action != "land") {
action = "jumpattack";
}
} else {
action = "attack";
}
}
} else {
action = "sattack";
scnt = scnt + 1;
switch (MyState) {
case 2 :
if (scnt < 4) {
xmv = 0;
} else if (scnt < 10) {
xmv = 25;
} else if (scnt < 14) {
xmv = 5;
} else {
sattack = false;
}
break;
case 3 :
if (scnt < 2) {
xmv = 0;
ymv = 0;
} else if ((scnt > 6) and (scnt < 8)) {
_root.ground.shake = true;
} else if (scnt > 11) {
sattack = false;
}
break;
case 4 :
if (scnt < 2) {
xmv = 0;
ymv = 0;
} else if (scnt > 15) {
sattack = false;
}
break;
case 5 :
if (scnt < 2) {
xmv = 0;
ymv = 0;
} else if ((scnt > 6) and (scnt < 8)) {
_root.ground.shake = true;
} else {
if (scnt <= 24) {
break;
}
sattack = false;
}
}
}
}
} else if (die == true) {
if (diefall == true) {
action = "diefall";
} else {
action = "die";
}
diecnt = diecnt + 1;
if (diecnt > 20) {
diecnt = 0;
if (_root.hero_lives > 0) {
_root.transition.target = _root.level;
_root.transition.gotoAndPlay("fade");
} else {
_root.transition.target = "loseScreen";
_root.transition.gotoAndPlay("fade");
}
}
xmv = 0;
} else {
trace("you got hurt from switch-case");
action = "hurt";
}
if (_root.ground.diezone.hitTest(_x, _y + _root.hero_groundClearance, true)) {
hit(20, 200);
}
movements.gotoAndStop(action + "_right");
_root.hitcheck(_name, dir);
if ((die == true) or (hurt == true)) {
if (Math.abs.xmv > 1) {
xmv = xmv * 0.5;
}
}
} else {
movements.gotoAndStop("stand_right");
_root.BGymv = 0;
_root.BGxmv = 0;
}
}
Frame 72
_level10.score = _root.score;
_level10.hero_lives = _root.hero_lives;
_level10.mod = _root.mod;
_level10.u_id = _level0.u_id;
if ((_level0.paid == null) and (_level10.paid == null)) {
_level0.paid = 0;
}
_level10.paid = _level0.paid;
loadMovieNum ("DragonWarrior_Level2.swf", 1);
play();
Frame 73
stop();
Symbol 4 MovieClip Frame 2
stop();
Symbol 4 MovieClip Frame 10
_root.gotoAndPlay(target);
if ((_root.hero_life <= 0) and (_root.hero_lives > 0)) {
_root.hero_life = 100;
}
trace(target);
_root.paused = false;
Symbol 8 MovieClip Frame 43
stop();
_root.gotoAndPlay(3);
Symbol 14 MovieClip Frame 2
percent = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
bar._width = percent * 2;
if (percent == 100) {
_root.play();
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 24 MovieClip Frame 10
Symbol 26 Button
on (release) {
_root.transition.target = "interlevel";
_root.transition.gotoAndPlay("fade");
}
Symbol 38 Button
on (release) {
_root.transition.target = "instructions";
_root.transition.gotoAndPlay("fade");
}
Symbol 43 Button
on (release) {
_root.transition.target = "interlevel";
_root.transition.gotoAndPlay("fade");
}
Symbol 85 MovieClip Frame 1
stop();
Symbol 85 MovieClip Frame 2
stop();
Symbol 85 MovieClip Frame 3
stop();
Symbol 85 MovieClip Frame 4
stop();
Symbol 85 MovieClip Frame 5
stop();
Symbol 85 MovieClip Frame 6
stop();
Symbol 85 MovieClip Frame 7
stop();
Symbol 85 MovieClip Frame 8
stop();
Symbol 85 MovieClip Frame 9
stop();
Symbol 85 MovieClip Frame 10
stop();
Symbol 85 MovieClip Frame 11
stop();
Symbol 96 MovieClip Frame 1
stop();
Symbol 96 MovieClip Frame 2
stop();
Symbol 96 MovieClip Frame 3
stop();
Symbol 96 MovieClip Frame 4
stop();
Symbol 96 MovieClip Frame 5
stop();
Symbol 96 MovieClip Frame 6
stop();
Symbol 96 MovieClip Frame 7
stop();
Symbol 96 MovieClip Frame 8
stop();
Symbol 96 MovieClip Frame 9
stop();
Symbol 96 MovieClip Frame 10
stop();
Symbol 96 MovieClip Frame 11
stop();
Symbol 97 Button
on (release) {
_root.transition.target = _root.level;
_root.transition.gotoAndPlay("fade");
}
Symbol 103 MovieClip Frame 1
stop();
Symbol 103 MovieClip Frame 9
gotoAndStop (1);
Symbol 141 MovieClip Frame 2
if (_root.hero.hitTest(this)) {
_root.effects.gotoAndPlay("bling");
_root.score = _root.score + 5;
unloadMovie (this);
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 157 MovieClip Frame 2
_parent._parent.hitting = true;
Symbol 157 MovieClip Frame 4
_parent._parent.hitting = false;
Symbol 157 MovieClip Frame 6
_parent._parent.ranged = false;
_parent._parent.attacking = false;
_parent._parent.action = "stand";
Symbol 158 MovieClip Frame 10
_parent._parent.die = false;
Symbol 162 MovieClip Frame 1
_root.score = _root.score + _parent._parent.points;
Symbol 162 MovieClip Frame 12
dcnt = 50;
Symbol 162 MovieClip Frame 13
dcnt = dcnt - 1;
_alpha = (dcnt * 2);
_parent._parent._y = _parent._parent._y + 7;
Symbol 162 MovieClip Frame 14
dcnt = dcnt - 1;
if (dcnt > 0) {
_alpha = (dcnt * 2);
gotoAndPlay(_currentframe - 1);
_parent._parent._y = _parent._parent._y + 7;
}
Symbol 162 MovieClip Frame 15
unloadMovie (_parent._parent);
Symbol 163 MovieClip Frame 1
stop();
Symbol 163 MovieClip Frame 8
stop();
Symbol 163 MovieClip Frame 15
stop();
Symbol 163 MovieClip Frame 28
stop();
Symbol 163 MovieClip Frame 34
stop();
Symbol 163 MovieClip Frame 40
stop();
Symbol 163 MovieClip Frame 43
stop();
Symbol 164 MovieClip Frame 1
function animate() {
var _local1 = _parent;
var _local2 = _root;
if (_local2.paused == false) {
_local1.point = new Object();
_local1.point.x = _local1._x;
_local1.point.y = _local1._y;
_local1._parent.localToGlobal(_local1.point);
_local1.myX = _local1.point.x;
_local1.myY = _local1.point.y;
if ((((_local1.myX < (_local2.stageW + 20)) and (_local1.myX > -20)) and (_local1.myY > -60)) and (_local1.myY < (_local2.stageH + 75))) {
_local1.onscreen = true;
_local1._visible = true;
} else {
_local1.onscreen = false;
_local1._visible = false;
}
if (_local1.die == false) {
if (_local1.onscreen == true) {
if (_local1.hitTest(_local2.hero)) {
if (_local2.jumpOnHeads == true) {
if (_local2.hero.ymv > 10) {
_local1.hit(_local2.hero_power);
_local2.hero.ymv = -_local2.hero_jumpHeight;
}
}
if ((_local2.hero.attack == false) and (_local2.hero.sattack == false)) {
if (_local1.hitting == true) {
_local2.hero.hit(_local1.myX, _local1.handDamage);
}
} else if (_local2.hero.sattack == true) {
_local1.hit(_local2.hero_spower);
} else if (_local1.hitzone == true) {
if (_local1.hitarea.hitTest(_local2.hero)) {
_local1.hit(_local2.hero_power);
}
} else if (_local2.hero.MyState != 4) {
_local1.hit(_local2.hero_power);
}
}
if (_local1.hitTest(_local1._parent.arrow1) == true) {
if (_local1.hitzone == true) {
if (_local1._parent.arrow1.hitTest(_local1.hitarea)) {
_local1.hit(_local2.hero_power);
_local1._parent.arrow1.hit();
} else {
_local1._parent.arrow1.hit();
}
} else {
_local1.hit(_local2.hero_power);
_local1._parent.arrow1.hit();
}
}
}
_local1.movements.gotoAndPlay(_local1.action);
if (_local1.trackGround == true) {
_local1.mv = _local2.En_hitcheck(_local1._name);
}
_local1._y = _local1._y + _local1.mv;
if (_local1.attacking == true) {
if (_local1.ranged == false) {
_local1.action = "attack";
} else {
_local1.action = "sattack";
}
} else {
if (_local1._x > _local1.Rlim) {
_local1.pauseCnt = _local1.pauseCnt + 1;
if (_local1.pauseCnt < _local1.pauseTime) {
_local1.action = "stand";
} else {
_local1.pauseCnt = 0;
_local1.dir = 1;
_local1.action = "walk";
_local1._x = _local1.Rlim - 2;
}
} else if (_local1._x < _local1.Llim) {
_local1.pauseCnt = _local1.pauseCnt + 1;
if (_local1.pauseCnt < _local1.pauseTime) {
_local1.action = "stand";
} else {
_local1.pauseCnt = 0;
_local1.dir = -1;
_local1.action = "walk";
_local1._x = _local1.Llim + 2;
}
} else {
_local1._x = _local1._x - (_local1.speed * _local1.dir);
_local1.action = "walk";
}
if ((_local2.hero.die == false) and (_local2.hero.hurt == false)) {
_local1.heroY = _local2.hero._y;
_local1.heroX = _local2.hero._x;
if ((((_local1.heroY < (_local1.myY + 10)) and (_local1.heroY > (_local1.myY - _local1._height))) and (_local1.heroX < (_local1.myX + _local1.handRange))) and (_local1.heroX > (_local1.myX - _local1.handRange))) {
_local1.attacking = true;
_local1.ranged = false;
if (_local1.heroX < _local1.myX) {
_local1.dir = 1;
} else {
_local1.dir = -1;
}
} else if (_local1.rangedAttack == true) {
if ((((_local1.heroY < (_local1.myY + 10)) and (_local1.heroY > (_local1.myY - _local1._height))) and (_local1.heroX < (_local1.myX + _local1.fireRange))) and (_local1.heroX > (_local1.myX - _local1.fireRange))) {
_local1.attacking = true;
_local1.ranged = true;
if (_local1.heroX < _local1.myX) {
_local1.dir = 1;
} else {
_local1.dir = -1;
}
}
}
}
}
_local1._xscale = _local1.orgx * _local1.dir;
} else if (_local1.life > 0) {
_local1.action = "hurt";
} else {
_local1.action = "die";
}
_local1.movements.gotoAndStop(_local1.action);
} else if (_local1.die == false) {
_local1.movements.gotoAndStop("stand");
}
}
Symbol 164 MovieClip Frame 2
stop();
Instance of Symbol 164 MovieClip in Symbol 165 MovieClip Frame 1
onClipEvent (enterFrame) {
animate();
}
Symbol 165 MovieClip Frame 2
stop();
Symbol 168 MovieClip Frame 2
stop();
Symbol 225 MovieClip Frame 3
_parent._parent.hitting = true;
Symbol 225 MovieClip Frame 4
_parent._parent.hitting = false;
Symbol 225 MovieClip Frame 5
_parent._parent.ranged = false;
_parent._parent.attacking = false;
_parent._parent.action = "stand";
Symbol 234 MovieClip Frame 5
_parent._parent.die = false;
Symbol 255 MovieClip Frame 1
_root.score = _root.score + _parent._parent.points;
Symbol 255 MovieClip Frame 16
dcnt = 50;
Symbol 255 MovieClip Frame 17
dcnt = dcnt - 1;
_alpha = (dcnt * 2);
Symbol 255 MovieClip Frame 18
dcnt = dcnt - 1;
if (dcnt > 0) {
_alpha = (dcnt * 2);
gotoAndPlay(_currentframe - 1);
}
Symbol 255 MovieClip Frame 19
unloadMovie (_parent._parent);
Symbol 256 MovieClip Frame 1
stop();
Symbol 256 MovieClip Frame 8
stop();
Symbol 256 MovieClip Frame 15
stop();
Symbol 256 MovieClip Frame 28
stop();
Symbol 256 MovieClip Frame 34
stop();
Symbol 256 MovieClip Frame 40
stop();
Symbol 256 MovieClip Frame 43
stop();
Instance of Symbol 164 MovieClip in Symbol 257 MovieClip Frame 1
onClipEvent (enterFrame) {
animate();
}
Symbol 257 MovieClip Frame 2
stop();
Symbol 283 MovieClip Frame 4
_parent._parent.hitting = true;
Symbol 283 MovieClip Frame 6
_parent._parent.hitting = false;
Symbol 283 MovieClip Frame 8
_parent._parent.ranged = false;
_parent._parent.attacking = false;
_parent._parent.action = "stand";
Symbol 290 MovieClip Frame 8
_parent._parent.die = false;
Symbol 312 MovieClip Frame 1
_root.score = _root.score + _parent._parent.points;
Symbol 312 MovieClip Frame 17
dcnt = 50;
Symbol 312 MovieClip Frame 18
dcnt = dcnt - 1;
_alpha = (dcnt * 2);
Symbol 312 MovieClip Frame 19
dcnt = dcnt - 1;
if (dcnt > 0) {
_alpha = (dcnt * 2);
gotoAndPlay(_currentframe - 1);
}
Symbol 312 MovieClip Frame 20
unloadMovie (_parent._parent);
Symbol 313 MovieClip Frame 1
stop();
Symbol 313 MovieClip Frame 8
stop();
Symbol 313 MovieClip Frame 15
stop();
Symbol 313 MovieClip Frame 20
stop();
Symbol 313 MovieClip Frame 28
stop();
Symbol 313 MovieClip Frame 34
stop();
Symbol 313 MovieClip Frame 40
stop();
Symbol 313 MovieClip Frame 43
stop();
Instance of Symbol 164 MovieClip in Symbol 314 MovieClip Frame 1
onClipEvent (enterFrame) {
animate();
}
Symbol 314 MovieClip Frame 2
stop();
Symbol 316 MovieClip Frame 3
stop();
Symbol 316 MovieClip Frame 6
stop();
Symbol 317 MovieClip Frame 5
stop();
Instance of Symbol 109 MovieClip "floor" in Symbol 318 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
onClipEvent (enterFrame) {
}
Instance of Symbol 119 MovieClip "diezone" in Symbol 318 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 121 MovieClip in Symbol 318 MovieClip Frame 1
onClipEvent (load) {
nextlevel = _root.nextLevel;
Mytarget = "interlevel";
}
onClipEvent (enterFrame) {
if (_root.totemOn == true) {
if ((_root.hero.sattack == false) and ((_root.hero.action == "run") or (_root.hero.action == "stand"))) {
if (_root.hero.hitTest(this)) {
if (_root.paused == false) {
_root.paused = true;
_root.transition.target = Mytarget;
_root.level = nextlevel;
_root.panels.timer.bar.countBonus = true;
}
}
}
}
}
Instance of Symbol 165 MovieClip "enemy1" in Symbol 318 MovieClip Frame 1
onClipEvent (load) {
function hit(power) {
if (die == false) {
life = life - power;
die = true;
}
}
firePower = _root.enemy2ShotPower;
life = _root.enemy2Life;
handDamage = _root.enemy2HitPower;
points = _root.enemy2PointsAwarded;
trackGround = false;
handRange = 60;
walks = true;
speed = 5;
distance = 500;
pauseTime = 20;
startDirection = "left";
rangedAttack = false;
fireRange = 300;
fireSpeed = 40;
fireType = "glowball";
fireMovement = "air";
fireXoffset = 40;
fireYoffset = 63;
pauseCnt = 0;
if (walks == false) {
distance = 1;
speed = 1;
}
Rlim = _x + (distance * 0.5);
Llim = _x - (distance * 0.5);
orgx = _xscale;
if (startDirection == "right") {
dir = -1;
} else {
dir = 1;
}
ymv = 0;
die = false;
action = "stand";
attacking = false;
ranged = false;
hitting = false;
}
Instance of Symbol 168 MovieClip "en_bullet" in Symbol 318 MovieClip Frame 1
onClipEvent (load) {
function fire(xloc, yloc, dir, speed, type, movement, power) {
cnt = cnt + 1;
bulletName = "bullet" + cnt;
duplicateMovieClip (this, "bullet" + cnt, cnt);
eval ("_parent." + bulletName).myspeed = speed * (-dir);
eval ("_parent." + bulletName).mytype = type;
eval ("_parent." + bulletName).dir = -dir;
eval ("_parent." + bulletName)._x = xloc;
eval ("_parent." + bulletName)._y = yloc;
eval ("_parent." + bulletName).power = power;
eval ("_parent." + bulletName).movement = movement;
eval ("_parent." + bulletName).Flying = true;
}
function hit() {
Flying = false;
_x = 1000;
_y = -1000;
removeMovieClip(this);
}
cnt = 100;
}
onClipEvent (enterFrame) {
if (_root.paused == false) {
if (Flying == true) {
_xscale = (dir * 100);
gotoAndStop(mytype);
point = new Object();
point.x = _x;
point.y = _y;
_parent.localToGlobal(point);
myX = point.x;
myY = point.y;
_x = (_x + myspeed);
if (movement == "ground") {
mv = _root.En_hitcheck(_name);
_y = (_y + mv);
}
if (this.hitTest(_root.hero)) {
_root.hero.hit(myX, power);
hit();
}
if ((myX > (_root.stageW + 20)) or (myX < -20)) {
hit();
}
}
}
}
Instance of Symbol 257 MovieClip "enemy3" in Symbol 318 MovieClip Frame 1
onClipEvent (load) {
function hit(power) {
if (die == false) {
life = life - power;
die = true;
}
}
firePower = _root.enemy1ShotPower;
life = _root.enemy1Life;
handDamage = _root.enemy1HitPower;
points = _root.enemy1PointsAwarded;
trackGround = true;
handRange = 65;
walks = true;
speed = 4;
distance = 250;
pauseTime = 35;
startDirection = "right";
rangedAttack = false;
fireRange = 300;
fireSpeed = 40;
fireType = "glowball";
fireMovement = "air";
fireXoffset = 40;
fireYoffset = 63;
pauseCnt = 0;
if (walks == false) {
distance = 1;
speed = 1;
}
Rlim = _x + (distance * 0.5);
Llim = _x - (distance * 0.5);
orgx = _xscale;
if (startDirection == "right") {
dir = -1;
} else {
dir = 1;
}
ymv = 0;
die = false;
action = "stand";
attacking = false;
ranged = false;
hitting = false;
}
Instance of Symbol 257 MovieClip "enemy6" in Symbol 318 MovieClip Frame 1
onClipEvent (load) {
function hit(power) {
if (die == false) {
life = life - power;
die = true;
}
}
firePower = _root.enemy1ShotPower;
life = _root.enemy1Life;
handDamage = _root.enemy1HitPower;
points = _root.enemy1PointsAwarded;
trackGround = true;
handRange = 65;
walks = true;
speed = 6;
distance = 350;
pauseTime = 25;
startDirection = "right";
rangedAttack = false;
fireRange = 300;
fireSpeed = 40;
fireType = "glowball";
fireMovement = "air";
fireXoffset = 40;
fireYoffset = 63;
pauseCnt = 0;
if (walks == false) {
distance = 1;
speed = 1;
}
Rlim = _x + (distance * 0.5);
Llim = _x - (distance * 0.5);
orgx = _xscale;
if (startDirection == "right") {
dir = -1;
} else {
dir = 1;
}
ymv = 0;
die = false;
action = "stand";
attacking = false;
ranged = false;
hitting = false;
}
Instance of Symbol 257 MovieClip "enemy5" in Symbol 318 MovieClip Frame 1
onClipEvent (load) {
function hit(power) {
if (die == false) {
life = life - power;
die = true;
}
}
firePower = _root.enemy1ShotPower;
life = _root.enemy1Life;
handDamage = _root.enemy1HitPower;
points = _root.enemy1PointsAwarded;
trackGround = true;
handRange = 65;
walks = true;
speed = 3;
distance = 150;
pauseTime = 25;
startDirection = "right";
rangedAttack = false;
fireRange = 300;
fireSpeed = 40;
fireType = "glowball";
fireMovement = "air";
fireXoffset = 40;
fireYoffset = 63;
pauseCnt = 0;
if (walks == false) {
distance = 1;
speed = 1;
}
Rlim = _x + (distance * 0.5);
Llim = _x - (distance * 0.5);
orgx = _xscale;
if (startDirection == "right") {
dir = -1;
} else {
dir = 1;
}
ymv = 0;
die = false;
action = "stand";
attacking = false;
ranged = false;
hitting = false;
}
Instance of Symbol 257 MovieClip "enemy7" in Symbol 318 MovieClip Frame 1
onClipEvent (load) {
function hit(power) {
if (die == false) {
life = life - power;
die = true;
}
}
firePower = _root.enemy1ShotPower;
life = _root.enemy1Life;
handDamage = _root.enemy1HitPower;
points = _root.enemy1PointsAwarded;
trackGround = true;
handRange = 65;
walks = false;
speed = 5;
distance = 250;
pauseTime = 20;
startDirection = "left";
rangedAttack = false;
fireRange = 300;
fireSpeed = 40;
fireType = "glowball";
fireMovement = "air";
fireXoffset = 40;
fireYoffset = 63;
pauseCnt = 0;
if (walks == false) {
distance = 1;
speed = 1;
}
Rlim = _x + (distance * 0.5);
Llim = _x - (distance * 0.5);
orgx = _xscale;
if (startDirection == "right") {
dir = -1;
} else {
dir = 1;
}
ymv = 0;
die = false;
action = "stand";
attacking = false;
ranged = false;
hitting = false;
}
Instance of Symbol 165 MovieClip "enemy2" in Symbol 318 MovieClip Frame 1
onClipEvent (load) {
function hit(power) {
if (die == false) {
life = life - power;
die = true;
}
}
firePower = _root.enemy2ShotPower;
life = _root.enemy2Life;
handDamage = _root.enemy2HitPower;
points = _root.enemy2PointsAwarded;
trackGround = false;
handRange = 60;
walks = true;
speed = 5;
distance = 400;
pauseTime = 45;
startDirection = "right";
rangedAttack = false;
fireRange = 300;
fireSpeed = 40;
fireType = "glowball";
fireMovement = "air";
fireXoffset = 40;
fireYoffset = 63;
pauseCnt = 0;
if (walks == false) {
distance = 1;
speed = 1;
}
Rlim = _x + (distance * 0.5);
Llim = _x - (distance * 0.5);
orgx = _xscale;
if (startDirection == "right") {
dir = -1;
} else {
dir = 1;
}
ymv = 0;
die = false;
action = "stand";
attacking = false;
ranged = false;
hitting = false;
}
Instance of Symbol 314 MovieClip "enemy11" in Symbol 318 MovieClip Frame 1
onClipEvent (load) {
function hit(power) {
if (die == false) {
life = life - power;
die = true;
}
}
firePower = _root.enemy3ShotPower;
life = _root.enemy3Life;
handDamage = _root.enemy3HitPower;
points = _root.enemy3PointsAwarded;
trackGround = true;
handRange = 90;
walks = true;
speed = 4;
distance = 250;
pauseTime = 35;
startDirection = "right";
rangedAttack = false;
fireRange = 300;
fireSpeed = 40;
fireType = "glowball";
fireMovement = "air";
fireXoffset = 40;
fireYoffset = 63;
pauseCnt = 0;
if (walks == false) {
distance = 1;
speed = 1;
}
Rlim = _x + (distance * 0.5);
Llim = _x - (distance * 0.5);
orgx = _xscale;
if (startDirection == "right") {
dir = -1;
} else {
dir = 1;
}
ymv = 0;
die = false;
action = "stand";
attacking = false;
ranged = false;
hitting = false;
}
Instance of Symbol 314 MovieClip "enemy12" in Symbol 318 MovieClip Frame 1
onClipEvent (load) {
function hit(power) {
if (die == false) {
life = life - power;
die = true;
}
}
firePower = _root.enemy3ShotPower;
life = _root.enemy3Life;
handDamage = _root.enemy3HitPower;
points = _root.enemy3PointsAwarded;
trackGround = true;
handRange = 90;
walks = true;
speed = 5;
distance = 250;
pauseTime = 15;
startDirection = "right";
rangedAttack = false;
fireRange = 300;
fireSpeed = 40;
fireType = "glowball";
fireMovement = "air";
fireXoffset = 40;
fireYoffset = 63;
pauseCnt = 0;
if (walks == false) {
distance = 1;
speed = 1;
}
Rlim = _x + (distance * 0.5);
Llim = _x - (distance * 0.5);
orgx = _xscale;
if (startDirection == "right") {
dir = -1;
} else {
dir = 1;
}
ymv = 0;
die = false;
action = "stand";
attacking = false;
ranged = false;
hitting = false;
}
Instance of Symbol 165 MovieClip "enemy9" in Symbol 318 MovieClip Frame 1
onClipEvent (load) {
function hit(power) {
if (die == false) {
life = life - power;
die = true;
}
}
firePower = _root.enemy2ShotPower;
life = _root.enemy2Life;
handDamage = _root.enemy2HitPower;
points = _root.enemy2PointsAwarded;
trackGround = false;
handRange = 60;
walks = true;
speed = 7;
distance = 300;
pauseTime = 10;
startDirection = "right";
rangedAttack = false;
fireRange = 300;
fireSpeed = 40;
fireType = "glowball";
fireMovement = "air";
fireXoffset = 40;
fireYoffset = 63;
pauseCnt = 0;
if (walks == false) {
distance = 1;
speed = 1;
}
Rlim = _x + (distance * 0.5);
Llim = _x - (distance * 0.5);
orgx = _xscale;
if (startDirection == "right") {
dir = -1;
} else {
dir = 1;
}
ymv = 0;
die = false;
action = "stand";
attacking = false;
ranged = false;
hitting = false;
}
Instance of Symbol 165 MovieClip "enemy10" in Symbol 318 MovieClip Frame 1
onClipEvent (load) {
function hit(power) {
if (die == false) {
life = life - power;
die = true;
}
}
firePower = _root.enemy2ShotPower;
life = _root.enemy2Life;
handDamage = _root.enemy2HitPower;
points = _root.enemy2PointsAwarded;
trackGround = false;
handRange = 60;
walks = true;
speed = 7;
distance = 300;
pauseTime = 29;
startDirection = "left";
rangedAttack = false;
fireRange = 300;
fireSpeed = 40;
fireType = "glowball";
fireMovement = "air";
fireXoffset = 40;
fireYoffset = 63;
pauseCnt = 0;
if (walks == false) {
distance = 1;
speed = 1;
}
Rlim = _x + (distance * 0.5);
Llim = _x - (distance * 0.5);
orgx = _xscale;
if (startDirection == "right") {
dir = -1;
} else {
dir = 1;
}
ymv = 0;
die = false;
action = "stand";
attacking = false;
ranged = false;
hitting = false;
}
Instance of Symbol 314 MovieClip "enemy8" in Symbol 318 MovieClip Frame 1
onClipEvent (load) {
function hit(power) {
if (die == false) {
life = life - power;
if (life <= 0) {
_root.totemon = true;
}
die = true;
}
}
firePower = _root.enemy3ShotPower;
life = _root.enemy3Life;
handDamage = _root.enemy3HitPower;
points = _root.enemy3PointsAwarded;
trackGround = true;
handRange = 90;
walks = false;
speed = 4;
distance = 250;
pauseTime = 35;
startDirection = "right";
rangedAttack = false;
fireRange = 300;
fireSpeed = 40;
fireType = "glowball";
fireMovement = "air";
fireXoffset = 40;
fireYoffset = 63;
pauseCnt = 0;
if (walks == false) {
distance = 1;
speed = 1;
}
Rlim = _x + (distance * 0.5);
Llim = _x - (distance * 0.5);
orgx = _xscale;
if (startDirection == "right") {
dir = -1;
} else {
dir = 1;
}
ymv = 0;
die = false;
action = "stand";
attacking = false;
ranged = false;
hitting = false;
}
Instance of Symbol 314 MovieClip "enemy4" in Symbol 318 MovieClip Frame 1
onClipEvent (load) {
function hit(power) {
if (die == false) {
life = life - power;
die = true;
}
}
firePower = _root.enemy3ShotPower;
life = _root.enemy3Life;
handDamage = _root.enemy3HitPower;
points = _root.enemy3PointsAwarded;
trackGround = true;
handRange = 90;
walks = true;
speed = 5;
distance = 250;
pauseTime = 40;
startDirection = "left";
rangedAttack = false;
fireRange = 300;
fireSpeed = 40;
fireType = "glowball";
fireMovement = "air";
fireXoffset = 40;
fireYoffset = 63;
pauseCnt = 0;
if (walks == false) {
distance = 1;
speed = 1;
}
Rlim = _x + (distance * 0.5);
Llim = _x - (distance * 0.5);
orgx = _xscale;
if (startDirection == "right") {
dir = -1;
} else {
dir = 1;
}
ymv = 0;
die = false;
action = "stand";
attacking = false;
ranged = false;
hitting = false;
}
Instance of Symbol 317 MovieClip "arrow1" in Symbol 318 MovieClip Frame 1
onClipEvent (load) {
function fire(xloc, yloc, dir, fireT) {
firetype = fireT;
myspeed = _root.hero_shot1Speed * (-dir);
_xscale = (xsorg * (-dir));
point = new Object();
point.x = xloc;
point.y = yloc;
_parent.globalToLocal(point);
_x = point.x;
_y = point.y;
gotoAndPlay (1);
Flying = true;
}
function hit() {
Flying = false;
_x = 1000;
_y = -1000;
}
Flying = false;
xsorg = _xscale;
cnt = 20;
}
onClipEvent (enterFrame) {
if (_root.paused == false) {
if (Flying == true) {
sym.gotoAndStop(firetype);
point = new Object();
point.x = _x;
point.y = _y;
_parent.localToGlobal(point);
myX = point.x;
myY = point.y;
_x = (_x + myspeed);
if ((myX > 570) or (myX < -20)) {
hit();
}
}
}
}
Symbol 318 MovieClip Frame 2
stop();
Symbol 330 MovieClip Frame 2
stop();
Symbol 330 MovieClip Frame 4
gotoAndStop (1);
Symbol 330 MovieClip Frame 10
gotoAndStop (1);
Symbol 330 MovieClip Frame 15
gotoAndStop (1);
Symbol 330 MovieClip Frame 22
gotoAndStop (1);
Symbol 330 MovieClip Frame 31
gotoAndStop (1);
Symbol 330 MovieClip Frame 38
gotoAndStop (1);
Symbol 330 MovieClip Frame 45
gotoAndStop (1);
Symbol 330 MovieClip Frame 51
gotoAndStop (1);
Symbol 330 MovieClip Frame 57
gotoAndStop (1);
Symbol 367 MovieClip Frame 2
if (random(10) > 6) {
_root.effects.gotoAndPlay("H1");
}
Symbol 367 MovieClip Frame 9
stop();
Symbol 372 MovieClip Frame 4
_parent._parent.jump = false;
_parent._parent.keyJump = false;
land = false;
Symbol 376 MovieClip Frame 3
_parent._parent.jump = false;
_parent._parent.keyJump = false;
land = false;
stop();
Symbol 395 MovieClip Frame 8
_parent._parent.attack = false;
Symbol 401 MovieClip Frame 5
_parent._parent.attack = false;
stop();
Symbol 405 MovieClip Frame 2
stop();
Symbol 418 MovieClip Frame 5
_parent._parent.hurt = false;
Symbol 418 MovieClip Frame 8
_parent._parent.setDefaults();
Symbol 431 MovieClip Frame 7
stop();
Symbol 432 MovieClip Frame 1
stop();
Symbol 432 MovieClip Frame 10
stop();
Symbol 432 MovieClip Frame 18
stop();
Symbol 432 MovieClip Frame 26
stop();
Symbol 432 MovieClip Frame 33
stop();
Symbol 432 MovieClip Frame 41
stop();
Symbol 432 MovieClip Frame 49
stop();
Symbol 432 MovieClip Frame 58
stop();
Symbol 432 MovieClip Frame 70
stop();
Symbol 432 MovieClip Frame 78
stop();
Symbol 432 MovieClip Frame 95
stop();
Symbol 432 MovieClip Frame 103
stop();
Symbol 432 MovieClip Frame 112
stop();
Symbol 432 MovieClip Frame 121
stop();
Symbol 432 MovieClip Frame 128
stop();
Symbol 432 MovieClip Frame 134
stop();
Symbol 432 MovieClip Frame 141
stop();
Symbol 432 MovieClip Frame 150
stop();
Symbol 432 MovieClip Frame 160
stop();
Symbol 432 MovieClip Frame 172
stop();
Symbol 432 MovieClip Frame 181
stop();
Symbol 432 MovieClip Frame 189
stop();
Symbol 432 MovieClip Frame 195
stop();
Symbol 476 MovieClip Frame 4
if (random(10) > 6) {
_root.effects.gotoAndPlay("H2");
}
Symbol 476 MovieClip Frame 9
stop();
Symbol 490 MovieClip Frame 4
_parent._parent.jump = false;
_parent._parent.keyJump = false;
land = false;
Symbol 495 MovieClip Frame 3
_parent._parent.jump = false;
_parent._parent.keyJump = false;
land = false;
stop();
Symbol 510 MovieClip Frame 8
_parent._parent.attack = false;
Symbol 518 MovieClip Frame 5
_parent._parent.attack = false;
stop();
Symbol 521 MovieClip Frame 2
stop();
Symbol 533 MovieClip Frame 5
_parent._parent.hurt = false;
Symbol 533 MovieClip Frame 8
_parent._parent.setDefaults();
Symbol 550 MovieClip Frame 10
stop();
Symbol 576 MovieClip Frame 1
stop();
Symbol 576 MovieClip Frame 10
stop();
Symbol 576 MovieClip Frame 18
stop();
Symbol 576 MovieClip Frame 26
stop();
Symbol 576 MovieClip Frame 33
stop();
Symbol 576 MovieClip Frame 41
stop();
Symbol 576 MovieClip Frame 49
stop();
Symbol 576 MovieClip Frame 58
stop();
Symbol 576 MovieClip Frame 70
stop();
Symbol 576 MovieClip Frame 78
stop();
Symbol 576 MovieClip Frame 86
stop();
Symbol 576 MovieClip Frame 93
stop();
Symbol 576 MovieClip Frame 103
stop();
Symbol 576 MovieClip Frame 112
stop();
Symbol 576 MovieClip Frame 121
stop();
Symbol 576 MovieClip Frame 128
stop();
Symbol 576 MovieClip Frame 134
stop();
Symbol 576 MovieClip Frame 141
stop();
Symbol 576 MovieClip Frame 150
stop();
Symbol 576 MovieClip Frame 160
stop();
Symbol 576 MovieClip Frame 172
stop();
Symbol 576 MovieClip Frame 181
stop();
Symbol 576 MovieClip Frame 189
stop();
Symbol 576 MovieClip Frame 195
stop();
Symbol 626 MovieClip Frame 1
if (random(10) > 6) {
_root.effects.gotoAndPlay("H3");
}
Symbol 626 MovieClip Frame 8
stop();
Symbol 632 MovieClip Frame 4
_parent._parent.jump = false;
_parent._parent.keyJump = false;
land = false;
Symbol 634 MovieClip Frame 3
stop();
Symbol 655 MovieClip Frame 10
_parent._parent.attack = false;
Symbol 656 MovieClip Frame 5
_parent._parent.attack = false;
stop();
Symbol 659 MovieClip Frame 2
stop();
Symbol 668 MovieClip Frame 5
_parent._parent.hurt = false;
Symbol 668 MovieClip Frame 8
_parent._parent.setDefaults();
Symbol 687 MovieClip Frame 13
stop();
Symbol 707 MovieClip Frame 1
stop();
Symbol 707 MovieClip Frame 10
stop();
Symbol 707 MovieClip Frame 18
stop();
Symbol 707 MovieClip Frame 26
stop();
Symbol 707 MovieClip Frame 33
stop();
Symbol 707 MovieClip Frame 41
stop();
Symbol 707 MovieClip Frame 49
stop();
Symbol 707 MovieClip Frame 58
stop();
Symbol 707 MovieClip Frame 70
stop();
Symbol 707 MovieClip Frame 78
stop();
Symbol 707 MovieClip Frame 86
stop();
Symbol 707 MovieClip Frame 93
stop();
Symbol 707 MovieClip Frame 103
stop();
Symbol 707 MovieClip Frame 112
stop();
Symbol 707 MovieClip Frame 121
stop();
Symbol 707 MovieClip Frame 128
stop();
Symbol 707 MovieClip Frame 134
stop();
Symbol 707 MovieClip Frame 141
stop();
Symbol 707 MovieClip Frame 150
stop();
Symbol 707 MovieClip Frame 160
stop();
Symbol 707 MovieClip Frame 172
stop();
Symbol 707 MovieClip Frame 181
stop();
Symbol 707 MovieClip Frame 189
stop();
Symbol 707 MovieClip Frame 195
stop();
Symbol 762 MovieClip Frame 5
if (random(10) > 6) {
_root.effects.gotoAndPlay("H4");
}
Symbol 762 MovieClip Frame 14
stop();
Symbol 770 MovieClip Frame 5
_parent._parent.jump = false;
_parent._parent.keyJump = false;
land = false;
Symbol 773 MovieClip Frame 3
stop();
Symbol 781 MovieClip Frame 5
stop();
Symbol 794 MovieClip Frame 4
if (_parent._parent.keyAttack == false) {
gotoAndPlay ("fire");
}
Symbol 794 MovieClip Frame 5
if (_parent._parent.keyAttack == true) {
gotoAndPlay(_currentframe - 1);
}
Symbol 794 MovieClip Frame 6
_root.ground.arrow1.fire(_parent._parent._x + (-5 * _parent._parent.dir), _parent._parent._y - 36, _parent._parent.dir, "arrow");
Symbol 794 MovieClip Frame 11
_parent._parent.attack = false;
Symbol 805 MovieClip Frame 4
if (_parent._parent.keyAttack == false) {
gotoAndPlay ("fire");
}
Symbol 805 MovieClip Frame 5
if (_parent._parent.keyAttack == true) {
gotoAndPlay(_currentframe - 1);
}
Symbol 805 MovieClip Frame 6
_root.ground.arrow1.fire(_parent._parent._x + (-5 * _parent._parent.dir), _parent._parent._y - 10, _parent._parent.dir);
Symbol 805 MovieClip Frame 7
stop();
Symbol 808 MovieClip Frame 2
stop();
Symbol 818 MovieClip Frame 5
_parent._parent.hurt = false;
Symbol 818 MovieClip Frame 8
_parent._parent.setDefaults();
Symbol 829 MovieClip Frame 9
stop();
Symbol 847 MovieClip Frame 1
stop();
Symbol 847 MovieClip Frame 10
stop();
Symbol 847 MovieClip Frame 18
stop();
Symbol 847 MovieClip Frame 26
stop();
Symbol 847 MovieClip Frame 33
stop();
Symbol 847 MovieClip Frame 41
stop();
Symbol 847 MovieClip Frame 49
stop();
Symbol 847 MovieClip Frame 58
stop();
Symbol 847 MovieClip Frame 70
stop();
Symbol 847 MovieClip Frame 78
stop();
Symbol 847 MovieClip Frame 86
stop();
Symbol 847 MovieClip Frame 93
stop();
Symbol 847 MovieClip Frame 103
stop();
Symbol 847 MovieClip Frame 112
stop();
Symbol 847 MovieClip Frame 121
stop();
Symbol 847 MovieClip Frame 128
stop();
Symbol 847 MovieClip Frame 134
stop();
Symbol 847 MovieClip Frame 141
stop();
Symbol 847 MovieClip Frame 150
stop();
Symbol 847 MovieClip Frame 160
stop();
Symbol 847 MovieClip Frame 172
stop();
Symbol 847 MovieClip Frame 181
stop();
Symbol 847 MovieClip Frame 189
stop();
Symbol 847 MovieClip Frame 195
stop();
Symbol 873 MovieClip Frame 2
if (random(10) > 6) {
_root.effects.gotoAndPlay("H5");
}
Symbol 873 MovieClip Frame 9
stop();
Symbol 879 MovieClip Frame 4
_parent._parent.jump = false;
_parent._parent.keyJump = false;
land = false;
Symbol 881 MovieClip Frame 3
_parent._parent.jump = false;
_parent._parent.keyJump = false;
land = false;
stop();
Symbol 892 MovieClip Frame 5
_root.ground.arrow1.fire(_parent._parent._x + (-5 * _parent._parent.dir), _parent._parent._y - 40, _parent._parent.dir, "glowball");
Symbol 892 MovieClip Frame 8
_parent._parent.attack = false;
Symbol 898 MovieClip Frame 4
_root.ground.arrow1.fire(_parent._parent._x + (10 * _parent._parent.dir), _parent._parent._y - 40, _parent._parent.dir, "glowball");
Symbol 898 MovieClip Frame 5
_parent._parent.attack = false;
stop();
Symbol 905 MovieClip Frame 5
_parent._parent.hurt = false;
Symbol 905 MovieClip Frame 8
_parent._parent.setDefaults();
Symbol 917 MovieClip Frame 10
stop();
Symbol 953 MovieClip Frame 7
stop();
Symbol 954 MovieClip Frame 1
stop();
Symbol 954 MovieClip Frame 10
stop();
Symbol 954 MovieClip Frame 18
stop();
Symbol 954 MovieClip Frame 26
stop();
Symbol 954 MovieClip Frame 33
stop();
Symbol 954 MovieClip Frame 41
stop();
Symbol 954 MovieClip Frame 49
stop();
Symbol 954 MovieClip Frame 58
stop();
Symbol 954 MovieClip Frame 70
stop();
Symbol 954 MovieClip Frame 78
stop();
Symbol 954 MovieClip Frame 85
stop();
Symbol 954 MovieClip Frame 95
stop();
Symbol 954 MovieClip Frame 103
stop();
Symbol 954 MovieClip Frame 112
stop();
Symbol 954 MovieClip Frame 121
stop();
Symbol 954 MovieClip Frame 128
stop();
Symbol 954 MovieClip Frame 134
stop();
Symbol 954 MovieClip Frame 141
stop();
Symbol 954 MovieClip Frame 150
stop();
Symbol 954 MovieClip Frame 160
stop();
Symbol 954 MovieClip Frame 172
stop();
Symbol 954 MovieClip Frame 181
stop();
Symbol 954 MovieClip Frame 189
stop();
Symbol 954 MovieClip Frame 195
stop();
Symbol 955 MovieClip Frame 1
SAttackOn = false;
_root.hero_runSpeed = 14;
_root.hero_jumpHeight = 40;
_root.hero_hitOffset = 1;
_root.hero_power = 10;
stop();
Symbol 955 MovieClip Frame 2
SAttackOn = true;
_root.hero_jumpHeight = 44;
_root.hero_runSpeed = 14;
_root.hero_hitOffset = 1.2;
_root.hero_power = 12;
_root.hero_spower = 14;
stop();
Symbol 955 MovieClip Frame 3
SAttackOn = true;
_root.hero_jumpHeight = 30;
_root.hero_runSpeed = 8;
_root.hero_hitOffset = 0.5;
_root.hero_power = 16;
_root.hero_spower = 25;
stop();
Symbol 955 MovieClip Frame 4
SAttackOn = true;
_root.hero_jumpHeight = 48;
_root.hero_runSpeed = 16;
_root.hero_hitOffset = 1.5;
_root.hero_power = 8;
_root.hero_spower = 8;
stop();
Symbol 955 MovieClip Frame 5
SAttackOn = true;
_root.hero_jumpHeight = 46;
_root.hero_runSpeed = 15;
_root.hero_hitOffset = 0.75;
_root.hero_power = 15;
_root.hero_spower = 20;
stop();
Symbol 963 Button
on (release) {
gotoAndStop (2);
clickon();
}
Symbol 965 Button
on (release) {
gotoAndStop (1);
clickoff();
}
Symbol 966 MovieClip Frame 1
stop();
Symbol 966 MovieClip Frame 2
stop();
Symbol 967 MovieClip Frame 1
stop();
Symbol 967 MovieClip Frame 2
stop();
Instance of Symbol 966 MovieClip in Symbol 967 MovieClip Frame 2
onClipEvent (load) {
function clickoff() {
_parent.gotoAndStop(1);
}
gotoAndStop (2);
}
Instance of Symbol 973 MovieClip "bar" in Symbol 974 MovieClip Frame 1
onClipEvent (load) {
barW = _width;
inc = barW / 100;
stop();
}
onClipEvent (enterFrame) {
_width = (_root.hero_life * inc);
gotoAndStop(11 - Math.floor(_root.hero_life * 0.1));
stop();
}
Symbol 980 MovieClip Frame 1
stop();
Symbol 980 MovieClip Frame 2
stop();
Symbol 980 MovieClip Frame 3
stop();
Symbol 980 MovieClip Frame 4
stop();
Symbol 980 MovieClip Frame 5
stop();
Symbol 980 MovieClip Frame 6
stop();
Symbol 980 MovieClip Frame 7
stop();
Symbol 980 MovieClip Frame 8
stop();
Symbol 980 MovieClip Frame 9
stop();
Symbol 980 MovieClip Frame 10
stop();
Instance of Symbol 980 MovieClip "bar" in Symbol 981 MovieClip Frame 1
onClipEvent (load) {
Mytime = _root.timeLimit;
MyW = _width;
Myinc = MyW / Mytime;
MyTenth = Mytime * 0.1;
countBonus = false;
}
onClipEvent (enterFrame) {
if (_root.paused == false) {
_root.timeLimit = _root.timeLimit - 1;
_width = (_root.timeLimit * Myinc);
gotoAndStop(10 - Math.floor(_root.timeLimit / MyTenth));
if (_root.timeLimit <= 0) {
_root.hero.hit(_root.hero._x - 20, 200);
_root.timeOver.gotoAndPlay("flash");
}
}
if (countBonus == true) {
_root.timeLimit = _root.timeLimit - 15;
_root.score = _root.score + 15;
_width = (_root.timeLimit * Myinc);
_root.effects.gotoAndPlay("pointbling");
if (_root.timeLimit < 0) {
_root.timeLimit = 0;
countBonus = false;
tcnt = tcnt + 1;
_width = 0;
_root.transition.gotoAndPlay("fade");
}
}
}
Symbol 995 MovieClip Frame 2
if (_root.hero.hitTest(this)) {
_root.effects.gotoAndPlay("lifeBling");
if (_root.hero_life < 75) {
_root.hero_life = _root.hero_life + 25;
} else {
_root.hero_life = 100;
}
_root.score = _root.score + 50;
unloadMovie (this);
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 1024 MovieClip Frame 1
_parent._parent.hitting = true;
Symbol 1024 MovieClip Frame 5
_parent._parent.hitting = false;
Symbol 1024 MovieClip Frame 9
_parent._parent.ranged = false;
_parent._parent.attacking = false;
_parent._parent.action = "stand";
Symbol 1032 MovieClip Frame 1
_parent._parent.hitting = true;
Symbol 1032 MovieClip Frame 8
_parent._parent.hitting = false;
Symbol 1032 MovieClip Frame 9
_parent._parent.ranged = false;
_parent._parent.attacking = false;
_parent._parent.action = "stand";
Symbol 1036 MovieClip Frame 2
_parent._parent.die = false;
Symbol 1043 MovieClip Frame 1
_root.score = _root.score + _parent._parent.points;
Symbol 1043 MovieClip Frame 10
dcnt = 50;
Symbol 1043 MovieClip Frame 11
dcnt = dcnt - 1;
_alpha = (dcnt * 2);
Symbol 1043 MovieClip Frame 12
dcnt = dcnt - 1;
if (dcnt > 0) {
_alpha = (dcnt * 2);
gotoAndPlay(_currentframe - 1);
}
Symbol 1043 MovieClip Frame 13
_root.totemOn = true;
unloadMovie (_parent._parent);
Symbol 1044 MovieClip Frame 1
stop();
Symbol 1044 MovieClip Frame 8
stop();
Symbol 1044 MovieClip Frame 15
stop();
Symbol 1044 MovieClip Frame 20
stop();
Symbol 1044 MovieClip Frame 28
stop();
Symbol 1044 MovieClip Frame 34
stop();
Symbol 1044 MovieClip Frame 40
stop();
Symbol 1044 MovieClip Frame 43
stop();
Symbol 1045 MovieClip Frame 1
function animate() {
var _local1 = _parent;
var _local2 = _root;
if (_local2.paused == false) {
_local1.point = new Object();
_local1.point.x = _local1._x;
_local1.point.y = _local1._y;
_local1._parent.localToGlobal(_local1.point);
_local1.myX = _local1.point.x;
_local1.myY = _local1.point.y;
_local1.heroY = _local2.hero._y;
_local1.heroX = _local2.hero._x;
_local1.Lpoint = new Object();
_local1.Rpoint = new Object();
_local1.Lpoint.x = _local1.Llim;
_local1.Lpoint.y = 0;
_local1.Rpoint.x = _local1.Rlim;
_local1.Rpoint.y = 0;
_local1._parent.localToGlobal(_local1.Lpoint);
_local1._parent.localToGlobal(_local1.Rpoint);
_local1.GRlim = _local1.Rpoint.x + 150;
_local1.GLlim = _local1.Lpoint.x - 150;
if ((((_local1.myX < (_local2.stageW + 20)) and (_local1.myX > -20)) and (_local1.myY > -60)) and (_local1.myY < (_local2.stageH + 75))) {
_local1.onscreen = true;
_local1._visible = true;
} else {
_local1.onscreen = false;
_local1._visible = false;
}
if (_local1.die == false) {
if (_local1.onscreen == true) {
if (_local1.hitTest(_local2.hero)) {
if (_local2.jumpOnHeads == true) {
if (_local2.hero.ymv > 10) {
_local1.hit(_local2.hero_power);
_local2.hero.ymv = -_local2.hero_jumpHeight;
}
}
if ((_local2.hero.attack == false) and (_local2.hero.sattack == false)) {
if (_local1.hitting == true) {
_local2.hero.hit(_local1.myX, _local1.handDamage);
}
} else if (_local2.hero.sattack == true) {
_local1.hit(_local2.hero_spower);
} else if (_local1.hitzone == true) {
if (_local1.hitarea.hitTest(_local2.hero)) {
_local1.hit(_local2.hero_power);
}
} else if (_local2.hero.MyState != 4) {
_local1.hit(_local2.hero_power);
}
}
if (_local1.hitTest(_local1._parent.arrow1) == true) {
if (_local1.hitzone == true) {
if (_local1._parent.arrow1.hitTest(_local1.hitarea)) {
_local1.hit(_local2.hero_power);
_local1._parent.arrow1.hit();
} else {
_local1._parent.arrow1.hit();
}
} else {
_local1.hit(_local2.hero_power);
_local1._parent.arrow1.hit();
}
}
}
_local1.movements.gotoAndPlay(_local1.action);
if (_local1.trackGround == true) {
_local1.mv = _local2.En_hitcheck(_local1._name);
}
_local1._y = _local1._y + _local1.mv;
if (_local1.attacking == true) {
if (_local1.ranged == false) {
_local1.action = "attack";
if ((_local1.myX < (_local1.heroX - 30)) or (_local1.myX > (_local1.heroX + 30))) {
if (((_local1._x - ((_local1.speed * _local1.dir) * 2)) < _local1.RLim) and ((_local1._x - ((_local1.speed * _local1.dir) * 2)) > _local1.Llim)) {
_local1._x = _local1._x - ((_local1.speed * _local1.dir) * 2);
}
}
} else {
_local1.action = "sattack";
}
} else {
if (_local1._x > _local1.Rlim) {
_local1.pauseCnt = _local1.pauseCnt + 1;
if (_local1.pauseCnt < _local1.pauseTime) {
_local1.action = "stand";
} else {
_local1.pauseCnt = 0;
_local1.dir = 1;
_local1.action = "walk";
_local1._x = _local1.Rlim - 2;
}
} else if (_local1._x < _local1.Llim) {
_local1.pauseCnt = _local1.pauseCnt + 1;
if (_local1.pauseCnt < _local1.pauseTime) {
_local1.action = "stand";
} else {
_local1.pauseCnt = 0;
_local1.dir = -1;
_local1.action = "walk";
_local1._x = _local1.Llim + 2;
}
} else {
_local1._x = _local1._x - (_local1.speed * _local1.dir);
_local1.action = "walk";
}
if ((_local2.hero.die == false) and (_local2.hero.hurt == false)) {
trace((((_local1.GRlim + "/") + _local1.heroX) + "/") + _local1.GRlim);
if ((((_local1.heroY < (_local1.myY + 35)) and (_local1.heroY > (_local1.myY - _local1._height))) and (_local1.heroX < _local1.GRlim)) and (_local1.heroX > _local1.GLlim)) {
_local1.attacking = true;
_local1.ranged = false;
if (_local1.heroX < _local1.myX) {
_local1.dir = 1;
} else {
_local1.dir = -1;
}
} else if (_local1.rangedAttack == true) {
if ((((_local1.heroY < (_local1.myY + 35)) and (_local1.heroY > (_local1.myY - _local1._height))) and (_local1.heroX < _local1.GRlim)) and (_local1.heroX > _local1.GLlim)) {
_local1.attacking = true;
_local1.ranged = true;
if (_local1.heroX < _local1.myX) {
_local1.dir = 1;
} else {
_local1.dir = -1;
}
}
}
}
}
_local1._xscale = _local1.orgx * _local1.dir;
} else if (_local1.life > 0) {
_local1.action = "hurt";
} else {
_local1.action = "die";
}
_local1.movements.gotoAndStop(_local1.action);
} else if (_local1.die == false) {
_local1.movements.gotoAndStop("stand");
}
}
Symbol 1045 MovieClip Frame 2
stop();
Instance of Symbol 1045 MovieClip in Symbol 1046 MovieClip Frame 1
onClipEvent (enterFrame) {
animate();
}
Symbol 1046 MovieClip Frame 2
stop();
Instance of Symbol 991 MovieClip "floor" in Symbol 1047 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 121 MovieClip in Symbol 1047 MovieClip Frame 1
onClipEvent (load) {
nextlevel = _root.nextLevel;
Mytarget = "nextlevel";
}
onClipEvent (enterFrame) {
if (_root.totemOn == true) {
if ((_root.hero.sattack == false) and ((_root.hero.action == "run") or (_root.hero.action == "stand"))) {
if (_root.hero.hitTest(this)) {
if (_root.paused == false) {
_root.paused = true;
_root.transition.target = Mytarget;
_root.level = nextlevel;
_root.panels.timer.bar.countBonus = true;
}
}
}
}
}
Instance of Symbol 165 MovieClip "enemy1" in Symbol 1047 MovieClip Frame 1
onClipEvent (load) {
function hit(power) {
if (die == false) {
life = life - power;
die = true;
}
}
firePower = _root.enemy2ShotPower;
life = _root.enemy2Life;
handDamage = _root.enemy2HitPower;
points = _root.enemy2PointsAwarded;
trackGround = false;
handRange = 60;
walks = true;
speed = 6;
distance = 500;
pauseTime = 20;
startDirection = "left";
rangedAttack = false;
fireRange = 300;
fireSpeed = 40;
fireType = "glowball";
fireMovement = "air";
fireXoffset = 40;
fireYoffset = 63;
pauseCnt = 0;
if (walks == false) {
distance = 1;
speed = 1;
}
Rlim = _x + (distance * 0.5);
Llim = _x - (distance * 0.5);
orgx = _xscale;
if (startDirection == "right") {
dir = -1;
} else {
dir = 1;
}
ymv = 0;
die = false;
action = "stand";
attacking = false;
ranged = false;
hitting = false;
}
Instance of Symbol 168 MovieClip "en_bullet" in Symbol 1047 MovieClip Frame 1
onClipEvent (load) {
function fire(xloc, yloc, dir, speed, type, movement, power) {
cnt = cnt + 1;
bulletName = "bullet" + cnt;
duplicateMovieClip (this, "bullet" + cnt, cnt);
eval ("_parent." + bulletName).myspeed = speed * (-dir);
eval ("_parent." + bulletName).mytype = type;
eval ("_parent." + bulletName).dir = -dir;
eval ("_parent." + bulletName)._x = xloc;
eval ("_parent." + bulletName)._y = yloc;
eval ("_parent." + bulletName).power = power;
eval ("_parent." + bulletName).movement = movement;
eval ("_parent." + bulletName).Flying = true;
}
function hit() {
Flying = false;
_x = 1000;
_y = -1000;
removeMovieClip(this);
}
cnt = 100;
}
onClipEvent (enterFrame) {
if (_root.paused == false) {
if (Flying == true) {
_xscale = (dir * 100);
gotoAndStop(mytype);
point = new Object();
point.x = _x;
point.y = _y;
_parent.localToGlobal(point);
myX = point.x;
myY = point.y;
_x = (_x + myspeed);
if (movement == "ground") {
mv = _root.En_hitcheck(_name);
_y = (_y + mv);
}
if (this.hitTest(_root.hero)) {
_root.hero.hit(myX, power);
hit();
}
if ((myX > (_root.stageW + 20)) or (myX < -20)) {
hit();
}
}
}
}
Instance of Symbol 257 MovieClip "enemy3" in Symbol 1047 MovieClip Frame 1
onClipEvent (load) {
function hit(power) {
if (die == false) {
life = life - power;
die = true;
}
}
firePower = _root.enemy1ShotPower;
life = _root.enemy1Life;
handDamage = _root.enemy1HitPower;
points = _root.enemy1PointsAwarded;
trackGround = true;
handRange = 65;
walks = true;
speed = 4;
distance = 75;
pauseTime = 35;
startDirection = "right";
rangedAttack = false;
fireRange = 300;
fireSpeed = 40;
fireType = "glowball";
fireMovement = "air";
fireXoffset = 40;
fireYoffset = 63;
pauseCnt = 0;
if (walks == false) {
distance = 1;
speed = 1;
}
Rlim = _x + (distance * 0.5);
Llim = _x - (distance * 0.5);
orgx = _xscale;
if (startDirection == "right") {
dir = -1;
} else {
dir = 1;
}
ymv = 0;
die = false;
action = "stand";
attacking = false;
ranged = false;
hitting = false;
}
Instance of Symbol 257 MovieClip "enemy6" in Symbol 1047 MovieClip Frame 1
onClipEvent (load) {
function hit(power) {
if (die == false) {
life = life - power;
die = true;
}
}
firePower = _root.enemy1ShotPower;
life = _root.enemy1Life;
handDamage = _root.enemy1HitPower;
points = _root.enemy1PointsAwarded;
trackGround = true;
handRange = 65;
walks = true;
speed = 6;
distance = 350;
pauseTime = 25;
startDirection = "right";
rangedAttack = false;
fireRange = 300;
fireSpeed = 40;
fireType = "glowball";
fireMovement = "air";
fireXoffset = 40;
fireYoffset = 63;
pauseCnt = 0;
if (walks == false) {
distance = 1;
speed = 1;
}
Rlim = _x + (distance * 0.5);
Llim = _x - (distance * 0.5);
orgx = _xscale;
if (startDirection == "right") {
dir = -1;
} else {
dir = 1;
}
ymv = 0;
die = false;
action = "stand";
attacking = false;
ranged = false;
hitting = false;
}
Instance of Symbol 257 MovieClip "enemy5" in Symbol 1047 MovieClip Frame 1
onClipEvent (load) {
function hit(power) {
if (die == false) {
life = life - power;
die = true;
}
}
firePower = _root.enemy1ShotPower;
life = _root.enemy1Life;
handDamage = _root.enemy1HitPower;
points = _root.enemy1PointsAwarded;
trackGround = true;
handRange = 65;
walks = false;
speed = 3;
distance = 150;
pauseTime = 25;
startDirection = "right";
rangedAttack = false;
fireRange = 300;
fireSpeed = 40;
fireType = "glowball";
fireMovement = "air";
fireXoffset = 40;
fireYoffset = 63;
pauseCnt = 0;
if (walks == false) {
distance = 1;
speed = 1;
}
Rlim = _x + (distance * 0.5);
Llim = _x - (distance * 0.5);
orgx = _xscale;
if (startDirection == "right") {
dir = -1;
} else {
dir = 1;
}
ymv = 0;
die = false;
action = "stand";
attacking = false;
ranged = false;
hitting = false;
}
Instance of Symbol 257 MovieClip "enemy7" in Symbol 1047 MovieClip Frame 1
onClipEvent (load) {
function hit(power) {
if (die == false) {
life = life - power;
die = true;
}
}
firePower = _root.enemy1ShotPower;
life = _root.enemy1Life;
handDamage = _root.enemy1HitPower;
points = _root.enemy1PointsAwarded;
trackGround = true;
handRange = 65;
walks = false;
speed = 5;
distance = 250;
pauseTime = 20;
startDirection = "left";
rangedAttack = false;
fireRange = 300;
fireSpeed = 40;
fireType = "glowball";
fireMovement = "air";
fireXoffset = 40;
fireYoffset = 63;
pauseCnt = 0;
if (walks == false) {
distance = 1;
speed = 1;
}
Rlim = _x + (distance * 0.5);
Llim = _x - (distance * 0.5);
orgx = _xscale;
if (startDirection == "right") {
dir = -1;
} else {
dir = 1;
}
ymv = 0;
die = false;
action = "stand";
attacking = false;
ranged = false;
hitting = false;
}
Instance of Symbol 165 MovieClip "enemy2" in Symbol 1047 MovieClip Frame 1
onClipEvent (load) {
function hit(power) {
if (die == false) {
life = life - power;
die = true;
}
}
firePower = _root.enemy2ShotPower;
life = _root.enemy2Life;
handDamage = _root.enemy2HitPower;
points = _root.enemy2PointsAwarded;
trackGround = false;
handRange = 60;
walks = true;
speed = 5;
distance = 400;
pauseTime = 45;
startDirection = "right";
rangedAttack = false;
fireRange = 300;
fireSpeed = 40;
fireType = "glowball";
fireMovement = "air";
fireXoffset = 40;
fireYoffset = 63;
pauseCnt = 0;
if (walks == false) {
distance = 1;
speed = 1;
}
Rlim = _x + (distance * 0.5);
Llim = _x - (distance * 0.5);
orgx = _xscale;
if (startDirection == "right") {
dir = -1;
} else {
dir = 1;
}
ymv = 0;
die = false;
action = "stand";
attacking = false;
ranged = false;
hitting = false;
}
Instance of Symbol 314 MovieClip "enemy11" in Symbol 1047 MovieClip Frame 1
onClipEvent (load) {
function hit(power) {
if (die == false) {
life = life - power;
die = true;
}
}
firePower = _root.enemy3ShotPower;
life = _root.enemy3Life;
handDamage = _root.enemy3HitPower;
points = _root.enemy3PointsAwarded;
trackGround = true;
handRange = 90;
walks = false;
speed = 4;
distance = 250;
pauseTime = 35;
startDirection = "right";
rangedAttack = false;
fireRange = 300;
fireSpeed = 40;
fireType = "glowball";
fireMovement = "air";
fireXoffset = 40;
fireYoffset = 63;
pauseCnt = 0;
if (walks == false) {
distance = 1;
speed = 1;
}
Rlim = _x + (distance * 0.5);
Llim = _x - (distance * 0.5);
orgx = _xscale;
if (startDirection == "right") {
dir = -1;
} else {
dir = 1;
}
ymv = 0;
die = false;
action = "stand";
attacking = false;
ranged = false;
hitting = false;
}
Instance of Symbol 314 MovieClip "enemy12" in Symbol 1047 MovieClip Frame 1
onClipEvent (load) {
function hit(power) {
if (die == false) {
life = life - power;
die = true;
}
}
firePower = _root.enemy3ShotPower;
life = _root.enemy3Life;
handDamage = _root.enemy3HitPower;
points = _root.enemy3PointsAwarded;
trackGround = true;
handRange = 90;
walks = true;
speed = 7;
distance = 600;
pauseTime = 15;
startDirection = "right";
rangedAttack = false;
fireRange = 300;
fireSpeed = 40;
fireType = "glowball";
fireMovement = "air";
fireXoffset = 40;
fireYoffset = 63;
pauseCnt = 0;
if (walks == false) {
distance = 1;
speed = 1;
}
Rlim = _x + (distance * 0.5);
Llim = _x - (distance * 0.5);
orgx = _xscale;
if (startDirection == "right") {
dir = -1;
} else {
dir = 1;
}
ymv = 0;
die = false;
action = "stand";
attacking = false;
ranged = false;
hitting = false;
}
Instance of Symbol 165 MovieClip "enemy9" in Symbol 1047 MovieClip Frame 1
onClipEvent (load) {
function hit(power) {
if (die == false) {
life = life - power;
die = true;
}
}
firePower = _root.enemy2ShotPower;
life = _root.enemy2Life;
handDamage = _root.enemy2HitPower;
points = _root.enemy2PointsAwarded;
trackGround = false;
handRange = 60;
walks = true;
speed = 7;
distance = 300;
pauseTime = 10;
startDirection = "right";
rangedAttack = false;
fireRange = 300;
fireSpeed = 40;
fireType = "glowball";
fireMovement = "air";
fireXoffset = 40;
fireYoffset = 63;
pauseCnt = 0;
if (walks == false) {
distance = 1;
speed = 1;
}
Rlim = _x + (distance * 0.5);
Llim = _x - (distance * 0.5);
orgx = _xscale;
if (startDirection == "right") {
dir = -1;
} else {
dir = 1;
}
ymv = 0;
die = false;
action = "stand";
attacking = false;
ranged = false;
hitting = false;
}
Instance of Symbol 165 MovieClip "enemy10" in Symbol 1047 MovieClip Frame 1
onClipEvent (load) {
function hit(power) {
if (die == false) {
life = life - power;
die = true;
}
}
firePower = _root.enemy2ShotPower;
life = _root.enemy2Life;
handDamage = _root.enemy2HitPower;
points = _root.enemy2PointsAwarded;
trackGround = false;
handRange = 60;
walks = true;
speed = 7;
distance = 300;
pauseTime = 29;
startDirection = "left";
rangedAttack = false;
fireRange = 300;
fireSpeed = 40;
fireType = "glowball";
fireMovement = "air";
fireXoffset = 40;
fireYoffset = 63;
pauseCnt = 0;
if (walks == false) {
distance = 1;
speed = 1;
}
Rlim = _x + (distance * 0.5);
Llim = _x - (distance * 0.5);
orgx = _xscale;
if (startDirection == "right") {
dir = -1;
} else {
dir = 1;
}
ymv = 0;
die = false;
action = "stand";
attacking = false;
ranged = false;
hitting = false;
}
Instance of Symbol 314 MovieClip "enemy8" in Symbol 1047 MovieClip Frame 1
onClipEvent (load) {
function hit(power) {
if (die == false) {
life = life - power;
die = true;
}
}
firePower = _root.enemy3ShotPower;
life = _root.enemy3Life;
handDamage = _root.enemy3HitPower;
points = _root.enemy3PointsAwarded;
trackGround = true;
handRange = 90;
walks = false;
speed = 6;
distance = 150;
pauseTime = 15;
startDirection = "right";
rangedAttack = false;
fireRange = 300;
fireSpeed = 40;
fireType = "glowball";
fireMovement = "air";
fireXoffset = 40;
fireYoffset = 63;
pauseCnt = 0;
if (walks == false) {
distance = 1;
speed = 1;
}
Rlim = _x + (distance * 0.5);
Llim = _x - (distance * 0.5);
orgx = _xscale;
if (startDirection == "right") {
dir = -1;
} else {
dir = 1;
}
ymv = 0;
die = false;
action = "stand";
attacking = false;
ranged = false;
hitting = false;
}
Instance of Symbol 314 MovieClip "enemy4" in Symbol 1047 MovieClip Frame 1
onClipEvent (load) {
function hit(power) {
if (die == false) {
life = life - power;
die = true;
}
}
firePower = _root.enemy3ShotPower;
life = _root.enemy3Life;
handDamage = _root.enemy3HitPower;
points = _root.enemy3PointsAwarded;
trackGround = true;
handRange = 90;
walks = true;
speed = 6;
distance = 350;
pauseTime = 40;
startDirection = "left";
rangedAttack = false;
fireRange = 300;
fireSpeed = 40;
fireType = "glowball";
fireMovement = "air";
fireXoffset = 40;
fireYoffset = 63;
pauseCnt = 0;
if (walks == false) {
distance = 1;
speed = 1;
}
Rlim = _x + (distance * 0.5);
Llim = _x - (distance * 0.5);
orgx = _xscale;
if (startDirection == "right") {
dir = -1;
} else {
dir = 1;
}
ymv = 0;
die = false;
action = "stand";
attacking = false;
ranged = false;
hitting = false;
}
Instance of Symbol 165 MovieClip "enemy1b" in Symbol 1047 MovieClip Frame 1
onClipEvent (load) {
function hit(power) {
if (die == false) {
life = life - power;
die = true;
}
}
firePower = _root.enemy2ShotPower;
life = _root.enemy2Life;
handDamage = _root.enemy2HitPower;
points = _root.enemy2PointsAwarded;
trackGround = false;
handRange = 60;
walks = true;
speed = 6;
distance = 500;
pauseTime = 10;
startDirection = "right";
rangedAttack = false;
fireRange = 300;
fireSpeed = 40;
fireType = "glowball";
fireMovement = "air";
fireXoffset = 40;
fireYoffset = 63;
pauseCnt = 0;
if (walks == false) {
distance = 1;
speed = 1;
}
Rlim = _x + (distance * 0.5);
Llim = _x - (distance * 0.5);
orgx = _xscale;
if (startDirection == "right") {
dir = -1;
} else {
dir = 1;
}
ymv = 0;
die = false;
action = "stand";
attacking = false;
ranged = false;
hitting = false;
}
Instance of Symbol 165 MovieClip "enemy9b" in Symbol 1047 MovieClip Frame 1
onClipEvent (load) {
function hit(power) {
if (die == false) {
life = life - power;
die = true;
}
}
firePower = _root.enemy2ShotPower;
life = _root.enemy2Life;
handDamage = _root.enemy2HitPower;
points = _root.enemy2PointsAwarded;
trackGround = false;
handRange = 60;
walks = true;
speed = 7;
distance = 300;
pauseTime = 15;
startDirection = "left";
rangedAttack = false;
fireRange = 300;
fireSpeed = 40;
fireType = "glowball";
fireMovement = "air";
fireXoffset = 40;
fireYoffset = 63;
pauseCnt = 0;
if (walks == false) {
distance = 1;
speed = 1;
}
Rlim = _x + (distance * 0.5);
Llim = _x - (distance * 0.5);
orgx = _xscale;
if (startDirection == "right") {
dir = -1;
} else {
dir = 1;
}
ymv = 0;
die = false;
action = "stand";
attacking = false;
ranged = false;
hitting = false;
}
Instance of Symbol 314 MovieClip "enemy8b" in Symbol 1047 MovieClip Frame 1
onClipEvent (load) {
function hit(power) {
if (die == false) {
life = life - power;
die = true;
}
}
firePower = _root.enemy3ShotPower;
life = _root.enemy3Life;
handDamage = _root.enemy3HitPower;
points = _root.enemy3PointsAwarded;
trackGround = true;
handRange = 90;
walks = true;
speed = 6;
distance = 150;
pauseTime = 15;
startDirection = "right";
rangedAttack = false;
fireRange = 300;
fireSpeed = 40;
fireType = "glowball";
fireMovement = "air";
fireXoffset = 40;
fireYoffset = 63;
pauseCnt = 0;
if (walks == false) {
distance = 1;
speed = 1;
}
Rlim = _x + (distance * 0.5);
Llim = _x - (distance * 0.5);
orgx = _xscale;
if (startDirection == "right") {
dir = -1;
} else {
dir = 1;
}
ymv = 0;
die = false;
action = "stand";
attacking = false;
ranged = false;
hitting = false;
}
Instance of Symbol 1046 MovieClip "boss" in Symbol 1047 MovieClip Frame 1
onClipEvent (load) {
function hit(power) {
if (die == false) {
life = life - power;
die = true;
}
}
firePower = _root.BossPower;
life = _root.BossLife;
handDamage = _root.BossPower;
points = _root.BossPointsAwarded;
trackGround = true;
handRange = 150;
walks = true;
speed = 15;
distance = 200;
pauseTime = 45;
startDirection = "left";
rangedAttack = false;
fireRange = 300;
fireSpeed = 40;
fireType = "glowball";
fireMovement = "air";
fireXoffset = 40;
fireYoffset = 63;
pauseCnt = 0;
if (walks == false) {
distance = 1;
speed = 1;
}
Rlim = _x + (distance * 0.5);
Llim = _x - (distance * 0.5);
orgx = _xscale;
if (startDirection == "right") {
dir = -1;
} else {
dir = 1;
}
ymv = 0;
die = false;
action = "stand";
attacking = false;
ranged = false;
hitting = false;
}
Instance of Symbol 317 MovieClip "arrow1" in Symbol 1047 MovieClip Frame 1
onClipEvent (load) {
function fire(xloc, yloc, dir, fireT) {
firetype = fireT;
myspeed = _root.hero_shot1Speed * (-dir);
_xscale = (xsorg * (-dir));
point = new Object();
point.x = xloc;
point.y = yloc;
_parent.globalToLocal(point);
_x = point.x;
_y = point.y;
gotoAndPlay (1);
Flying = true;
}
function hit() {
Flying = false;
_x = 1000;
_y = -1000;
}
Flying = false;
xsorg = _xscale;
cnt = 20;
}
onClipEvent (enterFrame) {
if (_root.paused == false) {
if (Flying == true) {
sym.gotoAndStop(firetype);
point = new Object();
point.x = _x;
point.y = _y;
_parent.localToGlobal(point);
myX = point.x;
myY = point.y;
_x = (_x + myspeed);
if ((myX > 570) or (myX < -20)) {
hit();
}
}
}
}
Symbol 1047 MovieClip Frame 2
stop();