Frame 3
function _doGameOver(score, gamestate, showskip, delay) {
trace((((("CALLED : _doGameOver : score:" + score) + " gamestate:") + gamestate) + " showskip: ") + showskip);
clearInterval(_gameoverinterval);
if (delay == undefined) {
delay = 3000;
}
if ((score != undefined) and (gamestate != undefined)) {
_root.partner_score = score;
_root.obj_game._gstatus = gamestate;
_gameoverinterval = setInterval(attachGameOverMc, delay, showskip);
} else {
trace("Could Not Load GAMEOVER!!!");
}
}
function attachGameOverMc(showskip) {
stopAllSounds();
var _local2 = flash.external.ExternalInterface.call("document.URL.toString");
if ((_local2 != null) && (_local2.indexOf("gangofgamers.com") != -1)) {
trace(_local2.indexOf("gangofgamers.com"));
flash.external.ExternalInterface.call("inviziShowHtmlPlaceHolder", "");
}
clearInterval(_gameoverinterval);
_root.__gameover_mc = _root.attachMovie("_g2w_gameover_mc", "mc_gameover", _root.getNextHighestDepth(), {_x:Stage.width / 2, _y:Stage.height / 2});
if (_root.obj_game._gstatus == "gameover") {
_root.__gameover_mc.gotoAndStop("g2w_gameover");
if (showskip) {
_root.__gameover_mc.panel_btn.gotoAndStop("skip");
}
}
}
function g2w_playagain(resetlevel) {
_root.__gameover_mc.removeMovieClip();
_root.game_score = 0;
_root.gotoAndStop("lblgame");
_root.game_mc.gotoAndStop("force_help");
if (resetlevel) {
_root.gotoAndStop("lblgameintro");
} else {
restartLevel();
}
}
function g2w_skiplevel() {
_root.__gameover_mc.removeMovieClip();
_root.game_score = 0;
}
function playLevelSound() {
stopAllSounds();
var _local1 = new Sound();
_local1.attachSound("levelSound.mp3");
_local1.start(0, 5000);
}
function playGameOverSound() {
stopAllSounds();
trace("play gameoversound");
var _local1 = new Sound();
_local1.attachSound("gameOverSound.mp3");
_local1.start(0, 5000);
}
function playIntroSound() {
stopAllSounds();
trace("play introsound");
var _local1 = new Sound();
_local1.attachSound("introSound.mp3");
_local1.start(0, 5000);
}
var obj_game = new Array();
obj_game._host = "gog";
obj_game._gameName = "homework_tower_defence";
obj_game._gameTitle = "Homework Tower Defence";
obj_game._g2wGameId = "10011";
obj_game._partnerGameId = "homeworktowerdefence";
obj_game._gstatus = "gameover";
obj_game._googleText = "Homework Tower Defence";
obj_game._gameStageW = 800;
obj_game._gameStageH = 600;
obj_game._gameScoreOrder = "desc";
obj_game._gameResolution = (Stage.width + "x") + Stage.height;
obj_game.g2wBot = "";
obj_game.g2wBotId = 10301;
obj_game.videoID = "o3zUhgBI1vA";
obj_game.facebookURL = "http://apps.facebook.com/homework-tower/?utm_source=gangofgamers&utm_medium=strip&utm_campaign=Referrers_homework-tower-defence";
obj_game.inviziads = (((("http://s1.inviziads.com/lookup.html?g=" + obj_game._g2wGameId) + "&h=") + obj_game._host) + "&l=") + obj_game._gameLanguage;
obj_game.FBMsg = " is beating their homework to pulp in Gang of Gamer\u2019s Homework Tower Defence.Quit slogging over your homework and play the game.";
var obj_partner = new Array();
obj_partner.partner_name = "gog";
obj_partner.partner_id = 1;
obj_partner.invalid_txt = "Invalid Nickname!";
obj_partner.show_submit = false;
obj_partner.submitURL = "/submit_score.asp";
obj_partner.top10URL = "/get_top_scorer.asp";
obj_partner.lblsubmit = "Enter your GangofGamers Nickname below";
obj_partner.show_g2w_slate = true;
obj_partner.show_register = true;
obj_partner.text_register = "Create Nickname";
obj_partner.url_register = "/register.asp";
obj_partner.clickthru = "http://www.gangofgamers.com/";
obj_partner._allowclick = true;
_validateHost = function (mcpath) {
var _local2 = mcpath;
_local2.overlay_btn.useHandCursor = false;
if (_root.obj_game._gstatus == "gameover") {
_initGameOver(_local2);
} else if (_root.checkhost()) {
_initLoginPanel(_local2);
} else {
_initAlientHost(_local2);
}
};
_initGameOver = function (mcpath) {
var _local2 = mcpath;
_local2.gotoAndStop("g2w_gameover");
_local2.panel_btn.playagain_btn.onRelease = function () {
_root.g2w_playagain();
};
_local2.panel_btn.skiplvl_btn.onRelease = function () {
_root.g2w_skiplevel();
};
};
_initLoginPanel = function (mcpath) {
var mc = mcpath;
mc.gotoAndStop("g2w_login");
Selection.setFocus("username_txt");
mc.username_txt.onSetFocus = function () {
if (this.text == obj_partner.invalid_txt) {
this.text = "";
}
};
mc.playagain_btn.onRelease = function () {
_root.g2w_playagain(true);
};
mc.nickname_btn.onRelease = function () {
getURL (_root.obj_partner.url_register, "_blank");
};
mc.submit_btn.onRelease = function () {
_root._scoreSubmit(mc);
};
};
_initAlientHost = function (mcpath) {
var _local2 = mcpath;
_local2.gotoAndStop("g2w_alienhost");
_local2.playagain_btn.onRelease = function () {
trace("CALLING : _root.g2w_playagain()");
_root.g2w_playagain(true);
};
};
_scoreSubmit = function (mcpath) {
var mc = mcpath;
myname = _root.partner_uname;
myscore = _root.partner_score;
mygameid = _root.obj_game._g2wGameId;
myname = myname.trim();
if (((myname.length == 0) or (myname == obj_partner.invalid_txt)) or (myname == undefined)) {
_root.partner_uname = obj_partner.invalid_txt;
} else {
mc.gotoAndStop("g2w_status");
mc.tryagain_btn._visible = false;
_root.send_lv = new LoadVars();
_root.send_lv.onLoad = function (success) {
if (success) {
if (_root.send_lv.isreg == 0) {
mc.status_txt.text = obj_partner.invalid_txt;
mc.tryagain_btn._visible = true;
mc.tryagain_btn.onRelease = function () {
_initLoginPanel(mc);
};
} else if (_root.send_lv.isreg == 1) {
mc.status_txt.text = "";
_root._getTop10(mc);
}
} else {
mc.status_txt.text = "Error in Connection...!";
mc.tryagain_btn._visible = true;
mc.tryagain_btn.onRelease = function () {
_initLoginPanel(mc);
};
}
};
_root.send_lv.nickname = myname;
_root.send_lv.points = myscore;
_root.send_lv.gameid = mygameid;
_root.send_lv.sendAndLoad(obj_partner.submitURL, _root.send_lv, "POST");
mc.status_txt.text = "Connecting to Server...";
}
};
c_fail = 0;
_getTop10 = function (mcpath) {
var mc = mcpath;
_root.send_lv = new XML();
_root.rst_lv = new XML();
mc.gotoAndStop("g2w_status");
_root.rst_lv.onLoad = function (success) {
if (success) {
var _local3 = new it.sephiroth.XML2Object();
mc.status_txt.text = "";
var _local4 = _local3.parseXML(this);
_initTop10(mc, _local4);
} else {
_root.c_fail++;
if (_root.c_fail >= 3) {
mc.status_txt.text = "Error!";
tryagain_btn._visible = true;
mc.tryagain_btn.onRelease = function () {
_initLoginPanel(mc);
};
} else {
_root.send_lv.sendAndLoad(url, _root.rst_lv, "POST");
}
}
};
var url = ((((((obj_partner.top10URL + "?game_id=") + _root.obj_game._g2wGameId) + "&order=") + obj_game._gameScoreOrder) + "&timspam") + getTimer());
mc.status_txt.text = "Connecting to Server...";
_root.send_lv.sendAndLoad(url, _root.rst_lv, "POST");
};
_initTop10 = function (mcpath, list) {
var _local3 = mcpath;
_local3.gotoAndStop("g2w_top10");
if ((list.top_score.status.data == 0) or (list.top_score.user[0].score.data == 0)) {
_top10_lbl._visible = false;
var _local2 = 0;
while (_local2 < 10) {
_local3["row" + _local2]._visible = false;
_local2++;
}
} else {
_noscore_mc._visible = false;
var _local2 = 0;
while (_local2 < 10) {
if ((list.top_score.user[_local2] == undefined) or (list.top_score.user[_local2].score.data == 0)) {
_local3["row" + _local2].txtrollno.text = "";
_local3["row" + _local2].txtusername.text = "";
_local3["row" + _local2].txtscore.text = "";
} else {
_local3["row" + _local2].txtrollno.text = _local2 + 1;
_local3["row" + _local2].txtusername.text = list.top_score.user[_local2].nick_name.data;
_local3["row" + _local2].txtscore.text = list.top_score.user[_local2].score.data;
}
_local2++;
}
}
_local3.playagain_btn.onRelease = function () {
_root.g2w_playagain(true);
};
};
var g2w_menu = new ContextMenu();
g2w_menu.hideBuiltInItems();
g2w_menu.customItems.push(new ContextMenuItem("gangofgamers.com", itemHandler));
itemHandler = function (obj, item) {
getURL (obj_partner.clickthru, "_blank");
};
this.menu = g2w_menu;
checkhost = function () {
trace("CALL CHECKHOST");
swfurl = this._url;
if (swfurl.indexOf("gangofgamers.com") == -1) {
return(false);
}
return(true);
};
_trackClickThru = function (mc) {
if (obj_partner._allowclick) {
mc.hit_area.onRelease = function () {
getURL (obj_partner.clickthru, "_blank");
};
} else {
mc.hit_area.useHandCursor = false;
}
};
String.prototype.trim = function () {
var _local3 = 0;
var _local2 = this.length;
white = new Object();
white._32 = 1;
_local2--;
while (white["_" + ord(this.charAt(_local2))]) {
}
while (white["_" + ord(this.charAt(_local3++))]) {
}
return(this.slice(_local3 - 1, _local2 + 1));
};
MovieClip.prototype.tabEnabled = false;
Button.prototype.tabEnabled = false;
Frame 9
stop();
Frame 19
stop();
Instance of Symbol 125 MovieClip in Frame 19
onClipEvent (load) {
total = _parent.getBytesTotal();
}
onClipEvent (enterFrame) {
loaded = _parent.getBytesLoaded();
percent = int((loaded / total) * 100);
this.txt = ("Loaded : " + percent) + "%";
this.bar._width = percent;
if (loaded == total) {
_parent.gotoAndStop("lblgameintro");
}
}
Frame 25
stop();
_root.playIntroSound();
Frame 34
stop();
Symbol 504 MovieClip Frame 1
function brain() {
create_assets(myself, _global.obj_iads.type);
switch (_global.obj_iads.type) {
case "FULL" :
mcLoader.loadClip(_global.obj_iads.url, trgt_main);
break;
case "EMBED" :
mcLoader.loadClip(_global.obj_iads.url, trgt_main.trgt_ads);
if (_global.obj_iads.link ne undefined) {
trgt_main.onRelease = function () {
getURL (_global.obj_iads.link, "_blank");
};
}
break;
case "NOOP" :
clearInterval(tint1);
Stage.scaleMode = "showAll";
_root.play();
break;
}
}
function get_iads() {
lv_iads = new XML();
lv_result = new XML();
lv_result.ignoreWhite = true;
lv_result.onLoad = function (success) {
if (success) {
parse_iads(lv_result);
} else {
Stage.scaleMode = "showAll";
_root.play();
}
};
lv_iads.sendAndLoad(adurl, lv_result, "POST");
}
function parse_iads(lv_result) {
_global.obj_iads = new Array();
var _local2 = 0;
while (_local2 < lv_result.firstChild.childNodes.length) {
if (lv_result.firstChild.childNodes[_local2].firstChild.nodeValue != null) {
obj_iads[lv_result.firstChild.childNodes[_local2].nodeName] = lv_result.firstChild.childNodes[_local2].firstChild.nodeValue;
} else if (lv_result.firstChild.childNodes[_local2].firstChild.firstChild.nodeValue != null) {
var _local5 = new Object();
var _local4 = 0;
while (_local4 < lv_result.firstChild.childNodes[_local2].childNodes.length) {
_local5[lv_result.firstChild.childNodes[_local2].childNodes[_local4].nodeName] = lv_result.firstChild.childNodes[_local2].childNodes[_local4].firstChild.nodeValue;
_local4++;
}
obj_iads[lv_result.firstChild.childNodes[_local2].nodeName] = _local5;
}
_local2++;
}
show_time = int(_global.obj_iads.t);
check_type();
}
function time_delay() {
var _local1 = 0;
tint1 = setInterval(timespam, 1000);
}
function timespam() {
tim++;
trace(((tim + " tim Tim") + " show_time") + show_time);
if (isNaN(tim)) {
clearInterval(tint1);
Stage.scaleMode = "showAll";
trace(Stage.scaleMode);
} else if (tim == show_time) {
clearInterval(tint1);
Stage.scaleMode = "showAll";
_root.play();
trace(Stage.scaleMode);
}
}
function create_assets(mc, _type) {
mc.createEmptyMovieClip("whitebg", 0);
whitebg.beginFill(16777215);
whitebg.moveTo(0, 0);
whitebg.lineTo(0, 0);
whitebg.lineTo(stageWidth, 0);
whitebg.lineTo(stageWidth, stageHeight + 20);
whitebg.lineTo(0, stageHeight + 20);
whitebg.endFill();
mc.createEmptyMovieClip("trgt_main", 4);
mcLoader = new MovieClipLoader();
mcLoader.addListener(mc);
if (_type != "FULL") {
mc.createEmptyMovieClip("square_mc", 5);
var _local4 = trgt_main.createEmptyMovieClip("trgt_ads", getNextHighestDepth());
var _local3 = new TextFormat();
_local3.align = "center";
_local3.font = "Verdana";
_local3.size = 10;
var _local2 = new TextFormat();
_local2.align = "right";
_local2.font = "Verdana";
_local2.size = 10;
_local2.underline = true;
mc.createTextField("h_txt", mc.getNextHighestDepth(), 0, 0, 100, 22);
mc.createTextField("b_txt", mc.getNextHighestDepth(), 0, 0, 100, 22);
mc.createTextField("m_txt", mc.getNextHighestDepth(), 0, 0, 120, 22);
b_txt.autoSize = true;
m_txt.autoSize = true;
b_txt.selectable = false;
h_txt.selectable = false;
m_txt.selectable = false;
m_txt.html = true;
b_txt.multiline = true;
b_txt.setNewTextFormat(_local3);
h_txt.autoSize = true;
h_txt.setNewTextFormat(_local3);
m_txt.setNewTextFormat(_local2);
h_txt.text = "";
mc.createEmptyMovieClip("progressBar", 500);
}
}
function onLoadInit(mc) {
time_delay();
ad_width = int(_global.obj_iads.x);
ad_height = int(_global.obj_iads.y);
h_txt.text = "Advertisement";
loadMessages();
progressBar.tim = show_time;
progressBar.width = _global.obj_iads.x;
progressBar.height = 15;
progressBar._x = 100;
progressBar._y = 100;
bar_mc = progressBar.createEmptyMovieClip("bar", 1);
box_mc = progressBar.createEmptyMovieClip("box", 2);
bar_mc.beginFill(26112);
bar_mc.moveTo(0, 0);
bar_mc.lineTo(1, 0);
bar_mc.lineTo(1, progressBar.height - 2);
bar_mc.lineTo(0, progressBar.height - 2);
bar_mc.lineTo(0, 0);
bar_mc.endFill();
bar_mc._x = 1.5;
bar_mc._y = 1.5;
box_mc.lineStyle(1, 3355443, 100, true, "none", "round", "miter", 1);
box_mc.lineTo(progressBar.width, 0);
box_mc.lineTo(progressBar.width, progressBar.height);
box_mc.lineTo(0, progressBar.height);
box_mc.lineTo(0, 0);
box_mc._x = 0;
box_mc._y = 0;
progressBar.start = function () {
game_fps = getFps();
maxw = this.width - 2;
this.ad = maxw / (this.tim + 1);
this.ad = this.ad / game_fps;
};
progressBar.start();
progressBar.onEnterFrame = function () {
this.start();
if (this.bar._width < (this.width - 2)) {
this.bar._width = this.bar._width + this.ad;
} else {
this.bar._width = this.width;
}
};
b_txt.text = "Note\rClicking on the above Ad won't interrupt your game.\rAd link opens in a new window.";
myself._y = b_txt._y - 10;
x = (stageWidth / 2) - (ad_width / 2);
y = (stageHeight / 2) - (ad_height / 2);
mc._x = x;
mc._y = y;
h_txt._x = (x + (ad_width / 2)) - (h_txt._width / 2);
h_txt._y = y - 20;
progressBar._x = (x + (ad_width / 2)) - (progressBar._width / 2);
progressBar._y = (y + 5) + ad_height;
myself.invizi_logo._alpha = 100;
myself.invizi_logo.swapDepths(myself.getNextHighestDepth());
myself.invizi_logo._x = int(progressBar._x);
myself.invizi_logo._y = int(progressBar._y + progressBar._height) + 5;
m_txt._x = int(progressBar._x + progressBar._width) - m_txt._width;
m_txt._y = int(progressBar._y + progressBar._height) + 3;
myself.invizi_logo.onRelease = function () {
getURL ("http://www.inviziads.com/index.html?utm_source=4_1&utm_medium=logo&utm_content=default&utm_campaign=invizi", "_blank");
};
b_txt._x = (x + (ad_width / 2)) - (b_txt._width / 2);
b_txt._y = progressBar._y + 38;
square_mc.beginFill(16711680);
square_mc.moveTo(0, 0);
square_mc.lineTo(ad_width, 0);
square_mc.lineTo(ad_width, ad_height);
square_mc.lineTo(0, ad_height);
square_mc.lineTo(0, 0);
square_mc.endFill();
square_mc._x = x;
square_mc._y = y;
trgt_main.setMask(square_mc);
}
function loadMessages() {
lv_messages = new XML();
lv_messages.ignoreWhite = true;
lv_messages.onLoad = function (success) {
if (success) {
totalNodes = lv_messages.firstChild.childNodes.length;
ran = Math.floor(Math.random() * totalNodes);
if (lv_messages.firstChild.childNodes[ran].firstChild == undefined) {
m_txt.htmlText = "<font color='#0066CC'><a href='http://www.inviziads.com/adv-starter-pack.html' target='_blank'>Advertisers, try us out for US$250</a></font>";
} else {
m_txt.htmlText = ((("<font color='#0066CC'><a href='" + lv_messages.firstChild.childNodes[ran].attributes.link) + "' target='_blank'>") + lv_messages.firstChild.childNodes[ran].firstChild) + "</a></font>";
}
m_txt._x = int(progressBar._x + progressBar._width) - m_txt._width;
m_txt._y = int(progressBar._y + progressBar._height) + 2;
} else {
m_txt.htmlText = "<font color='#0066CC'><a href='http://inviziads.com' target='_blank'>Advertisers, try us out for US$250</a></font>";
m_txt._x = int(progressBar._x + progressBar._width) - m_txt._width;
m_txt._y = int(progressBar._y + progressBar._height) + 2;
}
};
lv_messages.load(messageURL);
}
function pushdata() {
holder.obj_iads = _global.obj_iads;
}
function startdatapush(mc) {
var _local2;
_local2 = setInterval(this, "pushdata", 10);
}
function check_type() {
if (_global.obj_iads.type eq "UPDATE") {
myself.createEmptyMovieClip("holder", 100);
var _local5 = _global.obj_iads.url;
obj_iads = _global.obj_iads;
var _local3 = new Object();
_local3.onLoadComplete = function (target_mc) {
};
var _local4 = new MovieClipLoader();
_local4.addListener(_local3);
_local4.loadClip(_global.obj_iads.url, holder);
} else {
brain();
}
clearInterval(this._parent._parent.int1);
}
function parse_xml(mydata) {
var _local4 = new Array();
var _local1 = 0;
while (_local1 < mydata.firstChild.childNodes.length) {
if (mydata.firstChild.childNodes[_local1].firstChild.nodeValue != null) {
_local4[mydata.firstChild.childNodes[_local1].nodeName] = mydata.firstChild.childNodes[_local1].firstChild.nodeValue;
} else if (mydata.firstChild.childNodes[_local1].firstChild.firstChild.nodeValue != null) {
var _local5 = new Object();
var _local2 = 0;
while (_local2 < lv_result.firstChild.childNodes[_local1].childNodes.length) {
_local4[lv_result.firstChild.childNodes[_local1].childNodes[_local2].nodeName] = mydata.firstChild.childNodes[_local1].childNodes[_local2].firstChild.nodeValue;
_local2++;
}
_local4[lv_result.firstChild.childNodes[_local1].nodeName] = _local5;
}
_local1++;
}
return(_local4);
}
function measureComScore() {
var _local1 = new LoadVars();
var _local2 = new LoadVars();
_local1.C1 = 7;
_local1.C2 = 5799339 /* 0x587DAB */;
_local1.C3 = 1;
var _local3 = "http://beacon.scorecardresearch.com/scripts/beacon.dll";
_local1.sendAndLoad(_local3, _local2, "GET");
_local2.onLoad = function (ok) {
if (ok) {
trace("Comscore Success");
} else {
trace("Comscore failed");
}
};
}
System.security.allowDomain("*");
System.security.allowInsecureDomain("*");
var time = 0;
var tim = 0;
var show_time = 0;
var tempo = 0;
var tint1;
var stageWidth = 0;
var stageHeight = 0;
getFps = function () {
if (signal == true) {
time = getTimer();
} else {
tempo = int(1000 / (getTimer() - time));
}
signal = !signal;
return(tempo);
};
this.onEnterFrame = function () {
game_fps = getFps();
if ((game_fps != 0) && (game_fps != undefined)) {
if (Stage.width > 0) {
stageWidth = Stage.width;
stageHeight = Stage.height;
get_iads();
this.onEnterFrame = null;
}
}
};
myself = this;
signal = true;
var purl = flash.external.ExternalInterface.call("document.URL.toString");
var hurl = escape(_root._url);
var adurl = "http://s1.inviziads.com/lookup.html?";
adurl = adurl + "g=10011";
adurl = adurl + "&h=gog";
adurl = adurl + "&type=pre";
adurl = adurl + "&v=5_0";
adurl = adurl + ("&purl=" + escape(purl));
adurl = adurl + ("&hurl=" + hurl);
adurl = adurl + "&l=en";
var my_date = new Date();
adurl = adurl + ("&ts=" + my_date.getSeconds());
var messageURL = "http://s1.inviziads.com/template/invizi_messages.xml";
stop();
Stage.scaleMode = "noScale";
Stage.align = "TL";
if ((purl.indexOf(".gangofgamers.com") == -1) && (hurl.indexOf(".gangofgamers.com") == -1)) {
measureComScore();
}
_root.stop();
Symbol 4 MovieClip [brain_inviziads] Frame 1
function brain() {
create_assets(myself, _global.obj_iads.type);
switch (_global.obj_iads.type) {
case "FULL" :
mcLoader.loadClip(_global.obj_iads.url, trgt_main);
break;
case "EMBED" :
mcLoader.loadClip(_global.obj_iads.url, trgt_main.trgt_ads);
if (_global.obj_iads.link ne undefined) {
trgt_main.onRelease = function () {
getURL (_global.obj_iads.link, "_blank");
};
}
break;
case "NOOP" :
clearInterval(int1);
_root.play();
break;
}
}
function get_iads() {
lv_iads = new XML();
lv_result = new XML();
lv_result.ignoreWhite = true;
lv_result.onLoad = function (success) {
if (success) {
parse_iads(lv_result);
} else {
_root.play();
}
};
lv_iads.g = game_id;
lv_iads.h = "as";
lv_iads.sendAndLoad(_root.adurl, lv_result, "POST");
}
function parse_iads(lv_result) {
_global.obj_iads = new Array();
var _local2 = 0;
while (_local2 < lv_result.firstChild.childNodes.length) {
if (lv_result.firstChild.childNodes[_local2].firstChild.nodeValue != null) {
obj_iads[lv_result.firstChild.childNodes[_local2].nodeName] = lv_result.firstChild.childNodes[_local2].firstChild.nodeValue;
} else if (lv_result.firstChild.childNodes[_local2].firstChild.firstChild.nodeValue != null) {
var _local5 = new Object();
var _local4 = 0;
while (_local4 < lv_result.firstChild.childNodes[_local2].childNodes.length) {
_local5[lv_result.firstChild.childNodes[_local2].childNodes[_local4].nodeName] = lv_result.firstChild.childNodes[_local2].childNodes[_local4].firstChild.nodeValue;
_local4++;
}
obj_iads[lv_result.firstChild.childNodes[_local2].nodeName] = _local5;
}
_local2++;
}
show_time = int(_global.obj_iads.t);
check_type();
}
function time_delay() {
tim = 0;
int1 = setInterval(timespam, 1000);
}
function timespam() {
tim++;
if (tim == show_time) {
clearInterval(int1);
_root.play();
}
}
function create_assets(mc, _type) {
mc.createEmptyMovieClip("whitebg", 0);
whitebg.beginFill(16777215);
whitebg.moveTo(0, 0);
whitebg.lineTo(0, 0);
whitebg.lineTo(Stage.width, 0);
whitebg.lineTo(Stage.width, Stage.height + 20);
whitebg.lineTo(0, Stage.height + 20);
whitebg.endFill();
mc.createEmptyMovieClip("trgt_main", 4);
mcLoader = new MovieClipLoader();
mcLoader.addListener(mc);
if (_type != "FULL") {
mc.createEmptyMovieClip("square_mc", 5);
var _local4 = trgt_main.createEmptyMovieClip("trgt_ads", getNextHighestDepth());
var _local3 = new TextFormat();
_local3.align = "center";
_local3.font = "Verdana";
_local3.size = 10;
var _local2 = new TextFormat();
_local2.align = "right";
_local2.font = "Verdana";
_local2.size = 10;
_local2.underline = true;
mc.createTextField("h_txt", mc.getNextHighestDepth(), 0, 0, 100, 22);
mc.createTextField("b_txt", mc.getNextHighestDepth(), 0, 0, 100, 22);
mc.createTextField("m_txt", mc.getNextHighestDepth(), 0, 0, 120, 22);
b_txt.autoSize = true;
m_txt.autoSize = true;
b_txt.selectable = false;
h_txt.selectable = false;
m_txt.selectable = false;
m_txt.html = true;
b_txt.multiline = true;
b_txt.setNewTextFormat(_local3);
h_txt.autoSize = true;
h_txt.setNewTextFormat(_local3);
m_txt.setNewTextFormat(_local2);
loadMessages();
h_txt.text = "";
mc.createEmptyMovieClip("progressBar", 500);
}
}
function onLoadInit(mc) {
ad_width = int(_global.obj_iads.x);
ad_height = int(_global.obj_iads.y);
h_txt.text = "Advertisement";
progressBar.tim = show_time;
progressBar.width = _global.obj_iads.x;
progressBar.height = 15;
progressBar.start = function () {
game_fps = getFps();
maxw = this.width - 2;
this.ad = maxw / (this.tim + 1);
this.ad = this.ad / game_fps;
};
progressBar.onEnterFrame = function () {
if (this.bar._width < (this.width - 2)) {
this.bar._width = this.bar._width + this.ad;
} else {
this.bar._width = this.width;
}
};
progressBar._x = 100;
progressBar._y = 100;
bar_mc = progressBar.createEmptyMovieClip("bar", 1);
box_mc = progressBar.createEmptyMovieClip("box", 2);
bar_mc.beginFill(26112);
bar_mc.moveTo(0, 0);
bar_mc.lineTo(1, 0);
bar_mc.lineTo(1, progressBar.height - 2);
bar_mc.lineTo(0, progressBar.height - 2);
bar_mc.lineTo(0, 0);
bar_mc.endFill();
bar_mc._x = 1.5;
bar_mc._y = 1.5;
box_mc.lineStyle(1, 3355443, 100, true, "none", "round", "miter", 1);
box_mc.lineTo(progressBar.width, 0);
box_mc.lineTo(progressBar.width, progressBar.height);
box_mc.lineTo(0, progressBar.height);
box_mc.lineTo(0, 0);
box_mc._x = 0;
box_mc._y = 0;
progressBar.start();
b_txt.text = "Note\rClicking on the above Ad won't interrupt your game.\rAd link opens in a new window.\rThanks to our sponsors, we provide you free games to play.";
myself._y = b_txt._y - 10;
x = (Stage.width / 2) - (ad_width / 2);
y = (Stage.height / 2) - (ad_height / 2);
mc._x = x;
mc._y = y;
h_txt._x = (x + (ad_width / 2)) - (h_txt._width / 2);
h_txt._y = y - 20;
progressBar._x = (x + (ad_width / 2)) - (progressBar._width / 2);
progressBar._y = (y + 5) + ad_height;
myself.attachMovie("invizi_logo", "invizi_logo", this.getNextHighestDepth() + 100);
myself.invizi_logo.swapDepths(myself.getNextHighestDepth());
myself.invizi_logo._x = int(progressBar._x);
myself.invizi_logo._y = int(progressBar._y + progressBar._height) + 5;
m_txt._x = int(progressBar._x + progressBar._width) - m_txt._width;
m_txt._y = int(progressBar._y + progressBar._height) + 3;
myself.invizi_logo.onRelease = function () {
getURL ("http://www.inviziads.com", "_blank");
};
b_txt._x = (x + (ad_width / 2)) - (b_txt._width / 2);
b_txt._y = progressBar._y + 38;
square_mc.beginFill(16711680);
square_mc.moveTo(0, 0);
square_mc.lineTo(ad_width, 0);
square_mc.lineTo(ad_width, ad_height);
square_mc.lineTo(0, ad_height);
square_mc.lineTo(0, 0);
square_mc.endFill();
square_mc._x = x;
square_mc._y = y;
trgt_main.setMask(square_mc);
}
function loadMessages() {
lv_messages = new XML();
lv_messages.onLoad = function (success) {
if (success) {
totalNodes = lv_messages.firstChild.childNodes.length;
ran = Math.floor(Math.random() * totalNodes);
trace(lv_messages.firstChild);
if (lv_messages.firstChild.childNodes[ran].firstChild == undefined) {
m_txt.htmlText = "<font color='#ff0000'><a href='http://www.inviziads.com/adv-starter-pack.html' target='_blank'>Advertisers, try us out for US$250</a></font>";
} else {
m_txt.htmlText = ((("<font color='#ff0000'><a href='" + lv_messages.firstChild.childNodes[ran].attributes.link) + "' target='_blank'>") + lv_messages.firstChild.childNodes[ran].firstChild) + "</a></font>";
}
m_txt._x = int(progressBar._x + progressBar._width) - m_txt._width;
m_txt._y = int(progressBar._y + progressBar._height) + 2;
} else {
m_txt.htmlText = "<font color='#ff0000'><a href='http://www.inviziads.com/adv-starter-pack.html' target='_blank'>Advertisers, try us out for US$250</a></font>";
m_txt._x = int(progressBar._x + progressBar._width) - m_txt._width;
m_txt._y = int(progressBar._y + progressBar._height) + 2;
}
};
lv_messages.load(_root.messageURL);
}
function pushdata() {
holder.obj_iads = _global.obj_iads;
}
function startdatapush(mc) {
var _local2;
_local2 = setInterval(this, "pushdata", 10);
}
function check_type() {
if (_global.obj_iads.type eq "UPDATE") {
myself.createEmptyMovieClip("holder", 100);
var _local4 = _global.obj_iads.url;
show_time = 15;
obj_iads = _global.obj_iads;
var _local2 = new Object();
_local2.onLoadComplete = function (target_mc) {
};
var _local3 = new MovieClipLoader();
_local3.addListener(_local2);
_local3.loadClip(_global.obj_iads.url, holder);
} else {
brain();
}
time_delay();
}
function parse_xml(mydata) {
var _local4 = new Array();
var _local1 = 0;
while (_local1 < mydata.firstChild.childNodes.length) {
if (mydata.firstChild.childNodes[_local1].firstChild.nodeValue != null) {
_local4[mydata.firstChild.childNodes[_local1].nodeName] = mydata.firstChild.childNodes[_local1].firstChild.nodeValue;
} else if (mydata.firstChild.childNodes[_local1].firstChild.firstChild.nodeValue != null) {
var _local5 = new Object();
var _local2 = 0;
while (_local2 < lv_result.firstChild.childNodes[_local1].childNodes.length) {
_local4[lv_result.firstChild.childNodes[_local1].childNodes[_local2].nodeName] = mydata.firstChild.childNodes[_local1].childNodes[_local2].firstChild.nodeValue;
_local2++;
}
_local4[lv_result.firstChild.childNodes[_local1].nodeName] = _local5;
}
_local1++;
}
return(_local4);
}
System.security.allowDomain("*");
getFps = function () {
if (signal == true) {
time = getTimer();
} else {
tempo = int(1000 / (getTimer() - time));
}
signal = !signal;
return(tempo);
};
this.onEnterFrame = function () {
game_fps = getFps();
if ((game_fps != 0) && (game_fps != undefined)) {
this.onEnterFrame = null;
}
};
myself = this;
signal = true;
if (_root.checkhost() == false) {
_root.stop();
var my_date = new Date();
_root.adurl = (_root.obj_game.inviziads + "&type=pre&ts=") + my_date.getSeconds();
_root.messageURL = "http://s1.inviziads.com/template/invizi_messages.xml";
get_iads();
} else {
_root.play();
}
Symbol 9 MovieClip Frame 1
stop();
Symbol 9 MovieClip Frame 2
stop();
Symbol 37 MovieClip Frame 1
_root._trackClickThru(this);
Symbol 47 MovieClip Frame 1
function brain() {
create_assets(myself, _global.obj_iads.type);
switch (_global.obj_iads.type) {
case "FULL" :
mcLoader.loadClip(_global.obj_iads.url, trgt_main);
break;
case "EMBED" :
mcLoader.loadClip(_global.obj_iads.url, trgt_main.trgt_ads);
if (_global.obj_iads.link ne undefined) {
trgt_main.onRelease = function () {
trace("_global.obj_iads.link " + _global.obj_iads.link);
getURL (_global.obj_iads.link, "_blank");
};
}
break;
case "NOOP" :
_parent._parent._visible = 0;
break;
}
}
function get_iads() {
lv_iads = new XML();
lv_result = new XML();
lv_result.ignoreWhite = true;
lv_result.onLoad = function (success) {
trace("success " + success);
if (success) {
parse_iads(lv_result);
myself.attachMovie("invizi_logo", "invizi_logo", this.getNextHighestDepth(), {_x:Stage.width - 120, _y:Stage.height - 20});
}
};
lv_iads.sendAndLoad(adurl, lv_result, "POST");
}
function parse_iads(lv_result) {
_global.obj_iads = new Array();
var _local2 = 0;
while (_local2 < lv_result.firstChild.childNodes.length) {
if (lv_result.firstChild.childNodes[_local2].firstChild.nodeValue != null) {
obj_iads[lv_result.firstChild.childNodes[_local2].nodeName] = lv_result.firstChild.childNodes[_local2].firstChild.nodeValue;
} else if (lv_result.firstChild.childNodes[_local2].firstChild.firstChild.nodeValue != null) {
var _local5 = new Object();
var _local4 = 0;
while (_local4 < lv_result.firstChild.childNodes[_local2].childNodes.length) {
_local5[lv_result.firstChild.childNodes[_local2].childNodes[_local4].nodeName] = lv_result.firstChild.childNodes[_local2].childNodes[_local4].firstChild.nodeValue;
_local4++;
}
obj_iads[lv_result.firstChild.childNodes[_local2].nodeName] = _local5;
}
_local2++;
}
show_time = int(_global.obj_iads.t);
check_type();
}
function create_assets(mc, _type) {
trace((("Create _ assets " + mc) + " ") + _type);
mc.createEmptyMovieClip("trgt_main", 4);
mcLoader = new MovieClipLoader();
mcLoader.addListener(mc);
if (_type != "FULL") {
mc.createEmptyMovieClip("square_mc", 5);
var _local4 = trgt_main.createEmptyMovieClip("trgt_ads", getNextHighestDepth());
var _local2 = new TextFormat();
_local2.align = "center";
_local2.font = "Verdana";
_local2.size = 10;
mc.createTextField("h_txt", mc.getNextHighestDepth(), 0, 0, 100, 22);
mc.createTextField("b_txt", mc.getNextHighestDepth(), 0, 0, 100, 22);
b_txt.autoSize = true;
b_txt.selectable = false;
h_txt.selectable = false;
b_txt.multiline = true;
b_txt.setNewTextFormat(_local2);
h_txt.autoSize = true;
h_txt.setNewTextFormat(_local2);
h_txt.text = "";
}
}
function onLoadInit(mc) {
ad_width = int(_global.obj_iads.x);
ad_height = int(_global.obj_iads.y);
_x = ((336 - ad_width) / 2);
_y = ((280 - ad_height) / 2);
progressBar.tim = show_time;
progressBar.width = _global.obj_iads.x;
progressBar.height = 15;
progressBar.start = function () {
maxw = this.width - 2;
this.ad = maxw / (this.tim + 1);
this.ad = this.ad / game_fps;
};
progressBar.onEnterFrame = function () {
if (this.bar._width < (this.width - 2)) {
this.bar._width = this.bar._width + this.ad;
} else {
this.bar._width = this.width;
}
};
progressBar._x = 100;
progressBar._y = 100;
bar_mc = progressBar.createEmptyMovieClip("bar", 1);
box_mc = progressBar.createEmptyMovieClip("box", 2);
bar_mc.beginFill(26112);
bar_mc.moveTo(0, 0);
bar_mc.lineTo(1, 0);
bar_mc.lineTo(1, progressBar.height - 2);
bar_mc.lineTo(0, progressBar.height - 2);
bar_mc.lineTo(0, 0);
bar_mc.endFill();
bar_mc._x = 1.5;
bar_mc._y = 1.5;
box_mc.lineStyle(1, 3355443, 100, true, "none", "round", "miter", 1);
box_mc.lineTo(progressBar.width, 0);
box_mc.lineTo(progressBar.width, progressBar.height);
box_mc.lineTo(0, progressBar.height);
box_mc.lineTo(0, 0);
box_mc._x = 0;
box_mc._y = 0;
progressBar.start();
x = 0;
y = 0;
mc._x = x;
mc._y = y;
square_mc.beginFill(16711680);
square_mc.moveTo(0, 0);
square_mc.lineTo(ad_width, 0);
square_mc.lineTo(ad_width, ad_height);
square_mc.lineTo(0, ad_height);
square_mc.lineTo(0, 0);
square_mc.endFill();
square_mc._x = x;
square_mc._y = y;
trgt_main.setMask(square_mc);
}
function check_type() {
if (_global.obj_iads.type eq "UPDATE") {
this.createEmptyMovieClip("holder", 100);
var _local5 = _global.obj_iads.url;
_root.obj_iads = _global.obj_iads.payload;
holder.loadMovie(_global.obj_iads.url);
holder.obj_iads = _root.obj_iads;
show_time = 20;
} else {
if (((_global.obj_iads.htmlPostRoll != undefined) && (purl != null)) && (purl.indexOf("gangofgamers.com") != -1)) {
trace(purl.indexOf("gangofgamers.com") != -1);
var _local4 = flash.external.ExternalInterface.call("inviziShowHtmlPostRoll", _global.obj_iads.htmlPostRoll);
}
if (((_local4 != null) && (purl != null)) && (purl.indexOf("gangofgamers.com") != -1)) {
this._parent._visible = false;
} else {
brain();
}
}
}
function parse_xml(mydata) {
var _local4 = new Array();
var _local1 = 0;
while (_local1 < mydata.firstChild.childNodes.length) {
if (mydata.firstChild.childNodes[_local1].firstChild.nodeValue != null) {
_local4[mydata.firstChild.childNodes[_local1].nodeName] = mydata.firstChild.childNodes[_local1].firstChild.nodeValue;
} else if (mydata.firstChild.childNodes[_local1].firstChild.firstChild.nodeValue != null) {
var _local5 = new Object();
var _local2 = 0;
while (_local2 < lv_result.firstChild.childNodes[_local1].childNodes.length) {
_local4[lv_result.firstChild.childNodes[_local1].childNodes[_local2].nodeName] = mydata.firstChild.childNodes[_local1].childNodes[_local2].firstChild.nodeValue;
_local2++;
}
_local4[lv_result.firstChild.childNodes[_local1].nodeName] = _local5;
}
_local1++;
}
return(_local4);
}
System.security.allowDomain("*");
this.getFps = function () {
if (signal == true) {
time = getTimer();
} else {
tempo = int(1000 / (getTimer() - time));
}
signal = !signal;
return(tempo);
};
this.onEnterFrame = function () {
game_fps = getFps();
if ((game_fps ne 0) and (game_fps ne undefined)) {
this.onEnterFrame = null;
}
};
myself = this;
signal = true;
var purl = flash.external.ExternalInterface.call("document.URL.toString");
var hurl = escape(_root._url);
adurl = _root.obj_game.inviziads;
adurl = adurl + "&type=post&v=2_0";
adurl = adurl + ("&purl=" + escape(purl));
adurl = adurl + ("&hurl=" + hurl);
adurl = adurl + ("&ts=" + getTimer());
trace(adurl);
get_iads();
stop();
Symbol 49 MovieClip Frame 1
invizi_logo.onRelease = function () {
getURL ("http://www.inviziads.com/", "_blank");
};
Symbol 64 Button
on (release) {
trace("CALLING : _root.g2w_playagain()");
_root.g2w_playagain();
}
Symbol 67 Button
on (release) {
trace("CALLING : _root.g2w_skiplevel()");
_root.g2w_skiplevel();
}
Symbol 68 MovieClip Frame 1
stop();
Symbol 70 MovieClip Frame 1
stop();
Symbol 70 MovieClip Frame 2
stop();
video_btn.onRelease = function () {
if (flash.external.ExternalInterface.available) {
flash.external.ExternalInterface.call("createpop");
} else {
getURL ("javascript:createpop()");
}
};
Symbol 70 MovieClip Frame 3
stop();
share_btn.onRelease = function () {
getURL (_root.obj_game.facebookURL, "_blank");
};
video_btn.onRelease = function () {
getURL ((("http://www.gangofgamers.com/videotutorial.html?url=" + _root.obj_game.videoID) + "&name=") + _root.obj_game._gameTitle, "_blank");
};
Symbol 87 MovieClip [_g2w_gameover_mc] Frame 1
stop();
_root._validateHost(this);
Symbol 87 MovieClip [_g2w_gameover_mc] Frame 2
stop();
Symbol 87 MovieClip [_g2w_gameover_mc] Frame 11
stop();
Symbol 87 MovieClip [_g2w_gameover_mc] Frame 20
stop();
share_btn.onRelease = function () {
getURL (_root.obj_game.facebookURL, "_blank");
};
video_btn.onRelease = function () {
getURL ((("http://www.gangofgamers.com/videotutorial.html?url=" + _root.obj_game.videoID) + "&name=") + _root.obj_game._gameTitle, "_blank");
};
Symbol 87 MovieClip [_g2w_gameover_mc] Frame 30
stop();
var purl = flash.external.ExternalInterface.call("document.URL.toString");
if ((purl != null) && (purl.indexOf("gangofgamers.com") != -1)) {
helpers.gotoAndStop(2);
} else {
helpers.gotoAndStop(3);
}
Symbol 87 MovieClip [_g2w_gameover_mc] Frame 41
stop();
Symbol 94 MovieClip [game_sound_ctrl] Frame 1
_gameSounds = new Sound();
var frame = "on";
changeVol = function (targetvol, step) {
this.onEnterFrame = function () {
var _local3 = _gameSounds.getVolume();
if ((step < 0) and (_local3 <= targetvol)) {
_local3 = targetvol;
delete this.onEnterFrame;
_root.so_sound = 1;
} else if ((step > 0) and (_local3 >= targetvol)) {
_local3 = targetvol;
delete this.onEnterFrame;
_root.so_sound = 0;
} else {
_gameSounds.setVolume(_local3 + step);
}
};
};
if (_root.so_sound == 1) {
frame = "off";
this.gotoAndPlay(frame);
}
this.onRelease = function () {
if (frame == "on") {
frame = "off";
} else {
frame = "on";
}
this.gotoAndPlay(frame);
};
Symbol 94 MovieClip [game_sound_ctrl] Frame 2
stop();
changeVol(100, 5);
Symbol 94 MovieClip [game_sound_ctrl] Frame 3
stop();
changeVol(0, -5);
Symbol 501 MovieClip [__Packages.it.sephiroth.XML2Object] Frame 0
class it.sephiroth.XML2Object
{
var oXML;
function XML2Object () {
}
function get xml() {
return(oXML);
}
function parseXML(sFile) {
oResult = new Object();
oXML = sFile;
oResult = translateXML();
return(oResult);
}
function translateXML(from, path, name, position) {
var _local2;
var _local9;
var _local4;
var _local10;
if (path == undefined) {
path = this;
name = "oResult";
}
path = path[name];
if (from == undefined) {
from = new XML(xml.toString());
from.ignoreWhite = true;
}
if (from.hasChildNodes()) {
_local9 = from.childNodes;
if (position != undefined) {
_local10 = path;
path = path[position];
}
while (_local9.length > 0) {
_local4 = _local9.shift();
_local2 = _local4.nodeName;
if (_local2 != undefined) {
var _local5 = new Object();
_local5.attributes = _local4.attributes;
_local5.data = _local4.firstChild.nodeValue;
if (position != undefined) {
_local10 = path;
}
if (path[_local2] != undefined) {
if (path[_local2].__proto__ == Array.prototype) {
path[_local2].push(_local5);
name = _local4.nodeName;
position = path[_local2].length - 1;
} else {
var _local8 = path[_local2];
path[_local2] = new Array();
path[_local2].push(_local8);
path[_local2].push(_local5);
name = _local2;
position = path[_local2].length - 1;
}
} else {
path[_local2] = _local5;
name = _local2;
position = undefined;
}
}
if (_local4.hasChildNodes()) {
translateXML(_local4, path, name, position);
}
}
}
return(oResult);
}
var oResult = new Object();
}
Symbol 107 Button
on (release) {
getURL ("http://www.gangofgamers.com", "_blank");
}
Symbol 110 MovieClip Frame 1
stop();
System.security.allowDomain("*");
var GameURL = _root._url;
if ((GameURL.indexOf(".gangofgamers.com") != -1) || (GameURL.indexOf(".games2win.com") != -1)) {
mc_common._visible = false;
} else {
mc_common._visible = true;
var str = ((("http://s1.inviziads.com/lookup.html?type=strip&g=" + _root.obj_game._g2wGameId) + "&h=") + _root.obj_game._host);
loadMovie (str, this.loaderClip);
}
Symbol 119 MovieClip Frame 90
_root.gotoAndStop("lblloader");
Symbol 131 MovieClip Frame 1
stop();
Symbol 146 MovieClip Frame 7
stop();
Symbol 150 Button
on (release) {
_root.gotoAndPlay("lblgame");
}
Symbol 159 Button
on (release) {
gotoAndPlay ("ins");
}
Symbol 161 Button
on (release) {
gotoAndPlay ("story");
}
Symbol 170 MovieClip Frame 98
stop();
Symbol 170 MovieClip Frame 106
stop();
Symbol 170 MovieClip Frame 114
stop();
Symbol 200 Button
on (release) {
gotoAndStop ("edit_page");
}
Symbol 201 MovieClip Frame 394
stop();
showBtn.onRelease = function () {
gotoAndPlay (1);
};
Symbol 204 Button
on (release) {
gotoAndStop ("edit_page");
}
Symbol 251 MovieClip Frame 1
stop();
Symbol 251 MovieClip Frame 5
stop();
Symbol 260 MovieClip Frame 1
stop();
Symbol 265 MovieClip Frame 1
stop();
Symbol 268 MovieClip Frame 1
stop();
Symbol 268 MovieClip Frame 5
stop();
Symbol 319 MovieClip Frame 1
stop();
Symbol 328 MovieClip Frame 1
stop();
Symbol 328 MovieClip Frame 6
stop();
Symbol 328 MovieClip Frame 12
stop();
Symbol 345 MovieClip Frame 1
stop();
Instance of Symbol 251 MovieClip "next_wave" in Symbol 345 MovieClip Frame 1
on (rollOver) {
_parent.info_message.gotoAndStop("status");
_parent.info_message.game_status.text = "Start the next wave of homework attack.";
}
on (rollOut) {
_parent.info_message.game_status.text = "";
_parent.info_message.gotoAndStop("health");
}
Instance of Symbol 260 MovieClip "auto_spawn" in Symbol 345 MovieClip Frame 1
on (rollOver) {
_parent.info_message.gotoAndStop("status");
_parent.info_message.game_status.text = "Automatically starts each wave of attack.";
}
on (rollOut) {
_parent.info_message.game_status.text = "";
_parent.info_message.gotoAndStop("health");
}
Instance of Symbol 219 MovieClip in Symbol 345 MovieClip Frame 1
on (press) {
if (_parent._parent.gold >= 400) {
_root.attachedStatus = true;
_parent._parent.marker.active = 1;
_parent._parent.marker.tower = "maths";
_parent._parent.marker.cost = 400;
_parent._parent.panel_mc.delete_btn.gotoAndStop("on");
_parent._parent.panel_mc.detete_btn.useHandCursor = true;
_parent._parent.panel_mc.delete_btn.enabled = true;
}
_parent._parent.sound_select.gotoAndPlay(2);
_parent._parent.UpgradeTowerInfo._visible = false;
}
on (rollOver) {
_parent._parent.showHealth();
_parent._parent.panel_mc.info_message.gotoAndStop("description");
_parent._parent.panel_mc.info_message.title.text = _parent._parent.tower_maths.title;
_parent._parent.panel_mc.info_message.damage.text = "Damage: " + _parent._parent.tower_maths.show;
_parent._parent.panel_mc.info_message.desc.text = "Description: " + _parent._parent.tower_maths.desc;
}
on (rollOut) {
_parent._parent.info_message._visible = false;
_parent._parent.panel_mc.info_message.gotoAndStop("health");
}
Instance of Symbol 217 MovieClip in Symbol 345 MovieClip Frame 1
on (press) {
if (_parent._parent.gold >= 3200) {
_root.attachedStatus = true;
_parent._parent.marker.active = 1;
_parent._parent.marker.tower = "physics";
_parent._parent.marker.cost = 3200;
_parent._parent.panel_mc.delete_btn.gotoAndStop("on");
_parent._parent.panel_mc.detete_btn.useHandCursor = true;
_parent._parent.panel_mc.delete_btn.enabled = true;
}
_parent._parent.sound_select.gotoAndPlay(2);
_parent._parent.UpgradeTowerInfo._visible = false;
}
on (rollOver) {
_parent._parent.showHealth();
_parent._parent.panel_mc.info_message.gotoAndStop("description");
_parent._parent.panel_mc.info_message.title.text = _parent._parent.tower_physics.title;
_parent._parent.panel_mc.info_message.damage.text = "Damage: " + _parent._parent.tower_physics.show;
_parent._parent.panel_mc.info_message.desc.text = "Description: " + _parent._parent.tower_physics.desc;
}
on (rollOut) {
_parent._parent.info_message._visible = false;
_parent._parent.panel_mc.info_message.gotoAndStop("health");
}
Instance of Symbol 131 MovieClip in Symbol 345 MovieClip Frame 1
on (press) {
if (_parent._parent.gold >= 100) {
_parent._parent.marker.active = 1;
_root.attachedStatus = true;
_parent._parent.marker.tower = "art";
_parent._parent.marker.cost = 100;
_parent._parent.panel_mc.delete_btn.gotoAndStop("on");
_parent._parent.panel_mc.detete_btn.useHandCursor = true;
_parent._parent.panel_mc.delete_btn.enabled = true;
}
_parent._parent.sound_select.gotoAndPlay(2);
_parent._parent.UpgradeTowerInfo._visible = false;
}
on (rollOver) {
_parent._parent.showHealth();
_parent._parent.panel_mc.info_message.gotoAndStop("description");
_parent._parent.panel_mc.info_message.title.text = _parent._parent.tower_art.title;
_parent._parent.panel_mc.info_message.damage.text = "Damage: " + _parent._parent.tower_art.show;
_parent._parent.panel_mc.info_message.desc.text = "Description: " + _parent._parent.tower_art.desc;
}
on (rollOut) {
_parent._parent.info_message._visible = false;
_parent._parent.panel_mc.info_message.gotoAndStop("health");
}
Instance of Symbol 221 MovieClip in Symbol 345 MovieClip Frame 1
on (press) {
if (_parent._parent.gold >= 800) {
_root.attachedStatus = true;
_parent._parent.marker.active = 1;
_parent._parent.marker.tower = "music";
_parent._parent.marker.cost = 800;
_parent._parent.panel_mc.delete_btn.gotoAndStop("on");
_parent._parent.panel_mc.detete_btn.useHandCursor = true;
_parent._parent.panel_mc.delete_btn.enabled = true;
}
_parent._parent.sound_select.gotoAndPlay(2);
_parent._parent.UpgradeTowerInfo._visible = false;
}
on (rollOver) {
_parent._parent.showHealth();
_parent._parent.panel_mc.info_message.gotoAndStop("description");
_parent._parent.panel_mc.info_message.title.text = _parent._parent.tower_music.title;
_parent._parent.panel_mc.info_message.damage.text = "Damage: " + _parent._parent.tower_music.show;
_parent._parent.panel_mc.info_message.desc.text = "Description: " + _parent._parent.tower_music.desc;
}
on (rollOut) {
_parent._parent.info_message._visible = false;
_parent._parent.panel_mc.info_message.gotoAndStop("health");
}
Instance of Symbol 133 MovieClip in Symbol 345 MovieClip Frame 1
on (press) {
if (_parent._parent.gold >= 1600) {
_root.attachedStatus = true;
_parent._parent.marker.active = 1;
_parent._parent.marker.tower = "chemistry";
_parent._parent.marker.cost = 1600;
_parent._parent.panel_mc.delete_btn.gotoAndStop("on");
_parent._parent.panel_mc.detete_btn.useHandCursor = true;
_parent._parent.panel_mc.delete_btn.enabled = true;
}
_parent._parent.sound_select.gotoAndPlay(2);
_parent._parent.UpgradeTowerInfo._visible = false;
}
on (rollOver) {
_parent._parent.showHealth();
_parent._parent.panel_mc.info_message.gotoAndStop("description");
_parent._parent.panel_mc.info_message.title.text = _parent._parent.tower_chemistry.title;
_parent._parent.panel_mc.info_message.damage.text = "Damage: " + _parent._parent.tower_chemistry.show;
_parent._parent.panel_mc.info_message.desc.text = "Description: " + _parent._parent.tower_chemistry.desc;
}
on (rollOut) {
_parent._parent.info_message._visible = false;
_parent._parent.panel_mc.info_message.gotoAndStop("health");
}
Instance of Symbol 135 MovieClip in Symbol 345 MovieClip Frame 1
on (press) {
if (_parent._parent.gold >= 5000) {
_root.attachedStatus = true;
_parent._parent.marker.active = 1;
_parent._parent.marker.tower = "bio";
_parent._parent.marker.cost = 5000;
_parent._parent.panel_mc.delete_btn.gotoAndStop("on");
_parent._parent.panel_mc.detete_btn.useHandCursor = true;
_parent._parent.panel_mc.delete_btn.enabled = true;
}
_parent._parent.sound_select.gotoAndPlay(2);
_parent._parent.UpgradeTowerInfo._visible = false;
}
on (rollOver) {
_parent._parent.showHealth();
_parent._parent.panel_mc.info_message.gotoAndStop("description");
_parent._parent.panel_mc.info_message.title.text = _parent._parent.tower_bio.title;
_parent._parent.panel_mc.info_message.damage.text = "Damage: " + _parent._parent.tower_bio.show;
_parent._parent.panel_mc.info_message.desc.text = "Description: " + _parent._parent.tower_bio.desc;
}
on (rollOut) {
_parent._parent.info_message._visible = false;
_parent._parent.panel_mc.info_message.gotoAndStop("health");
}
Instance of Symbol 330 MovieClip "alies_eraser" in Symbol 345 MovieClip Frame 1
onClipEvent (load) {
key = 1;
perc = 0;
active = 0;
nameVal = "Eraser";
aliesinfo = "+ 50 % damage on Art Equipments.\r+ 30 % damage on Biology Equipments.\r- 10 % damage on Music Equipments.\r- 5 % damage on Mathematics Equipments.";
}
on (press) {
if (_parent._parent.selectedTower != "") {
trace("inside alies :: ");
_parent._parent.sound_alies.gotoAndPlay(2);
_parent._parent.alies_marker.active = 1;
_parent._parent.alies_marker._visible = true;
_parent._parent.alies_marker.alies = "eraser";
_parent._parent.alies_marker.cost = 1500;
_parent._parent.alies_marker.keyfrm = key;
_parent._parent.current_alies = this;
_parent._parent.panel_mc.delete_btn.gotoAndStop("on");
_parent._parent.panel_mc.detete_btn.useHandCursor = true;
_parent._parent.panel_mc.delete_btn.enabled = true;
}
}
on (rollOver) {
_parent.info_message.gotoAndStop("status");
_parent._parent.alies_marker._visible = false;
_parent._parent.alies_marker._x = -200;
var str = String(_parent._parent.tower_art.title);
var lastDigit = str.indexOf("[");
if (lastDigit != -1) {
var subStr = str.substring(0, lastDigit - 1);
}
_parent.info_message.game_status.text = ("Power-up: Eraser \rCost: $1500\n Best used with '" + subStr) + "'";
}
on (rollOut) {
_parent.info_message.gotoAndStop("health");
}
Instance of Symbol 332 MovieClip "alies_calc" in Symbol 345 MovieClip Frame 1
onClipEvent (load) {
key = 2;
perc = 0;
nameVal = "Calculator";
active = 0;
aliesinfo = "+ 50 % damage on Mathematics Equipments.\r+ 30 % damage on Physics Equipments.\r+ 10 % damage on Biology Equipments.\r- 5 % damage on Music Equipments.";
}
on (release) {
if (_parent._parent.selectedTower != "") {
_parent._parent.sound_alies.gotoAndPlay(2);
_parent._parent.alies_marker.alies = "calc";
_parent._parent.alies_marker.active = 1;
_parent._parent.alies_marker._visible = true;
_parent._parent.alies_marker.cost = 1500;
_parent._parent.alies_marker.keyfrm = key;
_parent._parent.current_alies = this;
_parent._parent.panel_mc.delete_btn.gotoAndStop("on");
_parent._parent.panel_mc.detete_btn.useHandCursor = true;
_parent._parent.panel_mc.delete_btn.enabled = true;
}
}
on (rollOver) {
_parent.info_message.gotoAndStop("status");
_parent._parent.alies_marker._visible = false;
_parent._parent.alies_marker._x = -200;
var str = String(_parent._parent.tower_maths.title);
var lastDigit = str.indexOf("[");
if (lastDigit != -1) {
var subStr = str.substring(0, lastDigit - 1);
}
_parent.info_message.game_status.text = ("Power-up: Calculator \rCost: $1500\n Best used with '" + subStr) + "'";
}
on (rollOut) {
_parent.info_message.gotoAndStop("health");
}
Instance of Symbol 334 MovieClip "alies_stick" in Symbol 345 MovieClip Frame 1
onClipEvent (load) {
key = 3;
perc = 0;
nameVal = "Musician Guiding Stick";
active = 0;
aliesinfo = "+ 50 % damage on Music Equipments.\r+ 30 % damage on Art Equipments.\r- 10 % damage on Mathematics Equipments.\r- 5 % damage on Chemistry Equipments.";
}
on (release) {
if (_parent._parent.selectedTower != "") {
_parent._parent.sound_alies.gotoAndPlay(2);
_parent._parent.alies_marker.alies = "stick";
_parent._parent.alies_marker._visible = true;
_parent._parent.alies_marker.active = 1;
_parent._parent.alies_marker.cost = 1500;
_parent._parent.alies_marker.keyfrm = key;
_parent._parent.current_alies = this;
_parent._parent.panel_mc.delete_btn.gotoAndStop("on");
_parent._parent.panel_mc.detete_btn.useHandCursor = true;
_parent._parent.panel_mc.delete_btn.enabled = true;
}
}
on (rollOver) {
_parent._parent.alies_marker._visible = false;
_parent._parent.alies_marker._x = -200;
_parent.info_message.gotoAndStop("status");
var str = String(_parent._parent.tower_music.title);
var lastDigit = str.indexOf("[");
if (lastDigit != -1) {
var subStr = str.substring(0, lastDigit - 1);
}
_parent.info_message.game_status.text = ("Power-up: Musician's Guiding Stick \rCost: $1500\n Best used with '" + subStr) + "'";
}
on (rollOut) {
_parent.info_message.gotoAndStop("health");
}
Instance of Symbol 336 MovieClip "alies_table" in Symbol 345 MovieClip Frame 1
onClipEvent (load) {
key = 4;
perc = 0;
nameVal = "Periodic Table";
active = 0;
aliesinfo = "+ 50 % damage on Chemistry Equipments.\r+ 30 % damage on Physics Equipments\r- 10 % damage on Art Equipments.\r- 5 % damage on Music Equipments.";
}
on (release) {
if (_parent._parent.selectedTower != "") {
_parent._parent.sound_alies.gotoAndPlay(2);
_parent._parent.alies_marker.alies = "tabel";
_parent._parent.alies_marker.active = 1;
_parent._parent.alies_marker._visible = true;
_parent._parent.alies_marker.cost = 1500;
_parent._parent.alies_marker.keyfrm = key;
_parent._parent.current_alies = this;
_parent._parent.panel_mc.delete_btn.gotoAndStop("on");
_parent._parent.panel_mc.detete_btn.useHandCursor = true;
_parent._parent.panel_mc.delete_btn.enabled = true;
}
}
on (rollOver) {
_parent.info_message.gotoAndStop("status");
_parent._parent.alies_marker._visible = false;
_parent._parent.alies_marker._x = -200;
var str = String(_parent._parent.tower_chemistry.title);
var lastDigit = str.indexOf("[");
if (lastDigit != -1) {
var subStr = str.substring(0, lastDigit - 1);
}
_parent.info_message.game_status.text = ("Power-up: Periodic Table \rCost: $1500\n Best used with '" + subStr) + "'";
}
on (rollOut) {
_parent.info_message.gotoAndStop("health");
}
Instance of Symbol 338 MovieClip "alies_magnet" in Symbol 345 MovieClip Frame 1
onClipEvent (load) {
key = 5;
perc = 0;
nameVal = "Magnet";
active = 0;
aliesinfo = "+ 50 % damage on Physics Equipments.\r+ 30 % damage on Mathematics Equipments.\r- 10 % damage on Chemistry Equipments.\r- 5 % damage on Biology Equipments.";
}
on (release) {
if (_parent._parent.selectedTower != "") {
_parent._parent.sound_alies.gotoAndPlay(2);
_parent._parent.alies_marker.alies = "magnet";
_parent._parent.alies_marker._visible = true;
_parent._parent.alies_marker.active = 1;
_parent._parent.alies_marker.cost = 1500;
_parent._parent.alies_marker.keyfrm = key;
_parent._parent.current_alies = this;
_parent._parent.panel_mc.delete_btn.gotoAndStop("on");
_parent._parent.panel_mc.detete_btn.useHandCursor = true;
_parent._parent.panel_mc.delete_btn.enabled = true;
}
}
on (rollOver) {
_parent.info_message.gotoAndStop("status");
_parent._parent.alies_marker._visible = false;
_parent._parent.alies_marker._x = -200;
var str = String(_parent._parent.tower_physics.title);
var lastDigit = str.indexOf("[");
if (lastDigit != -1) {
var subStr = str.substring(0, lastDigit - 1);
}
_parent.info_message.game_status.text = ("Power-up: Magnet \rCost: $1500\n Best used with '" + subStr) + "'";
}
on (rollOut) {
_parent.info_message.gotoAndStop("health");
}
Instance of Symbol 340 MovieClip "alies_microscope" in Symbol 345 MovieClip Frame 1
onClipEvent (load) {
key = 6;
perc = 0;
nameVal = "Microscope";
active = 0;
aliesinfo = "+ 50 % damage on Biology Equipments.\r+ 30 % damage on Chemistry Equipments.\r+ 10 % damage on Physics Equipments.\r- 15 % damage on Art Equipments.\r- 10 % damage on Music Equipments.";
}
on (press) {
if (_parent._parent.selectedTower != "") {
_parent._parent.sound_alies.gotoAndPlay(2);
_parent._parent.alies_marker.alies = "microscope";
_parent._parent.alies_marker.active = 1;
_parent._parent.alies_marker._visible = true;
_parent._parent.alies_marker.cost = 1500;
_parent._parent.alies_marker.keyfrm = key;
_parent._parent.current_alies = this;
_parent._parent.panel_mc.delete_btn.gotoAndStop("on");
_parent._parent.panel_mc.detete_btn.useHandCursor = true;
_parent._parent.panel_mc.delete_btn.enabled = true;
}
}
on (rollOver) {
_parent.info_message.gotoAndStop("status");
_parent._parent.alies_marker._visible = false;
_parent._parent.alies_marker._x = -200;
var str = String(_parent._parent.tower_bio.title);
var lastDigit = str.indexOf("[");
if (lastDigit != -1) {
var subStr = str.substring(0, lastDigit - 1);
}
_parent.info_message.game_status.text = ("Power-up: Microscope \rCost: $1500\n Best used with '" + subStr) + "'";
}
on (rollOut) {
_parent.info_message.gotoAndStop("health");
}
Instance of Symbol 342 MovieClip in Symbol 345 MovieClip Frame 1
onClipEvent (load) {
this.useHandCursor = false;
}
on (release) {
}
on (rollOver) {
_parent._parent.showHealth();
_parent._parent.panel_mc.info_message.gotoAndStop("description");
_parent._parent.panel_mc.info_message.title.text = _parent._parent.tower_art.title;
_parent._parent.panel_mc.info_message.damage.text = "Damage: " + _parent._parent.tower_art.show;
_parent._parent.panel_mc.info_message.desc.text = "Description: " + _parent._parent.tower_art.desc;
}
on (rollOut) {
_parent._parent.info_message._visible = false;
_parent._parent.panel_mc.info_message.gotoAndStop("health");
}
onClipEvent (enterFrame) {
if (_parent._parent.gold < 100) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 342 MovieClip in Symbol 345 MovieClip Frame 1
onClipEvent (load) {
this.useHandCursor = false;
}
on (release) {
}
on (rollOver) {
_parent._parent.showHealth();
_parent._parent.panel_mc.info_message.gotoAndStop("description");
_parent._parent.panel_mc.info_message.title.text = _parent._parent.tower_physics.title;
_parent._parent.panel_mc.info_message.damage.text = "Damage: " + _parent._parent.tower_physics.show;
_parent._parent.panel_mc.info_message.desc.text = "Description: " + _parent._parent.tower_physics.desc;
}
on (rollOut) {
_parent._parent.info_message._visible = false;
_parent._parent.panel_mc.info_message.gotoAndStop("health");
}
onClipEvent (enterFrame) {
if (_parent._parent.gold < 3200) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 342 MovieClip in Symbol 345 MovieClip Frame 1
onClipEvent (load) {
this.useHandCursor = false;
}
on (release) {
}
on (rollOver) {
_parent._parent.showHealth();
_parent._parent.panel_mc.info_message.gotoAndStop("description");
_parent._parent.panel_mc.info_message.title.text = _parent._parent.tower_maths.title;
_parent._parent.panel_mc.info_message.damage.text = "Damage: " + _parent._parent.tower_maths.show;
_parent._parent.panel_mc.info_message.desc.text = "Description: " + _parent._parent.tower_maths.desc;
}
on (rollOut) {
_parent._parent.info_message._visible = false;
_parent._parent.panel_mc.info_message.gotoAndStop("health");
}
onClipEvent (enterFrame) {
if (_parent._parent.gold < 400) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 342 MovieClip in Symbol 345 MovieClip Frame 1
onClipEvent (load) {
this.useHandCursor = false;
}
on (release) {
}
on (rollOver) {
_parent._parent.showHealth();
_parent._parent.panel_mc.info_message.gotoAndStop("description");
_parent._parent.panel_mc.info_message.title.text = _parent._parent.tower_music.title;
_parent._parent.panel_mc.info_message.damage.text = "Damage: " + _parent._parent.tower_music.show;
_parent._parent.panel_mc.info_message.desc.text = "Description: " + _parent._parent.tower_music.desc;
}
on (rollOut) {
_parent._parent.info_message._visible = false;
_parent._parent.panel_mc.info_message.gotoAndStop("health");
}
onClipEvent (enterFrame) {
if (_parent._parent.gold < 800) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 342 MovieClip in Symbol 345 MovieClip Frame 1
onClipEvent (load) {
this.useHandCursor = false;
}
on (release) {
}
on (rollOver) {
_parent._parent.showHealth();
_parent._parent.panel_mc.info_message.gotoAndStop("description");
_parent._parent.panel_mc.info_message.title.text = _parent._parent.tower_bio.title;
_parent._parent.panel_mc.info_message.damage.text = "Damage: " + _parent._parent.tower_bio.show;
_parent._parent.panel_mc.info_message.desc.text = "Description: " + _parent._parent.tower_bio.desc;
}
on (rollOut) {
_parent._parent.info_message._visible = false;
_parent._parent.panel_mc.info_message.gotoAndStop("health");
}
onClipEvent (enterFrame) {
if (_parent._parent.gold < 5000) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 342 MovieClip in Symbol 345 MovieClip Frame 1
onClipEvent (load) {
this.useHandCursor = false;
}
on (release) {
}
on (rollOver) {
_parent._parent.showHealth();
_parent._parent.panel_mc.info_message.gotoAndStop("description");
_parent._parent.panel_mc.info_message.title.text = _parent._parent.tower_chemistry.title;
_parent._parent.panel_mc.info_message.damage.text = "Damage: " + _parent._parent.tower_chemistry.show;
_parent._parent.panel_mc.info_message.desc.text = "Description: " + _parent._parent.tower_chemistry.desc;
}
on (rollOut) {
_parent._parent.info_message._visible = false;
_parent._parent.panel_mc.info_message.gotoAndStop("health");
}
onClipEvent (enterFrame) {
if (_parent._parent.gold < 1600) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 342 MovieClip "inve_alies" in Symbol 345 MovieClip Frame 1
onClipEvent (load) {
this.useHandCursor = false;
}
on (release) {
}
Instance of Symbol 342 MovieClip "next_dummy" in Symbol 345 MovieClip Frame 1
onClipEvent (load) {
this.useHandCursor = false;
}
on (release) {
}
on (rollOver) {
_parent.info_message.gotoAndStop("status");
_parent.info_message.game_status.text = "Start the next wave of homework attack.";
}
on (rollOut) {
_parent.info_message.game_status.text = "";
_parent.info_message.gotoAndStop("health");
}
Instance of Symbol 342 MovieClip "inve0" in Symbol 345 MovieClip Frame 1
onClipEvent (load) {
this.useHandCursor = false;
}
on (release) {
}
on (rollOver) {
_parent.info_message.gotoAndStop("status");
var str = String(_parent._parent.tower_art.title);
var lastDigit = str.indexOf("[");
if (lastDigit != -1) {
var subStr = str.substring(0, lastDigit - 1);
}
_parent.info_message.game_status.text = ("Power-up: Eraser \rCost: $1500\n Best used with '" + subStr) + "'";
}
on (rollOut) {
_parent.info_message.gotoAndStop("health");
}
Instance of Symbol 342 MovieClip "inve4" in Symbol 345 MovieClip Frame 1
onClipEvent (load) {
this.useHandCursor = false;
}
on (release) {
}
on (rollOver) {
_parent.info_message.gotoAndStop("status");
var str = String(_parent._parent.tower_physics.title);
var lastDigit = str.indexOf("[");
if (lastDigit != -1) {
var subStr = str.substring(0, lastDigit - 1);
}
_parent.info_message.game_status.text = ("Power-up: Magnet \rCost: $1500\n Best used with '" + subStr) + "'";
}
on (rollOut) {
_parent.info_message.gotoAndStop("health");
}
Instance of Symbol 342 MovieClip "inve1" in Symbol 345 MovieClip Frame 1
onClipEvent (load) {
this.useHandCursor = false;
}
on (release) {
}
on (rollOver) {
_parent.info_message.gotoAndStop("status");
var str = String(_parent._parent.tower_maths.title);
var lastDigit = str.indexOf("[");
if (lastDigit != -1) {
var subStr = str.substring(0, lastDigit - 1);
}
_parent.info_message.game_status.text = ("Power-up: Calculator \rCost: $1500\n Best used with '" + subStr) + "'";
}
on (rollOut) {
_parent.info_message.gotoAndStop("health");
}
Instance of Symbol 342 MovieClip "inve2" in Symbol 345 MovieClip Frame 1
onClipEvent (load) {
this.useHandCursor = false;
}
on (release) {
}
on (rollOver) {
_parent.info_message.gotoAndStop("status");
var str = String(_parent._parent.tower_music.title);
var lastDigit = str.indexOf("[");
if (lastDigit != -1) {
var subStr = str.substring(0, lastDigit - 1);
}
_parent.info_message.game_status.text = ("Power-up: Musician's Guiding Stick \rCost: $1500\n Best used with '" + subStr) + "'";
}
on (rollOut) {
_parent.info_message.gotoAndStop("health");
}
Instance of Symbol 342 MovieClip "inve5" in Symbol 345 MovieClip Frame 1
onClipEvent (load) {
this.useHandCursor = false;
}
on (release) {
}
on (rollOver) {
_parent.info_message.gotoAndStop("status");
var str = String(_parent._parent.tower_bio.title);
var lastDigit = str.indexOf("[");
if (lastDigit != -1) {
var subStr = str.substring(0, lastDigit - 1);
}
_parent.info_message.game_status.text = ("Power-up: Microscope \rCost: $1500\n Best used with '" + subStr) + "'";
}
on (rollOut) {
_parent.info_message.gotoAndStop("health");
}
Instance of Symbol 342 MovieClip "inve3" in Symbol 345 MovieClip Frame 1
onClipEvent (load) {
this.useHandCursor = false;
}
on (release) {
}
on (rollOver) {
_parent.info_message.gotoAndStop("status");
var str = String(_parent._parent.tower_chemistry.title);
var lastDigit = str.indexOf("[");
if (lastDigit != -1) {
var subStr = str.substring(0, lastDigit - 1);
}
_parent.info_message.game_status.text = ("Power-up: Periodic Table \rCost: $1500\n Best used with '" + subStr) + "'";
}
on (rollOut) {
_parent.info_message.gotoAndStop("health");
}
Symbol 345 MovieClip Frame 2
inve_btn.useHandCursor = false;
Instance of Symbol 342 MovieClip in Symbol 345 MovieClip Frame 2
onClipEvent (load) {
this.useHandCursor = false;
}
on (release) {
}
on (rollOver) {
_parent._parent.showHealth();
_parent._parent.panel_mc.info_message.gotoAndStop("description");
_parent._parent.panel_mc.info_message.title.text = _parent._parent.tower_physics.title;
_parent._parent.panel_mc.info_message.damage.text = "Damage: " + _parent._parent.tower_physics.show;
_parent._parent.panel_mc.info_message.desc.text = "Description: " + _parent._parent.tower_physics.desc;
}
on (rollOut) {
_parent._parent.info_message._visible = false;
_parent._parent.panel_mc.info_message.gotoAndStop("health");
}
onClipEvent (enterFrame) {
if (_parent._parent.gold < 5000) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 342 MovieClip in Symbol 345 MovieClip Frame 2
onClipEvent (load) {
this.useHandCursor = false;
}
on (release) {
}
on (rollOver) {
_parent._parent.showHealth();
_parent._parent.panel_mc.info_message.gotoAndStop("description");
_parent._parent.panel_mc.info_message.title.text = _parent._parent.tower_music.title;
_parent._parent.panel_mc.info_message.damage.text = "Damage: " + _parent._parent.tower_music.show;
_parent._parent.panel_mc.info_message.desc.text = "Description: " + _parent._parent.tower_music.desc;
}
on (rollOut) {
_parent._parent.info_message._visible = false;
_parent._parent.panel_mc.info_message.gotoAndStop("health");
}
onClipEvent (enterFrame) {
if (_parent._parent.gold < 2000) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 342 MovieClip in Symbol 345 MovieClip Frame 2
onClipEvent (load) {
this.useHandCursor = false;
}
on (release) {
}
on (rollOver) {
_parent._parent.showHealth();
_parent._parent.panel_mc.info_message.gotoAndStop("description");
_parent._parent.panel_mc.info_message.title.text = _parent._parent.tower_bio.title;
_parent._parent.panel_mc.info_message.damage.text = "Damage: " + _parent._parent.tower_bio.show;
_parent._parent.panel_mc.info_message.desc.text = "Description: " + _parent._parent.tower_bio.desc;
}
on (rollOut) {
_parent._parent.info_message._visible = false;
_parent._parent.panel_mc.info_message.gotoAndStop("health");
}
onClipEvent (enterFrame) {
if (_parent._parent.gold < 8000) {
this._visible = true;
} else {
this._visible = false;
}
}
Instance of Symbol 342 MovieClip in Symbol 345 MovieClip Frame 2
onClipEvent (load) {
this.useHandCursor = false;
}
on (release) {
}
on (rollOver) {
_parent._parent.showHealth();
_parent._parent.panel_mc.info_message.gotoAndStop("description");
_parent._parent.panel_mc.info_message.title.text = _parent._parent.tower_chemistry.title;
_parent._parent.panel_mc.info_message.damage.text = "Damage: " + _parent._parent.tower_chemistry.show;
_parent._parent.panel_mc.info_message.desc.text = "Description: " + _parent._parent.tower_chemistry.desc;
}
on (rollOut) {
_parent._parent.info_message._visible = false;
_parent._parent.panel_mc.info_message.gotoAndStop("health");
}
onClipEvent (enterFrame) {
if (_parent._parent.gold < 4000) {
this._visible = true;
} else {
this._visible = false;
}
}
Symbol 395 MovieClip Frame 1
stop();
_root.game_mc.current_equip = 1;
_root.game_mc.life = 1;
Symbol 395 MovieClip Frame 2
_root.game_mc.current_equip = 2;
_root.game_mc.life = 1;
Symbol 395 MovieClip Frame 3
_root.game_mc.current_equip = 3;
_root.game_mc.life = 1;
Symbol 395 MovieClip Frame 4
_root.game_mc.current_equip = 4;
_root.game_mc.life = 1;
Symbol 395 MovieClip Frame 5
_root.game_mc.current_equip = 5;
_root.game_mc.life = 1;
Symbol 395 MovieClip Frame 6
_root.game_mc.current_equip = 6;
_root.game_mc.life = 1;
Symbol 395 MovieClip Frame 7
_root.game_mc.current_equip = 3;
_root.game_mc.life = 1;
Symbol 395 MovieClip Frame 8
_root.game_mc.current_equip = 4;
_root.game_mc.life = 1;
Symbol 395 MovieClip Frame 9
_root.game_mc.current_equip = 6;
_root.game_mc.life = 1;
Symbol 395 MovieClip Frame 10
_root.game_mc.current_equip = 1;
_root.game_mc.life = 3;
Symbol 395 MovieClip Frame 11
_root.game_mc.current_equip = 1;
_root.game_mc.life = 2;
Symbol 395 MovieClip Frame 12
_root.game_mc.current_equip = 2;
_root.game_mc.life = 2;
Symbol 395 MovieClip Frame 13
_root.game_mc.current_equip = 3;
_root.game_mc.life = 2;
Symbol 395 MovieClip Frame 14
_root.game_mc.current_equip = 4;
_root.game_mc.life = 2;
Symbol 395 MovieClip Frame 15
_root.game_mc.current_equip = 5;
_root.game_mc.life = 2;
Symbol 395 MovieClip Frame 16
_root.game_mc.current_equip = 6;
_root.game_mc.life = 2;
Symbol 395 MovieClip Frame 17
_root.game_mc.current_equip = 4;
_root.game_mc.life = 2;
Symbol 395 MovieClip Frame 18
_root.game_mc.current_equip = 2;
_root.game_mc.life = 2;
Symbol 395 MovieClip Frame 19
_root.game_mc.current_equip = 6;
_root.game_mc.life = 2;
Symbol 395 MovieClip Frame 20
_root.game_mc.current_equip = 2;
_root.game_mc.life = 3;
Symbol 395 MovieClip Frame 21
_root.game_mc.current_equip = 1;
_root.game_mc.life = 2;
Symbol 395 MovieClip Frame 22
_root.game_mc.current_equip = 2;
_root.game_mc.life = 2;
Symbol 395 MovieClip Frame 23
_root.game_mc.current_equip = 3;
_root.game_mc.life = 2;
Symbol 395 MovieClip Frame 24
_root.game_mc.current_equip = 4;
_root.game_mc.life = 2;
Symbol 395 MovieClip Frame 25
_root.game_mc.current_equip = 5;
_root.game_mc.life = 2;
Symbol 395 MovieClip Frame 26
_root.game_mc.current_equip = 6;
_root.game_mc.life = 2;
Symbol 395 MovieClip Frame 27
_root.game_mc.current_equip = 2;
_root.game_mc.life = 2;
Symbol 395 MovieClip Frame 28
_root.game_mc.current_equip = 4;
_root.game_mc.life = 2;
Symbol 395 MovieClip Frame 29
_root.game_mc.current_equip = 5;
_root.game_mc.life = 2;
Symbol 395 MovieClip Frame 30
_root.game_mc.current_equip = 3;
_root.game_mc.life = 5;
Symbol 395 MovieClip Frame 31
_root.game_mc.current_equip = 3;
_root.game_mc.life = 3;
Symbol 395 MovieClip Frame 32
_root.game_mc.current_equip = 5;
_root.game_mc.life = 3;
Symbol 395 MovieClip Frame 33
_root.game_mc.current_equip = 3;
_root.game_mc.life = 3;
Symbol 395 MovieClip Frame 34
_root.game_mc.current_equip = 4;
_root.game_mc.life = 3;
Symbol 395 MovieClip Frame 35
_root.game_mc.current_equip = 1;
_root.game_mc.life = 3;
Symbol 395 MovieClip Frame 36
_root.game_mc.current_equip = 2;
_root.game_mc.life = 3;
Symbol 395 MovieClip Frame 37
_root.game_mc.current_equip = 1;
_root.game_mc.life = 3;
Symbol 395 MovieClip Frame 38
_root.game_mc.current_equip = 4;
_root.game_mc.life = 3;
Symbol 395 MovieClip Frame 39
_root.game_mc.current_equip = 6;
_root.game_mc.life = 3;
Symbol 395 MovieClip Frame 40
_root.game_mc.current_equip = 6;
_root.game_mc.life = 5;
Symbol 395 MovieClip Frame 41
_root.game_mc.current_equip = 4;
_root.game_mc.life = 3;
Symbol 395 MovieClip Frame 42
_root.game_mc.current_equip = 2;
_root.game_mc.life = 3;
Symbol 395 MovieClip Frame 43
_root.game_mc.current_equip = 3;
_root.game_mc.life = 3;
Symbol 395 MovieClip Frame 44
_root.game_mc.current_equip = 3;
_root.game_mc.life = 3;
Symbol 395 MovieClip Frame 45
_root.game_mc.current_equip = 5;
_root.game_mc.life = 3;
Symbol 395 MovieClip Frame 46
_root.game_mc.current_equip = 5;
_root.game_mc.life = 3;
Symbol 395 MovieClip Frame 47
_root.game_mc.current_equip = 6;
_root.game_mc.life = 3;
Symbol 395 MovieClip Frame 48
_root.game_mc.current_equip = 4;
_root.game_mc.life = 3;
Symbol 395 MovieClip Frame 49
_root.game_mc.current_equip = 6;
_root.game_mc.life = 3;
Symbol 395 MovieClip Frame 50
_root.game_mc.current_equip = 5;
_root.game_mc.life = 5;
Symbol 395 MovieClip Frame 51
_root.game_mc.current_equip = 2;
_root.game_mc.life = 5;
Symbol 395 MovieClip Frame 52
_root.game_mc.current_equip = 1;
_root.game_mc.life = 5;
Symbol 395 MovieClip Frame 53
_root.game_mc.current_equip = 4;
_root.game_mc.life = 5;
Symbol 395 MovieClip Frame 54
_root.game_mc.current_equip = 3;
_root.game_mc.life = 5;
Symbol 395 MovieClip Frame 55
_root.game_mc.current_equip = 1;
_root.game_mc.life = 5;
Symbol 395 MovieClip Frame 56
_root.game_mc.current_equip = 4;
_root.game_mc.life = 5;
Symbol 395 MovieClip Frame 57
_root.game_mc.current_equip = 5;
_root.game_mc.life = 5;
Symbol 395 MovieClip Frame 58
_root.game_mc.current_equip = 5;
_root.game_mc.life = 5;
Symbol 395 MovieClip Frame 59
_root.game_mc.current_equip = 6;
_root.game_mc.life = 5;
Symbol 395 MovieClip Frame 60
_root.game_mc.current_equip = 6;
_root.game_mc.life = 10;
Symbol 403 MovieClip Frame 1
stop();
Symbol 406 MovieClip Frame 1
stop();
Symbol 409 MovieClip Frame 1
stop();
Symbol 412 MovieClip Frame 1
stop();
Symbol 415 MovieClip Frame 1
stop();
Symbol 421 MovieClip Frame 1
stop();
Symbol 425 MovieClip Frame 1
stop();
Symbol 426 MovieClip Frame 1
stop();
Symbol 429 MovieClip Frame 1
stop();
Symbol 432 MovieClip Frame 1
stop();
Symbol 433 MovieClip Frame 1
stop();
Symbol 434 MovieClip Frame 1
stop();
Symbol 435 MovieClip Frame 1
stop();
Symbol 455 MovieClip Frame 1
stop();
Symbol 457 MovieClip Frame 1
stop();
Symbol 464 MovieClip Frame 1
stop();
delete this.onRelease;
Symbol 464 MovieClip Frame 3
stop();
this.onRelease = function () {
_parent.gotoAndStop("upgrade");
};
Symbol 470 MovieClip Frame 1
stop();
Symbol 474 MovieClip Frame 1
stop();
this.onRelease = function () {
_root.game_mc.upgrade();
};
Symbol 479 MovieClip Frame 1
stop();
Symbol 482 MovieClip Frame 1
stop();
Symbol 484 MovieClip Frame 1
stop();
_parent._parent.upgradeTower(_parent._parent.selectedTower);
Instance of Symbol 470 MovieClip "SellButton" in Symbol 484 MovieClip Frame 1
onClipEvent (enterFrame) {
_parent._parent._parent.checkForSell();
if (_parent._parent._parent.canSell) {
gotoAndStop (1);
useHandCursor = true;
} else {
gotoAndStop (2);
useHandCursor = false;
}
}
on (press) {
if (_currentframe == 1) {
_parent.gotoAndStop("sell");
}
}
Instance of Symbol 474 MovieClip "close_btn" in Symbol 484 MovieClip Frame 1
on (release) {
_parent._parent._parent.inve_btn._visible = false;
_parent._parent._parent.inve_btn.useHandCursor = false;
_parent._parent._parent.isupgrade = false;
_parent._parent._parent.showHealth();
_parent._parent._parent.panel_mc.gotoAndStop(1);
_parent._parent._parent.isUpgradePanel = false;
_parent._parent.gotoAndStop("off");
}
Symbol 484 MovieClip Frame 2
_parent._parent.panel_mc.inve_alies._visible = true;
Instance of Symbol 348 MovieClip in Symbol 484 MovieClip Frame 2
onClipEvent (load) {
this.useHandCursor = false;
}
on (press) {
}
Instance of Symbol 479 MovieClip "yesButton" in Symbol 484 MovieClip Frame 2
on (press) {
_root.game_mc.sell();
}
Instance of Symbol 482 MovieClip "noButton" in Symbol 484 MovieClip Frame 2
on (press) {
_parent.gotoAndStop("panel");
}
Symbol 484 MovieClip Frame 3
_parent._parent.panel_mc.inve_alies._visible = true;
Instance of Symbol 479 MovieClip "yesButton" in Symbol 484 MovieClip Frame 3
on (press) {
_root.game_mc.upgrade();
_parent.gotoAndStop("panel");
}
Instance of Symbol 482 MovieClip "noButton" in Symbol 484 MovieClip Frame 3
on (press) {
_parent.gotoAndStop("panel");
}
Symbol 485 MovieClip Frame 1
stop();
Instance of Symbol 484 MovieClip "UpgradeTowerInfo" in Symbol 485 MovieClip Frame 5
/* no clip actions */
Symbol 492 MovieClip Frame 1
stop();
Symbol 500 MovieClip Frame 1
stop();
Symbol 500 MovieClip Frame 6
function resetText() {
var _local3 = 1;
while (_local3 <= totalDefender) {
_root.game_mc["defender" + _local3] = resetArr[_local3 - 1];
_root.game_mc["txtdef" + _local3].type = "dynamic";
_root.game_mc["txtdef" + _local3].selectable = false;
_root.game_mc["btn" + _local3].val = _local3;
_root.game_mc["btn" + _local3].onRelease = function () {
setText(this.val);
};
_local3++;
}
}
function setText(index) {
_root.game_mc["txtdef" + index].text = "";
_root.game_mc["txtdef" + index].type = "input";
_root.game_mc["txtdef" + index].selectable = true;
_root.game_mc["txtdef" + index].restrict = "A-Za-z0-9";
Selection.setFocus(_root.game_mc["txtdef" + index]);
}
function validateText() {
var _local3;
var _local2 = 1;
while (_local2 <= totalDefender) {
if (_root.game_mc["txtdef" + _local2].text.length == 0) {
_local3 = false;
break;
}
_local3 = true;
_local2++;
}
return(_local3);
}
stop();
var totalDefender = 6;
var resetArr = ["Artist", "Mathematician", "Musician", "Chemistry", "Physician", "Biology"];
start_btn.onRelease = function () {
if (validateText()) {
var _local2 = 1;
while (_local2 <= totalDefender) {
_root.game_mc["defender" + _local2] = _root.game_mc["txtdef" + _local2].text;
_local2++;
}
gotoAndStop ("game");
} else {
trace("ERROR ::");
}
};
default_btn.onRelease = function () {
resetText();
};
resetText();
Symbol 500 MovieClip Frame 7
var waves = [[15, 30, 2.5, 800, 10, 100], [15, 60, 2.5, 800, 11, 100], [15, 90, 2.5, 800, 12, 100], [15, 120, 2.5, 800, 13, 100], [15, 150, 2.5, 800, 14, 100], [15, 180, 3, 800, 15, 100], [15, 210, 3, 800, 16, 100], [15, 300, 3, 800, 17, 100], [15, 330, 3, 800, 18, 100], [5, 1000, 4, 800, 200, 1000], [15, 2100, 3.5, 800, 20, 200], [15, 2500, 3.5, 800, 25, 200], [15, 3000, 3.5, 800, 30, 200], [15, 3500, 3.5, 800, 35, 200], [15, 4500, 3.5, 800, 40, 200], [15, 5000, 3.5, 800, 45, 200], [15, 5500, 3.5, 800, 50, 200], [15, 6000, 3.5, 800, 55, 200], [15, 8000, 3.5, 800, 60, 200], [5, 20000, 4, 800, 500, 2000], [15, 2000, 3.5, 800, 20, 200], [15, 4000, 3.5, 800, 30, 200], [15, 6000, 3.5, 800, 40, 200], [15, 8000, 3.5, 800, 50, 200], [15, 10000, 3.5, 800, 60, 200], [15, 12000, 3.5, 800, 70, 200], [15, 14000, 3.5, 800, 80, 200], [15, 16000, 3.5, 800, 90, 200], [15, 18000, 3.5, 800, 100, 200], [5, 25000, 4, 800, 1000, 3000], [15, 25000, 3.5, 800, 30, 200], [15, 27000, 3.5, 800, 35, 200], [15, 29000, 3.5, 800, 40, 200], [15, 31000, 3.5, 800, 45, 200], [15, 33000, 3.5, 800, 50, 200], [15, 35000, 3.5, 800, 55, 200], [15, 37000, 3.5, 800, 60, 200], [15, 39000, 3.5, 800, 65, 200], [15, 41000, 3.5, 800, 70, 200], [5, 100000, 4.5, 800, 2000, 4000], [15, 50000, 4, 800, 45, 200], [15, 60000, 4, 800, 50, 200], [15, 70000, 4, 800, 55, 200], [15, 80000, 4, 800, 60, 200], [15, 90000, 4, 800, 65, 200], [15, 100000, 4, 800, 70, 200], [15, 110000, 4, 800, 75, 200], [15, 120000, 4, 800, 80, 200], [15, 130000, 4, 800, 85, 200], [5, 400000, 5, 800, 2500, 5000], [15, 500000, 4, 800, 100, 200], [15, 600000, 4, 800, 110, 200], [15, 700000, 4, 800, 120, 200], [15, 800000, 4, 800, 130, 200], [15, 900000, 4, 800, 140, 200], [15, 1000000, 4, 800, 150, 200], [15, 1100000, 4, 800, 160, 200], [15, 1200000, 4, 800, 170, 200], [15, 1300000, 4, 800, 180, 200], [5, 2000000, 5, 1000, 3000, 6000]];
var tile_arr = [[0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1], [0, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0], [0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1, 1, 0], [0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0], [0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0], [0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0], [0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0], [0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
var damage_arr = [[0, -0.3, -0.1, -0.3, -0.3, -0.5], [-0.3, 0, -0.3, -0.1, -0.3, -0.3], [-0.1, -0.3, 0, -0.3, -0.1, -0.3], [-0.3, -0.1, -0.3, 0, -0.3, -0.1], [-0.3, -0.3, -0.1, -0.3, 0, -0.3], [-0.5, -0.3, -0.3, -0.1, -0.3, 0]];
var damagedesc_arr = [["+100% damage on Art Equipments.\r+50% damage on Biology Equipments.\r-30% damage on Music Equipments.\r-10% damage on Mathematics Equipments.", "+10% damage on Art Equipments", "+10% damage on Art Equipments", "+10 % damage on Art Equipments", "+10 % damage on Art Equipments", "+10 % damage on Art Equipments"], ["+10% damage on Mathematics Equipments", "+100% damage on Mathematics Equipments.\r+50% damage on Physics Equipments.\r+30% damage on Biology Equipments.\r-10% damage on Music Equipments.", "+10% damage on Mathematics Equipments", "+30 % damage on Mathematics Equipments", "+15 % damage on Mathematics Equipments", "+10 % damage on Mathematics Equipments"], ["+30% damage on Music Equipments", "+10% damage on Music Equipments", "+100% damage on Music Equipments.\r+50% damage on Art Equipments.\r-30% damage on Mathematics Equipments.\r-10% damage on Chemistry Equipments.", "+10 % damage on Music Equipments", "+10 % damage on Music Equipments", "+10 % damage on Music Equipments"], ["+10% damage on Chemistry Equipments", "+10% damage on Chemistry Equipments", "+10 % damage on Chemistry Equipments", "+100% damage on Chemistry Equipments.\r+50% damage on Physics Equipments\r-30% damage on Art Equipments.\r-10% damage on Music Equipments.", "+30 % damage on Chemistry Equipments", "+10 % damage on Chemistry Equipments"], ["+10% damage on Physics Equipments", "+30% damage on Physics Equipments", "+100 % damage on Physics Equipments", "+10 % damage on Physics Equipments", "+100% damage on Physics Equipments.\r+50% damage on Mathematics Equipments.\r-30% damage on Chemistry Equipments.\r-10% damage on Biology Equipments.", "+10 % damage on Physics Equipments"], ["+10% damage on Biology Equipments", "+10% damage on Biology Equipments", "+10 % damage on Biology Equipments", "+30 % damage on Biology Equipments", "+15 % damage on Biology Equipments", "+ 100 % damage on Biology Equipments.\r+50% damage on Chemistry Equipments.\r+30% damage on Physics Equipments.\r-30% damage on Art Equipments.\r-30% damage on Music Equipments."]];
var alies_arr = ["eraser", "calc", "stick", "table", "magnet", "microscope"];
function setTile() {
panel_mc.next_wave.enabled = true;
panel_mc.next_dummy._visible = false;
panel_mc.pause_btn._visible = false;
panel_mc.pause_btn.gotoAndStop(1);
panel_mc.next_wave.gotoAndStop("on");
panel_mc.delete_btn.gotoAndStop("off");
panel_mc.detete_btn.useHandCursor = false;
panel_mc.delete_btn.enabled = false;
enemy_count = waves[wave][0];
enemy_health = waves[wave][1];
enemy_money = waves[wave][4];
enemy_health_next = waves[wave + 1][1] || "";
enemy_money_next = waves[wave + 1][4] || "";
panel_mc.info_message.creep_current.gotoAndStop(wave + 1);
if (wave < 59) {
panel_mc.info_message.creep_next.gotoAndStop(wave + 2);
} else {
panel_mc.info_message.creep_next._visible = false;
}
var i = 0;
while (i < 18) {
var wp = eval ("wp" + i);
wp._alpha = 0;
i++;
}
var r = 0;
while (r < 11) {
var c = 0;
while (c < 17) {
depth++;
var tiles = tile_mc.attachMovie("tile", (("tile_" + r) + "_") + c, depth);
tiles._x = 45 + (c * tileW);
tiles._y = 45 + (r * tileH);
tiles.locked = tile_arr[r][c];
tiles.occupied = false;
tiles.useHandCursor = false;
tiles.onRollOver = function () {
if (marker.active == 1) {
if (this.locked == 1) {
marker.hitTestOnGrassMovieClip = false;
} else {
marker.hitTestOnGrassMovieClip = true;
}
marker._x = this._x;
marker._y = this._y;
}
};
c++;
}
r++;
}
initialDisable();
}
function regenerateTiles(r, c) {
var tiles = eval ((("tile_mc.tile_" + r) + "_") + c);
trace("tiles *** " + tiles);
tiles.locked = 1;
tiles.occupied = true;
marker.hitTestOnGrassMovieClip = false;
trace("tile locked = " + tiles.locked);
}
function checkForTarget() {
var r = 0;
while (r < 11) {
var c = 0;
while (c < 17) {
var tiles = eval ((("tile_mc.tile_" + r) + "_") + c);
if (tiles.occupied) {
isTowerAvail = true;
return(undefined);
}
c++;
}
r++;
}
isTowerAvail = false;
}
function checkForSell() {
trace("inside checkForSell");
counter = 0;
var r = 0;
while (r < 11) {
var c = 0;
while (c < 17) {
var tiles = eval ((("tile_mc.tile_" + r) + "_") + c);
if (tiles.occupied) {
trace("counter = " + counter);
counter++;
}
c++;
}
r++;
}
if (counter > 1) {
trace("more than one found");
canSell = true;
trace(canSell);
return(undefined);
}
canSell = false;
trace(canSell);
}
function unlockTiles(r, c) {
var tiles = eval ((("tile_mc.tile_" + r) + "_") + c);
tiles.locked = 0;
tiles.occupied = false;
marker.hitTestOnGrassMovieClip = true;
}
function towerInfo(tower) {
selectedTower = tower;
ranger._x = tower._x;
ranger._y = tower._y;
ranger._width = tower.range;
ranger._height = tower.range;
deselect._visible = true;
panel_mc.info_message.gotoAndStop("health");
isupgrade = false;
UpgradeTowerInfo._visible = true;
}
function setAlise(tower) {
var i = 0;
while (i < alies_arr.length) {
if (gold < 2500) {
if (tower[alies_arr[i]]) {
eval (alies_arr[i])._visible = true;
tower["alies_" + alies_arr[i]].useHandCursor = false;
eval (alies_arr[i]).useHandCursor = false;
} else {
eval (alies_arr[i])._visible = false;
}
}
i++;
}
}
function upgradeTower(tower) {
if (isUpgradePanel) {
tower_property._x = tower._x;
tower_property._y = tower._y;
panel_mc.gotoAndStop(2);
inve_btn._visible = true;
inve_btn.useHandCursor = false;
if (tower._x > (dummy_tile._width / 2)) {
tower_property._x = tower_property._x - (tower_property._width + 50);
if (tower_property._x < dummy_tile._x) {
tower_property._x = tower_property._x + 20;
}
}
if (tower._y > (dummy_tile._height / 2)) {
tower_property._y = tower_property._y - tower_property._height;
if (tower_property._y < dummy_tile._y) {
tower_property._y = tower_property._y + 20;
}
}
panel_mc.inve_alies._visible = true;
var i = 0;
while (i < 6) {
var inve = eval ("panel_mc.inve" + i);
inve._visible = true;
i++;
}
if (gold >= 1500) {
var i = 0;
while (i < 6) {
var inve = eval ("panel_mc.inve" + i);
inve._visible = false;
i++;
}
panel_mc.inve_alies._visible = false;
}
var i = 0;
while (i < alies_arr.length) {
var alies = alies_arr[i];
if (tower[alies]) {
current_alies = eval ("panel_mc.alies_" + alies);
if (gold >= 1500) {
panel_mc.inve_alies._visible = true;
var i = 0;
while (i < 6) {
var inve = eval ("panel_mc.inve" + i);
inve._visible = true;
i++;
}
}
tower_property.UpgradeTowerInfo.allies_name.text = current_alies.nameVal;
tower_property.UpgradeTowerInfo.alies_mc.gotoAndStop(current_alies.key + 1);
break;
}
tower_property.UpgradeTowerInfo.allies_name.text = "Currently no upgrades";
current_alies = undefined;
i++;
}
isupgrade = true;
ranger._x = tower._x;
ranger._y = tower._y;
ranger._width = tower.range;
ranger._height = tower.range;
deselect._visible = true;
selectedTower = tower;
trace("tower === " + selectedTower);
tower_property.UpgradeTowerInfo.tower_name.text = (tower.name + "\rLevel") + tower.level;
tower_property.UpgradeTowerInfo.sell_txt.text = "$ " + tower.sell_price;
tower_property.UpgradeTowerInfo.defender_mc.gotoAndStop(tower.key);
if (current_alies.aliesinfo != undefined) {
tower_property.UpgradeTowerInfo.AliesInfoText.text = "";
} else {
tower_property.UpgradeTowerInfo.AliesInfoText.text = "Currently no Power-ups";
}
tower_property.UpgradeTowerInfo.UpgradeButton.gotoAndStop("deactive");
tower_property.UpgradeTowerInfo._visible = true;
if (tower.upgrades.length > tower.level) {
tower_property.UpgradeTowerInfo.UpgradeInfoText.text = tower.upgrades[tower.level - 1][0];
tower_property.UpgradeTowerInfo.TowerInfoText.text = tower.current[tower.level - 1][0];
tower_property.UpgradeTowerInfo.UpgradeButton.UpgradeButtonText.text = ("Upgrade [$" + tower.upgrades[tower.level - 1][1]) + "]";
tower_property.UpgradeTowerInfo.upgrade_price.text = "$ " + tower.upgrades[tower.level - 1][1];
tower_property.UpgradeTowerInfo.UpgradeButton._visible = true;
} else {
tower_property.UpgradeTowerInfo.UpgradeInfoText.text = tower.upgrades[tower.level - 1][0];
tower_property.UpgradeTowerInfo.TowerInfoText.text = tower.current[tower.level - 1][0];
tower_property.UpgradeTowerInfo.UpgradeButton.UpgradeButtonText.text = "Maximum";
tower_property.UpgradeTowerInfo.upgrade_price.text = "Maximum";
tower_property.UpgradeTowerInfo.UpgradeButton.gotoAndStop("deactive");
}
if ((tower.upgrades[tower.level - 1][1] <= gold) && (tower.level < 3)) {
tower_property.UpgradeTowerInfo.UpgradeButton.gotoAndStop("active");
} else {
tower_property.UpgradeTowerInfo.UpgradeButton.gotoAndStop("deactive");
}
}
}
function initialDisable() {
isbusy = false;
deselect._visible = true;
panel_mc.pause_btn._visible = false;
if (isauto) {
panel_mc.auto_spawn.gotoAndStop(2);
}
panel_mc.auto_spawn.enabled = false;
panel_mc.next_wave.enabled = false;
panel_mc.next_dummy._visible = true;
panel_mc.next_wave.gotoAndStop("off");
}
function initialEnable() {
isbusy = false;
deselect._visible = false;
panel_mc.pause_btn._visible = true;
if (isauto) {
panel_mc.auto_spawn.gotoAndStop(2);
}
panel_mc.auto_spawn.enabled = true;
panel_mc.next_wave.enabled = true;
panel_mc.next_dummy._visible = false;
panel_mc.next_wave.gotoAndStop("on");
}
function newLevel() {
isbusy = true;
strStatus = "play";
deselect._visible = false;
panel_mc.pause_btn._visible = true;
if (isauto) {
panel_mc.auto_spawn.gotoAndStop(2);
}
panel_mc.pause_btn.gotoAndStop(1);
panel_mc.pause_btn._visible = true;
panel_mc.pause_btn.enabled = true;
panel_mc.next_wave.enabled = false;
panel_mc.next_dummy._visible = true;
panel_mc.next_wave.gotoAndStop("off");
wave++;
if (wave > waves.length) {
resetDepth();
game_status("game_completed");
return(undefined);
}
money = gold;
creepCount = 0;
particleCount = 0;
explosionCount = 0;
creepArray = [];
enemy_count = waves[wave - 1][0];
enemy_health = waves[wave - 1][1];
enemy_money = waves[wave - 1][4];
enemy_health_next = waves[wave][1] || "";
enemy_money_next = waves[wave][4] || "";
panel_mc.info_message.creep_current.gotoAndStop(wave);
panel_mc.info_message.creep_next.gotoAndStop(wave + 1);
inGameMessage(((("<b>Start Wave: " + wave) + " - Enemy Health: ") + waves[wave - 1][1]) + " </b>");
spawnInterval = setInterval(spawn, waves[wave - 1][3], wave, "creep1", waves[wave - 1][2], enemy_health, enemy_money);
spawned = waves[wave - 1][0];
}
function spawn(level, creep, speed, health, gold) {
if (spawned == 0) {
panel_mc.pause_btn._visible = true;
clearInterval(spawnInterval);
} else {
if (strStatus == "play") {
spawned--;
creepCount++;
creep1.duplicateMovieClip("c" + creepCount, 100 + creepCount);
c = eval ("c" + creepCount);
creepArray[creepArray.length] = c;
c.creep.gotoAndStop(wave);
c._x = wp1._x;
c._y = wp1._y;
c.speed = speed;
c.maxspeed = speed;
c.targ = 2;
c.rnd = 0;
c.health = health;
c.maxHealth = health;
c.isDead = 0;
c.gold = gold;
}
c.onEnterFrame = function () {
if (strStatus == "play") {
if (this.targ == 2) {
this._visible = true;
}
if (this.health <= 0) {
kill(this);
}
if (this.speed < this.maxspeed) {
this.speed = this.speed + 0.1;
}
this.targX = eval ("wp" + this.targ)._x;
this.targY = eval ("wp" + this.targ)._y;
this.dir = (Math.atan2(this.targY - this._y, this.targX - this._x) * 180) / 3.141593;
this.rads = (this.dir * 3.141593) / 180;
this._x = this._x + (Math.cos(this.rads) * this.speed);
this._y = this._y + (Math.sin(this.rads) * this.speed);
d = Math.sqrt(Math.pow(this._x - this.targX, 2) + Math.pow(this._y - this.targY, 2));
if (d <= 5) {
this.x = this.targX;
this.y = this.targY;
this.targ++;
if (this.targ > 17) {
this._visible = false;
}
if (this.targ == 18) {
sound_creep_out.gotoAndPlay(2);
bag.gotoAndPlay(2);
health_amount = health_amount - life;
if (health_amount <= 0) {
health_amount = 0;
}
}
if (this.targ > 18) {
leak(this);
}
}
this.health_bar.health._width = (30 / this.maxHealth) * this.health;
this.health_bar._visible = true;
}
};
}
}
function Explosion(type, x, y) {
var explosen_type = eval (type + "_powder");
i = 1;
while (i <= 10) {
explosionCount++;
duplicateMovieClip (explosen_type, "powder" + explosionCount, 4900 + explosionCount);
a = eval ("powder" + explosionCount);
a._x = x;
a._y = y;
a.rads = random(360);
a.speed = (5 + random(20)) / 5;
a._rotation = a.rads;
a.onEnterFrame = function () {
this._x = this._x + (Math.cos(this.rads) * this.speed);
this._y = this._y + (Math.sin(this.rads) * this.speed);
this._alpha = this._alpha - 5;
if (this.speed > 0.5) {
this.speed = this.speed - 0.5;
}
if (this._alpha <= 0) {
this.removeMovieClip();
delete this.onEnterFrame;
}
};
i++;
}
if (_root.explosionCount > 100) {
_root.explosionCount = 0;
}
}
function attackRate(current_attacker) {
var key_val = 1;
var perc = 0;
var i = 0;
while (i < alies_arr.length) {
var alies = alies_arr[i];
var alies_key = eval ("panel_mc.alies_" + alies);
if (current_attacker[alies]) {
key_val = current_attacker.key - alies_key.key;
}
i++;
}
trace("currentAttacker = " + current_attacker);
if (((((current_attacker.eraser or current_attacker.calc) or current_attacker.stick) or current_attacker.table) or current_attacker.magnet) or current_attacker.microscope) {
if (key_val == 0) {
if (current_attacker.eraser) {
perc = current_attacker.damage * 2;
}
if (current_attacker.calc) {
perc = current_attacker.damage * 2;
}
if (current_attacker.stick) {
perc = current_attacker.damage * 2;
}
if (current_attacker.table) {
perc = current_attacker.damage * 2;
}
if (current_attacker.magnet) {
perc = current_attacker.damage * 2;
}
if (current_attacker.microscope) {
perc = current_attacker.damage * 2;
}
} else {
perc = current_attacker.damage * 1.5;
}
} else {
perc = current_attacker.damage;
}
trace("perc = " + perc);
current_attacker.temp_damage = perc;
}
function fire(from, to, speed, acc, maxspeed, project, damage, splash, slow) {
var projectile = eval (project);
particleCount++;
projectile.duplicateMovieClip("p" + particleCount, 700 + particleCount);
r = eval ("p" + particleCount);
r._visible = false;
dir = (Math.atan2(from._y - to._y, from._x - to._x) * 180) / 3.141593;
rads = (dir * 3.141593) / 180;
r._x = from._x;
r._y = from._y;
r._x = r._x - (Math.cos(rads) * (from._width / 2));
r._y = r._y - (Math.sin(rads) * (from._height / 2));
r.targ = to;
if (("" + to) == "") {
r.removeMovieClip();
}
r.speed = speed;
r.acc = acc;
r.maxspeed = maxspeed;
r.projectile = projectile;
r.damage = damage;
r.splash = splash;
r.slow = slow;
r._rotation = r.targ.rot;
if (r.targ.targ == 18) {
r.targ._x = wp18._x;
}
r.onEnterFrame = function () {
if (("" + this.targ) != "") {
this.targX = this.targ._x;
this.targY = this.targ._y;
} else if (("" + this.targX) == "undefined") {
this.removeMovieClip();
}
this.dir = (Math.atan2(this.targY - this._y, this.targX - this._x) * 180) / 3.141593;
this._rotation = this.dir + 90;
this._visible = true;
this.rads = (this.dir * 3.141593) / 180;
this._x = this._x + (Math.cos(this.rads) * this.speed);
this._y = this._y + (Math.sin(this.rads) * this.speed);
if ((this.targY < 0) || (this.targX > 700)) {
trace("removed left");
this.removeMovieClip();
}
if (this.speed < this.maxspeed) {
this.speed = this.speed + this.acc;
}
d = Math.sqrt(Math.pow(this._x - this.targX, 2) + Math.pow(this._y - this.targY, 2));
if (d < 10) {
if (targ.isDead != 1) {
Explosion(projectile, this._x, this._y);
if (this.slow > 0) {
this.targ.speed = (this.targ.maxspeed / 100) * (100 - this.slow);
}
if (this.splash > 0) {
i = 0;
while (i <= creepArray.length) {
if ((("" + creepArray[i]) != "") && (creepArray[i] != this.targ)) {
d = Math.sqrt(Math.pow(this._x - creepArray[i]._x, 2) + Math.pow(this._y - creepArray[i]._y, 2));
if (d < this.splash) {
creepArray[i].health = creepArray[i].health - (this.damage * (1 - (d / this.splash)));
if (this.slow > 0) {
creepArray[i].speed = (creepArray[i].maxspeed / 100) * (100 - this.slow);
}
}
}
i++;
}
}
attackRate(from);
this.targ.health = this.targ.health - from.temp_damage;
trace("health = " + this.targ.health);
if (targ.health <= 0) {
targ.health = 0;
targ.isDead = 1;
}
this.removeMovieClip();
}
}
if ((dist < 0) && (dist > -20)) {
this.removeMovieClip();
}
if (particleCount > 50) {
particleCount = 0;
}
};
}
function kill(creep) {
kills++;
enemy_count--;
if (kills >= waves[wave - 1][0]) {
kills = 0;
isbusy = false;
if (!isauto) {
if (wave > (waves.length - 1)) {
resetDepth();
game_status("game_completed");
return(undefined);
}
panel_mc.next_wave.enabled = true;
panel_mc.next_dummy._visible = false;
panel_mc.next_wave.gotoAndStop("on");
enemy_health = waves[wave][1];
enemy_money = waves[wave][4];
enemy_health_next = waves[wave + 1][1] || "";
enemy_money_next = waves[wave + 1][4] || "";
panel_mc.info_message.creep_current.gotoAndStop(wave + 1);
panel_mc.info_message.creep_next.gotoAndStop(wave + 2);
} else {
if (wave > (waves.length - 1)) {
resetDepth();
game_status("game_completed");
return(undefined);
}
clearInterval(spawnInterval);
newLevel();
}
}
creep.onEnterFrame = function () {
gold = gold + creep.gold;
updateInfoBar();
sound_kill.gotoAndPlay(2);
this.removeMovieClip();
};
}
function leak(creep) {
creepLeaks++;
creep._x = wp0._x;
creep._y = wp0._y;
creep.targ = 1;
}
function sell() {
a = selectedTower;
b = a.level - 1;
var _local1 = Math.floor(a._x / 40) - 1;
var _local2 = Math.floor(a._y / 40) - 1;
unlockTiles(_local2, _local1);
trace("sell price = " + a.sell_price);
gold = gold + a.sell_price;
isupgrade = false;
inve_btn._visible = false;
inve_btn.useHandCursor = false;
isUpgradePanel = false;
updateInfoBar("sell");
showHealth(a);
tower_property.gotoAndStop("off");
removeMovieClip(a);
checkForTarget();
trace("isTower = " + isTowerAvail);
if (!isTowerAvail) {
if (gold <= 50) {
resetDepth();
game_status("game_over");
}
}
}
function upgrade() {
a = selectedTower;
b = a.level - 1;
if (int(a.upgrades[b][1]) <= gold) {
a.damage = int(a.upgrades[b][2]);
a.temp_damage = int(a.upgrades[b][2]);
a.range = a.upgrades[b][3];
a.rate = a.upgrades[b][4];
a.sell_price = a.upgrades[b][5];
a.cost = a.upgrades[b][1];
a.chalk_color = a.upgrades[b][6];
a.level++;
tower_property.UpgradeTowerInfo.tower_name.text = (a.name + "\rLevel") + a.level;
towerInfo(selectedTower);
gold = gold - int(a.upgrades[b][1]);
updateInfoBar();
showHealth();
tower_property.UpgradeTowerInfo.UpgradeButton.gotoAndStop("deactive");
upgradeTower(a);
}
}
function updateInfoBar(str) {
if ((str != "defender") and (str != "sell")) {
game_score = game_score + Number(waves[wave - 1][5]);
if ((game_score <= 0) or isNaN(game_score)) {
game_score = 0;
}
}
upgradeTower(selectedTower);
trace("gold = " + gold);
money = gold;
if (str == "sell") {
isupgrade = false;
}
}
function inGameMessage(n) {
ingame_message.htmlText = (n + "<br>") + ingame_message.htmlText;
ingame_message.vPosition = ingame_message.maxVPosition;
}
function showInfo(str) {
if (str != undefined) {
panel_mc.info_message.gotoAndStop("status");
panel_mc.info_message.game_status.text = str;
} else {
panel_mc.info_message.game_status.text = "";
panel_mc.info_message.gotoAndStop("health");
}
}
function showHealth() {
if (!isupgrade) {
marker._x = 1000;
selectedTower = "";
ranger._x = 1000;
ranger._width = 10;
ranger._height = 10;
deselect._visible = false;
panel_mc.gotoAndStop(1);
panel_mc.inve_alies._visible = true;
panel_mc.info_message.gotoAndStop("health");
}
}
function gameTimer() {
if (strStatus == "play") {
game_time++;
}
if (health_amount <= 0) {
health_amount = 0;
resetDepth();
game_status("game_over");
}
}
function game_status(status) {
clearInterval(spawnInterval);
clearInterval(timeInterval);
var i = 0;
while (i <= towerCount) {
var tower = eval ("t" + i);
removeMovieClip(tower);
i++;
}
var i = 0;
while (i <= creepCount) {
var creep = eval ("c" + i);
removeMovieClip(creep);
i++;
}
game_score = ((money + (health_amount * 2)) + game_score) - game_time;
if ((game_score <= 0) or isNaN(game_score)) {
game_score = 0;
}
gotoAndStop(status);
}
function resetDepth() {
ranger.swapDepths(ranger.depth);
alies_marker.swapDepths(alies_marker.depth);
border_mc.swapDepths(border_mc.depth);
panel_mc.swapDepths(panel_mc.depth);
bag.swapDepths(bag.depth);
trans_layer.swapDepths(trans_layer.depth);
tower_property.swapDepths(tower_property.depth);
}
function removeTower() {
marker.active = 0;
marker._x = 1000;
selectedTower = "";
ranger._x = 1000;
ranger._width = 10;
ranger._height = 10;
deselect._visible = false;
panel_mc.info_message.gotoAndStop("health");
}
stop();
var wave = 0;
var level = 0;
var creepCount = 0;
var spawnInterval = 0;
var spawned = 0;
var life = 1;
var health_amount = 100;
var creepArray = [];
var towerCount = 0;
var selectedTower = "";
var explosionCount = 0;
var particleCount = 0;
var creepLeaks = 0;
var kills = 0;
var canSell = false;
var gold = 200;
var enemy_health = 0;
var enemy_count = 0;
var money = 200;
var game_score = 0;
var depth = 0;
var tileW = 40;
var tileH = 40;
var current_equip;
var game_time = 0;
var timeInterval = 0;
var isupgrade = false;
var isauto = false;
var isbusy = false;
var isTowerAvail = false;
var isUpgradePanel = false;
var current_alies;
var strStatus;
inve_btn._visible = false;
panel_mc.pause_btn._visible = false;
panel_mc.next_dummy._visible = true;
_root.attachedStatus = false;
panel_mc.next_wave.onRelease = function () {
newLevel();
active = 0;
marker._x = 1000;
selectedTower = "";
ranger._x = 1000;
ranger._width = 10;
ranger._height = 10;
deselect._visible = false;
};
panel_mc.delete_btn.onRelease = function () {
panel_mc.delete_btn.gotoAndStop("off");
panel_mc.detete_btn.useHandCursor = false;
panel_mc.delete_btn.enabled = false;
if (marker.active == 1) {
_root.attachedStatus = false;
removeTower();
}
if (alies_marker.active == 1) {
alies_marker.active = 0;
alies_marker._x = 1000;
}
};
panel_mc.auto_spawn.onRelease = function () {
if (isauto) {
this.gotoAndStop(1);
isauto = false;
} else {
this.gotoAndStop(2);
isauto = true;
}
if (!isbusy) {
newLevel();
}
};
panel_mc.pause_btn.onRelease = function () {
if (strStatus != undefined) {
if (strStatus == "play") {
strStatus = "pause";
stopAllSounds();
panel_mc.pause_btn.gotoAndStop(2);
trans_layer.gotoAndStop(2);
} else if (strStatus == "pause") {
strStatus = "play";
_root.playLevelSound();
panel_mc.pause_btn.gotoAndStop(1);
trans_layer.gotoAndStop(1);
}
}
};
deselect.onRelease = function () {
active = 0;
marker._x = 1000;
selectedTower = "";
ranger._x = 1000;
ranger._width = 10;
ranger._height = 10;
this._visible = false;
panel_mc.info_message.gotoAndStop("health");
};
var keyListener = new Object();
keyListener.onKeyDown = function () {
if (!(Key.getCode() === 32)) {
} else {
if (marker.active == 1) {
removeTower();
}
if (alies_marker.active == 1) {
alies_marker.active = 0;
alies_marker._x = 1000;
}
}
};
Key.addListener(keyListener);
timeInterval = setInterval(this, "gameTimer", 1000);
inGameMessage("-----");
setTile();
_root.playLevelSound();
Instance of Symbol 345 MovieClip "panel_mc" in Symbol 500 MovieClip Frame 7
onClipEvent (load) {
depth = this.getDepth();
this.swapDepths(52000);
}
Instance of Symbol 348 MovieClip in Symbol 500 MovieClip Frame 7
onClipEvent (load) {
this.useHandCursor = false;
}
on (rollOver) {
_parent.showInfo("No. of wave attacks completed.");
}
on (rollOut) {
_parent.showInfo();
}
Instance of Symbol 348 MovieClip in Symbol 500 MovieClip Frame 7
onClipEvent (load) {
this.useHandCursor = false;
}
on (rollOver) {
_parent.showInfo("Total time spent.");
}
on (rollOut) {
_parent.showInfo();
}
Instance of Symbol 348 MovieClip in Symbol 500 MovieClip Frame 7
onClipEvent (load) {
this.useHandCursor = false;
}
on (rollOver) {
_parent.showInfo("No. of incoming attackers.");
}
on (rollOut) {
_parent.showInfo();
}
Instance of Symbol 348 MovieClip in Symbol 500 MovieClip Frame 7
onClipEvent (load) {
this.useHandCursor = false;
}
on (rollOver) {
_parent.showInfo("Your health.");
}
on (rollOut) {
_parent.showInfo();
}
Instance of Symbol 348 MovieClip in Symbol 500 MovieClip Frame 7
onClipEvent (load) {
this.useHandCursor = false;
}
on (rollOver) {
_parent.showInfo("Total cash earned by you.");
}
on (rollOut) {
_parent.showInfo();
}
Instance of Symbol 348 MovieClip in Symbol 500 MovieClip Frame 7
onClipEvent (load) {
this.useHandCursor = false;
}
on (rollOver) {
_parent.showInfo("Your total score.");
}
on (rollOut) {
_parent.showInfo();
}
Instance of Symbol 417 MovieClip "border_mc" in Symbol 500 MovieClip Frame 7
onClipEvent (load) {
depth = this.getDepth();
this.swapDepths(53000);
}
Instance of Symbol 421 MovieClip in Symbol 500 MovieClip Frame 7
/* no clip actions */
Instance of Symbol 425 MovieClip "bag" in Symbol 500 MovieClip Frame 7
onClipEvent (load) {
depth = this.getDepth();
this.swapDepths(54000);
}
Instance of Symbol 429 MovieClip "marker" in Symbol 500 MovieClip Frame 7
onClipEvent (load) {
active = 0;
}
onClipEvent (enterFrame) {
if (active == 1) {
_parent.deselect._visible = false;
if (hitTestOnGrassMovieClip) {
gotoAndStop (1);
defender_mc.gotoAndStop(_parent["tower_" + tower].key);
_parent.ranger.gotoAndStop(1);
} else {
gotoAndStop (2);
_parent.ranger.gotoAndStop(2);
}
_parent.ranger._x = _x;
_parent.ranger._y = _y;
_parent.ranger._width = _parent["tower_" + tower].range;
_parent.ranger._height = _parent["tower_" + tower].range;
}
}
on (press) {
hitTestOnDeSelectMovieClip = _parent.deselect.hitTest(_x, _y, 1);
if (hitTestOnGrassMovieClip || (hitTestOnDeSelectMovieClip)) {
_parent.panel_mc.info_message.gotoAndStop("health");
if (hitTestOnGrassMovieClip) {
var c = (Math.floor(_x / 40) - 1);
var r = (Math.floor(_y / 40) - 1);
_parent.regenerateTiles(r, c);
_parent.towerCount++;
_parent.gold = _parent.gold - this.cost;
_parent.updateInfoBar("defender");
_parent["tower_" + tower].duplicateMovieClip("t" + _parent.towerCount, 500 + _parent.towerCount);
_parent.sound_drop_obj.gotoAndPlay(2);
if (a == undefined) {
_parent.checkForTarget();
if (_parent.isTowerAvail) {
_parent.initialEnable();
}
}
a = _parent["t" + _parent.towerCount];
a._x = _x;
a._y = _y;
a.active = 1;
_parent.deselect.useHandCursor = false;
}
active = 0;
_root.attachedStatus = false;
this._x = 1000;
_parent.panel_mc.delete_btn.gotoAndStop("off");
_parent.panel_mc.detete_btn.useHandCursor = false;
_parent.panel_mc.delete_btn.enabled = false;
_parent.selectedTower = "";
_parent.ranger._x = 1000;
_parent.ranger._width = 10;
_parent.ranger._height = 10;
_parent.isupgrade = false;
}
}
Instance of Symbol 432 MovieClip "ranger" in Symbol 500 MovieClip Frame 7
onClipEvent (load) {
depth = this.getDepth();
this.swapDepths(50000);
}
Instance of Symbol 217 MovieClip "tower_physics" in Symbol 500 MovieClip Frame 7
onClipEvent (load) {
name = _parent.defender5;
prop = "physics";
chalk_color = "white_chalk";
cost = 3200;
range = 200;
factor = 2.1;
rate = 4;
lastFire = rate;
lastChecked = rate;
creep = "";
target = 0;
show = 1750;
damage = 1750;
temp_damage = 1750;
splash = 0;
slow = 0;
level = 1;
key = 5;
sell_price = 1600;
eraser = false;
calc = false;
stick = false;
table = false;
magnet = false;
microscope = false;
alies_eraser_counter = 0;
alies_calc_counter = 0;
alies_stick_counter = 0;
alies_table_counter = 0;
alies_magnet_counter = 0;
alies_microscope_counter = 0;
title = ((name + " [Cost: $") + cost) + "]";
desc = "Best effective for Physics";
type = "Ground + Splash";
current = [["Damage: 1750\rRange: 200\rSpeed: 40", 5000, 1750, 170, 3, 2500], ["Damage: 5250\rRange: 220\rSpeed: 40", 8400, 5250, 170, 3, 4200], ["Damage: 15750\rRange: 250\rSpeed: 120"]];
upgrades = [["Damage: 5250\rRange: 220\rSpeed: 40", 6400, 5250, 220, 3, 3200, "yellow_chalk"], ["Damage: 15750\rRange: 250\rSpeed: 50", 9600, 15750, 250, 2, 9600, "red_chalk"], ["Maximum\rMaximum\rMaximum"]];
}
on (press) {
if (!_root.attachedStatus) {
if (!_parent.isupgrade) {
_parent.tower_property.gotoAndStop("on");
_parent.isUpgradePanel = true;
_parent.upgradeTower(this);
} else {
this.useHandCursor = false;
}
}
}
on (rollOver) {
if (!_parent.isupgrade) {
_parent.towerInfo(this);
title = "Physician \rCost: $" + cost;
_parent.panel_mc.info_message.title.text = _parent.tower_physics.title;
_parent.panel_mc.info_message.desc.text = _parent.tower_physics.desc;
_parent.panel_mc.info_message.type.text = _parent.tower_physics.type;
this.useHandCursor = true;
} else {
this.useHandCursor = false;
}
}
on (rollOut) {
if (!_parent.isupgrade) {
_parent.showHealth();
}
}
onClipEvent (enterFrame) {
if ((active == 1) && (_parent.creepArray.length > 0)) {
lastChecked++;
if (lastChecked >= rate) {
lastChecked = 0;
if (target == 0) {
i = 0;
while (i <= _parent.creepArray.length) {
d = Math.sqrt(Math.pow(this._x - _parent.creepArray[i]._x, 2) + Math.pow(this._y - _parent.creepArray[i]._y, 2));
if (d < (range - (range / factor))) {
target = 1;
creep = _parent.creepArray[i];
break;
}
i++;
}
} else if (("" + creep) == "") {
target = 0;
} else {
d = Math.sqrt(Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2));
if (d > (range - (range / factor))) {
lastChecked = 999;
target = 0;
} else if (_parent.strStatus == "play") {
_parent.fire(this, creep, 10, 1, 10, chalk_color, damage, splash, slow);
}
}
}
}
}
Instance of Symbol 219 MovieClip "tower_maths" in Symbol 500 MovieClip Frame 7
onClipEvent (load) {
name = _parent.defender2;
prop = "maths";
chalk_color = "white_chalk";
cost = 400;
range = 180;
factor = 2.1;
rate = 5;
lastFire = rate;
lastChecked = rate;
creep = "";
target = 0;
show = 50;
damage = 50;
temp_damage = 50;
splash = 0;
slow = 0;
level = 1;
key = 2;
sell_price = 200;
eraser = false;
calc = false;
stick = false;
table = false;
magnet = false;
microscope = false;
alies_eraser_counter = 0;
alies_calc_counter = 0;
alies_stick_counter = 0;
alies_table_counter = 0;
alies_magnet_counter = 0;
alies_microscope_counter = 0;
title = ((name + " [Cost: $") + cost) + "]";
desc = "Best effective for Math";
type = "Ground + Splash";
current = [["Damage: 50\rRange: 180\rSpeed: 30", 400, 50, 180, 5, 100], ["Damage: 150\rRange: 200\rSpeed: 35", 800, 80, 130, 4, 150], ["Damage: 750\rRange: 250\rSpeed: 40"]];
upgrades = [["Damage: 150\rRange: 200\rSpeed: 35", 800, 150, 200, 4, 600, "yellow_chalk"], ["Damage: 750\rRange: 250\rSpeed: 40", 1200, 750, 250, 3, 1200, "red_chalk"], ["Maximum\rMaximum\rMaximum"]];
}
on (press) {
if (!_root.attachedStatus) {
if (!_parent.isupgrade) {
_parent.tower_property.gotoAndStop("on");
_parent.isUpgradePanel = true;
_parent.upgradeTower(this);
} else {
this.useHandCursor = false;
}
}
}
on (rollOver) {
if (!_parent.isupgrade) {
_parent.towerInfo(this);
title = "Mathematician \rCost: $" + cost;
_parent.panel_mc.info_message.title.text = _parent.tower_maths.title;
_parent.panel_mc.info_message.desc.text = _parent.tower_maths.desc;
_parent.panel_mc.info_message.type.text = _parent.tower_maths.type;
this.useHandCursor = true;
} else {
this.useHandCursor = false;
}
}
on (rollOut) {
if (!_parent.isupgrade) {
_parent.showHealth();
}
}
onClipEvent (enterFrame) {
if ((active == 1) && (_parent.creepArray.length > 0)) {
lastChecked++;
if (lastChecked >= rate) {
lastChecked = 0;
if (target == 0) {
i = 0;
while (i <= _parent.creepArray.length) {
d = Math.sqrt(Math.pow(this._x - _parent.creepArray[i]._x, 2) + Math.pow(this._y - _parent.creepArray[i]._y, 2));
if (d < (range - (range / factor))) {
target = 1;
creep = _parent.creepArray[i];
break;
}
i++;
}
} else if (("" + creep) == "") {
target = 0;
} else {
d = Math.sqrt(Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2));
if (d > (range - (range / factor))) {
lastChecked = 999;
target = 0;
} else if (_parent.strStatus == "play") {
_parent.fire(this, creep, 10, 1, 10, chalk_color, damage, splash, slow);
}
}
}
}
}
Instance of Symbol 221 MovieClip "tower_music" in Symbol 500 MovieClip Frame 7
onClipEvent (load) {
name = _parent.defender3;
prop = "music";
chalk_color = "white_chalk";
cost = 800;
range = 180;
factor = 2.1;
rate = 5;
lastFire = rate;
lastChecked = rate;
creep = "";
target = 0;
show = 250;
damage = 250;
temp_damage = 250;
splash = 0;
slow = 0;
level = 1;
key = 3;
sell_price = 400;
eraser = false;
calc = false;
stick = false;
table = false;
magnet = false;
microscope = false;
alies_eraser_counter = 0;
alies_calc_counter = 0;
alies_stick_counter = 0;
alies_table_counter = 0;
alies_magnet_counter = 0;
alies_microscope_counter = 0;
title = ((name + " [Cost: $") + cost) + "]";
desc = " Best effective for Music";
type = "Ground + Splash";
current = [["Damage: 250\rRange: 180\rSpeed: 30", 2000, 250, 100, 5, 1000], ["Damage: 750\rRange: 200\rSpeed: 40", 3000, 750, 150, 3, 1500], ["Damage: 2250\rRange: 250\rSpeed: 90"]];
upgrades = [["Damage: 750\rRange: 200\rSpeed: 40", 1600, 750, 200, 3, 1200, "yellow_chalk"], ["Damage: 2250\rRange: 250\rSpeed: 50", 2400, 2250, 250, 2, 2400, "red_chalk"], ["Maximum\rMaximum\rMaximum"]];
}
on (press) {
if (!_root.attachedStatus) {
if (!_parent.isupgrade) {
_parent.tower_property.gotoAndStop("on");
_parent.isUpgradePanel = true;
_parent.upgradeTower(this);
} else {
this.useHandCursor = false;
}
}
}
on (rollOver) {
if (!_parent.isupgrade) {
_parent.towerInfo(this);
title = "Musician \rCost: $" + cost;
_parent.panel_mc.info_message.title.text = _parent.tower_music.title;
_parent.panel_mc.info_message.desc.text = _parent.tower_music.desc;
_parent.panel_mc.info_message.type.text = _parent.tower_music.type;
this.useHandCursor = true;
} else {
this.useHandCursor = false;
}
}
on (rollOut) {
if (!_parent.isupgrade) {
_parent.showHealth();
}
}
onClipEvent (enterFrame) {
if ((active == 1) && (_parent.creepArray.length > 0)) {
lastChecked++;
if (lastChecked >= rate) {
lastChecked = 0;
if (target == 0) {
i = 0;
while (i <= _parent.creepArray.length) {
d = Math.sqrt(Math.pow(this._x - _parent.creepArray[i]._x, 2) + Math.pow(this._y - _parent.creepArray[i]._y, 2));
if (d < (range - (range / factor))) {
target = 1;
creep = _parent.creepArray[i];
break;
}
i++;
}
} else if (("" + creep) == "") {
target = 0;
} else {
d = Math.sqrt(Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2));
if (d > (range - (range / factor))) {
lastChecked = 999;
target = 0;
} else if (_parent.strStatus == "play") {
_parent.fire(this, creep, 10, 1, 10, chalk_color, damage, splash, slow);
}
}
}
}
}
Instance of Symbol 135 MovieClip "tower_bio" in Symbol 500 MovieClip Frame 7
onClipEvent (load) {
name = _parent.defender6;
prop = "bio";
chalk_color = "white_chalk";
cost = 5000;
range = 200;
factor = 2.1;
rate = 3;
lastFire = rate;
lastChecked = rate;
creep = "";
target = 0;
show = 4000;
damage = 4000;
temp_damage = 4000;
splash = 0;
slow = 0;
level = 1;
key = 6;
sell_price = 2500;
eraser = false;
calc = false;
stick = false;
table = false;
magnet = false;
microscope = false;
alies_eraser_counter = 0;
alies_calc_counter = 0;
alies_stick_counter = 0;
alies_table_counter = 0;
alies_magnet_counter = 0;
alies_microscope_counter = 0;
title = ((name + " [Cost: $") + cost) + "]";
desc = "Best effective for Biology";
type = "Ground + Splash";
current = [["Damage: 4000\rRange: 200\rSpeed: 40", 8000, 4000, 200, 3, 4000], ["Damage: 12000\rRange: 250\rSpeed: 40", 9000, 12000, 250, 3, 4500], ["Damage: 36000\rRange: 300\rSpeed: 200"]];
upgrades = [["Damage: 12000\rRange: 250\rSpeed: 40", 10000, 12000, 250, 3, 5000, "yellow_chalk"], ["Damage: 36000\rRange: 300\rSpeed: 50", 15000, 36000, 300, 2, 15000, "red_chalk"], ["Maximum\rMaximum\rMaximum"]];
}
on (press) {
if (!_root.attachedStatus) {
if (!_parent.isupgrade) {
_parent.tower_property.gotoAndStop("on");
_parent.isUpgradePanel = true;
_parent.upgradeTower(this);
} else {
this.useHandCursor = false;
}
}
}
on (rollOver) {
if (!_parent.isupgrade) {
_parent.towerInfo(this);
title = "Biology \rCost: $" + cost;
_parent.panel_mc.info_message.title.text = _parent.tower_bio.title;
_parent.panel_mc.info_message.desc.text = _parent.tower_bio.desc;
_parent.panel_mc.info_message.type.text = _parent.tower_bio.type;
this.useHandCursor = true;
} else {
this.useHandCursor = false;
}
}
on (rollOut) {
if (!_parent.isupgrade) {
_parent.showHealth();
}
}
onClipEvent (enterFrame) {
if ((active == 1) && (_parent.creepArray.length > 0)) {
lastChecked++;
if (lastChecked >= rate) {
lastChecked = 0;
if (target == 0) {
i = 0;
while (i <= _parent.creepArray.length) {
d = Math.sqrt(Math.pow(this._x - _parent.creepArray[i]._x, 2) + Math.pow(this._y - _parent.creepArray[i]._y, 2));
if (d < (range - (range / factor))) {
target = 1;
creep = _parent.creepArray[i];
break;
}
i++;
}
} else if (("" + creep) == "") {
target = 0;
} else {
d = Math.sqrt(Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2));
if (d > (range - (range / factor))) {
lastChecked = 999;
target = 0;
} else if (_parent.strStatus == "play") {
_parent.fire(this, creep, 10, 1, 10, chalk_color, damage, splash, slow);
}
}
}
}
}
Instance of Symbol 133 MovieClip "tower_chemistry" in Symbol 500 MovieClip Frame 7
onClipEvent (load) {
name = _parent.defender4;
prop = "chemistry";
chalk_color = "white_chalk";
cost = 1600;
range = 220;
factor = 2.1;
rate = 4;
lastFire = rate;
lastChecked = rate;
creep = "";
target = 0;
show = 750;
damage = 750;
temp_damage = 750;
splash = 0;
slow = 0;
level = 1;
key = 4;
sell_price = 800;
eraser = false;
calc = false;
stick = false;
table = false;
magnet = false;
microscope = false;
alies_eraser_counter = 0;
alies_calc_counter = 0;
alies_stick_counter = 0;
alies_table_counter = 0;
alies_magnet_counter = 0;
alies_microscope_counter = 0;
title = ((name + " [Cost: $") + cost) + "]";
desc = "Best effective for Chemistry";
type = "Ground + Splash";
current = [["Damage: 750\rRange: 220\rSpeed: 35", 4000, 750, 220, 4, 2000], ["Damage: 2250\rRange: 250\rSpeed: 40", 6000, 2250, 250, 3, 3000], ["Damage: 6750\rRange: 300\rSpeed: 80"]];
upgrades = [["Damage: 2250\rRange: 250\rSpeed: 40", 3200, 2250, 250, 3, 2400, "yellow_chalk"], ["Damage: 6750\rRange: 300\rSpeed: 40", 4800, 6750, 300, 3, 4800, "red_chalk"], ["Maximum\rMaximum\rMaximum"]];
}
on (press) {
if (!_root.attachedStatus) {
if (!_parent.isupgrade) {
_parent.tower_property.gotoAndStop("on");
_parent.isUpgradePanel = true;
_parent.upgradeTower(this);
} else {
this.useHandCursor = false;
}
}
}
on (rollOver) {
if (!_parent.isupgrade) {
_parent.towerInfo(this);
title = "Chemistry \rCost: $" + cost;
_parent.panel_mc.info_message.title.text = _parent.tower_chemistry.title;
_parent.panel_mc.info_message.desc.text = _parent.tower_chemistry.desc;
_parent.panel_mc.info_message.type.text = _parent.tower_chemistry.type;
this.useHandCursor = true;
} else {
this.useHandCursor = false;
}
}
on (rollOut) {
if (!_parent.isupgrade) {
_parent.showHealth();
}
}
onClipEvent (enterFrame) {
if ((active == 1) && (_parent.creepArray.length > 0)) {
lastChecked++;
if (lastChecked >= rate) {
lastChecked = 0;
if (target == 0) {
i = 0;
while (i <= _parent.creepArray.length) {
d = Math.sqrt(Math.pow(this._x - _parent.creepArray[i]._x, 2) + Math.pow(this._y - _parent.creepArray[i]._y, 2));
if (d < (range - (range / factor))) {
target = 1;
creep = _parent.creepArray[i];
break;
}
i++;
}
} else if (("" + creep) == "") {
target = 0;
} else {
d = Math.sqrt(Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2));
if (d > (range - (range / factor))) {
lastChecked = 999;
target = 0;
} else if (_parent.strStatus == "play") {
_parent.fire(this, creep, 10, 1, 10, chalk_color, damage, splash, slow);
}
}
}
}
}
Instance of Symbol 131 MovieClip "tower_art" in Symbol 500 MovieClip Frame 7
onClipEvent (load) {
name = _parent.defender1;
prop = "art";
chalk_color = "white_chalk";
cost = 100;
range = 180;
factor = 2.1;
rate = 5;
lastFire = rate;
lastChecked = rate;
creep = "";
target = 0;
show = 10;
damage = 10;
temp_damage = 10;
splash = 0;
slow = 0;
level = 1;
key = 1;
sell_price = 50;
eraser = false;
calc = false;
stick = false;
table = false;
magnet = false;
microscope = false;
alies_eraser_counter = 0;
alies_calc_counter = 0;
alies_stick_counter = 0;
alies_table_counter = 0;
alies_magnet_counter = 0;
alies_microscope_counter = 0;
title = ((name + " [Cost: $") + cost) + "]";
desc = "Best effective for Art";
current = [["Damage: 10\rRange: 180\rSpeed: 30", 200, 20, 180, 5, 100], ["Damage: 30\rRange: 200\rSpeed: 40", 300, 50, 170, 3, 150], ["Damage: 120\rRange: 250\rSpeed: 50", 300, 50, 250, 2, 150]];
upgrades = [["Damage: 30\rRange: 200\rSpeed: 40", 200, 30, 200, 3, 150, "yellow_chalk"], ["Damage: 120\rRange: 250\rSpeed: 50", 300, 120, 250, 2, 300, "red_chalk"], ["Maximum\rMaximum\rMaximum"]];
}
on (press) {
if (!_root.attachedStatus) {
if (!_parent.isupgrade) {
_parent.tower_property.gotoAndStop("on");
_parent.isUpgradePanel = true;
_parent.upgradeTower(this);
} else {
this.useHandCursor = false;
}
}
}
on (rollOver) {
if (!_parent.isupgrade) {
_parent.towerInfo(this);
title = "Artist \rCost: " + cost;
_parent.panel_mc.info_message.title.text = _parent.tower_art.title;
_parent.panel_mc.info_message.damage.text = "Damage: " + _parent.tower_art.damage;
_parent.panel_mc.info_message.desc.text = "Description: " + _parent.tower_art.desc;
this.useHandCursor = true;
} else {
this.useHandCursor = false;
}
}
on (rollOut) {
if (!_parent.isupgrade) {
_parent.showHealth();
}
}
onClipEvent (enterFrame) {
if ((active == 1) && (_parent.creepArray.length > 0)) {
lastChecked++;
if (lastChecked >= rate) {
lastChecked = 0;
if (target == 0) {
i = 0;
while (i <= _parent.creepArray.length) {
d = Math.sqrt(Math.pow(this._x - _parent.creepArray[i]._x, 2) + Math.pow(this._y - _parent.creepArray[i]._y, 2));
if (d < (range - (range / factor))) {
target = 1;
creep = _parent.creepArray[i];
break;
}
i++;
}
} else if (("" + creep) == "") {
target = 0;
} else {
d = Math.sqrt(Math.pow(this._x - creep._x, 2) + Math.pow(this._y - creep._y, 2));
if (d > (range - (range / factor))) {
lastChecked = 999;
target = 0;
} else if (_parent.strStatus == "play") {
_parent.fire(this, creep, 10, 1, 10, chalk_color, damage, splash, slow);
}
}
}
}
}
Instance of Symbol 434 MovieClip "alies_marker" in Symbol 500 MovieClip Frame 7
onClipEvent (load) {
active = 0;
keyfrm = 0;
depth = this.getDepth();
this.swapDepths(55000);
}
onClipEvent (enterFrame) {
if (active == 1) {
if (_parent.tower_property.UpgradeTowerInfo.alies_place.hitTest(_x, _y, 1)) {
gotoAndStop (1);
this._alpha = 100;
_parent.tower_property.UpgradeTowerInfo.alies_place.gotoAndStop(2);
trace("keyfrm = " + keyfrm);
alies_mc.gotoAndStop(keyfrm);
} else {
alies_mc.gotoAndStop(keyfrm);
this._alpha = 80;
_parent.tower_property.UpgradeTowerInfo.alies_place.gotoAndStop(1);
gotoAndStop (2);
}
if ((((_parent._xmouse <= 25) || (_parent._xmouse >= 690)) || (_parent._ymouse <= 25)) || (_parent._ymouse >= 455)) {
} else {
this._x = _parent._xmouse;
this._y = _parent._ymouse;
this._visible = true;
}
}
}
on (press) {
hitTestOnpropertyMovieClip = _parent.tower_property.UpgradeTowerInfo.alies_place.hitTest(_x, _y, 1);
hitTestOnDeSelectMovieClip = _parent.grass.hitTest(_x, _y, 1);
if (hitTestOnpropertyMovieClip || (hitTestOnDeSelectMovieClip)) {
if (hitTestOnpropertyMovieClip) {
_parent.selectedTower[_parent.alies_arr[keyfrm - 1]] = true;
_parent.tower_property.UpgradeTowerInfo.alies_mc.gotoAndStop(keyfrm + 1);
_parent.gold = _parent.gold - 1500;
_parent.updateInfoBar(_parent.selectedTower);
_parent.upgradeTower(_parent.selectedTower);
}
_parent.panel_mc.delete_btn.gotoAndStop("off");
_parent.panel_mc.detete_btn.useHandCursor = false;
_parent.panel_mc.delete_btn.enabled = false;
active = 0;
this._x = 1000;
}
}
Instance of Symbol 485 MovieClip "tower_property" in Symbol 500 MovieClip Frame 7
onClipEvent (load) {
depth = this.getDepth();
this.swapDepths(51000);
}
Instance of Symbol 492 MovieClip "trans_layer" in Symbol 500 MovieClip Frame 7
onClipEvent (load) {
depth = this.getDepth();
this.swapDepths(56000);
}
onClipEvent (load) {
this.useHandCursor = false;
}
on (release) {
}
Symbol 500 MovieClip Frame 12
stop();
_root.playGameOverSound();
stop();
_root._doGameOver(game_score, "gameover", false, 3000);
Symbol 500 MovieClip Frame 21
stop();
_root._doGameOver(game_score, "gamecompleted", false, 3000);
_root.playIntroSound();