Frame 1
stop();
onEnterFrame = function () {
var _local2 = _root.getBytesLoaded() / _root.getBytesTotal();
preloader_mc.gotoAndPlay(Math.ceil(_local2 * 100));
if (preloader_mc._alpha < 100) {
preloader_mc._alpha = preloader_mc._alpha + 1;
}
if (_local2 == 1) {
delete onEnterFrame;
gotoAndPlay ("startdelay");
onEnterFrame = null;
}
};
Frame 21
if (game_active) {
stop();
}
Frame 51
if (game_active) {
stop();
}
Frame 184
Frame 259
function audio_prepare(music_sprite, sfxlist) {
mc_audio = this.createEmptyMovieClip("mc_audio", this.getNextHighestDepth());
mc_audio.musicPlaying = false;
mc_audio.soundOn = true;
mc_audio.sfxlist = sfxlist;
mc_audio.music_sprite = music_sprite;
mc_audio.sfx = [];
mc_audio.sfxtime = [];
mc_audio.sfxmc = [];
n = 0;
while (n < mc_audio.sfxlist.length) {
sfxmc = mc_audio.createEmptyMovieClip("sfx_" + mc_audio.getNextHighestDepth(), mc_audio.getNextHighestDepth());
mc_audio.sfxmc.push(sfxmc);
n++;
}
sfxInterval = setInterval("sfxtimers", 200);
}
function audio_sound_effect(n) {
if (mc_audio.soundOn) {
if (mc_audio.sfxtime[n] <= 0) {
mc_audio.sfx[n].stop();
mc_audio.sfx[n] = new Sound(mc_audio.sfxmc[n]);
mc_audio.sfx[n].attachSound(mc_audio.sfxlist[n]);
mc_audio.sfx[n].start(0, 1);
sfxtime[n] = 10;
}
}
}
function sfxtimers() {
n = 0;
while (n < mc_audio.sfxlist.length) {
mc_audio.sfxtime[n] = mc_audio.sfxtime[n] + -1;
n++;
}
}
function audio_play_music() {
if (mc_audio.musicPlaying != true) {
mc_audio.musicSound = new Sound(this.mc_audio);
mc_audio.musicSound.attachSound(mc_audio.music_sprite);
mc_audio.musicSound.start(0, 9999);
mc_audio.musicPlaying = true;
mc_audio.musicSound.setVolume(95);
}
}
function audio_stop_music() {
mc_audio.musicSound.stop();
mc_audio.musicPlaying = false;
}
function audio_stop_sounds() {
mc_audio.soundOn = false;
}
function audio_start_sounds() {
mc_audio.soundOn = true;
}
function load_xml_settings(xmlfilepath) {
this.gamexml = new XML();
gamexml.ignoreWhite = true;
gamexml.load(xmlfilepath);
gamexml.onLoad = function (success) {
if (success) {
_root.xmlloaded = true;
process_xml();
}
};
}
function process_xml() {
game_starting_cash = parseInt(gamexml.firstChild.attributes.startcash);
game_starting_fanta = parseInt(gamexml.firstChild.attributes.startfanta);
game_shield_cost = parseInt(gamexml.firstChild.attributes.shieldcost);
game_score_script_url = mx.xpath.XPathAPI.selectSingleNode(gamexml.firstChild, "*/highscores").attributes.url;
xmltowers = mx.xpath.XPathAPI.selectNodeList(gamexml.firstChild, "*/towerlist/tower");
if (xmltowers.length > 0) {
tower_template_list = [];
n = 0;
while (n < xmltowers.length) {
var _local14 = xmltowers[n].attributes.clip;
var _local11 = parseInt(xmltowers[n].attributes.reload);
var _local16 = parseInt(xmltowers[n].attributes.power);
var _local5 = parseInt(xmltowers[n].attributes.range);
var _local2 = parseInt(xmltowers[n].attributes.cost);
var _local17 = parseInt(xmltowers[n].attributes.weapontype);
var _local12 = xmltowers[n].attributes.title;
var _local8 = mx.xpath.XPathAPI.selectNodeList(xmltowers[n], "*/upgrade");
add_tower_template(_local14, _local11, _local16, _local5, _local2, _local17, _local12, _local8);
n++;
}
}
xmlmonsters = mx.xpath.XPathAPI.selectNodeList(gamexml.firstChild, "*/monsterlist/monster");
if (xmlmonsters.length > 0) {
monster_template_list = [];
n = 0;
while (n < xmlmonsters.length) {
var _local3 = parseInt(xmlmonsters[n].attributes.speed) / 10;
var _local15 = parseInt(xmlmonsters[n].attributes.health);
var _local4 = xmlmonsters[n].attributes.clip;
var _local6 = parseInt(xmlmonsters[n].attributes.reward);
var _local13 = parseInt(xmlmonsters[n].attributes.explodes);
var _local7 = xmlmonsters[n].attributes.id.toUpperCase();
addMonsterTemplate(_local7, _local3, _local15, _local4, _local6, _local13);
n++;
}
}
xmlwaves = mx.xpath.XPathAPI.selectNodeList(gamexml.firstChild, "*/wavelist/wave");
if (xmlwaves.length > 0) {
wave_list = [];
n = 0;
while (n < xmlwaves.length) {
var _local9 = xmlwaves[n].attributes.monsterid.toUpperCase();
var _local18 = parseInt(xmlwaves[n].attributes.spawnamount);
var _local10 = parseInt(xmlwaves[n].attributes.spawndelay);
var _local1 = parseInt(xmlwaves[n].attributes.secondspause);
if (xmlwaves[n].attributes.loopbackhere != null) {
wave_loop = n + 1;
} else if (_local1 > 0) {
wave_list.push([-1, _local1, 25]);
} else {
wave_list.push([_local9, _local18, _local10]);
}
n++;
}
}
}
function addMonsterTemplate(id, mspeed, mhealth, mmc, mmoney, mexploder) {
monsterObj = new Object();
monsterObj.speed = mspeed;
monsterObj.health = mhealth;
monsterObj.mc = mmc;
monsterObj.money = mmoney;
monsterObj.explode = mexploder;
monster_template_list[id] = monsterObj;
}
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
function game_prepare() {
mc_end.removeMovieClip();
mc_game.removeMovieClip();
game_money = game_starting_cash;
game_fanta = game_starting_fanta;
game_score = 0;
game_waves = 0;
monster_list = [];
wave_multiply = 1;
wave_current = 0;
tower_list = [];
missile_list = [];
mc_game = this.createEmptyMovieClip("mc_game", 50);
mc_start = this.attachMovie("mca_start", "mc_start", this.getNextHighestDepth());
mc_start.mc_button_hard.onRelease = function () {
game_start("level_path_hard", waypoints_hard);
};
mc_start.mc_button_easy.onRelease = function () {
game_start("level_path_new", waypoints_easy);
};
}
function game_start(level_mc, level_map_points) {
game_waypoints = level_map_points;
game_active = true;
mc_game.attachMovie(level_mc, "level_path", mc_game.getNextHighestDepth());
mc_game.createEmptyMovieClip("mc_sprites", mc_game.getNextHighestDepth());
mc_game.attachMovie("mca_factory", "mc_factory", 5000, {_x:300, _y:300});
mc_game.createEmptyMovieClip("mc_projectiles", mc_game.getNextHighestDepth());
mc_game.level_path.mc_nobuild._visible = false;
setup_interface();
new_wave();
mc_game.onEnterFrame = function () {
game_tick();
};
mc_start.removeMovieClip();
audio_play_music();
}
function game_end() {
game_active = false;
mc_game.onEnterFrame = null;
mc_game.mc_sprites._visible = false;
mc_game.mc_interface._visible = false;
t = 0;
while (t < tower_list.length) {
tower_list[t].onEnterFrame = null;
t++;
}
m = 0;
while (m < monster_list.length) {
monster_list[m].onEnterFrame = null;
m++;
}
mc_end = this.attachMovie("mca_end", "mc_end", this.getNextHighestDepth());
mc_end.txt_score.text = ("you scored: " + game_score) + " points";
mc_end.mc_button.onRelease = function () {
game_prepare();
};
audio_stop_music();
mc_end.txt_name.onPress = function () {
this.text = "";
delete this.onPress;
};
mc_end.txt_name.text = "enter name";
mc_end.txt_name._visible = true;
mc_end.mc_button_high._visible = true;
mc_end.mc_sub_label._visible = true;
mc_end.mc_button_high.onRelease = function () {
if (mc_end.txt_name.text != "enter name") {
scoretable_out.action = "INSERT";
scoretable_out.viewtype = "FLASH";
scoretable_out.winname = mc_end.txt_name.text;
scoretable_out.winscore = game_score;
scoretable_out.sendAndLoad(game_score_script_url, scoretable_in, "GET");
mc_end.mc_button_high._visible = false;
mc_end.mc_sub_label._visible = false;
mc_end.txt_name._visible = false;
scoretable_in.onLoad = function (success) {
if (success) {
n = 0;
while (n < 10) {
mc_end["NAME" + n] = scoretable_in["NAME" + n];
mc_end["SCORE" + n] = scoretable_in["SCORE" + n];
n++;
}
} else {
mc_end.error_txt.text = "Error connecting to server.";
}
};
}
};
scoretable_out.action = "VIEW";
scoretable_out.viewtype = "FLASH";
scoretable_in.onLoad = function (success) {
if (success) {
n = 0;
while (n < 10) {
mc_end["NAME" + n] = scoretable_in["NAME" + n];
mc_end["SCORE" + n] = scoretable_in["SCORE" + n];
n++;
}
} else {
mc_end.error_txt.text = "Error connecting to server.";
}
};
scoretable_out.sendAndLoad(game_score_script_url, scoretable_in, "GET");
}
function game_tick() {
if (game_fanta < 1) {
game_end();
} else {
process_wave();
sort_sprites();
}
}
function new_wave() {
game_waves++;
if (wave_current >= wave_list.length) {
wave_current = wave_loop;
wave_multiply = wave_multiply + 1;
}
wave_array = wave_list[wave_current++];
wave_object = new Object();
wave_object.action = wave_array[0];
wave_object.count = Math.round(wave_array[1] * wave_multiply);
wave_object.delay = Math.max(25, wave_array[2] - Math.round(wave_multiply * 5));
wave_object.tick = wave_object.delay;
}
function process_wave() {
if (wave_object.tick < 0) {
wave_object.count = wave_object.count - 1;
wave_object.tick = wave_object.delay;
if (wave_object.count < 0) {
new_wave();
} else {
process_wave_action(wave_object.action);
}
}
wave_object.tick = wave_object.tick - 1;
}
function process_wave_action(action) {
switch (action) {
case -1 :
if (monster_list.length < 1) {
new_wave();
}
break;
default :
create_monster(monster_template_list[action]);
}
}
function create_monster(statsObj) {
monsters_placed++;
new_monster = 0;
monster_mc = mc_game.mc_sprites.attachMovie(statsObj.mc, "monster" + mc_game.mc_sprites.getNextHighestDepth(), mc_game.mc_sprites.getNextHighestDepth(), {_x:game_waypoints[0][0], _y:game_waypoints[0][1]});
monster_mc.point_to_reach = 1;
monster_mc.speed = statsObj.speed;
monster_mc.health = Math.round(statsObj.health * wave_multiply);
monster_mc.maxhealth = Math.round(statsObj.health * wave_multiply);
monster_mc.money = Math.floor(statsObj.money * wave_multiply);
monster_mc.explode = statsObj.explode;
monster_mc.cacheAsBitmap = true;
health_mc = monster_mc.attachMovie("mca_health_bar", "mc_health", monster_mc.getNextHighestDepth(), {_x:-10, _y:12});
health_mc.monster = monster_mc;
health_mc.stop();
health_mc._alpha = 75;
health_mc.onEnterFrame = function () {
this.gotoAndStop(50 - Math.ceil((this.monster.health / this.monster.maxhealth) * 50));
};
monster_mc.onEnterFrame = function () {
dist_x = game_waypoints[this.point_to_reach][0] - this._x;
dist_y = game_waypoints[this.point_to_reach][1] - this._y;
speednow = this.speed;
if (this.slow > 0) {
speednow = speednow / 2;
this.slow = this.slow - 1;
}
if (this.burn > 0) {
this.health = this.health - 1;
this.burn = this.burn - 1;
}
if ((Math.abs(dist_x) + Math.abs(dist_y)) < speednow) {
this.point_to_reach++;
if (this.point_to_reach == game_waypoints.length) {
game_fanta = game_fanta - 1;
erase_monster(this);
audio_sound_effect(7);
}
}
angle = Math.atan2(dist_y, dist_x);
this._x = this._x + (speednow * Math.cos(angle));
this._y = this._y + (speednow * Math.sin(angle));
rot = (((angle / Math.PI) * 180) - 90) + 35;
if (rot < 0) {
rot = 360 + rot;
}
rotframe = Math.ceil((rot / 360) * 4);
this.gotoAndStop(rotframe);
if (this.health < 0) {
update_money(this.money);
game_score = game_score + Math.ceil(this.money / 10);
if (this.explode) {
explode_monster(this);
} else {
add_small_explode(this);
}
erase_monster(this);
audio_sound_effect(6);
}
};
monster_list.push(monster_mc);
}
function erase_monster(mmc) {
m = 0;
while (m < monster_list.length) {
if (monster_list[m] == mmc) {
monster_list.splice(m, 1);
}
m++;
}
mmc.unloadMovie();
}
function explode_monster(mmc) {
var _local2 = 100;
xmc = mc_game.mc_sprites.attachMovie("mca_tower_explodes", "explode_" + mc_game.mc_sprites.getNextHighestDepth(), mc_game.mc_sprites.getNextHighestDepth(), {_x:mmc._x, _y:mmc._y});
xmc._width = _local2;
xmc._height = _local2;
xmc.burn = 0;
xmc.onEnterFrame = function () {
this.burn++;
if (this.burn > 20) {
this.unloadMovie();
}
};
audio_sound_effect(5);
monster_find_target(mmc, _local2);
}
function monster_find_target(mmc, range) {
var _local1 = [];
t = 0;
while (t < tower_list.length) {
if (Math.abs(get_distance(mmc._x, mmc._y, tower_list[t]._x, tower_list[t]._y)) < range) {
add_small_explode(tower_list[t]);
if (tower_list[t].shield > 0) {
tower_lose_shield(tower_list[t]);
} else {
_local1.push(tower_list[t]);
}
}
t++;
}
n = 0;
while (n < _local1.length) {
t = 0;
while (t < tower_list.length) {
if (tower_list[t] == _local1[n]) {
tower_list[t].unloadMovie();
tower_list.splice(t, 1);
}
t++;
}
n++;
}
return(success);
}
function add_small_explode(emc) {
audio_sound_effect(6);
xmc = mc_game.mc_sprites.attachMovie("mca_tower_explodes", "explode" + mc_game.mc_sprites.getNextHighestDepth(), mc_game.mc_sprites.getNextHighestDepth(), {_x:emc._x, _y:emc._y});
xmc.burn = 0;
xmc.onEnterFrame = function () {
this.burn++;
if (this.burn > 20) {
this.unloadMovie();
}
};
}
function setup_interface() {
mc_game.attachMovie("mca_interface", "mc_interface", mc_game.getNextHighestDepth(), {_x:10, _y:538});
tower_button_list = new Array(mc_game.mc_interface.button_tower_fast, mc_game.mc_interface.button_tower_slow, mc_game.mc_interface.button_tower_ice, mc_game.mc_interface.button_tower_fire, mc_game.mc_interface.button_tower_super);
tower_labels_list = new Array(mc_game.mc_interface.mc_txt1, mc_game.mc_interface.mc_txt2, mc_game.mc_interface.mc_txt3, mc_game.mc_interface.mc_txt4, mc_game.mc_interface.mc_txt5);
n = 0;
while (n < tower_button_list.length) {
tower_button_list[n].n = n;
tower_button_list[n].onRelease = function () {
if (game_money >= tower_template_list[this.n].cost) {
tower_pickup(this.n);
this._alpha = 50;
}
};
tower_button_list[n].onRollOver = function () {
if (game_money >= tower_template_list[this.n].cost) {
this._alpha = 100;
}
};
tower_button_list[n].onRollOut = function () {
this._alpha = 50;
};
tower_button_list[n]._alpha = 50;
tower_button_list[n].hitbox._visible = false;
tower_labels_list[n].txt.htmlText = (tower_template_list[n].ttl + "<br>\u00A3") + tower_template_list[n].cost;
n++;
}
mc_game.mc_interface.onEnterFrame = function () {
this.txt_money.text = "Cash: \u00A3" + game_money;
this.txt_fanta.text = "Fanta: " + game_fanta;
this.txt_score.text = "Score: " + game_score;
this.txt_wave.text = "Wave: " + game_waves;
};
mc_game.mc_interface.mc_but_music.onRelease = function () {
if (mc_audio.musicPlaying) {
audio_stop_music();
this._alpha = 50;
} else {
audio_play_music();
this._alpha = 100;
}
};
mc_game.mc_interface.mc_but_sound.onRelease = function () {
if (mc_audio.soundOn) {
audio_stop_sounds();
this._alpha = 50;
} else {
audio_start_sounds();
this._alpha = 100;
}
};
}
function add_tower_template(tmc, tspeed, tpower, trange, tcost, tweapon, ttitle, tupgrade_list) {
towerObj = new Object();
towerObj.speed = tspeed;
towerObj.power = tpower;
towerObj.range = trange;
towerObj.weapon = tweapon;
towerObj.mc = tmc;
towerObj.cost = tcost;
towerObj.ttl = ttitle;
towerObj.shield = 0;
towerObj.upgrade_list = tupgrade_list;
tower_template_list.push(towerObj);
}
function tower_pickup(towernum) {
game_mouse_mode = 1;
mc_tower_cursor = mc_game.attachMovie(tower_template_list[towernum].mc, "mc_tower_cursor", mc_game.getNextHighestDepth(), {_x:_xmouse, _y:_ymouse});
mc_tower_cursor._alpha = 60;
mc_tower_cursor.range = tower_template_list[towernum].range;
mc_tower_cursor.hitbox._visible = false;
tower_build_range(mc_tower_cursor);
mc_tower_cursor.tower_type = towernum;
mc_interface.button_tower_fast.enabled = false;
mc_interface.button_tower_slow.enabled = false;
mc_tower_cursor.onRelease = function () {
if (drop_check(true)) {
drop_tower();
}
};
mc_tower_cursor.onEnterFrame = function () {
this._x = _xmouse;
this._y = _ymouse - 20;
if (drop_check(false)) {
mc_tower_cursor.mc_range._alpha = 100;
} else {
mc_tower_cursor.mc_range._alpha = 20;
}
};
}
function tower_show_shield(tmc) {
if (!tmc.mc_shield) {
tmc.attachMovie("mca_shield", "mc_shield", tmc.getNextHighestDepth());
}
tmc.mc_shield._visible = true;
}
function tower_lose_shield(tmc) {
tmc.mc_shield._visible = false;
tmc.shield = 0;
}
function tower_show_range(tmc) {
tmc.mc_range._visible = true;
}
function tower_hide_range(tmc) {
tmc.mc_range._visible = false;
}
function tower_build_range(tmc) {
if (!tmc.mc_range) {
mcr = tmc.createEmptyMovieClip("mc_range", tmc.getNextHighestDepth());
mcr._alpha = 40;
} else {
mcr = tmc.mc_range;
}
mcr.lineStyle(2, 0);
drawCircle(mcr, 0, 0, tmc.range);
}
function tower_show_upgrade(tmc) {
if (!mc_game.mc_upgrade) {
tower_build_upgrade();
}
mcu = mc_game.mc_upgrade;
mcu._x = tmc._x - (mcu._width / 2);
mcu._y = 50 + (tmc._y - (mcu._height / 2));
if (mcu._x < 0) {
mcu._x = 0;
}
if (mcu._x > (600 - mcu._width)) {
mcu._x = 600 - mcu._width;
}
if (mcu._y < 0) {
mcu._y = 0;
}
if (mcu._y > (600 - mcu._height)) {
mcu._y = 590 - mcu._height;
}
mcu.tower = tmc;
mcu.mc_no_upgrade._visible = false;
mcu.mc_upgrade_button._visible = false;
mcu.txt_c.htmlText = ((((((tmc.upgrade + "<br>") + tmc.power) + "<br>") + tmc.range) + "<br>") + tmc.speed) + "<br>";
mcu.upgrade_list = tower_template_list[tmc.tower_type].upgrade_list;
mcu.onEnterFrame = function () {
if ((!this.tower) || (isNaN(this.tower.upgrade))) {
tower_hide_upgrade();
}
if (this.tower.upgrade <= this.upgrade_list.length) {
var _local2 = parseInt(this.upgrade_list[this.tower.upgrade - 1].attributes.cost);
var _local5 = parseInt(this.upgrade_list[this.tower.upgrade - 1].attributes.power);
var _local3 = parseInt(this.upgrade_list[this.tower.upgrade - 1].attributes.range);
var _local4 = parseInt(this.upgrade_list[this.tower.upgrade - 1].attributes.reload);
mcu.txt_u.htmlText = (((((((((tmc.upgrade + 1) + "<br>") + _local5) + "<br>") + _local3) + "<br>") + _local4) + "<br>") + "\u00A3") + _local2;
if (_local2 > game_money) {
this.mc_upgrade_button._visible = false;
this.mc_no_upgrade._visible = true;
} else {
this.mc_upgrade_button._visible = true;
this.mc_no_upgrade._visible = false;
}
} else {
mcu.txt_u.htmlText = "No More Available<br>-<br>-<br>-<br>-";
this.mc_upgrade_button._visible = false;
this.mc_no_upgrade._visible = true;
}
if (this.tower.shield < 1) {
mcu.txt_s.htmlText = "BUY SHIELD \u00A3" + game_shield_cost;
if (game_shield_cost > game_money) {
this.mc_shield_button._visible = false;
this.mc_no_shield._visible = true;
} else {
this.mc_shield_button._visible = true;
this.mc_no_shield._visible = false;
}
} else {
mcu.txt_s.htmlText = "SHIELD ACTIVE";
this.mc_shield_button._visible = false;
this.mc_no_shield._visible = true;
}
mcu.txt_c.htmlText = (((((tmc.upgrade + "<br>") + tmc.power) + "<br>") + tmc.range) + "<br>") + tmc.speed;
};
mcu.mc_shield_button.onRelease = function () {
this._parent.tower.shield = 1;
update_money(-game_shield_cost);
tower_show_shield(this._parent.tower);
};
mcu.mc_upgrade_button.onRelease = function () {
var _local2 = parseInt(this._parent.upgrade_list[this._parent.tower.upgrade - 1].attributes.cost);
var _local5 = parseInt(this._parent.upgrade_list[this._parent.tower.upgrade - 1].attributes.power);
var _local3 = parseInt(this._parent.upgrade_list[this._parent.tower.upgrade - 1].attributes.range);
var _local4 = parseInt(this._parent.upgrade_list[this._parent.tower.upgrade - 1].attributes.reload);
this._parent.tower.power = _local5;
this._parent.tower.range = _local3;
this._parent.tower.speed = _local4;
this._parent.tower.upgrade++;
update_money(-_local2);
tower_build_range(this._parent.tower);
};
mc_game.mc_bigroll._visible = true;
mcu._visible = true;
}
function tower_hide_upgrade() {
mc_game.mc_upgrade._visible = false;
mc_game.mc_bigroll._visible = false;
mc_game.mc_upgrade.onEnterFrame = null;
tower_hide_range(mc_game.mc_upgrade.tower);
}
function tower_build_upgrade() {
if (!mc_game.mc_bigroll) {
mcb = mc_game.attachMovie("mca_massive_rollover", "mc_bigroll", mc_game.getNextHighestDepth());
} else {
mcb = mc_game.mc_bigroll;
}
mcb._alpha = 0;
mcb._visible = false;
mcb.onRollOver = function () {
tower_hide_upgrade();
};
mcu = mc_game.attachMovie("mca_upgrade_pop2", "mc_upgrade", mc_game.getNextHighestDepth());
mcu.mc_upgrade_button._alpha = 50;
mcu.mc_upgrade_button.onRollOut = function () {
this._alpha = 70;
};
mcu.mc_upgrade_button.onRollOver = function () {
this._alpha = 100;
};
mcu.mc_up_bg.onRollOver = function () {
this._visible = true;
};
mcu.mc_shield_button.onRollOver = function () {
this._alpha = 100;
};
mcu.mc_shield_button.onRollOut = function () {
this._alpha = 70;
};
}
function drop_check(full) {
var _local1 = true;
if (full) {
if (mc_game.mc_tower_cursor.hitbox.hitTest(mc_game.mc_interface)) {
drop_reset();
_local1 = false;
}
}
t = 0;
while (t < tower_list.length) {
if (mc_game.mc_tower_cursor.hitbox.hitTest(tower_list[t].hitbox)) {
_local1 = false;
}
t++;
}
cx = -1;
while (cx < 2) {
cursorx = mc_game.mc_tower_cursor._x + ((mc_game.mc_tower_cursor.hitbox._width / 2) * cx);
cy = -1;
while (cy < 2) {
cursory = (mc_game.mc_tower_cursor._y + 20) + ((mc_game.mc_tower_cursor.hitbox._height / 2) * cy);
if (mc_game.level_path.mc_nobuild.hitTest(cursorx, cursory, true)) {
_local1 = false;
}
cy++;
}
cx++;
}
return(_local1);
}
function drop_reset() {
mc_tower_cursor.removeMovieClip();
mc_interface.button_tower_fast.enabled = true;
mc_interface.button_tower_slow.enabled = true;
game_mouse_mode = 0;
}
function drop_tower() {
update_money(-tower_template_list[mc_tower_cursor.tower_type].cost);
mc_tower_cursor.enabled = false;
mc_tower = mc_game.mc_sprites.attachMovie(tower_template_list[mc_tower_cursor.tower_type].mc, "mc_tower_" + mc_game.mc_sprites.getNextHighestDepth(), mc_game.mc_sprites.getNextHighestDepth(), {_x:mc_tower_cursor._x, _y:mc_tower_cursor._y});
mc_tower.speed = tower_template_list[mc_tower_cursor.tower_type].speed;
mc_tower.power = tower_template_list[mc_tower_cursor.tower_type].power;
mc_tower.range = tower_template_list[mc_tower_cursor.tower_type].range;
mc_tower.weapon = tower_template_list[mc_tower_cursor.tower_type].weapon;
mc_tower.action = 0;
mc_tower.delay = 0;
mc_tower.upgrade = 1;
mc_tower.cost = tower_template_list[mc_tower_cursor.tower_type].cost;
mc_tower.shotsfired = 0;
mc_tower.damageout = 0;
mc_tower.hitbox._visible = false;
mc_tower.tower_type = mc_tower_cursor.tower_type;
mc_tower.shield = tower_template_list[mc_tower_cursor.tower_type].shield;
mc_tower.tower.cacheAsBitmap = true;
mc_tower.gun.cacheAsBitmap = true;
tower_build_range(mc_tower);
tower_hide_range(mc_tower);
mc_tower.onEnterFrame = function () {
switch (this.action) {
case 0 :
this.delay = this.delay - 1;
if (this.delay < 0) {
this.action = 1;
}
break;
case 1 :
success = tower_find_target(this);
if (!success) {
break;
}
this.action = 0;
this.delay = this.speed;
}
};
mc_tower.onRollOver = function () {
tower_show_range(this);
};
mc_tower.onRollOut = function () {
tower_hide_range(this);
};
mc_tower.onPress = function () {
tower_show_upgrade(this);
};
tower_list.push(mc_tower);
drop_reset();
}
function tower_find_target(tmc) {
success = false;
m = 0;
while (m < monster_list.length) {
if (Math.abs(get_distance(tmc._x, tmc._y, monster_list[m]._x, monster_list[m]._y)) < tmc.range) {
if ((!((tmc.weapon == 2) && (monster_list[m].slow > 1))) && (!((tmc.weapon == 3) && (monster_list[m].burn > 1)))) {
missile_launch(tmc, monster_list[m]);
success = true;
break;
}
}
m++;
}
return(success);
}
function get_distance(ax, ay, bx, by) {
dx = ax - bx;
dy = ay - by;
theDistance = Math.sqrt((dx * dx) + (dy * dy));
return(theDistance);
}
function missile_launch(src, mmc) {
audio_sound_effect(src.weapon);
mc_missile = mc_game.mc_projectiles.attachMovie(missile_sprites[src.weapon], "mc_missile_" + mc_game.mc_projectiles.getNextHighestDepth(), mc_game.mc_projectiles.getNextHighestDepth(), {_x:src._x, _y:src._y});
mc_missile.power = src.power;
mc_missile.weapon = src.weapon;
mc_missile.mmc = mmc;
mc_missile.cacheAsBitmap = true;
mc_missile._alpha = 0;
dist_x = src._x - mmc._x;
dist_y = src._y - mmc._y;
src.shotsfired++;
src.damageout = src.damageout + mc_missile.power;
angle = Math.atan2(dist_y, dist_x);
rot = (((angle / Math.PI) * 180) - 90) + 45;
if (rot < 0) {
rot = 360 + rot;
}
rotframe = Math.ceil((rot / 360) * 8);
this.gotoAndStop(rotframe);
src.gun.spin.gotoAndStop(rotframe);
src.gun._rotation = (rot % 45) - 25;
mc_missile.onEnterFrame = function () {
this._x = this._x - ((this._x - this.mmc._x) / 3);
this._y = this._y - ((this._y - this.mmc._y) / 3);
if (this._alpha < 100) {
this._alpha = 100;
}
m = 0;
while (m < monster_list.length) {
any_mmc = monster_list[m];
if (this.hitTest(any_mmc)) {
any_mmc.health = any_mmc.health - this.power;
if (this.weapon == 2) {
any_mmc.slow = 60;
} else if (this.weapon == 3) {
any_mmc.burn = 120;
} else if (this.weapon == 4) {
any_mmc.burn = 120;
}
this.unloadMovie();
break;
}
m++;
}
if ((((this._x < 0) || (this._x > Stage.width)) || (this._y < 0)) || (this._y > Stage.height)) {
this.unloadMovie();
}
if ((Math.abs(this._x - this.mmc._x) + Math.abs(this._y - this.mmc._y)) < 1) {
this.unloadMovie();
}
};
missile_list.push(mc_missile);
}
function sort_sprites() {
if (sort_sprites_delay < 5) {
sort_sprites_delay++;
} else {
sort_sprites_delay = 0;
depth_array = [];
n = 0;
while (n < tower_list.length) {
depth_array.push({mcname:tower_list[n], mcposition:tower_list[n]._y, mcdepth:tower_list[n].getDepth()});
n++;
}
n = 0;
while (n < monster_list.length) {
depth_array.push({mcname:monster_list[n], mcposition:monster_list[n]._y, mcdepth:monster_list[n].getDepth()});
n++;
}
depth_array.sortOn(["mcposition"], Array.NUMERIC);
i = 0;
while (i < depth_array.length) {
depth_array[i].mcdepth = i;
depth_array[i].mcname.swapDepths(depth_array[i].mcdepth);
i++;
}
}
}
function update_money(val) {
if (!isNaN(val)) {
game_money = game_money + val;
}
}
function drawCircle(mc, x, y, r) {
mc.moveTo(x + r, y);
mc.curveTo(r + x, (0.414213562373095 * r) + y, (0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((0.414213562373095 * r) + x, r + y, x, r + y);
mc.curveTo((-0.414213562373095 * r) + x, r + y, (-0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((-r) + x, (0.414213562373095 * r) + y, (-r) + x, y);
mc.curveTo((-r) + x, (-0.414213562373095 * r) + y, (-0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo((-0.414213562373095 * r) + x, (-r) + y, x, (-r) + y);
mc.curveTo((0.414213562373095 * r) + x, (-r) + y, (0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo(r + x, (-0.414213562373095 * r) + y, r + x, y);
}
function transform_colour(colObj, xR, xG, xB) {
my_color = new Color(colObj);
myColorTransform = new Object();
myColorTransform.ra = 0;
myColorTransform.ga = 0;
myColorTransform.ba = 0;
myColorTransform.aa = 0;
myColorTransform.rb = xR;
myColorTransform.gb = xG;
myColorTransform.bb = xB;
myColorTransform.ab = 255;
my_color.setTransform(myColorTransform);
}
var gamexml;
audio_prepare("game2.wav", ["shot_fast.wav", "shot_medium.wav", "shot_ice.wav", "shot_fire.wav", "shot_ultra.wav", "explosion_big.wav", "explosion_normal.wav", "base_bad.wav"]);
var game_money;
var game_fanta;
var game_mouse_mode;
var game_score;
var game_waves;
var game_active;
var scoretable_out = new LoadVars();
var scoretable_in = new LoadVars();
var monster_list = new Array();
var wave_multiply;
var wave_current;
var tower_list = new Array();
var missile_list = new Array();
var mc_game;
var game_starting_cash = 700;
var game_shield_cost = 100;
var game_starting_fanta = 20;
_root.xmlloaded = false;
var game_waypoints = new Array();
waypoints_easy = new Array([-30, 45], [510, 45], [525, 60], [525, 210], [510, 225], [255, 225], [105, 375], [105, 510], [120, 525], [285, 525], [285, 435], [255, 405], [255, 330], [270, 315], [285, 315], [415, 315], [445, 345], [500, 345]);
waypoints_hard = new Array([-30, 345], [135, 345], [135, 195], [255, 195], [255, 465], [375, 465], [375, 345], [495, 345]);
tower_template_list = new Array();
tower_template_list = [];
add_tower_template("mca_tower_fast", 15, 18, 70, 100, 0);
add_tower_template("mca_tower_slow", 40, 110, 80, 200, 1);
add_tower_template("mca_tower_ice", 50, 60, 50, 150, 2);
add_tower_template("mca_tower_fire", 50, 80, 65, 250, 3);
add_tower_template("mca_tower_super", 30, 160, 65, 600, 4);
missile_sprites = new Array("mca_missile_small", "mca_missile", "mca_missile_ice", "mca_missile_fire", "mca_missile_ultra");
monster_template_list = new Array();
monster_template_list = [];
addMonsterTemplate(1, 450, "mca_monster1", 20, false);
addMonsterTemplate(2, 550, "mca_monster2", 30, false);
addMonsterTemplate(1, 1000, "mca_monster3", 30, false);
addMonsterTemplate(2, 650, "mca_monster4", 30, false);
addMonsterTemplate(0.7, 7000, "mca_monster_boss1", 200, false);
addMonsterTemplate(2, 1000, "mca_monster_explode", 50, true);
addMonsterTemplate(0.8, 7500, "mca_monster_boss2", 300, false);
pauseA = new Array(-1, 35, 25);
pauseB = new Array(-1, 18, 25);
pauseX = new Array(-1, 60, 25);
wave_list = new Array();
wave_loop = 8;
wave_list.push([0, 28, 100]);
wave_list.push(pauseA);
wave_list.push([0, 16, 75]);
wave_list.push(pauseA);
wave_list.push([2, 6, 50]);
wave_list.push(pauseA);
wave_list.push([0, 16, 75]);
wave_list.push(pauseA);
wave_list.push([2, 6, 50]);
wave_list.push(pauseA);
wave_list.push([3, 5, 40]);
wave_list.push(pauseA);
wave_list.push([5, 1, 25]);
wave_list.push(pauseB);
wave_list.push([1, 5, 40]);
wave_list.push(pauseA);
wave_list.push([2, 5, 40]);
wave_list.push(pauseB);
wave_list.push([4, 1, 1]);
wave_list.push(pauseX);
wave_list.push([3, 5, 40]);
wave_list.push(pauseA);
wave_list.push([5, 1, 25]);
wave_list.push(pauseB);
wave_list.push([1, 5, 40]);
wave_list.push(pauseA);
wave_list.push([2, 5, 40]);
wave_list.push(pauseA);
wave_list.push([3, 5, 40]);
wave_list.push(pauseB);
wave_list.push([6, 1, 1]);
wave_list.push(pauseA);
var path = this._url;
_root.xmlloaded = false;
if (path.indexOf("http") != -1) {
load_xml_settings("http://www.weebls-stuff.com/testy/factory/towers.xml");
} else {
load_xml_settings("towers.xml");
}
__com_mochibot__("0d85c02e", this, 10301, true);
this.onEnterFrame = function () {
if (xmlloaded) {
game_prepare();
this.onEnterFrame = null;
}
};
var mouse_mode = 0;
var depth_array = new Array();
var sort_sprites_delay = 0;
stop();
stop();
stop();
Instance of Symbol 376 MovieClip in Frame 259
onClipEvent (load) {
this._visible = false;
}
Frame 261
gotoAndPlay (260);
Frame 263
gotoAndPlay (262);
Symbol 377 MovieClip [__Packages.mx.xpath.XPathAPI] Frame 0
class mx.xpath.XPathAPI
{
function XPathAPI () {
}
static function getEvalString(node, path) {
var _local7 = "";
var _local4 = null;
var _local9 = getPathSet(path);
var _local3 = _local9[0].nodeName;
var _local8;
var _local2 = node;
var _local5 = false;
if ((_local3 != undefined) && ((_local3 == "*") || (node.nodeName == _local3))) {
var _local6 = 1;
while (_local6 < _local9.length) {
_local3 = _local9[_local6].nodeName;
_local8 = _local3.indexOf("@");
if (_local8 >= 0) {
_local3 = _local3.substring(_local8 + 1);
_local5 = _local2.attributes[_local3] != undefined;
_local7 = _local7 + (".attributes." + _local3);
} else {
_local5 = false;
var _local1 = 0;
while (_local1 < _local2.childNodes.length) {
_local4 = _local2.childNodes[_local1];
if (_local4.nodeName == _local3) {
_local7 = _local7 + (".childNodes." + _local1);
_local1 = _local2.childNodes.length;
_local2 = _local4;
_local5 = true;
}
_local1++;
}
}
if (!_local5) {
return("");
}
_local6++;
}
if (!_local5) {
_local7 = "";
} else if (_local8 == -1) {
_local7 = _local7 + ".firstChild.nodeValue";
}
} else {
_local7 = "";
}
return(_local7);
}
static function selectNodeList(node, path) {
var _local2 = new Array(node);
var _local5 = getPathSet(path);
var _local4 = _local5[0];
var _local6 = _local4.__get__nodeName();
var _local1 = null;
if ((_local6 != undefined) && ((_local6 == "*") || (node.nodeName == _local6))) {
if (_local4.__get__filter().length > 0) {
_local1 = new mx.xpath.FilterStack(_local4.__get__filter());
_local2 = filterNodes(_local2, _local1);
}
if (_local2.length > 0) {
var _local3 = 1;
while (_local3 < _local5.length) {
_local4 = _local5[_local3];
_local2 = getAllChildNodesByName(_local2, _local4.__get__nodeName());
if (_local4.__get__filter().length > 0) {
_local1 = new mx.xpath.FilterStack(_local4.__get__filter());
} else {
_local1 = null;
}
if ((_local1 != null) && (_local1.__get__exprs().length > 0)) {
_local2 = filterNodes(_local2, _local1);
}
_local3++;
}
}
} else {
_local2 = new Array();
}
return(_local2);
}
static function selectSingleNode(node, path) {
var _local1 = selectNodeList(node, path);
if (_local1.length > 0) {
return(_local1[0]);
}
return(null);
}
static function setNodeValue(node, path, newValue) {
var _local1 = new Array(node);
var _local9 = getPathSet(path);
var _local7 = _local9[_local9.length - 1].nodeName;
if (_local7.charAt(0) == "@") {
_local7 = _local7.substring(1, _local7.length);
_local9.pop();
} else {
_local7 = null;
}
var _local5 = _local9[0];
var _local11 = _local5.__get__nodeName();
var _local3 = null;
if ((_local11 != undefined) && ((_local11 == "*") || (node.nodeName == _local11))) {
if (_local5.__get__filter().length > 0) {
_local3 = new mx.xpath.FilterStack(_local5.__get__filter());
_local1 = filterNodes(_local1, _local3);
}
if (_local1.length > 0) {
var _local2 = 1;
while (_local2 < _local9.length) {
_local5 = _local9[_local2];
_local1 = getAllChildNodesByName(_local1, _local5.__get__nodeName());
if (_local5.__get__filter().length > 0) {
_local3 = new mx.xpath.FilterStack(_local5.__get__filter());
} else {
_local3 = null;
}
if ((_local3 != null) && (_local3.__get__exprs().length > 0)) {
_local1 = filterNodes(_local1, _local3);
}
_local2++;
}
}
} else {
_local1 = new Array();
}
var _local4 = null;
var _local6 = null;
var _local10 = new XML();
var _local2 = 0;
while (_local2 < _local1.length) {
if (_local7 != null) {
_local1[_local2].attributes[_local7] = newValue;
} else {
_local4 = _local1[_local2];
if ((_local4.firstChild == null) || (_local4.firstChild.nodeType != 3)) {
_local6 = _local10.createTextNode(newValue);
_local4.appendChild(_local6);
} else {
_local6 = _local4.firstChild;
_local6.nodeValue = newValue;
}
}
_local2++;
}
return(_local1.length);
}
static function copyStack(toStk, fromStk) {
var _local1 = 0;
while (_local1 < fromStk.length) {
toStk.splice(_local1, 0, fromStk[_local1]);
_local1++;
}
}
static function evalExpr(expr, node) {
var _local2 = true;
if (expr.__get__attr()) {
_local2 = ((expr.__get__value() != null) ? (node.attributes[expr.__get__name()] == expr.__get__value()) : (node.attributes[expr.__get__name()] != null));
} else {
var _local3 = getChildNodeByName(node, expr.__get__name());
if (_local3 != null) {
_local2 = ((expr.__get__value() != null) ? (_local3.firstChild.nodeValue == expr.__get__value()) : true);
} else {
_local2 = false;
}
}
return(_local2);
}
static function filterNodes(nodeList, stack) {
var _local13 = new Array();
var _local2;
var _local3;
var _local9;
var _local6;
var _local10;
var _local1 = true;
var _local4;
var _local5;
var _local8 = 0;
while (_local8 < nodeList.length) {
_local5 = true;
_local2 = new Array();
_local3 = new Array();
copyStack(_local2, stack.__get__exprs());
copyStack(_local3, stack.__get__ops());
_local4 = nodeList[_local8];
while ((_local2.length > 0) && (_local5)) {
if (typeof(_local2[_local2.length - 1]) == "object") {
_local9 = mx.xpath.FilterExpr(_local2.pop());
_local1 = evalExpr(_local9, _local4);
} else {
_local10 = Boolean(_local2.pop());
_local1 = _local10;
}
if (_local3.length > 0) {
var _local7 = _local2.pop();
_local6 = _local7;
switch (_local3[_local3.length - 1]) {
case "and" :
_local1 = _local1 && (evalExpr(_local6, _local4));
_local5 = _local1;
break;
case "or" :
_local1 = _local1 || (evalExpr(_local6, _local4));
_local5 = !_local1;
}
_local3.pop();
_local2.push(_local1);
}
}
if (_local1) {
_local13.push(_local4);
}
_local8++;
}
return(_local13);
}
static function getAllChildNodesByName(nodeList, name) {
var _local5 = new Array();
var _local2;
var _local3 = 0;
while (_local3 < nodeList.length) {
_local2 = nodeList[_local3].childNodes;
if (_local2 != null) {
var _local1 = 0;
while (_local1 < _local2.length) {
if ((name == "*") || (_local2[_local1].nodeName == name)) {
_local5.push(_local2[_local1]);
}
_local1++;
}
}
_local3++;
}
return(_local5);
}
static function getChildNodeByName(node, nodeName) {
var _local2;
var _local3 = node.childNodes;
var _local1 = 0;
while (_local1 < _local3.length) {
_local2 = _local3[_local1];
if (_local2.nodeName == nodeName) {
return(_local2);
}
_local1++;
}
return(null);
}
static function getKeyValues(node, keySpec) {
var _local5 = "";
var _local3 = new mx.utils.StringTokenParser(keySpec);
var _local2 = _local3.nextToken();
var _local1;
var _local6;
while (_local2 != mx.utils.StringTokenParser.tkEOF) {
_local1 = _local3.token;
_local5 = _local5 + (" " + _local1);
if (_local2 == mx.utils.StringTokenParser.tkSymbol) {
if (_local1 == "@") {
_local2 = _local3.nextToken();
_local1 = _local3.token;
if (_local2 == mx.utils.StringTokenParser.tkSymbol) {
_local5 = _local5 + (((_local1 + "='") + node.attributes[_local1]) + "'");
}
} else if (_local1 == "/") {
_local2 = _local3.nextToken();
if (_local2 == mx.utils.StringTokenParser.tkSymbol) {
_local1 = _local3.token;
node = getChildNodeByName(node, _local1);
if (node != null) {
_local5 = _local5 + _local1;
}
}
} else if ((((_local1 != "and") && (_local1 != "or")) && (_local1 != "[")) && (_local1 != "]")) {
_local6 = getChildNodeByName(node, _local1);
if (_local6 != null) {
_local5 = _local5 + (("='" + _local6.firstChild.nodeValue) + "'");
}
}
}
if (node == null) {
return("ERR");
}
_local2 = _local3.nextToken();
}
return(_local5.slice(1));
}
static function getPath(node, keySpecs) {
var _local2 = "";
var _local5 = keySpecs[node.nodeName];
if (_local5 == undefined) {
var _local8 = "";
var _local10;
for (_local10 in node.attributes) {
_local8 = _local8 + (((("@" + _local10) + "='") + node.attributes[_local10]) + "' and ");
}
var _local7 = "";
var _local1;
var _local6;
var _local4 = 0;
while (_local4 < node.childNodes.length) {
_local1 = node.childNodes[_local4];
_local6 = _local1.firstChild.nodeValue;
if (_local6 != undefined) {
_local7 = _local7 + (((_local1.nodeName + "='") + _local6) + "' and ");
}
_local4++;
}
if (_local8.length > 0) {
if (_local7.length > 0) {
_local2 = (((("/" + node.nodeName) + "[") + _local8) + _local7.substring(0, _local7.length - 4)) + "]";
} else {
_local2 = ((("/" + node.nodeName) + "[") + _local8.substring(0, _local8.length - 4)) + "]";
}
} else {
_local2 = ((("/" + node.nodeName) + "[") + _local7.substring(0, _local7.length - 4)) + "]";
}
} else {
_local2 = _local2 + (("/" + node.nodeName) + getKeyValues(node, _local5));
}
var _local1 = node.parentNode;
while (_local1.parentNode != null) {
_local5 = keySpecs[_local1.nodeName];
if (_local5 != undefined) {
_local2 = (("/" + _local1.nodeName) + getKeyValues(_local1, _local5)) + _local2;
} else {
_local2 = ("/" + _local1.nodeName) + _local2;
}
_local1 = _local1.parentNode;
}
return(_local2);
}
static function getPathSet(path) {
var _local6 = new Array();
var _local4;
var _local1;
var _local2;
var _local5;
while (path.length > 0) {
_local4 = path.lastIndexOf("/");
_local1 = path.substring(_local4 + 1);
_local2 = _local1.indexOf("[", 0);
_local5 = ((_local2 >= 0) ? (_local1.substring(_local2 + 1, _local1.length - 1)) : "");
_local1 = ((_local2 >= 0) ? (_local1.substring(0, _local2)) : (_local1));
_local6.splice(0, 0, new mx.xpath.NodePathInfo(_local1, _local5));
path = path.substring(0, _local4);
}
return(_local6);
}
}
Symbol 378 MovieClip [__Packages.mx.xpath.NodePathInfo] Frame 0
class mx.xpath.NodePathInfo
{
function NodePathInfo (nodeName, filter) {
__nodeName = nodeName;
__filter = filter;
}
function get nodeName() {
return(__nodeName);
}
function get filter() {
return(__filter);
}
var __nodeName = null;
var __filter = null;
}
Symbol 379 MovieClip [__Packages.mx.xpath.FilterStack] Frame 0
class mx.xpath.FilterStack
{
var __expr, __ops;
function FilterStack (filterVal) {
__expr = new Array();
__ops = new Array();
var _local2 = new mx.utils.StringTokenParser(filterVal);
var _local5 = _local2.nextToken();
var _local4;
var _local3 = _local2.__get__token();
while (_local5 != mx.utils.StringTokenParser.tkEOF) {
if (_local3 == "@") {
_local5 = _local2.nextToken();
_local3 = _local2.token;
_local4 = new mx.xpath.FilterExpr(true, _local3, null);
__expr.splice(0, 0, _local4);
if (_local2.nextToken() == mx.utils.StringTokenParser.tkSymbol) {
if (_local2.__get__token() == "=") {
_local5 = _local2.nextToken();
_local4.__set__value(_local2.token);
}
}
} else if ((_local3 == "and") || (_local3 == "or")) {
__ops.splice(0, 0, _local3);
} else if ((_local3 != ")") && (_local3 != "(")) {
_local4 = new mx.xpath.FilterExpr(false, _local3, null);
__expr.splice(0, 0, _local4);
if (_local2.nextToken() == mx.utils.StringTokenParser.tkSymbol) {
if (_local2.__get__token() == "=") {
_local5 = _local2.nextToken();
_local4.__set__value(_local2.token);
}
}
}
_local5 = _local2.nextToken();
_local3 = _local2.token;
}
}
function get exprs() {
return(__expr);
}
function get ops() {
return(__ops);
}
}
Symbol 380 MovieClip [__Packages.mx.utils.StringTokenParser] Frame 0
class mx.utils.StringTokenParser
{
var _source, _skipChars;
function StringTokenParser (source, skipChars) {
_source = source;
_skipChars = ((skipChars == undefined) ? null : (skipChars));
}
function get token() {
return(_token);
}
function getPos() {
return(_index);
}
function nextToken() {
var _local4;
var _local2;
var _local3 = _source.length;
skipBlanks();
if (_index >= _local3) {
return(tkEOF);
}
_local2 = _source.charCodeAt(_index);
if (((((_local2 >= 65) && (_local2 <= 90)) || ((_local2 >= 97) && (_local2 <= 122))) || ((_local2 >= 192) && (_local2 <= Number.POSITIVE_INFINITY))) || (_local2 == 95)) {
_local4 = _index;
_index++;
_local2 = _source.charCodeAt(_index);
while (((((((_local2 >= 65) && (_local2 <= 90)) || ((_local2 >= 97) && (_local2 <= 122))) || ((_local2 >= 48) && (_local2 <= 57))) || ((_local2 >= 192) && (_local2 <= Number.POSITIVE_INFINITY))) || (_local2 == 95)) && (_index < _local3)) {
_index++;
_local2 = _source.charCodeAt(_index);
}
_token = _source.substring(_local4, _index);
return(tkSymbol);
}
if ((_local2 == 34) || (_local2 == 39)) {
_index++;
_local4 = _index;
_local2 = _source.charCodeAt(_local4);
while (((_local2 != 34) && (_local2 != 39)) && (_index < _local3)) {
_index++;
_local2 = _source.charCodeAt(_index);
}
_token = _source.substring(_local4, _index);
_index++;
return(tkString);
}
if ((_local2 == 45) || ((_local2 >= 48) && (_local2 <= 57))) {
var _local5 = tkInteger;
_local4 = _index;
_index++;
_local2 = _source.charCodeAt(_index);
while (((_local2 >= 48) && (_local2 <= 57)) && (_index < _local3)) {
_index++;
_local2 = _source.charCodeAt(_index);
}
if (_index < _local3) {
if (((((((_local2 >= 48) && (_local2 <= 57)) || (_local2 == 46)) || (_local2 == 43)) || (_local2 == 45)) || (_local2 == 101)) || (_local2 == 69)) {
_local5 = tkFloat;
}
while ((((((((_local2 >= 48) && (_local2 <= 57)) || (_local2 == 46)) || (_local2 == 43)) || (_local2 == 45)) || (_local2 == 101)) || (_local2 == 69)) && (_index < _local3)) {
_index++;
_local2 = _source.charCodeAt(_index);
}
}
_token = _source.substring(_local4, _index);
return(_local5);
}
_token = _source.charAt(_index);
_index++;
return(tkSymbol);
}
function skipBlanks() {
if (_index < _source.length) {
var _local2 = _source.charAt(_index);
while ((_local2 == " ") || ((_skipChars != null) && (skipChar(_local2)))) {
_index++;
_local2 = _source.charAt(_index);
}
}
}
function skipChar(ch) {
var _local2 = 0;
while (_local2 < _skipChars.length) {
if (ch == _skipChars[_local2]) {
return(true);
}
_local2++;
}
return(false);
}
static var tkEOF = -1;
static var tkSymbol = 0;
static var tkString = 1;
static var tkInteger = 2;
static var tkFloat = 3;
var _index = 0;
var _token = "";
}
Symbol 381 MovieClip [__Packages.mx.xpath.FilterExpr] Frame 0
class mx.xpath.FilterExpr
{
function FilterExpr (attrInit, nameInit, valueInit) {
__attr = attrInit;
__name = nameInit;
__value = valueInit;
}
function get attr() {
return(__attr);
}
function set attr(newVal) {
__attr = newVal;
//return(attr);
}
function get name() {
return(__name);
}
function set name(newVal) {
__name = newVal;
//return(name);
}
function get value() {
return(__value);
}
function set value(newVal) {
__value = newVal;
//return(value);
}
var __attr = false;
var __value = null;
var __name = null;
}
Symbol 116 MovieClip Frame 1
stop();
Symbol 199 MovieClip [mca_tower_explodes] Frame 20
stop();
Symbol 253 MovieClip [mca_monster_boss1] Frame 1
stop();
Symbol 269 MovieClip [mca_monster_boss2] Frame 1
stop();
Symbol 287 MovieClip [mca_monster1] Frame 1
stop();
Symbol 311 MovieClip [mca_monster2] Frame 1
stop();
Symbol 325 MovieClip [mca_monster3] Frame 1
stop();
Symbol 351 MovieClip [mca_monster4] Frame 1
stop();