Frame 1
_global.link = "";
_global.sound = true;
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("2eeabe15", this, 10301, true);
stop();
if ((_url.indexOf("gamestudio.ro") == -1) && (_url.indexOf("flashgamelicense.com") == -1)) {
}
Instance of Symbol 242 MovieClip [preloaderShape_mc] in Frame 1
onClipEvent (load) {
total = _root.getBytesTotal();
}
onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
percent = int((loaded / total) * 100);
percen101 = ("" + percent) + "%";
gotoAndStop(percent);
if (loaded == total) {
_global.link = "splash2";
_root.faderMC.play();
}
}
Frame 17
mochi.MochiServices.connect("e56103134e5dae3b");
gotoAndStop ("menu");
Frame 25
stop();
_root.jukeBoxMC.playLoop("menu");
_global.points = 0;
_global.lives = 20;
_global.money = 50;
_global.playerName = "";
Frame 32
stop();
_root.menuLoop.stop();
this.onEnterFrame = function () {
money = _global.money;
lives = _global.lives;
points = _global.points;
};
Frame 40
stop();
_root.jukeBoxMC.playLoop("defeat");
sc = _global.points;
Frame 48
stop();
_root.jukeBoxMC.playLoop("victory");
sc = _global.points;
Frame 56
stop();
_root.jukeBoxMC.playLoop("menu");
mochi.MochiScores.showLeaderboard({boardID:"8e13fd11972c49bd", score:_global.points, name:_global.playerName, onClose:function () {
_root.submitLoop.stop();
_global.link = "menu";
_root.faderMC.play();
}});
Frame 64
stop();
_root.jukeBoxMC.playLoop("menu");
mochi.MochiScores.showLeaderboard({boardID:"8e13fd11972c49bd", onClose:function () {
_root.hsLoop.stop();
_global.link = "menu";
_root.faderMC.play();
}});
Symbol 65 MovieClip [battlegoreCreep] Frame 1
#initclip 24
Object.registerClass("battlegoreCreep", creepsMC);
#endinitclip
stop();
Symbol 65 MovieClip [battlegoreCreep] Frame 5
this._alpha = 80;
Symbol 65 MovieClip [battlegoreCreep] Frame 9
this._alpha = 60;
Symbol 65 MovieClip [battlegoreCreep] Frame 13
this._alpha = 40;
Symbol 65 MovieClip [battlegoreCreep] Frame 17
this._alpha = 20;
Symbol 65 MovieClip [battlegoreCreep] Frame 21
this._alpha = 1;
Symbol 65 MovieClip [battlegoreCreep] Frame 25
stop();
_parent._parent.removeCreepID(ID);
Symbol 65 MovieClip [battlegoreCreep] Frame 50
stop();
_parent._parent.addCreepBullet(this._x, this._y, damage, enemyTowerID);
_root.jukeBoxMC.playSound("creepShot");
shooting = false;
if (dead) {
this.gotoAndPlay("explode");
} else {
this.gotoAndStop(1);
}
Symbol 71 MovieClip [jukeboxMC] Frame 1
#initclip 16
Object.registerClass("jukeboxMC", jukeboxMC);
#endinitclip
Symbol 120 MovieClip Frame 90
stop();
this._visible = false;
this.gotoAndStop(1);
_parent._parent.upgrading = false;
Symbol 121 MovieClip Frame 1
stop();
Symbol 194 MovieClip Frame 36
stop();
_parent.gotoAndStop("die");
Symbol 195 MovieClip [tower6] Frame 1
#initclip 17
Object.registerClass("tower6", tower6);
#endinitclip
stop();
Symbol 195 MovieClip [tower6] Frame 5
stop();
Symbol 195 MovieClip [tower6] Frame 15
stop();
_parent._parent.removeTowerID(ID);
Symbol 199 MovieClip [tower5] Frame 1
#initclip 18
Object.registerClass("tower5", tower5);
#endinitclip
stop();
Symbol 199 MovieClip [tower5] Frame 5
stop();
Symbol 199 MovieClip [tower5] Frame 15
stop();
_parent._parent.removeTowerID(ID);
Symbol 203 MovieClip [tower4] Frame 1
#initclip 19
Object.registerClass("tower4", tower4);
#endinitclip
stop();
Symbol 203 MovieClip [tower4] Frame 5
stop();
Symbol 203 MovieClip [tower4] Frame 15
stop();
_parent._parent.removeTowerID(ID);
Symbol 207 MovieClip [tower3] Frame 1
#initclip 20
Object.registerClass("tower3", tower3);
#endinitclip
stop();
Symbol 207 MovieClip [tower3] Frame 5
stop();
Symbol 207 MovieClip [tower3] Frame 15
stop();
_parent._parent.removeTowerID(ID);
Symbol 211 MovieClip [tower2] Frame 1
#initclip 21
Object.registerClass("tower2", tower2);
#endinitclip
stop();
Symbol 211 MovieClip [tower2] Frame 5
stop();
Symbol 211 MovieClip [tower2] Frame 15
stop();
_parent._parent.removeTowerID(ID);
Symbol 230 MovieClip Frame 19
stop();
_parent.gotoAndStop("die");
Symbol 231 MovieClip [towerBulletMC] Frame 1
#initclip 22
Object.registerClass("towerBulletMC", towerBulletMC);
#endinitclip
stop();
Symbol 231 MovieClip [towerBulletMC] Frame 10
stop();
Symbol 231 MovieClip [towerBulletMC] Frame 20
stop();
_parent._parent.removeBulletID(ID);
Symbol 235 MovieClip [tower1] Frame 1
#initclip 23
Object.registerClass("tower1", tower1);
#endinitclip
stop();
Symbol 235 MovieClip [tower1] Frame 5
stop();
Symbol 235 MovieClip [tower1] Frame 15
stop();
_parent._parent.removeTowerID(ID);
Symbol 256 MovieClip Frame 1
stop();
Symbol 256 MovieClip Frame 16
_root.gotoAndStop(_global.link);
Symbol 809 MovieClip [__Packages.jukeboxMC] Frame 0
class jukeboxMC extends MovieClip
{
var sndArray;
function jukeboxMC () {
super();
}
function onLoad() {
sndArray = new Array();
sndArray[0] = new Sound();
sndArray[0].attachSound("canonShot");
sndArray[1] = new Sound();
sndArray[1].attachSound("creepShot");
sndArray[2] = new Sound();
sndArray[2].attachSound("noMoney");
sndArray[10] = new Sound();
sndArray[10].attachSound("towerExplode");
sndArray[10].setVolume(50);
sndArray[20] = new Sound();
sndArray[20].attachSound("ratDie");
sndArray[20].setVolume(150);
sndArray[21] = new Sound();
sndArray[21].attachSound("goblinDie");
sndArray[21].setVolume(150);
sndArray[22] = new Sound();
sndArray[22].attachSound("menDie");
sndArray[22].setVolume(150);
sndArray[23] = new Sound();
sndArray[23].attachSound("goblinArcherDie");
sndArray[23].setVolume(150);
sndArray[24] = new Sound();
sndArray[24].attachSound("demonDie");
sndArray[24].setVolume(150);
sndArray[25] = new Sound();
sndArray[25].attachSound("lionmenDie");
sndArray[25].setVolume(150);
sndArray[26] = new Sound();
sndArray[26].attachSound("lizardmenDie");
sndArray[26].setVolume(150);
sndArray[27] = new Sound();
sndArray[27].attachSound("trollDie");
sndArray[27].setVolume(150);
sndArray[28] = new Sound();
sndArray[28].attachSound("battlegoreDie");
sndArray[28].setVolume(150);
sndArray[29] = new Sound();
sndArray[29].attachSound("wizardDie");
sndArray[29].setVolume(150);
sndArray[30] = new Sound();
sndArray[30].attachSound("crystalShot");
sndArray[31] = new Sound();
sndArray[31].attachSound("fireShot");
sndArray[32] = new Sound();
sndArray[32].attachSound("tower5Shot");
sndArray[33] = new Sound();
sndArray[33].attachSound("tower6Shot");
sndArray[40] = new Sound();
sndArray[40].attachSound("voice1.wav");
sndArray[41] = new Sound();
sndArray[41].attachSound("voice2.wav");
sndArray[42] = new Sound();
sndArray[42].attachSound("voice3.wav");
sndArray[43] = new Sound();
sndArray[43].attachSound("voice4.wav");
sndArray[44] = new Sound();
sndArray[44].attachSound("voice5.wav");
sndArray[45] = new Sound();
sndArray[45].attachSound("voice6.wav");
sndArray[46] = new Sound();
sndArray[46].attachSound("voice7.wav");
sndArray[50] = new Sound();
sndArray[50].attachSound("Look_Out_2.wav");
sndArray[51] = new Sound();
sndArray[51].attachSound("drum.wav");
sndArray[52] = new Sound();
sndArray[52].attachSound("victory.wav");
sndArray[53] = new Sound();
sndArray[53].attachSound("defeat.wav");
}
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function playNextLevel() {
if (!_global.sound) {
return(undefined);
}
var _local3 = randRange(0, 6);
sndArray[40 + _local3].start();
}
function playDeamonDie(s) {
if (!_global.sound) {
return(undefined);
}
switch (s) {
case 0 :
sndArray[20].start();
break;
case 1 :
sndArray[21].start();
break;
case 2 :
sndArray[22].start();
break;
case 3 :
sndArray[23].start();
break;
case 4 :
sndArray[24].start();
break;
case 5 :
sndArray[25].start();
break;
case 6 :
sndArray[26].start();
break;
case 7 :
sndArray[27].start();
break;
case 8 :
sndArray[28].start();
break;
case 9 :
sndArray[29].start();
}
}
function playSound(sunet) {
if (!_global.sound) {
return(undefined);
}
switch (sunet) {
case "canonTowerShot" :
sndArray[0].start();
break;
case "noMoney" :
sndArray[2].start();
break;
case "crystalShot" :
sndArray[30].start();
break;
case "fireShot" :
sndArray[31].start();
break;
case "tower5Shot" :
sndArray[32].start();
break;
case "tower6Shot" :
sndArray[33].start();
break;
case "creepShot" :
sndArray[1].start();
break;
case "towerExplode" :
sndArray[10].start();
}
}
function stopSounds() {
sndArray[50].stop("Look_Out_2.wav");
sndArray[51].stop("drum.wav");
sndArray[52].stop("victory.wav");
sndArray[53].stop("defeat.wav");
}
function playLoop(str) {
if (!_global.sound) {
return(undefined);
}
sndArray[50].stop("Look_Out_2.wav");
sndArray[51].stop("drum.wav");
sndArray[52].stop("victory.wav");
sndArray[53].stop("defeat.wav");
switch (str) {
case "menu" :
sndArray[50].start(0, 10000);
break;
case "inGame" :
sndArray[51].start(0, 10000);
break;
case "victory" :
sndArray[52].start(0, 10000);
break;
case "defeat" :
sndArray[53].start(0, 10000);
}
}
}
Symbol 810 MovieClip [__Packages.tower6] Frame 0
class tower6 extends MovieClip
{
var hitMC, arrowMC, stat, _x, _y, lifeMC, rangeMC, speedUpgrade, speedUpgradeCost, speedLevel, damageUpgrade, damageUpgradeCost, damageLevel, rangeUpgrade, rangeUpgradeCost, rangeLevel, _xmouse, _ymouse, _parent, swapDepths, gotoAndStop, upgradeMC;
function tower6 () {
super();
}
function onLoad() {
var b = this;
hitMC._visible = false;
arrowMC._visible = false;
stat._visible = false;
if (_x < 400) {
stat._x = 35;
} else {
stat._x = -195;
}
if (_y < 270) {
stat._y = -40;
} else {
stat._y = -125;
}
if (((_y + stat._y) + stat._height) > 550) {
stat._y = (550 - _y) - stat._height;
}
if ((_y + stat._y) < 30) {
stat._y = 30 - _y;
}
if ((_y + lifeMC._y) < 30) {
lifeMC._y = 30 - _y;
}
rangeMC._visible = false;
b.stat.upgradeMC._visible = false;
b.stat.upgradeMC.gotoAndStop(1);
speedUpgrade = new Array();
speedUpgradeCost = new Array();
speedUpgrade = [2, 2, 3, 3];
speedUpgradeCost = [35, 65, 100, 100];
speedLevel = -1;
damageUpgrade = new Array();
damageUpgradeCost = new Array();
damageUpgrade = [50, 100, 180, 180];
damageUpgradeCost = [40, 75, 130, 130];
damageLevel = -1;
rangeUpgrade = new Array();
rangeUpgradeCost = new Array();
rangeUpgrade = [10, 20, 25, 25];
rangeUpgradeCost = [35, 65, 100, 100];
rangeLevel = -1;
var _local4 = new Object();
_local4.onKeyDown = function () {
if (Key.isDown(27)) {
trace("Escape pressed on Tower");
b.stat._visible = false;
b.rangeMC._visible = false;
}
};
Key.addListener(_local4);
stat.lifeUpgradeBt.onRelease = function () {
if (_global.money < Math.ceil(b.valor / 10)) {
return(undefined);
}
b.life = b.life + Math.ceil(b.maxLife / 10);
if (b.life > b.maxLife) {
b.life = b.maxLife;
}
_global.money = _global.money - Math.ceil(b.valor / 10);
b.updateStat();
};
stat.speedUpgradeBt.onRelease = function () {
if (_global.money < b.speedUpgradeCost[b.speedLevel + 1]) {
return(undefined);
}
b.speed = b.speed - b.speedUpgrade[b.speedLevel + 1];
_global.money = _global.money - b.speedUpgradeCost[b.speedLevel + 1];
b.valor = b.valor + b.speedUpgradeCost[b.speedLevel + 1];
b.speedLevel++;
b.updateStat();
b.upgrading = true;
b.stat.upgradeMC._visible = true;
b.stat.upgradeMC.play();
if (b.speedLevel > 1) {
this.enabled = false;
this._alpha = 70;
b.stat.speedUpgradeStat._alpha = 70;
b.stat.speedUpgradeCostStat._alpha = 70;
}
};
stat.damageUpgradeBt.onRelease = function () {
if (_global.money < b.damageUpgradeCost[b.damageLevel + 1]) {
return(undefined);
}
b.damage = b.damage + b.damageUpgrade[b.damageLevel + 1];
_global.money = _global.money - b.damageUpgradeCost[b.damageLevel + 1];
b.valor = b.valor + b.damageUpgradeCost[b.damageLevel + 1];
b.damageLevel++;
b.updateStat();
b.upgrading = true;
b.stat.upgradeMC._visible = true;
b.stat.upgradeMC.play();
if (b.damageLevel > 1) {
this.enabled = false;
this._alpha = 70;
b.stat.damageUpgradeStat._alpha = 70;
b.stat.damageUpgradeCostStat._alpha = 70;
}
};
stat.rangeUpgradeBt.onRelease = function () {
if (_global.money < b.rangeUpgradeCost[b.rangeLevel + 1]) {
return(undefined);
}
b.range = b.range + b.rangeUpgrade[b.rangeLevel + 1];
_global.money = _global.money - b.rangeUpgradeCost[b.rangeLevel + 1];
b.valor = b.valor + b.rangeUpgradeCost[b.rangeLevel + 1];
b.rangeLevel++;
b.updateStat();
b.drawRange();
b.upgrading = true;
b.stat.upgradeMC._visible = true;
b.stat.upgradeMC.play();
if (b.rangeLevel > 1) {
this.enabled = false;
this._alpha = 70;
b.stat.rangeUpgradeStat._alpha = 70;
b.stat.rangeUpgradeCostStat._alpha = 70;
}
};
stat.sellBt.onRelease = function () {
_global.money = _global.money + Math.floor((b.valor * 0.75) * (b.life / b.maxLife));
b.gotoAndStop("explode");
_root.jukeBoxMC.playSound("towerExplode");
b.dead = true;
};
updateStat();
}
function drawCircle(mc, x, y, r) {
mc.moveTo(x + r, y);
mc.curveTo(r + x, (0.414213562373095 * r) + y, (0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((0.414213562373095 * r) + x, r + y, x, r + y);
mc.curveTo((-0.414213562373095 * r) + x, r + y, (-0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((-r) + x, (0.414213562373095 * r) + y, (-r) + x, y);
mc.curveTo((-r) + x, (-0.414213562373095 * r) + y, (-0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo((-0.414213562373095 * r) + x, (-r) + y, x, (-r) + y);
mc.curveTo((0.414213562373095 * r) + x, (-r) + y, (0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo(r + x, (-0.414213562373095 * r) + y, r + x, y);
}
function drawRange() {
rangeMC.clear();
rangeMC.lineStyle(1, 3355443, 50, true, "none", "round", "miter", 1);
rangeMC.beginFill(15658734, 20);
drawCircle(rangeMC, 0, 0, range);
rangeMC.endFill();
}
function onMouseDown() {
var _local4 = false;
if ((((_xmouse > -20) && (_xmouse < 20)) && (_ymouse > -25)) && (_ymouse < 35)) {
var _local3 = 0;
while (_local3 < _parent._parent.nt) {
if (_parent._parent.towerVec[_local3].stat.hitTest(_root._xmouse, _root._ymouse, true) && (_parent._parent.towerVec[_local3].stat._visible)) {
_local4 = true;
}
_local3++;
}
if (!_local4) {
swapDepths(_parent.getNextHighestDepth());
drawRange();
updateStat();
rangeMC._visible = true;
stat._visible = true;
}
} else if (!stat.hitTest(_root._xmouse, _root._ymouse, true)) {
stat._visible = false;
rangeMC._visible = false;
}
}
function dist(x1, y1, x2, y2) {
return(Math.sqrt((Math.abs(x2 - x1) * Math.abs(x2 - x1)) + (Math.abs(y2 - y1) * Math.abs(y2 - y1))));
}
function updateStat() {
if (life == maxLife) {
stat.lifeUpgradeBt.enabled = false;
stat.lifeUpgradeBt._alpha = 70;
stat.lifeUpgradeStat._alpha = 70;
stat.lifeUpgradeCostStat._alpha = 70;
} else {
stat.lifeUpgradeBt.enabled = true;
stat.lifeUpgradeBt._alpha = 100;
stat.lifeUpgradeStat._alpha = 100;
stat.lifeUpgradeCostStat._alpha = 100;
}
stat.lifeStat.text = life;
stat.lifeUpgradeStat.text = "+" + String(Math.ceil(maxLife / 10));
stat.lifeUpgradeCostStat.text = String(Math.ceil(valor / 10)) + "G";
stat.speedUpgradeStat.text = "+" + String(Math.floor(maxLife / 10));
stat.speedUpgradeCostStat.text = 5;
stat.speedStat.text = 30 - speed;
stat.rangeStat.text = range;
stat.damageStat.text = damage;
stat.speedUpgradeStat.text = "+" + String(speedUpgrade[speedLevel + 1]);
stat.rangeUpgradeStat.text = "+" + String(rangeUpgrade[rangeLevel + 1]);
stat.damageUpgradeStat.text = "+" + String(damageUpgrade[damageLevel + 1]);
stat.speedUpgradeCostStat.text = String(speedUpgradeCost[speedLevel + 1]) + "G";
stat.rangeUpgradeCostStat.text = String(rangeUpgradeCost[rangeLevel + 1]) + "G";
stat.damageUpgradeCostStat.text = String(damageUpgradeCost[damageLevel + 1]) + "G";
stat.sellText.text = Math.floor((valor * 0.75) * (life / maxLife));
}
function hitFunction(d) {
life = life - d;
updateStat();
if ((life <= 0) && (!dead)) {
dead = true;
(gotoAndStop("explode"));// not popped
_root.jukeBoxMC.playSound("towerExplode");
}
}
function onEnterFrame() {
if (dead) {
return(undefined);
}
if (delay_interval < speed) {
delay_interval++;
}
if ((delay_interval >= speed) && (!upgrading)) {
var _local3 = 0;
while (_local3 < _parent._parent.nc) {
if ((dist(_x, _y, _parent._parent.creepVec[_local3]._x, _parent._parent.creepVec[_local3]._y) < range) && (_parent._parent.creepVec[_local3].life > 0)) {
delay_interval = 0;
_parent._parent.addTowerBullet(_x, _y, 6, damage, _parent._parent.creepVec[_local3].ID);
_root.jukeBoxMC.playSound("tower6Shot");
break;
}
_local3++;
}
}
lifeMC._width = (life * 30) / maxLife;
if (upgrading) {
upgradeMC._visible = true;
} else {
upgradeMC._visible = false;
}
}
var speed = 25;
var damage = 200;
var range = 100;
var life = 350;
var maxLife = 350;
var valor = 250;
var upgrading = false;
var delay_interval = 0;
var dead = false;
var arrowSpeedx = -1000;
var enemyI = -1;
}
Symbol 811 MovieClip [__Packages.tower5] Frame 0
class tower5 extends MovieClip
{
var hitMC, arrowMC, stat, _x, _y, lifeMC, rangeMC, speedUpgrade, speedUpgradeCost, speedLevel, damageUpgrade, damageUpgradeCost, damageLevel, rangeUpgrade, rangeUpgradeCost, rangeLevel, _xmouse, _ymouse, _parent, swapDepths, gotoAndStop, upgradeMC;
function tower5 () {
super();
}
function onLoad() {
var b = this;
hitMC._visible = false;
arrowMC._visible = false;
stat._visible = false;
if (_x < 400) {
stat._x = 35;
} else {
stat._x = -195;
}
if (_y < 270) {
stat._y = -40;
} else {
stat._y = -125;
}
if (((_y + stat._y) + stat._height) > 550) {
stat._y = (550 - _y) - stat._height;
}
if ((_y + stat._y) < 30) {
stat._y = 30 - _y;
}
if ((_y + lifeMC._y) < 30) {
lifeMC._y = 30 - _y;
}
rangeMC._visible = false;
b.stat.upgradeMC._visible = false;
b.stat.upgradeMC.gotoAndStop(1);
speedUpgrade = new Array();
speedUpgradeCost = new Array();
speedUpgrade = [2, 2, 4, 4];
speedUpgradeCost = [30, 55, 80, 80];
speedLevel = -1;
damageUpgrade = new Array();
damageUpgradeCost = new Array();
damageUpgrade = [30, 60, 100, 100];
damageUpgradeCost = [45, 70, 100, 100];
damageLevel = -1;
rangeUpgrade = new Array();
rangeUpgradeCost = new Array();
rangeUpgrade = [10, 15, 25, 25];
rangeUpgradeCost = [25, 45, 70, 70];
rangeLevel = -1;
var _local4 = new Object();
_local4.onKeyDown = function () {
if (Key.isDown(27)) {
trace("Escape pressed on Tower");
b.stat._visible = false;
b.rangeMC._visible = false;
}
};
Key.addListener(_local4);
stat.lifeUpgradeBt.onRelease = function () {
if (_global.money < Math.ceil(b.valor / 10)) {
return(undefined);
}
b.life = b.life + Math.ceil(b.maxLife / 10);
if (b.life > b.maxLife) {
b.life = b.maxLife;
}
_global.money = _global.money - Math.ceil(b.valor / 10);
b.updateStat();
};
stat.speedUpgradeBt.onRelease = function () {
if (_global.money < b.speedUpgradeCost[b.speedLevel + 1]) {
return(undefined);
}
b.speed = b.speed - b.speedUpgrade[b.speedLevel + 1];
_global.money = _global.money - b.speedUpgradeCost[b.speedLevel + 1];
b.valor = b.valor + b.speedUpgradeCost[b.speedLevel + 1];
b.speedLevel++;
b.updateStat();
b.upgrading = true;
b.stat.upgradeMC._visible = true;
b.stat.upgradeMC.play();
if (b.speedLevel > 1) {
this.enabled = false;
this._alpha = 70;
b.stat.speedUpgradeStat._alpha = 70;
b.stat.speedUpgradeCostStat._alpha = 70;
}
};
stat.damageUpgradeBt.onRelease = function () {
if (_global.money < b.damageUpgradeCost[b.damageLevel + 1]) {
return(undefined);
}
b.damage = b.damage + b.damageUpgrade[b.damageLevel + 1];
_global.money = _global.money - b.damageUpgradeCost[b.damageLevel + 1];
b.valor = b.valor + b.damageUpgradeCost[b.damageLevel + 1];
b.damageLevel++;
b.updateStat();
b.upgrading = true;
b.stat.upgradeMC._visible = true;
b.stat.upgradeMC.play();
if (b.damageLevel > 1) {
this.enabled = false;
this._alpha = 70;
b.stat.damageUpgradeStat._alpha = 70;
b.stat.damageUpgradeCostStat._alpha = 70;
}
};
stat.rangeUpgradeBt.onRelease = function () {
if (_global.money < b.rangeUpgradeCost[b.rangeLevel + 1]) {
return(undefined);
}
b.range = b.range + b.rangeUpgrade[b.rangeLevel + 1];
_global.money = _global.money - b.rangeUpgradeCost[b.rangeLevel + 1];
b.valor = b.valor + b.rangeUpgradeCost[b.rangeLevel + 1];
b.rangeLevel++;
b.updateStat();
b.drawRange();
b.upgrading = true;
b.stat.upgradeMC._visible = true;
b.stat.upgradeMC.play();
if (b.rangeLevel > 1) {
this.enabled = false;
this._alpha = 70;
b.stat.rangeUpgradeStat._alpha = 70;
b.stat.rangeUpgradeCostStat._alpha = 70;
}
};
stat.sellBt.onRelease = function () {
_global.money = _global.money + Math.floor((b.valor * 0.75) * (b.life / b.maxLife));
b.gotoAndStop("explode");
_root.jukeBoxMC.playSound("towerExplode");
b.dead = true;
};
updateStat();
}
function drawCircle(mc, x, y, r) {
mc.moveTo(x + r, y);
mc.curveTo(r + x, (0.414213562373095 * r) + y, (0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((0.414213562373095 * r) + x, r + y, x, r + y);
mc.curveTo((-0.414213562373095 * r) + x, r + y, (-0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((-r) + x, (0.414213562373095 * r) + y, (-r) + x, y);
mc.curveTo((-r) + x, (-0.414213562373095 * r) + y, (-0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo((-0.414213562373095 * r) + x, (-r) + y, x, (-r) + y);
mc.curveTo((0.414213562373095 * r) + x, (-r) + y, (0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo(r + x, (-0.414213562373095 * r) + y, r + x, y);
}
function drawRange() {
rangeMC.clear();
rangeMC.lineStyle(1, 3355443, 50, true, "none", "round", "miter", 1);
rangeMC.beginFill(15658734, 20);
drawCircle(rangeMC, 0, 0, range);
rangeMC.endFill();
}
function onMouseDown() {
var _local4 = false;
if ((((_xmouse > -20) && (_xmouse < 20)) && (_ymouse > -25)) && (_ymouse < 35)) {
var _local3 = 0;
while (_local3 < _parent._parent.nt) {
if (_parent._parent.towerVec[_local3].stat.hitTest(_root._xmouse, _root._ymouse, true) && (_parent._parent.towerVec[_local3].stat._visible)) {
_local4 = true;
}
_local3++;
}
if (!_local4) {
swapDepths(_parent.getNextHighestDepth());
drawRange();
updateStat();
rangeMC._visible = true;
stat._visible = true;
}
} else if (!stat.hitTest(_root._xmouse, _root._ymouse, true)) {
stat._visible = false;
rangeMC._visible = false;
}
}
function dist(x1, y1, x2, y2) {
return(Math.sqrt((Math.abs(x2 - x1) * Math.abs(x2 - x1)) + (Math.abs(y2 - y1) * Math.abs(y2 - y1))));
}
function updateStat() {
if (life == maxLife) {
stat.lifeUpgradeBt.enabled = false;
stat.lifeUpgradeBt._alpha = 70;
stat.lifeUpgradeStat._alpha = 70;
stat.lifeUpgradeCostStat._alpha = 70;
} else {
stat.lifeUpgradeBt.enabled = true;
stat.lifeUpgradeBt._alpha = 100;
stat.lifeUpgradeStat._alpha = 100;
stat.lifeUpgradeCostStat._alpha = 100;
}
stat.lifeStat.text = life;
stat.lifeUpgradeStat.text = "+" + String(Math.ceil(maxLife / 10));
stat.lifeUpgradeCostStat.text = String(Math.ceil(valor / 10)) + "G";
stat.speedUpgradeStat.text = "+" + String(Math.floor(maxLife / 10));
stat.speedUpgradeCostStat.text = 5;
stat.speedStat.text = 30 - speed;
stat.rangeStat.text = range;
stat.damageStat.text = damage;
stat.speedUpgradeStat.text = "+" + String(speedUpgrade[speedLevel + 1]);
stat.rangeUpgradeStat.text = "+" + String(rangeUpgrade[rangeLevel + 1]);
stat.damageUpgradeStat.text = "+" + String(damageUpgrade[damageLevel + 1]);
stat.speedUpgradeCostStat.text = String(speedUpgradeCost[speedLevel + 1]) + "G";
stat.rangeUpgradeCostStat.text = String(rangeUpgradeCost[rangeLevel + 1]) + "G";
stat.damageUpgradeCostStat.text = String(damageUpgradeCost[damageLevel + 1]) + "G";
stat.sellText.text = Math.floor((valor * 0.75) * (life / maxLife));
}
function hitFunction(d) {
life = life - d;
updateStat();
if ((life <= 0) && (!dead)) {
dead = true;
(gotoAndStop("explode"));// not popped
_root.jukeBoxMC.playSound("towerExplode");
}
}
function onEnterFrame() {
if (dead) {
return(undefined);
}
if (delay_interval < speed) {
delay_interval++;
}
if ((delay_interval >= speed) && (!upgrading)) {
var _local3 = 0;
while (_local3 < _parent._parent.nc) {
if ((dist(_x, _y, _parent._parent.creepVec[_local3]._x, _parent._parent.creepVec[_local3]._y) < range) && (_parent._parent.creepVec[_local3].life > 0)) {
delay_interval = 0;
_parent._parent.addTowerBullet(_x, _y, 5, damage, _parent._parent.creepVec[_local3].ID);
_root.jukeBoxMC.playSound("tower5Shot");
break;
}
_local3++;
}
}
lifeMC._width = (life * 30) / maxLife;
if (upgrading) {
upgradeMC._visible = true;
} else {
upgradeMC._visible = false;
}
}
var speed = 25;
var damage = 130;
var range = 100;
var life = 300;
var maxLife = 300;
var valor = 175;
var upgrading = false;
var delay_interval = 0;
var dead = false;
var arrowSpeedx = -1000;
var enemyI = -1;
}
Symbol 812 MovieClip [__Packages.tower4] Frame 0
class tower4 extends MovieClip
{
var hitMC, arrowMC, stat, _x, _y, lifeMC, rangeMC, speedUpgrade, speedUpgradeCost, speedLevel, damageUpgrade, damageUpgradeCost, damageLevel, rangeUpgrade, rangeUpgradeCost, rangeLevel, _xmouse, _ymouse, _parent, swapDepths, gotoAndStop, upgradeMC;
function tower4 () {
super();
}
function onLoad() {
var b = this;
hitMC._visible = false;
arrowMC._visible = false;
stat._visible = false;
if (_x < 400) {
stat._x = 35;
} else {
stat._x = -195;
}
if (_y < 270) {
stat._y = -40;
} else {
stat._y = -125;
}
if (((_y + stat._y) + stat._height) > 550) {
stat._y = (550 - _y) - stat._height;
}
if ((_y + stat._y) < 30) {
stat._y = 30 - _y;
}
if ((_y + lifeMC._y) < 30) {
lifeMC._y = 30 - _y;
}
rangeMC._visible = false;
b.stat.upgradeMC._visible = false;
b.stat.upgradeMC.gotoAndStop(1);
speedUpgrade = new Array();
speedUpgradeCost = new Array();
speedUpgrade = [2, 3, 4, 4];
speedUpgradeCost = [20, 40, 65, 65];
speedLevel = -1;
damageUpgrade = new Array();
damageUpgradeCost = new Array();
damageUpgrade = [21, 38, 70, 70];
damageUpgradeCost = [25, 45, 75, 75];
damageLevel = -1;
rangeUpgrade = new Array();
rangeUpgradeCost = new Array();
rangeUpgrade = [10, 15, 25, 25];
rangeUpgradeCost = [20, 35, 65, 65];
rangeLevel = -1;
var _local4 = new Object();
_local4.onKeyDown = function () {
if (Key.isDown(27)) {
trace("Escape pressed on Tower");
b.stat._visible = false;
b.rangeMC._visible = false;
}
};
Key.addListener(_local4);
stat.lifeUpgradeBt.onRelease = function () {
if (_global.money < Math.ceil(b.valor / 10)) {
return(undefined);
}
b.life = b.life + Math.ceil(b.maxLife / 10);
if (b.life > b.maxLife) {
b.life = b.maxLife;
}
_global.money = _global.money - Math.ceil(b.valor / 10);
b.updateStat();
};
stat.speedUpgradeBt.onRelease = function () {
if (_global.money < b.speedUpgradeCost[b.speedLevel + 1]) {
return(undefined);
}
b.speed = b.speed - b.speedUpgrade[b.speedLevel + 1];
_global.money = _global.money - b.speedUpgradeCost[b.speedLevel + 1];
b.valor = b.valor + b.speedUpgradeCost[b.speedLevel + 1];
b.speedLevel++;
b.updateStat();
b.upgrading = true;
b.stat.upgradeMC._visible = true;
b.stat.upgradeMC.play();
if (b.speedLevel > 1) {
this.enabled = false;
this._alpha = 70;
b.stat.speedUpgradeStat._alpha = 70;
b.stat.speedUpgradeCostStat._alpha = 70;
}
};
stat.damageUpgradeBt.onRelease = function () {
if (_global.money < b.damageUpgradeCost[b.damageLevel + 1]) {
return(undefined);
}
b.damage = b.damage + b.damageUpgrade[b.damageLevel + 1];
_global.money = _global.money - b.damageUpgradeCost[b.damageLevel + 1];
b.valor = b.valor + b.damageUpgradeCost[b.damageLevel + 1];
b.damageLevel++;
b.updateStat();
b.upgrading = true;
b.stat.upgradeMC._visible = true;
b.stat.upgradeMC.play();
if (b.damageLevel > 1) {
this.enabled = false;
this._alpha = 70;
b.stat.damageUpgradeStat._alpha = 70;
b.stat.damageUpgradeCostStat._alpha = 70;
}
};
stat.rangeUpgradeBt.onRelease = function () {
if (_global.money < b.rangeUpgradeCost[b.rangeLevel + 1]) {
return(undefined);
}
b.range = b.range + b.rangeUpgrade[b.rangeLevel + 1];
_global.money = _global.money - b.rangeUpgradeCost[b.rangeLevel + 1];
b.valor = b.valor + b.rangeUpgradeCost[b.rangeLevel + 1];
b.rangeLevel++;
b.updateStat();
b.drawRange();
b.upgrading = true;
b.stat.upgradeMC._visible = true;
b.stat.upgradeMC.play();
if (b.rangeLevel > 1) {
this.enabled = false;
this._alpha = 70;
b.stat.rangeUpgradeStat._alpha = 70;
b.stat.rangeUpgradeCostStat._alpha = 70;
}
};
stat.sellBt.onRelease = function () {
_global.money = _global.money + Math.floor((b.valor * 0.75) * (b.life / b.maxLife));
b.gotoAndStop("explode");
_root.jukeBoxMC.playSound("towerExplode");
b.dead = true;
};
updateStat();
}
function drawCircle(mc, x, y, r) {
mc.moveTo(x + r, y);
mc.curveTo(r + x, (0.414213562373095 * r) + y, (0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((0.414213562373095 * r) + x, r + y, x, r + y);
mc.curveTo((-0.414213562373095 * r) + x, r + y, (-0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((-r) + x, (0.414213562373095 * r) + y, (-r) + x, y);
mc.curveTo((-r) + x, (-0.414213562373095 * r) + y, (-0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo((-0.414213562373095 * r) + x, (-r) + y, x, (-r) + y);
mc.curveTo((0.414213562373095 * r) + x, (-r) + y, (0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo(r + x, (-0.414213562373095 * r) + y, r + x, y);
}
function drawRange() {
rangeMC.clear();
rangeMC.lineStyle(1, 3355443, 50, true, "none", "round", "miter", 1);
rangeMC.beginFill(15658734, 20);
drawCircle(rangeMC, 0, 0, range);
rangeMC.endFill();
}
function onMouseDown() {
var _local4 = false;
if ((((_xmouse > -20) && (_xmouse < 20)) && (_ymouse > -25)) && (_ymouse < 35)) {
var _local3 = 0;
while (_local3 < _parent._parent.nt) {
if (_parent._parent.towerVec[_local3].stat.hitTest(_root._xmouse, _root._ymouse, true) && (_parent._parent.towerVec[_local3].stat._visible)) {
_local4 = true;
}
_local3++;
}
if (!_local4) {
swapDepths(_parent.getNextHighestDepth());
drawRange();
updateStat();
rangeMC._visible = true;
stat._visible = true;
}
} else if (!stat.hitTest(_root._xmouse, _root._ymouse, true)) {
stat._visible = false;
rangeMC._visible = false;
}
}
function dist(x1, y1, x2, y2) {
return(Math.sqrt((Math.abs(x2 - x1) * Math.abs(x2 - x1)) + (Math.abs(y2 - y1) * Math.abs(y2 - y1))));
}
function updateStat() {
if (life == maxLife) {
stat.lifeUpgradeBt.enabled = false;
stat.lifeUpgradeBt._alpha = 70;
stat.lifeUpgradeStat._alpha = 70;
stat.lifeUpgradeCostStat._alpha = 70;
} else {
stat.lifeUpgradeBt.enabled = true;
stat.lifeUpgradeBt._alpha = 100;
stat.lifeUpgradeStat._alpha = 100;
stat.lifeUpgradeCostStat._alpha = 100;
}
stat.lifeStat.text = life;
stat.lifeUpgradeStat.text = "+" + String(Math.ceil(maxLife / 10));
stat.lifeUpgradeCostStat.text = String(Math.ceil(valor / 10)) + "G";
stat.speedUpgradeStat.text = "+" + String(Math.floor(maxLife / 10));
stat.speedUpgradeCostStat.text = 5;
stat.speedStat.text = 30 - speed;
stat.rangeStat.text = range;
stat.damageStat.text = damage;
stat.speedUpgradeStat.text = "+" + String(speedUpgrade[speedLevel + 1]);
stat.rangeUpgradeStat.text = "+" + String(rangeUpgrade[rangeLevel + 1]);
stat.damageUpgradeStat.text = "+" + String(damageUpgrade[damageLevel + 1]);
stat.speedUpgradeCostStat.text = String(speedUpgradeCost[speedLevel + 1]) + "G";
stat.rangeUpgradeCostStat.text = String(rangeUpgradeCost[rangeLevel + 1]) + "G";
stat.damageUpgradeCostStat.text = String(damageUpgradeCost[damageLevel + 1]) + "G";
stat.sellText.text = Math.floor((valor * 0.75) * (life / maxLife));
}
function hitFunction(d) {
life = life - d;
updateStat();
if ((life <= 0) && (!dead)) {
dead = true;
(gotoAndStop("explode"));// not popped
_root.jukeBoxMC.playSound("towerExplode");
}
}
function onEnterFrame() {
if (dead) {
return(undefined);
}
if (delay_interval < speed) {
delay_interval++;
}
if ((delay_interval >= speed) && (!upgrading)) {
var _local3 = 0;
while (_local3 < _parent._parent.nc) {
if ((dist(_x, _y, _parent._parent.creepVec[_local3]._x, _parent._parent.creepVec[_local3]._y) < range) && (_parent._parent.creepVec[_local3].life > 0)) {
delay_interval = 0;
_parent._parent.addTowerBullet(_x, _y, 4, damage, _parent._parent.creepVec[_local3].ID);
_root.jukeBoxMC.playSound("crystalShot");
break;
}
_local3++;
}
}
lifeMC._width = (life * 30) / maxLife;
if (upgrading) {
upgradeMC._visible = true;
} else {
upgradeMC._visible = false;
}
}
var speed = 25;
var damage = 75;
var range = 100;
var life = 250;
var maxLife = 250;
var valor = 110;
var upgrading = false;
var delay_interval = 0;
var dead = false;
var arrowSpeedx = -1000;
var enemyI = -1;
}
Symbol 813 MovieClip [__Packages.tower3] Frame 0
class tower3 extends MovieClip
{
var hitMC, arrowMC, stat, _x, _y, lifeMC, rangeMC, speedUpgrade, speedUpgradeCost, speedLevel, damageUpgrade, damageUpgradeCost, damageLevel, rangeUpgrade, rangeUpgradeCost, rangeLevel, _xmouse, _ymouse, _parent, swapDepths, gotoAndStop, upgradeMC;
function tower3 () {
super();
}
function onLoad() {
var b = this;
hitMC._visible = false;
arrowMC._visible = false;
stat._visible = false;
if (_x < 400) {
stat._x = 35;
} else {
stat._x = -195;
}
if (_y < 270) {
stat._y = -40;
} else {
stat._y = -125;
}
if (((_y + stat._y) + stat._height) > 550) {
stat._y = (550 - _y) - stat._height;
}
if ((_y + stat._y) < 30) {
stat._y = 30 - _y;
}
if ((_y + lifeMC._y) < 30) {
lifeMC._y = 30 - _y;
}
rangeMC._visible = false;
b.stat.upgradeMC._visible = false;
b.stat.upgradeMC.gotoAndStop(1);
speedUpgrade = new Array();
speedUpgradeCost = new Array();
speedUpgrade = [2, 3, 4, 4];
speedUpgradeCost = [15, 30, 40, 40];
speedLevel = -1;
damageUpgrade = new Array();
damageUpgradeCost = new Array();
damageUpgrade = [10, 15, 35, 35];
damageUpgradeCost = [15, 30, 55, 55];
damageLevel = -1;
rangeUpgrade = new Array();
rangeUpgradeCost = new Array();
rangeUpgrade = [10, 15, 15, 15];
rangeUpgradeCost = [15, 25, 40, 40];
rangeLevel = -1;
var _local4 = new Object();
_local4.onKeyDown = function () {
if (Key.isDown(27)) {
trace("Escape pressed on Tower");
b.stat._visible = false;
b.rangeMC._visible = false;
}
};
Key.addListener(_local4);
stat.lifeUpgradeBt.onRelease = function () {
if (_global.money < Math.ceil(b.valor / 10)) {
return(undefined);
}
b.life = b.life + Math.ceil(b.maxLife / 10);
if (b.life > b.maxLife) {
b.life = b.maxLife;
}
_global.money = _global.money - Math.ceil(b.valor / 10);
b.updateStat();
};
stat.speedUpgradeBt.onRelease = function () {
if (_global.money < b.speedUpgradeCost[b.speedLevel + 1]) {
return(undefined);
}
b.speed = b.speed - b.speedUpgrade[b.speedLevel + 1];
_global.money = _global.money - b.speedUpgradeCost[b.speedLevel + 1];
b.valor = b.valor + b.speedUpgradeCost[b.speedLevel + 1];
b.speedLevel++;
b.updateStat();
b.upgrading = true;
b.stat.upgradeMC._visible = true;
b.stat.upgradeMC.play();
if (b.speedLevel > 1) {
this.enabled = false;
this._alpha = 70;
b.stat.speedUpgradeStat._alpha = 70;
b.stat.speedUpgradeCostStat._alpha = 70;
}
};
stat.damageUpgradeBt.onRelease = function () {
if (_global.money < b.damageUpgradeCost[b.damageLevel + 1]) {
return(undefined);
}
b.damage = b.damage + b.damageUpgrade[b.damageLevel + 1];
_global.money = _global.money - b.damageUpgradeCost[b.damageLevel + 1];
b.valor = b.valor + b.damageUpgradeCost[b.damageLevel + 1];
b.damageLevel++;
b.updateStat();
b.upgrading = true;
b.stat.upgradeMC._visible = true;
b.stat.upgradeMC.play();
if (b.damageLevel > 1) {
this.enabled = false;
this._alpha = 70;
b.stat.damageUpgradeStat._alpha = 70;
b.stat.damageUpgradeCostStat._alpha = 70;
}
};
stat.rangeUpgradeBt.onRelease = function () {
if (_global.money < b.rangeUpgradeCost[b.rangeLevel + 1]) {
return(undefined);
}
b.range = b.range + b.rangeUpgrade[b.rangeLevel + 1];
_global.money = _global.money - b.rangeUpgradeCost[b.rangeLevel + 1];
b.valor = b.valor + b.rangeUpgradeCost[b.rangeLevel + 1];
b.rangeLevel++;
b.updateStat();
b.drawRange();
b.upgrading = true;
b.stat.upgradeMC._visible = true;
b.stat.upgradeMC.play();
if (b.rangeLevel > 1) {
this.enabled = false;
this._alpha = 70;
b.stat.rangeUpgradeStat._alpha = 70;
b.stat.rangeUpgradeCostStat._alpha = 70;
}
};
stat.sellBt.onRelease = function () {
_global.money = _global.money + Math.floor((b.valor * 0.75) * (b.life / b.maxLife));
b.gotoAndStop("explode");
_root.jukeBoxMC.playSound("towerExplode");
b.dead = true;
};
updateStat();
}
function drawCircle(mc, x, y, r) {
mc.moveTo(x + r, y);
mc.curveTo(r + x, (0.414213562373095 * r) + y, (0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((0.414213562373095 * r) + x, r + y, x, r + y);
mc.curveTo((-0.414213562373095 * r) + x, r + y, (-0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((-r) + x, (0.414213562373095 * r) + y, (-r) + x, y);
mc.curveTo((-r) + x, (-0.414213562373095 * r) + y, (-0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo((-0.414213562373095 * r) + x, (-r) + y, x, (-r) + y);
mc.curveTo((0.414213562373095 * r) + x, (-r) + y, (0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo(r + x, (-0.414213562373095 * r) + y, r + x, y);
}
function drawRange() {
rangeMC.clear();
rangeMC.lineStyle(1, 3355443, 50, true, "none", "round", "miter", 1);
rangeMC.beginFill(15658734, 20);
drawCircle(rangeMC, 0, 0, range);
rangeMC.endFill();
}
function onMouseDown() {
var _local4 = false;
if ((((_xmouse > -20) && (_xmouse < 20)) && (_ymouse > -25)) && (_ymouse < 35)) {
var _local3 = 0;
while (_local3 < _parent._parent.nt) {
if (_parent._parent.towerVec[_local3].stat.hitTest(_root._xmouse, _root._ymouse, true) && (_parent._parent.towerVec[_local3].stat._visible)) {
_local4 = true;
}
_local3++;
}
if (!_local4) {
swapDepths(_parent.getNextHighestDepth());
drawRange();
updateStat();
rangeMC._visible = true;
stat._visible = true;
}
} else if (!stat.hitTest(_root._xmouse, _root._ymouse, true)) {
stat._visible = false;
rangeMC._visible = false;
}
}
function dist(x1, y1, x2, y2) {
return(Math.sqrt((Math.abs(x2 - x1) * Math.abs(x2 - x1)) + (Math.abs(y2 - y1) * Math.abs(y2 - y1))));
}
function updateStat() {
if (life == maxLife) {
stat.lifeUpgradeBt.enabled = false;
stat.lifeUpgradeBt._alpha = 70;
stat.lifeUpgradeStat._alpha = 70;
stat.lifeUpgradeCostStat._alpha = 70;
} else {
stat.lifeUpgradeBt.enabled = true;
stat.lifeUpgradeBt._alpha = 100;
stat.lifeUpgradeStat._alpha = 100;
stat.lifeUpgradeCostStat._alpha = 100;
}
stat.lifeStat.text = life;
stat.lifeUpgradeStat.text = "+" + String(Math.ceil(maxLife / 10));
stat.lifeUpgradeCostStat.text = String(Math.ceil(valor / 10)) + "G";
stat.speedUpgradeStat.text = "+" + String(Math.floor(maxLife / 10));
stat.speedUpgradeCostStat.text = 5;
stat.speedStat.text = 30 - speed;
stat.rangeStat.text = range;
stat.damageStat.text = damage;
stat.speedUpgradeStat.text = "+" + String(speedUpgrade[speedLevel + 1]);
stat.rangeUpgradeStat.text = "+" + String(rangeUpgrade[rangeLevel + 1]);
stat.damageUpgradeStat.text = "+" + String(damageUpgrade[damageLevel + 1]);
stat.speedUpgradeCostStat.text = String(speedUpgradeCost[speedLevel + 1]) + "G";
stat.rangeUpgradeCostStat.text = String(rangeUpgradeCost[rangeLevel + 1]) + "G";
stat.damageUpgradeCostStat.text = String(damageUpgradeCost[damageLevel + 1]) + "G";
stat.sellText.text = Math.floor((valor * 0.75) * (life / maxLife));
}
function hitFunction(d) {
life = life - d;
updateStat();
if ((life <= 0) && (!dead)) {
dead = true;
(gotoAndStop("explode"));// not popped
_root.jukeBoxMC.playSound("towerExplode");
}
}
function onEnterFrame() {
if (dead) {
return(undefined);
}
if (delay_interval < speed) {
delay_interval++;
}
if ((delay_interval >= speed) && (!upgrading)) {
var _local3 = 0;
while (_local3 < _parent._parent.nc) {
if ((dist(_x, _y, _parent._parent.creepVec[_local3]._x, _parent._parent.creepVec[_local3]._y) < range) && (_parent._parent.creepVec[_local3].life > 0)) {
delay_interval = 0;
_parent._parent.addTowerBullet(_x, _y, 3, damage, _parent._parent.creepVec[_local3].ID);
_root.jukeBoxMC.playSound("fireShot");
break;
}
_local3++;
}
}
lifeMC._width = (life * 30) / maxLife;
if (upgrading) {
upgradeMC._visible = true;
} else {
upgradeMC._visible = false;
}
}
var speed = 25;
var damage = 30;
var range = 100;
var life = 150;
var maxLife = 150;
var valor = 75;
var upgrading = false;
var delay_interval = 0;
var dead = false;
var arrowSpeedx = -1000;
var enemyI = -1;
}
Symbol 814 MovieClip [__Packages.tower2] Frame 0
class tower2 extends MovieClip
{
var hitMC, arrowMC, stat, _x, _y, lifeMC, rangeMC, speedUpgrade, speedUpgradeCost, speedLevel, damageUpgrade, damageUpgradeCost, damageLevel, rangeUpgrade, rangeUpgradeCost, rangeLevel, _xmouse, _ymouse, _parent, swapDepths, gotoAndStop, upgradeMC;
function tower2 () {
super();
}
function onLoad() {
var b = this;
hitMC._visible = false;
arrowMC._visible = false;
stat._visible = false;
if (_x < 400) {
stat._x = 35;
} else {
stat._x = -195;
}
if (_y < 270) {
stat._y = -40;
} else {
stat._y = -125;
}
if (((_y + stat._y) + stat._height) > 550) {
stat._y = (550 - _y) - stat._height;
}
if ((_y + stat._y) < 30) {
stat._y = 30 - _y;
}
if ((_y + lifeMC._y) < 30) {
lifeMC._y = 30 - _y;
}
rangeMC._visible = false;
b.stat.upgradeMC._visible = false;
b.stat.upgradeMC.gotoAndStop(1);
speedUpgrade = new Array();
speedUpgradeCost = new Array();
speedUpgrade = [2, 3, 5, 5];
speedUpgradeCost = [5, 20, 30, 30];
speedLevel = -1;
damageUpgrade = new Array();
damageUpgradeCost = new Array();
damageUpgrade = [4, 6, 11, 11];
damageUpgradeCost = [10, 20, 30, 30];
damageLevel = -1;
rangeUpgrade = new Array();
rangeUpgradeCost = new Array();
rangeUpgrade = [10, 10, 10, 10];
rangeUpgradeCost = [5, 18, 28, 28];
rangeLevel = -1;
var _local4 = new Object();
_local4.onKeyDown = function () {
if (Key.isDown(27)) {
trace("Escape pressed on Tower");
b.stat._visible = false;
b.rangeMC._visible = false;
}
};
Key.addListener(_local4);
stat.lifeUpgradeBt.onRelease = function () {
if (_global.money < Math.ceil(b.valor / 10)) {
return(undefined);
}
b.life = b.life + Math.ceil(b.maxLife / 10);
if (b.life > b.maxLife) {
b.life = b.maxLife;
}
_global.money = _global.money - Math.ceil(b.valor / 10);
b.updateStat();
};
stat.speedUpgradeBt.onRelease = function () {
if (_global.money < b.speedUpgradeCost[b.speedLevel + 1]) {
return(undefined);
}
b.speed = b.speed - b.speedUpgrade[b.speedLevel + 1];
_global.money = _global.money - b.speedUpgradeCost[b.speedLevel + 1];
b.valor = b.valor + b.speedUpgradeCost[b.speedLevel + 1];
b.speedLevel++;
b.updateStat();
b.upgrading = true;
b.stat.upgradeMC._visible = true;
b.stat.upgradeMC.play();
if (b.speedLevel > 1) {
this.enabled = false;
this._alpha = 70;
b.stat.speedUpgradeStat._alpha = 70;
b.stat.speedUpgradeCostStat._alpha = 70;
}
};
stat.damageUpgradeBt.onRelease = function () {
if (_global.money < b.damageUpgradeCost[b.damageLevel + 1]) {
return(undefined);
}
b.damage = b.damage + b.damageUpgrade[b.damageLevel + 1];
_global.money = _global.money - b.damageUpgradeCost[b.damageLevel + 1];
b.valor = b.valor + b.damageUpgradeCost[b.damageLevel + 1];
b.damageLevel++;
b.updateStat();
b.upgrading = true;
b.stat.upgradeMC._visible = true;
b.stat.upgradeMC.play();
if (b.damageLevel > 1) {
this.enabled = false;
this._alpha = 70;
b.stat.damageUpgradeStat._alpha = 70;
b.stat.damageUpgradeCostStat._alpha = 70;
}
};
stat.rangeUpgradeBt.onRelease = function () {
if (_global.money < b.rangeUpgradeCost[b.rangeLevel + 1]) {
return(undefined);
}
b.range = b.range + b.rangeUpgrade[b.rangeLevel + 1];
_global.money = _global.money - b.rangeUpgradeCost[b.rangeLevel + 1];
b.valor = b.valor + b.rangeUpgradeCost[b.rangeLevel + 1];
b.rangeLevel++;
b.updateStat();
b.drawRange();
b.upgrading = true;
b.stat.upgradeMC._visible = true;
b.stat.upgradeMC.play();
if (b.rangeLevel > 1) {
this.enabled = false;
this._alpha = 70;
b.stat.rangeUpgradeStat._alpha = 70;
b.stat.rangeUpgradeCostStat._alpha = 70;
}
};
stat.sellBt.onRelease = function () {
_global.money = _global.money + Math.floor((b.valor * 0.75) * (b.life / b.maxLife));
b.gotoAndStop("explode");
_root.jukeBoxMC.playSound("towerExplode");
b.dead = true;
};
updateStat();
}
function drawCircle(mc, x, y, r) {
mc.moveTo(x + r, y);
mc.curveTo(r + x, (0.414213562373095 * r) + y, (0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((0.414213562373095 * r) + x, r + y, x, r + y);
mc.curveTo((-0.414213562373095 * r) + x, r + y, (-0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((-r) + x, (0.414213562373095 * r) + y, (-r) + x, y);
mc.curveTo((-r) + x, (-0.414213562373095 * r) + y, (-0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo((-0.414213562373095 * r) + x, (-r) + y, x, (-r) + y);
mc.curveTo((0.414213562373095 * r) + x, (-r) + y, (0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo(r + x, (-0.414213562373095 * r) + y, r + x, y);
}
function drawRange() {
rangeMC.clear();
rangeMC.lineStyle(1, 3355443, 50, true, "none", "round", "miter", 1);
rangeMC.beginFill(15658734, 20);
drawCircle(rangeMC, 0, 0, range);
rangeMC.endFill();
}
function onMouseDown() {
var _local4 = false;
if ((((_xmouse > -20) && (_xmouse < 20)) && (_ymouse > -25)) && (_ymouse < 35)) {
var _local3 = 0;
while (_local3 < _parent._parent.nt) {
if (_parent._parent.towerVec[_local3].stat.hitTest(_root._xmouse, _root._ymouse, true) && (_parent._parent.towerVec[_local3].stat._visible)) {
_local4 = true;
}
_local3++;
}
if (!_local4) {
swapDepths(_parent.getNextHighestDepth());
drawRange();
updateStat();
rangeMC._visible = true;
stat._visible = true;
}
} else if (!stat.hitTest(_root._xmouse, _root._ymouse, true)) {
stat._visible = false;
rangeMC._visible = false;
}
}
function dist(x1, y1, x2, y2) {
return(Math.sqrt((Math.abs(x2 - x1) * Math.abs(x2 - x1)) + (Math.abs(y2 - y1) * Math.abs(y2 - y1))));
}
function updateStat() {
if (life == maxLife) {
stat.lifeUpgradeBt.enabled = false;
stat.lifeUpgradeBt._alpha = 70;
stat.lifeUpgradeStat._alpha = 70;
stat.lifeUpgradeCostStat._alpha = 70;
} else {
stat.lifeUpgradeBt.enabled = true;
stat.lifeUpgradeBt._alpha = 100;
stat.lifeUpgradeStat._alpha = 100;
stat.lifeUpgradeCostStat._alpha = 100;
}
stat.lifeStat.text = life;
stat.lifeUpgradeStat.text = "+" + String(Math.ceil(maxLife / 10));
stat.lifeUpgradeCostStat.text = String(Math.ceil(valor / 10)) + "G";
stat.speedUpgradeStat.text = "+" + String(Math.floor(maxLife / 10));
stat.speedUpgradeCostStat.text = 5;
stat.speedStat.text = 30 - speed;
stat.rangeStat.text = range;
stat.damageStat.text = damage;
stat.speedUpgradeStat.text = "+" + String(speedUpgrade[speedLevel + 1]);
stat.rangeUpgradeStat.text = "+" + String(rangeUpgrade[rangeLevel + 1]);
stat.damageUpgradeStat.text = "+" + String(damageUpgrade[damageLevel + 1]);
stat.speedUpgradeCostStat.text = String(speedUpgradeCost[speedLevel + 1]) + "G";
stat.rangeUpgradeCostStat.text = String(rangeUpgradeCost[rangeLevel + 1]) + "G";
stat.damageUpgradeCostStat.text = String(damageUpgradeCost[damageLevel + 1]) + "G";
stat.sellText.text = Math.floor((valor * 0.75) * (life / maxLife));
}
function hitFunction(d) {
life = life - d;
updateStat();
if ((life <= 0) && (!dead)) {
dead = true;
(gotoAndStop("explode"));// not popped
_root.jukeBoxMC.playSound("towerExplode");
}
}
function onEnterFrame() {
if (dead) {
return(undefined);
}
if (delay_interval < speed) {
delay_interval++;
}
if ((delay_interval >= speed) && (!upgrading)) {
var _local3 = 0;
while (_local3 < _parent._parent.nc) {
if ((dist(_x, _y, _parent._parent.creepVec[_local3]._x, _parent._parent.creepVec[_local3]._y) < range) && (_parent._parent.creepVec[_local3].life > 0)) {
delay_interval = 0;
_parent._parent.addTowerBullet(_x, _y, 2, damage, _parent._parent.creepVec[_local3].ID);
_root.jukeBoxMC.playSound("canonTowerShot");
break;
}
_local3++;
}
}
lifeMC._width = (life * 30) / maxLife;
if (upgrading) {
upgradeMC._visible = true;
} else {
upgradeMC._visible = false;
}
}
var speed = 25;
var damage = 15;
var range = 100;
var life = 100;
var maxLife = 100;
var valor = 40;
var upgrading = false;
var delay_interval = 0;
var dead = false;
var arrowSpeedx = -1000;
var enemyI = -1;
}
Symbol 815 MovieClip [__Packages.towerBulletMC] Frame 0
class towerBulletMC extends MovieClip
{
var speed, gotoAndStop, type, enemyIndex, _parent, enemyID, ID, angle, _y, _x, hitTest, damage;
function towerBulletMC () {
super();
}
function onLoad() {
getIndex();
speed = 7;
(gotoAndStop(type));// not popped
}
function getIndex() {
var _local3 = false;
enemyIndex = -1;
var _local2 = 0;
while (_local2 < _parent._parent.nc) {
if (_parent._parent.creepVec[_local2].ID == enemyID) {
_local3 = true;
enemyIndex = _local2;
break;
}
_local2++;
}
if (!_local3) {
_parent._parent.removeBulletID(ID);
}
}
function animate() {
angle = Math.atan2(_parent._parent.creepVec[enemyIndex]._y - _y, _parent._parent.creepVec[enemyIndex]._x - _x);
var _local2 = 0;
while (_local2 < speed) {
_x = _x + (2 * Math.cos(angle));
_y = _y + (2 * Math.sin(angle));
_local2++;
}
}
function onEnterFrame() {
if (_parent._parent.creepVec[enemyIndex].ID != enemyID) {
getIndex();
}
if (_parent._parent.creepVec[enemyIndex].dead && (!dead)) {
_parent._parent.removeBulletID(ID);
return(undefined);
}
if (enemyIndex < 0) {
return(undefined);
}
if (!dead) {
animate();
} else {
_x = _parent._parent.creepVec[enemyIndex]._x;
_y = _parent._parent.creepVec[enemyIndex]._y;
return(undefined);
}
if (hitTest(_parent._parent.creepVec[enemyIndex].hitMC)) {
dead = true;
(gotoAndStop("explode"));// not popped
_parent._parent.creepVec[enemyIndex].hitFunction(damage);
}
}
var dead = false;
var once = false;
}
Symbol 816 MovieClip [__Packages.tower1] Frame 0
class tower1 extends MovieClip
{
var hitMC, arrowMC, rangeMC, stat, _x, _y, lifeMC, speedUpgrade, speedUpgradeCost, speedLevel, damageUpgrade, damageUpgradeCost, damageLevel, rangeUpgrade, rangeUpgradeCost, rangeLevel, _xmouse, _ymouse, _parent, swapDepths, gotoAndStop, upgradeMC;
function tower1 () {
super();
}
function onLoad() {
var b = this;
hitMC._visible = false;
arrowMC._visible = false;
rangeMC._visible = false;
stat._visible = false;
if (_x < 400) {
stat._x = 35;
} else {
stat._x = -195;
}
if (_y < 270) {
stat._y = -40;
} else {
stat._y = -125;
}
if (((_y + stat._y) + stat._height) > 550) {
stat._y = (550 - _y) - stat._height;
}
if ((_y + stat._y) < 30) {
stat._y = 30 - _y;
}
if ((_y + lifeMC._y) < 30) {
lifeMC._y = 30 - _y;
}
b.stat.upgradeMC._visible = false;
b.stat.upgradeMC.gotoAndStop(1);
speedUpgrade = new Array();
speedUpgradeCost = new Array();
speedUpgrade = [2, 3, 5, 5];
speedUpgradeCost = [5, 15, 25, 25];
speedLevel = -1;
damageUpgrade = new Array();
damageUpgradeCost = new Array();
damageUpgrade = [3, 5, 10, 10];
damageUpgradeCost = [5, 15, 20, 20];
damageLevel = -1;
rangeUpgrade = new Array();
rangeUpgradeCost = new Array();
rangeUpgrade = [10, 10, 10, 10];
rangeUpgradeCost = [5, 15, 25, 25];
rangeLevel = -1;
var _local4 = new Object();
_local4.onKeyDown = function () {
if (Key.isDown(27)) {
trace("Escape pressed on Tower");
b.stat._visible = false;
b.rangeMC._visible = false;
}
};
Key.addListener(_local4);
stat.lifeUpgradeBt.onRelease = function () {
if (_global.money < Math.ceil(b.valor / 10)) {
return(undefined);
}
b.life = b.life + Math.ceil(b.maxLife / 10);
if (b.life > b.maxLife) {
b.life = b.maxLife;
}
_global.money = _global.money - Math.ceil(b.valor / 10);
b.updateStat();
};
stat.speedUpgradeBt.onRelease = function () {
if (_global.money < b.speedUpgradeCost[b.speedLevel + 1]) {
return(undefined);
}
b.speed = b.speed - b.speedUpgrade[b.speedLevel + 1];
_global.money = _global.money - b.speedUpgradeCost[b.speedLevel + 1];
b.valor = b.valor + b.speedUpgradeCost[b.speedLevel + 1];
b.speedLevel++;
b.updateStat();
b.upgrading = true;
b.stat.upgradeMC._visible = true;
b.stat.upgradeMC.play();
if (b.speedLevel > 1) {
this.enabled = false;
this._alpha = 70;
b.stat.speedUpgradeStat._alpha = 70;
b.stat.speedUpgradeCostStat._alpha = 70;
}
};
stat.damageUpgradeBt.onRelease = function () {
if (_global.money < b.damageUpgradeCost[b.damageLevel + 1]) {
return(undefined);
}
b.damage = b.damage + b.damageUpgrade[b.damageLevel + 1];
_global.money = _global.money - b.damageUpgradeCost[b.damageLevel + 1];
b.valor = b.valor + b.damageUpgradeCost[b.damageLevel + 1];
b.damageLevel++;
b.updateStat();
b.upgrading = true;
b.stat.upgradeMC._visible = true;
b.stat.upgradeMC.play();
if (b.damageLevel > 1) {
this.enabled = false;
this._alpha = 70;
b.stat.damageUpgradeStat._alpha = 70;
b.stat.damageUpgradeCostStat._alpha = 70;
}
};
stat.rangeUpgradeBt.onRelease = function () {
if (_global.money < b.rangeUpgradeCost[b.rangeLevel + 1]) {
return(undefined);
}
b.range = b.range + b.rangeUpgrade[b.rangeLevel + 1];
_global.money = _global.money - b.rangeUpgradeCost[b.rangeLevel + 1];
b.valor = b.valor + b.rangeUpgradeCost[b.rangeLevel + 1];
b.rangeLevel++;
b.updateStat();
b.drawRange();
b.upgrading = true;
b.stat.upgradeMC._visible = true;
b.stat.upgradeMC.play();
if (b.rangeLevel > 1) {
this.enabled = false;
this._alpha = 70;
b.stat.rangeUpgradeStat._alpha = 70;
b.stat.rangeUpgradeCostStat._alpha = 70;
}
};
stat.sellBt.onRelease = function () {
_global.money = _global.money + Math.floor((b.valor * 0.75) * (b.life / b.maxLife));
b.gotoAndStop("explode");
_root.jukeBoxMC.playSound("towerExplode");
b.dead = true;
};
updateStat();
}
function drawCircle(mc, x, y, r) {
mc.moveTo(x + r, y);
mc.curveTo(r + x, (0.414213562373095 * r) + y, (0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((0.414213562373095 * r) + x, r + y, x, r + y);
mc.curveTo((-0.414213562373095 * r) + x, r + y, (-0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((-r) + x, (0.414213562373095 * r) + y, (-r) + x, y);
mc.curveTo((-r) + x, (-0.414213562373095 * r) + y, (-0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo((-0.414213562373095 * r) + x, (-r) + y, x, (-r) + y);
mc.curveTo((0.414213562373095 * r) + x, (-r) + y, (0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo(r + x, (-0.414213562373095 * r) + y, r + x, y);
}
function drawRange() {
rangeMC.clear();
rangeMC.lineStyle(1, 3355443, 50, true, "none", "round", "miter", 1);
rangeMC.beginFill(15658734, 20);
drawCircle(rangeMC, 0, 0, range);
rangeMC.endFill();
}
function onMouseDown() {
var _local4 = false;
if ((((_xmouse > -20) && (_xmouse < 20)) && (_ymouse > -25)) && (_ymouse < 35)) {
var _local3 = 0;
while (_local3 < _parent._parent.nt) {
if (_parent._parent.towerVec[_local3].stat.hitTest(_root._xmouse, _root._ymouse, true) && (_parent._parent.towerVec[_local3].stat._visible)) {
_local4 = true;
}
_local3++;
}
if (!_local4) {
swapDepths(_parent.getNextHighestDepth());
drawRange();
updateStat();
rangeMC._visible = true;
stat._visible = true;
}
} else if (!stat.hitTest(_root._xmouse, _root._ymouse, true)) {
stat._visible = false;
rangeMC._visible = false;
}
}
function dist(x1, y1, x2, y2) {
return(Math.sqrt((Math.abs(x2 - x1) * Math.abs(x2 - x1)) + (Math.abs(y2 - y1) * Math.abs(y2 - y1))));
}
function updateStat() {
if (life == maxLife) {
stat.lifeUpgradeBt.enabled = false;
stat.lifeUpgradeBt._alpha = 70;
stat.lifeUpgradeStat._alpha = 70;
stat.lifeUpgradeCostStat._alpha = 70;
} else {
stat.lifeUpgradeBt.enabled = true;
stat.lifeUpgradeBt._alpha = 100;
stat.lifeUpgradeStat._alpha = 100;
stat.lifeUpgradeCostStat._alpha = 100;
}
stat.lifeStat.text = life;
stat.lifeUpgradeStat.text = "+" + String(Math.ceil(maxLife / 10));
stat.lifeUpgradeCostStat.text = String(Math.ceil(valor / 10)) + "G";
stat.speedUpgradeStat.text = "+" + String(Math.floor(maxLife / 10));
stat.speedUpgradeCostStat.text = 5;
stat.speedStat.text = 30 - speed;
stat.rangeStat.text = range;
stat.damageStat.text = damage;
stat.speedUpgradeStat.text = "+" + String(speedUpgrade[speedLevel + 1]);
stat.rangeUpgradeStat.text = "+" + String(rangeUpgrade[rangeLevel + 1]);
stat.damageUpgradeStat.text = "+" + String(damageUpgrade[damageLevel + 1]);
stat.speedUpgradeCostStat.text = String(speedUpgradeCost[speedLevel + 1]) + "G";
stat.rangeUpgradeCostStat.text = String(rangeUpgradeCost[rangeLevel + 1]) + "G";
stat.damageUpgradeCostStat.text = String(damageUpgradeCost[damageLevel + 1]) + "G";
stat.sellText.text = Math.floor((valor * 0.75) * (life / maxLife));
}
function hitFunction(d) {
life = life - d;
updateStat();
if ((life <= 0) && (!dead)) {
dead = true;
(gotoAndStop("explode"));// not popped
_root.jukeBoxMC.playSound("towerExplode");
}
}
function onEnterFrame() {
if (dead) {
return(undefined);
}
if (delay_interval < speed) {
delay_interval++;
}
if ((delay_interval >= speed) && (!upgrading)) {
var _local3 = 0;
while (_local3 < _parent._parent.nc) {
if ((dist(_x, _y, _parent._parent.creepVec[_local3]._x, _parent._parent.creepVec[_local3]._y) < range) && (_parent._parent.creepVec[_local3].life > 0)) {
delay_interval = 0;
_parent._parent.addTowerBullet(_x, _y, 1, damage, _parent._parent.creepVec[_local3].ID);
_root.jukeBoxMC.playSound("canonTowerShot");
break;
}
_local3++;
}
}
lifeMC._width = (life * 30) / maxLife;
if (upgrading) {
upgradeMC._visible = true;
} else {
upgradeMC._visible = false;
}
}
var speed = 25;
var damage = 9;
var range = 100;
var life = 100;
var maxLife = 100;
var valor = 25;
var upgrading = false;
var delay_interval = 0;
var dead = false;
var arrowSpeedx = -1000;
var enemyI = -1;
}
Symbol 817 MovieClip [__Packages.creepsMC] Frame 0
class creepsMC extends MovieClip
{
var index, creepMC, life, hitMC, type, gotoAndPlay, dx, _parent, _x, dy, _y, temp, lifeMC, shootingCreep, range, enemyTowerID;
function creepsMC () {
super();
}
function onLoad() {
index = 0;
creepMC._rotation = 105;
life = max_life;
hitMC._visible = false;
}
function dist(x1, y1, x2, y2) {
return(Math.sqrt((Math.abs(x2 - x1) * Math.abs(x2 - x1)) + (Math.abs(y2 - y1) * Math.abs(y2 - y1))));
}
function hitFunction(d) {
life = life - d;
if ((life <= 0) && (!dead)) {
dead = true;
_root.jukeBoxMC.playDeamonDie(type);
_global.money = _global.money + value;
_global.points = _global.points + value;
(gotoAndPlay("explode"));// not popped
}
}
function onEnterFrame() {
dx = Math.abs(_x - _parent._parent.mapMC.points[index][0]);
dy = Math.abs(_y - _parent._parent.mapMC.points[index][1]);
if (dx >= dy) {
dy = speed * (dy / dx);
dx = speed;
} else {
dx = speed * (dx / dy);
dy = speed;
}
if (_x > _parent._parent.mapMC.points[index][0]) {
_x = _x - dx;
} else {
_x = _x + dx;
}
if (_y > _parent._parent.mapMC.points[index][1]) {
_y = _y - dy;
} else {
_y = _y + dy;
}
if ((Math.abs(_x - _parent._parent.mapMC.points[index][0]) <= speed) && (Math.abs(_y - _parent._parent.mapMC.points[index][1]) <= speed)) {
index++;
if (index > 1) {
temp = Math.atan2(_parent._parent.mapMC.points[index][1] - _parent._parent.mapMC.points[index - 1][1], _parent._parent.mapMC.points[index][0] - _parent._parent.mapMC.points[index - 1][0]);
temp = (temp * 180) / 3.14;
creepMC._rotation = temp + 90;
}
}
if (index > _parent._parent.mapMC.nPoints) {
_x = -90;
_y = 27;
creepMC._rotation = 105;
index = 0;
_global.lives--;
}
lifeMC._width = (life * 30) / max_life;
if (dead || (!shootingCreep)) {
return(undefined);
}
shotDelay++;
if ((shotDelay > 60) && (!shooting)) {
var _local3 = 0;
while (_local3 < _parent._parent.nt) {
if ((dist(_x, _y, _parent._parent.towerVec[_local3]._x, _parent._parent.towerVec[_local3]._y) < range) && (!_parent._parent.towerVec[_local3].dead)) {
shotDelay = 0;
(gotoAndPlay("fire"));// not popped
enemyTowerID = _parent._parent.towerVec[_local3].ID;
shooting = true;
break;
}
_local3++;
}
}
}
var speed = 1.5;
var max_life = 20;
var damage = 10;
var value = 10;
var dead = false;
var shooting = false;
var shotDelay = 0;
}
Symbol 818 MovieClip [__Packages.toolBarMC] Frame 0
class toolBarMC extends MovieClip
{
var stat, t1Bt, t2Bt, t3Bt, t4Bt, t5Bt, t6Bt;
function toolBarMC () {
super();
}
function onLoad() {
var b = this;
stat = 0;
t1Bt.onRelease = function () {
b.stat = 1;
b._parent.pointer.setState(1);
};
t2Bt.onRelease = function () {
b.stat = 2;
b._parent.pointer.setState(2);
};
t3Bt.onRelease = function () {
b.stat = 3;
b._parent.pointer.setState(3);
};
t4Bt.onRelease = function () {
b.stat = 4;
b._parent.pointer.setState(4);
};
t5Bt.onRelease = function () {
b.stat = 5;
b._parent.pointer.setState(5);
};
t6Bt.onRelease = function () {
b.stat = 6;
b._parent.pointer.setState(6);
};
var _local2 = new Object();
_local2.onKeyDown = function () {
trace("...pressed...");
if (Key.isDown(27)) {
trace("Escape");
b.stat = 0;
b._parent.pointer.setState(0);
}
};
Key.addListener(_local2);
}
function onEnterFrame() {
}
}
Symbol 819 MovieClip [__Packages.creepBulletMC] Frame 0
class creepBulletMC extends MovieClip
{
var speed, enemyIndex, _parent, enemyID, ID, angle, _y, _x, hitTest, gotoAndStop, damage;
function creepBulletMC () {
super();
}
function onLoad() {
getIndex();
speed = 7;
}
function getIndex() {
var _local3 = false;
enemyIndex = -1;
var _local2 = 0;
while (_local2 < _parent._parent.nt) {
if (_parent._parent.towerVec[_local2].ID == enemyID) {
_local3 = true;
enemyIndex = _local2;
break;
}
_local2++;
}
if (!_local3) {
trace("........not found...............");
_parent._parent.removeBulletID(ID);
}
}
function animate() {
angle = Math.atan2(_parent._parent.towerVec[enemyIndex]._y - _y, _parent._parent.towerVec[enemyIndex]._x - _x);
var _local2 = 0;
while (_local2 < speed) {
_x = _x + Math.cos(angle);
_y = _y + Math.sin(angle);
_local2++;
}
}
function onEnterFrame() {
if (dead) {
return(undefined);
}
if (_parent._parent.towerVec[enemyIndex].dead) {
_parent._parent.removeBulletID(ID);
}
if (_parent._parent.towerVec[enemyIndex].ID != enemyID) {
getIndex();
}
if (enemyIndex < 0) {
return(undefined);
}
animate();
if (hitTest(_parent._parent.towerVec[enemyIndex].hitMC)) {
dead = true;
(gotoAndStop("explode"));// not popped
_parent._parent.towerVec[enemyIndex].hitFunction(damage);
}
}
var dead = false;
}
Symbol 820 MovieClip [__Packages.pointerMC] Frame 0
class pointerMC extends MovieClip
{
var stat, startDrag, hitPoints, gotoAndStop, lineStyle;
function pointerMC () {
super();
}
function onLoad() {
stat = 0;
Mouse.hide();
startDrag(true);
hitPoints = new Array();
var _local2 = 0;
while (_local2 < 12) {
hitPoints[_local2] = new Array();
_local2++;
}
nHP = 0;
}
function setState(st) {
stat = st;
switch (st) {
case 0 :
gotoAndStop("idle");
break;
case 1 :
gotoAndStop("tower1");
break;
case 2 :
gotoAndStop("tower2");
break;
case 3 :
gotoAndStop("tower3");
break;
case 4 :
gotoAndStop("tower4");
break;
case 5 :
gotoAndStop("tower5");
break;
case 6 :
gotoAndStop("tower6");
}
}
function getState() {
return(stat);
}
function drawCircle(mc, x, y, r) {
mc.moveTo(x + r, y);
mc.curveTo(r + x, (0.414213562373095 * r) + y, (0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((0.414213562373095 * r) + x, r + y, x, r + y);
mc.curveTo((-0.414213562373095 * r) + x, r + y, (-0.707106781186547 * r) + x, (0.707106781186547 * r) + y);
mc.curveTo((-r) + x, (0.414213562373095 * r) + y, (-r) + x, y);
mc.curveTo((-r) + x, (-0.414213562373095 * r) + y, (-0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo((-0.414213562373095 * r) + x, (-r) + y, x, (-r) + y);
mc.curveTo((0.414213562373095 * r) + x, (-r) + y, (0.707106781186547 * r) + x, (-0.707106781186547 * r) + y);
mc.curveTo(r + x, (-0.414213562373095 * r) + y, r + x, y);
}
function drawRange() {
lineStyle(1, 16777215, 50, true, "none", "round", "miter", 1);
drawCircle(this, hitPoints[0][0], hitPoints[0][1], 2);
drawCircle(this, hitPoints[1][0], hitPoints[1][1], 2);
drawCircle(this, hitPoints[2][0], hitPoints[2][1], 2);
drawCircle(this, hitPoints[3][0], hitPoints[3][1], 2);
}
function onEnterFrame() {
}
var nHP = 0;
}
Symbol 821 MovieClip [__Packages.Director] Frame 0
class Director extends MovieClip
{
var creepsDeployed, creepsToDeploy, level, creepVec, nc, towerVec, nt, bulletVec, nb, nextWaveBt, messageMC, mapMC, fpsField, pointer, towerLayer, noMoney, creepLayer;
function Director () {
super();
}
function onLoad() {
var b = this;
setInterval(this, "FPS", 1000);
creepsDeployed = 0;
creepsToDeploy = 0;
level = -1;
creepVec = new Array();
nc = 0;
towerVec = new Array();
nt = 0;
bulletVec = new Array();
nb = 0;
_root.jukeBoxMC.playLoop("inGame");
nextWaveBt.onRelease = function () {
b.gotoNextLevel();
};
}
function gotoNextLevel() {
if ((creepsDeployed == creepsToDeploy) && (nc == 0)) {
if (messageMC._currentframe != 1) {
messageMC.gotoAndStop(15);
messageMC.play();
}
level++;
_root.jukeBoxMC.playNextLevel();
if (level < mapMC.nLevels) {
creepsDeployed = 0;
creepsToDeploy = mapMC.levels[level].creeps.length;
}
messShown = false;
}
}
function FPS() {
fpsField.text = String(fpsCounter);
fpsCounter = 0;
}
function pointerHitTest() {
var _local5 = true;
var _local4 = 0;
while (_local4 < pointer.nHP) {
if (mapMC.road.hitTest(_root._xmouse + pointer.hitPoints[_local4][0], _root._ymouse + pointer.hitPoints[_local4][1], true)) {
_local5 = false;
break;
}
var _local3 = 0;
while (_local3 < nt) {
if (towerVec[_local3].tg.hitTest(_root._xmouse + pointer.hitPoints[_local4][0], _root._ymouse + pointer.hitPoints[_local4][1], true)) {
_local5 = false;
break;
}
_local3++;
}
_local4++;
}
return(_local5);
}
function onMouseDown() {
if (pointerHitTest() && (pointer.getState() > 0)) {
if (_root._xmouse > 740) {
return(undefined);
}
switch (pointer.getState()) {
case 1 :
if (_global.money >= 25) {
towerVec[nt] = towerLayer.attachMovie("tower1", "tower1" + String(IDs), towerLayer.getNextHighestDepth(), {_x:_root._xmouse, _y:_root._ymouse, ID:IDs});
_global.money = _global.money - 25;
} else {
noMoney.play();
_root.jukeBoxMC.playSound("noMoney");
}
break;
case 2 :
if (_global.money >= 40) {
towerVec[nt] = towerLayer.attachMovie("tower2", "tower2" + String(IDs), towerLayer.getNextHighestDepth(), {_x:_root._xmouse, _y:_root._ymouse, ID:IDs});
_global.money = _global.money - 40;
} else {
noMoney.play();
_root.jukeBoxMC.playSound("noMoney");
}
break;
case 3 :
if (_global.money >= 75) {
towerVec[nt] = towerLayer.attachMovie("tower3", "tower3" + String(IDs), towerLayer.getNextHighestDepth(), {_x:_root._xmouse, _y:_root._ymouse, ID:IDs});
_global.money = _global.money - 75;
} else {
noMoney.play();
_root.jukeBoxMC.playSound("noMoney");
}
break;
case 4 :
if (_global.money >= 110) {
towerVec[nt] = towerLayer.attachMovie("tower4", "tower4" + String(IDs), towerLayer.getNextHighestDepth(), {_x:_root._xmouse, _y:_root._ymouse, ID:IDs});
_global.money = _global.money - 110;
} else {
noMoney.play();
_root.jukeBoxMC.playSound("noMoney");
}
break;
case 5 :
if (_global.money >= 175) {
towerVec[nt] = towerLayer.attachMovie("tower5", "tower5" + String(IDs), towerLayer.getNextHighestDepth(), {_x:_root._xmouse, _y:_root._ymouse, ID:IDs});
_global.money = _global.money - 175;
} else {
noMoney.play();
_root.jukeBoxMC.playSound("noMoney");
}
break;
case 6 :
if (_global.money >= 250) {
towerVec[nt] = towerLayer.attachMovie("tower6", "tower6" + String(IDs), towerLayer.getNextHighestDepth(), {_x:_root._xmouse, _y:_root._ymouse, ID:IDs});
_global.money = _global.money - 250;
} else {
noMoney.play();
_root.jukeBoxMC.playSound("noMoney");
}
}
nt++;
IDs++;
pointer.setState(0);
}
}
function onMouseMove() {
var _local2;
if (pointer.getState() > 0) {
switch (pointer.getState()) {
case 1 :
_local2 = pointer.towerMask1;
break;
case 2 :
_local2 = pointer.towerMask2;
break;
case 3 :
_local2 = pointer.towerMask3;
break;
case 4 :
_local2 = pointer.towerMask4;
break;
case 5 :
_local2 = pointer.towerMask5;
break;
case 6 :
_local2 = pointer.towerMask6;
}
if (pointerHitTest()) {
_local2._visible = false;
} else {
_local2._visible = true;
}
}
}
function addTowerDebris(xp, yp) {
creepLayer.attachMovie("towerDebrisMC", "towerDebrisMC" + String(IDs), creepLayer.getNextHighestDepth(), {_x:xp, _y:yp + 5});
IDs++;
}
function addTowerBullet(xi, yi, type, dmg, ids) {
bulletVec[nb] = creepLayer.attachMovie("towerBulletMC", "towerBulletMC" + String(IDs), creepLayer.getNextHighestDepth(), {_x:xi, _y:yi, type:type, enemyID:ids, ID:IDs, speed:5, damage:dmg});
nb++;
IDs++;
}
function addCreepBullet(xi, yi, dmg, ids) {
bulletVec[nb] = creepLayer.attachMovie("creepBulletMC", "creepBulletMC" + String(IDs), creepLayer.getNextHighestDepth(), {_x:xi, _y:yi, enemyID:ids, ID:IDs, damage:dmg});
nb++;
IDs++;
}
function removeBulletID(id) {
var _local2 = 0;
var _local3 = false;
_local2 = 0;
while (_local2 < nb) {
if (bulletVec[_local2].ID == id) {
bulletVec[_local2].removeMovieClip();
bulletVec[_local2] = null;
_local3 = true;
break;
}
_local2++;
}
if ((_local2 < nb) && (_local3)) {
while (_local2 < (nb - 1)) {
bulletVec[_local2] = bulletVec[_local2 + 1];
_local2++;
}
nb--;
}
}
function removeTowerID(id) {
var _local2 = 0;
var _local3 = false;
_local2 = 0;
while (_local2 < nt) {
if (towerVec[_local2].ID == id) {
towerVec[_local2].removeMovieClip();
towerVec[_local2] = null;
_local3 = true;
break;
}
_local2++;
}
if ((_local2 < nt) && (_local3)) {
while (_local2 < (nt - 1)) {
towerVec[_local2] = towerVec[_local2 + 1];
_local2++;
}
nt--;
}
}
function removeCreepID(id) {
var _local3 = 0;
while (creepVec[_local3].ID != id) {
_local3++;
}
creepVec[_local3].removeMovieClip();
creepVec[_local3] = null;
var _local2 = _local3;
while (_local2 < (nc - 1)) {
creepVec[_local2] = creepVec[_local2 + 1];
_local2++;
}
nc--;
}
function onEnterFrame() {
fpsCounter++;
if (delay_interval < 50) {
delay_interval++;
}
if (_global.lives <= 0) {
Mouse.show();
pointer._visible = false;
_global.link = "defeat";
_root.faderMC.play();
}
if (((creepsDeployed == creepsToDeploy) && (nc == 0)) && ((level + 1) >= mapMC.nLevels)) {
Mouse.show();
pointer._visible = false;
_global.link = "victory";
_root.faderMC.play();
}
if (((creepsDeployed == creepsToDeploy) && (nc == 0)) && (!messShown)) {
if ((level + 1) < mapMC.nLevels) {
_global.points = _global.points + Math.floor(_global.money * 0.15);
messageMC.statMC.levelField.text = level + 2;
messageMC.statMC.descriptionField.text = mapMC.levels[level + 1].desc;
messageMC.play();
messShown = true;
}
}
if ((creepsDeployed < creepsToDeploy) && (delay_interval >= 30)) {
var _local4 = "";
switch (mapMC.levels[level].creeps[creepsDeployed]) {
case 0 :
_local4 = "ratCreep";
break;
case 1 :
_local4 = "goblinCreep";
break;
case 2 :
_local4 = "menCreep";
break;
case 3 :
_local4 = "goblinArcherCreep";
break;
case 4 :
_local4 = "deamonCreep";
break;
case 5 :
_local4 = "lionmenCreep";
break;
case 6 :
_local4 = "lizardmenCreep";
break;
case 7 :
_local4 = "trollCreep";
break;
case 8 :
_local4 = "battlegoreCreep";
break;
case 9 :
_local4 = "wizardCreep";
}
creepVec[nc] = creepLayer.attachMovie(_local4, "creep" + String(IDs), creepLayer.getNextHighestDepth(), {_x:-100, _y:5, ID:IDs, type:mapMC.levels[level].creeps[creepsDeployed], speed:mapMC.levels[level].speed[creepsDeployed], max_life:mapMC.levels[level].life[creepsDeployed], damage:mapMC.levels[level].damage[creepsDeployed], range:mapMC.levels[level].range[creepsDeployed], value:mapMC.levels[level].val[creepsDeployed], shootingCreep:mapMC.levels[level].shooting[creepsDeployed]});
nc++;
creepsDeployed++;
IDs++;
delay_interval = 0;
}
}
var messShown = false;
var fpsCounter = 0;
var IDs = 0;
var delay_interval = 0;
}
Symbol 822 MovieClip [__Packages.mochi.MochiServices] Frame 0
class mochi.MochiServices
{
static var _id, _container, _clip, _sendChannelName, _rcvChannelName, __get__comChannelName, onError, _listenChannel, _rcvChannel, _loader, _loaderListener, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function get childClip() {
return(_clip);
}
static function getVersion() {
return("1.31");
}
static function allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
_rcvChannelName = val;
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.MochiServices.onError = onError;
} else if (mochi.MochiServices.onError == undefined) {
mochi.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
_rcvChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local2 = "_mochiservices_com_" + id;
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
allowDomains(_gatewayURL);
_clip = clip.createEmptyMovieClip(_local2, 10336, false);
_loader = new MovieClipLoader();
if (_loaderListener.waitInterval != null) {
clearInterval(_loaderListener.waitInterval);
}
_loaderListener = {};
_loaderListener.onLoadError = function (target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, [errorCode]);
};
_loaderListener.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_loaderListener.startTime = getTimer();
_loaderListener.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_loaderListener.waitInterval = setInterval(_loaderListener, "wait", 1000);
_loader.addListener(_loaderListener);
_loader.loadClip(_gatewayURL, _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
_rcvChannel = new LocalConnection();
_rcvChannel.allowDomain = function (d) {
return(true);
};
_rcvChannel.allowInsecureDomain = _rcvChannel.allowDomain;
_rcvChannel._nextcallbackID = 0;
_rcvChannel._callbacks = {};
listen();
return(_clip);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_clip, version:getVersion()});
_rcvChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_rcvChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_rcvChannel.onError = function () {
mochi.MochiServices.onError.apply(null, ["IOError"]);
};
_rcvChannel.connect(_rcvChannelName);
trace("connected!");
_connecting = false;
_connected = true;
_listenChannel.close();
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _rcvChannel._callbacks[_local1.callbackID];
}
delete _rcvChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ["NotConnected"]);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
onError.apply(null, ["NotConnected"]);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
}
_rcvChannel._callbacks[_rcvChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_rcvChannel._nextcallbackID++;
}
static var _gatewayURL = "http://www.mochiads.com/static/lib/services/services.swf";
static var _listenChannelName = "__mochiservices";
static var _connecting = false;
static var _connected = false;
}
Symbol 823 MovieClip [__Packages.mochi.MochiScores] Frame 0
class mochi.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.MochiScores.boardID = boardID;
mochi.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function showLeaderboard(options) {
if (options.clip != null) {
if ((options.clip != mochi.MochiServices.__get__clip()) || (mochi.MochiServices.__get__childClip()._target == undefined)) {
mochi.MochiServices.disconnect();
mochi.MochiServices.connect(mochi.MochiServices.__get__id(), options.clip);
}
delete options.clip;
}
if (options.name != null) {
if (typeof(options.name) == "object") {
if (options.name.text != undefined) {
options.name = options.name.text;
}
}
}
if (options.score != null) {
if (typeof(options.score) == "object") {
if (options.score.text != undefined) {
options.score = options.score.text;
}
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.MochiServices.__get__clip().stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
mochi.MochiServices.__get__clip().play();
};
}
if (options.onError != null) {
onError = options.onError;
} else {
onError = onClose;
}
if (options.boardID == null) {
if (boardID != null) {
options.boardID = boardID;
}
}
mochi.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose);
}
static function closeLeaderboard() {
mochi.MochiServices.send("scores_closeLeaderboard");
}
static function getPlayerInfo(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
static function submit(score, name, callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_requestList", null, callbackObj, callbackMethod);
}
static function scoresArrayToObjects(scores) {
var _local5 = {};
var _local1;
var _local4;
var _local2;
var _local6;
for (var _local8 in scores) {
if (typeof(scores[_local8]) == "object") {
if ((scores[_local8].cols != null) && (scores[_local8].rows != null)) {
_local5[_local8] = [];
_local2 = scores[_local8];
_local4 = 0;
while (_local4 < _local2.rows.length) {
_local6 = {};
_local1 = 0;
while (_local1 < _local2.cols.length) {
_local6[_local2.cols[_local1]] = _local2.rows[_local4][_local1];
_local1++;
}
_local5[_local8].push(_local6);
_local4++;
}
} else {
_local5[_local8] = {};
for (var _local7 in scores[_local8]) {
_local5[_local8][_local7] = scores[_local8][_local7];
}
}
} else {
_local5[_local8] = scores[_local8];
}
}
return(_local5);
}
static function doClose(args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = "IOError";
}
onError.apply(null, [args.errorCode]);
} else {
onClose.apply();
}
}
}
Symbol 285 MovieClip [deamonCreep] Frame 1
#initclip 37
Object.registerClass("deamonCreep", creepsMC);
#endinitclip
stop();
Symbol 285 MovieClip [deamonCreep] Frame 5
this._alpha = 80;
Symbol 285 MovieClip [deamonCreep] Frame 9
this._alpha = 60;
Symbol 285 MovieClip [deamonCreep] Frame 13
this._alpha = 40;
Symbol 285 MovieClip [deamonCreep] Frame 17
this._alpha = 20;
Symbol 285 MovieClip [deamonCreep] Frame 21
this._alpha = 1;
Symbol 285 MovieClip [deamonCreep] Frame 25
stop();
_parent._parent.removeCreepID(ID);
Symbol 285 MovieClip [deamonCreep] Frame 50
stop();
_parent._parent.addCreepBullet(this._x, this._y, damage, enemyTowerID);
_root.jukeBoxMC.playSound("creepShot");
shooting = false;
if (dead) {
this.gotoAndPlay("explode");
} else {
this.gotoAndStop(1);
}
Symbol 307 MovieClip [goblinArcherCreep] Frame 1
#initclip 25
Object.registerClass("goblinArcherCreep", creepsMC);
#endinitclip
stop();
Symbol 307 MovieClip [goblinArcherCreep] Frame 5
this._alpha = 80;
Symbol 307 MovieClip [goblinArcherCreep] Frame 9
this._alpha = 60;
Symbol 307 MovieClip [goblinArcherCreep] Frame 13
this._alpha = 40;
Symbol 307 MovieClip [goblinArcherCreep] Frame 17
this._alpha = 20;
Symbol 307 MovieClip [goblinArcherCreep] Frame 21
this._alpha = 1;
Symbol 307 MovieClip [goblinArcherCreep] Frame 25
stop();
_parent._parent.removeCreepID(ID);
Symbol 307 MovieClip [goblinArcherCreep] Frame 50
stop();
_parent._parent.addCreepBullet(this._x, this._y, damage, enemyTowerID);
_root.jukeBoxMC.playSound("creepShot");
shooting = false;
if (dead) {
this.gotoAndPlay("explode");
} else {
this.gotoAndStop(1);
}
Symbol 349 MovieClip [goblinCreep] Frame 1
#initclip 26
Object.registerClass("goblinCreep", creepsMC);
#endinitclip
stop();
Symbol 349 MovieClip [goblinCreep] Frame 5
this._alpha = 80;
Symbol 349 MovieClip [goblinCreep] Frame 9
this._alpha = 60;
Symbol 349 MovieClip [goblinCreep] Frame 13
this._alpha = 40;
Symbol 349 MovieClip [goblinCreep] Frame 17
this._alpha = 20;
Symbol 349 MovieClip [goblinCreep] Frame 21
this._alpha = 1;
Symbol 349 MovieClip [goblinCreep] Frame 25
stop();
_parent._parent.removeCreepID(ID);
Symbol 349 MovieClip [goblinCreep] Frame 50
stop();
_parent._parent.addCreepBullet(this._x, this._y, damage, enemyTowerID);
_root.jukeBoxMC.playSound("creepShot");
shooting = false;
if (dead) {
this.gotoAndPlay("explode");
} else {
this.gotoAndStop(1);
}
Symbol 391 MovieClip [lionmenCreep] Frame 1
#initclip 27
Object.registerClass("lionmenCreep", creepsMC);
#endinitclip
stop();
Symbol 391 MovieClip [lionmenCreep] Frame 5
this._alpha = 80;
Symbol 391 MovieClip [lionmenCreep] Frame 9
this._alpha = 60;
Symbol 391 MovieClip [lionmenCreep] Frame 13
this._alpha = 40;
Symbol 391 MovieClip [lionmenCreep] Frame 17
this._alpha = 20;
Symbol 391 MovieClip [lionmenCreep] Frame 21
this._alpha = 1;
Symbol 391 MovieClip [lionmenCreep] Frame 25
stop();
_parent._parent.removeCreepID(ID);
Symbol 391 MovieClip [lionmenCreep] Frame 50
stop();
_parent._parent.addCreepBullet(this._x, this._y, damage, enemyTowerID);
_root.jukeBoxMC.playSound("creepShot");
shooting = false;
if (dead) {
this.gotoAndPlay("explode");
} else {
this.gotoAndStop(1);
}
Symbol 413 MovieClip [lizardMenCreep] Frame 1
#initclip 28
Object.registerClass("lizardMenCreep", creepsMC);
#endinitclip
stop();
Symbol 413 MovieClip [lizardMenCreep] Frame 5
this._alpha = 80;
Symbol 413 MovieClip [lizardMenCreep] Frame 9
this._alpha = 60;
Symbol 413 MovieClip [lizardMenCreep] Frame 13
this._alpha = 40;
Symbol 413 MovieClip [lizardMenCreep] Frame 17
this._alpha = 20;
Symbol 413 MovieClip [lizardMenCreep] Frame 21
this._alpha = 1;
Symbol 413 MovieClip [lizardMenCreep] Frame 25
stop();
_parent._parent.removeCreepID(ID);
Symbol 413 MovieClip [lizardMenCreep] Frame 50
stop();
_parent._parent.addCreepBullet(this._x, this._y, damage, enemyTowerID);
_root.jukeBoxMC.playSound("creepShot");
shooting = false;
if (dead) {
this.gotoAndPlay("explode");
} else {
this.gotoAndStop(1);
}
Symbol 435 MovieClip [menCreep] Frame 1
#initclip 29
Object.registerClass("menCreep", creepsMC);
#endinitclip
stop();
Symbol 435 MovieClip [menCreep] Frame 5
this._alpha = 80;
Symbol 435 MovieClip [menCreep] Frame 9
this._alpha = 60;
Symbol 435 MovieClip [menCreep] Frame 13
this._alpha = 40;
Symbol 435 MovieClip [menCreep] Frame 17
this._alpha = 20;
Symbol 435 MovieClip [menCreep] Frame 21
this._alpha = 1;
Symbol 435 MovieClip [menCreep] Frame 25
stop();
_parent._parent.removeCreepID(ID);
Symbol 435 MovieClip [menCreep] Frame 50
stop();
_parent._parent.addCreepBullet(this._x, this._y, damage, enemyTowerID);
_root.jukeBoxMC.playSound("creepShot");
shooting = false;
if (dead) {
this.gotoAndPlay("explode");
} else {
this.gotoAndStop(1);
}
Symbol 453 MovieClip [ratCreep] Frame 1
#initclip 30
Object.registerClass("ratCreep", creepsMC);
#endinitclip
stop();
Symbol 453 MovieClip [ratCreep] Frame 5
this._alpha = 80;
Symbol 453 MovieClip [ratCreep] Frame 9
this._alpha = 60;
Symbol 453 MovieClip [ratCreep] Frame 13
this._alpha = 40;
Symbol 453 MovieClip [ratCreep] Frame 17
this._alpha = 20;
Symbol 453 MovieClip [ratCreep] Frame 21
this._alpha = 1;
Symbol 453 MovieClip [ratCreep] Frame 25
stop();
_parent._parent.removeCreepID(ID);
Symbol 453 MovieClip [ratCreep] Frame 50
stop();
_parent._parent.addCreepBullet(this._x, this._y, damage, enemyTowerID);
_root.jukeBoxMC.playSound("creepShot");
shooting = false;
if (dead) {
this.gotoAndPlay("explode");
} else {
this.gotoAndStop(1);
}
Symbol 485 MovieClip [trollCreep] Frame 1
#initclip 31
Object.registerClass("trollCreep", creepsMC);
#endinitclip
stop();
Symbol 485 MovieClip [trollCreep] Frame 5
this._alpha = 80;
Symbol 485 MovieClip [trollCreep] Frame 9
this._alpha = 60;
Symbol 485 MovieClip [trollCreep] Frame 13
this._alpha = 40;
Symbol 485 MovieClip [trollCreep] Frame 17
this._alpha = 20;
Symbol 485 MovieClip [trollCreep] Frame 21
this._alpha = 1;
Symbol 485 MovieClip [trollCreep] Frame 25
stop();
_parent._parent.removeCreepID(ID);
Symbol 485 MovieClip [trollCreep] Frame 50
stop();
_parent._parent.addCreepBullet(this._x, this._y, damage, enemyTowerID);
_root.jukeBoxMC.playSound("creepShot");
shooting = false;
if (dead) {
this.gotoAndPlay("explode");
} else {
this.gotoAndStop(1);
}
Symbol 525 MovieClip [wizardCreep] Frame 1
#initclip 32
Object.registerClass("wizardCreep", creepsMC);
#endinitclip
stop();
Symbol 525 MovieClip [wizardCreep] Frame 5
this._alpha = 80;
Symbol 525 MovieClip [wizardCreep] Frame 9
this._alpha = 60;
Symbol 525 MovieClip [wizardCreep] Frame 13
this._alpha = 40;
Symbol 525 MovieClip [wizardCreep] Frame 17
this._alpha = 20;
Symbol 525 MovieClip [wizardCreep] Frame 21
this._alpha = 1;
Symbol 525 MovieClip [wizardCreep] Frame 25
stop();
_parent._parent.removeCreepID(ID);
Symbol 525 MovieClip [wizardCreep] Frame 50
stop();
_parent._parent.addCreepBullet(this._x, this._y, damage, enemyTowerID);
_root.jukeBoxMC.playSound("creepShot");
shooting = false;
if (dead) {
this.gotoAndPlay("explode");
} else {
this.gotoAndStop(1);
}
Symbol 550 MovieClip [map1] Frame 1
var points = new Array();
var nPoints = 23;
var i = 0;
while (i < 50) {
points[i] = new Array();
i++;
}
points[0][0] = 0;
points[0][1] = 32.5;
points[1][0] = 110;
points[1][1] = 69;
points[2][0] = 160;
points[2][1] = 155;
points[3][0] = 187;
points[3][1] = 215;
points[4][0] = 175;
points[4][1] = 273;
points[5][0] = 95;
points[5][1] = 295;
points[6][0] = 70;
points[6][1] = 370;
points[7][0] = 180;
points[7][1] = 442;
points[8][0] = 250;
points[8][1] = 450;
points[9][0] = 320;
points[9][1] = 440;
points[10][0] = 410;
points[10][1] = 450;
points[11][0] = 495;
points[11][1] = 470;
points[12][0] = 595;
points[12][1] = 420;
points[13][0] = 575;
points[13][1] = 370;
points[14][0] = 475;
points[14][1] = 280;
points[15][0] = 405;
points[15][1] = 240;
points[16][0] = 385;
points[16][1] = 170;
points[17][0] = 455;
points[17][1] = 135;
points[18][0] = 540;
points[18][1] = 190;
points[19][0] = 610;
points[19][1] = 188;
points[20][0] = 630;
points[20][1] = 110;
points[21][0] = 565;
points[21][1] = 45;
points[22][0] = 515;
points[22][1] = -20;
var levels = new Array();
var nLevels = 40;
var i = 0;
while (i < 50) {
levels[i] = new Object();
i++;
}
levels[0].creeps = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[0].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[0].life = [16, 16, 16, 16, 16, 16, 16, 16, 16, 16];
levels[0].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[0].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[0].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[0].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[0].desc = "Rat scouts leading the way. Be careful.\r";
levels[0].desc = levels[0].desc + "20 Rats HP:16";
levels[1].creeps = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
levels[1].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[1].life = [24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24];
levels[1].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[1].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[1].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[1].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[1].desc = "Goblin wave, first battalion.";
levels[1].desc = levels[1].desc + "\r20 Goblins HP:24";
levels[2].creeps = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[2].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[2].life = [30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30];
levels[2].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[2].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[2].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[2].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[2].desc = "Human assassins have joined in and attacking...";
levels[2].desc = levels[2].desc + "\r20 Human Assassins HP:30";
levels[3].creeps = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1];
levels[3].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[3].life = [40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40];
levels[3].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[3].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[3].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[3].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[3].desc = " Rats and Goblins fighting together.";
levels[3].desc = levels[3].desc + "\r20 Rats and Goblins HP:40";
levels[4].creeps = [0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2];
levels[4].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[4].life = [44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44];
levels[4].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[4].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[4].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[4].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[4].desc = "Rats leading the way fallowed by battalions of Human Assassins...";
levels[4].desc = levels[4].desc + "\r20 Rats and Human assassins HP:44";
levels[5].creeps = [1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 1, 1, 1, 1, 2, 2, 2, 1, 2, 2];
levels[5].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[5].life = [60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60];
levels[5].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[5].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[5].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[5].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[5].desc = "Goblin army and Humans have teamed up. They are determined to break your defense.";
levels[5].desc = levels[5].desc + "\r20 Goblins and Humans HP:60";
levels[6].creeps = [0, 0, 0, 1, 1, 2, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 0, 0, 0];
levels[6].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[6].life = [80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80];
levels[6].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[6].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[6].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[6].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[6].desc = "All the armies are against you. They think you are weak and are after your head Prove them wrong!";
levels[6].desc = levels[6].desc + "\r20 Rats Goblins and Humans HP:80";
levels[7].creeps = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
levels[7].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[7].life = [120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120];
levels[7].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[7].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[7].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[7].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[7].desc = "Well done, you have manage to survive the plot... but the war is far from over... some goblins refuse defeat.";
levels[7].desc = levels[7].desc + "\r20 Goblins HP:120";
levels[8].creeps = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[8].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[8].life = [155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155, 155];
levels[8].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[8].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[8].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[8].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[8].desc = "Assassins refuse also...";
levels[8].desc = levels[8].desc + "\r20 Assassins HP:155";
levels[9].creeps = [9];
levels[9].speed = [2.5];
levels[9].life = [950];
levels[9].damage = [2];
levels[9].range = [150];
levels[9].val = [60];
levels[9].shooting = [0];
levels[9].desc = "THE BOSS... team up!";
levels[9].desc = levels[9].desc + "\rBoss HP:950";
levels[10].creeps = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[10].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[10].life = [170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170, 170];
levels[10].damage = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5];
levels[10].range = [120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120];
levels[10].val = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[10].shooting = [0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0];
levels[10].desc = "Goblin archers... Some of them are armed. Beware.";
levels[10].desc = levels[10].desc + "\r20 Goblin Archers HP:170";
levels[11].creeps = [1, 1, 3, 1, 1, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 1, 1, 3, 1];
levels[11].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[11].life = [210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210, 210];
levels[11].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[11].range = [120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120];
levels[11].val = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[11].shooting = [0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0];
levels[11].desc = "A great goblin army is on the horizon. They are attacking your settlement. Defend your self.";
levels[11].desc = levels[11].desc + "\r20 Goblin and Goblin Archers HP:210";
levels[12].creeps = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[12].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[12].life = [250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, 250];
levels[12].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[12].range = [120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120];
levels[12].val = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[12].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[12].desc = "The enemies have invoked every possible forces. The dark side has joined the enemy. Demons... tough demons...";
levels[12].desc = levels[12].desc + "\r20 Demons HP:250";
levels[13].creeps = [4, 4, 3, 4, 4, 3, 4, 4, 3, 3, 3, 3, 4, 4, 3, 4, 4, 3, 4, 4];
levels[13].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[13].life = [320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320, 320];
levels[13].damage = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[13].range = [120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120, 120];
levels[13].val = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[13].shooting = [0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0];
levels[13].desc = "Goblin archers and demons... they are the toughest enemies yet. Prepare your self!";
levels[13].desc = levels[13].desc + "\r20 Goblin Archers and Demons HP:320";
levels[14].creeps = [5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5];
levels[14].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[14].life = [350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350, 350];
levels[14].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[14].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[14].val = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[14].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[14].desc = "Beasts from hell... Lion Men creeps are attacking...";
levels[14].desc = levels[14].desc + "\r20 Lion Men HP:350";
levels[15].creeps = [5, 5, 6, 6, 5, 5, 5, 6, 6, 5, 5, 5, 5, 6, 6, 6, 5, 5, 6, 6];
levels[15].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[15].life = [370, 370, 370, 370, 370, 370, 370, 370, 370, 370, 370, 370, 370, 370, 370, 370, 370, 370, 370, 370];
levels[15].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[15].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[15].val = [4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4];
levels[15].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[15].desc = "Lion man and Lizard men are being invoked. They're attacking. Stand Up!";
levels[15].desc = levels[15].desc + "\r20 Lion Men and Lizard Men HP:370";
levels[16].creeps = [6, 6, 5, 5, 5, 5, 4, 4, 4, 6, 4, 4, 4, 5, 5, 5, 5, 5, 6, 6];
levels[16].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[16].life = [470, 470, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 420, 470, 470];
levels[16].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[16].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[16].val = [6, 6, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 6, 6];
levels[16].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[16].desc = "Destroy those creeps. Kill them all.";
levels[16].desc = levels[16].desc + "\r20 Demons, Lion Men and Lizard Men HP:420";
levels[17].creeps = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
levels[17].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[17].life = [480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480, 480];
levels[17].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[17].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[17].val = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
levels[17].shooting = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
levels[17].desc = "Lizard attack... is it magic?";
levels[17].desc = levels[17].desc + "\r20 Lizard Men HP:480";
levels[18].creeps = [4, 5, 6, 4, 4, 5, 5, 6, 6, 5, 5, 4, 4, 6, 5, 4, 5, 6, 5, 4];
levels[18].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[18].life = [670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670, 670];
levels[18].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[18].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[18].val = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
levels[18].shooting = [0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0];
levels[18].desc = "Demons, Lizard Mens and Lion Mens HP:670";
levels[19].creeps = [9];
levels[19].speed = [2.5];
levels[19].life = [6900];
levels[19].damage = [10];
levels[19].range = [150];
levels[19].val = [200];
levels[19].shooting = [1];
levels[19].desc = "T'Paw, leader of the insurgents armies is attacking.";
levels[19].desc = levels[19].desc + "\rT'Paw wizard HP:6900";
levels[20].creeps = [3, 2, 4, 5, 6, 3, 4, 2, 5, 6, 3, 4, 5, 6, 1, 3, 2, 4, 5, 6];
levels[20].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[20].life = [700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700, 700];
levels[20].damage = [5, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0];
levels[20].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[20].val = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
levels[20].shooting = [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0];
levels[20].desc = "Several armies together. Take care of those archers!";
levels[20].desc = levels[20].desc + "\r20 Men, Goblin archers, Demons, Lizard Mens and Lion Mens HP:700";
levels[21].creeps = [0, 6, 0, 5, 0, 6, 0, 5, 0, 6, 0, 5, 0, 6, 0, 5, 0, 6, 0, 5];
levels[21].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[21].life = [780, 780, 780, 780, 780, 780, 780, 780, 780, 780, 780, 780, 780, 780, 780, 780, 780, 780, 780, 780];
levels[21].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[21].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[21].val = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
levels[21].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[21].desc = "Rat scouts escorting Lion Men and Lizard Men leaders to safety. Show them who's boss!";
levels[21].desc = levels[21].desc + "\r20 Rats lion Mens and Lizard Mens HP:780";
levels[22].creeps = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[22].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[22].life = [850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850, 850];
levels[22].damage = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
levels[22].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[22].val = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
levels[22].shooting = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
levels[22].desc = "Creeps are fallowing the plan exactly, they're only purpose is to destroy your defense... Archers!!!";
levels[22].desc = levels[22].desc + "\r20 Goblin Archers HP:850";
levels[23].creeps = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[23].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[23].life = [900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900, 900];
levels[23].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[23].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[23].val = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
levels[23].shooting = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
levels[23].desc = "The second wave of destruction... Defend your self.";
levels[23].desc = levels[23].desc + "\r20 Goblin Archers HP:900";
levels[24].creeps = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[24].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[24].life = [1080, 980, 980, 980, 1080, 980, 980, 980, 980, 980, 1080, 980, 980, 980, 980, 1080, 980, 980, 980, 980];
levels[24].damage = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[24].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[24].val = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
levels[24].shooting = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
levels[24].desc = "Our scouts are predicting another wave of demolitions... Are they right?";
levels[24].desc = levels[24].desc + "\r20 Goblin Archers HP:980";
levels[25].creeps = [2, 2, 4, 4, 5, 5, 6, 6, 5, 5, 4, 4, 2, 2, 1, 1, 0, 0, 2, 2];
levels[25].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[25].life = [1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050, 1050];
levels[25].damage = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3];
levels[25].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[25].val = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
levels[25].shooting = [0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0];
levels[25].desc = "Good job soldier. So far so good. Creeps believe you're finished. Group together and prove them wrong.";
levels[25].desc = levels[25].desc + "\r20 Rats, Men, Goblins, Lion Mens and Lizard Mens HP:1050";
levels[26].creeps = [5, 2, 3, 4, 6, 5, 6, 1, 0, 2, 6, 3, 4, 2, 0, 1, 4, 3, 5, 6];
levels[26].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[26].life = [1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150, 1150];
levels[26].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[26].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[26].val = [6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6];
levels[26].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[26].desc = "Fight till the last men standing. We must not go down...";
levels[26].desc = levels[26].desc + "\r20 Rats, Goblins, Goblin Archers, Mens, Demons, Lion Mens, Lizard Mens HP:1150";
levels[27].creeps = [0, 3, 5, 1, 4, 5, 0, 2, 3, 6, 1, 0, 4, 5, 2, 3, 0, 2, 1, 4];
levels[27].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[27].life = [1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250];
levels[27].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[27].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[27].val = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8];
levels[27].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[27].desc = "Rumors are saying we will face a secret alliance soon... Anything but the trolls! We'll be doomed!";
levels[27].desc = levels[27].desc + "\r20 Rats, Goblins, Goblin Archers, Mens, Demons, Lion Mens, Lizard Mens HP:1250";
levels[28].creeps = [7, 6, 6, 6, 6, 6, 6, 7, 6, 6, 6, 6, 6, 6, 7, 6, 6, 6, 6, 6];
levels[28].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[28].life = [1500, 1300, 1200, 1300, 1200, 1300, 1200, 1300, 1200, 1300, 1500, 1200, 1300, 1200, 1300, 1200, 1300, 1200, 1300, 1200];
levels[28].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[28].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[28].val = [8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8];
levels[28].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[28].desc = "Our biggest fear has come true, the trolls have joined the alliance. They're scouts are preparing they're path.";
levels[28].desc = levels[28].desc + "\r20 Trolls and Lizard Mens HP:1300";
levels[29].creeps = [9];
levels[29].speed = [2.5];
levels[29].life = [9500];
levels[29].damage = [10];
levels[29].range = [130];
levels[29].val = [300];
levels[29].shooting = [1];
levels[29].desc = "Tiso'o, almighty saucer is attacking your settlement.";
levels[29].desc = levels[29].desc + "\rTiso'o Wizard HP:9500";
levels[30].creeps = [7, 7, 3, 3, 3, 3, 3, 7, 7, 6, 6, 6, 6, 7, 7, 3, 6, 3, 6, 3];
levels[30].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[30].life = [1500, 1500, 1300, 1300, 1300, 1300, 1300, 1500, 1500, 1300, 1300, 1300, 1300, 1500, 1500, 1300, 1300, 1300, 1300, 1300];
levels[30].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[30].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[30].val = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10];
levels[30].shooting = [0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1];
levels[30].desc = "From the previous attack, trolls are confident they can break our defense. They sent more scouts, more prepared than last time.";
levels[30].desc = levels[30].desc + "\r20 Trolls and Goblin Archers HP:1400";
levels[31].creeps = [7, 3, 6, 4, 7, 4, 5, 2, 1, 7, 0, 3, 5, 7, 4, 6, 3, 1, 5, 7];
levels[31].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[31].life = [2300, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 1900, 2300, 1900, 1900, 1900, 1900, 1900, 2300];
levels[31].damage = [2, 10, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 2, 2, 2, 2, 10, 2, 2, 2];
levels[31].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[31].val = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10];
levels[31].shooting = [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0];
levels[31].desc = "That was tough. These trolls complicated our lives a lot. But we'll get over this. We have to... It's our only hope!";
levels[31].desc = levels[31].desc + "\r20 Rats, Goblins, Goblin Archers, Mens, Demons, Lion Mens, Lizard Mens and Trolls HP:1900";
levels[32].creeps = [7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6, 7, 6];
levels[32].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[32].life = [2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000, 2000];
levels[32].damage = [2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5, 2, 5];
levels[32].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[32].val = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10];
levels[32].shooting = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1];
levels[32].desc = "Everything suggests the war is eminent. All we can do is unite our forces and do our best!";
levels[32].desc = levels[32].desc + "\r20 Trolls and Lizard Mens HP:2000";
levels[33].creeps = [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7];
levels[33].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[33].life = [2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400, 2400];
levels[33].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[33].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[33].val = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10];
levels[33].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[33].desc = "It has begun. GOD HELP US ALL! Attack!!!";
levels[33].desc = levels[33].desc + "\r20 Trolls HP:2400";
levels[34].creeps = [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7];
levels[34].speed = [2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5, 2.5];
levels[34].life = [2700, 2600, 2700, 2600, 2700, 2600, 2700, 2600, 2700, 2600, 2700, 2600, 2700, 2600, 2700, 2600, 2700, 2600, 2700, 2600];
levels[34].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[34].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[34].val = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10];
levels[34].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[34].desc = "We've won that battle but isn't over. Trolls are regrouping and launches counter attacks. They must not pass trough.";
levels[34].desc = levels[34].desc + "\r20 Trolls HP:2600";
levels[35].creeps = [8, 7, 7, 7, 7, 7, 7, 7, 7, 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8];
levels[35].speed = [2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6];
levels[35].life = [3600, 2900, 2900, 2900, 2900, 2900, 2900, 2900, 2900, 3600, 2900, 2900, 2900, 2900, 2900, 2900, 2900, 2900, 2900, 3600];
levels[35].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[35].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[35].val = [20, 10, 10, 10, 10, 10, 10, 10, 10, 20, 10, 10, 10, 10, 10, 10, 10, 10, 10, 20];
levels[35].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[35].desc = "Trolls are puzzled. Your defense is tough to break. They are using they're secret weapon. Battlegores are invoked to fight.";
levels[35].desc = levels[35].desc + "\r20 Trolls and BattleGores HP:3000";
levels[36].creeps = [8, 7, 7, 7, 7, 8, 7, 7, 7, 8, 7, 7, 7, 7, 8, 7, 7, 7, 7, 8];
levels[36].speed = [2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6, 2.6];
levels[36].life = [3600, 3100, 3100, 2950, 2950, 3600, 3100, 3100, 2950, 3600, 2950, 3100, 2900, 3100, 3600, 3100, 2950, 3100, 2950, 3600];
levels[36].damage = [2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2];
levels[36].range = [130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, 130];
levels[36].val = [20, 10, 10, 10, 10, 20, 10, 10, 10, 20, 10, 10, 10, 10, 20, 10, 10, 10, 10, 20];
levels[36].shooting = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
levels[36].desc = "Creeps are giving everything they got. I suggest you do the same...";
levels[36].desc = levels[36].desc + "\r20 Trolls and BattleGores HP:3200";
levels[37].creeps = [9, 8, 7, 7, 9, 8, 7, 7, 9, 8, 7, 7, 9, 8, 7, 7, 9, 8, 7, 7];
levels[37].speed = [2.8, 2.8, 2.8, 2.8, 2.8, 2.8, 2.8, 2.8, 2.8, 2.8, 2.8, 2.8, 2.8, 2.8, 2.8, 2.8, 2.8, 2.8, 2.8, 2.8];
levels[37].life = [3700, 3400, 3300, 3300, 3700, 3400, 3300, 3300, 3700, 3400, 3300, 3300, 3700, 3400, 3300, 3300, 3700, 3400, 3300, 3300];
levels[37].damage = [20, 2, 2, 2, 20, 2, 2, 2, 20, 2, 2, 2, 20, 2, 2, 2, 20, 2, 2, 2];
levels[37].range = [100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100, 100];
levels[37].val = [20, 10, 10, 10, 20, 10, 10, 10, 20, 10, 10, 10, 20, 10, 10, 10, 20, 10, 10, 10];
levels[37].shooting = [1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0];
levels[37].desc = "The troll imperial army is passing trough. Don't let that happened. They must not reach our city walls.";
levels[37].desc = levels[37].desc + "\r20 Trolls, Wizards and BattleGores HP:3300";
levels[38].creeps = [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9];
levels[38].speed = [2.8, 2.8, 2.8, 2.8, 2.8, 2.8, 2.8, 2.8, 2.8, 2.8, 2.8, 2.8, 2.8, 2.8, 2.8, 2.8, 2.8, 2.8, 2.8, 2.8];
levels[38].life = [3800, 3800, 3800, 3800, 3800, 3800, 3800, 3800, 3800, 3800, 3800, 3800, 3800, 3800, 3800, 3800, 3800, 3800, 3800, 3800];
levels[38].damage = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10];
levels[38].range = [150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150];
levels[38].val = [20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20];
levels[38].shooting = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
levels[38].desc = "Well done. Scouts inform us that trolls themselves are breaking lines and run for they're life. Wizards are sent to fight.";
levels[36].desc = levels[36].desc + "\r20 Wizards HP:3800";
levels[39].creeps = [9, 8, 8, 8, 9];
levels[39].speed = [3, 3, 3, 3, 3];
levels[39].life = [9000, 14000, 14000, 14000, 9000];
levels[39].damage = [20, 2, 2, 2, 20];
levels[39].range = [150, 150, 150, 150, 150];
levels[39].val = [20, 40, 40, 40, 20];
levels[39].shooting = [1, 0, 0, 0, 1];
levels[39].desc = "5 Wizards and BattleGores HP:12000";
Symbol 624 MovieClip [toolBarMC] Frame 1
#initclip 33
Object.registerClass("toolBarMC", toolBarMC);
#endinitclip
Symbol 625 MovieClip [creepBulletMC] Frame 1
#initclip 34
Object.registerClass("creepBulletMC", creepBulletMC);
#endinitclip
stop();
Symbol 625 MovieClip [creepBulletMC] Frame 5
stop();
Symbol 625 MovieClip [creepBulletMC] Frame 15
stop();
_parent._parent.removeBulletID(ID);
Symbol 630 MovieClip [pointerMC] Frame 1
#initclip 35
Object.registerClass("pointerMC", pointerMC);
#endinitclip
stop();
Symbol 630 MovieClip [pointerMC] Frame 10
this.nHP = 4;
this.hitPoints[0][0] = -13;
this.hitPoints[0][1] = -23;
this.hitPoints[1][0] = -20;
this.hitPoints[1][1] = 23;
this.hitPoints[2][0] = 13;
this.hitPoints[2][1] = -23;
this.hitPoints[3][0] = 20;
this.hitPoints[3][1] = 23;
Symbol 630 MovieClip [pointerMC] Frame 20
this.nHP = 4;
this.hitPoints[0][0] = -12;
this.hitPoints[0][1] = -15;
this.hitPoints[1][0] = -16;
this.hitPoints[1][1] = 30;
this.hitPoints[2][0] = 12;
this.hitPoints[2][1] = -15;
this.hitPoints[3][0] = 16;
this.hitPoints[3][1] = 30;
Symbol 630 MovieClip [pointerMC] Frame 30
this.nHP = 4;
this.hitPoints[0][0] = -13;
this.hitPoints[0][1] = -20;
this.hitPoints[1][0] = -14;
this.hitPoints[1][1] = 23;
this.hitPoints[2][0] = 13;
this.hitPoints[2][1] = -20;
this.hitPoints[3][0] = 14;
this.hitPoints[3][1] = 23;
Symbol 630 MovieClip [pointerMC] Frame 40
this.nHP = 4;
this.hitPoints[0][0] = -14;
this.hitPoints[0][1] = -23;
this.hitPoints[1][0] = -15;
this.hitPoints[1][1] = 23;
this.hitPoints[2][0] = 14;
this.hitPoints[2][1] = -23;
this.hitPoints[3][0] = 15;
this.hitPoints[3][1] = 23;
Symbol 630 MovieClip [pointerMC] Frame 50
this.nHP = 4;
this.hitPoints[0][0] = -14;
this.hitPoints[0][1] = -23;
this.hitPoints[1][0] = -15;
this.hitPoints[1][1] = 23;
this.hitPoints[2][0] = 14;
this.hitPoints[2][1] = -23;
this.hitPoints[3][0] = 15;
this.hitPoints[3][1] = 23;
Symbol 630 MovieClip [pointerMC] Frame 60
this.nHP = 4;
this.hitPoints[0][0] = -14;
this.hitPoints[0][1] = -30;
this.hitPoints[1][0] = -15;
this.hitPoints[1][1] = 23;
this.hitPoints[2][0] = 14;
this.hitPoints[2][1] = -30;
this.hitPoints[3][0] = 15;
this.hitPoints[3][1] = 23;
Symbol 645 Button
on (release) {
Mouse.show();
_global.link = "menu";
_root.faderMC.play();
}
Symbol 657 Button
on (release) {
_parent.play();
}
Symbol 662 MovieClip Frame 1
stop();
Symbol 662 MovieClip Frame 15
stop();
Symbol 667 MovieClip Frame 1
stop();
if (!_global.sound) {
gotoAndStop (2);
}
Instance of Symbol 665 MovieClip in Symbol 667 MovieClip Frame 1
on (release) {
_global.sound = false;
_root.jukeBoxMC.stopSounds();
_parent.gotoAndStop(2);
}
Symbol 667 MovieClip Frame 2
stop();
Instance of Symbol 665 MovieClip in Symbol 667 MovieClip Frame 2
on (release) {
_global.sound = true;
_root.jukeBoxMC.playLoop("inGame");
_parent.gotoAndStop(1);
}
Symbol 672 Button
on (release) {
getURL ("http://www.dragongamez.com", "_blank");
}
Symbol 675 MovieClip Frame 1
stop();
Symbol 676 MovieClip [Director] Frame 1
#initclip 36
Object.registerClass("Director", Director);
#endinitclip
Symbol 681 MovieClip Frame 1
stop();
if (!_global.sound) {
gotoAndStop (2);
}
Instance of Symbol 665 MovieClip in Symbol 681 MovieClip Frame 1
on (release) {
_global.sound = false;
_root.jukeBoxMC.stopSounds();
_parent.gotoAndStop(2);
}
Symbol 681 MovieClip Frame 2
stop();
Instance of Symbol 665 MovieClip in Symbol 681 MovieClip Frame 2
on (release) {
_global.sound = true;
_root.jukeBoxMC.playLoop("menu");
_parent.gotoAndStop(1);
}
Symbol 689 Button
on (release) {
_global.link = "game";
_root.faderMC.play();
}
Symbol 690 Button
on (release) {
_global.link = "wallFame";
_root.faderMC.play();
}
Symbol 691 Button
on (release) {
_global.link = "instructions";
_root.faderMC.play();
}
Symbol 692 Button
on (release) {
getURL ("http://www.dragongamez.com/", "_blank");
}
Symbol 724 Button
on (release) {
_global.link = "menu";
_root.faderMC.play();
}
Symbol 729 Button
on (release) {
if (nameField.text != "") {
_global.playerName = nameField.text;
_global.link = "submitHS";
_root.faderMC.play();
}
}
Symbol 734 Button
on (release) {
getURL ("http://www.dragongamez.com", "_blank");
}
Symbol 752 Button
on (release) {
_global.link = "menu";
_root.faderMC.play();
}
Symbol 757 Button
on (release) {
nextFrame();
}
Symbol 769 Button
on (release) {
prevFrame();
}
Symbol 807 MovieClip Frame 1
stop();
Symbol 807 MovieClip Frame 2
stop();
Symbol 807 MovieClip Frame 3
stop();
Symbol 807 MovieClip Frame 4
stop();
Symbol 807 MovieClip Frame 5
stop();