Frame 1
stop();
Instance of Symbol 59 MovieClip "cursor" in Frame 1
onClipEvent (enterFrame) {
this.swapDepths(1000000);
}
onClipEvent (enterFrame) {
Mouse.hide();
this._x = _root._xmouse;
this._y = _root._ymouse;
}
Frame 2
stop();
Instance of Symbol 63 MovieClip "wall" in Frame 2
onClipEvent (load) {
maxhealth = 100;
health = 100;
}
onClipEvent (enterFrame) {
healthpercent = (health / maxhealth) * 100;
healcost = Math.round((maxhealth - health) * 25);
healcostshow = "$" + healcost;
current = "Max: " + maxhealth;
if (health <= 0) {
_root.gotoAndStop("lose");
}
}
Instance of Symbol 69 MovieClip "fletcher" in Frame 2
onClipEvent (load) {
bought = 0;
counter = 0;
}
on (press) {
if ((bought == 0) && (_root.control.money >= 1000)) {
bought = 1;
_root.control.money = _root.control.money - 1000;
this.gotoAndStop("bought");
}
}
onClipEvent (enterFrame) {
if (bought == 1) {
if (counter >= 360) {
_root.control.bows++;
counter = 0;
} else {
counter++;
}
}
}
Instance of Symbol 79 MovieClip in Frame 2
onClipEvent (load) {
bought = 0;
}
on (press) {
if (((bought == 1) && (_root.control.money >= 500)) && (_root.control.bows >= 1)) {
_root.control.archers = _root.control.archers + 1;
_root.control.money = _root.control.money - 500;
_root.control.bows = _root.control.bows - 1;
}
if ((bought == 0) && (_root.control.money >= 2000)) {
bought = 1;
_root.control.money = _root.control.money - 2000;
this.gotoAndStop("bought");
}
}
Instance of Symbol 86 MovieClip in Frame 2
onClipEvent (load) {
bought = 0;
}
on (press) {
if ((bought == 1) && (_root.control.money >= _root.control.upgrade)) {
_root.control.towerlvl = _root.control.towerlvl + 1;
_root.control.money = _root.control.money - _root.control.upgrade;
}
if ((bought == 0) && (_root.control.money >= 5000)) {
bought = 1;
_root.control.towerlvl = _root.control.towerlvl + 1;
_root.control.money = _root.control.money - 5000;
this.gotoAndStop("bought");
}
}
Instance of Symbol 89 MovieClip in Frame 2
on (press) {
if (_root.control.money >= _root.wall.healcost) {
_root.control.money = _root.control.money - _root.wall.healcost;
_root.wall.health = _root.wall.maxhealth;
}
}
Instance of Symbol 92 MovieClip in Frame 2
on (press) {
if (_root.control.money >= 2500) {
_root.control.money = _root.control.money - 2500;
_root.wall.maxhealth = _root.wall.maxhealth + 50;
_root.wall.health = _root.wall.health + 50;
}
}
Instance of Symbol 119 MovieClip "soldier" in Frame 2
onClipEvent (load) {
maxNumber = 200;
minNumber = 50;
randomNumber = Math.round(Math.random() * maxNumber) + minNumber;
_x = randomNumber;
_y = -20;
speed = 1;
dead = 1;
}
onClipEvent (enterFrame) {
_y = (_y + speed);
if (this.hitTest(_root.wall) && (dead == 1)) {
speed = 0;
_root.wall.health = _root.wall.health - 0.05;
gotoAndStop ("fight");
}
if (this.body.hitTest(_root.red)) {
if (dead == 1) {
this.gotoAndStop("squish");
speed = 0;
_root.control.money = _root.control.money + 30;
_root.control.kills++;
dead = 0;
}
}
if (this.body.hitTest(_root.ball)) {
if (dead == 1) {
this.gotoAndStop("squish");
speed = 0;
_root.control.money = _root.control.money + 30;
_root.control.kills++;
dead = 0;
}
}
}
on (press) {
if (dead == 1) {
this.gotoAndStop("die");
speed = 0;
_root.control.money = _root.control.money + 30;
_root.control.kills++;
dead = 0;
}
}
onClipEvent (enterFrame) {
if (this._y > 100) {
if (dead == 1) {
number = Math.random() * 1000;
if (number <= (_root.control.archers / 3)) {
this.gotoAndStop("arrow");
speed = 0;
_root.control.money = _root.control.money + 30;
_root.control.kills++;
dead = 0;
}
}
}
}
onClipEvent (enterFrame) {
frame = _root._currentframe;
if (frame == 3) {
this.gotoAndStop("die");
}
}
Instance of Symbol 143 MovieClip "macemen" in Frame 2
onClipEvent (load) {
maxNumber = 200;
minNumber = 50;
randomNumber = Math.round(Math.random() * maxNumber) + minNumber;
if (_root.control.wave >= 3) {
_x = randomNumber;
_y = -20;
}
speed = 1.5;
dead = 1;
clickcount = 0;
}
onClipEvent (enterFrame) {
if (_root.control.wave <= 2) {
_y = -340;
}
_y = (_y + speed);
if (this.hitTest(_root.wall) && (dead == 1)) {
speed = 0;
_root.wall.health = _root.wall.health - 0.1;
gotoAndStop ("fight");
}
if (this.body.hitTest(_root.red)) {
if (dead == 1) {
this.gotoAndStop("squish");
speed = 0;
_root.control.money = _root.control.money + 50;
_root.control.kills++;
dead = 0;
}
}
if (this.body.hitTest(_root.ball)) {
if (dead == 1) {
this.gotoAndStop("squish");
speed = 0;
_root.control.money = _root.control.money + 50;
_root.control.kills++;
dead = 0;
}
}
}
on (press) {
if ((dead == 1) && (clickcount == 1)) {
this.gotoAndStop("die");
speed = 0;
_root.control.money = _root.control.money + 50;
_root.control.kills++;
dead = 0;
}
if ((dead == 1) && (clickcount == 0)) {
clickcount++;
}
}
onClipEvent (enterFrame) {
if (this._y > 100) {
if (dead == 1) {
number = Math.random() * 1000;
if (number <= (_root.control.archers / 5)) {
if (clickcount == 1) {
this.gotoAndStop("arrow");
speed = 0;
_root.control.money = _root.control.money + 50;
_root.control.kills++;
dead = 0;
}
if (clickcount == 0) {
clickcount = clickcount + 1;
}
}
}
}
}
onClipEvent (enterFrame) {
frame = _root._currentframe;
if (frame == 3) {
this.gotoAndStop("die");
}
}
Instance of Symbol 168 MovieClip "knight" in Frame 2
onClipEvent (load) {
maxNumber = 200;
minNumber = 50;
randomNumber = Math.round(Math.random() * maxNumber) + minNumber;
if (_root.control.wave >= 4) {
_x = randomNumber;
_y = -20;
}
speed = 0.75;
dead = 1;
clickcount = 0;
}
onClipEvent (enterFrame) {
if (_root.control.wave <= 4) {
_y = -175;
}
_y = (_y + speed);
if (this.hitTest(_root.wall) && (dead == 1)) {
speed = 0;
_root.wall.health = _root.wall.health - 0.3;
gotoAndStop ("fight");
}
if (this.body.hitTest(_root.red)) {
if (dead == 1) {
this.gotoAndStop("squish");
speed = 0;
_root.control.money = _root.control.money + 100;
_root.control.kills++;
dead = 0;
}
}
if (this.body.hitTest(_root.ball)) {
if (dead == 1) {
this.gotoAndStop("squish");
speed = 0;
_root.control.money = _root.control.money + 100;
_root.control.kills++;
dead = 0;
}
}
}
on (press) {
if ((dead == 1) && (clickcount == 4)) {
this.gotoAndStop("die");
speed = 0;
_root.control.money = _root.control.money + 100;
_root.control.kills++;
dead = 0;
}
if ((dead == 1) && (clickcount < 5)) {
clickcount++;
}
}
onClipEvent (enterFrame) {
if (this._y > 100) {
if (dead == 1) {
number = Math.random() * 1000;
if (number <= (_root.control.archers / 10)) {
if (clickcount == 4) {
this.gotoAndStop("arrow");
speed = 0;
_root.control.money = _root.control.money + 50;
_root.control.kills++;
dead = 0;
}
if (clickcount < 5) {
clickcount = clickcount + 1;
}
}
}
}
}
onClipEvent (enterFrame) {
frame = _root._currentframe;
if (frame == 3) {
this.gotoAndStop("die");
}
}
Instance of Symbol 191 MovieClip "mage" in Frame 2
onClipEvent (load) {
maxNumber = 200;
minNumber = 50;
randomNumber = Math.round(Math.random() * maxNumber) + minNumber;
_x = randomNumber;
_y = -20;
speed = 1;
dead = 1;
clickcount = 0;
}
onClipEvent (enterFrame) {
if (_root.control.wave <= 6) {
_y = -230;
}
_y = (_y + speed);
if (this.hitTest(_root.wall) && (dead == 1)) {
speed = 0;
_root.wall.health = _root.wall.health - 0.3;
gotoAndStop ("fight");
}
if (this.hitTest(_root.red)) {
if (dead == 1) {
_y = (_y - 30);
speed = 1;
this.gotoAndStop("teleport");
}
}
if (this.hitTest(_root.ball)) {
if (dead == 1) {
_y = (_y - 30);
this.gotoAndStop("teleport");
speed = 1;
}
}
}
on (press) {
if ((dead == 1) && (clickcount == 4)) {
this.gotoAndStop("die");
speed = 0;
_root.control.money = _root.control.money + 200;
_root.control.kills++;
dead = 0;
}
if ((dead == 1) && (clickcount < 4)) {
clickcount++;
}
}
onClipEvent (enterFrame) {
frame = _root._currentframe;
if (frame == 3) {
this.gotoAndStop("die");
}
}
Instance of Symbol 195 MovieClip "red" in Frame 2
onClipEvent (load) {
speed = 0;
oldpos = 0;
newpos = this._x;
}
onClipEvent (enterFrame) {
this._x = _root._xmouse;
this.swapDepths(999999);
}
onClipEvent (enterFrame) {
oldpos = newpos;
newpos = this._x;
speed = newpos - oldpos;
}
Instance of Symbol 197 MovieClip "ball" in Frame 2
onClipEvent (load) {
maxNumber = 10;
minNumber = 1;
xspeed = Math.round(Math.random() * maxNumber) + minNumber;
yspeed = -8;
this.swapDepths(999997);
}
onClipEvent (enterFrame) {
_x = (_x + xspeed);
_y = (_y + yspeed);
}
onClipEvent (enterFrame) {
if (this._x > 300) {
if (xspeed > 0) {
xspeed = xspeed * -1;
}
}
if (this._x < 0) {
if (xspeed < 0) {
xspeed = xspeed * -1;
}
}
if (this._y < 0) {
if (yspeed < 0) {
yspeed = yspeed * -1;
}
}
if (this.hitTest(_root.line)) {
if (yspeed > 0) {
yspeed = yspeed * -1;
}
_root.wall.health = _root.wall.health - 5;
if (_root.control.archers >= Math.floor(_root.control.wave / 10)) {
_root.control.archers = _root.control.archers - Math.floor(_root.control.wave / 10);
}
}
if (this.hitTest(_root.red)) {
if (yspeed > 0) {
yspeed = yspeed * -1;
}
xspeed = xspeed + _root.red.speed;
}
if (xspeed > 12) {
xspeed = 15;
}
if (xspeed < -12) {
xspeed = -15;
}
}
onClipEvent (enterFrame) {
frame = _root._currentframe;
if (frame == 2) {
if ((this._y > 300) && (yspeed > 0)) {
number = Math.random() * 150;
if (number <= _root.control.towerlvl) {
yspeed = yspeed * -1;
_root.poof._x = _x;
_root.poof._y = _y;
_root.poof.gotoAndPlay("begin");
}
}
}
}
Instance of Symbol 203 MovieClip "poof" in Frame 2
onClipEvent (load) {
this.swapDepths(999998);
}
Instance of Symbol 209 MovieClip "control" in Frame 2
onClipEvent (load) {
count = 0;
namer = 0;
money = 0;
soldiers = 0;
wave = 1;
archers = 0;
bows = 0;
towerlvl = 0;
macemen = 0;
knights = 0;
count2 = 0;
namer2 = 0;
namer3 = 0;
count3 = 0;
namer4 = 0;
count4 = 0;
kills = 0;
mages = 0;
maxmages = 0;
}
onClipEvent (enterFrame) {
showtower = "Level: " + towerlvl;
maxsoldiers = 20 * wave;
wavename = "WAVE: " + wave;
upgrade = 1000 * (towerlvl + 1);
upgradeshow = "Upgrade: $" + upgrade;
if (wave >= 3) {
maxmacemen = 10 * wave;
} else {
maxmacemen = 0;
}
if (wave >= 5) {
maxknights = 5 * wave;
} else {
maxknights = 0;
}
if (wave >= 7) {
maxmages = 2 * wave;
} else {
maxmages = 0;
}
}
onClipEvent (enterFrame) {
if (soldiers < maxsoldiers) {
if (count > 20) {
_root.soldier.duplicateMovieClip(namer, namer++);
count = 0;
soldiers++;
} else {
count++;
}
}
if (macemen < maxmacemen) {
if (count2 > 40) {
_root.macemen.duplicateMovieClip(namer2, namer2++);
count2 = 0;
macemen++;
} else {
count2++;
}
}
if (knights < maxknights) {
if (count3 > 80) {
_root.knight.duplicateMovieClip(namer3, namer3++);
count3 = 0;
knights++;
} else {
count3++;
}
}
if (mages < maxmages) {
if (count4 > 200) {
_root.mage.duplicateMovieClip(namer4, namer4++);
count4 = 0;
mages++;
} else {
count4++;
}
}
if (((soldiers >= maxsoldiers) && (macemen >= maxmacemen)) && (knights >= maxknights)) {
wave++;
soldiers = 0;
macemen = 0;
knights = 0;
mages = 0;
count = -200;
count2 = -200;
count3 = -200;
count4 = -200;
money = money + (1000 * wave);
}
}
Instance of Symbol 211 MovieClip "endcontrol" in Frame 2
onClipEvent (load) {
money = 0;
wave = 1;
archers = 0;
bows = 0;
towerlvl = 0;
kills = 0;
}
onClipEvent (enterFrame) {
frame = _root._currentframe;
if (frame == 2) {
money = _root.control.money;
wave = _root.control.wave;
archers = _root.control.archers;
bows = _root.control.bows;
towerlvl = _root.control.towerlvl;
kills = _root.control.kills;
dispwave = wave + "!";
}
if (frame == 3) {
_root.removeMovieClip(red);
_root.removeMovieClip(ball);
_root.removeMovieClip(poof);
_root.removeMovieClip(cursor);
}
}
Frame 3
stop();
Instance of Symbol 218 MovieClip in Frame 3
onClipEvent (enterFrame) {
_root.red.removeMovieClip();
_root.ball.removeMovieClip();
_root.poof.removeMovieClip();
}
Symbol 16 Button
on (press) {
_root.menuthing.gotoAndStop("units");
}
Symbol 20 Button
on (press) {
_root.menuthing.gotoAndStop("buildings");
}
Symbol 24 Button
on (press) {
_root.gotoAndStop("game");
}
Symbol 31 Button
on (press) {
_root.menuthing.gotoAndStop("main");
}
Symbol 55 MovieClip Frame 1
stop();
Instance of Symbol 7 MovieClip "loadctrl" in Symbol 55 MovieClip Frame 1
onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
total = _root.getBytesTotal();
percentloaded = (loaded / total) * 100;
_root.menuthing.loadbar.bar._xscale = percentloaded;
if (percentloaded == 100) {
_root.menuthing.gotoAndStop("main");
}
}
Symbol 55 MovieClip Frame 2
stop();
Symbol 55 MovieClip Frame 3
stop();
Instance of Symbol 35 MovieClip "spearmen" in Symbol 55 MovieClip Frame 3
onClipEvent (load) {
words = "Place the mouse over a unit to read info about it.";
}
on (rollOver) {
_root.menuthing.spearmen.words = "Spearmen: The spearmen are fairly weak. They dont do much damage and they die from one click. They are worth $30.";
}
on (rollOut) {
_root.menuthing.spearmen.words = "Place the mouse over a unit to read info about it.";
}
Instance of Symbol 37 MovieClip "macemen" in Symbol 55 MovieClip Frame 3
on (rollOver) {
_root.menuthing.spearmen.words = "Macemen: The macemen are stronger than the spearmen. They do more damage to the walls and they take two clicks to kill. They are worth $50.";
}
on (rollOut) {
_root.menuthing.spearmen.words = "Place the mouse over a unit to read info about it.";
}
Instance of Symbol 39 MovieClip "knights" in Symbol 55 MovieClip Frame 3
on (rollOver) {
_root.menuthing.spearmen.words = "Knights: The knights are strong and they do a lot of damage to the wall. But, since they are really slow, they are vulnerable to the ball and paddle. It takes 5 clicks to kill them. They are worth $100.";
}
on (rollOut) {
_root.menuthing.spearmen.words = "Place the mouse over a unit to read info about it.";
}
Instance of Symbol 41 MovieClip "mages" in Symbol 55 MovieClip Frame 3
on (rollOver) {
_root.menuthing.spearmen.words = "Mages: Mages are the strongest unit in the game. Although they only take 4 clicks to kill, they can dodge the ball and paddle and are shielded from arrows. If you let one of these get to your wall, they will do quite a bit of damage if you dont get rid of them quickly. They are worth $200.";
}
on (rollOut) {
_root.menuthing.spearmen.words = "Place the mouse over a unit to read info about it.";
}
Symbol 55 MovieClip Frame 4
stop();
Instance of Symbol 46 MovieClip "rai" in Symbol 55 MovieClip Frame 4
on (rollOver) {
_root.menuthing.fle.words = "If you have $2500, you can use this to raise the health of the wall by 50 points. It also shows you the max health of your wall.";
}
on (rollOut) {
_root.menuthing.fle.words = "Place the mouse over a building to read info about it.";
}
Instance of Symbol 48 MovieClip "wiz" in Symbol 55 MovieClip Frame 4
on (rollOver) {
_root.menuthing.fle.words = "Wizards Tower: Once you buy the Wizards Tower, it will start using its magic to deflect the ball when it gets too close to the wall. The higher the level, the more often it will deflect the ball.";
}
on (rollOut) {
_root.menuthing.fle.words = "Place the mouse over a building to read info about it.";
}
Instance of Symbol 50 MovieClip "rep" in Symbol 55 MovieClip Frame 4
on (rollOver) {
_root.menuthing.fle.words = "If your building is damaged, you can repair it with this building. But, dont let it take too much damage or it might cost too much to repair it.";
}
on (rollOut) {
_root.menuthing.fle.words = "Place the mouse over a building to read info about it.";
}
Instance of Symbol 52 MovieClip "bar" in Symbol 55 MovieClip Frame 4
on (rollOver) {
_root.menuthing.fle.words = "Barracks: You need Barracks to make archers. Once you bought the Barracks, you can make archers as long as you have bows.";
}
on (rollOut) {
_root.menuthing.fle.words = "Place the mouse over a building to read info about it.";
}
Instance of Symbol 54 MovieClip "fle" in Symbol 55 MovieClip Frame 4
onClipEvent (load) {
words = "Place the mouse over a building to read info about it.";
}
on (rollOver) {
_root.menuthing.fle.words = "Fletcher: You need a Fletcher to make bows for you. Once you have bows, you can make archers with the Barracks.";
}
on (rollOut) {
_root.menuthing.fle.words = "Place the mouse over a building to read info about it.";
}
Symbol 69 MovieClip Frame 1
stop();
Symbol 69 MovieClip Frame 2
stop();
Instance of Symbol 72 MovieClip in Symbol 76 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this._xscale > _root.wall.healthpercent) {
this._xscale = this._xscale - 0.1;
}
if (this._xscale < _root.wall.healthpercent) {
this._xscale = _root.wall.healthpercent;
}
}
Instance of Symbol 74 MovieClip "bar" in Symbol 76 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.wall.healthpercent > 0) {
this._xscale = _root.wall.healthpercent;
} else {
this._xscale = 0;
}
}
Symbol 79 MovieClip Frame 1
stop();
Symbol 79 MovieClip Frame 2
stop();
Symbol 86 MovieClip Frame 1
stop();
Symbol 86 MovieClip Frame 2
stop();
Symbol 108 MovieClip Frame 5
Symbol 108 MovieClip Frame 6
stop();
removeMovieClip(this._parent);
Symbol 111 MovieClip Frame 14
stop();
removeMovieClip(this._parent);
Symbol 118 MovieClip Frame 22
stop();
removeMovieClip(this._parent);
Symbol 119 MovieClip Frame 1
stop();
Symbol 119 MovieClip Frame 2
stop();
Instance of Symbol 102 MovieClip in Symbol 119 MovieClip Frame 2
onClipEvent (enterFrame) {
if (this.hitTest(_root.ball)) {
_parent.gotoAndStop("squish");
}
}
Symbol 119 MovieClip Frame 3
stop();
Symbol 119 MovieClip Frame 4
stop();
Symbol 119 MovieClip Frame 5
stop();
Symbol 136 MovieClip Frame 6
stop();
removeMovieClip(this._parent);
Symbol 142 MovieClip Frame 14
stop();
removeMovieClip(this._parent);
Symbol 143 MovieClip Frame 1
stop();
Symbol 143 MovieClip Frame 2
stop();
Symbol 143 MovieClip Frame 3
stop();
Symbol 143 MovieClip Frame 4
stop();
Symbol 143 MovieClip Frame 5
stop();
Symbol 164 MovieClip Frame 7
stop();
removeMovieClip(this._parent);
Symbol 167 MovieClip Frame 15
stop();
removeMovieClip(this._parent);
Symbol 168 MovieClip Frame 1
stop();
Symbol 168 MovieClip Frame 2
stop();
Symbol 168 MovieClip Frame 3
stop();
Symbol 168 MovieClip Frame 4
stop();
Symbol 168 MovieClip Frame 5
stop();
Symbol 186 MovieClip Frame 8
_parent.gotoAndStop("normal");
stop();
Symbol 190 MovieClip Frame 9
stop();
removeMovieClip(this._parent);
Symbol 191 MovieClip Frame 1
stop();
Symbol 191 MovieClip Frame 2
stop();
Symbol 191 MovieClip Frame 3
stop();
Symbol 191 MovieClip Frame 4
stop();
Symbol 195 MovieClip Frame 1
stop();
Symbol 195 MovieClip Frame 2
stop();
Symbol 197 MovieClip Frame 1
stop();
Symbol 197 MovieClip Frame 2
stop();
Symbol 203 MovieClip Frame 6
stop();
Symbol 222 Button
on (press) {
_root.gotoAndStop(2);
}
Symbol 237 Button
on (press) {
_root.gotoAndStop(1);
_root.menuthing.gotoAndStop("main");
}