Frame 1
stop();
function menuItem_2_handler() {
getURL ("http://www.skywardgames.com/", "_blank");
}
var my_cm = new ContextMenu();
my_cm.hideBuiltInItems();
var menuItem_2 = new ContextMenuItem("Skyward Games", menuItem_2_handler);
my_cm.customItems.push(menuItem_2);
this.menu = my_cm;
Instance of Symbol 345 MovieClip "loader" in Frame 1
onClipEvent (load) {
total = _root.getBytesTotal();
}
onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
loadedPerc = Math.floor((loaded / total) * 100);
_root.loader.gotoAndStop(Math.round(loadedPerc));
}
Frame 2
stop();
Mouse.show();
Frame 3
stop();
Mouse.hide();
mouse._x = _xmouse;
mouse._y = _ymouse;
mouse.startDrag();
var exterior = new Sound();
exterior.attachSound("exterior");
var theme = new Sound();
theme.attachSound("theme");
var click1 = new Sound();
click1.attachSound("click1");
var click2 = new Sound();
click2.attachSound("click2");
var click5 = new Sound();
click5.attachSound("click5");
var set1 = new Sound();
set1.attachSound("click3");
var coins = new Sound();
coins.attachSound("coins");
var build = new Sound();
build.attachSound("build");
var switch_a = new Sound();
switch_a.attachSound("switch_a");
var switch_b = new Sound();
switch_b.attachSound("switch_b");
var arrow1 = new Sound();
arrow1.attachSound("arrow1");
var arrow2 = new Sound();
arrow2.attachSound("arrow2");
var cannonSound = new Sound();
cannonSound.attachSound("cannonSound");
var horse = new Sound();
horse.attachSound("horse");
var penetrate = new Sound();
penetrate.attachSound("penetrate");
var kill = new Sound();
kill.attachSound("kill");
var page = new Sound();
page.attachSound("page");
var music1 = new Sound();
music1.attachSound("music1");
var music2 = new Sound();
music2.attachSound("music2");
var music3 = new Sound();
music3.attachSound("music3");
var music4 = new Sound();
music4.attachSound("music4");
var music5 = new Sound();
music5.attachSound("music5");
var music6 = new Sound();
music6.attachSound("music7");
var newweek = new Sound();
newweek.attachSound("newweek");
var win = new Sound();
win.attachSound("win");
var dieMusic = new Sound();
dieMusic.attachSound("dieMusic");
var winGame = new Sound();
winGame.attachSound("winGame");
if (_root.showWin != true) {
theme.start(0, 99);
} else {
click1.setVolume(100);
}
Instance of Symbol 384 MovieClip "credits" in Frame 3
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 392 MovieClip "dificulty" in Frame 3
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 404 MovieClip "instructions" in Frame 3
onClipEvent (load) {
_visible = false;
}
Frame 4
function addBug() {
if ((getTimer() > (timeGet + _root.appearDelay)) && (i < bugsNeedToBe)) {
i++;
_root.map.bugsContainer.attachMovie("bug", "bug" + i, _root.map.bugsContainer.getNextHighestDepth(), {_x:1050, _y:178, id:i});
bugsAmount++;
timeGet = getTimer();
}
}
for (i in _root) {
if ((((typeof(_root[i]) == "string") && (_root[i] != "easy")) && (_root[i] != "normal")) && (_root[i] != "hard")) {
delete _root[i];
}
}
for (i in _root.container) {
if (typeof(_root.container[i]) == "movieclip") {
removeMovieClip(_root.container[i]);
}
}
for (i in _root.map) {
if (typeof(_root.map[i]) == "movieclip") {
removeMovieClip(_root.map[i]);
}
}
for (i in _root.map.container) {
if (typeof(_root.map.container[i]) == "movieclip") {
removeMovieClip(_root.map.container[i]);
}
}
for (i in _root.map.bugsContainer) {
if (typeof(_root.map.bugsContainer[i]) == "movieclip") {
removeMovieClip(_root.map.bugsContainer[i]);
}
}
if (dif == "easy") {
var bugStrong = 3;
var money = 1100;
var wood = 20;
var stones = 30;
var castleMax = 15;
var bugsAmountVar = 4;
} else if (dif == "normal") {
var bugStrong = 4;
var money = 900;
var wood = 17;
var stones = 25;
var castleMax = 12;
var bugsAmountVar = 3;
} else if (dif == "hard") {
var bugStrong = 6;
var money = 700;
var wood = 14;
var stones = 20;
var castleMax = 5;
var bugsAmountVar = 3;
}
map._x = -100;
map._y = -100;
var appearDelay = 1000;
var gamePause = false;
var startDay = false;
var velocity = 1;
var day = 1;
var week = 1;
var month = 1;
var i = 0;
var bugId = 0;
var pitI = 0;
var towerI = 0;
var archerI = 0;
var pathBoundsI = 9;
var daysSpent = 1;
var pitCost = 130;
var towerCost = 70;
var towerCostStones = 2;
var towersAmount = 0;
var pitsAmount = 0;
var plusMoney = 50;
var plusWood = 0;
var plusStone = 0;
var buildThisDay = false;
var cannonTimer = 0;
var balistaTimer = 0;
var fortPlusMoney = false;
var h1PlusMoney = false;
var h2PlusMoney = false;
var h3PlusMoney = false;
var type1Cost = 100;
var type2Cost = 150;
var type1Col = 1;
var type2Col = 0;
var archer1Col = 1;
var archer2Col = 0;
var archer3Col = 0;
var archer4Col = 0;
var fort1 = true;
var fort2 = false;
var fort2_cost = 500;
var fort2_wood = 5;
var fort2_stone = 10;
var forge = false;
var forge_cost = 420;
var forge_wood = 5;
var forge_stone = 5;
var defence1 = false;
var defence1_cost = 470;
var defence1_wood = 5;
var defence1_stone = 15;
var defence2 = false;
var defence2_cost = 610;
var defence2_wood = 2;
var defence2_stone = 13;
var habitation1 = false;
var habitation1_cost = 280;
var habitation1_wood = 8;
var habitation1_stone = 6;
var habitation2 = false;
var habitation2_cost = 420;
var habitation2_wood = 9;
var habitation2_stone = 6;
var habitation3 = false;
var habitation3_cost = 690;
var habitation3_wood = 11;
var habitation3_stone = 10;
var wood_fabric = false;
var wood_fabric_cost = 350;
var wood_fabric_wood = 0;
var wood_fabric_stone = 0;
var stone_fabric = false;
var stone_fabric_cost = 350;
var stone_fabric_wood = 0;
var stone_fabric_stone = 0;
var market = false;
var market_cost = 430;
var market_wood = 4;
var market_stone = 4;
var defence3 = false;
var defence3_cost = 810;
var defence3_wood = 19;
var defence3_stone = 0;
var arch1 = false;
var arch1_cost = 450;
var arch1_wood = 5;
var arch1_stone = 5;
var arch2 = false;
var arch2_cost = 840;
var arch2_wood = 10;
var arch2_stone = 10;
var arch3 = false;
var arch3_cost = 1260;
var arch3_wood = 12;
var arch3_stone = 12;
var arch4 = false;
var arch4_cost = 1680;
var arch4_wood = 14;
var arch4_stone = 14;
var dieShow = false;
var bugsInside = 0;
var bugsNeedToBe = 8;
var bugsKilled = 0;
var smallestId = 1;
var bugsAmount = 0;
var cansAmount = 0;
var timeGet = getTimer();
nextAttackText.wordWrap = true;
stopAllSounds();
exterior.start(0, 9999);
Instance of Symbol 525 MovieClip in Frame 4
on (release, keyPress "<Space>") {
if (_root.startDay != true) {
var i = 0;
while (i < _root.cansAmount) {
delete _root["cannon" + i].aimsArray;
i++;
}
_root.bugsAmount = 0;
_root.click1.start();
_root.map._x = -350;
_root.map._y = -80;
if (_root.day == 7) {
_root.newweek.start();
} else {
_root["music" + (random(6) + 1)].start();
}
gotoAndStop (3);
_root.bugId++;
_root.cannonTimer--;
_root.balistaTimer--;
_root.startDay = true;
_root.day++;
_root.daysSpent++;
_root.buildThisDay = false;
rolled = false;
if (_root.wood_fabric == true) {
_root.wood = _root.wood + 2;
}
if (_root.stone_fabric == true) {
_root.stones = _root.stones + 2;
}
_root.money = _root.money + _root.plusMoney;
}
}
on (rollOver) {
if (_root.startDay != true) {
gotoAndStop (2);
var rolled = true;
}
}
on (rollOut) {
if (_root.startDay != true) {
gotoAndStop (1);
rolled = false;
}
}
onClipEvent (enterFrame) {
if (_root.startDay == true) {
gotoAndStop (4);
} else if (rolled != true) {
gotoAndStop (1);
}
}
on (rollOver) {
_root.mouse.gotoAndStop("over");
}
on (rollOut) {
_root.mouse.gotoAndStop(1);
}
Instance of Symbol 120 MovieClip "type1" in Frame 4
on (rollOver) {
_root.mouse.gotoAndStop("over");
}
on (rollOut) {
_root.mouse.gotoAndStop(1);
}
Instance of Symbol 123 MovieClip "type2" in Frame 4
on (rollOver) {
_root.mouse.gotoAndStop("over");
}
on (rollOut) {
_root.mouse.gotoAndStop(1);
}
onClipEvent (load) {
if (_root.type2Col == 0) {
this._visible = false;
_root.type2ColText._visible = false;
}
}
onClipEvent (enterFrame) {
if (_root.type2Col > 0) {
this._visible = true;
_root.type2ColText._visible = true;
}
}
Instance of Symbol 536 MovieClip "pitType" in Frame 4
on (rollOver) {
_root.mouse.gotoAndStop("over");
_root.costText.text = ("cost: " + _root.pitCost) + "G.";
}
on (rollOut) {
_root.mouse.gotoAndStop(1);
_root.costText.text = "";
}
onClipEvent (enterFrame) {
if (_root.money < _root.pitCost) {
gotoAndStop ("blocked");
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 540 MovieClip "towerType" in Frame 4
on (rollOver) {
_root.mouse.gotoAndStop("over");
_root.costText.text = ((("cost: " + _root.towerCost) + "G. and ") + _root.towerCostStones) + " stones";
}
on (rollOut) {
_root.mouse.gotoAndStop(1);
_root.costText.text = "";
}
onClipEvent (enterFrame) {
if ((_root.money < _root.towerCost) || (_root.stones < _root.towerCostStones)) {
gotoAndStop ("blocked");
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 126 MovieClip "archer1Type" in Frame 4
on (rollOver) {
_root.mouse.gotoAndStop("over");
}
on (rollOut) {
_root.mouse.gotoAndStop(1);
}
Instance of Symbol 129 MovieClip "archer2Type" in Frame 4
on (rollOver) {
_root.mouse.gotoAndStop("over");
}
on (rollOut) {
_root.mouse.gotoAndStop(1);
}
onClipEvent (load) {
if (_root.archer2Col == 0) {
this._visible = false;
_root.archer2ColText._visible = false;
}
}
onClipEvent (enterFrame) {
if (_root.archer2Col > 0) {
this._visible = true;
_root.archer2ColText._visible = true;
}
}
Instance of Symbol 132 MovieClip "archer3Type" in Frame 4
on (rollOver) {
_root.mouse.gotoAndStop("over");
}
on (rollOut) {
_root.mouse.gotoAndStop(1);
}
onClipEvent (load) {
if (_root.archer3Col == 0) {
this._visible = false;
_root.archer3ColText._visible = false;
}
}
onClipEvent (enterFrame) {
if (_root.archer3Col > 0) {
this._visible = true;
_root.archer3ColText._visible = true;
}
}
Instance of Symbol 135 MovieClip "archer4Type" in Frame 4
on (rollOver) {
_root.mouse.gotoAndStop("over");
}
on (rollOut) {
_root.mouse.gotoAndStop(1);
}
onClipEvent (load) {
if (_root.archer4Col == 0) {
this._visible = false;
_root.archer4ColText._visible = false;
}
}
onClipEvent (enterFrame) {
if (_root.archer4Col > 0) {
this._visible = true;
_root.archer4ColText._visible = true;
}
}
Instance of Symbol 324 MovieClip [Cannon] "cannon00" in Frame 4
onClipEvent (load) {
var id = 0;
var pressedTable = false;
}
Instance of Symbol 547 MovieClip in Frame 4
on (release, keyPress "c") {
if (_root.startDay != true) {
_root.click2.start();
_root.container.attachMovie("buildMenu", "buy_menu", _root.container.getNextHighestDepth());
_root.autoScroll = false;
_root.map._x = -30;
_root.map._y = -70;
}
}
onClipEvent (enterFrame) {
if (_root.startDay == true) {
gotoAndStop ("blocked");
} else {
gotoAndStop (1);
}
}
on (rollOver) {
gotoAndStop (2);
_root.mouse.gotoAndStop("over");
}
on (rollOut) {
gotoAndStop (1);
_root.mouse.gotoAndStop(1);
}
Instance of Symbol 553 MovieClip "cancell" in Frame 4
onClipEvent (load) {
_visible = false;
}
on (release) {
_root.click1.start();
_root.map.attachedType1.removeMovieClip();
_root.map.attachedType2.removeMovieClip();
_root.map.pit.removeMovieClip();
_root.map.tower.removeMovieClip();
_root.map.archer1.removeMovieClip();
_root.map.archer2.removeMovieClip();
_root.map.archer3.removeMovieClip();
_root.map.archer4.removeMovieClip();
_root.map.alrPressedItem = false;
_visible = false;
}
Instance of Symbol 555 MovieClip in Frame 4
onClipEvent (enterFrame) {
if (_root.buildThisDay == true) {
gotoAndStop (2);
} else {
this.gotoAndStop(1);
}
}
Instance of Symbol 561 MovieClip in Frame 4
on (press, keyPress "s") {
if (_root.velocity == 1) {
_root.velocity = 2;
_root.click2.start();
} else if (_root.velocity == 2) {
_root.velocity = 3;
_root.click2.start();
} else if (_root.velocity == 3) {
_root.velocity = 1;
_root.click2.start();
}
}
onClipEvent (enterFrame) {
if (_root.velocity == 1) {
this.gotoAndStop(1);
} else if (_root.velocity == 2) {
this.gotoAndStop(2);
} else if (_root.velocity == 3) {
this.gotoAndStop(3);
}
}
on (rollOver) {
_root.mouse.gotoAndStop("over");
}
on (rollOut) {
_root.mouse.gotoAndStop(1);
}
Instance of Symbol 564 MovieClip in Frame 4
on (press, keyPress "p") {
if (_root.gamePause == false) {
_root.switch_a.start();
gotoAndStop (2);
_root.gamePause = true;
_root.velocity = 0;
_root.container.attachMovie("pauseText", "pauseText", _root.container.getNextHighestDepth());
} else {
_root.switch_b.start();
this.gotoAndStop(1);
_root.gamePause = false;
_root.velocity = 1;
_root.container.pauseText.removeMovieClip();
}
}
on (rollOver) {
_root.mouse.gotoAndStop("over");
}
on (rollOut) {
_root.mouse.gotoAndStop(1);
}
Instance of Symbol 569 MovieClip in Frame 4
on (press) {
if (_root.click1.getVolume() == 100) {
gotoAndStop (2);
_root.click1.setVolume(60);
} else if (_root.click1.getVolume() == 60) {
gotoAndStop (3);
_root.click1.setVolume(25);
} else if (_root.click1.getVolume() == 25) {
gotoAndStop (4);
_root.click1.setVolume(0);
} else if (_root.click1.getVolume() == 0) {
gotoAndStop (1);
_root.click1.setVolume(100);
}
}
on (rollOver) {
_alpha = 100;
}
on (rollOut) {
_alpha = 50;
}
onClipEvent (load) {
_alpha = 50;
}
Instance of Symbol 572 MovieClip in Frame 4
on (press) {
_root.click2.start();
if (pressed != true) {
_root._quality = "LOW";
pressed = true;
} else {
_root._quality = "HIGH";
pressed = false;
}
}
on (rollOver) {
_alpha = 100;
}
on (rollOut) {
_alpha = 50;
}
onClipEvent (load) {
_alpha = 50;
}
Frame 5
fscommand ("allowscale", "false");
appearDelay = 1000 / _root.velocity;
bugsNeedToBe = 8 + Math.floor(_root.daysSpent / bugsAmountVar);
if (bugType == "type5") {
bugsNeedToBe = Math.floor(bugsNeedToBe / bugsAmountVar);
}
if (bugId > 9) {
bugId = 1;
}
if (bugId == 0) {
var nextAttack = "Next attack: Gimmers";
var bugType = "type1";
} else if (bugId == 1) {
var nextAttack = "Next attack: Mourlins";
var bugType = "type1";
} else if (bugId == 2) {
var nextAttack = "Next attack: Knights";
var bugType = "type2";
} else if (bugId == 3) {
var nextAttack = "Next attack: Grillians";
var bugType = "type3";
} else if (bugId == 4) {
var nextAttack = "Next attack: Gimmers";
var bugType = "type4";
} else if (bugId == 5) {
var nextAttack = "Next attack: Mourlins";
var bugType = "type1";
} else if (bugId == 6) {
var nextAttack = "Next attack: Knights";
var bugType = "type2";
} else if (bugId == 7) {
var nextAttack = "Next attack: Grillians";
var bugType = "type3";
} else if (bugId == 8) {
var nextAttack = "Next attack: Darkills";
var bugType = "type4";
} else if (bugId == 9) {
var nextAttack = "Next attack: Gimmers";
var bugType = "type5";
}
if (_root.startDay == true) {
nextAttack = "...";
}
if (((((((((((((fort2 == true) && (forge == true)) && (defence1 == true)) && (defence2 == true)) && (defence3 == true)) && (habitation3 == true)) && (wood_fabric == true)) && (stone_fabric == true)) && (market == true)) && (arch1 == true)) && (arch2 == true)) && (arch3 == true)) && (arch4 == true)) {
gotoAndStop ("winGame");
}
if ((_root.fort2 == true) && (fortPlusMoney != true)) {
plusMoney = plusMoney + 150;
var fortPlusMoney = true;
}
if ((_root.habitation3 == true) && (h3PlusMoney != true)) {
plusMoney = plusMoney + 50;
var h3PlusMoney = true;
} else if ((_root.habitation2 == true) && (h2PlusMoney != true)) {
plusMoney = plusMoney + 50;
var h2PlusMoney = true;
} else if ((_root.habitation1 == true) && (h1PlusMoney != true)) {
plusMoney = plusMoney + 50;
var h1PlusMoney = true;
}
if (_root.wood_fabric == true) {
plusWood = 2;
}
if (_root.stone_fabric == true) {
plusStone = 2;
}
var plusMoneyText = ("+" + plusMoney);
if (plusWood > 0) {
var plusWoodText = ("+" + plusWood);
} else {
var plusWoodText = "";
}
if (plusStone > 0) {
var plusStoneText = ("+" + plusStone);
} else {
var plusStoneText = "";
}
if (day > 7) {
day = 1;
week++;
_root.container.attachMovie("newWeekText", "", _root.container.getNextHighestDepth(), {_x:280, _y:10});
if (_root.arch1 == true) {
_root.archer1Col = _root.archer1Col + (random(1) + 1);
}
if (_root.arch2 == true) {
_root.archer2Col = _root.archer2Col + (random(1) + 1);
}
if (_root.arch3 == true) {
_root.archer3Col = _root.archer3Col + (random(1) + 1);
}
if (_root.arch4 == true) {
_root.archer4Col = _root.archer4Col + (random(1) + 1);
}
}
if (week > 4) {
week = 1;
month++;
}
var dayText = ("Day " + day);
var dateText = ((("Week " + week) + " Month ") + month);
if ((bugsNeedToBe == bugsKilled) && (dieShow != true)) {
_root.win.start();
startDay = false;
bugsKilled = 0;
i = 0;
}
if (startDay == true) {
addBug();
}
if (_root.mouse.hitTest(_root.container.table)) {
var tableHit = true;
} else {
tableHit = false;
}
if ((((tableHit == true) && (_xmouse > 515)) && (_xmouse < 700)) && (_ymouse > 310)) {
} else if (autoScroll != false) {
var pos = _ymouse;
if ((_ymouse < 100) && (_xmouse <= 700)) {
map._y = map._y + ((100 - pos) / 5);
} else if ((_ymouse >= 300) && (_xmouse <= 700)) {
map._y = map._y - ((pos - 300) / 5);
}
var posx = _xmouse;
if (_xmouse < 100) {
map._x = map._x + ((100 - posx) / 5);
} else if ((_xmouse >= 600) && (_xmouse <= 700)) {
map._x = map._x - ((posx - 600) / 5);
}
}
if (map._y <= -200) {
map._y = -200;
} else if (map._y >= 0) {
map._y = 0;
}
if (map._x <= -350) {
map._x = -350;
} else if (map._x >= 0) {
map._x = 0;
}
Mouse.hide();
mouse._x = _xmouse;
mouse._y = _ymouse;
mouse.startDrag();
if ((bugsInside >= castleMax) && (dieShow != true)) {
gotoAndStop ("clear");
_root.container.attachMovie("die", "die", _root.container.getNextHighestDepth());
var dieShow = true;
}
Frame 6
gotoAndPlay ("loop");
Frame 7
stop();
Symbol 30 MovieClip [bullet2] Frame 1
var time = 0;
_root.cannonSound.start();
Symbol 30 MovieClip [bullet2] Frame 2
var i = 0;
while (i < (_root.bugsAmount + 1)) {
if (_root.map.bugsContainer["bug" + i].id == _root.map[canId].aimsArray[0]) {
_x = (_x + ((_root.map.bugsContainer["bug" + i]._x - _x) / 2));
_y = (_y + ((_root.map.bugsContainer["bug" + i]._y - _y) / 2));
if (this.hitTest(_root.map.bugsContainer["bug" + i])) {
_root.map.bugsContainer["bug" + i].health = _root.map.bugsContainer["bug" + i].health - damage;
_root.map.bugsContainer["bug" + (i - 2)].health = _root.map.bugsContainer["bug" + (i - 2)].health - (damage - 5);
_root.map.bugsContainer["bug" + (i - 1)].health = _root.map.bugsContainer["bug" + (i - 1)].health - (damage - 10);
_root.map.bugsContainer["bug" + (i + 1)].health = _root.map.bugsContainer["bug" + (i + 1)].health - (damage - 10);
_root.map.bugsContainer["bug" + (i + 2)].health = _root.map.bugsContainer["bug" + (i + 2)].health - (damage - 5);
this.removeMovieClip();
}
}
i++;
}
if (time > 5) {
this.removeMovieClip();
}
time++;
Symbol 30 MovieClip [bullet2] Frame 3
gotoAndPlay ("loop");
Symbol 32 MovieClip [bulletArcher4] Frame 1
var time = 0;
_root.arrow1.start();
Symbol 32 MovieClip [bulletArcher4] Frame 2
var i = 0;
while (i < (_root.bugsAmount + 1)) {
if (_root.map.bugsContainer["bug" + i].id == _root.map[canId].aimsArray[0]) {
_x = (_x + ((_root.map.bugsContainer["bug" + i]._x - _x) / 2));
_y = (_y + ((_root.map.bugsContainer["bug" + i]._y - _y) / 2));
if (this.hitTest(_root.map.bugsContainer["bug" + i])) {
_root.map.bugsContainer["bug" + i].health = _root.map.bugsContainer["bug" + i].health - damage;
_root.map.bugsContainer["bug" + i].speed = 1.5;
}
}
i++;
}
if (time > 10) {
this.removeMovieClip();
}
time++;
Symbol 32 MovieClip [bulletArcher4] Frame 3
gotoAndPlay ("loop");
Symbol 38 MovieClip [bulletArcher3] Frame 1
var time = 0;
_root.arrow1.start();
Symbol 38 MovieClip [bulletArcher3] Frame 2
var i = 0;
while (i < (_root.bugsAmount + 1)) {
if (_root.map.bugsContainer["bug" + i].id == _root.map[canId].aimsArray[0]) {
_x = (_x + ((_root.map.bugsContainer["bug" + i]._x - _x) / 2));
_y = (_y + ((_root.map.bugsContainer["bug" + i]._y - _y) / 2));
if (this.hitTest(_root.map.bugsContainer["bug" + i])) {
_root.map.bugsContainer["bug" + i].health = _root.map.bugsContainer["bug" + i].health - damage;
}
}
i++;
}
if (time > 10) {
this.removeMovieClip();
}
time++;
Symbol 38 MovieClip [bulletArcher3] Frame 3
gotoAndPlay ("loop");
Symbol 40 MovieClip [bulletArcher2] Frame 1
var time = 0;
_root.arrow2.start();
Symbol 40 MovieClip [bulletArcher2] Frame 2
var i = 0;
while (i < (_root.bugsAmount + 1)) {
if (_root.map.bugsContainer["bug" + i].id == _root.map[canId].aimsArray[0]) {
_x = (_x + ((_root.map.bugsContainer["bug" + i]._x - _x) / 2));
_y = (_y + ((_root.map.bugsContainer["bug" + i]._y - _y) / 2));
if (this.hitTest(_root.map.bugsContainer["bug" + i])) {
_root.map.bugsContainer["bug" + i].health = _root.map.bugsContainer["bug" + i].health - damage;
this.removeMovieClip();
}
}
i++;
}
if (time > 5) {
this.removeMovieClip();
}
time++;
Symbol 40 MovieClip [bulletArcher2] Frame 3
gotoAndPlay ("loop");
Symbol 42 MovieClip [bulletArcher1] Frame 1
var time = 0;
_root.arrow1.start();
Symbol 42 MovieClip [bulletArcher1] Frame 2
var i = 0;
while (i < (_root.bugsAmount + 1)) {
if (_root.map.bugsContainer["bug" + i].id == _root.map[canId].aimsArray[0]) {
_x = (_x + ((_root.map.bugsContainer["bug" + i]._x - _x) / 2));
_y = (_y + ((_root.map.bugsContainer["bug" + i]._y - _y) / 2));
if (this.hitTest(_root.map.bugsContainer["bug" + i])) {
_root.map.bugsContainer["bug" + i].health = _root.map.bugsContainer["bug" + i].health - damage;
this.removeMovieClip();
}
}
i++;
}
if (time > 5) {
this.removeMovieClip();
}
time++;
Symbol 42 MovieClip [bulletArcher1] Frame 3
gotoAndPlay ("loop");
Symbol 44 MovieClip [bullet] Frame 1
var time = 0;
_root.arrow2.start();
Symbol 44 MovieClip [bullet] Frame 2
var i = 0;
while (i < (_root.bugsAmount + 1)) {
if (_root.map.bugsContainer["bug" + i].id == _root.map[canId].aimsArray[0]) {
_x = (_x + ((_root.map.bugsContainer["bug" + i]._x - _x) / 2));
_y = (_y + ((_root.map.bugsContainer["bug" + i]._y - _y) / 2));
if (this.hitTest(_root.map.bugsContainer["bug" + i])) {
_root.map.bugsContainer["bug" + i].health = _root.map.bugsContainer["bug" + i].health - damage;
this.removeMovieClip();
}
}
i++;
}
if (time > 5) {
this.removeMovieClip();
}
time++;
Symbol 44 MovieClip [bullet] Frame 3
gotoAndPlay ("loop");
Symbol 49 MovieClip Frame 20
if (_root.gamePause == false) {
gotoAndPlay (1);
} else {
stop();
}
Symbol 52 MovieClip Frame 20
if (_root.gamePause == false) {
gotoAndPlay (1);
} else {
stop();
}
Symbol 58 MovieClip Frame 1
_root.horse.start();
Symbol 58 MovieClip Frame 20
if (_root.gamePause == false) {
gotoAndPlay (1);
} else {
stop();
}
Symbol 61 MovieClip Frame 14
if (_root.gamePause == false) {
gotoAndPlay (1);
} else {
stop();
}
Symbol 67 MovieClip Frame 1
_root.horse.start();
Symbol 67 MovieClip Frame 20
if (_root.gamePause == false) {
gotoAndPlay (1);
} else {
stop();
}
Symbol 68 MovieClip Frame 1
stop();
Symbol 68 MovieClip Frame 2
stop();
Symbol 68 MovieClip Frame 3
stop();
Symbol 68 MovieClip Frame 4
stop();
Symbol 68 MovieClip Frame 5
stop();
Symbol 72 MovieClip Frame 1
line._xscale = _parent.health / (_parent.healthFirst / 100);
Symbol 72 MovieClip Frame 2
gotoAndPlay ("loop");
Symbol 75 MovieClip [bug] Frame 1
function moving() {
if (moveDirection == "down") {
_y = (_y + (speed * _root.velocity));
bugSkin._rotation = -90;
} else if (moveDirection == "up") {
_y = (_y - (speed * _root.velocity));
bugSkin._rotation = 90;
} else if (moveDirection == "left") {
_x = (_x - (speed * _root.velocity));
bugSkin._rotation = 0;
}
}
var exist = false;
onMouseDown = function () {
if (!_root.mouse.hitTest(_root.container.table)) {
sendInfo = false;
_root.container.tableBug.removeMovieClip();
}
};
if (_root.bugType == "type1") {
var health = (100 + (((65 * _root.daysSpent) * _root.daysSpent) / Math.floor(10 + (_root.daysSpent / _root.bugStrong))));
bugSkin.gotoAndStop(1);
var speed = 1.5;
} else if (_root.bugType == "type2") {
var health = (90 + (((95 * _root.daysSpent) * _root.daysSpent) / Math.floor(10 + (_root.daysSpent / _root.bugStrong))));
bugSkin.gotoAndStop(2);
var speed = 1;
} else if (_root.bugType == "type3") {
var health = (50 + (((75 * _root.daysSpent) * _root.daysSpent) / Math.floor(14 + (_root.daysSpent / _root.bugStrong))));
bugSkin.gotoAndStop(3);
var speed = 2.5;
} else if (_root.bugType == "type4") {
var health = (75 + (((80 * _root.daysSpent) * _root.daysSpent) / Math.floor(14 + (_root.daysSpent / _root.bugStrong))));
bugSkin.gotoAndStop(4);
var speed = 2;
} else if (_root.bugType == "type5") {
var health = (500 + (((190 * _root.daysSpent) * _root.daysSpent) / Math.floor(14 + (_root.daysSpent / _root.bugStrong))));
bugSkin.gotoAndStop(5);
var speed = 1.5;
}
var healthFirst = health;
var speedStatic = speed;
var turnXdownSpot = [940, 840, 600];
var turnXupSpot = [740, 0];
var turnYSpot = [278, 418, 138, 258];
var moveDirection = "left";
Instance of Symbol 46 MovieClip in Symbol 75 MovieClip [bug] Frame 1
on (press) {
_root.container.attachMovie("tableBug", "tableBug", _root.container.getNextHighestDepth(), {_x:511, _y:335});
var sendInfo = true;
}
onClipEvent (enterFrame) {
if (sendInfo == true) {
_root.container.tableBug.bugType = _root.bugType;
_root.container.tableBug.health = _parent.health;
_root.container.tableBug.speed = _parent.speed;
_root.container.tableBug.id = _parent.id;
}
}
Symbol 75 MovieClip [bug] Frame 2
var i = 0;
while (i < _root.cansAmount) {
if (this.spot.hitTest(_root.map["cannon" + i].radiusVis)) {
exist = false;
var l = 0;
while (l < _root.map["cannon" + i].aimsArray.length) {
if (_root.map["cannon" + i].aimsArray[l] == id) {
exist = true;
}
l++;
}
if ((exist != true) && (id >= _root.map["cannon" + i].aimsArray[0])) {
_root.map["cannon" + i].aimsArray.push(id);
}
if (id == _root.map["cannon" + i].aimsArray[0]) {
xC = _root.map["cannon" + i]._x;
yC = _root.map["cannon" + i]._y;
a = 60 * Math.atan((_y - yC) / (_x - xC));
if (_x >= xC) {
_root.map["cannon" + i]._rotation = a + 90;
} else {
_root.map["cannon" + i]._rotation = a + 270;
}
_root.map["cannon" + i].startFire = true;
}
if (health <= 0) {
var m = 0;
while (m < _root.map["cannon" + i].aimsArray.length) {
var mi = 0;
while (mi < _root.cansAmount) {
if (_root.map["cannon" + mi].aimsArray[m] == id) {
_root.map["cannon" + mi].aimsArray.splice(m, 1);
_root.map["cannon" + mi].startFire = false;
}
mi++;
}
m++;
}
_root.bugsKilled++;
_root.kill.start();
if (_root.container.tableBug.id == id) {
sendInfo = false;
_root.container.tableBug.removeMovieClip();
}
this.removeMovieClip();
}
} else {
var m = 0;
while (m < _root.map["cannon" + i].aimsArray.length) {
if (_root.map["cannon" + i].aimsArray[m] == id) {
_root.map["cannon" + i].aimsArray.splice(m, 1);
_root.map["cannon" + i].startFire = false;
break;
}
m++;
}
}
i++;
}
if (_x < 300) {
if (_root.container.tableBug.id == id) {
sendInfo = false;
_root.container.tableBug.removeMovieClip();
}
_root.penetrate.start();
_root.map.attachMovie("explode", "", _root.map.getNextHighestDepth(), {_x:290, _y:240});
_root.bugsKilled++;
_root.bugsInside++;
this.removeMovieClip();
}
moving();
if (moveDirection == "left") {
if (_x <= turnXdownSpot[0]) {
moveDirection = "down";
turnXdownSpot.splice(0, 1);
} else if (_x <= turnXupSpot[0]) {
moveDirection = "up";
turnXupSpot.splice(0, 1);
}
}
if (moveDirection == "down") {
if (_y >= turnYSpot[0]) {
moveDirection = "left";
turnYSpot.splice(0, 1);
}
}
if (moveDirection == "up") {
if (_y <= turnYSpot[0]) {
moveDirection = "left";
turnYSpot.splice(0, 1);
}
}
var pitsI = 0;
while (pitsI < (_root.pitsAmount + 1)) {
if (this.hitTest(_root.map.container["pit" + pitsI].pitObl)) {
speed = speedStatic / 2;
var inPit = pitsI;
var insidePit = true;
} else if (inPit == pitsI) {
speed = speedStatic;
insidePit = false;
}
pitsI++;
}
if ((_root.defence3 == true) && (this.hitTest(_root.map.castle.defence3.defence))) {
speed = speedStatic / 8;
} else if ((_root.defence2 == true) && (this.hitTest(_root.map.castle.defence2.defence))) {
speed = speedStatic / 8;
} else if ((_root.defence1 == true) && (this.hitTest(_root.map.castle.defence1.defence))) {
speed = speedStatic / 8;
} else if (insidePit != true) {
speed = speedStatic;
}
Symbol 75 MovieClip [bug] Frame 3
gotoAndPlay ("loop");
Symbol 86 MovieClip [type1] Frame 1
stop();
Symbol 87 MovieClip [health2] Frame 1
line._xscale = 100 - (_root.bugsInside * (100 / _root.castleMax));
Symbol 87 MovieClip [health2] Frame 2
gotoAndPlay ("loop");
Symbol 101 MovieClip Frame 1
stop();
Symbol 101 MovieClip Frame 2
stop();
Symbol 101 MovieClip Frame 3
stop();
Symbol 101 MovieClip Frame 4
stop();
Symbol 101 MovieClip Frame 5
stop();
Symbol 103 MovieClip [tableBug] Frame 2
if (bugType == "type1") {
img.gotoAndStop(1);
var nameText = "Gimmers";
} else if (bugType == "type2") {
img.gotoAndStop(2);
var nameText = "Mourlins";
} else if (bugType == "type3") {
img.gotoAndStop(3);
var nameText = "Knights";
} else if (bugType == "type4") {
img.gotoAndStop(4);
var nameText = "Grillians";
} else if (bugType == "type5") {
img.gotoAndStop(5);
var nameText = "Darkills";
}
var healthText = ("health: " + Math.round(health));
var speedText = ("speed: " + speed);
Symbol 103 MovieClip [tableBug] Frame 3
gotoAndPlay ("loop");
Symbol 111 MovieClip Frame 1
stop();
Symbol 111 MovieClip Frame 2
stop();
Symbol 111 MovieClip Frame 3
stop();
Symbol 111 MovieClip Frame 4
stop();
Symbol 114 MovieClip Frame 1
stop();
Symbol 114 MovieClip Frame 2
stop();
Symbol 114 MovieClip Frame 3
stop();
Symbol 114 MovieClip Frame 4
stop();
Symbol 136 MovieClip Frame 1
stop();
Symbol 136 MovieClip Frame 2
stop();
Symbol 136 MovieClip Frame 3
stop();
Symbol 136 MovieClip Frame 4
stop();
Symbol 136 MovieClip Frame 5
stop();
Symbol 136 MovieClip Frame 6
stop();
Instance of Symbol 111 MovieClip in Symbol 137 MovieClip [table] Frame 1
on (rollOver) {
if (_parent.endUpgr != true) {
gotoAndStop (2);
}
}
on (rollOut) {
if (_parent.endUpgr != true) {
gotoAndStop (1);
}
}
on (release, keyPress "u") {
if ((_parent.endUpgr != true) && (_root.money >= _parent.costUpgr)) {
_root.click1.start();
_root.money = _root.money - _parent.costUpgr;
_root.map["cannon" + _parent.id].level++;
_root.map["cannon" + _parent.id].gotoAndPlay(1);
_root.map["cannon" + _parent.id].pressedTable = true;
gotoAndStop (3);
_parent._alpha = 100;
_parent.gotoAndPlay(1);
}
}
onClipEvent (enterFrame) {
if ((_parent.level === 3) || (_root.money < _parent.costUpgr)) {
_parent.endUpgr = true;
gotoAndStop (4);
}
if (_parent.endUpgr == false) {
gotoAndStop (1);
}
if (_parent._alpha == 0) {
_visible = false;
} else {
_visible = true;
}
}
on (rollOver) {
_root.mouse.gotoAndStop("over");
}
on (rollOut) {
_root.mouse.gotoAndStop(1);
}
Instance of Symbol 114 MovieClip in Symbol 137 MovieClip [table] Frame 1
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
on (release, keyPress "r") {
_root.click1.start();
if (_parent.cType == "cannon") {
_root.type2Col++;
} else if (_parent.cType == "archer1") {
_root.archer1Col++;
} else if (_parent.cType == "archer2") {
_root.archer2Col++;
} else if (_parent.cType == "archer3") {
_root.archer3Col++;
} else if (_parent.cType == "archer4") {
_root.archer4Col++;
} else {
_root.type1Col++;
}
_root.map["cannon" + _parent.id].removeMovieClip();
_root.map["pathBounds" + _parent.boundId].removeMovieClip();
gotoAndStop (3);
_parent.removeMovieClip();
}
onClipEvent (enterFrame) {
if (_parent._alpha == 0) {
_visible = false;
} else {
_visible = true;
}
}
on (rollOver) {
_root.mouse.gotoAndStop("over");
}
on (rollOut) {
_root.mouse.gotoAndStop(1);
}
Symbol 137 MovieClip [table] Frame 2
_root.cannon00.level = level + 1;
_root.cannon00.type = cType;
var damage2 = _root.cannon00.damage;
var range2 = _root.cannon00.radius;
var fireSpeed2 = _root.cannon00.fireSpeed;
if ((damage2 - damage) >= 1) {
var damageChange = (" +" + (damage2 - damage));
} else {
var damageChange = "";
}
if ((range2 - range) >= 1) {
var rangeChange = (" +" + (range2 - range));
} else {
var rangeChange = "";
}
if ((fireSpeed2 - fireSpeed) != 0) {
var fireSpeedChange = (" " + (fireSpeed2 - fireSpeed));
} else {
var fireSpeedChange = "";
}
if (level != 3) {
var upgrCost = ((" +" + costUpgr) + "g.");
} else {
var upgrCost = "";
}
var levelText = (("Level " + level) + upgrCost);
var damageText = (("Damage: " + damage) + damageChange);
var rangeText = (("Range: " + range) + rangeChange);
var fireDelayText = (("Fire delay: " + fireSpeed) + fireSpeedChange);
if (cType == "archer4") {
var nameText = "Archer";
img.gotoAndStop(6);
} else if (cType == "archer3") {
var nameText = "Fire Archer";
img.gotoAndStop(5);
} else if (cType == "archer2") {
var nameText = "Titan Archer";
img.gotoAndStop(4);
} else if (cType == "archer1") {
var nameText = "Archer";
img.gotoAndStop(3);
} else if (cType == "cannon") {
var nameText = "Cannon";
img.gotoAndStop(2);
} else {
var nameText = "Mangonel";
img.gotoAndStop(1);
}
Symbol 137 MovieClip [table] Frame 3
gotoAndPlay ("loop");
Symbol 144 MovieClip Frame 1
stop();
Symbol 144 MovieClip Frame 2
stop();
Symbol 144 MovieClip Frame 3
stop();
Symbol 158 MovieClip Frame 1
stop();
Symbol 158 MovieClip Frame 2
stop();
Symbol 197 MovieClip Frame 1
stop();
Symbol 197 MovieClip Frame 2
stop();
Symbol 197 MovieClip Frame 3
stop();
Symbol 200 MovieClip Frame 1
stop();
Symbol 200 MovieClip Frame 2
stop();
Symbol 200 MovieClip Frame 4
stop();
Instance of Symbol 144 MovieClip in Symbol 201 MovieClip [buildMenu] Frame 1
onClipEvent (enterFrame) {
if (_root.fort2 != false) {
gotoAndStop (3);
} else if ((((_root.money < _root.fort2_cost) || (_root.wood < _root.fort2_wood)) || (_root.stones < _root.fort2_stone)) || (_root.buildThisDay == true)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 144 MovieClip in Symbol 201 MovieClip [buildMenu] Frame 1
onClipEvent (enterFrame) {
if (_root.forge != false) {
gotoAndStop (3);
} else if ((((_root.money < _root.forge_cost) || (_root.wood < _root.forge_wood)) || (_root.stones < _root.forge_stone)) || (_root.buildThisDay == true)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 144 MovieClip in Symbol 201 MovieClip [buildMenu] Frame 1
onClipEvent (enterFrame) {
if (_root.defence1 != true) {
if ((((_root.money < _root.defence1_cost) || (_root.wood < _root.defence1_wood)) || (_root.stones < _root.defence1_stone)) || (_root.buildThisDay == true)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
} else if (_root.defence2 != false) {
gotoAndStop (3);
} else if (((_root.money < _root.defence2_cost) || (_root.wood < _root.defence2_wood)) || (_root.stones < _root.defence2_stone)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 144 MovieClip in Symbol 201 MovieClip [buildMenu] Frame 1
onClipEvent (enterFrame) {
if ((_root.habitation1 == false) && (_root.habitation2 == false)) {
if ((((_root.money < _root.habitation1_cost) || (_root.wood < _root.habitation1_wood)) || (_root.stones < _root.habitation1_stone)) || (_root.buildThisDay == true)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
} else if ((_root.habitation1 == true) && (_root.habitation2 == false)) {
if (((_root.money < _root.habitation2_cost) || (_root.wood < _root.habitation2_wood)) || (_root.stones < _root.habitation2_stone)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
} else if (_root.habitation2 == true) {
if (((_root.money < _root.habitation3_cost) || (_root.wood < _root.habitation3_wood)) || (_root.stones < _root.habitation3_stone)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
if (_root.habitation3 != false) {
gotoAndStop (3);
}
}
Instance of Symbol 158 MovieClip in Symbol 201 MovieClip [buildMenu] Frame 1
onClipEvent (enterFrame) {
if (_root.defence1 == true) {
gotoAndStop (2);
}
}
Instance of Symbol 144 MovieClip in Symbol 201 MovieClip [buildMenu] Frame 1
onClipEvent (enterFrame) {
if (_root.wood_fabric != false) {
gotoAndStop (3);
} else if ((((_root.money < _root.wood_fabric_cost) || (_root.wood < _root.wood_fabric_wood)) || (_root.stones < _root.wood_fabric_stone)) || (_root.buildThisDay == true)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 144 MovieClip in Symbol 201 MovieClip [buildMenu] Frame 1
onClipEvent (enterFrame) {
if (_root.stone_fabric != false) {
gotoAndStop (3);
} else if ((((_root.money < _root.stone_fabric_cost) || (_root.wood < _root.stone_fabric_wood)) || (_root.stones < _root.stone_fabric_stone)) || (_root.buildThisDay == true)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 144 MovieClip in Symbol 201 MovieClip [buildMenu] Frame 1
onClipEvent (enterFrame) {
if (_root.market != false) {
gotoAndStop (3);
} else if ((((_root.money < _root.market_cost) || (_root.wood < _root.market_wood)) || (_root.stones < _root.market_stone)) || (_root.buildThisDay == true)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 144 MovieClip in Symbol 201 MovieClip [buildMenu] Frame 1
onClipEvent (enterFrame) {
if (_root.defence3 != false) {
gotoAndStop (3);
} else if ((((_root.money < _root.defence3_cost) || (_root.wood < _root.defence3_wood)) || (_root.stones < _root.defence3_stone)) || (_root.buildThisDay == true)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 144 MovieClip in Symbol 201 MovieClip [buildMenu] Frame 1
onClipEvent (enterFrame) {
if (_root.arch1 != false) {
gotoAndStop (3);
} else if ((((_root.money < _root.arch1_cost) || (_root.wood < _root.arch1_wood)) || (_root.stones < _root.arch1_stone)) || (_root.buildThisDay == true)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 144 MovieClip in Symbol 201 MovieClip [buildMenu] Frame 1
onClipEvent (enterFrame) {
if (_root.arch2 != false) {
gotoAndStop (3);
} else if ((((_root.money < _root.arch2_cost) || (_root.wood < _root.arch2_wood)) || (_root.stones < _root.arch2_stone)) || (_root.buildThisDay == true)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 144 MovieClip in Symbol 201 MovieClip [buildMenu] Frame 1
onClipEvent (enterFrame) {
if (_root.arch3 != false) {
gotoAndStop (3);
} else if ((((_root.money < _root.arch3_cost) || (_root.wood < _root.arch3_wood)) || (_root.stones < _root.arch3_stone)) || (_root.buildThisDay == true)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 144 MovieClip in Symbol 201 MovieClip [buildMenu] Frame 1
onClipEvent (enterFrame) {
if (_root.arch4 != false) {
gotoAndStop (3);
} else if ((((_root.money < _root.arch4_cost) || (_root.wood < _root.arch4_wood)) || (_root.stones < _root.arch4_stone)) || (_root.buildThisDay == true)) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 197 MovieClip in Symbol 201 MovieClip [buildMenu] Frame 1
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
on (release) {
_root.click1.start();
gotoAndStop (3);
_root.autoScroll = true;
_root.container.buy_menu.removeMovieClip();
}
Instance of Symbol 200 MovieClip in Symbol 201 MovieClip [buildMenu] Frame 1
on (rollOver) {
_root.mouse.gotoAndStop("over");
gotoAndStop (2);
}
on (rollOut) {
_root.mouse.gotoAndStop(1);
gotoAndStop (1);
}
on (release) {
_root.click2.start();
_root.container.attachMovie("buyTable", "buyTable", _root.container.getNextHighestDepth(), {what:"fort2"});
}
onClipEvent (enterFrame) {
if (_root.fort2 != false) {
gotoAndStop (4);
}
}
Instance of Symbol 200 MovieClip in Symbol 201 MovieClip [buildMenu] Frame 1
on (rollOver) {
_root.mouse.gotoAndStop("over");
gotoAndStop (2);
}
on (rollOut) {
_root.mouse.gotoAndStop(1);
gotoAndStop (1);
}
on (release) {
_root.click2.start();
_root.container.attachMovie("buyTable", "buyTable", _root.container.getNextHighestDepth(), {what:"forge"});
}
onClipEvent (enterFrame) {
if (_root.forge != false) {
gotoAndStop (4);
}
}
Instance of Symbol 200 MovieClip in Symbol 201 MovieClip [buildMenu] Frame 1
on (rollOver) {
_root.mouse.gotoAndStop("over");
gotoAndStop (2);
}
on (rollOut) {
_root.mouse.gotoAndStop(1);
gotoAndStop (1);
}
on (release) {
_root.click2.start();
if (_root.defence1 != true) {
_root.container.attachMovie("buyTable", "buyTable", _root.container.getNextHighestDepth(), {what:"defence1"});
} else {
_root.container.attachMovie("buyTable", "buyTable", _root.container.getNextHighestDepth(), {what:"defence2"});
}
}
onClipEvent (enterFrame) {
if (_root.defence2 != false) {
gotoAndStop (4);
}
}
Instance of Symbol 200 MovieClip in Symbol 201 MovieClip [buildMenu] Frame 1
on (rollOver) {
_root.mouse.gotoAndStop("over");
gotoAndStop (2);
}
on (rollOut) {
_root.mouse.gotoAndStop(1);
gotoAndStop (1);
}
on (release) {
_root.click2.start();
if (_root.habitation1 == false) {
_root.container.attachMovie("buyTable", "buyTable", _root.container.getNextHighestDepth(), {what:"habitation1"});
} else if ((_root.habitation1 == true) && (_root.habitation2 != true)) {
_root.container.attachMovie("buyTable", "buyTable", _root.container.getNextHighestDepth(), {what:"habitation2"});
} else if (_root.habitation2 == true) {
_root.container.attachMovie("buyTable", "buyTable", _root.container.getNextHighestDepth(), {what:"habitation3"});
}
}
onClipEvent (enterFrame) {
if (_root.habitation3 != false) {
gotoAndStop (4);
}
}
Instance of Symbol 200 MovieClip in Symbol 201 MovieClip [buildMenu] Frame 1
on (rollOver) {
_root.mouse.gotoAndStop("over");
gotoAndStop (2);
}
on (rollOut) {
_root.mouse.gotoAndStop(1);
gotoAndStop (1);
}
on (release) {
_root.click2.start();
_root.container.attachMovie("buyTable", "buyTable", _root.container.getNextHighestDepth(), {what:"wood_fabric"});
}
onClipEvent (enterFrame) {
if (_root.wood_fabric != false) {
gotoAndStop (4);
}
}
Instance of Symbol 200 MovieClip in Symbol 201 MovieClip [buildMenu] Frame 1
on (rollOver) {
_root.mouse.gotoAndStop("over");
gotoAndStop (2);
}
on (rollOut) {
_root.mouse.gotoAndStop(1);
gotoAndStop (1);
}
on (release) {
_root.click2.start();
_root.container.attachMovie("buyTable", "buyTable", _root.container.getNextHighestDepth(), {what:"stone_fabric"});
}
onClipEvent (enterFrame) {
if (_root.stone_fabric != false) {
gotoAndStop (4);
}
}
Instance of Symbol 200 MovieClip in Symbol 201 MovieClip [buildMenu] Frame 1
on (rollOver) {
_root.mouse.gotoAndStop("over");
gotoAndStop (2);
}
on (rollOut) {
_root.mouse.gotoAndStop(1);
gotoAndStop (1);
}
on (release) {
_root.click2.start();
_root.container.attachMovie("buyTable", "buyTable", _root.container.getNextHighestDepth(), {what:"market"});
}
onClipEvent (enterFrame) {
if (_root.market != false) {
gotoAndStop (4);
}
}
Instance of Symbol 200 MovieClip in Symbol 201 MovieClip [buildMenu] Frame 1
on (rollOver) {
_root.mouse.gotoAndStop("over");
gotoAndStop (2);
}
on (rollOut) {
_root.mouse.gotoAndStop(1);
gotoAndStop (1);
}
on (release) {
_root.click2.start();
_root.container.attachMovie("buyTable", "buyTable", _root.container.getNextHighestDepth(), {what:"defence3"});
}
onClipEvent (enterFrame) {
if (_root.defence3 != false) {
gotoAndStop (4);
}
}
Instance of Symbol 200 MovieClip in Symbol 201 MovieClip [buildMenu] Frame 1
on (rollOver) {
_root.mouse.gotoAndStop("over");
gotoAndStop (2);
}
on (rollOut) {
_root.mouse.gotoAndStop(1);
gotoAndStop (1);
}
on (release) {
_root.click2.start();
_root.container.attachMovie("buyTable", "buyTable", _root.container.getNextHighestDepth(), {what:"arch1"});
}
onClipEvent (enterFrame) {
if (_root.arch1 != false) {
gotoAndStop (4);
}
}
Instance of Symbol 200 MovieClip in Symbol 201 MovieClip [buildMenu] Frame 1
on (rollOver) {
_root.mouse.gotoAndStop("over");
gotoAndStop (2);
}
on (rollOut) {
_root.mouse.gotoAndStop(1);
gotoAndStop (1);
}
on (release) {
_root.click2.start();
_root.container.attachMovie("buyTable", "buyTable", _root.container.getNextHighestDepth(), {what:"arch2"});
}
onClipEvent (enterFrame) {
if (_root.arch2 != false) {
gotoAndStop (4);
}
}
Instance of Symbol 200 MovieClip in Symbol 201 MovieClip [buildMenu] Frame 1
on (rollOver) {
_root.mouse.gotoAndStop("over");
gotoAndStop (2);
}
on (rollOut) {
_root.mouse.gotoAndStop(1);
gotoAndStop (1);
}
on (release) {
_root.click2.start();
_root.container.attachMovie("buyTable", "buyTable", _root.container.getNextHighestDepth(), {what:"arch3"});
}
onClipEvent (enterFrame) {
if (_root.arch3 != false) {
gotoAndStop (4);
}
}
Instance of Symbol 200 MovieClip in Symbol 201 MovieClip [buildMenu] Frame 1
on (rollOver) {
_root.mouse.gotoAndStop("over");
gotoAndStop (2);
}
on (rollOut) {
_root.mouse.gotoAndStop(1);
gotoAndStop (1);
}
on (release) {
_root.click2.start();
_root.container.attachMovie("buyTable", "buyTable", _root.container.getNextHighestDepth(), {what:"arch4"});
}
onClipEvent (enterFrame) {
if (_root.arch4 != false) {
gotoAndStop (4);
}
}
Symbol 207 MovieClip Frame 1
stop();
Symbol 207 MovieClip Frame 2
stop();
Symbol 207 MovieClip Frame 3
stop();
Symbol 207 MovieClip Frame 4
stop();
Symbol 212 MovieClip [buyTable] Frame 1
if (what == "fort2") {
var name_tit = "Fort";
var text_tit = "Protected Fort with towers. Allows to build more buildings. Brings you 150 gold each day.";
} else if (what == "forge") {
var name_tit = "Forge";
var text_tit = "Forge allows you to make mangonels and cannons which can be useful in protecting the castle.";
} else if (what == "defence1") {
var name_tit = "Defence Level 1";
var text_tit = "Makes your castle more strong and covered.";
} else if (what == "defence2") {
var name_tit = "Defence Level 2";
var text_tit = "Makes your castle even more strong and covered.";
} else if (what == "habitation1") {
var name_tit = "Habitation";
var text_tit = "Build more houses so that you could receive more payment for rent from farmers.";
} else if (what == "habitation2") {
var name_tit = "Habitation 2";
var text_tit = "Build more houses so that you could receive more payment for rent from farmers.";
} else if (what == "habitation3") {
var name_tit = "Habitation 3";
var text_tit = "Build more houses so that you could receive more payment for rent from farmers.";
} else if (what == "wood_fabric") {
var name_tit = "Wood Fabric";
var text_tit = "Wood fabric provides you 2 units of wood each day.";
} else if (what == "stone_fabric") {
var name_tit = "Stone Fabric";
var text_tit = "Stone fabric provides you 2 units of stones each day.";
} else if (what == "market") {
var name_tit = "Market";
var text_tit = "You can exchange gold, wood and stones on market.";
} else if (what == "defence3") {
var name_tit = "Extra Defence";
var text_tit = "Protects your castle from attacks.";
} else if (what == "arch1") {
var name_tit = "Archers";
var text_tit = "Common archers with common arrows and bows.";
} else if (what == "arch2") {
var name_tit = "Steel Archers";
var text_tit = "Strong archers with full metal arrows. This archers have a very good range.";
} else if (what == "arch3") {
var name_tit = "Fire Archers";
var text_tit = "Archers with fire arrows. Damages the enemies gradually.";
} else if (what == "arch4") {
var name_tit = "Poison Archers";
var text_tit = "This archers have arrows with poison. Killing the enemies bit by bit and make them go slowly.";
}
textt.wordWrap = true;
var cost = _root[what + "_cost"];
var wood = _root[what + "_wood"];
var stone = _root[what + "_stone"];
Instance of Symbol 207 MovieClip in Symbol 212 MovieClip [buyTable] Frame 1
on (rollOver) {
if (no != true) {
gotoAndStop (2);
}
}
on (rollOut) {
if (no != true) {
gotoAndStop (1);
}
}
on (release, keyPress "<Enter>") {
if (no != true) {
_root.click1.start();
_root.coins.start();
_root.build.start();
gotoAndStop (3);
_root.autoScroll = true;
_root.money = _root.money - _parent.cost;
_root.wood = _root.wood - _parent.wood;
_root.stones = _root.stones - _parent.stone;
_root[_parent.what] = true;
_root.map.castle[_parent.what].play();
if (_parent.what == "wood_fabric") {
_root.map._y = 0;
} else if (_parent.what == "stone_fabric") {
_root.map._y = -200;
} else if (_parent.what == "arch1") {
_root.archer1Col++;
} else if (_parent.what == "arch2") {
_root.archer2Col++;
} else if (_parent.what == "arch3") {
_root.archer3Col++;
} else if (_parent.what == "arch4") {
_root.archer4Col++;
}
_root.buildThisDay = true;
_root.container.buy_menu.removeMovieClip();
_parent.removeMovieClip();
}
}
onClipEvent (enterFrame) {
if ((((_root.money < _parent.cost) || (_root.wood < _parent.wood)) || (_root.stones < _parent.stone)) || (_root.buildThisDay == true)) {
gotoAndStop (4);
var no = true;
} else {
gotoAndStop (1);
no = false;
}
}
Instance of Symbol 197 MovieClip in Symbol 212 MovieClip [buyTable] Frame 1
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
on (release) {
_root.click1.start();
gotoAndStop (3);
_parent.removeMovieClip();
}
Symbol 218 MovieClip Frame 1
stop();
Symbol 218 MovieClip Frame 2
stop();
Symbol 224 MovieClip Frame 1
stop();
Symbol 224 MovieClip Frame 2
stop();
Symbol 229 MovieClip Frame 1
stop();
Symbol 229 MovieClip Frame 2
stop();
Symbol 240 MovieClip Frame 1
stop();
Symbol 240 MovieClip Frame 2
stop();
Symbol 240 MovieClip Frame 3
stop();
Symbol 240 MovieClip Frame 4
stop();
Symbol 245 MovieClip Frame 1
stop();
Symbol 248 MovieClip Frame 1
stop();
Instance of Symbol 218 MovieClip "sell1" in Symbol 249 MovieClip [infoMarket] Frame 1
on (press) {
gotoAndStop (2);
_parent.sell2.gotoAndStop(1);
_parent.sell3.gotoAndStop(1);
_parent.sell = "money";
}
Instance of Symbol 197 MovieClip in Symbol 249 MovieClip [infoMarket] Frame 1
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
on (release) {
_root.click1.start();
_root.autoScroll = true;
_parent.removeMovieClip();
}
Instance of Symbol 224 MovieClip "sell2" in Symbol 249 MovieClip [infoMarket] Frame 1
on (press) {
gotoAndStop (2);
_parent.sell1.gotoAndStop(1);
_parent.sell3.gotoAndStop(1);
_parent.sell = "wood";
}
Instance of Symbol 229 MovieClip "sell3" in Symbol 249 MovieClip [infoMarket] Frame 1
on (press) {
gotoAndStop (2);
_parent.sell1.gotoAndStop(1);
_parent.sell2.gotoAndStop(1);
_parent.sell = "stones";
}
Instance of Symbol 218 MovieClip "buy1" in Symbol 249 MovieClip [infoMarket] Frame 1
on (press) {
gotoAndStop (2);
_parent.buy2.gotoAndStop(1);
_parent.buy3.gotoAndStop(1);
_parent.buy = "money";
}
Instance of Symbol 224 MovieClip "buy2" in Symbol 249 MovieClip [infoMarket] Frame 1
on (press) {
gotoAndStop (2);
_parent.buy1.gotoAndStop(1);
_parent.buy3.gotoAndStop(1);
_parent.buy = "wood";
}
Instance of Symbol 229 MovieClip "buy3" in Symbol 249 MovieClip [infoMarket] Frame 1
on (press) {
gotoAndStop (2);
_parent.buy1.gotoAndStop(1);
_parent.buy2.gotoAndStop(1);
_parent.buy = "stones";
}
Instance of Symbol 240 MovieClip in Symbol 249 MovieClip [infoMarket] Frame 1
onClipEvent (enterFrame) {
if (_parent.ready != true) {
gotoAndStop (4);
} else {
gotoAndStop (1);
}
}
on (release) {
if (_parent.ready == true) {
if (_root[_parent.sell] >= Number(_parent.sellAm.text)) {
_root[_parent.sell] = _root[_parent.sell] - Number(_parent.sellAm.text);
_root[_parent.buy] = _root[_parent.buy] + Number(_parent.buyAm.text);
_parent.completed.play();
_root.autoScroll = true;
_root.click1.start();
_root.coins.start();
_parent.removeMovieClip();
} else {
_parent.notEnough.play();
}
}
}
on (rollOver) {
if (_parent.ready == true) {
gotoAndStop (2);
}
}
on (rollOut) {
if (_parent.ready == true) {
gotoAndStop (1);
}
}
Symbol 249 MovieClip [infoMarket] Frame 2
if (((sell != "") && (buy != "")) && (sellAm.text != 0)) {
var ready = true;
} else {
var ready = false;
}
if ((sell == "money") && (buy == "money")) {
sellAm.text = buyAm.text;
} else if ((sell == "money") && (buy == "wood")) {
sellAm.text = buyAm.text * 100;
} else if ((sell == "money") && (buy == "stones")) {
sellAm.text = buyAm.text * 100;
} else if ((sell == "wood") && (buy == "money")) {
sellAm.text = Math.round(buyAm.text / 25);
} else if ((sell == "wood") && (buy == "wood")) {
sellAm.text = buyAm.text;
} else if ((sell == "wood") && (buy == "stones")) {
sellAm.text = buyAm.text * 2;
} else if ((sell == "stones") && (buy == "money")) {
sellAm.text = Math.round(buyAm.text / 25);
} else if ((sell == "stones") && (buy == "wood")) {
sellAm.text = buyAm.text * 2;
} else if ((sell == "stones") && (buy == "stones")) {
sellAm.text = buyAm.text;
}
Symbol 249 MovieClip [infoMarket] Frame 3
gotoAndPlay ("loop");
Symbol 253 MovieClip Frame 1
stop();
Symbol 253 MovieClip Frame 2
stop();
Symbol 253 MovieClip Frame 3
stop();
Symbol 253 MovieClip Frame 4
stop();
Symbol 260 MovieClip [infoForge] Frame 1
textt.wordWrap = true;
Instance of Symbol 253 MovieClip in Symbol 260 MovieClip [infoForge] Frame 1
on (rollOver) {
if (no != true) {
gotoAndStop (2);
}
}
on (rollOut) {
if (no != true) {
gotoAndStop (1);
}
}
on (release) {
if (no != true) {
_root.click1.start();
_root.coins.start();
gotoAndStop (3);
_root.autoScroll = true;
_root.money = _root.money - 200;
_root.type1Col++;
_root.balistaTimer = 3;
_parent.removeMovieClip();
}
}
onClipEvent (enterFrame) {
if ((_root.money < 200) || (_root.balistaTimer > 0)) {
gotoAndStop (4);
var no = true;
} else {
gotoAndStop (1);
no = false;
}
}
Instance of Symbol 253 MovieClip in Symbol 260 MovieClip [infoForge] Frame 1
on (rollOver) {
if (no != true) {
gotoAndStop (2);
}
}
on (rollOut) {
if (no != true) {
gotoAndStop (1);
}
}
on (release) {
if (no != true) {
_root.click1.start();
_root.coins.start();
gotoAndStop (3);
_root.autoScroll = true;
_root.money = _root.money - 350;
_root.type2Col++;
_root.cannonTimer = 3;
_parent.removeMovieClip();
}
}
onClipEvent (enterFrame) {
if ((_root.money < 350) || (_root.cannonTimer > 0)) {
gotoAndStop (4);
var no = true;
} else {
gotoAndStop (1);
no = false;
}
}
Instance of Symbol 197 MovieClip in Symbol 260 MovieClip [infoForge] Frame 1
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
on (release) {
_root.click1.start();
_root.autoScroll = true;
_parent.removeMovieClip();
}
Symbol 265 MovieClip Frame 1
stop();
Symbol 265 MovieClip Frame 2
stop();
Symbol 265 MovieClip Frame 3
stop();
Symbol 265 MovieClip Frame 4
stop();
Symbol 266 MovieClip [info] Frame 1
textt.wordWrap = true;
Instance of Symbol 265 MovieClip in Symbol 266 MovieClip [info] Frame 1
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
on (release) {
_root.click1.start();
_root.autoScroll = true;
_parent.removeMovieClip();
}
Symbol 272 MovieClip [newWeekText] Frame 99
this.removeMovieClip();
Symbol 278 MovieClip Frame 1
stop();
Symbol 278 MovieClip Frame 10
stop();
Symbol 281 MovieClip Frame 1
stop();
Symbol 281 MovieClip Frame 10
stop();
Instance of Symbol 278 MovieClip in Symbol 282 MovieClip Frame 1
on (rollOver) {
gotoAndPlay ("over");
_root.click2.start();
}
on (rollOut) {
gotoAndPlay ("out");
}
on (release) {
_root.showIns = true;
_root.gotoAndStop("menu");
_root.click1.start();
}
Instance of Symbol 281 MovieClip in Symbol 282 MovieClip Frame 1
on (rollOver) {
gotoAndPlay ("over");
_root.click2.start();
}
on (rollOut) {
gotoAndPlay ("out");
}
on (press) {
_root.gotoAndPlay("game");
_root.click1.start();
_parent._parent.removeMovieClip();
}
Symbol 283 MovieClip [die] Frame 1
_root.dieMusic.start();
Symbol 283 MovieClip [die] Frame 120
stop();
Symbol 318 MovieClip [explode] Frame 17
this.removeMovieClip();
Symbol 323 MovieClip Frame 1
stop();
Symbol 323 MovieClip Frame 2
stop();
Symbol 323 MovieClip Frame 3
stop();
Symbol 323 MovieClip Frame 4
stop();
Symbol 323 MovieClip Frame 5
stop();
Symbol 323 MovieClip Frame 6
stop();
Symbol 324 MovieClip [Cannon] Frame 1
function fire() {
i++;
if (type == "cannon") {
_root.map.attachMovie("bullet2", "bullet" + i, _root.map.getNextHighestDepth(), {_x:this._x, _y:this._y, canId:_name, _rotation:_rotation, damage:damage});
} else if (type == "archer1") {
_root.map.attachMovie("bulletArcher1", "bullet" + i, _root.map.getNextHighestDepth(), {_x:this._x, _y:this._y, canId:_name, _rotation:_rotation, damage:damage});
} else if (type == "archer2") {
_root.map.attachMovie("bulletArcher2", "bullet" + i, _root.map.getNextHighestDepth(), {_x:this._x, _y:this._y, canId:_name, _rotation:_rotation, damage:damage});
} else if (type == "archer3") {
_root.map.attachMovie("bulletArcher3", "bullet" + i, _root.map.getNextHighestDepth(), {_x:this._x, _y:this._y, canId:_name, _rotation:_rotation, damage:damage});
} else if (type == "archer4") {
_root.map.attachMovie("bulletArcher4", "bullet" + i, _root.map.getNextHighestDepth(), {_x:this._x, _y:this._y, canId:_name, _rotation:_rotation, damage:damage});
} else {
_root.map.attachMovie("bullet", "bullet" + i, _root.map.getNextHighestDepth(), {_x:this._x, _y:this._y, canId:_name, _rotation:_rotation, damage:damage});
}
}
var i = 0;
var time = 0;
if (aimsArray == null) {
var aimsArray = [];
}
var startFire = false;
var cType = type;
if (type == "cannon") {
canSkin.gotoAndStop(2);
} else if (type == "archer1") {
canSkin.gotoAndStop("archer1");
} else if (type == "archer2") {
canSkin.gotoAndStop("archer2");
} else if (type == "archer3") {
canSkin.gotoAndStop("archer3");
} else if (type == "archer4") {
canSkin.gotoAndStop("archer4");
} else {
canSkin.gotoAndStop(1);
}
onMouseDown = function () {
if (!_root.mouse.hitTest(_root.container.table)) {
radiusVis._visible = false;
pressedTable = false;
_root.container.table.endUpgr = false;
_root.container.table.removeMovieClip();
}
};
Instance of Symbol 320 MovieClip "radiusVis" in Symbol 324 MovieClip [Cannon] Frame 1
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 323 MovieClip "canSkin" in Symbol 324 MovieClip [Cannon] Frame 1
on (press) {
_parent.pressedTable = true;
_root.container.attachMovie("table", "table", _root.container.getNextHighestDepth(), {_x:511, _y:308});
}
onClipEvent (enterFrame) {
if (_parent.pressedTable == true) {
_parent.pressedTable = true;
_parent.radiusVis._visible = true;
_root.container.table.gotoAndPlay(1);
_root.container.table.costUpgr = _parent.costUpgr;
_root.container.table.cType = _parent.cType;
_root.container.table.level = _parent.level;
_root.container.table.range = _parent.radius;
_root.container.table.damage = _parent.damage;
_root.container.table.fireSpeed = _parent.fireSpeed;
_root.container.table.id = _parent.id;
_root.container.table.boundId = _parent.boundId;
}
}
Symbol 324 MovieClip [Cannon] Frame 2
time++;
if ((time > (fireSpeed / _root.velocity)) && (startFire == true)) {
fire();
time = 0;
}
radiusVis._width = (radiusVis._height = radius * 2);
if (type == "cannon") {
if (level == 1) {
var radius = 80;
var fireSpeed = 16;
var damage = 50;
var costUpgr = 110;
} else if (level == 2) {
var radius = 90;
var fireSpeed = 14;
var damage = 120;
var costUpgr = 190;
} else if (level == 3) {
var radius = 90;
var fireSpeed = 12;
var damage = 180;
}
} else if (type == "archer1") {
if (level == 1) {
var radius = 110;
var fireSpeed = 6;
var damage = 30;
var costUpgr = 100;
} else if (level == 2) {
var radius = 120;
var fireSpeed = 6;
var damage = 60;
var costUpgr = 175;
} else if (level == 3) {
var radius = 130;
var fireSpeed = 6;
var damage = 130;
}
} else if (type == "archer2") {
if (level == 1) {
var radius = 130;
var fireSpeed = 13;
var damage = 50;
var costUpgr = 200;
} else if (level == 2) {
var radius = 140;
var fireSpeed = 12;
var damage = 110;
var costUpgr = 300;
} else if (level == 3) {
var radius = 150;
var fireSpeed = 11;
var damage = 190;
}
} else if (type == "archer3") {
if (level == 1) {
var radius = 100;
var fireSpeed = 12;
var damage = 25;
var costUpgr = 150;
} else if (level == 2) {
var radius = 110;
var fireSpeed = 12;
var damage = 35;
var costUpgr = 290;
} else if (level == 3) {
var radius = 120;
var fireSpeed = 11;
var damage = 45;
}
} else if (type == "archer4") {
if (level == 1) {
var radius = 100;
var fireSpeed = 10;
var damage = 40;
var costUpgr = 300;
} else if (level == 2) {
var radius = 110;
var fireSpeed = 9;
var damage = 60;
var costUpgr = 400;
} else if (level == 3) {
var radius = 120;
var fireSpeed = 8;
var damage = 80;
}
} else if (level == 1) {
var radius = 80;
var fireSpeed = 8;
var damage = 30;
var costUpgr = 100;
} else if (level == 2) {
var radius = 100;
var fireSpeed = 7;
var damage = 80;
var costUpgr = 125;
} else if (level == 3) {
var radius = 115;
var fireSpeed = 6;
var damage = 120;
}
Symbol 324 MovieClip [Cannon] Frame 3
gotoAndPlay ("loop");
Symbol 344 Button
on (release) {
_root.gotoAndStop("skywardGames");
_root.click1.start();
}
Symbol 345 MovieClip Frame 1
stop();
Symbol 345 MovieClip Frame 100
stop();
Instance of Symbol 350 MovieClip in Symbol 351 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_x > -506) {
_x = (_x - 2);
} else {
_x = 0;
}
}
Symbol 352 Button
on (press) {
getURL ("http://www.skywardgames.com", "_blank");
}
Symbol 356 MovieClip Frame 393
stop();
_root.play();
Instance of Symbol 362 MovieClip in Symbol 363 MovieClip Frame 1
onClipEvent (enterFrame) {
_x = (_x - 1);
if (_x < -587) {
_x = 0;
}
}
Symbol 363 MovieClip Frame 2
gotoAndPlay (1);
Symbol 372 MovieClip Frame 1
stop();
Symbol 372 MovieClip Frame 10
stop();
Symbol 375 MovieClip Frame 1
stop();
Symbol 375 MovieClip Frame 10
stop();
Symbol 378 MovieClip Frame 1
stop();
Symbol 378 MovieClip Frame 10
stop();
Symbol 379 Button
on (press) {
getURL ("http://www.skywardgames.com", "_blank");
}
on (rollOver) {
_root.mouse.gotoAndStop("over");
}
on (rollOut) {
_root.mouse.gotoAndStop(1);
}
Instance of Symbol 372 MovieClip in Symbol 380 MovieClip Frame 1
on (rollOver) {
gotoAndPlay ("over");
_root.mouse.gotoAndStop("over");
_root.click2.start();
}
on (rollOut) {
gotoAndPlay ("out");
_root.mouse.gotoAndStop(1);
}
on (press) {
_root.mainMenu._visible = false;
_root.dificulty._visible = true;
_root.click1.start();
}
Instance of Symbol 278 MovieClip in Symbol 380 MovieClip Frame 1
on (rollOver) {
gotoAndPlay ("over");
_root.click2.start();
_root.mouse.gotoAndStop("over");
}
on (rollOut) {
gotoAndPlay ("out");
_root.mouse.gotoAndStop(1);
}
on (release) {
_root.instructions._visible = true;
_root.mainMenu._visible = false;
_root.click1.start();
}
Instance of Symbol 375 MovieClip in Symbol 380 MovieClip Frame 1
on (release) {
_root.mainMenu._visible = false;
_root.credits._visible = true;
}
on (rollOver) {
gotoAndPlay ("over");
_root.click2.start();
_root.mouse.gotoAndStop("over");
}
on (rollOut) {
gotoAndPlay ("out");
_root.mouse.gotoAndStop(1);
}
Instance of Symbol 378 MovieClip in Symbol 380 MovieClip Frame 1
on (rollOver) {
gotoAndPlay ("over");
_root.click2.start();
_root.mouse.gotoAndStop("over");
}
on (rollOut) {
gotoAndPlay ("out");
_root.mouse.gotoAndStop(1);
}
Instance of Symbol 197 MovieClip in Symbol 384 MovieClip Frame 1
on (press) {
_root.credits._visible = false;
_root.mainMenu._visible = true;
}
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
Symbol 389 Button
on (release) {
_root.dif = "easy";
_root.gotoAndPlay("game");
_root.click1.start();
}
Symbol 390 Button
on (release) {
_root.dif = "normal";
_root.gotoAndPlay("game");
_root.click1.start();
}
Symbol 391 Button
on (release) {
_root.dif = "hard";
_root.gotoAndPlay("game");
_root.click1.start();
}
Symbol 399 Button
on (press) {
gotoAndStop (2);
_root.page.start();
}
Symbol 403 Button
on (press) {
gotoAndStop (1);
_root.page.start();
}
Symbol 404 MovieClip Frame 1
stop();
Instance of Symbol 197 MovieClip in Symbol 404 MovieClip Frame 1
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
on (release) {
_root.instructions._visible = false;
_root.mainMenu._visible = true;
_root.click1.start();
}
Symbol 404 MovieClip Frame 2
stop();
Symbol 407 MovieClip Frame 1
stop();
Symbol 407 MovieClip Frame 2
stop();
Symbol 416 MovieClip Frame 1
stop();
Symbol 416 MovieClip Frame 35
stop();
Symbol 420 MovieClip Frame 1
stop();
Symbol 420 MovieClip Frame 35
stop();
Symbol 425 MovieClip Frame 1
stop();
Symbol 425 MovieClip Frame 35
stop();
Symbol 427 MovieClip Frame 1
stop();
Symbol 427 MovieClip Frame 35
stop();
Symbol 429 MovieClip Frame 1
stop();
Symbol 429 MovieClip Frame 35
stop();
Symbol 433 MovieClip Frame 1
stop();
Symbol 433 MovieClip Frame 35
stop();
Symbol 437 Button
on (release) {
_root.autoScroll = false;
_root.container.attachMovie("info", "info", _root.container.getNextHighestDepth(), {name_tit:"Wood Fabric", text_tit:"Provides you 2 units of wood each day"});
}
Symbol 441 MovieClip Frame 1
stop();
Symbol 441 MovieClip Frame 35
stop();
Symbol 445 Button
on (release) {
_root.autoScroll = false;
_root.container.attachMovie("info", "info", _root.container.getNextHighestDepth(), {name_tit:"Stone Fabric", text_tit:"Provides you 2 units of stones each day"});
}
Symbol 449 MovieClip Frame 1
stop();
Symbol 449 MovieClip Frame 35
stop();
Symbol 453 MovieClip Frame 1
stop();
Symbol 453 MovieClip Frame 35
stop();
Symbol 457 Button
on (release) {
_root.autoScroll = false;
_root.container.attachMovie("info", "info", _root.container.getNextHighestDepth(), {name_tit:"Steel Archers", text_tit:"Provides you a few new steel archers every week"});
}
Symbol 461 MovieClip Frame 1
stop();
Symbol 461 MovieClip Frame 35
stop();
Symbol 465 Button
on (release) {
_root.autoScroll = false;
_root.container.attachMovie("info", "info", _root.container.getNextHighestDepth(), {name_tit:"Fire Archers", text_tit:"Provides you a few new fire archers every week"});
}
Symbol 469 MovieClip Frame 1
stop();
Symbol 469 MovieClip Frame 35
stop();
Symbol 473 Button
on (release) {
_root.autoScroll = false;
_root.container.attachMovie("info", "info", _root.container.getNextHighestDepth(), {name_tit:"Poison Archers", text_tit:"Provides you a few new poison archers every week"});
}
Symbol 477 MovieClip Frame 1
stop();
Symbol 477 MovieClip Frame 35
stop();
Symbol 481 Button
on (release) {
_root.autoScroll = false;
_root.container.attachMovie("info", "info", _root.container.getNextHighestDepth(), {name_tit:"Common Acrhers", text_tit:"Provides you a few new archers every week"});
}
Symbol 485 MovieClip Frame 1
stop();
Symbol 485 MovieClip Frame 35
stop();
Symbol 489 Button
on (release) {
_root.autoScroll = false;
_root.container.attachMovie("infoForge", "infoForge", _root.container.getNextHighestDepth());
}
Symbol 493 MovieClip Frame 1
stop();
Symbol 493 MovieClip Frame 35
stop();
Symbol 497 Button
on (release) {
_root.autoScroll = false;
_root.container.attachMovie("infoMarket", "infoMarket", _root.container.getNextHighestDepth());
}
Symbol 501 MovieClip Frame 1
stop();
Symbol 501 MovieClip Frame 35
stop();
Symbol 505 Button
on (release) {
if (_root.startDay != true) {
_root.container.attachMovie("buildMenu", "buy_menu", _root.container.getNextHighestDepth());
_root.autoScroll = false;
_root.map._x = -30;
_root.map._y = -70;
}
}
on (rollOver) {
_root.map.attachMovie("health2", "health2", _root.map.getNextHighestDepth(), {_x:253, _y:207, _width:40, _height:7});
}
on (rollOut) {
_root.map.health2.removeMovieClip();
}
Symbol 512 Button
on (release) {
if (_root.startDay != true) {
_root.container.attachMovie("buildMenu", "buy_menu", _root.container.getNextHighestDepth());
_root.autoScroll = false;
_root.map._x = -30;
_root.map._y = -70;
}
}
on (rollOver) {
_root.map.attachMovie("health2", "health2", _root.map.getNextHighestDepth(), {_x:263, _y:207, _width:40, _height:7});
}
on (rollOut) {
_root.map.health2.removeMovieClip();
}
Instance of Symbol 416 MovieClip "defence2" in Symbol 513 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.defence2 == false) {
_visible = false;
} else {
_visible = true;
}
}
Instance of Symbol 420 MovieClip "defence1" in Symbol 513 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.defence1 == false) {
_visible = false;
} else {
_visible = true;
}
}
Instance of Symbol 425 MovieClip "habitation1" in Symbol 513 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.habitation1 == false) {
_visible = false;
} else {
_visible = true;
}
}
Instance of Symbol 427 MovieClip "habitation2" in Symbol 513 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.habitation2 == false) {
_visible = false;
} else {
_visible = true;
}
}
Instance of Symbol 429 MovieClip "habitation3" in Symbol 513 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.habitation3 == false) {
_visible = false;
} else {
_visible = true;
}
}
Instance of Symbol 433 MovieClip "wood_fabric" in Symbol 513 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.wood_fabric == false) {
_visible = false;
_parent.wood_fabric_but._visible = false;
} else {
_visible = true;
_parent.wood_fabric_but._visible = true;
}
}
Instance of Symbol 441 MovieClip "stone_fabric" in Symbol 513 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.stone_fabric == false) {
_visible = false;
_parent.stone_fabric_but._visible = false;
} else {
_visible = true;
_parent.stone_fabric_but._visible = true;
}
}
Instance of Symbol 449 MovieClip "defence3" in Symbol 513 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.defence3 == false) {
_visible = false;
} else {
_visible = true;
}
}
Instance of Symbol 453 MovieClip "arch2" in Symbol 513 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.arch2 == false) {
_visible = false;
_parent.arch2_but._visible = false;
} else {
_visible = true;
_parent.arch2_but._visible = true;
}
}
Instance of Symbol 461 MovieClip "arch3" in Symbol 513 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.arch3 == false) {
_visible = false;
_parent.arch3_but._visible = false;
} else {
_visible = true;
_parent.arch3_but._visible = true;
}
}
Instance of Symbol 469 MovieClip "arch4" in Symbol 513 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.arch4 == false) {
_visible = false;
_parent.arch4_but._visible = false;
} else {
_visible = true;
_parent.arch4_but._visible = true;
}
}
Instance of Symbol 477 MovieClip "arch1" in Symbol 513 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.arch1 == false) {
_visible = false;
_parent.arch1_but._visible = false;
} else {
_visible = true;
_parent.arch1_but._visible = true;
}
}
Instance of Symbol 485 MovieClip "forge" in Symbol 513 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.forge == false) {
_visible = false;
_parent.forge_but._visible = false;
} else {
_visible = true;
_parent.forge_but._visible = true;
}
}
Instance of Symbol 493 MovieClip "market" in Symbol 513 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.market == false) {
_visible = false;
_parent.market_but._visible = false;
} else {
_visible = true;
_parent.market_but._visible = true;
}
}
Instance of Symbol 501 MovieClip "fort2" in Symbol 513 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_root.fort2 == false) {
_visible = false;
_parent.fort2_but._visible = false;
} else {
_visible = true;
_parent.fort2_but._visible = true;
}
}
Instance of Symbol 508 MovieClip "fort2" in Symbol 513 MovieClip Frame 1
onClipEvent (enterFrame) {
if ((_root.fort1 == false) || (_root.fort2 == true)) {
_visible = false;
_parent.fort1_but._visible = false;
} else {
_visible = true;
_parent.fort1_but._visible = true;
}
}
Symbol 514 MovieClip Frame 1
var cell = 20;
var cell2 = 20;
onMouseMove = function () {
attachedType1._x = Math.round(_xmouse / cell) * cell;
attachedType1._y = Math.round(_ymouse / cell) * cell;
attachedType2._x = Math.round(_xmouse / cell) * cell;
attachedType2._y = Math.round(_ymouse / cell) * cell;
pit._x = Math.round(_xmouse / cell) * cell;
pit._y = Math.round(_ymouse / cell) * cell;
archer1._x = Math.round(_xmouse / cell) * cell;
archer1._y = Math.round(_ymouse / cell) * cell;
archer2._x = Math.round(_xmouse / cell) * cell;
archer2._y = Math.round(_ymouse / cell) * cell;
archer3._x = Math.round(_xmouse / cell) * cell;
archer3._y = Math.round(_ymouse / cell) * cell;
archer4._x = Math.round(_xmouse / cell) * cell;
archer4._y = Math.round(_ymouse / cell) * cell;
tower._x = Math.round(_xmouse / cell) * cell;
tower._y = Math.round(_ymouse / cell2) * cell2;
};
Symbol 514 MovieClip Frame 2
this.setMask(_root.mask);
if (Key.isDown(27)) {
attachedType1.removeMovieClip();
attachedType2.removeMovieClip();
pit.removeMovieClip();
tower.removeMovieClip();
archer1.removeMovieClip();
archer2.removeMovieClip();
archer3.removeMovieClip();
archer4.removeMovieClip();
_root.cancell._visible = false;
alrPressedItem = false;
}
_root.type1.onPress = function () {
if ((_root.type1Col > 0) && (alrPressedItem != true)) {
alrPressedItem = true;
_root.click2.start();
_root.map.attachMovie("type1", "attachedType1", _root.map.getNextHighestDepth(), {_x:Math.round(_xmouse / cell) * cell, _y:Math.round(_ymouse / cell) * cell});
_root.cancell._visible = true;
attachedType1.onPress = function () {
var _local2 = 0;
while (_local2 < (_root.pathBoundsI + 1)) {
if (attachedType1.hitTest(_root.map["pathBounds" + _local2])) {
attachedType1.pathTouch = true;
break;
}
attachedType1.pathTouch = false;
_local2++;
}
if (attachedType1.pathTouch == false) {
_root.pathBoundsI++;
_root.set1.start();
_root.map.attachMovie("Cannon", "cannon" + _root.cansAmount, _root.map.getNextHighestDepth(), {_x:Math.round(_xmouse / cell) * cell, _y:Math.round(_ymouse / cell) * cell, id:_root.cansAmount, boundId:_root.pathBoundsI, level:1, pressedTable:false});
_root.map.attachMovie("boundBlank", "pathBounds" + _root.pathBoundsI, _root.map.getNextHighestDepth(), {_x:attachedType1._x, _y:attachedType1._y});
_root.cansAmount++;
_root.type1Col = _root.type1Col - 1;
_root.cancell._visible = false;
alrPressedItem = false;
attachedType1.removeMovieClip();
}
};
}
};
_root.type2.onPress = function () {
if ((_root.type2Col > 0) && (alrPressedItem != true)) {
alrPressedItem = true;
_root.click2.start();
_root.map.attachMovie("type2", "attachedType2", _root.map.getNextHighestDepth(), {_x:Math.round(_xmouse / cell) * cell, _y:Math.round(_ymouse / cell) * cell});
_root.cancell._visible = true;
attachedType2.onPress = function () {
var _local2 = 0;
while (_local2 < (_root.pathBoundsI + 1)) {
if (attachedType2.hitTest(_root.map["pathBounds" + _local2])) {
attachedType2.pathTouch = true;
break;
}
attachedType2.pathTouch = false;
_local2++;
}
if (attachedType2.pathTouch == false) {
_root.pathBoundsI++;
_root.set1.start();
_root.map.attachMovie("Cannon", "cannon" + _root.cansAmount, _root.map.getNextHighestDepth(), {_x:Math.round(_xmouse / cell) * cell, _y:Math.round(_ymouse / cell) * cell, type:"cannon", id:_root.cansAmount, boundId:_root.pathBoundsI, level:1, pressedTable:false});
_root.map.attachMovie("boundBlank", "pathBounds" + _root.pathBoundsI, _root.map.getNextHighestDepth(), {_x:attachedType2._x, _y:attachedType2._y});
_root.cansAmount++;
_root.type2Col = _root.type2Col - 1;
_root.cancell._visible = false;
alrPressedItem = false;
attachedType2.removeMovieClip();
}
};
}
};
_root.pitType.onPress = function () {
if ((_root.money >= _root.pitCost) && (alrPressedItem != true)) {
alrPressedItem = true;
_root.click2.start();
_root.map.attachMovie("pitImg", "pit", _root.map.getNextHighestDepth(), {_x:Math.round(_xmouse / cell) * cell, _y:Math.round(_ymouse / cell) * cell});
_root.cancell._visible = true;
pit.onPress = function () {
var _local3 = 0;
while (_local3 < (_root.pathBoundsI + 1)) {
if (pit.hitTest(_root.map["pathBounds" + _local3])) {
pit.pathTouch = true;
break;
}
pit.pathTouch = false;
_local3++;
}
var _local2 = 0;
while (_local2 < _root.pitI) {
if (pit.hitTest(_root.map["pit" + _local2].pitObl)) {
pit.pathTouch = false;
break;
}
_local2++;
}
if (pit.pathTouch == true) {
_root.set1.start();
_root.map.container.attachMovie("pitImg", "pit" + _root.pitI, _root.map.container.getNextHighestDepth(), {_x:Math.round(_xmouse / cell) * cell, _y:Math.round(_ymouse / cell) * cell});
_root.pathBoundsI++;
_root.map.attachMovie("boundBlank", "pathBounds" + _root.pathBoundsI, _root.map.getNextHighestDepth(), {_x:pit._x, _y:pit._y});
_root.pitI++;
_root.money = _root.money - _root.pitCost;
_root.pitsAmount++;
_root.cancell._visible = false;
alrPressedItem = false;
pit.removeMovieClip();
}
};
}
};
_root.towerType.onPress = function () {
if (((_root.money >= _root.towerCost) && (_root.stones >= _root.towerCostStones)) && (alrPressedItem != true)) {
alrPressedItem = true;
_root.click2.start();
_root.map.attachMovie("tower", "tower", _root.map.getNextHighestDepth(), {_x:Math.round(_xmouse / cell2) * cell2, _y:Math.round(_ymouse / cell2) * cell2});
_root.cancell._visible = true;
tower.onPress = function () {
var _local2 = 0;
while (_local2 < (_root.pathBoundsI + 1)) {
if (tower.hitTest(_root.map["pathBounds" + _local2])) {
tower.pathTouch = true;
break;
}
tower.pathTouch = false;
_local2++;
}
if (tower.pathTouch == false) {
_root.set1.start();
_root.map.attachMovie("tower", "tower" + _root.towerI, _root.map.getNextHighestDepth(), {_x:Math.round(_xmouse / cell) * cell, _y:Math.round(_ymouse / cell2) * cell2});
_root.pathBoundsI++;
_root.map.attachMovie("boundBlank", "pathBounds" + _root.pathBoundsI, _root.map.getNextHighestDepth(), {_x:tower._x, _y:tower._y + 10});
_root.towerI++;
_root.money = _root.money - _root.towerCost;
_root.stones = _root.stones - _root.towerCostStones;
_root.towersAmount++;
_root.cancell._visible = false;
alrPressedItem = false;
tower.removeMovieClip();
}
};
}
};
_root.archer1Type.onPress = function () {
if ((_root.archer1Col > 0) && (alrPressedItem != true)) {
alrPressedItem = true;
_root.click2.start();
_root.map.attachMovie("archer1", "archer1", _root.map.getNextHighestDepth(), {_x:Math.round(_xmouse / cell) * cell, _y:Math.round(_ymouse / cell) * cell});
_root.cancell._visible = true;
archer1.onPress = function () {
var _local3 = 0;
while (_local3 < (_root.towersAmount + 2)) {
var _local2 = 0;
while (_local2 < _root.cansAmount) {
if (archer1.hitTest(_root.map["cannon" + _local2].spot)) {
archer1.touchArc = true;
break;
}
archer1.touchArc = false;
_local2++;
}
if (archer1.hitTest(_root.map["tower" + _local3].spot) && (archer1.touchArc != true)) {
_root.set1.start();
_root.map.attachMovie("Cannon", "cannon" + _root.cansAmount, _root.map.getNextHighestDepth(), {_x:Math.round(_xmouse / cell) * cell, _y:Math.round(_ymouse / cell) * cell, type:"archer1", id:_root.cansAmount, level:1, pressedTable:false});
_root.archerI++;
_root.cansAmount++;
_root.archer1Col = _root.archer1Col - 1;
_root.archersAmount++;
archer1.touchArc = false;
_root.cancell._visible = false;
alrPressedItem = false;
archer1.removeMovieClip();
}
_local3++;
}
};
}
};
_root.archer2Type.onPress = function () {
if ((_root.archer2Col > 0) && (alrPressedItem != true)) {
alrPressedItem = true;
_root.click2.start();
_root.map.attachMovie("archer2", "archer2", _root.map.getNextHighestDepth(), {_x:Math.round(_xmouse / cell) * cell, _y:Math.round(_ymouse / cell) * cell});
_root.cancell._visible = true;
archer2.onPress = function () {
var _local3 = 0;
while (_local3 < (_root.towersAmount + 2)) {
var _local2 = 0;
while (_local2 < _root.cansAmount) {
if (archer2.hitTest(_root.map["cannon" + _local2].spot)) {
archer2.touchArc = true;
break;
}
archer2.touchArc = false;
_local2++;
}
if (archer2.hitTest(_root.map["tower" + _local3].spot) && (archer2.touchArc != true)) {
_root.set1.start();
_root.map.attachMovie("Cannon", "cannon" + _root.cansAmount, _root.map.getNextHighestDepth(), {_x:Math.round(_xmouse / cell) * cell, _y:Math.round(_ymouse / cell) * cell, type:"archer2", id:_root.cansAmount, level:1, pressedTable:false});
_root.archerI++;
_root.cansAmount++;
_root.archer2Col = _root.archer2Col - 1;
_root.archersAmount++;
archer2.touchArc = false;
_root.cancell._visible = false;
alrPressedItem = false;
archer2.removeMovieClip();
}
_local3++;
}
};
}
};
_root.archer3Type.onPress = function () {
if ((_root.archer3Col > 0) && (alrPressedItem != true)) {
alrPressedItem = true;
_root.click2.start();
_root.map.attachMovie("archer3", "archer3", _root.map.getNextHighestDepth(), {_x:Math.round(_xmouse / cell) * cell, _y:Math.round(_ymouse / cell) * cell});
_root.cancell._visible = true;
archer3.onPress = function () {
var _local3 = 0;
while (_local3 < (_root.towersAmount + 2)) {
var _local2 = 0;
while (_local2 < _root.cansAmount) {
if (archer3.hitTest(_root.map["cannon" + _local2].spot)) {
archer3.touchArc = true;
break;
}
archer3.touchArc = false;
_local2++;
}
if (archer3.hitTest(_root.map["tower" + _local3].spot) && (archer3.touchArc != true)) {
_root.set1.start();
_root.map.attachMovie("Cannon", "cannon" + _root.cansAmount, _root.map.getNextHighestDepth(), {_x:Math.round(_xmouse / cell) * cell, _y:Math.round(_ymouse / cell) * cell, type:"archer3", id:_root.cansAmount, level:1, pressedTable:false});
_root.archerI++;
_root.cansAmount++;
_root.archer3Col = _root.archer3Col - 1;
_root.archersAmount++;
archer3.touchArc = false;
_root.cancell._visible = false;
alrPressedItem = false;
archer3.removeMovieClip();
}
_local3++;
}
};
}
};
_root.archer4Type.onPress = function () {
if ((_root.archer4Col > 0) && (alrPressedItem != true)) {
alrPressedItem = true;
_root.click2.start();
_root.map.attachMovie("archer4", "archer4", _root.map.getNextHighestDepth(), {_x:Math.round(_xmouse / cell) * cell, _y:Math.round(_ymouse / cell) * cell});
_root.cancell._visible = true;
archer4.onPress = function () {
var _local3 = 0;
while (_local3 < (_root.towersAmount + 2)) {
var _local2 = 0;
while (_local2 < _root.cansAmount) {
if (archer4.hitTest(_root.map["cannon" + _local2].spot)) {
archer4.touchArc = true;
break;
}
archer4.touchArc = false;
_local2++;
}
if (archer4.hitTest(_root.map["tower" + _local3].spot) && (archer4.touchArc != true)) {
_root.set1.start();
_root.map.attachMovie("Cannon", "cannon" + _root.cansAmount, _root.map.getNextHighestDepth(), {_x:Math.round(_xmouse / cell) * cell, _y:Math.round(_ymouse / cell) * cell, type:"archer4", id:_root.cansAmount, level:1, pressedTable:false});
_root.archerI++;
_root.cansAmount++;
_root.archer4Col = _root.archer4Col - 1;
_root.archersAmount++;
archer4.touchArc = false;
_root.cancell._visible = false;
alrPressedItem = false;
archer4.removeMovieClip();
}
_local3++;
}
};
}
};
Symbol 514 MovieClip Frame 3
gotoAndPlay ("loop");
Symbol 525 MovieClip Frame 1
stop();
Symbol 525 MovieClip Frame 2
stop();
Symbol 525 MovieClip Frame 3
stop();
Symbol 525 MovieClip Frame 4
stop();
Symbol 536 MovieClip Frame 1
stop();
Symbol 536 MovieClip Frame 2
stop();
Symbol 540 MovieClip Frame 1
stop();
Symbol 540 MovieClip Frame 2
stop();
Symbol 547 MovieClip Frame 1
stop();
Symbol 547 MovieClip Frame 2
stop();
Symbol 547 MovieClip Frame 3
gotoAndStop (1);
Symbol 547 MovieClip Frame 4
stop();
Symbol 555 MovieClip Frame 1
stop();
Symbol 555 MovieClip Frame 2
stop();
Symbol 561 MovieClip Frame 1
stop();
Symbol 561 MovieClip Frame 2
stop();
Symbol 561 MovieClip Frame 3
stop();
Symbol 564 MovieClip Frame 1
stop();
Symbol 564 MovieClip Frame 2
stop();
Symbol 569 MovieClip Frame 1
stop();
Symbol 569 MovieClip Frame 2
stop();
Symbol 569 MovieClip Frame 3
stop();
Symbol 569 MovieClip Frame 4
stop();
Symbol 578 MovieClip Frame 1
stop();
Symbol 578 MovieClip Frame 2
stop();
Symbol 578 MovieClip Frame 3
stop();
Symbol 578 MovieClip Frame 4
stop();
Symbol 584 MovieClip Frame 1
stop();
Symbol 584 MovieClip Frame 2
stop();
Symbol 584 MovieClip Frame 3
stop();
Symbol 584 MovieClip Frame 4
stop();
Symbol 590 Button
on (release) {
nextFrame();
_root.click2.start();
}
Symbol 592 Button
on (press) {
_root.click2.start();
_root.container.attachMovie("buyTable", "buyTable", _root.container.getNextHighestDepth(), {what:"fort2"});
nextFrame();
}
Symbol 594 Button
on (press) {
_root.click1.start();
_root.coins.start();
_root.build.start();
_root.autoScroll = true;
_root.money = _root.money - _root.fort2_cost;
_root.wood = _root.wood - _root.fort2_wood;
_root.stones = _root.stones - _root.fort2_stone;
_root.fort2 = true;
_root.map.castle.fort2.play();
_root.buildThisDay = true;
_root.container.buy_menu.removeMovieClip();
_root.container.buyTable.removeMovieClip();
_root.container.buildMenu.removeMovieClip();
nextFrame();
}
Symbol 596 Button
on (press) {
if (_root.startDay != true) {
_root.bugsAmount = 0;
_root.click1.start();
_root.map._x = -350;
_root.map._y = -80;
if (_root.day == 7) {
_root.newweek.start();
} else {
_root["music" + (random(6) + 1)].start();
}
_root.bugId++;
_root.cannonTimer--;
_root.balistaTimer--;
_root.startDay = true;
_root.day++;
_root.daysSpent++;
_root.buildThisDay = false;
rolled = false;
if (_root.wood_fabric == true) {
_root.wood = _root.wood + 2;
}
if (_root.stone_fabric == true) {
_root.stones = _root.stones + 2;
}
_root.money = _root.money + _root.plusMoney;
}
_root.learning._visible = false;
}
Symbol 598 MovieClip Frame 1
stop();
Instance of Symbol 265 MovieClip in Symbol 598 MovieClip Frame 1
on (release) {
_parent.gotoAndStop(2);
_root.click2.start();
}
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
Instance of Symbol 578 MovieClip in Symbol 598 MovieClip Frame 1
on (release) {
_parent._visible = false;
_root.click2.start();
}
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
Symbol 598 MovieClip Frame 2
stop();
Instance of Symbol 584 MovieClip in Symbol 598 MovieClip Frame 2
on (release) {
_parent.nextFrame();
_root.click2.start();
}
on (rollOver) {
gotoAndStop (2);
}
on (rollOut) {
gotoAndStop (1);
}
Symbol 598 MovieClip Frame 3
stop();
Symbol 598 MovieClip Frame 4
stop();
Symbol 598 MovieClip Frame 5
stop();
Symbol 598 MovieClip Frame 6
stop();
Symbol 598 MovieClip Frame 7
stop();
_root.click2.start();
_root.container.attachMovie("buildMenu", "buy_menu", _root.container.getNextHighestDepth());
_root.autoScroll = false;
_root.map._x = -30;
_root.map._y = -70;
Symbol 598 MovieClip Frame 8
stop();
Symbol 598 MovieClip Frame 9
stop();
Symbol 614 Button
on (press) {
getURL ("http://www.skywardgames.com", "_blank");
}
Symbol 616 MovieClip Frame 139
stop();
Symbol 617 MovieClip Frame 1
stopAllSounds();
_root.winGame.start();
Symbol 617 MovieClip Frame 55
stop();