Frame 1
_root._quality = "MEDIUM";
Stage.showMenu = false;
var MochiAd = {getVersion:function () {
return("2.3");
}, showPreGameAd:function (options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}};
options = MochiAd._parseOptions(options, _local27);
if ("5cc6f7dfb67f2f08341c831480f7c2a7".length == 0) {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local23 = 11000;
var _local26 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = MochiAd._getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local7._x = 10;
_local7._y = _local13 - 20;
var _local22 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local24 = options.outline;
delete options.outline;
var _local5 = _local7.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local7.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local22);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local6 = _local7.createEmptyMovieClip("_outline", 3);
_local6.lineStyle(0, _local24, 100);
_local6.moveTo(0, 0);
_local6.lineTo(_local4 - 20, 0);
_local6.lineTo(_local4 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
chk.ad_msec = _local23;
chk.ad_timeout = _local26;
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.adLoaded = options.ad_loaded;
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) {
options.ad_failed();
_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;
}
}
};
}, showInterLevelAd:function (options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}};
options = MochiAd._parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = MochiAd._getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
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.adLoaded = options.ad_loaded;
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) {
options.ad_failed();
_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;
}
}
};
}, showTimedAd:function (options) {
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
MochiAd.showInterLevelAd(options);
}, showPreloaderAd:function (options) {
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
MochiAd.showPreGameAd(options);
}, _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 _local26 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, _local26);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = MochiAd.getVersion();
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 _local25 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local25);
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_arg) {
var _local8 = parseInt(cb_arg);
var _local4 = this._callbacks[_local8];
if (!_local4) {
return(undefined);
}
delete this._callbacks[_local8];
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 = MochiAd.getVersion();
var _local9 = options.clip;
if (!MochiAd._isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = MochiAd._getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
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 _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_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++;
}
}
if (_local4.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(_local4);
}, _:null};
MochiAd.showPreGameAd({id:"ca6cc5ba3d94a8d8", res:"600x450", background:0, color:39168, outline:8273921, no_bg:true});
stop();
Frame 2
stop();
Frame 12
stopAllSounds();
_root.soundFX.gotoAndPlay("splash");
_root.enemyE = 0;
var my_cm;
my_cm = new ContextMenu();
my_cm.hideBuiltInItems();
var myFirstItem_cmi;
myFirstItem_cmi = new ContextMenuItem("Ramparts", myFirstItemHandler);
my_cm.customItems.push(myFirstItem_cmi);
Stage.showMenu = false;
stop();
Instance of Symbol 572 MovieClip "dragon1" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 572 MovieClip "dragon9" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 572 MovieClip "dragon4" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 572 MovieClip "dragon5" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 572 MovieClip "dragon6" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 572 MovieClip "dragon3" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 572 MovieClip "dragon8" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 572 MovieClip "dragon2" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 572 MovieClip "dragon7" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 572 MovieClip "dragon0" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 630 MovieClip "mummy1" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 630 MovieClip "mummy2" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 630 MovieClip "mummy3" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 630 MovieClip "mummy4" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 630 MovieClip "mummy5" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 630 MovieClip "mummy6" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 630 MovieClip "mummy7" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 630 MovieClip "mummy8" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 630 MovieClip "mummy9" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 630 MovieClip "mummy0" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 686 MovieClip "spider0" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 686 MovieClip "spider1" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 686 MovieClip "spider2" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 686 MovieClip "spider3" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 686 MovieClip "spider4" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 686 MovieClip "spider5" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 686 MovieClip "spider6" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 686 MovieClip "spider7" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 686 MovieClip "spider8" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 686 MovieClip "spider9" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 767 MovieClip "red0" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 767 MovieClip "red1" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 767 MovieClip "red2" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 767 MovieClip "red3" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 767 MovieClip "red4" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 767 MovieClip "red5" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 767 MovieClip "red6" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 767 MovieClip "red7" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 767 MovieClip "red8" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 767 MovieClip "red9" in Frame 12
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Frame 31
var i = 0;
while (i <= 17) {
var j = 0;
while (j <= 17) {
var newTile = ((("tile" + i) + "_") + j);
_root[newTile].removeMovieClip();
j++;
}
i++;
}
stopAllSounds();
stop();
Frame 48
function myFirstItemHandler() {
getURL ("http://www.axis-games.com/ramparts.php");
}
function playSound(sound) {
_root.soundFX.gotoAndPlay(sound);
}
function enemyTimers() {
var _local3 = 0;
while (_local3 <= 9) {
var _local2 = enemyArray[_local3];
if (_root[_local2].slow == true) {
_root[_local2].slowTimer++;
if (_root[_local2].slowTimer == 125) {
_root[_local2].speed = 3 + (level * 0.05);
_root[_local2].slow = false;
var _local5 = new flash.geom.Transform(_root[_local2].inside);
_local5.colorTransform = new flash.geom.ColorTransform();
if (_root[_local2].poison) {
_local5 = new flash.geom.Transform(_root[_local2].inside);
var _local6 = new flash.geom.ColorTransform(0.6, 0, 0.6, 1, 20, 0, 20, 0);
_local5.colorTransform = _local6;
}
}
}
if (_root[_local2].poison == true) {
_root[_local2].poisonTimer++;
if ((_root[_local2].poisonTimer % 50) == 0) {
_root[_local2].curHealth = _root[_local2].curHealth - (2 * _root[_local2].poisonNum);
if (_root[_local2].curHealth <= 0) {
_root[_local2].poison = false;
var _local4 = enemyArray[_local3] + "Finish";
_root[_local4] = true;
_root.enemyDead(_local2);
}
}
}
_local3++;
}
}
function setEnemies() {
level++;
enemiesDead = 0;
var _local3 = 0;
while (_local3 <= 9) {
var _local5 = random(2);
if (_local5 == 0) {
if (level <= 14) {
var _local2 = "dragon" + _local3;
_root[_local2].maxHealth = 0 + (1 * level);
_root[_local2].curHealth = 0 + (1 * level);
} else {
var _local2 = "red" + _local3;
_root[_local2].maxHealth = 0 + (1.5 * level);
_root[_local2].curHealth = 0 + (1.5 * level);
}
} else if (_local5 == 1) {
if (level <= 29) {
var _local2 = "mummy" + _local3;
_root[_local2].maxHealth = 0 + (1 * level);
_root[_local2].curHealth = 0 + (1 * level);
} else {
var _local2 = "spider" + _local3;
_root[_local2].maxHealth = 0 + (2 * level);
_root[_local2].curHealth = 0 + (2 * level);
}
}
if (level > 40) {
_root[_local2].maxHealth = _root[_local2].maxHealth + (level * 0.5);
_root[_local2].curHealth = _root[_local2].curHealth + (level * 0.5);
}
if (level > 70) {
_root[_local2].maxHealth = _root[_local2].maxHealth + (level * 1);
_root[_local2].curHealth = _root[_local2].curHealth + (level * 1);
}
_root[_local2]._visible = true;
_root[_local2].speed = 3 + (level * 0.05);
_root[_local2].poison = false;
_root[_local2].slow = false;
_root[_local2].slowTimer = 0;
_root[_local2].poisonTimer = 0;
_root[_local2].dead = false;
_root[_local2]._x = 161;
_root[_local2]._y = -40 - (45 * _local3);
_root[_local2].swapDepths(1000 + _local3);
enemyArray[_local3] = _local2;
var _local6 = new flash.geom.Transform(_root[_local2].inside);
_local6.colorTransform = new flash.geom.ColorTransform();
var _local4 = ("enemy" + _local3) + "Point";
_root[_local4] = 0;
_local4 = ("enemy" + _local3) + "X";
_root[_local4] = false;
_local4 = ("enemy" + _local3) + "Y";
_root[_local4] = false;
_local4 = ("enemy" + _local3) + "Finish";
_root[_local4] = false;
_local3++;
}
}
function getTileDepth(row) {
var _local1 = (5000 + (150 * row)) + builtTowers;
return(_local1);
}
function findAngle(startX, startY, endX, endY) {
var _local2 = endX - startX;
var _local1 = endY - startY;
var _local3 = Math.atan2(_local1, _local2);
ang = _local3 * 57.2957795130823;
return(ang);
}
function findClosestEnemy(xLoc, yLoc, range, canHit) {
closestDist = 500;
closestEnemy = "null";
var _local4 = 0;
while (_local4 <= 9) {
var _local2 = _root.enemyArray[_local4];
var _local6 = _root[_local2]._x;
var _local5 = _root[_local2]._y;
var _local7 = Math.abs(xLoc - _local6);
var _local8 = Math.abs(yLoc - _local5);
var _local3 = _local7 + _local8;
if (canHit == "g") {
if ((_local2.charAt(0) == "d") || (_local2.charAt(0) == "r")) {
_local3 = 500;
}
} else if (canHit == "a") {
if ((_local2.charAt(0) == "m") || (_local2.charAt(0) == "s")) {
_local3 = 500;
}
}
if (_local3 < closestDist) {
closestDist = _local3;
closestEnemy = _root.enemyArray[_local4];
}
_local4++;
}
if ((closestDist <= range) && (_root[closestEnemy]._y > 0)) {
return(closestEnemy);
}
return("null");
}
function placeTower() {
if (towerOnMouse == true) {
Mouse.hide();
_root.tower._x = _xmouse + 10;
_root.tower._y = _ymouse - 10;
var _local4 = Math.floor(_xmouse / 25);
var _local3 = Math.floor(_ymouse / 25);
var _local2 = (("tile" + _local3) + "_") + _local4;
if (tileSet[_local3][_local4] == 1) {
_root.greenTile._x = _root[_local2]._x;
_root.greenTile._y = _root[_local2]._y;
_root.redTile._y = -600;
allowBuild = true;
} else {
_root.redTile._x = _root[_local2]._x;
_root.redTile._y = _root[_local2]._y;
_root.greenTile._y = -600;
allowBuild = false;
}
} else if (upgradeOnMouse == true) {
Mouse.hide();
_root.upgradeTowersThing._x = _xmouse + 10;
_root.upgradeTowersThing._y = _ymouse - 10;
_root.upgradeMoneyThing._x = _xmouse;
_root.upgradeMoneyThing._y = _ymouse;
var _local4 = Math.floor(_xmouse / 25);
var _local3 = Math.floor(_ymouse / 25);
var _local2 = (("tile" + _local3) + "_") + _local4;
if (upgradeAttached == "damage") {
if (tileSet[_local3][_local4] == 20) {
_root.greenTile._x = _root[_local2]._x;
_root.greenTile._y = _root[_local2]._y;
_root.redTile._y = -600;
allowUpgrade = true;
newUpgradeTower = "whiteGround";
newTileNum = 21;
} else if (tileSet[_local3][_local4] == 21) {
_root.greenTile._x = _root[_local2]._x;
_root.greenTile._y = _root[_local2]._y;
_root.redTile._y = -600;
allowUpgrade = true;
newUpgradeTower = "redGround";
newTileNum = 22;
} else if (tileSet[_local3][_local4] == 23) {
_root.greenTile._x = _root[_local2]._x;
_root.greenTile._y = _root[_local2]._y;
_root.redTile._y = -600;
allowUpgrade = true;
newUpgradeTower = "whiteAir";
newTileNum = 24;
} else if (tileSet[_local3][_local4] == 24) {
_root.greenTile._x = _root[_local2]._x;
_root.greenTile._y = _root[_local2]._y;
_root.redTile._y = -600;
allowUpgrade = true;
newUpgradeTower = "redAir";
newTileNum = 25;
} else {
_root.redTile._x = _root[_local2]._x;
_root.redTile._y = _root[_local2]._y;
_root.greenTile._y = -600;
newUpgradeTower = "null";
allowUpgrade = false;
}
} else if (upgradeAttached == "money") {
if ((tileSet[_local3][_local4] == 22) || (tileSet[_local3][_local4] == 25)) {
_root.greenTile._x = _root[_local2]._x;
_root.greenTile._y = _root[_local2]._y;
_root.redTile._y = -600;
allowUpgrade = true;
} else {
_root.redTile._x = _root[_local2]._x;
_root.redTile._y = _root[_local2]._y;
_root.greenTile._y = -600;
allowUpgrade = false;
}
}
}
}
function enemyDead(enemy) {
gold = gold + 4;
_root[enemy]._visible = true;
_root[enemy].speed = 3 + (level * 0.05);
_root[enemy].poison = false;
_root[enemy].slow = false;
_root[enemy].slowTimer = 0;
_root[enemy].poisonTimer = 0;
var _local5 = new flash.geom.Transform(_root[enemy].inside);
_local5.colorTransform = new flash.geom.ColorTransform();
_root[enemy]._visible = false;
_root[enemy].dead = true;
var _local4 = enemy.charAt(0) + "Die";
enemiesDead++;
var _local3 = "die" + enemiesDead;
_root.attachMovie(_local4, _local3, 500 + enemiesDead);
_root[_local3]._x = _root[enemy]._x;
_root[_local3]._y = _root[enemy]._y;
_root[enemy]._y = -600;
}
function moveEnemy() {
var _local3 = 0;
while (_local3 <= 9) {
var _local2 = _root.enemyArray[_local3];
var _local7 = ("enemy" + _local3) + "Point";
var _local10 = enemyPath[_root[_local7]];
var _local8 = enemyPath[_root[_local7] + 1];
var _local11 = ("enemy" + _local3) + "X";
var _local9 = ("enemy" + _local3) + "Y";
var _local12 = ("enemy" + _local3) + "Finish";
if (_root[_local2].hitTest(_root.lifeLine) && (_root[_local12] == false)) {
enemyE++;
enemiesDead++;
_root.playSound("crossLine");
_root[_local12] = true;
_root[_local2]._y = -200;
_root.sideBar.escapedText.text = enemyE + "/30";
_root[_local2].poison = false;
_root[_local2].poison = false;
_root[_local2].slow = false;
_root[_local2].slowTimer = 0;
_root[_local2].poisonTimer = 0;
}
if (enemyE == 30) {
var _local4 = 0;
while (_local4 <= 17) {
_local3 = 0;
while (_local3 <= 17) {
var _local5 = (("tile" + _local4) + "_") + _local3;
var _local6 = (("builtTowers" + _local4) + "_") + _local3;
_root[_local6].removeMovieClip();
_root[_local5].removeMovieClip();
_local3++;
}
_local4++;
}
_local4 = 0;
while (_local4 <= 9) {
_local2 = _root.enemyArray[_local4];
var _local16 = "red" + _local4;
var _local15 = "dragon" + _local4;
var _local14 = "mummy" + _local4;
var _local13 = "spider" + _local4;
_root[_local16].removeMovieClip();
_root[_local15].removeMovieClip();
_root[_local14].removeMovieClip();
_root[_local13].removeMovieClip();
_local4++;
}
_root.range.removeMovieClip();
_root.redTile.removeMovieClip();
_root.greenTile.removeMovieClip();
_root.sideBar.removeMovieClip();
_root.sideBar._x = 800;
_root.gotoAndStop("gameOver");
}
if (enemiesDead == 10) {
enemiesDead = 0;
_root.sideBar.nextLevel._visible = true;
_root.playSound("nextLevel");
}
if ((_root[_local12] == false) && (_root[_local2].dead == false)) {
if (_root[_local11] == false) {
if (_root[_local2]._x <= _local10) {
_root[_local2].inside.gotoAndStop("right");
_root[_local2].shadow.gotoAndStop("right");
_root[_local2]._x = _root[_local2]._x + _root[_local2].speed;
if (_root[_local2]._x >= _local10) {
_root[_local2]._x = _local10;
_root[_local11] = true;
}
} else {
_root[_local2].inside.gotoAndStop("left");
_root[_local2].shadow.gotoAndStop("left");
_root[_local2]._x = _root[_local2]._x - _root[_local2].speed;
if (_root[_local2]._x <= _local10) {
_root[_local2]._x = _local10;
_root[_local11] = true;
}
}
}
if (_root[_local9] == false) {
if (_root[_local2]._y <= _local8) {
_root[_local2].inside.gotoAndStop("down");
_root[_local2].shadow.gotoAndStop("down");
_root[_local2]._y = _root[_local2]._y + _root[_local2].speed;
if (_root[_local2]._y >= _local8) {
_root[_local2]._y = _local8;
_root[_local9] = true;
}
} else {
_root[_local2].inside.gotoAndStop("up");
_root[_local2].shadow.gotoAndStop("up");
_root[_local2]._y = _root[_local2]._y - _root[_local2].speed;
if (_root[_local2]._y <= _local8) {
_root[_local2]._y = _local8;
_root[_local9] = true;
}
}
}
if (_root[_local11] && (_root[_local9])) {
_root[_local11] = false;
_root[_local9] = false;
_root[_local7] = _root[_local7] + 2;
if (_root[_local7] == 26) {
_root[_local7] = 0;
_root[_local12] = true;
_root[_local2]._x = 161;
_root[_local2]._y = enemyStartY[_local3];
}
}
}
_local3++;
}
}
_root.playSound("background");
tileSet = [[1, 1, 1, 1, 1, 5, 6, 7, 1, 1, 5, 6, 7, 1, 1, 1, 1, 1], [1, 1, 2, 3, 3, 14, 6, 7, 1, 1, 5, 6, 7, 1, 1, 1, 1, 1], [1, 1, 5, 6, 6, 6, 6, 7, 1, 1, 5, 6, 13, 3, 3, 3, 4, 1], [1, 1, 5, 6, 11, 9, 9, 10, 1, 1, 5, 6, 6, 6, 6, 6, 7, 1], [1, 1, 5, 6, 7, 1, 1, 1, 1, 1, 8, 9, 9, 9, 12, 6, 7, 1], [1, 1, 5, 6, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 6, 7, 1], [1, 1, 5, 6, 13, 3, 3, 3, 3, 4, 1, 1, 1, 1, 5, 6, 7, 1], [1, 1, 5, 6, 6, 6, 6, 6, 6, 7, 1, 1, 1, 1, 5, 6, 7, 1], [1, 1, 8, 9, 9, 9, 9, 12, 6, 7, 1, 1, 1, 1, 5, 6, 7, 1], [1, 1, 1, 1, 1, 1, 1, 5, 6, 7, 1, 1, 1, 1, 5, 6, 7, 1], [1, 1, 2, 3, 3, 3, 3, 14, 6, 7, 1, 1, 1, 1, 5, 6, 7, 1], [1, 1, 5, 6, 6, 6, 6, 6, 6, 7, 1, 1, 1, 1, 5, 6, 7, 1], [1, 1, 5, 6, 11, 9, 9, 9, 9, 10, 1, 1, 1, 1, 5, 6, 7, 1], [1, 1, 5, 6, 7, 1, 1, 1, 1, 1, 1, 1, 2, 3, 14, 6, 7, 1], [1, 1, 5, 6, 13, 3, 3, 3, 3, 3, 3, 3, 14, 6, 6, 6, 7, 1], [1, 1, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 11, 9, 10, 1], [1, 1, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]];
enemyPath = [161, 63, 87, 63, 87, 186, 212, 186, 212, 287, 85, 287, 85, 387, 336, 387, 336, 360, 386, 360, 388, 87, 288, 87, 288, -20];
staringHealth = 10;
enemyArray = [];
newTileNum = 0;
upgradeOnMouse = false;
gold = 300;
enemyE = 0;
_root.startGame.swapDepths(100005);
_root.startGame.gotoAndStop(2);
_root.sideBar.escapedText.text = enemyE + "/30";
var my_cm;
my_cm = new ContextMenu();
my_cm.hideBuiltInItems();
var myFirstItem_cmi;
myFirstItem_cmi = new ContextMenuItem("Ramparts", myFirstItemHandler);
my_cm.customItems.push(myFirstItem_cmi);
_root.menu = my_cm;
var i = 0;
while (i <= 9) {
var tempVar = (("enemy" + i) + "Point");
_root[tempVar] = 0;
tempVar = ("enemy" + i) + "X";
_root[tempVar] = false;
tempVar = ("enemy" + i) + "Y";
_root[tempVar] = false;
tempVar = ("enemy" + i) + "Finish";
_root[tempVar] = false;
i++;
}
tileNum = 0;
towerOnMouse = false;
builtTowers = 1;
allowBuild = false;
arrowNum = 0;
_root.level = 0;
enemiesDead = 0;
_root.sideBar.swapDepths(100000);
_root.range.swapDepths(9000);
var i = 0;
while (i <= 17) {
var j = 0;
while (j <= 17) {
var newTile = ((("tile" + i) + "_") + j);
var linkName = ("tile" + tileSet[i][j]);
_root.attachMovie(linkName, newTile, ++tileNum);
_root[newTile]._x = 25 * j;
_root[newTile]._y = 25 * i;
j++;
}
i++;
}
var i = 0;
while (i <= 9) {
var tempEnemy = enemyArray[i];
_root[tempEnemy]._x = 161;
_root[tempEnemy].swapDepths(1000 + i);
i++;
}
_root.greenTile.swapDepths(11000);
_root.redTile.swapDepths(11001);
_root.onEnterFrame = function () {
moveEnemy();
placeTower();
enemyTimers();
};
_root.onMouseDown = function () {
if ((towerOnMouse == true) && (allowBuild)) {
var _local3 = Math.floor(_xmouse / 25);
var _local2 = Math.floor(_ymouse / 25);
var _local5 = (("tile" + _local2) + "_") + _local3;
var _local6 = getTileDepth(_local2);
builtTowers++;
var _local4 = (("builtTowers" + _local2) + "_") + _local3;
_root.attachMovie(towerAttached, _local4, _local6);
tileSet[_local2][_local3] = newTileNum;
_root[_local4]._x = _root.greenTile._x + (_root[_local4]._width / 2);
_root[_local4]._y = _root.greenTile._y + 8;
_root.greenTile._y = -600;
allowBuild = false;
towerOnMouse = false;
_root.tower.removeMovieClip();
_root.playSound("building2");
Mouse.show();
gold = gold - priceOfTower;
} else if (((upgradeOnMouse == true) && (allowUpgrade)) && (upgradeAttached == "damage")) {
var _local3 = Math.floor(_xmouse / 25);
var _local2 = Math.floor(_ymouse / 25);
var _local5 = (("tile" + _local2) + "_") + _local3;
var _local6 = getTileDepth(_local2);
builtTowers++;
var _local4 = (("builtTowers" + _local2) + "_") + _local3;
_root[_local4].removeMovieClip();
_root.attachMovie(newUpgradeTower, _local4, _local6);
_root[_local4]._x = _root.greenTile._x + (_root[_local4]._width / 2);
_root[_local4]._y = _root.greenTile._y + 8;
tileSet[_local2][_local3] = newTileNum;
allowBuild = false;
upgradeOnMouse = false;
_root.greenTile._y = -600;
_root.upgradeTowersThing.removeMovieClip();
_root.playSound("building2");
Mouse.show();
gold = gold - priceOfTower;
} else if (((upgradeOnMouse == true) && (allowUpgrade)) && (upgradeAttached == "money")) {
var _local3 = Math.floor(_xmouse / 25);
var _local2 = Math.floor(_ymouse / 25);
var _local5 = (("tile" + _local2) + "_") + _local3;
var _local6 = getTileDepth(_local2);
var _local4 = (("builtTowers" + _local2) + "_") + _local3;
_root[_local4].money._visible = true;
tileSet[_local2][_local3] = 32;
allowBuild = false;
upgradeOnMouse = false;
_root.greenTile._y = -600;
_root.upgradeMoneyThing.removeMovieClip();
Mouse.show();
_root.playSound("building2");
_root[_local4].inside.moneyUpgrade = true;
gold = gold - priceOfTower;
} else {
priceOfTower = 0;
Mouse.show();
_root.greenTile._y = -600;
_root.redTile._y = -600;
upgradeOnMouse = false;
towerOnMouse = false;
allowBuild = false;
towerAttached = "null";
_root.playSound("building");
_root.upgradeMoneyThing.removeMovieClip();
_root.upgradeTowersThing.removeMovieClip();
_root.tower.removeMovieClip();
}
};
stop();
Instance of Symbol 572 MovieClip "dragon1" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 572 MovieClip "dragon9" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 572 MovieClip "dragon4" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 572 MovieClip "dragon5" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 572 MovieClip "dragon6" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 572 MovieClip "dragon3" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 572 MovieClip "dragon8" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 572 MovieClip "dragon2" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 572 MovieClip "dragon7" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 572 MovieClip "dragon0" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 630 MovieClip "mummy1" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 630 MovieClip "mummy2" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 630 MovieClip "mummy3" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 630 MovieClip "mummy4" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 630 MovieClip "mummy5" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 630 MovieClip "mummy6" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 630 MovieClip "mummy7" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 630 MovieClip "mummy8" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 630 MovieClip "mummy9" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 630 MovieClip "mummy0" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 686 MovieClip "spider0" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 686 MovieClip "spider1" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 686 MovieClip "spider2" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 686 MovieClip "spider3" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 686 MovieClip "spider4" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 686 MovieClip "spider5" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 686 MovieClip "spider6" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 686 MovieClip "spider7" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 686 MovieClip "spider8" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 686 MovieClip "spider9" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 767 MovieClip "red0" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 767 MovieClip "red1" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 767 MovieClip "red2" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 767 MovieClip "red3" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 767 MovieClip "red4" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 767 MovieClip "red5" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 767 MovieClip "red6" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 767 MovieClip "red7" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 767 MovieClip "red8" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 767 MovieClip "red9" in Frame 48
onClipEvent (load) {
this.healthBar._visible = false;
}
on (rollOver) {
this.healthBar._visible = true;
}
on (rollOut) {
this.healthBar._visible = false;
}
onClipEvent (enterFrame) {
this.healthBar.bar._xscale = (this.curHealth / this.maxHealth) * 100;
}
Instance of Symbol 2 MovieClip "inside" in Symbol 6 MovieClip [redGround] Frame 1
onClipEvent (load) {
this.range = 150;
this.coolDown = 15;
this.attackTimer = 0;
this.attacking = false;
this.closestEnemy = "null";
this._parent.money._visible = false;
this.moneyUpgrade = false;
}
onClipEvent (enterFrame) {
this.closestEnemy = _root.findClosestEnemy(this._parent._x, this._parent._y, this.range, "g");
if ((this.closestEnemy != "null") && (this.attacking == false)) {
this.attacking = true;
var ang = _root.findAngle(this._parent._x, this._parent._y, _root[this.closestEnemy]._x, _root[this.closestEnemy]._y);
_root.arrowNum++;
var arrowName = ("weapon" + _root.arrowNum);
_root.attachMovie("arrow3", arrowName, 15000 + _root.arrowNum);
_root[arrowName]._x = this._parent._x;
_root[arrowName]._y = this._parent._y;
_root[arrowName]._rotation = ang;
_root[arrowName].inside.targetEnemy = this.closestEnemy;
_root[arrowName].inside.upgraded = false;
if (this.moneyUpgrade) {
_root[arrowName].inside.upgraded = true;
}
}
if (this.attacking) {
this.attackTimer++;
if (this.attackTimer == this.coolDown) {
this.attackTimer = 0;
this.attacking = false;
this.closestEnemy = "null";
}
}
}
on (rollOver) {
if (this.range == 100) {
_root.range._width = 150;
_root.range._height = 150;
} else if (this.range == 125) {
_root.range._width = 200;
_root.range._height = 200;
} else if (this.range == 150) {
_root.range._width = 250;
_root.range._height = 250;
}
_root.range._x = this._parent._x;
_root.range._y = this._parent._y;
}
on (rollOut) {
_root.range._y = -400;
}
Instance of Symbol 8 MovieClip "inside" in Symbol 9 MovieClip [redAir] Frame 1
onClipEvent (load) {
this.range = 150;
this.coolDown = 15;
this.attackTimer = 0;
this.attacking = false;
this.closestEnemy = "null";
this._parent.money._visible = false;
this.moneyUpgrade = false;
}
onClipEvent (enterFrame) {
this.closestEnemy = _root.findClosestEnemy(this._parent._x, this._parent._y, this.range, "a");
if ((this.closestEnemy != "null") && (this.attacking == false)) {
this.attacking = true;
var ang = _root.findAngle(this._parent._x, this._parent._y, _root[this.closestEnemy]._x, _root[this.closestEnemy]._y);
_root.arrowNum++;
var arrowName = ("weapon" + _root.arrowNum);
_root.attachMovie("arrow3", arrowName, 15000 + _root.arrowNum);
_root[arrowName]._x = this._parent._x;
_root[arrowName]._y = this._parent._y;
_root[arrowName]._rotation = ang;
_root[arrowName].inside.targetEnemy = this.closestEnemy;
_root[arrowName].inside.upgraded = false;
if (this.moneyUpgrade) {
_root[arrowName].inside.upgraded = true;
}
}
if (this.attacking) {
this.attackTimer++;
if (this.attackTimer == this.coolDown) {
this.attackTimer = 0;
this.attacking = false;
this.closestEnemy = "null";
}
}
}
on (rollOver) {
if (this.range == 100) {
_root.range._width = 150;
_root.range._height = 150;
} else if (this.range == 125) {
_root.range._width = 200;
_root.range._height = 200;
} else if (this.range == 150) {
_root.range._width = 250;
_root.range._height = 250;
}
_root.range._x = this._parent._x;
_root.range._y = this._parent._y;
}
on (rollOut) {
_root.range._y = -400;
}
Symbol 40 MovieClip Frame 16
this._parent.removeMovieClip();
Instance of Symbol 108 MovieClip in Symbol 109 MovieClip [airTower] Frame 1
onClipEvent (load) {
this.range = 100;
this.coolDown = 25;
this.attackTimer = 0;
this.attacking = false;
this.closestEnemy = "null";
}
onClipEvent (enterFrame) {
this.closestEnemy = _root.findClosestEnemy(this._parent._x, this._parent._y, this.range, "a");
if ((this.closestEnemy != "null") && (this.attacking == false)) {
this.attacking = true;
var ang = _root.findAngle(this._parent._x, this._parent._y, _root[this.closestEnemy]._x, _root[this.closestEnemy]._y);
_root.arrowNum++;
var arrowName = ("weapon" + _root.arrowNum);
_root.attachMovie("arrow1", arrowName, 15000 + _root.arrowNum);
_root[arrowName]._x = this._parent._x;
_root[arrowName]._y = this._parent._y;
_root[arrowName]._rotation = ang;
_root[arrowName].inside.targetEnemy = this.closestEnemy;
}
if (this.attacking) {
this.attackTimer++;
if (this.attackTimer == this.coolDown) {
this.attackTimer = 0;
this.attacking = false;
this.closestEnemy = "null";
}
}
}
on (rollOver) {
if (this.range == 100) {
_root.range._width = 150;
_root.range._height = 150;
} else if (this.range == 125) {
_root.range._width = 200;
_root.range._height = 200;
} else if (this.range == 150) {
_root.range._width = 250;
_root.range._height = 250;
}
_root.range._x = this._parent._x;
_root.range._y = this._parent._y;
}
on (rollOut) {
_root.range._y = -400;
}
Instance of Symbol 111 MovieClip in Symbol 112 MovieClip [groundTower] Frame 1
onClipEvent (load) {
this.range = 100;
this.coolDown = 25;
this.attackTimer = 0;
this.attacking = false;
this.closestEnemy = "null";
}
onClipEvent (enterFrame) {
this.closestEnemy = _root.findClosestEnemy(this._parent._x, this._parent._y, this.range, "g");
if ((this.closestEnemy != "null") && (this.attacking == false)) {
this.attacking = true;
var ang = _root.findAngle(this._parent._x, this._parent._y, _root[this.closestEnemy]._x, _root[this.closestEnemy]._y);
_root.arrowNum++;
var arrowName = ("weapon" + _root.arrowNum);
_root.attachMovie("arrow1", arrowName, 15000 + _root.arrowNum);
_root[arrowName]._x = this._parent._x;
_root[arrowName]._y = this._parent._y;
_root[arrowName]._rotation = ang;
_root[arrowName].inside.targetEnemy = this.closestEnemy;
}
if (this.attacking) {
this.attackTimer++;
if (this.attackTimer == this.coolDown) {
this.attackTimer = 0;
this.attacking = false;
this.closestEnemy = "null";
}
}
}
on (rollOver) {
if (this.range == 100) {
_root.range._width = 150;
_root.range._height = 150;
} else if (this.range == 125) {
_root.range._width = 200;
_root.range._height = 200;
} else if (this.range == 150) {
_root.range._width = 250;
_root.range._height = 250;
}
_root.range._x = this._parent._x;
_root.range._y = this._parent._y;
}
on (rollOut) {
_root.range._y = -400;
}
Instance of Symbol 117 MovieClip in Symbol 118 MovieClip [iceTower] Frame 1
onClipEvent (load) {
this.range = 125;
this.coolDown = 25;
this.attackTimer = 0;
this.attacking = false;
this.closestEnemy = "null";
}
onClipEvent (enterFrame) {
this.closestEnemy = _root.findClosestEnemy(this._parent._x, this._parent._y, this.range, "b");
if ((this.closestEnemy != "null") && (this.attacking == false)) {
this.attacking = true;
var ang = _root.findAngle(this._parent._x, this._parent._y, _root[this.closestEnemy]._x, _root[this.closestEnemy]._y);
_root.arrowNum++;
var arrowName = ("weapon" + _root.arrowNum);
_root.attachMovie("arrow4", arrowName, 15000 + _root.arrowNum);
_root[arrowName]._x = this._parent._x;
_root[arrowName]._y = this._parent._y;
_root[arrowName]._rotation = ang;
_root[arrowName].inside.targetEnemy = this.closestEnemy;
}
if (this.attacking) {
this.attackTimer++;
if (this.attackTimer == this.coolDown) {
this.attackTimer = 0;
this.attacking = false;
this.closestEnemy = "null";
}
}
}
on (rollOver) {
if (this.range == 100) {
_root.range._width = 150;
_root.range._height = 150;
} else if (this.range == 125) {
_root.range._width = 200;
_root.range._height = 200;
} else if (this.range == 150) {
_root.range._width = 250;
_root.range._height = 250;
}
_root.range._x = this._parent._x;
_root.range._y = this._parent._y;
}
on (rollOut) {
_root.range._y = -400;
}
Instance of Symbol 123 MovieClip in Symbol 124 MovieClip [poisonTower] Frame 1
onClipEvent (load) {
this.range = 125;
this.coolDown = 25;
this.attackTimer = 0;
this.attacking = false;
this.closestEnemy = "null";
}
onClipEvent (enterFrame) {
this.closestEnemy = _root.findClosestEnemy(this._parent._x, this._parent._y, this.range, "b");
if ((this.closestEnemy != "null") && (this.attacking == false)) {
this.attacking = true;
var ang = _root.findAngle(this._parent._x, this._parent._y, _root[this.closestEnemy]._x, _root[this.closestEnemy]._y);
_root.arrowNum++;
var arrowName = ("weapon" + _root.arrowNum);
_root.attachMovie("arrow5", arrowName, 15000 + _root.arrowNum);
_root[arrowName]._x = this._parent._x;
_root[arrowName]._y = this._parent._y;
_root[arrowName]._rotation = ang;
_root[arrowName].inside.targetEnemy = this.closestEnemy;
}
if (this.attacking) {
this.attackTimer++;
if (this.attackTimer == this.coolDown) {
this.attackTimer = 0;
this.attacking = false;
this.closestEnemy = "null";
}
}
}
on (rollOver) {
if (this.range == 100) {
_root.range._width = 150;
_root.range._height = 150;
} else if (this.range == 125) {
_root.range._width = 200;
_root.range._height = 200;
} else if (this.range == 150) {
_root.range._width = 250;
_root.range._height = 250;
}
_root.range._x = this._parent._x;
_root.range._y = this._parent._y;
}
on (rollOut) {
_root.range._y = -400;
}
Instance of Symbol 126 MovieClip in Symbol 127 MovieClip [whiteGround] Frame 1
onClipEvent (load) {
this.range = 125;
this.coolDown = 20;
this.attackTimer = 0;
this.attacking = false;
this.closestEnemy = "null";
}
onClipEvent (enterFrame) {
this.closestEnemy = _root.findClosestEnemy(this._parent._x, this._parent._y, this.range, "g");
if ((this.closestEnemy != "null") && (this.attacking == false)) {
this.attacking = true;
var ang = _root.findAngle(this._parent._x, this._parent._y, _root[this.closestEnemy]._x, _root[this.closestEnemy]._y);
_root.arrowNum++;
var arrowName = ("weapon" + _root.arrowNum);
_root.attachMovie("arrow2", arrowName, 15000 + _root.arrowNum);
_root[arrowName]._x = this._parent._x;
_root[arrowName]._y = this._parent._y;
_root[arrowName]._rotation = ang;
_root[arrowName].inside.targetEnemy = this.closestEnemy;
}
if (this.attacking) {
this.attackTimer++;
if (this.attackTimer == this.coolDown) {
this.attackTimer = 0;
this.attacking = false;
this.closestEnemy = "null";
}
}
}
on (rollOver) {
if (this.range == 100) {
_root.range._width = 150;
_root.range._height = 150;
} else if (this.range == 125) {
_root.range._width = 200;
_root.range._height = 200;
} else if (this.range == 150) {
_root.range._width = 250;
_root.range._height = 250;
}
_root.range._x = this._parent._x;
_root.range._y = this._parent._y;
}
on (rollOut) {
_root.range._y = -400;
}
Instance of Symbol 129 MovieClip in Symbol 130 MovieClip [whiteAir] Frame 1
onClipEvent (load) {
this.range = 125;
this.coolDown = 20;
this.attackTimer = 0;
this.attacking = false;
this.closestEnemy = "null";
}
onClipEvent (enterFrame) {
this.closestEnemy = _root.findClosestEnemy(this._parent._x, this._parent._y, this.range, "a");
if ((this.closestEnemy != "null") && (this.attacking == false)) {
this.attacking = true;
var ang = _root.findAngle(this._parent._x, this._parent._y, _root[this.closestEnemy]._x, _root[this.closestEnemy]._y);
_root.arrowNum++;
var arrowName = ("weapon" + _root.arrowNum);
_root.attachMovie("arrow2", arrowName, 15000 + _root.arrowNum);
_root[arrowName]._x = this._parent._x;
_root[arrowName]._y = this._parent._y;
_root[arrowName]._rotation = ang;
_root[arrowName].inside.targetEnemy = this.closestEnemy;
}
if (this.attacking) {
this.attackTimer++;
if (this.attackTimer == this.coolDown) {
this.attackTimer = 0;
this.attacking = false;
this.closestEnemy = "null";
}
}
}
on (rollOver) {
if (this.range == 100) {
_root.range._width = 150;
_root.range._height = 150;
} else if (this.range == 125) {
_root.range._width = 200;
_root.range._height = 200;
} else if (this.range == 150) {
_root.range._width = 250;
_root.range._height = 250;
}
_root.range._x = this._parent._x;
_root.range._y = this._parent._y;
}
on (rollOut) {
_root.range._y = -400;
}
Instance of Symbol 132 MovieClip "inside" in Symbol 134 MovieClip [arrow1] Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root[this.targetEnemy])) {
_root[this.targetEnemy].curHealth = _root[this.targetEnemy].curHealth - 5;
_root.playSound("monsterHit");
if (_root[this.targetEnemy].curHealth <= 0) {
_root.enemyDead(this.targetEnemy);
}
this._parent.removeMovieClip();
}
}
Symbol 134 MovieClip [arrow1] Frame 8
this.removeMovieClip();
Instance of Symbol 136 MovieClip "inside" in Symbol 137 MovieClip [arrow2] Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root[this.targetEnemy])) {
_root[this.targetEnemy].curHealth = _root[this.targetEnemy].curHealth - 8;
_root.playSound("monsterHit");
if (_root[this.targetEnemy].curHealth <= 0) {
_root.enemyDead(this.targetEnemy);
}
this._parent.removeMovieClip();
}
}
Symbol 137 MovieClip [arrow2] Frame 8
this.removeMovieClip();
Instance of Symbol 139 MovieClip "inside" in Symbol 140 MovieClip [arrow3] Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root[this.targetEnemy])) {
_root[this.targetEnemy].curHealth = _root[this.targetEnemy].curHealth - 10;
_root.playSound("monsterHit");
if (_root[this.targetEnemy].curHealth <= 0) {
_root.enemyDead(this.targetEnemy);
if (this.upgraded) {
_root.gold = _root.gold + 3;
}
}
this._parent.removeMovieClip();
}
}
Symbol 140 MovieClip [arrow3] Frame 8
this.removeMovieClip();
Instance of Symbol 142 MovieClip "inside" in Symbol 144 MovieClip [arrow4] Frame 1
onClipEvent (load) {
}
onClipEvent (enterFrame) {
if (this.hitTest(_root[this.targetEnemy])) {
_root[this.targetEnemy].speed = 1;
_root[this.targetEnemy].slow = true;
_root[this.targetEnemy].slowTimer = 0;
_root.playSound("monsterHit");
var trans = (new flash.geom.Transform(_root[this.targetEnemy].inside));
var blueColorTransform = (new flash.geom.ColorTransform(0, 1, 1, 1, 0, 0, 255, 0));
trans.colorTransform = blueColorTransform;
this._parent.removeMovieClip();
}
}
Symbol 144 MovieClip [arrow4] Frame 11
this.removeMovieClip();
Instance of Symbol 146 MovieClip "inside" in Symbol 147 MovieClip [arrow5] Frame 1
onClipEvent (load) {
}
onClipEvent (enterFrame) {
if (this.hitTest(_root[this.targetEnemy])) {
_root[this.targetEnemy].poison = true;
_root[this.targetEnemy].poisonTimer = 0;
if (_root[this.targetEnemy].poisonNum == undefined) {
_root[this.targetEnemy].poisonNum = 1;
} else {
_root[this.targetEnemy].poisonNum++;
}
_root.playSound("monsterHit");
var trans = (new flash.geom.Transform(_root[this.targetEnemy].inside));
var purpleColorTransform = (new flash.geom.ColorTransform(0.6, 0, 0.6, 1, 20, 0, 20, 0));
trans.colorTransform = purpleColorTransform;
this._parent.removeMovieClip();
}
}
Symbol 147 MovieClip [arrow5] Frame 12
this.removeMovieClip();
Symbol 171 MovieClip Frame 12
this._parent.removeMovieClip();
Symbol 196 MovieClip Frame 11
this._parent.removeMovieClip();
Symbol 239 MovieClip Frame 8
this._parent.removeMovieClip();
Symbol 263 MovieClip Frame 39
stop();
Symbol 283 MovieClip Frame 39
stop();
Symbol 311 MovieClip Frame 35
this.gotoAndPlay(1);
Symbol 314 MovieClip Frame 144
stopAllSounds();
Symbol 314 MovieClip Frame 145
_root.gotoAndStop("splash");
Symbol 402 MovieClip Frame 72
this._parent.removeMovieClip();
Symbol 410 Button
on (release) {
_root.gotoAndStop("instructions");
}
on (rollOver) {
_root.soundFX.gotoAndPlay("mouseOver");
}
Symbol 416 Button
on (release) {
_root.gotoAndStop("credits");
}
on (rollOver) {
_root.soundFX.gotoAndPlay("mouseOver");
}
Symbol 567 MovieClip Frame 1
stop();
Symbol 629 MovieClip Frame 1
stop();
Symbol 685 MovieClip Frame 1
stop();
Symbol 766 MovieClip Frame 1
stop();
Symbol 776 MovieClip Frame 1
stop();
Symbol 776 MovieClip Frame 2
this.gotoAndStop(1);
Symbol 776 MovieClip Frame 12
this.gotoAndStop(1);
Symbol 776 MovieClip Frame 22
this.gotoAndStop(1);
Symbol 776 MovieClip Frame 31
this.gotoAndStop(1);
Symbol 776 MovieClip Frame 41
this.gotoAndStop(1);
Symbol 776 MovieClip Frame 50
this.gotoAndStop(1);
Symbol 776 MovieClip Frame 58
this.gotoAndStop(1);
Symbol 776 MovieClip Frame 68
this.gotoAndStop(1);
Symbol 781 Button
on (release) {
getURL ("http://www.axis-games.com");
}
Symbol 787 Button
on (release) {
stopAllSounds();
_root.gotoAndPlay("game");
}
on (rollOver) {
_root.soundFX.gotoAndPlay("mouseOver");
}
Symbol 803 Button
on (release) {
_root.gotoAndStop("splash");
}
on (rollOver) {
_root.soundFX.gotoAndPlay("mouseOver");
}
Symbol 811 MovieClip Frame 61
_root.achievementList.gotoAndStop(2);
stop();
Symbol 817 Button
on (release) {
stopAllSounds();
_root.gotoAndStop("splash");
}
on (rollOver) {
_root.soundFX.gotoAndPlay("mouseOver");
}
Symbol 819 MovieClip Frame 1
stop();
Symbol 819 MovieClip Frame 2
stop();
Symbol 829 Button
on (release) {
_root.setEnemies();
this.nextLevel._visible = false;
}
on (rollOver) {
_root.playSound("mouseOver");
}
Symbol 850 Button
on (rollOver) {
_root.playSound("mouseOver");
}
on (release) {
if (_root.gold >= 100) {
_root.priceOfTower = 100;
_root.towerOnMouse = true;
_root.attachMovie("ground", "tower", 200000);
_root.towerAttached = "groundTower";
_root.newTileNum = 20;
}
}
Symbol 856 Button
on (release) {
if (_root.gold >= 150) {
_root.priceOfTower = 150;
_root.upgradeOnMouse = true;
_root.attachMovie("upgrade", "upgradeTowersThing", 200000);
_root.upgradeAttached = "damage";
}
}
on (rollOver) {
_root.playSound("mouseOver");
}
Symbol 858 Button
on (release) {
if (_root.gold >= 150) {
_root.priceOfTower = 150;
_root.towerOnMouse = true;
_root.attachMovie("ice", "tower", 200000);
_root.towerAttached = "iceTower";
_root.newTileNum = 30;
}
}
on (rollOver) {
_root.playSound("mouseOver");
}
Symbol 862 Button
on (release) {
if (_root.gold >= 100) {
_root.priceOfTower = 100;
_root.towerOnMouse = true;
_root.attachMovie("air", "tower", 200000);
_root.towerAttached = "airTower";
_root.newTileNum = 23;
}
}
on (rollOver) {
_root.playSound("mouseOver");
}
Symbol 864 Button
on (release) {
if (_root.gold >= 200) {
_root.priceOfTower = 200;
_root.towerOnMouse = true;
_root.attachMovie("poison", "tower", 200000);
_root.towerAttached = "poisonTower";
_root.newTileNum = 31;
}
}
on (rollOver) {
_root.playSound("mouseOver");
}
Symbol 871 Button
on (release) {
if (_root.gold >= 100) {
_root.priceOfTower = 100;
_root.upgradeOnMouse = true;
_root.attachMovie("moneySymbol", "upgradeMoneyThing", 200000);
_root.upgradeAttached = "money";
}
}
on (rollOver) {
_root.playSound("mouseOver");
}
Symbol 879 Button
on (release) {
_root.startGame.gotoAndStop(1);
}
Symbol 882 MovieClip Frame 1
stop();