Frame 1
var MochiAd = {showPreloaderAd:function (options) {
var _local29 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812};
options = MochiAd._parseOptions(options, _local29);
var _local15 = options.clip;
var _local25 = 11000;
var _local28 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)) {
return(undefined);
}
_local15.stop();
var mc = _local15._mochiad;
mc.onUnload = function () {
this._parent.play();
};
var _local16 = MochiAd._getRes(options);
var _local5 = _local16[0];
var _local14 = _local16[1];
mc._x = _local5 * 0.5;
mc._y = _local14 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local5 * -0.5;
chk._y = _local14 * -0.5;
var _local8 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local8._x = 10;
_local8._y = _local14 - 20;
var _local24 = options.color;
delete options.color;
var _local21 = options.background;
delete options.background;
var _local26 = options.outline;
delete options.outline;
var _local6 = _local8.createEmptyMovieClip("_outline", 1);
_local6.beginFill(_local21);
_local6.moveTo(0, 0);
_local6.lineTo(_local5 - 20, 0);
_local6.lineTo(_local5 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
_local6.endFill();
var _local4 = _local8.createEmptyMovieClip("_inside", 2);
_local4.beginFill(_local24);
_local4.moveTo(0, 0);
_local4.lineTo(_local5 - 20, 0);
_local4.lineTo(_local5 - 20, 10);
_local4.lineTo(0, 10);
_local4.lineTo(0, 0);
_local4.endFill();
_local4._xscale = 0;
var _local7 = _local8.createEmptyMovieClip("_outline", 3);
_local7.lineStyle(0, _local26, 100);
_local7.moveTo(0, 0);
_local7.lineTo(_local5 - 20, 0);
_local7.lineTo(_local5 - 20, 10);
_local7.lineTo(0, 10);
_local7.lineTo(0, 0);
chk.ad_msec = _local25;
chk.ad_timeout = _local28;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}, showTimedAd:function (options) {
var _local15 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd"};
options = MochiAd._parseOptions(options, _local15);
var _local6 = options.clip;
var _local12 = 11000;
var _local14 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)) {
return(undefined);
}
_local6.stop();
var mc = _local6._mochiad;
mc.onUnload = function () {
this._parent.play();
};
var _local7 = MochiAd._getRes(options);
var _local16 = _local7[0];
var _local13 = _local7[1];
mc._x = _local16 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local12;
chk.ad_timeout = _local14;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}, _allowDomains:function (server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}, _loadCommunicator:function (options) {
var _local25 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, _local25);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = "1.4";
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!MochiAd._isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
MochiAd._allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local24 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local24);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb) {
cb = parseInt(cb);
var _local4 = this._callbacks[cb];
if (!_local4) {
return(undefined);
}
delete this._callbacks[cb];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}, fetchHighScores:function (options, callbackObj, callbackMethod) {
var _local1 = MochiAd._loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}, sendHighScore:function (options, callbackObj, callbackMethod) {
var _local1 = MochiAd._loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}, load:function (options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = "1.4";
var _local7 = options.clip;
if (!MochiAd._isNetworkAvailable()) {
return(null);
}
if (_local7._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local7.createEmptyMovieClip("_mochiad", _local12);
var _local11 = MochiAd._getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local7._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
if (_local7._url.indexOf("http") != 0) {
options.no_page = true;
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = MochiAd._allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local9 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local9;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local9);
_local6.lc = _local5;
_local4.lc = _local9;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}, unload:function (clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}, _isNetworkAvailable:function () {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}, _getRes:function (options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}, _parseOptions:function (options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local4);
}, _:null};
_root.unlock1 = false;
_root.unlock2 = false;
_root.login = false;
Stage.showMenu = false;
MochiAd.showPreloaderAd({id:"cb8716014512c2ef", res:"500x510"});
Frame 7
function updatePlayed() {
send_lv = new LoadVars();
take_lv = new LoadVars();
send_lv.game = "paintball";
take_lv.onLoad = function (success) {
if (success) {
}
};
send_lv.sendAndLoad("http://www.axis-games.com/addplayed.php", take_lv, "POST");
}
updatePlayed();
stop();
Frame 13
function sendForm() {
submit_lv = new LoadVars();
result_lv = new LoadVars();
submit_lv.user = _root.field1;
submit_lv.pass = _root.field2;
result_lv.onLoad = function (success) {
if (success) {
if (result_lv.flashuser != "invalid") {
_root.login = true;
_root.userInfo._visible = true;
_root.loginInfo._visible = false;
_root.userName = result_lv.flashuser;
_root.pass = _root.field2;
_root.totalPoints = result_lv.flashtap;
_root.spentPoints = result_lv.flashsap;
_root.currentPoints = result_lv.flashcap;
} else {
_root.loginInfo.status_txt = "Invalid Login";
_root.field1 = "";
_root.field2 = "";
}
}
};
submit_lv.sendAndLoad("http://www.axis-games.com/checklogin.php", result_lv, "POST");
}
stopAllSounds();
if (_root.login == false) {
_root.userInfo._visible = false;
} else {
_root.userInfo._visible = true;
_root.loginInfo._visible = false;
}
stop();
loginInfo.submit_btn.onRelease = function () {
sendForm();
_root.loginInfo.status_txt = "Processing...";
};
Frame 20
stopAllSounds();
if (_root.login) {
login_status = "You are logged in";
} else {
login_status = "You are NOT logged in.";
}
timer = 0;
_root.onEnterFrame = function () {
timer++;
if (timer == 1) {
_root.ball1.gotoAndPlay(2);
}
if (timer == 12) {
_root.ball2.gotoAndPlay(2);
}
if (timer == 24) {
_root.ball3.gotoAndPlay(2);
}
if (timer == 36) {
_root.ball4.gotoAndPlay(2);
}
if (timer == 48) {
_root.ball5.gotoAndPlay(2);
}
};
Frame 21
stop();
Frame 49
function playSound(name) {
if (soundOn) {
soundFX.gotoAndPlay(name);
}
}
function resetEnemy() {
_root.field.enemy1.gotoAndPlay("run");
_root.field.eRespawnTimer._y = -50;
if ((!heroFlag) || (d > 2)) {
engage = false;
}
_root.field.enemy1._x = random(450) + 50;
_root.field.enemy1._y = 10;
findPoint = random(6) * 8;
enemyFlag = false;
}
function resetHero() {
running = true;
_root.field.hero.gotoAndPlay("run");
_root.field.hRespawnTimer._y = -50;
_root.field.hero._x = random(450) + 50;
_root.field.hero._y = 440;
heroFlag = false;
}
function enemyAI() {
if ((enemyRun == false) && (!enemyShot)) {
_root.field.enemy1.gotoAndPlay("run");
enemyRun = true;
}
_root.field.lineOfSite._x = _root.field.enemy1._x;
_root.field.lineOfSite._y = _root.field.enemy1._y;
_root.field.lineOfSite._rotation = _root.field.enemy1._rotation;
if (engage == false) {
if (_root.field.hero.hitTest(_root.field.lineOfSite) && (heroShot == false)) {
engage = true;
}
if ((flagDown == false) && (retakeFlag == false)) {
destX = patrolPoints[findPoint];
destY = patrolPoints[findPoint + 1];
}
if ((blueFlagDown == true) && (chasingFlag == false)) {
destX = _root.field.blueFlag._x;
destY = _root.field.blueFlag._y;
retakeFlag = true;
}
if (eHit) {
okBlocks = 0;
if (moveDir == "up") {
_root.field.enemy1._y = _root.field.enemy1._y - enemySpeed;
vDir = "up";
} else if (moveDir == "down") {
_root.field.enemy1._y = _root.field.enemy1._y + enemySpeed;
vDir = "down";
} else if (moveDir == "right") {
_root.field.enemy1._x = _root.field.enemy1._x + enemySpeed;
hDir = "right";
} else if (moveDir == "left") {
_root.field.enemy1._x = _root.field.enemy1._x - enemySpeed;
hDir = "left";
}
var _local3 = 1;
while (_local3 < 16) {
var _local2 = "stop" + _local3;
if (_root.field.enemy1.hitTest(_root.field[_local2])) {
} else {
okBlocks++;
}
if (okBlocks == 15) {
eHit = false;
}
_local3++;
}
okBlocks = 0;
}
if ((((destX <= _root.field.enemy1._x) && (metX == false)) && (eHit == false)) && (engage == false)) {
_root.field.enemy1._x = _root.field.enemy1._x - enemySpeed;
hDir = "left";
if (_root.field.enemy1._x <= destX) {
metX = true;
_root.field.enemy1._x = destX;
}
}
if ((((destX > _root.field.enemy1._x) && (metX == false)) && (eHit == false)) && (engage == false)) {
_root.field.enemy1._x = _root.field.enemy1._x + enemySpeed;
hDir = "right";
if (_root.field.enemy1._x >= destX) {
metX = true;
_root.field.enemy1._x = destX;
}
}
var _local3 = 1;
while (_local3 < 16) {
var _local2 = "stop" + _local3;
if (_root.field.enemy1.hitTest(_root.field[_local2]) && (eHit == false)) {
eHit = true;
stopDir = hDir;
_local3 = 16;
okBlocks = 0;
if (_root.field.enemy1._y < destY) {
moveDir = "down";
} else {
moveDir = "up";
}
} else if (!(_root.field.enemy1.hitTest(_root.field[_local2]) && (eHit == false))) {
okBlocks++;
}
if ((okBlocks == 15) && (eHit == false)) {
okBlocks = 0;
}
_local3++;
}
if ((((destY <= _root.field.enemy1._y) && (metY == false)) && (eHit == false)) && (engage == false)) {
_root.field.enemy1._y = _root.field.enemy1._y - enemySpeed;
vDir = "up";
if (_root.field.enemy1._y <= destY) {
metY = true;
_root.field.enemy1._y = destY;
}
}
if ((((destY > _root.field.enemy1._y) && (metY == false)) && (eHit == false)) && (engage == false)) {
_root.field.enemy1._y = _root.field.enemy1._y + enemySpeed;
vDir = "down";
if (_root.field.enemy1._y >= destY) {
metY = true;
_root.field.enemy1._y = destY;
}
}
_local3 = 1;
while (_local3 < 16) {
var _local2 = "stop" + _local3;
if (_root.field.enemy1.hitTest(_root.field[_local2]) && (eHit == false)) {
eHit = true;
stopDir = vDir;
_local3 = 16;
okBlocks = 0;
if (_root.field.enemy1._x < destX) {
moveDir = "right";
} else {
moveDir = "left";
}
} else if (!(_root.field.enemy1.hitTest(_root.field[_local2]) && (eHit == false))) {
okBlocks++;
}
if ((okBlocks == 15) && (eHit == false)) {
okBlocks = 0;
}
_local3++;
}
if (metY) {
vDir = "null";
}
if (metX) {
hDir = "null";
}
if ((vDir == "up") && (hDir == "null")) {
_root.field.enemy1._rotation = 1;
} else if ((vDir == "up") && (hDir == "right")) {
_root.field.enemy1._rotation = 45;
} else if ((vDir == "null") && (hDir == "right")) {
_root.field.enemy1._rotation = 90;
} else if ((vDir == "down") && (hDir == "right")) {
_root.field.enemy1._rotation = 135;
} else if ((vDir == "down") && (hDir == "null")) {
_root.field.enemy1._rotation = 179;
} else if ((vDir == "down") && (hDir == "left")) {
_root.field.enemy1._rotation = -135;
} else if ((vDir == "null") && (hDir == "left")) {
_root.field.enemy1._rotation = -90;
} else if ((vDir == "up") && (hDir == "left")) {
_root.field.enemy1._rotation = 45;
}
if (metX && (metY)) {
if (flagDown == false) {
if (enemyFlag) {
if (((((((((findPoint == 0) || (findPoint == 8)) || (findPoint == 16)) || (findPoint == 24)) || (findPoint == 32)) || (findPoint == 40)) || (findPoint == 48)) || (findPoint == 56)) || (findPoint == 64)) {
findPoint = 56;
} else {
findPoint = findPoint - 2;
}
} else {
findPoint = findPoint + 2;
}
}
metX = false;
metY = false;
}
}
if (engage) {
eShoot();
var _local5 = _root.field.enemy1._x;
var _local4 = _root.field.enemy1._y;
var _local10 = _root.field.hero._x;
var _local8 = _root.field.hero._y;
var _local7 = _local10 - _local5;
var _local6 = _local8 - _local4;
var _local9 = Math.atan2(_local6, _local7);
ang2 = (_local9 * 57.2957795130823) + 90;
_root.field.enemy1._rotation = ang2;
if (eHit) {
okBlocks = 0;
if (moveDir == "up") {
_root.field.enemy1._y = _root.field.enemy1._y - enemySpeed;
} else if (moveDir == "down") {
_root.field.enemy1._y = _root.field.enemy1._y + enemySpeed;
} else if (moveDir == "right") {
_root.field.enemy1._x = _root.field.enemy1._x + enemySpeed;
} else if (moveDir == "left") {
_root.field.enemy1._x = _root.field.enemy1._x - enemySpeed;
}
var _local3 = 1;
while (_local3 < 16) {
var _local2 = "stop" + _local3;
if (_root.field.enemy1.hitTest(_root.field[_local2])) {
} else {
okBlocks++;
}
if (okBlocks == 15) {
eHit = false;
}
_local3++;
}
okBlocks = 0;
}
var _local3 = 1;
while (_local3 < 16) {
var _local2 = "stop" + _local3;
if (_root.field.enemy1.hitTest(_root.field[_local2]) && (eHit == false)) {
eHit = true;
stopDir = vDir;
_local3 = 16;
okBlocks = 0;
if (_root.field.enemy1._x < _root.field.hero._x) {
moveDir = "right";
} else {
moveDir = "left";
}
} else if (!(_root.field.enemy1.hitTest(_root.field[_local2]) && (eHit == false))) {
okBlocks++;
}
if ((okBlocks == 15) && (eHit == false)) {
okBlocks = 0;
}
_local3++;
}
if ((_root.field.hero._x <= _root.field.enemy1._x) && (eHit == false)) {
_root.field.enemy1._x = _root.field.enemy1._x - enemySpeed;
hDir = "left";
} else if ((_root.field.hero._x > _root.field.enemy1._x) && (eHit == false)) {
_root.field.enemy1._x = _root.field.enemy1._x + enemySpeed;
hDir = "right";
}
_local3 = 1;
while (_local3 < 16) {
var _local2 = "stop" + _local3;
if (_root.field.enemy1.hitTest(_root.field[_local2]) && (eHit == false)) {
eHit = true;
stopDir = hDir;
_local3 = 16;
okBlocks = 0;
if (_root.field.enemy1._y < _root.field.hero._y) {
moveDir = "down";
} else {
moveDir = "up";
}
} else if (!(_root.field.enemy1.hitTest(_root.field[_local2]) && (eHit == false))) {
okBlocks++;
}
if ((okBlocks == 15) && (eHit == false)) {
okBlocks = 0;
}
_local3++;
}
if ((_root.field.hero._y <= _root.field.enemy1._y) && (eHit == false)) {
_root.field.enemy1._y = _root.field.enemy1._y - enemySpeed;
vDir = "up";
} else if ((_root.field.hero._y > _root.field.enemy1._y) && (eHit == false)) {
_root.field.enemy1._y = _root.field.enemy1._y + enemySpeed;
vDir = "down";
}
_local3 = 1;
while (_local3 < 16) {
var _local2 = "stop" + _local3;
if (_root.field.enemy1.hitTest(_root.field[_local2]) && (eHit == false)) {
eHit = true;
stopDir = vDir;
_local3 = 16;
okBlocks = 0;
if (_root.field.enemy1._x < _root.field.hero._x) {
moveDir = "right";
} else {
moveDir = "left";
}
} else if (!(_root.field.enemy1.hitTest(_root.field[_local2]) && (eHit == false))) {
okBlocks++;
}
if ((okBlocks == 15) && (eHit == false)) {
okBlocks = 0;
}
_local3++;
}
}
}
function eShoot() {
if (shootDelay > (8 + d)) {
playSound("eShoot");
eShotsFired++;
eBullet = "eB" + eB;
_root.field.attachMovie("eBullet", eBullet, ++depth3);
_root.field[eBullet]._rotation = _root.field.enemy1._rotation - 90;
_root.field[eBullet]._x = _root.field.enemy1._x;
_root.field[eBullet]._y = _root.field.enemy1._y;
eB++;
shootDelay = 0;
}
shootDelay++;
}
function shoot() {
playSound("shoot");
shotsFired++;
bullet = "b" + b;
_root.field.attachMovie("bullet", bullet, ++depth2);
_root.field[bullet]._rotation = ang - 90;
_root.field[bullet]._x = _root.field.hero._x;
_root.field[bullet]._y = _root.field.hero._y;
b++;
}
function resetShroud() {
var _local4 = 1;
while (_local4 <= 31) {
var _local2 = 1;
while (_local2 <= 34) {
var _local3 = (_local4 + "_") + _local2;
_root.field[_local3]._alpha = 100;
_local2++;
}
_local4++;
}
}
function shroud() {
if (delay2 == 2) {
startRow = Math.ceil(_root.field.hero._y / 15);
startCol = Math.ceil(_root.field.hero._x / 15);
if ((_root.field.hero._rotation >= 0) && (_root.field.hero._rotation < 90)) {
endRow = startRow - 10;
endCol = startCol + 10;
} else if ((_root.field.hero._rotation >= 90) && (_root.field.hero._rotation <= 180)) {
endRow = startRow + 10;
endCol = startCol + 10;
} else if ((_root.field.hero._rotation >= -180) && (_root.field.hero._rotation < -90)) {
endRow = startRow + 10;
endCol = startCol - 10;
} else {
endRow = startRow - 10;
endCol = startCol - 10;
}
if (startRow < 1) {
startRow = 1;
}
if (startCol < 1) {
startCol = 1;
}
if (endRow > 31) {
endRow = 31;
}
if (endCol > 34) {
endCol = 34;
}
if (endRow < startRow) {
var _local7 = endRow;
var _local8 = startRow;
} else {
var _local7 = startRow;
var _local8 = endRow;
}
if (endCol < startCol) {
var _local5 = endCol;
var _local6 = startCol;
} else {
var _local5 = startCol;
var _local6 = endCol;
}
var _local4 = _local7;
while (_local4 <= _local8) {
var _local2 = _local5;
while (_local2 <= _local6) {
var _local3 = (_local4 + "_") + _local2;
if (_root.field[_local3].hitTest(_root.field.lineOfSite2)) {
_root.field[_local3]._alpha = 0;
}
_local2++;
}
_local4++;
}
delay2 = 0;
}
if (delay > 35) {
var _local4 = 1;
while (_local4 <= 31) {
var _local2 = 1;
while (_local2 <= 34) {
var _local3 = (_local4 + "_") + _local2;
_root.field[_local3]._alpha = _root.field[_local3]._alpha + (15 - d);
_local2++;
}
_local4++;
}
delay = 0;
}
delay2++;
delay++;
}
function buildShroud() {
var _local4 = 1;
while (_local4 <= 31) {
var _local2 = 1;
while (_local2 <= 34) {
var _local3 = (_local4 + "_") + _local2;
var _local6 = (_local2 - 1) * 15;
var _local5 = (_local4 - 1) * 15;
_root.field.attachMovie("cell", _local3, ++depth);
_root.field[_local3]._x = _local6;
_root.field[_local3]._y = _local5;
_local2++;
}
_local4++;
}
}
function insideObject() {
if ((_root.field.enemy1.hitTest(_root.field.blueFlag) && (!enemyFlag)) && (!enemyShot)) {
playSound("flag");
bFlagHome = false;
_root.field.blueFlag._visible = false;
_root.field.enemy1.gotoAndPlay("flag");
enemyFlag = true;
findPoint = (random(6) * 8) + 6;
if (retakeFlag && (blueFlagDown)) {
findPoint = 56;
}
retakeFlag = false;
blueFlagDown = false;
}
if ((_root.field.hero.hitTest(_root.field.redFlag) && (_root.field.redFlag._visible)) && (!heroShot)) {
playSound("flag");
rFlagHome = false;
_root.field.redFlag._visible = false;
_root.field.hero.gotoAndPlay("flag");
heroFlag = true;
_root.score = _root.score + ((d * 0.25) + 15);
}
if ((_root.field.hero.hitTest(_root.field.blueFlag) && (bFlagHome == false)) && (_root.field.blueFlag._visible == true)) {
_root.field.blueFlag._x = 257;
_root.field.blueFlag._y = 445;
enemyFlag = false;
blueFlagDown = false;
retakeFlag = false;
bFlagHome = true;
destX = patrolPoints[findPoint];
destY = patrolPoints[findPoint + 1];
_root.score = _root.score + ((d * 0.25) + 20);
}
if (_root.field.enemy1.hitTest(_root.field.redFlag) && (flagDown)) {
_root.field.redFlag._x = 248.5;
_root.field.redFlag._y = 19;
heroFlag = false;
chasingFlag = false;
flagDown = false;
rFlagHome = true;
}
if (_root.field.enemy1.hitTest(_root.field.redHolder) && (enemyFlag)) {
if (heroFlag) {
engage = true;
}
if (!heroFlag) {
resetShroud();
playSound("lose");
resetShroud();
_root.field.hero._visible = false;
_root.field.enemy1._visible = false;
playGame = false;
_root.field.scoreMenu._visible = true;
_root.field.scoreMenu.gotoAndPlay(2);
}
}
if (((_root.field.hero.hitTest(_root.field.blueHolder) && (heroFlag)) && (enemyFlag == false)) && (_root.field.blueFlag._visible == true)) {
resetShroud();
resetHero();
resetEnemy();
playSound("win");
_root.field.hero._x = 245;
_root.field.hero._y = 410;
_root.field.enemy1._x = 245;
_root.field.enemy1._y = 45;
_root.field.redFlag._x = 248.5;
_root.field.redFlag._y = 19;
_root.field.redFlag._visible = true;
engage = false;
_root.score = _root.score + (30 + scoreAdjust);
enemySpeed = enemySpeed + 0.02;
if (enemySpeed > 1.8) {
enemySpeed = 1.8;
}
d--;
lvl++;
if (d < -4) {
d = -4;
}
scoreAdjust = scoreAdjust + 10;
_root.field.lineOfSite._xscale = 650 - (d * 40);
_root.field.lineOfSite._yscale = 450 - (d * 50);
if (_root.field.lineOfSite._xscale > 650) {
_root.field.lineOfSite._xscale = 750;
}
if (_root.field.lineOfSite._yscale > 450) {
_root.field.lineOfSite._yscale = 550;
}
_root.field.lineOfSite2._xscale = 100 + (d * 50);
if (_root.field.lineOfSite2._xscale < 100) {
_root.field.lineOfSite2._xscale = 35;
}
}
var _local2 = 1;
while (_local2 < 16) {
object = "stop" + _local2;
if (_root.field.hero.hitTest(_root.field[object])) {
collision = object;
var _local5 = _root.field[object]._y - (_root.field[object]._height / 2);
var _local3 = _root.field[object]._y + (_root.field[object]._height / 2);
var _local4 = _root.field[object]._x + (_root.field[object]._width / 2);
var _local6 = _root.field[object]._x - (_root.field[object]._width / 2);
if (Math.abs(_root.field.hero._x - _local6) > Math.abs(_root.field.hero._x - _local4)) {
var _local9 = Math.abs(_root.field.hero._x - _local4);
var _local10 = "right";
} else {
var _local9 = Math.abs(_root.field.hero._x - _local6);
var _local10 = "left";
}
if (Math.abs(_root.field.hero._y - _local5) > Math.abs(_root.field.hero._y - _local3)) {
var _local7 = Math.abs(_root.field.hero._y - _local3);
var _local8 = "bottom";
} else {
var _local7 = Math.abs(_root.field.hero._y - _local5);
var _local8 = "top";
}
if (_local9 > _local7) {
disable = _local8;
} else {
disable = _local10;
}
} else if (!_root.field.hero.hitTest(_root.field[collision])) {
disable = "null";
}
_local2++;
}
}
function movePlayer() {
_root.field.lineOfSite2._x = _root.field.hero._x;
_root.field.lineOfSite2._y = _root.field.hero._y;
_root.field.lineOfSite2._rotation = _root.field.hero._rotation;
var _local3 = _root.field.hero._x;
var _local2 = _root.field.hero._y;
var _local8 = _xmouse;
var _local6 = _ymouse;
var _local5 = _local8 - _local3;
var _local4 = _local6 - _local2;
var _local7 = Math.atan2(_local4, _local5);
ang = (_local7 * 57.2957795130823) + 90;
_root.field.hero._rotation = ang;
if (((((((((Key.isDown(38) || (Key.isDown(87))) || (Key.isDown(40))) || (Key.isDown(83))) || (Key.isDown(39))) || (Key.isDown(68))) || (Key.isDown(37))) || (Key.isDown(65))) && (running == false)) && (heroShot == false)) {
_root.field.hero.gotoAndPlay("run");
running = true;
if (heroFlag) {
_root.field.hero.gotoAndPlay("flag");
}
} else if (!(((((((Key.isDown(38) || (Key.isDown(87))) || (Key.isDown(40))) || (Key.isDown(83))) || (Key.isDown(39))) || (Key.isDown(68))) || (Key.isDown(37))) || (Key.isDown(65)))) {
running = false;
_root.field.hero.gotoAndStop(1);
if (heroFlag) {
_root.field.hero.gotoAndStop("sFlag");
}
}
if (((Key.isDown(38) || (Key.isDown(87))) && (_root.field.hero._y > 10)) && (disable != "bottom")) {
_root.field.hero._y = _root.field.hero._y - heroSpeed;
} else if (((Key.isDown(40) || (Key.isDown(83))) && (_root.field.hero._y < 454)) && (disable != "top")) {
_root.field.hero._y = _root.field.hero._y + heroSpeed;
}
if (((Key.isDown(39) || (Key.isDown(68))) && (_root.field.hero._x < 490)) && (disable != "left")) {
_root.field.hero._x = _root.field.hero._x + heroSpeed;
} else if (((Key.isDown(37) || (Key.isDown(65))) && (_root.field.hero._x > 10)) && (disable != "right")) {
_root.field.hero._x = _root.field.hero._x - heroSpeed;
}
}
if (_root.difficulty == "easy") {
scoreAdjust = 0;
_root.field.scoreboard.dDisplay.gotoAndStop(1);
d = 7;
}
if (_root.difficulty == "medium") {
scoreAdjust = 50;
_root.field.scoreboard.dDisplay.gotoAndStop(2);
d = 5;
}
if (_root.difficulty == "hard") {
scoreAdjust = 100;
_root.field.scoreboard.dDisplay.gotoAndStop(3);
d = 3;
}
shots = 50;
lvl = 1;
_root.field.blueFlag._x = 257;
_root.field.blueFlag._y = 445;
_root.field.redFlag._x = 248.5;
_root.field.redFlag._y = 19;
_root.field.hero._x = 245;
_root.field.hero._y = 410;
_root.field.enemy1._x = 245;
_root.field.enemy1._y = 45;
_root.field.lineOfSite._xscale = 650 - (d * 40);
_root.field.lineOfSite._yscale = 450 - (d * 50);
_root.field.lineOfSite2._xscale = 100 + (d * 50);
_root.field.hero.swapDepths(1000000);
_root.field.scoreboard.swapDepths(1000002);
_root.field.scoreMenu.swapDepths(1000003);
_root.field.scoreMenu._visible = false;
score = 0;
soundOn = true;
bulEngage = false;
flagDown = false;
heroFlag = false;
enemyFlag = false;
depth = 900000 /* 0x0DBBA0 */;
depth2 = 0;
depth3 = 100000 /* 0x0186A0 */;
heroSpeed = 1.5;
enemySpeed = 1.6;
delay = 0;
delay2 = 0;
shotsFired = 0;
eShotsFired = 0;
disable = "null";
metX = false;
metY = false;
eHit = false;
engage = false;
enemyRun = false;
enemyShot = false;
heroShot = false;
bFlagHome = true;
rFlagHome = true;
okBlocks = 0;
shootDelay = 8 + d;
playGame = true;
chasingFlag = false;
retakeFlag = false;
blueFlagDown = false;
b = 1;
eB = 1;
findPoint = random(6) * 8;
patrolPoints = [25, 15, 25, 217, 25, 430, 252, 435, 175, 15, 172, 175, 334, 175, 334, 10, 190, 60, 130, 298, 167, 348, 255, 435, 339, 59, 354, 285, 323, 363, 255, 435, 490, 15, 472, 217, 472, 430, 252, 435, 490, 75, 348, 200, 490, 200, 252, 435, 18, 15, 18, 250, 77, 250, 252, 435, 243, 22];
buildShroud();
playSound("game");
_root.onEnterFrame = function () {
score = Math.round(score);
if (playGame) {
if (!enemyShot) {
enemyAI();
}
insideObject();
if (!heroShot) {
movePlayer();
}
shroud();
}
};
_root.onMouseDown = function () {
if (((playGame && (!heroShot)) && (_root.field._ymouse < 465)) && (shots > 0)) {
shots--;
shoot();
}
};
stop();
Instance of Symbol 4 MovieClip in Symbol 5 MovieClip Frame 1
onClipEvent (load) {
thisBullet = "b" + _root.shotsFired;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.field.enemy1) && (_root.enemyShot == false)) {
_root.playSound("hit");
_root.enemyShot = true;
_root.hits++;
_root.field.eRespawnTimer._x = _root.field.enemy1._x;
_root.field.eRespawnTimer._y = _root.field.enemy1._y - 30;
if (_root.field.eRespawnTimer._y < 15) {
_root.field.eRespawnTimer._y = _root.field.enemy1._y + 30;
}
_root.field.eRespawnTimer.gotoAndPlay(2);
_root.field.enemy1.gotoAndPlay("hit");
_root.score = _root.score + 10;
if (_root.enemyFlag) {
_root.score = _root.score + 5;
_root.field.blueFlag._visible = true;
_root.field.blueFlag._x = _root.field.enemy1._x;
_root.field.blueFlag._y = _root.field.enemy1._y + 10;
_root.blueFlagDown = true;
}
}
if ((this.hitTest(_root.field.lineOfSite) && (_root.enemyFlag == false)) && (_root.d != 6)) {
_root.engage = true;
}
var o = 1;
while (o < 16) {
var obstacle = ("stop" + o);
if (this.hitTest(_root.field[obstacle]) || (this.hitTest(_root.field.enemy1))) {
_root.field[thisBullet].removeMovieClip();
}
o++;
}
}
Symbol 6 MovieClip [bullet] Frame 40
this.removeMovieClip();
Instance of Symbol 8 MovieClip in Symbol 9 MovieClip Frame 1
onClipEvent (load) {
thisBullet = "eB" + _root.eShotsFired;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.field.hero) && (_root.heroShot)) {
_root.field[thisBullet].removeMovieClip();
_root.engage = false;
}
if (this.hitTest(_root.field.hero) && (_root.heroShot == false)) {
_root.playSound("hit");
_root.heroShot = true;
_root.timesShot++;
_root.field.lineOfSite2._x = 800;
_root.field.hRespawnTimer._x = _root.field.hero._x;
_root.field.hRespawnTimer._y = _root.field.hero._y - 30;
_root.field.hRespawnTimer.gotoAndPlay(2);
if (_root.field.hRespawnTimer._y < 15) {
_root.field.hRespawnTimer._y = _root.field.hero._y + 30;
}
_root.field.hero.gotoAndPlay("hit");
_root.engage = false;
if (_root.heroFlag) {
_root.flagDown = true;
_root.field.redFlag._visible = true;
_root.field.redFlag._x = _root.field.hero._x;
_root.field.redFlag._y = _root.field.hero._y + 10;
var xDif1 = Math.abs(_root.field.enemy1._x - _root.field.redFlag._x);
var yDif1 = Math.abs(_root.field.enemy1._y - _root.field.redFlag._y);
var xDif2 = Math.abs(_root.field.enemy1._x - 248);
var yDif2 = Math.abs(_root.field.enemy1._y - 25);
if (((xDif1 + yDif1) < (xDif2 + yDif2)) || (_root.enemyFlag == false)) {
_root.destX = _root.field.redFlag._x;
_root.destY = _root.field.redFlag._y;
_root.chasingFlag = true;
}
}
}
var o = 1;
while (o < 16) {
var obstacle = ("stop" + o);
if (this.hitTest(_root.field[obstacle]) || (this.hitTest(_root.field.hero))) {
_root.field[thisBullet].removeMovieClip();
}
o++;
}
}
Symbol 10 MovieClip [eBullet] Frame 40
this.removeMovieClip();
Symbol 33 MovieClip Frame 39
stop();
Symbol 53 MovieClip Frame 39
stop();
Symbol 81 MovieClip Frame 35
this.gotoAndPlay(1);
Symbol 84 MovieClip Frame 144
stopAllSounds();
Symbol 84 MovieClip Frame 145
_root.gotoAndPlay("splash");
Symbol 111 Button
on (release) {
getURL ("http://www.axis-games.com/forgotpassword.php", "_self");
}
Symbol 118 Button
on (release) {
_root.gotoAndStop("splash");
}
Symbol 125 Button
on (release) {
gotoAndStop ("difficulty");
}
Symbol 129 Button
on (release) {
gotoAndStop ("login");
}
Symbol 132 Button
on (release) {
gotoAndStop ("instructions");
}
Symbol 135 Button
on (release) {
gotoAndStop ("credits");
}
Symbol 142 MovieClip Frame 1
stop();
Symbol 142 MovieClip Frame 17
stop();
Symbol 150 Button
on (release) {
stopAllSounds();
_root.difficulty = "easy";
gotoAndStop ("game");
}
Symbol 154 Button
on (release) {
stopAllSounds();
_root.difficulty = "medium";
gotoAndStop ("game");
}
Symbol 158 Button
on (release) {
stopAllSounds();
_root.difficulty = "hard";
gotoAndStop ("game");
}
Symbol 162 Button
on (release) {
stopAllSounds();
gotoAndPlay ("splash");
}
Symbol 191 MovieClip Frame 1
stop();
Symbol 191 MovieClip Frame 9
if (_root.enemyShot) {
this.gotoAndPlay("hit");
}
Symbol 191 MovieClip Frame 16
this.gotoAndPlay("run");
Symbol 191 MovieClip Frame 17
if (_root.enemyShot) {
this.gotoAndPlay("hit");
}
Symbol 191 MovieClip Frame 24
this.gotoAndPlay("flag");
Symbol 191 MovieClip Frame 30
stop();
Symbol 211 MovieClip Frame 1
stop();
Symbol 211 MovieClip Frame 9
if (_root.heroShot) {
this.gotoAndPlay("hit");
}
Symbol 211 MovieClip Frame 16
this.gotoAndPlay("run");
Symbol 211 MovieClip Frame 17
if (_root.heroShot) {
this.gotoAndPlay("hit");
}
Symbol 211 MovieClip Frame 24
this.gotoAndPlay("flag");
Symbol 211 MovieClip Frame 30
stop();
Symbol 220 MovieClip Frame 1
stop();
Symbol 220 MovieClip Frame 155
_root.enemyShot = false;
_root.resetEnemy();
Symbol 221 MovieClip Frame 1
stop();
Symbol 221 MovieClip Frame 155
_root.heroShot = false;
_root.resetHero();
Symbol 231 MovieClip Frame 1
stop();
Symbol 235 Button
on (release) {
if (_root.soundOn) {
_root.field.scoreboard.toggleSound.gotoAndStop("off");
stopAllSounds();
_root.soundOn = false;
} else {
_root.field.scoreboard.toggleSound.gotoAndStop("on");
_root.soundOn = true;
_root.playSound("game");
}
}
Symbol 239 Button
on (release) {
if (_root.heroShot == false) {
if (_root.playGame) {
_root.playGame = false;
} else {
_root.playGame = true;
}
}
}
Symbol 253 Button
on (release) {
stopAllSounds();
_root.gotoAndPlay("splash");
}
Symbol 258 MovieClip Frame 25
function sendForm() {
send_lv = new LoadVars();
take_lv = new LoadVars();
send_lv.user = _root.userName;
send_lv.pass = _root.pass;
send_lv.amount = updateAmt;
send_lv.game = "appaint";
take_lv.onLoad = function (success) {
if (success) {
return_btn._visible = true;
statusbox = "Update Finished!";
}
};
send_lv.sendAndLoad("http://www.axis-games.com/addpoints.php", take_lv, "POST");
}
function updateTotal() {
throw_lv = new LoadVars();
catch_lv = new LoadVars();
throw_lv.amt = updateAmt;
throw_lv.gametype = "paintball";
catch_lv.onLoad = function (success) {
if (success) {
}
};
throw_lv.sendAndLoad("http://www.axis-games.com/addtotals.php", catch_lv, "POST");
}
function highscores() {
left_lv = new LoadVars();
right_lv = new LoadVars();
left_lv.user = _root.userName;
left_lv.gamename = "paintball";
left_lv.score = _root.score;
right_lv.onLoad = function (success) {
if (success) {
}
};
left_lv.sendAndLoad("http://www.axis-games.com/updatehighscores.php", right_lv, "POST");
}
apupdate = "You are not logged in.";
statusbox = "";
if (_root.login) {
_root.field.scoreMenu.apupdate = "";
highscores();
if (_root.score > 2000) {
return_btn._visible = false;
apupdate = "You earned 3 Axis Points!";
statusbox = "Updating Your Account...";
updateAmt = 3;
updateTotal();
sendForm();
}
if ((_root.score <= 2000) && (_root.score > 1499)) {
return_btn._visible = false;
apupdate = "You earned 2 Axis Point!";
statusbox = "Updating Your Account...";
updateAmt = 2;
updateTotal();
sendForm();
}
if ((_root.score <= 1499) && (_root.score > 799)) {
return_btn._visible = false;
apupdate = "You earned 1 Axis Point!";
statusbox = "Updating Your Account...";
updateAmt = 1;
updateTotal();
sendForm();
}
}
stop();
Symbol 266 MovieClip Frame 1
stop();
Symbol 266 MovieClip Frame 2
this.gotoAndStop(1);
Symbol 266 MovieClip Frame 9
this.gotoAndStop(1);
Symbol 266 MovieClip Frame 17
this.gotoAndStop(1);
Symbol 266 MovieClip Frame 27
this.gotoAndStop(1);
Symbol 266 MovieClip Frame 33
this.gotoAndStop(1);
Symbol 266 MovieClip Frame 41
this.gotoAndStop(1);
Symbol 266 MovieClip Frame 49
this.gotoAndStop(1);